xref: /linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml (revision dfb49cc231a483b80ceba73579df5208080ba7d0)
1493d8f46SAnson Huang# SPDX-License-Identifier: GPL-2.0
2493d8f46SAnson Huang%YAML 1.2
3493d8f46SAnson Huang---
4493d8f46SAnson Huang$id: http://devicetree.org/schemas/gpio/fsl-imx-gpio.yaml#
5493d8f46SAnson Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
6493d8f46SAnson Huang
7493d8f46SAnson Huangtitle: Freescale i.MX/MXC GPIO controller
8493d8f46SAnson Huang
9493d8f46SAnson Huangmaintainers:
10493d8f46SAnson Huang  - Anson Huang <Anson.Huang@nxp.com>
11493d8f46SAnson Huang
12493d8f46SAnson Huangproperties:
13493d8f46SAnson Huang  compatible:
14bf276877SKrzysztof Kozlowski    oneOf:
15bf276877SKrzysztof Kozlowski      - enum:
16493d8f46SAnson Huang          - fsl,imx1-gpio
17493d8f46SAnson Huang          - fsl,imx21-gpio
18493d8f46SAnson Huang          - fsl,imx31-gpio
19493d8f46SAnson Huang          - fsl,imx35-gpio
20493d8f46SAnson Huang          - fsl,imx7d-gpio
21bf276877SKrzysztof Kozlowski      - items:
22bf276877SKrzysztof Kozlowski          - enum:
23bf276877SKrzysztof Kozlowski              - fsl,imx8mm-gpio
24bf276877SKrzysztof Kozlowski              - fsl,imx8mn-gpio
25bf276877SKrzysztof Kozlowski              - fsl,imx8mp-gpio
26bf276877SKrzysztof Kozlowski              - fsl,imx8mq-gpio
27bf276877SKrzysztof Kozlowski              - fsl,imx8qxp-gpio
28bf276877SKrzysztof Kozlowski          - const: fsl,imx35-gpio
29493d8f46SAnson Huang
30493d8f46SAnson Huang  reg:
31493d8f46SAnson Huang    maxItems: 1
32493d8f46SAnson Huang
33493d8f46SAnson Huang  interrupts:
34493d8f46SAnson Huang    description: |
35493d8f46SAnson Huang      Should be the port interrupt shared by all 32 pins, if one number.
36493d8f46SAnson Huang      If two numbers, the first one is the interrupt shared by low 16 pins
37493d8f46SAnson Huang      and the second one is for high 16 pins.
38493d8f46SAnson Huang    minItems: 1
39493d8f46SAnson Huang    maxItems: 2
40493d8f46SAnson Huang
41493d8f46SAnson Huang  interrupt-controller: true
42493d8f46SAnson Huang
43493d8f46SAnson Huang  "#interrupt-cells":
44493d8f46SAnson Huang    const: 2
45493d8f46SAnson Huang
46493d8f46SAnson Huang  clocks:
47493d8f46SAnson Huang    maxItems: 1
48493d8f46SAnson Huang
49493d8f46SAnson Huang  "#gpio-cells":
50493d8f46SAnson Huang    const: 2
51493d8f46SAnson Huang
52493d8f46SAnson Huang  gpio-controller: true
53493d8f46SAnson Huang
540c77a86aSKrzysztof Kozlowski  gpio-ranges: true
550c77a86aSKrzysztof Kozlowski
56*dfb49cc2SKrzysztof KozlowskipatternProperties:
57*dfb49cc2SKrzysztof Kozlowski  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
58*dfb49cc2SKrzysztof Kozlowski    type: object
59*dfb49cc2SKrzysztof Kozlowski    properties:
60*dfb49cc2SKrzysztof Kozlowski      gpio-hog: true
61*dfb49cc2SKrzysztof Kozlowski      gpios: true
62*dfb49cc2SKrzysztof Kozlowski      input: true
63*dfb49cc2SKrzysztof Kozlowski      output-high: true
64*dfb49cc2SKrzysztof Kozlowski      output-low: true
65*dfb49cc2SKrzysztof Kozlowski      line-name: true
66*dfb49cc2SKrzysztof Kozlowski
67*dfb49cc2SKrzysztof Kozlowski    required:
68*dfb49cc2SKrzysztof Kozlowski      - gpio-hog
69*dfb49cc2SKrzysztof Kozlowski      - gpios
70*dfb49cc2SKrzysztof Kozlowski
71*dfb49cc2SKrzysztof Kozlowski    additionalProperties: false
72*dfb49cc2SKrzysztof Kozlowski
73493d8f46SAnson Huangrequired:
74493d8f46SAnson Huang  - compatible
75493d8f46SAnson Huang  - reg
76493d8f46SAnson Huang  - interrupts
77493d8f46SAnson Huang  - interrupt-controller
78493d8f46SAnson Huang  - "#interrupt-cells"
79493d8f46SAnson Huang  - "#gpio-cells"
80493d8f46SAnson Huang  - gpio-controller
81493d8f46SAnson Huang
82493d8f46SAnson HuangadditionalProperties: false
83493d8f46SAnson Huang
84493d8f46SAnson Huangexamples:
85493d8f46SAnson Huang  - |
86493d8f46SAnson Huang    gpio0: gpio@73f84000 {
87493d8f46SAnson Huang        compatible = "fsl,imx35-gpio";
88493d8f46SAnson Huang        reg = <0x73f84000 0x4000>;
89493d8f46SAnson Huang        interrupts = <50 51>;
90493d8f46SAnson Huang        gpio-controller;
91493d8f46SAnson Huang        #gpio-cells = <2>;
92493d8f46SAnson Huang        interrupt-controller;
93493d8f46SAnson Huang        #interrupt-cells = <2>;
94493d8f46SAnson Huang    };
95493d8f46SAnson Huang
96493d8f46SAnson Huang...
97