xref: /linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml (revision cf36ae3e5802716617b9e4d902a31048240396b0)
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          - const: fsl,imx35-gpio
23          - const: fsl,imx31-gpio
24      - items:
25          - enum:
26              - fsl,imx50-gpio
27              - fsl,imx51-gpio
28              - fsl,imx53-gpio
29              - fsl,imx6q-gpio
30              - fsl,imx6sl-gpio
31              - fsl,imx6sll-gpio
32              - fsl,imx6sx-gpio
33              - fsl,imx6ul-gpio
34              - fsl,imx7d-gpio
35              - fsl,imx8mm-gpio
36              - fsl,imx8mn-gpio
37              - fsl,imx8mp-gpio
38              - fsl,imx8mq-gpio
39              - fsl,imx8qxp-gpio
40              - fsl,imxrt1050-gpio
41              - fsl,imxrt1170-gpio
42          - const: fsl,imx35-gpio
43
44  reg:
45    maxItems: 1
46
47  interrupts:
48    description: |
49      Should be the port interrupt shared by all 32 pins, if one number.
50      If two numbers, the first one is the interrupt shared by low 16 pins
51      and the second one is for high 16 pins.
52    minItems: 1
53    maxItems: 2
54
55  interrupt-controller: true
56
57  "#interrupt-cells":
58    const: 2
59
60  clocks:
61    maxItems: 1
62
63  "#gpio-cells":
64    const: 2
65
66  gpio-controller: true
67  gpio-line-names: true
68  gpio-ranges: true
69
70  power-domains:
71    maxItems: 1
72
73patternProperties:
74  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
75    type: object
76    properties:
77      gpio-hog: true
78      gpios: true
79      input: true
80      output-high: true
81      output-low: true
82      line-name: true
83
84    required:
85      - gpio-hog
86      - gpios
87
88    additionalProperties: false
89
90required:
91  - compatible
92  - reg
93  - interrupts
94  - interrupt-controller
95  - "#interrupt-cells"
96  - "#gpio-cells"
97  - gpio-controller
98
99additionalProperties: false
100
101examples:
102  - |
103    gpio0: gpio@73f84000 {
104        compatible = "fsl,imx35-gpio";
105        reg = <0x73f84000 0x4000>;
106        interrupts = <50 51>;
107        gpio-controller;
108        #gpio-cells = <2>;
109        interrupt-controller;
110        #interrupt-cells = <2>;
111    };
112
113...
114