Commit ec1f64b420c7a5c6dc6435fa98735b694720e26c
1 parent
873587f1c0
Exists in
smarc_8mq_lf_v2020.04
and in
4 other branches
MLK-25291-1 iMX8MQ: Recognize the B2 revision
i.MX8MQ B2 is using same value in OCOTP_READ_FUSE_DATA like B1, so we have to check the ROM verision to distinguish the revision. As we have checked the B1 rev for sticky bits work around in secure boot. So it won't apply on B2. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 1ac96bde4920fa3e2a3bb4a79b342ca4f5adb4a5)
Showing 2 changed files with 11 additions and 1 deletions Side-by-side Diff
arch/arm/include/asm/arch-imx/cpu.h
arch/arm/mach-imx/imx8m/soc.c
... | ... | @@ -404,7 +404,16 @@ |
404 | 404 | * 0xff0055aa is magic number for B1. |
405 | 405 | */ |
406 | 406 | if (readl((void __iomem *)(OCOTP_BASE_ADDR + 0x40)) == 0xff0055aa) { |
407 | - reg = CHIP_REV_2_1; | |
407 | + /* | |
408 | + * B2 uses same DIGPROG and OCOTP_READ_FUSE_DATA value with B1, | |
409 | + * so have to check ROM to distinguish them | |
410 | + */ | |
411 | + rom_version = readl((void __iomem *)ROM_VERSION_B0); | |
412 | + rom_version &= 0xff; | |
413 | + if (rom_version == CHIP_REV_2_2) | |
414 | + reg = CHIP_REV_2_2; | |
415 | + else | |
416 | + reg = CHIP_REV_2_1; | |
408 | 417 | } else { |
409 | 418 | rom_version = |
410 | 419 | readl((void __iomem *)ROM_VERSION_A0); |