xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/loongson,ls2k-pinctrl.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/loongson,ls2k-pinctrl.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Loongson-2 SoC Pinctrl Controller
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - zhanghongchen <zhanghongchen@loongson.cn>
11*8bab661aSEmmanuel Vadot  - Yinbo Zhu <zhuyinbo@loongson.cn>
12*8bab661aSEmmanuel Vadot
13*8bab661aSEmmanuel VadotallOf:
14*8bab661aSEmmanuel Vadot  - $ref: pinctrl.yaml#
15*8bab661aSEmmanuel Vadot
16*8bab661aSEmmanuel Vadotproperties:
17*8bab661aSEmmanuel Vadot  compatible:
18*8bab661aSEmmanuel Vadot    const: loongson,ls2k-pinctrl
19*8bab661aSEmmanuel Vadot
20*8bab661aSEmmanuel Vadot  reg:
21*8bab661aSEmmanuel Vadot    maxItems: 1
22*8bab661aSEmmanuel Vadot
23*8bab661aSEmmanuel VadotpatternProperties:
24*8bab661aSEmmanuel Vadot  '-pins$':
25*8bab661aSEmmanuel Vadot    type: object
26*8bab661aSEmmanuel Vadot
27*8bab661aSEmmanuel Vadot    additionalProperties: false
28*8bab661aSEmmanuel Vadot
29*8bab661aSEmmanuel Vadot    patternProperties:
30*8bab661aSEmmanuel Vadot      'pinmux$':
31*8bab661aSEmmanuel Vadot        type: object
32*8bab661aSEmmanuel Vadot        description: node for pinctrl.
33*8bab661aSEmmanuel Vadot        $ref: pinmux-node.yaml#
34*8bab661aSEmmanuel Vadot
35*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
36*8bab661aSEmmanuel Vadot
37*8bab661aSEmmanuel Vadot        properties:
38*8bab661aSEmmanuel Vadot          groups:
39*8bab661aSEmmanuel Vadot            description:
40*8bab661aSEmmanuel Vadot              One or more groups of pins to mux to a certain function
41*8bab661aSEmmanuel Vadot            items:
42*8bab661aSEmmanuel Vadot              enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0,
43*8bab661aSEmmanuel Vadot                     nand, sata_led, i2s, hda]
44*8bab661aSEmmanuel Vadot          function:
45*8bab661aSEmmanuel Vadot            description:
46*8bab661aSEmmanuel Vadot              The function that a group of pins is muxed to
47*8bab661aSEmmanuel Vadot            enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0,
48*8bab661aSEmmanuel Vadot                   nand, sata_led, i2s, hda]
49*8bab661aSEmmanuel Vadot
50*8bab661aSEmmanuel Vadot        required:
51*8bab661aSEmmanuel Vadot          - groups
52*8bab661aSEmmanuel Vadot          - function
53*8bab661aSEmmanuel Vadot
54*8bab661aSEmmanuel Vadotrequired:
55*8bab661aSEmmanuel Vadot  - compatible
56*8bab661aSEmmanuel Vadot  - reg
57*8bab661aSEmmanuel Vadot
58*8bab661aSEmmanuel VadotadditionalProperties: false
59*8bab661aSEmmanuel Vadot
60*8bab661aSEmmanuel Vadotexamples:
61*8bab661aSEmmanuel Vadot  - |
62*8bab661aSEmmanuel Vadot    pctrl: pinctrl@1fe00420 {
63*8bab661aSEmmanuel Vadot        compatible = "loongson,ls2k-pinctrl";
64*8bab661aSEmmanuel Vadot        reg = <0x1fe00420 0x18>;
65*8bab661aSEmmanuel Vadot        sdio_pins_default: sdio-pins {
66*8bab661aSEmmanuel Vadot            sdio-pinmux {
67*8bab661aSEmmanuel Vadot                groups = "sdio";
68*8bab661aSEmmanuel Vadot                function = "sdio";
69*8bab661aSEmmanuel Vadot            };
70*8bab661aSEmmanuel Vadot
71*8bab661aSEmmanuel Vadot            sdio-det-pinmux {
72*8bab661aSEmmanuel Vadot                groups = "pwm2";
73*8bab661aSEmmanuel Vadot                function = "gpio";
74*8bab661aSEmmanuel Vadot            };
75*8bab661aSEmmanuel Vadot        };
76*8bab661aSEmmanuel Vadot
77*8bab661aSEmmanuel Vadot        pwm1_pins_default: pwm1-pins {
78*8bab661aSEmmanuel Vadot            pinmux {
79*8bab661aSEmmanuel Vadot                groups = "pwm1";
80*8bab661aSEmmanuel Vadot                function = "pwm1";
81*8bab661aSEmmanuel Vadot            };
82*8bab661aSEmmanuel Vadot        };
83*8bab661aSEmmanuel Vadot
84*8bab661aSEmmanuel Vadot        pwm0_pins_default: pwm0-pins {
85*8bab661aSEmmanuel Vadot            pinmux {
86*8bab661aSEmmanuel Vadot                groups = "pwm0";
87*8bab661aSEmmanuel Vadot                function = "pwm0";
88*8bab661aSEmmanuel Vadot            };
89*8bab661aSEmmanuel Vadot        };
90*8bab661aSEmmanuel Vadot
91*8bab661aSEmmanuel Vadot        i2c1_pins_default: i2c1-pins {
92*8bab661aSEmmanuel Vadot            pinmux {
93*8bab661aSEmmanuel Vadot                groups = "i2c1";
94*8bab661aSEmmanuel Vadot                function = "i2c1";
95*8bab661aSEmmanuel Vadot            };
96*8bab661aSEmmanuel Vadot        };
97*8bab661aSEmmanuel Vadot
98*8bab661aSEmmanuel Vadot        i2c0_pins_default: i2c0-pins {
99*8bab661aSEmmanuel Vadot            pinmux {
100*8bab661aSEmmanuel Vadot                groups = "i2c0";
101*8bab661aSEmmanuel Vadot                function = "i2c0";
102*8bab661aSEmmanuel Vadot            };
103*8bab661aSEmmanuel Vadot        };
104*8bab661aSEmmanuel Vadot
105*8bab661aSEmmanuel Vadot        nand_pins_default: nand-pins {
106*8bab661aSEmmanuel Vadot            pinmux {
107*8bab661aSEmmanuel Vadot                groups = "nand";
108*8bab661aSEmmanuel Vadot                function = "nand";
109*8bab661aSEmmanuel Vadot            };
110*8bab661aSEmmanuel Vadot        };
111*8bab661aSEmmanuel Vadot
112*8bab661aSEmmanuel Vadot        hda_pins_default: hda-pins {
113*8bab661aSEmmanuel Vadot            grp0-pinmux {
114*8bab661aSEmmanuel Vadot                groups = "hda";
115*8bab661aSEmmanuel Vadot                function = "hda";
116*8bab661aSEmmanuel Vadot            };
117*8bab661aSEmmanuel Vadot
118*8bab661aSEmmanuel Vadot            grp1-pinmux {
119*8bab661aSEmmanuel Vadot                groups = "i2s";
120*8bab661aSEmmanuel Vadot                function = "gpio";
121*8bab661aSEmmanuel Vadot            };
122*8bab661aSEmmanuel Vadot        };
123*8bab661aSEmmanuel Vadot    };
124