Commit 7617d233 authored by Ye Li's avatar Ye Li Committed by Jason Liu

MLK-15013-4 imx8qxp_arm2: Enable USB DM driver for USBOH controller

Add board codes and configurations to enable USB DM driver (host and gadget)
for the USBOH(OTG) controller on i.MX8QXP ARM2 board.

For device mode, the UMS (USB mass storage) is enabled at default.
Signed-off-by: 's avatarYe Li <ye.li@nxp.com>
parent 559d4847
......@@ -98,7 +98,7 @@ static iomux_cfg_t lpi2c3_pads[] = {
};
static iomux_cfg_t lpi2c1_pads[] = {
SC_P_USB_SS3_TC0 | MUX_MODE_ALT(0) | MUX_PAD_CTRL(I2C_PAD_CTRL),
SC_P_USB_SS3_TC1 | MUX_MODE_ALT(0) | MUX_PAD_CTRL(I2C_PAD_CTRL),
SC_P_USB_SS3_TC3 | MUX_MODE_ALT(0) | MUX_PAD_CTRL(I2C_PAD_CTRL),
};
......@@ -564,6 +564,21 @@ void pci_init_board(void)
#endif
#ifdef CONFIG_USB_EHCI_MX6
static iomux_cfg_t otg1_pins[] = {
/* Set USB PWR to GPIO used by DM driver */
SC_P_USB_SS3_TC0 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(GPIO_PAD_CTRL),
};
static void setup_otg(void)
{
imx8_iomux_setup_multiple_pads(otg1_pins, ARRAY_SIZE(otg1_pins));
/* Enable usb power */
init_otg_power();
}
#endif
int board_init(void)
{
#ifdef CONFIG_MXC_GPIO
......@@ -587,6 +602,10 @@ int board_init(void)
setup_mmc();
#endif
#ifdef CONFIG_USB_EHCI_MX6
setup_otg();
#endif
return 0;
}
......
......@@ -13,8 +13,21 @@ CONFIG_DM_I2C=y
# CONFIG_DM_I2C_COMPAT is not set
CONFIG_SYS_I2C_IMX_LPI2C=y
CONFIG_CMD_I2C=y
# CONFIG_CMD_USB is not set
# CONFIG_USB is not set
CONFIG_CMD_USB=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_CMD_GPIO=y
CONFIG_DM_GPIO=y
CONFIG_DM_PCA953X=y
......@@ -38,3 +51,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_DM_ETH=y
# CONFIG_EFI_LOADER is not set
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
......@@ -252,4 +252,16 @@
#define CONFIG_SYS_FSL_FSPI_AHB
#endif
/* USB OTG controller configs */
#ifdef CONFIG_CMD_USB
#define CONFIG_USB_HOST_ETHER
#define CONFIG_USB_ETHER_ASIX
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#endif
#ifdef CONFIG_USB_GADGET
#define CONFIG_USBD_HS
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#endif
#endif /* __IMX8QXP_ARM2_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment