xref: /linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml (revision 16fdcec8080cc85df05ab97cb330eb96f3f2cd84)
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:
22*16fdcec8SFabio Estevam          - enum:
23*16fdcec8SFabio Estevam              - fsl,imx27-gpio
24*16fdcec8SFabio Estevam          - const: fsl,imx21-gpio
25*16fdcec8SFabio Estevam      - items:
26256012abSKrzysztof Kozlowski          - const: fsl,imx35-gpio
27256012abSKrzysztof Kozlowski          - const: fsl,imx31-gpio
28256012abSKrzysztof Kozlowski      - items:
29bf276877SKrzysztof Kozlowski          - enum:
30*16fdcec8SFabio Estevam              - fsl,imx25-gpio
31*16fdcec8SFabio Estevam          - const: fsl,imx35-gpio
32*16fdcec8SFabio Estevam      - items:
33*16fdcec8SFabio Estevam          - enum:
34256012abSKrzysztof Kozlowski              - fsl,imx50-gpio
35256012abSKrzysztof Kozlowski              - fsl,imx51-gpio
36256012abSKrzysztof Kozlowski              - fsl,imx53-gpio
37256012abSKrzysztof Kozlowski              - fsl,imx6q-gpio
38256012abSKrzysztof Kozlowski              - fsl,imx6sl-gpio
39256012abSKrzysztof Kozlowski              - fsl,imx6sll-gpio
40256012abSKrzysztof Kozlowski              - fsl,imx6sx-gpio
41256012abSKrzysztof Kozlowski              - fsl,imx6ul-gpio
42256012abSKrzysztof Kozlowski              - fsl,imx7d-gpio
4327d5a3ccSPeng Fan              - fsl,imx8dxl-gpio
44bf276877SKrzysztof Kozlowski              - fsl,imx8mm-gpio
45bf276877SKrzysztof Kozlowski              - fsl,imx8mn-gpio
46bf276877SKrzysztof Kozlowski              - fsl,imx8mp-gpio
47bf276877SKrzysztof Kozlowski              - fsl,imx8mq-gpio
4827d5a3ccSPeng Fan              - fsl,imx8qm-gpio
49bf276877SKrzysztof Kozlowski              - fsl,imx8qxp-gpio
50c4f0d16dSJesse Taube              - fsl,imxrt1050-gpio
51c4f0d16dSJesse Taube              - fsl,imxrt1170-gpio
52bf276877SKrzysztof Kozlowski          - const: fsl,imx35-gpio
53493d8f46SAnson Huang
54493d8f46SAnson Huang  reg:
55493d8f46SAnson Huang    maxItems: 1
56493d8f46SAnson Huang
57493d8f46SAnson Huang  interrupts:
58493d8f46SAnson Huang    description: |
59493d8f46SAnson Huang      Should be the port interrupt shared by all 32 pins, if one number.
60493d8f46SAnson Huang      If two numbers, the first one is the interrupt shared by low 16 pins
61493d8f46SAnson Huang      and the second one is for high 16 pins.
62493d8f46SAnson Huang    minItems: 1
63493d8f46SAnson Huang    maxItems: 2
64493d8f46SAnson Huang
65493d8f46SAnson Huang  interrupt-controller: true
66493d8f46SAnson Huang
67493d8f46SAnson Huang  "#interrupt-cells":
68493d8f46SAnson Huang    const: 2
69493d8f46SAnson Huang
70493d8f46SAnson Huang  clocks:
71493d8f46SAnson Huang    maxItems: 1
72493d8f46SAnson Huang
73493d8f46SAnson Huang  "#gpio-cells":
74493d8f46SAnson Huang    const: 2
75493d8f46SAnson Huang
76493d8f46SAnson Huang  gpio-controller: true
7760e74329SKrzysztof Kozlowski  gpio-line-names: true
780c77a86aSKrzysztof Kozlowski  gpio-ranges: true
790c77a86aSKrzysztof Kozlowski
808c0aa567SKrzysztof Kozlowski  power-domains:
818c0aa567SKrzysztof Kozlowski    maxItems: 1
828c0aa567SKrzysztof Kozlowski
83dfb49cc2SKrzysztof KozlowskipatternProperties:
84dfb49cc2SKrzysztof Kozlowski  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
85dfb49cc2SKrzysztof Kozlowski    type: object
86dfb49cc2SKrzysztof Kozlowski    properties:
87dfb49cc2SKrzysztof Kozlowski      gpio-hog: true
88dfb49cc2SKrzysztof Kozlowski      gpios: true
89dfb49cc2SKrzysztof Kozlowski      input: true
90dfb49cc2SKrzysztof Kozlowski      output-high: true
91dfb49cc2SKrzysztof Kozlowski      output-low: true
92dfb49cc2SKrzysztof Kozlowski      line-name: true
93dfb49cc2SKrzysztof Kozlowski
94dfb49cc2SKrzysztof Kozlowski    required:
95dfb49cc2SKrzysztof Kozlowski      - gpio-hog
96dfb49cc2SKrzysztof Kozlowski      - gpios
97dfb49cc2SKrzysztof Kozlowski
98dfb49cc2SKrzysztof Kozlowski    additionalProperties: false
99dfb49cc2SKrzysztof Kozlowski
100493d8f46SAnson Huangrequired:
101493d8f46SAnson Huang  - compatible
102493d8f46SAnson Huang  - reg
103493d8f46SAnson Huang  - interrupts
104493d8f46SAnson Huang  - interrupt-controller
105493d8f46SAnson Huang  - "#interrupt-cells"
106493d8f46SAnson Huang  - "#gpio-cells"
107493d8f46SAnson Huang  - gpio-controller
108493d8f46SAnson Huang
109493d8f46SAnson HuangadditionalProperties: false
110493d8f46SAnson Huang
111493d8f46SAnson Huangexamples:
112493d8f46SAnson Huang  - |
113493d8f46SAnson Huang    gpio0: gpio@73f84000 {
114493d8f46SAnson Huang        compatible = "fsl,imx35-gpio";
115493d8f46SAnson Huang        reg = <0x73f84000 0x4000>;
116493d8f46SAnson Huang        interrupts = <50 51>;
117493d8f46SAnson Huang        gpio-controller;
118493d8f46SAnson Huang        #gpio-cells = <2>;
119493d8f46SAnson Huang        interrupt-controller;
120493d8f46SAnson Huang        #interrupt-cells = <2>;
121493d8f46SAnson Huang    };
122493d8f46SAnson Huang
123493d8f46SAnson Huang...
124