]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
stm32mp1: add finished good variant in board identifier
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 8 Jan 2020 09:05:14 +0000 (10:05 +0100)
committerYann Gautier <yann.gautier@st.com>
Tue, 13 Oct 2020 09:27:40 +0000 (11:27 +0200)
Update the board info with the new coding including the finished good
variant:

Board: MBxxxx Var<CPN>.<FG> Rev.<Rev>-<BOM>

The OTP 59 coding is:
bit [31:16] (hex) => MBxxxx
bit [15:12] (dec) => Variant CPN (1....15)
bit [11:8]  (dec) => Revision board (index with A = 1, Z = 26)
bit [7:4]   (dec) => Variant FG : finished good (NEW)
bit [3:0]   (dec) => BOM (01, .... 255)

Change-Id: I4fbc0c84596419d1bc30d166311444ece1d9123f
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
plat/st/stm32mp1/stm32mp1_private.c

index e1df31829264b58dee130b454265884929a56182..02579d8c65b001b60b962abb5939270ff7217621 100644 (file)
 /* Internal layout of the 32bit OTP word board_id */
 #define BOARD_ID_BOARD_NB_MASK         GENMASK(31, 16)
 #define BOARD_ID_BOARD_NB_SHIFT                16
-#define BOARD_ID_VARIANT_MASK          GENMASK(15, 12)
-#define BOARD_ID_VARIANT_SHIFT         12
+#define BOARD_ID_VARCPN_MASK           GENMASK(15, 12)
+#define BOARD_ID_VARCPN_SHIFT          12
 #define BOARD_ID_REVISION_MASK         GENMASK(11, 8)
 #define BOARD_ID_REVISION_SHIFT                8
+#define BOARD_ID_VARFG_MASK            GENMASK(7, 4)
+#define BOARD_ID_VARFG_SHIFT           4
 #define BOARD_ID_BOM_MASK              GENMASK(3, 0)
 
 #define BOARD_ID2NB(_id)               (((_id) & BOARD_ID_BOARD_NB_MASK) >> \
                                         BOARD_ID_BOARD_NB_SHIFT)
-#define BOARD_ID2VAR(_id)              (((_id) & BOARD_ID_VARIANT_MASK) >> \
-                                        BOARD_ID_VARIANT_SHIFT)
+#define BOARD_ID2VARCPN(_id)           (((_id) & BOARD_ID_VARCPN_MASK) >> \
+                                        BOARD_ID_VARCPN_SHIFT)
 #define BOARD_ID2REV(_id)              (((_id) & BOARD_ID_REVISION_MASK) >> \
                                         BOARD_ID_REVISION_SHIFT)
+#define BOARD_ID2VARFG(_id)            (((_id) & BOARD_ID_VARFG_MASK) >> \
+                                        BOARD_ID_VARFG_SHIFT)
 #define BOARD_ID2BOM(_id)              ((_id) & BOARD_ID_BOM_MASK)
 
 #if defined(IMAGE_BL2)
@@ -333,9 +337,10 @@ void stm32mp_print_boardinfo(void)
 
                rev[0] = BOARD_ID2REV(board_id) - 1 + 'A';
                rev[1] = '\0';
-               NOTICE("Board: MB%04x Var%d Rev.%s-%02d\n",
+               NOTICE("Board: MB%04x Var%d.%d Rev.%s-%02d\n",
                       BOARD_ID2NB(board_id),
-                      BOARD_ID2VAR(board_id),
+                      BOARD_ID2VARCPN(board_id),
+                      BOARD_ID2VARFG(board_id),
                       rev,
                       BOARD_ID2BOM(board_id));
        }