U-BOOT-STM32MP: v2021.10-stm32mp-r2

Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
Change-Id: I4ddc6905fb1e21bfcb6f84a2b5d2dd4d7d95f26c
This commit is contained in:
Christophe Priouzeau 2022-06-16 16:46:16 +02:00 committed by bernard PUEL
parent 001cc2ef47
commit 5c3c6aa07a
9 changed files with 6053 additions and 48 deletions

View File

@ -47,7 +47,6 @@ FIP_UBOOT ?= "u-boot-nodtb"
FIP_UBOOT_SUFFIX ?= "bin"
FIP_UBOOT_DTB ?= "u-boot"
FIP_UBOOT_DTB_SUFFIX ?= "dtb"
FIP_UBOOT_CONFIG ?= "trusted"
# Configure default folder path for binaries to package
FIP_DEPLOYDIR_FIP ?= "${DEPLOYDIR}/fip"
@ -190,8 +189,8 @@ do_deploy:append:class-target() {
[ -f "${FIP_DEPLOYDIR_FWCONF}/${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX}" ] || bbfatal "Missing ${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX} file in folder: ${FIP_DEPLOYDIR_FWCONF}"
FIP_FWCONFIG="--fw-config ${FIP_DEPLOYDIR_FWCONF}/${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX}"
# Init FIP hw-config settings
[ -f "${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX} file in folder: ${FIP_DEPLOYDIR_UBOOT}"
FIP_HWCONFIG="--hw-config ${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX}"
[ -f "${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX} file in folder: ${FIP_DEPLOYDIR_UBOOT}"
FIP_HWCONFIG="--hw-config ${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX}"
# Init FIP nt-fw config
[ -f "${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX} file in folder: ${FIP_DEPLOYDIR_UBOOT}"
FIP_NTFW="--nt-fw ${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX}"
@ -392,8 +391,8 @@ for config in \$FIP_CONFIG; do
[ -f "\$FIP_DEPLOYDIR_FWCONF/\${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX}" ] || bbfatal "Missing \${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX} file in folder: \\\$FIP_DEPLOYDIR_FWCONF or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/fwconfig'"
FIP_FWCONFIG="--fw-config \$FIP_DEPLOYDIR_FWCONF/\${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX}"
# Init FIP hw-config settings
[ -f "\$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-\${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_UBOOT' or '\\\$FIP_DEPLOYDIR_ROOT/u-boot'"
FIP_HWCONFIG="--hw-config \$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}-${FIP_UBOOT_CONFIG}.${FIP_UBOOT_DTB_SUFFIX}"
[ -f "\$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_UBOOT' or '\\\$FIP_DEPLOYDIR_ROOT/u-boot'"
FIP_HWCONFIG="--hw-config \$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX}"
# Init FIP nt-fw config
[ -f "\$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_UBOOT' or '\\\$FIP_DEPLOYDIR_ROOT/u-boot'"
FIP_NTFW="--nt-fw \$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX}"

View File

@ -73,42 +73,42 @@ UBOOT_LOCALVERSION = ${UBOOT_LOCALVERSION}
define uboot-configs
echo " \$(1)" ; \\
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(1))), \\
echo " defconfig : \$(defconfig)" ; \
echo " for binary : \$(if \$(UBOOT_BINARY),\$(UBOOT_BINARY),\$(UBOOT_BINARY_\$(defconfig)))" ; \
echo " with devicetree: \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(defconfig)))" ; \
echo " defconfig : \$(defconfig)" ; \\
echo " for binary : \$(if \$(UBOOT_BINARY),\$(UBOOT_BINARY),\$(UBOOT_BINARY_\$(defconfig)))" ; \\
echo " with devicetree: \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(defconfig)))" ; \\
)
endef
# Configure U-Boot configure rules (configure-DEFCONFIG-CONFIG)
# Configure U-Boot configure rules (configure-DEFCONFIG)
define configure-rules
configure-\$(1)-\$(2): version
configure-\$(1):: version
@mkdir -p \$(BLD_PATH)/\$(1)
@echo \$(UBOOT_LOCALVERSION) > \$(BLD_PATH)/\$(1)/.scmversion
\$(MAKE) -C \$(SRC_PATH) O=\$(BLD_PATH)/\$(1) \$(1)
\$(MAKE) -C \$(SRC_PATH) O=\$(BLD_PATH)/\$(1) \$(1) || exit 1
endef
# Configure U-Boot make rules (uboot-DEFCONFIG-CONFIG)
# Configure U-Boot make rules (uboot-DEFCONFIG)
define uboot-rules
uboot-\$(1)-\$(2): configure-\$(1)-\$(2)
uboot-\$(1):: configure-\$(1)
@mkdir -p \$(DEPLOYDIR)
@\$(foreach dt, \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(1))), \\
\$(MAKE) -C \$(SRC_PATH) ${UBOOT_MAKE_TARGET} \\
O=\$(BLD_PATH)/\$(1) \\
DEVICE_TREE=\$(dt) \\
DEVICE_TREE_EXT=\$(dt).dtb ; \\
cp -f \$(BLD_PATH)/\$(1)/\$(3) \$(DEPLOYDIR)/u-boot-\$(dt)-\$(2).\$(shell echo \$(3) | cut -d'.' -f2) ; \\
DEVICE_TREE_EXT=\$(dt).dtb || exit 1 ; \\
cp -f \$(BLD_PATH)/\$(1)/\$(3) \$(DEPLOYDIR)/u-boot-\$(dt).\$(shell echo \$(3) | cut -d'.' -f2) || exit 1 ; \\
if [ -f \$(BLD_PATH)/\$(1)/\$(shell echo \$(3) | cut -d'.' -f1).stm32 ]; then \\
cp -f \$(BLD_PATH)/\$(1)/\$(shell echo \$(3) | cut -d'.' -f1).stm32 \$(DEPLOYDIR)/u-boot-\$(dt)-\$(2).stm32 ; \\
cp -f \$(BLD_PATH)/\$(1)/\$(shell echo \$(3) | cut -d'.' -f1).stm32 \$(DEPLOYDIR)/u-boot-\$(dt).stm32 ; \\
fi ; \\
if [ -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} ]; then \\
cp -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} \$(DEPLOYDIR)/${SPL_BINARYNAME}-\$(dt)-\$(2) ; \\
cp -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} \$(DEPLOYDIR)/${SPL_BINARYNAME}-\$(dt); \\
fi ; \\
)
endef
# Configure U-Boot deploy rules (deploy-DEFCONFIG-CONFIG)
# Configure U-Boot deploy rules (deploy-DEFCONFIG)
define deploy-rules
deploy-\$(1)-\$(2): uboot-\$(1)-\$(2)
deploy-\$(1):: uboot-\$(1)
@mkdir -p \$(DEPLOYDIR)
@mkdir -p \$(DEPLOYDIR)/debug
@\$(foreach dt, \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(1))), \\
@ -116,17 +116,17 @@ deploy-\$(1)-\$(2): uboot-\$(1)-\$(2)
cp -f \$(BLD_PATH)/\$(1)/u-boot-nodtb.bin \$(DEPLOYDIR)/u-boot-nodtb\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))).bin ; \\
fi ; \\
if [ -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} ]; then \\
cp -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} \$(DEPLOYDIR)/debug/u-boot\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),)))-\$(2).${UBOOT_ELF_SUFFIX} ; \\
cp -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} \$(DEPLOYDIR)/debug/u-boot\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))).${UBOOT_ELF_SUFFIX} ; \\
fi ; \\
if [ -f \$(BLD_PATH)/\$(1)/${SPL_ELF} ]; then \\
cp -f \$(BLD_PATH)/\$(1)/${SPL_ELF} \$(DEPLOYDIR)/debug/${SPL_ELF_NAME}\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),)))-\$(2) ; \\
cp -f \$(BLD_PATH)/\$(1)/${SPL_ELF} \$(DEPLOYDIR)/debug/${SPL_ELF_NAME}\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))); \\
fi ; \\
)
endef
# Configure overall deploy rules list
deploy-targets := \$(foreach config, \$(if \$(UBOOT_CONFIG),\$(UBOOT_CONFIG),\$(UBOOT_CONFIGS)), \\
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), deploy-\$(defconfig)-\$(config)) \\
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), deploy-\$(defconfig)) \\
)
# Set dependencies list for building all

