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
56patternProperties:
57  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
58    type: object
59    properties:
60      gpio-hog: true
61      gpios: true
62      input: true
63      output-high: true
64      output-low: true
65      line-name: true
66
67    required:
68      - gpio-hog
69      - gpios
70
71    additionalProperties: false
72
73required:
74  - compatible
75  - reg
76  - interrupts
77  - interrupt-controller
78  - "#interrupt-cells"
79  - "#gpio-cells"
80  - gpio-controller
81
82additionalProperties: false
83
84examples:
85  - |
86    gpio0: gpio@73f84000 {
87        compatible = "fsl,imx35-gpio";
88        reg = <0x73f84000 0x4000>;
89        interrupts = <50 51>;
90        gpio-controller;
91        #gpio-cells = <2>;
92        interrupt-controller;
93        #interrupt-cells = <2>;
94    };
95
96...
97