soc: imx: Add SCU SoC info driver support
PATCH v7 1/2 soc: imx: Add SCU SoC info driver support
Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce driver dependency into Kconfig as CONFIG_IMX_SCU must be selected to support i.MX SCU SoC driver, also need to use platform driver model to make sure IMX_SCU driver is probed before i.MX SCU SoC driver.
With this patch, SoC info can be read from sysfs:
i.mx8qxp-mek# cat /sys/devices/soc0/family
Freescale i.MX
i.mx8qxp-mek# cat /sys/devices/soc0/soc_id0x2
i.mx8qxp-mek# cat /sys/devices/soc0/machine
Freescale i.MX8QXP MEK
i.mx8qxp-mek# cat /sys/devices/soc0/revision
1.1
---
Changes since V6:
- remove the "unknown" soc_id and revision support, as they are NOT useful and could introduce kernel opps in the failure path, as the "unknown" can NOT be freed;
- minor improvement for platform device name, IPC structure definition.
--- drivers/soc/imx/Kconfig | 9 +++ drivers/soc/imx/Makefile | 1 + drivers/soc/imx/soc-imx-scu.c | 144 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 drivers/soc/imx/soc-imx-scu.c
drivers/soc/imx/Kconfig +9 -0
@@ -8,4 +8,13 @@ config IMX_GPCV2_PM_DOMAINS select PM_GENERIC_DOMAINS default y if SOC_IMX7D +config IMX_SCU_SOC + bool "i.MX System Controller Unit SoC info support" + depends on IMX_SCU + select SOC_BUS + help + If you say yes here you get support for the NXP i.MX System + Controller Unit SoC info module, it will provide the SoC info + like SoC family, ID and revision etc. + endmenu
drivers/soc/imx/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o obj-$(CONFIG_ARCH_MXC) += soc-imx8.o +obj-$(CONFIG_IMX_SCU_SOC) += soc-imx-scu.o
drivers/soc/imx/soc-imx-scu.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v7 2/2 arm64: defconfig: Add i.MX SCU SoC info driver
This patch selects CONFIG_IMX_SCU_SOC by default to support i.MX system controller unit SoC info driver.
---
No changes.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -694,6 +694,7 @@ CONFIG_RPMSG_QCOM_GLINK_RPM=y CONFIG_RPMSG_QCOM_GLINK_SMEM=m CONFIG_RPMSG_QCOM_SMD=y CONFIG_RASPBERRYPI_POWER=y +CONFIG_IMX_SCU_SOC=y CONFIG_QCOM_COMMAND_DB=y CONFIG_QCOM_GENI_SE=y CONFIG_QCOM_GLINK_SSR=m
Signature · 1 line
2.7.4
Shawn Guo
AppliedQuoted 17 lines · Anson Huang
Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce driver dependency into
KconfigasCONFIG_IMX_SCUmust be selected to support i.MX SCU SoC driver, also need to use platform driver model to make sureIMX_SCUdriver is probed before i.MX SCU SoC driver.With this patch, SoC info can be read from sysfs:
i.mx8qxp-mek# cat
/sys/devices/soc0/family
Freescale i.MXi.mx8qxp-mek# cat
/sys/devices/soc0/soc_id0x2i.mx8qxp-mek# cat
/sys/devices/soc0/machine
Freescale i.MX8QXP MEK
Quoted 6 lines
i.mx8qxp-mek# cat
/sys/devices/soc0/revision
1.1Signed-off-by Anson Huang <[email protected]>Reviewed-by Abel Vesa <[email protected]>Reviewed-by Dong Aisheng <[email protected]>
Applied, thanks.