Skip to contentSkip to conversation

Enable DM USB support (host and gadget) in the USB host boot flow

PATCH New Jean-Jacques Hiblot 3 participants 8 messages Jan 24, 2019 – Feb 3, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover 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(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 ARM: DTS: am43xx: Add aliases for the USB ports

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.

---

 arch/arm/dts/am4372-u-boot.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/dts/am4372-u-boot.dtsi +7 -0
index 99922ca030..0e6d41f54b 100644
@@ -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";
 };
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/3 ARM: DTS: am43xx: Add aliases for the USB ports

Quoted 5 lines · Jean-Jacques Hiblot

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190202/f59db75e/attachment.sig>
#3 lore raw

PATCH 2/3 ARM: DTS: am43xx: Enable the DTS entries for USB port #2 in SPL

In reply to Jean-Jacques Hiblot

This is required to enable the USB port #2 in SPL when DM_USB is used.

---

 arch/arm/dts/am4372-u-boot.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/dts/am4372-u-boot.dtsi +20 -0
index 0e6d41f54b..986ae17470 100644
@@ -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;
+};
Signature · 1 line
2.17.1
#4 lore raw

PATCH 2/3 ARM: DTS: am43xx: Enable the DTS entries for USB port #2 in SPL

Quoted 3 lines · Jean-Jacques Hiblot

This is required to enable the USB port #2 in SPL when DM_USB is used.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190202/38424ce8/attachment.sig>
#5 lore raw

PATCH 3/3 configs: am43xx_evm_usbhost_defconfig: Enable DM_USB support

In reply to Jean-Jacques Hiblot

Enable DM_USB support in u-boot and in SPL.
This brings this configuration closer to am43xx_evm_defconfig.

---

 configs/am43xx_evm_usbhost_boot_defconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)
configs/am43xx_evm_usbhost_boot_defconfig +12 -0
index 5131f190a7..b8d535cc3b 100644
@@ -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
Signature · 1 line
2.17.1
#6 lore raw

PATCH 3/3 configs: am43xx_evm_usbhost_defconfig: Enable DM_USB support

There is a build issue with this series (forgot to run buildman on this), I'll send a v2 shortly.

Quoted 56 lines · Jean-Jacques Hiblot

Enable DM_USB support in u-boot and in SPL.
This brings this configuration closer to am43xx_evm_defconfig.

---

  configs/am43xx_evm_usbhost_boot_defconfig | 12 ++++++++++++
  1 file changed, 12 insertions(+)
configs/am43xx_evm_usbhost_boot_defconfig +12 -0
index 5131f190a7..b8d535cc3b 100644
@@ -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
#7 lore raw

cover Enable DM USB support (host and gadget) in the USB host boot flow

In reply to Jean-Jacques Hiblot
Quoted 4 lines · Jean-Jacques Hiblot

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

Thanks and regards,
Lokesh