Patchwork [U-Boot,2/2] mx6qsabreauto: Add Port Expander reset

login
register
mail settings
Submitter Renato Frias
Date May 14, 2013, 4:01 a.m.
Message ID <1368504074-17600-2-git-send-email-b13784@freescale.com>
Download mbox | patch
Permalink /patch/243604/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Renato Frias - May 14, 2013, 4:01 a.m.
There are 3 IO expanders on the mx6qsabreauto all reset by the
same GPIO, just set it to high to use the IO.

Signed-off-by: Renato Frias <b13784@freescale.com>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c |    7 +++++++
 1 file changed, 7 insertions(+)
Stefano Babic - May 15, 2013, 10:13 a.m.
On 14/05/2013 06:01, Renato Frias wrote:
> There are 3 IO expanders on the mx6qsabreauto all reset by the
> same GPIO, just set it to high to use the IO.
> 
> Signed-off-by: Renato Frias <b13784@freescale.com>
> ---
>  board/freescale/mx6qsabreauto/mx6qsabreauto.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> index d6df750..eb2561e 100644
> --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> @@ -119,6 +119,10 @@ iomux_v3_cfg_t const i2c3_pads[] = {
>  	MX6_PAD_EIM_A24__GPIO_5_4		| MUX_PAD_CTRL(NO_PAD_CTRL),
>  };
>  
> +iomux_v3_cfg_t const port_exp[] = {
> +	MX6_PAD_SD2_DAT0__GPIO_1_15		| MUX_PAD_CTRL(NO_PAD_CTRL),
> +};
> +
>  static void setup_iomux_enet(void)
>  {
>  	imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
> @@ -266,6 +270,9 @@ int board_init(void)
>  	imx_iomux_v3_setup_multiple_pads(i2c3_pads, ARRAY_SIZE(i2c3_pads));
>  	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
>  
> +	gpio_direction_output(IMX_GPIO_NR(1, 15), 1);
> +	imx_iomux_v3_setup_multiple_pads(port_exp, ARRAY_SIZE(port_exp));
> +
>  	return 0;
>  }
>  
> 
Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Stefano Babic - June 3, 2013, 11:21 a.m.
On 14/05/2013 06:01, Renato Frias wrote:
> There are 3 IO expanders on the mx6qsabreauto all reset by the
> same GPIO, just set it to high to use the IO.
> 
> Signed-off-by: Renato Frias <b13784@freescale.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index d6df750..eb2561e 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -119,6 +119,10 @@  iomux_v3_cfg_t const i2c3_pads[] = {
 	MX6_PAD_EIM_A24__GPIO_5_4		| MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
+iomux_v3_cfg_t const port_exp[] = {
+	MX6_PAD_SD2_DAT0__GPIO_1_15		| MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
 static void setup_iomux_enet(void)
 {
 	imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
@@ -266,6 +270,9 @@  int board_init(void)
 	imx_iomux_v3_setup_multiple_pads(i2c3_pads, ARRAY_SIZE(i2c3_pads));
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
 
+	gpio_direction_output(IMX_GPIO_NR(1, 15), 1);
+	imx_iomux_v3_setup_multiple_pads(port_exp, ARRAY_SIZE(port_exp));
+
 	return 0;
 }