firmware: scmi: Support probe vendor ID 0x80 and 0x82
authorPeng Fan <peng.fan@nxp.com>
Fri, 17 Oct 2025 09:32:32 +0000 (17:32 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 24 Oct 2025 19:47:50 +0000 (13:47 -0600)
Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI
vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use
Kconfig option to support conditional compilation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
drivers/firmware/scmi/Kconfig
drivers/firmware/scmi/scmi_agent-uclass.c
include/scmi_agent-uclass.h
include/scmi_protocols.h

index 8cf85f0..dca8fed 100644 (file)
@@ -41,3 +41,9 @@ config SCMI_AGENT_OPTEE
        help
          Enable the SCMI communication channel based on OP-TEE transport
          for compatible "linaro,scmi-optee".
+
+config SCMI_ID_VENDOR_80
+       bool
+
+config SCMI_ID_VENDOR_82
+       bool
index f48c2fd..ad825d6 100644 (file)
@@ -110,6 +110,16 @@ struct udevice *scmi_get_protocol(struct udevice *dev,
        case SCMI_PROTOCOL_ID_PINCTRL:
                proto = priv->pinctrl_dev;
                break;
+#endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_80)
+       case SCMI_PROTOCOL_ID_VENDOR_80:
+               proto = priv->vendor_dev_80;
+               break;
+#endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
+       case SCMI_PROTOCOL_ID_VENDOR_82:
+               proto = priv->vendor_dev_82;
+               break;
 #endif
        default:
                dev_err(dev, "Protocol not supported\n");
@@ -173,6 +183,16 @@ static int scmi_add_protocol(struct udevice *dev,
        case SCMI_PROTOCOL_ID_PINCTRL:
                priv->pinctrl_dev = proto;
                break;
+#endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_80)
+       case SCMI_PROTOCOL_ID_VENDOR_80:
+               priv->vendor_dev_80 = proto;
+               break;
+#endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
+       case SCMI_PROTOCOL_ID_VENDOR_82:
+               priv->vendor_dev_82 = proto;
+               break;
 #endif
        default:
                dev_err(dev, "Protocol not supported\n");
index ccedd42..9b36d3a 100644 (file)
@@ -55,6 +55,12 @@ struct scmi_agent_priv {
 #if IS_ENABLED(CONFIG_PINCTRL_IMX_SCMI)
        struct udevice *pinctrl_dev;
 #endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_80)
+       struct udevice *vendor_dev_80;
+#endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
+       struct udevice *vendor_dev_82;
+#endif
 };
 
 static inline u32 scmi_version(struct udevice *dev)
index 5c9516d..bb74a57 100644 (file)
@@ -25,6 +25,8 @@ enum scmi_std_protocol {
        SCMI_PROTOCOL_ID_RESET_DOMAIN = 0x16,
        SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN = 0x17,
        SCMI_PROTOCOL_ID_PINCTRL = 0x19,
+       SCMI_PROTOCOL_ID_VENDOR_80 = 0x80,
+       SCMI_PROTOCOL_ID_VENDOR_82 = 0x82,
 };
 
 enum scmi_status_code {