[U-Boot] [PATCH 3/5] ARM: rmobile: Switch to DM PFC pinmux and GPIO driver

Marek Vasut marek.vasut at gmail.com
Fri Sep 15 19:13:57 UTC 2017


Enable the PFC pinmux and GPIO drivers and disable the SH GPIO combo
driver. This allows the drivers to obtain pinmux and GPIO configuration
from DT rather than hard-coding it in board files.

Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
---
 board/renesas/salvator-x/salvator-x.c | 2 ++
 board/renesas/ulcb/ulcb.c             | 2 ++
 configs/r8a7795_salvator-x_defconfig  | 4 ++++
 configs/r8a7795_ulcb_defconfig        | 4 ++++
 configs/r8a7796_salvator-x_defconfig  | 4 ++++
 configs/r8a7796_ulcb_defconfig        | 4 ++++
 include/configs/rcar-gen3-common.h    | 2 --
 7 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index 78fc22a0e8..9d9de58370 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -82,12 +82,14 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
 
+#ifdef CONFIG_SH_GPIO_PFC
 	/* Init PFC controller */
 #if defined(CONFIG_R8A7795)
 	r8a7795_pinmux_init();
 #elif defined(CONFIG_R8A7796)
 	r8a7796_pinmux_init();
 #endif
+#endif
 
 #if defined(CONFIG_R8A7795)
 	/* GSX: force power and clock supply */
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 9b96645d11..3ee6990b57 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -81,12 +81,14 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
 
+#ifdef CONFIG_SH_GPIO_PFC
 	/* Init PFC controller */
 #if defined(CONFIG_R8A7795)
 	r8a7795_pinmux_init();
 #elif defined(CONFIG_R8A7796)
 	r8a7796_pinmux_init();
 #endif
+#endif
 
 	/* USB1 pull-up */
 	setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
diff --git a/configs/r8a7795_salvator-x_defconfig b/configs/r8a7795_salvator-x_defconfig
index 72aada3078..d8f5d35fb2 100644
--- a/configs/r8a7795_salvator-x_defconfig
+++ b/configs/r8a7795_salvator-x_defconfig
@@ -29,12 +29,16 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_CLK=y
 CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_UNIPHIER=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
 CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/r8a7795_ulcb_defconfig b/configs/r8a7795_ulcb_defconfig
index aaad75a74d..1aa2e69ac6 100644
--- a/configs/r8a7795_ulcb_defconfig
+++ b/configs/r8a7795_ulcb_defconfig
@@ -28,10 +28,14 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_CLK=y
 CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_UNIPHIER=y
 CONFIG_DM_ETH=y
 CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/r8a7796_salvator-x_defconfig b/configs/r8a7796_salvator-x_defconfig
index cd10ecb3db..e0085d215b 100644
--- a/configs/r8a7796_salvator-x_defconfig
+++ b/configs/r8a7796_salvator-x_defconfig
@@ -30,12 +30,16 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_CLK=y
 CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_UNIPHIER=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
 CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/r8a7796_ulcb_defconfig b/configs/r8a7796_ulcb_defconfig
index 107fa46b80..cbeda77bfd 100644
--- a/configs/r8a7796_ulcb_defconfig
+++ b/configs/r8a7796_ulcb_defconfig
@@ -29,10 +29,14 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_CLK=y
 CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_UNIPHIER=y
 CONFIG_DM_ETH=y
 CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index 6ed08e5bfc..6deed0dcd7 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -31,8 +31,6 @@
 
 #define CONFIG_ARCH_CPU_INIT
 
-#define CONFIG_SH_GPIO_PFC
-
 /* console */
 #define CONFIG_SYS_CBSIZE		2048
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-- 
2.11.0



More information about the U-Boot mailing list