xref: /linux/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
11ade7d1fSAnson Huang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21ade7d1fSAnson Huang%YAML 1.2
31ade7d1fSAnson Huang---
41ade7d1fSAnson Huang$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml#
51ade7d1fSAnson Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
61ade7d1fSAnson Huang
71ade7d1fSAnson Huangtitle: Freescale MXS GPIO controller
81ade7d1fSAnson Huang
91ade7d1fSAnson Huangmaintainers:
10*e65b85ddSFabio Estevam  - Shawn Guo <shawnguo@kernel.org>
111ade7d1fSAnson Huang
121ade7d1fSAnson Huangdescription: |
131ade7d1fSAnson Huang  The Freescale MXS GPIO controller is part of MXS PIN controller.
141ade7d1fSAnson Huang  The GPIOs are organized in port/bank, each port consists of 32 GPIOs.
151ade7d1fSAnson Huang  As the GPIO controller is embedded in the PIN controller and all the
161ade7d1fSAnson Huang  GPIO ports share the same IO space with PIN controller, the GPIO node
171ade7d1fSAnson Huang  will be represented as sub-nodes of MXS pinctrl node.
181ade7d1fSAnson Huang
191ade7d1fSAnson Huangproperties:
201ade7d1fSAnson Huang  compatible:
211ade7d1fSAnson Huang    enum:
221ade7d1fSAnson Huang      - fsl,imx23-pinctrl
231ade7d1fSAnson Huang      - fsl,imx28-pinctrl
241ade7d1fSAnson Huang
251ade7d1fSAnson Huang  '#address-cells':
261ade7d1fSAnson Huang    const: 1
271ade7d1fSAnson Huang  '#size-cells':
281ade7d1fSAnson Huang    const: 0
291ade7d1fSAnson Huang
301ade7d1fSAnson Huang  reg:
311ade7d1fSAnson Huang    maxItems: 1
321ade7d1fSAnson Huang
331ade7d1fSAnson HuangpatternProperties:
341ade7d1fSAnson Huang  "gpio@[0-9]+$":
351ade7d1fSAnson Huang    type: object
361ade7d1fSAnson Huang    properties:
371ade7d1fSAnson Huang      compatible:
381ade7d1fSAnson Huang        enum:
391ade7d1fSAnson Huang          - fsl,imx23-gpio
401ade7d1fSAnson Huang          - fsl,imx28-gpio
411ade7d1fSAnson Huang
421ade7d1fSAnson Huang      reg:
431ade7d1fSAnson Huang        maxItems: 1
441ade7d1fSAnson Huang
451ade7d1fSAnson Huang      interrupts:
461ade7d1fSAnson Huang        description: Should be the port interrupt shared by all 32 pins.
471ade7d1fSAnson Huang        maxItems: 1
481ade7d1fSAnson Huang
491ade7d1fSAnson Huang      interrupt-controller: true
501ade7d1fSAnson Huang
511ade7d1fSAnson Huang      "#interrupt-cells":
521ade7d1fSAnson Huang        const: 2
531ade7d1fSAnson Huang
541ade7d1fSAnson Huang      "#gpio-cells":
551ade7d1fSAnson Huang        const: 2
561ade7d1fSAnson Huang
571ade7d1fSAnson Huang      gpio-controller: true
581ade7d1fSAnson Huang
591ade7d1fSAnson Huang    required:
601ade7d1fSAnson Huang      - compatible
611ade7d1fSAnson Huang      - reg
621ade7d1fSAnson Huang      - interrupts
631ade7d1fSAnson Huang      - interrupt-controller
641ade7d1fSAnson Huang      - "#interrupt-cells"
651ade7d1fSAnson Huang      - "#gpio-cells"
661ade7d1fSAnson Huang      - gpio-controller
671ade7d1fSAnson Huang
681ade7d1fSAnson Huang    additionalProperties: false
691ade7d1fSAnson Huang
701ade7d1fSAnson Huangrequired:
711ade7d1fSAnson Huang  - compatible
721ade7d1fSAnson Huang  - reg
731ade7d1fSAnson Huang  - '#address-cells'
741ade7d1fSAnson Huang  - '#size-cells'
751ade7d1fSAnson Huang
761ade7d1fSAnson HuangadditionalProperties: false
771ade7d1fSAnson Huang
781ade7d1fSAnson Huangexamples:
791ade7d1fSAnson Huang  - |
801ade7d1fSAnson Huang    pinctrl@80018000 {
811ade7d1fSAnson Huang        #address-cells = <1>;
821ade7d1fSAnson Huang        #size-cells = <0>;
831ade7d1fSAnson Huang        compatible = "fsl,imx28-pinctrl";
841ade7d1fSAnson Huang        reg = <0x80018000 0x2000>;
851ade7d1fSAnson Huang
861ade7d1fSAnson Huang        gpio@0 {
871ade7d1fSAnson Huang                compatible = "fsl,imx28-gpio";
881ade7d1fSAnson Huang                reg = <0>;
891ade7d1fSAnson Huang                interrupts = <127>;
901ade7d1fSAnson Huang                gpio-controller;
911ade7d1fSAnson Huang                #gpio-cells = <2>;
921ade7d1fSAnson Huang                interrupt-controller;
931ade7d1fSAnson Huang                #interrupt-cells = <2>;
941ade7d1fSAnson Huang        };
951ade7d1fSAnson Huang
961ade7d1fSAnson Huang        gpio@1 {
971ade7d1fSAnson Huang                compatible = "fsl,imx28-gpio";
981ade7d1fSAnson Huang                reg = <1>;
991ade7d1fSAnson Huang                interrupts = <126>;
1001ade7d1fSAnson Huang                gpio-controller;
1011ade7d1fSAnson Huang                #gpio-cells = <2>;
1021ade7d1fSAnson Huang                interrupt-controller;
1031ade7d1fSAnson Huang                #interrupt-cells = <2>;
1041ade7d1fSAnson Huang        };
1051ade7d1fSAnson Huang
1061ade7d1fSAnson Huang        gpio@2 {
1071ade7d1fSAnson Huang                compatible = "fsl,imx28-gpio";
1081ade7d1fSAnson Huang                reg = <2>;
1091ade7d1fSAnson Huang                interrupts = <125>;
1101ade7d1fSAnson Huang                gpio-controller;
1111ade7d1fSAnson Huang                #gpio-cells = <2>;
1121ade7d1fSAnson Huang                interrupt-controller;
1131ade7d1fSAnson Huang                #interrupt-cells = <2>;
1141ade7d1fSAnson Huang        };
1151ade7d1fSAnson Huang
1161ade7d1fSAnson Huang        gpio@3 {
1171ade7d1fSAnson Huang                compatible = "fsl,imx28-gpio";
1181ade7d1fSAnson Huang                reg = <3>;
1191ade7d1fSAnson Huang                interrupts = <124>;
1201ade7d1fSAnson Huang                gpio-controller;
1211ade7d1fSAnson Huang                #gpio-cells = <2>;
1221ade7d1fSAnson Huang                interrupt-controller;
1231ade7d1fSAnson Huang                #interrupt-cells = <2>;
1241ade7d1fSAnson Huang        };
1251ade7d1fSAnson Huang
1261ade7d1fSAnson Huang        gpio@4 {
1271ade7d1fSAnson Huang                compatible = "fsl,imx28-gpio";
1281ade7d1fSAnson Huang                reg = <4>;
1291ade7d1fSAnson Huang                interrupts = <123>;
1301ade7d1fSAnson Huang                gpio-controller;
1311ade7d1fSAnson Huang                #gpio-cells = <2>;
1321ade7d1fSAnson Huang                interrupt-controller;
1331ade7d1fSAnson Huang                #interrupt-cells = <2>;
1341ade7d1fSAnson Huang        };
1351ade7d1fSAnson Huang    };
136