View File

@ -21,6 +21,10 @@ SRC_URI += "\
file://0003-ARM-v2021.10-stm32mp-r1-MISC-DRIVERS.patch \
file://0004-ARM-v2021.10-stm32mp-r1-DEVICETREE.patch \
file://0005-ARM-v2021.10-stm32mp-r1-CONFIG.patch \
file://0006-ARM-v2021.10-stm32mp-r2-MACHINE.patch \
file://0007-ARM-v2021.10-stm32mp-r2-BOARD.patch \
file://0008-ARM-v2021.10-stm32mp-r2-MISC-DRIVERS.patch \
file://0009-ARM-v2021.10-stm32mp-r2-DEVICETREE.patch \
\
file://0099-Add-external-var-to-allow-build-of-new-devicetree-fi.patch \
"
@ -30,7 +34,7 @@ SRC_URI += "${@bb.utils.contains('ST_UBOOT_DEBUG_TRACE', '1', '', 'file://0098-s
U_BOOT_VERSION = "v2021.10"
U_BOOT_SUBVERSION = "stm32mp"
U_BOOT_RELEASE = "r1"
U_BOOT_RELEASE = "r2"
PV = "${U_BOOT_VERSION}-${U_BOOT_SUBVERSION}-${U_BOOT_RELEASE}"
@ -47,7 +51,7 @@ S = "${WORKDIR}/git"
BBCLASSEXTEND = "devupstream:target"
SRC_URI:class-devupstream = "git://github.com/STMicroelectronics/u-boot.git;protocol=https;branch=${ARCHIVER_ST_BRANCH}"
SRCREV:class-devupstream = "ef9715e76295f5f6aae49efdb51617b440b54deb"
SRCREV:class-devupstream = "3984366f6997c680b8c6ccc82d50e77a6e1cccf2"
# ---------------------------------
# Configure default preference to manage dynamic selection between tarball and github

