Skip to contentSkip to conversation

Add support for DFU boot to DRA7-based EVMs

PATCH RESEND New Jean-Jacques Hiblot 2 participants 7 messages Oct 9, 2019 – Oct 26, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover Add support for DFU boot to DRA7-based EVMs

The purpose of this series is to provide the SPL with ability to boot u-boot from DFU.
The DRA7x can download the SPL over the USB1 port when configured in the USB peripheral boot mode. Details on how this can be acheived with the EVMs can found here http://www.ti.com/lit/an/sprac33/sprac33.pdf
Once the SPL is loaded, u-boot can be downloaded on the same USB1 port through DFU.

This boot flow has been tested on DRA7-evm, DRA72-evm-rec, DRA71-evm and DRA76-evm

changes since first sent:
- rebased on top of u-boot/master

Faiz Abbas (3):
ARM: dts: dra7: Add usb peripheral nodes in spl
configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmode
configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT

 arch/arm/dts/dra7-evm-u-boot.dtsi       | 17 +++++++++++++++++
 arch/arm/dts/dra71-evm-u-boot.dtsi      | 17 +++++++++++++++++
 arch/arm/dts/dra72-evm-revc-u-boot.dtsi | 17 +++++++++++++++++
 arch/arm/dts/dra72-evm-u-boot.dtsi      | 23 +++++++++++++++++++++++
 arch/arm/dts/dra76-evm-u-boot.dtsi      | 17 +++++++++++++++++
 arch/arm/dts/omap5-u-boot.dtsi          |  1 +
 configs/dra7xx_evm_defconfig            |  8 +++++++-
 configs/dra7xx_hs_evm_defconfig         |  8 +++++++-
 8 files changed, 106 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/dra72-evm-u-boot.dtsi
Signature · 1 line
2.17.1
#1 lore raw

PATCH RESEND 1/3 ARM: dts: dra7: Add usb peripheral nodes in spl

From: Faiz Abbas <[email protected]>

Add usb peripheral and usb phy nodes in spl to enable SPL_DFU bootmode.

---

 arch/arm/dts/dra7-evm-u-boot.dtsi       | 17 +++++++++++++++++
 arch/arm/dts/dra71-evm-u-boot.dtsi      | 17 +++++++++++++++++
 arch/arm/dts/dra72-evm-revc-u-boot.dtsi | 17 +++++++++++++++++
 arch/arm/dts/dra72-evm-u-boot.dtsi      | 23 +++++++++++++++++++++++
 arch/arm/dts/dra76-evm-u-boot.dtsi      | 17 +++++++++++++++++
 arch/arm/dts/omap5-u-boot.dtsi          |  1 +
 6 files changed, 92 insertions(+)
 create mode 100644 arch/arm/dts/dra72-evm-u-boot.dtsi
arch/arm/dts/dra7-evm-u-boot.dtsi +17 -0
index badaebc76f..f06c701dbd 100644
@@ -32,3 +32,20 @@
 &mmc2_iodelay_hs200_rev20_conf {
 	u-boot,dm-spl;
 };
+
+&omap_dwc3_1 {
+	u-boot,dm-spl;
+};
+
+&usb1 {
+	u-boot,dm-spl;
+	dr_mode = "peripheral";
+};
+
+&usb2_phy1 {
+	u-boot,dm-spl;
+};
+
+&usb3_phy1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/dra71-evm-u-boot.dtsi +17 -0
index f9da15f1c7..b56d4fc9d8 100644
@@ -44,3 +44,20 @@
 &mmc2_iodelay_hs200_rev20_conf {
 	u-boot,dm-spl;
 };
+
+&omap_dwc3_1 {
+	u-boot,dm-spl;
+};
+
+&usb1 {
+	u-boot,dm-spl;
+	dr_mode = "peripheral";
+};
+
+&usb2_phy1 {
+	u-boot,dm-spl;
+};
+
+&usb3_phy1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/dra72-evm-revc-u-boot.dtsi +17 -0
index f9da15f1c7..b56d4fc9d8 100644
@@ -44,3 +44,20 @@
 &mmc2_iodelay_hs200_rev20_conf {
 	u-boot,dm-spl;
 };
+
+&omap_dwc3_1 {
+	u-boot,dm-spl;
+};
+
+&usb1 {
+	u-boot,dm-spl;
+	dr_mode = "peripheral";
+};
+
+&usb2_phy1 {
+	u-boot,dm-spl;
+};
+
+&usb3_phy1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/dra72-evm-u-boot.dtsi new file +23 -0
new file mode 100644
index 0000000000..6c868f75d1
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ */
+
+#include "omap5-u-boot.dtsi"
+
+&omap_dwc3_1 {
+	u-boot,dm-spl;
+};
+
+&usb1 {
+	u-boot,dm-spl;
+	dr_mode = "peripheral";
+};
+
+&usb2_phy1 {
+	u-boot,dm-spl;
+};
+
+&usb3_phy1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/dra76-evm-u-boot.dtsi +17 -0
index f651f404e0..a4dfbe7e60 100644
@@ -24,3 +24,20 @@
 &mmc2_iodelay_hs200_conf {
 	u-boot,dm-spl;
 };
