[U-Boot] [PATCH v1 0/3] Enable DM USB support (host and gadget) in the USB host boot flow

The AM43xx is able to get its SPL from an external USB storage. There is a dedicated defconfig (am43xx_evm_usbhost_boot_defconfig) but it doesn't use DM_USB. Converting this defconfig to DM_USB.
Jean-Jacques Hiblot (3): ARM: DTS: am43xx: Add aliases for the USB ports ARM: DTS: am43xx: Enable the DTS entries for USB port #2 in SPL configs: am43xx_evm_usbhost_defconfig: Enable DM_USB support
arch/arm/dts/am4372-u-boot.dtsi | 27 +++++++++++++++++++++++ configs/am43xx_evm_usbhost_boot_defconfig | 12 ++++++++++ 2 files changed, 39 insertions(+)

Although not required, it doesn't hurt to explicitly map the USB ports to a USB controller. Without this, the port number will be derived from the binding order of the peripheral devices.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com ---
arch/arm/dts/am4372-u-boot.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/arch/arm/dts/am4372-u-boot.dtsi b/arch/arm/dts/am4372-u-boot.dtsi index 99922ca030..0e6d41f54b 100644 --- a/arch/arm/dts/am4372-u-boot.dtsi +++ b/arch/arm/dts/am4372-u-boot.dtsi @@ -3,6 +3,13 @@ * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ */
+/{ + aliases { + usb0 = &usb1; + usb1 = &usb2; + }; +}; + &am43xx_control_usb2phy1 { compatible = "ti,control-phy-usb2-am437", "syscon"; };

On Thu, Jan 24, 2019 at 03:42:51PM +0100, Jean-Jacques Hiblot wrote:
Although not required, it doesn't hurt to explicitly map the USB ports to a USB controller. Without this, the port number will be derived from the binding order of the peripheral devices.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
Applied to u-boot/master, thanks!

This is required to enable the USB port #2 in SPL when DM_USB is used.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com ---
arch/arm/dts/am4372-u-boot.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/arch/arm/dts/am4372-u-boot.dtsi b/arch/arm/dts/am4372-u-boot.dtsi index 0e6d41f54b..986ae17470 100644 --- a/arch/arm/dts/am4372-u-boot.dtsi +++ b/arch/arm/dts/am4372-u-boot.dtsi @@ -45,3 +45,23 @@ &ocp2scp0 { u-boot,dm-spl; }; + +&dwc3_2 { + u-boot,dm-spl; +}; + +&usb2 { + u-boot,dm-spl; +}; + +&usb2_phy2 { + u-boot,dm-spl; +}; + +&am43xx_control_usb2phy2 { + u-boot,dm-spl; +}; + +&ocp2scp1 { + u-boot,dm-spl; +};

On Thu, Jan 24, 2019 at 03:42:52PM +0100, Jean-Jacques Hiblot wrote:
This is required to enable the USB port #2 in SPL when DM_USB is used.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
Applied to u-boot/master, thanks!

Enable DM_USB support in u-boot and in SPL. This brings this configuration closer to am43xx_evm_defconfig.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
---
configs/am43xx_evm_usbhost_boot_defconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 5131f190a7..b8d535cc3b 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -40,11 +40,16 @@ CONFIG_OF_LIST="am437x-gp-evm am437x-sk-evm am43x-epos-evm am437x-idk-evm" CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y # CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y CONFIG_DM_GPIO=y +CONFIG_MISC=y CONFIG_DM_MMC=y CONFIG_MMC_OMAP_HS=y CONFIG_NAND=y @@ -53,17 +58,24 @@ CONFIG_SPI_FLASH_MACRONIX=y CONFIG_PHY_GIGE=y CONFIG_MII=y CONFIG_DRIVER_TI_CPSW=y +CONFIG_PHY=y +CONFIG_SPL_PHY=y +CONFIG_OMAP_USB2_PHY=y CONFIG_DM_SERIAL=y CONFIG_SPI=y CONFIG_TI_QSPI=y CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_DWC3_PHY_OMAP=y CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y

There is a build issue with this series (forgot to run buildman on this), I'll send a v2 shortly.
On 24/01/2019 15:42, Jean-Jacques Hiblot wrote:
Enable DM_USB support in u-boot and in SPL. This brings this configuration closer to am43xx_evm_defconfig.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
configs/am43xx_evm_usbhost_boot_defconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 5131f190a7..b8d535cc3b 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -40,11 +40,16 @@ CONFIG_OF_LIST="am437x-gp-evm am437x-sk-evm am43x-epos-evm am437x-idk-evm" CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y # CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y CONFIG_DM_GPIO=y +CONFIG_MISC=y CONFIG_DM_MMC=y CONFIG_MMC_OMAP_HS=y CONFIG_NAND=y @@ -53,17 +58,24 @@ CONFIG_SPI_FLASH_MACRONIX=y CONFIG_PHY_GIGE=y CONFIG_MII=y CONFIG_DRIVER_TI_CPSW=y +CONFIG_PHY=y +CONFIG_SPL_PHY=y +CONFIG_OMAP_USB2_PHY=y CONFIG_DM_SERIAL=y CONFIG_SPI=y CONFIG_TI_QSPI=y CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_DWC3_PHY_OMAP=y CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y

On 24/01/19 8:12 PM, Jean-Jacques Hiblot wrote:
The AM43xx is able to get its SPL from an external USB storage. There is a dedicated defconfig (am43xx_evm_usbhost_boot_defconfig) but it doesn't use DM_USB. Converting this defconfig to DM_USB.
For the whole series
Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Thanks and regards, Lokesh
participants (3)
-
Jean-Jacques Hiblot
-
Lokesh Vutla
-
Tom Rini