View File

@ -175,14 +175,14 @@ do_compile:append() {
k=$(expr $k + 1);
if [ $k -eq $i ]; then
binarysuffix=$(echo ${binary} | cut -d'.' -f2)
install -m 644 ${B}/${config}/${binary} ${B}/${config}/u-boot-${devicetree}-${type_suffix}.${binarysuffix}
install -m 644 ${B}/${config}/${binary} ${B}/${config}/u-boot-${devicetree}.${binarysuffix}
fi
done
unset k
# As soon as SPL binary exists, copy it with specific binary_type name
# This allow to mix u-boot configuration, with and without SPL
if [ -f "${B}/${config}/${SPL_BINARY_STM32}" ]; then
install -m 644 ${B}/${config}/${SPL_BINARY_STM32} ${B}/${config}/${SPL_BINARYNAME}-${devicetree}-${type_suffix}
install -m 644 ${B}/${config}/${SPL_BINARY_STM32} ${B}/${config}/${SPL_BINARYNAME}-${devicetree}
fi
done
fi
@ -240,11 +240,11 @@ do_deploy:append() {
fi
fi
# Install u-boot binary
install -m 644 ${B}/${config}/u-boot-${devicetree}-${type_suffix}.${binarysuffix} ${DEPLOYDIR}${SUBFOLDER}/
install -m 644 ${B}/${config}/u-boot-${devicetree}.${binarysuffix} ${DEPLOYDIR}${SUBFOLDER}/
# As soon as SPL binary exists, install it
# This allow to mix u-boot configuration, with and without SPL
if [ -f "${B}/${config}/${SPL_BINARYNAME}-${devicetree}-${type_suffix}" ]; then
install -m 644 ${B}/${config}/${SPL_BINARYNAME}-${devicetree}-${type_suffix} ${DEPLOYDIR}${SUBFOLDER}/
if [ -f "${B}/${config}/${SPL_BINARYNAME}-${devicetree}" ]; then
install -m 644 ${B}/${config}/${SPL_BINARYNAME}-${devicetree} ${DEPLOYDIR}${SUBFOLDER}/
fi
# Init soc suffix
soc_suffix=""
@ -258,10 +258,10 @@ do_deploy:append() {
install -m 644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}${SUBFOLDER}/u-boot-nodtb${soc_suffix}.bin
fi
if [ -n "${UBOOT_ELF}" ]; then
install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}${SUBFOLDER}/debug/u-boot${soc_suffix}-${type_suffix}.${UBOOT_ELF_SUFFIX}
install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}${SUBFOLDER}/debug/u-boot${soc_suffix}.${UBOOT_ELF_SUFFIX}
fi
if [ -n "${SPL_ELF}" ] && [ -f "${B}/${config}/${SPL_ELF}" ]; then
install -m 644 ${B}/${config}/${SPL_ELF} ${DEPLOYDIR}${SUBFOLDER}/debug/${SPL_ELF_NAME}${soc_suffix}-${type_suffix}
install -m 644 ${B}/${config}/${SPL_ELF} ${DEPLOYDIR}${SUBFOLDER}/debug/${SPL_ELF_NAME}${soc_suffix}
fi
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then

