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