1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Freescale MXS GPIO controller 8 9maintainers: 10 - Shawn Guo <shawnguo@kernel.org> 11 12description: | 13 The Freescale MXS GPIO controller is part of MXS PIN controller. 14 The GPIOs are organized in port/bank, each port consists of 32 GPIOs. 15 As the GPIO controller is embedded in the PIN controller and all the 16 GPIO ports share the same IO space with PIN controller, the GPIO node 17 will be represented as sub-nodes of MXS pinctrl node. 18 19properties: 20 compatible: 21 items: 22 - enum: 23 - fsl,imx23-pinctrl 24 - fsl,imx28-pinctrl 25 # Over 10 years old devices, driver use simple-bus to probe child gpio 26 # Devices. Keep it as it to be compatible existed dts files. 27 - const: simple-bus 28 29 '#address-cells': 30 const: 1 31 32 '#size-cells': 33 const: 0 34 35 reg: 36 maxItems: 1 37 38patternProperties: 39 '^(?!gpio@)[^@]+@[0-9]+$': 40 type: object 41 properties: 42 fsl,pinmux-ids: 43 $ref: /schemas/types.yaml#/definitions/uint32-array 44 description: | 45 An integer array. Each integer in the array specify a pin 46 with given mux function, with bank, pin and mux packed as below. 47 48 [15..12] : bank number 49 [11..4] : pin number 50 [3..0] : mux selection 51 52 This integer with mux selection packed is used as an entity by both group 53 and config nodes to identify a pin. The mux selection in the integer takes 54 effects only on group node, and will get ignored by driver with config node, 55 since config node is only meant to set up pin configurations. 56 57 Valid values for these integers are listed below. 58 59 reg: 60 items: 61 - description: | 62 pin group index. NOTE: it is supposed wrong use reg property 63 here. But it is over 10 years devices. Just keep it as it. 64 65 fsl,drive-strength: 66 $ref: /schemas/types.yaml#/definitions/uint32 67 enum: [0, 1, 2, 3] 68 description: | 69 0: MXS_DRIVE_4mA 70 1: MXS_DRIVE_8mA 71 2: MXS_DRIVE_12mA 72 3: MXS_DRIVE_16mA 73 74 fsl,voltage: 75 $ref: /schemas/types.yaml#/definitions/uint32 76 enum: [0, 1] 77 description: | 78 0: MXS_VOLTAGE_LOW - 1.8 V 79 1: MXS_VOLTAGE_HIGH - 3.3 V 80 81 fsl,pull-up: 82 $ref: /schemas/types.yaml#/definitions/uint32 83 enum: [0, 1] 84 description: | 85 0: MXS_PULL_DISABLE - Disable the internal pull-up 86 1: MXS_PULL_ENABLE - Enable the internal pull-up 87 88 Note that when enabling the pull-up, the internal pad keeper gets disabled. 89 Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up 90 will only disable the internal pad keeper. 91 92 required: 93 - fsl,pinmux-ids 94 95 additionalProperties: false 96 97 '^gpio@[0-9]+$': 98 type: object 99 properties: 100 compatible: 101 enum: 102 - fsl,imx23-gpio 103 - fsl,imx28-gpio 104 105 reg: 106 maxItems: 1 107 108 interrupts: 109 description: Should be the port interrupt shared by all 32 pins. 110 maxItems: 1 111 112 interrupt-controller: true 113 114 '#interrupt-cells': 115 const: 2 116 117 '#gpio-cells': 118 const: 2 119 120 gpio-controller: true 121 122 required: 123 - compatible 124 - reg 125 - interrupts 126 - interrupt-controller 127 - '#interrupt-cells' 128 - '#gpio-cells' 129 - gpio-controller 130 131 additionalProperties: false 132 133required: 134 - compatible 135 - reg 136 - '#address-cells' 137 - '#size-cells' 138 139additionalProperties: false 140 141examples: 142 - | 143 pinctrl@80018000 { 144 #address-cells = <1>; 145 #size-cells = <0>; 146 compatible = "fsl,imx28-pinctrl", "simple-bus"; 147 reg = <0x80018000 0x2000>; 148 149 gpio@0 { 150 compatible = "fsl,imx28-gpio"; 151 reg = <0>; 152 interrupts = <127>; 153 gpio-controller; 154 #gpio-cells = <2>; 155 interrupt-controller; 156 #interrupt-cells = <2>; 157 }; 158 159 gpio@1 { 160 compatible = "fsl,imx28-gpio"; 161 reg = <1>; 162 interrupts = <126>; 163 gpio-controller; 164 #gpio-cells = <2>; 165 interrupt-controller; 166 #interrupt-cells = <2>; 167 }; 168 169 gpio@2 { 170 compatible = "fsl,imx28-gpio"; 171 reg = <2>; 172 interrupts = <125>; 173 gpio-controller; 174 #gpio-cells = <2>; 175 interrupt-controller; 176 #interrupt-cells = <2>; 177 }; 178 179 gpio@3 { 180 compatible = "fsl,imx28-gpio"; 181 reg = <3>; 182 interrupts = <124>; 183 gpio-controller; 184 #gpio-cells = <2>; 185 interrupt-controller; 186 #interrupt-cells = <2>; 187 }; 188 189 gpio@4 { 190 compatible = "fsl,imx28-gpio"; 191 reg = <4>; 192 interrupts = <123>; 193 gpio-controller; 194 #gpio-cells = <2>; 195 interrupt-controller; 196 #interrupt-cells = <2>; 197 }; 198 199 lcdif-apx4@5 { 200 reg = <5>; 201 fsl,pinmux-ids = <0x1181 0x1191>; 202 fsl,drive-strength = <0>; 203 fsl,voltage = <0>; 204 fsl,pull-up = <0>; 205 }; 206 }; 207