From 32912d0908bbdb56a8863e835a2edc6e13c7159a Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 11 Feb 2026 15:32:22 +0100 Subject: board: st: common: Add support of stm32mp21xx-dk board Add board identifier for STM32MP21 discovery board = MB2059. Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- board/st/common/cmd_stboard.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board') diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c index b9d0abdba7d..d77046499a0 100644 --- a/board/st/common/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -51,6 +51,7 @@ static bool check_stboard(u16 board) 0x1605, /* stm32mp25xx-dk */ 0x1635, 0x1936, /* stm32mp25xx-ev1 */ + 0x2059, /* stm32mp21xx-dk */ }; for (i = 0; i < ARRAY_SIZE(st_board_id); i++) -- cgit v1.2.3 From 6a6f2eb3e6a78abf76566df1e57b85a2a3d35ee2 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 11 Feb 2026 15:32:23 +0100 Subject: board: st: common: add uclass_get_device_by_driver()'s return value check class_get_device_by_driver()'s return value is not checked, in case of BSEC driver is not probed, dev is not set and used just after as parameter of misc_read() which leads to a Synchronous Abort. Add uclass_get_device_by_driver()'s return value check to fix it. Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- board/st/common/cmd_stboard.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board') diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c index d77046499a0..58d9f205b92 100644 --- a/board/st/common/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -92,6 +92,11 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc, DM_DRIVER_GET(stm32mp_bsec), &dev); + if (ret) { + puts("Can't get BSEC device\n"); + return CMD_RET_FAILURE; + } + ret = misc_read(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD), &otp, sizeof(otp)); -- cgit v1.2.3 From d557099fb0f1b1b8ae0a415e006c3d517874b8a6 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 3 Feb 2026 17:49:25 +0100 Subject: ARM: stm32mp: Add STM32MP21 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit STM32MP21 application processors (STM32 MPUs) based on a single Arm Cortex®-A35 core running up to 1.5 GHz and Cortex®-M33 core running at 300 MHz. It is pin-compatible with the STM32MP2 series in the VFBGA361 10×10 mm package: the STM32MP21 uses a subset of the STM32MP23 pinout, which itself is a subset of the STM32MP25. More details available here : https://www.st.com/en/microcontrollers-microprocessors/stm32mp2-series.html Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- board/st/common/Kconfig | 2 +- board/st/stm32mp2/Kconfig | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'board') diff --git a/board/st/common/Kconfig b/board/st/common/Kconfig index 94ec806949b..3d00f3f3331 100644 --- a/board/st/common/Kconfig +++ b/board/st/common/Kconfig @@ -1,7 +1,7 @@ config CMD_STBOARD bool "stboard - command for OTP board information" depends on ARCH_STM32MP - default y if TARGET_ST_STM32MP13X || TARGET_ST_STM32MP15X || TARGET_ST_STM32MP23X || TARGET_ST_STM32MP25X + default y if TARGET_ST_STM32MP13X || TARGET_ST_STM32MP15X || TARGET_ST_STM32MP21X || TARGET_ST_STM32MP23X || TARGET_ST_STM32MP25X help This compile the stboard command to read and write the board in the OTP. diff --git a/board/st/stm32mp2/Kconfig b/board/st/stm32mp2/Kconfig index e88c71a278e..d8882f113b6 100644 --- a/board/st/stm32mp2/Kconfig +++ b/board/st/stm32mp2/Kconfig @@ -1,3 +1,17 @@ +if TARGET_ST_STM32MP21X + +config SYS_BOARD + default "stm32mp2" + +config SYS_VENDOR + default "st" + +config SYS_CONFIG_NAME + default "stm32mp21_st_common" + +source "board/st/common/Kconfig" +endif + if TARGET_ST_STM32MP23X config SYS_BOARD -- cgit v1.2.3