dt-bindings: pinctrl: Add DT bindings ep93xx pinctrl
authorNikita Shubin <nikita.shubin@maquefel.me>
Sat, 19 Nov 2022 08:21:56 +0000 (11:21 +0300)
committerNikita Shubin <nikita.shubin@maquefel.me>
Sun, 27 Nov 2022 08:10:02 +0000 (11:10 +0300)
Add YAML bindings ep93xx SoC.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml
new file mode 100644 (file)
index 0000000..a4bd441
--- /dev/null
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/cirrus,ep93xx-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus ep93xx pins mux controller
+
+maintainers:
+  - Nikita Shubin <nikita.shubin@maquefel.me>
+
+properties:
+  compatible:
+    enum:
+      - cirrus,ep9301-pinctrl
+      - cirrus,ep9307-pinctrl
+      - cirrus,ep9312-pinctrl
+  regmap:
+    description: phandle to syscon
+
+patternProperties:
+  '^pinctrl-':
+    type: object
+    description: pin node
+    $ref: pinmux-node.yaml#
+
+    properties:
+      function:
+        enum: [ spi, ac97, i2s, pwm, keypad, pata, lcd, gpio1, gpio2, gpio3,
+                gpio4, gpio6, gpio7 ]
+      groups:
+        minItems: 1
+        maxItems: 2
+        items:
+          enum: [ ssp, ac97, i2s_on_ssp, i2s_on_ac97, pwm1, gpio1agrp,
+                  gpio2agrp, gpio3agrp, gpio4agrp, gpio6agrp, gpio7agrp,
+                  rasteronsdram0grp, rasteronsdram3grp, keypadgrp, idegrp]
+
+    required:
+      - function
+      - groups
+
+allOf:
+  - $ref: "pinctrl.yaml#"
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: cirrus,ep9301-pinctrl
+    then:
+      patternProperties:
+        '^pinctrl-':
+          properties:
+            function:
+              enum: [ spi, ac97, i2s, pwm ]
+            groups:
+              items:
+                enum: [ ssp, i2s_on_ssp, ac97, i2s_on_ac97, pwm1, gpio1agrp ]
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: cirrus,ep9307-pinctrl
+    then:
+      patternProperties:
+        '^pinctrl-':
+          properties:
+            function:
+              enum: [ spi, ac97, i2s, lcd, gpio2, gpio3, keypad ]
+            groups:
+              items:
+                enum: [ ssp, i2s_on_ssp, ac97, i2s_on_ac97, rasteronsdram0grp, rasteronsdram3grp,
+                        gpio2agrp, gpio3agrp, keypadgrp ]
+
+required:
+  - compatible
+  - regmap
+
+additionalProperties: false
+
+examples:
+  - |
+    syscon: syscon@80930000 {
+        compatible = "cirrus,ep93xx-syscon",
+                     "syscon", "simple-mfd";
+        reg = <0x80930000 0x1000>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+        pinctrl: pinctrl {
+                compatible = "cirrus,ep9312-pinctrl";
+                regmap = <&syscon>;
+                spi_default_pins: pinctrl-spi {
+                        function = "spi";
+                        groups = "ssp";
+                };
+        };
+    };