1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
23a198059SLinus Walleij #include <linux/kernel.h>
3937e7a39SAndy Shevchenko #include <linux/types.h>
4937e7a39SAndy Shevchenko
53a198059SLinus Walleij #include <linux/pinctrl/pinctrl.h>
6*966942aeSThéo Lebrun #include <linux/gpio/driver.h>
7937e7a39SAndy Shevchenko
8*966942aeSThéo Lebrun #include <linux/gpio/gpio-nomadik.h>
93a198059SLinus Walleij
103a198059SLinus Walleij /* All the pins that can be used for GPIO and some other functions */
113a198059SLinus Walleij #define _GPIO(offset) (offset)
123a198059SLinus Walleij
133a198059SLinus Walleij #define DB8500_PIN_AJ5 _GPIO(0)
143a198059SLinus Walleij #define DB8500_PIN_AJ3 _GPIO(1)
153a198059SLinus Walleij #define DB8500_PIN_AH4 _GPIO(2)
163a198059SLinus Walleij #define DB8500_PIN_AH3 _GPIO(3)
173a198059SLinus Walleij #define DB8500_PIN_AH6 _GPIO(4)
183a198059SLinus Walleij #define DB8500_PIN_AG6 _GPIO(5)
193a198059SLinus Walleij #define DB8500_PIN_AF6 _GPIO(6)
203a198059SLinus Walleij #define DB8500_PIN_AG5 _GPIO(7)
213a198059SLinus Walleij #define DB8500_PIN_AD5 _GPIO(8)
223a198059SLinus Walleij #define DB8500_PIN_AE4 _GPIO(9)
233a198059SLinus Walleij #define DB8500_PIN_AF5 _GPIO(10)
243a198059SLinus Walleij #define DB8500_PIN_AG4 _GPIO(11)
253a198059SLinus Walleij #define DB8500_PIN_AC4 _GPIO(12)
263a198059SLinus Walleij #define DB8500_PIN_AF3 _GPIO(13)
273a198059SLinus Walleij #define DB8500_PIN_AE3 _GPIO(14)
283a198059SLinus Walleij #define DB8500_PIN_AC3 _GPIO(15)
293a198059SLinus Walleij #define DB8500_PIN_AD3 _GPIO(16)
303a198059SLinus Walleij #define DB8500_PIN_AD4 _GPIO(17)
313a198059SLinus Walleij #define DB8500_PIN_AC2 _GPIO(18)
323a198059SLinus Walleij #define DB8500_PIN_AC1 _GPIO(19)
333a198059SLinus Walleij #define DB8500_PIN_AB4 _GPIO(20)
343a198059SLinus Walleij #define DB8500_PIN_AB3 _GPIO(21)
353a198059SLinus Walleij #define DB8500_PIN_AA3 _GPIO(22)
363a198059SLinus Walleij #define DB8500_PIN_AA4 _GPIO(23)
373a198059SLinus Walleij #define DB8500_PIN_AB2 _GPIO(24)
383a198059SLinus Walleij #define DB8500_PIN_Y4 _GPIO(25)
393a198059SLinus Walleij #define DB8500_PIN_Y2 _GPIO(26)
403a198059SLinus Walleij #define DB8500_PIN_AA2 _GPIO(27)
413a198059SLinus Walleij #define DB8500_PIN_AA1 _GPIO(28)
423a198059SLinus Walleij #define DB8500_PIN_W2 _GPIO(29)
433a198059SLinus Walleij #define DB8500_PIN_W3 _GPIO(30)
443a198059SLinus Walleij #define DB8500_PIN_V3 _GPIO(31)
453a198059SLinus Walleij #define DB8500_PIN_V2 _GPIO(32)
463a198059SLinus Walleij #define DB8500_PIN_AF2 _GPIO(33)
473a198059SLinus Walleij #define DB8500_PIN_AE1 _GPIO(34)
483a198059SLinus Walleij #define DB8500_PIN_AE2 _GPIO(35)
493a198059SLinus Walleij #define DB8500_PIN_AG2 _GPIO(36)
503a198059SLinus Walleij /* Hole */
513a198059SLinus Walleij #define DB8500_PIN_F3 _GPIO(64)
523a198059SLinus Walleij #define DB8500_PIN_F1 _GPIO(65)
533a198059SLinus Walleij #define DB8500_PIN_G3 _GPIO(66)
543a198059SLinus Walleij #define DB8500_PIN_G2 _GPIO(67)
553a198059SLinus Walleij #define DB8500_PIN_E1 _GPIO(68)
563a198059SLinus Walleij #define DB8500_PIN_E2 _GPIO(69)
573a198059SLinus Walleij #define DB8500_PIN_G5 _GPIO(70)
583a198059SLinus Walleij #define DB8500_PIN_G4 _GPIO(71)
593a198059SLinus Walleij #define DB8500_PIN_H4 _GPIO(72)
603a198059SLinus Walleij #define DB8500_PIN_H3 _GPIO(73)
613a198059SLinus Walleij #define DB8500_PIN_J3 _GPIO(74)
623a198059SLinus Walleij #define DB8500_PIN_H2 _GPIO(75)
633a198059SLinus Walleij #define DB8500_PIN_J2 _GPIO(76)
643a198059SLinus Walleij #define DB8500_PIN_H1 _GPIO(77)
653a198059SLinus Walleij #define DB8500_PIN_F4 _GPIO(78)
663a198059SLinus Walleij #define DB8500_PIN_E3 _GPIO(79)
673a198059SLinus Walleij #define DB8500_PIN_E4 _GPIO(80)
683a198059SLinus Walleij #define DB8500_PIN_D2 _GPIO(81)
693a198059SLinus Walleij #define DB8500_PIN_C1 _GPIO(82)
703a198059SLinus Walleij #define DB8500_PIN_D3 _GPIO(83)
713a198059SLinus Walleij #define DB8500_PIN_C2 _GPIO(84)
723a198059SLinus Walleij #define DB8500_PIN_D5 _GPIO(85)
733a198059SLinus Walleij #define DB8500_PIN_C6 _GPIO(86)
743a198059SLinus Walleij #define DB8500_PIN_B3 _GPIO(87)
753a198059SLinus Walleij #define DB8500_PIN_C4 _GPIO(88)
763a198059SLinus Walleij #define DB8500_PIN_E6 _GPIO(89)
773a198059SLinus Walleij #define DB8500_PIN_A3 _GPIO(90)
783a198059SLinus Walleij #define DB8500_PIN_B6 _GPIO(91)
793a198059SLinus Walleij #define DB8500_PIN_D6 _GPIO(92)
803a198059SLinus Walleij #define DB8500_PIN_B7 _GPIO(93)
813a198059SLinus Walleij #define DB8500_PIN_D7 _GPIO(94)
823a198059SLinus Walleij #define DB8500_PIN_E8 _GPIO(95)
833a198059SLinus Walleij #define DB8500_PIN_D8 _GPIO(96)
843a198059SLinus Walleij #define DB8500_PIN_D9 _GPIO(97)
853a198059SLinus Walleij /* Hole */
863a198059SLinus Walleij #define DB8500_PIN_A5 _GPIO(128)
873a198059SLinus Walleij #define DB8500_PIN_B4 _GPIO(129)
883a198059SLinus Walleij #define DB8500_PIN_C8 _GPIO(130)
893a198059SLinus Walleij #define DB8500_PIN_A12 _GPIO(131)
903a198059SLinus Walleij #define DB8500_PIN_C10 _GPIO(132)
913a198059SLinus Walleij #define DB8500_PIN_B10 _GPIO(133)
923a198059SLinus Walleij #define DB8500_PIN_B9 _GPIO(134)
933a198059SLinus Walleij #define DB8500_PIN_A9 _GPIO(135)
943a198059SLinus Walleij #define DB8500_PIN_C7 _GPIO(136)
953a198059SLinus Walleij #define DB8500_PIN_A7 _GPIO(137)
963a198059SLinus Walleij #define DB8500_PIN_C5 _GPIO(138)
973a198059SLinus Walleij #define DB8500_PIN_C9 _GPIO(139)
983a198059SLinus Walleij #define DB8500_PIN_B11 _GPIO(140)
993a198059SLinus Walleij #define DB8500_PIN_C12 _GPIO(141)
1003a198059SLinus Walleij #define DB8500_PIN_C11 _GPIO(142)
1013a198059SLinus Walleij #define DB8500_PIN_D12 _GPIO(143)
1023a198059SLinus Walleij #define DB8500_PIN_B13 _GPIO(144)
1033a198059SLinus Walleij #define DB8500_PIN_C13 _GPIO(145)
1043a198059SLinus Walleij #define DB8500_PIN_D13 _GPIO(146)
1053a198059SLinus Walleij #define DB8500_PIN_C15 _GPIO(147)
1063a198059SLinus Walleij #define DB8500_PIN_B16 _GPIO(148)
1073a198059SLinus Walleij #define DB8500_PIN_B14 _GPIO(149)
1083a198059SLinus Walleij #define DB8500_PIN_C14 _GPIO(150)
1093a198059SLinus Walleij #define DB8500_PIN_D17 _GPIO(151)
1103a198059SLinus Walleij #define DB8500_PIN_D16 _GPIO(152)
1113a198059SLinus Walleij #define DB8500_PIN_B17 _GPIO(153)
1123a198059SLinus Walleij #define DB8500_PIN_C16 _GPIO(154)
1133a198059SLinus Walleij #define DB8500_PIN_C19 _GPIO(155)
1143a198059SLinus Walleij #define DB8500_PIN_C17 _GPIO(156)
1153a198059SLinus Walleij #define DB8500_PIN_A18 _GPIO(157)
1163a198059SLinus Walleij #define DB8500_PIN_C18 _GPIO(158)
1173a198059SLinus Walleij #define DB8500_PIN_B19 _GPIO(159)
1183a198059SLinus Walleij #define DB8500_PIN_B20 _GPIO(160)
1193a198059SLinus Walleij #define DB8500_PIN_D21 _GPIO(161)
1203a198059SLinus Walleij #define DB8500_PIN_D20 _GPIO(162)
1213a198059SLinus Walleij #define DB8500_PIN_C20 _GPIO(163)
1223a198059SLinus Walleij #define DB8500_PIN_B21 _GPIO(164)
1233a198059SLinus Walleij #define DB8500_PIN_C21 _GPIO(165)
1243a198059SLinus Walleij #define DB8500_PIN_A22 _GPIO(166)
1253a198059SLinus Walleij #define DB8500_PIN_B24 _GPIO(167)
1263a198059SLinus Walleij #define DB8500_PIN_C22 _GPIO(168)
1273a198059SLinus Walleij #define DB8500_PIN_D22 _GPIO(169)
1283a198059SLinus Walleij #define DB8500_PIN_C23 _GPIO(170)
1293a198059SLinus Walleij #define DB8500_PIN_D23 _GPIO(171)
1303a198059SLinus Walleij /* Hole */
1313a198059SLinus Walleij #define DB8500_PIN_AJ27 _GPIO(192)
1323a198059SLinus Walleij #define DB8500_PIN_AH27 _GPIO(193)
1333a198059SLinus Walleij #define DB8500_PIN_AF27 _GPIO(194)
1343a198059SLinus Walleij #define DB8500_PIN_AG28 _GPIO(195)
1353a198059SLinus Walleij #define DB8500_PIN_AG26 _GPIO(196)
1363a198059SLinus Walleij #define DB8500_PIN_AH24 _GPIO(197)
1373a198059SLinus Walleij #define DB8500_PIN_AG25 _GPIO(198)
1383a198059SLinus Walleij #define DB8500_PIN_AH23 _GPIO(199)
1393a198059SLinus Walleij #define DB8500_PIN_AH26 _GPIO(200)
1403a198059SLinus Walleij #define DB8500_PIN_AF24 _GPIO(201)
1413a198059SLinus Walleij #define DB8500_PIN_AF25 _GPIO(202)
1423a198059SLinus Walleij #define DB8500_PIN_AE23 _GPIO(203)
1433a198059SLinus Walleij #define DB8500_PIN_AF23 _GPIO(204)
1443a198059SLinus Walleij #define DB8500_PIN_AG23 _GPIO(205)
1453a198059SLinus Walleij #define DB8500_PIN_AG24 _GPIO(206)
1463a198059SLinus Walleij #define DB8500_PIN_AJ23 _GPIO(207)
1473a198059SLinus Walleij #define DB8500_PIN_AH16 _GPIO(208)
1483a198059SLinus Walleij #define DB8500_PIN_AG15 _GPIO(209)
1493a198059SLinus Walleij #define DB8500_PIN_AJ15 _GPIO(210)
1503a198059SLinus Walleij #define DB8500_PIN_AG14 _GPIO(211)
1513a198059SLinus Walleij #define DB8500_PIN_AF13 _GPIO(212)
1523a198059SLinus Walleij #define DB8500_PIN_AG13 _GPIO(213)
1533a198059SLinus Walleij #define DB8500_PIN_AH15 _GPIO(214)
1543a198059SLinus Walleij #define DB8500_PIN_AH13 _GPIO(215)
1553a198059SLinus Walleij #define DB8500_PIN_AG12 _GPIO(216)
1563a198059SLinus Walleij #define DB8500_PIN_AH12 _GPIO(217)
1573a198059SLinus Walleij #define DB8500_PIN_AH11 _GPIO(218)
1583a198059SLinus Walleij #define DB8500_PIN_AG10 _GPIO(219)
1593a198059SLinus Walleij #define DB8500_PIN_AH10 _GPIO(220)
1603a198059SLinus Walleij #define DB8500_PIN_AJ11 _GPIO(221)
1613a198059SLinus Walleij #define DB8500_PIN_AJ9 _GPIO(222)
1623a198059SLinus Walleij #define DB8500_PIN_AH9 _GPIO(223)
1633a198059SLinus Walleij #define DB8500_PIN_AG9 _GPIO(224)
1643a198059SLinus Walleij #define DB8500_PIN_AG8 _GPIO(225)
1653a198059SLinus Walleij #define DB8500_PIN_AF8 _GPIO(226)
1663a198059SLinus Walleij #define DB8500_PIN_AH7 _GPIO(227)
1673a198059SLinus Walleij #define DB8500_PIN_AJ6 _GPIO(228)
1683a198059SLinus Walleij #define DB8500_PIN_AG7 _GPIO(229)
1693a198059SLinus Walleij #define DB8500_PIN_AF7 _GPIO(230)
1703a198059SLinus Walleij /* Hole */
1713a198059SLinus Walleij #define DB8500_PIN_AF28 _GPIO(256)
1723a198059SLinus Walleij #define DB8500_PIN_AE29 _GPIO(257)
1733a198059SLinus Walleij #define DB8500_PIN_AD29 _GPIO(258)
1743a198059SLinus Walleij #define DB8500_PIN_AC29 _GPIO(259)
1753a198059SLinus Walleij #define DB8500_PIN_AD28 _GPIO(260)
1763a198059SLinus Walleij #define DB8500_PIN_AD26 _GPIO(261)
1773a198059SLinus Walleij #define DB8500_PIN_AE26 _GPIO(262)
1783a198059SLinus Walleij #define DB8500_PIN_AG29 _GPIO(263)
1793a198059SLinus Walleij #define DB8500_PIN_AE27 _GPIO(264)
1803a198059SLinus Walleij #define DB8500_PIN_AD27 _GPIO(265)
1813a198059SLinus Walleij #define DB8500_PIN_AC28 _GPIO(266)
1823a198059SLinus Walleij #define DB8500_PIN_AC27 _GPIO(267)
1833a198059SLinus Walleij
1843a198059SLinus Walleij /*
1853a198059SLinus Walleij * The names of the pins are denoted by GPIO number and ball name, even
1863a198059SLinus Walleij * though they can be used for other things than GPIO, this is the first
1873a198059SLinus Walleij * column in the table of the data sheet and often used on schematics and
1883a198059SLinus Walleij * such.
1893a198059SLinus Walleij */
1903a198059SLinus Walleij static const struct pinctrl_pin_desc nmk_db8500_pins[] = {
1913a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ5, "GPIO0_AJ5"),
1923a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ3, "GPIO1_AJ3"),
1933a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH4, "GPIO2_AH4"),
1943a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH3, "GPIO3_AH3"),
1953a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH6, "GPIO4_AH6"),
1963a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG6, "GPIO5_AG6"),
1973a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF6, "GPIO6_AF6"),
1983a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG5, "GPIO7_AG5"),
1993a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD5, "GPIO8_AD5"),
2003a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE4, "GPIO9_AE4"),
2013a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF5, "GPIO10_AF5"),
2023a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG4, "GPIO11_AG4"),
2033a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC4, "GPIO12_AC4"),
2043a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF3, "GPIO13_AF3"),
2053a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE3, "GPIO14_AE3"),
2063a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC3, "GPIO15_AC3"),
2073a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD3, "GPIO16_AD3"),
2083a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD4, "GPIO17_AD4"),
2093a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC2, "GPIO18_AC2"),
2103a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC1, "GPIO19_AC1"),
2113a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AB4, "GPIO20_AB4"),
2123a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AB3, "GPIO21_AB3"),
2133a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AA3, "GPIO22_AA3"),
2143a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AA4, "GPIO23_AA4"),
2153a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AB2, "GPIO24_AB2"),
2163a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_Y4, "GPIO25_Y4"),
2173a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_Y2, "GPIO26_Y2"),
2183a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AA2, "GPIO27_AA2"),
2193a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AA1, "GPIO28_AA1"),
2203a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_W2, "GPIO29_W2"),
2213a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_W3, "GPIO30_W3"),
2223a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_V3, "GPIO31_V3"),
2233a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_V2, "GPIO32_V2"),
2243a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF2, "GPIO33_AF2"),
2253a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE1, "GPIO34_AE1"),
2263a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE2, "GPIO35_AE2"),
2273a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG2, "GPIO36_AG2"),
2283a198059SLinus Walleij /* Hole */
2293a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_F3, "GPIO64_F3"),
2303a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_F1, "GPIO65_F1"),
2313a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_G3, "GPIO66_G3"),
2323a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_G2, "GPIO67_G2"),
2333a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E1, "GPIO68_E1"),
2343a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E2, "GPIO69_E2"),
2353a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_G5, "GPIO70_G5"),
2363a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_G4, "GPIO71_G4"),
2373a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_H4, "GPIO72_H4"),
2383a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_H3, "GPIO73_H3"),
2393a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_J3, "GPIO74_J3"),
2403a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_H2, "GPIO75_H2"),
2413a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_J2, "GPIO76_J2"),
2423a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_H1, "GPIO77_H1"),
2433a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_F4, "GPIO78_F4"),
2443a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E3, "GPIO79_E3"),
2453a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E4, "GPIO80_E4"),
2463a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D2, "GPIO81_D2"),
2473a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C1, "GPIO82_C1"),
2483a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D3, "GPIO83_D3"),
2493a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C2, "GPIO84_C2"),
2503a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D5, "GPIO85_D5"),
2513a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C6, "GPIO86_C6"),
2523a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B3, "GPIO87_B3"),
2533a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C4, "GPIO88_C4"),
2543a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E6, "GPIO89_E6"),
2553a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A3, "GPIO90_A3"),
2563a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B6, "GPIO91_B6"),
2573a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D6, "GPIO92_D6"),
2583a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B7, "GPIO93_B7"),
2593a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D7, "GPIO94_D7"),
2603a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_E8, "GPIO95_E8"),
2613a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D8, "GPIO96_D8"),
2623a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D9, "GPIO97_D9"),
2633a198059SLinus Walleij /* Hole */
2643a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A5, "GPIO128_A5"),
2653a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B4, "GPIO129_B4"),
2663a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C8, "GPIO130_C8"),
2673a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A12, "GPIO131_A12"),
2683a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C10, "GPIO132_C10"),
2693a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B10, "GPIO133_B10"),
2703a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B9, "GPIO134_B9"),
2713a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A9, "GPIO135_A9"),
2723a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C7, "GPIO136_C7"),
2733a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A7, "GPIO137_A7"),
2743a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C5, "GPIO138_C5"),
2753a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C9, "GPIO139_C9"),
2763a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B11, "GPIO140_B11"),
2773a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C12, "GPIO141_C12"),
2783a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C11, "GPIO142_C11"),
2793a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D12, "GPIO143_D12"),
2803a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B13, "GPIO144_B13"),
2813a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C13, "GPIO145_C13"),
2823a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D13, "GPIO146_D13"),
2833a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C15, "GPIO147_C15"),
2843a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B16, "GPIO148_B16"),
2853a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B14, "GPIO149_B14"),
2863a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C14, "GPIO150_C14"),
2873a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D17, "GPIO151_D17"),
2883a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D16, "GPIO152_D16"),
2893a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B17, "GPIO153_B17"),
2903a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C16, "GPIO154_C16"),
2913a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C19, "GPIO155_C19"),
2923a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C17, "GPIO156_C17"),
2933a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A18, "GPIO157_A18"),
2943a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C18, "GPIO158_C18"),
2953a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B19, "GPIO159_B19"),
2963a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B20, "GPIO160_B20"),
2973a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D21, "GPIO161_D21"),
2983a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D20, "GPIO162_D20"),
2993a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C20, "GPIO163_C20"),
3003a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B21, "GPIO164_B21"),
3013a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C21, "GPIO165_C21"),
3023a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_A22, "GPIO166_A22"),
3033a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_B24, "GPIO167_B24"),
3043a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C22, "GPIO168_C22"),
3053a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D22, "GPIO169_D22"),
3063a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_C23, "GPIO170_C23"),
3073a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_D23, "GPIO171_D23"),
3083a198059SLinus Walleij /* Hole */
3093a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ27, "GPIO192_AJ27"),
3103a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH27, "GPIO193_AH27"),
3113a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF27, "GPIO194_AF27"),
3123a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG28, "GPIO195_AG28"),
3133a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG26, "GPIO196_AG26"),
3143a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH24, "GPIO197_AH24"),
3153a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG25, "GPIO198_AG25"),
3163a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH23, "GPIO199_AH23"),
3173a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH26, "GPIO200_AH26"),
3183a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF24, "GPIO201_AF24"),
3193a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF25, "GPIO202_AF25"),
3203a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE23, "GPIO203_AE23"),
3213a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF23, "GPIO204_AF23"),
3223a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG23, "GPIO205_AG23"),
3233a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG24, "GPIO206_AG24"),
3243a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ23, "GPIO207_AJ23"),
3253a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH16, "GPIO208_AH16"),
3263a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG15, "GPIO209_AG15"),
3273a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ15, "GPIO210_AJ15"),
3283a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG14, "GPIO211_AG14"),
3293a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF13, "GPIO212_AF13"),
3303a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG13, "GPIO213_AG13"),
3313a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH15, "GPIO214_AH15"),
3323a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH13, "GPIO215_AH13"),
3333a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG12, "GPIO216_AG12"),
3343a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH12, "GPIO217_AH12"),
3353a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH11, "GPIO218_AH11"),
3363a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG10, "GPIO219_AG10"),
3373a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH10, "GPIO220_AH10"),
3383a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ11, "GPIO221_AJ11"),
3393a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ9, "GPIO222_AJ9"),
3403a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH9, "GPIO223_AH9"),
3413a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG9, "GPIO224_AG9"),
3423a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG8, "GPIO225_AG8"),
3433a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF8, "GPIO226_AF8"),
3443a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AH7, "GPIO227_AH7"),
3453a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AJ6, "GPIO228_AJ6"),
3463a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG7, "GPIO229_AG7"),
3473a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF7, "GPIO230_AF7"),
3483a198059SLinus Walleij /* Hole */
3493a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AF28, "GPIO256_AF28"),
3503a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE29, "GPIO257_AE29"),
3513a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD29, "GPIO258_AD29"),
3523a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC29, "GPIO259_AC29"),
3533a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD28, "GPIO260_AD28"),
3543a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD26, "GPIO261_AD26"),
3553a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE26, "GPIO262_AE26"),
3563a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AG29, "GPIO263_AG29"),
3573a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AE27, "GPIO264_AE27"),
3583a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AD27, "GPIO265_AD27"),
3593a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC28, "GPIO266_AC28"),
3603a198059SLinus Walleij PINCTRL_PIN(DB8500_PIN_AC27, "GPIO267_AC27"),
3613a198059SLinus Walleij };
3623a198059SLinus Walleij
3633a198059SLinus Walleij /*
3643a198059SLinus Walleij * Read the pin group names like this:
3653a198059SLinus Walleij * u0_a_1 = first groups of pins for uart0 on alt function a
3663a198059SLinus Walleij * i2c2_b_2 = second group of pins for i2c2 on alt function b
3673a198059SLinus Walleij *
3683a198059SLinus Walleij * The groups are arranged as sets per altfunction column, so we can
3693a198059SLinus Walleij * mux in one group at a time by selecting the same altfunction for them
3703a198059SLinus Walleij * all. When functions require pins on different altfunctions, you need
3713a198059SLinus Walleij * to combine several groups.
3723a198059SLinus Walleij */
3733a198059SLinus Walleij
3743a198059SLinus Walleij /* Altfunction A column */
3753a198059SLinus Walleij static const unsigned u0_a_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3,
3763a198059SLinus Walleij DB8500_PIN_AH4, DB8500_PIN_AH3 };
3773a198059SLinus Walleij static const unsigned u1rxtx_a_1_pins[] = { DB8500_PIN_AH6, DB8500_PIN_AG6 };
3783a198059SLinus Walleij static const unsigned u1ctsrts_a_1_pins[] = { DB8500_PIN_AF6, DB8500_PIN_AG5 };
3793a198059SLinus Walleij /* Image processor I2C line, this is driven by image processor firmware */
3803a198059SLinus Walleij static const unsigned ipi2c_a_1_pins[] = { DB8500_PIN_AD5, DB8500_PIN_AE4 };
3813a198059SLinus Walleij static const unsigned ipi2c_a_2_pins[] = { DB8500_PIN_AF5, DB8500_PIN_AG4 };
3823a198059SLinus Walleij /* MSP0 can only be on these pins, but TXD and RXD can be flipped */
3833a198059SLinus Walleij static const unsigned msp0txrx_a_1_pins[] = { DB8500_PIN_AC4, DB8500_PIN_AC3 };
3843a198059SLinus Walleij static const unsigned msp0tfstck_a_1_pins[] = { DB8500_PIN_AF3, DB8500_PIN_AE3 };
3853a198059SLinus Walleij static const unsigned msp0rfsrck_a_1_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
3863a198059SLinus Walleij /* Basic pins of the MMC/SD card 0 interface */
38704d02c7aSLinus Walleij static const unsigned mc0_a_1_pins[] = { DB8500_PIN_AC2, /* MC0_CMDDIR */
38804d02c7aSLinus Walleij DB8500_PIN_AC1, /* MC0_DAT0DIR */
38904d02c7aSLinus Walleij DB8500_PIN_AB4, /* MC0_DAT2DIR */
39004d02c7aSLinus Walleij DB8500_PIN_AA3, /* MC0_FBCLK */
39104d02c7aSLinus Walleij DB8500_PIN_AA4, /* MC0_CLK */
39204d02c7aSLinus Walleij DB8500_PIN_AB2, /* MC0_CMD */
39304d02c7aSLinus Walleij DB8500_PIN_Y4, /* MC0_DAT0 */
39404d02c7aSLinus Walleij DB8500_PIN_Y2, /* MC0_DAT1 */
39504d02c7aSLinus Walleij DB8500_PIN_AA2, /* MC0_DAT2 */
39604d02c7aSLinus Walleij DB8500_PIN_AA1 /* MC0_DAT3 */
39704d02c7aSLinus Walleij };
39858afa801SStephan Gerhold /* MMC/SD card 0 interface without CMD/DAT0/DAT2 direction control */
39958afa801SStephan Gerhold static const unsigned mc0_a_2_pins[] = { DB8500_PIN_AA3, /* MC0_FBCLK */
40058afa801SStephan Gerhold DB8500_PIN_AA4, /* MC0_CLK */
40158afa801SStephan Gerhold DB8500_PIN_AB2, /* MC0_CMD */
40258afa801SStephan Gerhold DB8500_PIN_Y4, /* MC0_DAT0 */
40358afa801SStephan Gerhold DB8500_PIN_Y2, /* MC0_DAT1 */
40458afa801SStephan Gerhold DB8500_PIN_AA2, /* MC0_DAT2 */
40558afa801SStephan Gerhold DB8500_PIN_AA1 /* MC0_DAT3 */
40658afa801SStephan Gerhold };
4073a198059SLinus Walleij /* Often only 4 bits are used, then these are not needed (only used for MMC) */
40804d02c7aSLinus Walleij static const unsigned mc0_dat47_a_1_pins[] = { DB8500_PIN_W2, /* MC0_DAT4 */
40904d02c7aSLinus Walleij DB8500_PIN_W3, /* MC0_DAT5 */
41004d02c7aSLinus Walleij DB8500_PIN_V3, /* MC0_DAT6 */
41104d02c7aSLinus Walleij DB8500_PIN_V2 /* MC0_DAT7 */
41204d02c7aSLinus Walleij };
41304d02c7aSLinus Walleij static const unsigned mc0dat31dir_a_1_pins[] = { DB8500_PIN_AB3 }; /* MC0_DAT31DIR */
4143a198059SLinus Walleij /* MSP1 can only be on these pins, but TXD and RXD can be flipped */
4153a198059SLinus Walleij static const unsigned msp1txrx_a_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AG2 };
4163a198059SLinus Walleij static const unsigned msp1_a_1_pins[] = { DB8500_PIN_AE1, DB8500_PIN_AE2 };
4173a198059SLinus Walleij /* LCD interface */
4183a198059SLinus Walleij static const unsigned lcdb_a_1_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
4193a198059SLinus Walleij DB8500_PIN_G3, DB8500_PIN_G2 };
4203a198059SLinus Walleij static const unsigned lcdvsi0_a_1_pins[] = { DB8500_PIN_E1 };
4213a198059SLinus Walleij static const unsigned lcdvsi1_a_1_pins[] = { DB8500_PIN_E2 };
4223a198059SLinus Walleij static const unsigned lcd_d0_d7_a_1_pins[] = {
4233a198059SLinus Walleij DB8500_PIN_G5, DB8500_PIN_G4, DB8500_PIN_H4, DB8500_PIN_H3,
4243a198059SLinus Walleij DB8500_PIN_J3, DB8500_PIN_H2, DB8500_PIN_J2, DB8500_PIN_H1 };
4253a198059SLinus Walleij /* D8 thru D11 often used as TVOUT lines */
4263a198059SLinus Walleij static const unsigned lcd_d8_d11_a_1_pins[] = { DB8500_PIN_F4,
4273a198059SLinus Walleij DB8500_PIN_E3, DB8500_PIN_E4, DB8500_PIN_D2 };
428a4872f90SLinus Walleij static const unsigned lcd_d12_d15_a_1_pins[] = {
429a4872f90SLinus Walleij DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5 };
4303a198059SLinus Walleij static const unsigned lcd_d12_d23_a_1_pins[] = {
4313a198059SLinus Walleij DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5,
4323a198059SLinus Walleij DB8500_PIN_C6, DB8500_PIN_B3, DB8500_PIN_C4, DB8500_PIN_E6,
4333a198059SLinus Walleij DB8500_PIN_A3, DB8500_PIN_B6, DB8500_PIN_D6, DB8500_PIN_B7 };
4343a198059SLinus Walleij static const unsigned kp_a_1_pins[] = { DB8500_PIN_D7, DB8500_PIN_E8,
4353a198059SLinus Walleij DB8500_PIN_D8, DB8500_PIN_D9 };
4363a198059SLinus Walleij static const unsigned kpskaskb_a_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16 };
4373a198059SLinus Walleij static const unsigned kp_a_2_pins[] = {
4383a198059SLinus Walleij DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
4393a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
4403a198059SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
4413a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
4423a198059SLinus Walleij /* MC2 has 8 data lines and no direction control, so only for (e)MMC */
4433a198059SLinus Walleij static const unsigned mc2_a_1_pins[] = { DB8500_PIN_A5, DB8500_PIN_B4,
4443a198059SLinus Walleij DB8500_PIN_C8, DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10,
4453a198059SLinus Walleij DB8500_PIN_B9, DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7,
4463a198059SLinus Walleij DB8500_PIN_C5 };
4474b9d632fSLinus Walleij /* MC2 without the feedback clock */
4484b9d632fSLinus Walleij static const unsigned mc2_a_2_pins[] = { DB8500_PIN_A5, DB8500_PIN_B4,
4494b9d632fSLinus Walleij DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10, DB8500_PIN_B9,
4504b9d632fSLinus Walleij DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7, DB8500_PIN_C5 };
4513a198059SLinus Walleij static const unsigned ssp1_a_1_pins[] = { DB8500_PIN_C9, DB8500_PIN_B11,
4523a198059SLinus Walleij DB8500_PIN_C12, DB8500_PIN_C11 };
4533a198059SLinus Walleij static const unsigned ssp0_a_1_pins[] = { DB8500_PIN_D12, DB8500_PIN_B13,
4543a198059SLinus Walleij DB8500_PIN_C13, DB8500_PIN_D13 };
4553a198059SLinus Walleij static const unsigned i2c0_a_1_pins[] = { DB8500_PIN_C15, DB8500_PIN_B16 };
4563a198059SLinus Walleij /*
4573a198059SLinus Walleij * Image processor GPIO pins are named "ipgpio" and have their own
4583a198059SLinus Walleij * numberspace
4593a198059SLinus Walleij */
4603a198059SLinus Walleij static const unsigned ipgpio0_a_1_pins[] = { DB8500_PIN_B14 };
4613a198059SLinus Walleij static const unsigned ipgpio1_a_1_pins[] = { DB8500_PIN_C14 };
4623a198059SLinus Walleij /* Three modem pins named RF_PURn, MODEM_STATE and MODEM_PWREN */
4633a198059SLinus Walleij static const unsigned modem_a_1_pins[] = { DB8500_PIN_D22, DB8500_PIN_C23,
4643a198059SLinus Walleij DB8500_PIN_D23 };
4653a198059SLinus Walleij /*
4663a198059SLinus Walleij * This MSP cannot switch RX and TX, SCK in a separate group since this
4673a198059SLinus Walleij * seems to be optional.
4683a198059SLinus Walleij */
4693a198059SLinus Walleij static const unsigned msp2sck_a_1_pins[] = { DB8500_PIN_AJ27 };
4703a198059SLinus Walleij static const unsigned msp2_a_1_pins[] = { DB8500_PIN_AH27, DB8500_PIN_AF27,
4713a198059SLinus Walleij DB8500_PIN_AG28, DB8500_PIN_AG26 };
4723a198059SLinus Walleij static const unsigned mc4_a_1_pins[] = { DB8500_PIN_AH24, DB8500_PIN_AG25,
4733a198059SLinus Walleij DB8500_PIN_AH23, DB8500_PIN_AH26, DB8500_PIN_AF24, DB8500_PIN_AF25,
4743a198059SLinus Walleij DB8500_PIN_AE23, DB8500_PIN_AF23, DB8500_PIN_AG23, DB8500_PIN_AG24,
4753a198059SLinus Walleij DB8500_PIN_AJ23 };
4763a198059SLinus Walleij /* MC1 has only 4 data pins, designed for SD or SDIO exclusively */
4773a198059SLinus Walleij static const unsigned mc1_a_1_pins[] = { DB8500_PIN_AH16, DB8500_PIN_AG15,
4783a198059SLinus Walleij DB8500_PIN_AJ15, DB8500_PIN_AG14, DB8500_PIN_AF13, DB8500_PIN_AG13,
4793a198059SLinus Walleij DB8500_PIN_AH15 };
4803a198059SLinus Walleij static const unsigned mc1_a_2_pins[] = { DB8500_PIN_AH16, DB8500_PIN_AJ15,
4813a198059SLinus Walleij DB8500_PIN_AG14, DB8500_PIN_AF13, DB8500_PIN_AG13, DB8500_PIN_AH15 };
4823a198059SLinus Walleij static const unsigned mc1dir_a_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
4833a198059SLinus Walleij DB8500_PIN_AH12, DB8500_PIN_AH11 };
4843a198059SLinus Walleij static const unsigned hsir_a_1_pins[] = { DB8500_PIN_AG10, DB8500_PIN_AH10,
4853a198059SLinus Walleij DB8500_PIN_AJ11 };
4863a198059SLinus Walleij static const unsigned hsit_a_1_pins[] = { DB8500_PIN_AJ9, DB8500_PIN_AH9,
4873a198059SLinus Walleij DB8500_PIN_AG9, DB8500_PIN_AG8, DB8500_PIN_AF8 };
4883a198059SLinus Walleij static const unsigned hsit_a_2_pins[] = { DB8500_PIN_AJ9, DB8500_PIN_AH9,
4893a198059SLinus Walleij DB8500_PIN_AG9, DB8500_PIN_AG8 };
4903a198059SLinus Walleij static const unsigned clkout1_a_1_pins[] = { DB8500_PIN_AH7 };
4913a198059SLinus Walleij static const unsigned clkout1_a_2_pins[] = { DB8500_PIN_AG7 };
4923a198059SLinus Walleij static const unsigned clkout2_a_1_pins[] = { DB8500_PIN_AJ6 };
4933a198059SLinus Walleij static const unsigned clkout2_a_2_pins[] = { DB8500_PIN_AF7 };
4943a198059SLinus Walleij static const unsigned usb_a_1_pins[] = { DB8500_PIN_AF28, DB8500_PIN_AE29,
4953a198059SLinus Walleij DB8500_PIN_AD29, DB8500_PIN_AC29, DB8500_PIN_AD28, DB8500_PIN_AD26,
4963a198059SLinus Walleij DB8500_PIN_AE26, DB8500_PIN_AG29, DB8500_PIN_AE27, DB8500_PIN_AD27,
4973a198059SLinus Walleij DB8500_PIN_AC28, DB8500_PIN_AC27 };
4983a198059SLinus Walleij
4993a198059SLinus Walleij /* Altfunction B column */
5003a198059SLinus Walleij static const unsigned trig_b_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3 };
5013a198059SLinus Walleij static const unsigned i2c4_b_1_pins[] = { DB8500_PIN_AH6, DB8500_PIN_AG6 };
5023a198059SLinus Walleij static const unsigned i2c1_b_1_pins[] = { DB8500_PIN_AF6, DB8500_PIN_AG5 };
5033a198059SLinus Walleij static const unsigned i2c2_b_1_pins[] = { DB8500_PIN_AD5, DB8500_PIN_AE4 };
5043a198059SLinus Walleij static const unsigned i2c2_b_2_pins[] = { DB8500_PIN_AF5, DB8500_PIN_AG4 };
5053a198059SLinus Walleij static const unsigned msp0txrx_b_1_pins[] = { DB8500_PIN_AC4, DB8500_PIN_AC3 };
5063a198059SLinus Walleij static const unsigned i2c1_b_2_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
5073a198059SLinus Walleij /* Just RX and TX for UART2 */
5083a198059SLinus Walleij static const unsigned u2rxtx_b_1_pins[] = { DB8500_PIN_AC2, DB8500_PIN_AC1 };
5093a198059SLinus Walleij static const unsigned uartmodtx_b_1_pins[] = { DB8500_PIN_AB4 };
5103a198059SLinus Walleij static const unsigned msp0sck_b_1_pins[] = { DB8500_PIN_AB3 };
5113a198059SLinus Walleij static const unsigned uartmodrx_b_1_pins[] = { DB8500_PIN_AA3 };
5123a198059SLinus Walleij static const unsigned stmmod_b_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_Y4,
5133a198059SLinus Walleij DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
5143a198059SLinus Walleij static const unsigned uartmodrx_b_2_pins[] = { DB8500_PIN_AB2 };
5153a198059SLinus Walleij static const unsigned spi3_b_1_pins[] = { DB8500_PIN_W2, DB8500_PIN_W3,
5163a198059SLinus Walleij DB8500_PIN_V3, DB8500_PIN_V2 };
5173a198059SLinus Walleij static const unsigned msp1txrx_b_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AG2 };
5183a198059SLinus Walleij static const unsigned kp_b_1_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
5193a198059SLinus Walleij DB8500_PIN_G3, DB8500_PIN_G2, DB8500_PIN_E1, DB8500_PIN_E2,
5203a198059SLinus Walleij DB8500_PIN_G5, DB8500_PIN_G4, DB8500_PIN_H4, DB8500_PIN_H3,
5213a198059SLinus Walleij DB8500_PIN_J3, DB8500_PIN_H2, DB8500_PIN_J2, DB8500_PIN_H1,
5223a198059SLinus Walleij DB8500_PIN_F4, DB8500_PIN_E3, DB8500_PIN_E4, DB8500_PIN_D2,
5233a198059SLinus Walleij DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5 };
5243a198059SLinus Walleij static const unsigned kp_b_2_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
5253a198059SLinus Walleij DB8500_PIN_G3, DB8500_PIN_G2, DB8500_PIN_F4, DB8500_PIN_E3};
5263a198059SLinus Walleij static const unsigned sm_b_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
5273a198059SLinus Walleij DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
5283a198059SLinus Walleij DB8500_PIN_D6, DB8500_PIN_B7, DB8500_PIN_D7, DB8500_PIN_D8,
5293a198059SLinus Walleij DB8500_PIN_D9, DB8500_PIN_A5, DB8500_PIN_B4, DB8500_PIN_C8,
5303a198059SLinus Walleij DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10, DB8500_PIN_B9,
5313a198059SLinus Walleij DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7, DB8500_PIN_C5,
5323a198059SLinus Walleij DB8500_PIN_C9 };
5333a198059SLinus Walleij /* This chip select pin can be "ps0" in alt C so have it separately */
5343a198059SLinus Walleij static const unsigned smcs0_b_1_pins[] = { DB8500_PIN_E8 };
5353a198059SLinus Walleij /* This chip select pin can be "ps1" in alt C so have it separately */
5363a198059SLinus Walleij static const unsigned smcs1_b_1_pins[] = { DB8500_PIN_B14 };
5373a198059SLinus Walleij static const unsigned ipgpio7_b_1_pins[] = { DB8500_PIN_B11 };
5383a198059SLinus Walleij static const unsigned ipgpio2_b_1_pins[] = { DB8500_PIN_C12 };
5393a198059SLinus Walleij static const unsigned ipgpio3_b_1_pins[] = { DB8500_PIN_C11 };
5403a198059SLinus Walleij static const unsigned lcdaclk_b_1_pins[] = { DB8500_PIN_C14 };
5413a198059SLinus Walleij static const unsigned lcda_b_1_pins[] = { DB8500_PIN_D22,
5423a198059SLinus Walleij DB8500_PIN_C23, DB8500_PIN_D23 };
5433a198059SLinus Walleij static const unsigned lcd_b_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
5443a198059SLinus Walleij DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
5453a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
5463a198059SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
5473a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
548a4872f90SLinus Walleij static const unsigned lcd_d16_d23_b_1_pins[] = {
549a4872f90SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
550a4872f90SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
5513a198059SLinus Walleij static const unsigned ddrtrig_b_1_pins[] = { DB8500_PIN_AJ27 };
5523a198059SLinus Walleij static const unsigned pwl_b_1_pins[] = { DB8500_PIN_AF25 };
5533a198059SLinus Walleij static const unsigned spi1_b_1_pins[] = { DB8500_PIN_AG15, DB8500_PIN_AF13,
5543a198059SLinus Walleij DB8500_PIN_AG13, DB8500_PIN_AH15 };
5553a198059SLinus Walleij static const unsigned mc3_b_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
5563a198059SLinus Walleij DB8500_PIN_AH12, DB8500_PIN_AH11, DB8500_PIN_AG10, DB8500_PIN_AH10,
5573a198059SLinus Walleij DB8500_PIN_AJ11, DB8500_PIN_AJ9, DB8500_PIN_AH9, DB8500_PIN_AG9,
5583a198059SLinus Walleij DB8500_PIN_AG8 };
5593a198059SLinus Walleij static const unsigned pwl_b_2_pins[] = { DB8500_PIN_AF8 };
5603a198059SLinus Walleij static const unsigned pwl_b_3_pins[] = { DB8500_PIN_AG7 };
5613a198059SLinus Walleij static const unsigned pwl_b_4_pins[] = { DB8500_PIN_AF7 };
5623a198059SLinus Walleij
5633a198059SLinus Walleij /* Altfunction C column */
5643a198059SLinus Walleij static const unsigned ipjtag_c_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3,
5653a198059SLinus Walleij DB8500_PIN_AH4, DB8500_PIN_AH3, DB8500_PIN_AH6 };
5663a198059SLinus Walleij static const unsigned ipgpio6_c_1_pins[] = { DB8500_PIN_AG6 };
5673a198059SLinus Walleij static const unsigned ipgpio0_c_1_pins[] = { DB8500_PIN_AF6 };
5683a198059SLinus Walleij static const unsigned ipgpio1_c_1_pins[] = { DB8500_PIN_AG5 };
5693a198059SLinus Walleij static const unsigned ipgpio3_c_1_pins[] = { DB8500_PIN_AF5 };
5703a198059SLinus Walleij static const unsigned ipgpio2_c_1_pins[] = { DB8500_PIN_AG4 };
5713a198059SLinus Walleij static const unsigned slim0_c_1_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
5723a198059SLinus Walleij /* Optional 4-bit Memory Stick interface */
5733a198059SLinus Walleij static const unsigned ms_c_1_pins[] = { DB8500_PIN_AC2, DB8500_PIN_AC1,
5743a198059SLinus Walleij DB8500_PIN_AB3, DB8500_PIN_AA3, DB8500_PIN_AA4, DB8500_PIN_AB2,
5753a198059SLinus Walleij DB8500_PIN_Y4, DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
5763a198059SLinus Walleij static const unsigned iptrigout_c_1_pins[] = { DB8500_PIN_AB4 };
5773a198059SLinus Walleij static const unsigned u2rxtx_c_1_pins[] = { DB8500_PIN_W2, DB8500_PIN_W3 };
5783a198059SLinus Walleij static const unsigned u2ctsrts_c_1_pins[] = { DB8500_PIN_V3, DB8500_PIN_V2 };
5793a198059SLinus Walleij static const unsigned u0_c_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AE1,
5803a198059SLinus Walleij DB8500_PIN_AE2, DB8500_PIN_AG2 };
5813a198059SLinus Walleij static const unsigned ipgpio4_c_1_pins[] = { DB8500_PIN_F3 };
5823a198059SLinus Walleij static const unsigned ipgpio5_c_1_pins[] = { DB8500_PIN_F1 };
5833a198059SLinus Walleij static const unsigned ipgpio6_c_2_pins[] = { DB8500_PIN_G3 };
5843a198059SLinus Walleij static const unsigned ipgpio7_c_1_pins[] = { DB8500_PIN_G2 };
5853a198059SLinus Walleij static const unsigned smcleale_c_1_pins[] = { DB8500_PIN_E1, DB8500_PIN_E2 };
5863a198059SLinus Walleij static const unsigned stmape_c_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
5873a198059SLinus Walleij DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3 };
5883a198059SLinus Walleij static const unsigned u2rxtx_c_2_pins[] = { DB8500_PIN_H2, DB8500_PIN_J2 };
5893a198059SLinus Walleij static const unsigned ipgpio2_c_2_pins[] = { DB8500_PIN_F4 };
5903a198059SLinus Walleij static const unsigned ipgpio3_c_2_pins[] = { DB8500_PIN_E3 };
5913a198059SLinus Walleij static const unsigned ipgpio4_c_2_pins[] = { DB8500_PIN_E4 };
5923a198059SLinus Walleij static const unsigned ipgpio5_c_2_pins[] = { DB8500_PIN_D2 };
5933a198059SLinus Walleij static const unsigned mc5_c_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
5943a198059SLinus Walleij DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
5953a198059SLinus Walleij DB8500_PIN_D6, DB8500_PIN_B7, DB8500_PIN_D7, DB8500_PIN_D8,
5963a198059SLinus Walleij DB8500_PIN_D9 };
5973a198059SLinus Walleij static const unsigned mc2rstn_c_1_pins[] = { DB8500_PIN_C8 };
5983a198059SLinus Walleij static const unsigned kp_c_1_pins[] = { DB8500_PIN_C9, DB8500_PIN_B11,
5993a198059SLinus Walleij DB8500_PIN_C12, DB8500_PIN_C11, DB8500_PIN_D17, DB8500_PIN_D16,
6003a198059SLinus Walleij DB8500_PIN_C23, DB8500_PIN_D23 };
6013a198059SLinus Walleij static const unsigned smps0_c_1_pins[] = { DB8500_PIN_E8 };
6023a198059SLinus Walleij static const unsigned smps1_c_1_pins[] = { DB8500_PIN_B14 };
6033a198059SLinus Walleij static const unsigned u2rxtx_c_3_pins[] = { DB8500_PIN_B17, DB8500_PIN_C16 };
6043a198059SLinus Walleij static const unsigned stmape_c_2_pins[] = { DB8500_PIN_C19, DB8500_PIN_C17,
6053a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19 };
6063a198059SLinus Walleij static const unsigned uartmodrx_c_1_pins[] = { DB8500_PIN_D21 };
6073a198059SLinus Walleij static const unsigned uartmodtx_c_1_pins[] = { DB8500_PIN_D20 };
6083a198059SLinus Walleij static const unsigned stmmod_c_1_pins[] = { DB8500_PIN_C20, DB8500_PIN_B21,
6093a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24 };
6103a198059SLinus Walleij static const unsigned usbsim_c_1_pins[] = { DB8500_PIN_D22 };
6113a198059SLinus Walleij static const unsigned mc4rstn_c_1_pins[] = { DB8500_PIN_AF25 };
6123a198059SLinus Walleij static const unsigned clkout1_c_1_pins[] = { DB8500_PIN_AH13 };
6133a198059SLinus Walleij static const unsigned clkout2_c_1_pins[] = { DB8500_PIN_AH12 };
6143a198059SLinus Walleij static const unsigned i2c3_c_1_pins[] = { DB8500_PIN_AG12, DB8500_PIN_AH11 };
6153a198059SLinus Walleij static const unsigned spi0_c_1_pins[] = { DB8500_PIN_AH10, DB8500_PIN_AH9,
6163a198059SLinus Walleij DB8500_PIN_AG9, DB8500_PIN_AG8 };
6173a198059SLinus Walleij static const unsigned usbsim_c_2_pins[] = { DB8500_PIN_AF8 };
6183a198059SLinus Walleij static const unsigned i2c3_c_2_pins[] = { DB8500_PIN_AG7, DB8500_PIN_AF7 };
6193a198059SLinus Walleij
6203a198059SLinus Walleij /* Other C1 column */
6213a198059SLinus Walleij static const unsigned u2rx_oc1_1_pins[] = { DB8500_PIN_AB2 };
6223a198059SLinus Walleij static const unsigned stmape_oc1_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_Y4,
6233a198059SLinus Walleij DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
6243a198059SLinus Walleij static const unsigned remap0_oc1_1_pins[] = { DB8500_PIN_E1 };
6253a198059SLinus Walleij static const unsigned remap1_oc1_1_pins[] = { DB8500_PIN_E2 };
6263a198059SLinus Walleij static const unsigned ptma9_oc1_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
6273a198059SLinus Walleij DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
6283a198059SLinus Walleij DB8500_PIN_J2, DB8500_PIN_H1 };
6293a198059SLinus Walleij static const unsigned kp_oc1_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
6303a198059SLinus Walleij DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
6313a198059SLinus Walleij DB8500_PIN_D6, DB8500_PIN_B7 };
6323a198059SLinus Walleij static const unsigned rf_oc1_1_pins[] = { DB8500_PIN_D8, DB8500_PIN_D9 };
6333a198059SLinus Walleij static const unsigned hxclk_oc1_1_pins[] = { DB8500_PIN_D16 };
6343a198059SLinus Walleij static const unsigned uartmodrx_oc1_1_pins[] = { DB8500_PIN_B17 };
6353a198059SLinus Walleij static const unsigned uartmodtx_oc1_1_pins[] = { DB8500_PIN_C16 };
6363a198059SLinus Walleij static const unsigned stmmod_oc1_1_pins[] = { DB8500_PIN_C19, DB8500_PIN_C17,
6373a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19 };
6383a198059SLinus Walleij static const unsigned hxgpio_oc1_1_pins[] = { DB8500_PIN_D21, DB8500_PIN_D20,
6393a198059SLinus Walleij DB8500_PIN_C20, DB8500_PIN_B21, DB8500_PIN_C21, DB8500_PIN_A22,
6403a198059SLinus Walleij DB8500_PIN_B24, DB8500_PIN_C22 };
6413a198059SLinus Walleij static const unsigned rf_oc1_2_pins[] = { DB8500_PIN_C23, DB8500_PIN_D23 };
6423a198059SLinus Walleij static const unsigned spi2_oc1_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
6433a198059SLinus Walleij DB8500_PIN_AH12, DB8500_PIN_AH11 };
6443a198059SLinus Walleij static const unsigned spi2_oc1_2_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AH12,
6453a198059SLinus Walleij DB8500_PIN_AH11 };
6463a198059SLinus Walleij
6473a198059SLinus Walleij /* Other C2 column */
6483a198059SLinus Walleij static const unsigned sbag_oc2_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_AB2,
6493a198059SLinus Walleij DB8500_PIN_Y4, DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
6503a198059SLinus Walleij static const unsigned etmr4_oc2_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
6513a198059SLinus Walleij DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
6523a198059SLinus Walleij DB8500_PIN_J2, DB8500_PIN_H1 };
6533a198059SLinus Walleij static const unsigned ptma9_oc2_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
6543a198059SLinus Walleij DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
6553a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
6563a198059SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
6573a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
6583a198059SLinus Walleij
6593a198059SLinus Walleij /* Other C3 column */
6603a198059SLinus Walleij static const unsigned stmmod_oc3_1_pins[] = { DB8500_PIN_AB2, DB8500_PIN_W2,
6613a198059SLinus Walleij DB8500_PIN_W3, DB8500_PIN_V3, DB8500_PIN_V2 };
6623a198059SLinus Walleij static const unsigned stmmod_oc3_2_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
6633a198059SLinus Walleij DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3 };
6643a198059SLinus Walleij static const unsigned uartmodrx_oc3_1_pins[] = { DB8500_PIN_H2 };
6653a198059SLinus Walleij static const unsigned uartmodtx_oc3_1_pins[] = { DB8500_PIN_J2 };
6663a198059SLinus Walleij static const unsigned etmr4_oc3_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
6673a198059SLinus Walleij DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
6683a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
6693a198059SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
6703a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
6713a198059SLinus Walleij
6723a198059SLinus Walleij /* Other C4 column */
6733a198059SLinus Walleij static const unsigned sbag_oc4_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
6743a198059SLinus Walleij DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H1 };
6753a198059SLinus Walleij static const unsigned hwobs_oc4_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
6763a198059SLinus Walleij DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
6773a198059SLinus Walleij DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
6783a198059SLinus Walleij DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
6793a198059SLinus Walleij DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
6803a198059SLinus Walleij
6813a198059SLinus Walleij static const struct nmk_pingroup nmk_db8500_groups[] = {
6823a198059SLinus Walleij /* Altfunction A column */
68339b707faSAndy Shevchenko NMK_PIN_GROUP(u0_a_1, NMK_GPIO_ALT_A),
68439b707faSAndy Shevchenko NMK_PIN_GROUP(u1rxtx_a_1, NMK_GPIO_ALT_A),
68539b707faSAndy Shevchenko NMK_PIN_GROUP(u1ctsrts_a_1, NMK_GPIO_ALT_A),
68639b707faSAndy Shevchenko NMK_PIN_GROUP(ipi2c_a_1, NMK_GPIO_ALT_A),
68739b707faSAndy Shevchenko NMK_PIN_GROUP(ipi2c_a_2, NMK_GPIO_ALT_A),
68839b707faSAndy Shevchenko NMK_PIN_GROUP(msp0txrx_a_1, NMK_GPIO_ALT_A),
68939b707faSAndy Shevchenko NMK_PIN_GROUP(msp0tfstck_a_1, NMK_GPIO_ALT_A),
69039b707faSAndy Shevchenko NMK_PIN_GROUP(msp0rfsrck_a_1, NMK_GPIO_ALT_A),
69139b707faSAndy Shevchenko NMK_PIN_GROUP(mc0_a_1, NMK_GPIO_ALT_A),
69239b707faSAndy Shevchenko NMK_PIN_GROUP(mc0_a_2, NMK_GPIO_ALT_A),
69339b707faSAndy Shevchenko NMK_PIN_GROUP(mc0_dat47_a_1, NMK_GPIO_ALT_A),
69439b707faSAndy Shevchenko NMK_PIN_GROUP(mc0dat31dir_a_1, NMK_GPIO_ALT_A),
69539b707faSAndy Shevchenko NMK_PIN_GROUP(msp1txrx_a_1, NMK_GPIO_ALT_A),
69639b707faSAndy Shevchenko NMK_PIN_GROUP(msp1_a_1, NMK_GPIO_ALT_A),
69739b707faSAndy Shevchenko NMK_PIN_GROUP(lcdb_a_1, NMK_GPIO_ALT_A),
69839b707faSAndy Shevchenko NMK_PIN_GROUP(lcdvsi0_a_1, NMK_GPIO_ALT_A),
69939b707faSAndy Shevchenko NMK_PIN_GROUP(lcdvsi1_a_1, NMK_GPIO_ALT_A),
70039b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_d0_d7_a_1, NMK_GPIO_ALT_A),
70139b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A),
70239b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_d12_d15_a_1, NMK_GPIO_ALT_A),
70339b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A),
70439b707faSAndy Shevchenko NMK_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A),
70539b707faSAndy Shevchenko NMK_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A),
70639b707faSAndy Shevchenko NMK_PIN_GROUP(mc2_a_1, NMK_GPIO_ALT_A),
70739b707faSAndy Shevchenko NMK_PIN_GROUP(mc2_a_2, NMK_GPIO_ALT_A),
70839b707faSAndy Shevchenko NMK_PIN_GROUP(ssp1_a_1, NMK_GPIO_ALT_A),
70939b707faSAndy Shevchenko NMK_PIN_GROUP(ssp0_a_1, NMK_GPIO_ALT_A),
71039b707faSAndy Shevchenko NMK_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A),
71139b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio0_a_1, NMK_GPIO_ALT_A),
71239b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio1_a_1, NMK_GPIO_ALT_A),
71339b707faSAndy Shevchenko NMK_PIN_GROUP(modem_a_1, NMK_GPIO_ALT_A),
71439b707faSAndy Shevchenko NMK_PIN_GROUP(kp_a_2, NMK_GPIO_ALT_A),
71539b707faSAndy Shevchenko NMK_PIN_GROUP(msp2sck_a_1, NMK_GPIO_ALT_A),
71639b707faSAndy Shevchenko NMK_PIN_GROUP(msp2_a_1, NMK_GPIO_ALT_A),
71739b707faSAndy Shevchenko NMK_PIN_GROUP(mc4_a_1, NMK_GPIO_ALT_A),
71839b707faSAndy Shevchenko NMK_PIN_GROUP(mc1_a_1, NMK_GPIO_ALT_A),
71939b707faSAndy Shevchenko NMK_PIN_GROUP(mc1_a_2, NMK_GPIO_ALT_A),
72039b707faSAndy Shevchenko NMK_PIN_GROUP(mc1dir_a_1, NMK_GPIO_ALT_A),
72139b707faSAndy Shevchenko NMK_PIN_GROUP(hsir_a_1, NMK_GPIO_ALT_A),
72239b707faSAndy Shevchenko NMK_PIN_GROUP(hsit_a_1, NMK_GPIO_ALT_A),
72339b707faSAndy Shevchenko NMK_PIN_GROUP(hsit_a_2, NMK_GPIO_ALT_A),
72439b707faSAndy Shevchenko NMK_PIN_GROUP(clkout1_a_1, NMK_GPIO_ALT_A),
72539b707faSAndy Shevchenko NMK_PIN_GROUP(clkout1_a_2, NMK_GPIO_ALT_A),
72639b707faSAndy Shevchenko NMK_PIN_GROUP(clkout2_a_1, NMK_GPIO_ALT_A),
72739b707faSAndy Shevchenko NMK_PIN_GROUP(clkout2_a_2, NMK_GPIO_ALT_A),
72839b707faSAndy Shevchenko NMK_PIN_GROUP(usb_a_1, NMK_GPIO_ALT_A),
7293a198059SLinus Walleij /* Altfunction B column */
73039b707faSAndy Shevchenko NMK_PIN_GROUP(trig_b_1, NMK_GPIO_ALT_B),
73139b707faSAndy Shevchenko NMK_PIN_GROUP(i2c4_b_1, NMK_GPIO_ALT_B),
73239b707faSAndy Shevchenko NMK_PIN_GROUP(i2c1_b_1, NMK_GPIO_ALT_B),
73339b707faSAndy Shevchenko NMK_PIN_GROUP(i2c2_b_1, NMK_GPIO_ALT_B),
73439b707faSAndy Shevchenko NMK_PIN_GROUP(i2c2_b_2, NMK_GPIO_ALT_B),
73539b707faSAndy Shevchenko NMK_PIN_GROUP(msp0txrx_b_1, NMK_GPIO_ALT_B),
73639b707faSAndy Shevchenko NMK_PIN_GROUP(i2c1_b_2, NMK_GPIO_ALT_B),
73739b707faSAndy Shevchenko NMK_PIN_GROUP(u2rxtx_b_1, NMK_GPIO_ALT_B),
73839b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodtx_b_1, NMK_GPIO_ALT_B),
73939b707faSAndy Shevchenko NMK_PIN_GROUP(msp0sck_b_1, NMK_GPIO_ALT_B),
74039b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodrx_b_1, NMK_GPIO_ALT_B),
74139b707faSAndy Shevchenko NMK_PIN_GROUP(stmmod_b_1, NMK_GPIO_ALT_B),
74239b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodrx_b_2, NMK_GPIO_ALT_B),
74339b707faSAndy Shevchenko NMK_PIN_GROUP(spi3_b_1, NMK_GPIO_ALT_B),
74439b707faSAndy Shevchenko NMK_PIN_GROUP(msp1txrx_b_1, NMK_GPIO_ALT_B),
74539b707faSAndy Shevchenko NMK_PIN_GROUP(kp_b_1, NMK_GPIO_ALT_B),
74639b707faSAndy Shevchenko NMK_PIN_GROUP(kp_b_2, NMK_GPIO_ALT_B),
74739b707faSAndy Shevchenko NMK_PIN_GROUP(sm_b_1, NMK_GPIO_ALT_B),
74839b707faSAndy Shevchenko NMK_PIN_GROUP(smcs0_b_1, NMK_GPIO_ALT_B),
74939b707faSAndy Shevchenko NMK_PIN_GROUP(smcs1_b_1, NMK_GPIO_ALT_B),
75039b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio7_b_1, NMK_GPIO_ALT_B),
75139b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio2_b_1, NMK_GPIO_ALT_B),
75239b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio3_b_1, NMK_GPIO_ALT_B),
75339b707faSAndy Shevchenko NMK_PIN_GROUP(lcdaclk_b_1, NMK_GPIO_ALT_B),
75439b707faSAndy Shevchenko NMK_PIN_GROUP(lcda_b_1, NMK_GPIO_ALT_B),
75539b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_b_1, NMK_GPIO_ALT_B),
75639b707faSAndy Shevchenko NMK_PIN_GROUP(lcd_d16_d23_b_1, NMK_GPIO_ALT_B),
75739b707faSAndy Shevchenko NMK_PIN_GROUP(ddrtrig_b_1, NMK_GPIO_ALT_B),
75839b707faSAndy Shevchenko NMK_PIN_GROUP(pwl_b_1, NMK_GPIO_ALT_B),
75939b707faSAndy Shevchenko NMK_PIN_GROUP(spi1_b_1, NMK_GPIO_ALT_B),
76039b707faSAndy Shevchenko NMK_PIN_GROUP(mc3_b_1, NMK_GPIO_ALT_B),
76139b707faSAndy Shevchenko NMK_PIN_GROUP(pwl_b_2, NMK_GPIO_ALT_B),
76239b707faSAndy Shevchenko NMK_PIN_GROUP(pwl_b_3, NMK_GPIO_ALT_B),
76339b707faSAndy Shevchenko NMK_PIN_GROUP(pwl_b_4, NMK_GPIO_ALT_B),
7643a198059SLinus Walleij /* Altfunction C column */
76539b707faSAndy Shevchenko NMK_PIN_GROUP(ipjtag_c_1, NMK_GPIO_ALT_C),
76639b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio6_c_1, NMK_GPIO_ALT_C),
76739b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio0_c_1, NMK_GPIO_ALT_C),
76839b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio1_c_1, NMK_GPIO_ALT_C),
76939b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio3_c_1, NMK_GPIO_ALT_C),
77039b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio2_c_1, NMK_GPIO_ALT_C),
77139b707faSAndy Shevchenko NMK_PIN_GROUP(slim0_c_1, NMK_GPIO_ALT_C),
77239b707faSAndy Shevchenko NMK_PIN_GROUP(ms_c_1, NMK_GPIO_ALT_C),
77339b707faSAndy Shevchenko NMK_PIN_GROUP(iptrigout_c_1, NMK_GPIO_ALT_C),
77439b707faSAndy Shevchenko NMK_PIN_GROUP(u2rxtx_c_1, NMK_GPIO_ALT_C),
77539b707faSAndy Shevchenko NMK_PIN_GROUP(u2ctsrts_c_1, NMK_GPIO_ALT_C),
77639b707faSAndy Shevchenko NMK_PIN_GROUP(u0_c_1, NMK_GPIO_ALT_C),
77739b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio4_c_1, NMK_GPIO_ALT_C),
77839b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio5_c_1, NMK_GPIO_ALT_C),
77939b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio6_c_2, NMK_GPIO_ALT_C),
78039b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio7_c_1, NMK_GPIO_ALT_C),
78139b707faSAndy Shevchenko NMK_PIN_GROUP(smcleale_c_1, NMK_GPIO_ALT_C),
78239b707faSAndy Shevchenko NMK_PIN_GROUP(stmape_c_1, NMK_GPIO_ALT_C),
78339b707faSAndy Shevchenko NMK_PIN_GROUP(u2rxtx_c_2, NMK_GPIO_ALT_C),
78439b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio2_c_2, NMK_GPIO_ALT_C),
78539b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio3_c_2, NMK_GPIO_ALT_C),
78639b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio4_c_2, NMK_GPIO_ALT_C),
78739b707faSAndy Shevchenko NMK_PIN_GROUP(ipgpio5_c_2, NMK_GPIO_ALT_C),
78839b707faSAndy Shevchenko NMK_PIN_GROUP(mc5_c_1, NMK_GPIO_ALT_C),
78939b707faSAndy Shevchenko NMK_PIN_GROUP(mc2rstn_c_1, NMK_GPIO_ALT_C),
79039b707faSAndy Shevchenko NMK_PIN_GROUP(kp_c_1, NMK_GPIO_ALT_C),
79139b707faSAndy Shevchenko NMK_PIN_GROUP(smps0_c_1, NMK_GPIO_ALT_C),
79239b707faSAndy Shevchenko NMK_PIN_GROUP(smps1_c_1, NMK_GPIO_ALT_C),
79339b707faSAndy Shevchenko NMK_PIN_GROUP(u2rxtx_c_3, NMK_GPIO_ALT_C),
79439b707faSAndy Shevchenko NMK_PIN_GROUP(stmape_c_2, NMK_GPIO_ALT_C),
79539b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodrx_c_1, NMK_GPIO_ALT_C),
79639b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodtx_c_1, NMK_GPIO_ALT_C),
79739b707faSAndy Shevchenko NMK_PIN_GROUP(stmmod_c_1, NMK_GPIO_ALT_C),
79839b707faSAndy Shevchenko NMK_PIN_GROUP(usbsim_c_1, NMK_GPIO_ALT_C),
79939b707faSAndy Shevchenko NMK_PIN_GROUP(mc4rstn_c_1, NMK_GPIO_ALT_C),
80039b707faSAndy Shevchenko NMK_PIN_GROUP(clkout1_c_1, NMK_GPIO_ALT_C),
80139b707faSAndy Shevchenko NMK_PIN_GROUP(clkout2_c_1, NMK_GPIO_ALT_C),
80239b707faSAndy Shevchenko NMK_PIN_GROUP(i2c3_c_1, NMK_GPIO_ALT_C),
80339b707faSAndy Shevchenko NMK_PIN_GROUP(spi0_c_1, NMK_GPIO_ALT_C),
80439b707faSAndy Shevchenko NMK_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C),
80539b707faSAndy Shevchenko NMK_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C),
8063a198059SLinus Walleij /* Other alt C1 column */
80739b707faSAndy Shevchenko NMK_PIN_GROUP(u2rx_oc1_1, NMK_GPIO_ALT_C1),
80839b707faSAndy Shevchenko NMK_PIN_GROUP(stmape_oc1_1, NMK_GPIO_ALT_C1),
80939b707faSAndy Shevchenko NMK_PIN_GROUP(remap0_oc1_1, NMK_GPIO_ALT_C1),
81039b707faSAndy Shevchenko NMK_PIN_GROUP(remap1_oc1_1, NMK_GPIO_ALT_C1),
81139b707faSAndy Shevchenko NMK_PIN_GROUP(ptma9_oc1_1, NMK_GPIO_ALT_C1),
81239b707faSAndy Shevchenko NMK_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1),
81339b707faSAndy Shevchenko NMK_PIN_GROUP(rf_oc1_1, NMK_GPIO_ALT_C1),
81439b707faSAndy Shevchenko NMK_PIN_GROUP(hxclk_oc1_1, NMK_GPIO_ALT_C1),
81539b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodrx_oc1_1, NMK_GPIO_ALT_C1),
81639b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodtx_oc1_1, NMK_GPIO_ALT_C1),
81739b707faSAndy Shevchenko NMK_PIN_GROUP(stmmod_oc1_1, NMK_GPIO_ALT_C1),
81839b707faSAndy Shevchenko NMK_PIN_GROUP(hxgpio_oc1_1, NMK_GPIO_ALT_C1),
81939b707faSAndy Shevchenko NMK_PIN_GROUP(rf_oc1_2, NMK_GPIO_ALT_C1),
82039b707faSAndy Shevchenko NMK_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1),
82139b707faSAndy Shevchenko NMK_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1),
8223a198059SLinus Walleij /* Other alt C2 column */
82339b707faSAndy Shevchenko NMK_PIN_GROUP(sbag_oc2_1, NMK_GPIO_ALT_C2),
82439b707faSAndy Shevchenko NMK_PIN_GROUP(etmr4_oc2_1, NMK_GPIO_ALT_C2),
82539b707faSAndy Shevchenko NMK_PIN_GROUP(ptma9_oc2_1, NMK_GPIO_ALT_C2),
8263a198059SLinus Walleij /* Other alt C3 column */
82739b707faSAndy Shevchenko NMK_PIN_GROUP(stmmod_oc3_1, NMK_GPIO_ALT_C3),
82839b707faSAndy Shevchenko NMK_PIN_GROUP(stmmod_oc3_2, NMK_GPIO_ALT_C3),
82939b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodrx_oc3_1, NMK_GPIO_ALT_C3),
83039b707faSAndy Shevchenko NMK_PIN_GROUP(uartmodtx_oc3_1, NMK_GPIO_ALT_C3),
83139b707faSAndy Shevchenko NMK_PIN_GROUP(etmr4_oc3_1, NMK_GPIO_ALT_C3),
8323a198059SLinus Walleij /* Other alt C4 column */
83339b707faSAndy Shevchenko NMK_PIN_GROUP(sbag_oc4_1, NMK_GPIO_ALT_C4),
83439b707faSAndy Shevchenko NMK_PIN_GROUP(hwobs_oc4_1, NMK_GPIO_ALT_C4),
8353a198059SLinus Walleij };
8363a198059SLinus Walleij
8373a198059SLinus Walleij /* We use this macro to define the groups applicable to a function */
8383a198059SLinus Walleij #define DB8500_FUNC_GROUPS(a, b...) \
8393a198059SLinus Walleij static const char * const a##_groups[] = { b };
8403a198059SLinus Walleij
8413a198059SLinus Walleij DB8500_FUNC_GROUPS(u0, "u0_a_1", "u0_c_1");
8423a198059SLinus Walleij DB8500_FUNC_GROUPS(u1, "u1rxtx_a_1", "u1ctsrts_a_1");
8433a198059SLinus Walleij /*
8443a198059SLinus Walleij * UART2 can be muxed out with just RX/TX in four places, CTS+RTS is however
8453a198059SLinus Walleij * only available on two pins in alternative function C
8463a198059SLinus Walleij */
8473a198059SLinus Walleij DB8500_FUNC_GROUPS(u2, "u2rxtx_b_1", "u2rxtx_c_1", "u2ctsrts_c_1",
8483a198059SLinus Walleij "u2rxtx_c_2", "u2rxtx_c_3", "u2rx_oc1_1");
8493a198059SLinus Walleij DB8500_FUNC_GROUPS(ipi2c, "ipi2c_a_1", "ipi2c_a_2");
8503a198059SLinus Walleij /*
8513a198059SLinus Walleij * MSP0 can only be on a certain set of pins, but the TX/RX pins can be
8523a198059SLinus Walleij * switched around by selecting the altfunction A or B. The SCK pin is
8533a198059SLinus Walleij * only available on the altfunction B.
8543a198059SLinus Walleij */
8553a198059SLinus Walleij DB8500_FUNC_GROUPS(msp0, "msp0txrx_a_1", "msp0tfstck_a_1", "msp0rfstck_a_1",
8563a198059SLinus Walleij "msp0txrx_b_1", "msp0sck_b_1");
85758afa801SStephan Gerhold DB8500_FUNC_GROUPS(mc0, "mc0_a_1", "mc0_a_2", "mc0_dat47_a_1", "mc0dat31dir_a_1");
8583a198059SLinus Walleij /* MSP0 can swap RX/TX like MSP0 but has no SCK pin available */
8593a198059SLinus Walleij DB8500_FUNC_GROUPS(msp1, "msp1txrx_a_1", "msp1_a_1", "msp1txrx_b_1");
8603a198059SLinus Walleij DB8500_FUNC_GROUPS(lcdb, "lcdb_a_1");
8613a198059SLinus Walleij DB8500_FUNC_GROUPS(lcd, "lcdvsi0_a_1", "lcdvsi1_a_1", "lcd_d0_d7_a_1",
862a4872f90SLinus Walleij "lcd_d8_d11_a_1", "lcd_d12_d15_a_1", "lcd_d12_d23_a_1", "lcd_b_1",
863a4872f90SLinus Walleij "lcd_d16_d23_b_1");
8643a198059SLinus Walleij DB8500_FUNC_GROUPS(kp, "kp_a_1", "kp_a_2", "kp_b_1", "kp_b_2", "kp_c_1", "kp_oc1_1");
8654b9d632fSLinus Walleij DB8500_FUNC_GROUPS(mc2, "mc2_a_1", "mc2_a_2", "mc2rstn_c_1");
8663a198059SLinus Walleij DB8500_FUNC_GROUPS(ssp1, "ssp1_a_1");
8673a198059SLinus Walleij DB8500_FUNC_GROUPS(ssp0, "ssp0_a_1");
8683a198059SLinus Walleij DB8500_FUNC_GROUPS(i2c0, "i2c0_a_1");
8693a198059SLinus Walleij /* The image processor has 8 GPIO pins that can be muxed out */
8703a198059SLinus Walleij DB8500_FUNC_GROUPS(ipgpio, "ipgpio0_a_1", "ipgpio1_a_1", "ipgpio7_b_1",
8713a198059SLinus Walleij "ipgpio2_b_1", "ipgpio3_b_1", "ipgpio6_c_1", "ipgpio0_c_1",
8723a198059SLinus Walleij "ipgpio1_c_1", "ipgpio3_c_1", "ipgpio2_c_1", "ipgpio4_c_1",
8733a198059SLinus Walleij "ipgpio5_c_1", "ipgpio6_c_2", "ipgpio7_c_1", "ipgpio2_c_2",
8743a198059SLinus Walleij "ipgpio3_c_2", "ipgpio4_c_2", "ipgpio5_c_2");
8753a198059SLinus Walleij /* MSP2 can not invert the RX/TX pins but has the optional SCK pin */
8763a198059SLinus Walleij DB8500_FUNC_GROUPS(msp2, "msp2sck_a_1", "msp2_a_1");
8773a198059SLinus Walleij DB8500_FUNC_GROUPS(mc4, "mc4_a_1", "mc4rstn_c_1");
8783a198059SLinus Walleij DB8500_FUNC_GROUPS(mc1, "mc1_a_1", "mc1_a_2", "mc1dir_a_1");
8793a198059SLinus Walleij DB8500_FUNC_GROUPS(hsi, "hsir_a_1", "hsit_a_1", "hsit_a_2");
8803a198059SLinus Walleij DB8500_FUNC_GROUPS(clkout, "clkout1_a_1", "clkout1_a_2", "clkout1_c_1",
8813a198059SLinus Walleij "clkout2_a_1", "clkout2_a_2", "clkout2_c_1");
8823a198059SLinus Walleij DB8500_FUNC_GROUPS(usb, "usb_a_1");
8833a198059SLinus Walleij DB8500_FUNC_GROUPS(trig, "trig_b_1");
8843a198059SLinus Walleij DB8500_FUNC_GROUPS(i2c4, "i2c4_b_1");
8853a198059SLinus Walleij DB8500_FUNC_GROUPS(i2c1, "i2c1_b_1", "i2c1_b_2");
8863a198059SLinus Walleij DB8500_FUNC_GROUPS(i2c2, "i2c2_b_1", "i2c2_b_2");
8873a198059SLinus Walleij /*
8883a198059SLinus Walleij * The modem UART can output its RX and TX pins in some different places,
8893a198059SLinus Walleij * so select one of each.
8903a198059SLinus Walleij */
8913a198059SLinus Walleij DB8500_FUNC_GROUPS(uartmod, "uartmodtx_b_1", "uartmodrx_b_1", "uartmodrx_b_2",
8923a198059SLinus Walleij "uartmodrx_c_1", "uartmod_tx_c_1", "uartmodrx_oc1_1",
8933a198059SLinus Walleij "uartmodtx_oc1_1", "uartmodrx_oc3_1", "uartmodtx_oc3_1");
8943a198059SLinus Walleij DB8500_FUNC_GROUPS(stmmod, "stmmod_b_1", "stmmod_c_1", "stmmod_oc1_1",
8953a198059SLinus Walleij "stmmod_oc3_1", "stmmod_oc3_2");
8963a198059SLinus Walleij DB8500_FUNC_GROUPS(spi3, "spi3_b_1");
8973a198059SLinus Walleij /* Select between CS0 on alt B or PS1 on alt C */
8983a198059SLinus Walleij DB8500_FUNC_GROUPS(sm, "sm_b_1", "smcs0_b_1", "smcs1_b_1", "smcleale_c_1",
8993a198059SLinus Walleij "smps0_c_1", "smps1_c_1");
9003a198059SLinus Walleij DB8500_FUNC_GROUPS(lcda, "lcdaclk_b_1", "lcda_b_1");
9013a198059SLinus Walleij DB8500_FUNC_GROUPS(ddrtrig, "ddrtrig_b_1");
9023a198059SLinus Walleij DB8500_FUNC_GROUPS(pwl, "pwl_b_1", "pwl_b_2", "pwl_b_3", "pwl_b_4");
9033a198059SLinus Walleij DB8500_FUNC_GROUPS(spi1, "spi1_b_1");
9043a198059SLinus Walleij DB8500_FUNC_GROUPS(mc3, "mc3_b_1");
9053a198059SLinus Walleij DB8500_FUNC_GROUPS(ipjtag, "ipjtag_c_1");
9063a198059SLinus Walleij DB8500_FUNC_GROUPS(slim0, "slim0_c_1");
9073a198059SLinus Walleij DB8500_FUNC_GROUPS(ms, "ms_c_1");
9083a198059SLinus Walleij DB8500_FUNC_GROUPS(iptrigout, "iptrigout_c_1");
9093a198059SLinus Walleij DB8500_FUNC_GROUPS(stmape, "stmape_c_1", "stmape_c_2", "stmape_oc1_1");
9103a198059SLinus Walleij DB8500_FUNC_GROUPS(mc5, "mc5_c_1");
9113a198059SLinus Walleij DB8500_FUNC_GROUPS(usbsim, "usbsim_c_1", "usbsim_c_2");
9123a198059SLinus Walleij DB8500_FUNC_GROUPS(i2c3, "i2c3_c_1", "i2c3_c_2");
9133a198059SLinus Walleij DB8500_FUNC_GROUPS(spi0, "spi0_c_1");
9143a198059SLinus Walleij DB8500_FUNC_GROUPS(spi2, "spi2_oc1_1", "spi2_oc1_2");
9153a198059SLinus Walleij DB8500_FUNC_GROUPS(remap, "remap0_oc1_1", "remap1_oc1_1");
9163a198059SLinus Walleij DB8500_FUNC_GROUPS(sbag, "sbag_oc2_1", "sbag_oc4_1");
9173a198059SLinus Walleij DB8500_FUNC_GROUPS(ptm, "ptma9_oc1_1", "ptma9_oc2_1");
9183a198059SLinus Walleij DB8500_FUNC_GROUPS(rf, "rf_oc1_1", "rf_oc1_2");
9193a198059SLinus Walleij DB8500_FUNC_GROUPS(hx, "hxclk_oc1_1", "hxgpio_oc1_1");
9203a198059SLinus Walleij DB8500_FUNC_GROUPS(etm, "etmr4_oc2_1", "etmr4_oc3_1");
9213a198059SLinus Walleij DB8500_FUNC_GROUPS(hwobs, "hwobs_oc4_1");
9223a198059SLinus Walleij #define FUNCTION(fname) \
9233a198059SLinus Walleij { \
9243a198059SLinus Walleij .name = #fname, \
9253a198059SLinus Walleij .groups = fname##_groups, \
9263a198059SLinus Walleij .ngroups = ARRAY_SIZE(fname##_groups), \
9273a198059SLinus Walleij }
9283a198059SLinus Walleij
9293a198059SLinus Walleij static const struct nmk_function nmk_db8500_functions[] = {
9303a198059SLinus Walleij FUNCTION(u0),
9313a198059SLinus Walleij FUNCTION(u1),
9323a198059SLinus Walleij FUNCTION(u2),
9333a198059SLinus Walleij FUNCTION(ipi2c),
9343a198059SLinus Walleij FUNCTION(msp0),
9353a198059SLinus Walleij FUNCTION(mc0),
9363a198059SLinus Walleij FUNCTION(msp1),
9373a198059SLinus Walleij FUNCTION(lcdb),
9383a198059SLinus Walleij FUNCTION(lcd),
9393a198059SLinus Walleij FUNCTION(kp),
9403a198059SLinus Walleij FUNCTION(mc2),
9413a198059SLinus Walleij FUNCTION(ssp1),
9423a198059SLinus Walleij FUNCTION(ssp0),
9433a198059SLinus Walleij FUNCTION(i2c0),
9443a198059SLinus Walleij FUNCTION(ipgpio),
9453a198059SLinus Walleij FUNCTION(msp2),
9463a198059SLinus Walleij FUNCTION(mc4),
9473a198059SLinus Walleij FUNCTION(mc1),
9483a198059SLinus Walleij FUNCTION(hsi),
9493a198059SLinus Walleij FUNCTION(clkout),
9503a198059SLinus Walleij FUNCTION(usb),
9513a198059SLinus Walleij FUNCTION(trig),
9523a198059SLinus Walleij FUNCTION(i2c4),
9533a198059SLinus Walleij FUNCTION(i2c1),
9543a198059SLinus Walleij FUNCTION(i2c2),
9553a198059SLinus Walleij FUNCTION(uartmod),
9563a198059SLinus Walleij FUNCTION(stmmod),
9573a198059SLinus Walleij FUNCTION(spi3),
9583a198059SLinus Walleij FUNCTION(sm),
9593a198059SLinus Walleij FUNCTION(lcda),
9603a198059SLinus Walleij FUNCTION(ddrtrig),
9613a198059SLinus Walleij FUNCTION(pwl),
9623a198059SLinus Walleij FUNCTION(spi1),
9633a198059SLinus Walleij FUNCTION(mc3),
9643a198059SLinus Walleij FUNCTION(ipjtag),
9653a198059SLinus Walleij FUNCTION(slim0),
9663a198059SLinus Walleij FUNCTION(ms),
9673a198059SLinus Walleij FUNCTION(iptrigout),
9683a198059SLinus Walleij FUNCTION(stmape),
9693a198059SLinus Walleij FUNCTION(mc5),
9703a198059SLinus Walleij FUNCTION(usbsim),
9713a198059SLinus Walleij FUNCTION(i2c3),
9723a198059SLinus Walleij FUNCTION(spi0),
9733a198059SLinus Walleij FUNCTION(spi2),
9743a198059SLinus Walleij FUNCTION(remap),
97532c8a946SLinus Walleij FUNCTION(sbag),
9763a198059SLinus Walleij FUNCTION(ptm),
9773a198059SLinus Walleij FUNCTION(rf),
9783a198059SLinus Walleij FUNCTION(hx),
9793a198059SLinus Walleij FUNCTION(etm),
9803a198059SLinus Walleij FUNCTION(hwobs),
9813a198059SLinus Walleij };
9823a198059SLinus Walleij
9833a198059SLinus Walleij static const struct prcm_gpiocr_altcx_pin_desc db8500_altcx_pins[] = {
9843a198059SLinus Walleij PRCM_GPIOCR_ALTCX(23, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_CLK_a */
9853a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_CLK_a */
9863a198059SLinus Walleij false, 0, 0,
9873a198059SLinus Walleij false, 0, 0
9883a198059SLinus Walleij ),
9893a198059SLinus Walleij PRCM_GPIOCR_ALTCX(24, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE or U2_RXD ??? */
9903a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_VAL_a */
9913a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
9923a198059SLinus Walleij false, 0, 0
9933a198059SLinus Walleij ),
9943a198059SLinus Walleij PRCM_GPIOCR_ALTCX(25, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[0] */
9953a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[0] */
9963a198059SLinus Walleij false, 0, 0,
9973a198059SLinus Walleij false, 0, 0
9983a198059SLinus Walleij ),
9993a198059SLinus Walleij PRCM_GPIOCR_ALTCX(26, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[1] */
10003a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[1] */
10013a198059SLinus Walleij false, 0, 0,
10023a198059SLinus Walleij false, 0, 0
10033a198059SLinus Walleij ),
10043a198059SLinus Walleij PRCM_GPIOCR_ALTCX(27, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[2] */
10053a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[2] */
10063a198059SLinus Walleij false, 0, 0,
10073a198059SLinus Walleij false, 0, 0
10083a198059SLinus Walleij ),
10093a198059SLinus Walleij PRCM_GPIOCR_ALTCX(28, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[3] */
10103a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[3] */
10113a198059SLinus Walleij false, 0, 0,
10123a198059SLinus Walleij false, 0, 0
10133a198059SLinus Walleij ),
10143a198059SLinus Walleij PRCM_GPIOCR_ALTCX(29, false, 0, 0,
10153a198059SLinus Walleij false, 0, 0,
10163a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
10173a198059SLinus Walleij false, 0, 0
10183a198059SLinus Walleij ),
10193a198059SLinus Walleij PRCM_GPIOCR_ALTCX(30, false, 0, 0,
10203a198059SLinus Walleij false, 0, 0,
10213a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
10223a198059SLinus Walleij false, 0, 0
10233a198059SLinus Walleij ),
10243a198059SLinus Walleij PRCM_GPIOCR_ALTCX(31, false, 0, 0,
10253a198059SLinus Walleij false, 0, 0,
10263a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
10273a198059SLinus Walleij false, 0, 0
10283a198059SLinus Walleij ),
10293a198059SLinus Walleij PRCM_GPIOCR_ALTCX(32, false, 0, 0,
10303a198059SLinus Walleij false, 0, 0,
10313a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
10323a198059SLinus Walleij false, 0, 0
10333a198059SLinus Walleij ),
10343a198059SLinus Walleij PRCM_GPIOCR_ALTCX(68, true, PRCM_IDX_GPIOCR1, 18, /* REMAP_SELECT_ON */
10353a198059SLinus Walleij false, 0, 0,
10363a198059SLinus Walleij false, 0, 0,
10373a198059SLinus Walleij false, 0, 0
10383a198059SLinus Walleij ),
10393a198059SLinus Walleij PRCM_GPIOCR_ALTCX(69, true, PRCM_IDX_GPIOCR1, 18, /* REMAP_SELECT_ON */
10403a198059SLinus Walleij false, 0, 0,
10413a198059SLinus Walleij false, 0, 0,
10423a198059SLinus Walleij false, 0, 0
10433a198059SLinus Walleij ),
10443a198059SLinus Walleij PRCM_GPIOCR_ALTCX(70, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D23 */
10453a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10463a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
10473a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_CLK */
10483a198059SLinus Walleij ),
10493a198059SLinus Walleij PRCM_GPIOCR_ALTCX(71, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D22 */
10503a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10513a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
10523a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D3 */
10533a198059SLinus Walleij ),
10543a198059SLinus Walleij PRCM_GPIOCR_ALTCX(72, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D21 */
10553a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10563a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
10573a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D2 */
10583a198059SLinus Walleij ),
10593a198059SLinus Walleij PRCM_GPIOCR_ALTCX(73, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D20 */
10603a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10613a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
10623a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D1 */
10633a198059SLinus Walleij ),
10643a198059SLinus Walleij PRCM_GPIOCR_ALTCX(74, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D19 */
10653a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10663a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
10673a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D0 */
10683a198059SLinus Walleij ),
10693a198059SLinus Walleij PRCM_GPIOCR_ALTCX(75, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D18 */
10703a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10713a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 0, /* DBG_UARTMOD_CMD0 */
10723a198059SLinus Walleij false, 0, 0
10733a198059SLinus Walleij ),
10743a198059SLinus Walleij PRCM_GPIOCR_ALTCX(76, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D17 */
10753a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10763a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 0, /* DBG_UARTMOD_CMD0 */
10773a198059SLinus Walleij false, 0, 0
10783a198059SLinus Walleij ),
10793a198059SLinus Walleij PRCM_GPIOCR_ALTCX(77, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D16 */
10803a198059SLinus Walleij true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
10813a198059SLinus Walleij false, 0, 0,
10823a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 8 /* SBAG_VAL */
10833a198059SLinus Walleij ),
10843a198059SLinus Walleij PRCM_GPIOCR_ALTCX(86, true, PRCM_IDX_GPIOCR1, 12, /* KP_O3 */
10853a198059SLinus Walleij false, 0, 0,
10863a198059SLinus Walleij false, 0, 0,
10873a198059SLinus Walleij false, 0, 0
10883a198059SLinus Walleij ),
10893a198059SLinus Walleij PRCM_GPIOCR_ALTCX(87, true, PRCM_IDX_GPIOCR1, 12, /* KP_O2 */
10903a198059SLinus Walleij false, 0, 0,
10913a198059SLinus Walleij false, 0, 0,
10923a198059SLinus Walleij false, 0, 0
10933a198059SLinus Walleij ),
10943a198059SLinus Walleij PRCM_GPIOCR_ALTCX(88, true, PRCM_IDX_GPIOCR1, 12, /* KP_I3 */
10953a198059SLinus Walleij false, 0, 0,
10963a198059SLinus Walleij false, 0, 0,
10973a198059SLinus Walleij false, 0, 0
10983a198059SLinus Walleij ),
10993a198059SLinus Walleij PRCM_GPIOCR_ALTCX(89, true, PRCM_IDX_GPIOCR1, 12, /* KP_I2 */
11003a198059SLinus Walleij false, 0, 0,
11013a198059SLinus Walleij false, 0, 0,
11023a198059SLinus Walleij false, 0, 0
11033a198059SLinus Walleij ),
11043a198059SLinus Walleij PRCM_GPIOCR_ALTCX(90, true, PRCM_IDX_GPIOCR1, 12, /* KP_O1 */
11053a198059SLinus Walleij false, 0, 0,
11063a198059SLinus Walleij false, 0, 0,
11073a198059SLinus Walleij false, 0, 0
11083a198059SLinus Walleij ),
11093a198059SLinus Walleij PRCM_GPIOCR_ALTCX(91, true, PRCM_IDX_GPIOCR1, 12, /* KP_O0 */
11103a198059SLinus Walleij false, 0, 0,
11113a198059SLinus Walleij false, 0, 0,
11123a198059SLinus Walleij false, 0, 0
11133a198059SLinus Walleij ),
11143a198059SLinus Walleij PRCM_GPIOCR_ALTCX(92, true, PRCM_IDX_GPIOCR1, 12, /* KP_I1 */
11153a198059SLinus Walleij false, 0, 0,
11163a198059SLinus Walleij false, 0, 0,
11173a198059SLinus Walleij false, 0, 0
11183a198059SLinus Walleij ),
11193a198059SLinus Walleij PRCM_GPIOCR_ALTCX(93, true, PRCM_IDX_GPIOCR1, 12, /* KP_I0 */
11203a198059SLinus Walleij false, 0, 0,
11213a198059SLinus Walleij false, 0, 0,
11223a198059SLinus Walleij false, 0, 0
11233a198059SLinus Walleij ),
11243a198059SLinus Walleij PRCM_GPIOCR_ALTCX(96, true, PRCM_IDX_GPIOCR2, 3, /* RF_INT */
11253a198059SLinus Walleij false, 0, 0,
11263a198059SLinus Walleij false, 0, 0,
11273a198059SLinus Walleij false, 0, 0
11283a198059SLinus Walleij ),
11293a198059SLinus Walleij PRCM_GPIOCR_ALTCX(97, true, PRCM_IDX_GPIOCR2, 1, /* RF_CTRL */
11303a198059SLinus Walleij false, 0, 0,
11313a198059SLinus Walleij false, 0, 0,
11323a198059SLinus Walleij false, 0, 0
11333a198059SLinus Walleij ),
11343a198059SLinus Walleij PRCM_GPIOCR_ALTCX(151, false, 0, 0,
11353a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_CTL */
11363a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
11373a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS17 */
11383a198059SLinus Walleij ),
11393a198059SLinus Walleij PRCM_GPIOCR_ALTCX(152, true, PRCM_IDX_GPIOCR1, 4, /* Hx_CLK */
11403a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_CLK */
11413a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
11423a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS16 */
11433a198059SLinus Walleij ),
11443a198059SLinus Walleij PRCM_GPIOCR_ALTCX(153, true, PRCM_IDX_GPIOCR1, 1, /* UARTMOD_CMD1 */
11453a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D15 */
11463a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11473a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS15 */
11483a198059SLinus Walleij ),
11493a198059SLinus Walleij PRCM_GPIOCR_ALTCX(154, true, PRCM_IDX_GPIOCR1, 1, /* UARTMOD_CMD1 */
11503a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D14 */
11513a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11523a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS14 */
11533a198059SLinus Walleij ),
11543a198059SLinus Walleij PRCM_GPIOCR_ALTCX(155, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
11553a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D13 */
11563a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11573a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS13 */
11583a198059SLinus Walleij ),
11593a198059SLinus Walleij PRCM_GPIOCR_ALTCX(156, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
11603a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D12 */
11613a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11623a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS12 */
11633a198059SLinus Walleij ),
11643a198059SLinus Walleij PRCM_GPIOCR_ALTCX(157, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
11653a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D11 */
11663a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11673a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS11 */
11683a198059SLinus Walleij ),
11693a198059SLinus Walleij PRCM_GPIOCR_ALTCX(158, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
11703a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D10 */
11713a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11723a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS10 */
11733a198059SLinus Walleij ),
11743a198059SLinus Walleij PRCM_GPIOCR_ALTCX(159, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
11753a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D9 */
11763a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11773a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS9 */
11783a198059SLinus Walleij ),
11793a198059SLinus Walleij PRCM_GPIOCR_ALTCX(160, false, 0, 0,
11803a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D8 */
11813a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
11823a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS8 */
11833a198059SLinus Walleij ),
11843a198059SLinus Walleij PRCM_GPIOCR_ALTCX(161, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO7 */
11853a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D7 */
11863a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
11873a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS7 */
11883a198059SLinus Walleij ),
11893a198059SLinus Walleij PRCM_GPIOCR_ALTCX(162, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO6 */
11903a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D6 */
11913a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
11923a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS6 */
11933a198059SLinus Walleij ),
11943a198059SLinus Walleij PRCM_GPIOCR_ALTCX(163, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO5 */
11953a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D5 */
11963a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
11973a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS5 */
11983a198059SLinus Walleij ),
11993a198059SLinus Walleij PRCM_GPIOCR_ALTCX(164, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO4 */
12003a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D4 */
12013a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
12023a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS4 */
12033a198059SLinus Walleij ),
12043a198059SLinus Walleij PRCM_GPIOCR_ALTCX(165, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO3 */
12053a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D3 */
12063a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
12073a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS3 */
12083a198059SLinus Walleij ),
12093a198059SLinus Walleij PRCM_GPIOCR_ALTCX(166, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO2 */
12103a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D2 */
12113a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
12123a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS2 */
12133a198059SLinus Walleij ),
12143a198059SLinus Walleij PRCM_GPIOCR_ALTCX(167, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO1 */
12153a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D1 */
12163a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
12173a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS1 */
12183a198059SLinus Walleij ),
12193a198059SLinus Walleij PRCM_GPIOCR_ALTCX(168, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO0 */
12203a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D0 */
12213a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
12223a198059SLinus Walleij true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS0 */
12233a198059SLinus Walleij ),
12243a198059SLinus Walleij PRCM_GPIOCR_ALTCX(170, true, PRCM_IDX_GPIOCR2, 2, /* RF_INT */
12253a198059SLinus Walleij false, 0, 0,
12263a198059SLinus Walleij false, 0, 0,
12273a198059SLinus Walleij false, 0, 0
12283a198059SLinus Walleij ),
12293a198059SLinus Walleij PRCM_GPIOCR_ALTCX(171, true, PRCM_IDX_GPIOCR2, 0, /* RF_CTRL */
12303a198059SLinus Walleij false, 0, 0,
12313a198059SLinus Walleij false, 0, 0,
12323a198059SLinus Walleij false, 0, 0
12333a198059SLinus Walleij ),
12343a198059SLinus Walleij PRCM_GPIOCR_ALTCX(215, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_TXD */
12353a198059SLinus Walleij false, 0, 0,
12363a198059SLinus Walleij false, 0, 0,
12373a198059SLinus Walleij false, 0, 0
12383a198059SLinus Walleij ),
12393a198059SLinus Walleij PRCM_GPIOCR_ALTCX(216, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_FRM */
12403a198059SLinus Walleij false, 0, 0,
12413a198059SLinus Walleij false, 0, 0,
12423a198059SLinus Walleij false, 0, 0
12433a198059SLinus Walleij ),
12443a198059SLinus Walleij PRCM_GPIOCR_ALTCX(217, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_CLK */
12453a198059SLinus Walleij false, 0, 0,
12463a198059SLinus Walleij false, 0, 0,
12473a198059SLinus Walleij false, 0, 0
12483a198059SLinus Walleij ),
12493a198059SLinus Walleij PRCM_GPIOCR_ALTCX(218, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_RXD */
12503a198059SLinus Walleij false, 0, 0,
12513a198059SLinus Walleij false, 0, 0,
12523a198059SLinus Walleij false, 0, 0
12533a198059SLinus Walleij ),
12543a198059SLinus Walleij };
12553a198059SLinus Walleij
12563a198059SLinus Walleij static const u16 db8500_prcm_gpiocr_regs[] = {
12573a198059SLinus Walleij [PRCM_IDX_GPIOCR1] = 0x138,
12583a198059SLinus Walleij [PRCM_IDX_GPIOCR2] = 0x574,
12593a198059SLinus Walleij };
12603a198059SLinus Walleij
12613a198059SLinus Walleij static const struct nmk_pinctrl_soc_data nmk_db8500_soc = {
12623a198059SLinus Walleij .pins = nmk_db8500_pins,
12633a198059SLinus Walleij .npins = ARRAY_SIZE(nmk_db8500_pins),
12643a198059SLinus Walleij .functions = nmk_db8500_functions,
12653a198059SLinus Walleij .nfunctions = ARRAY_SIZE(nmk_db8500_functions),
12663a198059SLinus Walleij .groups = nmk_db8500_groups,
12673a198059SLinus Walleij .ngroups = ARRAY_SIZE(nmk_db8500_groups),
12683a198059SLinus Walleij .altcx_pins = db8500_altcx_pins,
12693a198059SLinus Walleij .npins_altcx = ARRAY_SIZE(db8500_altcx_pins),
12703a198059SLinus Walleij .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs,
12713a198059SLinus Walleij };
12723a198059SLinus Walleij
nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data ** soc)12733a198059SLinus Walleij void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
12743a198059SLinus Walleij {
12753a198059SLinus Walleij *soc = &nmk_db8500_soc;
12763a198059SLinus Walleij }
1277