Skip to contentSkip to conversation

AM57x EVM: Enable USB DFU support

PATCH New Sekhar Nori 4 participants 16 messages Aug 25, 2016 – Aug 30, 2016

lore
Share & tools
lore
#0 lore raw

cover AM57x EVM: Enable USB DFU support

Hi,

Here is a patch series that enables
USB DFU support on AM57x GP EVM.

Thanks,
Sekhar

Sekhar Nori (3):
configs: dra7xx: get rid of duplicate #define
board: ti: am57xx-evm: fix build warnings
ARM: am57xx_evm: enable DFU support

 board/ti/am57xx/board.c         | 20 ------------------
 configs/am57xx_evm_defconfig    | 10 +++++++++
 configs/am57xx_hs_evm_defconfig | 10 +++++++++
 include/configs/am57xx_evm.h    | 46 +++++++++++++++++++++++++++++++++++++++++
 include/configs/dra7xx_evm.h    |  1 -
 5 files changed, 66 insertions(+), 21 deletions(-)
Signature · 1 line
2.9.0
#1 lore raw

PATCH 1/3 configs: dra7xx: get rid of duplicate #define

CONFIG_DFU_RAM is repeated twice in dra7xx_evm.h
file. Remove the duplicate.

---
 include/configs/dra7xx_evm.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/dra7xx_evm.h +0 -1
index b66949f4155b..4ea993d3f5db 100644
@@ -218,7 +218,6 @@
 
 /* USB Device Firmware Update support */
 #define CONFIG_USB_FUNCTION_DFU
-#define CONFIG_DFU_RAM
 
 #define CONFIG_DFU_MMC
 #define CONFIG_DFU_RAM
Signature · 1 line
2.9.0
#2 lore raw

PATCH 1/3 configs: dra7xx: get rid of duplicate #define

Quoted 2 lines · Sekhar Nori

CONFIG_DFU_RAM is repeated twice in dra7xx_evm.h
file. Remove the duplicate.

Thanks and regards,
Lokesh

Quoted 19 lines
---
 include/configs/dra7xx_evm.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/dra7xx_evm.h +0 -1
index b66949f4155b..4ea993d3f5db 100644
@@ -218,7 +218,6 @@
 
 /* USB Device Firmware Update support */
 #define CONFIG_USB_FUNCTION_DFU
-#define CONFIG_DFU_RAM
 
 #define CONFIG_DFU_MMC
 #define CONFIG_DFU_RAM
#3 lore raw

PATCH 2/3 board: ti: am57xx-evm: fix build warnings

In reply to Sekhar Nori

USB1 is not used on AM57xx GP EVM in device mode.
Enabling DWC3 USB support for AM57xx EVM gives
the following warnings:

