diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2022-02-14 10:46:02 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2022-02-14 18:14:39 +0100 |
commit | 140ff985b96f631b70254c0fac79e6cf74a0a154 (patch) | |
tree | 314b7103e421c1a99db2324e3e6d7a625c9ddb30 | |
parent | 421a6ba683f97713dc4f0e445aee48b87bbe18c8 (diff) |
board: colibri_imx7_emmc: fix emmc detection
Later Colibri iMX7D V1.1B modules are using a “new” SoC fusing. The
difference has to do with whether or not we do enable the boot ROM to
enable/use the eMMC reset signal. Depending on that SoC fuse, the boot
ROM configures this pin as a GPIO output to actually be able to do/drive
the reset signal. Our eMMC vs. NAND detection so far only sets that
signal to a GPIO but without explicitly setting any direction as, of
course, so far, by default, it was an input. As the boot ROM now sets
it as an output we do get back a value of zero instead of a one which
would indicate the pull-up being present on eMMC modules.
Fix this by setting the SION bit which allows reading back the value
even if it is set to be an output by the boot ROM. Note that with the
new SoC fusing we now read back what the boot ROM drived rather than
the real value caused by the pull-up resistor. However, if it would
ever be driven low the eMMC would anyway permanently be reset.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 3540c102af..a4a3484a89 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -78,7 +78,7 @@ static iomux_v3_cfg_t const usb_cdet_pads[] = { #endif static iomux_v3_cfg_t const flash_detection_pads[] = { - MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(FLASH_DETECTION_CTRL), + MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(FLASH_DETECTION_CTRL) | MUX_MODE_SION, }; #ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND @@ -192,9 +192,9 @@ int board_init(void) gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; /* - * Enable GPIO on NAND_WE_B/eMMC_RST with 100k pull-down. eMMC_RST + * Enable GPIO SION on NAND_WE_B/eMMC_RST with 100k pull-down. eMMC_RST * is pulled high with 4.7k for eMMC devices. This allows to reliably - * detect eMMC/NAND flash + * detect eMMC vs. NAND flash. */ imx_iomux_v3_setup_multiple_pads(flash_detection_pads, ARRAY_SIZE(flash_detection_pads)); gpio_request(FLASH_DET_GPIO, "flash-detection-gpio"); |