From 9192b13bc88df9c0635d162c543f89efac66b188 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 20 Aug 2023 18:24:45 +0200 Subject: board: stm32f746-disco: refactor the display of the ST logo The patch removes the legacy mode of displaying the ST logo and adopts the approach introduced by the commit 284b08fb51b6 ("board: stm32mp1: add splash screen with stmicroelectronics logo"). It was necessary to use a specific logo for the stm32f746-disco board. Furthermore, the previous version didn't properly center the logo, hiding its upper part. Signed-off-by: Dario Binacchi Reviewed-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/configs/stm32f746-disco.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/configs') 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 #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) -- cgit v1.3.1 From 2ea4f9748185e99b8fbbee1836063ffa4755333e Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 2 Oct 2023 17:52:33 +0200 Subject: ARM: stm32: Rename update_sf to dh_update_sd_to_sf on STM32MP15xx DHCOR Align the script name with DH i.MX8MP DHCOM script name. Add backward compatibility script to avoid breaking user scripts. Signed-off-by: Marek Vasut Reviewed-by: Patrice Chotard --- include/configs/stm32mp15_dh_dhsom.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/configs') diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h index 91921690624..c7ebf5cd180 100644 --- a/include/configs/stm32mp15_dh_dhsom.h +++ b/include/configs/stm32mp15_dh_dhsom.h @@ -20,7 +20,7 @@ #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_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 +29,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 -- cgit v1.3.1 From dbfe77a56e8d12e0354e7d6435db607670fe2fc0 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 2 Oct 2023 17:52:34 +0200 Subject: ARM: stm32: Add dh_update_sd_to_emmc to STM32MP15xx DHCOR Add script which installs U-Boot binaries from SD card to eMMC and makes the eMMC bootable. Signed-off-by: Marek Vasut Reviewed-by: Patrice Chotard --- include/configs/stm32mp15_dh_dhsom.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/configs') diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h index c7ebf5cd180..8ff882264f4 100644 --- a/include/configs/stm32mp15_dh_dhsom.h +++ b/include/configs/stm32mp15_dh_dhsom.h @@ -20,6 +20,25 @@ #define STM32MP_BOARD_EXTRA_ENV \ "usb_pgood_delay=1000\0" \ + "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 && " \ -- cgit v1.3.1 From 3ac6cae9440c66fcc62472fc61aae1ae014864e6 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 26 Sep 2023 17:09:21 +0200 Subject: configs: stm32mp13: activate command stm32prog 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 Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- configs/stm32mp13_defconfig | 2 ++ include/configs/stm32mp13_common.h | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'include/configs') diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig index e50e28641b0..387dc6aac52 100644 --- a/configs/stm32mp13_defconfig +++ b/configs/stm32mp13_defconfig @@ -10,6 +10,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;" \ -- cgit v1.3.1 From 9cf125b1f82e77980bc70c5ca1f4cbf529f4272c Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 26 Sep 2023 17:09:22 +0200 Subject: configs: stm32mp13: add support of usb boot Add support of USB key boot in distro boot command. Signed-off-by: Patrick Delaunay Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- include/configs/stm32mp13_common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/stm32mp13_common.h b/include/configs/stm32mp13_common.h index d36fbf00548..5b0658ced92 100644 --- a/include/configs/stm32mp13_common.h +++ b/include/configs/stm32mp13_common.h @@ -35,9 +35,16 @@ #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: -- cgit v1.3.1