summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-10-04 10:49:30 -0400
committerTom Rini <[email protected]>2023-10-04 10:49:30 -0400
commitb83e2858667dfaf2fb67331d0f45a2c39179ef91 (patch)
tree36046c483cf01bc35ae38ae474b57c985ead6b44 /include/configs
parent65b9b3462bec2966911658836983819ab4e4823e (diff)
parent6d91f0a3a14dd13a04946e672a4640fc65e4d275 (diff)
Merge tag 'u-boot-stm32-20231004' of https://source.denx.de/u-boot/custodians/u-boot-stm
STM32 MCU: _ alignment with kernel DT v6.5 for stm32f429 and stm32f746 _ rework way of displaying ST logo for stm32f746-disco and stm32f769-disco STM32 MPU: _ alignment with kernel DT v6.6-rc1 _ add RNG support for stm32mp13 _ add USB, USB boot and stm32prog command support for stm32mp13 _ add support of USART1 clock for stm32mp1 _ only print RAM and board code with SPL_DISPLAY_PRINT flag for stm32mp1 _ rename update_sf to dh_update_sd_to_sf and add dh_update_sd_to_emmc for stm32mp15xx DHCOR [ Fix merge conflict at board/st/common/stm32mp_dfu.c ] Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/stm32f746-disco.h7
-rw-r--r--include/configs/stm32mp13_common.h13
-rw-r--r--include/configs/stm32mp15_dh_dhsom.h25
3 files changed, 41 insertions, 4 deletions
diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
index 9bf01cac47a..00ec9efba57 100644
--- a/include/configs/stm32f746-disco.h
+++ b/include/configs/stm32f746-disco.h
@@ -23,6 +23,10 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0)
+#define STM32F746_BOARD_EXTRA_ENV \
+ "splashimage=0xC0448000\0" \
+ "splashpos=m,m\0"
+
#include <config_distro_bootcmd.h>
#define CFG_EXTRA_ENV_SETTINGS \
"kernel_addr_r=0xC0008000\0" \
@@ -31,7 +35,8 @@
"scriptaddr=0xC0418000\0" \
"pxefile_addr_r=0xC0428000\0" \
"ramdisk_addr_r=0xC0438000\0" \
- BOOTENV
+ BOOTENV \
+ STM32F746_BOARD_EXTRA_ENV
#define CFG_SYS_UBOOT_BASE (CFG_SYS_FLASH_BASE + \
CONFIG_SPL_PAD_TO)
diff --git a/include/configs/stm32mp13_common.h b/include/configs/stm32mp13_common.h
index 7c59c69e0bd..5b0658ced92 100644
--- a/include/configs/stm32mp13_common.h
+++ b/include/configs/stm32mp13_common.h
@@ -35,16 +35,27 @@
#define BOOT_TARGET_MMC1(func)
#endif
+#ifdef CONFIG_CMD_USB
+#define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_USB(func)
+#endif
+
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC1(func) \
- BOOT_TARGET_MMC0(func)
+ BOOT_TARGET_MMC0(func) \
+ BOOT_TARGET_USB(func)
/*
* 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;" \
diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
index 91921690624..8ff882264f4 100644
--- a/include/configs/stm32mp15_dh_dhsom.h
+++ b/include/configs/stm32mp15_dh_dhsom.h
@@ -20,7 +20,26 @@
#define STM32MP_BOARD_EXTRA_ENV \
"usb_pgood_delay=1000\0" \
- "update_sf=" /* Erase SPI NOR and install U-Boot from SD */ \
+ "dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */ \
+ "setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \
+ "load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && " \
+ "setexpr sblkcnt ${filesize} + 0x1ff && " \
+ "setexpr sblkcnt ${sblkcnt} / 0x200 && " \
+ "load mmc 0:4 ${loadaddr} boot/u-boot.itb && " \
+ "setexpr ublkcnt ${filesize} + 0x1ff && " \
+ "setexpr ublkcnt ${ublkcnt} / 0x200 && " \
+ "mmc partconf 1 1 1 1 && mmc dev 1 1 && " \
+ "mmc write ${loadaddr1} 0 ${sblkcnt} && " \
+ "mmc dev 1 2 && " \
+ "mmc write ${loadaddr1} 0 ${sblkcnt} && " \
+ "mmc dev 1 && " \
+ "gpt write mmc 1 'name=ssbl,size=2MiB' && " \
+ "mmc write ${loadaddr} 0x22 ${ublkcnt} && " \
+ "mmc partconf 1 1 1 0 && " \
+ "setenv loadaddr1 && " \
+ "setenv sblkcnt && " \
+ "setenv ublkcnt\0" \
+ "dh_update_sd_to_sf=" /* Erase SPI NOR and install U-Boot from SD */ \
"setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \
"load mmc 0:4 ${loadaddr1} /boot/u-boot-spl.stm32 && " \
"env set filesize1 ${filesize} && " \
@@ -29,7 +48,9 @@
"sf update ${loadaddr1} 0 ${filesize1} && " \
"sf update ${loadaddr1} 0x40000 ${filesize1} && " \
"sf update ${loadaddr} 0x80000 ${filesize} && " \
- "env set filesize1 && env set loadaddr1\0"
+ "env set filesize1 && env set loadaddr1\0" \
+ "update_sf=run dh_update_sd_to_sf\0"
+
#include <configs/stm32mp15_common.h>