1*a1b78312SNikita Shubin# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*a1b78312SNikita Shubin%YAML 1.2
3*a1b78312SNikita Shubin---
4*a1b78312SNikita Shubin$id: http://devicetree.org/schemas/gpio/gpio-ep9301.yaml#
5*a1b78312SNikita Shubin$schema: http://devicetree.org/meta-schemas/core.yaml#
6*a1b78312SNikita Shubin
7*a1b78312SNikita Shubintitle: EP93xx GPIO controller
8*a1b78312SNikita Shubin
9*a1b78312SNikita Shubinmaintainers:
10*a1b78312SNikita Shubin  - Linus Walleij <linus.walleij@linaro.org>
11*a1b78312SNikita Shubin  - Bartosz Golaszewski <brgl@bgdev.pl>
12*a1b78312SNikita Shubin  - Nikita Shubin <nikita.shubin@maquefel.me>
13*a1b78312SNikita Shubin
14*a1b78312SNikita Shubinproperties:
15*a1b78312SNikita Shubin  compatible:
16*a1b78312SNikita Shubin    oneOf:
17*a1b78312SNikita Shubin      - const: cirrus,ep9301-gpio
18*a1b78312SNikita Shubin      - items:
19*a1b78312SNikita Shubin          - enum:
20*a1b78312SNikita Shubin              - cirrus,ep9302-gpio
21*a1b78312SNikita Shubin              - cirrus,ep9307-gpio
22*a1b78312SNikita Shubin              - cirrus,ep9312-gpio
23*a1b78312SNikita Shubin              - cirrus,ep9315-gpio
24*a1b78312SNikita Shubin          - const: cirrus,ep9301-gpio
25*a1b78312SNikita Shubin
26*a1b78312SNikita Shubin  reg:
27*a1b78312SNikita Shubin    minItems: 2
28*a1b78312SNikita Shubin    items:
29*a1b78312SNikita Shubin      - description: data register
30*a1b78312SNikita Shubin      - description: direction register
31*a1b78312SNikita Shubin      - description: interrupt registers base
32*a1b78312SNikita Shubin
33*a1b78312SNikita Shubin  reg-names:
34*a1b78312SNikita Shubin    minItems: 2
35*a1b78312SNikita Shubin    items:
36*a1b78312SNikita Shubin      - const: data
37*a1b78312SNikita Shubin      - const: dir
38*a1b78312SNikita Shubin      - const: intr
39*a1b78312SNikita Shubin
40*a1b78312SNikita Shubin  gpio-controller: true
41*a1b78312SNikita Shubin
42*a1b78312SNikita Shubin  gpio-ranges: true
43*a1b78312SNikita Shubin
44*a1b78312SNikita Shubin  "#gpio-cells":
45*a1b78312SNikita Shubin    const: 2
46*a1b78312SNikita Shubin
47*a1b78312SNikita Shubin  interrupt-controller: true
48*a1b78312SNikita Shubin
49*a1b78312SNikita Shubin  "#interrupt-cells":
50*a1b78312SNikita Shubin    const: 2
51*a1b78312SNikita Shubin
52*a1b78312SNikita Shubin  interrupts:
53*a1b78312SNikita Shubin    oneOf:
54*a1b78312SNikita Shubin      - maxItems: 1
55*a1b78312SNikita Shubin      - description: port F has dedicated irq line for each gpio line
56*a1b78312SNikita Shubin        maxItems: 8
57*a1b78312SNikita Shubin
58*a1b78312SNikita Shubinrequired:
59*a1b78312SNikita Shubin  - compatible
60*a1b78312SNikita Shubin  - reg
61*a1b78312SNikita Shubin  - gpio-controller
62*a1b78312SNikita Shubin  - "#gpio-cells"
63*a1b78312SNikita Shubin
64*a1b78312SNikita ShubinadditionalProperties: false
65*a1b78312SNikita Shubin
66*a1b78312SNikita Shubinexamples:
67*a1b78312SNikita Shubin  - |
68*a1b78312SNikita Shubin    gpio@80840000 {
69*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
70*a1b78312SNikita Shubin      reg = <0x80840000 0x04>,
71*a1b78312SNikita Shubin            <0x80840010 0x04>,
72*a1b78312SNikita Shubin            <0x80840090 0x1c>;
73*a1b78312SNikita Shubin      reg-names = "data", "dir", "intr";
74*a1b78312SNikita Shubin      gpio-controller;
75*a1b78312SNikita Shubin      #gpio-cells = <2>;
76*a1b78312SNikita Shubin        interrupt-controller;
77*a1b78312SNikita Shubin        interrupt-parent = <&vic1>;
78*a1b78312SNikita Shubin        interrupts = <27>;
79*a1b78312SNikita Shubin    };
80*a1b78312SNikita Shubin
81*a1b78312SNikita Shubin    gpio@80840004 {
82*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
83*a1b78312SNikita Shubin      reg = <0x80840004 0x04>,
84*a1b78312SNikita Shubin            <0x80840014 0x04>,
85*a1b78312SNikita Shubin            <0x808400ac 0x1c>;
86*a1b78312SNikita Shubin      reg-names = "data", "dir", "intr";
87*a1b78312SNikita Shubin      gpio-controller;
88*a1b78312SNikita Shubin      #gpio-cells = <2>;
89*a1b78312SNikita Shubin      interrupt-controller;
90*a1b78312SNikita Shubin      interrupt-parent = <&vic1>;
91*a1b78312SNikita Shubin      interrupts = <27>;
92*a1b78312SNikita Shubin    };
93*a1b78312SNikita Shubin
94*a1b78312SNikita Shubin    gpio@80840008 {
95*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
96*a1b78312SNikita Shubin      reg = <0x80840008 0x04>,
97*a1b78312SNikita Shubin            <0x80840018 0x04>;
98*a1b78312SNikita Shubin      reg-names = "data", "dir";
99*a1b78312SNikita Shubin      gpio-controller;
100*a1b78312SNikita Shubin      #gpio-cells = <2>;
101*a1b78312SNikita Shubin    };
102*a1b78312SNikita Shubin
103*a1b78312SNikita Shubin    gpio@8084000c {
104*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
105*a1b78312SNikita Shubin      reg = <0x8084000c 0x04>,
106*a1b78312SNikita Shubin            <0x8084001c 0x04>;
107*a1b78312SNikita Shubin      reg-names = "data", "dir";
108*a1b78312SNikita Shubin      gpio-controller;
109*a1b78312SNikita Shubin      #gpio-cells = <2>;
110*a1b78312SNikita Shubin    };
111*a1b78312SNikita Shubin
112*a1b78312SNikita Shubin    gpio@80840020 {
113*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
114*a1b78312SNikita Shubin      reg = <0x80840020 0x04>,
115*a1b78312SNikita Shubin            <0x80840024 0x04>;
116*a1b78312SNikita Shubin      reg-names = "data", "dir";
117*a1b78312SNikita Shubin      gpio-controller;
118*a1b78312SNikita Shubin      #gpio-cells = <2>;
119*a1b78312SNikita Shubin    };
120*a1b78312SNikita Shubin
121*a1b78312SNikita Shubin    gpio@80840030 {
122*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
123*a1b78312SNikita Shubin      reg = <0x80840030 0x04>,
124*a1b78312SNikita Shubin            <0x80840034 0x04>,
125*a1b78312SNikita Shubin            <0x8084004c 0x1c>;
126*a1b78312SNikita Shubin      reg-names = "data", "dir", "intr";
127*a1b78312SNikita Shubin      gpio-controller;
128*a1b78312SNikita Shubin      #gpio-cells = <2>;
129*a1b78312SNikita Shubin      interrupt-controller;
130*a1b78312SNikita Shubin      interrupts-extended = <&vic0 19>, <&vic0 20>,
131*a1b78312SNikita Shubin                            <&vic0 21>, <&vic0 22>,
132*a1b78312SNikita Shubin                            <&vic1 15>, <&vic1 16>,
133*a1b78312SNikita Shubin                            <&vic1 17>, <&vic1 18>;
134*a1b78312SNikita Shubin    };
135*a1b78312SNikita Shubin
136*a1b78312SNikita Shubin    gpio@80840038 {
137*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
138*a1b78312SNikita Shubin      reg = <0x80840038 0x04>,
139*a1b78312SNikita Shubin            <0x8084003c 0x04>;
140*a1b78312SNikita Shubin      reg-names = "data", "dir";
141*a1b78312SNikita Shubin      gpio-controller;
142*a1b78312SNikita Shubin      #gpio-cells = <2>;
143*a1b78312SNikita Shubin    };
144*a1b78312SNikita Shubin
145*a1b78312SNikita Shubin    gpio@80840040 {
146*a1b78312SNikita Shubin      compatible = "cirrus,ep9301-gpio";
147*a1b78312SNikita Shubin      reg = <0x80840040 0x04>,
148*a1b78312SNikita Shubin            <0x80840044 0x04>;
149*a1b78312SNikita Shubin      reg-names = "data", "dir";
150*a1b78312SNikita Shubin      gpio-controller;
151*a1b78312SNikita Shubin      #gpio-cells = <2>;
152*a1b78312SNikita Shubin    };
153*a1b78312SNikita Shubin
154*a1b78312SNikita Shubin...
155