View File

@ -0,0 +1,147 @@
From 0afeb764866b755d64728e58f279db3e10d8a328 Mon Sep 17 00:00:00 2001
From: Romuald JEANNE <romuald.jeanne@st.com>
Date: Wed, 19 Oct 2022 16:58:04 +0200
Subject: [PATCH 6/9] ARM v2021.10-stm32mp-r2 MACHINE
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
---
.../mach-stm32mp/cmd_stm32prog/stm32prog.c | 33 +++++++++++++------
.../mach-stm32mp/cmd_stm32prog/stm32prog.h | 5 +++
arch/arm/mach-stm32mp/include/mach/stm32.h | 1 -
.../arm/mach-stm32mp/include/mach/sys_proto.h | 2 +-
4 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index ce568b44dc2..f9b502c9375 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1091,7 +1091,6 @@ static int create_gpt_partitions(struct stm32prog_data *data)
if (!buf)
return -ENOMEM;
- puts("partitions : ");
/* initialize the selected device */
for (i = 0; i < data->dev_nb; i++) {
/* create gpt partition support only for full update on MMC */
@@ -1099,6 +1098,7 @@ static int create_gpt_partitions(struct stm32prog_data *data)
!data->dev[i].full_update)
continue;
+ printf("partitions on mmc%d: ", data->dev[i].dev_id);
offset = 0;
rootfs_found = false;
memset(buf, 0, buflen);
@@ -1198,8 +1198,8 @@ static int create_gpt_partitions(struct stm32prog_data *data)
sprintf(buf, "part list mmc %d", data->dev[i].dev_id);
run_command(buf, 0);
#endif
+ puts("done\n");
}
- puts("done\n");
#ifdef DEBUG
run_command("mtd list", 0);
@@ -1343,10 +1343,22 @@ static int dfu_init_entities(struct stm32prog_data *data)
struct stm32prog_part_t *part;
struct dfu_entity *dfu;
int alt_nb;
+ u32 otp_size = 0;
alt_nb = 1; /* number of virtual = CMD*/
- if (IS_ENABLED(CONFIG_CMD_STM32PROG_OTP))
- alt_nb++; /* OTP*/
+
+ if (IS_ENABLED(CONFIG_CMD_STM32PROG_OTP)) {
+ /* OTP_SIZE_SMC = 0 if SMC is not supported */
+ otp_size = OTP_SIZE_SMC;
+ /* check if PTA BSEC is supported */
+ ret = optee_ta_open(data);
+ log_debug("optee_ta_open(PTA_NVMEM) result %d\n", ret);
+ if (!ret && data->tee)
+ otp_size = OTP_SIZE_TA;
+ if (otp_size)
+ alt_nb++; /* OTP*/
+ }
+
if (CONFIG_IS_ENABLED(DM_PMIC))
alt_nb++; /* PMIC NVMEM*/
@@ -1364,6 +1376,7 @@ static int dfu_init_entities(struct stm32prog_data *data)
puts("DFU alt info setting: ");
if (data->part_nb) {
alt_id = 0;
+ ret = 0;
for (phase = 1;
(phase <= PHASE_LAST_USER) &&
(alt_id < alt_nb) && !ret;
@@ -1397,12 +1410,8 @@ static int dfu_init_entities(struct stm32prog_data *data)
if (!ret)
ret = stm32prog_alt_add_virt(dfu, "virtual", PHASE_CMD, CMD_SIZE);
- if (!ret && IS_ENABLED(CONFIG_CMD_STM32PROG_OTP)) {
- ret = optee_ta_open(data);
- log_debug("optee_ta result %d\n", ret);
- ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP,
- data->tee ? OTP_SIZE_TA : OTP_SIZE_SMC);
- }
+ if (!ret && IS_ENABLED(CONFIG_CMD_STM32PROG_OTP) && otp_size)
+ ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, otp_size);
if (!ret && CONFIG_IS_ENABLED(DM_PMIC))
ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, PMIC_SIZE);
@@ -1885,6 +1894,10 @@ static void stm32prog_devices_init(struct stm32prog_data *data)
if (ret)
goto error;
+ /* empty flashlayout */
+ if (!data->dev_nb)
+ return;
+
/* initialize the selected device */
for (i = 0; i < data->dev_nb; i++) {
ret = init_device(data, &data->dev[i]);
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index ac300768ca0..0cda487ddd5 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -20,7 +20,12 @@
#define DEFAULT_ADDRESS 0xFFFFFFFF
#define CMD_SIZE 512
+/* SMC is only supported in SPMIN for STM32MP15x */
+#ifdef CONFIG_STM32MP15x
#define OTP_SIZE_SMC 1024
+#else
+#define OTP_SIZE_SMC 0
+#endif
#define OTP_SIZE_TA 776
#define PMIC_SIZE 8
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
index 62acd76c013..fc456ff8e80 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
@@ -134,7 +134,6 @@ enum boot_device {
#define TAMP_BOOT_DEVICE_MASK GENMASK(7, 4)
#define TAMP_BOOT_INSTANCE_MASK GENMASK(3, 0)
#define TAMP_BOOT_FORCED_MASK GENMASK(7, 0)
-#define TAMP_BOOT_DEBUG_ON BIT(16)
enum forced_boot_mode {
BOOT_NORMAL = 0x00,
diff --git a/arch/arm/mach-stm32mp/include/mach/sys_proto.h b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
index 02debea5469..f19a70e53e0 100644
--- a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
+++ b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
@@ -41,7 +41,7 @@ u32 get_cpu_dev(void);
#define CPU_REV1 0x1000
#define CPU_REV1_1 0x1001
-#define CPU_REV1_2 0x1002
+#define CPU_REV1_2 0x1003
#define CPU_REV2 0x2000
#define CPU_REV2_1 0x2001
--
2.17.1

View File

@ -0,0 +1,91 @@
From ea95370bf05dcc38e0b1df21a172840c232d4b21 Mon Sep 17 00:00:00 2001
From: Romuald JEANNE <romuald.jeanne@st.com>
Date: Thu, 3 Nov 2022 11:14:30 +0100
Subject: [PATCH 7/9] ARM v2021.10-stm32mp-r2 BOARD
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
---
board/st/common/stpmic1.c | 14 --------------
board/st/stm32mp1/stm32mp1.c | 15 +++++----------
2 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/board/st/common/stpmic1.c b/board/st/common/stpmic1.c
index 5fb1be2fd3d..d52dce4f657 100644
--- a/board/st/common/stpmic1.c
+++ b/board/st/common/stpmic1.c
@@ -202,18 +202,4 @@ void stpmic1_init(u32 voltage_mv)
STPMIC1_BUCKS_MRST_CR,
STPMIC1_MRST_BUCK(STPMIC1_BUCK3),
STPMIC1_MRST_BUCK(STPMIC1_BUCK3));
-
- /* Check if debug is enabled to program PMIC according to the bit */
- if (readl(TAMP_BOOT_CONTEXT) & TAMP_BOOT_DEBUG_ON) {
- log_info("Keep debug unit ON\n");
-
- pmic_clrsetbits(dev, STPMIC1_BUCKS_MRST_CR,
- STPMIC1_MRST_BUCK_DEBUG,
- STPMIC1_MRST_BUCK_DEBUG);
-
- if (STPMIC1_MRST_LDO_DEBUG)
- pmic_clrsetbits(dev, STPMIC1_LDOS_MRST_CR,
- STPMIC1_MRST_LDO_DEBUG,
- STPMIC1_MRST_LDO_DEBUG);
- }
}
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index c9b21a76eb7..05f41737e6d 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -506,7 +506,7 @@ static void sysconf_init(void)
ret = uclass_get_device_by_driver(UCLASS_PMIC,
DM_DRIVER_GET(stm32mp_pwr_pmic),
&pwr_dev);
- if (!ret && IS_ENABLED(CONFIG_DM_REGULATOR)) {
+ if (!ret) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_DRIVER_GET(stm32mp_bsec),
&dev);
@@ -567,9 +567,6 @@ static int board_stm32mp15x_dk2_init(void)
struct gpio_desc hdmi, audio;
int ret = 0;
- if (!IS_ENABLED(CONFIG_DM_REGULATOR))
- return -ENODEV;
-
/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
node = ofnode_path("/soc/i2c@40012000/hdmi-transmitter@39");
if (!ofnode_valid(node)) {
@@ -621,8 +618,7 @@ error:
static bool board_is_stm32mp13x_dk(void)
{
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP13x) &&
- (of_machine_is_compatible("st,stm32mp135d-dk") ||
- of_machine_is_compatible("st,stm32mp135f-dk")))
+ of_machine_is_compatible("st,stm32mp135f-dk"))
return true;
return false;
@@ -860,8 +856,7 @@ int board_init(void)
board_key_check();
- if (IS_ENABLED(CONFIG_DM_REGULATOR))
- regulators_enable_boot_on(_DEBUG);
+ regulators_enable_boot_on(_DEBUG);
/*
* sysconf initialisation done only when U-Boot is running in secure
@@ -1438,8 +1433,8 @@ void fdt_update_panel_dsi(void *new_blob)
int ft_board_setup(void *blob, struct bd_info *bd)
{
static const struct node_info nodes[] = {
- { "st,stm32f469-qspi", MTD_DEV_TYPE_NOR, },
- { "st,stm32f469-qspi", MTD_DEV_TYPE_SPINAND},
+ { "jedec,spi-nor", MTD_DEV_TYPE_NOR, },
+ { "spi-nand", MTD_DEV_TYPE_SPINAND},
{ "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
{ "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
};
--
2.17.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,42 @@
From 2132a1ff883c92953e906ba8f32b13641bdb98c7 Mon Sep 17 00:00:00 2001
From 9538ad0348aef5f00cd0a6858873d5ffac2e287f Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Fri, 16 Jul 2021 16:25:20 +0200
Subject: [PATCH 12/12] cpr_silent
Date: Wed, 28 Sep 2022 10:52:51 +0200
Subject: [PATCH] silent_mode
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
include/configs/stm32mp1.h | 1 +
1 file changed, 1 insertion(+)
include/configs/stm32mp13_st_common.h | 3 ++-
include/configs/stm32mp15_st_common.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index 72424abb8b..0088ced206 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -159,6 +159,7 @@
"env_check=if env info -p -d -q; then env save; fi\0" \
STM32MP_BOOTCMD \
BOOTENV \
+ "silent=1\0" \
"boot_net_usb_start=true\0"
diff --git a/include/configs/stm32mp13_st_common.h b/include/configs/stm32mp13_st_common.h
index 41681537a2..49d3398663 100644
--- a/include/configs/stm32mp13_st_common.h
+++ b/include/configs/stm32mp13_st_common.h
@@ -10,7 +10,8 @@
#define STM32MP_BOARD_EXTRA_ENV \
"usb_pgood_delay=1000\0" \
- "console=ttySTM0\0"
+ "console=ttySTM0\0" \
+ "silent=1\0"
#include <configs/stm32mp13_common.h>
diff --git a/include/configs/stm32mp15_st_common.h b/include/configs/stm32mp15_st_common.h
index c395f7f986..81865b24ea 100644
--- a/include/configs/stm32mp15_st_common.h
+++ b/include/configs/stm32mp15_st_common.h
@@ -10,7 +10,8 @@
#define STM32MP_BOARD_EXTRA_ENV \
"usb_pgood_delay=1000\0" \
- "console=ttySTM0\0"
+ "console=ttySTM0\0" \
+ "silent=1\0"
#include <configs/stm32mp15_common.h>
#endif /* ifndef CONFIG_SPL_BUILD */
--
2.17.1
2.25.1