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