From 308b1307c80e5dbe4b09d6d54913fb6c1efca205 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 06:10:49 +0100 Subject: [PATCH 1/7] ARM: rmobile: alt: Remove R8A7794_ETHERNET_B The R8A7794_ETHERNET_B config option is unused and based on the description, this is a setting which should be fully done on a DT level instead. Remove this config option. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- board/renesas/alt/Kconfig | 9 --------- 1 file changed, 9 deletions(-) diff --git a/board/renesas/alt/Kconfig b/board/renesas/alt/Kconfig index 39d53c185b..957962de20 100644 --- a/board/renesas/alt/Kconfig +++ b/board/renesas/alt/Kconfig @@ -9,13 +9,4 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "alt" -config R8A7794_ETHERNET_B - bool "Use ethernet B function" - depends on TARGET_ALT - default n - help - ALT board can use default ethernet and etnernet B function. - This config set pin function of ethenet B. You also needt to change - DIP switch of board in order to use this function. - endif From 078cbb8d956d6531f310cd746b80064edadff7cb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 06:14:42 +0100 Subject: [PATCH 2/7] ARM: rmobile: alt: Remove CLK2MHZ macro The CLK2MHZ macro is unused, remove it. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index b18ab7ce88..7a9a51e4cd 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -28,7 +28,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define CLK2MHZ(clk) (clk / 1000 / 1000) void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; From 573b0f244c16f3f80441932f25fb64e77a7a6c31 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 06:20:01 +0100 Subject: [PATCH 3/7] ARM: rmobile: alt: Synchronize defconfig Synchronize the R8A7794 Alt defconfig, enable DM SPI, DM SPI FLASH and I2C driver support. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- configs/alt_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/alt_defconfig b/configs/alt_defconfig index c4ece79507..5e5467fe2f 100644 --- a/configs/alt_defconfig +++ b/configs/alt_defconfig @@ -57,12 +57,14 @@ CONFIG_CLK_RENESAS=y CONFIG_DM_GPIO=y CONFIG_RCAR_GPIO=y CONFIG_DM_I2C=y +CONFIG_SYS_I2C_RCAR_I2C=y CONFIG_SYS_I2C_RCAR_IIC=y CONFIG_DM_MMC=y CONFIG_SH_MMCIF=y CONFIG_RENESAS_SDHI=y CONFIG_MTD=y CONFIG_MTD_DEVICE=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_MTD=y @@ -80,6 +82,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SCIF_CONSOLE=y CONFIG_SPI=y +CONFIG_DM_SPI=y CONFIG_SH_QSPI=y CONFIG_USB=y CONFIG_DM_USB=y From 4bbd464268f4c70d9704d41d10b5d324b6dc4549 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 07:05:09 +0100 Subject: [PATCH 4/7] ARM: rmobile: Fix PHY LED mode register mask The PHY LED mode register mask should be 0xc000 , not 0xc0000. Correct the mask to operate on the right bits. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 2 +- board/renesas/gose/gose.c | 2 +- board/renesas/koelsch/koelsch.c | 2 +- board/renesas/lager/lager.c | 2 +- board/renesas/porter/porter.c | 2 +- board/renesas/silk/silk.c | 2 +- board/renesas/stout/stout.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 7a9a51e4cd..7b85000203 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -92,7 +92,7 @@ int dram_init_banksize(void) /* KSZ8041RNLI */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index 282381ede5..7c61008739 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -98,7 +98,7 @@ int dram_init_banksize(void) /* KSZ8041RNLI */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index 52f37c970e..d07a7ca2ab 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -100,7 +100,7 @@ int dram_init_banksize(void) /* Koelsch has KSZ8041NL/RNL */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index 062e88c198..f062bb0172 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -109,7 +109,7 @@ int dram_init_banksize(void) /* KSZ8041NL/RNL */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index 663b8001ef..2e15a4cbbd 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -98,7 +98,7 @@ int dram_init_banksize(void) /* porter has KSZ8041RNLI */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index 966c0717b2..59ba262ad7 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -93,7 +93,7 @@ int dram_init_banksize(void) /* porter has KSZ8041RNLI */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c index 85e30db635..7c515950d6 100644 --- a/board/renesas/stout/stout.c +++ b/board/renesas/stout/stout.c @@ -112,7 +112,7 @@ int dram_init_banksize(void) /* Stout has KSZ8041NL/RNL */ #define PHY_CONTROL1 0x1E -#define PHY_LED_MODE 0xC0000 +#define PHY_LED_MODE 0xC000 #define PHY_LED_MODE_ACK 0x4000 int board_phy_config(struct phy_device *phydev) { From 0fe668d7d939c3467c856b5aef21e67f8f48383b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 07:43:55 +0100 Subject: [PATCH 5/7] ARM: rmobile: rcar-gen2: Activate bootm_size Commit d245059ff797 ("ARM: rmobile: rcar-gen3: Activate bootm_size") only fixed the superfluous CONFIG_SYS_BOOTMAPSZ for R-Car Gen3, even though it listed all affected boards. Apply the same fix to Gen2. Signed-off-by: Marek Vasut Fixes: d245059ff797 ("ARM: rmobile: rcar-gen3: Activate bootm_size") Cc: Eugeniu Rosca --- include/configs/rcar-gen2-common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h index 9213d33e21..7f72ff2e11 100644 --- a/include/configs/rcar-gen2-common.h +++ b/include/configs/rcar-gen2-common.h @@ -38,7 +38,6 @@ #define CONFIG_SYS_MONITOR_BASE 0x00000000 #define CONFIG_SYS_MONITOR_LEN (256 * 1024) #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) -#define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) /* ENV setting */ #define CONFIG_ENV_ADDR 0xC0000 From e3b086cf0470efe66b7fb7cf658048b3efda9924 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 08:23:20 +0100 Subject: [PATCH 6/7] ARM: dts: rmobile: Activate I2C7 on Alt Activate I2C7 on Alt to allow access to the PMIC. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/arm/dts/r8a7794-alt-u-boot.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/dts/r8a7794-alt-u-boot.dts b/arch/arm/dts/r8a7794-alt-u-boot.dts index 593a418c3b..14cd39297e 100644 --- a/arch/arm/dts/r8a7794-alt-u-boot.dts +++ b/arch/arm/dts/r8a7794-alt-u-boot.dts @@ -8,6 +8,11 @@ #include "r8a7794-alt.dts" #include "r8a7794-u-boot.dtsi" +&i2c7 { + status = "okay"; + clock-frequency = <100000>; +}; + &scif2 { u-boot,dm-pre-reloc; }; From 0c78ec64bcc96c34642ebd29614c4c26132ad4b6 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 30 Mar 2019 08:24:19 +0100 Subject: [PATCH 7/7] ARM: rmobile: alt: Fix I2C bus number The I2C bus number to access the PMIC is I2C 7, fix this. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 7b85000203..0726776a57 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -107,7 +107,7 @@ int board_phy_config(struct phy_device *phydev) void reset_cpu(ulong addr) { struct udevice *dev; - const u8 pmic_bus = 1; + const u8 pmic_bus = 7; const u8 pmic_addr = 0x58; u8 data; int ret;