]> git.sur5r.net Git - u-boot/commitdiff
mx6sabreauto: Do not enable WEIM by default
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 10 Jul 2017 18:59:11 +0000 (15:59 -0300)
committerStefano Babic <sbabic@denx.de>
Wed, 12 Jul 2017 08:21:10 +0000 (10:21 +0200)
WEIM cannot be used when I2C3 is enabled due to pin conflict, so keep
WEIM disabled by default.

I2C3 controls GPIO I2C expander (USB host and OTG have VBUS controlled by
the GPIO I2C expander), magnetometer, accelerometer.

Not disabling WEIM in U-Boot causes I2C3 to behave badly when booting
a NXP 4.1 kernel, which leads to probe failure on several devices,
including the lack of USB:

imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517

By keeping WEIM disabled in U-Boot these kernel issues are gone.

Reported-by: Takashi Matsuzawa <tmatsuzawa@xevo.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
board/freescale/mx6sabreauto/mx6sabreauto.c
configs/mx6sabreauto_defconfig
include/configs/mx6sabreauto.h

index 13af9ca6cd5809cc755ccc435b327c50cfd0d231..bfd5ffa5c7ce72799db97eab466f5e8fa396d5b8 100644 (file)
@@ -197,6 +197,7 @@ static int port_exp_direction_output(unsigned gpio, int value)
        return 0;
 }
 
+#ifdef CONFIG_MTD_NOR_FLASH
 static iomux_v3_cfg_t const eimnor_pads[] = {
        IOMUX_PADS(PAD_EIM_D16__EIM_DATA16      | MUX_PAD_CTRL(WEIM_NOR_PAD_CTRL)),
        IOMUX_PADS(PAD_EIM_D17__EIM_DATA17      | MUX_PAD_CTRL(WEIM_NOR_PAD_CTRL)),
@@ -292,6 +293,7 @@ static void setup_iomux_eimnor(void)
 
        eimnor_cs_setup();
 }
+#endif
 
 static void setup_iomux_enet(void)
 {
@@ -571,8 +573,10 @@ int board_early_init_f(void)
 #ifdef CONFIG_NAND_MXS
        setup_gpmi_nand();
 #endif
-       eim_clk_setup();
 
+#ifdef CONFIG_MTD_NOR_FLASH
+       eim_clk_setup();
+#endif
        return 0;
 }
 
@@ -601,7 +605,10 @@ int board_init(void)
 #ifdef CONFIG_VIDEO_IPUV3
        setup_display();
 #endif
+
+#ifdef CONFIG_MTD_NOR_FLASH
        setup_iomux_eimnor();
+#endif
        return 0;
 }
 
index c63cc8e81e6e9430c925a3eab13175b77a9602d9..f904cbfe8d106a5df37be5b4d612c5b7acfaa384 100644 (file)
@@ -38,7 +38,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_SF=y
-CONFIG_MTD_NOR_FLASH=y
+# CONFIG_MTD_NOR_FLASH is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
index fd0d5ce0630abaa467070ae7743128b3e8708f41..2c08fd1baa7ed81d5bc65e15cdee8907e600ded0 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "mx6sabre_common.h"
 
+#ifdef CONFIG_MTD_NOR_FLASH
 #define CONFIG_SYS_FLASH_BASE           WEIM_ARB_BASE_ADDR
 #define CONFIG_SYS_FLASH_SECT_SIZE      (128 * 1024)
 #define CONFIG_SYS_MAX_FLASH_BANKS 1    /* max number of memory banks */
@@ -40,6 +41,7 @@
 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* Use buffered writes*/
 #define CONFIG_SYS_FLASH_EMPTY_INFO
 #define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_16BIT
+#endif
 
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 #if defined(CONFIG_ENV_IS_IN_MMC)