Skip to content

Commit 21cbc10

Browse files
committed
Merge tag 'scmi-updates-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers
Arm SCMI updates for v6.10 1. Basic support for SCMI v3.2 pincontrol protocol SCMI v3.2 introduces pincontrol protocol which is intended for controlling pins and their configuration. The pin control protocol provides commands to: - List the pins, groups of pins, available functions, and their association with each other. - Set the parameter configuration and multiplexing of the pins or groups of pins - Optionally request exclusive access to a pin or group of pins. - Optionally configure the permissions of an agent to access a pin or group of pins. These changes adds basic support for the same in the SCMI core layer and an implementation of the generic scmi-pinctrl driver with associated DT bindings. 2. Framework support for multiple vendors custom protocols With the fixed space for vendor protocols, the possibility of having multiple vendors implementing distinct SCMI vendor protocols with the same overlapping protocol number is very high and with the need to support them all in a single kernel image or a module is also high. In order to implement the same we assume: - vendor protocols has to be tagged at build time with a vendor_id - vendor protocols could also optionally be tagged at build time with sub_vendor_id and implementation version At the initialisation all the built vendor protocols are registered with the SCMI core using a key derived from the above tags 3. Logging and tracing improvements This includes using dev_err_probe() to bail out from probe, adding message dump traces for bad and unexpected replies and widening of the tag buffer in trace_scmi_dump_msg to allow diverse tag names 4. Miscellaneous updates or improvements This includes adding the accessor function get_max_msg_size() used in pinctl protocol, updation of dt-bindings examples for protocol@13 to promote new bindings and simplification of scmi_devm_notifier_unregister * tag 'scmi-updates-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: pinctrl: Implementation of the generic scmi-pinctrl driver firmware: arm_scmi: Add basic support for SCMI v3.2 pincontrol protocol dt-bindings: firmware: Support SCMI pinctrl protocol firmware: arm_scmi: Introduce get_max_msg_size() helper/accessor firmware: arm_scmi: Add support for multiple vendors custom protocols dt-bindings: firmware: arm,scmi: Update examples for protocol@13 firmware: arm_scmi: Avoid non-constant printk format strings firmware: arm_scmi: Use dev_err_probe to bail out firmware: arm_scmi: Simplify scmi_devm_notifier_unregister firmware: arm_scmi: Add message dump traces for bad and unexpected replies firmware: arm_scmi: Add helper to trace bad messages include: trace: Widen the tag buffer in trace_scmi_dump_msg firmware: arm_scmi: Log the perf domain names in the error paths Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 40b561e + eb524cb commit 21cbc10

File tree

15 files changed

+1925
-70
lines changed

15 files changed

+1925
-70
lines changed

Documentation/devicetree/bindings/firmware/arm,scmi.yaml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,37 @@ properties:
247247
reg:
248248
const: 0x18
249249

250+
protocol@19:
251+
type: object
252+
allOf:
253+
- $ref: '#/$defs/protocol-node'
254+
- $ref: /schemas/pinctrl/pinctrl.yaml
255+
256+
unevaluatedProperties: false
257+
258+
properties:
259+
reg:
260+
const: 0x19
261+
262+
patternProperties:
263+
'-pins$':
264+
type: object
265+
allOf:
266+
- $ref: /schemas/pinctrl/pincfg-node.yaml#
267+
- $ref: /schemas/pinctrl/pinmux-node.yaml#
268+
unevaluatedProperties: false
269+
270+
description:
271+
A pin multiplexing sub-node describes how to configure a
272+
set of pins in some desired function.
273+
A single sub-node may define several pin configurations.
274+
This sub-node is using the default pinctrl bindings to configure
275+
pin multiplexing and using SCMI protocol to apply a specified
276+
configuration.
277+
278+
required:
279+
- reg
280+
250281
additionalProperties: false
251282

252283
$defs:
@@ -355,7 +386,7 @@ examples:
355386
356387
scmi_dvfs: protocol@13 {
357388
reg = <0x13>;
358-
#clock-cells = <1>;
389+
#power-domain-cells = <1>;
359390
360391
mboxes = <&mhuB 1 0>,
361392
<&mhuB 1 1>;
@@ -401,6 +432,25 @@ examples:
401432
scmi_powercap: protocol@18 {
402433
reg = <0x18>;
403434
};
435+
436+
scmi_pinctrl: protocol@19 {
437+
reg = <0x19>;
438+
439+
i2c2-pins {
440+
groups = "g_i2c2_a", "g_i2c2_b";
441+
function = "f_i2c2";
442+
};
443+
444+
mdio-pins {
445+
groups = "g_avb_mdio";
446+
drive-strength = <24>;
447+
};
448+
449+
keys_pins: keys-pins {
450+
pins = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";
451+
bias-pull-up;
452+
};
453+
};
404454
};
405455
};
406456
@@ -468,7 +518,7 @@ examples:
468518
reg = <0x13>;
469519
linaro,optee-channel-id = <1>;
470520
shmem = <&cpu_optee_lpri0>;
471-
#clock-cells = <1>;
521+
#power-domain-cells = <1>;
472522
};
473523
474524
scmi_clk0: protocol@14 {

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21522,6 +21522,7 @@ F: drivers/cpufreq/sc[mp]i-cpufreq.c
2152221522
F: drivers/firmware/arm_scmi/
2152321523
F: drivers/firmware/arm_scpi.c
2152421524
F: drivers/hwmon/scmi-hwmon.c
21525+
F: drivers/pinctrl/pinctrl-scmi.c
2152521526
F: drivers/pmdomain/arm/
2152621527
F: drivers/powercap/arm_scmi_powercap.c
2152721528
F: drivers/regulator/scmi-regulator.c

drivers/firmware/arm_scmi/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += smc.o
1010
scmi-transport-$(CONFIG_ARM_SCMI_HAVE_MSG) += msg.o
1111
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_VIRTIO) += virtio.o
1212
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += optee.o
13-
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o system.o voltage.o powercap.o
13+
scmi-protocols-y := base.o clock.o perf.o power.o reset.o sensors.o system.o voltage.o powercap.o
14+
scmi-protocols-y += pinctrl.o
1415
scmi-module-objs := $(scmi-driver-y) $(scmi-protocols-y) $(scmi-transport-y)
1516

1617
obj-$(CONFIG_ARM_SCMI_PROTOCOL) += scmi-core.o

drivers/firmware/arm_scmi/common.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,17 @@ extern const struct scmi_desc scmi_optee_desc;
301301

302302
void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv);
303303

304+
enum scmi_bad_msg {
305+
MSG_UNEXPECTED = -1,
306+
MSG_INVALID = -2,
307+
MSG_UNKNOWN = -3,
308+
MSG_NOMEM = -4,
309+
MSG_MBOX_SPURIOUS = -5,
310+
};
311+
312+
void scmi_bad_message_trace(struct scmi_chan_info *cinfo, u32 msg_hdr,
313+
enum scmi_bad_msg err);
314+
304315
/* shmem related declarations */
305316
struct scmi_shared_mem;
306317

0 commit comments

Comments
 (0)