Add new SCMI v3.2 pinctrl protocol bindings definitions and example.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
---
Changes v3 -> v4
- reworked protocol@19 format
---
.../bindings/firmware/arm,scmi.yaml | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index 5824c43e9893..5318fe72354e 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -233,6 +233,39 @@ properties:
reg:
const: 0x18
+ protocol@19:
+ type: object
+ allOf:
+ - $ref: "#/$defs/protocol-node"
+ - $ref: "../pinctrl/pinctrl.yaml"
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ const: 0x19
+
+ '#pinctrl-cells':
+ const: 0
+
+ patternProperties:
+ '-pins$':
+ type: object
+ allOf:
+ - $ref: "../pinctrl/pincfg-node.yaml#"
+ - $ref: "../pinctrl/pinmux-node.yaml#"
+ unevaluatedProperties: false
+
+ description:
+ A pin multiplexing sub-node describe how to configure a
+ set of pins is some desired function.
+ A single sub-node may define several pin configurations.
+ This sub-node is using default pinctrl bindings to configure
+ pin multiplexing and using SCMI protocol to apply specified
+ configuration using SCMI protocol.
+
+ required:
+ - reg
+
additionalProperties: false
$defs:
@@ -384,6 +417,26 @@ examples:
scmi_powercap: protocol@18 {
reg = <0x18>;
};
+
+ scmi_pinctrl: protocol@19 {
+ reg = <0x19>;
+ #pinctrl-cells = <0>;
+
+ i2c2-pins {
+ groups = "i2c2_a", "i2c2_b";
+ function = "i2c2";
+ };
+
+ mdio-pins {
+ groups = "avb_mdio";
+ drive-strength = <24>;
+ };
+
+ keys_pins: keys-pins {
+ pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1";
+ bias-pull-up;
+ };
+ };
};
};
--
2.25.1
On Tue, Aug 08, 2023 at 06:25:36PM +0000, Oleksii Moisieiev wrote:
> Add new SCMI v3.2 pinctrl protocol bindings definitions and example.
>
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
>
> ---
> Changes v3 -> v4
> - reworked protocol@19 format
> ---
> .../bindings/firmware/arm,scmi.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> index 5824c43e9893..5318fe72354e 100644
> --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> @@ -233,6 +233,39 @@ properties:
> reg:
> const: 0x18
>
> + protocol@19:
> + type: object
> + allOf:
> + - $ref: "#/$defs/protocol-node"
> + - $ref: "../pinctrl/pinctrl.yaml"
Does this rule require that the node name start with "pinctrl" or "pinmux"?
If so, it doesn't match with "protocol@19".
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + const: 0x19
> +
> + '#pinctrl-cells':
> + const: 0
> +
> + patternProperties:
> + '-pins$':
Is this restriction necessary?
(Most pinctrl's do so, though.)
> + type: object
> + allOf:
> + - $ref: "../pinctrl/pincfg-node.yaml#"
> + - $ref: "../pinctrl/pinmux-node.yaml#"
> + unevaluatedProperties: false
> +
> + description:
I think the description may be a bit ambiguous.
> + A pin multiplexing sub-node describe how to configure a
> + set of pins is some desired function.
Even a sub-node that has pin multiplexing definitions may have
pin property/parameter definitions. Right?
> + A single sub-node may define several pin configurations.
Do you not allow for having a sub-node under a sub-node?
> + This sub-node is using default pinctrl bindings to configure
Does "default pinctrl bindings" refer to "pinctrl-bindings.txt"?
Is it necessary to specifically mention it here as it is for client devices?
> + pin multiplexing and using SCMI protocol to apply specified
Again, not only multiplexing but also pin property/parameters.
Thanks,
-Takahiro Akashi
> + configuration using SCMI protocol.
> +
> + required:
> + - reg
> +
> additionalProperties: false
>
> $defs:
> @@ -384,6 +417,26 @@ examples:
> scmi_powercap: protocol@18 {
> reg = <0x18>;
> };
> +
> + scmi_pinctrl: protocol@19 {
> + reg = <0x19>;
> + #pinctrl-cells = <0>;
> +
> + i2c2-pins {
> + groups = "i2c2_a", "i2c2_b";
> + function = "i2c2";
> + };
> +
> + mdio-pins {
> + groups = "avb_mdio";
> + drive-strength = <24>;
> + };
> +
> + keys_pins: keys-pins {
> + pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1";
> + bias-pull-up;
> + };
> + };
> };
> };
>
> --
> 2.25.1
On Tue, Aug 08, 2023 at 06:25:36PM +0000, Oleksii Moisieiev wrote:
> Add new SCMI v3.2 pinctrl protocol bindings definitions and example.
>
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
>
> ---
> Changes v3 -> v4
> - reworked protocol@19 format
> ---
> .../bindings/firmware/arm,scmi.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> index 5824c43e9893..5318fe72354e 100644
> --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> @@ -233,6 +233,39 @@ properties:
> reg:
> const: 0x18
>
> + protocol@19:
> + type: object
> + allOf:
> + - $ref: "#/$defs/protocol-node"
> + - $ref: "../pinctrl/pinctrl.yaml"
/schemas/pinctrl/...
And drop the quotes.
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + const: 0x19
> +
> + '#pinctrl-cells':
Use either ' or ". You've used both. Go with whatever the rest of the
doc uses.
> + const: 0
> +
> + patternProperties:
> + '-pins$':
> + type: object
> + allOf:
> + - $ref: "../pinctrl/pincfg-node.yaml#"
> + - $ref: "../pinctrl/pinmux-node.yaml#"
Full path and no quotes.
Surely there's some restrictions on which properties are valid and
contraints on the values?
> + unevaluatedProperties: false
> +
> + description:
> + A pin multiplexing sub-node describe how to configure a
> + set of pins is some desired function.
> + A single sub-node may define several pin configurations.
> + This sub-node is using default pinctrl bindings to configure
> + pin multiplexing and using SCMI protocol to apply specified
> + configuration using SCMI protocol.
> +
> + required:
> + - reg
> +
> additionalProperties: false
>
> $defs:
> @@ -384,6 +417,26 @@ examples:
> scmi_powercap: protocol@18 {
> reg = <0x18>;
> };
> +
> + scmi_pinctrl: protocol@19 {
> + reg = <0x19>;
> + #pinctrl-cells = <0>;
> +
> + i2c2-pins {
> + groups = "i2c2_a", "i2c2_b";
> + function = "i2c2";
> + };
> +
> + mdio-pins {
> + groups = "avb_mdio";
> + drive-strength = <24>;
> + };
> +
> + keys_pins: keys-pins {
> + pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1";
> + bias-pull-up;
> + };
> + };
> };
> };
>
> --
> 2.25.1
© 2016 - 2026 Red Hat, Inc.