+
+&omap_dwc3_1 {
+	u-boot,dm-spl;
+};
+
+&usb1 {
+	u-boot,dm-spl;
+	dr_mode = "peripheral";
+};
+
+&usb2_phy1 {
+	u-boot,dm-spl;
+};
+
+&usb3_phy1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/omap5-u-boot.dtsi +1 -0
index 1b1d765fae..39071e223d 100644
@@ -22,6 +22,7 @@
 
 		ocp2scp at 4a080000 {
 			compatible = "ti,omap-ocp2scp", "simple-bus";
+			u-boot,dm-spl;
 		};
 
 		ocp2scp at 4a090000 {
Signature · 1 line
2.17.1
#2 lore raw

PATCH RESEND 1/3 ARM: dts: dra7: Add usb peripheral nodes in spl

Quoted 6 lines · Jean-Jacques Hiblot

From: Faiz Abbas <[email protected]>

Add usb peripheral and usb phy nodes in spl to enable SPL_DFU bootmode.

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: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191025/9d2572dd/attachment.sig>
#3 lore raw

PATCH RESEND 2/3 configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmode

In reply to Jean-Jacques Hiblot

From: Faiz Abbas <[email protected]>

Enable configs for supporting SPL_DFU bootmode.

---

 configs/dra7xx_evm_defconfig    | 6 ++++++
 configs/dra7xx_hs_evm_defconfig | 6 ++++++
 2 files changed, 12 insertions(+)
configs/dra7xx_evm_defconfig +6 -0
index 868030d34c..a09d0733ca 100644
@@ -25,8 +25,11 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
+CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_DFU=y
 CONFIG_CMD_SPL=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_NAND=y
@@ -85,6 +88,7 @@ CONFIG_MII=y
 CONFIG_DRIVER_TI_CPSW=y
 CONFIG_SPL_PHY=y
 CONFIG_PIPE3_PHY=y
+CONFIG_SPL_PIPE3_PHY=y
 CONFIG_OMAP_USB2_PHY=y
 CONFIG_PMIC_PALMAS=y
 CONFIG_PMIC_LP873X=y
@@ -107,7 +111,9 @@ 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_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
configs/dra7xx_hs_evm_defconfig +6 -0
index 7a5c3e72d4..e2f0476f9e 100644
@@ -30,8 +30,11 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 # CONFIG_SPL_NAND_SUPPORT is not set
+CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_DFU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_NAND=y
 CONFIG_CMD_MTDPARTS=y
@@ -88,6 +91,7 @@ CONFIG_MII=y
 CONFIG_DRIVER_TI_CPSW=y
 CONFIG_SPL_PHY=y
 CONFIG_PIPE3_PHY=y
+CONFIG_SPL_PIPE3_PHY=y
 CONFIG_OMAP_USB2_PHY=y
 CONFIG_PMIC_PALMAS=y
 CONFIG_PMIC_LP873X=y
@@ -110,7 +114,9 @@ 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_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
Signature · 1 line
2.17.1
#4 lore raw

PATCH RESEND 2/3 configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmode

Quoted 6 lines · Jean-Jacques Hiblot

From: Faiz Abbas <[email protected]>

Enable configs for supporting SPL_DFU bootmode.

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: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191025/cea49526/attachment.sig>
#5 lore raw

PATCH RESEND 3/3 configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT

In reply to Jean-Jacques Hiblot

From: Faiz Abbas <[email protected]>

Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode.

---

 configs/dra7xx_evm_defconfig    | 2 +-
 configs/dra7xx_hs_evm_defconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configs/dra7xx_evm_defconfig +1 -1
index a09d0733ca..88d160d0b5 100644
@@ -42,7 +42,7 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm dra76-evm"
 CONFIG_SPL_MULTI_DTB_FIT=y
-CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x9000
+CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0xA000
 CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent"
 # CONFIG_ENV_IS_IN_FAT is not set
 CONFIG_ENV_IS_IN_MMC=y
configs/dra7xx_hs_evm_defconfig +1 -1
index e2f0476f9e..ca904d8d2d 100644
@@ -45,7 +45,7 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm dra76-evm"
 CONFIG_SPL_MULTI_DTB_FIT=y
-CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x9000
+CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0xA000
 CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent"
 # CONFIG_ENV_IS_IN_FAT is not set
 CONFIG_ENV_IS_IN_MMC=y
Signature · 1 line
2.17.1
#6 lore raw

PATCH RESEND 3/3 configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT

Quoted 8 lines · Jean-Jacques Hiblot

From: Faiz Abbas <[email protected]>

Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode.

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: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191025/c2fdd7b8/attachment.sig>