diff options
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt | 918 | ||||
-rw-r--r-- | drivers/pinctrl/Kconfig | 15 | ||||
-rw-r--r-- | drivers/pinctrl/Makefile | 3 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-imx23.c | 305 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-imx28.c | 421 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-mxs.c | 508 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-mxs.h | 91 |
7 files changed, 2261 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt new file mode 100644 index 000000000000..f7e8e8f4d9a3 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt | |||
@@ -0,0 +1,918 @@ | |||
1 | * Freescale MXS Pin Controller | ||
2 | |||
3 | The pins controlled by mxs pin controller are organized in banks, each bank | ||
4 | has 32 pins. Each pin has 4 multiplexing functions, and generally, the 4th | ||
5 | function is GPIO. The configuration on the pins includes drive strength, | ||
6 | voltage and pull-up. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: "fsl,imx23-pinctrl" or "fsl,imx28-pinctrl" | ||
10 | - reg: Should contain the register physical address and length for the | ||
11 | pin controller. | ||
12 | |||
13 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
14 | common pinctrl bindings used by client devices. | ||
15 | |||
16 | The node of mxs pin controller acts as a container for an arbitrary number of | ||
17 | subnodes. Each of these subnodes represents some desired configuration for | ||
18 | a group of pins, and only affects those parameters that are explicitly listed. | ||
19 | In other words, a subnode that describes a drive strength parameter implies no | ||
20 | information about pull-up. For this reason, even seemingly boolean values are | ||
21 | actually tristates in this binding: unspecified, off, or on. Unspecified is | ||
22 | represented as an absent property, and off/on are represented as integer | ||
23 | values 0 and 1. | ||
24 | |||
25 | Those subnodes under mxs pin controller node will fall into two categories. | ||
26 | One is to set up a group of pins for a function, both mux selection and pin | ||
27 | configurations, and it's called group node in the binding document. The other | ||
28 | one is to adjust the pin configuration for some particular pins that need a | ||
29 | different configuration than what is defined in group node. The binding | ||
30 | document calls this type of node config node. | ||
31 | |||
32 | On mxs, there is no hardware pin group. The pin group in this binding only | ||
33 | means a group of pins put together for particular peripheral to work in | ||
34 | particular function, like SSP0 functioning as mmc0-8bit. That said, the | ||
35 | group node should include all the pins needed for one function rather than | ||
36 | having these pins defined in several group nodes. It also means each of | ||
37 | "pinctrl-*" phandle in client device node should only have one group node | ||
38 | pointed in there, while the phandle can have multiple config node referenced | ||
39 | there to adjust configurations for some pins in the group. | ||
40 | |||
41 | Required subnode-properties: | ||
42 | - fsl,pinmux-ids: An integer array. Each integer in the array specify a pin | ||
43 | with given mux function, with bank, pin and mux packed as below. | ||
44 | |||
45 | [15..12] : bank number | ||
46 | [11..4] : pin number | ||
47 | [3..0] : mux selection | ||
48 | |||
49 | This integer with mux selection packed is used as an entity by both group | ||
50 | and config nodes to identify a pin. The mux selection in the integer takes | ||
51 | effects only on group node, and will get ignored by driver with config node, | ||
52 | since config node is only meant to set up pin configurations. | ||
53 | |||
54 | Valid values for these integers are listed below. | ||
55 | |||
56 | - reg: Should be the index of the group nodes for same function. This property | ||
57 | is required only for group nodes, and should not be present in any config | ||
58 | nodes. | ||
59 | |||
60 | Optional subnode-properties: | ||
61 | - fsl,drive-strength: Integer. | ||
62 | 0: 4 mA | ||
63 | 1: 8 mA | ||
64 | 2: 12 mA | ||
65 | 3: 16 mA | ||
66 | - fsl,voltage: Integer. | ||
67 | 0: 1.8 V | ||
68 | 1: 3.3 V | ||
69 | - fsl,pull-up: Integer. | ||
70 | 0: Disable the internal pull-up | ||
71 | 1: Enable the internal pull-up | ||
72 | |||
73 | Examples: | ||
74 | |||
75 | pinctrl@80018000 { | ||
76 | #address-cells = <1>; | ||
77 | #size-cells = <0>; | ||
78 | compatible = "fsl,imx28-pinctrl"; | ||
79 | reg = <0x80018000 2000>; | ||
80 | |||
81 | mmc0_8bit_pins_a: mmc0-8bit@0 { | ||
82 | reg = <0>; | ||
83 | fsl,pinmux-ids = < | ||
84 | 0x2000 0x2010 0x2020 0x2030 | ||
85 | 0x2040 0x2050 0x2060 0x2070 | ||
86 | 0x2080 0x2090 0x20a0>; | ||
87 | fsl,drive-strength = <1>; | ||
88 | fsl,voltage = <1>; | ||
89 | fsl,pull-up = <1>; | ||
90 | }; | ||
91 | |||
92 | mmc_cd_cfg: mmc-cd-cfg { | ||
93 | fsl,pinmux-ids = <0x2090>; | ||
94 | fsl,pull-up = <0>; | ||
95 | }; | ||
96 | |||
97 | mmc_sck_cfg: mmc-sck-cfg { | ||
98 | fsl,pinmux-ids = <0x20a0>; | ||
99 | fsl,drive-strength = <2>; | ||
100 | fsl,pull-up = <0>; | ||
101 | }; | ||
102 | }; | ||
103 | |||
104 | In this example, group node mmc0-8bit defines a group of pins for mxs SSP0 | ||
105 | to function as a 8-bit mmc device, with 8mA, 3.3V and pull-up configurations | ||
106 | applied on all these pins. And config nodes mmc-cd-cfg and mmc-sck-cfg are | ||
107 | adjusting the configuration for pins card-detection and clock from what group | ||
108 | node mmc0-8bit defines. Only the configuration properties to be adjusted need | ||
109 | to be listed in the config nodes. | ||
110 | |||
111 | Valid values for i.MX28 pinmux-id: | ||
112 | |||
113 | pinmux id | ||
114 | ------ -- | ||
115 | MX28_PAD_GPMI_D00__GPMI_D0 0x0000 | ||
116 | MX28_PAD_GPMI_D01__GPMI_D1 0x0010 | ||
117 | MX28_PAD_GPMI_D02__GPMI_D2 0x0020 | ||
118 | MX28_PAD_GPMI_D03__GPMI_D3 0x0030 | ||
119 | MX28_PAD_GPMI_D04__GPMI_D4 0x0040 | ||
120 | MX28_PAD_GPMI_D05__GPMI_D5 0x0050 | ||
121 | MX28_PAD_GPMI_D06__GPMI_D6 0x0060 | ||
122 | MX28_PAD_GPMI_D07__GPMI_D7 0x0070 | ||
123 | MX28_PAD_GPMI_CE0N__GPMI_CE0N 0x0100 | ||
124 | MX28_PAD_GPMI_CE1N__GPMI_CE1N 0x0110 | ||
125 | MX28_PAD_GPMI_CE2N__GPMI_CE2N 0x0120 | ||
126 | MX28_PAD_GPMI_CE3N__GPMI_CE3N 0x0130 | ||
127 | MX28_PAD_GPMI_RDY0__GPMI_READY0 0x0140 | ||
128 | MX28_PAD_GPMI_RDY1__GPMI_READY1 0x0150 | ||
129 | MX28_PAD_GPMI_RDY2__GPMI_READY2 0x0160 | ||
130 | MX28_PAD_GPMI_RDY3__GPMI_READY3 0x0170 | ||
131 | MX28_PAD_GPMI_RDN__GPMI_RDN 0x0180 | ||
132 | MX28_PAD_GPMI_WRN__GPMI_WRN 0x0190 | ||
133 | MX28_PAD_GPMI_ALE__GPMI_ALE 0x01a0 | ||
134 | MX28_PAD_GPMI_CLE__GPMI_CLE 0x01b0 | ||
135 | MX28_PAD_GPMI_RESETN__GPMI_RESETN 0x01c0 | ||
136 | MX28_PAD_LCD_D00__LCD_D0 0x1000 | ||
137 | MX28_PAD_LCD_D01__LCD_D1 0x1010 | ||
138 | MX28_PAD_LCD_D02__LCD_D2 0x1020 | ||
139 | MX28_PAD_LCD_D03__LCD_D3 0x1030 | ||
140 | MX28_PAD_LCD_D04__LCD_D4 0x1040 | ||
141 | MX28_PAD_LCD_D05__LCD_D5 0x1050 | ||
142 | MX28_PAD_LCD_D06__LCD_D6 0x1060 | ||
143 | MX28_PAD_LCD_D07__LCD_D7 0x1070 | ||
144 | MX28_PAD_LCD_D08__LCD_D8 0x1080 | ||
145 | MX28_PAD_LCD_D09__LCD_D9 0x1090 | ||
146 | MX28_PAD_LCD_D10__LCD_D10 0x10a0 | ||
147 | MX28_PAD_LCD_D11__LCD_D11 0x10b0 | ||
148 | MX28_PAD_LCD_D12__LCD_D12 0x10c0 | ||
149 | MX28_PAD_LCD_D13__LCD_D13 0x10d0 | ||
150 | MX28_PAD_LCD_D14__LCD_D14 0x10e0 | ||
151 | MX28_PAD_LCD_D15__LCD_D15 0x10f0 | ||
152 | MX28_PAD_LCD_D16__LCD_D16 0x1100 | ||
153 | MX28_PAD_LCD_D17__LCD_D17 0x1110 | ||
154 | MX28_PAD_LCD_D18__LCD_D18 0x1120 | ||
155 | MX28_PAD_LCD_D19__LCD_D19 0x1130 | ||
156 | MX28_PAD_LCD_D20__LCD_D20 0x1140 | ||
157 | MX28_PAD_LCD_D21__LCD_D21 0x1150 | ||
158 | MX28_PAD_LCD_D22__LCD_D22 0x1160 | ||
159 | MX28_PAD_LCD_D23__LCD_D23 0x1170 | ||
160 | MX28_PAD_LCD_RD_E__LCD_RD_E 0x1180 | ||
161 | MX28_PAD_LCD_WR_RWN__LCD_WR_RWN 0x1190 | ||
162 | MX28_PAD_LCD_RS__LCD_RS 0x11a0 | ||
163 | MX28_PAD_LCD_CS__LCD_CS 0x11b0 | ||
164 | MX28_PAD_LCD_VSYNC__LCD_VSYNC 0x11c0 | ||
165 | MX28_PAD_LCD_HSYNC__LCD_HSYNC 0x11d0 | ||
166 | MX28_PAD_LCD_DOTCLK__LCD_DOTCLK 0x11e0 | ||
167 | MX28_PAD_LCD_ENABLE__LCD_ENABLE 0x11f0 | ||
168 | MX28_PAD_SSP0_DATA0__SSP0_D0 0x2000 | ||
169 | MX28_PAD_SSP0_DATA1__SSP0_D1 0x2010 | ||
170 | MX28_PAD_SSP0_DATA2__SSP0_D2 0x2020 | ||
171 | MX28_PAD_SSP0_DATA3__SSP0_D3 0x2030 | ||
172 | MX28_PAD_SSP0_DATA4__SSP0_D4 0x2040 | ||
173 | MX28_PAD_SSP0_DATA5__SSP0_D5 0x2050 | ||
174 | MX28_PAD_SSP0_DATA6__SSP0_D6 0x2060 | ||
175 | MX28_PAD_SSP0_DATA7__SSP0_D7 0x2070 | ||
176 | MX28_PAD_SSP0_CMD__SSP0_CMD 0x2080 | ||
177 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT 0x2090 | ||
178 | MX28_PAD_SSP0_SCK__SSP0_SCK 0x20a0 | ||
179 | MX28_PAD_SSP1_SCK__SSP1_SCK 0x20c0 | ||
180 | MX28_PAD_SSP1_CMD__SSP1_CMD 0x20d0 | ||
181 | MX28_PAD_SSP1_DATA0__SSP1_D0 0x20e0 | ||
182 | MX28_PAD_SSP1_DATA3__SSP1_D3 0x20f0 | ||
183 | MX28_PAD_SSP2_SCK__SSP2_SCK 0x2100 | ||
184 | MX28_PAD_SSP2_MOSI__SSP2_CMD 0x2110 | ||
185 | MX28_PAD_SSP2_MISO__SSP2_D0 0x2120 | ||
186 | MX28_PAD_SSP2_SS0__SSP2_D3 0x2130 | ||
187 | MX28_PAD_SSP2_SS1__SSP2_D4 0x2140 | ||
188 | MX28_PAD_SSP2_SS2__SSP2_D5 0x2150 | ||
189 | MX28_PAD_SSP3_SCK__SSP3_SCK 0x2180 | ||
190 | MX28_PAD_SSP3_MOSI__SSP3_CMD 0x2190 | ||
191 | MX28_PAD_SSP3_MISO__SSP3_D0 0x21a0 | ||
192 | MX28_PAD_SSP3_SS0__SSP3_D3 0x21b0 | ||
193 | MX28_PAD_AUART0_RX__AUART0_RX 0x3000 | ||
194 | MX28_PAD_AUART0_TX__AUART0_TX 0x3010 | ||
195 | MX28_PAD_AUART0_CTS__AUART0_CTS 0x3020 | ||
196 | MX28_PAD_AUART0_RTS__AUART0_RTS 0x3030 | ||
197 | MX28_PAD_AUART1_RX__AUART1_RX 0x3040 | ||
198 | MX28_PAD_AUART1_TX__AUART1_TX 0x3050 | ||
199 | MX28_PAD_AUART1_CTS__AUART1_CTS 0x3060 | ||
200 | MX28_PAD_AUART1_RTS__AUART1_RTS 0x3070 | ||
201 | MX28_PAD_AUART2_RX__AUART2_RX 0x3080 | ||
202 | MX28_PAD_AUART2_TX__AUART2_TX 0x3090 | ||
203 | MX28_PAD_AUART2_CTS__AUART2_CTS 0x30a0 | ||
204 | MX28_PAD_AUART2_RTS__AUART2_RTS 0x30b0 | ||
205 | MX28_PAD_AUART3_RX__AUART3_RX 0x30c0 | ||
206 | MX28_PAD_AUART3_TX__AUART3_TX 0x30d0 | ||
207 | MX28_PAD_AUART3_CTS__AUART3_CTS 0x30e0 | ||
208 | MX28_PAD_AUART3_RTS__AUART3_RTS 0x30f0 | ||
209 | MX28_PAD_PWM0__PWM_0 0x3100 | ||
210 | MX28_PAD_PWM1__PWM_1 0x3110 | ||
211 | MX28_PAD_PWM2__PWM_2 0x3120 | ||
212 | MX28_PAD_SAIF0_MCLK__SAIF0_MCLK 0x3140 | ||
213 | MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK 0x3150 | ||
214 | MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK 0x3160 | ||
215 | MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 0x3170 | ||
216 | MX28_PAD_I2C0_SCL__I2C0_SCL 0x3180 | ||
217 | MX28_PAD_I2C0_SDA__I2C0_SDA 0x3190 | ||
218 | MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 0x31a0 | ||
219 | MX28_PAD_SPDIF__SPDIF_TX 0x31b0 | ||
220 | MX28_PAD_PWM3__PWM_3 0x31c0 | ||
221 | MX28_PAD_PWM4__PWM_4 0x31d0 | ||
222 | MX28_PAD_LCD_RESET__LCD_RESET 0x31e0 | ||
223 | MX28_PAD_ENET0_MDC__ENET0_MDC 0x4000 | ||
224 | MX28_PAD_ENET0_MDIO__ENET0_MDIO 0x4010 | ||
225 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN 0x4020 | ||
226 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 0x4030 | ||
227 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 0x4040 | ||
228 | MX28_PAD_ENET0_TX_CLK__ENET0_TX_CLK 0x4050 | ||
229 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN 0x4060 | ||
230 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 0x4070 | ||
231 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 0x4080 | ||
232 | MX28_PAD_ENET0_RXD2__ENET0_RXD2 0x4090 | ||
233 | MX28_PAD_ENET0_RXD3__ENET0_RXD3 0x40a0 | ||
234 | MX28_PAD_ENET0_TXD2__ENET0_TXD2 0x40b0 | ||
235 | MX28_PAD_ENET0_TXD3__ENET0_TXD3 0x40c0 | ||
236 | MX28_PAD_ENET0_RX_CLK__ENET0_RX_CLK 0x40d0 | ||
237 | MX28_PAD_ENET0_COL__ENET0_COL 0x40e0 | ||
238 | MX28_PAD_ENET0_CRS__ENET0_CRS 0x40f0 | ||
239 | MX28_PAD_ENET_CLK__CLKCTRL_ENET 0x4100 | ||
240 | MX28_PAD_JTAG_RTCK__JTAG_RTCK 0x4140 | ||
241 | MX28_PAD_EMI_D00__EMI_DATA0 0x5000 | ||
242 | MX28_PAD_EMI_D01__EMI_DATA1 0x5010 | ||
243 | MX28_PAD_EMI_D02__EMI_DATA2 0x5020 | ||
244 | MX28_PAD_EMI_D03__EMI_DATA3 0x5030 | ||
245 | MX28_PAD_EMI_D04__EMI_DATA4 0x5040 | ||
246 | MX28_PAD_EMI_D05__EMI_DATA5 0x5050 | ||
247 | MX28_PAD_EMI_D06__EMI_DATA6 0x5060 | ||
248 | MX28_PAD_EMI_D07__EMI_DATA7 0x5070 | ||
249 | MX28_PAD_EMI_D08__EMI_DATA8 0x5080 | ||
250 | MX28_PAD_EMI_D09__EMI_DATA9 0x5090 | ||
251 | MX28_PAD_EMI_D10__EMI_DATA10 0x50a0 | ||
252 | MX28_PAD_EMI_D11__EMI_DATA11 0x50b0 | ||
253 | MX28_PAD_EMI_D12__EMI_DATA12 0x50c0 | ||
254 | MX28_PAD_EMI_D13__EMI_DATA13 0x50d0 | ||
255 | MX28_PAD_EMI_D14__EMI_DATA14 0x50e0 | ||
256 | MX28_PAD_EMI_D15__EMI_DATA15 0x50f0 | ||
257 | MX28_PAD_EMI_ODT0__EMI_ODT0 0x5100 | ||
258 | MX28_PAD_EMI_DQM0__EMI_DQM0 0x5110 | ||
259 | MX28_PAD_EMI_ODT1__EMI_ODT1 0x5120 | ||
260 | MX28_PAD_EMI_DQM1__EMI_DQM1 0x5130 | ||
261 | MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK 0x5140 | ||
262 | MX28_PAD_EMI_CLK__EMI_CLK 0x5150 | ||
263 | MX28_PAD_EMI_DQS0__EMI_DQS0 0x5160 | ||
264 | MX28_PAD_EMI_DQS1__EMI_DQS1 0x5170 | ||
265 | MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN 0x51a0 | ||
266 | MX28_PAD_EMI_A00__EMI_ADDR0 0x6000 | ||
267 | MX28_PAD_EMI_A01__EMI_ADDR1 0x6010 | ||
268 | MX28_PAD_EMI_A02__EMI_ADDR2 0x6020 | ||
269 | MX28_PAD_EMI_A03__EMI_ADDR3 0x6030 | ||
270 | MX28_PAD_EMI_A04__EMI_ADDR4 0x6040 | ||
271 | MX28_PAD_EMI_A05__EMI_ADDR5 0x6050 | ||
272 | MX28_PAD_EMI_A06__EMI_ADDR6 0x6060 | ||
273 | MX28_PAD_EMI_A07__EMI_ADDR7 0x6070 | ||
274 | MX28_PAD_EMI_A08__EMI_ADDR8 0x6080 | ||
275 | MX28_PAD_EMI_A09__EMI_ADDR9 0x6090 | ||
276 | MX28_PAD_EMI_A10__EMI_ADDR10 0x60a0 | ||
277 | MX28_PAD_EMI_A11__EMI_ADDR11 0x60b0 | ||
278 | MX28_PAD_EMI_A12__EMI_ADDR12 0x60c0 | ||
279 | MX28_PAD_EMI_A13__EMI_ADDR13 0x60d0 | ||
280 | MX28_PAD_EMI_A14__EMI_ADDR14 0x60e0 | ||
281 | MX28_PAD_EMI_BA0__EMI_BA0 0x6100 | ||
282 | MX28_PAD_EMI_BA1__EMI_BA1 0x6110 | ||
283 | MX28_PAD_EMI_BA2__EMI_BA2 0x6120 | ||
284 | MX28_PAD_EMI_CASN__EMI_CASN 0x6130 | ||
285 | MX28_PAD_EMI_RASN__EMI_RASN 0x6140 | ||
286 | MX28_PAD_EMI_WEN__EMI_WEN 0x6150 | ||
287 | MX28_PAD_EMI_CE0N__EMI_CE0N 0x6160 | ||
288 | MX28_PAD_EMI_CE1N__EMI_CE1N 0x6170 | ||
289 | MX28_PAD_EMI_CKE__EMI_CKE 0x6180 | ||
290 | MX28_PAD_GPMI_D00__SSP1_D0 0x0001 | ||
291 | MX28_PAD_GPMI_D01__SSP1_D1 0x0011 | ||
292 | MX28_PAD_GPMI_D02__SSP1_D2 0x0021 | ||
293 | MX28_PAD_GPMI_D03__SSP1_D3 0x0031 | ||
294 | MX28_PAD_GPMI_D04__SSP1_D4 0x0041 | ||
295 | MX28_PAD_GPMI_D05__SSP1_D5 0x0051 | ||
296 | MX28_PAD_GPMI_D06__SSP1_D6 0x0061 | ||
297 | MX28_PAD_GPMI_D07__SSP1_D7 0x0071 | ||
298 | MX28_PAD_GPMI_CE0N__SSP3_D0 0x0101 | ||
299 | MX28_PAD_GPMI_CE1N__SSP3_D3 0x0111 | ||
300 | MX28_PAD_GPMI_CE2N__CAN1_TX 0x0121 | ||
301 | MX28_PAD_GPMI_CE3N__CAN1_RX 0x0131 | ||
302 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT 0x0141 | ||
303 | MX28_PAD_GPMI_RDY1__SSP1_CMD 0x0151 | ||
304 | MX28_PAD_GPMI_RDY2__CAN0_TX 0x0161 | ||
305 | MX28_PAD_GPMI_RDY3__CAN0_RX 0x0171 | ||
306 | MX28_PAD_GPMI_RDN__SSP3_SCK 0x0181 | ||
307 | MX28_PAD_GPMI_WRN__SSP1_SCK 0x0191 | ||
308 | MX28_PAD_GPMI_ALE__SSP3_D1 0x01a1 | ||
309 | MX28_PAD_GPMI_CLE__SSP3_D2 0x01b1 | ||
310 | MX28_PAD_GPMI_RESETN__SSP3_CMD 0x01c1 | ||
311 | MX28_PAD_LCD_D03__ETM_DA8 0x1031 | ||
312 | MX28_PAD_LCD_D04__ETM_DA9 0x1041 | ||
313 | MX28_PAD_LCD_D08__ETM_DA3 0x1081 | ||
314 | MX28_PAD_LCD_D09__ETM_DA4 0x1091 | ||
315 | MX28_PAD_LCD_D20__ENET1_1588_EVENT2_OUT 0x1141 | ||
316 | MX28_PAD_LCD_D21__ENET1_1588_EVENT2_IN 0x1151 | ||
317 | MX28_PAD_LCD_D22__ENET1_1588_EVENT3_OUT 0x1161 | ||
318 | MX28_PAD_LCD_D23__ENET1_1588_EVENT3_IN 0x1171 | ||
319 | MX28_PAD_LCD_RD_E__LCD_VSYNC 0x1181 | ||
320 | MX28_PAD_LCD_WR_RWN__LCD_HSYNC 0x1191 | ||
321 | MX28_PAD_LCD_RS__LCD_DOTCLK 0x11a1 | ||
322 | MX28_PAD_LCD_CS__LCD_ENABLE 0x11b1 | ||
323 | MX28_PAD_LCD_VSYNC__SAIF1_SDATA0 0x11c1 | ||
324 | MX28_PAD_LCD_HSYNC__SAIF1_SDATA1 0x11d1 | ||
325 | MX28_PAD_LCD_DOTCLK__SAIF1_MCLK 0x11e1 | ||
326 | MX28_PAD_SSP0_DATA4__SSP2_D0 0x2041 | ||
327 | MX28_PAD_SSP0_DATA5__SSP2_D3 0x2051 | ||
328 | MX28_PAD_SSP0_DATA6__SSP2_CMD 0x2061 | ||
329 | MX28_PAD_SSP0_DATA7__SSP2_SCK 0x2071 | ||
330 | MX28_PAD_SSP1_SCK__SSP2_D1 0x20c1 | ||
331 | MX28_PAD_SSP1_CMD__SSP2_D2 0x20d1 | ||
332 | MX28_PAD_SSP1_DATA0__SSP2_D6 0x20e1 | ||
333 | MX28_PAD_SSP1_DATA3__SSP2_D7 0x20f1 | ||
334 | MX28_PAD_SSP2_SCK__AUART2_RX 0x2101 | ||
335 | MX28_PAD_SSP2_MOSI__AUART2_TX 0x2111 | ||
336 | MX28_PAD_SSP2_MISO__AUART3_RX 0x2121 | ||
337 | MX28_PAD_SSP2_SS0__AUART3_TX 0x2131 | ||
338 | MX28_PAD_SSP2_SS1__SSP2_D1 0x2141 | ||
339 | MX28_PAD_SSP2_SS2__SSP2_D2 0x2151 | ||
340 | MX28_PAD_SSP3_SCK__AUART4_TX 0x2181 | ||
341 | MX28_PAD_SSP3_MOSI__AUART4_RX 0x2191 | ||
342 | MX28_PAD_SSP3_MISO__AUART4_RTS 0x21a1 | ||
343 | MX28_PAD_SSP3_SS0__AUART4_CTS 0x21b1 | ||
344 | MX28_PAD_AUART0_RX__I2C0_SCL 0x3001 | ||
345 | MX28_PAD_AUART0_TX__I2C0_SDA 0x3011 | ||
346 | MX28_PAD_AUART0_CTS__AUART4_RX 0x3021 | ||
347 | MX28_PAD_AUART0_RTS__AUART4_TX 0x3031 | ||
348 | MX28_PAD_AUART1_RX__SSP2_CARD_DETECT 0x3041 | ||
349 | MX28_PAD_AUART1_TX__SSP3_CARD_DETECT 0x3051 | ||
350 | MX28_PAD_AUART1_CTS__USB0_OVERCURRENT 0x3061 | ||
351 | MX28_PAD_AUART1_RTS__USB0_ID 0x3071 | ||
352 | MX28_PAD_AUART2_RX__SSP3_D1 0x3081 | ||
353 | MX28_PAD_AUART2_TX__SSP3_D2 0x3091 | ||
354 | MX28_PAD_AUART2_CTS__I2C1_SCL 0x30a1 | ||
355 | MX28_PAD_AUART2_RTS__I2C1_SDA 0x30b1 | ||
356 | MX28_PAD_AUART3_RX__CAN0_TX 0x30c1 | ||
357 | MX28_PAD_AUART3_TX__CAN0_RX 0x30d1 | ||
358 | MX28_PAD_AUART3_CTS__CAN1_TX 0x30e1 | ||
359 | MX28_PAD_AUART3_RTS__CAN1_RX 0x30f1 | ||
360 | MX28_PAD_PWM0__I2C1_SCL 0x3101 | ||
361 | MX28_PAD_PWM1__I2C1_SDA 0x3111 | ||
362 | MX28_PAD_PWM2__USB0_ID 0x3121 | ||
363 | MX28_PAD_SAIF0_MCLK__PWM_3 0x3141 | ||
364 | MX28_PAD_SAIF0_LRCLK__PWM_4 0x3151 | ||
365 | MX28_PAD_SAIF0_BITCLK__PWM_5 0x3161 | ||
366 | MX28_PAD_SAIF0_SDATA0__PWM_6 0x3171 | ||
367 | MX28_PAD_I2C0_SCL__TIMROT_ROTARYA 0x3181 | ||
368 | MX28_PAD_I2C0_SDA__TIMROT_ROTARYB 0x3191 | ||
369 | MX28_PAD_SAIF1_SDATA0__PWM_7 0x31a1 | ||
370 | MX28_PAD_LCD_RESET__LCD_VSYNC 0x31e1 | ||
371 | MX28_PAD_ENET0_MDC__GPMI_CE4N 0x4001 | ||
372 | MX28_PAD_ENET0_MDIO__GPMI_CE5N 0x4011 | ||
373 | MX28_PAD_ENET0_RX_EN__GPMI_CE6N 0x4021 | ||
374 | MX28_PAD_ENET0_RXD0__GPMI_CE7N 0x4031 | ||
375 | MX28_PAD_ENET0_RXD1__GPMI_READY4 0x4041 | ||
376 | MX28_PAD_ENET0_TX_CLK__HSADC_TRIGGER 0x4051 | ||
377 | MX28_PAD_ENET0_TX_EN__GPMI_READY5 0x4061 | ||
378 | MX28_PAD_ENET0_TXD0__GPMI_READY6 0x4071 | ||
379 | MX28_PAD_ENET0_TXD1__GPMI_READY7 0x4081 | ||
380 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 0x4091 | ||
381 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 0x40a1 | ||
382 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 0x40b1 | ||
383 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 0x40c1 | ||
384 | MX28_PAD_ENET0_RX_CLK__ENET0_RX_ER 0x40d1 | ||
385 | MX28_PAD_ENET0_COL__ENET1_TX_EN 0x40e1 | ||
386 | MX28_PAD_ENET0_CRS__ENET1_RX_EN 0x40f1 | ||
387 | MX28_PAD_GPMI_CE2N__ENET0_RX_ER 0x0122 | ||
388 | MX28_PAD_GPMI_CE3N__SAIF1_MCLK 0x0132 | ||
389 | MX28_PAD_GPMI_RDY0__USB0_ID 0x0142 | ||
390 | MX28_PAD_GPMI_RDY2__ENET0_TX_ER 0x0162 | ||
391 | MX28_PAD_GPMI_RDY3__HSADC_TRIGGER 0x0172 | ||
392 | MX28_PAD_GPMI_ALE__SSP3_D4 0x01a2 | ||
393 | MX28_PAD_GPMI_CLE__SSP3_D5 0x01b2 | ||
394 | MX28_PAD_LCD_D00__ETM_DA0 0x1002 | ||
395 | MX28_PAD_LCD_D01__ETM_DA1 0x1012 | ||
396 | MX28_PAD_LCD_D02__ETM_DA2 0x1022 | ||
397 | MX28_PAD_LCD_D03__ETM_DA3 0x1032 | ||
398 | MX28_PAD_LCD_D04__ETM_DA4 0x1042 | ||
399 | MX28_PAD_LCD_D05__ETM_DA5 0x1052 | ||
400 | MX28_PAD_LCD_D06__ETM_DA6 0x1062 | ||
401 | MX28_PAD_LCD_D07__ETM_DA7 0x1072 | ||
402 | MX28_PAD_LCD_D08__ETM_DA8 0x1082 | ||
403 | MX28_PAD_LCD_D09__ETM_DA9 0x1092 | ||
404 | MX28_PAD_LCD_D10__ETM_DA10 0x10a2 | ||
405 | MX28_PAD_LCD_D11__ETM_DA11 0x10b2 | ||
406 | MX28_PAD_LCD_D12__ETM_DA12 0x10c2 | ||
407 | MX28_PAD_LCD_D13__ETM_DA13 0x10d2 | ||
408 | MX28_PAD_LCD_D14__ETM_DA14 0x10e2 | ||
409 | MX28_PAD_LCD_D15__ETM_DA15 0x10f2 | ||
410 | MX28_PAD_LCD_D16__ETM_DA7 0x1102 | ||
411 | MX28_PAD_LCD_D17__ETM_DA6 0x1112 | ||
412 | MX28_PAD_LCD_D18__ETM_DA5 0x1122 | ||
413 | MX28_PAD_LCD_D19__ETM_DA4 0x1132 | ||
414 | MX28_PAD_LCD_D20__ETM_DA3 0x1142 | ||
415 | MX28_PAD_LCD_D21__ETM_DA2 0x1152 | ||
416 | MX28_PAD_LCD_D22__ETM_DA1 0x1162 | ||
417 | MX28_PAD_LCD_D23__ETM_DA0 0x1172 | ||
418 | MX28_PAD_LCD_RD_E__ETM_TCTL 0x1182 | ||
419 | MX28_PAD_LCD_WR_RWN__ETM_TCLK 0x1192 | ||
420 | MX28_PAD_LCD_HSYNC__ETM_TCTL 0x11d2 | ||
421 | MX28_PAD_LCD_DOTCLK__ETM_TCLK 0x11e2 | ||
422 | MX28_PAD_SSP1_SCK__ENET0_1588_EVENT2_OUT 0x20c2 | ||
423 | MX28_PAD_SSP1_CMD__ENET0_1588_EVENT2_IN 0x20d2 | ||
424 | MX28_PAD_SSP1_DATA0__ENET0_1588_EVENT3_OUT 0x20e2 | ||
425 | MX28_PAD_SSP1_DATA3__ENET0_1588_EVENT3_IN 0x20f2 | ||
426 | MX28_PAD_SSP2_SCK__SAIF0_SDATA1 0x2102 | ||
427 | MX28_PAD_SSP2_MOSI__SAIF0_SDATA2 0x2112 | ||
428 | MX28_PAD_SSP2_MISO__SAIF1_SDATA1 0x2122 | ||
429 | MX28_PAD_SSP2_SS0__SAIF1_SDATA2 0x2132 | ||
430 | MX28_PAD_SSP2_SS1__USB1_OVERCURRENT 0x2142 | ||
431 | MX28_PAD_SSP2_SS2__USB0_OVERCURRENT 0x2152 | ||
432 | MX28_PAD_SSP3_SCK__ENET1_1588_EVENT0_OUT 0x2182 | ||
433 | MX28_PAD_SSP3_MOSI__ENET1_1588_EVENT0_IN 0x2192 | ||
434 | MX28_PAD_SSP3_MISO__ENET1_1588_EVENT1_OUT 0x21a2 | ||
435 | MX28_PAD_SSP3_SS0__ENET1_1588_EVENT1_IN 0x21b2 | ||
436 | MX28_PAD_AUART0_RX__DUART_CTS 0x3002 | ||
437 | MX28_PAD_AUART0_TX__DUART_RTS 0x3012 | ||
438 | MX28_PAD_AUART0_CTS__DUART_RX 0x3022 | ||
439 | MX28_PAD_AUART0_RTS__DUART_TX 0x3032 | ||
440 | MX28_PAD_AUART1_RX__PWM_0 0x3042 | ||
441 | MX28_PAD_AUART1_TX__PWM_1 0x3052 | ||
442 | MX28_PAD_AUART1_CTS__TIMROT_ROTARYA 0x3062 | ||
443 | MX28_PAD_AUART1_RTS__TIMROT_ROTARYB 0x3072 | ||
444 | MX28_PAD_AUART2_RX__SSP3_D4 0x3082 | ||
445 | MX28_PAD_AUART2_TX__SSP3_D5 0x3092 | ||
446 | MX28_PAD_AUART2_CTS__SAIF1_BITCLK 0x30a2 | ||
447 | MX28_PAD_AUART2_RTS__SAIF1_LRCLK 0x30b2 | ||
448 | MX28_PAD_AUART3_RX__ENET0_1588_EVENT0_OUT 0x30c2 | ||
449 | MX28_PAD_AUART3_TX__ENET0_1588_EVENT0_IN 0x30d2 | ||
450 | MX28_PAD_AUART3_CTS__ENET0_1588_EVENT1_OUT 0x30e2 | ||
451 | MX28_PAD_AUART3_RTS__ENET0_1588_EVENT1_IN 0x30f2 | ||
452 | MX28_PAD_PWM0__DUART_RX 0x3102 | ||
453 | MX28_PAD_PWM1__DUART_TX 0x3112 | ||
454 | MX28_PAD_PWM2__USB1_OVERCURRENT 0x3122 | ||
455 | MX28_PAD_SAIF0_MCLK__AUART4_CTS 0x3142 | ||
456 | MX28_PAD_SAIF0_LRCLK__AUART4_RTS 0x3152 | ||
457 | MX28_PAD_SAIF0_BITCLK__AUART4_RX 0x3162 | ||
458 | MX28_PAD_SAIF0_SDATA0__AUART4_TX 0x3172 | ||
459 | MX28_PAD_I2C0_SCL__DUART_RX 0x3182 | ||
460 | MX28_PAD_I2C0_SDA__DUART_TX 0x3192 | ||
461 | MX28_PAD_SAIF1_SDATA0__SAIF0_SDATA1 0x31a2 | ||
462 | MX28_PAD_SPDIF__ENET1_RX_ER 0x31b2 | ||
463 | MX28_PAD_ENET0_MDC__SAIF0_SDATA1 0x4002 | ||
464 | MX28_PAD_ENET0_MDIO__SAIF0_SDATA2 0x4012 | ||
465 | MX28_PAD_ENET0_RX_EN__SAIF1_SDATA1 0x4022 | ||
466 | MX28_PAD_ENET0_RXD0__SAIF1_SDATA2 0x4032 | ||
467 | MX28_PAD_ENET0_TX_CLK__ENET0_1588_EVENT2_OUT 0x4052 | ||
468 | MX28_PAD_ENET0_RXD2__ENET0_1588_EVENT0_OUT 0x4092 | ||
469 | MX28_PAD_ENET0_RXD3__ENET0_1588_EVENT0_IN 0x40a2 | ||
470 | MX28_PAD_ENET0_TXD2__ENET0_1588_EVENT1_OUT 0x40b2 | ||
471 | MX28_PAD_ENET0_TXD3__ENET0_1588_EVENT1_IN 0x40c2 | ||
472 | MX28_PAD_ENET0_RX_CLK__ENET0_1588_EVENT2_IN 0x40d2 | ||
473 | MX28_PAD_ENET0_COL__ENET0_1588_EVENT3_OUT 0x40e2 | ||
474 | MX28_PAD_ENET0_CRS__ENET0_1588_EVENT3_IN 0x40f2 | ||
475 | MX28_PAD_GPMI_D00__GPIO_0_0 0x0003 | ||
476 | MX28_PAD_GPMI_D01__GPIO_0_1 0x0013 | ||
477 | MX28_PAD_GPMI_D02__GPIO_0_2 0x0023 | ||
478 | MX28_PAD_GPMI_D03__GPIO_0_3 0x0033 | ||
479 | MX28_PAD_GPMI_D04__GPIO_0_4 0x0043 | ||
480 | MX28_PAD_GPMI_D05__GPIO_0_5 0x0053 | ||
481 | MX28_PAD_GPMI_D06__GPIO_0_6 0x0063 | ||
482 | MX28_PAD_GPMI_D07__GPIO_0_7 0x0073 | ||
483 | MX28_PAD_GPMI_CE0N__GPIO_0_16 0x0103 | ||
484 | MX28_PAD_GPMI_CE1N__GPIO_0_17 0x0113 | ||
485 | MX28_PAD_GPMI_CE2N__GPIO_0_18 0x0123 | ||
486 | MX28_PAD_GPMI_CE3N__GPIO_0_19 0x0133 | ||
487 | MX28_PAD_GPMI_RDY0__GPIO_0_20 0x0143 | ||
488 | MX28_PAD_GPMI_RDY1__GPIO_0_21 0x0153 | ||
489 | MX28_PAD_GPMI_RDY2__GPIO_0_22 0x0163 | ||
490 | MX28_PAD_GPMI_RDY3__GPIO_0_23 0x0173 | ||
491 | MX28_PAD_GPMI_RDN__GPIO_0_24 0x0183 | ||
492 | MX28_PAD_GPMI_WRN__GPIO_0_25 0x0193 | ||
493 | MX28_PAD_GPMI_ALE__GPIO_0_26 0x01a3 | ||
494 | MX28_PAD_GPMI_CLE__GPIO_0_27 0x01b3 | ||
495 | MX28_PAD_GPMI_RESETN__GPIO_0_28 0x01c3 | ||
496 | MX28_PAD_LCD_D00__GPIO_1_0 0x1003 | ||
497 | MX28_PAD_LCD_D01__GPIO_1_1 0x1013 | ||
498 | MX28_PAD_LCD_D02__GPIO_1_2 0x1023 | ||
499 | MX28_PAD_LCD_D03__GPIO_1_3 0x1033 | ||
500 | MX28_PAD_LCD_D04__GPIO_1_4 0x1043 | ||
501 | MX28_PAD_LCD_D05__GPIO_1_5 0x1053 | ||
502 | MX28_PAD_LCD_D06__GPIO_1_6 0x1063 | ||
503 | MX28_PAD_LCD_D07__GPIO_1_7 0x1073 | ||
504 | MX28_PAD_LCD_D08__GPIO_1_8 0x1083 | ||
505 | MX28_PAD_LCD_D09__GPIO_1_9 0x1093 | ||
506 | MX28_PAD_LCD_D10__GPIO_1_10 0x10a3 | ||
507 | MX28_PAD_LCD_D11__GPIO_1_11 0x10b3 | ||
508 | MX28_PAD_LCD_D12__GPIO_1_12 0x10c3 | ||
509 | MX28_PAD_LCD_D13__GPIO_1_13 0x10d3 | ||
510 | MX28_PAD_LCD_D14__GPIO_1_14 0x10e3 | ||
511 | MX28_PAD_LCD_D15__GPIO_1_15 0x10f3 | ||
512 | MX28_PAD_LCD_D16__GPIO_1_16 0x1103 | ||
513 | MX28_PAD_LCD_D17__GPIO_1_17 0x1113 | ||
514 | MX28_PAD_LCD_D18__GPIO_1_18 0x1123 | ||
515 | MX28_PAD_LCD_D19__GPIO_1_19 0x1133 | ||
516 | MX28_PAD_LCD_D20__GPIO_1_20 0x1143 | ||
517 | MX28_PAD_LCD_D21__GPIO_1_21 0x1153 | ||
518 | MX28_PAD_LCD_D22__GPIO_1_22 0x1163 | ||
519 | MX28_PAD_LCD_D23__GPIO_1_23 0x1173 | ||
520 | MX28_PAD_LCD_RD_E__GPIO_1_24 0x1183 | ||
521 | MX28_PAD_LCD_WR_RWN__GPIO_1_25 0x1193 | ||
522 | MX28_PAD_LCD_RS__GPIO_1_26 0x11a3 | ||
523 | MX28_PAD_LCD_CS__GPIO_1_27 0x11b3 | ||
524 | MX28_PAD_LCD_VSYNC__GPIO_1_28 0x11c3 | ||
525 | MX28_PAD_LCD_HSYNC__GPIO_1_29 0x11d3 | ||
526 | MX28_PAD_LCD_DOTCLK__GPIO_1_30 0x11e3 | ||
527 | MX28_PAD_LCD_ENABLE__GPIO_1_31 0x11f3 | ||
528 | MX28_PAD_SSP0_DATA0__GPIO_2_0 0x2003 | ||
529 | MX28_PAD_SSP0_DATA1__GPIO_2_1 0x2013 | ||
530 | MX28_PAD_SSP0_DATA2__GPIO_2_2 0x2023 | ||
531 | MX28_PAD_SSP0_DATA3__GPIO_2_3 0x2033 | ||
532 | MX28_PAD_SSP0_DATA4__GPIO_2_4 0x2043 | ||
533 | MX28_PAD_SSP0_DATA5__GPIO_2_5 0x2053 | ||
534 | MX28_PAD_SSP0_DATA6__GPIO_2_6 0x2063 | ||
535 | MX28_PAD_SSP0_DATA7__GPIO_2_7 0x2073 | ||
536 | MX28_PAD_SSP0_CMD__GPIO_2_8 0x2083 | ||
537 | MX28_PAD_SSP0_DETECT__GPIO_2_9 0x2093 | ||
538 | MX28_PAD_SSP0_SCK__GPIO_2_10 0x20a3 | ||
539 | MX28_PAD_SSP1_SCK__GPIO_2_12 0x20c3 | ||
540 | MX28_PAD_SSP1_CMD__GPIO_2_13 0x20d3 | ||
541 | MX28_PAD_SSP1_DATA0__GPIO_2_14 0x20e3 | ||
542 | MX28_PAD_SSP1_DATA3__GPIO_2_15 0x20f3 | ||
543 | MX28_PAD_SSP2_SCK__GPIO_2_16 0x2103 | ||
544 | MX28_PAD_SSP2_MOSI__GPIO_2_17 0x2113 | ||
545 | MX28_PAD_SSP2_MISO__GPIO_2_18 0x2123 | ||
546 | MX28_PAD_SSP2_SS0__GPIO_2_19 0x2133 | ||
547 | MX28_PAD_SSP2_SS1__GPIO_2_20 0x2143 | ||
548 | MX28_PAD_SSP2_SS2__GPIO_2_21 0x2153 | ||
549 | MX28_PAD_SSP3_SCK__GPIO_2_24 0x2183 | ||
550 | MX28_PAD_SSP3_MOSI__GPIO_2_25 0x2193 | ||
551 | MX28_PAD_SSP3_MISO__GPIO_2_26 0x21a3 | ||
552 | MX28_PAD_SSP3_SS0__GPIO_2_27 0x21b3 | ||
553 | MX28_PAD_AUART0_RX__GPIO_3_0 0x3003 | ||
554 | MX28_PAD_AUART0_TX__GPIO_3_1 0x3013 | ||
555 | MX28_PAD_AUART0_CTS__GPIO_3_2 0x3023 | ||
556 | MX28_PAD_AUART0_RTS__GPIO_3_3 0x3033 | ||
557 | MX28_PAD_AUART1_RX__GPIO_3_4 0x3043 | ||
558 | MX28_PAD_AUART1_TX__GPIO_3_5 0x3053 | ||
559 | MX28_PAD_AUART1_CTS__GPIO_3_6 0x3063 | ||
560 | MX28_PAD_AUART1_RTS__GPIO_3_7 0x3073 | ||
561 | MX28_PAD_AUART2_RX__GPIO_3_8 0x3083 | ||
562 | MX28_PAD_AUART2_TX__GPIO_3_9 0x3093 | ||
563 | MX28_PAD_AUART2_CTS__GPIO_3_10 0x30a3 | ||
564 | MX28_PAD_AUART2_RTS__GPIO_3_11 0x30b3 | ||
565 | MX28_PAD_AUART3_RX__GPIO_3_12 0x30c3 | ||
566 | MX28_PAD_AUART3_TX__GPIO_3_13 0x30d3 | ||
567 | MX28_PAD_AUART3_CTS__GPIO_3_14 0x30e3 | ||
568 | MX28_PAD_AUART3_RTS__GPIO_3_15 0x30f3 | ||
569 | MX28_PAD_PWM0__GPIO_3_16 0x3103 | ||
570 | MX28_PAD_PWM1__GPIO_3_17 0x3113 | ||
571 | MX28_PAD_PWM2__GPIO_3_18 0x3123 | ||
572 | MX28_PAD_SAIF0_MCLK__GPIO_3_20 0x3143 | ||
573 | MX28_PAD_SAIF0_LRCLK__GPIO_3_21 0x3153 | ||
574 | MX28_PAD_SAIF0_BITCLK__GPIO_3_22 0x3163 | ||
575 | MX28_PAD_SAIF0_SDATA0__GPIO_3_23 0x3173 | ||
576 | MX28_PAD_I2C0_SCL__GPIO_3_24 0x3183 | ||
577 | MX28_PAD_I2C0_SDA__GPIO_3_25 0x3193 | ||
578 | MX28_PAD_SAIF1_SDATA0__GPIO_3_26 0x31a3 | ||
579 | MX28_PAD_SPDIF__GPIO_3_27 0x31b3 | ||
580 | MX28_PAD_PWM3__GPIO_3_28 0x31c3 | ||
581 | MX28_PAD_PWM4__GPIO_3_29 0x31d3 | ||
582 | MX28_PAD_LCD_RESET__GPIO_3_30 0x31e3 | ||
583 | MX28_PAD_ENET0_MDC__GPIO_4_0 0x4003 | ||
584 | MX28_PAD_ENET0_MDIO__GPIO_4_1 0x4013 | ||
585 | MX28_PAD_ENET0_RX_EN__GPIO_4_2 0x4023 | ||
586 | MX28_PAD_ENET0_RXD0__GPIO_4_3 0x4033 | ||
587 | MX28_PAD_ENET0_RXD1__GPIO_4_4 0x4043 | ||
588 | MX28_PAD_ENET0_TX_CLK__GPIO_4_5 0x4053 | ||
589 | MX28_PAD_ENET0_TX_EN__GPIO_4_6 0x4063 | ||
590 | MX28_PAD_ENET0_TXD0__GPIO_4_7 0x4073 | ||
591 | MX28_PAD_ENET0_TXD1__GPIO_4_8 0x4083 | ||
592 | MX28_PAD_ENET0_RXD2__GPIO_4_9 0x4093 | ||
593 | MX28_PAD_ENET0_RXD3__GPIO_4_10 0x40a3 | ||
594 | MX28_PAD_ENET0_TXD2__GPIO_4_11 0x40b3 | ||
595 | MX28_PAD_ENET0_TXD3__GPIO_4_12 0x40c3 | ||
596 | MX28_PAD_ENET0_RX_CLK__GPIO_4_13 0x40d3 | ||
597 | MX28_PAD_ENET0_COL__GPIO_4_14 0x40e3 | ||
598 | MX28_PAD_ENET0_CRS__GPIO_4_15 0x40f3 | ||
599 | MX28_PAD_ENET_CLK__GPIO_4_16 0x4103 | ||
600 | MX28_PAD_JTAG_RTCK__GPIO_4_20 0x4143 | ||
601 | |||
602 | Valid values for i.MX23 pinmux-id: | ||
603 | |||
604 | pinmux id | ||
605 | ------ -- | ||
606 | MX23_PAD_GPMI_D00__GPMI_D00 0x0000 | ||
607 | MX23_PAD_GPMI_D01__GPMI_D01 0x0010 | ||
608 | MX23_PAD_GPMI_D02__GPMI_D02 0x0020 | ||
609 | MX23_PAD_GPMI_D03__GPMI_D03 0x0030 | ||
610 | MX23_PAD_GPMI_D04__GPMI_D04 0x0040 | ||
611 | MX23_PAD_GPMI_D05__GPMI_D05 0x0050 | ||
612 | MX23_PAD_GPMI_D06__GPMI_D06 0x0060 | ||
613 | MX23_PAD_GPMI_D07__GPMI_D07 0x0070 | ||
614 | MX23_PAD_GPMI_D08__GPMI_D08 0x0080 | ||
615 | MX23_PAD_GPMI_D09__GPMI_D09 0x0090 | ||
616 | MX23_PAD_GPMI_D10__GPMI_D10 0x00a0 | ||
617 | MX23_PAD_GPMI_D11__GPMI_D11 0x00b0 | ||
618 | MX23_PAD_GPMI_D12__GPMI_D12 0x00c0 | ||
619 | MX23_PAD_GPMI_D13__GPMI_D13 0x00d0 | ||
620 | MX23_PAD_GPMI_D14__GPMI_D14 0x00e0 | ||
621 | MX23_PAD_GPMI_D15__GPMI_D15 0x00f0 | ||
622 | MX23_PAD_GPMI_CLE__GPMI_CLE 0x0100 | ||
623 | MX23_PAD_GPMI_ALE__GPMI_ALE 0x0110 | ||
624 | MX23_PAD_GPMI_CE2N__GPMI_CE2N 0x0120 | ||
625 | MX23_PAD_GPMI_RDY0__GPMI_RDY0 0x0130 | ||
626 | MX23_PAD_GPMI_RDY1__GPMI_RDY1 0x0140 | ||
627 | MX23_PAD_GPMI_RDY2__GPMI_RDY2 0x0150 | ||
628 | MX23_PAD_GPMI_RDY3__GPMI_RDY3 0x0160 | ||
629 | MX23_PAD_GPMI_WPN__GPMI_WPN 0x0170 | ||
630 | MX23_PAD_GPMI_WRN__GPMI_WRN 0x0180 | ||
631 | MX23_PAD_GPMI_RDN__GPMI_RDN 0x0190 | ||
632 | MX23_PAD_AUART1_CTS__AUART1_CTS 0x01a0 | ||
633 | MX23_PAD_AUART1_RTS__AUART1_RTS 0x01b0 | ||
634 | MX23_PAD_AUART1_RX__AUART1_RX 0x01c0 | ||
635 | MX23_PAD_AUART1_TX__AUART1_TX 0x01d0 | ||
636 | MX23_PAD_I2C_SCL__I2C_SCL 0x01e0 | ||
637 | MX23_PAD_I2C_SDA__I2C_SDA 0x01f0 | ||
638 | MX23_PAD_LCD_D00__LCD_D00 0x1000 | ||
639 | MX23_PAD_LCD_D01__LCD_D01 0x1010 | ||
640 | MX23_PAD_LCD_D02__LCD_D02 0x1020 | ||
641 | MX23_PAD_LCD_D03__LCD_D03 0x1030 | ||
642 | MX23_PAD_LCD_D04__LCD_D04 0x1040 | ||
643 | MX23_PAD_LCD_D05__LCD_D05 0x1050 | ||
644 | MX23_PAD_LCD_D06__LCD_D06 0x1060 | ||
645 | MX23_PAD_LCD_D07__LCD_D07 0x1070 | ||
646 | MX23_PAD_LCD_D08__LCD_D08 0x1080 | ||
647 | MX23_PAD_LCD_D09__LCD_D09 0x1090 | ||
648 | MX23_PAD_LCD_D10__LCD_D10 0x10a0 | ||
649 | MX23_PAD_LCD_D11__LCD_D11 0x10b0 | ||
650 | MX23_PAD_LCD_D12__LCD_D12 0x10c0 | ||
651 | MX23_PAD_LCD_D13__LCD_D13 0x10d0 | ||
652 | MX23_PAD_LCD_D14__LCD_D14 0x10e0 | ||
653 | MX23_PAD_LCD_D15__LCD_D15 0x10f0 | ||
654 | MX23_PAD_LCD_D16__LCD_D16 0x1100 | ||
655 | MX23_PAD_LCD_D17__LCD_D17 0x1110 | ||
656 | MX23_PAD_LCD_RESET__LCD_RESET 0x1120 | ||
657 | MX23_PAD_LCD_RS__LCD_RS 0x1130 | ||
658 | MX23_PAD_LCD_WR__LCD_WR 0x1140 | ||
659 | MX23_PAD_LCD_CS__LCD_CS 0x1150 | ||
660 | MX23_PAD_LCD_DOTCK__LCD_DOTCK 0x1160 | ||
661 | MX23_PAD_LCD_ENABLE__LCD_ENABLE 0x1170 | ||
662 | MX23_PAD_LCD_HSYNC__LCD_HSYNC 0x1180 | ||
663 | MX23_PAD_LCD_VSYNC__LCD_VSYNC 0x1190 | ||
664 | MX23_PAD_PWM0__PWM0 0x11a0 | ||
665 | MX23_PAD_PWM1__PWM1 0x11b0 | ||
666 | MX23_PAD_PWM2__PWM2 0x11c0 | ||
667 | MX23_PAD_PWM3__PWM3 0x11d0 | ||
668 | MX23_PAD_PWM4__PWM4 0x11e0 | ||
669 | MX23_PAD_SSP1_CMD__SSP1_CMD 0x2000 | ||
670 | MX23_PAD_SSP1_DETECT__SSP1_DETECT 0x2010 | ||
671 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 0x2020 | ||
672 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 0x2030 | ||
673 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 0x2040 | ||
674 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 0x2050 | ||
675 | MX23_PAD_SSP1_SCK__SSP1_SCK 0x2060 | ||
676 | MX23_PAD_ROTARYA__ROTARYA 0x2070 | ||
677 | MX23_PAD_ROTARYB__ROTARYB 0x2080 | ||
678 | MX23_PAD_EMI_A00__EMI_A00 0x2090 | ||
679 | MX23_PAD_EMI_A01__EMI_A01 0x20a0 | ||
680 | MX23_PAD_EMI_A02__EMI_A02 0x20b0 | ||
681 | MX23_PAD_EMI_A03__EMI_A03 0x20c0 | ||
682 | MX23_PAD_EMI_A04__EMI_A04 0x20d0 | ||
683 | MX23_PAD_EMI_A05__EMI_A05 0x20e0 | ||
684 | MX23_PAD_EMI_A06__EMI_A06 0x20f0 | ||
685 | MX23_PAD_EMI_A07__EMI_A07 0x2100 | ||
686 | MX23_PAD_EMI_A08__EMI_A08 0x2110 | ||
687 | MX23_PAD_EMI_A09__EMI_A09 0x2120 | ||
688 | MX23_PAD_EMI_A10__EMI_A10 0x2130 | ||
689 | MX23_PAD_EMI_A11__EMI_A11 0x2140 | ||
690 | MX23_PAD_EMI_A12__EMI_A12 0x2150 | ||
691 | MX23_PAD_EMI_BA0__EMI_BA0 0x2160 | ||
692 | MX23_PAD_EMI_BA1__EMI_BA1 0x2170 | ||
693 | MX23_PAD_EMI_CASN__EMI_CASN 0x2180 | ||
694 | MX23_PAD_EMI_CE0N__EMI_CE0N 0x2190 | ||
695 | MX23_PAD_EMI_CE1N__EMI_CE1N 0x21a0 | ||
696 | MX23_PAD_GPMI_CE1N__GPMI_CE1N 0x21b0 | ||
697 | MX23_PAD_GPMI_CE0N__GPMI_CE0N 0x21c0 | ||
698 | MX23_PAD_EMI_CKE__EMI_CKE 0x21d0 | ||
699 | MX23_PAD_EMI_RASN__EMI_RASN 0x21e0 | ||
700 | MX23_PAD_EMI_WEN__EMI_WEN 0x21f0 | ||
701 | MX23_PAD_EMI_D00__EMI_D00 0x3000 | ||
702 | MX23_PAD_EMI_D01__EMI_D01 0x3010 | ||
703 | MX23_PAD_EMI_D02__EMI_D02 0x3020 | ||
704 | MX23_PAD_EMI_D03__EMI_D03 0x3030 | ||
705 | MX23_PAD_EMI_D04__EMI_D04 0x3040 | ||
706 | MX23_PAD_EMI_D05__EMI_D05 0x3050 | ||
707 | MX23_PAD_EMI_D06__EMI_D06 0x3060 | ||
708 | MX23_PAD_EMI_D07__EMI_D07 0x3070 | ||
709 | MX23_PAD_EMI_D08__EMI_D08 0x3080 | ||
710 | MX23_PAD_EMI_D09__EMI_D09 0x3090 | ||
711 | MX23_PAD_EMI_D10__EMI_D10 0x30a0 | ||
712 | MX23_PAD_EMI_D11__EMI_D11 0x30b0 | ||
713 | MX23_PAD_EMI_D12__EMI_D12 0x30c0 | ||
714 | MX23_PAD_EMI_D13__EMI_D13 0x30d0 | ||
715 | MX23_PAD_EMI_D14__EMI_D14 0x30e0 | ||
716 | MX23_PAD_EMI_D15__EMI_D15 0x30f0 | ||
717 | MX23_PAD_EMI_DQM0__EMI_DQM0 0x3100 | ||
718 | MX23_PAD_EMI_DQM1__EMI_DQM1 0x3110 | ||
719 | MX23_PAD_EMI_DQS0__EMI_DQS0 0x3120 | ||
720 | MX23_PAD_EMI_DQS1__EMI_DQS1 0x3130 | ||
721 | MX23_PAD_EMI_CLK__EMI_CLK 0x3140 | ||
722 | MX23_PAD_EMI_CLKN__EMI_CLKN 0x3150 | ||
723 | MX23_PAD_GPMI_D00__LCD_D8 0x0001 | ||
724 | MX23_PAD_GPMI_D01__LCD_D9 0x0011 | ||
725 | MX23_PAD_GPMI_D02__LCD_D10 0x0021 | ||
726 | MX23_PAD_GPMI_D03__LCD_D11 0x0031 | ||
727 | MX23_PAD_GPMI_D04__LCD_D12 0x0041 | ||
728 | MX23_PAD_GPMI_D05__LCD_D13 0x0051 | ||
729 | MX23_PAD_GPMI_D06__LCD_D14 0x0061 | ||
730 | MX23_PAD_GPMI_D07__LCD_D15 0x0071 | ||
731 | MX23_PAD_GPMI_D08__LCD_D18 0x0081 | ||
732 | MX23_PAD_GPMI_D09__LCD_D19 0x0091 | ||
733 | MX23_PAD_GPMI_D10__LCD_D20 0x00a1 | ||
734 | MX23_PAD_GPMI_D11__LCD_D21 0x00b1 | ||
735 | MX23_PAD_GPMI_D12__LCD_D22 0x00c1 | ||
736 | MX23_PAD_GPMI_D13__LCD_D23 0x00d1 | ||
737 | MX23_PAD_GPMI_D14__AUART2_RX 0x00e1 | ||
738 | MX23_PAD_GPMI_D15__AUART2_TX 0x00f1 | ||
739 | MX23_PAD_GPMI_CLE__LCD_D16 0x0101 | ||
740 | MX23_PAD_GPMI_ALE__LCD_D17 0x0111 | ||
741 | MX23_PAD_GPMI_CE2N__ATA_A2 0x0121 | ||
742 | MX23_PAD_AUART1_RTS__IR_CLK 0x01b1 | ||
743 | MX23_PAD_AUART1_RX__IR_RX 0x01c1 | ||
744 | MX23_PAD_AUART1_TX__IR_TX 0x01d1 | ||
745 | MX23_PAD_I2C_SCL__GPMI_RDY2 0x01e1 | ||
746 | MX23_PAD_I2C_SDA__GPMI_CE2N 0x01f1 | ||
747 | MX23_PAD_LCD_D00__ETM_DA8 0x1001 | ||
748 | MX23_PAD_LCD_D01__ETM_DA9 0x1011 | ||
749 | MX23_PAD_LCD_D02__ETM_DA10 0x1021 | ||
750 | MX23_PAD_LCD_D03__ETM_DA11 0x1031 | ||
751 | MX23_PAD_LCD_D04__ETM_DA12 0x1041 | ||
752 | MX23_PAD_LCD_D05__ETM_DA13 0x1051 | ||
753 | MX23_PAD_LCD_D06__ETM_DA14 0x1061 | ||
754 | MX23_PAD_LCD_D07__ETM_DA15 0x1071 | ||
755 | MX23_PAD_LCD_D08__ETM_DA0 0x1081 | ||
756 | MX23_PAD_LCD_D09__ETM_DA1 0x1091 | ||
757 | MX23_PAD_LCD_D10__ETM_DA2 0x10a1 | ||
758 | MX23_PAD_LCD_D11__ETM_DA3 0x10b1 | ||
759 | MX23_PAD_LCD_D12__ETM_DA4 0x10c1 | ||
760 | MX23_PAD_LCD_D13__ETM_DA5 0x10d1 | ||
761 | MX23_PAD_LCD_D14__ETM_DA6 0x10e1 | ||
762 | MX23_PAD_LCD_D15__ETM_DA7 0x10f1 | ||
763 | MX23_PAD_LCD_RESET__ETM_TCTL 0x1121 | ||
764 | MX23_PAD_LCD_RS__ETM_TCLK 0x1131 | ||
765 | MX23_PAD_LCD_DOTCK__GPMI_RDY3 0x1161 | ||
766 | MX23_PAD_LCD_ENABLE__I2C_SCL 0x1171 | ||
767 | MX23_PAD_LCD_HSYNC__I2C_SDA 0x1181 | ||
768 | MX23_PAD_LCD_VSYNC__LCD_BUSY 0x1191 | ||
769 | MX23_PAD_PWM0__ROTARYA 0x11a1 | ||
770 | MX23_PAD_PWM1__ROTARYB 0x11b1 | ||
771 | MX23_PAD_PWM2__GPMI_RDY3 0x11c1 | ||
772 | MX23_PAD_PWM3__ETM_TCTL 0x11d1 | ||
773 | MX23_PAD_PWM4__ETM_TCLK 0x11e1 | ||
774 | MX23_PAD_SSP1_DETECT__GPMI_CE3N 0x2011 | ||
775 | MX23_PAD_SSP1_DATA1__I2C_SCL 0x2031 | ||
776 | MX23_PAD_SSP1_DATA2__I2C_SDA 0x2041 | ||
777 | MX23_PAD_ROTARYA__AUART2_RTS 0x2071 | ||
778 | MX23_PAD_ROTARYB__AUART2_CTS 0x2081 | ||
779 | MX23_PAD_GPMI_D00__SSP2_DATA0 0x0002 | ||
780 | MX23_PAD_GPMI_D01__SSP2_DATA1 0x0012 | ||
781 | MX23_PAD_GPMI_D02__SSP2_DATA2 0x0022 | ||
782 | MX23_PAD_GPMI_D03__SSP2_DATA3 0x0032 | ||
783 | MX23_PAD_GPMI_D04__SSP2_DATA4 0x0042 | ||
784 | MX23_PAD_GPMI_D05__SSP2_DATA5 0x0052 | ||
785 | MX23_PAD_GPMI_D06__SSP2_DATA6 0x0062 | ||
786 | MX23_PAD_GPMI_D07__SSP2_DATA7 0x0072 | ||
787 | MX23_PAD_GPMI_D08__SSP1_DATA4 0x0082 | ||
788 | MX23_PAD_GPMI_D09__SSP1_DATA5 0x0092 | ||
789 | MX23_PAD_GPMI_D10__SSP1_DATA6 0x00a2 | ||
790 | MX23_PAD_GPMI_D11__SSP1_DATA7 0x00b2 | ||
791 | MX23_PAD_GPMI_D15__GPMI_CE3N 0x00f2 | ||
792 | MX23_PAD_GPMI_RDY0__SSP2_DETECT 0x0132 | ||
793 | MX23_PAD_GPMI_RDY1__SSP2_CMD 0x0142 | ||
794 | MX23_PAD_GPMI_WRN__SSP2_SCK 0x0182 | ||
795 | MX23_PAD_AUART1_CTS__SSP1_DATA4 0x01a2 | ||
796 | MX23_PAD_AUART1_RTS__SSP1_DATA5 0x01b2 | ||
797 | MX23_PAD_AUART1_RX__SSP1_DATA6 0x01c2 | ||
798 | MX23_PAD_AUART1_TX__SSP1_DATA7 0x01d2 | ||
799 | MX23_PAD_I2C_SCL__AUART1_TX 0x01e2 | ||
800 | MX23_PAD_I2C_SDA__AUART1_RX 0x01f2 | ||
801 | MX23_PAD_LCD_D08__SAIF2_SDATA0 0x1082 | ||
802 | MX23_PAD_LCD_D09__SAIF1_SDATA0 0x1092 | ||
803 | MX23_PAD_LCD_D10__SAIF_MCLK_BITCLK 0x10a2 | ||
804 | MX23_PAD_LCD_D11__SAIF_LRCLK 0x10b2 | ||
805 | MX23_PAD_LCD_D12__SAIF2_SDATA1 0x10c2 | ||
806 | MX23_PAD_LCD_D13__SAIF2_SDATA2 0x10d2 | ||
807 | MX23_PAD_LCD_D14__SAIF1_SDATA2 0x10e2 | ||
808 | MX23_PAD_LCD_D15__SAIF1_SDATA1 0x10f2 | ||
809 | MX23_PAD_LCD_D16__SAIF_ALT_BITCLK 0x1102 | ||
810 | MX23_PAD_LCD_RESET__GPMI_CE3N 0x1122 | ||
811 | MX23_PAD_PWM0__DUART_RX 0x11a2 | ||
812 | MX23_PAD_PWM1__DUART_TX 0x11b2 | ||
813 | MX23_PAD_PWM3__AUART1_CTS 0x11d2 | ||
814 | MX23_PAD_PWM4__AUART1_RTS 0x11e2 | ||
815 | MX23_PAD_SSP1_CMD__JTAG_TDO 0x2002 | ||
816 | MX23_PAD_SSP1_DETECT__USB_OTG_ID 0x2012 | ||
817 | MX23_PAD_SSP1_DATA0__JTAG_TDI 0x2022 | ||
818 | MX23_PAD_SSP1_DATA1__JTAG_TCLK 0x2032 | ||
819 | MX23_PAD_SSP1_DATA2__JTAG_RTCK 0x2042 | ||
820 | MX23_PAD_SSP1_DATA3__JTAG_TMS 0x2052 | ||
821 | MX23_PAD_SSP1_SCK__JTAG_TRST 0x2062 | ||
822 | MX23_PAD_ROTARYA__SPDIF 0x2072 | ||
823 | MX23_PAD_ROTARYB__GPMI_CE3N 0x2082 | ||
824 | MX23_PAD_GPMI_D00__GPIO_0_0 0x0003 | ||
825 | MX23_PAD_GPMI_D01__GPIO_0_1 0x0013 | ||
826 | MX23_PAD_GPMI_D02__GPIO_0_2 0x0023 | ||
827 | MX23_PAD_GPMI_D03__GPIO_0_3 0x0033 | ||
828 | MX23_PAD_GPMI_D04__GPIO_0_4 0x0043 | ||
829 | MX23_PAD_GPMI_D05__GPIO_0_5 0x0053 | ||
830 | MX23_PAD_GPMI_D06__GPIO_0_6 0x0063 | ||
831 | MX23_PAD_GPMI_D07__GPIO_0_7 0x0073 | ||
832 | MX23_PAD_GPMI_D08__GPIO_0_8 0x0083 | ||
833 | MX23_PAD_GPMI_D09__GPIO_0_9 0x0093 | ||
834 | MX23_PAD_GPMI_D10__GPIO_0_10 0x00a3 | ||
835 | MX23_PAD_GPMI_D11__GPIO_0_11 0x00b3 | ||
836 | MX23_PAD_GPMI_D12__GPIO_0_12 0x00c3 | ||
837 | MX23_PAD_GPMI_D13__GPIO_0_13 0x00d3 | ||
838 | MX23_PAD_GPMI_D14__GPIO_0_14 0x00e3 | ||
839 | MX23_PAD_GPMI_D15__GPIO_0_15 0x00f3 | ||
840 | MX23_PAD_GPMI_CLE__GPIO_0_16 0x0103 | ||
841 | MX23_PAD_GPMI_ALE__GPIO_0_17 0x0113 | ||
842 | MX23_PAD_GPMI_CE2N__GPIO_0_18 0x0123 | ||
843 | MX23_PAD_GPMI_RDY0__GPIO_0_19 0x0133 | ||
844 | MX23_PAD_GPMI_RDY1__GPIO_0_20 0x0143 | ||
845 | MX23_PAD_GPMI_RDY2__GPIO_0_21 0x0153 | ||
846 | MX23_PAD_GPMI_RDY3__GPIO_0_22 0x0163 | ||
847 | MX23_PAD_GPMI_WPN__GPIO_0_23 0x0173 | ||
848 | MX23_PAD_GPMI_WRN__GPIO_0_24 0x0183 | ||
849 | MX23_PAD_GPMI_RDN__GPIO_0_25 0x0193 | ||
850 | MX23_PAD_AUART1_CTS__GPIO_0_26 0x01a3 | ||
851 | MX23_PAD_AUART1_RTS__GPIO_0_27 0x01b3 | ||
852 | MX23_PAD_AUART1_RX__GPIO_0_28 0x01c3 | ||
853 | MX23_PAD_AUART1_TX__GPIO_0_29 0x01d3 | ||
854 | MX23_PAD_I2C_SCL__GPIO_0_30 0x01e3 | ||
855 | MX23_PAD_I2C_SDA__GPIO_0_31 0x01f3 | ||
856 | MX23_PAD_LCD_D00__GPIO_1_0 0x1003 | ||
857 | MX23_PAD_LCD_D01__GPIO_1_1 0x1013 | ||
858 | MX23_PAD_LCD_D02__GPIO_1_2 0x1023 | ||
859 | MX23_PAD_LCD_D03__GPIO_1_3 0x1033 | ||
860 | MX23_PAD_LCD_D04__GPIO_1_4 0x1043 | ||
861 | MX23_PAD_LCD_D05__GPIO_1_5 0x1053 | ||
862 | MX23_PAD_LCD_D06__GPIO_1_6 0x1063 | ||
863 | MX23_PAD_LCD_D07__GPIO_1_7 0x1073 | ||
864 | MX23_PAD_LCD_D08__GPIO_1_8 0x1083 | ||
865 | MX23_PAD_LCD_D09__GPIO_1_9 0x1093 | ||
866 | MX23_PAD_LCD_D10__GPIO_1_10 0x10a3 | ||
867 | MX23_PAD_LCD_D11__GPIO_1_11 0x10b3 | ||
868 | MX23_PAD_LCD_D12__GPIO_1_12 0x10c3 | ||
869 | MX23_PAD_LCD_D13__GPIO_1_13 0x10d3 | ||
870 | MX23_PAD_LCD_D14__GPIO_1_14 0x10e3 | ||
871 | MX23_PAD_LCD_D15__GPIO_1_15 0x10f3 | ||
872 | MX23_PAD_LCD_D16__GPIO_1_16 0x1103 | ||
873 | MX23_PAD_LCD_D17__GPIO_1_17 0x1113 | ||
874 | MX23_PAD_LCD_RESET__GPIO_1_18 0x1123 | ||
875 | MX23_PAD_LCD_RS__GPIO_1_19 0x1133 | ||
876 | MX23_PAD_LCD_WR__GPIO_1_20 0x1143 | ||
877 | MX23_PAD_LCD_CS__GPIO_1_21 0x1153 | ||
878 | MX23_PAD_LCD_DOTCK__GPIO_1_22 0x1163 | ||
879 | MX23_PAD_LCD_ENABLE__GPIO_1_23 0x1173 | ||
880 | MX23_PAD_LCD_HSYNC__GPIO_1_24 0x1183 | ||
881 | MX23_PAD_LCD_VSYNC__GPIO_1_25 0x1193 | ||
882 | MX23_PAD_PWM0__GPIO_1_26 0x11a3 | ||
883 | MX23_PAD_PWM1__GPIO_1_27 0x11b3 | ||
884 | MX23_PAD_PWM2__GPIO_1_28 0x11c3 | ||
885 | MX23_PAD_PWM3__GPIO_1_29 0x11d3 | ||
886 | MX23_PAD_PWM4__GPIO_1_30 0x11e3 | ||
887 | MX23_PAD_SSP1_CMD__GPIO_2_0 0x2003 | ||
888 | MX23_PAD_SSP1_DETECT__GPIO_2_1 0x2013 | ||
889 | MX23_PAD_SSP1_DATA0__GPIO_2_2 0x2023 | ||
890 | MX23_PAD_SSP1_DATA1__GPIO_2_3 0x2033 | ||
891 | MX23_PAD_SSP1_DATA2__GPIO_2_4 0x2043 | ||
892 | MX23_PAD_SSP1_DATA3__GPIO_2_5 0x2053 | ||
893 | MX23_PAD_SSP1_SCK__GPIO_2_6 0x2063 | ||
894 | MX23_PAD_ROTARYA__GPIO_2_7 0x2073 | ||
895 | MX23_PAD_ROTARYB__GPIO_2_8 0x2083 | ||
896 | MX23_PAD_EMI_A00__GPIO_2_9 0x2093 | ||
897 | MX23_PAD_EMI_A01__GPIO_2_10 0x20a3 | ||
898 | MX23_PAD_EMI_A02__GPIO_2_11 0x20b3 | ||
899 | MX23_PAD_EMI_A03__GPIO_2_12 0x20c3 | ||
900 | MX23_PAD_EMI_A04__GPIO_2_13 0x20d3 | ||
901 | MX23_PAD_EMI_A05__GPIO_2_14 0x20e3 | ||
902 | MX23_PAD_EMI_A06__GPIO_2_15 0x20f3 | ||
903 | MX23_PAD_EMI_A07__GPIO_2_16 0x2103 | ||
904 | MX23_PAD_EMI_A08__GPIO_2_17 0x2113 | ||
905 | MX23_PAD_EMI_A09__GPIO_2_18 0x2123 | ||
906 | MX23_PAD_EMI_A10__GPIO_2_19 0x2133 | ||
907 | MX23_PAD_EMI_A11__GPIO_2_20 0x2143 | ||
908 | MX23_PAD_EMI_A12__GPIO_2_21 0x2153 | ||
909 | MX23_PAD_EMI_BA0__GPIO_2_22 0x2163 | ||
910 | MX23_PAD_EMI_BA1__GPIO_2_23 0x2173 | ||
911 | MX23_PAD_EMI_CASN__GPIO_2_24 0x2183 | ||
912 | MX23_PAD_EMI_CE0N__GPIO_2_25 0x2193 | ||
913 | MX23_PAD_EMI_CE1N__GPIO_2_26 0x21a3 | ||
914 | MX23_PAD_GPMI_CE1N__GPIO_2_27 0x21b3 | ||
915 | MX23_PAD_GPMI_CE0N__GPIO_2_28 0x21c3 | ||
916 | MX23_PAD_EMI_CKE__GPIO_2_29 0x21d3 | ||
917 | MX23_PAD_EMI_RASN__GPIO_2_30 0x21e3 | ||
918 | MX23_PAD_EMI_WEN__GPIO_2_31 0x21f3 | ||
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 40d78aa5bca2..73f2fd66d658 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
@@ -49,6 +49,21 @@ config PINCTRL_MMP2 | |||
49 | select PINCTRL_PXA3xx | 49 | select PINCTRL_PXA3xx |
50 | select PINCONF | 50 | select PINCONF |
51 | 51 | ||
52 | config PINCTRL_MXS | ||
53 | bool | ||
54 | |||
55 | config PINCTRL_IMX23 | ||
56 | bool | ||
57 | select PINMUX | ||
58 | select PINCONF | ||
59 | select PINCTRL_MXS | ||
60 | |||
61 | config PINCTRL_IMX28 | ||
62 | bool | ||
63 | select PINMUX | ||
64 | select PINCONF | ||
65 | select PINCTRL_MXS | ||
66 | |||
52 | config PINCTRL_PXA168 | 67 | config PINCTRL_PXA168 |
53 | bool "PXA168 pin controller driver" | 68 | bool "PXA168 pin controller driver" |
54 | depends on ARCH_MMP | 69 | depends on ARCH_MMP |
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 133261d821a3..5f5a0a6414a5 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile | |||
@@ -13,6 +13,9 @@ obj-$(CONFIG_PINCTRL_IMX) += pinctrl-imx.o | |||
13 | obj-$(CONFIG_PINCTRL_IMX6Q) += pinctrl-imx6q.o | 13 | obj-$(CONFIG_PINCTRL_IMX6Q) += pinctrl-imx6q.o |
14 | obj-$(CONFIG_PINCTRL_PXA3xx) += pinctrl-pxa3xx.o | 14 | obj-$(CONFIG_PINCTRL_PXA3xx) += pinctrl-pxa3xx.o |
15 | obj-$(CONFIG_PINCTRL_MMP2) += pinctrl-mmp2.o | 15 | obj-$(CONFIG_PINCTRL_MMP2) += pinctrl-mmp2.o |
16 | obj-$(CONFIG_PINCTRL_MXS) += pinctrl-mxs.o | ||
17 | obj-$(CONFIG_PINCTRL_IMX23) += pinctrl-imx23.o | ||
18 | obj-$(CONFIG_PINCTRL_IMX28) += pinctrl-imx28.o | ||
16 | obj-$(CONFIG_PINCTRL_PXA168) += pinctrl-pxa168.o | 19 | obj-$(CONFIG_PINCTRL_PXA168) += pinctrl-pxa168.o |
17 | obj-$(CONFIG_PINCTRL_PXA910) += pinctrl-pxa910.o | 20 | obj-$(CONFIG_PINCTRL_PXA910) += pinctrl-pxa910.o |
18 | obj-$(CONFIG_PINCTRL_SIRF) += pinctrl-sirf.o | 21 | obj-$(CONFIG_PINCTRL_SIRF) += pinctrl-sirf.o |
diff --git a/drivers/pinctrl/pinctrl-imx23.c b/drivers/pinctrl/pinctrl-imx23.c new file mode 100644 index 000000000000..75d3eff94296 --- /dev/null +++ b/drivers/pinctrl/pinctrl-imx23.c | |||
@@ -0,0 +1,305 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/of_device.h> | ||
15 | #include <linux/pinctrl/pinctrl.h> | ||
16 | #include "pinctrl-mxs.h" | ||
17 | |||
18 | enum imx23_pin_enum { | ||
19 | GPMI_D00 = PINID(0, 0), | ||
20 | GPMI_D01 = PINID(0, 1), | ||
21 | GPMI_D02 = PINID(0, 2), | ||
22 | GPMI_D03 = PINID(0, 3), | ||
23 | GPMI_D04 = PINID(0, 4), | ||
24 | GPMI_D05 = PINID(0, 5), | ||
25 | GPMI_D06 = PINID(0, 6), | ||
26 | GPMI_D07 = PINID(0, 7), | ||
27 | GPMI_D08 = PINID(0, 8), | ||
28 | GPMI_D09 = PINID(0, 9), | ||
29 | GPMI_D10 = PINID(0, 10), | ||
30 | GPMI_D11 = PINID(0, 11), | ||
31 | GPMI_D12 = PINID(0, 12), | ||
32 | GPMI_D13 = PINID(0, 13), | ||
33 | GPMI_D14 = PINID(0, 14), | ||
34 | GPMI_D15 = PINID(0, 15), | ||
35 | GPMI_CLE = PINID(0, 16), | ||
36 | GPMI_ALE = PINID(0, 17), | ||
37 | GPMI_CE2N = PINID(0, 18), | ||
38 | GPMI_RDY0 = PINID(0, 19), | ||
39 | GPMI_RDY1 = PINID(0, 20), | ||
40 | GPMI_RDY2 = PINID(0, 21), | ||
41 | GPMI_RDY3 = PINID(0, 22), | ||
42 | GPMI_WPN = PINID(0, 23), | ||
43 | GPMI_WRN = PINID(0, 24), | ||
44 | GPMI_RDN = PINID(0, 25), | ||
45 | AUART1_CTS = PINID(0, 26), | ||
46 | AUART1_RTS = PINID(0, 27), | ||
47 | AUART1_RX = PINID(0, 28), | ||
48 | AUART1_TX = PINID(0, 29), | ||
49 | I2C_SCL = PINID(0, 30), | ||
50 | I2C_SDA = PINID(0, 31), | ||
51 | LCD_D00 = PINID(1, 0), | ||
52 | LCD_D01 = PINID(1, 1), | ||
53 | LCD_D02 = PINID(1, 2), | ||
54 | LCD_D03 = PINID(1, 3), | ||
55 | LCD_D04 = PINID(1, 4), | ||
56 | LCD_D05 = PINID(1, 5), | ||
57 | LCD_D06 = PINID(1, 6), | ||
58 | LCD_D07 = PINID(1, 7), | ||
59 | LCD_D08 = PINID(1, 8), | ||
60 | LCD_D09 = PINID(1, 9), | ||
61 | LCD_D10 = PINID(1, 10), | ||
62 | LCD_D11 = PINID(1, 11), | ||
63 | LCD_D12 = PINID(1, 12), | ||
64 | LCD_D13 = PINID(1, 13), | ||
65 | LCD_D14 = PINID(1, 14), | ||
66 | LCD_D15 = PINID(1, 15), | ||
67 | LCD_D16 = PINID(1, 16), | ||
68 | LCD_D17 = PINID(1, 17), | ||
69 | LCD_RESET = PINID(1, 18), | ||
70 | LCD_RS = PINID(1, 19), | ||
71 | LCD_WR = PINID(1, 20), | ||
72 | LCD_CS = PINID(1, 21), | ||
73 | LCD_DOTCK = PINID(1, 22), | ||
74 | LCD_ENABLE = PINID(1, 23), | ||
75 | LCD_HSYNC = PINID(1, 24), | ||
76 | LCD_VSYNC = PINID(1, 25), | ||
77 | PWM0 = PINID(1, 26), | ||
78 | PWM1 = PINID(1, 27), | ||
79 | PWM2 = PINID(1, 28), | ||
80 | PWM3 = PINID(1, 29), | ||
81 | PWM4 = PINID(1, 30), | ||
82 | SSP1_CMD = PINID(2, 0), | ||
83 | SSP1_DETECT = PINID(2, 1), | ||
84 | SSP1_DATA0 = PINID(2, 2), | ||
85 | SSP1_DATA1 = PINID(2, 3), | ||
86 | SSP1_DATA2 = PINID(2, 4), | ||
87 | SSP1_DATA3 = PINID(2, 5), | ||
88 | SSP1_SCK = PINID(2, 6), | ||
89 | ROTARYA = PINID(2, 7), | ||
90 | ROTARYB = PINID(2, 8), | ||
91 | EMI_A00 = PINID(2, 9), | ||
92 | EMI_A01 = PINID(2, 10), | ||
93 | EMI_A02 = PINID(2, 11), | ||
94 | EMI_A03 = PINID(2, 12), | ||
95 | EMI_A04 = PINID(2, 13), | ||
96 | EMI_A05 = PINID(2, 14), | ||
97 | EMI_A06 = PINID(2, 15), | ||
98 | EMI_A07 = PINID(2, 16), | ||
99 | EMI_A08 = PINID(2, 17), | ||
100 | EMI_A09 = PINID(2, 18), | ||
101 | EMI_A10 = PINID(2, 19), | ||
102 | EMI_A11 = PINID(2, 20), | ||
103 | EMI_A12 = PINID(2, 21), | ||
104 | EMI_BA0 = PINID(2, 22), | ||
105 | EMI_BA1 = PINID(2, 23), | ||
106 | EMI_CASN = PINID(2, 24), | ||
107 | EMI_CE0N = PINID(2, 25), | ||
108 | EMI_CE1N = PINID(2, 26), | ||
109 | GPMI_CE1N = PINID(2, 27), | ||
110 | GPMI_CE0N = PINID(2, 28), | ||
111 | EMI_CKE = PINID(2, 29), | ||
112 | EMI_RASN = PINID(2, 30), | ||
113 | EMI_WEN = PINID(2, 31), | ||
114 | EMI_D00 = PINID(3, 0), | ||
115 | EMI_D01 = PINID(3, 1), | ||
116 | EMI_D02 = PINID(3, 2), | ||
117 | EMI_D03 = PINID(3, 3), | ||
118 | EMI_D04 = PINID(3, 4), | ||
119 | EMI_D05 = PINID(3, 5), | ||
120 | EMI_D06 = PINID(3, 6), | ||
121 | EMI_D07 = PINID(3, 7), | ||
122 | EMI_D08 = PINID(3, 8), | ||
123 | EMI_D09 = PINID(3, 9), | ||
124 | EMI_D10 = PINID(3, 10), | ||
125 | EMI_D11 = PINID(3, 11), | ||
126 | EMI_D12 = PINID(3, 12), | ||
127 | EMI_D13 = PINID(3, 13), | ||
128 | EMI_D14 = PINID(3, 14), | ||
129 | EMI_D15 = PINID(3, 15), | ||
130 | EMI_DQM0 = PINID(3, 16), | ||
131 | EMI_DQM1 = PINID(3, 17), | ||
132 | EMI_DQS0 = PINID(3, 18), | ||
133 | EMI_DQS1 = PINID(3, 19), | ||
134 | EMI_CLK = PINID(3, 20), | ||
135 | EMI_CLKN = PINID(3, 21), | ||
136 | }; | ||
137 | |||
138 | static const struct pinctrl_pin_desc imx23_pins[] = { | ||
139 | MXS_PINCTRL_PIN(GPMI_D00), | ||
140 | MXS_PINCTRL_PIN(GPMI_D01), | ||
141 | MXS_PINCTRL_PIN(GPMI_D02), | ||
142 | MXS_PINCTRL_PIN(GPMI_D03), | ||
143 | MXS_PINCTRL_PIN(GPMI_D04), | ||
144 | MXS_PINCTRL_PIN(GPMI_D05), | ||
145 | MXS_PINCTRL_PIN(GPMI_D06), | ||
146 | MXS_PINCTRL_PIN(GPMI_D07), | ||
147 | MXS_PINCTRL_PIN(GPMI_D08), | ||
148 | MXS_PINCTRL_PIN(GPMI_D09), | ||
149 | MXS_PINCTRL_PIN(GPMI_D10), | ||
150 | MXS_PINCTRL_PIN(GPMI_D11), | ||
151 | MXS_PINCTRL_PIN(GPMI_D12), | ||
152 | MXS_PINCTRL_PIN(GPMI_D13), | ||
153 | MXS_PINCTRL_PIN(GPMI_D14), | ||
154 | MXS_PINCTRL_PIN(GPMI_D15), | ||
155 | MXS_PINCTRL_PIN(GPMI_CLE), | ||
156 | MXS_PINCTRL_PIN(GPMI_ALE), | ||
157 | MXS_PINCTRL_PIN(GPMI_CE2N), | ||
158 | MXS_PINCTRL_PIN(GPMI_RDY0), | ||
159 | MXS_PINCTRL_PIN(GPMI_RDY1), | ||
160 | MXS_PINCTRL_PIN(GPMI_RDY2), | ||
161 | MXS_PINCTRL_PIN(GPMI_RDY3), | ||
162 | MXS_PINCTRL_PIN(GPMI_WPN), | ||
163 | MXS_PINCTRL_PIN(GPMI_WRN), | ||
164 | MXS_PINCTRL_PIN(GPMI_RDN), | ||
165 | MXS_PINCTRL_PIN(AUART1_CTS), | ||
166 | MXS_PINCTRL_PIN(AUART1_RTS), | ||
167 | MXS_PINCTRL_PIN(AUART1_RX), | ||
168 | MXS_PINCTRL_PIN(AUART1_TX), | ||
169 | MXS_PINCTRL_PIN(I2C_SCL), | ||
170 | MXS_PINCTRL_PIN(I2C_SDA), | ||
171 | MXS_PINCTRL_PIN(LCD_D00), | ||
172 | MXS_PINCTRL_PIN(LCD_D01), | ||
173 | MXS_PINCTRL_PIN(LCD_D02), | ||
174 | MXS_PINCTRL_PIN(LCD_D03), | ||
175 | MXS_PINCTRL_PIN(LCD_D04), | ||
176 | MXS_PINCTRL_PIN(LCD_D05), | ||
177 | MXS_PINCTRL_PIN(LCD_D06), | ||
178 | MXS_PINCTRL_PIN(LCD_D07), | ||
179 | MXS_PINCTRL_PIN(LCD_D08), | ||
180 | MXS_PINCTRL_PIN(LCD_D09), | ||
181 | MXS_PINCTRL_PIN(LCD_D10), | ||
182 | MXS_PINCTRL_PIN(LCD_D11), | ||
183 | MXS_PINCTRL_PIN(LCD_D12), | ||
184 | MXS_PINCTRL_PIN(LCD_D13), | ||
185 | MXS_PINCTRL_PIN(LCD_D14), | ||
186 | MXS_PINCTRL_PIN(LCD_D15), | ||
187 | MXS_PINCTRL_PIN(LCD_D16), | ||
188 | MXS_PINCTRL_PIN(LCD_D17), | ||
189 | MXS_PINCTRL_PIN(LCD_RESET), | ||
190 | MXS_PINCTRL_PIN(LCD_RS), | ||
191 | MXS_PINCTRL_PIN(LCD_WR), | ||
192 | MXS_PINCTRL_PIN(LCD_CS), | ||
193 | MXS_PINCTRL_PIN(LCD_DOTCK), | ||
194 | MXS_PINCTRL_PIN(LCD_ENABLE), | ||
195 | MXS_PINCTRL_PIN(LCD_HSYNC), | ||
196 | MXS_PINCTRL_PIN(LCD_VSYNC), | ||
197 | MXS_PINCTRL_PIN(PWM0), | ||
198 | MXS_PINCTRL_PIN(PWM1), | ||
199 | MXS_PINCTRL_PIN(PWM2), | ||
200 | MXS_PINCTRL_PIN(PWM3), | ||
201 | MXS_PINCTRL_PIN(PWM4), | ||
202 | MXS_PINCTRL_PIN(SSP1_CMD), | ||
203 | MXS_PINCTRL_PIN(SSP1_DETECT), | ||
204 | MXS_PINCTRL_PIN(SSP1_DATA0), | ||
205 | MXS_PINCTRL_PIN(SSP1_DATA1), | ||
206 | MXS_PINCTRL_PIN(SSP1_DATA2), | ||
207 | MXS_PINCTRL_PIN(SSP1_DATA3), | ||
208 | MXS_PINCTRL_PIN(SSP1_SCK), | ||
209 | MXS_PINCTRL_PIN(ROTARYA), | ||
210 | MXS_PINCTRL_PIN(ROTARYB), | ||
211 | MXS_PINCTRL_PIN(EMI_A00), | ||
212 | MXS_PINCTRL_PIN(EMI_A01), | ||
213 | MXS_PINCTRL_PIN(EMI_A02), | ||
214 | MXS_PINCTRL_PIN(EMI_A03), | ||
215 | MXS_PINCTRL_PIN(EMI_A04), | ||
216 | MXS_PINCTRL_PIN(EMI_A05), | ||
217 | MXS_PINCTRL_PIN(EMI_A06), | ||
218 | MXS_PINCTRL_PIN(EMI_A07), | ||
219 | MXS_PINCTRL_PIN(EMI_A08), | ||
220 | MXS_PINCTRL_PIN(EMI_A09), | ||
221 | MXS_PINCTRL_PIN(EMI_A10), | ||
222 | MXS_PINCTRL_PIN(EMI_A11), | ||
223 | MXS_PINCTRL_PIN(EMI_A12), | ||
224 | MXS_PINCTRL_PIN(EMI_BA0), | ||
225 | MXS_PINCTRL_PIN(EMI_BA1), | ||
226 | MXS_PINCTRL_PIN(EMI_CASN), | ||
227 | MXS_PINCTRL_PIN(EMI_CE0N), | ||
228 | MXS_PINCTRL_PIN(EMI_CE1N), | ||
229 | MXS_PINCTRL_PIN(GPMI_CE1N), | ||
230 | MXS_PINCTRL_PIN(GPMI_CE0N), | ||
231 | MXS_PINCTRL_PIN(EMI_CKE), | ||
232 | MXS_PINCTRL_PIN(EMI_RASN), | ||
233 | MXS_PINCTRL_PIN(EMI_WEN), | ||
234 | MXS_PINCTRL_PIN(EMI_D00), | ||
235 | MXS_PINCTRL_PIN(EMI_D01), | ||
236 | MXS_PINCTRL_PIN(EMI_D02), | ||
237 | MXS_PINCTRL_PIN(EMI_D03), | ||
238 | MXS_PINCTRL_PIN(EMI_D04), | ||
239 | MXS_PINCTRL_PIN(EMI_D05), | ||
240 | MXS_PINCTRL_PIN(EMI_D06), | ||
241 | MXS_PINCTRL_PIN(EMI_D07), | ||
242 | MXS_PINCTRL_PIN(EMI_D08), | ||
243 | MXS_PINCTRL_PIN(EMI_D09), | ||
244 | MXS_PINCTRL_PIN(EMI_D10), | ||
245 | MXS_PINCTRL_PIN(EMI_D11), | ||
246 | MXS_PINCTRL_PIN(EMI_D12), | ||
247 | MXS_PINCTRL_PIN(EMI_D13), | ||
248 | MXS_PINCTRL_PIN(EMI_D14), | ||
249 | MXS_PINCTRL_PIN(EMI_D15), | ||
250 | MXS_PINCTRL_PIN(EMI_DQM0), | ||
251 | MXS_PINCTRL_PIN(EMI_DQM1), | ||
252 | MXS_PINCTRL_PIN(EMI_DQS0), | ||
253 | MXS_PINCTRL_PIN(EMI_DQS1), | ||
254 | MXS_PINCTRL_PIN(EMI_CLK), | ||
255 | MXS_PINCTRL_PIN(EMI_CLKN), | ||
256 | }; | ||
257 | |||
258 | static struct mxs_regs imx23_regs = { | ||
259 | .muxsel = 0x100, | ||
260 | .drive = 0x200, | ||
261 | .pull = 0x400, | ||
262 | }; | ||
263 | |||
264 | static struct mxs_pinctrl_soc_data imx23_pinctrl_data = { | ||
265 | .regs = &imx23_regs, | ||
266 | .pins = imx23_pins, | ||
267 | .npins = ARRAY_SIZE(imx23_pins), | ||
268 | }; | ||
269 | |||
270 | static int __devinit imx23_pinctrl_probe(struct platform_device *pdev) | ||
271 | { | ||
272 | return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data); | ||
273 | } | ||
274 | |||
275 | static struct of_device_id imx23_pinctrl_of_match[] __devinitdata = { | ||
276 | { .compatible = "fsl,imx23-pinctrl", }, | ||
277 | { /* sentinel */ } | ||
278 | }; | ||
279 | MODULE_DEVICE_TABLE(of, imx23_pinctrl_of_match); | ||
280 | |||
281 | static struct platform_driver imx23_pinctrl_driver = { | ||
282 | .driver = { | ||
283 | .name = "imx23-pinctrl", | ||
284 | .owner = THIS_MODULE, | ||
285 | .of_match_table = imx23_pinctrl_of_match, | ||
286 | }, | ||
287 | .probe = imx23_pinctrl_probe, | ||
288 | .remove = __devexit_p(mxs_pinctrl_remove), | ||
289 | }; | ||
290 | |||
291 | static int __init imx23_pinctrl_init(void) | ||
292 | { | ||
293 | return platform_driver_register(&imx23_pinctrl_driver); | ||
294 | } | ||
295 | arch_initcall(imx23_pinctrl_init); | ||
296 | |||
297 | static void __exit imx23_pinctrl_exit(void) | ||
298 | { | ||
299 | platform_driver_unregister(&imx23_pinctrl_driver); | ||
300 | } | ||
301 | module_exit(imx23_pinctrl_exit); | ||
302 | |||
303 | MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>"); | ||
304 | MODULE_DESCRIPTION("Freescale i.MX23 pinctrl driver"); | ||
305 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-imx28.c b/drivers/pinctrl/pinctrl-imx28.c new file mode 100644 index 000000000000..b973026811a2 --- /dev/null +++ b/drivers/pinctrl/pinctrl-imx28.c | |||
@@ -0,0 +1,421 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/of_device.h> | ||
15 | #include <linux/pinctrl/pinctrl.h> | ||
16 | #include "pinctrl-mxs.h" | ||
17 | |||
18 | enum imx28_pin_enum { | ||
19 | GPMI_D00 = PINID(0, 0), | ||
20 | GPMI_D01 = PINID(0, 1), | ||
21 | GPMI_D02 = PINID(0, 2), | ||
22 | GPMI_D03 = PINID(0, 3), | ||
23 | GPMI_D04 = PINID(0, 4), | ||
24 | GPMI_D05 = PINID(0, 5), | ||
25 | GPMI_D06 = PINID(0, 6), | ||
26 | GPMI_D07 = PINID(0, 7), | ||
27 | GPMI_CE0N = PINID(0, 16), | ||
28 | GPMI_CE1N = PINID(0, 17), | ||
29 | GPMI_CE2N = PINID(0, 18), | ||
30 | GPMI_CE3N = PINID(0, 19), | ||
31 | GPMI_RDY0 = PINID(0, 20), | ||
32 | GPMI_RDY1 = PINID(0, 21), | ||
33 | GPMI_RDY2 = PINID(0, 22), | ||
34 | GPMI_RDY3 = PINID(0, 23), | ||
35 | GPMI_RDN = PINID(0, 24), | ||
36 | GPMI_WRN = PINID(0, 25), | ||
37 | GPMI_ALE = PINID(0, 26), | ||
38 | GPMI_CLE = PINID(0, 27), | ||
39 | GPMI_RESETN = PINID(0, 28), | ||
40 | LCD_D00 = PINID(1, 0), | ||
41 | LCD_D01 = PINID(1, 1), | ||
42 | LCD_D02 = PINID(1, 2), | ||
43 | LCD_D03 = PINID(1, 3), | ||
44 | LCD_D04 = PINID(1, 4), | ||
45 | LCD_D05 = PINID(1, 5), | ||
46 | LCD_D06 = PINID(1, 6), | ||
47 | LCD_D07 = PINID(1, 7), | ||
48 | LCD_D08 = PINID(1, 8), | ||
49 | LCD_D09 = PINID(1, 9), | ||
50 | LCD_D10 = PINID(1, 10), | ||
51 | LCD_D11 = PINID(1, 11), | ||
52 | LCD_D12 = PINID(1, 12), | ||
53 | LCD_D13 = PINID(1, 13), | ||
54 | LCD_D14 = PINID(1, 14), | ||
55 | LCD_D15 = PINID(1, 15), | ||
56 | LCD_D16 = PINID(1, 16), | ||
57 | LCD_D17 = PINID(1, 17), | ||
58 | LCD_D18 = PINID(1, 18), | ||
59 | LCD_D19 = PINID(1, 19), | ||
60 | LCD_D20 = PINID(1, 20), | ||
61 | LCD_D21 = PINID(1, 21), | ||
62 | LCD_D22 = PINID(1, 22), | ||
63 | LCD_D23 = PINID(1, 23), | ||
64 | LCD_RD_E = PINID(1, 24), | ||
65 | LCD_WR_RWN = PINID(1, 25), | ||
66 | LCD_RS = PINID(1, 26), | ||
67 | LCD_CS = PINID(1, 27), | ||
68 | LCD_VSYNC = PINID(1, 28), | ||
69 | LCD_HSYNC = PINID(1, 29), | ||
70 | LCD_DOTCLK = PINID(1, 30), | ||
71 | LCD_ENABLE = PINID(1, 31), | ||
72 | SSP0_DATA0 = PINID(2, 0), | ||
73 | SSP0_DATA1 = PINID(2, 1), | ||
74 | SSP0_DATA2 = PINID(2, 2), | ||
75 | SSP0_DATA3 = PINID(2, 3), | ||
76 | SSP0_DATA4 = PINID(2, 4), | ||
77 | SSP0_DATA5 = PINID(2, 5), | ||
78 | SSP0_DATA6 = PINID(2, 6), | ||
79 | SSP0_DATA7 = PINID(2, 7), | ||
80 | SSP0_CMD = PINID(2, 8), | ||
81 | SSP0_DETECT = PINID(2, 9), | ||
82 | SSP0_SCK = PINID(2, 10), | ||
83 | SSP1_SCK = PINID(2, 12), | ||
84 | SSP1_CMD = PINID(2, 13), | ||
85 | SSP1_DATA0 = PINID(2, 14), | ||
86 | SSP1_DATA3 = PINID(2, 15), | ||
87 | SSP2_SCK = PINID(2, 16), | ||
88 | SSP2_MOSI = PINID(2, 17), | ||
89 | SSP2_MISO = PINID(2, 18), | ||
90 | SSP2_SS0 = PINID(2, 19), | ||
91 | SSP2_SS1 = PINID(2, 20), | ||
92 | SSP2_SS2 = PINID(2, 21), | ||
93 | SSP3_SCK = PINID(2, 24), | ||
94 | SSP3_MOSI = PINID(2, 25), | ||
95 | SSP3_MISO = PINID(2, 26), | ||
96 | SSP3_SS0 = PINID(2, 27), | ||
97 | AUART0_RX = PINID(3, 0), | ||
98 | AUART0_TX = PINID(3, 1), | ||
99 | AUART0_CTS = PINID(3, 2), | ||
100 | AUART0_RTS = PINID(3, 3), | ||
101 | AUART1_RX = PINID(3, 4), | ||
102 | AUART1_TX = PINID(3, 5), | ||
103 | AUART1_CTS = PINID(3, 6), | ||
104 | AUART1_RTS = PINID(3, 7), | ||
105 | AUART2_RX = PINID(3, 8), | ||
106 | AUART2_TX = PINID(3, 9), | ||
107 | AUART2_CTS = PINID(3, 10), | ||
108 | AUART2_RTS = PINID(3, 11), | ||
109 | AUART3_RX = PINID(3, 12), | ||
110 | AUART3_TX = PINID(3, 13), | ||
111 | AUART3_CTS = PINID(3, 14), | ||
112 | AUART3_RTS = PINID(3, 15), | ||
113 | PWM0 = PINID(3, 16), | ||
114 | PWM1 = PINID(3, 17), | ||
115 | PWM2 = PINID(3, 18), | ||
116 | SAIF0_MCLK = PINID(3, 20), | ||
117 | SAIF0_LRCLK = PINID(3, 21), | ||
118 | SAIF0_BITCLK = PINID(3, 22), | ||
119 | SAIF0_SDATA0 = PINID(3, 23), | ||
120 | I2C0_SCL = PINID(3, 24), | ||
121 | I2C0_SDA = PINID(3, 25), | ||
122 | SAIF1_SDATA0 = PINID(3, 26), | ||
123 | SPDIF = PINID(3, 27), | ||
124 | PWM3 = PINID(3, 28), | ||
125 | PWM4 = PINID(3, 29), | ||
126 | LCD_RESET = PINID(3, 30), | ||
127 | ENET0_MDC = PINID(4, 0), | ||
128 | ENET0_MDIO = PINID(4, 1), | ||
129 | ENET0_RX_EN = PINID(4, 2), | ||
130 | ENET0_RXD0 = PINID(4, 3), | ||
131 | ENET0_RXD1 = PINID(4, 4), | ||
132 | ENET0_TX_CLK = PINID(4, 5), | ||
133 | ENET0_TX_EN = PINID(4, 6), | ||
134 | ENET0_TXD0 = PINID(4, 7), | ||
135 | ENET0_TXD1 = PINID(4, 8), | ||
136 | ENET0_RXD2 = PINID(4, 9), | ||
137 | ENET0_RXD3 = PINID(4, 10), | ||
138 | ENET0_TXD2 = PINID(4, 11), | ||
139 | ENET0_TXD3 = PINID(4, 12), | ||
140 | ENET0_RX_CLK = PINID(4, 13), | ||
141 | ENET0_COL = PINID(4, 14), | ||
142 | ENET0_CRS = PINID(4, 15), | ||
143 | ENET_CLK = PINID(4, 16), | ||
144 | JTAG_RTCK = PINID(4, 20), | ||
145 | EMI_D00 = PINID(5, 0), | ||
146 | EMI_D01 = PINID(5, 1), | ||
147 | EMI_D02 = PINID(5, 2), | ||
148 | EMI_D03 = PINID(5, 3), | ||
149 | EMI_D04 = PINID(5, 4), | ||
150 | EMI_D05 = PINID(5, 5), | ||
151 | EMI_D06 = PINID(5, 6), | ||
152 | EMI_D07 = PINID(5, 7), | ||
153 | EMI_D08 = PINID(5, 8), | ||
154 | EMI_D09 = PINID(5, 9), | ||
155 | EMI_D10 = PINID(5, 10), | ||
156 | EMI_D11 = PINID(5, 11), | ||
157 | EMI_D12 = PINID(5, 12), | ||
158 | EMI_D13 = PINID(5, 13), | ||
159 | EMI_D14 = PINID(5, 14), | ||
160 | EMI_D15 = PINID(5, 15), | ||
161 | EMI_ODT0 = PINID(5, 16), | ||
162 | EMI_DQM0 = PINID(5, 17), | ||
163 | EMI_ODT1 = PINID(5, 18), | ||
164 | EMI_DQM1 = PINID(5, 19), | ||
165 | EMI_DDR_OPEN_FB = PINID(5, 20), | ||
166 | EMI_CLK = PINID(5, 21), | ||
167 | EMI_DQS0 = PINID(5, 22), | ||
168 | EMI_DQS1 = PINID(5, 23), | ||
169 | EMI_DDR_OPEN = PINID(5, 26), | ||
170 | EMI_A00 = PINID(6, 0), | ||
171 | EMI_A01 = PINID(6, 1), | ||
172 | EMI_A02 = PINID(6, 2), | ||
173 | EMI_A03 = PINID(6, 3), | ||
174 | EMI_A04 = PINID(6, 4), | ||
175 | EMI_A05 = PINID(6, 5), | ||
176 | EMI_A06 = PINID(6, 6), | ||
177 | EMI_A07 = PINID(6, 7), | ||
178 | EMI_A08 = PINID(6, 8), | ||
179 | EMI_A09 = PINID(6, 9), | ||
180 | EMI_A10 = PINID(6, 10), | ||
181 | EMI_A11 = PINID(6, 11), | ||
182 | EMI_A12 = PINID(6, 12), | ||
183 | EMI_A13 = PINID(6, 13), | ||
184 | EMI_A14 = PINID(6, 14), | ||
185 | EMI_BA0 = PINID(6, 16), | ||
186 | EMI_BA1 = PINID(6, 17), | ||
187 | EMI_BA2 = PINID(6, 18), | ||
188 | EMI_CASN = PINID(6, 19), | ||
189 | EMI_RASN = PINID(6, 20), | ||
190 | EMI_WEN = PINID(6, 21), | ||
191 | EMI_CE0N = PINID(6, 22), | ||
192 | EMI_CE1N = PINID(6, 23), | ||
193 | EMI_CKE = PINID(6, 24), | ||
194 | }; | ||
195 | |||
196 | static const struct pinctrl_pin_desc imx28_pins[] = { | ||
197 | MXS_PINCTRL_PIN(GPMI_D00), | ||
198 | MXS_PINCTRL_PIN(GPMI_D01), | ||
199 | MXS_PINCTRL_PIN(GPMI_D02), | ||
200 | MXS_PINCTRL_PIN(GPMI_D03), | ||
201 | MXS_PINCTRL_PIN(GPMI_D04), | ||
202 | MXS_PINCTRL_PIN(GPMI_D05), | ||
203 | MXS_PINCTRL_PIN(GPMI_D06), | ||
204 | MXS_PINCTRL_PIN(GPMI_D07), | ||
205 | MXS_PINCTRL_PIN(GPMI_CE0N), | ||
206 | MXS_PINCTRL_PIN(GPMI_CE1N), | ||
207 | MXS_PINCTRL_PIN(GPMI_CE2N), | ||
208 | MXS_PINCTRL_PIN(GPMI_CE3N), | ||
209 | MXS_PINCTRL_PIN(GPMI_RDY0), | ||
210 | MXS_PINCTRL_PIN(GPMI_RDY1), | ||
211 | MXS_PINCTRL_PIN(GPMI_RDY2), | ||
212 | MXS_PINCTRL_PIN(GPMI_RDY3), | ||
213 | MXS_PINCTRL_PIN(GPMI_RDN), | ||
214 | MXS_PINCTRL_PIN(GPMI_WRN), | ||
215 | MXS_PINCTRL_PIN(GPMI_ALE), | ||
216 | MXS_PINCTRL_PIN(GPMI_CLE), | ||
217 | MXS_PINCTRL_PIN(GPMI_RESETN), | ||
218 | MXS_PINCTRL_PIN(LCD_D00), | ||
219 | MXS_PINCTRL_PIN(LCD_D01), | ||
220 | MXS_PINCTRL_PIN(LCD_D02), | ||
221 | MXS_PINCTRL_PIN(LCD_D03), | ||
222 | MXS_PINCTRL_PIN(LCD_D04), | ||
223 | MXS_PINCTRL_PIN(LCD_D05), | ||
224 | MXS_PINCTRL_PIN(LCD_D06), | ||
225 | MXS_PINCTRL_PIN(LCD_D07), | ||
226 | MXS_PINCTRL_PIN(LCD_D08), | ||
227 | MXS_PINCTRL_PIN(LCD_D09), | ||
228 | MXS_PINCTRL_PIN(LCD_D10), | ||
229 | MXS_PINCTRL_PIN(LCD_D11), | ||
230 | MXS_PINCTRL_PIN(LCD_D12), | ||
231 | MXS_PINCTRL_PIN(LCD_D13), | ||
232 | MXS_PINCTRL_PIN(LCD_D14), | ||
233 | MXS_PINCTRL_PIN(LCD_D15), | ||
234 | MXS_PINCTRL_PIN(LCD_D16), | ||
235 | MXS_PINCTRL_PIN(LCD_D17), | ||
236 | MXS_PINCTRL_PIN(LCD_D18), | ||
237 | MXS_PINCTRL_PIN(LCD_D19), | ||
238 | MXS_PINCTRL_PIN(LCD_D20), | ||
239 | MXS_PINCTRL_PIN(LCD_D21), | ||
240 | MXS_PINCTRL_PIN(LCD_D22), | ||
241 | MXS_PINCTRL_PIN(LCD_D23), | ||
242 | MXS_PINCTRL_PIN(LCD_RD_E), | ||
243 | MXS_PINCTRL_PIN(LCD_WR_RWN), | ||
244 | MXS_PINCTRL_PIN(LCD_RS), | ||
245 | MXS_PINCTRL_PIN(LCD_CS), | ||
246 | MXS_PINCTRL_PIN(LCD_VSYNC), | ||
247 | MXS_PINCTRL_PIN(LCD_HSYNC), | ||
248 | MXS_PINCTRL_PIN(LCD_DOTCLK), | ||
249 | MXS_PINCTRL_PIN(LCD_ENABLE), | ||
250 | MXS_PINCTRL_PIN(SSP0_DATA0), | ||
251 | MXS_PINCTRL_PIN(SSP0_DATA1), | ||
252 | MXS_PINCTRL_PIN(SSP0_DATA2), | ||
253 | MXS_PINCTRL_PIN(SSP0_DATA3), | ||
254 | MXS_PINCTRL_PIN(SSP0_DATA4), | ||
255 | MXS_PINCTRL_PIN(SSP0_DATA5), | ||
256 | MXS_PINCTRL_PIN(SSP0_DATA6), | ||
257 | MXS_PINCTRL_PIN(SSP0_DATA7), | ||
258 | MXS_PINCTRL_PIN(SSP0_CMD), | ||
259 | MXS_PINCTRL_PIN(SSP0_DETECT), | ||
260 | MXS_PINCTRL_PIN(SSP0_SCK), | ||
261 | MXS_PINCTRL_PIN(SSP1_SCK), | ||
262 | MXS_PINCTRL_PIN(SSP1_CMD), | ||
263 | MXS_PINCTRL_PIN(SSP1_DATA0), | ||
264 | MXS_PINCTRL_PIN(SSP1_DATA3), | ||
265 | MXS_PINCTRL_PIN(SSP2_SCK), | ||
266 | MXS_PINCTRL_PIN(SSP2_MOSI), | ||
267 | MXS_PINCTRL_PIN(SSP2_MISO), | ||
268 | MXS_PINCTRL_PIN(SSP2_SS0), | ||
269 | MXS_PINCTRL_PIN(SSP2_SS1), | ||
270 | MXS_PINCTRL_PIN(SSP2_SS2), | ||
271 | MXS_PINCTRL_PIN(SSP3_SCK), | ||
272 | MXS_PINCTRL_PIN(SSP3_MOSI), | ||
273 | MXS_PINCTRL_PIN(SSP3_MISO), | ||
274 | MXS_PINCTRL_PIN(SSP3_SS0), | ||
275 | MXS_PINCTRL_PIN(AUART0_RX), | ||
276 | MXS_PINCTRL_PIN(AUART0_TX), | ||
277 | MXS_PINCTRL_PIN(AUART0_CTS), | ||
278 | MXS_PINCTRL_PIN(AUART0_RTS), | ||
279 | MXS_PINCTRL_PIN(AUART1_RX), | ||
280 | MXS_PINCTRL_PIN(AUART1_TX), | ||
281 | MXS_PINCTRL_PIN(AUART1_CTS), | ||
282 | MXS_PINCTRL_PIN(AUART1_RTS), | ||
283 | MXS_PINCTRL_PIN(AUART2_RX), | ||
284 | MXS_PINCTRL_PIN(AUART2_TX), | ||
285 | MXS_PINCTRL_PIN(AUART2_CTS), | ||
286 | MXS_PINCTRL_PIN(AUART2_RTS), | ||
287 | MXS_PINCTRL_PIN(AUART3_RX), | ||
288 | MXS_PINCTRL_PIN(AUART3_TX), | ||
289 | MXS_PINCTRL_PIN(AUART3_CTS), | ||
290 | MXS_PINCTRL_PIN(AUART3_RTS), | ||
291 | MXS_PINCTRL_PIN(PWM0), | ||
292 | MXS_PINCTRL_PIN(PWM1), | ||
293 | MXS_PINCTRL_PIN(PWM2), | ||
294 | MXS_PINCTRL_PIN(SAIF0_MCLK), | ||
295 | MXS_PINCTRL_PIN(SAIF0_LRCLK), | ||
296 | MXS_PINCTRL_PIN(SAIF0_BITCLK), | ||
297 | MXS_PINCTRL_PIN(SAIF0_SDATA0), | ||
298 | MXS_PINCTRL_PIN(I2C0_SCL), | ||
299 | MXS_PINCTRL_PIN(I2C0_SDA), | ||
300 | MXS_PINCTRL_PIN(SAIF1_SDATA0), | ||
301 | MXS_PINCTRL_PIN(SPDIF), | ||
302 | MXS_PINCTRL_PIN(PWM3), | ||
303 | MXS_PINCTRL_PIN(PWM4), | ||
304 | MXS_PINCTRL_PIN(LCD_RESET), | ||
305 | MXS_PINCTRL_PIN(ENET0_MDC), | ||
306 | MXS_PINCTRL_PIN(ENET0_MDIO), | ||
307 | MXS_PINCTRL_PIN(ENET0_RX_EN), | ||
308 | MXS_PINCTRL_PIN(ENET0_RXD0), | ||
309 | MXS_PINCTRL_PIN(ENET0_RXD1), | ||
310 | MXS_PINCTRL_PIN(ENET0_TX_CLK), | ||
311 | MXS_PINCTRL_PIN(ENET0_TX_EN), | ||
312 | MXS_PINCTRL_PIN(ENET0_TXD0), | ||
313 | MXS_PINCTRL_PIN(ENET0_TXD1), | ||
314 | MXS_PINCTRL_PIN(ENET0_RXD2), | ||
315 | MXS_PINCTRL_PIN(ENET0_RXD3), | ||
316 | MXS_PINCTRL_PIN(ENET0_TXD2), | ||
317 | MXS_PINCTRL_PIN(ENET0_TXD3), | ||
318 | MXS_PINCTRL_PIN(ENET0_RX_CLK), | ||
319 | MXS_PINCTRL_PIN(ENET0_COL), | ||
320 | MXS_PINCTRL_PIN(ENET0_CRS), | ||
321 | MXS_PINCTRL_PIN(ENET_CLK), | ||
322 | MXS_PINCTRL_PIN(JTAG_RTCK), | ||
323 | MXS_PINCTRL_PIN(EMI_D00), | ||
324 | MXS_PINCTRL_PIN(EMI_D01), | ||
325 | MXS_PINCTRL_PIN(EMI_D02), | ||
326 | MXS_PINCTRL_PIN(EMI_D03), | ||
327 | MXS_PINCTRL_PIN(EMI_D04), | ||
328 | MXS_PINCTRL_PIN(EMI_D05), | ||
329 | MXS_PINCTRL_PIN(EMI_D06), | ||
330 | MXS_PINCTRL_PIN(EMI_D07), | ||
331 | MXS_PINCTRL_PIN(EMI_D08), | ||
332 | MXS_PINCTRL_PIN(EMI_D09), | ||
333 | MXS_PINCTRL_PIN(EMI_D10), | ||
334 | MXS_PINCTRL_PIN(EMI_D11), | ||
335 | MXS_PINCTRL_PIN(EMI_D12), | ||
336 | MXS_PINCTRL_PIN(EMI_D13), | ||
337 | MXS_PINCTRL_PIN(EMI_D14), | ||
338 | MXS_PINCTRL_PIN(EMI_D15), | ||
339 | MXS_PINCTRL_PIN(EMI_ODT0), | ||
340 | MXS_PINCTRL_PIN(EMI_DQM0), | ||
341 | MXS_PINCTRL_PIN(EMI_ODT1), | ||
342 | MXS_PINCTRL_PIN(EMI_DQM1), | ||
343 | MXS_PINCTRL_PIN(EMI_DDR_OPEN_FB), | ||
344 | MXS_PINCTRL_PIN(EMI_CLK), | ||
345 | MXS_PINCTRL_PIN(EMI_DQS0), | ||
346 | MXS_PINCTRL_PIN(EMI_DQS1), | ||
347 | MXS_PINCTRL_PIN(EMI_DDR_OPEN), | ||
348 | MXS_PINCTRL_PIN(EMI_A00), | ||
349 | MXS_PINCTRL_PIN(EMI_A01), | ||
350 | MXS_PINCTRL_PIN(EMI_A02), | ||
351 | MXS_PINCTRL_PIN(EMI_A03), | ||
352 | MXS_PINCTRL_PIN(EMI_A04), | ||
353 | MXS_PINCTRL_PIN(EMI_A05), | ||
354 | MXS_PINCTRL_PIN(EMI_A06), | ||
355 | MXS_PINCTRL_PIN(EMI_A07), | ||
356 | MXS_PINCTRL_PIN(EMI_A08), | ||
357 | MXS_PINCTRL_PIN(EMI_A09), | ||
358 | MXS_PINCTRL_PIN(EMI_A10), | ||
359 | MXS_PINCTRL_PIN(EMI_A11), | ||
360 | MXS_PINCTRL_PIN(EMI_A12), | ||
361 | MXS_PINCTRL_PIN(EMI_A13), | ||
362 | MXS_PINCTRL_PIN(EMI_A14), | ||
363 | MXS_PINCTRL_PIN(EMI_BA0), | ||
364 | MXS_PINCTRL_PIN(EMI_BA1), | ||
365 | MXS_PINCTRL_PIN(EMI_BA2), | ||
366 | MXS_PINCTRL_PIN(EMI_CASN), | ||
367 | MXS_PINCTRL_PIN(EMI_RASN), | ||
368 | MXS_PINCTRL_PIN(EMI_WEN), | ||
369 | MXS_PINCTRL_PIN(EMI_CE0N), | ||
370 | MXS_PINCTRL_PIN(EMI_CE1N), | ||
371 | MXS_PINCTRL_PIN(EMI_CKE), | ||
372 | }; | ||
373 | |||
374 | static struct mxs_regs imx28_regs = { | ||
375 | .muxsel = 0x100, | ||
376 | .drive = 0x300, | ||
377 | .pull = 0x600, | ||
378 | }; | ||
379 | |||
380 | static struct mxs_pinctrl_soc_data imx28_pinctrl_data = { | ||
381 | .regs = &imx28_regs, | ||
382 | .pins = imx28_pins, | ||
383 | .npins = ARRAY_SIZE(imx28_pins), | ||
384 | }; | ||
385 | |||
386 | static int __devinit imx28_pinctrl_probe(struct platform_device *pdev) | ||
387 | { | ||
388 | return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data); | ||
389 | } | ||
390 | |||
391 | static struct of_device_id imx28_pinctrl_of_match[] __devinitdata = { | ||
392 | { .compatible = "fsl,imx28-pinctrl", }, | ||
393 | { /* sentinel */ } | ||
394 | }; | ||
395 | MODULE_DEVICE_TABLE(of, imx28_pinctrl_of_match); | ||
396 | |||
397 | static struct platform_driver imx28_pinctrl_driver = { | ||
398 | .driver = { | ||
399 | .name = "imx28-pinctrl", | ||
400 | .owner = THIS_MODULE, | ||
401 | .of_match_table = imx28_pinctrl_of_match, | ||
402 | }, | ||
403 | .probe = imx28_pinctrl_probe, | ||
404 | .remove = __devexit_p(mxs_pinctrl_remove), | ||
405 | }; | ||
406 | |||
407 | static int __init imx28_pinctrl_init(void) | ||
408 | { | ||
409 | return platform_driver_register(&imx28_pinctrl_driver); | ||
410 | } | ||
411 | arch_initcall(imx28_pinctrl_init); | ||
412 | |||
413 | static void __exit imx28_pinctrl_exit(void) | ||
414 | { | ||
415 | platform_driver_unregister(&imx28_pinctrl_driver); | ||
416 | } | ||
417 | module_exit(imx28_pinctrl_exit); | ||
418 | |||
419 | MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>"); | ||
420 | MODULE_DESCRIPTION("Freescale i.MX28 pinctrl driver"); | ||
421 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c new file mode 100644 index 000000000000..93cd959971c5 --- /dev/null +++ b/drivers/pinctrl/pinctrl-mxs.c | |||
@@ -0,0 +1,508 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/err.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/of.h> | ||
17 | #include <linux/of_address.h> | ||
18 | #include <linux/pinctrl/machine.h> | ||
19 | #include <linux/pinctrl/pinconf.h> | ||
20 | #include <linux/pinctrl/pinctrl.h> | ||
21 | #include <linux/pinctrl/pinmux.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include "core.h" | ||
25 | #include "pinctrl-mxs.h" | ||
26 | |||
27 | #define SUFFIX_LEN 4 | ||
28 | |||
29 | struct mxs_pinctrl_data { | ||
30 | struct device *dev; | ||
31 | struct pinctrl_dev *pctl; | ||
32 | void __iomem *base; | ||
33 | struct mxs_pinctrl_soc_data *soc; | ||
34 | }; | ||
35 | |||
36 | static int mxs_get_groups_count(struct pinctrl_dev *pctldev) | ||
37 | { | ||
38 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
39 | |||
40 | return d->soc->ngroups; | ||
41 | } | ||
42 | |||
43 | static const char *mxs_get_group_name(struct pinctrl_dev *pctldev, | ||
44 | unsigned group) | ||
45 | { | ||
46 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
47 | |||
48 | return d->soc->groups[group].name; | ||
49 | } | ||
50 | |||
51 | static int mxs_get_group_pins(struct pinctrl_dev *pctldev, unsigned group, | ||
52 | const unsigned **pins, unsigned *num_pins) | ||
53 | { | ||
54 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
55 | |||
56 | *pins = d->soc->groups[group].pins; | ||
57 | *num_pins = d->soc->groups[group].npins; | ||
58 | |||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | static void mxs_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, | ||
63 | unsigned offset) | ||
64 | { | ||
65 | seq_printf(s, " %s", dev_name(pctldev->dev)); | ||
66 | } | ||
67 | |||
68 | static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev, | ||
69 | struct device_node *np, | ||
70 | struct pinctrl_map **map, unsigned *num_maps) | ||
71 | { | ||
72 | struct pinctrl_map *new_map; | ||
73 | char *group; | ||
74 | unsigned new_num; | ||
75 | unsigned long config = 0; | ||
76 | unsigned long *pconfig; | ||
77 | int length = strlen(np->name) + SUFFIX_LEN; | ||
78 | u32 val; | ||
79 | int ret; | ||
80 | |||
81 | ret = of_property_read_u32(np, "fsl,drive-strength", &val); | ||
82 | if (!ret) | ||
83 | config = val | MA_PRESENT; | ||
84 | ret = of_property_read_u32(np, "fsl,voltage", &val); | ||
85 | if (!ret) | ||
86 | config |= val << VOL_SHIFT | VOL_PRESENT; | ||
87 | ret = of_property_read_u32(np, "fsl,pull-up", &val); | ||
88 | if (!ret) | ||
89 | config |= val << PULL_SHIFT | PULL_PRESENT; | ||
90 | |||
91 | new_num = config ? 2 : 1; | ||
92 | new_map = kzalloc(sizeof(*new_map) * new_num, GFP_KERNEL); | ||
93 | if (!new_map) | ||
94 | return -ENOMEM; | ||
95 | |||
96 | new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; | ||
97 | new_map[0].data.mux.function = np->name; | ||
98 | |||
99 | /* Compose group name */ | ||
100 | group = kzalloc(length, GFP_KERNEL); | ||
101 | if (!group) | ||
102 | return -ENOMEM; | ||
103 | of_property_read_u32(np, "reg", &val); | ||
104 | snprintf(group, length, "%s.%d", np->name, val); | ||
105 | new_map[0].data.mux.group = group; | ||
106 | |||
107 | if (config) { | ||
108 | pconfig = kmemdup(&config, sizeof(config), GFP_KERNEL); | ||
109 | if (!pconfig) { | ||
110 | ret = -ENOMEM; | ||
111 | goto free; | ||
112 | } | ||
113 | |||
114 | new_map[1].type = PIN_MAP_TYPE_CONFIGS_GROUP; | ||
115 | new_map[1].data.configs.group_or_pin = group; | ||
116 | new_map[1].data.configs.configs = pconfig; | ||
117 | new_map[1].data.configs.num_configs = 1; | ||
118 | } | ||
119 | |||
120 | *map = new_map; | ||
121 | *num_maps = new_num; | ||
122 | |||
123 | return 0; | ||
124 | |||
125 | free: | ||
126 | kfree(new_map); | ||
127 | return ret; | ||
128 | } | ||
129 | |||
130 | static void mxs_dt_free_map(struct pinctrl_dev *pctldev, | ||
131 | struct pinctrl_map *map, unsigned num_maps) | ||
132 | { | ||
133 | int i; | ||
134 | |||
135 | for (i = 0; i < num_maps; i++) { | ||
136 | if (map[i].type == PIN_MAP_TYPE_MUX_GROUP) | ||
137 | kfree(map[i].data.mux.group); | ||
138 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP) | ||
139 | kfree(map[i].data.configs.configs); | ||
140 | } | ||
141 | |||
142 | kfree(map); | ||
143 | } | ||
144 | |||
145 | static struct pinctrl_ops mxs_pinctrl_ops = { | ||
146 | .get_groups_count = mxs_get_groups_count, | ||
147 | .get_group_name = mxs_get_group_name, | ||
148 | .get_group_pins = mxs_get_group_pins, | ||
149 | .pin_dbg_show = mxs_pin_dbg_show, | ||
150 | .dt_node_to_map = mxs_dt_node_to_map, | ||
151 | .dt_free_map = mxs_dt_free_map, | ||
152 | }; | ||
153 | |||
154 | static int mxs_pinctrl_get_funcs_count(struct pinctrl_dev *pctldev) | ||
155 | { | ||
156 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
157 | |||
158 | return d->soc->nfunctions; | ||
159 | } | ||
160 | |||
161 | static const char *mxs_pinctrl_get_func_name(struct pinctrl_dev *pctldev, | ||
162 | unsigned function) | ||
163 | { | ||
164 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
165 | |||
166 | return d->soc->functions[function].name; | ||
167 | } | ||
168 | |||
169 | static int mxs_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, | ||
170 | unsigned group, | ||
171 | const char * const **groups, | ||
172 | unsigned * const num_groups) | ||
173 | { | ||
174 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
175 | |||
176 | *groups = d->soc->functions[group].groups; | ||
177 | *num_groups = d->soc->functions[group].ngroups; | ||
178 | |||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector, | ||
183 | unsigned group) | ||
184 | { | ||
185 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
186 | struct mxs_group *g = &d->soc->groups[group]; | ||
187 | void __iomem *reg; | ||
188 | u8 bank, shift; | ||
189 | u16 pin; | ||
190 | int i; | ||
191 | |||
192 | for (i = 0; i < g->npins; i++) { | ||
193 | bank = PINID_TO_BANK(g->pins[i]); | ||
194 | pin = PINID_TO_PIN(g->pins[i]); | ||
195 | reg = d->base + d->soc->regs->muxsel; | ||
196 | reg += bank * 0x20 + pin / 16 * 0x10; | ||
197 | shift = pin % 16 * 2; | ||
198 | |||
199 | writel(0x3 << shift, reg + CLR); | ||
200 | writel(g->muxsel[i] << shift, reg + SET); | ||
201 | } | ||
202 | |||
203 | return 0; | ||
204 | } | ||
205 | |||
206 | static void mxs_pinctrl_disable(struct pinctrl_dev *pctldev, | ||
207 | unsigned function, unsigned group) | ||
208 | { | ||
209 | /* Nothing to do here */ | ||
210 | } | ||
211 | |||
212 | static struct pinmux_ops mxs_pinmux_ops = { | ||
213 | .get_functions_count = mxs_pinctrl_get_funcs_count, | ||
214 | .get_function_name = mxs_pinctrl_get_func_name, | ||
215 | .get_function_groups = mxs_pinctrl_get_func_groups, | ||
216 | .enable = mxs_pinctrl_enable, | ||
217 | .disable = mxs_pinctrl_disable, | ||
218 | }; | ||
219 | |||
220 | static int mxs_pinconf_get(struct pinctrl_dev *pctldev, | ||
221 | unsigned pin, unsigned long *config) | ||
222 | { | ||
223 | return -ENOTSUPP; | ||
224 | } | ||
225 | |||
226 | static int mxs_pinconf_set(struct pinctrl_dev *pctldev, | ||
227 | unsigned pin, unsigned long config) | ||
228 | { | ||
229 | return -ENOTSUPP; | ||
230 | } | ||
231 | |||
232 | static int mxs_pinconf_group_get(struct pinctrl_dev *pctldev, | ||
233 | unsigned group, unsigned long *config) | ||
234 | { | ||
235 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
236 | |||
237 | *config = d->soc->groups[group].config; | ||
238 | |||
239 | return 0; | ||
240 | } | ||
241 | |||
242 | static int mxs_pinconf_group_set(struct pinctrl_dev *pctldev, | ||
243 | unsigned group, unsigned long config) | ||
244 | { | ||
245 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | ||
246 | struct mxs_group *g = &d->soc->groups[group]; | ||
247 | void __iomem *reg; | ||
248 | u8 ma, vol, pull, bank, shift; | ||
249 | u16 pin; | ||
250 | int i; | ||
251 | |||
252 | ma = CONFIG_TO_MA(config); | ||
253 | vol = CONFIG_TO_VOL(config); | ||
254 | pull = CONFIG_TO_PULL(config); | ||
255 | |||
256 | for (i = 0; i < g->npins; i++) { | ||
257 | bank = PINID_TO_BANK(g->pins[i]); | ||
258 | pin = PINID_TO_PIN(g->pins[i]); | ||
259 | |||
260 | /* drive */ | ||
261 | reg = d->base + d->soc->regs->drive; | ||
262 | reg += bank * 0x40 + pin / 8 * 0x10; | ||
263 | |||
264 | /* mA */ | ||
265 | if (config & MA_PRESENT) { | ||
266 | shift = pin % 8 * 4; | ||
267 | writel(0x3 << shift, reg + CLR); | ||
268 | writel(ma << shift, reg + SET); | ||
269 | } | ||
270 | |||
271 | /* vol */ | ||
272 | if (config & VOL_PRESENT) { | ||
273 | shift = pin % 8 * 4 + 2; | ||
274 | if (vol) | ||
275 | writel(1 << shift, reg + SET); | ||
276 | else | ||
277 | writel(1 << shift, reg + CLR); | ||
278 | } | ||
279 | |||
280 | /* pull */ | ||
281 | if (config & PULL_PRESENT) { | ||
282 | reg = d->base + d->soc->regs->pull; | ||
283 | reg += bank * 0x10; | ||
284 | shift = pin; | ||
285 | if (pull) | ||
286 | writel(1 << shift, reg + SET); | ||
287 | else | ||
288 | writel(1 << shift, reg + CLR); | ||
289 | } | ||
290 | } | ||
291 | |||
292 | /* cache the config value for mxs_pinconf_group_get() */ | ||
293 | g->config = config; | ||
294 | |||
295 | return 0; | ||
296 | } | ||
297 | |||
298 | static void mxs_pinconf_dbg_show(struct pinctrl_dev *pctldev, | ||
299 | struct seq_file *s, unsigned pin) | ||
300 | { | ||
301 | /* Not support */ | ||
302 | } | ||
303 | |||
304 | static void mxs_pinconf_group_dbg_show(struct pinctrl_dev *pctldev, | ||
305 | struct seq_file *s, unsigned group) | ||
306 | { | ||
307 | unsigned long config; | ||
308 | |||
309 | if (!mxs_pinconf_group_get(pctldev, group, &config)) | ||
310 | seq_printf(s, "0x%lx", config); | ||
311 | } | ||
312 | |||
313 | struct pinconf_ops mxs_pinconf_ops = { | ||
314 | .pin_config_get = mxs_pinconf_get, | ||
315 | .pin_config_set = mxs_pinconf_set, | ||
316 | .pin_config_group_get = mxs_pinconf_group_get, | ||
317 | .pin_config_group_set = mxs_pinconf_group_set, | ||
318 | .pin_config_dbg_show = mxs_pinconf_dbg_show, | ||
319 | .pin_config_group_dbg_show = mxs_pinconf_group_dbg_show, | ||
320 | }; | ||
321 | |||
322 | static struct pinctrl_desc mxs_pinctrl_desc = { | ||
323 | .pctlops = &mxs_pinctrl_ops, | ||
324 | .pmxops = &mxs_pinmux_ops, | ||
325 | .confops = &mxs_pinconf_ops, | ||
326 | .owner = THIS_MODULE, | ||
327 | }; | ||
328 | |||
329 | static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev, | ||
330 | struct device_node *np, int idx, | ||
331 | const char **out_name) | ||
332 | { | ||
333 | struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); | ||
334 | struct mxs_group *g = &d->soc->groups[idx]; | ||
335 | struct property *prop; | ||
336 | const char *propname = "fsl,pinmux-ids"; | ||
337 | char *group; | ||
338 | int length = strlen(np->name) + SUFFIX_LEN; | ||
339 | int i; | ||
340 | u32 val; | ||
341 | |||
342 | group = devm_kzalloc(&pdev->dev, length, GFP_KERNEL); | ||
343 | if (!group) | ||
344 | return -ENOMEM; | ||
345 | of_property_read_u32(np, "reg", &val); | ||
346 | snprintf(group, length, "%s.%d", np->name, val); | ||
347 | g->name = group; | ||
348 | |||
349 | prop = of_find_property(np, propname, &length); | ||
350 | if (!prop) | ||
351 | return -EINVAL; | ||
352 | g->npins = length / sizeof(u32); | ||
353 | |||
354 | g->pins = devm_kzalloc(&pdev->dev, g->npins * sizeof(*g->pins), | ||
355 | GFP_KERNEL); | ||
356 | if (!g->pins) | ||
357 | return -ENOMEM; | ||
358 | |||
359 | g->muxsel = devm_kzalloc(&pdev->dev, g->npins * sizeof(*g->muxsel), | ||
360 | GFP_KERNEL); | ||
361 | if (!g->muxsel) | ||
362 | return -ENOMEM; | ||
363 | |||
364 | of_property_read_u32_array(np, propname, g->pins, g->npins); | ||
365 | for (i = 0; i < g->npins; i++) { | ||
366 | g->muxsel[i] = MUXID_TO_MUXSEL(g->pins[i]); | ||
367 | g->pins[i] = MUXID_TO_PINID(g->pins[i]); | ||
368 | } | ||
369 | |||
370 | *out_name = g->name; | ||
371 | |||
372 | return 0; | ||
373 | } | ||
374 | |||
375 | static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | ||
376 | struct mxs_pinctrl_data *d) | ||
377 | { | ||
378 | struct mxs_pinctrl_soc_data *soc = d->soc; | ||
379 | struct device_node *np = pdev->dev.of_node; | ||
380 | struct device_node *child; | ||
381 | struct mxs_function *f; | ||
382 | const char *fn, *fnull = ""; | ||
383 | int i = 0, idxf = 0, idxg = 0; | ||
384 | int ret; | ||
385 | u32 val; | ||
386 | |||
387 | child = of_get_next_child(np, NULL); | ||
388 | if (!child) { | ||
389 | dev_err(&pdev->dev, "no group is defined\n"); | ||
390 | return -ENOENT; | ||
391 | } | ||
392 | |||
393 | /* Count total functions and groups */ | ||
394 | fn = fnull; | ||
395 | for_each_child_of_node(np, child) { | ||
396 | /* Skip pure pinconf node */ | ||
397 | if (of_property_read_u32(child, "reg", &val)) | ||
398 | continue; | ||
399 | if (strcmp(fn, child->name)) { | ||
400 | fn = child->name; | ||
401 | soc->nfunctions++; | ||
402 | } | ||
403 | soc->ngroups++; | ||
404 | } | ||
405 | |||
406 | soc->functions = devm_kzalloc(&pdev->dev, soc->nfunctions * | ||
407 | sizeof(*soc->functions), GFP_KERNEL); | ||
408 | if (!soc->functions) | ||
409 | return -ENOMEM; | ||
410 | |||
411 | soc->groups = devm_kzalloc(&pdev->dev, soc->ngroups * | ||
412 | sizeof(*soc->groups), GFP_KERNEL); | ||
413 | if (!soc->groups) | ||
414 | return -ENOMEM; | ||
415 | |||
416 | /* Count groups for each function */ | ||
417 | fn = fnull; | ||
418 | f = &soc->functions[idxf]; | ||
419 | for_each_child_of_node(np, child) { | ||
420 | if (of_property_read_u32(child, "reg", &val)) | ||
421 | continue; | ||
422 | if (strcmp(fn, child->name)) { | ||
423 | f = &soc->functions[idxf++]; | ||
424 | f->name = fn = child->name; | ||
425 | } | ||
426 | f->ngroups++; | ||
427 | }; | ||
428 | |||
429 | /* Get groups for each function */ | ||
430 | idxf = 0; | ||
431 | fn = fnull; | ||
432 | for_each_child_of_node(np, child) { | ||
433 | if (of_property_read_u32(child, "reg", &val)) | ||
434 | continue; | ||
435 | if (strcmp(fn, child->name)) { | ||
436 | f = &soc->functions[idxf++]; | ||
437 | f->groups = devm_kzalloc(&pdev->dev, f->ngroups * | ||
438 | sizeof(*f->groups), | ||
439 | GFP_KERNEL); | ||
440 | if (!f->groups) | ||
441 | return -ENOMEM; | ||
442 | fn = child->name; | ||
443 | i = 0; | ||
444 | } | ||
445 | ret = mxs_pinctrl_parse_group(pdev, child, idxg++, | ||
446 | &f->groups[i++]); | ||
447 | if (ret) | ||
448 | return ret; | ||
449 | } | ||
450 | |||
451 | return 0; | ||
452 | } | ||
453 | |||
454 | int __devinit mxs_pinctrl_probe(struct platform_device *pdev, | ||
455 | struct mxs_pinctrl_soc_data *soc) | ||
456 | { | ||
457 | struct device_node *np = pdev->dev.of_node; | ||
458 | struct mxs_pinctrl_data *d; | ||
459 | int ret; | ||
460 | |||
461 | d = devm_kzalloc(&pdev->dev, sizeof(*d), GFP_KERNEL); | ||
462 | if (!d) | ||
463 | return -ENOMEM; | ||
464 | |||
465 | d->dev = &pdev->dev; | ||
466 | d->soc = soc; | ||
467 | |||
468 | d->base = of_iomap(np, 0); | ||
469 | if (!d->base) | ||
470 | return -EADDRNOTAVAIL; | ||
471 | |||
472 | mxs_pinctrl_desc.pins = d->soc->pins; | ||
473 | mxs_pinctrl_desc.npins = d->soc->npins; | ||
474 | mxs_pinctrl_desc.name = dev_name(&pdev->dev); | ||
475 | |||
476 | platform_set_drvdata(pdev, d); | ||
477 | |||
478 | ret = mxs_pinctrl_probe_dt(pdev, d); | ||
479 | if (ret) { | ||
480 | dev_err(&pdev->dev, "dt probe failed: %d\n", ret); | ||
481 | goto err; | ||
482 | } | ||
483 | |||
484 | d->pctl = pinctrl_register(&mxs_pinctrl_desc, &pdev->dev, d); | ||
485 | if (!d->pctl) { | ||
486 | dev_err(&pdev->dev, "Couldn't register MXS pinctrl driver\n"); | ||
487 | ret = -EINVAL; | ||
488 | goto err; | ||
489 | } | ||
490 | |||
491 | return 0; | ||
492 | |||
493 | err: | ||
494 | iounmap(d->base); | ||
495 | return ret; | ||
496 | } | ||
497 | EXPORT_SYMBOL_GPL(mxs_pinctrl_probe); | ||
498 | |||
499 | int __devexit mxs_pinctrl_remove(struct platform_device *pdev) | ||
500 | { | ||
501 | struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); | ||
502 | |||
503 | pinctrl_unregister(d->pctl); | ||
504 | iounmap(d->base); | ||
505 | |||
506 | return 0; | ||
507 | } | ||
508 | EXPORT_SYMBOL_GPL(mxs_pinctrl_remove); | ||
diff --git a/drivers/pinctrl/pinctrl-mxs.h b/drivers/pinctrl/pinctrl-mxs.h new file mode 100644 index 000000000000..fdd88d0bae22 --- /dev/null +++ b/drivers/pinctrl/pinctrl-mxs.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #ifndef __PINCTRL_MXS_H | ||
13 | #define __PINCTRL_MXS_H | ||
14 | |||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/pinctrl/pinctrl.h> | ||
17 | |||
18 | #define SET 0x4 | ||
19 | #define CLR 0x8 | ||
20 | #define TOG 0xc | ||
21 | |||
22 | #define MXS_PINCTRL_PIN(pin) PINCTRL_PIN(pin, #pin) | ||
23 | #define PINID(bank, pin) ((bank) * 32 + (pin)) | ||
24 | |||
25 | /* | ||
26 | * pinmux-id bit field definitions | ||
27 | * | ||
28 | * bank: 15..12 (4) | ||
29 | * pin: 11..4 (8) | ||
30 | * muxsel: 3..0 (4) | ||
31 | */ | ||
32 | #define MUXID_TO_PINID(m) PINID((m) >> 12 & 0xf, (m) >> 4 & 0xff) | ||
33 | #define MUXID_TO_MUXSEL(m) ((m) & 0xf) | ||
34 | |||
35 | #define PINID_TO_BANK(p) ((p) >> 5) | ||
36 | #define PINID_TO_PIN(p) ((p) % 32) | ||
37 | |||
38 | /* | ||
39 | * pin config bit field definitions | ||
40 | * | ||
41 | * pull-up: 6..5 (2) | ||
42 | * voltage: 4..3 (2) | ||
43 | * mA: 2..0 (3) | ||
44 | * | ||
45 | * MSB of each field is presence bit for the config. | ||
46 | */ | ||
47 | #define PULL_PRESENT (1 << 6) | ||
48 | #define PULL_SHIFT 5 | ||
49 | #define VOL_PRESENT (1 << 4) | ||
50 | #define VOL_SHIFT 3 | ||
51 | #define MA_PRESENT (1 << 2) | ||
52 | #define MA_SHIFT 0 | ||
53 | #define CONFIG_TO_PULL(c) ((c) >> PULL_SHIFT & 0x1) | ||
54 | #define CONFIG_TO_VOL(c) ((c) >> VOL_SHIFT & 0x1) | ||
55 | #define CONFIG_TO_MA(c) ((c) >> MA_SHIFT & 0x3) | ||
56 | |||
57 | struct mxs_function { | ||
58 | const char *name; | ||
59 | const char **groups; | ||
60 | unsigned ngroups; | ||
61 | }; | ||
62 | |||
63 | struct mxs_group { | ||
64 | const char *name; | ||
65 | unsigned int *pins; | ||
66 | unsigned npins; | ||
67 | u8 *muxsel; | ||
68 | u8 config; | ||
69 | }; | ||
70 | |||
71 | struct mxs_regs { | ||
72 | u16 muxsel; | ||
73 | u16 drive; | ||
74 | u16 pull; | ||
75 | }; | ||
76 | |||
77 | struct mxs_pinctrl_soc_data { | ||
78 | const struct mxs_regs *regs; | ||
79 | const struct pinctrl_pin_desc *pins; | ||
80 | unsigned npins; | ||
81 | struct mxs_function *functions; | ||
82 | unsigned nfunctions; | ||
83 | struct mxs_group *groups; | ||
84 | unsigned ngroups; | ||
85 | }; | ||
86 | |||
87 | int mxs_pinctrl_probe(struct platform_device *pdev, | ||
88 | struct mxs_pinctrl_soc_data *soc); | ||
89 | int mxs_pinctrl_remove(struct platform_device *pdev); | ||
90 | |||
91 | #endif /* __PINCTRL_MXS_H */ | ||