linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/6] dt-bindings: pinctrl: Add fsl,ls1012a-pinctrl yaml file
@ 2024-08-27  2:10 David Leonard
  2024-08-27  3:22 ` Rob Herring (Arm)
  2024-08-27  6:17 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 8+ messages in thread
From: David Leonard @ 2024-08-27  2:10 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
	Pengutronix Kernel Team, Linus Walleij, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, David.Leonard, linux-gpio,
	devicetree, linux-kernel


Add a binding schema and examples for the LS1012A's pinctrl function.

Signed-off-by: David Leonard <David.Leonard@digi.com>
---
  .../bindings/pinctrl/fsl,ls1012a-pinctrl.yaml | 83 +++++++++++++++++++
  1 file changed, 83 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml

diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml
new file mode 100644
index 000000000000..599df49b44d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/fsl,ls1012a-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ LS1012A pin multiplexing
+
+maintainers:
+  - David.Leonard@digi.com
+
+description: >
+  Bindings for LS1012A pinmux control.
+
+properties:
+  compatible:
+    const: fsl,ls1012a-pinctrl
+
+  reg:
+    description: Specifies the base address of the PMUXCR0 register.
+    maxItems: 2
+
+  big-endian:
+    description: If present, the PMUXCR0 register is implemented in big-endian.
+    type: boolean
+
+  dcfg-regmap:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      The phandle of the syscon node for the DCFG registers.
+
+patternProperties:
+  '^pinctrl-':
+    type: object
+    $ref: pinmux-node.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      function:
+        enum: [ i2c, spi, gpio, gpio_reset ]
+
+      groups:
+        items:
+          enum: [ qspi_1_grp, qspi_2_grp, qspi_3_grp ]
+
+allOf:
+  - $ref: pinctrl.yaml#
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pinctrl: pinctrl@1570430 {
+        compatible = "fsl,ls1012a-pinctrl";
+        reg = <0x0 0x1570430 0x0 0x4>;
+        big-endian;
+        dcfg-regmap = <&dcfg>;
+        pinctrl_qspi_1: pinctrl-qspi-1 {
+            groups = "qspi_1_grp";
+            function = "spi";
+        };
+        pinctrl_qspi_2: pinctrl-qspi-2 {
+            groups = "qspi_1_grp", "qspi_2_grp";
+            function = "spi";
+        };
+        pinctrl_qspi_4: pinctrl-qspi-4 {
+            groups = "qspi_1_grp", "qspi_2_grp", "qspi_3_grp";
+            function = "spi";
+        };
+    };
+  - |
+    qspi: quadspi@1550000 {
+        compatible = "fsl,ls1021a-qspi";
+        reg = <0 0x1550000 0 0x10000>;
+        /* QSPI pins for buswidth 2 */
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_qspi_2>;
+        status = "okay";
+    };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-08-28  5:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27  2:10 [PATCH 3/6] dt-bindings: pinctrl: Add fsl,ls1012a-pinctrl yaml file David Leonard
2024-08-27  3:22 ` Rob Herring (Arm)
2024-08-27  6:17 ` Krzysztof Kozlowski
2024-08-27 16:51   ` David Leonard
2024-08-27 17:28     ` Krzysztof Kozlowski
2024-08-28  0:43       ` David Leonard
2024-08-28  2:51         ` David Leonard
2024-08-28  5:43         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).