Message ID | 20180928142239.4660-4-otavio@ossystems.com.br |
---|---|
State | Accepted |
Commit | 780e31e93fa97fd8da4c27f039ac32a52b98f4ba |
Delegated to: | Stefano Babic |
Headers | show |
Series | [U-Boot,v3,1/4] pico-imx6ul, pico-imx7d: Use eMMC user partition by default | expand |
On Fri, Sep 28, 2018 at 11:23 AM Otavio Salvador <otavio@ossystems.com.br> wrote: > > From: Fabio Estevam <festevam@gmail.com> > > USB OTG2 port is connected to the USB host connector. > > Add support for it. > > Signed-off-by: Fabio Estevam <festevam@gmail.com> > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> I think the serie wasn't Cced for you, by mistake. Do you mind to take a look?
On 08/10/2018 21:36, Otavio Salvador wrote: > On Fri, Sep 28, 2018 at 11:23 AM Otavio Salvador > <otavio@ossystems.com.br> wrote: >> >> From: Fabio Estevam <festevam@gmail.com> >> >> USB OTG2 port is connected to the USB host connector. >> >> Add support for it. >> >> Signed-off-by: Fabio Estevam <festevam@gmail.com> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> > > I think the serie wasn't Cced for you, by mistake. Do you mind to take a look? > No worry, I will take a look tomorrow. Regards, Stefano
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 0767d0462f..53e14693a5 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -282,7 +282,34 @@ int checkboard(void) return 0; } +static iomux_v3_cfg_t const usb_otg2_pads[] = { + MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + +int board_ehci_hcd_init(int port) +{ + switch (port) { + case 0: + break; + case 1: + imx_iomux_v3_setup_multiple_pads(usb_otg2_pads, + ARRAY_SIZE(usb_otg2_pads)); + break; + default: + return -EINVAL; + } + return 0; +} + int board_usb_phy_mode(int port) { - return USB_INIT_DEVICE; + switch (port) { + case 0: + return USB_INIT_DEVICE; + case 1: + return USB_INIT_HOST; + default: + return -EINVAL; + } + return 0; }