summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2025-10-17 17:32:32 +0800
committerTom Rini <[email protected]>2025-10-24 13:47:50 -0600
commit7830ccc77a13dd2a9880a942734bb5687416c4d8 (patch)
treedebdd9de45b81fe9278565516d6020f9d490a6e4 /drivers/firmware
parentd1f1c98d8468f5f76c2c8c3acb31f83d736d34ce (diff)
firmware: scmi: Support probe vendor ID 0x80 and 0x82
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 <[email protected]> Reviewed-by: Alice Guo <[email protected]>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/scmi/Kconfig6
-rw-r--r--drivers/firmware/scmi/scmi_agent-uclass.c20
2 files changed, 26 insertions, 0 deletions
diff --git a/drivers/firmware/scmi/Kconfig b/drivers/firmware/scmi/Kconfig
index 8cf85f0d7a1..dca8fed9bd2 100644
--- a/drivers/firmware/scmi/Kconfig
+++ b/drivers/firmware/scmi/Kconfig
@@ -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
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index f48c2fdb27b..ad825d66da2 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -111,6 +111,16 @@ struct udevice *scmi_get_protocol(struct udevice *dev,
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");
proto = NULL;
@@ -174,6 +184,16 @@ static int scmi_add_protocol(struct udevice *dev,
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");
return -EPROTO;