Skip to content

Commit

Permalink
scmi: Introduce pinctrl scmi protocol driver
Browse files Browse the repository at this point in the history
Implementation of the SCMI client driver, which implements
PINCTRL_PROTOCOL. This protocol has id 18 and described in
DEN0056C document.
This protocol is the part of the feature that was designed
to separate pinctrl subsystem to SCP firmware. The idea is to
separate communication of the pin control subsystemd with the HW
to SCP firmware (or similar system, such as ATF), which provides
interface to give OS ability to control HW through SCMI protocol.
This is generic driver, which implements SCMI protocol, independent
from the platform type.

DEN0056C document:
https://developer.arm.com/documentation/den0056/latest

Signed-off-by: Oleksii Moisieiev <[email protected]>
  • Loading branch information
oleksiimoisieiev committed Nov 30, 2021
1 parent f495fad commit ce5de6b
Show file tree
Hide file tree
Showing 6 changed files with 577 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/arm_scmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scmi-driver-y = driver.o notify.o
scmi-transport-y = shmem.o
scmi-transport-$(CONFIG_MAILBOX) += mailbox.o
scmi-transport-$(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) += smc.o
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o system.o
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o system.o pinctrl.o
scmi-module-objs := $(scmi-bus-y) $(scmi-driver-y) $(scmi-protocols-y) \
$(scmi-transport-y)
obj-$(CONFIG_ARM_SCMI_PROTOCOL) += scmi-module.o
Expand Down
1 change: 1 addition & 0 deletions drivers/firmware/arm_scmi/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ DECLARE_SCMI_REGISTER_UNREGISTER(power);
DECLARE_SCMI_REGISTER_UNREGISTER(reset);
DECLARE_SCMI_REGISTER_UNREGISTER(sensors);
DECLARE_SCMI_REGISTER_UNREGISTER(system);
DECLARE_SCMI_REGISTER_UNREGISTER(pinctrl);

#define DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(id, name) \
int __init scmi_##name##_register(void) \
Expand Down
3 changes: 3 additions & 0 deletions drivers/firmware/arm_scmi/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ static struct scmi_prot_devnames devnames[] = {
{ SCMI_PROTOCOL_CLOCK, { "clocks" },},
{ SCMI_PROTOCOL_SENSOR, { "hwmon" },},
{ SCMI_PROTOCOL_RESET, { "reset" },},
{ SCMI_PROTOCOL_PINCTRL, { "pinctrl" },},
};

static inline void
Expand Down Expand Up @@ -947,6 +948,7 @@ static int __init scmi_driver_init(void)
scmi_reset_register();
scmi_sensors_register();
scmi_system_register();
scmi_pinctrl_register();

return platform_driver_register(&scmi_driver);
}
Expand All @@ -962,6 +964,7 @@ static void __exit scmi_driver_exit(void)
scmi_reset_unregister();
scmi_sensors_unregister();
scmi_system_unregister();
scmi_pinctrl_unregister();

platform_driver_unregister(&scmi_driver);
}
Expand Down
Loading

0 comments on commit ce5de6b

Please sign in to comment.