CC board/ti/am57xx/board.o
../board/ti/am57xx/board.c:448:27: warning: 'usb_otg_ss1' defined but not used [-Wunused-variable]

 static struct dwc3_device usb_otg_ss1 = {
                           ^
../board/ti/am57xx/board.c:455:32: warning: 'usb_otg_ss1_glue' defined but not used [-Wunused-variable]
 static struct dwc3_omap_device usb_otg_ss1_glue = {
                                ^

../board/ti/am57xx/board.c:461:33: warning: 'usb_phy1_device' defined but not used [-Wunused-variable]
static struct ti_usb_phy_device usb_phy1_device = {

Fix it by getting rid of USB1 related structures from board.c. They can be added back if there is a need for them.

---
 board/ti/am57xx/board.c | 20 --------------------
 1 file changed, 20 deletions(-)
board/ti/am57xx/board.c +0 -20
index 927d1364fe46..288ff346e0ca 100644
@@ -445,26 +445,6 @@ int spl_start_uboot(void)
 #endif
 
 #ifdef CONFIG_USB_DWC3
-static struct dwc3_device usb_otg_ss1 = {
-	.maximum_speed = USB_SPEED_SUPER,
-	.base = DRA7_USB_OTG_SS1_BASE,
-	.tx_fifo_resize = false,
-	.index = 0,
-};
-
-static struct dwc3_omap_device usb_otg_ss1_glue = {
-	.base = (void *)DRA7_USB_OTG_SS1_GLUE_BASE,
-	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
-	.index = 0,
-};
-
-static struct ti_usb_phy_device usb_phy1_device = {
-	.pll_ctrl_base = (void *)DRA7_USB3_PHY1_PLL_CTRL,
-	.usb2_phy_power = (void *)DRA7_USB2_PHY1_POWER,
-	.usb3_phy_power = (void *)DRA7_USB3_PHY1_POWER,
-	.index = 0,
-};
-
 static struct dwc3_device usb_otg_ss2 = {
 	.maximum_speed = USB_SPEED_HIGH,
 	.base = DRA7_USB_OTG_SS2_BASE,
Signature · 1 line
2.9.0
#4 lore raw

PATCH 2/3 board: ti: am57xx-evm: fix build warnings

Quoted 11 lines · Sekhar Nori

USB1 is not used on AM57xx GP EVM in device mode.
Enabling DWC3 USB support for AM57xx EVM gives
the following warnings:

CC board/ti/am57xx/board.o
../board/ti/am57xx/board.c:448:27: warning: 'usb_otg_ss1' defined but not used [-Wunused-variable]

 static struct dwc3_device usb_otg_ss1 = {
                           ^
../board/ti/am57xx/board.c:455:32: warning: 'usb_otg_ss1_glue' defined but not used [-Wunused-variable]
 static struct dwc3_omap_device usb_otg_ss1_glue = {
                                ^
Quoted 6 lines

../board/ti/am57xx/board.c:461:33: warning: 'usb_phy1_device' defined but not used [-Wunused-variable]
static struct ti_usb_phy_device usb_phy1_device = {

Fix it by getting rid of USB1 related structures from board.c. They can be added back if there is a need for them.

Thanks and regards,
Lokesh

Quoted 38 lines
---
 board/ti/am57xx/board.c | 20 --------------------
 1 file changed, 20 deletions(-)
board/ti/am57xx/board.c +0 -20
index 927d1364fe46..288ff346e0ca 100644
@@ -445,26 +445,6 @@ int spl_start_uboot(void)
 #endif
 
 #ifdef CONFIG_USB_DWC3
-static struct dwc3_device usb_otg_ss1 = {
-	.maximum_speed = USB_SPEED_SUPER,
-	.base = DRA7_USB_OTG_SS1_BASE,
-	.tx_fifo_resize = false,
-	.index = 0,
-};
-
-static struct dwc3_omap_device usb_otg_ss1_glue = {
-	.base = (void *)DRA7_USB_OTG_SS1_GLUE_BASE,
-	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
-	.index = 0,
-};
-
-static struct ti_usb_phy_device usb_phy1_device = {
-	.pll_ctrl_base = (void *)DRA7_USB3_PHY1_PLL_CTRL,
-	.usb2_phy_power = (void *)DRA7_USB2_PHY1_POWER,
-	.usb3_phy_power = (void *)DRA7_USB3_PHY1_POWER,
-	.index = 0,
-};
-
 static struct dwc3_device usb_otg_ss2 = {
 	.maximum_speed = USB_SPEED_HIGH,
 	.base = DRA7_USB_OTG_SS2_BASE,
#5 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

In reply to Sekhar Nori

AM57xx GP EVM has USB2 port of the SoC exposed as USB client port.

It is useful to be able to use this port for USB DFU downloads.

Enable USB DFU support. Tested on AM57x GP EVM Rev A3 using DFU to download to connected SD card, on board eMMC and to the RAM.

Also tested to make sure connected mass storage device to USB1 (host) port continues to get enumerated.

configs for HS version of the AM57x EVM are included in the patch but not really tested.

---
 configs/am57xx_evm_defconfig    | 10 +++++++++
 configs/am57xx_hs_evm_defconfig | 10 +++++++++
 include/configs/am57xx_evm.h    | 46 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
configs/am57xx_evm_defconfig +10 -0
index c95f45aca8b5..698c489552df 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -36,6 +37,15 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=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_PHY_OMAP=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
+CONFIG_G_DNL_VENDOR_NUM=0x0451
+CONFIG_G_DNL_PRODUCT_NUM=0xd022
 CONFIG_FIT=y
 CONFIG_SPL_OF_LIBFDT=y
 CONFIG_SPL_LOAD_FIT=y
configs/am57xx_hs_evm_defconfig +10 -0
index a4bfdd594e26..a7288bce51b8 100644
@@ -18,6 +18,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -37,6 +38,15 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=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_PHY_OMAP=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
+CONFIG_G_DNL_VENDOR_NUM=0x0451
+CONFIG_G_DNL_PRODUCT_NUM=0xd022
 CONFIG_FIT=y
 CONFIG_SPL_OF_LIBFDT=y
 CONFIG_SPL_LOAD_FIT=y
include/configs/am57xx_evm.h +46 -0

58 lines not on this page · raw message

Signature · 1 line
2.9.0
#6 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

[..snip..]

Quoted 39 lines
include/configs/am57xx_evm.h +31 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \

include/configs/am57xx_evm.h line 84

Quoted 10 lines
include/configs/am57xx_evm.h +10 -0
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Thanks and regards,
Lokesh

#7 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 45 lines · Lokesh Vutla

[..snip..]

Quoted 43 lines
include/configs/am57xx_evm.h +35 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
Quoted 8 lines

include/configs/am57xx_evm.h line 84

Quoted 6 lines
include/configs/am57xx_evm.h +6 -0
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Any reason why these cannot be moved to ti_omap5_common.h?

Thanks and regards,
Lokesh

Quoted 4 lines

Thanks and regards,
Lokesh

#8 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Hi Lokesh,

Quoted 57 lines · Lokesh Vutla
Quoted 45 lines · Lokesh Vutla

[..snip..]

Quoted 43 lines
include/configs/am57xx_evm.h +35 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
Quoted 8 lines

include/configs/am57xx_evm.h line 84

Quoted 6 lines
include/configs/am57xx_evm.h +6 -0
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Quoted 1 line

Any reason why these cannot be moved to ti_omap5_common.h?

it was NAK'ed before.
http://lists.denx.de/pipermail/u-boot/2015-August/224635.html

Thanks
Kishon

#9 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

In reply to Lokesh Vutla
Quoted 57 lines · Lokesh Vutla
Quoted 45 lines · Lokesh Vutla

[..snip..]

Quoted 43 lines
include/configs/am57xx_evm.h +35 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
Quoted 8 lines

include/configs/am57xx_evm.h line 84

Quoted 6 lines
include/configs/am57xx_evm.h +6 -0
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Quoted 1 line

Any reason why these cannot be moved to ti_omap5_common.h?

No reason, I guess, just that its being done per platform today.

If we are going to make it common, why not a step further and move it to ti_armv7_common.h so that similar looking defines from am335x_evm.h and am43xx_evm.h can be eliminated as well? Or do you see any reason why am335x and am437x need to be kept different.

Thanks,
Sekhar

#10 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 58 lines · Sekhar Nori
Quoted 57 lines · Lokesh Vutla
Quoted 53 lines · Lokesh Vutla

[..snip..]

Quoted 39 lines
include/configs/am57xx_evm.h +31 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \

include/configs/am57xx_evm.h line 84

Quoted 10 lines
include/configs/am57xx_evm.h +10 -0
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Quoted 3 lines
Quoted 1 line

Any reason why these cannot be moved to ti_omap5_common.h?

No reason, I guess, just that its being done per platform today.

As Kishon mentioned on the other thread, Tom objected to this idea saying this is dependent on board.

Quoted 5 lines

If we are going to make it common, why not a step further and move it to ti_armv7_common.h so that similar looking defines from am335x_evm.h and am43xx_evm.h can be eliminated as well? Or do you see any reason why am335x and am437x need to be kept different.

Well, I do agree it is board dependent, but most of the OMAP based TI platforms follow the same convention regarding DFU args. (keystone has a bit different). So, I would suggest to move it to ti_armv7_omap.h. Tom, are you ok with this?

Thanks and regards,
Lokesh

Quoted 4 lines

Thanks,
Sekhar

#11 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 74 lines · Lokesh Vutla
Quoted 58 lines · Sekhar Nori
Quoted 57 lines · Lokesh Vutla
Quoted 53 lines · Lokesh Vutla

[..snip..]

Quoted 39 lines
include/configs/am57xx_evm.h +31 -0
index 46e8d4cfd715..3d5ae1ae1d54 100644
@@ -41,6 +41,47 @@
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"rawemmc raw 0 3751936;" \
+	"boot part 1 1;" \
+	"rootfs part 1 2;" \
+	"MLO fat 1 1;" \
+	"MLO.raw raw 0x100 0x100;" \
+	"u-boot.img.raw raw 0x300 0x400;" \
+	"spl-os-args.raw raw 0x80 0x80;" \
+	"spl-os-image.raw raw 0x900 0x2000;" \
+	"spl-os-args fat 1 1;" \
+	"spl-os-image fat 1 1;" \
+	"u-boot.img fat 1 1;" \
+	"uEnv.txt fat 1 1\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \

include/configs/am57xx_evm.h line 84

Quoted 10 lines
include/configs/am57xx_evm.h +10 -0
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM \
+

Can you also add DFU_ALT_INFO_QSPI as am57xx-idk has QSPI.

Quoted 3 lines
Quoted 1 line

Any reason why these cannot be moved to ti_omap5_common.h?

No reason, I guess, just that its being done per platform today.

As Kishon mentioned on the other thread, Tom objected to this idea saying this is dependent on board.

Quoted 5 lines

If we are going to make it common, why not a step further and move it to ti_armv7_common.h so that similar looking defines from am335x_evm.h and am43xx_evm.h can be eliminated as well? Or do you see any reason why am335x and am437x need to be kept different.

Quoted 4 lines

Well, I do agree it is board dependent, but most of the OMAP based TI platforms follow the same convention regarding DFU args. (keystone has a bit different). So, I would suggest to move it to ti_armv7_omap.h. Tom, are you ok with this?

This is another example of needing to find a place and a way to put vendor specific stuff somewhere. Along with needing to figure out how to move environment stuff out of include/configs/ if we can. The half idea I'm toying with right now is include/environment/.... and making various fragments be included in env_default.h.

I suppose to start with, we could move the TI-as-vendor-suggested DFU args there, once we have board/ti/Kconfig for the other TI-as-vendor-suggested stuff :)

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

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Hi Tom,

Quoted 9 lines · Tom Rini

This is another example of needing to find a place and a way to put vendor specific stuff somewhere. Along with needing to figure out how to move environment stuff out of include/configs/ if we can. The half idea I'm toying with right now is include/environment/.... and making various fragments be included in env_default.h.

I suppose to start with, we could move the TI-as-vendor-suggested DFU args there, once we have board/ti/Kconfig for the other TI-as-vendor-suggested stuff :)

To be clear, you are asking for a new file "include/environment/ti/omap.h" to be created and DFU args for TI's OMAP-style platforms consolidated there in v2 of this patch series. Right?

Regards,
Sekhar

#13 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 9 lines · Sekhar Nori

Hi Tom,

Quoted 6 lines · Tom Rini

This is another example of needing to find a place and a way to put vendor specific stuff somewhere. Along with needing to figure out how to move environment stuff out of include/configs/ if we can. The half idea I'm toying with right now is include/environment/.... and making various fragments be included in env_default.h.

Quoted 7 lines
Quoted 3 lines

I suppose to start with, we could move the TI-as-vendor-suggested DFU args there, once we have board/ti/Kconfig for the other TI-as-vendor-suggested stuff :)

To be clear, you are asking for a new file "include/environment/ti/omap.h" to be created and DFU args for TI's OMAP-style platforms consolidated there in v2 of this patch series. Right?

Something inside of include/environment/ should be created, yes. For the exact name(s), I think a re-read of all of the environment bits in include/configs/ti_* needs to be taken into consideration too, and the possibly used combinations there-of. My first thought is that you'd want a dfu.h for the DFU related parts. And something-else.h for other things and so forth.

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

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 18 lines · Tom Rini
Quoted 9 lines · Sekhar Nori

Hi Tom,

Quoted 6 lines · Tom Rini

This is another example of needing to find a place and a way to put vendor specific stuff somewhere. Along with needing to figure out how to move environment stuff out of include/configs/ if we can. The half idea I'm toying with right now is include/environment/.... and making various fragments be included in env_default.h.

Quoted 7 lines
Quoted 3 lines

I suppose to start with, we could move the TI-as-vendor-suggested DFU args there, once we have board/ti/Kconfig for the other TI-as-vendor-suggested stuff :)

To be clear, you are asking for a new file "include/environment/ti/omap.h" to be created and DFU args for TI's OMAP-style platforms consolidated there in v2 of this patch series. Right?

Quoted 6 lines

Something inside of include/environment/ should be created, yes. For the exact name(s), I think a re-read of all of the environment bits in include/configs/ti_* needs to be taken into consideration too, and the possibly used combinations there-of. My first thought is that you'd want a dfu.h for the DFU related parts. And something-else.h for other things and so forth.

Alright, I will start with dfu.h, and I guess over time we can move over rest of the environment bits?

Thanks,
Sekhar

#15 lore raw

PATCH 3/3 ARM: am57xx_evm: enable DFU support

Quoted 26 lines · Sekhar Nori
Quoted 18 lines · Tom Rini
Quoted 9 lines · Sekhar Nori

Hi Tom,

Quoted 6 lines · Tom Rini

This is another example of needing to find a place and a way to put vendor specific stuff somewhere. Along with needing to figure out how to move environment stuff out of include/configs/ if we can. The half idea I'm toying with right now is include/environment/.... and making various fragments be included in env_default.h.

Quoted 7 lines
Quoted 3 lines

I suppose to start with, we could move the TI-as-vendor-suggested DFU args there, once we have board/ti/Kconfig for the other TI-as-vendor-suggested stuff :)

To be clear, you are asking for a new file "include/environment/ti/omap.h" to be created and DFU args for TI's OMAP-style platforms consolidated there in v2 of this patch series. Right?

Quoted 6 lines

Something inside of include/environment/ should be created, yes. For the exact name(s), I think a re-read of all of the environment bits in include/configs/ti_* needs to be taken into consideration too, and the possibly used combinations there-of. My first thought is that you'd want a dfu.h for the DFU related parts. And something-else.h for other things and so forth.

Quoted 2 lines

Alright, I will start with dfu.h, and I guess over time we can move over rest of the environment bits?

Yeah, we don't have to do all of the environment stuff at first, but it does need to be moved as that's kind of the final blocker to 100% Kconfig migration, long term :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160830/9566fc04/attachment.sig>