Commit 1bfeb333de0f958d00def2b191e5b6aa5d15a15f

Authored by BJ DevOps Team

Merge remote-tracking branch 'origin/imx_v2020.04' into lf_v2020.04

* origin/imx_v2020.04:
  MLK-25291-3 imx8mq_evk: Applying default LPDDR4 script for B2
  MLK-25291-2 misc: ocotp: Update OCOTP driver for iMX8MQ B2
  MLK-25291-1 iMX8MQ: Recognize the B2 revision

Showing 4 changed files Side-by-side Diff

arch/arm/include/asm/arch-imx/cpu.h
... ... @@ -68,6 +68,7 @@
68 68 #define CHIP_REV_1_5 0x15
69 69 #define CHIP_REV_2_0 0x20
70 70 #define CHIP_REV_2_1 0x21
  71 +#define CHIP_REV_2_2 0x22
71 72 #define CHIP_REV_2_5 0x25
72 73 #define CHIP_REV_3_0 0x30
73 74  
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);
board/freescale/imx8mq_evk/spl.c
... ... @@ -32,7 +32,7 @@
32 32 static void spl_dram_init(void)
33 33 {
34 34 /* ddr init */
35   - if ((get_cpu_rev() & 0xfff) == CHIP_REV_2_1)
  35 + if (soc_rev() >= CHIP_REV_2_1)
36 36 ddr_init(&dram_timing);
37 37 else
38 38 ddr_init(&dram_timing_b0);
drivers/misc/mxc_ocotp.c
... ... @@ -334,7 +334,7 @@
334 334 struct ocotp_regs *regs;
335 335 int ret;
336 336  
337   - if (is_imx8mq() && is_soc_rev(CHIP_REV_2_1)) {
  337 + if (is_imx8mq() && (soc_rev() >= CHIP_REV_2_1)) {
338 338 printf("mxc_ocotp %s(): fuse sense is disabled\n", __func__);
339 339 return -EPERM;
340 340 }