The Amlogic Meson SoC Secure Monitor implements a call to retrieve an unique SoC ID starting from the GX Family and all new families. But GX-family chips (e.g. GXB, GXL and newer) supports also 128-bit chip ID. 128-bit chip ID consists 32-bit SoC version and 96-bit OTP data. This patchset introduces an exported sysfs string for the 128-bit chipid, considering a check for the version of the returned value. If the chip does not support version 2 of the call, it falls back to (where possible) information from the meson-gx-socinfo driver to supplement the data from OTP. Viacheslav Bocharov (4): firmware: meson-sm: change sprintf to scnprintf firmware: meson_sm: Add chipid number sysfs entry soc: amlogic: meson-gx-socinfo: export socinfo for use in other modules firmware: meson_sm: use meson_gx_socinfo for compatibility drivers/firmware/meson/meson_sm.c | 72 +++++++++++++++++++++++++- drivers/soc/amlogic/meson-gx-socinfo.c | 34 +++++++----- 2 files changed, 90 insertions(+), 16 deletions(-) -- 2.34.1