[U-Boot] [PATCH] board: freescale: ls2080ardb: Enable SD interface for RevF board
Priyanka Jain
priyanka.jain at nxp.com
Fri Apr 21 09:00:53 UTC 2017
LS2080ARDB/LS2088ARDB RevF board has smart voltage translator
which needs to be programmed to enable high speed SD interface
by setting GPIO4_10 output to zero
Signed-off-by: Priyanka Jain <priyanka.jain at nxp.com>
Signed-off-by: Santan Kumar <santan.kumar at nxp.com>
---
.../include/asm/arch-fsl-layerscape/immap_lsch3.h | 3 +++
board/freescale/ls2080ardb/ls2080ardb.c | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
index 80c421f..9fdd6a0 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -45,6 +45,9 @@
#define I2C2_BASE_ADDR (CONFIG_SYS_IMMR + 0x01010000)
#define I2C3_BASE_ADDR (CONFIG_SYS_IMMR + 0x01020000)
#define I2C4_BASE_ADDR (CONFIG_SYS_IMMR + 0x01030000)
+#define GPIO4_BASE_ADDR (CONFIG_SYS_IMMR + 0x01330000)
+#define GPIO4_GPDIR_ADDR (GPIO4_BASE_ADDR + 0x0)
+#define GPIO4_GPDAT_ADDR (GPIO4_BASE_ADDR + 0x8)
#define CONFIG_SYS_XHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x02100000)
#define CONFIG_SYS_XHCI_USB2_ADDR (CONFIG_SYS_IMMR + 0x02110000)
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 1bd555b..51012e4 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -214,6 +214,23 @@ int board_early_init_f(void)
int misc_init_r(void)
{
+#ifdef CONFIG_FSL_QIXIS
+ u8 sw;
+
+ sw = QIXIS_READ(arch);
+ /*
+ * LS2080ARDB/LS2088ARDB RevF board has smart voltage translator
+ * which needs to be programmed to enable high speed SD interface
+ * by setting GPIO4_10 output to zero
+ */
+ if ((sw & 0xf) == 0x5) {
+ out_le32(GPIO4_GPDIR_ADDR, (1 << 21 |
+ in_le32(GPIO4_GPDIR_ADDR)));
+ out_le32(GPIO4_GPDAT_ADDR, (~(1 << 21) &
+ in_le32(GPIO4_GPDAT_ADDR)));
+ }
+#endif
+
if (hwconfig("sdhc"))
config_board_mux(MUX_TYPE_SDHC);
--
1.7.4.1
More information about the U-Boot
mailing list