summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-01-13 09:56:19 -0500
committerTom Rini <[email protected]>2023-01-13 09:56:19 -0500
commitfe4c21de4fbf5756d354d2473ffc675e7596ccfb (patch)
tree8778bb160f68af9551d31a904af939f093235131 /board
parentb3f6e0ff1fe48fe56809ff85dc22c555bfc81035 (diff)
parent0e86f813f474ea6f46c6055b579eba10930dffd6 (diff)
Merge tag 'u-boot-stm32-20230113' of https://source.denx.de/u-boot/custodians/u-boot-stm
Add driver to manage onboard hub supplies Add calibration support for stm32-adc Linux kernel v6.1 DT synchronization for stm32mp151.dtsi stm32mp157a-dk1-scmi-u-boot.dtsi update Add support of OP-TEE and STM32MP13x in bsec driver ECDSA various fixes for stm32mp
Diffstat (limited to 'board')
-rw-r--r--board/st/common/Kconfig2
-rw-r--r--board/st/common/cmd_stboard.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/board/st/common/Kconfig b/board/st/common/Kconfig
index 2f57118bb26..aba3590866e 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_STM32MP15x
+ default y if TARGET_ST_STM32MP15x || TARGET_ST_STM32MP13x
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 e12669b8628..853ab78bbf1 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -2,8 +2,8 @@
/*
* Copyright (C) 2019, STMicroelectronics - All Rights Reserved
*
- * the st command stboard supports the STMicroelectronics board identification
- * saved in OTP 59.
+ * the command stboard supports the STMicroelectronics board identification
+ * saved in OTP_BOARD.
*
* The ST product codification have several element
* - "Commercial Product Name" (CPN): type of product board (DKX, EVX)
@@ -18,7 +18,7 @@
* - Finished Good = EVA32MP157A1$AU1
*
* Both information are written on board and these information are also saved
- * in OTP59, with:
+ * in OTP_BOARD (59 for STM32MP15x or 60 for STM32MP13x), with:
* bit [31:16] (hex) => Board id, MBxxxx
* bit [15:12] (dec) => Variant CPN (1....15)
* bit [11:8] (dec) => Revision board (index with A = 1, Z = 26)
@@ -34,6 +34,7 @@
#include <command.h>
#include <console.h>
#include <misc.h>
+#include <asm/arch/bsec.h>
#include <dm/device.h>
#include <dm/uclass.h>
@@ -48,6 +49,7 @@ static bool check_stboard(u16 board)
0x1298,
0x1341,
0x1497,
+ 0x1635,
};
for (i = 0; i < ARRAY_SIZE(st_board_id); i++)
@@ -109,7 +111,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
else
display_stboard(otp);
printf(" OTP %d %s locked !\n", BSEC_OTP_BOARD,
- lock == 1 ? "" : "NOT");
+ lock & BSEC_LOCK_PERM ? "" : "NOT");
return CMD_RET_SUCCESS;
}
@@ -178,7 +180,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
}
/* write persistent lock */
- otp = 1;
+ otp = BSEC_LOCK_PERM;
ret = misc_write(dev, STM32_BSEC_LOCK(BSEC_OTP_BOARD),
&otp, sizeof(otp));
if (ret != sizeof(otp)) {