diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-23 14:02:29 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2015-07-26 10:29:53 (GMT) |
commit | 95246ac7094cd511f02f98d403c965625ea81db4 (patch) | |
tree | 16d028b1c2ac7d3dcdff56ff1650046551fcd51b /board/congatec/cgtqmx6eval | |
parent | 4c9929d63a51596db51c77620390b7b85feb8ecd (diff) | |
download | u-boot-95246ac7094cd511f02f98d403c965625ea81db4.tar.xz |
cgtqmx6eval: Add USB support
Add USB support.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'board/congatec/cgtqmx6eval')
-rw-r--r-- | board/congatec/cgtqmx6eval/cgtqmx6eval.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index b0ca69b..3987b74 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -88,6 +88,11 @@ static iomux_v3_cfg_t const usdhc4_pads[] = { MX6_PAD_NANDF_D6__GPIO2_IO06 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ }; +static iomux_v3_cfg_t const usb_otg_pads[] = { + MX6_PAD_EIM_D22__USB_OTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_GPIO_1__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) struct i2c_pads_info i2c_pad_info1 = { .scl = { @@ -219,6 +224,45 @@ int board_mmc_init(bd_t *bis) } #endif +int board_ehci_hcd_init(int port) +{ + switch (port) { + case 0: + imx_iomux_v3_setup_multiple_pads(usb_otg_pads, + ARRAY_SIZE(usb_otg_pads)); + /* + * set daisy chain for otg_pin_id on 6q. + * for 6dl, this bit is reserved + */ + imx_iomux_set_gpr_register(1, 13, 1, 1); + break; + case 1: + /* nothing to do */ + break; + default: + printf("Invalid USB port: %d\n", port); + return -EINVAL; + } + + return 0; +} + +int board_ehci_power(int port, int on) +{ + switch (port) { + case 0: + break; + case 1: + gpio_direction_output(IMX_GPIO_NR(5, 5), on); + break; + default: + printf("Invalid USB port: %d\n", port); + return -EINVAL; + } + + return 0; +} + int board_early_init_f(void) { setup_iomux_uart(); |