Lines Matching +full:imx6sx +full:- +full:ocotp

1 // SPDX-License-Identifier: GPL-2.0
32 struct regmap *ocotp = NULL; in imx_soc_device_init() local
45 return -ENOMEM; in imx_soc_device_init()
47 soc_dev_attr->family = "Freescale i.MX"; in imx_soc_device_init()
50 ret = of_property_read_string(root, "model", &soc_dev_attr->machine); in imx_soc_device_init()
78 ocotp_compat = "fsl,imx51-iim"; in imx_soc_device_init()
82 ocotp_compat = "fsl,imx53-iim"; in imx_soc_device_init()
86 ocotp_compat = "fsl,imx6sl-ocotp"; in imx_soc_device_init()
90 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
94 ocotp_compat = "fsl,imx6sx-ocotp"; in imx_soc_device_init()
98 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
102 ocotp_compat = "fsl,imx6ul-ocotp"; in imx_soc_device_init()
106 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
110 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
114 ocotp_compat = "fsl,imx6sll-ocotp"; in imx_soc_device_init()
118 ocotp_compat = "fsl,imx7d-ocotp"; in imx_soc_device_init()
122 ocotp_compat = "fsl,imx7ulp-ocotp"; in imx_soc_device_init()
126 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
130 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
134 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
138 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
144 soc_dev_attr->soc_id = soc_id; in imx_soc_device_init()
147 ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat); in imx_soc_device_init()
148 if (IS_ERR(ocotp)) in imx_soc_device_init()
152 if (!IS_ERR_OR_NULL(ocotp)) { in imx_soc_device_init()
154 regmap_read(ocotp, OCOTP_ULP_UID_4, &val); in imx_soc_device_init()
156 regmap_read(ocotp, OCOTP_ULP_UID_3, &val); in imx_soc_device_init()
159 regmap_read(ocotp, OCOTP_ULP_UID_2, &val); in imx_soc_device_init()
162 regmap_read(ocotp, OCOTP_ULP_UID_1, &val); in imx_soc_device_init()
168 regmap_read(ocotp, IIM_UID + i*4, &val); in imx_soc_device_init()
173 regmap_read(ocotp, OCOTP_UID_H, &val); in imx_soc_device_init()
175 regmap_read(ocotp, OCOTP_UID_L, &val); in imx_soc_device_init()
181 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d", in imx_soc_device_init()
184 if (!soc_dev_attr->revision) { in imx_soc_device_init()
185 ret = -ENOMEM; in imx_soc_device_init()
189 soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); in imx_soc_device_init()
190 if (!soc_dev_attr->serial_number) { in imx_soc_device_init()
191 ret = -ENOMEM; in imx_soc_device_init()
204 kfree(soc_dev_attr->serial_number); in imx_soc_device_init()
206 kfree(soc_dev_attr->revision); in imx_soc_device_init()