diff mbox series

[U-Boot,2/2] rockchip: rk3188: fix early uart setup

Message ID 20181008110157.26533-2-heiko@sntech.de
State Accepted
Commit 6c69ed19f96203680ba752fdeb22d58df4715815
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot,1/2] rockchip: rk3188: add support for usb-uart functionality | expand

Commit Message

Heiko Stübner Oct. 8, 2018, 11:01 a.m. UTC
Commit 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions
into pinctrl-driver") moved the iomux settings out of the grf header
to prevent conflicts with the iomux definitions of other rockchip socs.

This also breaks the early uart setup, as the iomux for uart2 are needed.
To fix that just put the tiny amount of needed iomux definitions next to
the early uart code.

Fixes: 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions into pinctrl-driver")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-rockchip/rk3188-board-spl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Philipp Tomsich Nov. 14, 2018, 8:46 p.m. UTC | #1
> Commit 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions
> into pinctrl-driver") moved the iomux settings out of the grf header
> to prevent conflicts with the iomux definitions of other rockchip socs.
> 
> This also breaks the early uart setup, as the iomux for uart2 are needed.
> To fix that just put the tiny amount of needed iomux definitions next to
> the early uart code.
> 
> Fixes: 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions into pinctrl-driver")
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  arch/arm/mach-rockchip/rk3188-board-spl.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich Nov. 14, 2018, 11:35 p.m. UTC | #2
> Commit 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions
> into pinctrl-driver") moved the iomux settings out of the grf header
> to prevent conflicts with the iomux definitions of other rockchip socs.
> 
> This also breaks the early uart setup, as the iomux for uart2 are needed.
> To fix that just put the tiny amount of needed iomux definitions next to
> the early uart code.
> 
> Fixes: 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions into pinctrl-driver")
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>  arch/arm/mach-rockchip/rk3188-board-spl.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Applied to u-boot-rockchip, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c
index 4a810ef696..33982f066f 100644
--- a/arch/arm/mach-rockchip/rk3188-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3188-board-spl.c
@@ -103,6 +103,16 @@  void board_init_f(ulong dummy)
 
 	/* Example code showing how to enable the debug UART on RK3188 */
 #ifdef EARLY_UART
+	enum {
+		GPIO1B1_SHIFT		= 2,
+		GPIO1B1_MASK		= 3,
+		GPIO1B1_UART2_SOUT	= 1,
+
+		GPIO1B0_SHIFT		= 0,
+		GPIO1B0_MASK		= 3,
+		GPIO1B0_UART2_SIN	= 1,
+	};
+
 	/* Enable early UART on the RK3188 */
 	rk_clrsetreg(&grf->gpio1b_iomux,
 		     GPIO1B1_MASK << GPIO1B1_SHIFT |