U-BOOT: v2021.10-stm32mp1-r1
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com> Change-Id: I3fd28e03a866d5f154b1356e031798a0e771e7f5
This commit is contained in:
1 parent
b361e0b1a3
commit
10b737d31d
20 files changed
+31466
-13874
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,811 +0,0 @@
|
||||
From f792f9d20e0a99373263c540b271adc8143de743 Mon Sep 17 00:00:00 2001
|
||||
From: Romuald JEANNE <romuald.jeanne@st.com>
|
||||
Date: Tue, 16 Mar 2021 08:16:11 +0100
|
||||
Subject: [PATCH 2/5] ARM v2020.10-stm32mp-r1 BOARD
|
||||
|
||||
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
|
||||
---
|
||||
board/st/common/Kconfig | 21 +++-
|
||||
board/st/common/stm32mp_dfu.c | 9 +-
|
||||
board/st/common/stm32mp_mtdparts.c | 47 +++++---
|
||||
board/st/stm32mp1/fit_copro_kernel_dtb.its | 18 ++-
|
||||
board/st/stm32mp1/fit_kernel_dtb.its | 6 +-
|
||||
board/st/stm32mp1/stm32mp1.c | 134 +++++++++++++--------
|
||||
doc/board/st/stm32mp1.rst | 124 +++++++++++--------
|
||||
7 files changed, 227 insertions(+), 132 deletions(-)
|
||||
|
||||
diff --git a/board/st/common/Kconfig b/board/st/common/Kconfig
|
||||
index ddcf33a122..2f57118bb2 100644
|
||||
--- a/board/st/common/Kconfig
|
||||
+++ b/board/st/common/Kconfig
|
||||
@@ -8,18 +8,22 @@ config CMD_STBOARD
|
||||
|
||||
config MTDPARTS_NAND0_BOOT
|
||||
string "mtd boot partitions for nand0"
|
||||
- default "2m(fsbl),2m(ssbl1),2m(ssbl2)"
|
||||
+ default "2m(fsbl),2m(ssbl1),2m(ssbl2)" if STM32MP15x_STM32IMAGE || \
|
||||
+ !TFABOOT
|
||||
+ default "2m(fsbl),4m(fip1),4m(fip2)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
for boot from nand0.
|
||||
Each partition need to be aligned with the device erase block size,
|
||||
512KB is the max size for the NAND supported by stm32mp1 platform.
|
||||
+ The fsbl partition support multiple copy of the same binary, one by
|
||||
+ erase block.
|
||||
|
||||
config MTDPARTS_NAND0_TEE
|
||||
string "mtd tee partitions for nand0"
|
||||
default "512k(teeh),512k(teed),512k(teex)"
|
||||
- depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
+ depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from nand0.
|
||||
@@ -28,7 +32,9 @@ config MTDPARTS_NAND0_TEE
|
||||
|
||||
config MTDPARTS_NOR0_BOOT
|
||||
string "mtd boot partitions for nor0"
|
||||
- default "256k(fsbl1),256k(fsbl2),2m(ssbl),512k(u-boot-env)"
|
||||
+ default "256k(fsbl1),256k(fsbl2),2m(ssbl),512k(u-boot-env)" if STM32MP15x_STM32IMAGE || \
|
||||
+ !TFABOOT
|
||||
+ default "256k(fsbl1),256k(fsbl2),4m(fip),512k(u-boot-env)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
@@ -40,24 +46,27 @@ config MTDPARTS_NOR0_BOOT
|
||||
config MTDPARTS_NOR0_TEE
|
||||
string "mtd tee partitions for nor0"
|
||||
default "256k(teeh),512k(teed),256k(teex)"
|
||||
- depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
+ depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from nor0.
|
||||
|
||||
config MTDPARTS_SPINAND0_BOOT
|
||||
string "mtd boot partitions for spi-nand0"
|
||||
- default "2m(fsbl),2m(ssbl1),2m(ssbl2)"
|
||||
+ default "2m(fsbl),2m(ssbl1),2m(ssbl2)" if STM32MP15x_STM32IMAGE || !TFABOOT
|
||||
+ default "2m(fsbl),4m(fip1),4m(fip2)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
for boot from spi-nand0,
|
||||
512KB is the max size for the NAND supported by stm32mp1 platform.
|
||||
+ The fsbl partition support multiple copy of the same binary, one by
|
||||
+ erase block.
|
||||
|
||||
config MTDPARTS_SPINAND0_TEE
|
||||
string "mtd tee partitions for spi-nand0"
|
||||
default "512k(teeh),512k(teed),512k(teex)"
|
||||
- depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
+ depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from spi-nand0,
|
||||
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
|
||||
index aab7d741ac..09913f6ec7 100644
|
||||
--- a/board/st/common/stm32mp_dfu.c
|
||||
+++ b/board/st/common/stm32mp_dfu.c
|
||||
@@ -142,7 +142,8 @@ void set_dfu_alt_info(char *interface, char *devstr)
|
||||
board_get_alt_info_mtd(mtd, buf);
|
||||
}
|
||||
|
||||
- if (IS_ENABLED(CONFIG_DFU_VIRT)) {
|
||||
+ if (IS_ENABLED(CONFIG_DFU_VIRT) &&
|
||||
+ IS_ENABLED(CMD_STM32PROG_USB)) {
|
||||
strncat(buf, "&virt 0=OTP", DFU_ALT_BUF_LEN);
|
||||
|
||||
if (IS_ENABLED(CONFIG_PMIC_STPMIC1))
|
||||
@@ -216,7 +217,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
return dfu_pmic_read(offset, buf, len);
|
||||
}
|
||||
|
||||
- if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
+ if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_read_medium_virt(dfu, offset, buf, len);
|
||||
|
||||
@@ -227,7 +228,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
void *buf, long *len)
|
||||
{
|
||||
- if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
+ if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_write_medium_virt(dfu, offset, buf, len);
|
||||
|
||||
@@ -236,7 +237,7 @@ int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
|
||||
int __weak dfu_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
|
||||
{
|
||||
- if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
+ if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_get_medium_size_virt(dfu, size);
|
||||
|
||||
diff --git a/board/st/common/stm32mp_mtdparts.c b/board/st/common/stm32mp_mtdparts.c
|
||||
index 9f5897f8c8..baddadc3a5 100644
|
||||
--- a/board/st/common/stm32mp_mtdparts.c
|
||||
+++ b/board/st/common/stm32mp_mtdparts.c
|
||||
@@ -10,7 +10,9 @@
|
||||
#include <env_internal.h>
|
||||
#include <mtd.h>
|
||||
#include <mtd_node.h>
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
#include <tee.h>
|
||||
+#endif
|
||||
#include <asm/arch/stm32prog.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
@@ -29,7 +31,9 @@ static void board_set_mtdparts(const char *dev,
|
||||
char *mtdids,
|
||||
char *mtdparts,
|
||||
const char *boot,
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
const char *tee,
|
||||
+#endif
|
||||
const char *user)
|
||||
{
|
||||
/* mtdids: "<dev>=<dev>, ...." */
|
||||
@@ -53,10 +57,12 @@ static void board_set_mtdparts(const char *dev,
|
||||
strncat(mtdparts, ",", MTDPARTS_LEN);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
if (tee) {
|
||||
strncat(mtdparts, tee, MTDPARTS_LEN);
|
||||
strncat(mtdparts, ",", MTDPARTS_LEN);
|
||||
}
|
||||
+#endif
|
||||
|
||||
strncat(mtdparts, user, MTDPARTS_LEN);
|
||||
}
|
||||
@@ -68,7 +74,10 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
static char parts[3 * MTDPARTS_LEN + 1];
|
||||
static char ids[MTDIDS_LEN + 1];
|
||||
static bool mtd_initialized;
|
||||
- bool tee, nor, nand, spinand, serial;
|
||||
+ bool nor, nand, spinand, serial;
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
+ bool tee = false;
|
||||
+#endif
|
||||
|
||||
if (mtd_initialized) {
|
||||
*mtdids = ids;
|
||||
@@ -76,7 +85,6 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
return;
|
||||
}
|
||||
|
||||
- tee = false;
|
||||
nor = false;
|
||||
nand = false;
|
||||
spinand = false;
|
||||
@@ -87,7 +95,9 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
case BOOT_SERIAL_USB:
|
||||
serial = true;
|
||||
if (CONFIG_IS_ENABLED(CMD_STM32PROG)) {
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
tee = stm32prog_get_tee_partitions();
|
||||
+#endif
|
||||
nor = stm32prog_get_fsbl_nor();
|
||||
}
|
||||
nand = true;
|
||||
@@ -106,9 +116,11 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
break;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
if (!serial && CONFIG_IS_ENABLED(OPTEE) &&
|
||||
tee_find_device(NULL, NULL, NULL, NULL))
|
||||
tee = true;
|
||||
+#endif
|
||||
|
||||
memset(parts, 0, sizeof(parts));
|
||||
memset(ids, 0, sizeof(ids));
|
||||
@@ -120,29 +132,27 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
pr_debug("mtd device = %s\n", dev->name);
|
||||
}
|
||||
|
||||
- if (nor || nand) {
|
||||
+ if (nand) {
|
||||
mtd = get_mtd_device_nm("nand0");
|
||||
if (!IS_ERR_OR_NULL(mtd)) {
|
||||
- const char *mtd_boot = CONFIG_MTDPARTS_NAND0_BOOT;
|
||||
- const char *mtd_tee = CONFIG_MTDPARTS_NAND0_TEE;
|
||||
-
|
||||
board_set_mtdparts("nand0", ids, parts,
|
||||
- !nor ? mtd_boot : NULL,
|
||||
- !nor && tee ? mtd_tee : NULL,
|
||||
+ CONFIG_MTDPARTS_NAND0_BOOT,
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
+ !nor && tee ? CONFIG_MTDPARTS_NAND0_TEE : NULL,
|
||||
+#endif
|
||||
"-(UBI)");
|
||||
put_mtd_device(mtd);
|
||||
}
|
||||
}
|
||||
|
||||
- if (nor || spinand) {
|
||||
+ if (spinand) {
|
||||
mtd = get_mtd_device_nm("spi-nand0");
|
||||
if (!IS_ERR_OR_NULL(mtd)) {
|
||||
- const char *mtd_boot = CONFIG_MTDPARTS_SPINAND0_BOOT;
|
||||
- const char *mtd_tee = CONFIG_MTDPARTS_SPINAND0_TEE;
|
||||
-
|
||||
board_set_mtdparts("spi-nand0", ids, parts,
|
||||
- !nor ? mtd_boot : NULL,
|
||||
- !nor && tee ? mtd_tee : NULL,
|
||||
+ CONFIG_MTDPARTS_SPINAND0_BOOT,
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
+ !nor && tee ? CONFIG_MTDPARTS_SPINAND0_TEE : NULL,
|
||||
+#endif
|
||||
"-(UBI)");
|
||||
put_mtd_device(mtd);
|
||||
}
|
||||
@@ -150,12 +160,11 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
|
||||
if (nor) {
|
||||
if (!uclass_get_device(UCLASS_SPI_FLASH, 0, &dev)) {
|
||||
- const char *mtd_boot = CONFIG_MTDPARTS_NOR0_BOOT;
|
||||
- const char *mtd_tee = CONFIG_MTDPARTS_NOR0_TEE;
|
||||
-
|
||||
board_set_mtdparts("nor0", ids, parts,
|
||||
- mtd_boot,
|
||||
- tee ? mtd_tee : NULL,
|
||||
+ CONFIG_MTDPARTS_NOR0_BOOT,
|
||||
+#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
+ tee ? CONFIG_MTDPARTS_NOR0_TEE : NULL,
|
||||
+#endif
|
||||
"-(nor_user)");
|
||||
}
|
||||
}
|
||||
diff --git a/board/st/stm32mp1/fit_copro_kernel_dtb.its b/board/st/stm32mp1/fit_copro_kernel_dtb.its
|
||||
index 3e08fd943e..dc43639af4 100644
|
||||
--- a/board/st/stm32mp1/fit_copro_kernel_dtb.its
|
||||
+++ b/board/st/stm32mp1/fit_copro_kernel_dtb.its
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
* Compilation:
|
||||
* mkimage -f fit_copro_kernel_dtb.its fit_copro_kernel_dtb.itb
|
||||
+ *
|
||||
+ * M4 firmware to load with remoteproc: rproc-m4-fw.elf
|
||||
+ *
|
||||
+ * Files in linux build dir:
|
||||
+ * - arch/arm/boot/zImage
|
||||
+ * - arch/arm/boot/dts/stm32mp157c-dk2.dtb
|
||||
+ * - arch/arm/boot/dts/stm32mp157c-ev1.dtb
|
||||
+ *
|
||||
+ * load mmc 0:4 $kernel_addr_r fit_copro_kernel_dtb.itb
|
||||
+ * bootm $kernel_addr_r
|
||||
+ * bootm $kernel_addr_r#dk2
|
||||
+ * bootm $kernel_addr_r#ev1
|
||||
+ * bootm $kernel_addr_r#dk2-m4
|
||||
+ * bootm $kernel_addr_r#ev1-m4
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@@ -29,8 +43,8 @@
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
- load = <0xC0008000>;
|
||||
- entry = <0xC0008000>;
|
||||
+ load = <0xC4000000>;
|
||||
+ entry = <0xC4000000>;
|
||||
hash-1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
diff --git a/board/st/stm32mp1/fit_kernel_dtb.its b/board/st/stm32mp1/fit_kernel_dtb.its
|
||||
index 18d03ebf3c..8456a3c460 100644
|
||||
--- a/board/st/stm32mp1/fit_kernel_dtb.its
|
||||
+++ b/board/st/stm32mp1/fit_kernel_dtb.its
|
||||
@@ -3,7 +3,7 @@
|
||||
* mkimage -f fit_kernel_dtb.its fit_kernel_dtb.itb
|
||||
*
|
||||
* Files in linux build dir:
|
||||
- * - arch/arm/boot/zImage
|
||||
+ * - arch/arm/boot/Image (gzipped in Image.gz)
|
||||
* - arch/arm/boot/dts/stm32mp157c-dk2.dtb
|
||||
* - arch/arm/boot/dts/stm32mp157c-ev1.dtb
|
||||
*
|
||||
@@ -23,11 +23,11 @@
|
||||
images {
|
||||
kernel {
|
||||
description = "Linux kernel";
|
||||
- data = /incbin/("zImage");
|
||||
+ data = /incbin/("Image.gz");
|
||||
type = "kernel";
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
- compression = "none";
|
||||
+ compression = "gzip";
|
||||
load = <0xC0008000>;
|
||||
entry = <0xC0008000>;
|
||||
hash-1 {
|
||||
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
|
||||
index 3b677d339b..9a02e14ba5 100644
|
||||
--- a/board/st/stm32mp1/stm32mp1.c
|
||||
+++ b/board/st/stm32mp1/stm32mp1.c
|
||||
@@ -101,7 +101,9 @@ int checkboard(void)
|
||||
const char *fdt_compat;
|
||||
int fdt_compat_len;
|
||||
|
||||
- if (IS_ENABLED(CONFIG_TFABOOT))
|
||||
+ if (IS_ENABLED(CONFIG_STM32MP15x_STM32IMAGE))
|
||||
+ mode = "trusted - stm32image";
|
||||
+ else if (IS_ENABLED(CONFIG_TFABOOT))
|
||||
mode = "trusted";
|
||||
else
|
||||
mode = "basic";
|
||||
@@ -288,42 +290,13 @@ static void __maybe_unused led_error_blink(u32 nb_blink)
|
||||
hang();
|
||||
}
|
||||
|
||||
-static int board_check_usb_power(void)
|
||||
+static int adc_measurement(ofnode node, int adc_count, int *min_uV, int *max_uV)
|
||||
{
|
||||
struct ofnode_phandle_args adc_args;
|
||||
struct udevice *adc;
|
||||
- ofnode node;
|
||||
unsigned int raw;
|
||||
- int max_uV = 0;
|
||||
- int min_uV = USB_START_HIGH_THRESHOLD_UV;
|
||||
- int ret, uV, adc_count;
|
||||
- u32 nb_blink;
|
||||
- u8 i;
|
||||
-
|
||||
- if (!IS_ENABLED(CONFIG_ADC))
|
||||
- return -ENODEV;
|
||||
-
|
||||
- node = ofnode_path("/config");
|
||||
- if (!ofnode_valid(node)) {
|
||||
- debug("%s: no /config node?\n", __func__);
|
||||
- return -ENOENT;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Retrieve the ADC channels devices and get measurement
|
||||
- * for each of them
|
||||
- */
|
||||
- adc_count = ofnode_count_phandle_with_args(node, "st,adc_usb_pd",
|
||||
- "#io-channel-cells");
|
||||
- if (adc_count < 0) {
|
||||
- if (adc_count == -ENOENT)
|
||||
- return 0;
|
||||
-
|
||||
- pr_err("%s: can't find adc channel (%d)\n", __func__,
|
||||
- adc_count);
|
||||
-
|
||||
- return adc_count;
|
||||
- }
|
||||
+ int ret, uV;
|
||||
+ int i;
|
||||
|
||||
for (i = 0; i < adc_count; i++) {
|
||||
if (ofnode_parse_phandle_with_args(node, "st,adc_usb_pd",
|
||||
@@ -352,10 +325,10 @@ static int board_check_usb_power(void)
|
||||
}
|
||||
/* Convert to uV */
|
||||
if (!adc_raw_to_uV(adc, raw, &uV)) {
|
||||
- if (uV > max_uV)
|
||||
- max_uV = uV;
|
||||
- if (uV < min_uV)
|
||||
- min_uV = uV;
|
||||
+ if (uV > *max_uV)
|
||||
+ *max_uV = uV;
|
||||
+ if (uV < *min_uV)
|
||||
+ *min_uV = uV;
|
||||
pr_debug("%s: %s[%02d] = %u, %d uV\n", __func__,
|
||||
adc->name, adc_args.args[0], raw, uV);
|
||||
} else {
|
||||
@@ -364,18 +337,66 @@ static int board_check_usb_power(void)
|
||||
}
|
||||
}
|
||||
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int board_check_usb_power(void)
|
||||
+{
|
||||
+ ofnode node;
|
||||
+ int max_uV = 0;
|
||||
+ int min_uV = USB_START_HIGH_THRESHOLD_UV;
|
||||
+ int adc_count, ret;
|
||||
+ u32 nb_blink;
|
||||
+ u8 i;
|
||||
+
|
||||
+ if (!IS_ENABLED(CONFIG_ADC))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ node = ofnode_path("/config");
|
||||
+ if (!ofnode_valid(node)) {
|
||||
+ debug("%s: no /config node?\n", __func__);
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
- * If highest value is inside 1.23 Volts and 2.10 Volts, that means
|
||||
- * board is plugged on an USB-C 3A power supply and boot process can
|
||||
- * continue.
|
||||
+ * Retrieve the ADC channels devices and get measurement
|
||||
+ * for each of them
|
||||
*/
|
||||
- if (max_uV > USB_START_LOW_THRESHOLD_UV &&
|
||||
- max_uV <= USB_START_HIGH_THRESHOLD_UV &&
|
||||
- min_uV <= USB_LOW_THRESHOLD_UV)
|
||||
- return 0;
|
||||
+ adc_count = ofnode_count_phandle_with_args(node, "st,adc_usb_pd",
|
||||
+ "#io-channel-cells");
|
||||
+ if (adc_count < 0) {
|
||||
+ if (adc_count == -ENOENT)
|
||||
+ return 0;
|
||||
|
||||
- pr_err("****************************************************\n");
|
||||
+ pr_err("%s: can't find adc channel (%d)\n", __func__,
|
||||
+ adc_count);
|
||||
+
|
||||
+ return adc_count;
|
||||
+ }
|
||||
+
|
||||
+ /* perform maximum of 2 ADC measurement to detect power supply current */
|
||||
+ for (i = 0; i < 2; i++) {
|
||||
+ ret = adc_measurement(node, adc_count, &min_uV, &max_uV);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /*
|
||||
+ * If highest value is inside 1.23 Volts and 2.10 Volts, that means
|
||||
+ * board is plugged on an USB-C 3A power supply and boot process can
|
||||
+ * continue.
|
||||
+ */
|
||||
+ if (max_uV > USB_START_LOW_THRESHOLD_UV &&
|
||||
+ max_uV <= USB_START_HIGH_THRESHOLD_UV &&
|
||||
+ min_uV <= USB_LOW_THRESHOLD_UV)
|
||||
+ return 0;
|
||||
|
||||
+ if (i == 0) {
|
||||
+ pr_debug("Previous ADC measurements was not the one expected, retry in 20ms\n");
|
||||
+ mdelay(20); /* equal to max tPDDebounce duration (min 10ms - max 20ms) */
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pr_err("****************************************************\n");
|
||||
/*
|
||||
* If highest and lowest value are either both below
|
||||
* USB_LOW_THRESHOLD_UV or both above USB_LOW_THRESHOLD_UV, that
|
||||
@@ -583,7 +604,8 @@ error:
|
||||
static bool board_is_dk2(void)
|
||||
{
|
||||
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
||||
- of_machine_is_compatible("st,stm32mp157c-dk2"))
|
||||
+ (of_machine_is_compatible("st,stm32mp157c-dk2") ||
|
||||
+ of_machine_is_compatible("st,stm32mp157f-dk2")))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -832,10 +854,17 @@ const char *env_ext4_get_dev_part(void)
|
||||
|
||||
return dev_part[(bootmode & TAMP_BOOT_INSTANCE_MASK) - 1];
|
||||
}
|
||||
+
|
||||
int mmc_get_env_dev(void)
|
||||
{
|
||||
- u32 bootmode = get_bootmode();
|
||||
+ u32 bootmode;
|
||||
+
|
||||
+ if (CONFIG_SYS_MMC_ENV_DEV >= 0)
|
||||
+ return CONFIG_SYS_MMC_ENV_DEV;
|
||||
|
||||
+ bootmode = get_bootmode();
|
||||
+
|
||||
+ /* use boot instance to select the correct mmc device identifier */
|
||||
return (bootmode & TAMP_BOOT_INSTANCE_MASK) - 1;
|
||||
}
|
||||
|
||||
@@ -848,9 +877,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
{ "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
|
||||
{ "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
|
||||
};
|
||||
-
|
||||
- if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
|
||||
- fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
+ char *boot_device;
|
||||
+
|
||||
+ /* Check the boot-source and don't update MTD for serial or usb boot */
|
||||
+ boot_device = env_get("boot_device");
|
||||
+ if (!boot_device ||
|
||||
+ (strcmp(boot_device, "serial") && strcmp(boot_device, "usb")))
|
||||
+ if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
|
||||
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/doc/board/st/stm32mp1.rst b/doc/board/st/stm32mp1.rst
|
||||
index e74f7afdae..ad95e12068 100644
|
||||
--- a/doc/board/st/stm32mp1.rst
|
||||
+++ b/doc/board/st/stm32mp1.rst
|
||||
@@ -52,15 +52,23 @@ And the necessary drivers
|
||||
Currently the following boards are supported:
|
||||
|
||||
+ stm32mp157a-dk1.dts
|
||||
+ + stm32mp157a-ed1.dts
|
||||
+ + stm32mp157a-ev1.dts
|
||||
+ stm32mp157c-dk2.dts
|
||||
+ stm32mp157c-ed1.dts
|
||||
+ stm32mp157c-ev1.dts
|
||||
+ + stm32mp157d-dk1.dts
|
||||
+ + stm32mp157d-ed1.dts
|
||||
+ + stm32mp157d-ev1.dts
|
||||
+ + stm32mp157f-dk2.dts
|
||||
+ + stm32mp157f-ed1.dts
|
||||
+ + stm32mp157f-ev1.dts
|
||||
+ stm32mp15xx-dhcor-avenger96.dts
|
||||
|
||||
Boot Sequences
|
||||
--------------
|
||||
|
||||
-3 boot configurations are supported with:
|
||||
+2 boot configurations are supported with:
|
||||
|
||||
+----------+------------------------+-------------------------+--------------+
|
||||
| **ROM** | **FSBL** | **SSBL** | **OS** |
|
||||
@@ -83,14 +91,10 @@ defconfig_file : stm32mp15_trusted_defconfig
|
||||
| TrustZone |secure monitor |
|
||||
+-------------+-------------------------+------------+-------+
|
||||
|
||||
-TF-A performs a full initialization of Secure peripherals and installs a
|
||||
-secure monitor, BL32:
|
||||
-
|
||||
- * SPMin provided by TF-A or
|
||||
- * OP-TEE from specific partitions (teeh, teed, teex).
|
||||
-
|
||||
-U-Boot is running in normal world and uses the secure monitor to access
|
||||
-to secure resources.
|
||||
+TF-A (BL2) initialize the DDR and loads the next stage binaries from a FIP file:
|
||||
+ + BL32: a secure monitor BL32 = SPMin provided by TF-A or OP-TEE : performs a full initialization of Secure peripherals and provides service to normal world
|
||||
+ + BL33: a non-trusted firmware = U-Boot, running in normal world and uses the secure monitor to access to secure resources.
|
||||
+ + HW_CONFIG: The hardware configuration file = the U-Boot device tree
|
||||
|
||||
The **Basic** boot chain
|
||||
````````````````````````
|
||||
@@ -123,19 +127,27 @@ the supported device trees for STM32MP15x are:
|
||||
|
||||
+ ev1: eval board with pmic stpmic1 (ev1 = mother board + daughter ed1)
|
||||
|
||||
+ + stm32mp157a-ev1
|
||||
+ stm32mp157c-ev1
|
||||
+ + stm32mp157d-ev1
|
||||
+ + stm32mp157f-ev1
|
||||
|
||||
+ ed1: daughter board with pmic stpmic1
|
||||
|
||||
+ + stm32mp157a-ed1
|
||||
+ stm32mp157c-ed1
|
||||
+ + stm32mp157d-ed1
|
||||
+ + stm32mp157f-ed1
|
||||
|
||||
+ dk1: Discovery board
|
||||
|
||||
+ stm32mp157a-dk1
|
||||
+ + stm32mp157d-dk1
|
||||
|
||||
+ dk2: Discovery board = dk1 with a BT/WiFI combo and a DSI panel
|
||||
|
||||
+ stm32mp157c-dk2
|
||||
+ + stm32mp157f-dk2
|
||||
|
||||
+ avenger96: Avenger96 board from Arrow Electronics based on DH Elec. DHCOR SoM
|
||||
|
||||
@@ -223,16 +235,24 @@ Build Procedure
|
||||
|
||||
6. Output files
|
||||
|
||||
- BootRom and TF-A expect binaries with STM32 image header
|
||||
- SPL expects file with U-Boot uImage header
|
||||
+ The ROM code expects FSBL binaries with STM32 image header.
|
||||
+ TF-A expect a FIP binary, with OS monitor (SPmin or OP-TEE) and with U-Boot binary + device tree.
|
||||
+ SPL expects file with U-Boot uImage header.
|
||||
|
||||
So in the output directory (selected by KBUILD_OUTPUT),
|
||||
you can found the needed files:
|
||||
|
||||
- For **Trusted** boot (with or without OP-TEE)
|
||||
|
||||
- - FSBL = **tf-a.stm32** (provided by TF-A compilation)
|
||||
- - SSBL = **u-boot.stm32**
|
||||
+ - FSBL = **tf-a.stm32** and **tf-a-fip.bin** (provided by TF-A compilation)
|
||||
+ - SSBL = **u-boot-nodtb.bin** and **u-boot.dtb**
|
||||
+
|
||||
+ The file tf-a-fip.bin includes the 2 U-Boot files, u-boot-nodtb.bin and u-boot.dtb;
|
||||
+ they are needed during the TF-A compilation(BL33=u-boot-nodtb.bin BL33_CFG=u-boot.dtb).
|
||||
+
|
||||
+ You can also update a existing it with the tools provided by TF-A:
|
||||
+
|
||||
+ # fiptool update --nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb tf-a-fip-stm32mp157c-ev1.bin
|
||||
|
||||
- For Basic boot
|
||||
|
||||
@@ -298,22 +318,24 @@ Prepare an SD card
|
||||
The minimal requirements for STMP32MP15x boot up to U-Boot are:
|
||||
|
||||
- GPT partitioning (with gdisk or with sgdisk)
|
||||
-- 2 fsbl partitions, named fsbl1 and fsbl2, size at least 256KiB
|
||||
-- one ssbl partition for U-Boot
|
||||
+- 2 fsbl partitions, named "fsbl1" and "fsbl2", size at least 256KiB
|
||||
+- one partition named "fip" for FIP or U-Boot (TF-A search the "fip"
|
||||
+ partition and SPL search the 3th partition, because
|
||||
+ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3)
|
||||
|
||||
Then the minimal GPT partition is:
|
||||
|
||||
- +-------+--------+---------+-------------+
|
||||
- | *Num* | *Name* | *Size* | *Content* |
|
||||
- +=======+========+=========+=============+
|
||||
- | 1 | fsbl1 | 256 KiB | TF-A or SPL |
|
||||
- +-------+--------+---------+-------------+
|
||||
- | 2 | fsbl2 | 256 KiB | TF-A or SPL |
|
||||
- +-------+--------+---------+-------------+
|
||||
- | 3 | ssbl | enought | U-Boot |
|
||||
- +-------+--------+---------+-------------+
|
||||
- | 4 | <any> | <any> | Rootfs |
|
||||
- +-------+--------+---------+-------------+
|
||||
+ +-------+--------+---------+------------------------------+
|
||||
+ | *Num* | *Name* | *Size* | *Content* |
|
||||
+ +=======+========+=========+==============================+
|
||||
+ | 1 | fsbl1 | 256 KiB | TF-A BL2 (tf-a.stm32) or SPL |
|
||||
+ +-------+--------+---------+------------------------------+
|
||||
+ | 2 | fsbl2 | 256 KiB | TF-A BL2 (tf-a.stm32) or SPL |
|
||||
+ +-------+--------+---------+------------------------------+
|
||||
+ | 3 | fip | enought | tf-a-fip.bin or u-boot.img |
|
||||
+ +-------+--------+---------+------------------------------+
|
||||
+ | 4 | <any> | <any> | Rootfs |
|
||||
+ +-------+--------+---------+------------------------------+
|
||||
|
||||
Add a 4th partition (Rootfs) marked bootable with a file extlinux.conf
|
||||
following the Generic Distribution feature (doc/README.distro for use).
|
||||
@@ -334,7 +356,7 @@ b) create minimal image::
|
||||
# sgdisk --resize-table=128 -a 1 \
|
||||
-n 1:34:545 -c 1:fsbl1 \
|
||||
-n 2:546:1057 -c 2:fsbl2 \
|
||||
- -n 3:1058:5153 -c 3:ssbl \
|
||||
+ -n 3:1058:5153 -c 3:fip \
|
||||
-n 4:5154: -c 4:rootfs \
|
||||
-p /dev/<SD card dev>
|
||||
|
||||
@@ -353,7 +375,7 @@ c) copy the FSBL (2 times) and SSBL file on the correct partition.
|
||||
|
||||
# dd if=tf-a.stm32 of=/dev/mmcblk0p1
|
||||
# dd if=tf-a.stm32 of=/dev/mmcblk0p2
|
||||
- # dd if=u-boot.stm32 of=/dev/mmcblk0p3
|
||||
+ # dd if=tf-a-fip.bin of=/dev/mmcblk0p3
|
||||
|
||||
To boot from SD card, select BootPinMode = 1 0 1 and reset.
|
||||
|
||||
@@ -363,8 +385,8 @@ Prepare eMMC
|
||||
You can use U-Boot to copy binary in eMMC.
|
||||
|
||||
In the next example, you need to boot from SD card and the images
|
||||
-(u-boot-spl.stm32, u-boot.img) are presents on SD card (mmc 0)
|
||||
-in ext4 partition 4 (bootfs).
|
||||
+(tf-a.stm32, tf-a-fip.bin / u-boot-spl.stm32, u-boot.img) are presents
|
||||
+on SD card (mmc 0) in ext4 partition 4 (bootfs).
|
||||
|
||||
To boot from SD card, select BootPinMode = 1 0 1 and reset.
|
||||
|
||||
@@ -373,13 +395,16 @@ Then you update the eMMC with the next U-Boot command :
|
||||
a) prepare GPT on eMMC,
|
||||
example with 2 partitions, bootfs and roots::
|
||||
|
||||
- # setenv emmc_part "name=ssbl,size=2MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
|
||||
+ # setenv emmc_part "name=fip,size=2MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
|
||||
# gpt write mmc 1 ${emmc_part}
|
||||
|
||||
b) copy SPL on eMMC on firts boot partition
|
||||
(SPL max size is 256kB, with LBA 512, 0x200)::
|
||||
|
||||
+ # ext4load mmc 0:4 0xC0000000 tf-a.stm32
|
||||
+ or
|
||||
# ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32
|
||||
+
|
||||
# mmc dev 1
|
||||
# mmc partconf 1 1 1 1
|
||||
# mmc write ${fileaddr} 0 200
|
||||
@@ -387,7 +412,10 @@ b) copy SPL on eMMC on firts boot partition
|
||||
|
||||
c) copy U-Boot in first GPT partition of eMMC::
|
||||
|
||||
- # ext4load mmc 0:4 0xC0000000 u-boo t.img
|
||||
+ # ext4load mmc 0:4 0xC0000000 tf-a-fip.bin
|
||||
+ or
|
||||
+ # ext4load mmc 0:4 0xC0000000 u-boot.img
|
||||
+
|
||||
# mmc dev 1
|
||||
# part start mmc 1 1 partstart
|
||||
# mmc write ${fileaddr} ${partstart} ${filesize}
|
||||
@@ -520,14 +548,14 @@ On EV1 board, booting from SD card, without OP-TEE::
|
||||
dev: RAM alt: 2 name: uramdisk.image.gz layout: RAM_ADDR
|
||||
dev: eMMC alt: 3 name: mmc0_fsbl1 layout: RAW_ADDR
|
||||
dev: eMMC alt: 4 name: mmc0_fsbl2 layout: RAW_ADDR
|
||||
- dev: eMMC alt: 5 name: mmc0_ssbl layout: RAW_ADDR
|
||||
+ dev: eMMC alt: 5 name: mmc0_fip layout: RAW_ADDR
|
||||
dev: eMMC alt: 6 name: mmc0_bootfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 7 name: mmc0_vendorfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 8 name: mmc0_rootfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 9 name: mmc0_userfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 10 name: mmc1_boot1 layout: RAW_ADDR
|
||||
dev: eMMC alt: 11 name: mmc1_boot2 layout: RAW_ADDR
|
||||
- dev: eMMC alt: 12 name: mmc1_ssbl layout: RAW_ADDR
|
||||
+ dev: eMMC alt: 12 name: mmc1_fip layout: RAW_ADDR
|
||||
dev: eMMC alt: 13 name: mmc1_bootfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 14 name: mmc1_vendorfs layout: RAW_ADDR
|
||||
dev: eMMC alt: 15 name: mmc1_rootfs layout: RAW_ADDR
|
||||
@@ -548,14 +576,14 @@ All the supported device are exported for dfu-util tool::
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=15, name="mmc1_rootfs", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=14, name="mmc1_vendorfs", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=13, name="mmc1_bootfs", serial="002700333338511934383330"
|
||||
- Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=12, name="mmc1_ssbl", serial="002700333338511934383330"
|
||||
+ Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=12, name="mmc1_fip", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=11, name="mmc1_boot2", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=10, name="mmc1_boot1", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=9, name="mmc0_userfs", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=8, name="mmc0_rootfs", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=7, name="mmc0_vendorfs", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=6, name="mmc0_bootfs", serial="002700333338511934383330"
|
||||
- Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=5, name="mmc0_ssbl", serial="002700333338511934383330"
|
||||
+ Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=5, name="mmc0_fip", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=4, name="mmc0_fsbl2", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=3, name="mmc0_fsbl1", serial="002700333338511934383330"
|
||||
Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=2, name="uramdisk.image.gz", serial="002700333338511934383330"
|
||||
@@ -566,9 +594,9 @@ You can update the boot device:
|
||||
|
||||
- SD card (mmc0) ::
|
||||
|
||||
- $> dfu-util -d 0483:5720 -a 3 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 4 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 5 -D u-boot-stm32mp157c-ev1-trusted.img
|
||||
+ $> dfu-util -d 0483:5720 -a 3 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 4 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 5 -D tf-a-fip-stm32mp157c-ev1.bin
|
||||
$> dfu-util -d 0483:5720 -a 6 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
$> dfu-util -d 0483:5720 -a 7 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
$> dfu-util -d 0483:5720 -a 8 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
@@ -576,9 +604,9 @@ You can update the boot device:
|
||||
|
||||
- EMMC (mmc1)::
|
||||
|
||||
- $> dfu-util -d 0483:5720 -a 10 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 11 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 12 -D u-boot-stm32mp157c-ev1-trusted.img
|
||||
+ $> dfu-util -d 0483:5720 -a 10 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 11 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 12 -D tf-a-fip-stm32mp157c-ev1.bin
|
||||
$> dfu-util -d 0483:5720 -a 13 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
$> dfu-util -d 0483:5720 -a 14 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
$> dfu-util -d 0483:5720 -a 15 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
@@ -595,14 +623,14 @@ only the MTD partition on the boot devices are available, for example:
|
||||
|
||||
- NOR (nor0 = alt 20) & NAND (nand0 = alt 26) ::
|
||||
|
||||
- $> dfu-util -d 0483:5720 -a 21 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 23 -D u-boot-stm32mp157c-ev1-trusted.img
|
||||
+ $> dfu-util -d 0483:5720 -a 21 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 23 -D tf-a-fip-stm32mp157c-ev1.bin
|
||||
$> dfu-util -d 0483:5720 -a 27 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
|
||||
|
||||
- NAND (nand0 = alt 21)::
|
||||
|
||||
- $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- $> dfu-util -d 0483:5720 -a 23 -D u-boot-stm32mp157c-ev1-trusted.img
|
||||
- $> dfu-util -d 0483:5720 -a 24 -D u-boot-stm32mp157c-ev1-trusted.img
|
||||
+ $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1.stm32
|
||||
+ $> dfu-util -d 0483:5720 -a 23 -D tf-a-fip-stm32mp157c-ev1.bin
|
||||
+ $> dfu-util -d 0483:5720 -a 24 -D tf-a-fip-stm32mp157c-ev1.bin
|
||||
$> dfu-util -d 0483:5720 -a 25 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
|
||||
--
|
||||
2.17.1
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+5822
-1347
File diff suppressed because it is too large.
Load diff
@@ -1,165 +0,0 @@
|
||||
From b5b052fb24a4d593ad0e3facfd365e1d33e4083f Mon Sep 17 00:00:00 2001
|
||||
From: Romuald JEANNE <romuald.jeanne@st.com>
|
||||
Date: Tue, 16 Mar 2021 08:14:57 +0100
|
||||
Subject: [PATCH 5/5] ARM v2020.10-stm32mp-r1 CONFIG
|
||||
|
||||
---
|
||||
configs/sandbox_defconfig | 4 ++++
|
||||
configs/stm32mp15_basic_defconfig | 6 ++++--
|
||||
configs/stm32mp15_dhcom_basic_defconfig | 1 +
|
||||
configs/stm32mp15_dhcor_basic_defconfig | 1 +
|
||||
configs/stm32mp15_trusted_defconfig | 12 ++++++++----
|
||||
5 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
|
||||
index 6e9f029cc9..a2ebb3c971 100644
|
||||
--- a/configs/sandbox_defconfig
|
||||
+++ b/configs/sandbox_defconfig
|
||||
@@ -122,6 +122,7 @@ CONFIG_BUTTON=y
|
||||
CONFIG_BUTTON_GPIO=y
|
||||
CONFIG_CLK=y
|
||||
CONFIG_CLK_COMPOSITE_CCF=y
|
||||
+CONFIG_CLK_SCMI=y
|
||||
CONFIG_SANDBOX_CLK_CCF=y
|
||||
CONFIG_CPU=y
|
||||
CONFIG_DM_DEMO=y
|
||||
@@ -132,6 +133,8 @@ CONFIG_BOARD_SANDBOX=y
|
||||
CONFIG_DMA=y
|
||||
CONFIG_DMA_CHANNELS=y
|
||||
CONFIG_SANDBOX_DMA=y
|
||||
+CONFIG_FIRMWARE=y
|
||||
+CONFIG_SCMI_FIRMWARE=y
|
||||
CONFIG_GPIO_HOG=y
|
||||
CONFIG_DM_GPIO_LOOKUP_LABEL=y
|
||||
CONFIG_PM8916_GPIO=y
|
||||
@@ -217,6 +220,7 @@ CONFIG_REMOTEPROC_SANDBOX=y
|
||||
CONFIG_DM_RESET=y
|
||||
CONFIG_SANDBOX_RESET=y
|
||||
CONFIG_RESET_SYSCON=y
|
||||
+CONFIG_RESET_SCMI=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_RV8803=y
|
||||
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
|
||||
index a8c4112dbe..c08d06474b 100644
|
||||
--- a/configs/stm32mp15_basic_defconfig
|
||||
+++ b/configs/stm32mp15_basic_defconfig
|
||||
@@ -18,6 +18,7 @@ CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1"
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
|
||||
@@ -31,8 +32,6 @@ CONFIG_SPL_SPI_FLASH_MTD=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
-# CONFIG_CMD_EXPORTENV is not set
|
||||
-# CONFIG_CMD_IMPORTENV is not set
|
||||
CONFIG_CMD_ERASEENV=y
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
@@ -69,6 +68,7 @@ CONFIG_ENV_UBI_PART="UBI"
|
||||
CONFIG_ENV_UBI_VOLUME="uboot_config"
|
||||
CONFIG_ENV_UBI_VOLUME_REDUND="uboot_config_r"
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=-1
|
||||
# CONFIG_SPL_ENV_IS_NOWHERE is not set
|
||||
# CONFIG_SPL_ENV_IS_IN_SPI_FLASH is not set
|
||||
CONFIG_STM32_ADC=y
|
||||
@@ -121,6 +121,7 @@ CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_DM_REGULATOR_STM32_VREFBUF=y
|
||||
CONFIG_DM_REGULATOR_STPMIC1=y
|
||||
+CONFIG_STM32MP1_DDR_INTERACTIVE=y
|
||||
CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_RNG_STM32MP1=y
|
||||
@@ -153,3 +154,4 @@ CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
+CONFIG_LMB_RESERVED_REGIONS=16
|
||||
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
|
||||
index 7668fd01cd..c0282fa9fb 100644
|
||||
--- a/configs/stm32mp15_dhcom_basic_defconfig
|
||||
+++ b/configs/stm32mp15_dhcom_basic_defconfig
|
||||
@@ -17,6 +17,7 @@ CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its"
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
+CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
|
||||
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
|
||||
index aa384517c3..ba1be446e7 100644
|
||||
--- a/configs/stm32mp15_dhcor_basic_defconfig
|
||||
+++ b/configs/stm32mp15_dhcor_basic_defconfig
|
||||
@@ -17,6 +17,7 @@ CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its"
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
+CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
|
||||
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
|
||||
index 0792884a9d..5b4cfc4ca3 100644
|
||||
--- a/configs/stm32mp15_trusted_defconfig
|
||||
+++ b/configs/stm32mp15_trusted_defconfig
|
||||
@@ -2,21 +2,20 @@ CONFIG_ARM=y
|
||||
CONFIG_ARCH_STM32MP=y
|
||||
CONFIG_TFABOOT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x3000
|
||||
-CONFIG_ENV_OFFSET=0x280000
|
||||
+CONFIG_ENV_OFFSET=0x480000
|
||||
CONFIG_ENV_SECT_SIZE=0x40000
|
||||
CONFIG_TARGET_ST_STM32MP15x=y
|
||||
CONFIG_CMD_STM32PROG=y
|
||||
CONFIG_TYPEC_STUSB160X=y
|
||||
-CONFIG_ENV_OFFSET_REDUND=0x2C0000
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x4C0000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1"
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
-# CONFIG_CMD_EXPORTENV is not set
|
||||
-# CONFIG_CMD_IMPORTENV is not set
|
||||
CONFIG_CMD_ERASEENV=y
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
@@ -51,7 +50,9 @@ CONFIG_ENV_UBI_PART="UBI"
|
||||
CONFIG_ENV_UBI_VOLUME="uboot_config"
|
||||
CONFIG_ENV_UBI_VOLUME_REDUND="uboot_config_r"
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=-1
|
||||
CONFIG_STM32_ADC=y
|
||||
+CONFIG_CLK_SCMI=y
|
||||
CONFIG_SET_DFU_ALT_INFO=y
|
||||
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||
CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
|
||||
@@ -99,7 +100,9 @@ CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_DM_REGULATOR_STM32_VREFBUF=y
|
||||
CONFIG_DM_REGULATOR_STPMIC1=y
|
||||
+CONFIG_REMOTEPROC_OPTEE=y
|
||||
CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
+CONFIG_RESET_SCMI=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_RNG_STM32MP1=y
|
||||
CONFIG_DM_RTC=y
|
||||
@@ -134,3 +137,4 @@ CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
+CONFIG_LMB_RESERVED_REGIONS=16
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,779 @@
|
||||
From a6c6f91e2e0f60984a8572ab960e305da4b87b21 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
Date: Mon, 30 May 2022 09:47:32 +0200
|
||||
Subject: [PATCH 5/5] ARM-v2021.10-stm32mp-r1-CONFIG
|
||||
|
||||
---
|
||||
configs/stm32f429-discovery_defconfig | 2 +
|
||||
configs/stm32f429-evaluation_defconfig | 1 +
|
||||
configs/stm32f469-discovery_defconfig | 1 +
|
||||
configs/stm32f746-disco_defconfig | 1 +
|
||||
configs/stm32f769-disco_defconfig | 1 +
|
||||
configs/stm32mp13_defconfig | 143 ++++++++++++++++++
|
||||
...stm32mp15-icore-stm32mp1-ctouch2_defconfig | 4 +-
|
||||
...tm32mp15-icore-stm32mp1-edimm2.2_defconfig | 4 +-
|
||||
...-microgea-stm32mp1-microdev2-of7_defconfig | 4 +-
|
||||
...mp15-microgea-stm32mp1-microdev2_defconfig | 4 +-
|
||||
configs/stm32mp15_basic_defconfig | 15 +-
|
||||
configs/stm32mp15_defconfig | 21 ++-
|
||||
configs/stm32mp15_dhcom_basic_defconfig | 31 ++--
|
||||
configs/stm32mp15_dhcor_basic_defconfig | 32 ++--
|
||||
configs/stm32mp15_trusted_defconfig | 19 ++-
|
||||
15 files changed, 223 insertions(+), 60 deletions(-)
|
||||
create mode 100644 configs/stm32mp13_defconfig
|
||||
|
||||
diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig
|
||||
index b0dcb38b3b..06e4631d9f 100644
|
||||
--- a/configs/stm32f429-discovery_defconfig
|
||||
+++ b/configs/stm32f429-discovery_defconfig
|
||||
@@ -10,6 +10,7 @@ CONFIG_STM32F4=y
|
||||
CONFIG_TARGET_STM32F429_DISCOVERY=y
|
||||
CONFIG_ENV_VARS_UBOOT_CONFIG=y
|
||||
CONFIG_BOOTDELAY=3
|
||||
+CONFIG_BOOTCOMMAND="run bootcmd_romfs"
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
@@ -26,3 +27,4 @@ CONFIG_ENV_ADDR=0x8040000
|
||||
# CONFIG_NET is not set
|
||||
# CONFIG_MMC is not set
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
+CONFIG_STM32_FLASH=y
|
||||
diff --git a/configs/stm32f429-evaluation_defconfig b/configs/stm32f429-evaluation_defconfig
|
||||
index b614182b4f..a15a68cee7 100644
|
||||
--- a/configs/stm32f429-evaluation_defconfig
|
||||
+++ b/configs/stm32f429-evaluation_defconfig
|
||||
@@ -26,3 +26,4 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
# CONFIG_NET is not set
|
||||
CONFIG_ARM_PL180_MMCI=y
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
+CONFIG_STM32_FLASH=y
|
||||
diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig
|
||||
index 7960618d46..0b33e0b3c8 100644
|
||||
--- a/configs/stm32f469-discovery_defconfig
|
||||
+++ b/configs/stm32f469-discovery_defconfig
|
||||
@@ -28,6 +28,7 @@ CONFIG_ARM_PL180_MMCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
+CONFIG_STM32_FLASH=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
# CONFIG_PINCTRL_FULL is not set
|
||||
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
|
||||
index 05d7ec2d79..f13d714230 100644
|
||||
--- a/configs/stm32f746-disco_defconfig
|
||||
+++ b/configs/stm32f746-disco_defconfig
|
||||
@@ -43,6 +43,7 @@ CONFIG_ARM_PL180_MMCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
+CONFIG_STM32_FLASH=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
diff --git a/configs/stm32f769-disco_defconfig b/configs/stm32f769-disco_defconfig
|
||||
index 40f94ac772..2706d41956 100644
|
||||
--- a/configs/stm32f769-disco_defconfig
|
||||
+++ b/configs/stm32f769-disco_defconfig
|
||||
@@ -42,6 +42,7 @@ CONFIG_ARM_PL180_MMCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
+CONFIG_STM32_FLASH=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..2429c3f411
|
||||
--- /dev/null
|
||||
+++ b/configs/stm32mp13_defconfig
|
||||
@@ -0,0 +1,143 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_STM32MP=y
|
||||
+CONFIG_TFABOOT=y
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x180000
|
||||
+CONFIG_SYS_MEMTEST_START=0xc0000000
|
||||
+CONFIG_SYS_MEMTEST_END=0xc4000000
|
||||
+CONFIG_ENV_OFFSET=0x900000
|
||||
+CONFIG_ENV_SECT_SIZE=0x40000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="stm32mp135f-dk"
|
||||
+CONFIG_STM32MP13x=y
|
||||
+CONFIG_DDR_CACHEABLE_SIZE=0x10000000
|
||||
+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_DISTRO_DEFAULTS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=1
|
||||
+CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
+CONFIG_SYS_PROMPT="STM32MP> "
|
||||
+CONFIG_CMD_ADTIMG=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_NVEDIT_EFI=y
|
||||
+CONFIG_CMD_MEMINFO=y
|
||||
+CONFIG_CMD_MEMTEST=y
|
||||
+CONFIG_CMD_UNZIP=y
|
||||
+CONFIG_CMD_ADC=y
|
||||
+CONFIG_CMD_CLK=y
|
||||
+CONFIG_CMD_DFU=y
|
||||
+CONFIG_CMD_FUSE=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_SPI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
+CONFIG_CMD_BMP=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_EFIDEBUG=y
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_RNG=y
|
||||
+CONFIG_CMD_TIMER=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+CONFIG_CMD_EXT4_WRITE=y
|
||||
+CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_CMD_LOG=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_ENV_IS_NOWHERE=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="UBI"
|
||||
+CONFIG_ENV_UBI_VOLUME="uboot_config"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="uboot_config_r"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=-1
|
||||
+CONFIG_STM32_ADC=y
|
||||
+CONFIG_CLK_SCMI=y
|
||||
+CONFIG_SET_DFU_ALT_INFO=y
|
||||
+CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||
+CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
|
||||
+CONFIG_FASTBOOT_BUF_SIZE=0x02000000
|
||||
+CONFIG_FASTBOOT_USB_DEV=1
|
||||
+CONFIG_FASTBOOT_FLASH=y
|
||||
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_DM_I2C=y
|
||||
+CONFIG_SYS_I2C_STM32F7=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_STM32_FMC2_EBI=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_STM32_SDMMC2=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_SYS_MTDPARTS_RUNTIME=y
|
||||
+CONFIG_MTD_RAW_NAND=y
|
||||
+CONFIG_NAND_STM32_FMC2=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_SPANSION=y
|
||||
+CONFIG_SPI_FLASH_STMICRO=y
|
||||
+CONFIG_SPI_FLASH_WINBOND=y
|
||||
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
+CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_PHY_REALTEK=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_DWC_ETH_QOS=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_STM32_USBPHYC=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MCP23017=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_REGULATOR_SCMI=y
|
||||
+CONFIG_RESET_SCMI=y
|
||||
+CONFIG_DM_RNG=y
|
||||
+CONFIG_RNG_OPTEE=y
|
||||
+CONFIG_DM_RTC=y
|
||||
+CONFIG_RTC_STM32=y
|
||||
+CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_STM32_QSPI=y
|
||||
+CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_PSCI=y
|
||||
+CONFIG_TEE=y
|
||||
+CONFIG_OPTEE=y
|
||||
+# CONFIG_OPTEE_TA_AVB is not set
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_DM_USB_GADGET=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_TYPEC=y
|
||||
+CONFIG_TYPEC_UCSI=y
|
||||
+CONFIG_UCSI_STM32G0=y
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
|
||||
+CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
+CONFIG_USB_GADGET_PRODUCT_NUM=0x5720
|
||||
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_BACKLIGHT_GPIO=y
|
||||
+CONFIG_VIDEO_STM32=y
|
||||
+CONFIG_VIDEO_STM32_MAX_XRES=480
|
||||
+CONFIG_VIDEO_STM32_MAX_YRES=272
|
||||
+CONFIG_VIDEO_BMP_RLE8=y
|
||||
+CONFIG_BMP_16BPP=y
|
||||
+CONFIG_BMP_24BPP=y
|
||||
+CONFIG_BMP_32BPP=y
|
||||
+CONFIG_WDT=y
|
||||
+CONFIG_WDT_STM32MP=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
+CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
+# CONFIG_LMB_USE_MAX_REGIONS is not set
|
||||
+CONFIG_LMB_MEMORY_REGIONS=2
|
||||
+CONFIG_LMB_RESERVED_REGIONS=16
|
||||
diff --git a/configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig b/configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig
|
||||
index a7e5f566b0..f1120b8b64 100644
|
||||
--- a/configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig
|
||||
+++ b/configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig
|
||||
@@ -50,8 +50,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -72,7 +70,9 @@ CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig b/configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig
|
||||
index 4860ae4451..3de88ac9f7 100644
|
||||
--- a/configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig
|
||||
+++ b/configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig
|
||||
@@ -50,8 +50,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -72,7 +70,9 @@ CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig b/configs/stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig
|
||||
index b075365182..6ff354dd18 100644
|
||||
--- a/configs/stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig
|
||||
+++ b/configs/stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig
|
||||
@@ -50,8 +50,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -72,7 +70,9 @@ CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig b/configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig
|
||||
index be68c8a397..d51ceb7e47 100644
|
||||
--- a/configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig
|
||||
+++ b/configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig
|
||||
@@ -50,8 +50,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -72,7 +70,9 @@ CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
|
||||
index 9cf6ab1f0f..9cd37aa722 100644
|
||||
--- a/configs/stm32mp15_basic_defconfig
|
||||
+++ b/configs/stm32mp15_basic_defconfig
|
||||
@@ -1,6 +1,6 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_STM32MP=y
|
||||
-CONFIG_SYS_MALLOC_F_LEN=0x3000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x10000
|
||||
CONFIG_SYS_MEMTEST_START=0xc0000000
|
||||
CONFIG_SYS_MEMTEST_END=0xc4000000
|
||||
CONFIG_ENV_OFFSET=0x280000
|
||||
@@ -10,11 +10,10 @@ CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1"
|
||||
CONFIG_SPL_TEXT_BASE=0x2FFC2500
|
||||
CONFIG_SPL_MMC_SUPPORT=y
|
||||
CONFIG_SPL=y
|
||||
-CONFIG_TARGET_ST_STM32MP15x=y
|
||||
CONFIG_CMD_STM32KEY=y
|
||||
-CONFIG_CMD_STM32PROG=y
|
||||
+CONFIG_TARGET_ST_STM32MP15x=y
|
||||
CONFIG_ENV_OFFSET_REDUND=0x2C0000
|
||||
-CONFIG_TYPEC_STUSB160X=y
|
||||
+CONFIG_CMD_STM32PROG=y
|
||||
CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
# CONFIG_ARMV7_VIRT is not set
|
||||
@@ -33,6 +32,7 @@ CONFIG_SPL_DM_SPI_FLASH=y
|
||||
CONFIG_SPL_POWER=y
|
||||
CONFIG_SPL_SPI_FLASH_MTD=y
|
||||
CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
CONFIG_CMD_ERASEENV=y
|
||||
@@ -101,8 +101,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -145,10 +143,13 @@ CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_STM32_QSPI=y
|
||||
CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_TYPEC=y
|
||||
+CONFIG_TYPEC_STUSB160X=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
@@ -158,6 +159,7 @@ CONFIG_DM_VIDEO=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y
|
||||
CONFIG_VIDEO_LCD_RAYDIUM_RM68200=y
|
||||
+CONFIG_VIDEO_LCD_ROCKTECH_HX8394=y
|
||||
CONFIG_VIDEO_STM32=y
|
||||
CONFIG_VIDEO_STM32_DSI=y
|
||||
CONFIG_VIDEO_STM32_MAX_XRES=1280
|
||||
@@ -168,6 +170,7 @@ CONFIG_BMP_24BPP=y
|
||||
CONFIG_BMP_32BPP=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
# CONFIG_LMB_USE_MAX_REGIONS is not set
|
||||
diff --git a/configs/stm32mp15_defconfig b/configs/stm32mp15_defconfig
|
||||
index e725b916b9..b4b2954273 100644
|
||||
--- a/configs/stm32mp15_defconfig
|
||||
+++ b/configs/stm32mp15_defconfig
|
||||
@@ -1,21 +1,23 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_STM32MP=y
|
||||
CONFIG_TFABOOT=y
|
||||
-CONFIG_SYS_MALLOC_F_LEN=0x3000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x80000
|
||||
CONFIG_SYS_MEMTEST_START=0xc0000000
|
||||
CONFIG_SYS_MEMTEST_END=0xc4000000
|
||||
-CONFIG_ENV_OFFSET=0x480000
|
||||
+CONFIG_ENV_OFFSET=0x900000
|
||||
CONFIG_ENV_SECT_SIZE=0x40000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1"
|
||||
-CONFIG_TARGET_ST_STM32MP15x=y
|
||||
+CONFIG_DDR_CACHEABLE_SIZE=0x10000000
|
||||
CONFIG_CMD_STM32KEY=y
|
||||
+CONFIG_TARGET_ST_STM32MP15x=y
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x940000
|
||||
CONFIG_CMD_STM32PROG=y
|
||||
-CONFIG_ENV_OFFSET_REDUND=0x4C0000
|
||||
-CONFIG_TYPEC_STUSB160X=y
|
||||
+# CONFIG_ARMV7_NONSEC is not set
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
CONFIG_CMD_ERASEENV=y
|
||||
@@ -81,8 +83,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -113,9 +113,11 @@ CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_DM_REGULATOR_STM32_VREFBUF=y
|
||||
CONFIG_DM_REGULATOR_STPMIC1=y
|
||||
+CONFIG_REMOTEPROC_OPTEE=y
|
||||
CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_RESET_SCMI=y
|
||||
CONFIG_DM_RNG=y
|
||||
+CONFIG_RNG_OPTEE=y
|
||||
CONFIG_RNG_STM32MP1=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
@@ -124,6 +126,7 @@ CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_STM32_QSPI=y
|
||||
CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_PSCI=y
|
||||
CONFIG_TEE=y
|
||||
CONFIG_OPTEE=y
|
||||
# CONFIG_OPTEE_TA_AVB is not set
|
||||
@@ -131,6 +134,8 @@ CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_TYPEC=y
|
||||
+CONFIG_TYPEC_STUSB160X=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
@@ -140,6 +145,7 @@ CONFIG_DM_VIDEO=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y
|
||||
CONFIG_VIDEO_LCD_RAYDIUM_RM68200=y
|
||||
+CONFIG_VIDEO_LCD_ROCKTECH_HX8394=y
|
||||
CONFIG_VIDEO_STM32=y
|
||||
CONFIG_VIDEO_STM32_DSI=y
|
||||
CONFIG_VIDEO_STM32_MAX_XRES=1280
|
||||
@@ -150,6 +156,7 @@ CONFIG_BMP_24BPP=y
|
||||
CONFIG_BMP_32BPP=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
# CONFIG_LMB_USE_MAX_REGIONS is not set
|
||||
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
|
||||
index c2227c06b0..81d83c58d5 100644
|
||||
--- a/configs/stm32mp15_dhcom_basic_defconfig
|
||||
+++ b/configs/stm32mp15_dhcom_basic_defconfig
|
||||
@@ -21,6 +21,7 @@ CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its"
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
|
||||
@@ -51,7 +52,6 @@ CONFIG_CMD_REMOTEPROC=y
|
||||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
-CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
CONFIG_CMD_TIMER=y
|
||||
@@ -59,7 +59,11 @@ CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
|
||||
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+# CONFIG_ISO_PARTITION is not set
|
||||
+# CONFIG_SPL_PARTITION_UUIDS is not set
|
||||
CONFIG_OF_LIST="stm32mp15xx-dhcom-pdk2 stm32mp15xx-dhcom-drc02 stm32mp15xx-dhcom-picoitx"
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-names interrupts-extended interrupt-controller \\\#interrupt-cells interrupt-parent dmas dma-names assigned-clocks assigned-clock-rates assigned-clock-parents hwlocks"
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
@@ -68,7 +72,7 @@ CONFIG_ENV_SPI_BUS=0
|
||||
CONFIG_USE_ENV_SPI_CS=y
|
||||
CONFIG_ENV_SPI_CS=0
|
||||
CONFIG_USE_ENV_SPI_MAX_HZ=y
|
||||
-CONFIG_ENV_SPI_MAX_HZ=10000000
|
||||
+CONFIG_ENV_SPI_MAX_HZ=50000000
|
||||
CONFIG_USE_ENV_SPI_MODE=y
|
||||
CONFIG_ENV_SPI_MODE=0x0
|
||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
@@ -80,6 +84,7 @@ CONFIG_STM32_ADC=y
|
||||
CONFIG_SPL_BLOCK_CACHE=y
|
||||
CONFIG_DFU_MMC=y
|
||||
CONFIG_DFU_RAM=y
|
||||
+CONFIG_DFU_MTD=y
|
||||
CONFIG_DFU_VIRT=y
|
||||
CONFIG_SET_DFU_ALT_INFO=y
|
||||
CONFIG_GPIO_HOG=y
|
||||
@@ -89,16 +94,16 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_I2C_EEPROM=y
|
||||
CONFIG_SYS_I2C_EEPROM_ADDR=0x50
|
||||
CONFIG_SYS_I2C_EEPROM_BUS=3
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
CONFIG_MTD=y
|
||||
-CONFIG_SYS_MTDPARTS_RUNTIME=y
|
||||
+CONFIG_DM_MTD=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=50000000
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_SPANSION=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
@@ -128,6 +133,7 @@ CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_STM32_QSPI=y
|
||||
CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
@@ -140,17 +146,8 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0x5720
|
||||
CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
-CONFIG_DM_VIDEO=y
|
||||
-CONFIG_BACKLIGHT_GPIO=y
|
||||
-CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y
|
||||
-CONFIG_VIDEO_LCD_RAYDIUM_RM68200=y
|
||||
-CONFIG_VIDEO_STM32=y
|
||||
-CONFIG_VIDEO_STM32_DSI=y
|
||||
-CONFIG_VIDEO_STM32_MAX_XRES=1280
|
||||
-CONFIG_VIDEO_STM32_MAX_YRES=800
|
||||
-CONFIG_VIDEO_BMP_RLE8=y
|
||||
-CONFIG_BMP_16BPP=y
|
||||
-CONFIG_BMP_24BPP=y
|
||||
-CONFIG_BMP_32BPP=y
|
||||
+CONFIG_FAT_WRITE=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
+# CONFIG_EFI_LOADER is not set
|
||||
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
|
||||
index 11750cb67b..e0c25015cc 100644
|
||||
--- a/configs/stm32mp15_dhcor_basic_defconfig
|
||||
+++ b/configs/stm32mp15_dhcor_basic_defconfig
|
||||
@@ -19,6 +19,7 @@ CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its"
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
|
||||
@@ -49,7 +50,6 @@ CONFIG_CMD_REMOTEPROC=y
|
||||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
-CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
CONFIG_CMD_TIMER=y
|
||||
@@ -57,7 +57,11 @@ CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
|
||||
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+# CONFIG_ISO_PARTITION is not set
|
||||
+# CONFIG_SPL_PARTITION_UUIDS is not set
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-names interrupts-extended interrupt-controller \\\#interrupt-cells interrupt-parent dmas dma-names assigned-clocks assigned-clock-rates assigned-clock-parents hwlocks"
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
CONFIG_USE_ENV_SPI_BUS=y
|
||||
@@ -65,7 +69,7 @@ CONFIG_ENV_SPI_BUS=0
|
||||
CONFIG_USE_ENV_SPI_CS=y
|
||||
CONFIG_ENV_SPI_CS=0
|
||||
CONFIG_USE_ENV_SPI_MAX_HZ=y
|
||||
-CONFIG_ENV_SPI_MAX_HZ=10000000
|
||||
+CONFIG_ENV_SPI_MAX_HZ=50000000
|
||||
CONFIG_USE_ENV_SPI_MODE=y
|
||||
CONFIG_ENV_SPI_MODE=0x0
|
||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
@@ -77,6 +81,7 @@ CONFIG_STM32_ADC=y
|
||||
CONFIG_SPL_BLOCK_CACHE=y
|
||||
CONFIG_DFU_MMC=y
|
||||
CONFIG_DFU_RAM=y
|
||||
+CONFIG_DFU_MTD=y
|
||||
CONFIG_DFU_VIRT=y
|
||||
CONFIG_GPIO_HOG=y
|
||||
CONFIG_DM_HWSPINLOCK=y
|
||||
@@ -85,20 +90,23 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_I2C_EEPROM=y
|
||||
CONFIG_SYS_I2C_EEPROM_ADDR=0x53
|
||||
CONFIG_SYS_I2C_EEPROM_BUS=2
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=50000000
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_SPANSION=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_PHY_MICREL=y
|
||||
+CONFIG_PHY_MICREL_KSZ90X1=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_PHY=y
|
||||
@@ -122,6 +130,7 @@ CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_STM32_QSPI=y
|
||||
CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
@@ -134,17 +143,8 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0x5720
|
||||
CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
-CONFIG_DM_VIDEO=y
|
||||
-CONFIG_BACKLIGHT_GPIO=y
|
||||
-CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y
|
||||
-CONFIG_VIDEO_LCD_RAYDIUM_RM68200=y
|
||||
-CONFIG_VIDEO_STM32=y
|
||||
-CONFIG_VIDEO_STM32_DSI=y
|
||||
-CONFIG_VIDEO_STM32_MAX_XRES=1280
|
||||
-CONFIG_VIDEO_STM32_MAX_YRES=800
|
||||
-CONFIG_VIDEO_BMP_RLE8=y
|
||||
-CONFIG_BMP_16BPP=y
|
||||
-CONFIG_BMP_24BPP=y
|
||||
-CONFIG_BMP_32BPP=y
|
||||
+CONFIG_FAT_WRITE=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_LZO=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
+# CONFIG_EFI_LOADER is not set
|
||||
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
|
||||
index 2e2f0c76ca..17233a596f 100644
|
||||
--- a/configs/stm32mp15_trusted_defconfig
|
||||
+++ b/configs/stm32mp15_trusted_defconfig
|
||||
@@ -1,22 +1,24 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_STM32MP=y
|
||||
CONFIG_TFABOOT=y
|
||||
-CONFIG_SYS_MALLOC_F_LEN=0x3000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x10000
|
||||
CONFIG_SYS_MEMTEST_START=0xc0000000
|
||||
CONFIG_SYS_MEMTEST_END=0xc4000000
|
||||
CONFIG_ENV_OFFSET=0x280000
|
||||
CONFIG_ENV_SECT_SIZE=0x40000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1"
|
||||
+CONFIG_DDR_CACHEABLE_SIZE=0x10000000
|
||||
+CONFIG_CMD_STM32KEY=y
|
||||
CONFIG_STM32MP15x_STM32IMAGE=y
|
||||
CONFIG_TARGET_ST_STM32MP15x=y
|
||||
-CONFIG_CMD_STM32KEY=y
|
||||
-CONFIG_CMD_STM32PROG=y
|
||||
CONFIG_ENV_OFFSET_REDUND=0x2C0000
|
||||
-CONFIG_TYPEC_STUSB160X=y
|
||||
+CONFIG_CMD_STM32PROG=y
|
||||
+# CONFIG_ARMV7_NONSEC is not set
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
CONFIG_CMD_ERASEENV=y
|
||||
@@ -82,8 +84,6 @@ CONFIG_DM_I2C=y
|
||||
CONFIG_SYS_I2C_STM32F7=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
-CONFIG_DM_MAILBOX=y
|
||||
-CONFIG_STM32_IPCC=y
|
||||
CONFIG_STM32_FMC2_EBI=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_STM32_SDMMC2=y
|
||||
@@ -114,9 +114,11 @@ CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_DM_REGULATOR_STM32_VREFBUF=y
|
||||
CONFIG_DM_REGULATOR_STPMIC1=y
|
||||
+CONFIG_REMOTEPROC_OPTEE=y
|
||||
CONFIG_REMOTEPROC_STM32_COPRO=y
|
||||
CONFIG_RESET_SCMI=y
|
||||
CONFIG_DM_RNG=y
|
||||
+CONFIG_RNG_OPTEE=y
|
||||
CONFIG_RNG_STM32MP1=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_STM32=y
|
||||
@@ -125,6 +127,7 @@ CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_STM32_QSPI=y
|
||||
CONFIG_STM32_SPI=y
|
||||
+CONFIG_SYSRESET_PSCI=y
|
||||
CONFIG_TEE=y
|
||||
CONFIG_OPTEE=y
|
||||
# CONFIG_OPTEE_TA_AVB is not set
|
||||
@@ -132,6 +135,8 @@ CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_TYPEC=y
|
||||
+CONFIG_TYPEC_STUSB160X=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x0483
|
||||
@@ -141,6 +146,7 @@ CONFIG_DM_VIDEO=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y
|
||||
CONFIG_VIDEO_LCD_RAYDIUM_RM68200=y
|
||||
+CONFIG_VIDEO_LCD_ROCKTECH_HX8394=y
|
||||
CONFIG_VIDEO_STM32=y
|
||||
CONFIG_VIDEO_STM32_DSI=y
|
||||
CONFIG_VIDEO_STM32_MAX_XRES=1280
|
||||
@@ -151,6 +157,7 @@ CONFIG_BMP_24BPP=y
|
||||
CONFIG_BMP_32BPP=y
|
||||
CONFIG_WDT=y
|
||||
CONFIG_WDT_STM32MP=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||
# CONFIG_LMB_USE_MAX_REGIONS is not set
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,340 +0,0 @@
|
||||
From 77f5697167358c634bee38a98ad059f1b6b33dbf Mon Sep 17 00:00:00 2001
|
||||
From: Romuald JEANNE <romuald.jeanne@st.com>
|
||||
Date: Tue, 25 May 2021 20:18:25 +0200
|
||||
Subject: [PATCH 6/7] ARM v2020.10-stm32mp-r1.1
|
||||
|
||||
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
.../mach-stm32mp/cmd_stm32prog/stm32prog.c | 14 +-
|
||||
.../mach-stm32mp/cmd_stm32prog/stm32prog.h | 5 -
|
||||
.../cmd_stm32prog/stm32prog_serial.c | 163 +++---------------
|
||||
4 files changed, 33 insertions(+), 151 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6bd0841c4b..59493deed3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
VERSION = 2020
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL =
|
||||
-EXTRAVERSION = -stm32mp-r1
|
||||
+EXTRAVERSION = -stm32mp-r1.1
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
index 627bb52a11..7cd31462ba 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
@@ -368,23 +368,24 @@ static int parse_flash_layout(struct stm32prog_data *data,
|
||||
bool end_of_line, eof;
|
||||
char *p, *start, *last, *col;
|
||||
struct stm32prog_part_t *part;
|
||||
+ struct image_header_s header;
|
||||
int part_list_size;
|
||||
int i;
|
||||
|
||||
data->part_nb = 0;
|
||||
|
||||
/* check if STM32image is detected */
|
||||
- stm32prog_header_check((struct raw_header_s *)addr, &data->header);
|
||||
- if (data->header.type == HEADER_STM32IMAGE) {
|
||||
+ stm32prog_header_check((struct raw_header_s *)addr, &header);
|
||||
+ if (header.type == HEADER_STM32IMAGE) {
|
||||
u32 checksum;
|
||||
|
||||
addr = addr + BL_HEADER_SIZE;
|
||||
- size = data->header.image_length;
|
||||
+ size = header.image_length;
|
||||
|
||||
- checksum = stm32prog_header_checksum(addr, &data->header);
|
||||
- if (checksum != data->header.image_checksum) {
|
||||
+ checksum = stm32prog_header_checksum(addr, &header);
|
||||
+ if (checksum != header.image_checksum) {
|
||||
stm32prog_err("Layout: invalid checksum : 0x%x expected 0x%x",
|
||||
- checksum, data->header.image_checksum);
|
||||
+ checksum, header.image_checksum);
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
@@ -1730,7 +1731,6 @@ void stm32prog_clean(struct stm32prog_data *data)
|
||||
free(data->part_array);
|
||||
free(data->otp_part);
|
||||
free(data->buffer);
|
||||
- free(data->header_data);
|
||||
}
|
||||
|
||||
/* DFU callback: used after serial and direct DFU USB access */
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
index fadcd1fa8f..eebc4d2e71 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
@@ -134,14 +134,9 @@ struct stm32prog_data {
|
||||
u32 *otp_part;
|
||||
u8 pmic_part[PMIC_SIZE];
|
||||
|
||||
- /* STM32 header information */
|
||||
- struct raw_header_s *header_data;
|
||||
- struct image_header_s header;
|
||||
-
|
||||
/* SERIAL information */
|
||||
u32 cursor;
|
||||
u32 packet_number;
|
||||
- u32 checksum;
|
||||
u8 *buffer; /* size = USART_RAM_BUFFER_SIZE*/
|
||||
int dfu_seq;
|
||||
u8 read_phase;
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
index 0c3c215b3d..a0bf7e1884 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
@@ -59,6 +59,9 @@ const u8 cmd_id[] = {
|
||||
|
||||
#define NB_CMD sizeof(cmd_id)
|
||||
|
||||
+/* with 115200 bauds, 20 ms allow to receive the 256 bytes buffer */
|
||||
+#define TIMEOUT_SERIAL_BUFFER 30
|
||||
+
|
||||
/* DFU support for serial *********************************************/
|
||||
static struct dfu_entity *stm32prog_get_entity(struct stm32prog_data *data)
|
||||
{
|
||||
@@ -263,6 +266,7 @@ static bool stm32prog_serial_get_buffer(u8 *buffer, u32 *count)
|
||||
{
|
||||
struct dm_serial_ops *ops = serial_get_ops(down_serial_dev);
|
||||
int err;
|
||||
+ ulong start = get_timer(0);
|
||||
|
||||
do {
|
||||
err = ops->getc(down_serial_dev);
|
||||
@@ -272,6 +276,10 @@ static bool stm32prog_serial_get_buffer(u8 *buffer, u32 *count)
|
||||
} else if (err == -EAGAIN) {
|
||||
ctrlc();
|
||||
WATCHDOG_RESET();
|
||||
+ if (get_timer(start) > TIMEOUT_SERIAL_BUFFER) {
|
||||
+ err = -ETIMEDOUT;
|
||||
+ break;
|
||||
+ }
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -291,56 +299,6 @@ static void stm32prog_serial_putc(u8 w_byte)
|
||||
}
|
||||
|
||||
/* Helper function ************************************************/
|
||||
-
|
||||
-static u8 stm32prog_header(struct stm32prog_data *data)
|
||||
-{
|
||||
- u8 ret;
|
||||
- u8 boot = 0;
|
||||
- struct dfu_entity *dfu_entity;
|
||||
- u64 size = 0;
|
||||
-
|
||||
- dfu_entity = stm32prog_get_entity(data);
|
||||
- if (!dfu_entity)
|
||||
- return -ENODEV;
|
||||
-
|
||||
- printf("\nSTM32 download write %s\n", dfu_entity->name);
|
||||
-
|
||||
- /* force cleanup to avoid issue with previous read */
|
||||
- dfu_transaction_cleanup(dfu_entity);
|
||||
-
|
||||
- stm32prog_header_check(data->header_data, &data->header);
|
||||
-
|
||||
- /* no stm32 image header : max size is partition size */
|
||||
- if (data->header.type != HEADER_STM32IMAGE) {
|
||||
- dfu_entity->get_medium_size(dfu_entity, &size);
|
||||
- data->header.image_length = size;
|
||||
- }
|
||||
-
|
||||
- /**** Flash the header if necessary for boot partition */
|
||||
- if (data->phase < PHASE_FIRST_USER)
|
||||
- boot = 1;
|
||||
-
|
||||
- /* write header if boot partition */
|
||||
- if (boot) {
|
||||
- if (ret) {
|
||||
- stm32prog_err("invalid header (error %d)", ret);
|
||||
- } else {
|
||||
- ret = stm32prog_write(data,
|
||||
- (u8 *)data->header_data,
|
||||
- BL_HEADER_SIZE);
|
||||
- }
|
||||
- } else {
|
||||
- if (ret)
|
||||
- printf(" partition without checksum\n");
|
||||
- ret = 0;
|
||||
- }
|
||||
-
|
||||
- free(data->header_data);
|
||||
- data->header_data = NULL;
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
|
||||
{
|
||||
u8 ret = 0;
|
||||
@@ -387,23 +345,6 @@ static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
|
||||
data->dfu_seq = 0;
|
||||
|
||||
printf("\n received length = 0x%x\n", data->cursor);
|
||||
- if (data->header.type == HEADER_STM32IMAGE) {
|
||||
- if (data->cursor !=
|
||||
- (data->header.image_length + BL_HEADER_SIZE)) {
|
||||
- stm32prog_err("transmission interrupted (length=0x%x expected=0x%x)",
|
||||
- data->cursor,
|
||||
- data->header.image_length +
|
||||
- BL_HEADER_SIZE);
|
||||
- return -EIO;
|
||||
- }
|
||||
- if (data->header.image_checksum != data->checksum) {
|
||||
- stm32prog_err("invalid checksum received (0x%x expected 0x%x)",
|
||||
- data->checksum,
|
||||
- data->header.image_checksum);
|
||||
- return -EIO;
|
||||
- }
|
||||
- printf("\n checksum OK (0x%x)\n", data->checksum);
|
||||
- }
|
||||
|
||||
/* update DFU with received flashlayout */
|
||||
if (data->phase == PHASE_FLASHLAYOUT)
|
||||
@@ -626,14 +567,12 @@ static void download_command(struct stm32prog_data *data)
|
||||
u32 counter = 0x0, codesize = 0x0;
|
||||
u8 *ramaddress = 0;
|
||||
u8 rcv_data = 0x0;
|
||||
- struct image_header_s *image_header = &data->header;
|
||||
u32 cursor = data->cursor;
|
||||
long size = 0;
|
||||
u8 operation;
|
||||
u32 packet_number;
|
||||
u32 result = ACK_BYTE;
|
||||
u8 ret;
|
||||
- unsigned int i;
|
||||
bool error;
|
||||
int rcv;
|
||||
|
||||
@@ -667,13 +606,8 @@ static void download_command(struct stm32prog_data *data)
|
||||
if (packet_number == 0) {
|
||||
/* erase: re-initialize the image_header struct */
|
||||
data->packet_number = 0;
|
||||
- if (data->header_data)
|
||||
- memset(data->header_data, 0, BL_HEADER_SIZE);
|
||||
- else
|
||||
- data->header_data = calloc(1, BL_HEADER_SIZE);
|
||||
cursor = 0;
|
||||
data->cursor = 0;
|
||||
- data->checksum = 0;
|
||||
/*idx = cursor;*/
|
||||
} else {
|
||||
data->packet_number++;
|
||||
@@ -721,7 +655,7 @@ static void download_command(struct stm32prog_data *data)
|
||||
printf("transmission error on packet %d, byte %d\n",
|
||||
packet_number, codesize - counter);
|
||||
/* waiting end of packet before flush & NACK */
|
||||
- mdelay(30);
|
||||
+ mdelay(TIMEOUT_SERIAL_BUFFER);
|
||||
data->packet_number--;
|
||||
result = NACK_BYTE;
|
||||
goto end;
|
||||
@@ -739,80 +673,33 @@ static void download_command(struct stm32prog_data *data)
|
||||
/* wait to be sure that all data are received
|
||||
* in the FIFO before flush
|
||||
*/
|
||||
- mdelay(30);
|
||||
+ mdelay(TIMEOUT_SERIAL_BUFFER);
|
||||
data->packet_number--;
|
||||
result = NACK_BYTE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
- /* Update current position in buffer */
|
||||
- data->cursor += codesize;
|
||||
-
|
||||
- if (operation == PHASE_OTP) {
|
||||
- size = data->cursor - cursor;
|
||||
- /* no header for OTP */
|
||||
- if (stm32prog_otp_write(data, cursor,
|
||||
- data->buffer, &size))
|
||||
- result = ABORT_BYTE;
|
||||
- goto end;
|
||||
- }
|
||||
+ switch (operation) {
|
||||
+ case PHASE_OTP:
|
||||
+ size = codesize;
|
||||
+ ret = stm32prog_otp_write(data, cursor, data->buffer, &size);
|
||||
+ break;
|
||||
|
||||
- if (operation == PHASE_PMIC) {
|
||||
- size = data->cursor - cursor;
|
||||
- /* no header for PMIC */
|
||||
- if (stm32prog_pmic_write(data, cursor,
|
||||
- data->buffer, &size))
|
||||
- result = ABORT_BYTE;
|
||||
- goto end;
|
||||
- }
|
||||
+ case PHASE_PMIC:
|
||||
+ size = codesize;
|
||||
+ ret = stm32prog_pmic_write(data, cursor, data->buffer, &size);
|
||||
+ break;
|
||||
|
||||
- if (cursor < BL_HEADER_SIZE) {
|
||||
- /* size = portion of header in this chunck */
|
||||
- if (data->cursor >= BL_HEADER_SIZE)
|
||||
- size = BL_HEADER_SIZE - cursor;
|
||||
- else
|
||||
- size = data->cursor - cursor;
|
||||
- memcpy((void *)((u32)(data->header_data) + cursor),
|
||||
- data->buffer, size);
|
||||
- cursor += size;
|
||||
-
|
||||
- if (cursor == BL_HEADER_SIZE) {
|
||||
- /* Check and Write the header */
|
||||
- if (stm32prog_header(data)) {
|
||||
- result = ABORT_BYTE;
|
||||
- goto end;
|
||||
- }
|
||||
- } else {
|
||||
- goto end;
|
||||
- }
|
||||
+ default:
|
||||
+ ret = stm32prog_write(data, data->buffer, codesize);
|
||||
+ break;
|
||||
}
|
||||
|
||||
- if (data->header.type == HEADER_STM32IMAGE) {
|
||||
- if (data->cursor <= BL_HEADER_SIZE)
|
||||
- goto end;
|
||||
- /* compute checksum on payload */
|
||||
- for (i = (unsigned long)size; i < codesize; i++)
|
||||
- data->checksum += data->buffer[i];
|
||||
-
|
||||
- if (data->cursor >
|
||||
- image_header->image_length + BL_HEADER_SIZE) {
|
||||
- pr_err("expected size exceeded\n");
|
||||
- result = ABORT_BYTE;
|
||||
- goto end;
|
||||
- }
|
||||
-
|
||||
- /* write data (payload) */
|
||||
- ret = stm32prog_write(data,
|
||||
- &data->buffer[size],
|
||||
- codesize - size);
|
||||
- } else {
|
||||
- /* write all */
|
||||
- ret = stm32prog_write(data,
|
||||
- data->buffer,
|
||||
- codesize);
|
||||
- }
|
||||
if (ret)
|
||||
result = ABORT_BYTE;
|
||||
+ else
|
||||
+ /* Update current position in buffer */
|
||||
+ data->cursor += codesize;
|
||||
|
||||
end:
|
||||
stm32prog_serial_result(result);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,946 +0,0 @@
|
||||
From 85fa6b016df48fdd465f8b5314b2e96a575c3228 Mon Sep 17 00:00:00 2001
|
||||
From: Lionel Vitte <lionel.vitte@st.com>
|
||||
Date: Mon, 18 Oct 2021 17:10:29 +0200
|
||||
Subject: [PATCH 07/11] ARM v2020.10-stm32mp-r2 MACHINE
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
arch/arm/cpu/armv7/cache_v7.c | 3 -
|
||||
arch/arm/include/asm/cache.h | 1 -
|
||||
arch/arm/include/asm/system.h | 18 +-
|
||||
arch/arm/lib/cache-cp15.c | 13 +-
|
||||
arch/arm/mach-omap2/omap-cache.c | 17 --
|
||||
arch/arm/mach-stm32mp/Kconfig | 4 +-
|
||||
arch/arm/mach-stm32mp/cmd_stm32key.c | 235 +++++++++++++++---
|
||||
.../cmd_stm32prog/cmd_stm32prog.c | 36 ++-
|
||||
.../mach-stm32mp/cmd_stm32prog/stm32prog.c | 35 ++-
|
||||
.../mach-stm32mp/cmd_stm32prog/stm32prog.h | 3 +
|
||||
.../cmd_stm32prog/stm32prog_serial.c | 10 +-
|
||||
.../cmd_stm32prog/stm32prog_usb.c | 9 +-
|
||||
arch/arm/mach-stm32mp/cpu.c | 61 ++++-
|
||||
arch/arm/mach-stm32mp/dram_init.c | 19 +-
|
||||
arch/arm/mach-stm32mp/syscon.c | 14 ++
|
||||
16 files changed, 351 insertions(+), 129 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 59493deed3..25a42acc37 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
VERSION = 2020
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL =
|
||||
-EXTRAVERSION = -stm32mp-r1.1
|
||||
+EXTRAVERSION = -stm32mp-r2
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
|
||||
index 146cf52608..19ff432352 100644
|
||||
--- a/arch/arm/cpu/armv7/cache_v7.c
|
||||
+++ b/arch/arm/cpu/armv7/cache_v7.c
|
||||
@@ -176,9 +176,6 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop)
|
||||
{
|
||||
}
|
||||
|
||||
-void arm_init_domains(void)
|
||||
-{
|
||||
-}
|
||||
#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
|
||||
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
|
||||
index c20e05ec7f..b10edf805b 100644
|
||||
--- a/arch/arm/include/asm/cache.h
|
||||
+++ b/arch/arm/include/asm/cache.h
|
||||
@@ -35,7 +35,6 @@ void l2_cache_disable(void);
|
||||
void set_section_dcache(int section, enum dcache_option option);
|
||||
|
||||
void arm_init_before_mmu(void);
|
||||
-void arm_init_domains(void);
|
||||
void cpu_cache_initialization(void);
|
||||
void dram_bank_mmu_setup(int bank);
|
||||
|
||||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
|
||||
index 932f12af1c..cab23ca7b2 100644
|
||||
--- a/arch/arm/include/asm/system.h
|
||||
+++ b/arch/arm/include/asm/system.h
|
||||
@@ -397,20 +397,6 @@ static inline void set_cr(unsigned int val)
|
||||
isb();
|
||||
}
|
||||
|
||||
-static inline unsigned int get_dacr(void)
|
||||
-{
|
||||
- unsigned int val;
|
||||
- asm("mrc p15, 0, %0, c3, c0, 0 @ get DACR" : "=r" (val) : : "cc");
|
||||
- return val;
|
||||
-}
|
||||
-
|
||||
-static inline void set_dacr(unsigned int val)
|
||||
-{
|
||||
- asm volatile("mcr p15, 0, %0, c3, c0, 0 @ set DACR"
|
||||
- : : "r" (val) : "cc");
|
||||
- isb();
|
||||
-}
|
||||
-
|
||||
#ifdef CONFIG_ARMV7_LPAE
|
||||
/* Long-Descriptor Translation Table Level 1/2 Bits */
|
||||
#define TTB_SECT_XN_MASK (1ULL << 54)
|
||||
@@ -476,7 +462,7 @@ enum dcache_option {
|
||||
#define TTB_SECT_XN_MASK (1 << 4)
|
||||
#define TTB_SECT_C_MASK (1 << 3)
|
||||
#define TTB_SECT_B_MASK (1 << 2)
|
||||
-#define TTB_SECT (2 << 0)
|
||||
+#define TTB_SECT (2 << 0)
|
||||
|
||||
/*
|
||||
* Short-descriptor format memory region attributes, without TEX remap
|
||||
@@ -491,7 +477,7 @@ enum dcache_option {
|
||||
enum dcache_option {
|
||||
INVALID_ENTRY = 0,
|
||||
DCACHE_OFF = TTB_SECT_DOMAIN(0) | TTB_SECT_XN_MASK | TTB_SECT,
|
||||
- DCACHE_WRITETHROUGH = DCACHE_OFF | TTB_SECT_C_MASK,
|
||||
+ DCACHE_WRITETHROUGH = TTB_SECT_DOMAIN(0) | TTB_SECT | TTB_SECT_C_MASK,
|
||||
DCACHE_WRITEBACK = DCACHE_WRITETHROUGH | TTB_SECT_B_MASK,
|
||||
DCACHE_WRITEALLOC = DCACHE_WRITEBACK | TTB_SECT_TEX(1),
|
||||
};
|
||||
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
|
||||
index 94e9b9c861..369be44b17 100644
|
||||
--- a/arch/arm/lib/cache-cp15.c
|
||||
+++ b/arch/arm/lib/cache-cp15.c
|
||||
@@ -22,10 +22,6 @@ __weak void arm_init_before_mmu(void)
|
||||
{
|
||||
}
|
||||
|
||||
-__weak void arm_init_domains(void)
|
||||
-{
|
||||
-}
|
||||
-
|
||||
static void set_section_phys(int section, phys_addr_t phys,
|
||||
enum dcache_option option)
|
||||
{
|
||||
@@ -209,11 +205,12 @@ static inline void mmu_setup(void)
|
||||
asm volatile("mcr p15, 0, %0, c2, c0, 0"
|
||||
: : "r" (gd->arch.tlb_addr) : "memory");
|
||||
#endif
|
||||
- /* Set the access control to all-supervisor */
|
||||
+ /*
|
||||
+ * initial value of Domain Access Control Register (DACR)
|
||||
+ * Set the access control to client (1U) for each of the 16 domains
|
||||
+ */
|
||||
asm volatile("mcr p15, 0, %0, c3, c0, 0"
|
||||
- : : "r" (~0));
|
||||
-
|
||||
- arm_init_domains();
|
||||
+ : : "r" (0x55555555));
|
||||
|
||||
/* and enable the mmu */
|
||||
reg = get_cr(); /* get control reg. */
|
||||
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
|
||||
index 502ea6987a..451d8e4542 100644
|
||||
--- a/arch/arm/mach-omap2/omap-cache.c
|
||||
+++ b/arch/arm/mach-omap2/omap-cache.c
|
||||
@@ -40,9 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#define ARMV7_DCACHE_POLICY DCACHE_WRITEBACK & ~TTB_SECT_XN_MASK
|
||||
#endif
|
||||
|
||||
-#define ARMV7_DOMAIN_CLIENT 1
|
||||
-#define ARMV7_DOMAIN_MASK (0x3 << 0)
|
||||
-
|
||||
void enable_caches(void)
|
||||
{
|
||||
|
||||
@@ -66,17 +63,3 @@ void dram_bank_mmu_setup(int bank)
|
||||
for (i = start; i < end; i++)
|
||||
set_section_dcache(i, ARMV7_DCACHE_POLICY);
|
||||
}
|
||||
-
|
||||
-void arm_init_domains(void)
|
||||
-{
|
||||
- u32 reg;
|
||||
-
|
||||
- reg = get_dacr();
|
||||
- /*
|
||||
- * Set DOMAIN to client access so that all permissions
|
||||
- * set in pagetables are validated by the mmu.
|
||||
- */
|
||||
- reg &= ~ARMV7_DOMAIN_MASK;
|
||||
- reg |= ARMV7_DOMAIN_CLIENT;
|
||||
- set_dacr(reg);
|
||||
-}
|
||||
diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig
|
||||
index af0246d031..44bfac9000 100644
|
||||
--- a/arch/arm/mach-stm32mp/Kconfig
|
||||
+++ b/arch/arm/mach-stm32mp/Kconfig
|
||||
@@ -130,10 +130,12 @@ config STM32_ETZPC
|
||||
|
||||
config CMD_STM32KEY
|
||||
bool "command stm32key to fuse public key hash"
|
||||
- default y
|
||||
+ default n
|
||||
help
|
||||
fuse public key hash in corresponding fuse used to authenticate
|
||||
binary.
|
||||
+ This command is used to evaluate the secure boot on stm32mp SOC,
|
||||
+ it is deactivated by default in real products.
|
||||
|
||||
config PRE_CON_BUF_ADDR
|
||||
default 0xC02FF000
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
|
||||
index f191085a12..d1755f4595 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
|
||||
@@ -10,13 +10,30 @@
|
||||
#include <dm/device.h>
|
||||
#include <dm/uclass.h>
|
||||
|
||||
-#define STM32_OTP_HASH_KEY_START 24
|
||||
-#define STM32_OTP_HASH_KEY_SIZE 8
|
||||
+/* Closed device : bit 6 of OPT0*/
|
||||
+#define STM32_OTP_CLOSE_ID 0
|
||||
+#define STM32_OTP_CLOSE_MASK BIT(6)
|
||||
+
|
||||
+/* HASH of key: 8 OTPs, starting with OTP24) */
|
||||
+#define STM32_OTP_HASH_KEY_START 24
|
||||
+#define STM32_OTP_HASH_KEY_SIZE 8
|
||||
+
|
||||
+static int get_misc_dev(struct udevice **dev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(stm32mp_bsec), dev);
|
||||
+ if (ret)
|
||||
+ pr_err("Can't find stm32mp_bsec driver\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
|
||||
static void read_hash_value(u32 addr)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ printf("Read KEY at 0x%x\n", addr);
|
||||
for (i = 0; i < STM32_OTP_HASH_KEY_SIZE; i++) {
|
||||
printf("OTP value %i: %x\n", STM32_OTP_HASH_KEY_START + i,
|
||||
__be32_to_cpu(*(u32 *)addr));
|
||||
@@ -24,32 +41,101 @@ static void read_hash_value(u32 addr)
|
||||
}
|
||||
}
|
||||
|
||||
-static void fuse_hash_value(u32 addr, bool print)
|
||||
+static int read_hash_otp(bool print, bool *locked, bool *closed)
|
||||
{
|
||||
struct udevice *dev;
|
||||
- u32 word, val;
|
||||
- int i, ret;
|
||||
+ int i, word, ret;
|
||||
+ int nb_invalid = 0, nb_zero = 0, nb_lock = 0;
|
||||
+ u32 val, lock;
|
||||
+ bool status;
|
||||
|
||||
- ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
- DM_GET_DRIVER(stm32mp_bsec),
|
||||
- &dev);
|
||||
- if (ret) {
|
||||
- pr_err("Can't find stm32mp_bsec driver\n");
|
||||
- return;
|
||||
+ ret = get_misc_dev(&dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ for (i = 0, word = STM32_OTP_HASH_KEY_START; i < STM32_OTP_HASH_KEY_SIZE; i++, word++) {
|
||||
+ ret = misc_read(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
+ if (ret != 4)
|
||||
+ val = ~0x0;
|
||||
+ ret = misc_read(dev, STM32_BSEC_LOCK(word), &lock, 4);
|
||||
+ if (ret != 4)
|
||||
+ lock = -1;
|
||||
+ if (print)
|
||||
+ printf("OTP HASH %i: %x lock : %d\n", word, val, lock);
|
||||
+ if (val == ~0x0)
|
||||
+ nb_invalid++;
|
||||
+ else if (val == 0x0)
|
||||
+ nb_zero++;
|
||||
+ if (lock == 1)
|
||||
+ nb_lock++;
|
||||
}
|
||||
|
||||
- for (i = 0; i < STM32_OTP_HASH_KEY_SIZE; i++) {
|
||||
+ word = STM32_OTP_CLOSE_ID;
|
||||
+ ret = misc_read(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
+ if (ret != 4)
|
||||
+ val = 0x0;
|
||||
+ ret = misc_read(dev, STM32_BSEC_LOCK(word), &lock, 4);
|
||||
+ if (ret != 4)
|
||||
+ lock = -1;
|
||||
+
|
||||
+ status = (val & STM32_OTP_CLOSE_MASK) == STM32_OTP_CLOSE_MASK;
|
||||
+ if (closed)
|
||||
+ *closed = status;
|
||||
+ if (print)
|
||||
+ printf("OTP %d: closed status: %d lock : %d\n", word, status, lock);
|
||||
+
|
||||
+ status = (nb_lock == STM32_OTP_HASH_KEY_SIZE);
|
||||
+ if (locked)
|
||||
+ *locked = status;
|
||||
+ if (!status && print)
|
||||
+ printf("HASK key is not locked!\n");
|
||||
+
|
||||
+ if (nb_invalid == STM32_OTP_HASH_KEY_SIZE) {
|
||||
+ if (print)
|
||||
+ printf("HASK key is invalid!\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ if (nb_zero == STM32_OTP_HASH_KEY_SIZE) {
|
||||
if (print)
|
||||
- printf("Fuse OTP %i : %x\n",
|
||||
- STM32_OTP_HASH_KEY_START + i,
|
||||
- __be32_to_cpu(*(u32 *)addr));
|
||||
+ printf("HASK key is free!\n");
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
- word = STM32_OTP_HASH_KEY_START + i;
|
||||
+static int fuse_hash_value(u32 addr, bool print)
|
||||
+{
|
||||
+ struct udevice *dev;
|
||||
+ u32 word, val;
|
||||
+ int i, ret;
|
||||
+
|
||||
+ ret = get_misc_dev(&dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ for (i = 0, word = STM32_OTP_HASH_KEY_START;
|
||||
+ i < STM32_OTP_HASH_KEY_SIZE;
|
||||
+ i++, word++, addr += 4) {
|
||||
val = __be32_to_cpu(*(u32 *)addr);
|
||||
- misc_write(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
+ if (print)
|
||||
+ printf("Fuse OTP %i : %x\n", word, val);
|
||||
|
||||
- addr += 4;
|
||||
+ ret = misc_write(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
+ if (ret != 4) {
|
||||
+ printf("Fuse OTP %i failed\n", word);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ /* on success, lock the OTP for HASH key */
|
||||
+ val = 1;
|
||||
+ ret = misc_write(dev, STM32_BSEC_LOCK(word), &val, 4);
|
||||
+ if (ret != 4) {
|
||||
+ printf("Lock OTP %i failed\n", word);
|
||||
+ return ret;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int confirm_prog(void)
|
||||
@@ -66,36 +152,113 @@ static int confirm_prog(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
- char *const argv[])
|
||||
+static int do_stm32key_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
u32 addr;
|
||||
- const char *op = argc >= 2 ? argv[1] : NULL;
|
||||
- int confirmed = argc > 3 && !strcmp(argv[2], "-y");
|
||||
|
||||
- argc -= 2 + confirmed;
|
||||
- argv += 2 + confirmed;
|
||||
+ if (argc == 1) {
|
||||
+ read_hash_otp(true, NULL, NULL);
|
||||
+ return CMD_RET_SUCCESS;
|
||||
+ }
|
||||
|
||||
- if (argc < 1)
|
||||
+ addr = simple_strtoul(argv[1], NULL, 16);
|
||||
+ if (!addr)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
- addr = simple_strtoul(argv[0], NULL, 16);
|
||||
+ read_hash_value(addr);
|
||||
+
|
||||
+ return CMD_RET_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+static int do_stm32key_fuse(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
+{
|
||||
+ u32 addr;
|
||||
+ bool yes = false, lock, closed;
|
||||
+
|
||||
+ if (argc < 2)
|
||||
+ return CMD_RET_USAGE;
|
||||
+
|
||||
+ if (argc == 3) {
|
||||
+ if (strcmp(argv[1], "-y"))
|
||||
+ return CMD_RET_USAGE;
|
||||
+ yes = true;
|
||||
+ }
|
||||
+
|
||||
+ addr = simple_strtoul(argv[argc - 1], NULL, 16);
|
||||
if (!addr)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
- if (!strcmp(op, "read"))
|
||||
- read_hash_value(addr);
|
||||
+ if (read_hash_otp(!yes, &lock, &closed) != -ENOENT) {
|
||||
+ printf("Error: can't fuse again the OTP\n");
|
||||
+ return CMD_RET_FAILURE;
|
||||
+ }
|
||||
|
||||
- if (!strcmp(op, "fuse")) {
|
||||
- if (!confirmed && !confirm_prog())
|
||||
- return CMD_RET_FAILURE;
|
||||
- fuse_hash_value(addr, !confirmed);
|
||||
+ if (lock || closed) {
|
||||
+ printf("Error: invalid OTP configuration (lock=%d, closed=%d)\n", lock, closed);
|
||||
+ return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
+ if (!yes && !confirm_prog())
|
||||
+ return CMD_RET_FAILURE;
|
||||
+
|
||||
+ if (fuse_hash_value(addr, !yes))
|
||||
+ return CMD_RET_FAILURE;
|
||||
+
|
||||
+ printf("Hash key updated !\n");
|
||||
+
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
-U_BOOT_CMD(stm32key, 4, 1, do_stm32key,
|
||||
- "Fuse ST Hash key",
|
||||
- "read <addr>: Read the hash store at addr in memory\n"
|
||||
- "stm32key fuse [-y] <addr> : Fuse hash store at addr in otp\n");
|
||||
+static int do_stm32key_close(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
+{
|
||||
+ bool yes, lock, closed;
|
||||
+ struct udevice *dev;
|
||||
+ u32 val;
|
||||
+ int ret;
|
||||
+
|
||||
+ yes = false;
|
||||
+ if (argc == 2) {
|
||||
+ if (strcmp(argv[1], "-y"))
|
||||
+ return CMD_RET_USAGE;
|
||||
+ yes = true;
|
||||
+ }
|
||||
+
|
||||
+ if (read_hash_otp(!yes, &lock, &closed))
|
||||
+ return CMD_RET_FAILURE;
|
||||
+
|
||||
+ if (closed) {
|
||||
+ printf("Error: already closed!\n");
|
||||
+ return CMD_RET_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ if (!lock)
|
||||
+ printf("Warning: OTP not locked, revocation is possible!\n");
|
||||
+
|
||||
+ if (!yes && !confirm_prog())
|
||||
+ return CMD_RET_FAILURE;
|
||||
+
|
||||
+ ret = get_misc_dev(&dev);
|
||||
+ if (ret)
|
||||
+ return CMD_RET_FAILURE;
|
||||
+
|
||||
+ val = STM32_OTP_CLOSE_MASK;
|
||||
+ ret = misc_write(dev, STM32_BSEC_OTP(STM32_OTP_CLOSE_ID), &val, 4);
|
||||
+ if (ret != 4) {
|
||||
+ printf("Error: can't update OTP\n");
|
||||
+ return CMD_RET_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ printf("Device is closed !\n");
|
||||
+
|
||||
+ return CMD_RET_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+static char stm32key_help_text[] =
|
||||
+ "read [<addr>]: Read the hash stored at addr in memory or in OTP\n"
|
||||
+ "stm32key fuse [-y] <addr> : Fuse hash stored at addr in OTP\n"
|
||||
+ "stm32key close [-y] : Close the device, the hash stored in OTP\n";
|
||||
+
|
||||
+U_BOOT_CMD_WITH_SUBCMDS(stm32key, "Fuse ST Hash key", stm32key_help_text,
|
||||
+ U_BOOT_SUBCMD_MKENT(read, 2, 0, do_stm32key_read),
|
||||
+ U_BOOT_SUBCMD_MKENT(fuse, 3, 0, do_stm32key_fuse),
|
||||
+ U_BOOT_SUBCMD_MKENT(close, 2, 0, do_stm32key_close));
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
|
||||
index a20980a6ae..b2a17314ee 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
|
||||
@@ -45,7 +45,6 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
bool reset = false;
|
||||
struct image_header_s header;
|
||||
struct stm32prog_data *data;
|
||||
- u32 uimage, dtb;
|
||||
|
||||
if (argc < 3 || argc > 5)
|
||||
return CMD_RET_USAGE;
|
||||
@@ -78,10 +77,12 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
if (header.type == HEADER_STM32IMAGE) {
|
||||
size = header.image_length + BL_HEADER_SIZE;
|
||||
|
||||
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
|
||||
/* uImage detected in STM32IMAGE, execute the script */
|
||||
if (IMAGE_FORMAT_LEGACY ==
|
||||
genimg_get_format((void *)(addr + BL_HEADER_SIZE)))
|
||||
return image_source_script(addr + BL_HEADER_SIZE, "script@1");
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
ret = stm32prog_init(data, addr, size);
|
||||
if (ret)
|
||||
- printf("Invalid or missing layout file.");
|
||||
+ log_debug("Invalid or missing layout file at 0x%lx.\n", addr);
|
||||
|
||||
/* prepare DFU for device read/write */
|
||||
ret = stm32prog_dfu_init(data);
|
||||
@@ -119,21 +120,23 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- uimage = data->uimage;
|
||||
- dtb = data->dtb;
|
||||
-
|
||||
stm32prog_clean(data);
|
||||
free(stm32prog_data);
|
||||
stm32prog_data = NULL;
|
||||
|
||||
puts("Download done\n");
|
||||
|
||||
- if (uimage) {
|
||||
+ if (data->uimage) {
|
||||
char boot_addr_start[20];
|
||||
char dtb_addr[20];
|
||||
+ char initrd_addr[40];
|
||||
char *bootm_argv[5] = {
|
||||
"bootm", boot_addr_start, "-", dtb_addr, NULL
|
||||
};
|
||||
+ u32 uimage = data->uimage;
|
||||
+ u32 dtb = data->dtb;
|
||||
+ u32 initrd = data->initrd;
|
||||
+
|
||||
if (!dtb)
|
||||
bootm_argv[3] = env_get("fdtcontroladdr");
|
||||
else
|
||||
@@ -142,8 +145,15 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
|
||||
"0x%x", uimage);
|
||||
- printf("Booting kernel at %s - %s...\n\n\n",
|
||||
- boot_addr_start, bootm_argv[3]);
|
||||
+
|
||||
+ if (initrd) {
|
||||
+ snprintf(initrd_addr, sizeof(initrd_addr) - 1, "0x%x:0x%x",
|
||||
+ initrd, data->initrd_size);
|
||||
+ bootm_argv[2] = initrd_addr;
|
||||
+ }
|
||||
+
|
||||
+ printf("Booting kernel at %s %s %s...\n\n\n",
|
||||
+ boot_addr_start, bootm_argv[2], bootm_argv[3]);
|
||||
/* Try bootm for legacy and FIT format image */
|
||||
if (genimg_get_format((void *)uimage) != IMAGE_FORMAT_INVALID)
|
||||
do_bootm(cmdtp, 0, 4, bootm_argv);
|
||||
@@ -167,12 +177,12 @@ cleanup:
|
||||
}
|
||||
|
||||
U_BOOT_CMD(stm32prog, 5, 0, do_stm32prog,
|
||||
+ "start communication with tools STM32Cubeprogrammer",
|
||||
"<link> <dev> [<addr>] [<size>]\n"
|
||||
- "start communication with tools STM32Cubeprogrammer on <link> with Flashlayout at <addr>",
|
||||
- "<link> = serial|usb\n"
|
||||
- "<dev> = device instance\n"
|
||||
- "<addr> = address of flashlayout\n"
|
||||
- "<size> = size of flashlayout\n"
|
||||
+ " <link> = serial|usb\n"
|
||||
+ " <dev> = device instance\n"
|
||||
+ " <addr> = address of flashlayout\n"
|
||||
+ " <size> = size of flashlayout (optional for image with STM32 header)\n"
|
||||
);
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
index 7cd31462ba..62b386582d 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
|
||||
@@ -1153,7 +1153,10 @@ static int dfu_init_entities(struct stm32prog_data *data)
|
||||
struct dfu_entity *dfu;
|
||||
int alt_nb;
|
||||
|
||||
- alt_nb = 3; /* number of virtual = CMD, OTP, PMIC*/
|
||||
+ alt_nb = 2; /* number of virtual = CMD, OTP*/
|
||||
+ if (CONFIG_IS_ENABLED(DM_PMIC))
|
||||
+ alt_nb++; /* PMIC NVMEM*/
|
||||
+
|
||||
if (data->part_nb == 0)
|
||||
alt_nb++; /* +1 for FlashLayout */
|
||||
else
|
||||
@@ -1199,13 +1202,13 @@ static int dfu_init_entities(struct stm32prog_data *data)
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
- ret = stm32prog_alt_add_virt(dfu, "virtual", PHASE_CMD, 512);
|
||||
+ ret = stm32prog_alt_add_virt(dfu, "virtual", PHASE_CMD, CMD_SIZE);
|
||||
|
||||
if (!ret)
|
||||
- ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, 512);
|
||||
+ 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, 8);
|
||||
+ ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, PMIC_SIZE);
|
||||
|
||||
if (ret)
|
||||
stm32prog_err("dfu init failed: %d", ret);
|
||||
@@ -1476,7 +1479,7 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void stm32prog_end_phase(struct stm32prog_data *data)
|
||||
+static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset)
|
||||
{
|
||||
if (data->phase == PHASE_FLASHLAYOUT) {
|
||||
if (parse_flash_layout(data, STM32_DDR_BASE, 0))
|
||||
@@ -1492,6 +1495,10 @@ static void stm32prog_end_phase(struct stm32prog_data *data)
|
||||
data->uimage = data->cur_part->addr;
|
||||
if (data->cur_part->part_type == PART_FILESYSTEM)
|
||||
data->dtb = data->cur_part->addr;
|
||||
+ if (data->cur_part->part_type == PART_BINARY) {
|
||||
+ data->initrd = data->cur_part->addr;
|
||||
+ data->initrd_size = offset;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (CONFIG_IS_ENABLED(MMC) &&
|
||||
@@ -1750,7 +1757,7 @@ void dfu_flush_callback(struct dfu_entity *dfu)
|
||||
if (dfu->dev_type == DFU_DEV_RAM) {
|
||||
if (dfu->alt == 0 &&
|
||||
stm32prog_data->phase == PHASE_FLASHLAYOUT) {
|
||||
- stm32prog_end_phase(stm32prog_data);
|
||||
+ stm32prog_end_phase(stm32prog_data, dfu->offset);
|
||||
/* waiting DFU DETACH for reenumeration */
|
||||
}
|
||||
}
|
||||
@@ -1759,7 +1766,7 @@ void dfu_flush_callback(struct dfu_entity *dfu)
|
||||
return;
|
||||
|
||||
if (dfu->alt == stm32prog_data->cur_part->alt_id) {
|
||||
- stm32prog_end_phase(stm32prog_data);
|
||||
+ stm32prog_end_phase(stm32prog_data, dfu->offset);
|
||||
stm32prog_next_phase(stm32prog_data);
|
||||
}
|
||||
}
|
||||
@@ -1779,3 +1786,17 @@ void dfu_initiated_callback(struct dfu_entity *dfu)
|
||||
pr_debug("dfu offset = 0x%llx\n", dfu->offset);
|
||||
}
|
||||
}
|
||||
+
|
||||
+void dfu_error_callback(struct dfu_entity *dfu, const char *msg)
|
||||
+{
|
||||
+ struct stm32prog_data *data = stm32prog_data;
|
||||
+
|
||||
+ if (!stm32prog_data)
|
||||
+ return;
|
||||
+
|
||||
+ if (!stm32prog_data->cur_part)
|
||||
+ return;
|
||||
+
|
||||
+ if (dfu->alt == stm32prog_data->cur_part->alt_id)
|
||||
+ stm32prog_err(msg);
|
||||
+}
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
index eebc4d2e71..f4243ae2ec 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#define DEFAULT_ADDRESS 0xFFFFFFFF
|
||||
|
||||
+#define CMD_SIZE 512
|
||||
#define OTP_SIZE 1024
|
||||
#define PMIC_SIZE 8
|
||||
|
||||
@@ -144,6 +145,8 @@ struct stm32prog_data {
|
||||
/* bootm information */
|
||||
u32 uimage;
|
||||
u32 dtb;
|
||||
+ u32 initrd;
|
||||
+ u32 initrd_size;
|
||||
};
|
||||
|
||||
extern struct stm32prog_data *stm32prog_data;
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
index a0bf7e1884..3d32adcf62 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <malloc.h>
|
||||
#include <serial.h>
|
||||
#include <watchdog.h>
|
||||
+#include <asm/arch/sys_proto.h>
|
||||
#include <dm/lists.h>
|
||||
#include <dm/device-internal.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -18,8 +19,7 @@
|
||||
/* - configuration part -----------------------------*/
|
||||
#define USART_BL_VERSION 0x40 /* USART bootloader version V4.0*/
|
||||
#define UBOOT_BL_VERSION 0x03 /* bootloader version V0.3*/
|
||||
-#define DEVICE_ID_BYTE1 0x05 /* MSB byte of device ID*/
|
||||
-#define DEVICE_ID_BYTE2 0x00 /* LSB byte of device ID*/
|
||||
+
|
||||
#define USART_RAM_BUFFER_SIZE 256 /* Size of USART_RAM_Buf buffer*/
|
||||
|
||||
/* - Commands -----------------------------*/
|
||||
@@ -435,10 +435,12 @@ static void get_version_command(struct stm32prog_data *data)
|
||||
*/
|
||||
static void get_id_command(struct stm32prog_data *data)
|
||||
{
|
||||
+ u32 cpu = get_cpu_dev();
|
||||
+
|
||||
/* Send Device IDCode */
|
||||
stm32prog_serial_putc(0x1);
|
||||
- stm32prog_serial_putc(DEVICE_ID_BYTE1);
|
||||
- stm32prog_serial_putc(DEVICE_ID_BYTE2);
|
||||
+ stm32prog_serial_putc((cpu >> 8) & 0xFF);
|
||||
+ stm32prog_serial_putc(cpu & 0xFF);
|
||||
stm32prog_serial_result(ACK_BYTE);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
|
||||
index 30547f94c9..6ddf08523e 100644
|
||||
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
|
||||
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
|
||||
@@ -178,7 +178,7 @@ int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
|
||||
|
||||
switch (dfu->data.virt.dev_num) {
|
||||
case PHASE_CMD:
|
||||
- *size = 512;
|
||||
+ *size = CMD_SIZE;
|
||||
break;
|
||||
case PHASE_OTP:
|
||||
*size = OTP_SIZE;
|
||||
@@ -207,13 +207,10 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
|
||||
|
||||
if (stm32prog_data->phase == PHASE_FLASHLAYOUT) {
|
||||
ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
|
||||
- if (ret || stm32prog_data->phase == PHASE_DO_RESET)
|
||||
+ if (ret || stm32prog_data->phase != PHASE_FLASHLAYOUT)
|
||||
return ret;
|
||||
/* prepare the second enumeration with the FlashLayout */
|
||||
- if (stm32prog_data->phase == PHASE_FLASHLAYOUT)
|
||||
- stm32prog_dfu_init(data);
|
||||
- /* found next selected partition */
|
||||
- stm32prog_next_phase(data);
|
||||
+ stm32prog_dfu_init(data);
|
||||
}
|
||||
|
||||
ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
|
||||
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
|
||||
index b81825a0bf..2495d4aaad 100644
|
||||
--- a/arch/arm/mach-stm32mp/cpu.c
|
||||
+++ b/arch/arm/mach-stm32mp/cpu.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <env.h>
|
||||
#include <init.h>
|
||||
#include <log.h>
|
||||
+#include <lmb.h>
|
||||
#include <misc.h>
|
||||
#include <net.h>
|
||||
#include <asm/io.h>
|
||||
@@ -86,6 +87,8 @@
|
||||
*/
|
||||
u8 early_tlb[PGTABLE_SIZE] __section(".data") __aligned(0x4000);
|
||||
|
||||
+struct lmb lmb;
|
||||
+
|
||||
#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
|
||||
#ifndef CONFIG_TFABOOT
|
||||
static void security_init(void)
|
||||
@@ -207,6 +210,44 @@ u32 get_bootmode(void)
|
||||
TAMP_BOOT_MODE_SHIFT;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * weak function overidde: set the DDR/SYSRAM executable before to enable the
|
||||
+ * MMU and configure DACR, for early early_enable_caches (SPL or pre-reloc)
|
||||
+ */
|
||||
+void dram_bank_mmu_setup(int bank)
|
||||
+{
|
||||
+ struct bd_info *bd = gd->bd;
|
||||
+ int i;
|
||||
+ phys_addr_t start;
|
||||
+ phys_size_t size;
|
||||
+ bool use_lmb = false;
|
||||
+ enum dcache_option option;
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_SPL_BUILD)) {
|
||||
+#ifdef CONFIG_SPL
|
||||
+ start = ALIGN_DOWN(STM32_SYSRAM_BASE, MMU_SECTION_SIZE);
|
||||
+ size = ALIGN(STM32_SYSRAM_SIZE, MMU_SECTION_SIZE);
|
||||
+#endif
|
||||
+ } else if (gd->flags & GD_FLG_RELOC) {
|
||||
+ /* bd->bi_dram is available only after relocation */
|
||||
+ start = bd->bi_dram[bank].start;
|
||||
+ size = bd->bi_dram[bank].size;
|
||||
+ use_lmb = true;
|
||||
+ } else {
|
||||
+ /* mark cacheable and executable the beggining of the DDR */
|
||||
+ start = STM32_DDR_BASE;
|
||||
+ size = CONFIG_DDR_CACHEABLE_SIZE;
|
||||
+ }
|
||||
+
|
||||
+ for (i = start >> MMU_SECTION_SHIFT;
|
||||
+ i < (start >> MMU_SECTION_SHIFT) + (size >> MMU_SECTION_SHIFT);
|
||||
+ i++) {
|
||||
+ option = DCACHE_DEFAULT_OPTION;
|
||||
+ if (use_lmb && lmb_is_reserved_flags(&lmb, i << MMU_SECTION_SHIFT, LMB_NOMAP))
|
||||
+ option = INVALID_ENTRY;
|
||||
+ set_section_dcache(i, option);
|
||||
+ }
|
||||
+}
|
||||
/*
|
||||
* initialize the MMU and activate cache in SPL or in U-Boot pre-reloc stage
|
||||
* MMU/TLB is updated in enable_caches() for U-Boot after relocation
|
||||
@@ -224,17 +265,8 @@ static void early_enable_caches(void)
|
||||
gd->arch.tlb_addr = (unsigned long)&early_tlb;
|
||||
#endif
|
||||
|
||||
+ /* enable MMU (default configuration) */
|
||||
dcache_enable();
|
||||
-
|
||||
- if (IS_ENABLED(CONFIG_SPL_BUILD))
|
||||
- mmu_set_region_dcache_behaviour(
|
||||
- ALIGN_DOWN(STM32_SYSRAM_BASE, MMU_SECTION_SIZE),
|
||||
- ALIGN(STM32_SYSRAM_SIZE, MMU_SECTION_SIZE),
|
||||
- DCACHE_DEFAULT_OPTION);
|
||||
- else
|
||||
- mmu_set_region_dcache_behaviour(STM32_DDR_BASE,
|
||||
- CONFIG_DDR_CACHEABLE_SIZE,
|
||||
- DCACHE_DEFAULT_OPTION);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -278,6 +310,9 @@ int arch_cpu_init(void)
|
||||
|
||||
void enable_caches(void)
|
||||
{
|
||||
+ /* parse device tree when data cache is still activated */
|
||||
+ lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
|
||||
+
|
||||
/* I-cache is already enabled in start.S: icache_enable() not needed */
|
||||
|
||||
/* deactivate the data cache, early enabled in arch_cpu_init() */
|
||||
@@ -479,7 +514,7 @@ static void setup_boot_mode(void)
|
||||
gd->flags &= ~(GD_FLG_SILENT |
|
||||
GD_FLG_DISABLE_CONSOLE);
|
||||
printf("uart%d = %s not found in device tree!\n",
|
||||
- instance, cmd);
|
||||
+ instance + 1, cmd);
|
||||
break;
|
||||
}
|
||||
sprintf(cmd, "%d", dev->seq);
|
||||
@@ -517,7 +552,9 @@ static void setup_boot_mode(void)
|
||||
env_set("boot_instance", "0");
|
||||
break;
|
||||
default:
|
||||
- pr_debug("unexpected boot mode = %x\n", boot_mode);
|
||||
+ env_set("boot_device", "invalid");
|
||||
+ env_set("boot_instance", "");
|
||||
+ log_err("unexpected boot mode = %x\n", boot_mode);
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
|
||||
index 0e8ce63f4a..2c409ee217 100644
|
||||
--- a/arch/arm/mach-stm32mp/dram_init.c
|
||||
+++ b/arch/arm/mach-stm32mp/dram_init.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <ram.h>
|
||||
+#include <asm/system.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -38,17 +39,27 @@ int dram_init(void)
|
||||
|
||||
ulong board_get_usable_ram_top(ulong total_size)
|
||||
{
|
||||
+ phys_size_t size;
|
||||
phys_addr_t reg;
|
||||
struct lmb lmb;
|
||||
|
||||
+ if (!total_size)
|
||||
+ return gd->ram_top;
|
||||
+
|
||||
/* found enough not-reserved memory to relocated U-Boot */
|
||||
lmb_init(&lmb);
|
||||
lmb_add(&lmb, gd->ram_base, gd->ram_size);
|
||||
boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob);
|
||||
- reg = lmb_alloc(&lmb, CONFIG_SYS_MALLOC_LEN + total_size, SZ_4K);
|
||||
+ /* add 8M for reserved memory for display, fdt, gd,... */
|
||||
+ size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
|
||||
+ reg = lmb_alloc(&lmb, size, MMU_SECTION_SIZE);
|
||||
+
|
||||
+ if (!reg)
|
||||
+ reg = gd->ram_top - size;
|
||||
|
||||
- if (reg)
|
||||
- return ALIGN(reg + CONFIG_SYS_MALLOC_LEN + total_size, SZ_4K);
|
||||
+ /* before relocation, mark the U-Boot memory as cacheable by default */
|
||||
+ if (!(gd->flags & GD_FLG_RELOC))
|
||||
+ mmu_set_region_dcache_behaviour(reg, size, DCACHE_DEFAULT_OPTION);
|
||||
|
||||
- return gd->ram_top;
|
||||
+ return reg + size;
|
||||
}
|
||||
diff --git a/arch/arm/mach-stm32mp/syscon.c b/arch/arm/mach-stm32mp/syscon.c
|
||||
index 3e61ce4097..a0e8e1dfdc 100644
|
||||
--- a/arch/arm/mach-stm32mp/syscon.c
|
||||
+++ b/arch/arm/mach-stm32mp/syscon.c
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
+#include <clk.h>
|
||||
#include <dm.h>
|
||||
#include <syscon.h>
|
||||
#include <asm/arch/stm32.h>
|
||||
@@ -14,9 +15,22 @@ static const struct udevice_id stm32mp_syscon_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
+static int stm32mp_syscon_probe(struct udevice *dev)
|
||||
+{
|
||||
+ struct clk_bulk clk_bulk;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = clk_get_bulk(dev, &clk_bulk);
|
||||
+ if (!ret)
|
||||
+ clk_enable_bulk(&clk_bulk);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
U_BOOT_DRIVER(syscon_stm32mp) = {
|
||||
.name = "stmp32mp_syscon",
|
||||
.id = UCLASS_SYSCON,
|
||||
.of_match = stm32mp_syscon_ids,
|
||||
.bind = dm_scan_fdt_dev,
|
||||
+ .probe = stm32mp_syscon_probe,
|
||||
};
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
From ad6a40bb66269882f124e9c2b6b106cca3fb8abc Mon Sep 17 00:00:00 2001
|
||||
From: Lionel Vitte <lionel.vitte@st.com>
|
||||
Date: Mon, 18 Oct 2021 17:10:51 +0200
|
||||
Subject: [PATCH 08/11] ARM v2020.10-stm32mp-r2 BOARD
|
||||
|
||||
---
|
||||
board/dhelectronics/dh_stm32mp1/board.c | 7 ++-----
|
||||
board/raspberrypi/rpi/rpi.c | 2 +-
|
||||
board/st/stm32mp1/stm32mp1.c | 13 ++++++++-----
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
|
||||
index c9abe3cc6d..77f2730a3f 100644
|
||||
--- a/board/dhelectronics/dh_stm32mp1/board.c
|
||||
+++ b/board/dhelectronics/dh_stm32mp1/board.c
|
||||
@@ -551,9 +551,6 @@ int board_init(void)
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
|
||||
|
||||
- if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
|
||||
- gpio_hog_probe_all();
|
||||
-
|
||||
board_key_check();
|
||||
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
@@ -618,11 +615,11 @@ int board_interface_eth_init(struct udevice *dev,
|
||||
bool eth_ref_clk_sel_reg = false;
|
||||
|
||||
/* Gigabit Ethernet 125MHz clock selection. */
|
||||
- eth_clk_sel_reg = dev_read_bool(dev, "st,eth_clk_sel");
|
||||
+ eth_clk_sel_reg = dev_read_bool(dev, "st,eth-clk-sel");
|
||||
|
||||
/* Ethernet 50Mhz RMII clock selection */
|
||||
eth_ref_clk_sel_reg =
|
||||
- dev_read_bool(dev, "st,eth_ref_clk_sel");
|
||||
+ dev_read_bool(dev, "st,eth-ref-clk-sel");
|
||||
|
||||
syscfg = (u8 *)syscon_get_first_range(STM32MP_SYSCON_SYSCFG);
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index 6b1fa5fc14..f25b2aa219 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -485,7 +485,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
* should be more intelligent, and e.g. only do this if no enabled DT
|
||||
* node exists for the "real" graphics driver.
|
||||
*/
|
||||
- lcd_dt_simplefb_add_node(blob);
|
||||
+ fdt_simplefb_add_node(blob);
|
||||
|
||||
#ifdef CONFIG_EFI_LOADER
|
||||
/* Reserve the spin table */
|
||||
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
|
||||
index 9a02e14ba5..42979d80f5 100644
|
||||
--- a/board/st/stm32mp1/stm32mp1.c
|
||||
+++ b/board/st/stm32mp1/stm32mp1.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <dm.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
+#include <fdt_simplefb.h>
|
||||
#include <fdt_support.h>
|
||||
#include <g_dnl.h>
|
||||
#include <generic-phy.h>
|
||||
@@ -155,6 +156,7 @@ static void board_key_check(void)
|
||||
debug("%s: could not find a /config/st,fastboot-gpios\n",
|
||||
__func__);
|
||||
} else {
|
||||
+ udelay(20);
|
||||
if (dm_gpio_get_value(&gpio)) {
|
||||
puts("Fastboot key pressed, ");
|
||||
boot_mode = BOOT_FASTBOOT;
|
||||
@@ -169,6 +171,7 @@ static void board_key_check(void)
|
||||
debug("%s: could not find a /config/st,stm32prog-gpios\n",
|
||||
__func__);
|
||||
} else {
|
||||
+ udelay(20);
|
||||
if (dm_gpio_get_value(&gpio)) {
|
||||
puts("STM32Programmer key pressed, ");
|
||||
boot_mode = BOOT_STM32PROG;
|
||||
@@ -649,9 +652,6 @@ int board_init(void)
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
|
||||
|
||||
- if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
|
||||
- gpio_hog_probe_all();
|
||||
-
|
||||
board_key_check();
|
||||
|
||||
if (board_is_ev1())
|
||||
@@ -739,11 +739,11 @@ int board_interface_eth_init(struct udevice *dev,
|
||||
bool eth_ref_clk_sel_reg = false;
|
||||
|
||||
/* Gigabit Ethernet 125MHz clock selection. */
|
||||
- eth_clk_sel_reg = dev_read_bool(dev, "st,eth_clk_sel");
|
||||
+ eth_clk_sel_reg = dev_read_bool(dev, "st,eth-clk-sel");
|
||||
|
||||
/* Ethernet 50Mhz RMII clock selection */
|
||||
eth_ref_clk_sel_reg =
|
||||
- dev_read_bool(dev, "st,eth_ref_clk_sel");
|
||||
+ dev_read_bool(dev, "st,eth-ref-clk-sel");
|
||||
|
||||
syscfg = (u8 *)syscon_get_first_range(STM32MP_SYSCON_SYSCFG);
|
||||
|
||||
@@ -886,6 +886,9 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
|
||||
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
|
||||
+ if (CONFIG_IS_ENABLED(FDT_SIMPLEFB))
|
||||
+ fdt_simplefb_add_node_and_mem_rsv(blob);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,573 +0,0 @@
|
||||
From bb83031bcca4f234206cc428cb9c79d9ec652ba6 Mon Sep 17 00:00:00 2001
|
||||
From: Lionel Vitte <lionel.vitte@st.com>
|
||||
Date: Mon, 18 Oct 2021 17:14:59 +0200
|
||||
Subject: [PATCH 10/11] ARM v2020.10-stm32mp-r2 DEVICETREE
|
||||
|
||||
---
|
||||
arch/arm/dts/stm32f746.dtsi | 4 +++
|
||||
arch/arm/dts/stm32h743.dtsi | 4 +++
|
||||
arch/arm/dts/stm32mp15-m4-srm.dtsi | 8 +++++-
|
||||
arch/arm/dts/stm32mp15-no-scmi.dtsi | 8 ++----
|
||||
arch/arm/dts/stm32mp15-pinctrl.dtsi | 4 +--
|
||||
arch/arm/dts/stm32mp151.dtsi | 35 ++++++++++++++++--------
|
||||
arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 4 +--
|
||||
arch/arm/dts/stm32mp157a-dk1.dts | 6 ----
|
||||
arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi | 4 +--
|
||||
arch/arm/dts/stm32mp157a-ev1.dts | 5 ----
|
||||
arch/arm/dts/stm32mp157c-dk2.dts | 3 --
|
||||
arch/arm/dts/stm32mp157c-ev1.dts | 5 ----
|
||||
arch/arm/dts/stm32mp157d-dk1.dts | 6 ----
|
||||
arch/arm/dts/stm32mp157d-ev1.dts | 5 ----
|
||||
arch/arm/dts/stm32mp157f-dk2.dts | 3 --
|
||||
arch/arm/dts/stm32mp157f-ev1.dts | 5 ----
|
||||
arch/arm/dts/stm32mp15xx-dkx.dtsi | 23 ++++++++++++++--
|
||||
arch/arm/dts/stm32mp15xx-edx.dtsi | 8 +++++-
|
||||
arch/arm/dts/stm32mp15xx-evx.dtsi | 12 +++++++-
|
||||
19 files changed, 85 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/stm32f746.dtsi b/arch/arm/dts/stm32f746.dtsi
|
||||
index 3f312ab3a7..c32d2a81f1 100644
|
||||
--- a/arch/arm/dts/stm32f746.dtsi
|
||||
+++ b/arch/arm/dts/stm32f746.dtsi
|
||||
@@ -315,6 +315,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -327,6 +328,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -339,6 +341,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -351,6 +354,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/dts/stm32h743.dtsi b/arch/arm/dts/stm32h743.dtsi
|
||||
index 4b4e7a99f7..5964f7b238 100644
|
||||
--- a/arch/arm/dts/stm32h743.dtsi
|
||||
+++ b/arch/arm/dts/stm32h743.dtsi
|
||||
@@ -106,6 +106,7 @@
|
||||
<32>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C1)>;
|
||||
clocks = <&rcc I2C1_CK>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -118,6 +119,7 @@
|
||||
<34>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C2)>;
|
||||
clocks = <&rcc I2C2_CK>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -130,6 +132,7 @@
|
||||
<73>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C3)>;
|
||||
clocks = <&rcc I2C3_CK>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -349,6 +352,7 @@
|
||||
<96>;
|
||||
resets = <&rcc STM32H7_APB4_RESET(I2C4)>;
|
||||
clocks = <&rcc I2C4_CK>;
|
||||
+ i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/dts/stm32mp15-m4-srm.dtsi b/arch/arm/dts/stm32mp15-m4-srm.dtsi
|
||||
index 60454aee41..3162c35950 100644
|
||||
--- a/arch/arm/dts/stm32mp15-m4-srm.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15-m4-srm.dtsi
|
||||
@@ -177,7 +177,7 @@
|
||||
reg = <0x40016000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <69 1>;
|
||||
- clocks = <&rcc CEC_K>, <&scmi0_clk CK_SCMI0_LSE>;
|
||||
+ clocks = <&rcc CEC_K>, <&rcc CEC>;
|
||||
clock-names = "cec", "hdmi-cec";
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -415,6 +415,12 @@
|
||||
clocks = <&rcc SAI4_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "disabled";
|
||||
+ };
|
||||
+ m4_fmc: memory-controller@58002000 {
|
||||
+ compatible = "rproc-srm-dev";
|
||||
+ reg = <0x5800200 0x1000>;
|
||||
+ clocks = <&rcc FMC_K>;
|
||||
+ status = "disabled";
|
||||
};
|
||||
m4_qspi: qspi@58003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
diff --git a/arch/arm/dts/stm32mp15-no-scmi.dtsi b/arch/arm/dts/stm32mp15-no-scmi.dtsi
|
||||
index 94a10b86a1..c7d2d7c8f5 100644
|
||||
--- a/arch/arm/dts/stm32mp15-no-scmi.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15-no-scmi.dtsi
|
||||
@@ -79,10 +79,6 @@
|
||||
resets = <&rcc MCU_R>, <&rcc MCU_HOLD_BOOT_R>;
|
||||
|
||||
m4_system_resources {
|
||||
- m4_cec: cec@40016000 {
|
||||
- clocks = <&rcc CEC_K>, <&rcc CK_LSE>;
|
||||
- };
|
||||
-
|
||||
m4_m_can1: can@4400e000 {
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
};
|
||||
@@ -101,8 +97,8 @@
|
||||
/delete-node/ sram@2ffff000;
|
||||
};
|
||||
|
||||
-&cec {
|
||||
- clocks = <&rcc CEC_K>, <&clk_lse>;
|
||||
+&bsec {
|
||||
+ clocks = <&rcc BSEC>;
|
||||
};
|
||||
|
||||
&gpioz {
|
||||
diff --git a/arch/arm/dts/stm32mp15-pinctrl.dtsi b/arch/arm/dts/stm32mp15-pinctrl.dtsi
|
||||
index a0b76e238c..236d77e09c 100644
|
||||
--- a/arch/arm/dts/stm32mp15-pinctrl.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15-pinctrl.dtsi
|
||||
@@ -1937,7 +1937,7 @@
|
||||
<STM32_PINMUX('D', 4, AF7)>; /* USART2_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
- slew-rate = <3>;
|
||||
+ slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('D', 6, AF7)>, /* USART2_RX */
|
||||
@@ -1955,7 +1955,7 @@
|
||||
pinmux = <STM32_PINMUX('D', 4, AF7)>; /* USART2_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
- slew-rate = <3>;
|
||||
+ slew-rate = <0>;
|
||||
};
|
||||
pins3 {
|
||||
pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */
|
||||
diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
|
||||
index ca71139f3a..ab5723c472 100644
|
||||
--- a/arch/arm/dts/stm32mp151.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp151.dtsi
|
||||
@@ -647,7 +647,7 @@
|
||||
compatible = "st,stm32-cec";
|
||||
reg = <0x40016000 0x400>;
|
||||
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- clocks = <&rcc CEC_K>, <&scmi0_clk CK_SCMI0_LSE>;
|
||||
+ clocks = <&rcc CEC_K>, <&rcc CEC>;
|
||||
clock-names = "cec", "hdmi-cec";
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1181,6 +1181,8 @@
|
||||
interrupts = <1>;
|
||||
dmas = <&dmamux1 10 0x400 0x80000001>;
|
||||
dma-names = "rx";
|
||||
+ nvmem-cells = <&vrefint>;
|
||||
+ nvmem-cell-names = "vrefint";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@@ -1212,6 +1214,7 @@
|
||||
g-np-tx-fifo-size = <32>;
|
||||
g-tx-fifo-size = <256 16 16 16 16 16 16 16>;
|
||||
dr_mode = "otg";
|
||||
+ otg-rev = <0x200>;
|
||||
usb33d-supply = <&usb33>;
|
||||
power-domains = <&pd_core>;
|
||||
wakeup-source;
|
||||
@@ -1266,6 +1269,7 @@
|
||||
<&scmi0_clk CK_SCMI0_CSI>,
|
||||
<&scmi0_clk CK_SCMI0_LSE>,
|
||||
<&scmi0_clk CK_SCMI0_LSI>;
|
||||
+ clocks-boot-on = <LTDC_PX>;
|
||||
};
|
||||
|
||||
pwr_regulators: pwr@50001000 {
|
||||
@@ -1574,8 +1578,8 @@
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x10000000>;
|
||||
reg-names = "qspi", "qspi_mm";
|
||||
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- dmas = <&mdma1 22 0x2 0x100002 0x0 0x0 0x0>,
|
||||
- <&mdma1 22 0x2 0x100008 0x0 0x0 0x0>;
|
||||
+ dmas = <&mdma1 22 0x2 0x10100002 0x0 0x0 0x0>,
|
||||
+ <&mdma1 22 0x2 0x10100008 0x0 0x0 0x0>;
|
||||
dma-names = "tx", "rx";
|
||||
clocks = <&rcc QSPI_K>;
|
||||
resets = <&rcc QSPI_R>;
|
||||
@@ -1621,12 +1625,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
- stmmac_axi_config_0: stmmac-axi-config {
|
||||
- snps,wr_osr_lmt = <0x7>;
|
||||
- snps,rd_osr_lmt = <0x7>;
|
||||
- snps,blen = <0 0 0 0 16 8 4>;
|
||||
- };
|
||||
-
|
||||
ethernet0: ethernet@5800a000 {
|
||||
compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
|
||||
reg = <0x5800a000 0x2000>;
|
||||
@@ -1639,12 +1637,14 @@
|
||||
"mac-clk-tx",
|
||||
"mac-clk-rx",
|
||||
"eth-ck",
|
||||
- "ethstp";
|
||||
+ "ethstp",
|
||||
+ "ptp_ref";
|
||||
clocks = <&rcc ETHMAC>,
|
||||
<&rcc ETHTX>,
|
||||
<&rcc ETHRX>,
|
||||
<&rcc ETHCK_K>,
|
||||
- <&rcc ETHSTP>;
|
||||
+ <&rcc ETHSTP>,
|
||||
+ <&rcc ETHPTP_K>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,mixed-burst;
|
||||
snps,pbl = <2>;
|
||||
@@ -1653,12 +1653,18 @@
|
||||
snps,tso;
|
||||
power-domains = <&pd_core>;
|
||||
status = "disabled";
|
||||
+
|
||||
+ stmmac_axi_config_0: stmmac-axi-config {
|
||||
+ snps,wr_osr_lmt = <0x7>;
|
||||
+ snps,rd_osr_lmt = <0x7>;
|
||||
+ snps,blen = <0 0 0 0 16 8 4>;
|
||||
+ };
|
||||
};
|
||||
|
||||
usbh_ohci: usbh-ohci@5800c000 {
|
||||
compatible = "generic-ohci";
|
||||
reg = <0x5800c000 0x1000>;
|
||||
- clocks = <&rcc USBH>;
|
||||
+ clocks = <&rcc USBH>, <&usbphyc>;
|
||||
resets = <&rcc USBH_R>;
|
||||
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
@@ -1728,6 +1734,7 @@
|
||||
reg = <0x5a007000 0x400>;
|
||||
clocks = <&rcc DDRPERFM>;
|
||||
resets = <&rcc DDRPERFM_R>;
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
usart1: serial@5c000000 {
|
||||
@@ -1789,11 +1796,15 @@
|
||||
bsec: efuse@5c005000 {
|
||||
compatible = "st,stm32mp15-bsec";
|
||||
reg = <0x5c005000 0x400>;
|
||||
+ clocks = <&scmi0_clk CK_SCMI0_BSEC>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
part_number_otp: part_number_otp@4 {
|
||||
reg = <0x4 0x1>;
|
||||
};
|
||||
+ vrefint: calib@52 {
|
||||
+ reg = <0x52 0x2>;
|
||||
+ };
|
||||
ts_cal1: calib@5c {
|
||||
reg = <0x5c 0x2>;
|
||||
};
|
||||
diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
|
||||
index 8553570642..06267f2917 100644
|
||||
--- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
|
||||
@@ -18,8 +18,8 @@
|
||||
u-boot,error-led = "error";
|
||||
u-boot,mmc-env-partition = "fip";
|
||||
st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
|
||||
- st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
- st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
|
||||
+ st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
+ st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
diff --git a/arch/arm/dts/stm32mp157a-dk1.dts b/arch/arm/dts/stm32mp157a-dk1.dts
|
||||
index f415e581a6..f48207dad5 100644
|
||||
--- a/arch/arm/dts/stm32mp157a-dk1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157a-dk1.dts
|
||||
@@ -16,12 +16,6 @@
|
||||
model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
|
||||
compatible = "st,stm32mp157a-dk1", "st,stm32mp157";
|
||||
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- serial2 = &uart7;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
diff --git a/arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi
|
||||
index f0761901a6..5b9772a0a9 100644
|
||||
--- a/arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi
|
||||
@@ -18,8 +18,8 @@
|
||||
u-boot,boot-led = "heartbeat";
|
||||
u-boot,error-led = "error";
|
||||
u-boot,mmc-env-partition = "fip";
|
||||
- st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
- st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
|
||||
+ st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
+ st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
};
|
||||
|
||||
led {
|
||||
diff --git a/arch/arm/dts/stm32mp157a-ev1.dts b/arch/arm/dts/stm32mp157a-ev1.dts
|
||||
index 11bd88a82f..85c73a916c 100644
|
||||
--- a/arch/arm/dts/stm32mp157a-ev1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157a-ev1.dts
|
||||
@@ -15,11 +15,6 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
-
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- };
|
||||
};
|
||||
|
||||
<dc {
|
||||
diff --git a/arch/arm/dts/stm32mp157c-dk2.dts b/arch/arm/dts/stm32mp157c-dk2.dts
|
||||
index 1c894f288c..53d75e1c25 100644
|
||||
--- a/arch/arm/dts/stm32mp157c-dk2.dts
|
||||
+++ b/arch/arm/dts/stm32mp157c-dk2.dts
|
||||
@@ -18,9 +18,6 @@
|
||||
compatible = "st,stm32mp157c-dk2", "st,stm32mp157";
|
||||
|
||||
aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- serial2 = &uart7;
|
||||
serial3 = &usart2;
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/dts/stm32mp157c-ev1.dts b/arch/arm/dts/stm32mp157c-ev1.dts
|
||||
index e84897ef44..3dd1244121 100644
|
||||
--- a/arch/arm/dts/stm32mp157c-ev1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157c-ev1.dts
|
||||
@@ -15,11 +15,6 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
-
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- };
|
||||
};
|
||||
|
||||
<dc {
|
||||
diff --git a/arch/arm/dts/stm32mp157d-dk1.dts b/arch/arm/dts/stm32mp157d-dk1.dts
|
||||
index bcc012cfff..d54dcf16a7 100644
|
||||
--- a/arch/arm/dts/stm32mp157d-dk1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157d-dk1.dts
|
||||
@@ -16,12 +16,6 @@
|
||||
model = "STMicroelectronics STM32MP157D-DK1 Discovery Board";
|
||||
compatible = "st,stm32mp157d-dk1", "st,stm32mp157";
|
||||
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- serial2 = &uart7;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
diff --git a/arch/arm/dts/stm32mp157d-ev1.dts b/arch/arm/dts/stm32mp157d-ev1.dts
|
||||
index 5cb08c7079..dbb2b3e059 100644
|
||||
--- a/arch/arm/dts/stm32mp157d-ev1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157d-ev1.dts
|
||||
@@ -15,11 +15,6 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
-
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- };
|
||||
};
|
||||
|
||||
<dc {
|
||||
diff --git a/arch/arm/dts/stm32mp157f-dk2.dts b/arch/arm/dts/stm32mp157f-dk2.dts
|
||||
index 15a397c4cf..1244ae1841 100644
|
||||
--- a/arch/arm/dts/stm32mp157f-dk2.dts
|
||||
+++ b/arch/arm/dts/stm32mp157f-dk2.dts
|
||||
@@ -18,9 +18,6 @@
|
||||
compatible = "st,stm32mp157f-dk2", "st,stm32mp157";
|
||||
|
||||
aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- serial2 = &uart7;
|
||||
serial3 = &usart2;
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/dts/stm32mp157f-ev1.dts b/arch/arm/dts/stm32mp157f-ev1.dts
|
||||
index 6fe600f813..0ef17cdc63 100644
|
||||
--- a/arch/arm/dts/stm32mp157f-ev1.dts
|
||||
+++ b/arch/arm/dts/stm32mp157f-ev1.dts
|
||||
@@ -16,11 +16,6 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
-
|
||||
- aliases {
|
||||
- serial0 = &uart4;
|
||||
- serial1 = &usart3;
|
||||
- };
|
||||
};
|
||||
|
||||
<dc {
|
||||
diff --git a/arch/arm/dts/stm32mp15xx-dkx.dtsi b/arch/arm/dts/stm32mp15xx-dkx.dtsi
|
||||
index acff8755d3..884c538fcb 100644
|
||||
--- a/arch/arm/dts/stm32mp15xx-dkx.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15xx-dkx.dtsi
|
||||
@@ -12,6 +12,9 @@
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
+ serial0 = &uart4;
|
||||
+ serial1 = &usart3;
|
||||
+ serial2 = &uart7;
|
||||
};
|
||||
|
||||
memory@c0000000 {
|
||||
@@ -48,6 +51,12 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
+ mcu_rsc_table: mcu_rsc_table@10048000 {
|
||||
+ compatible = "shared-dma-pool";
|
||||
+ reg = <0x10048000 0x8000>;
|
||||
+ no-map;
|
||||
+ };
|
||||
+
|
||||
mcuram: mcuram@30000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x30000000 0x40000>;
|
||||
@@ -284,7 +293,7 @@
|
||||
stusb1600@28 {
|
||||
compatible = "st,stusb1600";
|
||||
reg = <0x28>;
|
||||
- interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&gpioi>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&stusb1600_pins_a>;
|
||||
@@ -505,7 +514,7 @@
|
||||
|
||||
&m4_rproc {
|
||||
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
|
||||
- <&vdev0vring1>, <&vdev0buffer>;
|
||||
+ <&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
|
||||
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
|
||||
mbox-names = "vq0", "vq1", "shutdown";
|
||||
interrupt-parent = <&exti>;
|
||||
@@ -755,6 +764,16 @@
|
||||
&usbphyc_port0 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
+
|
||||
+ /*
|
||||
+ * Hack to keep hub active until all connected devices are suspended
|
||||
+ * otherwise the hub will be powered off as soon as the v3v3 is disabled
|
||||
+ * and it can disturb connected devices.
|
||||
+ */
|
||||
+ connector {
|
||||
+ compatible = "usb-a-connector";
|
||||
+ vbus-supply = <&v3v3>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
diff --git a/arch/arm/dts/stm32mp15xx-edx.dtsi b/arch/arm/dts/stm32mp15xx-edx.dtsi
|
||||
index 3662f449de..817982009c 100644
|
||||
--- a/arch/arm/dts/stm32mp15xx-edx.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15xx-edx.dtsi
|
||||
@@ -44,6 +44,12 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
+ mcu_rsc_table: mcu_rsc_table@10048000 {
|
||||
+ compatible = "shared-dma-pool";
|
||||
+ reg = <0x10048000 0x8000>;
|
||||
+ no-map;
|
||||
+ };
|
||||
+
|
||||
mcuram: mcuram@30000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x30000000 0x40000>;
|
||||
@@ -315,7 +321,7 @@
|
||||
|
||||
&m4_rproc {
|
||||
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
|
||||
- <&vdev0vring1>, <&vdev0buffer>;
|
||||
+ <&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
|
||||
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
|
||||
mbox-names = "vq0", "vq1", "shutdown";
|
||||
interrupt-parent = <&exti>;
|
||||
diff --git a/arch/arm/dts/stm32mp15xx-evx.dtsi b/arch/arm/dts/stm32mp15xx-evx.dtsi
|
||||
index 47a2c8e5ea..a7589d9d73 100644
|
||||
--- a/arch/arm/dts/stm32mp15xx-evx.dtsi
|
||||
+++ b/arch/arm/dts/stm32mp15xx-evx.dtsi
|
||||
@@ -10,6 +10,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
+ serial1 = &usart3;
|
||||
};
|
||||
|
||||
clocks {
|
||||
@@ -678,7 +679,16 @@
|
||||
|
||||
&usbphyc_port0 {
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
- vbus-supply = <&vbus_sw>;
|
||||
+
|
||||
+ /*
|
||||
+ * Hack to keep hub active until all connected devices are suspended
|
||||
+ * otherwise the hub will be powered off as soon as the v3v3 is disabled
|
||||
+ * and it can disturb connected devices.
|
||||
+ */
|
||||
+ connector {
|
||||
+ compatible = "usb-a-connector";
|
||||
+ vbus-supply = <&v3v3>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
From e1969811c8ae2c4874734aab703ff54ba1fe5206 Mon Sep 17 00:00:00 2001
|
||||
From: Lionel Vitte <lionel.vitte@st.com>
|
||||
Date: Mon, 18 Oct 2021 17:12:48 +0200
|
||||
Subject: [PATCH 11/11] ARM v2020.10-stm32mp-r2 CONFIG
|
||||
|
||||
---
|
||||
configs/rpi_0_w_defconfig | 1 +
|
||||
configs/rpi_2_defconfig | 1 +
|
||||
configs/rpi_3_32b_defconfig | 1 +
|
||||
configs/rpi_3_b_plus_defconfig | 1 +
|
||||
configs/rpi_3_defconfig | 1 +
|
||||
configs/rpi_4_32b_defconfig | 1 +
|
||||
configs/rpi_4_defconfig | 1 +
|
||||
configs/rpi_arm64_defconfig | 1 +
|
||||
configs/rpi_defconfig | 1 +
|
||||
configs/stm32mp15_basic_defconfig | 3 +++
|
||||
configs/stm32mp15_trusted_defconfig | 3 +++
|
||||
11 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
|
||||
index bba5e12b12..ed0707ea21 100644
|
||||
--- a/configs/rpi_0_w_defconfig
|
||||
+++ b/configs/rpi_0_w_defconfig
|
||||
@@ -12,6 +12,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
|
||||
index 1c2bbb29ce..1bbb2adf36 100644
|
||||
--- a/configs/rpi_2_defconfig
|
||||
+++ b/configs/rpi_2_defconfig
|
||||
@@ -12,6 +12,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
|
||||
index b8a3d17f43..c3f1e4a2db 100644
|
||||
--- a/configs/rpi_3_32b_defconfig
|
||||
+++ b/configs/rpi_3_32b_defconfig
|
||||
@@ -13,6 +13,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
|
||||
index 4c361438fa..6fd55a8e45 100644
|
||||
--- a/configs/rpi_3_b_plus_defconfig
|
||||
+++ b/configs/rpi_3_b_plus_defconfig
|
||||
@@ -13,6 +13,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
|
||||
index 9b281a4f15..08db309452 100644
|
||||
--- a/configs/rpi_3_defconfig
|
||||
+++ b/configs/rpi_3_defconfig
|
||||
@@ -13,6 +13,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
|
||||
index 4a88448e9d..05bd355d5b 100644
|
||||
--- a/configs/rpi_4_32b_defconfig
|
||||
+++ b/configs/rpi_4_32b_defconfig
|
||||
@@ -11,6 +11,7 @@ CONFIG_PREBOOT="pci enum; usb start;"
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_DFU=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
|
||||
index 71f95ed8f7..367abb5bac 100644
|
||||
--- a/configs/rpi_4_defconfig
|
||||
+++ b/configs/rpi_4_defconfig
|
||||
@@ -11,6 +11,7 @@ CONFIG_PREBOOT="pci enum; usb start;"
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_DFU=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
|
||||
index 4ce8469f43..cb1513bb31 100644
|
||||
--- a/configs/rpi_arm64_defconfig
|
||||
+++ b/configs/rpi_arm64_defconfig
|
||||
@@ -11,6 +11,7 @@ CONFIG_PREBOOT="pci enum; usb start;"
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
|
||||
index b5ad53c37b..4722f161c9 100644
|
||||
--- a/configs/rpi_defconfig
|
||||
+++ b/configs/rpi_defconfig
|
||||
@@ -12,6 +12,7 @@ CONFIG_USE_PREBOOT=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
|
||||
index c08d06474b..c90220a60d 100644
|
||||
--- a/configs/stm32mp15_basic_defconfig
|
||||
+++ b/configs/stm32mp15_basic_defconfig
|
||||
@@ -8,6 +8,7 @@ CONFIG_SPL_DM_SPI=y
|
||||
CONFIG_SPL_TEXT_BASE=0x2FFC2500
|
||||
CONFIG_SPL_MMC_SUPPORT=y
|
||||
CONFIG_SPL=y
|
||||
+CONFIG_CMD_STM32KEY=y
|
||||
CONFIG_TARGET_ST_STM32MP15x=y
|
||||
CONFIG_CMD_STM32PROG=y
|
||||
CONFIG_TYPEC_STUSB160X=y
|
||||
@@ -29,6 +30,7 @@ CONFIG_SPL_MTD_SUPPORT=y
|
||||
CONFIG_SPL_DM_SPI_FLASH=y
|
||||
CONFIG_SPL_POWER_SUPPORT=y
|
||||
CONFIG_SPL_SPI_FLASH_MTD=y
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
@@ -51,6 +53,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_RNG=y
|
||||
CONFIG_CMD_TIMER=y
|
||||
CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
|
||||
index 5b4cfc4ca3..2161ccbefa 100644
|
||||
--- a/configs/stm32mp15_trusted_defconfig
|
||||
+++ b/configs/stm32mp15_trusted_defconfig
|
||||
@@ -4,6 +4,7 @@ CONFIG_TFABOOT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x3000
|
||||
CONFIG_ENV_OFFSET=0x480000
|
||||
CONFIG_ENV_SECT_SIZE=0x40000
|
||||
+CONFIG_CMD_STM32KEY=y
|
||||
CONFIG_TARGET_ST_STM32MP15x=y
|
||||
CONFIG_CMD_STM32PROG=y
|
||||
CONFIG_TYPEC_STUSB160X=y
|
||||
@@ -13,6 +14,7 @@ CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
|
||||
+CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PROMPT="STM32MP> "
|
||||
CONFIG_CMD_ADTIMG=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
@@ -35,6 +37,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_RNG=y
|
||||
CONFIG_CMD_TIMER=y
|
||||
CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
Compilation of U-Boot:
|
||||
1. Pre-requisite
|
||||
2. Initialise cross-compilation via SDK
|
||||
2. Initialize cross-compilation via SDK
|
||||
3. Prepare U-Boot source code
|
||||
4. Management of U-Boot source code
|
||||
4. Manage of U-Boot source code with GIT
|
||||
5. Compile U-Boot source code
|
||||
6. Update software on board
|
||||
|
||||
1. Pre-requisite:
|
||||
-----------------
|
||||
----------------
|
||||
1. Pre-requisite
|
||||
----------------
|
||||
OpenSTLinux SDK must be installed.
|
||||
|
||||
For U-Boot build you need to install:
|
||||
@@ -22,7 +23,8 @@ If you have never configured you git configuration:
|
||||
$ git config --global user.name "your_name"
|
||||
$ git config --global user.email "your_email@example.com"
|
||||
|
||||
2. Initialize cross-compilation via SDK:
|
||||
---------------------------------------
|
||||
2. Initialize cross-compilation via SDK
|
||||
---------------------------------------
|
||||
* Source SDK environment:
|
||||
$ source <path to SDK>/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
|
||||
@@ -34,34 +36,38 @@ If you have never configured you git configuration:
|
||||
Warning: the environment are valid only on the shell session where you have
|
||||
sourced the sdk environment.
|
||||
|
||||
3. Prepare U-Boot source:
|
||||
------------------------
|
||||
|
||||
Extract the sources from tarball, for example:
|
||||
$ tar xfJ SOURCES-st-image-weston-openstlinux-weston-stm32mp1-*.tar.xz
|
||||
3. Prepare U-Boot source
|
||||
------------------------
|
||||
If not already done, extract the sources from Developer Package tarball, for example:
|
||||
$ tar xfJ en.SOURCES-stm32mp1-*.tar.xz
|
||||
|
||||
In the U-Boot source directory (sources/*/##BP##-##PR##),
|
||||
you have one U-Boot source tarball, the patches and one Makefile:
|
||||
- ##BP##-##PR##.tar.gz
|
||||
- 000*.patch
|
||||
- ##BP##-##PR##.tar.xz
|
||||
- 00*.patch
|
||||
- Makefile.sdk
|
||||
|
||||
NB: if you would like to have a git management on the code see
|
||||
section 4 [Management of U-Boot source code with GIT]
|
||||
If you would like to have a git management for the source code move to
|
||||
to section 4 [Management of U-Boot source code with GIT].
|
||||
|
||||
Then you must extract the tarball and apply the patch:
|
||||
Otherwise, to manage U-Boot source code without git, you must extract the
|
||||
tarball now and apply the patch:
|
||||
|
||||
$> tar xfz ##BP##-##PR##.tar.gz
|
||||
$> tar xf ##BP##-##PR##.tar.xz
|
||||
$> cd ##BP##
|
||||
$> for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
|
||||
|
||||
4. Management of U-Boot source code with GIT
|
||||
--------------------------------------------
|
||||
You can now move to section 5 [Compile U-Boot source code].
|
||||
|
||||
-------------------------------------
|
||||
4. Manage U-Boot source code with GIT
|
||||
-------------------------------------
|
||||
If you like to have a better management of change made on U-Boot source,
|
||||
you have 3 solutions to use git
|
||||
|
||||
4.1 Get STMicroelectronics U-Boot source from GitHub
|
||||
|
||||
----------------------------------------------------
|
||||
URL: https://github.com/STMicroelectronics/u-boot.git
|
||||
Branch: ##ARCHIVER_ST_BRANCH##
|
||||
Revision: ##ARCHIVER_ST_REVISION##
|
||||
@@ -70,15 +76,15 @@ you have 3 solutions to use git
|
||||
$ git checkout -b WORKING ##ARCHIVER_ST_REVISION##
|
||||
|
||||
4.2 Create Git from tarball
|
||||
|
||||
$ tar xfz ##BP##-##PR##.tar.gz
|
||||
---------------------------
|
||||
$ tar xf ##BP##-##PR##.tar.xz
|
||||
$ cd ##BP##
|
||||
$ test -d .git || git init . && git add . && git commit -m "U-Boot source code" && git gc
|
||||
$ git checkout -b WORKING
|
||||
$ for p in `ls -1 ../*.patch`; do git am $p; done
|
||||
|
||||
4.3 Get Git from community and apply STMicroelectronics patches
|
||||
|
||||
4.3 Get Git from DENX community and apply STMicroelectronics patches
|
||||
---------------------------------------------------------------
|
||||
URL: git://git.denx.de/u-boot.git
|
||||
Branch: ##ARCHIVER_COMMUNITY_BRANCH##
|
||||
Revision: ##ARCHIVER_COMMUNITY_REVISION##
|
||||
@@ -89,38 +95,53 @@ or
|
||||
|
||||
$ cd u-boot
|
||||
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
|
||||
$ for p in `ls -1 ../*.patch`; do git am $p; done
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
|
||||
5. Compilation U-Boot source code:
|
||||
----------------------------------
|
||||
-----------------------------
|
||||
5. Compile U-Boot source code
|
||||
-----------------------------
|
||||
To compile U-Boot source code, first move to U-Boot source:
|
||||
$ cd ##BP##
|
||||
or
|
||||
$ cd u-boot
|
||||
|
||||
5.1 Compilation for one target (one defconfig, one device tree) - and no FIP
|
||||
5.1 Compilation for one target
|
||||
------------------------------
|
||||
STM32MP series is selected by defconfig: stm32mp13_defconfig or stm32mp15_defconfig
|
||||
Board is selected by the device tree name to use
|
||||
|
||||
see <U-Boot source>/board/st/stm32mp1/README for details
|
||||
see <U-Boot source>/doc/board/st/stm32mp1.rst for details
|
||||
|
||||
$ make stm32mp15_<config>_defconfig
|
||||
$ make <target>_defconfig
|
||||
$ make DEVICE_TREE=<device tree> all
|
||||
|
||||
example:
|
||||
|
||||
a) trusted boot on ev1
|
||||
$ make stm32mp15_trusted_defconfig
|
||||
$ make DEVICE_TREE=stm32mp157c-ev1 all
|
||||
a) trusted boot on STM32MP157C-EV1
|
||||
$ make stm32mp15_defconfig
|
||||
$ make DEVICE_TREE=stm32mp157c-ev1 all
|
||||
|
||||
b) basic boot on dk2
|
||||
$ make stm32mp15_basic_defconfig
|
||||
$ make DEVICE_TREE=stm32mp157c-dk2 all
|
||||
b) trusted boot on STM32MP135F-DK
|
||||
$ make stm32mp13_defconfig
|
||||
$ make DEVICE_TREE=stm32mp135f-dk all
|
||||
|
||||
then u-boot.dtb and u-boot-nodtb.bin can be added in the an existing FIP file with:
|
||||
$ fiptool update --verbose \
|
||||
--nt-fw u-boot-nodtb.bin \
|
||||
-hw-config u-boot.dtb \
|
||||
<FIP.bin>
|
||||
|
||||
or used to create a FIP, see command in TF-A readme.
|
||||
|
||||
warning: 'fiptool update' is not possible for signed FIP
|
||||
|
||||
5.2 Compilation for several targets: use Makefile.sdk (with FIP)
|
||||
----------------------------------------------------------------
|
||||
Calls the specific 'Makefile.sdk' provided to compile U-Boot:
|
||||
- Display 'Makefile.sdk' file default configuration and targets:
|
||||
$ make -f $PWD/../Makefile.sdk help
|
||||
As mentionned in help, OpenSTLinux has activated FIP by default, so the FIP_artifacts should be specified
|
||||
- In case of using SOURCES-xxxx.tar.gz of Developer package the FIP_DEPLOYDIR_ROOT should be set as below:
|
||||
Since OpenSTLinux activates FIP by default, FIP_artifacts directory path must be specified before launching compilation
|
||||
- In case of using SOURCES-xxxx.tar.gz of Developer package the FIP_DEPLOYDIR_ROOT must be set as below:
|
||||
$> export FIP_DEPLOYDIR_ROOT=$PWD/../../FIP_artifacts
|
||||
|
||||
- Compile default U-Boot configuration:
|
||||
@@ -137,6 +158,10 @@ Default U-Boot configuration is done in 'Makefile.sdk' file through specific var
|
||||
- 'UBOOT_DEVICETREE' is a list of device tree to build, using 'space' as separator.
|
||||
ex: UBOOT_DEVICETREE="<devicetree1> <devicetree2>"
|
||||
|
||||
By default, the build results for this component are available in $PWD/../deploy directory.
|
||||
If needed, this deploy directory can be specified by added "DEPLOYDIR=<your_deploy_dir_path>" compilation option to the build command line above.
|
||||
In case DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/u-boot it overwrites files directly in FIP artifacts directory.
|
||||
|
||||
The generated FIP images are available in $FIP_DEPLOYDIR_ROOT/fip
|
||||
|
||||
You can override the default U-Boot configuration if you specify these variables:
|
||||
@@ -145,7 +170,8 @@ You can override the default U-Boot configuration if you specify these variables
|
||||
- Compile for a specific U-Boot configuration:
|
||||
$ make -f $PWD/../Makefile.sdk all UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_trusted_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157f-dk2
|
||||
|
||||
6. Update software on board:
|
||||
----------------------------
|
||||
---------------------------
|
||||
6. Update software on board
|
||||
---------------------------
|
||||
Please use STM32CubeProgrammer and only tick the ssbl-boot and fip partition (more informations on the wiki website http://wiki.st.com/stm32mpu)
|
||||
|
||||
Reference in new issue
Block a user