summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2015-05-04 11:28:55 +0530
committerStefan Agner <stefan.agner@toradex.com>2015-05-04 17:50:00 +0200
commitcafd2c60cb8856db8976957823ee1059e28fa5ad (patch)
tree424860cfb62880b4dd1173cce22eae801f32253e /board
parent56adc6e9a6ab7e7ccb75a38d34ff9fda96b9cf3a (diff)
colibri_vf: Enable board specific USB initialisation for USB pen gpio
Add IOMUX for the pad used as USB pen. This needs to be driven low for the Iris and Viola boards where it is pulled up high by default. This is required for the USB host functionality to work on these boards. Use the board specific weak initialisation function, to drive the pin low which would be called on "usb start". Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> [use switch statement to make port selection more obvious] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'board')
-rw-r--r--board/toradex/colibri_vf/colibri_vf.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 59c8c5bddf..e973e8e32f 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -38,6 +38,12 @@ DECLARE_GLOBAL_DATA_PTR;
#define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \
PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE)
+#define USB_PEN_GPIO 83
+
+static const iomux_v3_cfg_t usb_pads[] = {
+ VF610_PAD_PTD4__GPIO_83,
+};
+
int dram_init(void)
{
static const struct ddr3_jedec_timings timings = {
@@ -503,3 +509,21 @@ int ft_board_setup(void *blob, bd_t *bd)
return fsl_dcu_fixedfb_setup(blob);
}
#endif
+
+#ifdef CONFIG_USB_EHCI_VF
+int board_ehci_hcd_init(int port)
+{
+ imx_iomux_v3_setup_multiple_pads(usb_pads, ARRAY_SIZE(usb_pads));
+
+ switch (port) {
+ case 0:
+ /* USBC does not have PEN, also configured as USB client only */
+ break;
+ case 1:
+ gpio_request(USB_PEN_GPIO, "usb-pen-gpio");
+ gpio_direction_output(USB_PEN_GPIO, 0);
+ break;
+ }
+ return 0;
+}
+#endif