ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs
authorIvan Zaentsev <ivan.zaentsev@wirenboard.ru>
Mon, 16 Nov 2020 16:58:26 +0000 (19:58 +0300)
committerShawn Guo <shawnguo@kernel.org>
Mon, 30 Nov 2020 09:31:29 +0000 (17:31 +0800)
commit4ba79e25d7f1a7394021ba4c215a7ecdcc270fb6
tree7ceb9600023b8aac8e9b8c2ccaa7ba861fed3c55
parent53cc6bc69e536efe6c1cef98edfb7b3f0a14fabe
ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs

i.MX23 and i.MX28 SoCs unique identifiers are factory-programmed
in On-Chip OTP memory. i.MX28's 64-bit unique id is in
HW_OCOTP_OPS2:HW_OCOTP_OPS3 (see MCIMX28 Ref. Man., sec. 20.4.22-23).

i.MX23 provides 32-bit long unique id in HW_OCOTP_OPS3.
Though not clearly documented, there is a clue in sec. 35.9.3.

The unique id is reported in /sys/devices/soc0/serial_number
and in /proc/cpuinfo

Signed-off-by: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
Suggested-by: Evgeny Boger <boger@wirenboard.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-mxs/mach-mxs.c