Thread (11 messages) 11 messages, 6 authors, 2021-02-09

Re: [PATCH v2 2/3] dt-bindings: pinctrl: Added binding for ZynqMP pinctrl driver

From: Rob Herring <robh@kernel.org>
Date: 2021-02-09 13:59:11
Also in: linux-devicetree, linux-gpio, lkml

On Tue, Feb 9, 2021 at 2:17 AM Sai Krishna Potthuri [off-list ref] wrote:
Hi Rob,

Thanks for the review.
quoted
-----Original Message-----
From: Rob Herring <robh@kernel.org>
Sent: Tuesday, February 9, 2021 7:51 AM
To: Sai Krishna Potthuri <redacted>
Cc: Linus Walleij <redacted>; Michal Simek
[off-list ref]; Greg Kroah-Hartman [off-list ref];
linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
devicetree@vger.kernel.org; linux-gpio@vger.kernel.org; git
[off-list ref]; saikrishna12468@gmail.com
Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: Added binding for ZynqMP
pinctrl driver

On Tue, Jan 19, 2021 at 10:57:33AM +0530, Sai Krishna Potthuri wrote:
quoted
Added documentation and dt-bindings file which contains MIO pin
configuration defines for Xilinx ZynqMP pinctrl driver.

Signed-off-by: Sai Krishna Potthuri
[off-list ref]
---
 .../bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml | 337
++++++++++++++++++  include/dt-bindings/pinctrl/pinctrl-zynqmp.h  |
23 ++
 2 files changed, 360 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/pinctrl-zynqmp.h

diff --git
a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
new file mode 100644
index 000000000000..9f2efbafcaa4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.ya
+++ ml
@@ -0,0 +1,337 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/xlnx,zynqmp-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx ZynqMP Pinctrl
+
+maintainers:
+  - Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
+  - Rajan Vaja <rajan.vaja@xilinx.com>
+
+description: |
+  Please refer to pinctrl-bindings.txt in this directory for details
+of the
+  common pinctrl bindings used by client devices, including the
+meaning of the
+  phrase "pin configuration node".
+
+  ZynqMP's pin configuration nodes act as a container for an
+ arbitrary number of  subnodes. Each of these subnodes represents
+ some desired configuration for a  pin, a group, or a list of pins or
+ groups. This configuration can include the  mux function to select
+ on those pin(s)/group(s), and various pin configuration  parameters, such
as pull-up, slew rate, etc.
quoted
+
+  Each configuration node can consist of multiple nodes describing
+ the pinmux and  pinconf options. Those nodes can be pinmux nodes or
pinconf nodes.
quoted
+
+  The name of each subnode is not important; all subnodes should be
+ enumerated  and processed purely based on their content.
+
+properties:
+  compatible:
+    const: xlnx,zynqmp-pinctrl
+
+patternProperties:
+  '^(.*-)?(default|gpio)$':
+    type: object
+    patternProperties:
+      '^mux(.*)$':
'^mux' is equivalent.
I will fix in v3.
quoted
quoted
+        type: object
+        description:
+          Pinctrl node's client devices use subnodes for pin muxes,
+          which in turn use below standard properties.
+        $ref: pinmux-node.yaml#
+
+        properties:
+          groups:
+            description:
+              List of groups to select (either this or "pins" must be
+              specified), available groups for this subnode.
+            items:
+              oneOf:
+                - enum: [ethernet0_0_grp, ethernet1_0_grp,
+ ethernet2_0_grp,
Don't need 'oneOf' for a single item.
Here we have a possibility to have more than one group item as below,
hence used 'oneOf'.
groups = "uart0_4_grp", "uart0_5_grp";
Please suggest me if there is a better/another way to represent this.
'items' has 2 forms: a list with a schema per entry or a schema that
applies to all entries.

1 item:
items:
  - enum: [...]

all items:
items:
  enum: [...]

You should use the latter form. You may need 'maxItems' here. Pick a
'should be enough' value if you don't have an actual max.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help