xref: /linux/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml (revision ee057c8c194b9283f4137b253b70e292693a39f0)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale MXS GPIO controller
8
9maintainers:
10  - Shawn Guo <shawnguo@kernel.org>
11
12description: |
13  The Freescale MXS GPIO controller is part of MXS PIN controller.
14  The GPIOs are organized in port/bank, each port consists of 32 GPIOs.
15  As the GPIO controller is embedded in the PIN controller and all the
16  GPIO ports share the same IO space with PIN controller, the GPIO node
17  will be represented as sub-nodes of MXS pinctrl node.
18
19properties:
20  compatible:
21    enum:
22      - fsl,imx23-pinctrl
23      - fsl,imx28-pinctrl
24
25  '#address-cells':
26    const: 1
27  '#size-cells':
28    const: 0
29
30  reg:
31    maxItems: 1
32
33patternProperties:
34  "gpio@[0-9]+$":
35    type: object
36    properties:
37      compatible:
38        enum:
39          - fsl,imx23-gpio
40          - fsl,imx28-gpio
41
42      reg:
43        maxItems: 1
44
45      interrupts:
46        description: Should be the port interrupt shared by all 32 pins.
47        maxItems: 1
48
49      interrupt-controller: true
50
51      "#interrupt-cells":
52        const: 2
53
54      "#gpio-cells":
55        const: 2
56
57      gpio-controller: true
58
59    required:
60      - compatible
61      - reg
62      - interrupts
63      - interrupt-controller
64      - "#interrupt-cells"
65      - "#gpio-cells"
66      - gpio-controller
67
68    additionalProperties: false
69
70required:
71  - compatible
72  - reg
73  - '#address-cells'
74  - '#size-cells'
75
76additionalProperties: false
77
78examples:
79  - |
80    pinctrl@80018000 {
81        #address-cells = <1>;
82        #size-cells = <0>;
83        compatible = "fsl,imx28-pinctrl";
84        reg = <0x80018000 0x2000>;
85
86        gpio@0 {
87                compatible = "fsl,imx28-gpio";
88                reg = <0>;
89                interrupts = <127>;
90                gpio-controller;
91                #gpio-cells = <2>;
92                interrupt-controller;
93                #interrupt-cells = <2>;
94        };
95
96        gpio@1 {
97                compatible = "fsl,imx28-gpio";
98                reg = <1>;
99                interrupts = <126>;
100                gpio-controller;
101                #gpio-cells = <2>;
102                interrupt-controller;
103                #interrupt-cells = <2>;
104        };
105
106        gpio@2 {
107                compatible = "fsl,imx28-gpio";
108                reg = <2>;
109                interrupts = <125>;
110                gpio-controller;
111                #gpio-cells = <2>;
112                interrupt-controller;
113                #interrupt-cells = <2>;
114        };
115
116        gpio@3 {
117                compatible = "fsl,imx28-gpio";
118                reg = <3>;
119                interrupts = <124>;
120                gpio-controller;
121                #gpio-cells = <2>;
122                interrupt-controller;
123                #interrupt-cells = <2>;
124        };
125
126        gpio@4 {
127                compatible = "fsl,imx28-gpio";
128                reg = <4>;
129                interrupts = <123>;
130                gpio-controller;
131                #gpio-cells = <2>;
132                interrupt-controller;
133                #interrupt-cells = <2>;
134        };
135    };
136