pinctrl-nomadik-db8500.c 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <linux/kernel.h>
  3. #include <linux/pinctrl/pinctrl.h>
  4. #include "pinctrl-nomadik.h"
  5. /* All the pins that can be used for GPIO and some other functions */
  6. #define _GPIO(offset) (offset)
  7. #define DB8500_PIN_AJ5 _GPIO(0)
  8. #define DB8500_PIN_AJ3 _GPIO(1)
  9. #define DB8500_PIN_AH4 _GPIO(2)
  10. #define DB8500_PIN_AH3 _GPIO(3)
  11. #define DB8500_PIN_AH6 _GPIO(4)
  12. #define DB8500_PIN_AG6 _GPIO(5)
  13. #define DB8500_PIN_AF6 _GPIO(6)
  14. #define DB8500_PIN_AG5 _GPIO(7)
  15. #define DB8500_PIN_AD5 _GPIO(8)
  16. #define DB8500_PIN_AE4 _GPIO(9)
  17. #define DB8500_PIN_AF5 _GPIO(10)
  18. #define DB8500_PIN_AG4 _GPIO(11)
  19. #define DB8500_PIN_AC4 _GPIO(12)
  20. #define DB8500_PIN_AF3 _GPIO(13)
  21. #define DB8500_PIN_AE3 _GPIO(14)
  22. #define DB8500_PIN_AC3 _GPIO(15)
  23. #define DB8500_PIN_AD3 _GPIO(16)
  24. #define DB8500_PIN_AD4 _GPIO(17)
  25. #define DB8500_PIN_AC2 _GPIO(18)
  26. #define DB8500_PIN_AC1 _GPIO(19)
  27. #define DB8500_PIN_AB4 _GPIO(20)
  28. #define DB8500_PIN_AB3 _GPIO(21)
  29. #define DB8500_PIN_AA3 _GPIO(22)
  30. #define DB8500_PIN_AA4 _GPIO(23)
  31. #define DB8500_PIN_AB2 _GPIO(24)
  32. #define DB8500_PIN_Y4 _GPIO(25)
  33. #define DB8500_PIN_Y2 _GPIO(26)
  34. #define DB8500_PIN_AA2 _GPIO(27)
  35. #define DB8500_PIN_AA1 _GPIO(28)
  36. #define DB8500_PIN_W2 _GPIO(29)
  37. #define DB8500_PIN_W3 _GPIO(30)
  38. #define DB8500_PIN_V3 _GPIO(31)
  39. #define DB8500_PIN_V2 _GPIO(32)
  40. #define DB8500_PIN_AF2 _GPIO(33)
  41. #define DB8500_PIN_AE1 _GPIO(34)
  42. #define DB8500_PIN_AE2 _GPIO(35)
  43. #define DB8500_PIN_AG2 _GPIO(36)
  44. /* Hole */
  45. #define DB8500_PIN_F3 _GPIO(64)
  46. #define DB8500_PIN_F1 _GPIO(65)
  47. #define DB8500_PIN_G3 _GPIO(66)
  48. #define DB8500_PIN_G2 _GPIO(67)
  49. #define DB8500_PIN_E1 _GPIO(68)
  50. #define DB8500_PIN_E2 _GPIO(69)
  51. #define DB8500_PIN_G5 _GPIO(70)
  52. #define DB8500_PIN_G4 _GPIO(71)
  53. #define DB8500_PIN_H4 _GPIO(72)
  54. #define DB8500_PIN_H3 _GPIO(73)
  55. #define DB8500_PIN_J3 _GPIO(74)
  56. #define DB8500_PIN_H2 _GPIO(75)
  57. #define DB8500_PIN_J2 _GPIO(76)
  58. #define DB8500_PIN_H1 _GPIO(77)
  59. #define DB8500_PIN_F4 _GPIO(78)
  60. #define DB8500_PIN_E3 _GPIO(79)
  61. #define DB8500_PIN_E4 _GPIO(80)
  62. #define DB8500_PIN_D2 _GPIO(81)
  63. #define DB8500_PIN_C1 _GPIO(82)
  64. #define DB8500_PIN_D3 _GPIO(83)
  65. #define DB8500_PIN_C2 _GPIO(84)
  66. #define DB8500_PIN_D5 _GPIO(85)
  67. #define DB8500_PIN_C6 _GPIO(86)
  68. #define DB8500_PIN_B3 _GPIO(87)
  69. #define DB8500_PIN_C4 _GPIO(88)
  70. #define DB8500_PIN_E6 _GPIO(89)
  71. #define DB8500_PIN_A3 _GPIO(90)
  72. #define DB8500_PIN_B6 _GPIO(91)
  73. #define DB8500_PIN_D6 _GPIO(92)
  74. #define DB8500_PIN_B7 _GPIO(93)
  75. #define DB8500_PIN_D7 _GPIO(94)
  76. #define DB8500_PIN_E8 _GPIO(95)
  77. #define DB8500_PIN_D8 _GPIO(96)
  78. #define DB8500_PIN_D9 _GPIO(97)
  79. /* Hole */
  80. #define DB8500_PIN_A5 _GPIO(128)
  81. #define DB8500_PIN_B4 _GPIO(129)
  82. #define DB8500_PIN_C8 _GPIO(130)
  83. #define DB8500_PIN_A12 _GPIO(131)
  84. #define DB8500_PIN_C10 _GPIO(132)
  85. #define DB8500_PIN_B10 _GPIO(133)
  86. #define DB8500_PIN_B9 _GPIO(134)
  87. #define DB8500_PIN_A9 _GPIO(135)
  88. #define DB8500_PIN_C7 _GPIO(136)
  89. #define DB8500_PIN_A7 _GPIO(137)
  90. #define DB8500_PIN_C5 _GPIO(138)
  91. #define DB8500_PIN_C9 _GPIO(139)
  92. #define DB8500_PIN_B11 _GPIO(140)
  93. #define DB8500_PIN_C12 _GPIO(141)
  94. #define DB8500_PIN_C11 _GPIO(142)
  95. #define DB8500_PIN_D12 _GPIO(143)
  96. #define DB8500_PIN_B13 _GPIO(144)
  97. #define DB8500_PIN_C13 _GPIO(145)
  98. #define DB8500_PIN_D13 _GPIO(146)
  99. #define DB8500_PIN_C15 _GPIO(147)
  100. #define DB8500_PIN_B16 _GPIO(148)
  101. #define DB8500_PIN_B14 _GPIO(149)
  102. #define DB8500_PIN_C14 _GPIO(150)
  103. #define DB8500_PIN_D17 _GPIO(151)
  104. #define DB8500_PIN_D16 _GPIO(152)
  105. #define DB8500_PIN_B17 _GPIO(153)
  106. #define DB8500_PIN_C16 _GPIO(154)
  107. #define DB8500_PIN_C19 _GPIO(155)
  108. #define DB8500_PIN_C17 _GPIO(156)
  109. #define DB8500_PIN_A18 _GPIO(157)
  110. #define DB8500_PIN_C18 _GPIO(158)
  111. #define DB8500_PIN_B19 _GPIO(159)
  112. #define DB8500_PIN_B20 _GPIO(160)
  113. #define DB8500_PIN_D21 _GPIO(161)
  114. #define DB8500_PIN_D20 _GPIO(162)
  115. #define DB8500_PIN_C20 _GPIO(163)
  116. #define DB8500_PIN_B21 _GPIO(164)
  117. #define DB8500_PIN_C21 _GPIO(165)
  118. #define DB8500_PIN_A22 _GPIO(166)
  119. #define DB8500_PIN_B24 _GPIO(167)
  120. #define DB8500_PIN_C22 _GPIO(168)
  121. #define DB8500_PIN_D22 _GPIO(169)
  122. #define DB8500_PIN_C23 _GPIO(170)
  123. #define DB8500_PIN_D23 _GPIO(171)
  124. /* Hole */
  125. #define DB8500_PIN_AJ27 _GPIO(192)
  126. #define DB8500_PIN_AH27 _GPIO(193)
  127. #define DB8500_PIN_AF27 _GPIO(194)
  128. #define DB8500_PIN_AG28 _GPIO(195)
  129. #define DB8500_PIN_AG26 _GPIO(196)
  130. #define DB8500_PIN_AH24 _GPIO(197)
  131. #define DB8500_PIN_AG25 _GPIO(198)
  132. #define DB8500_PIN_AH23 _GPIO(199)
  133. #define DB8500_PIN_AH26 _GPIO(200)
  134. #define DB8500_PIN_AF24 _GPIO(201)
  135. #define DB8500_PIN_AF25 _GPIO(202)
  136. #define DB8500_PIN_AE23 _GPIO(203)
  137. #define DB8500_PIN_AF23 _GPIO(204)
  138. #define DB8500_PIN_AG23 _GPIO(205)
  139. #define DB8500_PIN_AG24 _GPIO(206)
  140. #define DB8500_PIN_AJ23 _GPIO(207)
  141. #define DB8500_PIN_AH16 _GPIO(208)
  142. #define DB8500_PIN_AG15 _GPIO(209)
  143. #define DB8500_PIN_AJ15 _GPIO(210)
  144. #define DB8500_PIN_AG14 _GPIO(211)
  145. #define DB8500_PIN_AF13 _GPIO(212)
  146. #define DB8500_PIN_AG13 _GPIO(213)
  147. #define DB8500_PIN_AH15 _GPIO(214)
  148. #define DB8500_PIN_AH13 _GPIO(215)
  149. #define DB8500_PIN_AG12 _GPIO(216)
  150. #define DB8500_PIN_AH12 _GPIO(217)
  151. #define DB8500_PIN_AH11 _GPIO(218)
  152. #define DB8500_PIN_AG10 _GPIO(219)
  153. #define DB8500_PIN_AH10 _GPIO(220)
  154. #define DB8500_PIN_AJ11 _GPIO(221)
  155. #define DB8500_PIN_AJ9 _GPIO(222)
  156. #define DB8500_PIN_AH9 _GPIO(223)
  157. #define DB8500_PIN_AG9 _GPIO(224)
  158. #define DB8500_PIN_AG8 _GPIO(225)
  159. #define DB8500_PIN_AF8 _GPIO(226)
  160. #define DB8500_PIN_AH7 _GPIO(227)
  161. #define DB8500_PIN_AJ6 _GPIO(228)
  162. #define DB8500_PIN_AG7 _GPIO(229)
  163. #define DB8500_PIN_AF7 _GPIO(230)
  164. /* Hole */
  165. #define DB8500_PIN_AF28 _GPIO(256)
  166. #define DB8500_PIN_AE29 _GPIO(257)
  167. #define DB8500_PIN_AD29 _GPIO(258)
  168. #define DB8500_PIN_AC29 _GPIO(259)
  169. #define DB8500_PIN_AD28 _GPIO(260)
  170. #define DB8500_PIN_AD26 _GPIO(261)
  171. #define DB8500_PIN_AE26 _GPIO(262)
  172. #define DB8500_PIN_AG29 _GPIO(263)
  173. #define DB8500_PIN_AE27 _GPIO(264)
  174. #define DB8500_PIN_AD27 _GPIO(265)
  175. #define DB8500_PIN_AC28 _GPIO(266)
  176. #define DB8500_PIN_AC27 _GPIO(267)
  177. /*
  178. * The names of the pins are denoted by GPIO number and ball name, even
  179. * though they can be used for other things than GPIO, this is the first
  180. * column in the table of the data sheet and often used on schematics and
  181. * such.
  182. */
  183. static const struct pinctrl_pin_desc nmk_db8500_pins[] = {
  184. PINCTRL_PIN(DB8500_PIN_AJ5, "GPIO0_AJ5"),
  185. PINCTRL_PIN(DB8500_PIN_AJ3, "GPIO1_AJ3"),
  186. PINCTRL_PIN(DB8500_PIN_AH4, "GPIO2_AH4"),
  187. PINCTRL_PIN(DB8500_PIN_AH3, "GPIO3_AH3"),
  188. PINCTRL_PIN(DB8500_PIN_AH6, "GPIO4_AH6"),
  189. PINCTRL_PIN(DB8500_PIN_AG6, "GPIO5_AG6"),
  190. PINCTRL_PIN(DB8500_PIN_AF6, "GPIO6_AF6"),
  191. PINCTRL_PIN(DB8500_PIN_AG5, "GPIO7_AG5"),
  192. PINCTRL_PIN(DB8500_PIN_AD5, "GPIO8_AD5"),
  193. PINCTRL_PIN(DB8500_PIN_AE4, "GPIO9_AE4"),
  194. PINCTRL_PIN(DB8500_PIN_AF5, "GPIO10_AF5"),
  195. PINCTRL_PIN(DB8500_PIN_AG4, "GPIO11_AG4"),
  196. PINCTRL_PIN(DB8500_PIN_AC4, "GPIO12_AC4"),
  197. PINCTRL_PIN(DB8500_PIN_AF3, "GPIO13_AF3"),
  198. PINCTRL_PIN(DB8500_PIN_AE3, "GPIO14_AE3"),
  199. PINCTRL_PIN(DB8500_PIN_AC3, "GPIO15_AC3"),
  200. PINCTRL_PIN(DB8500_PIN_AD3, "GPIO16_AD3"),
  201. PINCTRL_PIN(DB8500_PIN_AD4, "GPIO17_AD4"),
  202. PINCTRL_PIN(DB8500_PIN_AC2, "GPIO18_AC2"),
  203. PINCTRL_PIN(DB8500_PIN_AC1, "GPIO19_AC1"),
  204. PINCTRL_PIN(DB8500_PIN_AB4, "GPIO20_AB4"),
  205. PINCTRL_PIN(DB8500_PIN_AB3, "GPIO21_AB3"),
  206. PINCTRL_PIN(DB8500_PIN_AA3, "GPIO22_AA3"),
  207. PINCTRL_PIN(DB8500_PIN_AA4, "GPIO23_AA4"),
  208. PINCTRL_PIN(DB8500_PIN_AB2, "GPIO24_AB2"),
  209. PINCTRL_PIN(DB8500_PIN_Y4, "GPIO25_Y4"),
  210. PINCTRL_PIN(DB8500_PIN_Y2, "GPIO26_Y2"),
  211. PINCTRL_PIN(DB8500_PIN_AA2, "GPIO27_AA2"),
  212. PINCTRL_PIN(DB8500_PIN_AA1, "GPIO28_AA1"),
  213. PINCTRL_PIN(DB8500_PIN_W2, "GPIO29_W2"),
  214. PINCTRL_PIN(DB8500_PIN_W3, "GPIO30_W3"),
  215. PINCTRL_PIN(DB8500_PIN_V3, "GPIO31_V3"),
  216. PINCTRL_PIN(DB8500_PIN_V2, "GPIO32_V2"),
  217. PINCTRL_PIN(DB8500_PIN_AF2, "GPIO33_AF2"),
  218. PINCTRL_PIN(DB8500_PIN_AE1, "GPIO34_AE1"),
  219. PINCTRL_PIN(DB8500_PIN_AE2, "GPIO35_AE2"),
  220. PINCTRL_PIN(DB8500_PIN_AG2, "GPIO36_AG2"),
  221. /* Hole */
  222. PINCTRL_PIN(DB8500_PIN_F3, "GPIO64_F3"),
  223. PINCTRL_PIN(DB8500_PIN_F1, "GPIO65_F1"),
  224. PINCTRL_PIN(DB8500_PIN_G3, "GPIO66_G3"),
  225. PINCTRL_PIN(DB8500_PIN_G2, "GPIO67_G2"),
  226. PINCTRL_PIN(DB8500_PIN_E1, "GPIO68_E1"),
  227. PINCTRL_PIN(DB8500_PIN_E2, "GPIO69_E2"),
  228. PINCTRL_PIN(DB8500_PIN_G5, "GPIO70_G5"),
  229. PINCTRL_PIN(DB8500_PIN_G4, "GPIO71_G4"),
  230. PINCTRL_PIN(DB8500_PIN_H4, "GPIO72_H4"),
  231. PINCTRL_PIN(DB8500_PIN_H3, "GPIO73_H3"),
  232. PINCTRL_PIN(DB8500_PIN_J3, "GPIO74_J3"),
  233. PINCTRL_PIN(DB8500_PIN_H2, "GPIO75_H2"),
  234. PINCTRL_PIN(DB8500_PIN_J2, "GPIO76_J2"),
  235. PINCTRL_PIN(DB8500_PIN_H1, "GPIO77_H1"),
  236. PINCTRL_PIN(DB8500_PIN_F4, "GPIO78_F4"),
  237. PINCTRL_PIN(DB8500_PIN_E3, "GPIO79_E3"),
  238. PINCTRL_PIN(DB8500_PIN_E4, "GPIO80_E4"),
  239. PINCTRL_PIN(DB8500_PIN_D2, "GPIO81_D2"),
  240. PINCTRL_PIN(DB8500_PIN_C1, "GPIO82_C1"),
  241. PINCTRL_PIN(DB8500_PIN_D3, "GPIO83_D3"),
  242. PINCTRL_PIN(DB8500_PIN_C2, "GPIO84_C2"),
  243. PINCTRL_PIN(DB8500_PIN_D5, "GPIO85_D5"),
  244. PINCTRL_PIN(DB8500_PIN_C6, "GPIO86_C6"),
  245. PINCTRL_PIN(DB8500_PIN_B3, "GPIO87_B3"),
  246. PINCTRL_PIN(DB8500_PIN_C4, "GPIO88_C4"),
  247. PINCTRL_PIN(DB8500_PIN_E6, "GPIO89_E6"),
  248. PINCTRL_PIN(DB8500_PIN_A3, "GPIO90_A3"),
  249. PINCTRL_PIN(DB8500_PIN_B6, "GPIO91_B6"),
  250. PINCTRL_PIN(DB8500_PIN_D6, "GPIO92_D6"),
  251. PINCTRL_PIN(DB8500_PIN_B7, "GPIO93_B7"),
  252. PINCTRL_PIN(DB8500_PIN_D7, "GPIO94_D7"),
  253. PINCTRL_PIN(DB8500_PIN_E8, "GPIO95_E8"),
  254. PINCTRL_PIN(DB8500_PIN_D8, "GPIO96_D8"),
  255. PINCTRL_PIN(DB8500_PIN_D9, "GPIO97_D9"),
  256. /* Hole */
  257. PINCTRL_PIN(DB8500_PIN_A5, "GPIO128_A5"),
  258. PINCTRL_PIN(DB8500_PIN_B4, "GPIO129_B4"),
  259. PINCTRL_PIN(DB8500_PIN_C8, "GPIO130_C8"),
  260. PINCTRL_PIN(DB8500_PIN_A12, "GPIO131_A12"),
  261. PINCTRL_PIN(DB8500_PIN_C10, "GPIO132_C10"),
  262. PINCTRL_PIN(DB8500_PIN_B10, "GPIO133_B10"),
  263. PINCTRL_PIN(DB8500_PIN_B9, "GPIO134_B9"),
  264. PINCTRL_PIN(DB8500_PIN_A9, "GPIO135_A9"),
  265. PINCTRL_PIN(DB8500_PIN_C7, "GPIO136_C7"),
  266. PINCTRL_PIN(DB8500_PIN_A7, "GPIO137_A7"),
  267. PINCTRL_PIN(DB8500_PIN_C5, "GPIO138_C5"),
  268. PINCTRL_PIN(DB8500_PIN_C9, "GPIO139_C9"),
  269. PINCTRL_PIN(DB8500_PIN_B11, "GPIO140_B11"),
  270. PINCTRL_PIN(DB8500_PIN_C12, "GPIO141_C12"),
  271. PINCTRL_PIN(DB8500_PIN_C11, "GPIO142_C11"),
  272. PINCTRL_PIN(DB8500_PIN_D12, "GPIO143_D12"),
  273. PINCTRL_PIN(DB8500_PIN_B13, "GPIO144_B13"),
  274. PINCTRL_PIN(DB8500_PIN_C13, "GPIO145_C13"),
  275. PINCTRL_PIN(DB8500_PIN_D13, "GPIO146_D13"),
  276. PINCTRL_PIN(DB8500_PIN_C15, "GPIO147_C15"),
  277. PINCTRL_PIN(DB8500_PIN_B16, "GPIO148_B16"),
  278. PINCTRL_PIN(DB8500_PIN_B14, "GPIO149_B14"),
  279. PINCTRL_PIN(DB8500_PIN_C14, "GPIO150_C14"),
  280. PINCTRL_PIN(DB8500_PIN_D17, "GPIO151_D17"),
  281. PINCTRL_PIN(DB8500_PIN_D16, "GPIO152_D16"),
  282. PINCTRL_PIN(DB8500_PIN_B17, "GPIO153_B17"),
  283. PINCTRL_PIN(DB8500_PIN_C16, "GPIO154_C16"),
  284. PINCTRL_PIN(DB8500_PIN_C19, "GPIO155_C19"),
  285. PINCTRL_PIN(DB8500_PIN_C17, "GPIO156_C17"),
  286. PINCTRL_PIN(DB8500_PIN_A18, "GPIO157_A18"),
  287. PINCTRL_PIN(DB8500_PIN_C18, "GPIO158_C18"),
  288. PINCTRL_PIN(DB8500_PIN_B19, "GPIO159_B19"),
  289. PINCTRL_PIN(DB8500_PIN_B20, "GPIO160_B20"),
  290. PINCTRL_PIN(DB8500_PIN_D21, "GPIO161_D21"),
  291. PINCTRL_PIN(DB8500_PIN_D20, "GPIO162_D20"),
  292. PINCTRL_PIN(DB8500_PIN_C20, "GPIO163_C20"),
  293. PINCTRL_PIN(DB8500_PIN_B21, "GPIO164_B21"),
  294. PINCTRL_PIN(DB8500_PIN_C21, "GPIO165_C21"),
  295. PINCTRL_PIN(DB8500_PIN_A22, "GPIO166_A22"),
  296. PINCTRL_PIN(DB8500_PIN_B24, "GPIO167_B24"),
  297. PINCTRL_PIN(DB8500_PIN_C22, "GPIO168_C22"),
  298. PINCTRL_PIN(DB8500_PIN_D22, "GPIO169_D22"),
  299. PINCTRL_PIN(DB8500_PIN_C23, "GPIO170_C23"),
  300. PINCTRL_PIN(DB8500_PIN_D23, "GPIO171_D23"),
  301. /* Hole */
  302. PINCTRL_PIN(DB8500_PIN_AJ27, "GPIO192_AJ27"),
  303. PINCTRL_PIN(DB8500_PIN_AH27, "GPIO193_AH27"),
  304. PINCTRL_PIN(DB8500_PIN_AF27, "GPIO194_AF27"),
  305. PINCTRL_PIN(DB8500_PIN_AG28, "GPIO195_AG28"),
  306. PINCTRL_PIN(DB8500_PIN_AG26, "GPIO196_AG26"),
  307. PINCTRL_PIN(DB8500_PIN_AH24, "GPIO197_AH24"),
  308. PINCTRL_PIN(DB8500_PIN_AG25, "GPIO198_AG25"),
  309. PINCTRL_PIN(DB8500_PIN_AH23, "GPIO199_AH23"),
  310. PINCTRL_PIN(DB8500_PIN_AH26, "GPIO200_AH26"),
  311. PINCTRL_PIN(DB8500_PIN_AF24, "GPIO201_AF24"),
  312. PINCTRL_PIN(DB8500_PIN_AF25, "GPIO202_AF25"),
  313. PINCTRL_PIN(DB8500_PIN_AE23, "GPIO203_AE23"),
  314. PINCTRL_PIN(DB8500_PIN_AF23, "GPIO204_AF23"),
  315. PINCTRL_PIN(DB8500_PIN_AG23, "GPIO205_AG23"),
  316. PINCTRL_PIN(DB8500_PIN_AG24, "GPIO206_AG24"),
  317. PINCTRL_PIN(DB8500_PIN_AJ23, "GPIO207_AJ23"),
  318. PINCTRL_PIN(DB8500_PIN_AH16, "GPIO208_AH16"),
  319. PINCTRL_PIN(DB8500_PIN_AG15, "GPIO209_AG15"),
  320. PINCTRL_PIN(DB8500_PIN_AJ15, "GPIO210_AJ15"),
  321. PINCTRL_PIN(DB8500_PIN_AG14, "GPIO211_AG14"),
  322. PINCTRL_PIN(DB8500_PIN_AF13, "GPIO212_AF13"),
  323. PINCTRL_PIN(DB8500_PIN_AG13, "GPIO213_AG13"),
  324. PINCTRL_PIN(DB8500_PIN_AH15, "GPIO214_AH15"),
  325. PINCTRL_PIN(DB8500_PIN_AH13, "GPIO215_AH13"),
  326. PINCTRL_PIN(DB8500_PIN_AG12, "GPIO216_AG12"),
  327. PINCTRL_PIN(DB8500_PIN_AH12, "GPIO217_AH12"),
  328. PINCTRL_PIN(DB8500_PIN_AH11, "GPIO218_AH11"),
  329. PINCTRL_PIN(DB8500_PIN_AG10, "GPIO219_AG10"),
  330. PINCTRL_PIN(DB8500_PIN_AH10, "GPIO220_AH10"),
  331. PINCTRL_PIN(DB8500_PIN_AJ11, "GPIO221_AJ11"),
  332. PINCTRL_PIN(DB8500_PIN_AJ9, "GPIO222_AJ9"),
  333. PINCTRL_PIN(DB8500_PIN_AH9, "GPIO223_AH9"),
  334. PINCTRL_PIN(DB8500_PIN_AG9, "GPIO224_AG9"),
  335. PINCTRL_PIN(DB8500_PIN_AG8, "GPIO225_AG8"),
  336. PINCTRL_PIN(DB8500_PIN_AF8, "GPIO226_AF8"),
  337. PINCTRL_PIN(DB8500_PIN_AH7, "GPIO227_AH7"),
  338. PINCTRL_PIN(DB8500_PIN_AJ6, "GPIO228_AJ6"),
  339. PINCTRL_PIN(DB8500_PIN_AG7, "GPIO229_AG7"),
  340. PINCTRL_PIN(DB8500_PIN_AF7, "GPIO230_AF7"),
  341. /* Hole */
  342. PINCTRL_PIN(DB8500_PIN_AF28, "GPIO256_AF28"),
  343. PINCTRL_PIN(DB8500_PIN_AE29, "GPIO257_AE29"),
  344. PINCTRL_PIN(DB8500_PIN_AD29, "GPIO258_AD29"),
  345. PINCTRL_PIN(DB8500_PIN_AC29, "GPIO259_AC29"),
  346. PINCTRL_PIN(DB8500_PIN_AD28, "GPIO260_AD28"),
  347. PINCTRL_PIN(DB8500_PIN_AD26, "GPIO261_AD26"),
  348. PINCTRL_PIN(DB8500_PIN_AE26, "GPIO262_AE26"),
  349. PINCTRL_PIN(DB8500_PIN_AG29, "GPIO263_AG29"),
  350. PINCTRL_PIN(DB8500_PIN_AE27, "GPIO264_AE27"),
  351. PINCTRL_PIN(DB8500_PIN_AD27, "GPIO265_AD27"),
  352. PINCTRL_PIN(DB8500_PIN_AC28, "GPIO266_AC28"),
  353. PINCTRL_PIN(DB8500_PIN_AC27, "GPIO267_AC27"),
  354. };
  355. /*
  356. * Read the pin group names like this:
  357. * u0_a_1 = first groups of pins for uart0 on alt function a
  358. * i2c2_b_2 = second group of pins for i2c2 on alt function b
  359. *
  360. * The groups are arranged as sets per altfunction column, so we can
  361. * mux in one group at a time by selecting the same altfunction for them
  362. * all. When functions require pins on different altfunctions, you need
  363. * to combine several groups.
  364. */
  365. /* Altfunction A column */
  366. static const unsigned u0_a_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3,
  367. DB8500_PIN_AH4, DB8500_PIN_AH3 };
  368. static const unsigned u1rxtx_a_1_pins[] = { DB8500_PIN_AH6, DB8500_PIN_AG6 };
  369. static const unsigned u1ctsrts_a_1_pins[] = { DB8500_PIN_AF6, DB8500_PIN_AG5 };
  370. /* Image processor I2C line, this is driven by image processor firmware */
  371. static const unsigned ipi2c_a_1_pins[] = { DB8500_PIN_AD5, DB8500_PIN_AE4 };
  372. static const unsigned ipi2c_a_2_pins[] = { DB8500_PIN_AF5, DB8500_PIN_AG4 };
  373. /* MSP0 can only be on these pins, but TXD and RXD can be flipped */
  374. static const unsigned msp0txrx_a_1_pins[] = { DB8500_PIN_AC4, DB8500_PIN_AC3 };
  375. static const unsigned msp0tfstck_a_1_pins[] = { DB8500_PIN_AF3, DB8500_PIN_AE3 };
  376. static const unsigned msp0rfsrck_a_1_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
  377. /* Basic pins of the MMC/SD card 0 interface */
  378. static const unsigned mc0_a_1_pins[] = { DB8500_PIN_AC2, /* MC0_CMDDIR */
  379. DB8500_PIN_AC1, /* MC0_DAT0DIR */
  380. DB8500_PIN_AB4, /* MC0_DAT2DIR */
  381. DB8500_PIN_AA3, /* MC0_FBCLK */
  382. DB8500_PIN_AA4, /* MC0_CLK */
  383. DB8500_PIN_AB2, /* MC0_CMD */
  384. DB8500_PIN_Y4, /* MC0_DAT0 */
  385. DB8500_PIN_Y2, /* MC0_DAT1 */
  386. DB8500_PIN_AA2, /* MC0_DAT2 */
  387. DB8500_PIN_AA1 /* MC0_DAT3 */
  388. };
  389. /* MMC/SD card 0 interface without CMD/DAT0/DAT2 direction control */
  390. static const unsigned mc0_a_2_pins[] = { DB8500_PIN_AA3, /* MC0_FBCLK */
  391. DB8500_PIN_AA4, /* MC0_CLK */
  392. DB8500_PIN_AB2, /* MC0_CMD */
  393. DB8500_PIN_Y4, /* MC0_DAT0 */
  394. DB8500_PIN_Y2, /* MC0_DAT1 */
  395. DB8500_PIN_AA2, /* MC0_DAT2 */
  396. DB8500_PIN_AA1 /* MC0_DAT3 */
  397. };
  398. /* Often only 4 bits are used, then these are not needed (only used for MMC) */
  399. static const unsigned mc0_dat47_a_1_pins[] = { DB8500_PIN_W2, /* MC0_DAT4 */
  400. DB8500_PIN_W3, /* MC0_DAT5 */
  401. DB8500_PIN_V3, /* MC0_DAT6 */
  402. DB8500_PIN_V2 /* MC0_DAT7 */
  403. };
  404. static const unsigned mc0dat31dir_a_1_pins[] = { DB8500_PIN_AB3 }; /* MC0_DAT31DIR */
  405. /* MSP1 can only be on these pins, but TXD and RXD can be flipped */
  406. static const unsigned msp1txrx_a_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AG2 };
  407. static const unsigned msp1_a_1_pins[] = { DB8500_PIN_AE1, DB8500_PIN_AE2 };
  408. /* LCD interface */
  409. static const unsigned lcdb_a_1_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
  410. DB8500_PIN_G3, DB8500_PIN_G2 };
  411. static const unsigned lcdvsi0_a_1_pins[] = { DB8500_PIN_E1 };
  412. static const unsigned lcdvsi1_a_1_pins[] = { DB8500_PIN_E2 };
  413. static const unsigned lcd_d0_d7_a_1_pins[] = {
  414. DB8500_PIN_G5, DB8500_PIN_G4, DB8500_PIN_H4, DB8500_PIN_H3,
  415. DB8500_PIN_J3, DB8500_PIN_H2, DB8500_PIN_J2, DB8500_PIN_H1 };
  416. /* D8 thru D11 often used as TVOUT lines */
  417. static const unsigned lcd_d8_d11_a_1_pins[] = { DB8500_PIN_F4,
  418. DB8500_PIN_E3, DB8500_PIN_E4, DB8500_PIN_D2 };
  419. static const unsigned lcd_d12_d15_a_1_pins[] = {
  420. DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5 };
  421. static const unsigned lcd_d12_d23_a_1_pins[] = {
  422. DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5,
  423. DB8500_PIN_C6, DB8500_PIN_B3, DB8500_PIN_C4, DB8500_PIN_E6,
  424. DB8500_PIN_A3, DB8500_PIN_B6, DB8500_PIN_D6, DB8500_PIN_B7 };
  425. static const unsigned kp_a_1_pins[] = { DB8500_PIN_D7, DB8500_PIN_E8,
  426. DB8500_PIN_D8, DB8500_PIN_D9 };
  427. static const unsigned kpskaskb_a_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16 };
  428. static const unsigned kp_a_2_pins[] = {
  429. DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
  430. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
  431. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  432. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  433. /* MC2 has 8 data lines and no direction control, so only for (e)MMC */
  434. static const unsigned mc2_a_1_pins[] = { DB8500_PIN_A5, DB8500_PIN_B4,
  435. DB8500_PIN_C8, DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10,
  436. DB8500_PIN_B9, DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7,
  437. DB8500_PIN_C5 };
  438. /* MC2 without the feedback clock */
  439. static const unsigned mc2_a_2_pins[] = { DB8500_PIN_A5, DB8500_PIN_B4,
  440. DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10, DB8500_PIN_B9,
  441. DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7, DB8500_PIN_C5 };
  442. static const unsigned ssp1_a_1_pins[] = { DB8500_PIN_C9, DB8500_PIN_B11,
  443. DB8500_PIN_C12, DB8500_PIN_C11 };
  444. static const unsigned ssp0_a_1_pins[] = { DB8500_PIN_D12, DB8500_PIN_B13,
  445. DB8500_PIN_C13, DB8500_PIN_D13 };
  446. static const unsigned i2c0_a_1_pins[] = { DB8500_PIN_C15, DB8500_PIN_B16 };
  447. /*
  448. * Image processor GPIO pins are named "ipgpio" and have their own
  449. * numberspace
  450. */
  451. static const unsigned ipgpio0_a_1_pins[] = { DB8500_PIN_B14 };
  452. static const unsigned ipgpio1_a_1_pins[] = { DB8500_PIN_C14 };
  453. /* Three modem pins named RF_PURn, MODEM_STATE and MODEM_PWREN */
  454. static const unsigned modem_a_1_pins[] = { DB8500_PIN_D22, DB8500_PIN_C23,
  455. DB8500_PIN_D23 };
  456. /*
  457. * This MSP cannot switch RX and TX, SCK in a separate group since this
  458. * seems to be optional.
  459. */
  460. static const unsigned msp2sck_a_1_pins[] = { DB8500_PIN_AJ27 };
  461. static const unsigned msp2_a_1_pins[] = { DB8500_PIN_AH27, DB8500_PIN_AF27,
  462. DB8500_PIN_AG28, DB8500_PIN_AG26 };
  463. static const unsigned mc4_a_1_pins[] = { DB8500_PIN_AH24, DB8500_PIN_AG25,
  464. DB8500_PIN_AH23, DB8500_PIN_AH26, DB8500_PIN_AF24, DB8500_PIN_AF25,
  465. DB8500_PIN_AE23, DB8500_PIN_AF23, DB8500_PIN_AG23, DB8500_PIN_AG24,
  466. DB8500_PIN_AJ23 };
  467. /* MC1 has only 4 data pins, designed for SD or SDIO exclusively */
  468. static const unsigned mc1_a_1_pins[] = { DB8500_PIN_AH16, DB8500_PIN_AG15,
  469. DB8500_PIN_AJ15, DB8500_PIN_AG14, DB8500_PIN_AF13, DB8500_PIN_AG13,
  470. DB8500_PIN_AH15 };
  471. static const unsigned mc1_a_2_pins[] = { DB8500_PIN_AH16, DB8500_PIN_AJ15,
  472. DB8500_PIN_AG14, DB8500_PIN_AF13, DB8500_PIN_AG13, DB8500_PIN_AH15 };
  473. static const unsigned mc1dir_a_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
  474. DB8500_PIN_AH12, DB8500_PIN_AH11 };
  475. static const unsigned hsir_a_1_pins[] = { DB8500_PIN_AG10, DB8500_PIN_AH10,
  476. DB8500_PIN_AJ11 };
  477. static const unsigned hsit_a_1_pins[] = { DB8500_PIN_AJ9, DB8500_PIN_AH9,
  478. DB8500_PIN_AG9, DB8500_PIN_AG8, DB8500_PIN_AF8 };
  479. static const unsigned hsit_a_2_pins[] = { DB8500_PIN_AJ9, DB8500_PIN_AH9,
  480. DB8500_PIN_AG9, DB8500_PIN_AG8 };
  481. static const unsigned clkout1_a_1_pins[] = { DB8500_PIN_AH7 };
  482. static const unsigned clkout1_a_2_pins[] = { DB8500_PIN_AG7 };
  483. static const unsigned clkout2_a_1_pins[] = { DB8500_PIN_AJ6 };
  484. static const unsigned clkout2_a_2_pins[] = { DB8500_PIN_AF7 };
  485. static const unsigned usb_a_1_pins[] = { DB8500_PIN_AF28, DB8500_PIN_AE29,
  486. DB8500_PIN_AD29, DB8500_PIN_AC29, DB8500_PIN_AD28, DB8500_PIN_AD26,
  487. DB8500_PIN_AE26, DB8500_PIN_AG29, DB8500_PIN_AE27, DB8500_PIN_AD27,
  488. DB8500_PIN_AC28, DB8500_PIN_AC27 };
  489. /* Altfunction B column */
  490. static const unsigned trig_b_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3 };
  491. static const unsigned i2c4_b_1_pins[] = { DB8500_PIN_AH6, DB8500_PIN_AG6 };
  492. static const unsigned i2c1_b_1_pins[] = { DB8500_PIN_AF6, DB8500_PIN_AG5 };
  493. static const unsigned i2c2_b_1_pins[] = { DB8500_PIN_AD5, DB8500_PIN_AE4 };
  494. static const unsigned i2c2_b_2_pins[] = { DB8500_PIN_AF5, DB8500_PIN_AG4 };
  495. static const unsigned msp0txrx_b_1_pins[] = { DB8500_PIN_AC4, DB8500_PIN_AC3 };
  496. static const unsigned i2c1_b_2_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
  497. /* Just RX and TX for UART2 */
  498. static const unsigned u2rxtx_b_1_pins[] = { DB8500_PIN_AC2, DB8500_PIN_AC1 };
  499. static const unsigned uartmodtx_b_1_pins[] = { DB8500_PIN_AB4 };
  500. static const unsigned msp0sck_b_1_pins[] = { DB8500_PIN_AB3 };
  501. static const unsigned uartmodrx_b_1_pins[] = { DB8500_PIN_AA3 };
  502. static const unsigned stmmod_b_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_Y4,
  503. DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
  504. static const unsigned uartmodrx_b_2_pins[] = { DB8500_PIN_AB2 };
  505. static const unsigned spi3_b_1_pins[] = { DB8500_PIN_W2, DB8500_PIN_W3,
  506. DB8500_PIN_V3, DB8500_PIN_V2 };
  507. static const unsigned msp1txrx_b_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AG2 };
  508. static const unsigned kp_b_1_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
  509. DB8500_PIN_G3, DB8500_PIN_G2, DB8500_PIN_E1, DB8500_PIN_E2,
  510. DB8500_PIN_G5, DB8500_PIN_G4, DB8500_PIN_H4, DB8500_PIN_H3,
  511. DB8500_PIN_J3, DB8500_PIN_H2, DB8500_PIN_J2, DB8500_PIN_H1,
  512. DB8500_PIN_F4, DB8500_PIN_E3, DB8500_PIN_E4, DB8500_PIN_D2,
  513. DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5 };
  514. static const unsigned kp_b_2_pins[] = { DB8500_PIN_F3, DB8500_PIN_F1,
  515. DB8500_PIN_G3, DB8500_PIN_G2, DB8500_PIN_F4, DB8500_PIN_E3};
  516. static const unsigned sm_b_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
  517. DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
  518. DB8500_PIN_D6, DB8500_PIN_B7, DB8500_PIN_D7, DB8500_PIN_D8,
  519. DB8500_PIN_D9, DB8500_PIN_A5, DB8500_PIN_B4, DB8500_PIN_C8,
  520. DB8500_PIN_A12, DB8500_PIN_C10, DB8500_PIN_B10, DB8500_PIN_B9,
  521. DB8500_PIN_A9, DB8500_PIN_C7, DB8500_PIN_A7, DB8500_PIN_C5,
  522. DB8500_PIN_C9 };
  523. /* This chip select pin can be "ps0" in alt C so have it separately */
  524. static const unsigned smcs0_b_1_pins[] = { DB8500_PIN_E8 };
  525. /* This chip select pin can be "ps1" in alt C so have it separately */
  526. static const unsigned smcs1_b_1_pins[] = { DB8500_PIN_B14 };
  527. static const unsigned ipgpio7_b_1_pins[] = { DB8500_PIN_B11 };
  528. static const unsigned ipgpio2_b_1_pins[] = { DB8500_PIN_C12 };
  529. static const unsigned ipgpio3_b_1_pins[] = { DB8500_PIN_C11 };
  530. static const unsigned lcdaclk_b_1_pins[] = { DB8500_PIN_C14 };
  531. static const unsigned lcda_b_1_pins[] = { DB8500_PIN_D22,
  532. DB8500_PIN_C23, DB8500_PIN_D23 };
  533. static const unsigned lcd_b_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
  534. DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
  535. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
  536. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  537. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  538. static const unsigned lcd_d16_d23_b_1_pins[] = {
  539. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  540. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  541. static const unsigned ddrtrig_b_1_pins[] = { DB8500_PIN_AJ27 };
  542. static const unsigned pwl_b_1_pins[] = { DB8500_PIN_AF25 };
  543. static const unsigned spi1_b_1_pins[] = { DB8500_PIN_AG15, DB8500_PIN_AF13,
  544. DB8500_PIN_AG13, DB8500_PIN_AH15 };
  545. static const unsigned mc3_b_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
  546. DB8500_PIN_AH12, DB8500_PIN_AH11, DB8500_PIN_AG10, DB8500_PIN_AH10,
  547. DB8500_PIN_AJ11, DB8500_PIN_AJ9, DB8500_PIN_AH9, DB8500_PIN_AG9,
  548. DB8500_PIN_AG8 };
  549. static const unsigned pwl_b_2_pins[] = { DB8500_PIN_AF8 };
  550. static const unsigned pwl_b_3_pins[] = { DB8500_PIN_AG7 };
  551. static const unsigned pwl_b_4_pins[] = { DB8500_PIN_AF7 };
  552. /* Altfunction C column */
  553. static const unsigned ipjtag_c_1_pins[] = { DB8500_PIN_AJ5, DB8500_PIN_AJ3,
  554. DB8500_PIN_AH4, DB8500_PIN_AH3, DB8500_PIN_AH6 };
  555. static const unsigned ipgpio6_c_1_pins[] = { DB8500_PIN_AG6 };
  556. static const unsigned ipgpio0_c_1_pins[] = { DB8500_PIN_AF6 };
  557. static const unsigned ipgpio1_c_1_pins[] = { DB8500_PIN_AG5 };
  558. static const unsigned ipgpio3_c_1_pins[] = { DB8500_PIN_AF5 };
  559. static const unsigned ipgpio2_c_1_pins[] = { DB8500_PIN_AG4 };
  560. static const unsigned slim0_c_1_pins[] = { DB8500_PIN_AD3, DB8500_PIN_AD4 };
  561. /* Optional 4-bit Memory Stick interface */
  562. static const unsigned ms_c_1_pins[] = { DB8500_PIN_AC2, DB8500_PIN_AC1,
  563. DB8500_PIN_AB3, DB8500_PIN_AA3, DB8500_PIN_AA4, DB8500_PIN_AB2,
  564. DB8500_PIN_Y4, DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
  565. static const unsigned iptrigout_c_1_pins[] = { DB8500_PIN_AB4 };
  566. static const unsigned u2rxtx_c_1_pins[] = { DB8500_PIN_W2, DB8500_PIN_W3 };
  567. static const unsigned u2ctsrts_c_1_pins[] = { DB8500_PIN_V3, DB8500_PIN_V2 };
  568. static const unsigned u0_c_1_pins[] = { DB8500_PIN_AF2, DB8500_PIN_AE1,
  569. DB8500_PIN_AE2, DB8500_PIN_AG2 };
  570. static const unsigned ipgpio4_c_1_pins[] = { DB8500_PIN_F3 };
  571. static const unsigned ipgpio5_c_1_pins[] = { DB8500_PIN_F1 };
  572. static const unsigned ipgpio6_c_2_pins[] = { DB8500_PIN_G3 };
  573. static const unsigned ipgpio7_c_1_pins[] = { DB8500_PIN_G2 };
  574. static const unsigned smcleale_c_1_pins[] = { DB8500_PIN_E1, DB8500_PIN_E2 };
  575. static const unsigned stmape_c_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
  576. DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3 };
  577. static const unsigned u2rxtx_c_2_pins[] = { DB8500_PIN_H2, DB8500_PIN_J2 };
  578. static const unsigned ipgpio2_c_2_pins[] = { DB8500_PIN_F4 };
  579. static const unsigned ipgpio3_c_2_pins[] = { DB8500_PIN_E3 };
  580. static const unsigned ipgpio4_c_2_pins[] = { DB8500_PIN_E4 };
  581. static const unsigned ipgpio5_c_2_pins[] = { DB8500_PIN_D2 };
  582. static const unsigned mc5_c_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
  583. DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
  584. DB8500_PIN_D6, DB8500_PIN_B7, DB8500_PIN_D7, DB8500_PIN_D8,
  585. DB8500_PIN_D9 };
  586. static const unsigned mc2rstn_c_1_pins[] = { DB8500_PIN_C8 };
  587. static const unsigned kp_c_1_pins[] = { DB8500_PIN_C9, DB8500_PIN_B11,
  588. DB8500_PIN_C12, DB8500_PIN_C11, DB8500_PIN_D17, DB8500_PIN_D16,
  589. DB8500_PIN_C23, DB8500_PIN_D23 };
  590. static const unsigned smps0_c_1_pins[] = { DB8500_PIN_E8 };
  591. static const unsigned smps1_c_1_pins[] = { DB8500_PIN_B14 };
  592. static const unsigned u2rxtx_c_3_pins[] = { DB8500_PIN_B17, DB8500_PIN_C16 };
  593. static const unsigned stmape_c_2_pins[] = { DB8500_PIN_C19, DB8500_PIN_C17,
  594. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19 };
  595. static const unsigned uartmodrx_c_1_pins[] = { DB8500_PIN_D21 };
  596. static const unsigned uartmodtx_c_1_pins[] = { DB8500_PIN_D20 };
  597. static const unsigned stmmod_c_1_pins[] = { DB8500_PIN_C20, DB8500_PIN_B21,
  598. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24 };
  599. static const unsigned usbsim_c_1_pins[] = { DB8500_PIN_D22 };
  600. static const unsigned mc4rstn_c_1_pins[] = { DB8500_PIN_AF25 };
  601. static const unsigned clkout1_c_1_pins[] = { DB8500_PIN_AH13 };
  602. static const unsigned clkout2_c_1_pins[] = { DB8500_PIN_AH12 };
  603. static const unsigned i2c3_c_1_pins[] = { DB8500_PIN_AG12, DB8500_PIN_AH11 };
  604. static const unsigned spi0_c_1_pins[] = { DB8500_PIN_AH10, DB8500_PIN_AH9,
  605. DB8500_PIN_AG9, DB8500_PIN_AG8 };
  606. static const unsigned usbsim_c_2_pins[] = { DB8500_PIN_AF8 };
  607. static const unsigned i2c3_c_2_pins[] = { DB8500_PIN_AG7, DB8500_PIN_AF7 };
  608. /* Other C1 column */
  609. static const unsigned u2rx_oc1_1_pins[] = { DB8500_PIN_AB2 };
  610. static const unsigned stmape_oc1_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_Y4,
  611. DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
  612. static const unsigned remap0_oc1_1_pins[] = { DB8500_PIN_E1 };
  613. static const unsigned remap1_oc1_1_pins[] = { DB8500_PIN_E2 };
  614. static const unsigned ptma9_oc1_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
  615. DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
  616. DB8500_PIN_J2, DB8500_PIN_H1 };
  617. static const unsigned kp_oc1_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
  618. DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
  619. DB8500_PIN_D6, DB8500_PIN_B7 };
  620. static const unsigned rf_oc1_1_pins[] = { DB8500_PIN_D8, DB8500_PIN_D9 };
  621. static const unsigned hxclk_oc1_1_pins[] = { DB8500_PIN_D16 };
  622. static const unsigned uartmodrx_oc1_1_pins[] = { DB8500_PIN_B17 };
  623. static const unsigned uartmodtx_oc1_1_pins[] = { DB8500_PIN_C16 };
  624. static const unsigned stmmod_oc1_1_pins[] = { DB8500_PIN_C19, DB8500_PIN_C17,
  625. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19 };
  626. static const unsigned hxgpio_oc1_1_pins[] = { DB8500_PIN_D21, DB8500_PIN_D20,
  627. DB8500_PIN_C20, DB8500_PIN_B21, DB8500_PIN_C21, DB8500_PIN_A22,
  628. DB8500_PIN_B24, DB8500_PIN_C22 };
  629. static const unsigned rf_oc1_2_pins[] = { DB8500_PIN_C23, DB8500_PIN_D23 };
  630. static const unsigned spi2_oc1_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
  631. DB8500_PIN_AH12, DB8500_PIN_AH11 };
  632. static const unsigned spi2_oc1_2_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AH12,
  633. DB8500_PIN_AH11 };
  634. /* Other C2 column */
  635. static const unsigned sbag_oc2_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_AB2,
  636. DB8500_PIN_Y4, DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
  637. static const unsigned etmr4_oc2_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
  638. DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
  639. DB8500_PIN_J2, DB8500_PIN_H1 };
  640. static const unsigned ptma9_oc2_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
  641. DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
  642. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
  643. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  644. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  645. /* Other C3 column */
  646. static const unsigned stmmod_oc3_1_pins[] = { DB8500_PIN_AB2, DB8500_PIN_W2,
  647. DB8500_PIN_W3, DB8500_PIN_V3, DB8500_PIN_V2 };
  648. static const unsigned stmmod_oc3_2_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
  649. DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3 };
  650. static const unsigned uartmodrx_oc3_1_pins[] = { DB8500_PIN_H2 };
  651. static const unsigned uartmodtx_oc3_1_pins[] = { DB8500_PIN_J2 };
  652. static const unsigned etmr4_oc3_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
  653. DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
  654. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
  655. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  656. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  657. /* Other C4 column */
  658. static const unsigned sbag_oc4_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
  659. DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H1 };
  660. static const unsigned hwobs_oc4_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
  661. DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
  662. DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
  663. DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
  664. DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
  665. static const struct nmk_pingroup nmk_db8500_groups[] = {
  666. /* Altfunction A column */
  667. NMK_PIN_GROUP(u0_a_1, NMK_GPIO_ALT_A),
  668. NMK_PIN_GROUP(u1rxtx_a_1, NMK_GPIO_ALT_A),
  669. NMK_PIN_GROUP(u1ctsrts_a_1, NMK_GPIO_ALT_A),
  670. NMK_PIN_GROUP(ipi2c_a_1, NMK_GPIO_ALT_A),
  671. NMK_PIN_GROUP(ipi2c_a_2, NMK_GPIO_ALT_A),
  672. NMK_PIN_GROUP(msp0txrx_a_1, NMK_GPIO_ALT_A),
  673. NMK_PIN_GROUP(msp0tfstck_a_1, NMK_GPIO_ALT_A),
  674. NMK_PIN_GROUP(msp0rfsrck_a_1, NMK_GPIO_ALT_A),
  675. NMK_PIN_GROUP(mc0_a_1, NMK_GPIO_ALT_A),
  676. NMK_PIN_GROUP(mc0_a_2, NMK_GPIO_ALT_A),
  677. NMK_PIN_GROUP(mc0_dat47_a_1, NMK_GPIO_ALT_A),
  678. NMK_PIN_GROUP(mc0dat31dir_a_1, NMK_GPIO_ALT_A),
  679. NMK_PIN_GROUP(msp1txrx_a_1, NMK_GPIO_ALT_A),
  680. NMK_PIN_GROUP(msp1_a_1, NMK_GPIO_ALT_A),
  681. NMK_PIN_GROUP(lcdb_a_1, NMK_GPIO_ALT_A),
  682. NMK_PIN_GROUP(lcdvsi0_a_1, NMK_GPIO_ALT_A),
  683. NMK_PIN_GROUP(lcdvsi1_a_1, NMK_GPIO_ALT_A),
  684. NMK_PIN_GROUP(lcd_d0_d7_a_1, NMK_GPIO_ALT_A),
  685. NMK_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A),
  686. NMK_PIN_GROUP(lcd_d12_d15_a_1, NMK_GPIO_ALT_A),
  687. NMK_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A),
  688. NMK_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A),
  689. NMK_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A),
  690. NMK_PIN_GROUP(mc2_a_1, NMK_GPIO_ALT_A),
  691. NMK_PIN_GROUP(mc2_a_2, NMK_GPIO_ALT_A),
  692. NMK_PIN_GROUP(ssp1_a_1, NMK_GPIO_ALT_A),
  693. NMK_PIN_GROUP(ssp0_a_1, NMK_GPIO_ALT_A),
  694. NMK_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A),
  695. NMK_PIN_GROUP(ipgpio0_a_1, NMK_GPIO_ALT_A),
  696. NMK_PIN_GROUP(ipgpio1_a_1, NMK_GPIO_ALT_A),
  697. NMK_PIN_GROUP(modem_a_1, NMK_GPIO_ALT_A),
  698. NMK_PIN_GROUP(kp_a_2, NMK_GPIO_ALT_A),
  699. NMK_PIN_GROUP(msp2sck_a_1, NMK_GPIO_ALT_A),
  700. NMK_PIN_GROUP(msp2_a_1, NMK_GPIO_ALT_A),
  701. NMK_PIN_GROUP(mc4_a_1, NMK_GPIO_ALT_A),
  702. NMK_PIN_GROUP(mc1_a_1, NMK_GPIO_ALT_A),
  703. NMK_PIN_GROUP(mc1_a_2, NMK_GPIO_ALT_A),
  704. NMK_PIN_GROUP(mc1dir_a_1, NMK_GPIO_ALT_A),
  705. NMK_PIN_GROUP(hsir_a_1, NMK_GPIO_ALT_A),
  706. NMK_PIN_GROUP(hsit_a_1, NMK_GPIO_ALT_A),
  707. NMK_PIN_GROUP(hsit_a_2, NMK_GPIO_ALT_A),
  708. NMK_PIN_GROUP(clkout1_a_1, NMK_GPIO_ALT_A),
  709. NMK_PIN_GROUP(clkout1_a_2, NMK_GPIO_ALT_A),
  710. NMK_PIN_GROUP(clkout2_a_1, NMK_GPIO_ALT_A),
  711. NMK_PIN_GROUP(clkout2_a_2, NMK_GPIO_ALT_A),
  712. NMK_PIN_GROUP(usb_a_1, NMK_GPIO_ALT_A),
  713. /* Altfunction B column */
  714. NMK_PIN_GROUP(trig_b_1, NMK_GPIO_ALT_B),
  715. NMK_PIN_GROUP(i2c4_b_1, NMK_GPIO_ALT_B),
  716. NMK_PIN_GROUP(i2c1_b_1, NMK_GPIO_ALT_B),
  717. NMK_PIN_GROUP(i2c2_b_1, NMK_GPIO_ALT_B),
  718. NMK_PIN_GROUP(i2c2_b_2, NMK_GPIO_ALT_B),
  719. NMK_PIN_GROUP(msp0txrx_b_1, NMK_GPIO_ALT_B),
  720. NMK_PIN_GROUP(i2c1_b_2, NMK_GPIO_ALT_B),
  721. NMK_PIN_GROUP(u2rxtx_b_1, NMK_GPIO_ALT_B),
  722. NMK_PIN_GROUP(uartmodtx_b_1, NMK_GPIO_ALT_B),
  723. NMK_PIN_GROUP(msp0sck_b_1, NMK_GPIO_ALT_B),
  724. NMK_PIN_GROUP(uartmodrx_b_1, NMK_GPIO_ALT_B),
  725. NMK_PIN_GROUP(stmmod_b_1, NMK_GPIO_ALT_B),
  726. NMK_PIN_GROUP(uartmodrx_b_2, NMK_GPIO_ALT_B),
  727. NMK_PIN_GROUP(spi3_b_1, NMK_GPIO_ALT_B),
  728. NMK_PIN_GROUP(msp1txrx_b_1, NMK_GPIO_ALT_B),
  729. NMK_PIN_GROUP(kp_b_1, NMK_GPIO_ALT_B),
  730. NMK_PIN_GROUP(kp_b_2, NMK_GPIO_ALT_B),
  731. NMK_PIN_GROUP(sm_b_1, NMK_GPIO_ALT_B),
  732. NMK_PIN_GROUP(smcs0_b_1, NMK_GPIO_ALT_B),
  733. NMK_PIN_GROUP(smcs1_b_1, NMK_GPIO_ALT_B),
  734. NMK_PIN_GROUP(ipgpio7_b_1, NMK_GPIO_ALT_B),
  735. NMK_PIN_GROUP(ipgpio2_b_1, NMK_GPIO_ALT_B),
  736. NMK_PIN_GROUP(ipgpio3_b_1, NMK_GPIO_ALT_B),
  737. NMK_PIN_GROUP(lcdaclk_b_1, NMK_GPIO_ALT_B),
  738. NMK_PIN_GROUP(lcda_b_1, NMK_GPIO_ALT_B),
  739. NMK_PIN_GROUP(lcd_b_1, NMK_GPIO_ALT_B),
  740. NMK_PIN_GROUP(lcd_d16_d23_b_1, NMK_GPIO_ALT_B),
  741. NMK_PIN_GROUP(ddrtrig_b_1, NMK_GPIO_ALT_B),
  742. NMK_PIN_GROUP(pwl_b_1, NMK_GPIO_ALT_B),
  743. NMK_PIN_GROUP(spi1_b_1, NMK_GPIO_ALT_B),
  744. NMK_PIN_GROUP(mc3_b_1, NMK_GPIO_ALT_B),
  745. NMK_PIN_GROUP(pwl_b_2, NMK_GPIO_ALT_B),
  746. NMK_PIN_GROUP(pwl_b_3, NMK_GPIO_ALT_B),
  747. NMK_PIN_GROUP(pwl_b_4, NMK_GPIO_ALT_B),
  748. /* Altfunction C column */
  749. NMK_PIN_GROUP(ipjtag_c_1, NMK_GPIO_ALT_C),
  750. NMK_PIN_GROUP(ipgpio6_c_1, NMK_GPIO_ALT_C),
  751. NMK_PIN_GROUP(ipgpio0_c_1, NMK_GPIO_ALT_C),
  752. NMK_PIN_GROUP(ipgpio1_c_1, NMK_GPIO_ALT_C),
  753. NMK_PIN_GROUP(ipgpio3_c_1, NMK_GPIO_ALT_C),
  754. NMK_PIN_GROUP(ipgpio2_c_1, NMK_GPIO_ALT_C),
  755. NMK_PIN_GROUP(slim0_c_1, NMK_GPIO_ALT_C),
  756. NMK_PIN_GROUP(ms_c_1, NMK_GPIO_ALT_C),
  757. NMK_PIN_GROUP(iptrigout_c_1, NMK_GPIO_ALT_C),
  758. NMK_PIN_GROUP(u2rxtx_c_1, NMK_GPIO_ALT_C),
  759. NMK_PIN_GROUP(u2ctsrts_c_1, NMK_GPIO_ALT_C),
  760. NMK_PIN_GROUP(u0_c_1, NMK_GPIO_ALT_C),
  761. NMK_PIN_GROUP(ipgpio4_c_1, NMK_GPIO_ALT_C),
  762. NMK_PIN_GROUP(ipgpio5_c_1, NMK_GPIO_ALT_C),
  763. NMK_PIN_GROUP(ipgpio6_c_2, NMK_GPIO_ALT_C),
  764. NMK_PIN_GROUP(ipgpio7_c_1, NMK_GPIO_ALT_C),
  765. NMK_PIN_GROUP(smcleale_c_1, NMK_GPIO_ALT_C),
  766. NMK_PIN_GROUP(stmape_c_1, NMK_GPIO_ALT_C),
  767. NMK_PIN_GROUP(u2rxtx_c_2, NMK_GPIO_ALT_C),
  768. NMK_PIN_GROUP(ipgpio2_c_2, NMK_GPIO_ALT_C),
  769. NMK_PIN_GROUP(ipgpio3_c_2, NMK_GPIO_ALT_C),
  770. NMK_PIN_GROUP(ipgpio4_c_2, NMK_GPIO_ALT_C),
  771. NMK_PIN_GROUP(ipgpio5_c_2, NMK_GPIO_ALT_C),
  772. NMK_PIN_GROUP(mc5_c_1, NMK_GPIO_ALT_C),
  773. NMK_PIN_GROUP(mc2rstn_c_1, NMK_GPIO_ALT_C),
  774. NMK_PIN_GROUP(kp_c_1, NMK_GPIO_ALT_C),
  775. NMK_PIN_GROUP(smps0_c_1, NMK_GPIO_ALT_C),
  776. NMK_PIN_GROUP(smps1_c_1, NMK_GPIO_ALT_C),
  777. NMK_PIN_GROUP(u2rxtx_c_3, NMK_GPIO_ALT_C),
  778. NMK_PIN_GROUP(stmape_c_2, NMK_GPIO_ALT_C),
  779. NMK_PIN_GROUP(uartmodrx_c_1, NMK_GPIO_ALT_C),
  780. NMK_PIN_GROUP(uartmodtx_c_1, NMK_GPIO_ALT_C),
  781. NMK_PIN_GROUP(stmmod_c_1, NMK_GPIO_ALT_C),
  782. NMK_PIN_GROUP(usbsim_c_1, NMK_GPIO_ALT_C),
  783. NMK_PIN_GROUP(mc4rstn_c_1, NMK_GPIO_ALT_C),
  784. NMK_PIN_GROUP(clkout1_c_1, NMK_GPIO_ALT_C),
  785. NMK_PIN_GROUP(clkout2_c_1, NMK_GPIO_ALT_C),
  786. NMK_PIN_GROUP(i2c3_c_1, NMK_GPIO_ALT_C),
  787. NMK_PIN_GROUP(spi0_c_1, NMK_GPIO_ALT_C),
  788. NMK_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C),
  789. NMK_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C),
  790. /* Other alt C1 column */
  791. NMK_PIN_GROUP(u2rx_oc1_1, NMK_GPIO_ALT_C1),
  792. NMK_PIN_GROUP(stmape_oc1_1, NMK_GPIO_ALT_C1),
  793. NMK_PIN_GROUP(remap0_oc1_1, NMK_GPIO_ALT_C1),
  794. NMK_PIN_GROUP(remap1_oc1_1, NMK_GPIO_ALT_C1),
  795. NMK_PIN_GROUP(ptma9_oc1_1, NMK_GPIO_ALT_C1),
  796. NMK_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1),
  797. NMK_PIN_GROUP(rf_oc1_1, NMK_GPIO_ALT_C1),
  798. NMK_PIN_GROUP(hxclk_oc1_1, NMK_GPIO_ALT_C1),
  799. NMK_PIN_GROUP(uartmodrx_oc1_1, NMK_GPIO_ALT_C1),
  800. NMK_PIN_GROUP(uartmodtx_oc1_1, NMK_GPIO_ALT_C1),
  801. NMK_PIN_GROUP(stmmod_oc1_1, NMK_GPIO_ALT_C1),
  802. NMK_PIN_GROUP(hxgpio_oc1_1, NMK_GPIO_ALT_C1),
  803. NMK_PIN_GROUP(rf_oc1_2, NMK_GPIO_ALT_C1),
  804. NMK_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1),
  805. NMK_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1),
  806. /* Other alt C2 column */
  807. NMK_PIN_GROUP(sbag_oc2_1, NMK_GPIO_ALT_C2),
  808. NMK_PIN_GROUP(etmr4_oc2_1, NMK_GPIO_ALT_C2),
  809. NMK_PIN_GROUP(ptma9_oc2_1, NMK_GPIO_ALT_C2),
  810. /* Other alt C3 column */
  811. NMK_PIN_GROUP(stmmod_oc3_1, NMK_GPIO_ALT_C3),
  812. NMK_PIN_GROUP(stmmod_oc3_2, NMK_GPIO_ALT_C3),
  813. NMK_PIN_GROUP(uartmodrx_oc3_1, NMK_GPIO_ALT_C3),
  814. NMK_PIN_GROUP(uartmodtx_oc3_1, NMK_GPIO_ALT_C3),
  815. NMK_PIN_GROUP(etmr4_oc3_1, NMK_GPIO_ALT_C3),
  816. /* Other alt C4 column */
  817. NMK_PIN_GROUP(sbag_oc4_1, NMK_GPIO_ALT_C4),
  818. NMK_PIN_GROUP(hwobs_oc4_1, NMK_GPIO_ALT_C4),
  819. };
  820. /* We use this macro to define the groups applicable to a function */
  821. #define DB8500_FUNC_GROUPS(a, b...) \
  822. static const char * const a##_groups[] = { b };
  823. DB8500_FUNC_GROUPS(u0, "u0_a_1", "u0_c_1");
  824. DB8500_FUNC_GROUPS(u1, "u1rxtx_a_1", "u1ctsrts_a_1");
  825. /*
  826. * UART2 can be muxed out with just RX/TX in four places, CTS+RTS is however
  827. * only available on two pins in alternative function C
  828. */
  829. DB8500_FUNC_GROUPS(u2, "u2rxtx_b_1", "u2rxtx_c_1", "u2ctsrts_c_1",
  830. "u2rxtx_c_2", "u2rxtx_c_3", "u2rx_oc1_1");
  831. DB8500_FUNC_GROUPS(ipi2c, "ipi2c_a_1", "ipi2c_a_2");
  832. /*
  833. * MSP0 can only be on a certain set of pins, but the TX/RX pins can be
  834. * switched around by selecting the altfunction A or B. The SCK pin is
  835. * only available on the altfunction B.
  836. */
  837. DB8500_FUNC_GROUPS(msp0, "msp0txrx_a_1", "msp0tfstck_a_1", "msp0rfstck_a_1",
  838. "msp0txrx_b_1", "msp0sck_b_1");
  839. DB8500_FUNC_GROUPS(mc0, "mc0_a_1", "mc0_a_2", "mc0_dat47_a_1", "mc0dat31dir_a_1");
  840. /* MSP0 can swap RX/TX like MSP0 but has no SCK pin available */
  841. DB8500_FUNC_GROUPS(msp1, "msp1txrx_a_1", "msp1_a_1", "msp1txrx_b_1");
  842. DB8500_FUNC_GROUPS(lcdb, "lcdb_a_1");
  843. DB8500_FUNC_GROUPS(lcd, "lcdvsi0_a_1", "lcdvsi1_a_1", "lcd_d0_d7_a_1",
  844. "lcd_d8_d11_a_1", "lcd_d12_d15_a_1", "lcd_d12_d23_a_1", "lcd_b_1",
  845. "lcd_d16_d23_b_1");
  846. DB8500_FUNC_GROUPS(kp, "kp_a_1", "kp_a_2", "kp_b_1", "kp_b_2", "kp_c_1", "kp_oc1_1");
  847. DB8500_FUNC_GROUPS(mc2, "mc2_a_1", "mc2_a_2", "mc2rstn_c_1");
  848. DB8500_FUNC_GROUPS(ssp1, "ssp1_a_1");
  849. DB8500_FUNC_GROUPS(ssp0, "ssp0_a_1");
  850. DB8500_FUNC_GROUPS(i2c0, "i2c0_a_1");
  851. /* The image processor has 8 GPIO pins that can be muxed out */
  852. DB8500_FUNC_GROUPS(ipgpio, "ipgpio0_a_1", "ipgpio1_a_1", "ipgpio7_b_1",
  853. "ipgpio2_b_1", "ipgpio3_b_1", "ipgpio6_c_1", "ipgpio0_c_1",
  854. "ipgpio1_c_1", "ipgpio3_c_1", "ipgpio2_c_1", "ipgpio4_c_1",
  855. "ipgpio5_c_1", "ipgpio6_c_2", "ipgpio7_c_1", "ipgpio2_c_2",
  856. "ipgpio3_c_2", "ipgpio4_c_2", "ipgpio5_c_2");
  857. /* MSP2 can not invert the RX/TX pins but has the optional SCK pin */
  858. DB8500_FUNC_GROUPS(msp2, "msp2sck_a_1", "msp2_a_1");
  859. DB8500_FUNC_GROUPS(mc4, "mc4_a_1", "mc4rstn_c_1");
  860. DB8500_FUNC_GROUPS(mc1, "mc1_a_1", "mc1_a_2", "mc1dir_a_1");
  861. DB8500_FUNC_GROUPS(hsi, "hsir_a_1", "hsit_a_1", "hsit_a_2");
  862. DB8500_FUNC_GROUPS(clkout, "clkout1_a_1", "clkout1_a_2", "clkout1_c_1",
  863. "clkout2_a_1", "clkout2_a_2", "clkout2_c_1");
  864. DB8500_FUNC_GROUPS(usb, "usb_a_1");
  865. DB8500_FUNC_GROUPS(trig, "trig_b_1");
  866. DB8500_FUNC_GROUPS(i2c4, "i2c4_b_1");
  867. DB8500_FUNC_GROUPS(i2c1, "i2c1_b_1", "i2c1_b_2");
  868. DB8500_FUNC_GROUPS(i2c2, "i2c2_b_1", "i2c2_b_2");
  869. /*
  870. * The modem UART can output its RX and TX pins in some different places,
  871. * so select one of each.
  872. */
  873. DB8500_FUNC_GROUPS(uartmod, "uartmodtx_b_1", "uartmodrx_b_1", "uartmodrx_b_2",
  874. "uartmodrx_c_1", "uartmod_tx_c_1", "uartmodrx_oc1_1",
  875. "uartmodtx_oc1_1", "uartmodrx_oc3_1", "uartmodtx_oc3_1");
  876. DB8500_FUNC_GROUPS(stmmod, "stmmod_b_1", "stmmod_c_1", "stmmod_oc1_1",
  877. "stmmod_oc3_1", "stmmod_oc3_2");
  878. DB8500_FUNC_GROUPS(spi3, "spi3_b_1");
  879. /* Select between CS0 on alt B or PS1 on alt C */
  880. DB8500_FUNC_GROUPS(sm, "sm_b_1", "smcs0_b_1", "smcs1_b_1", "smcleale_c_1",
  881. "smps0_c_1", "smps1_c_1");
  882. DB8500_FUNC_GROUPS(lcda, "lcdaclk_b_1", "lcda_b_1");
  883. DB8500_FUNC_GROUPS(ddrtrig, "ddrtrig_b_1");
  884. DB8500_FUNC_GROUPS(pwl, "pwl_b_1", "pwl_b_2", "pwl_b_3", "pwl_b_4");
  885. DB8500_FUNC_GROUPS(spi1, "spi1_b_1");
  886. DB8500_FUNC_GROUPS(mc3, "mc3_b_1");
  887. DB8500_FUNC_GROUPS(ipjtag, "ipjtag_c_1");
  888. DB8500_FUNC_GROUPS(slim0, "slim0_c_1");
  889. DB8500_FUNC_GROUPS(ms, "ms_c_1");
  890. DB8500_FUNC_GROUPS(iptrigout, "iptrigout_c_1");
  891. DB8500_FUNC_GROUPS(stmape, "stmape_c_1", "stmape_c_2", "stmape_oc1_1");
  892. DB8500_FUNC_GROUPS(mc5, "mc5_c_1");
  893. DB8500_FUNC_GROUPS(usbsim, "usbsim_c_1", "usbsim_c_2");
  894. DB8500_FUNC_GROUPS(i2c3, "i2c3_c_1", "i2c3_c_2");
  895. DB8500_FUNC_GROUPS(spi0, "spi0_c_1");
  896. DB8500_FUNC_GROUPS(spi2, "spi2_oc1_1", "spi2_oc1_2");
  897. DB8500_FUNC_GROUPS(remap, "remap0_oc1_1", "remap1_oc1_1");
  898. DB8500_FUNC_GROUPS(sbag, "sbag_oc2_1", "sbag_oc4_1");
  899. DB8500_FUNC_GROUPS(ptm, "ptma9_oc1_1", "ptma9_oc2_1");
  900. DB8500_FUNC_GROUPS(rf, "rf_oc1_1", "rf_oc1_2");
  901. DB8500_FUNC_GROUPS(hx, "hxclk_oc1_1", "hxgpio_oc1_1");
  902. DB8500_FUNC_GROUPS(etm, "etmr4_oc2_1", "etmr4_oc3_1");
  903. DB8500_FUNC_GROUPS(hwobs, "hwobs_oc4_1");
  904. #define FUNCTION(fname) \
  905. { \
  906. .name = #fname, \
  907. .groups = fname##_groups, \
  908. .ngroups = ARRAY_SIZE(fname##_groups), \
  909. }
  910. static const struct nmk_function nmk_db8500_functions[] = {
  911. FUNCTION(u0),
  912. FUNCTION(u1),
  913. FUNCTION(u2),
  914. FUNCTION(ipi2c),
  915. FUNCTION(msp0),
  916. FUNCTION(mc0),
  917. FUNCTION(msp1),
  918. FUNCTION(lcdb),
  919. FUNCTION(lcd),
  920. FUNCTION(kp),
  921. FUNCTION(mc2),
  922. FUNCTION(ssp1),
  923. FUNCTION(ssp0),
  924. FUNCTION(i2c0),
  925. FUNCTION(ipgpio),
  926. FUNCTION(msp2),
  927. FUNCTION(mc4),
  928. FUNCTION(mc1),
  929. FUNCTION(hsi),
  930. FUNCTION(clkout),
  931. FUNCTION(usb),
  932. FUNCTION(trig),
  933. FUNCTION(i2c4),
  934. FUNCTION(i2c1),
  935. FUNCTION(i2c2),
  936. FUNCTION(uartmod),
  937. FUNCTION(stmmod),
  938. FUNCTION(spi3),
  939. FUNCTION(sm),
  940. FUNCTION(lcda),
  941. FUNCTION(ddrtrig),
  942. FUNCTION(pwl),
  943. FUNCTION(spi1),
  944. FUNCTION(mc3),
  945. FUNCTION(ipjtag),
  946. FUNCTION(slim0),
  947. FUNCTION(ms),
  948. FUNCTION(iptrigout),
  949. FUNCTION(stmape),
  950. FUNCTION(mc5),
  951. FUNCTION(usbsim),
  952. FUNCTION(i2c3),
  953. FUNCTION(spi0),
  954. FUNCTION(spi2),
  955. FUNCTION(remap),
  956. FUNCTION(sbag),
  957. FUNCTION(ptm),
  958. FUNCTION(rf),
  959. FUNCTION(hx),
  960. FUNCTION(etm),
  961. FUNCTION(hwobs),
  962. };
  963. static const struct prcm_gpiocr_altcx_pin_desc db8500_altcx_pins[] = {
  964. PRCM_GPIOCR_ALTCX(23, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_CLK_a */
  965. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_CLK_a */
  966. false, 0, 0,
  967. false, 0, 0
  968. ),
  969. PRCM_GPIOCR_ALTCX(24, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE or U2_RXD ??? */
  970. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_VAL_a */
  971. true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
  972. false, 0, 0
  973. ),
  974. PRCM_GPIOCR_ALTCX(25, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[0] */
  975. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[0] */
  976. false, 0, 0,
  977. false, 0, 0
  978. ),
  979. PRCM_GPIOCR_ALTCX(26, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[1] */
  980. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[1] */
  981. false, 0, 0,
  982. false, 0, 0
  983. ),
  984. PRCM_GPIOCR_ALTCX(27, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[2] */
  985. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[2] */
  986. false, 0, 0,
  987. false, 0, 0
  988. ),
  989. PRCM_GPIOCR_ALTCX(28, true, PRCM_IDX_GPIOCR1, 9, /* STMAPE_DAT_a[3] */
  990. true, PRCM_IDX_GPIOCR1, 7, /* SBAG_D_a[3] */
  991. false, 0, 0,
  992. false, 0, 0
  993. ),
  994. PRCM_GPIOCR_ALTCX(29, false, 0, 0,
  995. false, 0, 0,
  996. true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
  997. false, 0, 0
  998. ),
  999. PRCM_GPIOCR_ALTCX(30, false, 0, 0,
  1000. false, 0, 0,
  1001. true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
  1002. false, 0, 0
  1003. ),
  1004. PRCM_GPIOCR_ALTCX(31, false, 0, 0,
  1005. false, 0, 0,
  1006. true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
  1007. false, 0, 0
  1008. ),
  1009. PRCM_GPIOCR_ALTCX(32, false, 0, 0,
  1010. false, 0, 0,
  1011. true, PRCM_IDX_GPIOCR1, 10, /* STM_MOD_CMD0 */
  1012. false, 0, 0
  1013. ),
  1014. PRCM_GPIOCR_ALTCX(68, true, PRCM_IDX_GPIOCR1, 18, /* REMAP_SELECT_ON */
  1015. false, 0, 0,
  1016. false, 0, 0,
  1017. false, 0, 0
  1018. ),
  1019. PRCM_GPIOCR_ALTCX(69, true, PRCM_IDX_GPIOCR1, 18, /* REMAP_SELECT_ON */
  1020. false, 0, 0,
  1021. false, 0, 0,
  1022. false, 0, 0
  1023. ),
  1024. PRCM_GPIOCR_ALTCX(70, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D23 */
  1025. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1026. true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
  1027. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_CLK */
  1028. ),
  1029. PRCM_GPIOCR_ALTCX(71, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D22 */
  1030. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1031. true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
  1032. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D3 */
  1033. ),
  1034. PRCM_GPIOCR_ALTCX(72, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D21 */
  1035. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1036. true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
  1037. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D2 */
  1038. ),
  1039. PRCM_GPIOCR_ALTCX(73, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D20 */
  1040. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1041. true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
  1042. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D1 */
  1043. ),
  1044. PRCM_GPIOCR_ALTCX(74, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D19 */
  1045. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1046. true, PRCM_IDX_GPIOCR1, 11, /* STM_MOD_CMD1 */
  1047. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_D0 */
  1048. ),
  1049. PRCM_GPIOCR_ALTCX(75, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D18 */
  1050. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1051. true, PRCM_IDX_GPIOCR1, 0, /* DBG_UARTMOD_CMD0 */
  1052. false, 0, 0
  1053. ),
  1054. PRCM_GPIOCR_ALTCX(76, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D17 */
  1055. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1056. true, PRCM_IDX_GPIOCR1, 0, /* DBG_UARTMOD_CMD0 */
  1057. false, 0, 0
  1058. ),
  1059. PRCM_GPIOCR_ALTCX(77, true, PRCM_IDX_GPIOCR1, 5, /* PTM_A9_D16 */
  1060. true, PRCM_IDX_GPIOCR2, 2, /* DBG_ETM_R4_CMD0 */
  1061. false, 0, 0,
  1062. true, PRCM_IDX_GPIOCR1, 8 /* SBAG_VAL */
  1063. ),
  1064. PRCM_GPIOCR_ALTCX(86, true, PRCM_IDX_GPIOCR1, 12, /* KP_O3 */
  1065. false, 0, 0,
  1066. false, 0, 0,
  1067. false, 0, 0
  1068. ),
  1069. PRCM_GPIOCR_ALTCX(87, true, PRCM_IDX_GPIOCR1, 12, /* KP_O2 */
  1070. false, 0, 0,
  1071. false, 0, 0,
  1072. false, 0, 0
  1073. ),
  1074. PRCM_GPIOCR_ALTCX(88, true, PRCM_IDX_GPIOCR1, 12, /* KP_I3 */
  1075. false, 0, 0,
  1076. false, 0, 0,
  1077. false, 0, 0
  1078. ),
  1079. PRCM_GPIOCR_ALTCX(89, true, PRCM_IDX_GPIOCR1, 12, /* KP_I2 */
  1080. false, 0, 0,
  1081. false, 0, 0,
  1082. false, 0, 0
  1083. ),
  1084. PRCM_GPIOCR_ALTCX(90, true, PRCM_IDX_GPIOCR1, 12, /* KP_O1 */
  1085. false, 0, 0,
  1086. false, 0, 0,
  1087. false, 0, 0
  1088. ),
  1089. PRCM_GPIOCR_ALTCX(91, true, PRCM_IDX_GPIOCR1, 12, /* KP_O0 */
  1090. false, 0, 0,
  1091. false, 0, 0,
  1092. false, 0, 0
  1093. ),
  1094. PRCM_GPIOCR_ALTCX(92, true, PRCM_IDX_GPIOCR1, 12, /* KP_I1 */
  1095. false, 0, 0,
  1096. false, 0, 0,
  1097. false, 0, 0
  1098. ),
  1099. PRCM_GPIOCR_ALTCX(93, true, PRCM_IDX_GPIOCR1, 12, /* KP_I0 */
  1100. false, 0, 0,
  1101. false, 0, 0,
  1102. false, 0, 0
  1103. ),
  1104. PRCM_GPIOCR_ALTCX(96, true, PRCM_IDX_GPIOCR2, 3, /* RF_INT */
  1105. false, 0, 0,
  1106. false, 0, 0,
  1107. false, 0, 0
  1108. ),
  1109. PRCM_GPIOCR_ALTCX(97, true, PRCM_IDX_GPIOCR2, 1, /* RF_CTRL */
  1110. false, 0, 0,
  1111. false, 0, 0,
  1112. false, 0, 0
  1113. ),
  1114. PRCM_GPIOCR_ALTCX(151, false, 0, 0,
  1115. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_CTL */
  1116. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1117. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS17 */
  1118. ),
  1119. PRCM_GPIOCR_ALTCX(152, true, PRCM_IDX_GPIOCR1, 4, /* Hx_CLK */
  1120. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_CLK */
  1121. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1122. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS16 */
  1123. ),
  1124. PRCM_GPIOCR_ALTCX(153, true, PRCM_IDX_GPIOCR1, 1, /* UARTMOD_CMD1 */
  1125. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D15 */
  1126. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1127. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS15 */
  1128. ),
  1129. PRCM_GPIOCR_ALTCX(154, true, PRCM_IDX_GPIOCR1, 1, /* UARTMOD_CMD1 */
  1130. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D14 */
  1131. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1132. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS14 */
  1133. ),
  1134. PRCM_GPIOCR_ALTCX(155, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
  1135. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D13 */
  1136. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1137. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS13 */
  1138. ),
  1139. PRCM_GPIOCR_ALTCX(156, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
  1140. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D12 */
  1141. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1142. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS12 */
  1143. ),
  1144. PRCM_GPIOCR_ALTCX(157, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
  1145. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D11 */
  1146. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1147. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS11 */
  1148. ),
  1149. PRCM_GPIOCR_ALTCX(158, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
  1150. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D10 */
  1151. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1152. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS10 */
  1153. ),
  1154. PRCM_GPIOCR_ALTCX(159, true, PRCM_IDX_GPIOCR1, 13, /* STM_MOD_CMD2 */
  1155. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D9 */
  1156. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1157. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS9 */
  1158. ),
  1159. PRCM_GPIOCR_ALTCX(160, false, 0, 0,
  1160. true, PRCM_IDX_GPIOCR1, 14, /* PTM_A9_D8 */
  1161. true, PRCM_IDX_GPIOCR1, 19, /* DBG_ETM_R4_CMD2 */
  1162. true, PRCM_IDX_GPIOCR1, 25 /* HW_OBS8 */
  1163. ),
  1164. PRCM_GPIOCR_ALTCX(161, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO7 */
  1165. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D7 */
  1166. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1167. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS7 */
  1168. ),
  1169. PRCM_GPIOCR_ALTCX(162, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO6 */
  1170. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D6 */
  1171. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1172. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS6 */
  1173. ),
  1174. PRCM_GPIOCR_ALTCX(163, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO5 */
  1175. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D5 */
  1176. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1177. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS5 */
  1178. ),
  1179. PRCM_GPIOCR_ALTCX(164, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO4 */
  1180. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D4 */
  1181. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1182. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS4 */
  1183. ),
  1184. PRCM_GPIOCR_ALTCX(165, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO3 */
  1185. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D3 */
  1186. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1187. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS3 */
  1188. ),
  1189. PRCM_GPIOCR_ALTCX(166, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO2 */
  1190. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D2 */
  1191. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1192. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS2 */
  1193. ),
  1194. PRCM_GPIOCR_ALTCX(167, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO1 */
  1195. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D1 */
  1196. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1197. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS1 */
  1198. ),
  1199. PRCM_GPIOCR_ALTCX(168, true, PRCM_IDX_GPIOCR1, 4, /* Hx_GPIO0 */
  1200. true, PRCM_IDX_GPIOCR1, 6, /* PTM_A9_D0 */
  1201. true, PRCM_IDX_GPIOCR1, 15, /* DBG_ETM_R4_CMD1*/
  1202. true, PRCM_IDX_GPIOCR1, 24 /* HW_OBS0 */
  1203. ),
  1204. PRCM_GPIOCR_ALTCX(170, true, PRCM_IDX_GPIOCR2, 2, /* RF_INT */
  1205. false, 0, 0,
  1206. false, 0, 0,
  1207. false, 0, 0
  1208. ),
  1209. PRCM_GPIOCR_ALTCX(171, true, PRCM_IDX_GPIOCR2, 0, /* RF_CTRL */
  1210. false, 0, 0,
  1211. false, 0, 0,
  1212. false, 0, 0
  1213. ),
  1214. PRCM_GPIOCR_ALTCX(215, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_TXD */
  1215. false, 0, 0,
  1216. false, 0, 0,
  1217. false, 0, 0
  1218. ),
  1219. PRCM_GPIOCR_ALTCX(216, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_FRM */
  1220. false, 0, 0,
  1221. false, 0, 0,
  1222. false, 0, 0
  1223. ),
  1224. PRCM_GPIOCR_ALTCX(217, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_CLK */
  1225. false, 0, 0,
  1226. false, 0, 0,
  1227. false, 0, 0
  1228. ),
  1229. PRCM_GPIOCR_ALTCX(218, true, PRCM_IDX_GPIOCR1, 23, /* SPI2_RXD */
  1230. false, 0, 0,
  1231. false, 0, 0,
  1232. false, 0, 0
  1233. ),
  1234. };
  1235. static const u16 db8500_prcm_gpiocr_regs[] = {
  1236. [PRCM_IDX_GPIOCR1] = 0x138,
  1237. [PRCM_IDX_GPIOCR2] = 0x574,
  1238. };
  1239. static const struct nmk_pinctrl_soc_data nmk_db8500_soc = {
  1240. .pins = nmk_db8500_pins,
  1241. .npins = ARRAY_SIZE(nmk_db8500_pins),
  1242. .functions = nmk_db8500_functions,
  1243. .nfunctions = ARRAY_SIZE(nmk_db8500_functions),
  1244. .groups = nmk_db8500_groups,
  1245. .ngroups = ARRAY_SIZE(nmk_db8500_groups),
  1246. .altcx_pins = db8500_altcx_pins,
  1247. .npins_altcx = ARRAY_SIZE(db8500_altcx_pins),
  1248. .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs,
  1249. };
  1250. void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
  1251. {
  1252. *soc = &nmk_db8500_soc;
  1253. }