14 #include <linux/module.h>
19 #define DRIVER_NAME "spear320-pinmux"
22 #define PMX_CONFIG_REG 0x0C
23 #define MODE_CONFIG_REG 0x10
24 #define MODE_EXT_CONFIG_REG 0x18
27 #define AUTO_NET_SMII_MODE (1 << 0)
28 #define AUTO_NET_MII_MODE (1 << 1)
29 #define AUTO_EXP_MODE (1 << 2)
30 #define SMALL_PRINTERS_MODE (1 << 3)
31 #define EXTENDED_MODE (1 << 4)
34 .name =
"Automation Networking SMII mode",
42 .name =
"Automation Networking MII mode",
50 .name =
"Automation Expanded mode",
58 .name =
"Small Printers mode",
66 .name =
"extended mode",
74 &pmx_mode_auto_net_smii,
75 &pmx_mode_auto_net_mii,
77 &pmx_mode_small_printers,
82 #define EXT_CTRL_REG 0x0018
83 #define MII_MDIO_MASK (1 << 4)
84 #define MII_MDIO_10_11_VAL 0
85 #define MII_MDIO_81_VAL (1 << 4)
86 #define EMI_FSMC_DYNAMIC_MUX_MASK (1 << 5)
87 #define MAC_MODE_MII 0
88 #define MAC_MODE_RMII 1
89 #define MAC_MODE_SMII 2
90 #define MAC_MODE_SS_SMII 3
91 #define MAC_MODE_MASK 0x3
92 #define MAC1_MODE_SHIFT 16
93 #define MAC2_MODE_SHIFT 18
95 #define IP_SEL_PAD_0_9_REG 0x00A4
96 #define PMX_PL_0_1_MASK (0x3F << 0)
97 #define PMX_UART2_PL_0_1_VAL 0x0
98 #define PMX_I2C2_PL_0_1_VAL (0x4 | (0x4 << 3))
100 #define PMX_PL_2_3_MASK (0x3F << 6)
101 #define PMX_I2C2_PL_2_3_VAL 0x0
102 #define PMX_UART6_PL_2_3_VAL ((0x1 << 6) | (0x1 << 9))
103 #define PMX_UART1_ENH_PL_2_3_VAL ((0x4 << 6) | (0x4 << 9))
105 #define PMX_PL_4_5_MASK (0x3F << 12)
106 #define PMX_UART5_PL_4_5_VAL ((0x1 << 12) | (0x1 << 15))
107 #define PMX_UART1_ENH_PL_4_5_VAL ((0x4 << 12) | (0x4 << 15))
108 #define PMX_PL_5_MASK (0x7 << 15)
109 #define PMX_TOUCH_Y_PL_5_VAL 0x0
111 #define PMX_PL_6_7_MASK (0x3F << 18)
112 #define PMX_PL_6_MASK (0x7 << 18)
113 #define PMX_PL_7_MASK (0x7 << 21)
114 #define PMX_UART4_PL_6_7_VAL ((0x1 << 18) | (0x1 << 21))
115 #define PMX_PWM_3_PL_6_VAL (0x2 << 18)
116 #define PMX_PWM_2_PL_7_VAL (0x2 << 21)
117 #define PMX_UART1_ENH_PL_6_7_VAL ((0x4 << 18) | (0x4 << 21))
119 #define PMX_PL_8_9_MASK (0x3F << 24)
120 #define PMX_UART3_PL_8_9_VAL ((0x1 << 24) | (0x1 << 27))
121 #define PMX_PWM_0_1_PL_8_9_VAL ((0x2 << 24) | (0x2 << 27))
122 #define PMX_I2C1_PL_8_9_VAL ((0x4 << 24) | (0x4 << 27))
124 #define IP_SEL_PAD_10_19_REG 0x00A8
125 #define PMX_PL_10_11_MASK (0x3F << 0)
126 #define PMX_SMII_PL_10_11_VAL 0
127 #define PMX_RMII_PL_10_11_VAL ((0x4 << 0) | (0x4 << 3))
129 #define PMX_PL_12_MASK (0x7 << 6)
130 #define PMX_PWM3_PL_12_VAL 0
131 #define PMX_SDHCI_CD_PL_12_VAL (0x4 << 6)
133 #define PMX_PL_13_14_MASK (0x3F << 9)
134 #define PMX_PL_13_MASK (0x7 << 9)
135 #define PMX_PL_14_MASK (0x7 << 12)
136 #define PMX_SSP2_PL_13_14_15_16_VAL 0
137 #define PMX_UART4_PL_13_14_VAL ((0x1 << 9) | (0x1 << 12))
138 #define PMX_RMII_PL_13_14_VAL ((0x4 << 9) | (0x4 << 12))
139 #define PMX_PWM2_PL_13_VAL (0x2 << 9)
140 #define PMX_PWM1_PL_14_VAL (0x2 << 12)
142 #define PMX_PL_15_MASK (0x7 << 15)
143 #define PMX_PWM0_PL_15_VAL (0x2 << 15)
144 #define PMX_PL_15_16_MASK (0x3F << 15)
145 #define PMX_UART3_PL_15_16_VAL ((0x1 << 15) | (0x1 << 18))
146 #define PMX_RMII_PL_15_16_VAL ((0x4 << 15) | (0x4 << 18))
148 #define PMX_PL_17_18_MASK (0x3F << 21)
149 #define PMX_SSP1_PL_17_18_19_20_VAL 0
150 #define PMX_RMII_PL_17_18_VAL ((0x4 << 21) | (0x4 << 24))
152 #define PMX_PL_19_MASK (0x7 << 27)
153 #define PMX_I2C2_PL_19_VAL (0x1 << 27)
154 #define PMX_RMII_PL_19_VAL (0x4 << 27)
156 #define IP_SEL_PAD_20_29_REG 0x00AC
157 #define PMX_PL_20_MASK (0x7 << 0)
158 #define PMX_I2C2_PL_20_VAL (0x1 << 0)
159 #define PMX_RMII_PL_20_VAL (0x4 << 0)
161 #define PMX_PL_21_TO_27_MASK (0x1FFFFF << 3)
162 #define PMX_SMII_PL_21_TO_27_VAL 0
163 #define PMX_RMII_PL_21_TO_27_VAL ((0x4 << 3) | (0x4 << 6) | (0x4 << 9) | (0x4 << 12) | (0x4 << 15) | (0x4 << 18) | (0x4 << 21))
165 #define PMX_PL_28_29_MASK (0x3F << 24)
166 #define PMX_PL_28_MASK (0x7 << 24)
167 #define PMX_PL_29_MASK (0x7 << 27)
168 #define PMX_UART1_PL_28_29_VAL 0
169 #define PMX_PWM_3_PL_28_VAL (0x4 << 24)
170 #define PMX_PWM_2_PL_29_VAL (0x4 << 27)
172 #define IP_SEL_PAD_30_39_REG 0x00B0
173 #define PMX_PL_30_31_MASK (0x3F << 0)
174 #define PMX_CAN1_PL_30_31_VAL (0)
175 #define PMX_PL_30_MASK (0x7 << 0)
176 #define PMX_PL_31_MASK (0x7 << 3)
177 #define PMX_PWM1_EXT_PL_30_VAL (0x4 << 0)
178 #define PMX_PWM0_EXT_PL_31_VAL (0x4 << 3)
179 #define PMX_UART1_ENH_PL_31_VAL (0x3 << 3)
181 #define PMX_PL_32_33_MASK (0x3F << 6)
182 #define PMX_CAN0_PL_32_33_VAL 0
183 #define PMX_UART1_ENH_PL_32_33_VAL ((0x3 << 6) | (0x3 << 9))
184 #define PMX_SSP2_PL_32_33_VAL ((0x4 << 6) | (0x4 << 9))
186 #define PMX_PL_34_MASK (0x7 << 12)
187 #define PMX_PWM2_PL_34_VAL 0
188 #define PMX_UART1_ENH_PL_34_VAL (0x2 << 12)
189 #define PMX_SSP2_PL_34_VAL (0x4 << 12)
191 #define PMX_PL_35_MASK (0x7 << 15)
192 #define PMX_I2S_REF_CLK_PL_35_VAL 0
193 #define PMX_UART1_ENH_PL_35_VAL (0x2 << 15)
194 #define PMX_SSP2_PL_35_VAL (0x4 << 15)
196 #define PMX_PL_36_MASK (0x7 << 18)
197 #define PMX_TOUCH_X_PL_36_VAL 0
198 #define PMX_UART1_ENH_PL_36_VAL (0x2 << 18)
199 #define PMX_SSP1_PL_36_VAL (0x4 << 18)
201 #define PMX_PL_37_38_MASK (0x3F << 21)
202 #define PMX_PWM0_1_PL_37_38_VAL 0
203 #define PMX_UART5_PL_37_38_VAL ((0x2 << 21) | (0x2 << 24))
204 #define PMX_SSP1_PL_37_38_VAL ((0x4 << 21) | (0x4 << 24))
206 #define PMX_PL_39_MASK (0x7 << 27)
207 #define PMX_I2S_PL_39_VAL 0
208 #define PMX_UART4_PL_39_VAL (0x2 << 27)
209 #define PMX_SSP1_PL_39_VAL (0x4 << 27)
211 #define IP_SEL_PAD_40_49_REG 0x00B4
212 #define PMX_PL_40_MASK (0x7 << 0)
213 #define PMX_I2S_PL_40_VAL 0
214 #define PMX_UART4_PL_40_VAL (0x2 << 0)
215 #define PMX_PWM3_PL_40_VAL (0x4 << 0)
217 #define PMX_PL_41_42_MASK (0x3F << 3)
218 #define PMX_PL_41_MASK (0x7 << 3)
219 #define PMX_PL_42_MASK (0x7 << 6)
220 #define PMX_I2S_PL_41_42_VAL 0
221 #define PMX_UART3_PL_41_42_VAL ((0x2 << 3) | (0x2 << 6))
222 #define PMX_PWM2_PL_41_VAL (0x4 << 3)
223 #define PMX_PWM1_PL_42_VAL (0x4 << 6)
225 #define PMX_PL_43_MASK (0x7 << 9)
226 #define PMX_SDHCI_PL_43_VAL 0
227 #define PMX_UART1_ENH_PL_43_VAL (0x2 << 9)
228 #define PMX_PWM0_PL_43_VAL (0x4 << 9)
230 #define PMX_PL_44_45_MASK (0x3F << 12)
231 #define PMX_SDHCI_PL_44_45_VAL 0
232 #define PMX_UART1_ENH_PL_44_45_VAL ((0x2 << 12) | (0x2 << 15))
233 #define PMX_SSP2_PL_44_45_VAL ((0x4 << 12) | (0x4 << 15))
235 #define PMX_PL_46_47_MASK (0x3F << 18)
236 #define PMX_SDHCI_PL_46_47_VAL 0
237 #define PMX_FSMC_EMI_PL_46_47_VAL ((0x2 << 18) | (0x2 << 21))
238 #define PMX_SSP2_PL_46_47_VAL ((0x4 << 18) | (0x4 << 21))
240 #define PMX_PL_48_49_MASK (0x3F << 24)
241 #define PMX_SDHCI_PL_48_49_VAL 0
242 #define PMX_FSMC_EMI_PL_48_49_VAL ((0x2 << 24) | (0x2 << 27))
243 #define PMX_SSP1_PL_48_49_VAL ((0x4 << 24) | (0x4 << 27))
245 #define IP_SEL_PAD_50_59_REG 0x00B8
246 #define PMX_PL_50_51_MASK (0x3F << 0)
247 #define PMX_EMI_PL_50_51_VAL ((0x2 << 0) | (0x2 << 3))
248 #define PMX_SSP1_PL_50_51_VAL ((0x4 << 0) | (0x4 << 3))
249 #define PMX_PL_50_MASK (0x7 << 0)
250 #define PMX_PL_51_MASK (0x7 << 3)
251 #define PMX_SDHCI_PL_50_VAL 0
252 #define PMX_SDHCI_CD_PL_51_VAL 0
254 #define PMX_PL_52_53_MASK (0x3F << 6)
255 #define PMX_FSMC_PL_52_53_VAL 0
256 #define PMX_EMI_PL_52_53_VAL ((0x2 << 6) | (0x2 << 9))
257 #define PMX_UART3_PL_52_53_VAL ((0x4 << 6) | (0x4 << 9))
259 #define PMX_PL_54_55_56_MASK (0x1FF << 12)
260 #define PMX_FSMC_EMI_PL_54_55_56_VAL ((0x2 << 12) | (0x2 << 15) | (0x2 << 18))
262 #define PMX_PL_57_MASK (0x7 << 21)
263 #define PMX_FSMC_PL_57_VAL 0
264 #define PMX_PWM3_PL_57_VAL (0x4 << 21)
266 #define PMX_PL_58_59_MASK (0x3F << 24)
267 #define PMX_PL_58_MASK (0x7 << 24)
268 #define PMX_PL_59_MASK (0x7 << 27)
269 #define PMX_FSMC_EMI_PL_58_59_VAL ((0x2 << 24) | (0x2 << 27))
270 #define PMX_PWM2_PL_58_VAL (0x4 << 24)
271 #define PMX_PWM1_PL_59_VAL (0x4 << 27)
273 #define IP_SEL_PAD_60_69_REG 0x00BC
274 #define PMX_PL_60_MASK (0x7 << 0)
275 #define PMX_FSMC_PL_60_VAL 0
276 #define PMX_PWM0_PL_60_VAL (0x4 << 0)
278 #define PMX_PL_61_TO_64_MASK (0xFFF << 3)
279 #define PMX_FSMC_PL_61_TO_64_VAL ((0x2 << 3) | (0x2 << 6) | (0x2 << 9) | (0x2 << 12))
280 #define PMX_SSP2_PL_61_TO_64_VAL ((0x4 << 3) | (0x4 << 6) | (0x4 << 9) | (0x4 << 12))
282 #define PMX_PL_65_TO_68_MASK (0xFFF << 15)
283 #define PMX_FSMC_PL_65_TO_68_VAL ((0x2 << 15) | (0x2 << 18) | (0x2 << 21) | (0x2 << 24))
284 #define PMX_SSP1_PL_65_TO_68_VAL ((0x4 << 15) | (0x4 << 18) | (0x4 << 21) | (0x4 << 24))
286 #define PMX_PL_69_MASK (0x7 << 27)
287 #define PMX_CLCD_PL_69_VAL (0)
288 #define PMX_EMI_PL_69_VAL (0x2 << 27)
289 #define PMX_SPP_PL_69_VAL (0x3 << 27)
290 #define PMX_UART5_PL_69_VAL (0x4 << 27)
292 #define IP_SEL_PAD_70_79_REG 0x00C0
293 #define PMX_PL_70_MASK (0x7 << 0)
294 #define PMX_CLCD_PL_70_VAL (0)
295 #define PMX_FSMC_EMI_PL_70_VAL (0x2 << 0)
296 #define PMX_SPP_PL_70_VAL (0x3 << 0)
297 #define PMX_UART5_PL_70_VAL (0x4 << 0)
299 #define PMX_PL_71_72_MASK (0x3F << 3)
300 #define PMX_CLCD_PL_71_72_VAL (0)
301 #define PMX_FSMC_EMI_PL_71_72_VAL ((0x2 << 3) | (0x2 << 6))
302 #define PMX_SPP_PL_71_72_VAL ((0x3 << 3) | (0x3 << 6))
303 #define PMX_UART4_PL_71_72_VAL ((0x4 << 3) | (0x4 << 6))
305 #define PMX_PL_73_MASK (0x7 << 9)
306 #define PMX_CLCD_PL_73_VAL (0)
307 #define PMX_FSMC_EMI_PL_73_VAL (0x2 << 9)
308 #define PMX_SPP_PL_73_VAL (0x3 << 9)
309 #define PMX_UART3_PL_73_VAL (0x4 << 9)
311 #define PMX_PL_74_MASK (0x7 << 12)
312 #define PMX_CLCD_PL_74_VAL (0)
313 #define PMX_EMI_PL_74_VAL (0x2 << 12)
314 #define PMX_SPP_PL_74_VAL (0x3 << 12)
315 #define PMX_UART3_PL_74_VAL (0x4 << 12)
317 #define PMX_PL_75_76_MASK (0x3F << 15)
318 #define PMX_CLCD_PL_75_76_VAL (0)
319 #define PMX_EMI_PL_75_76_VAL ((0x2 << 15) | (0x2 << 18))
320 #define PMX_SPP_PL_75_76_VAL ((0x3 << 15) | (0x3 << 18))
321 #define PMX_I2C2_PL_75_76_VAL ((0x4 << 15) | (0x4 << 18))
323 #define PMX_PL_77_78_79_MASK (0x1FF << 21)
324 #define PMX_CLCD_PL_77_78_79_VAL (0)
325 #define PMX_EMI_PL_77_78_79_VAL ((0x2 << 21) | (0x2 << 24) | (0x2 << 27))
326 #define PMX_SPP_PL_77_78_79_VAL ((0x3 << 21) | (0x3 << 24) | (0x3 << 27))
327 #define PMX_RS485_PL_77_78_79_VAL ((0x4 << 21) | (0x4 << 24) | (0x4 << 27))
329 #define IP_SEL_PAD_80_89_REG 0x00C4
330 #define PMX_PL_80_TO_85_MASK (0x3FFFF << 0)
331 #define PMX_CLCD_PL_80_TO_85_VAL 0
332 #define PMX_MII2_PL_80_TO_85_VAL ((0x1 << 0) | (0x1 << 3) | (0x1 << 6) | (0x1 << 9) | (0x1 << 12) | (0x1 << 15))
333 #define PMX_EMI_PL_80_TO_85_VAL ((0x2 << 0) | (0x2 << 3) | (0x2 << 6) | (0x2 << 9) | (0x2 << 12) | (0x2 << 15))
334 #define PMX_SPP_PL_80_TO_85_VAL ((0x3 << 0) | (0x3 << 3) | (0x3 << 6) | (0x3 << 9) | (0x3 << 12) | (0x3 << 15))
335 #define PMX_UART1_ENH_PL_80_TO_85_VAL ((0x4 << 0) | (0x4 << 3) | (0x4 << 6) | (0x4 << 9) | (0x4 << 12) | (0x4 << 15))
337 #define PMX_PL_86_87_MASK (0x3F << 18)
338 #define PMX_PL_86_MASK (0x7 << 18)
339 #define PMX_PL_87_MASK (0x7 << 21)
340 #define PMX_CLCD_PL_86_87_VAL 0
341 #define PMX_MII2_PL_86_87_VAL ((0x1 << 18) | (0x1 << 21))
342 #define PMX_EMI_PL_86_87_VAL ((0x2 << 18) | (0x2 << 21))
343 #define PMX_PWM3_PL_86_VAL (0x4 << 18)
344 #define PMX_PWM2_PL_87_VAL (0x4 << 21)
346 #define PMX_PL_88_89_MASK (0x3F << 24)
347 #define PMX_CLCD_PL_88_89_VAL 0
348 #define PMX_MII2_PL_88_89_VAL ((0x1 << 24) | (0x1 << 27))
349 #define PMX_EMI_PL_88_89_VAL ((0x2 << 24) | (0x2 << 27))
350 #define PMX_UART6_PL_88_89_VAL ((0x3 << 24) | (0x3 << 27))
351 #define PMX_PWM0_1_PL_88_89_VAL ((0x4 << 24) | (0x4 << 27))
353 #define IP_SEL_PAD_90_99_REG 0x00C8
354 #define PMX_PL_90_91_MASK (0x3F << 0)
355 #define PMX_CLCD_PL_90_91_VAL 0
356 #define PMX_MII2_PL_90_91_VAL ((0x1 << 0) | (0x1 << 3))
357 #define PMX_EMI1_PL_90_91_VAL ((0x2 << 0) | (0x2 << 3))
358 #define PMX_UART5_PL_90_91_VAL ((0x3 << 0) | (0x3 << 3))
359 #define PMX_SSP2_PL_90_91_VAL ((0x4 << 0) | (0x4 << 3))
361 #define PMX_PL_92_93_MASK (0x3F << 6)
362 #define PMX_CLCD_PL_92_93_VAL 0
363 #define PMX_MII2_PL_92_93_VAL ((0x1 << 6) | (0x1 << 9))
364 #define PMX_EMI1_PL_92_93_VAL ((0x2 << 6) | (0x2 << 9))
365 #define PMX_UART4_PL_92_93_VAL ((0x3 << 6) | (0x3 << 9))
366 #define PMX_SSP2_PL_92_93_VAL ((0x4 << 6) | (0x4 << 9))
368 #define PMX_PL_94_95_MASK (0x3F << 12)
369 #define PMX_CLCD_PL_94_95_VAL 0
370 #define PMX_MII2_PL_94_95_VAL ((0x1 << 12) | (0x1 << 15))
371 #define PMX_EMI1_PL_94_95_VAL ((0x2 << 12) | (0x2 << 15))
372 #define PMX_UART3_PL_94_95_VAL ((0x3 << 12) | (0x3 << 15))
373 #define PMX_SSP1_PL_94_95_VAL ((0x4 << 12) | (0x4 << 15))
375 #define PMX_PL_96_97_MASK (0x3F << 18)
376 #define PMX_CLCD_PL_96_97_VAL 0
377 #define PMX_MII2_PL_96_97_VAL ((0x1 << 18) | (0x1 << 21))
378 #define PMX_EMI1_PL_96_97_VAL ((0x2 << 18) | (0x2 << 21))
379 #define PMX_I2C2_PL_96_97_VAL ((0x3 << 18) | (0x3 << 21))
380 #define PMX_SSP1_PL_96_97_VAL ((0x4 << 18) | (0x4 << 21))
382 #define PMX_PL_98_MASK (0x7 << 24)
383 #define PMX_CLCD_PL_98_VAL 0
384 #define PMX_I2C1_PL_98_VAL (0x2 << 24)
385 #define PMX_UART3_PL_98_VAL (0x4 << 24)
387 #define PMX_PL_99_MASK (0x7 << 27)
388 #define PMX_SDHCI_PL_99_VAL 0
389 #define PMX_I2C1_PL_99_VAL (0x2 << 27)
390 #define PMX_UART3_PL_99_VAL (0x4 << 27)
392 #define IP_SEL_MIX_PAD_REG 0x00CC
393 #define PMX_PL_100_101_MASK (0x3F << 0)
394 #define PMX_SDHCI_PL_100_101_VAL 0
395 #define PMX_UART4_PL_100_101_VAL ((0x4 << 0) | (0x4 << 3))
397 #define PMX_SSP1_PORT_SEL_MASK (0x7 << 8)
398 #define PMX_SSP1_PORT_94_TO_97_VAL 0
399 #define PMX_SSP1_PORT_65_TO_68_VAL (0x1 << 8)
400 #define PMX_SSP1_PORT_48_TO_51_VAL (0x2 << 8)
401 #define PMX_SSP1_PORT_36_TO_39_VAL (0x3 << 8)
402 #define PMX_SSP1_PORT_17_TO_20_VAL (0x4 << 8)
404 #define PMX_SSP2_PORT_SEL_MASK (0x7 << 11)
405 #define PMX_SSP2_PORT_90_TO_93_VAL 0
406 #define PMX_SSP2_PORT_61_TO_64_VAL (0x1 << 11)
407 #define PMX_SSP2_PORT_44_TO_47_VAL (0x2 << 11)
408 #define PMX_SSP2_PORT_32_TO_35_VAL (0x3 << 11)
409 #define PMX_SSP2_PORT_13_TO_16_VAL (0x4 << 11)
411 #define PMX_UART1_ENH_PORT_SEL_MASK (0x3 << 14)
412 #define PMX_UART1_ENH_PORT_81_TO_85_VAL 0
413 #define PMX_UART1_ENH_PORT_44_45_34_36_VAL (0x1 << 14)
414 #define PMX_UART1_ENH_PORT_32_TO_34_36_VAL (0x2 << 14)
415 #define PMX_UART1_ENH_PORT_3_TO_5_7_VAL (0x3 << 14)
417 #define PMX_UART3_PORT_SEL_MASK (0x7 << 16)
418 #define PMX_UART3_PORT_94_VAL 0
419 #define PMX_UART3_PORT_73_VAL (0x1 << 16)
420 #define PMX_UART3_PORT_52_VAL (0x2 << 16)
421 #define PMX_UART3_PORT_41_VAL (0x3 << 16)
422 #define PMX_UART3_PORT_15_VAL (0x4 << 16)
423 #define PMX_UART3_PORT_8_VAL (0x5 << 16)
424 #define PMX_UART3_PORT_99_VAL (0x6 << 16)
426 #define PMX_UART4_PORT_SEL_MASK (0x7 << 19)
427 #define PMX_UART4_PORT_92_VAL 0
428 #define PMX_UART4_PORT_71_VAL (0x1 << 19)
429 #define PMX_UART4_PORT_39_VAL (0x2 << 19)
430 #define PMX_UART4_PORT_13_VAL (0x3 << 19)
431 #define PMX_UART4_PORT_6_VAL (0x4 << 19)
432 #define PMX_UART4_PORT_101_VAL (0x5 << 19)
434 #define PMX_UART5_PORT_SEL_MASK (0x3 << 22)
435 #define PMX_UART5_PORT_90_VAL 0
436 #define PMX_UART5_PORT_69_VAL (0x1 << 22)
437 #define PMX_UART5_PORT_37_VAL (0x2 << 22)
438 #define PMX_UART5_PORT_4_VAL (0x3 << 22)
440 #define PMX_UART6_PORT_SEL_MASK (0x1 << 24)
441 #define PMX_UART6_PORT_88_VAL 0
442 #define PMX_UART6_PORT_2_VAL (0x1 << 24)
444 #define PMX_I2C1_PORT_SEL_MASK (0x1 << 25)
445 #define PMX_I2C1_PORT_8_9_VAL 0
446 #define PMX_I2C1_PORT_98_99_VAL (0x1 << 25)
448 #define PMX_I2C2_PORT_SEL_MASK (0x3 << 26)
449 #define PMX_I2C2_PORT_96_97_VAL 0
450 #define PMX_I2C2_PORT_75_76_VAL (0x1 << 26)
451 #define PMX_I2C2_PORT_19_20_VAL (0x2 << 26)
452 #define PMX_I2C2_PORT_2_3_VAL (0x3 << 26)
453 #define PMX_I2C2_PORT_0_1_VAL (0x4 << 26)
455 #define PMX_SDHCI_CD_PORT_SEL_MASK (0x1 << 29)
456 #define PMX_SDHCI_CD_PORT_12_VAL 0
457 #define PMX_SDHCI_CD_PORT_51_VAL (0x1 << 29)
460 static const unsigned clcd_pins[] = { 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
461 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
495 .muxregs = clcd_muxreg,
504 .modemuxs = clcd_modemux,
508 static const char *
const clcd_grps[] = {
"clcd_grp" };
516 static const unsigned emi_pins[] = { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
517 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
518 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
519 93, 94, 95, 96, 97 };
574 .muxregs = emi_muxreg,
578 .muxregs = emi_ext_muxreg,
587 .modemuxs = emi_modemux,
591 static const char *
const emi_grps[] = {
"emi_grp" };
599 static const unsigned fsmc_8bit_pins[] = { 52, 53, 54, 55, 56, 57, 58, 59, 60,
600 61, 62, 63, 64, 65, 66, 67, 68 };
624 .muxregs = fsmc_8bit_muxreg,
630 .name =
"fsmc_8bit_grp",
631 .pins = fsmc_8bit_pins,
633 .modemuxs = fsmc_8bit_modemux,
637 static const unsigned fsmc_16bit_pins[] = { 46, 47, 48, 49, 52, 53, 54, 55, 56,
638 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73 };
639 static struct spear_muxreg fsmc_16bit_autoexp_muxreg[] = {
663 .muxregs = fsmc_8bit_muxreg,
667 .muxregs = fsmc_16bit_autoexp_muxreg,
668 .nmuxregs =
ARRAY_SIZE(fsmc_16bit_autoexp_muxreg),
671 .muxregs = fsmc_16bit_muxreg,
677 .name =
"fsmc_16bit_grp",
678 .pins = fsmc_16bit_pins,
680 .modemuxs = fsmc_16bit_modemux,
684 static const char *
const fsmc_grps[] = {
"fsmc_8bit_grp",
"fsmc_16bit_grp" };
692 static const unsigned spp_pins[] = { 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
693 80, 81, 82, 83, 84, 85 };
717 .muxregs = spp_muxreg,
726 .modemuxs = spp_modemux,
730 static const char *
const spp_grps[] = {
"spp_grp" };
738 static const unsigned sdhci_led_pins[] = { 34 };
758 .muxregs = sdhci_led_muxreg,
762 .muxregs = sdhci_led_ext_muxreg,
768 .name =
"sdhci_led_grp",
769 .pins = sdhci_led_pins,
771 .modemuxs = sdhci_led_modemux,
775 static const unsigned sdhci_cd_12_pins[] = { 12, 43, 44, 45, 46, 47, 48, 49,
777 static const unsigned sdhci_cd_51_pins[] = { 43, 44, 45, 46, 47, 48, 49, 50, 51
837 #define pmx_sdhci_common_modemux \
839 .modes = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | \
840 SMALL_PRINTERS_MODE | EXTENDED_MODE, \
841 .muxregs = sdhci_muxreg, \
842 .nmuxregs = ARRAY_SIZE(sdhci_muxreg), \
844 .modes = EXTENDED_MODE, \
845 .muxregs = sdhci_ext_muxreg, \
846 .nmuxregs = ARRAY_SIZE(sdhci_ext_muxreg), \
855 .muxregs = sdhci_cd_12_muxreg,
863 .muxregs = sdhci_cd_51_muxreg,
871 .name =
"sdhci_cd_12_grp",
872 .pins = sdhci_cd_12_pins,
874 .modemuxs = sdhci_modemux[0],
877 .name =
"sdhci_cd_51_grp",
878 .pins = sdhci_cd_51_pins,
880 .modemuxs = sdhci_modemux[1],
885 static const char *
const sdhci_grps[] = {
"sdhci_cd_12_grp",
"sdhci_cd_51_grp",
890 .groups = sdhci_grps,
895 static const unsigned i2s_pins[] = { 35, 39, 40, 41, 42 };
923 .muxregs = i2s_muxreg,
927 .muxregs = i2s_ext_muxreg,
936 .modemuxs = i2s_modemux,
940 static const char *
const i2s_grps[] = {
"i2s_grp" };
948 static const unsigned uart1_pins[] = { 28, 29 };
969 .muxregs = uart1_muxreg,
973 .muxregs = uart1_ext_muxreg,
982 .modemuxs = uart1_modemux,
986 static const char *
const uart1_grps[] = {
"uart1_grp" };
989 .groups = uart1_grps,
994 static const unsigned uart1_modem_2_to_7_pins[] = { 2, 3, 4, 5, 6, 7 };
995 static const unsigned uart1_modem_31_to_36_pins[] = { 31, 32, 33, 34, 35, 36 };
996 static const unsigned uart1_modem_34_to_45_pins[] = { 34, 35, 36, 43, 44, 45 };
997 static const unsigned uart1_modem_80_to_85_pins[] = { 80, 81, 82, 83, 84, 85 };
999 static struct spear_muxreg uart1_modem_ext_2_to_7_muxreg[] = {
1016 static struct spear_muxreg uart1_modem_31_to_36_muxreg[] = {
1025 static struct spear_muxreg uart1_modem_ext_31_to_36_muxreg[] = {
1040 static struct spear_muxreg uart1_modem_34_to_45_muxreg[] = {
1049 static struct spear_muxreg uart1_modem_ext_34_to_45_muxreg[] = {
1066 static struct spear_muxreg uart1_modem_ext_80_to_85_muxreg[] = {
1082 static struct spear_modemux uart1_modem_2_to_7_modemux[] = {
1085 .muxregs = uart1_modem_ext_2_to_7_muxreg,
1086 .nmuxregs =
ARRAY_SIZE(uart1_modem_ext_2_to_7_muxreg),
1090 static struct spear_modemux uart1_modem_31_to_36_modemux[] = {
1093 .muxregs = uart1_modem_31_to_36_muxreg,
1094 .nmuxregs =
ARRAY_SIZE(uart1_modem_31_to_36_muxreg),
1097 .muxregs = uart1_modem_ext_31_to_36_muxreg,
1098 .nmuxregs =
ARRAY_SIZE(uart1_modem_ext_31_to_36_muxreg),
1102 static struct spear_modemux uart1_modem_34_to_45_modemux[] = {
1105 .muxregs = uart1_modem_34_to_45_muxreg,
1106 .nmuxregs =
ARRAY_SIZE(uart1_modem_34_to_45_muxreg),
1109 .muxregs = uart1_modem_ext_34_to_45_muxreg,
1110 .nmuxregs =
ARRAY_SIZE(uart1_modem_ext_34_to_45_muxreg),
1114 static struct spear_modemux uart1_modem_80_to_85_modemux[] = {
1117 .muxregs = uart1_modem_ext_80_to_85_muxreg,
1118 .nmuxregs =
ARRAY_SIZE(uart1_modem_ext_80_to_85_muxreg),
1124 .name =
"uart1_modem_2_to_7_grp",
1125 .pins = uart1_modem_2_to_7_pins,
1126 .npins =
ARRAY_SIZE(uart1_modem_2_to_7_pins),
1127 .modemuxs = uart1_modem_2_to_7_modemux,
1128 .nmodemuxs =
ARRAY_SIZE(uart1_modem_2_to_7_modemux),
1130 .name =
"uart1_modem_31_to_36_grp",
1131 .pins = uart1_modem_31_to_36_pins,
1132 .npins =
ARRAY_SIZE(uart1_modem_31_to_36_pins),
1133 .modemuxs = uart1_modem_31_to_36_modemux,
1134 .nmodemuxs =
ARRAY_SIZE(uart1_modem_31_to_36_modemux),
1136 .name =
"uart1_modem_34_to_45_grp",
1137 .pins = uart1_modem_34_to_45_pins,
1138 .npins =
ARRAY_SIZE(uart1_modem_34_to_45_pins),
1139 .modemuxs = uart1_modem_34_to_45_modemux,
1140 .nmodemuxs =
ARRAY_SIZE(uart1_modem_34_to_45_modemux),
1142 .name =
"uart1_modem_80_to_85_grp",
1143 .pins = uart1_modem_80_to_85_pins,
1144 .npins =
ARRAY_SIZE(uart1_modem_80_to_85_pins),
1145 .modemuxs = uart1_modem_80_to_85_modemux,
1146 .nmodemuxs =
ARRAY_SIZE(uart1_modem_80_to_85_modemux),
1150 static const char *
const uart1_modem_grps[] = {
"uart1_modem_2_to_7_grp",
1151 "uart1_modem_31_to_36_grp",
"uart1_modem_34_to_45_grp",
1152 "uart1_modem_80_to_85_grp" };
1154 .name =
"uart1_modem",
1155 .groups = uart1_modem_grps,
1160 static const unsigned uart2_pins[] = { 0, 1 };
1181 .muxregs = uart2_muxreg,
1185 .muxregs = uart2_ext_muxreg,
1191 .name =
"uart2_grp",
1194 .modemuxs = uart2_modemux,
1198 static const char *
const uart2_grps[] = {
"uart2_grp" };
1201 .groups = uart2_grps,
1206 static const unsigned uart3_pins[][2] = { { 8, 9 }, { 15, 16 }, { 41, 42 },
1207 { 52, 53 }, { 73, 74 }, { 94, 95 }, { 98, 99 } };
1225 static struct spear_muxreg uart3_ext_15_16_muxreg[] = {
1241 static struct spear_muxreg uart3_ext_41_42_muxreg[] = {
1257 static struct spear_muxreg uart3_ext_52_53_muxreg[] = {
1269 static struct spear_muxreg uart3_ext_73_74_muxreg[] = {
1281 static struct spear_muxreg uart3_ext_94_95_muxreg[] = {
1293 static struct spear_muxreg uart3_ext_98_99_muxreg[] = {
1310 .muxregs = uart3_ext_8_9_muxreg,
1311 .nmuxregs =
ARRAY_SIZE(uart3_ext_8_9_muxreg),
1317 .muxregs = uart3_ext_15_16_muxreg,
1318 .nmuxregs =
ARRAY_SIZE(uart3_ext_15_16_muxreg),
1324 .muxregs = uart3_ext_41_42_muxreg,
1325 .nmuxregs =
ARRAY_SIZE(uart3_ext_41_42_muxreg),
1331 .muxregs = uart3_ext_52_53_muxreg,
1332 .nmuxregs =
ARRAY_SIZE(uart3_ext_52_53_muxreg),
1338 .muxregs = uart3_ext_73_74_muxreg,
1339 .nmuxregs =
ARRAY_SIZE(uart3_ext_73_74_muxreg),
1345 .muxregs = uart3_ext_94_95_muxreg,
1346 .nmuxregs =
ARRAY_SIZE(uart3_ext_94_95_muxreg),
1352 .muxregs = uart3_ext_98_99_muxreg,
1353 .nmuxregs =
ARRAY_SIZE(uart3_ext_98_99_muxreg),
1360 .name =
"uart3_8_9_grp",
1361 .pins = uart3_pins[0],
1363 .modemuxs = uart3_modemux[0],
1366 .name =
"uart3_15_16_grp",
1367 .pins = uart3_pins[1],
1369 .modemuxs = uart3_modemux[1],
1372 .name =
"uart3_41_42_grp",
1373 .pins = uart3_pins[2],
1375 .modemuxs = uart3_modemux[2],
1378 .name =
"uart3_52_53_grp",
1379 .pins = uart3_pins[3],
1381 .modemuxs = uart3_modemux[3],
1384 .name =
"uart3_73_74_grp",
1385 .pins = uart3_pins[4],
1387 .modemuxs = uart3_modemux[4],
1390 .name =
"uart3_94_95_grp",
1391 .pins = uart3_pins[5],
1393 .modemuxs = uart3_modemux[5],
1396 .name =
"uart3_98_99_grp",
1397 .pins = uart3_pins[6],
1399 .modemuxs = uart3_modemux[6],
1404 static const char *
const uart3_grps[] = {
"uart3_8_9_grp",
"uart3_15_16_grp",
1405 "uart3_41_42_grp",
"uart3_52_53_grp",
"uart3_73_74_grp",
1406 "uart3_94_95_grp",
"uart3_98_99_grp" };
1410 .groups = uart3_grps,
1415 static const unsigned uart4_pins[][2] = { { 6, 7 }, { 13, 14 }, { 39, 40 },
1416 { 71, 72 }, { 92, 93 }, { 100, 101 } };
1434 static struct spear_muxreg uart4_ext_13_14_muxreg[] = {
1450 static struct spear_muxreg uart4_ext_39_40_muxreg[] = {
1470 static struct spear_muxreg uart4_ext_71_72_muxreg[] = {
1482 static struct spear_muxreg uart4_ext_92_93_muxreg[] = {
1494 static struct spear_muxreg uart4_ext_100_101_muxreg[] = {
1509 .muxregs = uart4_ext_6_7_muxreg,
1510 .nmuxregs =
ARRAY_SIZE(uart4_ext_6_7_muxreg),
1516 .muxregs = uart4_ext_13_14_muxreg,
1517 .nmuxregs =
ARRAY_SIZE(uart4_ext_13_14_muxreg),
1523 .muxregs = uart4_ext_39_40_muxreg,
1524 .nmuxregs =
ARRAY_SIZE(uart4_ext_39_40_muxreg),
1530 .muxregs = uart4_ext_71_72_muxreg,
1531 .nmuxregs =
ARRAY_SIZE(uart4_ext_71_72_muxreg),
1537 .muxregs = uart4_ext_92_93_muxreg,
1538 .nmuxregs =
ARRAY_SIZE(uart4_ext_92_93_muxreg),
1544 .muxregs = uart4_ext_100_101_muxreg,
1545 .nmuxregs =
ARRAY_SIZE(uart4_ext_100_101_muxreg),
1552 .name =
"uart4_6_7_grp",
1553 .pins = uart4_pins[0],
1555 .modemuxs = uart4_modemux[0],
1558 .name =
"uart4_13_14_grp",
1559 .pins = uart4_pins[1],
1561 .modemuxs = uart4_modemux[1],
1564 .name =
"uart4_39_40_grp",
1565 .pins = uart4_pins[2],
1567 .modemuxs = uart4_modemux[2],
1570 .name =
"uart4_71_72_grp",
1571 .pins = uart4_pins[3],
1573 .modemuxs = uart4_modemux[3],
1576 .name =
"uart4_92_93_grp",
1577 .pins = uart4_pins[4],
1579 .modemuxs = uart4_modemux[4],
1582 .name =
"uart4_100_101_grp",
1583 .pins = uart4_pins[5],
1585 .modemuxs = uart4_modemux[5],
1590 static const char *
const uart4_grps[] = {
"uart4_6_7_grp",
"uart4_13_14_grp",
1591 "uart4_39_40_grp",
"uart4_71_72_grp",
"uart4_92_93_grp",
1592 "uart4_100_101_grp" };
1596 .groups = uart4_grps,
1601 static const unsigned uart5_pins[][2] = { { 4, 5 }, { 37, 38 }, { 69, 70 },
1620 static struct spear_muxreg uart5_ext_37_38_muxreg[] = {
1636 static struct spear_muxreg uart5_ext_69_70_muxreg[] = {
1652 static struct spear_muxreg uart5_ext_90_91_muxreg[] = {
1669 .muxregs = uart5_ext_4_5_muxreg,
1670 .nmuxregs =
ARRAY_SIZE(uart5_ext_4_5_muxreg),
1676 .muxregs = uart5_ext_37_38_muxreg,
1677 .nmuxregs =
ARRAY_SIZE(uart5_ext_37_38_muxreg),
1683 .muxregs = uart5_ext_69_70_muxreg,
1684 .nmuxregs =
ARRAY_SIZE(uart5_ext_69_70_muxreg),
1690 .muxregs = uart5_ext_90_91_muxreg,
1691 .nmuxregs =
ARRAY_SIZE(uart5_ext_90_91_muxreg),
1698 .name =
"uart5_4_5_grp",
1699 .pins = uart5_pins[0],
1701 .modemuxs = uart5_modemux[0],
1704 .name =
"uart5_37_38_grp",
1705 .pins = uart5_pins[1],
1707 .modemuxs = uart5_modemux[1],
1710 .name =
"uart5_69_70_grp",
1711 .pins = uart5_pins[2],
1713 .modemuxs = uart5_modemux[2],
1716 .name =
"uart5_90_91_grp",
1717 .pins = uart5_pins[3],
1719 .modemuxs = uart5_modemux[3],
1724 static const char *
const uart5_grps[] = {
"uart5_4_5_grp",
"uart5_37_38_grp",
1725 "uart5_69_70_grp",
"uart5_90_91_grp" };
1728 .groups = uart5_grps,
1733 static const unsigned uart6_pins[][2] = { { 2, 3 }, { 88, 89 } };
1750 static struct spear_muxreg uart6_ext_88_89_muxreg[] = {
1767 .muxregs = uart6_ext_2_3_muxreg,
1768 .nmuxregs =
ARRAY_SIZE(uart6_ext_2_3_muxreg),
1774 .muxregs = uart6_ext_88_89_muxreg,
1775 .nmuxregs =
ARRAY_SIZE(uart6_ext_88_89_muxreg),
1782 .name =
"uart6_2_3_grp",
1783 .pins = uart6_pins[0],
1785 .modemuxs = uart6_modemux[0],
1788 .name =
"uart6_88_89_grp",
1789 .pins = uart6_pins[1],
1791 .modemuxs = uart6_modemux[1],
1796 static const char *
const uart6_grps[] = {
"uart6_2_3_grp",
"uart6_88_89_grp" };
1799 .groups = uart6_grps,
1804 static const unsigned rs485_pins[] = { 77, 78, 79 };
1816 .muxregs = rs485_muxreg,
1822 .name =
"rs485_grp",
1825 .modemuxs = rs485_modemux,
1829 static const char *
const rs485_grps[] = {
"rs485_grp" };
1832 .groups = rs485_grps,
1837 static const unsigned touchscreen_pins[] = { 5, 36 };
1846 static struct spear_muxreg touchscreen_ext_muxreg[] = {
1861 .muxregs = touchscreen_muxreg,
1865 .muxregs = touchscreen_ext_muxreg,
1866 .nmuxregs =
ARRAY_SIZE(touchscreen_ext_muxreg),
1871 .name =
"touchscreen_grp",
1872 .pins = touchscreen_pins,
1874 .modemuxs = touchscreen_modemux,
1875 .nmodemuxs =
ARRAY_SIZE(touchscreen_modemux),
1878 static const char *
const touchscreen_grps[] = {
"touchscreen_grp" };
1880 .name =
"touchscreen",
1881 .groups = touchscreen_grps,
1886 static const unsigned can0_pins[] = { 32, 33 };
1907 .muxregs = can0_muxreg,
1911 .muxregs = can0_ext_muxreg,
1920 .modemuxs = can0_modemux,
1924 static const char *
const can0_grps[] = {
"can0_grp" };
1927 .groups = can0_grps,
1931 static const unsigned can1_pins[] = { 30, 31 };
1952 .muxregs = can1_muxreg,
1956 .muxregs = can1_ext_muxreg,
1965 .modemuxs = can1_modemux,
1969 static const char *
const can1_grps[] = {
"can1_grp" };
1972 .groups = can1_grps,
1977 static const unsigned pwm0_1_pins[][2] = { { 37, 38 }, { 14, 15 }, { 8, 9 },
1978 { 30, 31 }, { 42, 43 }, { 59, 60 }, { 88, 89 } };
1992 static struct spear_muxreg pwm0_1_autoexpsmallpri_muxreg[] = {
2000 static struct spear_muxreg pwm0_1_pin_14_15_muxreg[] = {
2008 static struct spear_muxreg pwm0_1_pin_30_31_muxreg[] = {
2028 static struct spear_muxreg pwm0_1_pin_37_38_muxreg[] = {
2036 static struct spear_muxreg pwm0_1_pin_42_43_muxreg[] = {
2049 static struct spear_muxreg pwm0_1_pin_59_60_muxreg[] = {
2061 static struct spear_muxreg pwm0_1_pin_88_89_muxreg[] = {
2072 .muxregs = pwm0_1_pin_8_9_muxreg,
2073 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_8_9_muxreg),
2080 .muxregs = pwm0_1_autoexpsmallpri_muxreg,
2081 .nmuxregs =
ARRAY_SIZE(pwm0_1_autoexpsmallpri_muxreg),
2084 .muxregs = pwm0_1_pin_14_15_muxreg,
2085 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_14_15_muxreg),
2092 .muxregs = pwm0_1_pin_30_31_muxreg,
2093 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_30_31_muxreg),
2100 .muxregs = pwm0_1_net_muxreg,
2104 .muxregs = pwm0_1_pin_37_38_muxreg,
2105 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_37_38_muxreg),
2112 .muxregs = pwm0_1_pin_42_43_muxreg,
2113 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_42_43_muxreg),
2120 .muxregs = pwm0_1_pin_59_60_muxreg,
2121 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_59_60_muxreg),
2128 .muxregs = pwm0_1_pin_88_89_muxreg,
2129 .nmuxregs =
ARRAY_SIZE(pwm0_1_pin_88_89_muxreg),
2135 .name =
"pwm0_1_pin_8_9_grp",
2136 .pins = pwm0_1_pins[0],
2138 .modemuxs = pwm0_1_pin_8_9_modemux,
2139 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_8_9_modemux),
2141 .name =
"pwm0_1_pin_14_15_grp",
2142 .pins = pwm0_1_pins[1],
2144 .modemuxs = pwm0_1_pin_14_15_modemux,
2145 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_14_15_modemux),
2147 .name =
"pwm0_1_pin_30_31_grp",
2148 .pins = pwm0_1_pins[2],
2150 .modemuxs = pwm0_1_pin_30_31_modemux,
2151 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_30_31_modemux),
2153 .name =
"pwm0_1_pin_37_38_grp",
2154 .pins = pwm0_1_pins[3],
2156 .modemuxs = pwm0_1_pin_37_38_modemux,
2157 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_37_38_modemux),
2159 .name =
"pwm0_1_pin_42_43_grp",
2160 .pins = pwm0_1_pins[4],
2162 .modemuxs = pwm0_1_pin_42_43_modemux,
2163 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_42_43_modemux),
2165 .name =
"pwm0_1_pin_59_60_grp",
2166 .pins = pwm0_1_pins[5],
2168 .modemuxs = pwm0_1_pin_59_60_modemux,
2169 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_59_60_modemux),
2171 .name =
"pwm0_1_pin_88_89_grp",
2172 .pins = pwm0_1_pins[6],
2174 .modemuxs = pwm0_1_pin_88_89_modemux,
2175 .nmodemuxs =
ARRAY_SIZE(pwm0_1_pin_88_89_modemux),
2179 static const char *
const pwm0_1_grps[] = {
"pwm0_1_pin_8_9_grp",
2180 "pwm0_1_pin_14_15_grp",
"pwm0_1_pin_30_31_grp",
"pwm0_1_pin_37_38_grp",
2181 "pwm0_1_pin_42_43_grp",
"pwm0_1_pin_59_60_grp",
"pwm0_1_pin_88_89_grp"
2186 .groups = pwm0_1_grps,
2191 static const unsigned pwm2_pins[][1] = { { 7 }, { 13 }, { 29 }, { 34 }, { 41 },
2209 static struct spear_muxreg pwm2_autoexpsmallpri_muxreg[] = {
2284 .muxregs = pwm2_net_muxreg,
2288 .muxregs = pwm2_pin_7_muxreg,
2295 .muxregs = pwm2_autoexpsmallpri_muxreg,
2296 .nmuxregs =
ARRAY_SIZE(pwm2_autoexpsmallpri_muxreg),
2299 .muxregs = pwm2_pin_13_muxreg,
2306 .muxregs = pwm2_pin_29_muxreg,
2313 .muxregs = pwm2_pin_34_muxreg,
2321 .muxregs = pwm2_pin_41_muxreg,
2329 .muxregs = pwm2_pin_58_muxreg,
2337 .muxregs = pwm2_pin_87_muxreg,
2344 .name =
"pwm2_pin_7_grp",
2345 .pins = pwm2_pins[0],
2347 .modemuxs = pwm2_pin_7_modemux,
2350 .name =
"pwm2_pin_13_grp",
2351 .pins = pwm2_pins[1],
2353 .modemuxs = pwm2_pin_13_modemux,
2354 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_13_modemux),
2356 .name =
"pwm2_pin_29_grp",
2357 .pins = pwm2_pins[2],
2359 .modemuxs = pwm2_pin_29_modemux,
2360 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_29_modemux),
2362 .name =
"pwm2_pin_34_grp",
2363 .pins = pwm2_pins[3],
2365 .modemuxs = pwm2_pin_34_modemux,
2366 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_34_modemux),
2368 .name =
"pwm2_pin_41_grp",
2369 .pins = pwm2_pins[4],
2371 .modemuxs = pwm2_pin_41_modemux,
2372 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_41_modemux),
2374 .name =
"pwm2_pin_58_grp",
2375 .pins = pwm2_pins[5],
2377 .modemuxs = pwm2_pin_58_modemux,
2378 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_58_modemux),
2380 .name =
"pwm2_pin_87_grp",
2381 .pins = pwm2_pins[6],
2383 .modemuxs = pwm2_pin_87_modemux,
2384 .nmodemuxs =
ARRAY_SIZE(pwm2_pin_87_modemux),
2388 static const char *
const pwm2_grps[] = {
"pwm2_pin_7_grp",
"pwm2_pin_13_grp",
2389 "pwm2_pin_29_grp",
"pwm2_pin_34_grp",
"pwm2_pin_41_grp",
2390 "pwm2_pin_58_grp",
"pwm2_pin_87_grp" };
2393 .groups = pwm2_grps,
2398 static const unsigned pwm3_pins[][1] = { { 6 }, { 12 }, { 28 }, { 40 }, { 57 },
2471 .muxregs = pwm3_pin_6_muxreg,
2480 .muxregs = pwm3_muxreg,
2484 .muxregs = pwm3_pin_12_muxreg,
2492 .muxregs = pwm3_pin_28_muxreg,
2500 .muxregs = pwm3_pin_40_muxreg,
2508 .muxregs = pwm3_pin_57_muxreg,
2516 .muxregs = pwm3_pin_86_muxreg,
2523 .name =
"pwm3_pin_6_grp",
2524 .pins = pwm3_pins[0],
2526 .modemuxs = pwm3_pin_6_modemux,
2529 .name =
"pwm3_pin_12_grp",
2530 .pins = pwm3_pins[1],
2532 .modemuxs = pwm3_pin_12_modemux,
2533 .nmodemuxs =
ARRAY_SIZE(pwm3_pin_12_modemux),
2535 .name =
"pwm3_pin_28_grp",
2536 .pins = pwm3_pins[2],
2538 .modemuxs = pwm3_pin_28_modemux,
2539 .nmodemuxs =
ARRAY_SIZE(pwm3_pin_28_modemux),
2541 .name =
"pwm3_pin_40_grp",
2542 .pins = pwm3_pins[3],
2544 .modemuxs = pwm3_pin_40_modemux,
2545 .nmodemuxs =
ARRAY_SIZE(pwm3_pin_40_modemux),
2547 .name =
"pwm3_pin_57_grp",
2548 .pins = pwm3_pins[4],
2550 .modemuxs = pwm3_pin_57_modemux,
2551 .nmodemuxs =
ARRAY_SIZE(pwm3_pin_57_modemux),
2553 .name =
"pwm3_pin_86_grp",
2554 .pins = pwm3_pins[5],
2556 .modemuxs = pwm3_pin_86_modemux,
2557 .nmodemuxs =
ARRAY_SIZE(pwm3_pin_86_modemux),
2561 static const char *
const pwm3_grps[] = {
"pwm3_pin_6_grp",
"pwm3_pin_12_grp",
2562 "pwm3_pin_28_grp",
"pwm3_pin_40_grp",
"pwm3_pin_57_grp",
2563 "pwm3_pin_86_grp" };
2566 .groups = pwm3_grps,
2571 static const unsigned ssp1_pins[][2] = { { 17, 20 }, { 36, 39 }, { 48, 51 },
2572 { 65, 68 }, { 94, 97 } };
2662 .muxregs = ssp1_muxreg,
2666 .muxregs = ssp1_ext_17_20_muxreg,
2667 .nmuxregs =
ARRAY_SIZE(ssp1_ext_17_20_muxreg),
2674 .muxregs = ssp1_ext_36_39_muxreg,
2675 .nmuxregs =
ARRAY_SIZE(ssp1_ext_36_39_muxreg),
2682 .muxregs = ssp1_ext_48_51_muxreg,
2683 .nmuxregs =
ARRAY_SIZE(ssp1_ext_48_51_muxreg),
2689 .muxregs = ssp1_ext_65_68_muxreg,
2690 .nmuxregs =
ARRAY_SIZE(ssp1_ext_65_68_muxreg),
2697 .muxregs = ssp1_ext_94_97_muxreg,
2698 .nmuxregs =
ARRAY_SIZE(ssp1_ext_94_97_muxreg),
2704 .name =
"ssp1_17_20_grp",
2705 .pins = ssp1_pins[0],
2707 .modemuxs = ssp1_17_20_modemux,
2710 .name =
"ssp1_36_39_grp",
2711 .pins = ssp1_pins[1],
2713 .modemuxs = ssp1_36_39_modemux,
2716 .name =
"ssp1_48_51_grp",
2717 .pins = ssp1_pins[2],
2719 .modemuxs = ssp1_48_51_modemux,
2722 .name =
"ssp1_65_68_grp",
2723 .pins = ssp1_pins[3],
2725 .modemuxs = ssp1_65_68_modemux,
2728 .name =
"ssp1_94_97_grp",
2729 .pins = ssp1_pins[4],
2731 .modemuxs = ssp1_94_97_modemux,
2736 static const char *
const ssp1_grps[] = {
"ssp1_17_20_grp",
"ssp1_36_39_grp",
2737 "ssp1_48_51_grp",
"ssp1_65_68_grp",
"ssp1_94_97_grp"
2741 .groups = ssp1_grps,
2746 static const unsigned ssp2_pins[][2] = { { 13, 16 }, { 32, 35 }, { 44, 47 },
2747 { 61, 64 }, { 90, 93 } };
2829 .muxregs = ssp2_muxreg,
2833 .muxregs = ssp2_ext_13_16_muxreg,
2834 .nmuxregs =
ARRAY_SIZE(ssp2_ext_13_16_muxreg),
2841 .muxregs = ssp2_ext_32_35_muxreg,
2842 .nmuxregs =
ARRAY_SIZE(ssp2_ext_32_35_muxreg),
2849 .muxregs = ssp2_ext_44_47_muxreg,
2850 .nmuxregs =
ARRAY_SIZE(ssp2_ext_44_47_muxreg),
2857 .muxregs = ssp2_ext_61_64_muxreg,
2858 .nmuxregs =
ARRAY_SIZE(ssp2_ext_61_64_muxreg),
2865 .muxregs = ssp2_ext_90_93_muxreg,
2866 .nmuxregs =
ARRAY_SIZE(ssp2_ext_90_93_muxreg),
2872 .name =
"ssp2_13_16_grp",
2873 .pins = ssp2_pins[0],
2875 .modemuxs = ssp2_13_16_modemux,
2878 .name =
"ssp2_32_35_grp",
2879 .pins = ssp2_pins[1],
2881 .modemuxs = ssp2_32_35_modemux,
2884 .name =
"ssp2_44_47_grp",
2885 .pins = ssp2_pins[2],
2887 .modemuxs = ssp2_44_47_modemux,
2890 .name =
"ssp2_61_64_grp",
2891 .pins = ssp2_pins[3],
2893 .modemuxs = ssp2_61_64_modemux,
2896 .name =
"ssp2_90_93_grp",
2897 .pins = ssp2_pins[4],
2899 .modemuxs = ssp2_90_93_modemux,
2904 static const char *
const ssp2_grps[] = {
"ssp2_13_16_grp",
"ssp2_32_35_grp",
2905 "ssp2_44_47_grp",
"ssp2_61_64_grp",
"ssp2_90_93_grp" };
2908 .groups = ssp2_grps,
2913 static const unsigned mii2_pins[] = { 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
2914 90, 91, 92, 93, 94, 95, 96, 97 };
2942 .muxregs = mii2_muxreg,
2951 .modemuxs = mii2_modemux,
2955 static const char *
const mii2_grps[] = {
"mii2_grp" };
2958 .groups = mii2_grps,
2963 static const unsigned rmii0_1_pins[] = { 10, 11, 13, 14, 15, 16, 17, 18, 19, 20,
2964 21, 22, 23, 24, 25, 26, 27 };
2965 static const unsigned smii0_1_pins[] = { 10, 11, 21, 22, 23, 24, 25, 26, 27 };
3023 .muxregs = mii0_1_muxreg,
3027 .muxregs = smii0_1_ext_muxreg,
3035 .muxregs = mii0_1_muxreg,
3039 .muxregs = rmii0_1_ext_muxreg,
3047 .name =
"smii0_1_grp",
3048 .pins = smii0_1_pins,
3050 .modemuxs = mii0_1_modemux[0],
3053 .name =
"rmii0_1_grp",
3054 .pins = rmii0_1_pins,
3056 .modemuxs = mii0_1_modemux[1],
3061 static const char *
const mii0_1_grps[] = {
"smii0_1_grp",
"rmii0_1_grp" };
3064 .groups = mii0_1_grps,
3069 static const unsigned i2c1_pins[][2] = { { 8, 9 }, { 98, 99 } };
3103 .muxregs = i2c1_ext_8_9_muxreg,
3110 .muxregs = i2c1_ext_98_99_muxreg,
3111 .nmuxregs =
ARRAY_SIZE(i2c1_ext_98_99_muxreg),
3118 .name =
"i2c1_8_9_grp",
3119 .pins = i2c1_pins[0],
3121 .modemuxs = i2c1_modemux[0],
3124 .name =
"i2c1_98_99_grp",
3125 .pins = i2c1_pins[1],
3127 .modemuxs = i2c1_modemux[1],
3132 static const char *
const i2c1_grps[] = {
"i2c1_8_9_grp",
"i2c1_98_99_grp" };
3135 .groups = i2c1_grps,
3140 static const unsigned i2c2_pins[][2] = { { 0, 1 }, { 2, 3 }, { 19, 20 },
3141 { 75, 76 }, { 96, 97 } };
3223 .muxregs = i2c2_ext_0_1_muxreg,
3230 .muxregs = i2c2_ext_2_3_muxreg,
3237 .muxregs = i2c2_ext_19_20_muxreg,
3238 .nmuxregs =
ARRAY_SIZE(i2c2_ext_19_20_muxreg),
3244 .muxregs = i2c2_ext_75_76_muxreg,
3245 .nmuxregs =
ARRAY_SIZE(i2c2_ext_75_76_muxreg),
3251 .muxregs = i2c2_ext_96_97_muxreg,
3252 .nmuxregs =
ARRAY_SIZE(i2c2_ext_96_97_muxreg),
3259 .name =
"i2c2_0_1_grp",
3260 .pins = i2c2_pins[0],
3262 .modemuxs = i2c2_modemux[0],
3265 .name =
"i2c2_2_3_grp",
3266 .pins = i2c2_pins[1],
3268 .modemuxs = i2c2_modemux[1],
3271 .name =
"i2c2_19_20_grp",
3272 .pins = i2c2_pins[2],
3274 .modemuxs = i2c2_modemux[2],
3277 .name =
"i2c2_75_76_grp",
3278 .pins = i2c2_pins[3],
3280 .modemuxs = i2c2_modemux[3],
3283 .name =
"i2c2_96_97_grp",
3284 .pins = i2c2_pins[4],
3286 .modemuxs = i2c2_modemux[4],
3291 static const char *
const i2c2_grps[] = {
"i2c2_0_1_grp",
"i2c2_2_3_grp",
3292 "i2c2_19_20_grp",
"i2c2_75_76_grp",
"i2c2_96_97_grp" };
3295 .groups = i2c2_grps,
3304 &fsmc_8bit_pingroup,
3305 &fsmc_16bit_pingroup,
3307 &sdhci_led_pingroup,
3312 &uart1_modem_pingroup[0],
3313 &uart1_modem_pingroup[1],
3314 &uart1_modem_pingroup[2],
3315 &uart1_modem_pingroup[3],
3337 &touchscreen_pingroup,
3340 &pwm0_1_pingroup[0],
3341 &pwm0_1_pingroup[1],
3342 &pwm0_1_pingroup[2],
3343 &pwm0_1_pingroup[3],
3344 &pwm0_1_pingroup[4],
3345 &pwm0_1_pingroup[5],
3346 &pwm0_1_pingroup[6],
3371 &mii0_1_pingroup[0],
3372 &mii0_1_pingroup[1],
3392 &uart1_modem_function,
3399 &touchscreen_function,
3415 .compatible =
"st,spear320-pinmux",
3451 .of_match_table = spear320_pinctrl_of_match,
3453 .probe = spear320_pinctrl_probe,
3457 static int __init spear320_pinctrl_init(
void)
3463 static void __exit spear320_pinctrl_exit(
void)