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

1 // SPDX-License-Identifier: GPL-2.0
30 struct regmap *ocotp = NULL; in imx_soc_device_init() local
41 return -ENOMEM; in imx_soc_device_init()
43 soc_dev_attr->family = "Freescale i.MX"; in imx_soc_device_init()
46 ret = of_property_read_string(root, "model", &soc_dev_attr->machine); in imx_soc_device_init()
77 ocotp_compat = "fsl,imx6sl-ocotp"; in imx_soc_device_init()
81 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
85 ocotp_compat = "fsl,imx6sx-ocotp"; in imx_soc_device_init()
89 ocotp_compat = "fsl,imx6q-ocotp"; in imx_soc_device_init()
93 ocotp_compat = "fsl,imx6ul-ocotp"; in imx_soc_device_init()
97 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
101 ocotp_compat = "fsl,imx6ull-ocotp"; in imx_soc_device_init()
105 ocotp_compat = "fsl,imx6sll-ocotp"; in imx_soc_device_init()
109 ocotp_compat = "fsl,imx7d-ocotp"; in imx_soc_device_init()
113 ocotp_compat = "fsl,imx7ulp-ocotp"; in imx_soc_device_init()
117 ocotp_compat = "fsl,vf610-ocotp"; in imx_soc_device_init()
121 ocotp_compat = "fsl,vf610-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()
135 soc_dev_attr->soc_id = soc_id; in imx_soc_device_init()
138 ocotp = syscon_regmap_lookup_by_compatible(ocotp_compat); in imx_soc_device_init()
139 if (IS_ERR(ocotp)) in imx_soc_device_init()
143 if (!IS_ERR_OR_NULL(ocotp)) { in imx_soc_device_init()
145 regmap_read(ocotp, OCOTP_ULP_UID_4, &val); in imx_soc_device_init()
147 regmap_read(ocotp, OCOTP_ULP_UID_3, &val); in imx_soc_device_init()
150 regmap_read(ocotp, OCOTP_ULP_UID_2, &val); in imx_soc_device_init()
153 regmap_read(ocotp, OCOTP_ULP_UID_1, &val); in imx_soc_device_init()
157 regmap_read(ocotp, OCOTP_UID_H, &val); in imx_soc_device_init()
159 regmap_read(ocotp, OCOTP_UID_L, &val); in imx_soc_device_init()
165 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d", in imx_soc_device_init()
168 if (!soc_dev_attr->revision) { in imx_soc_device_init()
169 ret = -ENOMEM; in imx_soc_device_init()
173 soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); in imx_soc_device_init()
174 if (!soc_dev_attr->serial_number) { in imx_soc_device_init()
175 ret = -ENOMEM; in imx_soc_device_init()
188 kfree(soc_dev_attr->serial_number); in imx_soc_device_init()
190 kfree(soc_dev_attr->revision); in imx_soc_device_init()