nitrogen6x: configure SD2 pads for SDIO on USDHC2
authorEric Nelson <eric.nelson@boundarydevices.com>
Thu, 2 Oct 2014 19:16:24 +0000 (12:16 -0700)
committerStefano Babic <sbabic@denx.de>
Mon, 6 Oct 2014 15:57:21 +0000 (17:57 +0200)
Pads SD2_CLK/CMD/DAT0-3 are connected to an SDIO WiFi device on
Nitrogen and unconnected on BD-SL-i.MX6 (sabre lite).

Configure them as SDIO pins to prevent them from being in a state
that confuses the WiFi part.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
board/boundary/nitrogen6x/nitrogen6x.c

index e8cc243..bde299f 100644 (file)
@@ -124,6 +124,15 @@ struct i2c_pads_info i2c_pad_info2 = {
        }
 };
 
+static iomux_v3_cfg_t const usdhc2_pads[] = {
+       MX6_PAD_SD2_CLK__SD2_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       MX6_PAD_SD2_CMD__SD2_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       MX6_PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       MX6_PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       MX6_PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       MX6_PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+};
+
 iomux_v3_cfg_t const usdhc3_pads[] = {
        MX6_PAD_SD3_CLK__SD3_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
        MX6_PAD_SD3_CMD__SD3_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -657,6 +666,8 @@ int board_init(void)
 #ifdef CONFIG_MXC_SPI
        setup_spi();
 #endif
+       imx_iomux_v3_setup_multiple_pads(
+               usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
        setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
        setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
        setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);