summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/st/common/Kconfig2
-rw-r--r--board/st/common/cmd_stboard.c6
-rw-r--r--board/st/stm32mp2/Kconfig14
3 files changed, 21 insertions, 1 deletions
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/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index b9d0abdba7d..58d9f205b92 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++)
@@ -91,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));
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