From 85cd345dc8a979b7d67c69030e081711e68bb2be Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 3 Jul 2021 20:38:26 +0200 Subject: [PATCH 1/7] sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver The Renesas R-Car Gen3 development kits contain board ID EEPROM. This driver parses out the board ID and revision out of that EEPROM and exports it e.g. for the board-info print on boot. Signed-off-by: Marek Vasut Cc: Sean Anderson Cc: Simon Glass --- drivers/sysinfo/Kconfig | 7 ++ drivers/sysinfo/Makefile | 1 + drivers/sysinfo/rcar3.c | 197 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 205 insertions(+) create mode 100644 drivers/sysinfo/rcar3.c diff --git a/drivers/sysinfo/Kconfig b/drivers/sysinfo/Kconfig index 381dcd8844..e35f7cb179 100644 --- a/drivers/sysinfo/Kconfig +++ b/drivers/sysinfo/Kconfig @@ -17,6 +17,13 @@ config SYSINFO_GAZERBEAM help Support querying device information for the gdsys Gazerbeam board. +config SYSINFO_RCAR3 + bool "Enable sysinfo driver for the Renesas R-Car Gen3" + depends on RCAR_GEN3 && I2C_EEPROM + default y if RCAR_GEN3 + help + Support querying SoC version information for Renesas R-Car Gen3. + config SYSINFO_SANDBOX bool "Enable sysinfo driver for the Sandbox board" help diff --git a/drivers/sysinfo/Makefile b/drivers/sysinfo/Makefile index d9f708b7ea..680dde77fe 100644 --- a/drivers/sysinfo/Makefile +++ b/drivers/sysinfo/Makefile @@ -5,5 +5,6 @@ obj-y += sysinfo-uclass.o obj-$(CONFIG_SYSINFO_GAZERBEAM) += gazerbeam.o obj-$(CONFIG_SYSINFO_GPIO) += gpio.o +obj-$(CONFIG_SYSINFO_RCAR3) += rcar3.o obj-$(CONFIG_SYSINFO_SANDBOX) += sandbox.o obj-$(CONFIG_SYSINFO_SMBIOS) += smbios.o diff --git a/drivers/sysinfo/rcar3.c b/drivers/sysinfo/rcar3.c new file mode 100644 index 0000000000..c2f4ddfbbe --- /dev/null +++ b/drivers/sysinfo/rcar3.c @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021 Marek Vasut + */ + +#include +#include +#include +#include +#include + +#define BOARD_CODE_MASK 0xF8 +#define BOARD_REV_MASK 0x07 +#define BOARD_CODE_SHIFT 0x03 + +#define BOARD_SALVATOR_X 0x0 +#define BOARD_KRIEK 0x1 +#define BOARD_STARTER_KIT 0x2 +#define BOARD_SALVATOR_XS 0x4 +#define BOARD_EBISU 0x8 +#define BOARD_STARTER_KIT_PRE 0xB +#define BOARD_EBISU_4D 0xD +#define BOARD_DRAAK 0xE +#define BOARD_EAGLE 0xF + +/** + * struct sysinfo_rcar_priv - sysinfo private data + * @boardname: board model and revision + * @val: board ID value from eeprom + */ +struct sysinfo_rcar_priv { + char boardmodel[64]; + u8 val; +}; + +static int sysinfo_rcar_detect(struct udevice *dev) +{ + struct sysinfo_rcar_priv *priv = dev_get_priv(dev); + + return priv->val == 0xff; +} + +static int sysinfo_rcar_get_str(struct udevice *dev, int id, size_t size, char *val) +{ + struct sysinfo_rcar_priv *priv = dev_get_priv(dev); + + switch (id) { + case SYSINFO_ID_BOARD_MODEL: + strncpy(val, priv->boardmodel, size); + val[size - 1] = '\0'; + return 0; + default: + return -EINVAL; + }; +} + +static const struct sysinfo_ops sysinfo_rcar_ops = { + .detect = sysinfo_rcar_detect, + .get_str = sysinfo_rcar_get_str, +}; + +static void sysinfo_rcar_parse(struct sysinfo_rcar_priv *priv) +{ + const u8 board_id = (priv->val & BOARD_CODE_MASK) >> BOARD_CODE_SHIFT; + const u8 board_rev = priv->val & BOARD_REV_MASK; + bool salvator_xs = false; + bool ebisu_4d = false; + char rev_major = '?'; + char rev_minor = '?'; + + switch (board_id) { + case BOARD_SALVATOR_XS: + salvator_xs = true; + fallthrough; + case BOARD_SALVATOR_X: + if (!(board_rev & ~1)) { /* Only rev 0 and 1 is valid */ + rev_major = '1'; + rev_minor = '0' + (board_rev & BIT(0)); + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Salvator-X%s board rev %c.%c", + salvator_xs ? "S" : "", rev_major, rev_minor); + return; + case BOARD_STARTER_KIT: + if (!(board_rev & ~1)) { /* Only rev 0 and 1 is valid */ + rev_major = (board_rev & BIT(0)) ? '3' : '1'; + rev_minor = '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Starter Kit board rev %c.%c", + rev_major, rev_minor); + return; + case BOARD_STARTER_KIT_PRE: + if (!(board_rev & ~3)) { /* Only rev 0..3 is valid */ + rev_major = (board_rev & BIT(1)) ? '2' : '1'; + rev_minor = (board_rev == 3) ? '1' : '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Starter Kit Premier board rev %c.%c", + rev_major, rev_minor); + return; + case BOARD_EAGLE: + if (!board_rev) { /* Only rev 0 is valid */ + rev_major = '1'; + rev_minor = '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Eagle board rev %c.%c", + rev_major, rev_minor); + return; + case BOARD_EBISU_4D: + ebisu_4d = true; + fallthrough; + case BOARD_EBISU: + if (!board_rev) { /* Only rev 0 is valid */ + rev_major = '1'; + rev_minor = '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Ebisu%s board rev %c.%c", + ebisu_4d ? "-4D" : "", rev_major, rev_minor); + return; + case BOARD_DRAAK: + if (!board_rev) { /* Only rev 0 is valid */ + rev_major = '1'; + rev_minor = '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Draak board rev %c.%c", + rev_major, rev_minor); + return; + case BOARD_KRIEK: + if (!board_rev) { /* Only rev 0 is valid */ + rev_major = '1'; + rev_minor = '0'; + } + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas Kriek board rev %c.%c", + rev_major, rev_minor); + return; + default: + snprintf(priv->boardmodel, sizeof(priv->boardmodel), + "Renesas -Unknown- board rev ?.?"); + priv->val = 0xff; + return; + } +} + +static int sysinfo_rcar_probe(struct udevice *dev) +{ + struct sysinfo_rcar_priv *priv = dev_get_priv(dev); + struct ofnode_phandle_args phandle_args; + struct udevice *i2c_eeprom; + u32 offset; + int ret; + + offset = dev_read_u32_default(dev, "offset", 0x70); + + ret = dev_read_phandle_with_args(dev, "i2c-eeprom", NULL, + 0, 0, &phandle_args); + if (ret) { + debug("%s: i2c-eeprom backing device not specified\n", + dev->name); + return ret; + } + + ret = uclass_get_device_by_ofnode(UCLASS_I2C_EEPROM, phandle_args.node, + &i2c_eeprom); + if (ret) { + debug("%s: could not get backing device\n", dev->name); + return ret; + } + + ret = i2c_eeprom_read(i2c_eeprom, offset, &priv->val, 1); + if (ret < 0) { + debug("%s: read failed\n", __func__); + return -EIO; + } + + sysinfo_rcar_parse(priv); + + return 0; +} + +static const struct udevice_id sysinfo_rcar_ids[] = { + { .compatible = "renesas,rcar-sysinfo" }, + { /* sentinel */ } +}; + +U_BOOT_DRIVER(sysinfo_rcar) = { + .name = "sysinfo_rcar", + .id = UCLASS_SYSINFO, + .of_match = sysinfo_rcar_ids, + .ops = &sysinfo_rcar_ops, + .priv_auto = sizeof(struct sysinfo_rcar_priv), + .probe = sysinfo_rcar_probe, +}; From 778fbe2668cf653bfd0d0d80e45dcc8a682e0b15 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 3 Jul 2021 18:16:14 +0200 Subject: [PATCH 2/7] ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3 Add sysinfo node and phandle to the board ID EEPROM on all boards where this functionality is described in DT, which is Salvator-X(S), ULCB and Ebisu. The u-boot,dm-pre-reloc is necessary here, since the sysinfo must be available early during boot. The V3M and V3H boards currently do not describe this board ID EEPROM in upstream DT, but that could be easily added later, once the DTs contain the necessary nodes. ULCB and Ebisu needs the full EEPROM node in the u-boot extras DT, since the EEPROM node is still missing in the upstream DTs. Ebisu also needs extra compatible string override for the i2c_dvfs. Signed-off-by: Marek Vasut --- arch/arm/dts/r8a77950-salvator-x-u-boot.dts | 17 +++++++++++++++ arch/arm/dts/r8a77950-ulcb-u-boot.dts | 18 ++++++++++++++++ arch/arm/dts/r8a77960-salvator-x-u-boot.dts | 17 +++++++++++++++ arch/arm/dts/r8a77960-ulcb-u-boot.dts | 18 ++++++++++++++++ arch/arm/dts/r8a77965-salvator-x-u-boot.dts | 17 +++++++++++++++ arch/arm/dts/r8a77965-ulcb-u-boot.dts | 18 ++++++++++++++++ arch/arm/dts/r8a77990-ebisu-u-boot.dts | 23 +++++++++++++++++++++ 7 files changed, 128 insertions(+) diff --git a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts index 36c8a44a90..bb83bc1d7b 100644 --- a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts @@ -8,6 +8,23 @@ #include "r8a77950-salvator-x.dts" #include "r8a77950-u-boot.dtsi" +/ { + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + u-boot,dm-pre-reloc; + status = "okay"; + }; +}; + &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; status = "okay"; diff --git a/arch/arm/dts/r8a77950-ulcb-u-boot.dts b/arch/arm/dts/r8a77950-ulcb-u-boot.dts index d3191c55d5..16d9e38b70 100644 --- a/arch/arm/dts/r8a77950-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77950-ulcb-u-boot.dts @@ -17,6 +17,24 @@ gpio-miso = <&gpio6 10 0>; gpio-sstbz = <&gpio2 3 0>; }; + + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + compatible = "rohm,br24t01", "atmel,24c01"; + reg = <0x50>; + pagesize = <8>; + u-boot,dm-pre-reloc; + status = "okay"; + }; }; &rpc { diff --git a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts index 439fd6c3ad..dda3567e9e 100644 --- a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts @@ -8,6 +8,23 @@ #include "r8a77960-salvator-x.dts" #include "r8a77960-u-boot.dtsi" +/ { + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + u-boot,dm-pre-reloc; + status = "okay"; + }; +}; + &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; status = "okay"; diff --git a/arch/arm/dts/r8a77960-ulcb-u-boot.dts b/arch/arm/dts/r8a77960-ulcb-u-boot.dts index aab9c95931..e4f77ae262 100644 --- a/arch/arm/dts/r8a77960-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77960-ulcb-u-boot.dts @@ -17,6 +17,24 @@ gpio-miso = <&gpio6 10 0>; gpio-sstbz = <&gpio2 3 0>; }; + + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + compatible = "rohm,br24t01", "atmel,24c01"; + reg = <0x50>; + pagesize = <8>; + u-boot,dm-pre-reloc; + status = "okay"; + }; }; &rpc { diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts index 8cbef83b9c..e651e889bc 100644 --- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts @@ -8,6 +8,23 @@ #include "r8a77965-salvator-x.dts" #include "r8a77965-u-boot.dtsi" +/ { + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + u-boot,dm-pre-reloc; + status = "okay"; + }; +}; + &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; status = "okay"; diff --git a/arch/arm/dts/r8a77965-ulcb-u-boot.dts b/arch/arm/dts/r8a77965-ulcb-u-boot.dts index 38966bf644..3574d6da6f 100644 --- a/arch/arm/dts/r8a77965-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77965-ulcb-u-boot.dts @@ -17,6 +17,24 @@ gpio-miso = <&gpio6 10 0>; gpio-sstbz = <&gpio2 3 0>; }; + + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + compatible = "rohm,br24t01", "atmel,24c01"; + reg = <0x50>; + pagesize = <8>; + u-boot,dm-pre-reloc; + status = "okay"; + }; }; &rpc { diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts b/arch/arm/dts/r8a77990-ebisu-u-boot.dts index 6afc0be66e..7022a2ba84 100644 --- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts +++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts @@ -8,6 +8,29 @@ #include "r8a77990-ebisu.dts" #include "r8a77990-u-boot.dtsi" +/ { + sysinfo { + compatible = "renesas,rcar-sysinfo"; + i2c-eeprom = <&sysinfo_eeprom>; + u-boot,dm-pre-reloc; + }; +}; + +&i2c_dvfs { + compatible = "renesas,iic-r8a77990", + "renesas,rcar-gen3-iic", + "renesas,rmobile-iic"; + u-boot,dm-pre-reloc; + + sysinfo_eeprom: eeprom@50 { + compatible = "rohm,br24t01", "atmel,24c01"; + reg = <0x50>; + pagesize = <8>; + u-boot,dm-pre-reloc; + status = "okay"; + }; +}; + &pfc { pinctrl-0 = <&scif_clk_pins>; pinctrl-names = "default"; From dceca41ed1a71d238f6e5a94a63dd04690bc7216 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 3 Jul 2021 20:39:28 +0200 Subject: [PATCH 3/7] ARM: rmobile: Enable I2C EEPROM support on R-Car Gen3 Enable support for I2C EEPROM driver on supported Renesas R-Car Gen3 boards. This is useful for accessing the board ID EEPROM. Signed-off-by: Marek Vasut --- configs/r8a77990_ebisu_defconfig | 7 +++++++ configs/rcar3_salvator-x_defconfig | 7 +++++++ configs/rcar3_ulcb_defconfig | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig index 15743c1a81..13ca814cbc 100644 --- a/configs/r8a77990_ebisu_defconfig +++ b/configs/r8a77990_ebisu_defconfig @@ -50,6 +50,13 @@ CONFIG_DFU_SF=y CONFIG_RCAR_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_RCAR_IIC=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x70 +CONFIG_SYS_I2C_EEPROM_BUS=7 +CONFIG_SYS_EEPROM_SIZE=128 +CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10 CONFIG_MMC_IO_VOLTAGE=y CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index efd6ca2da8..ef9775abfa 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -52,6 +52,13 @@ CONFIG_DFU_SF=y CONFIG_RCAR_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_RCAR_IIC=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x70 +CONFIG_SYS_I2C_EEPROM_BUS=7 +CONFIG_SYS_EEPROM_SIZE=128 +CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10 CONFIG_MMC_IO_VOLTAGE=y CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig index a857e5bd1c..cfec485ec7 100644 --- a/configs/rcar3_ulcb_defconfig +++ b/configs/rcar3_ulcb_defconfig @@ -52,6 +52,13 @@ CONFIG_DFU_SF=y CONFIG_RCAR_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_RCAR_IIC=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x70 +CONFIG_SYS_I2C_EEPROM_BUS=7 +CONFIG_SYS_EEPROM_SIZE=128 +CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10 CONFIG_MMC_IO_VOLTAGE=y CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y From ef283c3ae612a1f1cd530a34cdcf074d447b2da9 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 3 Jul 2021 20:41:50 +0200 Subject: [PATCH 4/7] ARM: rmobile: Enable sysinfo on R-Car Gen3 Enable support for sysinfo on supported R-Car Gen3 boards. The sysinfo is used e.g. to access and decode board-specific information and then in turn used by board-info to print those information. On R-Car Gen3 the sysinfo rcar3 driver is used to parse the board ID EEPROM, obtain board type and revision from it, and let board-info print this information on boot. Signed-off-by: Marek Vasut --- configs/r8a77990_ebisu_defconfig | 1 + configs/rcar3_salvator-x_defconfig | 1 + configs/rcar3_ulcb_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig index 13ca814cbc..69297fef66 100644 --- a/configs/r8a77990_ebisu_defconfig +++ b/configs/r8a77990_ebisu_defconfig @@ -83,6 +83,7 @@ CONFIG_SCIF_CONSOLE=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_RENESAS_RPC_SPI=y +CONFIG_SYSINFO=y CONFIG_TEE=y CONFIG_OPTEE=y CONFIG_USB=y diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index ef9775abfa..150db3bff5 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -90,6 +90,7 @@ CONFIG_SCIF_CONSOLE=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_RENESAS_RPC_SPI=y +CONFIG_SYSINFO=y CONFIG_TEE=y CONFIG_OPTEE=y CONFIG_USB=y diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig index cfec485ec7..a6f806c3c3 100644 --- a/configs/rcar3_ulcb_defconfig +++ b/configs/rcar3_ulcb_defconfig @@ -86,6 +86,7 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_RENESAS_RPC_SPI=y CONFIG_SYSRESET=y +CONFIG_SYSINFO=y CONFIG_TEE=y CONFIG_OPTEE=y CONFIG_USB=y From 91c6a3a45941cbf53adb91fc4464a3d060a7233b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 4 Jul 2021 17:27:27 +0200 Subject: [PATCH 5/7] ARM: rmobile: Align CPU: print with other prints The CPU: print only has one space after it, while the other prints from U-Boot align the value to offset 7. Align the CPU: print too. No functional change. Signed-off-by: Marek Vasut --- arch/arm/mach-rmobile/cpu_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 2bb6d502b8..bd9e71707f 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -119,7 +119,7 @@ int print_cpuinfo(void) { int i = rmobile_cpuinfo_idx(); - printf("CPU: Renesas Electronics %s rev %d.%d\n", + printf("CPU: Renesas Electronics %s rev %d.%d\n", get_cpu_name(i), rmobile_get_cpu_rev_integer(), rmobile_get_cpu_rev_fraction()); From 3d5f45c95c9db73ddad6a73b2a1a55dd090c3b1a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 10 Jul 2021 18:56:29 +0200 Subject: [PATCH 6/7] ARM: dts: rmobile: Disable RPC HF by default The RPC HF might be locked by ATF, and any access to its register space would result in complete hang. Disable the RPC HF by default. The ATF should be patched to set RPC node status = "okay" in the DT fragment it passes to U-Boot in case the RPC HF access is unlocked, and that way U-Boot could access the RPC HF safely. Signed-off-by: Marek Vasut --- arch/arm/dts/r8a77950-salvator-x-u-boot.dts | 2 +- arch/arm/dts/r8a77950-ulcb-u-boot.dts | 2 +- arch/arm/dts/r8a77960-salvator-x-u-boot.dts | 2 +- arch/arm/dts/r8a77960-ulcb-u-boot.dts | 2 +- arch/arm/dts/r8a77965-salvator-x-u-boot.dts | 2 +- arch/arm/dts/r8a77965-ulcb-u-boot.dts | 2 +- arch/arm/dts/r8a77990-ebisu-u-boot.dts | 2 +- arch/arm/dts/r8a77995-draak-u-boot.dts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts index bb83bc1d7b..d94ad91973 100644 --- a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts @@ -27,7 +27,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77950-ulcb-u-boot.dts b/arch/arm/dts/r8a77950-ulcb-u-boot.dts index 16d9e38b70..ff00ccdb5b 100644 --- a/arch/arm/dts/r8a77950-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77950-ulcb-u-boot.dts @@ -39,7 +39,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts index dda3567e9e..79a54f38c1 100644 --- a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts @@ -27,7 +27,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77960-ulcb-u-boot.dts b/arch/arm/dts/r8a77960-ulcb-u-boot.dts index e4f77ae262..1e9e8b87d5 100644 --- a/arch/arm/dts/r8a77960-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77960-ulcb-u-boot.dts @@ -39,7 +39,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts index e651e889bc..4272ecc110 100644 --- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts +++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts @@ -27,7 +27,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77965-ulcb-u-boot.dts b/arch/arm/dts/r8a77965-ulcb-u-boot.dts index 3574d6da6f..d9c680b171 100644 --- a/arch/arm/dts/r8a77965-ulcb-u-boot.dts +++ b/arch/arm/dts/r8a77965-ulcb-u-boot.dts @@ -39,7 +39,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts b/arch/arm/dts/r8a77990-ebisu-u-boot.dts index 7022a2ba84..55699bafc4 100644 --- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts +++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts @@ -43,7 +43,7 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; &sdhi0 { diff --git a/arch/arm/dts/r8a77995-draak-u-boot.dts b/arch/arm/dts/r8a77995-draak-u-boot.dts index 10fb9cb3b6..0ea2570c1d 100644 --- a/arch/arm/dts/r8a77995-draak-u-boot.dts +++ b/arch/arm/dts/r8a77995-draak-u-boot.dts @@ -10,5 +10,5 @@ &rpc { reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>; - status = "okay"; + status = "disabled"; }; From cd7f92a096a46e5c2a54ca461a5b30739e3fa3e4 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 10 Jul 2021 19:17:34 +0200 Subject: [PATCH 7/7] ARM: dts: rmobile: Remove multiple unused DT properties on R-Car Gen3 Filter out dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus DT properties on R-Car Gen3, since they are not used by U-Boot and only take space. Signed-off-by: Marek Vasut --- configs/r8a77970_eagle_defconfig | 2 ++ configs/r8a77980_condor_defconfig | 2 ++ configs/r8a77990_ebisu_defconfig | 2 ++ configs/r8a77995_draak_defconfig | 2 ++ configs/rcar3_salvator-x_defconfig | 2 ++ configs/rcar3_ulcb_defconfig | 2 ++ 6 files changed, 12 insertions(+) diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig index 2e5fb60f1a..99a99e13ff 100644 --- a/configs/r8a77970_eagle_defconfig +++ b/configs/r8a77970_eagle_defconfig @@ -32,6 +32,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/r8a77980_condor_defconfig b/configs/r8a77980_condor_defconfig index 1b9948bcbb..d7c34a719c 100644 --- a/configs/r8a77980_condor_defconfig +++ b/configs/r8a77980_condor_defconfig @@ -33,6 +33,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig index 69297fef66..0c5dcb0a20 100644 --- a/configs/r8a77990_ebisu_defconfig +++ b/configs/r8a77990_ebisu_defconfig @@ -34,6 +34,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig index 562b80b996..b1186eef14 100644 --- a/configs/r8a77995_draak_defconfig +++ b/configs/r8a77995_draak_defconfig @@ -33,6 +33,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index 150db3bff5..8e492ceec7 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -36,6 +36,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_LIST="r8a77950-salvator-x-u-boot r8a77960-salvator-x-u-boot r8a77965-salvator-x-u-boot" CONFIG_MULTI_DTB_FIT_LZO=y CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig index a6f806c3c3..e3487589b8 100644 --- a/configs/rcar3_ulcb_defconfig +++ b/configs/rcar3_ulcb_defconfig @@ -36,6 +36,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_LIST="r8a77950-ulcb-u-boot r8a77960-ulcb-u-boot r8a77965-ulcb-u-boot" CONFIG_MULTI_DTB_FIT_LZO=y CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y +CONFIG_OF_DTB_PROPS_REMOVE=y +CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y