diff mbox series

[v1,4/6] configs: stm32mp13: activate command stm32prog

Message ID 20230926150924.1150082-5-patrice.chotard@foss.st.com
State Accepted
Commit 3ac6cae9440c66fcc62472fc61aae1ae014864e6
Delegated to: Patrick Delaunay
Headers show
Series stm32mp: DT and config update | expand

Commit Message

Patrice CHOTARD Sept. 26, 2023, 3:09 p.m. UTC
From: Patrick Delaunay <patrick.delaunay@foss.st.com>

Activate the command stm32prog with CONFIG_CMD_STM32MPROG.
The CONFIG_SET_DFU_ALT_INFO is also activated to support
the required weak functions for the DFU virtual backen defined in
board/st/common/stm32mp_dfu.c.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

 configs/stm32mp13_defconfig        | 2 ++
 include/configs/stm32mp13_common.h | 4 ++++
 2 files changed, 6 insertions(+)

Comments

Patrick Delaunay Oct. 4, 2023, 9:56 a.m. UTC | #1
Hi,

On 9/26/23 17:09, Patrice Chotard wrote:
> From: Patrick Delaunay <patrick.delaunay@foss.st.com>
>
> Activate the command stm32prog with CONFIG_CMD_STM32MPROG.
> The CONFIG_SET_DFU_ALT_INFO is also activated to support
> the required weak functions for the DFU virtual backen defined in
> board/st/common/stm32mp_dfu.c.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
>   configs/stm32mp13_defconfig        | 2 ++
>   include/configs/stm32mp13_common.h | 4 ++++
>   2 files changed, 6 insertions(+)
>


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Patrice CHOTARD Oct. 4, 2023, 11:39 a.m. UTC | #2
On 10/4/23 11:56, Patrick DELAUNAY wrote:
> Hi,
> 
> On 9/26/23 17:09, Patrice Chotard wrote:
>> From: Patrick Delaunay <patrick.delaunay@foss.st.com>
>>
>> Activate the command stm32prog with CONFIG_CMD_STM32MPROG.
>> The CONFIG_SET_DFU_ALT_INFO is also activated to support
>> the required weak functions for the DFU virtual backen defined in
>> board/st/common/stm32mp_dfu.c.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>> ---
>>
>>   configs/stm32mp13_defconfig        | 2 ++
>>   include/configs/stm32mp13_common.h | 4 ++++
>>   2 files changed, 6 insertions(+)
>>
> 
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> 
> Thanks
> Patrick
> 
> 
> 
> 
Apply on stm32/next

Thanks
Patrice
diff mbox series

Patch

diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
index f962d0eab97..2d87792a9cb 100644
--- a/configs/stm32mp13_defconfig
+++ b/configs/stm32mp13_defconfig
@@ -11,6 +11,7 @@  CONFIG_DDR_CACHEABLE_SIZE=0x8000000
 CONFIG_CMD_STM32KEY=y
 CONFIG_TARGET_ST_STM32MP13x=y
 CONFIG_ENV_OFFSET_REDUND=0x940000
+CONFIG_CMD_STM32PROG=y
 # CONFIG_ARMV7_NONSEC is not set
 CONFIG_SYS_LOAD_ADDR=0xc2000000
 CONFIG_SYS_MEMTEST_START=0xc0000000
@@ -51,6 +52,7 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=-1
 CONFIG_ENV_MMC_USE_DT=y
 CONFIG_CLK_SCMI=y
+CONFIG_SET_DFU_ALT_INFO=y
 CONFIG_GPIO_HOG=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_STM32F7=y
diff --git a/include/configs/stm32mp13_common.h b/include/configs/stm32mp13_common.h
index 7c59c69e0bd..d36fbf00548 100644
--- a/include/configs/stm32mp13_common.h
+++ b/include/configs/stm32mp13_common.h
@@ -41,10 +41,14 @@ 
 
 /*
  * default bootcmd for stm32mp13:
+ * for serial/usb: execute the stm32prog command
  * for mmc boot (eMMC, SD card), distro boot on the same mmc device
  */
 #define STM32MP_BOOTCMD "bootcmd_stm32mp=" \
 	"echo \"Boot over ${boot_device}${boot_instance}!\";" \
+	"if test ${boot_device} = serial || test ${boot_device} = usb;" \
+	"then stm32prog ${boot_device} ${boot_instance}; " \
+	"else " \
 		"run env_check;" \
 		"if test ${boot_device} = mmc;" \
 		"then env set boot_targets \"mmc${boot_instance}\"; fi;" \