]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(imx8mq): add version for B2
authorYe Li <ye.li@nxp.com>
Wed, 3 Feb 2021 04:06:40 +0000 (20:06 -0800)
committerJacky Bai <ping.bai@nxp.com>
Wed, 1 Mar 2023 02:18:03 +0000 (10:18 +0800)
iMX8MQ B2 chip uses same OCOTP magic value with B1. So
read the ROM version to distinguish it with B1.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I3e6865922deeb66816a0dddb49d986405e802b6f

plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c

index 4706c20fc8811f078f5b885f6fd3f5deb950f29f..264d920f74334d478e4bf3e4744d4368ec151cd6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -82,7 +82,11 @@ static void imx8mq_soc_info_init(void)
        ocotp_val = mmio_read_32(IMX_OCOTP_BASE + OCOTP_SOC_INFO_B1);
        if (ocotp_val == 0xff0055aa) {
                imx_soc_revision &= ~0xff;
-               imx_soc_revision |= 0x21;
+               if (rom_version == 0x22) {
+                       imx_soc_revision |= 0x22;
+               } else {
+                       imx_soc_revision |= 0x21;
+               }
                return;
        }
 }