2019-10-28 13:25:13

by Anson Huang

[permalink] [raw]
Subject: [PATCH 8/9] ARM: imx: Add serial number support for i.MX6SX

i.MX6SX has a 64-bit SoC unique ID stored in OCOTP, it can be used
as SoC serial number, see below example:

root@imx6qpdlsolox:~# cat /sys/devices/soc0/serial_number
986540983AE87921

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm/mach-imx/cpu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index eb65eff..17cfa86 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -136,6 +136,7 @@ struct device * __init imx_soc_device_init(void)
soc_id = "i.MX6DL";
break;
case MXC_CPU_IMX6SX:
+ ocotp_compat = "fsl,imx6sx-ocotp";
soc_id = "i.MX6SX";
break;
case MXC_CPU_IMX6Q:
--
2.7.4