U-BOOT-STM32MP: v2021.10-stm32mp-r2
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Change-Id: I4ddc6905fb1e21bfcb6f84a2b5d2dd4d7d95f26c
This commit is contained in:
1 parent
001cc2ef47
commit
5c3c6aa07a
9 files changed
+6053
-48
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user