Skip to contentSkip to conversation

ARM: stm32: Default dfu_alt_info for STM32MP13xx SPI NOR

PATCH In review Marek Vasut 2 participants 4 messages Mar 19, 2024 – Mar 27, 2024 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: stm32: Default dfu_alt_info for STM32MP13xx SPI NOR

Define dfu_alt_info with SPI NOR layout to make it easy to install or update bootloader in the SPI NOR using dfu-util.

Use the following U-Boot commands to start DFU mode:
"
=> sf probe && dfu 0 mtd
"

Use the following dfu-util invocation on Host PC to install binaries:
"

$ dfu-util -w -a 0 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 1 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 2 -D build/stm32mp1/release/fip.bin
"

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 include/configs/stm32mp13_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/stm32mp13_common.h +1 -0
index 5b0658ced92..d6e4f8fd915 100644
@@ -63,6 +63,7 @@
 	"fi;\0"
 
 #define STM32MP_EXTRA \
+	"dfu_alt_info=mtd nor0=fsbl1 raw 0x0 0x40000;fsbl2 raw 0x40000 0x40000;uboot raw 0x80000 0x160000\0" \
 	"env_check=if env info -p -d -q; then env save; fi\0" \
 	"boot_net_usb_start=true\0"
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 32 lines · Marek Vasut

Define dfu_alt_info with SPI NOR layout to make it easy to install or update bootloader in the SPI NOR using dfu-util.

Use the following U-Boot commands to start DFU mode:
"
=> sf probe && dfu 0 mtd
"

Use the following dfu-util invocation on Host PC to install binaries:
"

$ dfu-util -w -a 0 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 1 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 2 -D build/stm32mp1/release/fip.bin
"

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 include/configs/stm32mp13_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/stm32mp13_common.h +0 -0
index 5b0658ced92..d6e4f8fd915 100644

include/configs/stm32mp13_common.h line 69

Quoted 7 lines
include/configs/stm32mp13_common.h +1 -0
@@ -63,6 +63,7 @@
 	"fi;\0"
 
 #define STM32MP_EXTRA \
+	"dfu_alt_info=mtd nor0=fsbl1 raw 0x0 0x40000;fsbl2 raw 0x40000 0x40000;uboot raw 0x80000 0x160000\0" \
 	"env_check=if env info -p -d -q; then env save; fi\0" \
 	"boot_net_usb_start=true\0"
 

Hi Marek

On our STM32 board, the dfu_alt_info is build dynamically, we have CONFIG_SET_DFU_ALT_INFO enable Can you add the dfu_alt_info in a specific stm32mp13_dhxx.common.h instead ?

Thanks
Patrice

#2 lore raw
Quoted 46 lines · Patrice CHOTARD
Quoted 32 lines · Marek Vasut

Define dfu_alt_info with SPI NOR layout to make it easy to install or update bootloader in the SPI NOR using dfu-util.

Use the following U-Boot commands to start DFU mode:
"
=> sf probe && dfu 0 mtd
"

Use the following dfu-util invocation on Host PC to install binaries:
"

$ dfu-util -w -a 0 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 1 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 2 -D build/stm32mp1/release/fip.bin
"

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
  include/configs/stm32mp13_common.h | 1 +
  1 file changed, 1 insertion(+)
include/configs/stm32mp13_common.h +0 -0
index 5b0658ced92..d6e4f8fd915 100644

include/configs/stm32mp13_common.h line 69

Quoted 7 lines
include/configs/stm32mp13_common.h +1 -0
@@ -63,6 +63,7 @@
  	"fi;\0"
 
  #define STM32MP_EXTRA \
+	"dfu_alt_info=mtd nor0=fsbl1 raw 0x0 0x40000;fsbl2 raw 0x40000 0x40000;uboot raw 0x80000 0x160000\0" \
  	"env_check=if env info -p -d -q; then env save; fi\0" \
  	"boot_net_usb_start=true\0"
 

Hi Marek

Quoted 2 lines

On our STM32 board, the dfu_alt_info is build dynamically, we have CONFIG_SET_DFU_ALT_INFO enable Can you add the dfu_alt_info in a specific stm32mp13_dhxx.common.h instead ?

You can drop this patch.

#3 lore raw
Quoted 46 lines · Marek Vasut
Quoted 45 lines · Patrice CHOTARD
Quoted 32 lines · Marek Vasut

Define dfu_alt_info with SPI NOR layout to make it easy to install or update bootloader in the SPI NOR using dfu-util.

Use the following U-Boot commands to start DFU mode:
"
=> sf probe && dfu 0 mtd
"

Use the following dfu-util invocation on Host PC to install binaries:
"

$ dfu-util -w -a 0 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 1 -D build/stm32mp1/release/tf-a-stm32mp135f-dhcor-dhsbc.stm32
$ dfu-util -w -a 2 -D build/stm32mp1/release/fip.bin
"

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
  include/configs/stm32mp13_common.h | 1 +

  1 file changed, 1 insertion(+)
include/configs/stm32mp13_common.h +0 -0
index 5b0658ced92..d6e4f8fd915 100644
@@ -63,6 +63,7 @@
Quoted 6 lines

      "fi;\0"
    #define STM32MP_EXTRA \
+    "dfu_alt_info=mtd nor0=fsbl1 raw 0x0 0x40000;fsbl2 raw 0x40000 0x40000;uboot raw 0x80000 0x160000\0" \
      "env_check=if env info -p -d -q; then env save; fi\0" \
      "boot_net_usb_start=true\0"

Hi Marek

Quoted 4 lines
Quoted 2 lines

On our STM32 board, the dfu_alt_info is build dynamically, we have CONFIG_SET_DFU_ALT_INFO enable Can you add the dfu_alt_info in a specific stm32mp13_dhxx.common.h instead ?

You can drop this patch.

Ok thanks

Patrice