[U-Boot] imx6dq: Fix chip version issue for rev1.3
diff mbox series

Message ID 1562755098-45287-1-git-send-email-ye.li@nxp.com
State Accepted
Commit 5fdef6c4c5cb33ad675b5203eea39230d6f84914
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot] imx6dq: Fix chip version issue for rev1.3
Related show

Commit Message

Ye Li July 10, 2019, 10:38 a.m. UTC
According to iMX6DQ RM, the minor field (low 8 bits) in DIGPROG is not
aligned on silicon revision 1.3. So update get_cpu_rev to correct the
revision.

0x00630002 Silicon revision 1.2
0x00630005 Silicon revision 1.3
0x00630006 Silicon revision 1.6

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/mx6/soc.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index e80f1d4..4084ab7 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -95,6 +95,11 @@  u32 get_cpu_rev(void)
 			type = MXC_CPU_MX6DP;
 	}
 	reg &= 0xff;		/* mx6 silicon revision */
+
+	/* For 6DQ, the value 0x00630005 is Silicon revision 1.3*/
+	if (((type == MXC_CPU_MX6Q) || (type == MXC_CPU_MX6D)) && (reg == 0x5))
+		reg = 0x3;
+
 	return (type << 12) | (reg + (0x10 * (major + 1)));
 }