Documentation / devicetree / bindings / gpio / gpio-mxs.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale MXS GPIO controller

maintainers:
  - Shawn Guo <shawnguo@kernel.org>
  - Anson Huang <Anson.Huang@nxp.com>

description: |
  The Freescale MXS GPIO controller is part of MXS PIN controller.
  The GPIOs are organized in port/bank, each port consists of 32 GPIOs.
  As the GPIO controller is embedded in the PIN controller and all the
  GPIO ports share the same IO space with PIN controller, the GPIO node
  will be represented as sub-nodes of MXS pinctrl node.

properties:
  compatible:
    enum:
      - fsl,imx23-pinctrl
      - fsl,imx28-pinctrl
 
  '#address-cells':
    const: 1
  '#size-cells':
    const: 0

  reg:
    maxItems: 1

patternProperties:
  "gpio@[0-9]+$":
    type: object
    properties:
      compatible:
        enum:
          - fsl,imx23-gpio
          - fsl,imx28-gpio

      reg:
        maxItems: 1

      interrupts:
        description: Should be the port interrupt shared by all 32 pins.
        maxItems: 1

      interrupt-controller: true
 
      "#interrupt-cells":
        const: 2
 
      "#gpio-cells":
        const: 2

      gpio-controller: true

    required:
      - compatible
      - reg
      - interrupts
      - interrupt-controller
      - "#interrupt-cells"
      - "#gpio-cells"
      - gpio-controller

    additionalProperties: false

required:
  - compatible
  - reg
  - '#address-cells'
  - '#size-cells'

additionalProperties: false

examples:
  - |
    pinctrl@80018000 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "fsl,imx28-pinctrl";
        reg = <0x80018000 0x2000>;
 
        gpio@0 {
                compatible = "fsl,imx28-gpio";
                reg = <0>;
                interrupts = <127>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
        };
 
        gpio@1 {
                compatible = "fsl,imx28-gpio";
                reg = <1>;
                interrupts = <126>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
        };
 
        gpio@2 {
                compatible = "fsl,imx28-gpio";
                reg = <2>;
                interrupts = <125>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
        };
 
        gpio@3 {
                compatible = "fsl,imx28-gpio";
                reg = <3>;
                interrupts = <124>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
        };
 
        gpio@4 {
                compatible = "fsl,imx28-gpio";
                reg = <4>;
                interrupts = <123>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
        };
    };