From 842766ecf7ede3a2ebf6b7211d009aafa7fffdf9 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Wed, 7 Jun 2017 14:21:02 +0800 Subject: [PATCH] MLK-15026-3 configs: imx8qm_arm2: enable USB3 Enable USB3 configuration, only host mode is supported now. And disable EHCI support at imx8qm_lpddr4_arm2_defconfig. Currently, the EHCI and xHCI can't be enabled at the same time due to below redefinition symbols: drivers/usb/host/xhci.o: In function `submit_control_msg': /home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1032: multiple definition of `submit_control_msg' drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1517: first defined here drivers/usb/host/xhci.o: In function `submit_bulk_msg': /home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1045: multiple definition of `submit_bulk_msg' drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1141: first defined here drivers/usb/host/xhci.o: In function `submit_int_msg': /home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1053: multiple definition of `submit_int_msg' drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1523: first defined here drivers/usb/host/xhci.o: In function `usb_lowlevel_init': /home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1063: multiple definition of `usb_lowlevel_init' drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1097: first defined here drivers/usb/host/xhci.o: In function `usb_lowlevel_stop': /home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1102: multiple definition of `usb_lowlevel_stop' drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1092: first defined here scripts/Makefile.build:359: recipe for target 'drivers/usb/host/built-in.o' failed make[1]: *** [drivers/usb/host/built-in.o] Error 1 If the user wants to use EHCI for chipidea IP at imx8qm, please comment out CONFIG_USB_XHCI_HCD CONFIG_USB_XHCI_IMX And define CONFIG_USB_EHCI_HCD CONFIG_DM_USB at imx8qm_lpddr4_arm2_defconfig Signed-off-by: Peter Chen --- configs/imx8qm_lpddr4_arm2_defconfig | 8 ++++++-- include/configs/imx8qm_arm2.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/configs/imx8qm_lpddr4_arm2_defconfig b/configs/imx8qm_lpddr4_arm2_defconfig index 810274cf7b..d4a603356e 100644 --- a/configs/imx8qm_lpddr4_arm2_defconfig +++ b/configs/imx8qm_lpddr4_arm2_defconfig @@ -14,10 +14,14 @@ CONFIG_DM_I2C=y CONFIG_SYS_I2C_IMX_LPI2C=y CONFIG_CMD_I2C=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_IMX8=y + +#CONFIG_DM_USB is not set +#CONFIG_USB_EHCI_HCD 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 diff --git a/include/configs/imx8qm_arm2.h b/include/configs/imx8qm_arm2.h index 8ca69374b3..700d0eb843 100644 --- a/include/configs/imx8qm_arm2.h +++ b/include/configs/imx8qm_arm2.h @@ -275,8 +275,16 @@ #define CONFIG_SYS_FSL_FSPI_AHB #endif -/* USB OTG controller configs */ +/* USB Config */ #ifdef CONFIG_CMD_USB + +#ifdef CONFIG_USB_XHCI_IMX8 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 +#endif + +/* USB OTG controller configs */ +#ifdef CONFIG_USB_EHCI_HCD #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) @@ -290,4 +298,6 @@ #include "imx8qm_arm2_android.h" #endif +#endif /* CONFIG_CMD_USB */ + #endif /* __IMX8QM_ARM2_H */ -- 2.17.1