summaryrefslogtreecommitdiff
path: root/drivers/firmware/scmi
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@linaro.org>2021-03-08 22:38:06 +0100
committerTom Rini <trini@konsulko.com>2021-04-12 17:17:11 -0400
commit1f213ee4dbf249933c29d5f62fd53ec4754ab4aa (patch)
tree8700e2e50bba42109005412e9be787d010f1c4c5 /drivers/firmware/scmi
parentd46933839f98d8cdb34fc87299b5f2a4ec4bbfec (diff)
downloadu-boot-1f213ee4dbf249933c29d5f62fd53ec4754ab4aa.tar.gz
u-boot-1f213ee4dbf249933c29d5f62fd53ec4754ab4aa.tar.bz2
u-boot-1f213ee4dbf249933c29d5f62fd53ec4754ab4aa.zip
firmware: scmi: voltage regulator
Implement voltage regulators interfaced by the SCMI voltage domain protocol. The DT bindings are defined in the Linux kernel since SCMI voltage domain and regulators patches [1] and [2] integration in v5.11-rc7. Link: [1] https://github.com/torvalds/linux/commit/0f80fcec08e9c50b8d2992cf26495673765ebaba Link: [2] https://github.com/torvalds/linux/commit/2add5cacff3531e54c50b0832128299faa9f0563 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/firmware/scmi')
-rw-r--r--drivers/firmware/scmi/scmi_agent-uclass.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index 527163b5ce..4f5870b483 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -80,6 +80,16 @@ static int scmi_bind_protocols(struct udevice *dev)
if (IS_ENABLED(CONFIG_RESET_SCMI))
drv = DM_DRIVER_GET(scmi_reset_domain);
break;
+ case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
+ if (IS_ENABLED(CONFIG_DM_REGULATOR_SCMI)) {
+ node = ofnode_find_subnode(node, "regulators");
+ if (!ofnode_valid(node)) {
+ dev_err(dev, "no regulators node\n");
+ return -ENXIO;
+ }
+ drv = DM_DRIVER_GET(scmi_voltage_domain);
+ }
+ break;
default:
break;
}