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
44 return -ENOMEM; in imx_soc_device_init()
46 soc_dev_attr->family = "Freescale i.MX"; in imx_soc_device_init()
49 ret = of_property_read_string(root, "model", &soc_dev_attr->machine); in imx_soc_device_init()
77 ocotp_compat = "fsl,imx51-iim"; in imx_soc_device_init()
81 ocotp_compat = "fsl,imx53-iim"; in imx_soc_device_init()
85 ocotp_compat = "fsl,imx6sl-ocotp"; in imx_soc_device_init()
89 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
93 ocotp_compat = "fsl,imx6sx-ocotp"; in imx_soc_device_init()
97 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
101 ocotp_compat = "fsl,imx6ul-ocotp"; in imx_soc_device_init()
105 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
109 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
113 ocotp_compat = "fsl,imx6sll-ocotp"; in imx_soc_device_init()
117 ocotp_compat = "fsl,imx7d-ocotp"; in imx_soc_device_init()
121 ocotp_compat = "fsl,imx7ulp-ocotp"; in imx_soc_device_init()
125 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
129 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
133 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
137 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
143 soc_dev_attr->soc_id = soc_id; in imx_soc_device_init()
146 ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat); in imx_soc_device_init()
147 if (IS_ERR(ocotp)) in imx_soc_device_init()
151 if (!IS_ERR_OR_NULL(ocotp)) { in imx_soc_device_init()
153 regmap_read(ocotp, OCOTP_ULP_UID_4, &val); in imx_soc_device_init()
155 regmap_read(ocotp, OCOTP_ULP_UID_3, &val); in imx_soc_device_init()
158 regmap_read(ocotp, OCOTP_ULP_UID_2, &val); in imx_soc_device_init()
161 regmap_read(ocotp, OCOTP_ULP_UID_1, &val); in imx_soc_device_init()
167 regmap_read(ocotp, IIM_UID + i*4, &val); in imx_soc_device_init()
172 regmap_read(ocotp, OCOTP_UID_H, &val); in imx_soc_device_init()
174 regmap_read(ocotp, OCOTP_UID_L, &val); in imx_soc_device_init()
180 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d", in imx_soc_device_init()
183 if (!soc_dev_attr->revision) { in imx_soc_device_init()
184 ret = -ENOMEM; in imx_soc_device_init()
188 soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); in imx_soc_device_init()
189 if (!soc_dev_attr->serial_number) { in imx_soc_device_init()
190 ret = -ENOMEM; in imx_soc_device_init()
203 kfree(soc_dev_attr->serial_number); in imx_soc_device_init()
205 kfree(soc_dev_attr->revision); in imx_soc_device_init()