summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
blob: 9cf6137dd52413f956ed8c46e6c024efde5e27be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/mrvl-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Marvell PXA GPIO controller

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>
  - Bartosz Golaszewski <bgolaszewski@baylibre.com>
  - Rob Herring <robh+dt@kernel.org>

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - intel,pxa25x-gpio
              - intel,pxa26x-gpio
              - intel,pxa27x-gpio
              - intel,pxa3xx-gpio
    then:
      properties:
        interrupts:
          minItems: 3
          maxItems: 3
        interrupt-names:
          items:
            - const: gpio0
            - const: gpio1
            - const: gpio_mux
  - if:
      properties:
        compatible:
          contains:
            enum:
              - marvell,mmp-gpio
              - marvell,mmp2-gpio
    then:
      properties:
        interrupts:
          maxItems: 1
        interrupt-names:
          items:
            - const: gpio_mux

properties:
  $nodename:
    pattern: '^gpio@[0-9a-f]+$'

  compatible:
    enum:
      - intel,pxa25x-gpio
      - intel,pxa26x-gpio
      - intel,pxa27x-gpio
      - intel,pxa3xx-gpio
      - marvell,mmp-gpio
      - marvell,mmp2-gpio
      - marvell,pxa93x-gpio

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  resets:
    maxItems: 1

  ranges: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 1

  gpio-controller: true

  '#gpio-cells':
    const: 2

  gpio-ranges: true

  interrupts: true

  interrupt-names: true

  interrupt-controller: true

  '#interrupt-cells':
    const: 2

patternProperties:
  '^gpio@[0-9a-f]*$':
    type: object
    properties:
      reg:
        maxItems: 1

    required:
      - reg

    additionalProperties: false

required:
  - compatible
  - '#address-cells'
  - '#size-cells'
  - reg
  - gpio-controller
  - '#gpio-cells'
  - interrupts
  - interrupt-names
  - interrupt-controller
  - '#interrupt-cells'

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/pxa-clock.h>
    gpio@40e00000 {
        compatible = "intel,pxa3xx-gpio";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0x40e00000 0x10000>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupts = <8>, <9>, <10>;
        interrupt-names = "gpio0", "gpio1", "gpio_mux";
        clocks = <&clks CLK_GPIO>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };
  - |
    #include <dt-bindings/clock/marvell,pxa910.h>
    gpio@d4019000 {
        compatible = "marvell,mmp-gpio";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0xd4019000 0x1000>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupts = <49>;
        interrupt-names = "gpio_mux";
        clocks = <&soc_clocks PXA910_CLK_GPIO>;
        resets = <&soc_clocks PXA910_CLK_GPIO>;
        interrupt-controller;
        #interrupt-cells = <2>;
        ranges;

        gpio@d4019000 {
            reg = <0xd4019000 0x4>;
        };

        gpio@d4019004 {
            reg = <0xd4019004 0x4>;
        };

        gpio@d4019008 {
            reg = <0xd4019008 0x4>;
        };

        gpio@d4019100 {
            reg = <0xd4019100 0x4>;
        };
     };

...