xref: /linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml (revision 4b660dbd9ee2059850fd30e0df420ca7a38a1856)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/fsl-imx-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale i.MX/MXC GPIO controller
8
9maintainers:
10  - Anson Huang <Anson.Huang@nxp.com>
11
12properties:
13  compatible:
14    oneOf:
15      - enum:
16          - fsl,imx1-gpio
17          - fsl,imx21-gpio
18          - fsl,imx31-gpio
19          - fsl,imx35-gpio
20          - fsl,imx7d-gpio
21      - items:
22          - enum:
23              - fsl,imx27-gpio
24          - const: fsl,imx21-gpio
25      - items:
26          - const: fsl,imx35-gpio
27          - const: fsl,imx31-gpio
28      - items:
29          - enum:
30              - fsl,imx25-gpio
31          - const: fsl,imx35-gpio
32      - items:
33          - enum:
34              - fsl,imx50-gpio
35              - fsl,imx51-gpio
36              - fsl,imx53-gpio
37              - fsl,imx6q-gpio
38              - fsl,imx6sl-gpio
39              - fsl,imx6sll-gpio
40              - fsl,imx6sx-gpio
41              - fsl,imx6ul-gpio
42              - fsl,imx7d-gpio
43              - fsl,imx8dxl-gpio
44              - fsl,imx8mm-gpio
45              - fsl,imx8mn-gpio
46              - fsl,imx8mp-gpio
47              - fsl,imx8mq-gpio
48              - fsl,imx8qm-gpio
49              - fsl,imx8qxp-gpio
50              - fsl,imxrt1050-gpio
51              - fsl,imxrt1170-gpio
52          - const: fsl,imx35-gpio
53
54  reg:
55    maxItems: 1
56
57  interrupts:
58    description: |
59      Should be the port interrupt shared by all 32 pins, if one number.
60      If two numbers, the first one is the interrupt shared by low 16 pins
61      and the second one is for high 16 pins.
62    minItems: 1
63    maxItems: 2
64
65  interrupt-controller: true
66
67  "#interrupt-cells":
68    const: 2
69
70  clocks:
71    maxItems: 1
72
73  "#gpio-cells":
74    const: 2
75
76  gpio-controller: true
77  gpio-line-names: true
78  gpio-ranges: true
79
80  power-domains:
81    maxItems: 1
82
83patternProperties:
84  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
85    type: object
86    properties:
87      gpio-hog: true
88      gpios: true
89      input: true
90      output-high: true
91      output-low: true
92      line-name: true
93
94    required:
95      - gpio-hog
96      - gpios
97
98    additionalProperties: false
99
100required:
101  - compatible
102  - reg
103  - interrupts
104  - interrupt-controller
105  - "#interrupt-cells"
106  - "#gpio-cells"
107  - gpio-controller
108
109additionalProperties: false
110
111examples:
112  - |
113    gpio0: gpio@73f84000 {
114        compatible = "fsl,imx35-gpio";
115        reg = <0x73f84000 0x4000>;
116        interrupts = <50 51>;
117        gpio-controller;
118        #gpio-cells = <2>;
119        interrupt-controller;
120        #interrupt-cells = <2>;
121    };
122
123...
124