[U-Boot] [PATCH v1 0/3] 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
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

From: Faiz Abbas faiz_abbas@ti.com
Add usb peripheral and usb phy nodes in spl to enable SPL_DFU bootmode.
Signed-off-by: Faiz Abbas faiz_abbas@ti.com Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com ---
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
diff --git a/arch/arm/dts/dra7-evm-u-boot.dtsi b/arch/arm/dts/dra7-evm-u-boot.dtsi index badaebc76f..f06c701dbd 100644 --- a/arch/arm/dts/dra7-evm-u-boot.dtsi +++ b/arch/arm/dts/dra7-evm-u-boot.dtsi @@ -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; +}; diff --git a/arch/arm/dts/dra71-evm-u-boot.dtsi b/arch/arm/dts/dra71-evm-u-boot.dtsi index f9da15f1c7..b56d4fc9d8 100644 --- a/arch/arm/dts/dra71-evm-u-boot.dtsi +++ b/arch/arm/dts/dra71-evm-u-boot.dtsi @@ -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; +}; diff --git a/arch/arm/dts/dra72-evm-revc-u-boot.dtsi b/arch/arm/dts/dra72-evm-revc-u-boot.dtsi index f9da15f1c7..b56d4fc9d8 100644 --- a/arch/arm/dts/dra72-evm-revc-u-boot.dtsi +++ b/arch/arm/dts/dra72-evm-revc-u-boot.dtsi @@ -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; +}; diff --git a/arch/arm/dts/dra72-evm-u-boot.dtsi b/arch/arm/dts/dra72-evm-u-boot.dtsi new file mode 100644 index 0000000000..6c868f75d1 --- /dev/null +++ b/arch/arm/dts/dra72-evm-u-boot.dtsi @@ -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; +}; diff --git a/arch/arm/dts/dra76-evm-u-boot.dtsi b/arch/arm/dts/dra76-evm-u-boot.dtsi index f651f404e0..a4dfbe7e60 100644 --- a/arch/arm/dts/dra76-evm-u-boot.dtsi +++ b/arch/arm/dts/dra76-evm-u-boot.dtsi @@ -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; +}; diff --git a/arch/arm/dts/omap5-u-boot.dtsi b/arch/arm/dts/omap5-u-boot.dtsi index 1b1d765fae..39071e223d 100644 --- a/arch/arm/dts/omap5-u-boot.dtsi +++ b/arch/arm/dts/omap5-u-boot.dtsi @@ -22,6 +22,7 @@
ocp2scp@4a080000 { compatible = "ti,omap-ocp2scp", "simple-bus"; + u-boot,dm-spl; };
ocp2scp@4a090000 {

From: Faiz Abbas faiz_abbas@ti.com
Enable configs for supporting SPL_DFU bootmode.
Signed-off-by: Faiz Abbas faiz_abbas@ti.com Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com ---
configs/dra7xx_evm_defconfig | 6 ++++++ configs/dra7xx_hs_evm_defconfig | 6 ++++++ 2 files changed, 12 insertions(+)
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index ad8868e512..15dd0e879d 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -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 diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 7a5c3e72d4..e2f0476f9e 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -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

From: Faiz Abbas faiz_abbas@ti.com
Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode.
Signed-off-by: Faiz Abbas faiz_abbas@ti.com
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com ---
configs/dra7xx_evm_defconfig | 2 +- configs/dra7xx_hs_evm_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 15dd0e879d..57a542db88 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -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 diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index e2f0476f9e..ca904d8d2d 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -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
participants (1)
-
Jean-Jacques Hiblot