diff --git a/sys/arm/freescale/fsl_ocotp.c b/sys/arm/freescale/fsl_ocotp.c --- a/sys/arm/freescale/fsl_ocotp.c +++ b/sys/arm/freescale/fsl_ocotp.c @@ -63,6 +63,25 @@ static uint32_t *ocotp_regs; static vm_size_t ocotp_size; +/* List of compatible strings from nvmem/imx-ocotp.yaml */ +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6q-ocotp", 1}, + {"fsl,imx6sl-ocotp", 1}, + {"fsl,imx6sx-ocotp", 1}, + {"fsl,imx6ul-ocotp", 1}, + {"fsl,imx6ull-ocotp", 1}, + {"fsl,imx7d-ocotp", 1}, + {"fsl,imx6sll-ocotp", 1}, + {"fsl,imx7ulp-ocotp", 1}, + {"fsl,imx8mq-ocotp", 1}, + {"fsl,imx8mm-ocotp", 1}, + {"fsl,imx93-ocotp", 1}, + {"fsl,imx95-ocotp", 1}, + {"fsl,imx8mn-ocotp", 1}, + {"fsl,imx8mp-ocotp", 2}, + {NULL, 0}, +}; + static void fsl_ocotp_devmap(void) { @@ -150,7 +169,7 @@ if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,imx6q-ocotp") == 0) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev,