[PATCH v5 6/6] clk: scmi: Add i.MX95 OEM extension support for SCMI clock driver
Peng Fan
peng.fan at nxp.com
Wed Nov 5 07:48:47 PST 2025
Hi Sebin,
> Subject: Re: [PATCH v5 6/6] clk: scmi: Add i.MX95 OEM extension
> support for SCMI clock driver
>
> Hi Peng,
>
> On 09/10/25 09:18, Peng Fan wrote:
> > - Introduce 'clk-scmi-oem.c' to support vendor-specific OEM
> extensions
> > for the SCMI clock driver, allows clean integration of vendor-
> specific
> > features without impacting the core SCMI clock driver logic.
> > - Extend 'clk-scmi.h' with 'scmi_clk_oem' structure and related
> declarations.
> > - Initialize OEM extensions via 'scmi_clk_oem_init()'.
> > - Support querying OEM-specific features and setting spread
> spectrum.
> > - Pass 'scmi_device' to 'scmi_clk_ops_select()' for OEM data access.
> >
> > Signed-off-by: Peng Fan <peng.fan at nxp.com>
>
> Thanks for the patch. I only have a minor comment, otherwise the
> patch looks good.
>
> [...]
>
> > +
> > +int scmi_clk_oem_init(struct scmi_device *sdev) {
> > + const struct scmi_handle *handle = sdev->handle;
> > + int i, size = ARRAY_SIZE(info);
> > +
> > + for (i = 0; i < size; i++) {
> > + if (strcmp(handle->version->vendor_id,
> SCMI_IMX_VENDOR) ||
> > + strcmp(handle->version->sub_vendor_id,
> SCMI_IMX_SUBVENDOR))
> > + continue;
> > + if (info[i].compatible &&
> > + !of_machine_is_compatible(info[i].compatible))
> > + continue;
> > +
> > + break;
> > + }
> > +
> > + if (i < size)
> > + dev_set_drvdata(&sdev->dev, (void *)info[i].data);
> > +
> > + return 0;
> > +}
>
> This above logic is tailor made for IMX is it possible to make it generic?
Yeah. I will update it. It should compare with each entry in
const struct scmi_clk_oem_info info[] = {
{ SCMI_IMX_VENDOR, SCMI_IMX_SUBVENDOR, NULL, &scmi_clk_oem_imx },
};
To TI, I think it could be extended to
+const struct scmi_clk_oem_info info[] = {
+ { SCMI_IMX_VENDOR, SCMI_IMX_SUBVENDOR, NULL, &scmi_clk_oem_imx },
+ { SCMI_TI_VENDOR, SCMI_TI_SUBVENDOR, NULL, &scmi_clk_oem_ti },
+};
Regards
Peng.
>
> > diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c index
> >
> bf85924d61985eb9e596419349eb883e3817de73..1ed2091e3d4a951
> c8662db4c94de
> > e4b9c98b8326 100644
> > --- a/drivers/clk/clk-scmi.c
> > +++ b/drivers/clk/clk-scmi.c
> > @@ -14,6 +14,8 @@
> > #include <linux/scmi_protocol.h>
> > #include <asm/div64.h>
> >
> > +#include "clk-scmi.h"
>
> [...]
>
>
> Thanks
> Sebin
More information about the linux-arm-kernel
mailing list