1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/pinctrl/ralink,rt2880-pinctrl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ralink RT2880 Pin Controller
8
9maintainers:
10  - Arınç ÜNAL <arinc.unal@arinc9.com>
11  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
12
13description:
14  Ralink RT2880 pin controller for RT2880 SoC.
15  The pin controller can only set the muxing of pin groups. Muxing individual
16  pins is not supported. There is no pinconf support.
17
18properties:
19  compatible:
20    const: ralink,rt2880-pinctrl
21
22patternProperties:
23  '-pins$':
24    type: object
25    patternProperties:
26      '^(.*-)?pinmux$':
27        type: object
28        description: node for pinctrl.
29        $ref: pinmux-node.yaml#
30
31        properties:
32          function:
33            description:
34              A string containing the name of the function to mux to the group.
35            enum: [gpio, i2c, spi, uartlite, jtag, mdio, sdram, pci]
36
37          groups:
38            description:
39              An array of strings. Each string contains the name of a group.
40            maxItems: 1
41
42        required:
43          - groups
44          - function
45
46        allOf:
47          - if:
48              properties:
49                function:
50                  const: gpio
51            then:
52              properties:
53                groups:
54                  enum: [i2c, spi, uartlite, jtag, mdio, sdram, pci]
55
56          - if:
57              properties:
58                function:
59                  const: i2c
60            then:
61              properties:
62                groups:
63                  enum: [i2c]
64
65          - if:
66              properties:
67                function:
68                  const: spi
69            then:
70              properties:
71                groups:
72                  enum: [spi]
73
74          - if:
75              properties:
76                function:
77                  const: uartlite
78            then:
79              properties:
80                groups:
81                  enum: [uartlite]
82
83          - if:
84              properties:
85                function:
86                  const: jtag
87            then:
88              properties:
89                groups:
90                  enum: [jtag]
91
92          - if:
93              properties:
94                function:
95                  const: mdio
96            then:
97              properties:
98                groups:
99                  enum: [mdio]
100
101          - if:
102              properties:
103                function:
104                  const: sdram
105            then:
106              properties:
107                groups:
108                  enum: [sdram]
109
110          - if:
111              properties:
112                function:
113                  const: pci
114            then:
115              properties:
116                groups:
117                  enum: [pci]
118
119        additionalProperties: false
120
121    additionalProperties: false
122
123allOf:
124  - $ref: "pinctrl.yaml#"
125
126required:
127  - compatible
128
129additionalProperties: false
130
131examples:
132  - |
133    pinctrl {
134      compatible = "ralink,rt2880-pinctrl";
135
136      i2c_pins: i2c0-pins {
137        pinmux {
138          groups = "i2c";
139          function = "i2c";
140        };
141      };
142    };
143