[PATCH 1/3] dt-bindings: pinctrl: support i.MX95 SCMI pinctrl

Peng Fan (OSS) posted 3 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH 1/3] dt-bindings: pinctrl: support i.MX95 SCMI pinctrl
Posted by Peng Fan (OSS) 1 year, 10 months ago
From: Peng Fan <peng.fan@nxp.com>

i.MX95 Pinctrl is managed by SCMI firmware using OEM extensions. This
patch is to add i.MX95 Pinctrl OEM extensions properties.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../bindings/pinctrl/nxp,imx95-pinctrl.yaml        | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
new file mode 100644
index 000000000000..4bf7a6192813
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2024 NXP
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/nxp,imx95-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX System Control and Management Interface (SCMI) Pinctrl Protocol
+
+maintainers:
+  - Peng Fan <peng.fan@arm.com>
+
+patternProperties:
+  '-pins$': false
+  'grp$':
+    type: object
+
+    properties:
+      $nodename:
+        pattern: "^[0-9a-f]+$"
+
+      pins:
+        $ref: /schemas/types.yaml#/definitions/string
+        description: name of the pin
+
+      nxp,func-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: high impedance mode ("third-state", "floating")
+
+      nxp,pin-conf:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: latch weakly
+
+      nxp,daisy-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: pull up the pin. Takes as optional argument on hardware
+          supporting it the pull strength in Ohm.
+
+      nxp,daisy-conf:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: pull down the pin. Takes as optional argument on hardware
+          supporting it the pull strength in Ohm.
+
+additionalProperties: true

-- 
2.37.1
Re: [PATCH 1/3] dt-bindings: pinctrl: support i.MX95 SCMI pinctrl
Posted by Rob Herring 1 year, 9 months ago
On Fri, Apr 12, 2024 at 08:29:25AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> i.MX95 Pinctrl is managed by SCMI firmware using OEM extensions. This
> patch is to add i.MX95 Pinctrl OEM extensions properties.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../bindings/pinctrl/nxp,imx95-pinctrl.yaml        | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
> new file mode 100644
> index 000000000000..4bf7a6192813
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2024 NXP
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/nxp,imx95-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: i.MX System Control and Management Interface (SCMI) Pinctrl Protocol
> +
> +maintainers:
> +  - Peng Fan <peng.fan@arm.com>
> +
> +patternProperties:
> +  '-pins$': false

Why?

> +  'grp$':
> +    type: object

Missing 'additionalProperties: false'

> +
> +    properties:
> +      $nodename:
> +        pattern: "^[0-9a-f]+$"

Drop. That has no effect. You just defined the nodename above.

> +
> +      pins:
> +        $ref: /schemas/types.yaml#/definitions/string
> +        description: name of the pin

Needs to define the possible values.

> +
> +      nxp,func-id:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: high impedance mode ("third-state", "floating")

We already have a standard property for high impendance. You should know 
that since you obviously copied the description...

> +
> +      nxp,pin-conf:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: latch weakly

Same here.

> +
> +      nxp,daisy-id:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: pull up the pin. Takes as optional argument on hardware
> +          supporting it the pull strength in Ohm.

And here...

> +
> +      nxp,daisy-conf:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: pull down the pin. Takes as optional argument on hardware
> +          supporting it the pull strength in Ohm.

And here...

> +
> +additionalProperties: true
> 
> -- 
> 2.37.1
>
Re: [PATCH 1/3] dt-bindings: pinctrl: support i.MX95 SCMI pinctrl
Posted by Frank Li 1 year, 10 months ago
On Fri, Apr 12, 2024 at 08:29:25AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> i.MX95 Pinctrl is managed by SCMI firmware using OEM extensions. This
> patch is to add i.MX95 Pinctrl OEM extensions properties.


Describe your changes in imperative mood, e.g. “make xyzzy do frotz” ...

"Add properties for i.MX95 Pinctrl OEM extensions."

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../bindings/pinctrl/nxp,imx95-pinctrl.yaml        | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
> new file mode 100644
> index 000000000000..4bf7a6192813
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/nxp,imx95-pinctrl.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2024 NXP
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/nxp,imx95-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: i.MX System Control and Management Interface (SCMI) Pinctrl Protocol
> +
> +maintainers:
> +  - Peng Fan <peng.fan@arm.com>
> +
> +patternProperties:
> +  '-pins$': false
> +  'grp$':
> +    type: object
> +
> +    properties:
> +      $nodename:
> +        pattern: "^[0-9a-f]+$"
> +
> +      pins:
> +        $ref: /schemas/types.yaml#/definitions/string
> +        description: name of the pin
> +
> +      nxp,func-id:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: high impedance mode ("third-state", "floating")
> +
> +      nxp,pin-conf:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: latch weakly
> +
> +      nxp,daisy-id:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: pull up the pin. Takes as optional argument on hardware
> +          supporting it the pull strength in Ohm.
> +
> +      nxp,daisy-conf:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: pull down the pin. Takes as optional argument on hardware
> +          supporting it the pull strength in Ohm.
> +
> +additionalProperties: true
> 
> -- 
> 2.37.1
>