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,rt305x-pinctrl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ralink RT305X Pin Controller
8
9maintainers:
10  - Arınç ÜNAL <arinc.unal@arinc9.com>
11  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
12
13description:
14  Ralink RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
15  SoCs.
16  The pin controller can only set the muxing of pin groups. Muxing individual
17  pins is not supported. There is no pinconf support.
18
19properties:
20  compatible:
21    const: ralink,rt305x-pinctrl
22
23patternProperties:
24  '-pins$':
25    type: object
26    patternProperties:
27      '^(.*-)?pinmux$':
28        type: object
29        description: node for pinctrl.
30        $ref: pinmux-node.yaml#
31
32        properties:
33          groups:
34            description: The pin group to select.
35            enum: [
36              # For RT3050, RT3052 and RT3350 SoCs
37              i2c, jtag, mdio, rgmii, sdram, spi, uartf, uartlite,
38
39              # For RT3352 SoC
40              i2c, jtag, led, lna, mdio, pa, rgmii, spi, spi_cs1, uartf,
41              uartlite,
42
43              # For RT5350 SoC
44              i2c, jtag, led, spi, spi_cs1, uartf, uartlite,
45            ]
46
47          function:
48            description: The mux function to select.
49            enum: [
50              # For RT3050, RT3052 and RT3350 SoCs
51              gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio, pcm gpio,
52              pcm i2s, pcm uartf, rgmii, sdram, spi, uartf, uartlite,
53
54              # For RT3352 SoC
55              gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led, lna, mdio,
56              pa, pcm gpio, pcm i2s, pcm uartf, rgmii, spi, spi_cs1, uartf,
57              uartlite, wdg_cs1,
58
59              # For RT5350 SoC
60              gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led, pcm gpio,
61              pcm i2s, pcm uartf, spi, spi_cs1, uartf, uartlite, wdg_cs1,
62            ]
63
64        required:
65          - groups
66          - function
67
68        additionalProperties: false
69
70    additionalProperties: false
71
72allOf:
73  - $ref: "pinctrl.yaml#"
74
75required:
76  - compatible
77
78additionalProperties: false
79
80examples:
81  # Pinmux controller node
82  - |
83    pinctrl {
84      compatible = "ralink,rt305x-pinctrl";
85
86      i2c_pins: i2c0-pins {
87        pinmux {
88          groups = "i2c";
89          function = "i2c";
90        };
91      };
92    };
93