summaryrefslogtreecommitdiffstats
path: root/board/gateworks/gw_ventana/gw_ventana.c
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2016-05-24 11:03:59 -0700
committerStefano Babic <sbabic@denx.de>2016-05-31 17:26:27 +0200
commit34b080b79ccb59e144619179b4cd57a2f146f8d3 (patch)
tree0b889140d946e9f66d890d370ba30ee68556ccd2 /board/gateworks/gw_ventana/gw_ventana.c
parent385575bcb6013e8151fd98d80b8dc2b5bd732cfb (diff)
downloadtalos-obmc-uboot-34b080b79ccb59e144619179b4cd57a2f146f8d3.tar.gz
talos-obmc-uboot-34b080b79ccb59e144619179b4cd57a2f146f8d3.zip
imx: ventana: add fdt fixup to enable UHS-I support on selected boards
UHS-I support is available on Ventana boards with micro-SD sockets depending on the board revision. For backwards compatibility to not break users who have old bootloaders and newer kernels the device-tree on boards with microSD disables UHS-I support by default by defining the no-1-8-v property in the esdhc controller node. For models/revisions that support switchable 1.8V/3.3V I/O which is detectable by the presence of a pull-down on the SD3_VSELECT pin we remove that property to enable support in the kernel. Additionally we add SD3_VSELECT to the pinmux for clarity (even though U-Boot does not currently support UHS-I modes requiring 1.8V I/O). Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks/gw_ventana/gw_ventana.c')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 15e4bf129a..82313e8a7a 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -60,8 +60,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = {
IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- /* CD */
- IOMUX_PADS(PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(IRQ_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
};
/* ENET */
@@ -792,6 +791,17 @@ static inline void ft_enable_path(void *blob, const char *path)
}
}
+/* remove a property of a node if the node is found */
+static inline void ft_delprop_path(void *blob, const char *path,
+ const char *name)
+{
+ int i = fdt_path_offset(blob, path);
+ if (i) {
+ debug("removing %s/%s\n", path, name);
+ fdt_delprop(blob, i, name);
+ }
+}
+
/*
* called prior to booting kernel or by 'fdt boardsetup' command
*
@@ -895,6 +905,11 @@ int ft_board_setup(void *blob, bd_t *bd)
range[1] = cpu_to_fdt32(23);
}
}
+
+ /* these have broken usd_vsel */
+ if (strstr((const char *)info->model, "SP318-B") ||
+ strstr((const char *)info->model, "SP331-B"))
+ gpio_cfg[board_type].usd_vsel = 0;
}
/*
@@ -954,6 +969,13 @@ int ft_board_setup(void *blob, bd_t *bd)
}
}
+ /* remove no-1-8-v if UHS-I support is present */
+ if (gpio_cfg[board_type].usd_vsel) {
+ debug("Enabling UHS-I support\n");
+ ft_delprop_path(blob, "/soc/aips-bus@02100000/usdhc@02198000",
+ "no-1-8-v");
+ }
+
/*
* Peripheral Config:
* remove nodes by alias path if EEPROM config tells us the
OpenPOWER on IntegriCloud