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