Re: [U-Boot] [U-Boot, v2, 1/4] rockchip: evb-rk3328: set uart2 io routing to M1

2017-06-25 Thread Philipp Tomsich
> In rk3328, some function pin may have more than one choice, and muxed
> with more than one IO, for example, the UART2 controller IO,
> TX and RX, have 3 choice(setting in com_iomux):
> - M0 which mux with GPIO1A0/GPIO1A1
> - M1 which mux with GPIO2A0/GPIO2A1
> - usb2phy which mux with USB2.0 DP/DM pin.
> 
> This suppose to be set in SPL, but the U-Boot is also design to co-work
> with Rockchip SPL(miniloader) which may not setting this config, let's set
> this config to make sure the UART2 TX/RX working in U-Boot.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - remove SDMMC io routing
> 
>  board/rockchip/evb_rk3328/evb-rk3328.c | 10 ++
>  1 file changed, 10 insertions(+)
> 

Acked-by: Philipp Tomsich 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/4] rockchip: evb-rk3328: set uart2 io routing to M1

2017-06-09 Thread Dr. Philipp Tomsich

> On 08 Jun 2017, at 09:32, Kever Yang  wrote:
> 
> In rk3328, some function pin may have more than one choice, and muxed
> with more than one IO, for example, the UART2 controller IO,
> TX and RX, have 3 choice(setting in com_iomux):
> - M0 which mux with GPIO1A0/GPIO1A1
> - M1 which mux with GPIO2A0/GPIO2A1
> - usb2phy which mux with USB2.0 DP/DM pin.
> 
> This suppose to be set in SPL, but the U-Boot is also design to co-work
> with Rockchip SPL(miniloader) which may not setting this config, let's set
> this config to make sure the UART2 TX/RX working in U-Boot.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - remove SDMMC io routing
> 
> board/rockchip/evb_rk3328/evb-rk3328.c | 10 ++
> 1 file changed, 10 insertions(+)
> 
> diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c 
> b/board/rockchip/evb_rk3328/evb-rk3328.c
> index 0a26ed5..823c5da 100644
> --- a/board/rockchip/evb_rk3328/evb-rk3328.c
> +++ b/board/rockchip/evb_rk3328/evb-rk3328.c
> @@ -5,7 +5,10 @@
>  */
> 
> #include 
> +#include 
> +#include 
> #include 
> +#include 
> #include 
> #include 
> 
> @@ -13,6 +16,13 @@ DECLARE_GLOBAL_DATA_PTR;
> 
> int board_init(void)
> {
> +#define GRF_BASE 0xff10
> + struct rk3328_grf_regs * const grf = (void *)GRF_BASE;
> +
> + /* uart2 select m1, sdcard select m1*/
> + rk_clrsetreg(>com_iomux, IOMUX_SEL_UART2_MASK,
> +  IOMUX_SEL_UART2_M1 << IOMUX_SEL_UART2_SHIFT);
> +
>   return 0;
> }

Is there a good reason not to do this through the pinctrl framework, using 
pinctrl_request_noflags() or similar?

Regards,
Philipp.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot