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 <trini@konsulko.com>
This commit is contained in:
Tom Rini
2023-10-04 10:49:30 -04:00
53 changed files with 1534 additions and 3837 deletions

View File

@@ -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)

View File

@@ -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;" \

View File

@@ -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>

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2018 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-or-later or BSD-3-Clause */
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2020 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.

View File

@@ -64,6 +64,7 @@
#define STM32F7_RCC_APB1_TIM14 8
#define STM32F7_RCC_APB1_LPTIM1 9
#define STM32F7_RCC_APB1_WWDG 11
#define STM32F7_RCC_APB1_CAN3 13
#define STM32F7_RCC_APB1_SPI2 14
#define STM32F7_RCC_APB1_SPI3 15
#define STM32F7_RCC_APB1_SPDIFRX 16

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
/*
* Copyright (C) 2022, STMicroelectronics - All Rights Reserved
*/
#ifndef __DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H
#define __DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H
/* SCMI voltage domains identifiers */
/* SOC Internal regulators */
#define VOLTD_SCMI_REG11 0
#define VOLTD_SCMI_REG18 1
#define VOLTD_SCMI_USB33 2
#define VOLTD_SCMI_SDMMC1_IO 3
#define VOLTD_SCMI_SDMMC2_IO 4
#define VOLTD_SCMI_VREFBUF 5
/* STPMIC1 regulators */
#define VOLTD_SCMI_STPMIC1_BUCK1 6
#define VOLTD_SCMI_STPMIC1_BUCK2 7
#define VOLTD_SCMI_STPMIC1_BUCK3 8
#define VOLTD_SCMI_STPMIC1_BUCK4 9
#define VOLTD_SCMI_STPMIC1_LDO1 10
#define VOLTD_SCMI_STPMIC1_LDO2 11
#define VOLTD_SCMI_STPMIC1_LDO3 12
#define VOLTD_SCMI_STPMIC1_LDO4 13
#define VOLTD_SCMI_STPMIC1_LDO5 14
#define VOLTD_SCMI_STPMIC1_LDO6 15
#define VOLTD_SCMI_STPMIC1_VREFDDR 16
#define VOLTD_SCMI_STPMIC1_BOOST 17
#define VOLTD_SCMI_STPMIC1_PWR_SW1 18
#define VOLTD_SCMI_STPMIC1_PWR_SW2 19
/* External regulators */
#define VOLTD_SCMI_REGU0 20
#define VOLTD_SCMI_REGU1 21
#define VOLTD_SCMI_REGU2 22
#define VOLTD_SCMI_REGU3 23
#define VOLTD_SCMI_REGU4 24
#endif /*__DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H */

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2018 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-or-later or BSD-3-Clause */
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2018 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.

File diff suppressed because it is too large Load Diff