xref: /linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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:
10*499f5e3cSKrzysztof Kozlowski  - Shawn Guo <shawnguo@kernel.org>
11*499f5e3cSKrzysztof Kozlowski  - Sascha Hauer <s.hauer@pengutronix.de>
12*499f5e3cSKrzysztof Kozlowski  - Fabio Estevam <festevam@gmail.com>
13493d8f46SAnson Huang
14493d8f46SAnson Huangproperties:
15493d8f46SAnson Huang  compatible:
16bf276877SKrzysztof Kozlowski    oneOf:
17bf276877SKrzysztof Kozlowski      - enum:
18493d8f46SAnson Huang          - fsl,imx1-gpio
19493d8f46SAnson Huang          - fsl,imx21-gpio
20493d8f46SAnson Huang          - fsl,imx31-gpio
21493d8f46SAnson Huang          - fsl,imx35-gpio
22493d8f46SAnson Huang          - fsl,imx7d-gpio
23bf276877SKrzysztof Kozlowski      - items:
2416fdcec8SFabio Estevam          - enum:
2516fdcec8SFabio Estevam              - fsl,imx27-gpio
2616fdcec8SFabio Estevam          - const: fsl,imx21-gpio
2716fdcec8SFabio Estevam      - items:
28256012abSKrzysztof Kozlowski          - const: fsl,imx35-gpio
29256012abSKrzysztof Kozlowski          - const: fsl,imx31-gpio
30256012abSKrzysztof Kozlowski      - items:
31bf276877SKrzysztof Kozlowski          - enum:
3216fdcec8SFabio Estevam              - fsl,imx25-gpio
3316fdcec8SFabio Estevam          - const: fsl,imx35-gpio
3416fdcec8SFabio Estevam      - items:
3516fdcec8SFabio Estevam          - enum:
36256012abSKrzysztof Kozlowski              - fsl,imx50-gpio
37256012abSKrzysztof Kozlowski              - fsl,imx51-gpio
38256012abSKrzysztof Kozlowski              - fsl,imx53-gpio
39256012abSKrzysztof Kozlowski              - fsl,imx6q-gpio
40256012abSKrzysztof Kozlowski              - fsl,imx6sl-gpio
41256012abSKrzysztof Kozlowski              - fsl,imx6sll-gpio
42256012abSKrzysztof Kozlowski              - fsl,imx6sx-gpio
43256012abSKrzysztof Kozlowski              - fsl,imx6ul-gpio
44256012abSKrzysztof Kozlowski              - fsl,imx7d-gpio
4527d5a3ccSPeng Fan              - fsl,imx8dxl-gpio
46bf276877SKrzysztof Kozlowski              - fsl,imx8mm-gpio
47bf276877SKrzysztof Kozlowski              - fsl,imx8mn-gpio
48bf276877SKrzysztof Kozlowski              - fsl,imx8mp-gpio
49bf276877SKrzysztof Kozlowski              - fsl,imx8mq-gpio
5027d5a3ccSPeng Fan              - fsl,imx8qm-gpio
51bf276877SKrzysztof Kozlowski              - fsl,imx8qxp-gpio
52c4f0d16dSJesse Taube              - fsl,imxrt1050-gpio
53c4f0d16dSJesse Taube              - fsl,imxrt1170-gpio
54bf276877SKrzysztof Kozlowski          - const: fsl,imx35-gpio
55493d8f46SAnson Huang
56493d8f46SAnson Huang  reg:
57493d8f46SAnson Huang    maxItems: 1
58493d8f46SAnson Huang
59493d8f46SAnson Huang  interrupts:
60493d8f46SAnson Huang    description: |
61493d8f46SAnson Huang      Should be the port interrupt shared by all 32 pins, if one number.
62493d8f46SAnson Huang      If two numbers, the first one is the interrupt shared by low 16 pins
63493d8f46SAnson Huang      and the second one is for high 16 pins.
64493d8f46SAnson Huang    minItems: 1
65493d8f46SAnson Huang    maxItems: 2
66493d8f46SAnson Huang
67493d8f46SAnson Huang  interrupt-controller: true
68493d8f46SAnson Huang
69493d8f46SAnson Huang  "#interrupt-cells":
70493d8f46SAnson Huang    const: 2
71493d8f46SAnson Huang
72493d8f46SAnson Huang  clocks:
73493d8f46SAnson Huang    maxItems: 1
74493d8f46SAnson Huang
75493d8f46SAnson Huang  "#gpio-cells":
76493d8f46SAnson Huang    const: 2
77493d8f46SAnson Huang
78493d8f46SAnson Huang  gpio-controller: true
7960e74329SKrzysztof Kozlowski  gpio-line-names: true
800c77a86aSKrzysztof Kozlowski  gpio-ranges: true
810c77a86aSKrzysztof Kozlowski
828c0aa567SKrzysztof Kozlowski  power-domains:
838c0aa567SKrzysztof Kozlowski    maxItems: 1
848c0aa567SKrzysztof Kozlowski
85dfb49cc2SKrzysztof KozlowskipatternProperties:
86dfb49cc2SKrzysztof Kozlowski  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
87dfb49cc2SKrzysztof Kozlowski    type: object
88dfb49cc2SKrzysztof Kozlowski    required:
89dfb49cc2SKrzysztof Kozlowski      - gpio-hog
90dfb49cc2SKrzysztof Kozlowski
91493d8f46SAnson Huangrequired:
92493d8f46SAnson Huang  - compatible
93493d8f46SAnson Huang  - reg
94493d8f46SAnson Huang  - interrupts
95493d8f46SAnson Huang  - interrupt-controller
96493d8f46SAnson Huang  - "#interrupt-cells"
97493d8f46SAnson Huang  - "#gpio-cells"
98493d8f46SAnson Huang  - gpio-controller
99493d8f46SAnson Huang
100493d8f46SAnson HuangadditionalProperties: false
101493d8f46SAnson Huang
102493d8f46SAnson Huangexamples:
103493d8f46SAnson Huang  - |
104493d8f46SAnson Huang    gpio0: gpio@73f84000 {
105493d8f46SAnson Huang        compatible = "fsl,imx35-gpio";
106493d8f46SAnson Huang        reg = <0x73f84000 0x4000>;
107493d8f46SAnson Huang        interrupts = <50 51>;
108493d8f46SAnson Huang        gpio-controller;
109493d8f46SAnson Huang        #gpio-cells = <2>;
110493d8f46SAnson Huang        interrupt-controller;
111493d8f46SAnson Huang        #interrupt-cells = <2>;
112493d8f46SAnson Huang    };
113493d8f46SAnson Huang
114493d8f46SAnson Huang...
115