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