2 * Driver for the ST Microelectronics SPEAr1310 pinmux
4 * Copyright (C) 2012 ST Microelectronics
5 * Viresh Kumar <vireshk@kernel.org>
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
12 #include <linux/err.h>
13 #include <linux/init.h>
14 #include <linux/of_device.h>
15 #include <linux/platform_device.h>
16 #include "pinctrl-spear.h"
18 #define DRIVER_NAME "spear1310-pinmux"
21 static const struct pinctrl_pin_desc spear1310_pins
[] = {
27 #define PERIP_CFG 0x3B0
28 #define MCIF_SEL_SHIFT 5
29 #define MCIF_SEL_SD (0x1 << MCIF_SEL_SHIFT)
30 #define MCIF_SEL_CF (0x2 << MCIF_SEL_SHIFT)
31 #define MCIF_SEL_XD (0x3 << MCIF_SEL_SHIFT)
32 #define MCIF_SEL_MASK (0x3 << MCIF_SEL_SHIFT)
34 #define PCIE_SATA_CFG 0x3A4
35 #define PCIE_SATA2_SEL_PCIE (0 << 31)
36 #define PCIE_SATA1_SEL_PCIE (0 << 30)
37 #define PCIE_SATA0_SEL_PCIE (0 << 29)
38 #define PCIE_SATA2_SEL_SATA (1 << 31)
39 #define PCIE_SATA1_SEL_SATA (1 << 30)
40 #define PCIE_SATA0_SEL_SATA (1 << 29)
41 #define SATA2_CFG_TX_CLK_EN (1 << 27)
42 #define SATA2_CFG_RX_CLK_EN (1 << 26)
43 #define SATA2_CFG_POWERUP_RESET (1 << 25)
44 #define SATA2_CFG_PM_CLK_EN (1 << 24)
45 #define SATA1_CFG_TX_CLK_EN (1 << 23)
46 #define SATA1_CFG_RX_CLK_EN (1 << 22)
47 #define SATA1_CFG_POWERUP_RESET (1 << 21)
48 #define SATA1_CFG_PM_CLK_EN (1 << 20)
49 #define SATA0_CFG_TX_CLK_EN (1 << 19)
50 #define SATA0_CFG_RX_CLK_EN (1 << 18)
51 #define SATA0_CFG_POWERUP_RESET (1 << 17)
52 #define SATA0_CFG_PM_CLK_EN (1 << 16)
53 #define PCIE2_CFG_DEVICE_PRESENT (1 << 11)
54 #define PCIE2_CFG_POWERUP_RESET (1 << 10)
55 #define PCIE2_CFG_CORE_CLK_EN (1 << 9)
56 #define PCIE2_CFG_AUX_CLK_EN (1 << 8)
57 #define PCIE1_CFG_DEVICE_PRESENT (1 << 7)
58 #define PCIE1_CFG_POWERUP_RESET (1 << 6)
59 #define PCIE1_CFG_CORE_CLK_EN (1 << 5)
60 #define PCIE1_CFG_AUX_CLK_EN (1 << 4)
61 #define PCIE0_CFG_DEVICE_PRESENT (1 << 3)
62 #define PCIE0_CFG_POWERUP_RESET (1 << 2)
63 #define PCIE0_CFG_CORE_CLK_EN (1 << 1)
64 #define PCIE0_CFG_AUX_CLK_EN (1 << 0)
66 #define PAD_FUNCTION_EN_0 0x650
67 #define PMX_UART0_MASK (1 << 1)
68 #define PMX_I2C0_MASK (1 << 2)
69 #define PMX_I2S0_MASK (1 << 3)
70 #define PMX_SSP0_MASK (1 << 4)
71 #define PMX_CLCD1_MASK (1 << 5)
72 #define PMX_EGPIO00_MASK (1 << 6)
73 #define PMX_EGPIO01_MASK (1 << 7)
74 #define PMX_EGPIO02_MASK (1 << 8)
75 #define PMX_EGPIO03_MASK (1 << 9)
76 #define PMX_EGPIO04_MASK (1 << 10)
77 #define PMX_EGPIO05_MASK (1 << 11)
78 #define PMX_EGPIO06_MASK (1 << 12)
79 #define PMX_EGPIO07_MASK (1 << 13)
80 #define PMX_EGPIO08_MASK (1 << 14)
81 #define PMX_EGPIO09_MASK (1 << 15)
82 #define PMX_SMI_MASK (1 << 16)
83 #define PMX_NAND8_MASK (1 << 17)
84 #define PMX_GMIICLK_MASK (1 << 18)
85 #define PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK (1 << 19)
86 #define PMX_RXCLK_RDV_TXEN_D03_MASK (1 << 20)
87 #define PMX_GMIID47_MASK (1 << 21)
88 #define PMX_MDC_MDIO_MASK (1 << 22)
89 #define PMX_MCI_DATA8_15_MASK (1 << 23)
90 #define PMX_NFAD23_MASK (1 << 24)
91 #define PMX_NFAD24_MASK (1 << 25)
92 #define PMX_NFAD25_MASK (1 << 26)
93 #define PMX_NFCE3_MASK (1 << 27)
94 #define PMX_NFWPRT3_MASK (1 << 28)
95 #define PMX_NFRSTPWDWN0_MASK (1 << 29)
96 #define PMX_NFRSTPWDWN1_MASK (1 << 30)
97 #define PMX_NFRSTPWDWN2_MASK (1 << 31)
99 #define PAD_FUNCTION_EN_1 0x654
100 #define PMX_NFRSTPWDWN3_MASK (1 << 0)
101 #define PMX_SMINCS2_MASK (1 << 1)
102 #define PMX_SMINCS3_MASK (1 << 2)
103 #define PMX_CLCD2_MASK (1 << 3)
104 #define PMX_KBD_ROWCOL68_MASK (1 << 4)
105 #define PMX_EGPIO10_MASK (1 << 5)
106 #define PMX_EGPIO11_MASK (1 << 6)
107 #define PMX_EGPIO12_MASK (1 << 7)
108 #define PMX_EGPIO13_MASK (1 << 8)
109 #define PMX_EGPIO14_MASK (1 << 9)
110 #define PMX_EGPIO15_MASK (1 << 10)
111 #define PMX_UART0_MODEM_MASK (1 << 11)
112 #define PMX_GPT0_TMR0_MASK (1 << 12)
113 #define PMX_GPT0_TMR1_MASK (1 << 13)
114 #define PMX_GPT1_TMR0_MASK (1 << 14)
115 #define PMX_GPT1_TMR1_MASK (1 << 15)
116 #define PMX_I2S1_MASK (1 << 16)
117 #define PMX_KBD_ROWCOL25_MASK (1 << 17)
118 #define PMX_NFIO8_15_MASK (1 << 18)
119 #define PMX_KBD_COL1_MASK (1 << 19)
120 #define PMX_NFCE1_MASK (1 << 20)
121 #define PMX_KBD_COL0_MASK (1 << 21)
122 #define PMX_NFCE2_MASK (1 << 22)
123 #define PMX_KBD_ROW1_MASK (1 << 23)
124 #define PMX_NFWPRT1_MASK (1 << 24)
125 #define PMX_KBD_ROW0_MASK (1 << 25)
126 #define PMX_NFWPRT2_MASK (1 << 26)
127 #define PMX_MCIDATA0_MASK (1 << 27)
128 #define PMX_MCIDATA1_MASK (1 << 28)
129 #define PMX_MCIDATA2_MASK (1 << 29)
130 #define PMX_MCIDATA3_MASK (1 << 30)
131 #define PMX_MCIDATA4_MASK (1 << 31)
133 #define PAD_FUNCTION_EN_2 0x658
134 #define PMX_MCIDATA5_MASK (1 << 0)
135 #define PMX_MCIDATA6_MASK (1 << 1)
136 #define PMX_MCIDATA7_MASK (1 << 2)
137 #define PMX_MCIDATA1SD_MASK (1 << 3)
138 #define PMX_MCIDATA2SD_MASK (1 << 4)
139 #define PMX_MCIDATA3SD_MASK (1 << 5)
140 #define PMX_MCIADDR0ALE_MASK (1 << 6)
141 #define PMX_MCIADDR1CLECLK_MASK (1 << 7)
142 #define PMX_MCIADDR2_MASK (1 << 8)
143 #define PMX_MCICECF_MASK (1 << 9)
144 #define PMX_MCICEXD_MASK (1 << 10)
145 #define PMX_MCICESDMMC_MASK (1 << 11)
146 #define PMX_MCICDCF1_MASK (1 << 12)
147 #define PMX_MCICDCF2_MASK (1 << 13)
148 #define PMX_MCICDXD_MASK (1 << 14)
149 #define PMX_MCICDSDMMC_MASK (1 << 15)
150 #define PMX_MCIDATADIR_MASK (1 << 16)
151 #define PMX_MCIDMARQWP_MASK (1 << 17)
152 #define PMX_MCIIORDRE_MASK (1 << 18)
153 #define PMX_MCIIOWRWE_MASK (1 << 19)
154 #define PMX_MCIRESETCF_MASK (1 << 20)
155 #define PMX_MCICS0CE_MASK (1 << 21)
156 #define PMX_MCICFINTR_MASK (1 << 22)
157 #define PMX_MCIIORDY_MASK (1 << 23)
158 #define PMX_MCICS1_MASK (1 << 24)
159 #define PMX_MCIDMAACK_MASK (1 << 25)
160 #define PMX_MCISDCMD_MASK (1 << 26)
161 #define PMX_MCILEDS_MASK (1 << 27)
162 #define PMX_TOUCH_XY_MASK (1 << 28)
163 #define PMX_SSP0_CS0_MASK (1 << 29)
164 #define PMX_SSP0_CS1_2_MASK (1 << 30)
166 #define PAD_DIRECTION_SEL_0 0x65C
167 #define PAD_DIRECTION_SEL_1 0x660
168 #define PAD_DIRECTION_SEL_2 0x664
170 /* combined macros */
171 #define PMX_GMII_MASK (PMX_GMIICLK_MASK | \
172 PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \
173 PMX_RXCLK_RDV_TXEN_D03_MASK | \
174 PMX_GMIID47_MASK | PMX_MDC_MDIO_MASK)
176 #define PMX_EGPIO_0_GRP_MASK (PMX_EGPIO00_MASK | PMX_EGPIO01_MASK | \
178 PMX_EGPIO03_MASK | PMX_EGPIO04_MASK | \
179 PMX_EGPIO05_MASK | PMX_EGPIO06_MASK | \
180 PMX_EGPIO07_MASK | PMX_EGPIO08_MASK | \
182 #define PMX_EGPIO_1_GRP_MASK (PMX_EGPIO10_MASK | PMX_EGPIO11_MASK | \
183 PMX_EGPIO12_MASK | PMX_EGPIO13_MASK | \
184 PMX_EGPIO14_MASK | PMX_EGPIO15_MASK)
186 #define PMX_KEYBOARD_6X6_MASK (PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \
187 PMX_KBD_ROWCOL25_MASK | PMX_KBD_COL0_MASK | \
190 #define PMX_NAND8BIT_0_MASK (PMX_NAND8_MASK | PMX_NFAD23_MASK | \
191 PMX_NFAD24_MASK | PMX_NFAD25_MASK | \
192 PMX_NFWPRT3_MASK | PMX_NFRSTPWDWN0_MASK | \
193 PMX_NFRSTPWDWN1_MASK | PMX_NFRSTPWDWN2_MASK | \
195 #define PMX_NAND8BIT_1_MASK PMX_NFRSTPWDWN3_MASK
197 #define PMX_NAND16BIT_1_MASK (PMX_KBD_ROWCOL25_MASK | PMX_NFIO8_15_MASK)
198 #define PMX_NAND_4CHIPS_MASK (PMX_NFCE1_MASK | PMX_NFCE2_MASK | \
199 PMX_NFWPRT1_MASK | PMX_NFWPRT2_MASK | \
200 PMX_KBD_ROW0_MASK | PMX_KBD_ROW1_MASK | \
201 PMX_KBD_COL0_MASK | PMX_KBD_COL1_MASK)
203 #define PMX_MCIFALL_1_MASK 0xF8000000
204 #define PMX_MCIFALL_2_MASK 0x0FFFFFFF
206 #define PMX_PCI_REG1_MASK (PMX_SMINCS2_MASK | PMX_SMINCS3_MASK | \
207 PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK | \
208 PMX_EGPIO_1_GRP_MASK | PMX_GPT0_TMR0_MASK | \
209 PMX_GPT0_TMR1_MASK | PMX_GPT1_TMR0_MASK | \
210 PMX_GPT1_TMR1_MASK | PMX_I2S1_MASK | \
212 #define PMX_PCI_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \
215 #define PMX_SMII_0_1_2_MASK (PMX_CLCD2_MASK | PMX_KBD_ROWCOL68_MASK)
216 #define PMX_RGMII_REG0_MASK (PMX_MCI_DATA8_15_MASK | \
217 PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK | \
219 #define PMX_RGMII_REG1_MASK (PMX_KBD_ROWCOL68_MASK | PMX_EGPIO_1_GRP_MASK |\
220 PMX_KBD_ROW1_MASK | PMX_NFWPRT1_MASK | \
221 PMX_KBD_ROW0_MASK | PMX_NFWPRT2_MASK)
222 #define PMX_RGMII_REG2_MASK (PMX_TOUCH_XY_MASK | PMX_SSP0_CS0_MASK | \
225 #define PCIE_CFG_VAL(x) (PCIE_SATA##x##_SEL_PCIE | \
226 PCIE##x##_CFG_AUX_CLK_EN | \
227 PCIE##x##_CFG_CORE_CLK_EN | \
228 PCIE##x##_CFG_POWERUP_RESET | \
229 PCIE##x##_CFG_DEVICE_PRESENT)
230 #define SATA_CFG_VAL(x) (PCIE_SATA##x##_SEL_SATA | \
231 SATA##x##_CFG_PM_CLK_EN | \
232 SATA##x##_CFG_POWERUP_RESET | \
233 SATA##x##_CFG_RX_CLK_EN | \
234 SATA##x##_CFG_TX_CLK_EN)
236 /* Pad multiplexing for i2c0 device */
237 static const unsigned i2c0_pins
[] = { 102, 103 };
238 static struct spear_muxreg i2c0_muxreg
[] = {
240 .reg
= PAD_FUNCTION_EN_0
,
241 .mask
= PMX_I2C0_MASK
,
242 .val
= PMX_I2C0_MASK
,
244 .reg
= PAD_DIRECTION_SEL_0
,
245 .mask
= PMX_I2C0_MASK
,
246 .val
= PMX_I2C0_MASK
,
250 static struct spear_modemux i2c0_modemux
[] = {
252 .muxregs
= i2c0_muxreg
,
253 .nmuxregs
= ARRAY_SIZE(i2c0_muxreg
),
257 static struct spear_pingroup i2c0_pingroup
= {
260 .npins
= ARRAY_SIZE(i2c0_pins
),
261 .modemuxs
= i2c0_modemux
,
262 .nmodemuxs
= ARRAY_SIZE(i2c0_modemux
),
265 static const char *const i2c0_grps
[] = { "i2c0_grp" };
266 static struct spear_function i2c0_function
= {
269 .ngroups
= ARRAY_SIZE(i2c0_grps
),
272 /* Pad multiplexing for ssp0 device */
273 static const unsigned ssp0_pins
[] = { 109, 110, 111, 112 };
274 static struct spear_muxreg ssp0_muxreg
[] = {
276 .reg
= PAD_FUNCTION_EN_0
,
277 .mask
= PMX_SSP0_MASK
,
278 .val
= PMX_SSP0_MASK
,
280 .reg
= PAD_DIRECTION_SEL_0
,
281 .mask
= PMX_SSP0_MASK
,
282 .val
= PMX_SSP0_MASK
,
286 static struct spear_modemux ssp0_modemux
[] = {
288 .muxregs
= ssp0_muxreg
,
289 .nmuxregs
= ARRAY_SIZE(ssp0_muxreg
),
293 static struct spear_pingroup ssp0_pingroup
= {
296 .npins
= ARRAY_SIZE(ssp0_pins
),
297 .modemuxs
= ssp0_modemux
,
298 .nmodemuxs
= ARRAY_SIZE(ssp0_modemux
),
301 /* Pad multiplexing for ssp0_cs0 device */
302 static const unsigned ssp0_cs0_pins
[] = { 96 };
303 static struct spear_muxreg ssp0_cs0_muxreg
[] = {
305 .reg
= PAD_FUNCTION_EN_2
,
306 .mask
= PMX_SSP0_CS0_MASK
,
307 .val
= PMX_SSP0_CS0_MASK
,
309 .reg
= PAD_DIRECTION_SEL_2
,
310 .mask
= PMX_SSP0_CS0_MASK
,
311 .val
= PMX_SSP0_CS0_MASK
,
315 static struct spear_modemux ssp0_cs0_modemux
[] = {
317 .muxregs
= ssp0_cs0_muxreg
,
318 .nmuxregs
= ARRAY_SIZE(ssp0_cs0_muxreg
),
322 static struct spear_pingroup ssp0_cs0_pingroup
= {
323 .name
= "ssp0_cs0_grp",
324 .pins
= ssp0_cs0_pins
,
325 .npins
= ARRAY_SIZE(ssp0_cs0_pins
),
326 .modemuxs
= ssp0_cs0_modemux
,
327 .nmodemuxs
= ARRAY_SIZE(ssp0_cs0_modemux
),
330 /* ssp0_cs1_2 device */
331 static const unsigned ssp0_cs1_2_pins
[] = { 94, 95 };
332 static struct spear_muxreg ssp0_cs1_2_muxreg
[] = {
334 .reg
= PAD_FUNCTION_EN_2
,
335 .mask
= PMX_SSP0_CS1_2_MASK
,
336 .val
= PMX_SSP0_CS1_2_MASK
,
338 .reg
= PAD_DIRECTION_SEL_2
,
339 .mask
= PMX_SSP0_CS1_2_MASK
,
340 .val
= PMX_SSP0_CS1_2_MASK
,
344 static struct spear_modemux ssp0_cs1_2_modemux
[] = {
346 .muxregs
= ssp0_cs1_2_muxreg
,
347 .nmuxregs
= ARRAY_SIZE(ssp0_cs1_2_muxreg
),
351 static struct spear_pingroup ssp0_cs1_2_pingroup
= {
352 .name
= "ssp0_cs1_2_grp",
353 .pins
= ssp0_cs1_2_pins
,
354 .npins
= ARRAY_SIZE(ssp0_cs1_2_pins
),
355 .modemuxs
= ssp0_cs1_2_modemux
,
356 .nmodemuxs
= ARRAY_SIZE(ssp0_cs1_2_modemux
),
359 static const char *const ssp0_grps
[] = { "ssp0_grp", "ssp0_cs0_grp",
361 static struct spear_function ssp0_function
= {
364 .ngroups
= ARRAY_SIZE(ssp0_grps
),
367 /* Pad multiplexing for i2s0 device */
368 static const unsigned i2s0_pins
[] = { 104, 105, 106, 107, 108 };
369 static struct spear_muxreg i2s0_muxreg
[] = {
371 .reg
= PAD_FUNCTION_EN_0
,
372 .mask
= PMX_I2S0_MASK
,
373 .val
= PMX_I2S0_MASK
,
375 .reg
= PAD_DIRECTION_SEL_0
,
376 .mask
= PMX_I2S0_MASK
,
377 .val
= PMX_I2S0_MASK
,
381 static struct spear_modemux i2s0_modemux
[] = {
383 .muxregs
= i2s0_muxreg
,
384 .nmuxregs
= ARRAY_SIZE(i2s0_muxreg
),
388 static struct spear_pingroup i2s0_pingroup
= {
391 .npins
= ARRAY_SIZE(i2s0_pins
),
392 .modemuxs
= i2s0_modemux
,
393 .nmodemuxs
= ARRAY_SIZE(i2s0_modemux
),
396 static const char *const i2s0_grps
[] = { "i2s0_grp" };
397 static struct spear_function i2s0_function
= {
400 .ngroups
= ARRAY_SIZE(i2s0_grps
),
403 /* Pad multiplexing for i2s1 device */
404 static const unsigned i2s1_pins
[] = { 0, 1, 2, 3 };
405 static struct spear_muxreg i2s1_muxreg
[] = {
407 .reg
= PAD_FUNCTION_EN_1
,
408 .mask
= PMX_I2S1_MASK
,
409 .val
= PMX_I2S1_MASK
,
411 .reg
= PAD_DIRECTION_SEL_1
,
412 .mask
= PMX_I2S1_MASK
,
413 .val
= PMX_I2S1_MASK
,
417 static struct spear_modemux i2s1_modemux
[] = {
419 .muxregs
= i2s1_muxreg
,
420 .nmuxregs
= ARRAY_SIZE(i2s1_muxreg
),
424 static struct spear_pingroup i2s1_pingroup
= {
427 .npins
= ARRAY_SIZE(i2s1_pins
),
428 .modemuxs
= i2s1_modemux
,
429 .nmodemuxs
= ARRAY_SIZE(i2s1_modemux
),
432 static const char *const i2s1_grps
[] = { "i2s1_grp" };
433 static struct spear_function i2s1_function
= {
436 .ngroups
= ARRAY_SIZE(i2s1_grps
),
439 /* Pad multiplexing for clcd device */
440 static const unsigned clcd_pins
[] = { 113, 114, 115, 116, 117, 118, 119, 120,
441 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
442 135, 136, 137, 138, 139, 140, 141, 142 };
443 static struct spear_muxreg clcd_muxreg
[] = {
445 .reg
= PAD_FUNCTION_EN_0
,
446 .mask
= PMX_CLCD1_MASK
,
447 .val
= PMX_CLCD1_MASK
,
449 .reg
= PAD_DIRECTION_SEL_0
,
450 .mask
= PMX_CLCD1_MASK
,
451 .val
= PMX_CLCD1_MASK
,
455 static struct spear_modemux clcd_modemux
[] = {
457 .muxregs
= clcd_muxreg
,
458 .nmuxregs
= ARRAY_SIZE(clcd_muxreg
),
462 static struct spear_pingroup clcd_pingroup
= {
465 .npins
= ARRAY_SIZE(clcd_pins
),
466 .modemuxs
= clcd_modemux
,
467 .nmodemuxs
= ARRAY_SIZE(clcd_modemux
),
470 static const unsigned clcd_high_res_pins
[] = { 30, 31, 32, 33, 34, 35, 36, 37,
471 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 };
472 static struct spear_muxreg clcd_high_res_muxreg
[] = {
474 .reg
= PAD_FUNCTION_EN_1
,
475 .mask
= PMX_CLCD2_MASK
,
476 .val
= PMX_CLCD2_MASK
,
478 .reg
= PAD_DIRECTION_SEL_1
,
479 .mask
= PMX_CLCD2_MASK
,
480 .val
= PMX_CLCD2_MASK
,
484 static struct spear_modemux clcd_high_res_modemux
[] = {
486 .muxregs
= clcd_high_res_muxreg
,
487 .nmuxregs
= ARRAY_SIZE(clcd_high_res_muxreg
),
491 static struct spear_pingroup clcd_high_res_pingroup
= {
492 .name
= "clcd_high_res_grp",
493 .pins
= clcd_high_res_pins
,
494 .npins
= ARRAY_SIZE(clcd_high_res_pins
),
495 .modemuxs
= clcd_high_res_modemux
,
496 .nmodemuxs
= ARRAY_SIZE(clcd_high_res_modemux
),
499 static const char *const clcd_grps
[] = { "clcd_grp", "clcd_high_res_grp" };
500 static struct spear_function clcd_function
= {
503 .ngroups
= ARRAY_SIZE(clcd_grps
),
506 static const unsigned arm_gpio_pins
[] = { 18, 19, 20, 21, 22, 23, 143, 144, 145,
507 146, 147, 148, 149, 150, 151, 152 };
508 static struct spear_muxreg arm_gpio_muxreg
[] = {
510 .reg
= PAD_FUNCTION_EN_0
,
511 .mask
= PMX_EGPIO_0_GRP_MASK
,
512 .val
= PMX_EGPIO_0_GRP_MASK
,
514 .reg
= PAD_FUNCTION_EN_1
,
515 .mask
= PMX_EGPIO_1_GRP_MASK
,
516 .val
= PMX_EGPIO_1_GRP_MASK
,
518 .reg
= PAD_DIRECTION_SEL_0
,
519 .mask
= PMX_EGPIO_0_GRP_MASK
,
520 .val
= PMX_EGPIO_0_GRP_MASK
,
522 .reg
= PAD_DIRECTION_SEL_1
,
523 .mask
= PMX_EGPIO_1_GRP_MASK
,
524 .val
= PMX_EGPIO_1_GRP_MASK
,
528 static struct spear_modemux arm_gpio_modemux
[] = {
530 .muxregs
= arm_gpio_muxreg
,
531 .nmuxregs
= ARRAY_SIZE(arm_gpio_muxreg
),
535 static struct spear_pingroup arm_gpio_pingroup
= {
536 .name
= "arm_gpio_grp",
537 .pins
= arm_gpio_pins
,
538 .npins
= ARRAY_SIZE(arm_gpio_pins
),
539 .modemuxs
= arm_gpio_modemux
,
540 .nmodemuxs
= ARRAY_SIZE(arm_gpio_modemux
),
543 static const char *const arm_gpio_grps
[] = { "arm_gpio_grp" };
544 static struct spear_function arm_gpio_function
= {
546 .groups
= arm_gpio_grps
,
547 .ngroups
= ARRAY_SIZE(arm_gpio_grps
),
550 /* Pad multiplexing for smi 2 chips device */
551 static const unsigned smi_2_chips_pins
[] = { 153, 154, 155, 156, 157 };
552 static struct spear_muxreg smi_2_chips_muxreg
[] = {
554 .reg
= PAD_FUNCTION_EN_0
,
555 .mask
= PMX_SMI_MASK
,
558 .reg
= PAD_DIRECTION_SEL_0
,
559 .mask
= PMX_SMI_MASK
,
564 static struct spear_modemux smi_2_chips_modemux
[] = {
566 .muxregs
= smi_2_chips_muxreg
,
567 .nmuxregs
= ARRAY_SIZE(smi_2_chips_muxreg
),
571 static struct spear_pingroup smi_2_chips_pingroup
= {
572 .name
= "smi_2_chips_grp",
573 .pins
= smi_2_chips_pins
,
574 .npins
= ARRAY_SIZE(smi_2_chips_pins
),
575 .modemuxs
= smi_2_chips_modemux
,
576 .nmodemuxs
= ARRAY_SIZE(smi_2_chips_modemux
),
579 static const unsigned smi_4_chips_pins
[] = { 54, 55 };
580 static struct spear_muxreg smi_4_chips_muxreg
[] = {
582 .reg
= PAD_FUNCTION_EN_0
,
583 .mask
= PMX_SMI_MASK
,
586 .reg
= PAD_FUNCTION_EN_1
,
587 .mask
= PMX_SMINCS2_MASK
| PMX_SMINCS3_MASK
,
588 .val
= PMX_SMINCS2_MASK
| PMX_SMINCS3_MASK
,
590 .reg
= PAD_DIRECTION_SEL_0
,
591 .mask
= PMX_SMI_MASK
,
594 .reg
= PAD_DIRECTION_SEL_1
,
595 .mask
= PMX_SMINCS2_MASK
| PMX_SMINCS3_MASK
,
596 .val
= PMX_SMINCS2_MASK
| PMX_SMINCS3_MASK
,
600 static struct spear_modemux smi_4_chips_modemux
[] = {
602 .muxregs
= smi_4_chips_muxreg
,
603 .nmuxregs
= ARRAY_SIZE(smi_4_chips_muxreg
),
607 static struct spear_pingroup smi_4_chips_pingroup
= {
608 .name
= "smi_4_chips_grp",
609 .pins
= smi_4_chips_pins
,
610 .npins
= ARRAY_SIZE(smi_4_chips_pins
),
611 .modemuxs
= smi_4_chips_modemux
,
612 .nmodemuxs
= ARRAY_SIZE(smi_4_chips_modemux
),
615 static const char *const smi_grps
[] = { "smi_2_chips_grp", "smi_4_chips_grp" };
616 static struct spear_function smi_function
= {
619 .ngroups
= ARRAY_SIZE(smi_grps
),
622 /* Pad multiplexing for gmii device */
623 static const unsigned gmii_pins
[] = { 173, 174, 175, 176, 177, 178, 179, 180,
624 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
625 195, 196, 197, 198, 199, 200 };
626 static struct spear_muxreg gmii_muxreg
[] = {
628 .reg
= PAD_FUNCTION_EN_0
,
629 .mask
= PMX_GMII_MASK
,
630 .val
= PMX_GMII_MASK
,
632 .reg
= PAD_DIRECTION_SEL_0
,
633 .mask
= PMX_GMII_MASK
,
634 .val
= PMX_GMII_MASK
,
638 static struct spear_modemux gmii_modemux
[] = {
640 .muxregs
= gmii_muxreg
,
641 .nmuxregs
= ARRAY_SIZE(gmii_muxreg
),
645 static struct spear_pingroup gmii_pingroup
= {
648 .npins
= ARRAY_SIZE(gmii_pins
),
649 .modemuxs
= gmii_modemux
,
650 .nmodemuxs
= ARRAY_SIZE(gmii_modemux
),
653 static const char *const gmii_grps
[] = { "gmii_grp" };
654 static struct spear_function gmii_function
= {
657 .ngroups
= ARRAY_SIZE(gmii_grps
),
660 /* Pad multiplexing for rgmii device */
661 static const unsigned rgmii_pins
[] = { 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
662 28, 29, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 175,
663 180, 181, 182, 183, 185, 188, 193, 194, 195, 196, 197, 198, 211, 212 };
664 static struct spear_muxreg rgmii_muxreg
[] = {
666 .reg
= PAD_FUNCTION_EN_0
,
667 .mask
= PMX_RGMII_REG0_MASK
,
670 .reg
= PAD_FUNCTION_EN_1
,
671 .mask
= PMX_RGMII_REG1_MASK
,
674 .reg
= PAD_FUNCTION_EN_2
,
675 .mask
= PMX_RGMII_REG2_MASK
,
678 .reg
= PAD_DIRECTION_SEL_0
,
679 .mask
= PMX_RGMII_REG0_MASK
,
680 .val
= PMX_RGMII_REG0_MASK
,
682 .reg
= PAD_DIRECTION_SEL_1
,
683 .mask
= PMX_RGMII_REG1_MASK
,
684 .val
= PMX_RGMII_REG1_MASK
,
686 .reg
= PAD_DIRECTION_SEL_2
,
687 .mask
= PMX_RGMII_REG2_MASK
,
688 .val
= PMX_RGMII_REG2_MASK
,
692 static struct spear_modemux rgmii_modemux
[] = {
694 .muxregs
= rgmii_muxreg
,
695 .nmuxregs
= ARRAY_SIZE(rgmii_muxreg
),
699 static struct spear_pingroup rgmii_pingroup
= {
702 .npins
= ARRAY_SIZE(rgmii_pins
),
703 .modemuxs
= rgmii_modemux
,
704 .nmodemuxs
= ARRAY_SIZE(rgmii_modemux
),
707 static const char *const rgmii_grps
[] = { "rgmii_grp" };
708 static struct spear_function rgmii_function
= {
710 .groups
= rgmii_grps
,
711 .ngroups
= ARRAY_SIZE(rgmii_grps
),
714 /* Pad multiplexing for smii_0_1_2 device */
715 static const unsigned smii_0_1_2_pins
[] = { 24, 25, 26, 27, 28, 29, 30, 31, 32,
716 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
717 51, 52, 53, 54, 55 };
718 static struct spear_muxreg smii_0_1_2_muxreg
[] = {
720 .reg
= PAD_FUNCTION_EN_1
,
721 .mask
= PMX_SMII_0_1_2_MASK
,
724 .reg
= PAD_DIRECTION_SEL_1
,
725 .mask
= PMX_SMII_0_1_2_MASK
,
726 .val
= PMX_SMII_0_1_2_MASK
,
730 static struct spear_modemux smii_0_1_2_modemux
[] = {
732 .muxregs
= smii_0_1_2_muxreg
,
733 .nmuxregs
= ARRAY_SIZE(smii_0_1_2_muxreg
),
737 static struct spear_pingroup smii_0_1_2_pingroup
= {
738 .name
= "smii_0_1_2_grp",
739 .pins
= smii_0_1_2_pins
,
740 .npins
= ARRAY_SIZE(smii_0_1_2_pins
),
741 .modemuxs
= smii_0_1_2_modemux
,
742 .nmodemuxs
= ARRAY_SIZE(smii_0_1_2_modemux
),
745 static const char *const smii_0_1_2_grps
[] = { "smii_0_1_2_grp" };
746 static struct spear_function smii_0_1_2_function
= {
747 .name
= "smii_0_1_2",
748 .groups
= smii_0_1_2_grps
,
749 .ngroups
= ARRAY_SIZE(smii_0_1_2_grps
),
752 /* Pad multiplexing for ras_mii_txclk device */
753 static const unsigned ras_mii_txclk_pins
[] = { 98, 99 };
754 static struct spear_muxreg ras_mii_txclk_muxreg
[] = {
756 .reg
= PAD_FUNCTION_EN_1
,
757 .mask
= PMX_NFCE2_MASK
,
760 .reg
= PAD_DIRECTION_SEL_1
,
761 .mask
= PMX_NFCE2_MASK
,
762 .val
= PMX_NFCE2_MASK
,
766 static struct spear_modemux ras_mii_txclk_modemux
[] = {
768 .muxregs
= ras_mii_txclk_muxreg
,
769 .nmuxregs
= ARRAY_SIZE(ras_mii_txclk_muxreg
),
773 static struct spear_pingroup ras_mii_txclk_pingroup
= {
774 .name
= "ras_mii_txclk_grp",
775 .pins
= ras_mii_txclk_pins
,
776 .npins
= ARRAY_SIZE(ras_mii_txclk_pins
),
777 .modemuxs
= ras_mii_txclk_modemux
,
778 .nmodemuxs
= ARRAY_SIZE(ras_mii_txclk_modemux
),
781 static const char *const ras_mii_txclk_grps
[] = { "ras_mii_txclk_grp" };
782 static struct spear_function ras_mii_txclk_function
= {
783 .name
= "ras_mii_txclk",
784 .groups
= ras_mii_txclk_grps
,
785 .ngroups
= ARRAY_SIZE(ras_mii_txclk_grps
),
788 /* Pad multiplexing for nand 8bit device (cs0 only) */
789 static const unsigned nand_8bit_pins
[] = { 56, 57, 58, 59, 60, 61, 62, 63, 64,
790 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
791 83, 84, 85, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
792 170, 171, 172, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
794 static struct spear_muxreg nand_8bit_muxreg
[] = {
796 .reg
= PAD_FUNCTION_EN_0
,
797 .mask
= PMX_NAND8BIT_0_MASK
,
798 .val
= PMX_NAND8BIT_0_MASK
,
800 .reg
= PAD_FUNCTION_EN_1
,
801 .mask
= PMX_NAND8BIT_1_MASK
,
802 .val
= PMX_NAND8BIT_1_MASK
,
804 .reg
= PAD_DIRECTION_SEL_0
,
805 .mask
= PMX_NAND8BIT_0_MASK
,
806 .val
= PMX_NAND8BIT_0_MASK
,
808 .reg
= PAD_DIRECTION_SEL_1
,
809 .mask
= PMX_NAND8BIT_1_MASK
,
810 .val
= PMX_NAND8BIT_1_MASK
,
814 static struct spear_modemux nand_8bit_modemux
[] = {
816 .muxregs
= nand_8bit_muxreg
,
817 .nmuxregs
= ARRAY_SIZE(nand_8bit_muxreg
),
821 static struct spear_pingroup nand_8bit_pingroup
= {
822 .name
= "nand_8bit_grp",
823 .pins
= nand_8bit_pins
,
824 .npins
= ARRAY_SIZE(nand_8bit_pins
),
825 .modemuxs
= nand_8bit_modemux
,
826 .nmodemuxs
= ARRAY_SIZE(nand_8bit_modemux
),
829 /* Pad multiplexing for nand 16bit device */
830 static const unsigned nand_16bit_pins
[] = { 201, 202, 203, 204, 207, 208, 209,
832 static struct spear_muxreg nand_16bit_muxreg
[] = {
834 .reg
= PAD_FUNCTION_EN_1
,
835 .mask
= PMX_NAND16BIT_1_MASK
,
836 .val
= PMX_NAND16BIT_1_MASK
,
838 .reg
= PAD_DIRECTION_SEL_1
,
839 .mask
= PMX_NAND16BIT_1_MASK
,
840 .val
= PMX_NAND16BIT_1_MASK
,
844 static struct spear_modemux nand_16bit_modemux
[] = {
846 .muxregs
= nand_16bit_muxreg
,
847 .nmuxregs
= ARRAY_SIZE(nand_16bit_muxreg
),
851 static struct spear_pingroup nand_16bit_pingroup
= {
852 .name
= "nand_16bit_grp",
853 .pins
= nand_16bit_pins
,
854 .npins
= ARRAY_SIZE(nand_16bit_pins
),
855 .modemuxs
= nand_16bit_modemux
,
856 .nmodemuxs
= ARRAY_SIZE(nand_16bit_modemux
),
859 /* Pad multiplexing for nand 4 chips */
860 static const unsigned nand_4_chips_pins
[] = { 205, 206, 211, 212 };
861 static struct spear_muxreg nand_4_chips_muxreg
[] = {
863 .reg
= PAD_FUNCTION_EN_1
,
864 .mask
= PMX_NAND_4CHIPS_MASK
,
865 .val
= PMX_NAND_4CHIPS_MASK
,
867 .reg
= PAD_DIRECTION_SEL_1
,
868 .mask
= PMX_NAND_4CHIPS_MASK
,
869 .val
= PMX_NAND_4CHIPS_MASK
,
873 static struct spear_modemux nand_4_chips_modemux
[] = {
875 .muxregs
= nand_4_chips_muxreg
,
876 .nmuxregs
= ARRAY_SIZE(nand_4_chips_muxreg
),
880 static struct spear_pingroup nand_4_chips_pingroup
= {
881 .name
= "nand_4_chips_grp",
882 .pins
= nand_4_chips_pins
,
883 .npins
= ARRAY_SIZE(nand_4_chips_pins
),
884 .modemuxs
= nand_4_chips_modemux
,
885 .nmodemuxs
= ARRAY_SIZE(nand_4_chips_modemux
),
888 static const char *const nand_grps
[] = { "nand_8bit_grp", "nand_16bit_grp",
889 "nand_4_chips_grp" };
890 static struct spear_function nand_function
= {
893 .ngroups
= ARRAY_SIZE(nand_grps
),
896 /* Pad multiplexing for keyboard_6x6 device */
897 static const unsigned keyboard_6x6_pins
[] = { 201, 202, 203, 204, 205, 206, 207,
898 208, 209, 210, 211, 212 };
899 static struct spear_muxreg keyboard_6x6_muxreg
[] = {
901 .reg
= PAD_FUNCTION_EN_1
,
902 .mask
= PMX_KEYBOARD_6X6_MASK
| PMX_NFIO8_15_MASK
|
903 PMX_NFCE1_MASK
| PMX_NFCE2_MASK
| PMX_NFWPRT1_MASK
|
905 .val
= PMX_KEYBOARD_6X6_MASK
,
909 static struct spear_modemux keyboard_6x6_modemux
[] = {
911 .muxregs
= keyboard_6x6_muxreg
,
912 .nmuxregs
= ARRAY_SIZE(keyboard_6x6_muxreg
),
916 static struct spear_pingroup keyboard_6x6_pingroup
= {
917 .name
= "keyboard_6x6_grp",
918 .pins
= keyboard_6x6_pins
,
919 .npins
= ARRAY_SIZE(keyboard_6x6_pins
),
920 .modemuxs
= keyboard_6x6_modemux
,
921 .nmodemuxs
= ARRAY_SIZE(keyboard_6x6_modemux
),
924 /* Pad multiplexing for keyboard_rowcol6_8 device */
925 static const unsigned keyboard_rowcol6_8_pins
[] = { 24, 25, 26, 27, 28, 29 };
926 static struct spear_muxreg keyboard_rowcol6_8_muxreg
[] = {
928 .reg
= PAD_FUNCTION_EN_1
,
929 .mask
= PMX_KBD_ROWCOL68_MASK
,
930 .val
= PMX_KBD_ROWCOL68_MASK
,
932 .reg
= PAD_DIRECTION_SEL_1
,
933 .mask
= PMX_KBD_ROWCOL68_MASK
,
934 .val
= PMX_KBD_ROWCOL68_MASK
,
938 static struct spear_modemux keyboard_rowcol6_8_modemux
[] = {
940 .muxregs
= keyboard_rowcol6_8_muxreg
,
941 .nmuxregs
= ARRAY_SIZE(keyboard_rowcol6_8_muxreg
),
945 static struct spear_pingroup keyboard_rowcol6_8_pingroup
= {
946 .name
= "keyboard_rowcol6_8_grp",
947 .pins
= keyboard_rowcol6_8_pins
,
948 .npins
= ARRAY_SIZE(keyboard_rowcol6_8_pins
),
949 .modemuxs
= keyboard_rowcol6_8_modemux
,
950 .nmodemuxs
= ARRAY_SIZE(keyboard_rowcol6_8_modemux
),
953 static const char *const keyboard_grps
[] = { "keyboard_6x6_grp",
954 "keyboard_rowcol6_8_grp" };
955 static struct spear_function keyboard_function
= {
957 .groups
= keyboard_grps
,
958 .ngroups
= ARRAY_SIZE(keyboard_grps
),
961 /* Pad multiplexing for uart0 device */
962 static const unsigned uart0_pins
[] = { 100, 101 };
963 static struct spear_muxreg uart0_muxreg
[] = {
965 .reg
= PAD_FUNCTION_EN_0
,
966 .mask
= PMX_UART0_MASK
,
967 .val
= PMX_UART0_MASK
,
969 .reg
= PAD_DIRECTION_SEL_0
,
970 .mask
= PMX_UART0_MASK
,
971 .val
= PMX_UART0_MASK
,
975 static struct spear_modemux uart0_modemux
[] = {
977 .muxregs
= uart0_muxreg
,
978 .nmuxregs
= ARRAY_SIZE(uart0_muxreg
),
982 static struct spear_pingroup uart0_pingroup
= {
985 .npins
= ARRAY_SIZE(uart0_pins
),
986 .modemuxs
= uart0_modemux
,
987 .nmodemuxs
= ARRAY_SIZE(uart0_modemux
),
990 /* Pad multiplexing for uart0_modem device */
991 static const unsigned uart0_modem_pins
[] = { 12, 13, 14, 15, 16, 17 };
992 static struct spear_muxreg uart0_modem_muxreg
[] = {
994 .reg
= PAD_FUNCTION_EN_1
,
995 .mask
= PMX_UART0_MODEM_MASK
,
996 .val
= PMX_UART0_MODEM_MASK
,
998 .reg
= PAD_DIRECTION_SEL_1
,
999 .mask
= PMX_UART0_MODEM_MASK
,
1000 .val
= PMX_UART0_MODEM_MASK
,
1004 static struct spear_modemux uart0_modem_modemux
[] = {
1006 .muxregs
= uart0_modem_muxreg
,
1007 .nmuxregs
= ARRAY_SIZE(uart0_modem_muxreg
),
1011 static struct spear_pingroup uart0_modem_pingroup
= {
1012 .name
= "uart0_modem_grp",
1013 .pins
= uart0_modem_pins
,
1014 .npins
= ARRAY_SIZE(uart0_modem_pins
),
1015 .modemuxs
= uart0_modem_modemux
,
1016 .nmodemuxs
= ARRAY_SIZE(uart0_modem_modemux
),
1019 static const char *const uart0_grps
[] = { "uart0_grp", "uart0_modem_grp" };
1020 static struct spear_function uart0_function
= {
1022 .groups
= uart0_grps
,
1023 .ngroups
= ARRAY_SIZE(uart0_grps
),
1026 /* Pad multiplexing for gpt0_tmr0 device */
1027 static const unsigned gpt0_tmr0_pins
[] = { 10, 11 };
1028 static struct spear_muxreg gpt0_tmr0_muxreg
[] = {
1030 .reg
= PAD_FUNCTION_EN_1
,
1031 .mask
= PMX_GPT0_TMR0_MASK
,
1032 .val
= PMX_GPT0_TMR0_MASK
,
1034 .reg
= PAD_DIRECTION_SEL_1
,
1035 .mask
= PMX_GPT0_TMR0_MASK
,
1036 .val
= PMX_GPT0_TMR0_MASK
,
1040 static struct spear_modemux gpt0_tmr0_modemux
[] = {
1042 .muxregs
= gpt0_tmr0_muxreg
,
1043 .nmuxregs
= ARRAY_SIZE(gpt0_tmr0_muxreg
),
1047 static struct spear_pingroup gpt0_tmr0_pingroup
= {
1048 .name
= "gpt0_tmr0_grp",
1049 .pins
= gpt0_tmr0_pins
,
1050 .npins
= ARRAY_SIZE(gpt0_tmr0_pins
),
1051 .modemuxs
= gpt0_tmr0_modemux
,
1052 .nmodemuxs
= ARRAY_SIZE(gpt0_tmr0_modemux
),
1055 /* Pad multiplexing for gpt0_tmr1 device */
1056 static const unsigned gpt0_tmr1_pins
[] = { 8, 9 };
1057 static struct spear_muxreg gpt0_tmr1_muxreg
[] = {
1059 .reg
= PAD_FUNCTION_EN_1
,
1060 .mask
= PMX_GPT0_TMR1_MASK
,
1061 .val
= PMX_GPT0_TMR1_MASK
,
1063 .reg
= PAD_DIRECTION_SEL_1
,
1064 .mask
= PMX_GPT0_TMR1_MASK
,
1065 .val
= PMX_GPT0_TMR1_MASK
,
1069 static struct spear_modemux gpt0_tmr1_modemux
[] = {
1071 .muxregs
= gpt0_tmr1_muxreg
,
1072 .nmuxregs
= ARRAY_SIZE(gpt0_tmr1_muxreg
),
1076 static struct spear_pingroup gpt0_tmr1_pingroup
= {
1077 .name
= "gpt0_tmr1_grp",
1078 .pins
= gpt0_tmr1_pins
,
1079 .npins
= ARRAY_SIZE(gpt0_tmr1_pins
),
1080 .modemuxs
= gpt0_tmr1_modemux
,
1081 .nmodemuxs
= ARRAY_SIZE(gpt0_tmr1_modemux
),
1084 static const char *const gpt0_grps
[] = { "gpt0_tmr0_grp", "gpt0_tmr1_grp" };
1085 static struct spear_function gpt0_function
= {
1087 .groups
= gpt0_grps
,
1088 .ngroups
= ARRAY_SIZE(gpt0_grps
),
1091 /* Pad multiplexing for gpt1_tmr0 device */
1092 static const unsigned gpt1_tmr0_pins
[] = { 6, 7 };
1093 static struct spear_muxreg gpt1_tmr0_muxreg
[] = {
1095 .reg
= PAD_FUNCTION_EN_1
,
1096 .mask
= PMX_GPT1_TMR0_MASK
,
1097 .val
= PMX_GPT1_TMR0_MASK
,
1099 .reg
= PAD_DIRECTION_SEL_1
,
1100 .mask
= PMX_GPT1_TMR0_MASK
,
1101 .val
= PMX_GPT1_TMR0_MASK
,
1105 static struct spear_modemux gpt1_tmr0_modemux
[] = {
1107 .muxregs
= gpt1_tmr0_muxreg
,
1108 .nmuxregs
= ARRAY_SIZE(gpt1_tmr0_muxreg
),
1112 static struct spear_pingroup gpt1_tmr0_pingroup
= {
1113 .name
= "gpt1_tmr0_grp",
1114 .pins
= gpt1_tmr0_pins
,
1115 .npins
= ARRAY_SIZE(gpt1_tmr0_pins
),
1116 .modemuxs
= gpt1_tmr0_modemux
,
1117 .nmodemuxs
= ARRAY_SIZE(gpt1_tmr0_modemux
),
1120 /* Pad multiplexing for gpt1_tmr1 device */
1121 static const unsigned gpt1_tmr1_pins
[] = { 4, 5 };
1122 static struct spear_muxreg gpt1_tmr1_muxreg
[] = {
1124 .reg
= PAD_FUNCTION_EN_1
,
1125 .mask
= PMX_GPT1_TMR1_MASK
,
1126 .val
= PMX_GPT1_TMR1_MASK
,
1128 .reg
= PAD_DIRECTION_SEL_1
,
1129 .mask
= PMX_GPT1_TMR1_MASK
,
1130 .val
= PMX_GPT1_TMR1_MASK
,
1134 static struct spear_modemux gpt1_tmr1_modemux
[] = {
1136 .muxregs
= gpt1_tmr1_muxreg
,
1137 .nmuxregs
= ARRAY_SIZE(gpt1_tmr1_muxreg
),
1141 static struct spear_pingroup gpt1_tmr1_pingroup
= {
1142 .name
= "gpt1_tmr1_grp",
1143 .pins
= gpt1_tmr1_pins
,
1144 .npins
= ARRAY_SIZE(gpt1_tmr1_pins
),
1145 .modemuxs
= gpt1_tmr1_modemux
,
1146 .nmodemuxs
= ARRAY_SIZE(gpt1_tmr1_modemux
),
1149 static const char *const gpt1_grps
[] = { "gpt1_tmr1_grp", "gpt1_tmr0_grp" };
1150 static struct spear_function gpt1_function
= {
1152 .groups
= gpt1_grps
,
1153 .ngroups
= ARRAY_SIZE(gpt1_grps
),
1156 /* Pad multiplexing for mcif device */
1157 static const unsigned mcif_pins
[] = { 86, 87, 88, 89, 90, 91, 92, 93, 213, 214,
1158 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
1159 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
1161 #define MCIF_MUXREG \
1163 .reg = PAD_FUNCTION_EN_0, \
1164 .mask = PMX_MCI_DATA8_15_MASK, \
1165 .val = PMX_MCI_DATA8_15_MASK, \
1167 .reg = PAD_FUNCTION_EN_1, \
1168 .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \
1170 .val = PMX_MCIFALL_1_MASK, \
1172 .reg = PAD_FUNCTION_EN_2, \
1173 .mask = PMX_MCIFALL_2_MASK, \
1174 .val = PMX_MCIFALL_2_MASK, \
1176 .reg = PAD_DIRECTION_SEL_0, \
1177 .mask = PMX_MCI_DATA8_15_MASK, \
1178 .val = PMX_MCI_DATA8_15_MASK, \
1180 .reg = PAD_DIRECTION_SEL_1, \
1181 .mask = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \
1183 .val = PMX_MCIFALL_1_MASK | PMX_NFWPRT1_MASK | \
1186 .reg = PAD_DIRECTION_SEL_2, \
1187 .mask = PMX_MCIFALL_2_MASK, \
1188 .val = PMX_MCIFALL_2_MASK, \
1192 static struct spear_muxreg sdhci_muxreg
[] = {
1196 .mask
= MCIF_SEL_MASK
,
1201 static struct spear_modemux sdhci_modemux
[] = {
1203 .muxregs
= sdhci_muxreg
,
1204 .nmuxregs
= ARRAY_SIZE(sdhci_muxreg
),
1208 static struct spear_pingroup sdhci_pingroup
= {
1209 .name
= "sdhci_grp",
1211 .npins
= ARRAY_SIZE(mcif_pins
),
1212 .modemuxs
= sdhci_modemux
,
1213 .nmodemuxs
= ARRAY_SIZE(sdhci_modemux
),
1216 static const char *const sdhci_grps
[] = { "sdhci_grp" };
1217 static struct spear_function sdhci_function
= {
1219 .groups
= sdhci_grps
,
1220 .ngroups
= ARRAY_SIZE(sdhci_grps
),
1224 static struct spear_muxreg cf_muxreg
[] = {
1228 .mask
= MCIF_SEL_MASK
,
1233 static struct spear_modemux cf_modemux
[] = {
1235 .muxregs
= cf_muxreg
,
1236 .nmuxregs
= ARRAY_SIZE(cf_muxreg
),
1240 static struct spear_pingroup cf_pingroup
= {
1243 .npins
= ARRAY_SIZE(mcif_pins
),
1244 .modemuxs
= cf_modemux
,
1245 .nmodemuxs
= ARRAY_SIZE(cf_modemux
),
1248 static const char *const cf_grps
[] = { "cf_grp" };
1249 static struct spear_function cf_function
= {
1252 .ngroups
= ARRAY_SIZE(cf_grps
),
1256 static struct spear_muxreg xd_muxreg
[] = {
1260 .mask
= MCIF_SEL_MASK
,
1265 static struct spear_modemux xd_modemux
[] = {
1267 .muxregs
= xd_muxreg
,
1268 .nmuxregs
= ARRAY_SIZE(xd_muxreg
),
1272 static struct spear_pingroup xd_pingroup
= {
1275 .npins
= ARRAY_SIZE(mcif_pins
),
1276 .modemuxs
= xd_modemux
,
1277 .nmodemuxs
= ARRAY_SIZE(xd_modemux
),
1280 static const char *const xd_grps
[] = { "xd_grp" };
1281 static struct spear_function xd_function
= {
1284 .ngroups
= ARRAY_SIZE(xd_grps
),
1287 /* Pad multiplexing for touch_xy device */
1288 static const unsigned touch_xy_pins
[] = { 97 };
1289 static struct spear_muxreg touch_xy_muxreg
[] = {
1291 .reg
= PAD_FUNCTION_EN_2
,
1292 .mask
= PMX_TOUCH_XY_MASK
,
1293 .val
= PMX_TOUCH_XY_MASK
,
1295 .reg
= PAD_DIRECTION_SEL_2
,
1296 .mask
= PMX_TOUCH_XY_MASK
,
1297 .val
= PMX_TOUCH_XY_MASK
,
1301 static struct spear_modemux touch_xy_modemux
[] = {
1303 .muxregs
= touch_xy_muxreg
,
1304 .nmuxregs
= ARRAY_SIZE(touch_xy_muxreg
),
1308 static struct spear_pingroup touch_xy_pingroup
= {
1309 .name
= "touch_xy_grp",
1310 .pins
= touch_xy_pins
,
1311 .npins
= ARRAY_SIZE(touch_xy_pins
),
1312 .modemuxs
= touch_xy_modemux
,
1313 .nmodemuxs
= ARRAY_SIZE(touch_xy_modemux
),
1316 static const char *const touch_xy_grps
[] = { "touch_xy_grp" };
1317 static struct spear_function touch_xy_function
= {
1318 .name
= "touchscreen",
1319 .groups
= touch_xy_grps
,
1320 .ngroups
= ARRAY_SIZE(touch_xy_grps
),
1323 /* Pad multiplexing for uart1 device */
1324 /* Muxed with I2C */
1325 static const unsigned uart1_dis_i2c_pins
[] = { 102, 103 };
1326 static struct spear_muxreg uart1_dis_i2c_muxreg
[] = {
1328 .reg
= PAD_FUNCTION_EN_0
,
1329 .mask
= PMX_I2C0_MASK
,
1332 .reg
= PAD_DIRECTION_SEL_0
,
1333 .mask
= PMX_I2C0_MASK
,
1334 .val
= PMX_I2C0_MASK
,
1338 static struct spear_modemux uart1_dis_i2c_modemux
[] = {
1340 .muxregs
= uart1_dis_i2c_muxreg
,
1341 .nmuxregs
= ARRAY_SIZE(uart1_dis_i2c_muxreg
),
1345 static struct spear_pingroup uart_1_dis_i2c_pingroup
= {
1346 .name
= "uart1_disable_i2c_grp",
1347 .pins
= uart1_dis_i2c_pins
,
1348 .npins
= ARRAY_SIZE(uart1_dis_i2c_pins
),
1349 .modemuxs
= uart1_dis_i2c_modemux
,
1350 .nmodemuxs
= ARRAY_SIZE(uart1_dis_i2c_modemux
),
1353 /* Muxed with SD/MMC */
1354 static const unsigned uart1_dis_sd_pins
[] = { 214, 215 };
1355 static struct spear_muxreg uart1_dis_sd_muxreg
[] = {
1357 .reg
= PAD_FUNCTION_EN_1
,
1358 .mask
= PMX_MCIDATA1_MASK
|
1362 .reg
= PAD_DIRECTION_SEL_1
,
1363 .mask
= PMX_MCIDATA1_MASK
|
1365 .val
= PMX_MCIDATA1_MASK
|
1370 static struct spear_modemux uart1_dis_sd_modemux
[] = {
1372 .muxregs
= uart1_dis_sd_muxreg
,
1373 .nmuxregs
= ARRAY_SIZE(uart1_dis_sd_muxreg
),
1377 static struct spear_pingroup uart_1_dis_sd_pingroup
= {
1378 .name
= "uart1_disable_sd_grp",
1379 .pins
= uart1_dis_sd_pins
,
1380 .npins
= ARRAY_SIZE(uart1_dis_sd_pins
),
1381 .modemuxs
= uart1_dis_sd_modemux
,
1382 .nmodemuxs
= ARRAY_SIZE(uart1_dis_sd_modemux
),
1385 static const char *const uart1_grps
[] = { "uart1_disable_i2c_grp",
1386 "uart1_disable_sd_grp" };
1387 static struct spear_function uart1_function
= {
1389 .groups
= uart1_grps
,
1390 .ngroups
= ARRAY_SIZE(uart1_grps
),
1393 /* Pad multiplexing for uart2_3 device */
1394 static const unsigned uart2_3_pins
[] = { 104, 105, 106, 107 };
1395 static struct spear_muxreg uart2_3_muxreg
[] = {
1397 .reg
= PAD_FUNCTION_EN_0
,
1398 .mask
= PMX_I2S0_MASK
,
1401 .reg
= PAD_DIRECTION_SEL_0
,
1402 .mask
= PMX_I2S0_MASK
,
1403 .val
= PMX_I2S0_MASK
,
1407 static struct spear_modemux uart2_3_modemux
[] = {
1409 .muxregs
= uart2_3_muxreg
,
1410 .nmuxregs
= ARRAY_SIZE(uart2_3_muxreg
),
1414 static struct spear_pingroup uart_2_3_pingroup
= {
1415 .name
= "uart2_3_grp",
1416 .pins
= uart2_3_pins
,
1417 .npins
= ARRAY_SIZE(uart2_3_pins
),
1418 .modemuxs
= uart2_3_modemux
,
1419 .nmodemuxs
= ARRAY_SIZE(uart2_3_modemux
),
1422 static const char *const uart2_3_grps
[] = { "uart2_3_grp" };
1423 static struct spear_function uart2_3_function
= {
1425 .groups
= uart2_3_grps
,
1426 .ngroups
= ARRAY_SIZE(uart2_3_grps
),
1429 /* Pad multiplexing for uart4 device */
1430 static const unsigned uart4_pins
[] = { 108, 113 };
1431 static struct spear_muxreg uart4_muxreg
[] = {
1433 .reg
= PAD_FUNCTION_EN_0
,
1434 .mask
= PMX_I2S0_MASK
| PMX_CLCD1_MASK
,
1437 .reg
= PAD_DIRECTION_SEL_0
,
1438 .mask
= PMX_I2S0_MASK
| PMX_CLCD1_MASK
,
1439 .val
= PMX_I2S0_MASK
| PMX_CLCD1_MASK
,
1443 static struct spear_modemux uart4_modemux
[] = {
1445 .muxregs
= uart4_muxreg
,
1446 .nmuxregs
= ARRAY_SIZE(uart4_muxreg
),
1450 static struct spear_pingroup uart_4_pingroup
= {
1451 .name
= "uart4_grp",
1453 .npins
= ARRAY_SIZE(uart4_pins
),
1454 .modemuxs
= uart4_modemux
,
1455 .nmodemuxs
= ARRAY_SIZE(uart4_modemux
),
1458 static const char *const uart4_grps
[] = { "uart4_grp" };
1459 static struct spear_function uart4_function
= {
1461 .groups
= uart4_grps
,
1462 .ngroups
= ARRAY_SIZE(uart4_grps
),
1465 /* Pad multiplexing for uart5 device */
1466 static const unsigned uart5_pins
[] = { 114, 115 };
1467 static struct spear_muxreg uart5_muxreg
[] = {
1469 .reg
= PAD_FUNCTION_EN_0
,
1470 .mask
= PMX_CLCD1_MASK
,
1473 .reg
= PAD_DIRECTION_SEL_0
,
1474 .mask
= PMX_CLCD1_MASK
,
1475 .val
= PMX_CLCD1_MASK
,
1479 static struct spear_modemux uart5_modemux
[] = {
1481 .muxregs
= uart5_muxreg
,
1482 .nmuxregs
= ARRAY_SIZE(uart5_muxreg
),
1486 static struct spear_pingroup uart_5_pingroup
= {
1487 .name
= "uart5_grp",
1489 .npins
= ARRAY_SIZE(uart5_pins
),
1490 .modemuxs
= uart5_modemux
,
1491 .nmodemuxs
= ARRAY_SIZE(uart5_modemux
),
1494 static const char *const uart5_grps
[] = { "uart5_grp" };
1495 static struct spear_function uart5_function
= {
1497 .groups
= uart5_grps
,
1498 .ngroups
= ARRAY_SIZE(uart5_grps
),
1501 /* Pad multiplexing for rs485_0_1_tdm_0_1 device */
1502 static const unsigned rs485_0_1_tdm_0_1_pins
[] = { 116, 117, 118, 119, 120, 121,
1503 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
1505 static struct spear_muxreg rs485_0_1_tdm_0_1_muxreg
[] = {
1507 .reg
= PAD_FUNCTION_EN_0
,
1508 .mask
= PMX_CLCD1_MASK
,
1511 .reg
= PAD_DIRECTION_SEL_0
,
1512 .mask
= PMX_CLCD1_MASK
,
1513 .val
= PMX_CLCD1_MASK
,
1517 static struct spear_modemux rs485_0_1_tdm_0_1_modemux
[] = {
1519 .muxregs
= rs485_0_1_tdm_0_1_muxreg
,
1520 .nmuxregs
= ARRAY_SIZE(rs485_0_1_tdm_0_1_muxreg
),
1524 static struct spear_pingroup rs485_0_1_tdm_0_1_pingroup
= {
1525 .name
= "rs485_0_1_tdm_0_1_grp",
1526 .pins
= rs485_0_1_tdm_0_1_pins
,
1527 .npins
= ARRAY_SIZE(rs485_0_1_tdm_0_1_pins
),
1528 .modemuxs
= rs485_0_1_tdm_0_1_modemux
,
1529 .nmodemuxs
= ARRAY_SIZE(rs485_0_1_tdm_0_1_modemux
),
1532 static const char *const rs485_0_1_tdm_0_1_grps
[] = { "rs485_0_1_tdm_0_1_grp" };
1533 static struct spear_function rs485_0_1_tdm_0_1_function
= {
1534 .name
= "rs485_0_1_tdm_0_1",
1535 .groups
= rs485_0_1_tdm_0_1_grps
,
1536 .ngroups
= ARRAY_SIZE(rs485_0_1_tdm_0_1_grps
),
1539 /* Pad multiplexing for i2c_1_2 device */
1540 static const unsigned i2c_1_2_pins
[] = { 138, 139, 140, 141 };
1541 static struct spear_muxreg i2c_1_2_muxreg
[] = {
1543 .reg
= PAD_FUNCTION_EN_0
,
1544 .mask
= PMX_CLCD1_MASK
,
1547 .reg
= PAD_DIRECTION_SEL_0
,
1548 .mask
= PMX_CLCD1_MASK
,
1549 .val
= PMX_CLCD1_MASK
,
1553 static struct spear_modemux i2c_1_2_modemux
[] = {
1555 .muxregs
= i2c_1_2_muxreg
,
1556 .nmuxregs
= ARRAY_SIZE(i2c_1_2_muxreg
),
1560 static struct spear_pingroup i2c_1_2_pingroup
= {
1561 .name
= "i2c_1_2_grp",
1562 .pins
= i2c_1_2_pins
,
1563 .npins
= ARRAY_SIZE(i2c_1_2_pins
),
1564 .modemuxs
= i2c_1_2_modemux
,
1565 .nmodemuxs
= ARRAY_SIZE(i2c_1_2_modemux
),
1568 static const char *const i2c_1_2_grps
[] = { "i2c_1_2_grp" };
1569 static struct spear_function i2c_1_2_function
= {
1571 .groups
= i2c_1_2_grps
,
1572 .ngroups
= ARRAY_SIZE(i2c_1_2_grps
),
1575 /* Pad multiplexing for i2c3_dis_smi_clcd device */
1576 /* Muxed with SMI & CLCD */
1577 static const unsigned i2c3_dis_smi_clcd_pins
[] = { 142, 153 };
1578 static struct spear_muxreg i2c3_dis_smi_clcd_muxreg
[] = {
1580 .reg
= PAD_FUNCTION_EN_0
,
1581 .mask
= PMX_CLCD1_MASK
| PMX_SMI_MASK
,
1584 .reg
= PAD_DIRECTION_SEL_0
,
1585 .mask
= PMX_CLCD1_MASK
| PMX_SMI_MASK
,
1586 .val
= PMX_CLCD1_MASK
| PMX_SMI_MASK
,
1590 static struct spear_modemux i2c3_dis_smi_clcd_modemux
[] = {
1592 .muxregs
= i2c3_dis_smi_clcd_muxreg
,
1593 .nmuxregs
= ARRAY_SIZE(i2c3_dis_smi_clcd_muxreg
),
1597 static struct spear_pingroup i2c3_dis_smi_clcd_pingroup
= {
1598 .name
= "i2c3_dis_smi_clcd_grp",
1599 .pins
= i2c3_dis_smi_clcd_pins
,
1600 .npins
= ARRAY_SIZE(i2c3_dis_smi_clcd_pins
),
1601 .modemuxs
= i2c3_dis_smi_clcd_modemux
,
1602 .nmodemuxs
= ARRAY_SIZE(i2c3_dis_smi_clcd_modemux
),
1605 /* Pad multiplexing for i2c3_dis_sd_i2s0 device */
1606 /* Muxed with SD/MMC & I2S1 */
1607 static const unsigned i2c3_dis_sd_i2s0_pins
[] = { 0, 216 };
1608 static struct spear_muxreg i2c3_dis_sd_i2s0_muxreg
[] = {
1610 .reg
= PAD_FUNCTION_EN_1
,
1611 .mask
= PMX_I2S1_MASK
| PMX_MCIDATA3_MASK
,
1614 .reg
= PAD_DIRECTION_SEL_1
,
1615 .mask
= PMX_I2S1_MASK
| PMX_MCIDATA3_MASK
,
1616 .val
= PMX_I2S1_MASK
| PMX_MCIDATA3_MASK
,
1620 static struct spear_modemux i2c3_dis_sd_i2s0_modemux
[] = {
1622 .muxregs
= i2c3_dis_sd_i2s0_muxreg
,
1623 .nmuxregs
= ARRAY_SIZE(i2c3_dis_sd_i2s0_muxreg
),
1627 static struct spear_pingroup i2c3_dis_sd_i2s0_pingroup
= {
1628 .name
= "i2c3_dis_sd_i2s0_grp",
1629 .pins
= i2c3_dis_sd_i2s0_pins
,
1630 .npins
= ARRAY_SIZE(i2c3_dis_sd_i2s0_pins
),
1631 .modemuxs
= i2c3_dis_sd_i2s0_modemux
,
1632 .nmodemuxs
= ARRAY_SIZE(i2c3_dis_sd_i2s0_modemux
),
1635 static const char *const i2c3_grps
[] = { "i2c3_dis_smi_clcd_grp",
1636 "i2c3_dis_sd_i2s0_grp" };
1637 static struct spear_function i2c3_unction
= {
1638 .name
= "i2c3_i2s1",
1639 .groups
= i2c3_grps
,
1640 .ngroups
= ARRAY_SIZE(i2c3_grps
),
1643 /* Pad multiplexing for i2c_4_5_dis_smi device */
1644 /* Muxed with SMI */
1645 static const unsigned i2c_4_5_dis_smi_pins
[] = { 154, 155, 156, 157 };
1646 static struct spear_muxreg i2c_4_5_dis_smi_muxreg
[] = {
1648 .reg
= PAD_FUNCTION_EN_0
,
1649 .mask
= PMX_SMI_MASK
,
1652 .reg
= PAD_DIRECTION_SEL_0
,
1653 .mask
= PMX_SMI_MASK
,
1654 .val
= PMX_SMI_MASK
,
1658 static struct spear_modemux i2c_4_5_dis_smi_modemux
[] = {
1660 .muxregs
= i2c_4_5_dis_smi_muxreg
,
1661 .nmuxregs
= ARRAY_SIZE(i2c_4_5_dis_smi_muxreg
),
1665 static struct spear_pingroup i2c_4_5_dis_smi_pingroup
= {
1666 .name
= "i2c_4_5_dis_smi_grp",
1667 .pins
= i2c_4_5_dis_smi_pins
,
1668 .npins
= ARRAY_SIZE(i2c_4_5_dis_smi_pins
),
1669 .modemuxs
= i2c_4_5_dis_smi_modemux
,
1670 .nmodemuxs
= ARRAY_SIZE(i2c_4_5_dis_smi_modemux
),
1673 /* Pad multiplexing for i2c4_dis_sd device */
1674 /* Muxed with SD/MMC */
1675 static const unsigned i2c4_dis_sd_pins
[] = { 217, 218 };
1676 static struct spear_muxreg i2c4_dis_sd_muxreg
[] = {
1678 .reg
= PAD_FUNCTION_EN_1
,
1679 .mask
= PMX_MCIDATA4_MASK
,
1682 .reg
= PAD_FUNCTION_EN_2
,
1683 .mask
= PMX_MCIDATA5_MASK
,
1686 .reg
= PAD_DIRECTION_SEL_1
,
1687 .mask
= PMX_MCIDATA4_MASK
,
1688 .val
= PMX_MCIDATA4_MASK
,
1690 .reg
= PAD_DIRECTION_SEL_2
,
1691 .mask
= PMX_MCIDATA5_MASK
,
1692 .val
= PMX_MCIDATA5_MASK
,
1696 static struct spear_modemux i2c4_dis_sd_modemux
[] = {
1698 .muxregs
= i2c4_dis_sd_muxreg
,
1699 .nmuxregs
= ARRAY_SIZE(i2c4_dis_sd_muxreg
),
1703 static struct spear_pingroup i2c4_dis_sd_pingroup
= {
1704 .name
= "i2c4_dis_sd_grp",
1705 .pins
= i2c4_dis_sd_pins
,
1706 .npins
= ARRAY_SIZE(i2c4_dis_sd_pins
),
1707 .modemuxs
= i2c4_dis_sd_modemux
,
1708 .nmodemuxs
= ARRAY_SIZE(i2c4_dis_sd_modemux
),
1711 /* Pad multiplexing for i2c5_dis_sd device */
1712 /* Muxed with SD/MMC */
1713 static const unsigned i2c5_dis_sd_pins
[] = { 219, 220 };
1714 static struct spear_muxreg i2c5_dis_sd_muxreg
[] = {
1716 .reg
= PAD_FUNCTION_EN_2
,
1717 .mask
= PMX_MCIDATA6_MASK
|
1721 .reg
= PAD_DIRECTION_SEL_2
,
1722 .mask
= PMX_MCIDATA6_MASK
|
1724 .val
= PMX_MCIDATA6_MASK
|
1729 static struct spear_modemux i2c5_dis_sd_modemux
[] = {
1731 .muxregs
= i2c5_dis_sd_muxreg
,
1732 .nmuxregs
= ARRAY_SIZE(i2c5_dis_sd_muxreg
),
1736 static struct spear_pingroup i2c5_dis_sd_pingroup
= {
1737 .name
= "i2c5_dis_sd_grp",
1738 .pins
= i2c5_dis_sd_pins
,
1739 .npins
= ARRAY_SIZE(i2c5_dis_sd_pins
),
1740 .modemuxs
= i2c5_dis_sd_modemux
,
1741 .nmodemuxs
= ARRAY_SIZE(i2c5_dis_sd_modemux
),
1744 static const char *const i2c_4_5_grps
[] = { "i2c5_dis_sd_grp",
1745 "i2c4_dis_sd_grp", "i2c_4_5_dis_smi_grp" };
1746 static struct spear_function i2c_4_5_function
= {
1748 .groups
= i2c_4_5_grps
,
1749 .ngroups
= ARRAY_SIZE(i2c_4_5_grps
),
1752 /* Pad multiplexing for i2c_6_7_dis_kbd device */
1753 /* Muxed with KBD */
1754 static const unsigned i2c_6_7_dis_kbd_pins
[] = { 207, 208, 209, 210 };
1755 static struct spear_muxreg i2c_6_7_dis_kbd_muxreg
[] = {
1757 .reg
= PAD_FUNCTION_EN_1
,
1758 .mask
= PMX_KBD_ROWCOL25_MASK
,
1761 .reg
= PAD_DIRECTION_SEL_1
,
1762 .mask
= PMX_KBD_ROWCOL25_MASK
,
1763 .val
= PMX_KBD_ROWCOL25_MASK
,
1767 static struct spear_modemux i2c_6_7_dis_kbd_modemux
[] = {
1769 .muxregs
= i2c_6_7_dis_kbd_muxreg
,
1770 .nmuxregs
= ARRAY_SIZE(i2c_6_7_dis_kbd_muxreg
),
1774 static struct spear_pingroup i2c_6_7_dis_kbd_pingroup
= {
1775 .name
= "i2c_6_7_dis_kbd_grp",
1776 .pins
= i2c_6_7_dis_kbd_pins
,
1777 .npins
= ARRAY_SIZE(i2c_6_7_dis_kbd_pins
),
1778 .modemuxs
= i2c_6_7_dis_kbd_modemux
,
1779 .nmodemuxs
= ARRAY_SIZE(i2c_6_7_dis_kbd_modemux
),
1782 /* Pad multiplexing for i2c6_dis_sd device */
1783 /* Muxed with SD/MMC */
1784 static const unsigned i2c6_dis_sd_pins
[] = { 236, 237 };
1785 static struct spear_muxreg i2c6_dis_sd_muxreg
[] = {
1787 .reg
= PAD_FUNCTION_EN_2
,
1788 .mask
= PMX_MCIIORDRE_MASK
|
1792 .reg
= PAD_DIRECTION_SEL_2
,
1793 .mask
= PMX_MCIIORDRE_MASK
|
1795 .val
= PMX_MCIIORDRE_MASK
|
1800 static struct spear_modemux i2c6_dis_sd_modemux
[] = {
1802 .muxregs
= i2c6_dis_sd_muxreg
,
1803 .nmuxregs
= ARRAY_SIZE(i2c6_dis_sd_muxreg
),
1807 static struct spear_pingroup i2c6_dis_sd_pingroup
= {
1808 .name
= "i2c6_dis_sd_grp",
1809 .pins
= i2c6_dis_sd_pins
,
1810 .npins
= ARRAY_SIZE(i2c6_dis_sd_pins
),
1811 .modemuxs
= i2c6_dis_sd_modemux
,
1812 .nmodemuxs
= ARRAY_SIZE(i2c6_dis_sd_modemux
),
1815 /* Pad multiplexing for i2c7_dis_sd device */
1816 static const unsigned i2c7_dis_sd_pins
[] = { 238, 239 };
1817 static struct spear_muxreg i2c7_dis_sd_muxreg
[] = {
1819 .reg
= PAD_FUNCTION_EN_2
,
1820 .mask
= PMX_MCIRESETCF_MASK
|
1824 .reg
= PAD_DIRECTION_SEL_2
,
1825 .mask
= PMX_MCIRESETCF_MASK
|
1827 .val
= PMX_MCIRESETCF_MASK
|
1832 static struct spear_modemux i2c7_dis_sd_modemux
[] = {
1834 .muxregs
= i2c7_dis_sd_muxreg
,
1835 .nmuxregs
= ARRAY_SIZE(i2c7_dis_sd_muxreg
),
1839 static struct spear_pingroup i2c7_dis_sd_pingroup
= {
1840 .name
= "i2c7_dis_sd_grp",
1841 .pins
= i2c7_dis_sd_pins
,
1842 .npins
= ARRAY_SIZE(i2c7_dis_sd_pins
),
1843 .modemuxs
= i2c7_dis_sd_modemux
,
1844 .nmodemuxs
= ARRAY_SIZE(i2c7_dis_sd_modemux
),
1847 static const char *const i2c_6_7_grps
[] = { "i2c6_dis_sd_grp",
1848 "i2c7_dis_sd_grp", "i2c_6_7_dis_kbd_grp" };
1849 static struct spear_function i2c_6_7_function
= {
1851 .groups
= i2c_6_7_grps
,
1852 .ngroups
= ARRAY_SIZE(i2c_6_7_grps
),
1855 /* Pad multiplexing for can0_dis_nor device */
1856 /* Muxed with NOR */
1857 static const unsigned can0_dis_nor_pins
[] = { 56, 57 };
1858 static struct spear_muxreg can0_dis_nor_muxreg
[] = {
1860 .reg
= PAD_FUNCTION_EN_0
,
1861 .mask
= PMX_NFRSTPWDWN2_MASK
,
1864 .reg
= PAD_FUNCTION_EN_1
,
1865 .mask
= PMX_NFRSTPWDWN3_MASK
,
1868 .reg
= PAD_DIRECTION_SEL_0
,
1869 .mask
= PMX_NFRSTPWDWN2_MASK
,
1870 .val
= PMX_NFRSTPWDWN2_MASK
,
1872 .reg
= PAD_DIRECTION_SEL_1
,
1873 .mask
= PMX_NFRSTPWDWN3_MASK
,
1874 .val
= PMX_NFRSTPWDWN3_MASK
,
1878 static struct spear_modemux can0_dis_nor_modemux
[] = {
1880 .muxregs
= can0_dis_nor_muxreg
,
1881 .nmuxregs
= ARRAY_SIZE(can0_dis_nor_muxreg
),
1885 static struct spear_pingroup can0_dis_nor_pingroup
= {
1886 .name
= "can0_dis_nor_grp",
1887 .pins
= can0_dis_nor_pins
,
1888 .npins
= ARRAY_SIZE(can0_dis_nor_pins
),
1889 .modemuxs
= can0_dis_nor_modemux
,
1890 .nmodemuxs
= ARRAY_SIZE(can0_dis_nor_modemux
),
1893 /* Pad multiplexing for can0_dis_sd device */
1894 /* Muxed with SD/MMC */
1895 static const unsigned can0_dis_sd_pins
[] = { 240, 241 };
1896 static struct spear_muxreg can0_dis_sd_muxreg
[] = {
1898 .reg
= PAD_FUNCTION_EN_2
,
1899 .mask
= PMX_MCICFINTR_MASK
| PMX_MCIIORDY_MASK
,
1902 .reg
= PAD_DIRECTION_SEL_2
,
1903 .mask
= PMX_MCICFINTR_MASK
| PMX_MCIIORDY_MASK
,
1904 .val
= PMX_MCICFINTR_MASK
| PMX_MCIIORDY_MASK
,
1908 static struct spear_modemux can0_dis_sd_modemux
[] = {
1910 .muxregs
= can0_dis_sd_muxreg
,
1911 .nmuxregs
= ARRAY_SIZE(can0_dis_sd_muxreg
),
1915 static struct spear_pingroup can0_dis_sd_pingroup
= {
1916 .name
= "can0_dis_sd_grp",
1917 .pins
= can0_dis_sd_pins
,
1918 .npins
= ARRAY_SIZE(can0_dis_sd_pins
),
1919 .modemuxs
= can0_dis_sd_modemux
,
1920 .nmodemuxs
= ARRAY_SIZE(can0_dis_sd_modemux
),
1923 static const char *const can0_grps
[] = { "can0_dis_nor_grp", "can0_dis_sd_grp"
1925 static struct spear_function can0_function
= {
1927 .groups
= can0_grps
,
1928 .ngroups
= ARRAY_SIZE(can0_grps
),
1931 /* Pad multiplexing for can1_dis_sd device */
1932 /* Muxed with SD/MMC */
1933 static const unsigned can1_dis_sd_pins
[] = { 242, 243 };
1934 static struct spear_muxreg can1_dis_sd_muxreg
[] = {
1936 .reg
= PAD_FUNCTION_EN_2
,
1937 .mask
= PMX_MCICS1_MASK
| PMX_MCIDMAACK_MASK
,
1940 .reg
= PAD_DIRECTION_SEL_2
,
1941 .mask
= PMX_MCICS1_MASK
| PMX_MCIDMAACK_MASK
,
1942 .val
= PMX_MCICS1_MASK
| PMX_MCIDMAACK_MASK
,
1946 static struct spear_modemux can1_dis_sd_modemux
[] = {
1948 .muxregs
= can1_dis_sd_muxreg
,
1949 .nmuxregs
= ARRAY_SIZE(can1_dis_sd_muxreg
),
1953 static struct spear_pingroup can1_dis_sd_pingroup
= {
1954 .name
= "can1_dis_sd_grp",
1955 .pins
= can1_dis_sd_pins
,
1956 .npins
= ARRAY_SIZE(can1_dis_sd_pins
),
1957 .modemuxs
= can1_dis_sd_modemux
,
1958 .nmodemuxs
= ARRAY_SIZE(can1_dis_sd_modemux
),
1961 /* Pad multiplexing for can1_dis_kbd device */
1962 /* Muxed with KBD */
1963 static const unsigned can1_dis_kbd_pins
[] = { 201, 202 };
1964 static struct spear_muxreg can1_dis_kbd_muxreg
[] = {
1966 .reg
= PAD_FUNCTION_EN_1
,
1967 .mask
= PMX_KBD_ROWCOL25_MASK
,
1970 .reg
= PAD_DIRECTION_SEL_1
,
1971 .mask
= PMX_KBD_ROWCOL25_MASK
,
1972 .val
= PMX_KBD_ROWCOL25_MASK
,
1976 static struct spear_modemux can1_dis_kbd_modemux
[] = {
1978 .muxregs
= can1_dis_kbd_muxreg
,
1979 .nmuxregs
= ARRAY_SIZE(can1_dis_kbd_muxreg
),
1983 static struct spear_pingroup can1_dis_kbd_pingroup
= {
1984 .name
= "can1_dis_kbd_grp",
1985 .pins
= can1_dis_kbd_pins
,
1986 .npins
= ARRAY_SIZE(can1_dis_kbd_pins
),
1987 .modemuxs
= can1_dis_kbd_modemux
,
1988 .nmodemuxs
= ARRAY_SIZE(can1_dis_kbd_modemux
),
1991 static const char *const can1_grps
[] = { "can1_dis_sd_grp", "can1_dis_kbd_grp"
1993 static struct spear_function can1_function
= {
1995 .groups
= can1_grps
,
1996 .ngroups
= ARRAY_SIZE(can1_grps
),
1999 /* Pad multiplexing for (ras-ip) pci device */
2000 static const unsigned pci_pins
[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18,
2001 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2002 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2003 55, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 };
2005 static struct spear_muxreg pci_muxreg
[] = {
2007 .reg
= PAD_FUNCTION_EN_0
,
2008 .mask
= PMX_MCI_DATA8_15_MASK
,
2011 .reg
= PAD_FUNCTION_EN_1
,
2012 .mask
= PMX_PCI_REG1_MASK
,
2015 .reg
= PAD_FUNCTION_EN_2
,
2016 .mask
= PMX_PCI_REG2_MASK
,
2019 .reg
= PAD_DIRECTION_SEL_0
,
2020 .mask
= PMX_MCI_DATA8_15_MASK
,
2021 .val
= PMX_MCI_DATA8_15_MASK
,
2023 .reg
= PAD_DIRECTION_SEL_1
,
2024 .mask
= PMX_PCI_REG1_MASK
,
2025 .val
= PMX_PCI_REG1_MASK
,
2027 .reg
= PAD_DIRECTION_SEL_2
,
2028 .mask
= PMX_PCI_REG2_MASK
,
2029 .val
= PMX_PCI_REG2_MASK
,
2033 static struct spear_modemux pci_modemux
[] = {
2035 .muxregs
= pci_muxreg
,
2036 .nmuxregs
= ARRAY_SIZE(pci_muxreg
),
2040 static struct spear_pingroup pci_pingroup
= {
2043 .npins
= ARRAY_SIZE(pci_pins
),
2044 .modemuxs
= pci_modemux
,
2045 .nmodemuxs
= ARRAY_SIZE(pci_modemux
),
2048 static const char *const pci_grps
[] = { "pci_grp" };
2049 static struct spear_function pci_function
= {
2052 .ngroups
= ARRAY_SIZE(pci_grps
),
2055 /* pad multiplexing for (fix-part) pcie0 device */
2056 static struct spear_muxreg pcie0_muxreg
[] = {
2058 .reg
= PCIE_SATA_CFG
,
2059 .mask
= PCIE_CFG_VAL(0),
2060 .val
= PCIE_CFG_VAL(0),
2064 static struct spear_modemux pcie0_modemux
[] = {
2066 .muxregs
= pcie0_muxreg
,
2067 .nmuxregs
= ARRAY_SIZE(pcie0_muxreg
),
2071 static struct spear_pingroup pcie0_pingroup
= {
2072 .name
= "pcie0_grp",
2073 .modemuxs
= pcie0_modemux
,
2074 .nmodemuxs
= ARRAY_SIZE(pcie0_modemux
),
2077 /* pad multiplexing for (fix-part) pcie1 device */
2078 static struct spear_muxreg pcie1_muxreg
[] = {
2080 .reg
= PCIE_SATA_CFG
,
2081 .mask
= PCIE_CFG_VAL(1),
2082 .val
= PCIE_CFG_VAL(1),
2086 static struct spear_modemux pcie1_modemux
[] = {
2088 .muxregs
= pcie1_muxreg
,
2089 .nmuxregs
= ARRAY_SIZE(pcie1_muxreg
),
2093 static struct spear_pingroup pcie1_pingroup
= {
2094 .name
= "pcie1_grp",
2095 .modemuxs
= pcie1_modemux
,
2096 .nmodemuxs
= ARRAY_SIZE(pcie1_modemux
),
2099 /* pad multiplexing for (fix-part) pcie2 device */
2100 static struct spear_muxreg pcie2_muxreg
[] = {
2102 .reg
= PCIE_SATA_CFG
,
2103 .mask
= PCIE_CFG_VAL(2),
2104 .val
= PCIE_CFG_VAL(2),
2108 static struct spear_modemux pcie2_modemux
[] = {
2110 .muxregs
= pcie2_muxreg
,
2111 .nmuxregs
= ARRAY_SIZE(pcie2_muxreg
),
2115 static struct spear_pingroup pcie2_pingroup
= {
2116 .name
= "pcie2_grp",
2117 .modemuxs
= pcie2_modemux
,
2118 .nmodemuxs
= ARRAY_SIZE(pcie2_modemux
),
2121 static const char *const pcie_grps
[] = { "pcie0_grp", "pcie1_grp", "pcie2_grp"
2123 static struct spear_function pcie_function
= {
2124 .name
= "pci_express",
2125 .groups
= pcie_grps
,
2126 .ngroups
= ARRAY_SIZE(pcie_grps
),
2129 /* pad multiplexing for sata0 device */
2130 static struct spear_muxreg sata0_muxreg
[] = {
2132 .reg
= PCIE_SATA_CFG
,
2133 .mask
= SATA_CFG_VAL(0),
2134 .val
= SATA_CFG_VAL(0),
2138 static struct spear_modemux sata0_modemux
[] = {
2140 .muxregs
= sata0_muxreg
,
2141 .nmuxregs
= ARRAY_SIZE(sata0_muxreg
),
2145 static struct spear_pingroup sata0_pingroup
= {
2146 .name
= "sata0_grp",
2147 .modemuxs
= sata0_modemux
,
2148 .nmodemuxs
= ARRAY_SIZE(sata0_modemux
),
2151 /* pad multiplexing for sata1 device */
2152 static struct spear_muxreg sata1_muxreg
[] = {
2154 .reg
= PCIE_SATA_CFG
,
2155 .mask
= SATA_CFG_VAL(1),
2156 .val
= SATA_CFG_VAL(1),
2160 static struct spear_modemux sata1_modemux
[] = {
2162 .muxregs
= sata1_muxreg
,
2163 .nmuxregs
= ARRAY_SIZE(sata1_muxreg
),
2167 static struct spear_pingroup sata1_pingroup
= {
2168 .name
= "sata1_grp",
2169 .modemuxs
= sata1_modemux
,
2170 .nmodemuxs
= ARRAY_SIZE(sata1_modemux
),
2173 /* pad multiplexing for sata2 device */
2174 static struct spear_muxreg sata2_muxreg
[] = {
2176 .reg
= PCIE_SATA_CFG
,
2177 .mask
= SATA_CFG_VAL(2),
2178 .val
= SATA_CFG_VAL(2),
2182 static struct spear_modemux sata2_modemux
[] = {
2184 .muxregs
= sata2_muxreg
,
2185 .nmuxregs
= ARRAY_SIZE(sata2_muxreg
),
2189 static struct spear_pingroup sata2_pingroup
= {
2190 .name
= "sata2_grp",
2191 .modemuxs
= sata2_modemux
,
2192 .nmodemuxs
= ARRAY_SIZE(sata2_modemux
),
2195 static const char *const sata_grps
[] = { "sata0_grp", "sata1_grp", "sata2_grp"
2197 static struct spear_function sata_function
= {
2199 .groups
= sata_grps
,
2200 .ngroups
= ARRAY_SIZE(sata_grps
),
2203 /* Pad multiplexing for ssp1_dis_kbd device */
2204 static const unsigned ssp1_dis_kbd_pins
[] = { 203, 204, 205, 206 };
2205 static struct spear_muxreg ssp1_dis_kbd_muxreg
[] = {
2207 .reg
= PAD_FUNCTION_EN_1
,
2208 .mask
= PMX_KBD_ROWCOL25_MASK
| PMX_KBD_COL1_MASK
|
2209 PMX_KBD_COL0_MASK
| PMX_NFIO8_15_MASK
| PMX_NFCE1_MASK
|
2213 .reg
= PAD_DIRECTION_SEL_1
,
2214 .mask
= PMX_KBD_ROWCOL25_MASK
| PMX_KBD_COL1_MASK
|
2215 PMX_KBD_COL0_MASK
| PMX_NFIO8_15_MASK
| PMX_NFCE1_MASK
|
2217 .val
= PMX_KBD_ROWCOL25_MASK
| PMX_KBD_COL1_MASK
|
2218 PMX_KBD_COL0_MASK
| PMX_NFIO8_15_MASK
| PMX_NFCE1_MASK
|
2223 static struct spear_modemux ssp1_dis_kbd_modemux
[] = {
2225 .muxregs
= ssp1_dis_kbd_muxreg
,
2226 .nmuxregs
= ARRAY_SIZE(ssp1_dis_kbd_muxreg
),
2230 static struct spear_pingroup ssp1_dis_kbd_pingroup
= {
2231 .name
= "ssp1_dis_kbd_grp",
2232 .pins
= ssp1_dis_kbd_pins
,
2233 .npins
= ARRAY_SIZE(ssp1_dis_kbd_pins
),
2234 .modemuxs
= ssp1_dis_kbd_modemux
,
2235 .nmodemuxs
= ARRAY_SIZE(ssp1_dis_kbd_modemux
),
2238 /* Pad multiplexing for ssp1_dis_sd device */
2239 static const unsigned ssp1_dis_sd_pins
[] = { 224, 226, 227, 228 };
2240 static struct spear_muxreg ssp1_dis_sd_muxreg
[] = {
2242 .reg
= PAD_FUNCTION_EN_2
,
2243 .mask
= PMX_MCIADDR0ALE_MASK
| PMX_MCIADDR2_MASK
|
2244 PMX_MCICECF_MASK
| PMX_MCICEXD_MASK
,
2247 .reg
= PAD_DIRECTION_SEL_2
,
2248 .mask
= PMX_MCIADDR0ALE_MASK
| PMX_MCIADDR2_MASK
|
2249 PMX_MCICECF_MASK
| PMX_MCICEXD_MASK
,
2250 .val
= PMX_MCIADDR0ALE_MASK
| PMX_MCIADDR2_MASK
|
2251 PMX_MCICECF_MASK
| PMX_MCICEXD_MASK
,
2255 static struct spear_modemux ssp1_dis_sd_modemux
[] = {
2257 .muxregs
= ssp1_dis_sd_muxreg
,
2258 .nmuxregs
= ARRAY_SIZE(ssp1_dis_sd_muxreg
),
2262 static struct spear_pingroup ssp1_dis_sd_pingroup
= {
2263 .name
= "ssp1_dis_sd_grp",
2264 .pins
= ssp1_dis_sd_pins
,
2265 .npins
= ARRAY_SIZE(ssp1_dis_sd_pins
),
2266 .modemuxs
= ssp1_dis_sd_modemux
,
2267 .nmodemuxs
= ARRAY_SIZE(ssp1_dis_sd_modemux
),
2270 static const char *const ssp1_grps
[] = { "ssp1_dis_kbd_grp",
2271 "ssp1_dis_sd_grp" };
2272 static struct spear_function ssp1_function
= {
2274 .groups
= ssp1_grps
,
2275 .ngroups
= ARRAY_SIZE(ssp1_grps
),
2278 /* Pad multiplexing for gpt64 device */
2279 static const unsigned gpt64_pins
[] = { 230, 231, 232, 245 };
2280 static struct spear_muxreg gpt64_muxreg
[] = {
2282 .reg
= PAD_FUNCTION_EN_2
,
2283 .mask
= PMX_MCICDCF1_MASK
| PMX_MCICDCF2_MASK
| PMX_MCICDXD_MASK
2287 .reg
= PAD_DIRECTION_SEL_2
,
2288 .mask
= PMX_MCICDCF1_MASK
| PMX_MCICDCF2_MASK
| PMX_MCICDXD_MASK
2290 .val
= PMX_MCICDCF1_MASK
| PMX_MCICDCF2_MASK
| PMX_MCICDXD_MASK
2295 static struct spear_modemux gpt64_modemux
[] = {
2297 .muxregs
= gpt64_muxreg
,
2298 .nmuxregs
= ARRAY_SIZE(gpt64_muxreg
),
2302 static struct spear_pingroup gpt64_pingroup
= {
2303 .name
= "gpt64_grp",
2305 .npins
= ARRAY_SIZE(gpt64_pins
),
2306 .modemuxs
= gpt64_modemux
,
2307 .nmodemuxs
= ARRAY_SIZE(gpt64_modemux
),
2310 static const char *const gpt64_grps
[] = { "gpt64_grp" };
2311 static struct spear_function gpt64_function
= {
2313 .groups
= gpt64_grps
,
2314 .ngroups
= ARRAY_SIZE(gpt64_grps
),
2318 static struct spear_pingroup
*spear1310_pingroups
[] = {
2324 &clcd_high_res_pingroup
,
2326 &smi_2_chips_pingroup
,
2327 &smi_4_chips_pingroup
,
2330 &smii_0_1_2_pingroup
,
2331 &ras_mii_txclk_pingroup
,
2332 &nand_8bit_pingroup
,
2333 &nand_16bit_pingroup
,
2334 &nand_4_chips_pingroup
,
2335 &keyboard_6x6_pingroup
,
2336 &keyboard_rowcol6_8_pingroup
,
2338 &uart0_modem_pingroup
,
2339 &gpt0_tmr0_pingroup
,
2340 &gpt0_tmr1_pingroup
,
2341 &gpt1_tmr0_pingroup
,
2342 &gpt1_tmr1_pingroup
,
2348 &ssp0_cs1_2_pingroup
,
2349 &uart_1_dis_i2c_pingroup
,
2350 &uart_1_dis_sd_pingroup
,
2354 &rs485_0_1_tdm_0_1_pingroup
,
2356 &i2c3_dis_smi_clcd_pingroup
,
2357 &i2c3_dis_sd_i2s0_pingroup
,
2358 &i2c_4_5_dis_smi_pingroup
,
2359 &i2c4_dis_sd_pingroup
,
2360 &i2c5_dis_sd_pingroup
,
2361 &i2c_6_7_dis_kbd_pingroup
,
2362 &i2c6_dis_sd_pingroup
,
2363 &i2c7_dis_sd_pingroup
,
2364 &can0_dis_nor_pingroup
,
2365 &can0_dis_sd_pingroup
,
2366 &can1_dis_sd_pingroup
,
2367 &can1_dis_kbd_pingroup
,
2375 &ssp1_dis_kbd_pingroup
,
2376 &ssp1_dis_sd_pingroup
,
2381 static struct spear_function
*spear1310_functions
[] = {
2391 &smii_0_1_2_function
,
2392 &ras_mii_txclk_function
,
2406 &rs485_0_1_tdm_0_1_function
,
2420 static const unsigned pin18
[] = { 18, };
2421 static const unsigned pin19
[] = { 19, };
2422 static const unsigned pin20
[] = { 20, };
2423 static const unsigned pin21
[] = { 21, };
2424 static const unsigned pin22
[] = { 22, };
2425 static const unsigned pin23
[] = { 23, };
2426 static const unsigned pin54
[] = { 54, };
2427 static const unsigned pin55
[] = { 55, };
2428 static const unsigned pin56
[] = { 56, };
2429 static const unsigned pin57
[] = { 57, };
2430 static const unsigned pin58
[] = { 58, };
2431 static const unsigned pin59
[] = { 59, };
2432 static const unsigned pin60
[] = { 60, };
2433 static const unsigned pin61
[] = { 61, };
2434 static const unsigned pin62
[] = { 62, };
2435 static const unsigned pin63
[] = { 63, };
2436 static const unsigned pin143
[] = { 143, };
2437 static const unsigned pin144
[] = { 144, };
2438 static const unsigned pin145
[] = { 145, };
2439 static const unsigned pin146
[] = { 146, };
2440 static const unsigned pin147
[] = { 147, };
2441 static const unsigned pin148
[] = { 148, };
2442 static const unsigned pin149
[] = { 149, };
2443 static const unsigned pin150
[] = { 150, };
2444 static const unsigned pin151
[] = { 151, };
2445 static const unsigned pin152
[] = { 152, };
2446 static const unsigned pin205
[] = { 205, };
2447 static const unsigned pin206
[] = { 206, };
2448 static const unsigned pin211
[] = { 211, };
2449 static const unsigned pin212
[] = { 212, };
2450 static const unsigned pin213
[] = { 213, };
2451 static const unsigned pin214
[] = { 214, };
2452 static const unsigned pin215
[] = { 215, };
2453 static const unsigned pin216
[] = { 216, };
2454 static const unsigned pin217
[] = { 217, };
2455 static const unsigned pin218
[] = { 218, };
2456 static const unsigned pin219
[] = { 219, };
2457 static const unsigned pin220
[] = { 220, };
2458 static const unsigned pin221
[] = { 221, };
2459 static const unsigned pin222
[] = { 222, };
2460 static const unsigned pin223
[] = { 223, };
2461 static const unsigned pin224
[] = { 224, };
2462 static const unsigned pin225
[] = { 225, };
2463 static const unsigned pin226
[] = { 226, };
2464 static const unsigned pin227
[] = { 227, };
2465 static const unsigned pin228
[] = { 228, };
2466 static const unsigned pin229
[] = { 229, };
2467 static const unsigned pin230
[] = { 230, };
2468 static const unsigned pin231
[] = { 231, };
2469 static const unsigned pin232
[] = { 232, };
2470 static const unsigned pin233
[] = { 233, };
2471 static const unsigned pin234
[] = { 234, };
2472 static const unsigned pin235
[] = { 235, };
2473 static const unsigned pin236
[] = { 236, };
2474 static const unsigned pin237
[] = { 237, };
2475 static const unsigned pin238
[] = { 238, };
2476 static const unsigned pin239
[] = { 239, };
2477 static const unsigned pin240
[] = { 240, };
2478 static const unsigned pin241
[] = { 241, };
2479 static const unsigned pin242
[] = { 242, };
2480 static const unsigned pin243
[] = { 243, };
2481 static const unsigned pin244
[] = { 244, };
2482 static const unsigned pin245
[] = { 245, };
2484 static const unsigned pin_grp0
[] = { 173, 174, };
2485 static const unsigned pin_grp1
[] = { 175, 185, 188, 197, 198, };
2486 static const unsigned pin_grp2
[] = { 176, 177, 178, 179, 184, 186, 187, 189,
2488 static const unsigned pin_grp3
[] = { 180, 181, 182, 183, 193, 194, 195, 196, };
2489 static const unsigned pin_grp4
[] = { 199, 200, };
2490 static const unsigned pin_grp5
[] = { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2491 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, };
2492 static const unsigned pin_grp6
[] = { 86, 87, 88, 89, 90, 91, 92, 93, };
2493 static const unsigned pin_grp7
[] = { 98, 99, };
2494 static const unsigned pin_grp8
[] = { 158, 159, 160, 161, 162, 163, 164, 165,
2495 166, 167, 168, 169, 170, 171, 172, };
2497 /* Define muxreg arrays */
2498 DEFINE_2_MUXREG(i2c0_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_I2C0_MASK
, 0, 1);
2499 DEFINE_2_MUXREG(ssp0_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_SSP0_MASK
, 0, 1);
2500 DEFINE_2_MUXREG(ssp0_cs0_pins
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_SSP0_CS0_MASK
, 0, 1);
2501 DEFINE_2_MUXREG(ssp0_cs1_2_pins
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_SSP0_CS1_2_MASK
, 0, 1);
2502 DEFINE_2_MUXREG(i2s0_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_I2S0_MASK
, 0, 1);
2503 DEFINE_2_MUXREG(i2s1_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_I2S1_MASK
, 0, 1);
2504 DEFINE_2_MUXREG(clcd_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_CLCD1_MASK
, 0, 1);
2505 DEFINE_2_MUXREG(clcd_high_res_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_CLCD2_MASK
, 0, 1);
2506 DEFINE_2_MUXREG(pin18
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO15_MASK
, 0, 1);
2507 DEFINE_2_MUXREG(pin19
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO14_MASK
, 0, 1);
2508 DEFINE_2_MUXREG(pin20
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO13_MASK
, 0, 1);
2509 DEFINE_2_MUXREG(pin21
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO12_MASK
, 0, 1);
2510 DEFINE_2_MUXREG(pin22
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO11_MASK
, 0, 1);
2511 DEFINE_2_MUXREG(pin23
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO10_MASK
, 0, 1);
2512 DEFINE_2_MUXREG(pin143
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO00_MASK
, 0, 1);
2513 DEFINE_2_MUXREG(pin144
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO01_MASK
, 0, 1);
2514 DEFINE_2_MUXREG(pin145
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO02_MASK
, 0, 1);
2515 DEFINE_2_MUXREG(pin146
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO03_MASK
, 0, 1);
2516 DEFINE_2_MUXREG(pin147
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO04_MASK
, 0, 1);
2517 DEFINE_2_MUXREG(pin148
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO05_MASK
, 0, 1);
2518 DEFINE_2_MUXREG(pin149
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO06_MASK
, 0, 1);
2519 DEFINE_2_MUXREG(pin150
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO07_MASK
, 0, 1);
2520 DEFINE_2_MUXREG(pin151
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO08_MASK
, 0, 1);
2521 DEFINE_2_MUXREG(pin152
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_EGPIO09_MASK
, 0, 1);
2522 DEFINE_2_MUXREG(smi_2_chips_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_SMI_MASK
, 0, 1);
2523 DEFINE_2_MUXREG(pin54
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_SMINCS3_MASK
, 0, 1);
2524 DEFINE_2_MUXREG(pin55
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_SMINCS2_MASK
, 0, 1);
2525 DEFINE_2_MUXREG(pin56
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_NFRSTPWDWN3_MASK
, 0, 1);
2526 DEFINE_2_MUXREG(pin57
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFRSTPWDWN2_MASK
, 0, 1);
2527 DEFINE_2_MUXREG(pin58
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFRSTPWDWN1_MASK
, 0, 1);
2528 DEFINE_2_MUXREG(pin59
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFRSTPWDWN0_MASK
, 0, 1);
2529 DEFINE_2_MUXREG(pin60
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFWPRT3_MASK
, 0, 1);
2530 DEFINE_2_MUXREG(pin61
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFCE3_MASK
, 0, 1);
2531 DEFINE_2_MUXREG(pin62
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFAD25_MASK
, 0, 1);
2532 DEFINE_2_MUXREG(pin63
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFAD24_MASK
, 0, 1);
2533 DEFINE_2_MUXREG(pin_grp0
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_GMIICLK_MASK
, 0, 1);
2534 DEFINE_2_MUXREG(pin_grp1
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_GMIICOL_CRS_XFERER_MIITXCLK_MASK
, 0, 1);
2535 DEFINE_2_MUXREG(pin_grp2
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_RXCLK_RDV_TXEN_D03_MASK
, 0, 1);
2536 DEFINE_2_MUXREG(pin_grp3
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_GMIID47_MASK
, 0, 1);
2537 DEFINE_2_MUXREG(pin_grp4
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_MDC_MDIO_MASK
, 0, 1);
2538 DEFINE_2_MUXREG(pin_grp5
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_NFAD23_MASK
, 0, 1);
2539 DEFINE_2_MUXREG(pin_grp6
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_MCI_DATA8_15_MASK
, 0, 1);
2540 DEFINE_2_MUXREG(pin_grp7
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_NFCE2_MASK
, 0, 1);
2541 DEFINE_2_MUXREG(pin_grp8
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_NAND8_MASK
, 0, 1);
2542 DEFINE_2_MUXREG(nand_16bit_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_NAND16BIT_1_MASK
, 0, 1);
2543 DEFINE_2_MUXREG(pin205
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_KBD_COL1_MASK
| PMX_NFCE1_MASK
, 0, 1);
2544 DEFINE_2_MUXREG(pin206
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_KBD_COL0_MASK
| PMX_NFCE2_MASK
, 0, 1);
2545 DEFINE_2_MUXREG(pin211
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_KBD_ROW1_MASK
| PMX_NFWPRT1_MASK
, 0, 1);
2546 DEFINE_2_MUXREG(pin212
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_KBD_ROW0_MASK
| PMX_NFWPRT2_MASK
, 0, 1);
2547 DEFINE_2_MUXREG(pin213
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_MCIDATA0_MASK
, 0, 1);
2548 DEFINE_2_MUXREG(pin214
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_MCIDATA1_MASK
, 0, 1);
2549 DEFINE_2_MUXREG(pin215
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_MCIDATA2_MASK
, 0, 1);
2550 DEFINE_2_MUXREG(pin216
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_MCIDATA3_MASK
, 0, 1);
2551 DEFINE_2_MUXREG(pin217
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_MCIDATA4_MASK
, 0, 1);
2552 DEFINE_2_MUXREG(pin218
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA5_MASK
, 0, 1);
2553 DEFINE_2_MUXREG(pin219
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA6_MASK
, 0, 1);
2554 DEFINE_2_MUXREG(pin220
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA7_MASK
, 0, 1);
2555 DEFINE_2_MUXREG(pin221
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA1SD_MASK
, 0, 1);
2556 DEFINE_2_MUXREG(pin222
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA2SD_MASK
, 0, 1);
2557 DEFINE_2_MUXREG(pin223
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATA3SD_MASK
, 0, 1);
2558 DEFINE_2_MUXREG(pin224
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIADDR0ALE_MASK
, 0, 1);
2559 DEFINE_2_MUXREG(pin225
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIADDR1CLECLK_MASK
, 0, 1);
2560 DEFINE_2_MUXREG(pin226
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIADDR2_MASK
, 0, 1);
2561 DEFINE_2_MUXREG(pin227
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICECF_MASK
, 0, 1);
2562 DEFINE_2_MUXREG(pin228
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICEXD_MASK
, 0, 1);
2563 DEFINE_2_MUXREG(pin229
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICESDMMC_MASK
, 0, 1);
2564 DEFINE_2_MUXREG(pin230
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICDCF1_MASK
, 0, 1);
2565 DEFINE_2_MUXREG(pin231
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICDCF2_MASK
, 0, 1);
2566 DEFINE_2_MUXREG(pin232
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICDXD_MASK
, 0, 1);
2567 DEFINE_2_MUXREG(pin233
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICDSDMMC_MASK
, 0, 1);
2568 DEFINE_2_MUXREG(pin234
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDATADIR_MASK
, 0, 1);
2569 DEFINE_2_MUXREG(pin235
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDMARQWP_MASK
, 0, 1);
2570 DEFINE_2_MUXREG(pin236
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIIORDRE_MASK
, 0, 1);
2571 DEFINE_2_MUXREG(pin237
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIIOWRWE_MASK
, 0, 1);
2572 DEFINE_2_MUXREG(pin238
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIRESETCF_MASK
, 0, 1);
2573 DEFINE_2_MUXREG(pin239
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICS0CE_MASK
, 0, 1);
2574 DEFINE_2_MUXREG(pin240
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICFINTR_MASK
, 0, 1);
2575 DEFINE_2_MUXREG(pin241
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIIORDY_MASK
, 0, 1);
2576 DEFINE_2_MUXREG(pin242
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCICS1_MASK
, 0, 1);
2577 DEFINE_2_MUXREG(pin243
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCIDMAACK_MASK
, 0, 1);
2578 DEFINE_2_MUXREG(pin244
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCISDCMD_MASK
, 0, 1);
2579 DEFINE_2_MUXREG(pin245
, PAD_FUNCTION_EN_2
, PAD_DIRECTION_SEL_2
, PMX_MCILEDS_MASK
, 0, 1);
2580 DEFINE_2_MUXREG(keyboard_rowcol6_8_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_KBD_ROWCOL68_MASK
, 0, 1);
2581 DEFINE_2_MUXREG(uart0_pins
, PAD_FUNCTION_EN_0
, PAD_DIRECTION_SEL_0
, PMX_UART0_MASK
, 0, 1);
2582 DEFINE_2_MUXREG(uart0_modem_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_UART0_MODEM_MASK
, 0, 1);
2583 DEFINE_2_MUXREG(gpt0_tmr0_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_GPT0_TMR0_MASK
, 0, 1);
2584 DEFINE_2_MUXREG(gpt0_tmr1_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_GPT0_TMR1_MASK
, 0, 1);
2585 DEFINE_2_MUXREG(gpt1_tmr0_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_GPT1_TMR0_MASK
, 0, 1);
2586 DEFINE_2_MUXREG(gpt1_tmr1_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_GPT1_TMR1_MASK
, 0, 1);
2587 DEFINE_2_MUXREG(touch_xy_pins
, PAD_FUNCTION_EN_1
, PAD_DIRECTION_SEL_1
, PMX_TOUCH_XY_MASK
, 0, 1);
2589 static struct spear_gpio_pingroup spear1310_gpio_pingroup
[] = {
2590 GPIO_PINGROUP(i2c0_pins
),
2591 GPIO_PINGROUP(ssp0_pins
),
2592 GPIO_PINGROUP(ssp0_cs0_pins
),
2593 GPIO_PINGROUP(ssp0_cs1_2_pins
),
2594 GPIO_PINGROUP(i2s0_pins
),
2595 GPIO_PINGROUP(i2s1_pins
),
2596 GPIO_PINGROUP(clcd_pins
),
2597 GPIO_PINGROUP(clcd_high_res_pins
),
2598 GPIO_PINGROUP(pin18
),
2599 GPIO_PINGROUP(pin19
),
2600 GPIO_PINGROUP(pin20
),
2601 GPIO_PINGROUP(pin21
),
2602 GPIO_PINGROUP(pin22
),
2603 GPIO_PINGROUP(pin23
),
2604 GPIO_PINGROUP(pin143
),
2605 GPIO_PINGROUP(pin144
),
2606 GPIO_PINGROUP(pin145
),
2607 GPIO_PINGROUP(pin146
),
2608 GPIO_PINGROUP(pin147
),
2609 GPIO_PINGROUP(pin148
),
2610 GPIO_PINGROUP(pin149
),
2611 GPIO_PINGROUP(pin150
),
2612 GPIO_PINGROUP(pin151
),
2613 GPIO_PINGROUP(pin152
),
2614 GPIO_PINGROUP(smi_2_chips_pins
),
2615 GPIO_PINGROUP(pin54
),
2616 GPIO_PINGROUP(pin55
),
2617 GPIO_PINGROUP(pin56
),
2618 GPIO_PINGROUP(pin57
),
2619 GPIO_PINGROUP(pin58
),
2620 GPIO_PINGROUP(pin59
),
2621 GPIO_PINGROUP(pin60
),
2622 GPIO_PINGROUP(pin61
),
2623 GPIO_PINGROUP(pin62
),
2624 GPIO_PINGROUP(pin63
),
2625 GPIO_PINGROUP(pin_grp0
),
2626 GPIO_PINGROUP(pin_grp1
),
2627 GPIO_PINGROUP(pin_grp2
),
2628 GPIO_PINGROUP(pin_grp3
),
2629 GPIO_PINGROUP(pin_grp4
),
2630 GPIO_PINGROUP(pin_grp5
),
2631 GPIO_PINGROUP(pin_grp6
),
2632 GPIO_PINGROUP(pin_grp7
),
2633 GPIO_PINGROUP(pin_grp8
),
2634 GPIO_PINGROUP(nand_16bit_pins
),
2635 GPIO_PINGROUP(pin205
),
2636 GPIO_PINGROUP(pin206
),
2637 GPIO_PINGROUP(pin211
),
2638 GPIO_PINGROUP(pin212
),
2639 GPIO_PINGROUP(pin213
),
2640 GPIO_PINGROUP(pin214
),
2641 GPIO_PINGROUP(pin215
),
2642 GPIO_PINGROUP(pin216
),
2643 GPIO_PINGROUP(pin217
),
2644 GPIO_PINGROUP(pin218
),
2645 GPIO_PINGROUP(pin219
),
2646 GPIO_PINGROUP(pin220
),
2647 GPIO_PINGROUP(pin221
),
2648 GPIO_PINGROUP(pin222
),
2649 GPIO_PINGROUP(pin223
),
2650 GPIO_PINGROUP(pin224
),
2651 GPIO_PINGROUP(pin225
),
2652 GPIO_PINGROUP(pin226
),
2653 GPIO_PINGROUP(pin227
),
2654 GPIO_PINGROUP(pin228
),
2655 GPIO_PINGROUP(pin229
),
2656 GPIO_PINGROUP(pin230
),
2657 GPIO_PINGROUP(pin231
),
2658 GPIO_PINGROUP(pin232
),
2659 GPIO_PINGROUP(pin233
),
2660 GPIO_PINGROUP(pin234
),
2661 GPIO_PINGROUP(pin235
),
2662 GPIO_PINGROUP(pin236
),
2663 GPIO_PINGROUP(pin237
),
2664 GPIO_PINGROUP(pin238
),
2665 GPIO_PINGROUP(pin239
),
2666 GPIO_PINGROUP(pin240
),
2667 GPIO_PINGROUP(pin241
),
2668 GPIO_PINGROUP(pin242
),
2669 GPIO_PINGROUP(pin243
),
2670 GPIO_PINGROUP(pin244
),
2671 GPIO_PINGROUP(pin245
),
2672 GPIO_PINGROUP(keyboard_rowcol6_8_pins
),
2673 GPIO_PINGROUP(uart0_pins
),
2674 GPIO_PINGROUP(uart0_modem_pins
),
2675 GPIO_PINGROUP(gpt0_tmr0_pins
),
2676 GPIO_PINGROUP(gpt0_tmr1_pins
),
2677 GPIO_PINGROUP(gpt1_tmr0_pins
),
2678 GPIO_PINGROUP(gpt1_tmr1_pins
),
2679 GPIO_PINGROUP(touch_xy_pins
),
2682 static struct spear_pinctrl_machdata spear1310_machdata
= {
2683 .pins
= spear1310_pins
,
2684 .npins
= ARRAY_SIZE(spear1310_pins
),
2685 .groups
= spear1310_pingroups
,
2686 .ngroups
= ARRAY_SIZE(spear1310_pingroups
),
2687 .functions
= spear1310_functions
,
2688 .nfunctions
= ARRAY_SIZE(spear1310_functions
),
2689 .gpio_pingroups
= spear1310_gpio_pingroup
,
2690 .ngpio_pingroups
= ARRAY_SIZE(spear1310_gpio_pingroup
),
2691 .modes_supported
= false,
2694 static const struct of_device_id spear1310_pinctrl_of_match
[] = {
2696 .compatible
= "st,spear1310-pinmux",
2701 static int spear1310_pinctrl_probe(struct platform_device
*pdev
)
2703 return spear_pinctrl_probe(pdev
, &spear1310_machdata
);
2706 static struct platform_driver spear1310_pinctrl_driver
= {
2708 .name
= DRIVER_NAME
,
2709 .of_match_table
= spear1310_pinctrl_of_match
,
2711 .probe
= spear1310_pinctrl_probe
,
2714 static int __init
spear1310_pinctrl_init(void)
2716 return platform_driver_register(&spear1310_pinctrl_driver
);
2718 arch_initcall(spear1310_pinctrl_init
);