pfc-sh7785.c 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274
  1. /*
  2. * SH7785 Pinmux
  3. *
  4. * Copyright (C) 2008 Magnus Damm
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/init.h>
  11. #include <linux/kernel.h>
  12. #include <cpu/sh7785.h>
  13. #include "sh_pfc.h"
  14. enum {
  15. PINMUX_RESERVED = 0,
  16. PINMUX_DATA_BEGIN,
  17. PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
  18. PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA,
  19. PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA,
  20. PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA,
  21. PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA,
  22. PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA,
  23. PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA,
  24. PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA,
  25. PE5_DATA, PE4_DATA, PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA,
  26. PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA,
  27. PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA,
  28. PG7_DATA, PG6_DATA, PG5_DATA, PG4_DATA,
  29. PG3_DATA, PG2_DATA, PG1_DATA, PG0_DATA,
  30. PH7_DATA, PH6_DATA, PH5_DATA, PH4_DATA,
  31. PH3_DATA, PH2_DATA, PH1_DATA, PH0_DATA,
  32. PJ7_DATA, PJ6_DATA, PJ5_DATA, PJ4_DATA,
  33. PJ3_DATA, PJ2_DATA, PJ1_DATA, PJ0_DATA,
  34. PK7_DATA, PK6_DATA, PK5_DATA, PK4_DATA,
  35. PK3_DATA, PK2_DATA, PK1_DATA, PK0_DATA,
  36. PL7_DATA, PL6_DATA, PL5_DATA, PL4_DATA,
  37. PL3_DATA, PL2_DATA, PL1_DATA, PL0_DATA,
  38. PM1_DATA, PM0_DATA,
  39. PN7_DATA, PN6_DATA, PN5_DATA, PN4_DATA,
  40. PN3_DATA, PN2_DATA, PN1_DATA, PN0_DATA,
  41. PP5_DATA, PP4_DATA, PP3_DATA, PP2_DATA, PP1_DATA, PP0_DATA,
  42. PQ4_DATA, PQ3_DATA, PQ2_DATA, PQ1_DATA, PQ0_DATA,
  43. PR3_DATA, PR2_DATA, PR1_DATA, PR0_DATA,
  44. PINMUX_DATA_END,
  45. PINMUX_INPUT_BEGIN,
  46. PA7_IN, PA6_IN, PA5_IN, PA4_IN,
  47. PA3_IN, PA2_IN, PA1_IN, PA0_IN,
  48. PB7_IN, PB6_IN, PB5_IN, PB4_IN,
  49. PB3_IN, PB2_IN, PB1_IN, PB0_IN,
  50. PC7_IN, PC6_IN, PC5_IN, PC4_IN,
  51. PC3_IN, PC2_IN, PC1_IN, PC0_IN,
  52. PD7_IN, PD6_IN, PD5_IN, PD4_IN,
  53. PD3_IN, PD2_IN, PD1_IN, PD0_IN,
  54. PE5_IN, PE4_IN, PE3_IN, PE2_IN, PE1_IN, PE0_IN,
  55. PF7_IN, PF6_IN, PF5_IN, PF4_IN,
  56. PF3_IN, PF2_IN, PF1_IN, PF0_IN,
  57. PG7_IN, PG6_IN, PG5_IN, PG4_IN,
  58. PG3_IN, PG2_IN, PG1_IN, PG0_IN,
  59. PH7_IN, PH6_IN, PH5_IN, PH4_IN,
  60. PH3_IN, PH2_IN, PH1_IN, PH0_IN,
  61. PJ7_IN, PJ6_IN, PJ5_IN, PJ4_IN,
  62. PJ3_IN, PJ2_IN, PJ1_IN, PJ0_IN,
  63. PK7_IN, PK6_IN, PK5_IN, PK4_IN,
  64. PK3_IN, PK2_IN, PK1_IN, PK0_IN,
  65. PL7_IN, PL6_IN, PL5_IN, PL4_IN,
  66. PL3_IN, PL2_IN, PL1_IN, PL0_IN,
  67. PM1_IN, PM0_IN,
  68. PN7_IN, PN6_IN, PN5_IN, PN4_IN,
  69. PN3_IN, PN2_IN, PN1_IN, PN0_IN,
  70. PP5_IN, PP4_IN, PP3_IN, PP2_IN, PP1_IN, PP0_IN,
  71. PQ4_IN, PQ3_IN, PQ2_IN, PQ1_IN, PQ0_IN,
  72. PR3_IN, PR2_IN, PR1_IN, PR0_IN,
  73. PINMUX_INPUT_END,
  74. PINMUX_OUTPUT_BEGIN,
  75. PA7_OUT, PA6_OUT, PA5_OUT, PA4_OUT,
  76. PA3_OUT, PA2_OUT, PA1_OUT, PA0_OUT,
  77. PB7_OUT, PB6_OUT, PB5_OUT, PB4_OUT,
  78. PB3_OUT, PB2_OUT, PB1_OUT, PB0_OUT,
  79. PC7_OUT, PC6_OUT, PC5_OUT, PC4_OUT,
  80. PC3_OUT, PC2_OUT, PC1_OUT, PC0_OUT,
  81. PD7_OUT, PD6_OUT, PD5_OUT, PD4_OUT,
  82. PD3_OUT, PD2_OUT, PD1_OUT, PD0_OUT,
  83. PE5_OUT, PE4_OUT, PE3_OUT, PE2_OUT, PE1_OUT, PE0_OUT,
  84. PF7_OUT, PF6_OUT, PF5_OUT, PF4_OUT,
  85. PF3_OUT, PF2_OUT, PF1_OUT, PF0_OUT,
  86. PG7_OUT, PG6_OUT, PG5_OUT, PG4_OUT,
  87. PG3_OUT, PG2_OUT, PG1_OUT, PG0_OUT,
  88. PH7_OUT, PH6_OUT, PH5_OUT, PH4_OUT,
  89. PH3_OUT, PH2_OUT, PH1_OUT, PH0_OUT,
  90. PJ7_OUT, PJ6_OUT, PJ5_OUT, PJ4_OUT,
  91. PJ3_OUT, PJ2_OUT, PJ1_OUT, PJ0_OUT,
  92. PK7_OUT, PK6_OUT, PK5_OUT, PK4_OUT,
  93. PK3_OUT, PK2_OUT, PK1_OUT, PK0_OUT,
  94. PL7_OUT, PL6_OUT, PL5_OUT, PL4_OUT,
  95. PL3_OUT, PL2_OUT, PL1_OUT, PL0_OUT,
  96. PM1_OUT, PM0_OUT,
  97. PN7_OUT, PN6_OUT, PN5_OUT, PN4_OUT,
  98. PN3_OUT, PN2_OUT, PN1_OUT, PN0_OUT,
  99. PP5_OUT, PP4_OUT, PP3_OUT, PP2_OUT, PP1_OUT, PP0_OUT,
  100. PQ4_OUT, PQ3_OUT, PQ2_OUT, PQ1_OUT, PQ0_OUT,
  101. PR3_OUT, PR2_OUT, PR1_OUT, PR0_OUT,
  102. PINMUX_OUTPUT_END,
  103. PINMUX_FUNCTION_BEGIN,
  104. PA7_FN, PA6_FN, PA5_FN, PA4_FN,
  105. PA3_FN, PA2_FN, PA1_FN, PA0_FN,
  106. PB7_FN, PB6_FN, PB5_FN, PB4_FN,
  107. PB3_FN, PB2_FN, PB1_FN, PB0_FN,
  108. PC7_FN, PC6_FN, PC5_FN, PC4_FN,
  109. PC3_FN, PC2_FN, PC1_FN, PC0_FN,
  110. PD7_FN, PD6_FN, PD5_FN, PD4_FN,
  111. PD3_FN, PD2_FN, PD1_FN, PD0_FN,
  112. PE5_FN, PE4_FN, PE3_FN, PE2_FN, PE1_FN, PE0_FN,
  113. PF7_FN, PF6_FN, PF5_FN, PF4_FN,
  114. PF3_FN, PF2_FN, PF1_FN, PF0_FN,
  115. PG7_FN, PG6_FN, PG5_FN, PG4_FN,
  116. PG3_FN, PG2_FN, PG1_FN, PG0_FN,
  117. PH7_FN, PH6_FN, PH5_FN, PH4_FN,
  118. PH3_FN, PH2_FN, PH1_FN, PH0_FN,
  119. PJ7_FN, PJ6_FN, PJ5_FN, PJ4_FN,
  120. PJ3_FN, PJ2_FN, PJ1_FN, PJ0_FN,
  121. PK7_FN, PK6_FN, PK5_FN, PK4_FN,
  122. PK3_FN, PK2_FN, PK1_FN, PK0_FN,
  123. PL7_FN, PL6_FN, PL5_FN, PL4_FN,
  124. PL3_FN, PL2_FN, PL1_FN, PL0_FN,
  125. PM1_FN, PM0_FN,
  126. PN7_FN, PN6_FN, PN5_FN, PN4_FN,
  127. PN3_FN, PN2_FN, PN1_FN, PN0_FN,
  128. PP5_FN, PP4_FN, PP3_FN, PP2_FN, PP1_FN, PP0_FN,
  129. PQ4_FN, PQ3_FN, PQ2_FN, PQ1_FN, PQ0_FN,
  130. PR3_FN, PR2_FN, PR1_FN, PR0_FN,
  131. P1MSEL15_0, P1MSEL15_1,
  132. P1MSEL14_0, P1MSEL14_1,
  133. P1MSEL13_0, P1MSEL13_1,
  134. P1MSEL12_0, P1MSEL12_1,
  135. P1MSEL11_0, P1MSEL11_1,
  136. P1MSEL10_0, P1MSEL10_1,
  137. P1MSEL9_0, P1MSEL9_1,
  138. P1MSEL8_0, P1MSEL8_1,
  139. P1MSEL7_0, P1MSEL7_1,
  140. P1MSEL6_0, P1MSEL6_1,
  141. P1MSEL5_0,
  142. P1MSEL4_0, P1MSEL4_1,
  143. P1MSEL3_0, P1MSEL3_1,
  144. P1MSEL2_0, P1MSEL2_1,
  145. P1MSEL1_0, P1MSEL1_1,
  146. P1MSEL0_0, P1MSEL0_1,
  147. P2MSEL2_0, P2MSEL2_1,
  148. P2MSEL1_0, P2MSEL1_1,
  149. P2MSEL0_0, P2MSEL0_1,
  150. PINMUX_FUNCTION_END,
  151. PINMUX_MARK_BEGIN,
  152. D63_AD31_MARK,
  153. D62_AD30_MARK,
  154. D61_AD29_MARK,
  155. D60_AD28_MARK,
  156. D59_AD27_MARK,
  157. D58_AD26_MARK,
  158. D57_AD25_MARK,
  159. D56_AD24_MARK,
  160. D55_AD23_MARK,
  161. D54_AD22_MARK,
  162. D53_AD21_MARK,
  163. D52_AD20_MARK,
  164. D51_AD19_MARK,
  165. D50_AD18_MARK,
  166. D49_AD17_DB5_MARK,
  167. D48_AD16_DB4_MARK,
  168. D47_AD15_DB3_MARK,
  169. D46_AD14_DB2_MARK,
  170. D45_AD13_DB1_MARK,
  171. D44_AD12_DB0_MARK,
  172. D43_AD11_DG5_MARK,
  173. D42_AD10_DG4_MARK,
  174. D41_AD9_DG3_MARK,
  175. D40_AD8_DG2_MARK,
  176. D39_AD7_DG1_MARK,
  177. D38_AD6_DG0_MARK,
  178. D37_AD5_DR5_MARK,
  179. D36_AD4_DR4_MARK,
  180. D35_AD3_DR3_MARK,
  181. D34_AD2_DR2_MARK,
  182. D33_AD1_DR1_MARK,
  183. D32_AD0_DR0_MARK,
  184. REQ1_MARK,
  185. REQ2_MARK,
  186. REQ3_MARK,
  187. GNT1_MARK,
  188. GNT2_MARK,
  189. GNT3_MARK,
  190. MMCCLK_MARK,
  191. D31_MARK,
  192. D30_MARK,
  193. D29_MARK,
  194. D28_MARK,
  195. D27_MARK,
  196. D26_MARK,
  197. D25_MARK,
  198. D24_MARK,
  199. D23_MARK,
  200. D22_MARK,
  201. D21_MARK,
  202. D20_MARK,
  203. D19_MARK,
  204. D18_MARK,
  205. D17_MARK,
  206. D16_MARK,
  207. SCIF1_SCK_MARK,
  208. SCIF1_RXD_MARK,
  209. SCIF1_TXD_MARK,
  210. SCIF0_CTS_MARK,
  211. INTD_MARK,
  212. FCE_MARK,
  213. SCIF0_RTS_MARK,
  214. HSPI_CS_MARK,
  215. FSE_MARK,
  216. SCIF0_SCK_MARK,
  217. HSPI_CLK_MARK,
  218. FRE_MARK,
  219. SCIF0_RXD_MARK,
  220. HSPI_RX_MARK,
  221. FRB_MARK,
  222. SCIF0_TXD_MARK,
  223. HSPI_TX_MARK,
  224. FWE_MARK,
  225. SCIF5_TXD_MARK,
  226. HAC1_SYNC_MARK,
  227. SSI1_WS_MARK,
  228. SIOF_TXD_PJ_MARK,
  229. HAC0_SDOUT_MARK,
  230. SSI0_SDATA_MARK,
  231. SIOF_RXD_PJ_MARK,
  232. HAC0_SDIN_MARK,
  233. SSI0_SCK_MARK,
  234. SIOF_SYNC_PJ_MARK,
  235. HAC0_SYNC_MARK,
  236. SSI0_WS_MARK,
  237. SIOF_MCLK_PJ_MARK,
  238. HAC_RES_MARK,
  239. SIOF_SCK_PJ_MARK,
  240. HAC0_BITCLK_MARK,
  241. SSI0_CLK_MARK,
  242. HAC1_BITCLK_MARK,
  243. SSI1_CLK_MARK,
  244. TCLK_MARK,
  245. IOIS16_MARK,
  246. STATUS0_MARK,
  247. DRAK0_PK3_MARK,
  248. STATUS1_MARK,
  249. DRAK1_PK2_MARK,
  250. DACK2_MARK,
  251. SCIF2_TXD_MARK,
  252. MMCCMD_MARK,
  253. SIOF_TXD_PK_MARK,
  254. DACK3_MARK,
  255. SCIF2_SCK_MARK,
  256. MMCDAT_MARK,
  257. SIOF_SCK_PK_MARK,
  258. DREQ0_MARK,
  259. DREQ1_MARK,
  260. DRAK0_PK1_MARK,
  261. DRAK1_PK0_MARK,
  262. DREQ2_MARK,
  263. INTB_MARK,
  264. DREQ3_MARK,
  265. INTC_MARK,
  266. DRAK2_MARK,
  267. CE2A_MARK,
  268. IRL4_MARK,
  269. FD4_MARK,
  270. IRL5_MARK,
  271. FD5_MARK,
  272. IRL6_MARK,
  273. FD6_MARK,
  274. IRL7_MARK,
  275. FD7_MARK,
  276. DRAK3_MARK,
  277. CE2B_MARK,
  278. BREQ_BSACK_MARK,
  279. BACK_BSREQ_MARK,
  280. SCIF5_RXD_MARK,
  281. HAC1_SDIN_MARK,
  282. SSI1_SCK_MARK,
  283. SCIF5_SCK_MARK,
  284. HAC1_SDOUT_MARK,
  285. SSI1_SDATA_MARK,
  286. SCIF3_TXD_MARK,
  287. FCLE_MARK,
  288. SCIF3_RXD_MARK,
  289. FALE_MARK,
  290. SCIF3_SCK_MARK,
  291. FD0_MARK,
  292. SCIF4_TXD_MARK,
  293. FD1_MARK,
  294. SCIF4_RXD_MARK,
  295. FD2_MARK,
  296. SCIF4_SCK_MARK,
  297. FD3_MARK,
  298. DEVSEL_DCLKOUT_MARK,
  299. STOP_CDE_MARK,
  300. LOCK_ODDF_MARK,
  301. TRDY_DISPL_MARK,
  302. IRDY_HSYNC_MARK,
  303. PCIFRAME_VSYNC_MARK,
  304. INTA_MARK,
  305. GNT0_GNTIN_MARK,
  306. REQ0_REQOUT_MARK,
  307. PERR_MARK,
  308. SERR_MARK,
  309. WE7_CBE3_MARK,
  310. WE6_CBE2_MARK,
  311. WE5_CBE1_MARK,
  312. WE4_CBE0_MARK,
  313. SCIF2_RXD_MARK,
  314. SIOF_RXD_MARK,
  315. MRESETOUT_MARK,
  316. IRQOUT_MARK,
  317. PINMUX_MARK_END,
  318. };
  319. static const u16 pinmux_data[] = {
  320. /* PA GPIO */
  321. PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT),
  322. PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT),
  323. PINMUX_DATA(PA5_DATA, PA5_IN, PA5_OUT),
  324. PINMUX_DATA(PA4_DATA, PA4_IN, PA4_OUT),
  325. PINMUX_DATA(PA3_DATA, PA3_IN, PA3_OUT),
  326. PINMUX_DATA(PA2_DATA, PA2_IN, PA2_OUT),
  327. PINMUX_DATA(PA1_DATA, PA1_IN, PA1_OUT),
  328. PINMUX_DATA(PA0_DATA, PA0_IN, PA0_OUT),
  329. /* PB GPIO */
  330. PINMUX_DATA(PB7_DATA, PB7_IN, PB7_OUT),
  331. PINMUX_DATA(PB6_DATA, PB6_IN, PB6_OUT),
  332. PINMUX_DATA(PB5_DATA, PB5_IN, PB5_OUT),
  333. PINMUX_DATA(PB4_DATA, PB4_IN, PB4_OUT),
  334. PINMUX_DATA(PB3_DATA, PB3_IN, PB3_OUT),
  335. PINMUX_DATA(PB2_DATA, PB2_IN, PB2_OUT),
  336. PINMUX_DATA(PB1_DATA, PB1_IN, PB1_OUT),
  337. PINMUX_DATA(PB0_DATA, PB0_IN, PB0_OUT),
  338. /* PC GPIO */
  339. PINMUX_DATA(PC7_DATA, PC7_IN, PC7_OUT),
  340. PINMUX_DATA(PC6_DATA, PC6_IN, PC6_OUT),
  341. PINMUX_DATA(PC5_DATA, PC5_IN, PC5_OUT),
  342. PINMUX_DATA(PC4_DATA, PC4_IN, PC4_OUT),
  343. PINMUX_DATA(PC3_DATA, PC3_IN, PC3_OUT),
  344. PINMUX_DATA(PC2_DATA, PC2_IN, PC2_OUT),
  345. PINMUX_DATA(PC1_DATA, PC1_IN, PC1_OUT),
  346. PINMUX_DATA(PC0_DATA, PC0_IN, PC0_OUT),
  347. /* PD GPIO */
  348. PINMUX_DATA(PD7_DATA, PD7_IN, PD7_OUT),
  349. PINMUX_DATA(PD6_DATA, PD6_IN, PD6_OUT),
  350. PINMUX_DATA(PD5_DATA, PD5_IN, PD5_OUT),
  351. PINMUX_DATA(PD4_DATA, PD4_IN, PD4_OUT),
  352. PINMUX_DATA(PD3_DATA, PD3_IN, PD3_OUT),
  353. PINMUX_DATA(PD2_DATA, PD2_IN, PD2_OUT),
  354. PINMUX_DATA(PD1_DATA, PD1_IN, PD1_OUT),
  355. PINMUX_DATA(PD0_DATA, PD0_IN, PD0_OUT),
  356. /* PE GPIO */
  357. PINMUX_DATA(PE5_DATA, PE5_IN, PE5_OUT),
  358. PINMUX_DATA(PE4_DATA, PE4_IN, PE4_OUT),
  359. PINMUX_DATA(PE3_DATA, PE3_IN, PE3_OUT),
  360. PINMUX_DATA(PE2_DATA, PE2_IN, PE2_OUT),
  361. PINMUX_DATA(PE1_DATA, PE1_IN, PE1_OUT),
  362. PINMUX_DATA(PE0_DATA, PE0_IN, PE0_OUT),
  363. /* PF GPIO */
  364. PINMUX_DATA(PF7_DATA, PF7_IN, PF7_OUT),
  365. PINMUX_DATA(PF6_DATA, PF6_IN, PF6_OUT),
  366. PINMUX_DATA(PF5_DATA, PF5_IN, PF5_OUT),
  367. PINMUX_DATA(PF4_DATA, PF4_IN, PF4_OUT),
  368. PINMUX_DATA(PF3_DATA, PF3_IN, PF3_OUT),
  369. PINMUX_DATA(PF2_DATA, PF2_IN, PF2_OUT),
  370. PINMUX_DATA(PF1_DATA, PF1_IN, PF1_OUT),
  371. PINMUX_DATA(PF0_DATA, PF0_IN, PF0_OUT),
  372. /* PG GPIO */
  373. PINMUX_DATA(PG7_DATA, PG7_IN, PG7_OUT),
  374. PINMUX_DATA(PG6_DATA, PG6_IN, PG6_OUT),
  375. PINMUX_DATA(PG5_DATA, PG5_IN, PG5_OUT),
  376. PINMUX_DATA(PG4_DATA, PG4_IN, PG4_OUT),
  377. PINMUX_DATA(PG3_DATA, PG3_IN, PG3_OUT),
  378. PINMUX_DATA(PG2_DATA, PG2_IN, PG2_OUT),
  379. PINMUX_DATA(PG1_DATA, PG1_IN, PG1_OUT),
  380. PINMUX_DATA(PG0_DATA, PG0_IN, PG0_OUT),
  381. /* PH GPIO */
  382. PINMUX_DATA(PH7_DATA, PH7_IN, PH7_OUT),
  383. PINMUX_DATA(PH6_DATA, PH6_IN, PH6_OUT),
  384. PINMUX_DATA(PH5_DATA, PH5_IN, PH5_OUT),
  385. PINMUX_DATA(PH4_DATA, PH4_IN, PH4_OUT),
  386. PINMUX_DATA(PH3_DATA, PH3_IN, PH3_OUT),
  387. PINMUX_DATA(PH2_DATA, PH2_IN, PH2_OUT),
  388. PINMUX_DATA(PH1_DATA, PH1_IN, PH1_OUT),
  389. PINMUX_DATA(PH0_DATA, PH0_IN, PH0_OUT),
  390. /* PJ GPIO */
  391. PINMUX_DATA(PJ7_DATA, PJ7_IN, PJ7_OUT),
  392. PINMUX_DATA(PJ6_DATA, PJ6_IN, PJ6_OUT),
  393. PINMUX_DATA(PJ5_DATA, PJ5_IN, PJ5_OUT),
  394. PINMUX_DATA(PJ4_DATA, PJ4_IN, PJ4_OUT),
  395. PINMUX_DATA(PJ3_DATA, PJ3_IN, PJ3_OUT),
  396. PINMUX_DATA(PJ2_DATA, PJ2_IN, PJ2_OUT),
  397. PINMUX_DATA(PJ1_DATA, PJ1_IN, PJ1_OUT),
  398. PINMUX_DATA(PJ0_DATA, PJ0_IN, PJ0_OUT),
  399. /* PK GPIO */
  400. PINMUX_DATA(PK7_DATA, PK7_IN, PK7_OUT),
  401. PINMUX_DATA(PK6_DATA, PK6_IN, PK6_OUT),
  402. PINMUX_DATA(PK5_DATA, PK5_IN, PK5_OUT),
  403. PINMUX_DATA(PK4_DATA, PK4_IN, PK4_OUT),
  404. PINMUX_DATA(PK3_DATA, PK3_IN, PK3_OUT),
  405. PINMUX_DATA(PK2_DATA, PK2_IN, PK2_OUT),
  406. PINMUX_DATA(PK1_DATA, PK1_IN, PK1_OUT),
  407. PINMUX_DATA(PK0_DATA, PK0_IN, PK0_OUT),
  408. /* PL GPIO */
  409. PINMUX_DATA(PL7_DATA, PL7_IN, PL7_OUT),
  410. PINMUX_DATA(PL6_DATA, PL6_IN, PL6_OUT),
  411. PINMUX_DATA(PL5_DATA, PL5_IN, PL5_OUT),
  412. PINMUX_DATA(PL4_DATA, PL4_IN, PL4_OUT),
  413. PINMUX_DATA(PL3_DATA, PL3_IN, PL3_OUT),
  414. PINMUX_DATA(PL2_DATA, PL2_IN, PL2_OUT),
  415. PINMUX_DATA(PL1_DATA, PL1_IN, PL1_OUT),
  416. PINMUX_DATA(PL0_DATA, PL0_IN, PL0_OUT),
  417. /* PM GPIO */
  418. PINMUX_DATA(PM1_DATA, PM1_IN, PM1_OUT),
  419. PINMUX_DATA(PM0_DATA, PM0_IN, PM0_OUT),
  420. /* PN GPIO */
  421. PINMUX_DATA(PN7_DATA, PN7_IN, PN7_OUT),
  422. PINMUX_DATA(PN6_DATA, PN6_IN, PN6_OUT),
  423. PINMUX_DATA(PN5_DATA, PN5_IN, PN5_OUT),
  424. PINMUX_DATA(PN4_DATA, PN4_IN, PN4_OUT),
  425. PINMUX_DATA(PN3_DATA, PN3_IN, PN3_OUT),
  426. PINMUX_DATA(PN2_DATA, PN2_IN, PN2_OUT),
  427. PINMUX_DATA(PN1_DATA, PN1_IN, PN1_OUT),
  428. PINMUX_DATA(PN0_DATA, PN0_IN, PN0_OUT),
  429. /* PP GPIO */
  430. PINMUX_DATA(PP5_DATA, PP5_IN, PP5_OUT),
  431. PINMUX_DATA(PP4_DATA, PP4_IN, PP4_OUT),
  432. PINMUX_DATA(PP3_DATA, PP3_IN, PP3_OUT),
  433. PINMUX_DATA(PP2_DATA, PP2_IN, PP2_OUT),
  434. PINMUX_DATA(PP1_DATA, PP1_IN, PP1_OUT),
  435. PINMUX_DATA(PP0_DATA, PP0_IN, PP0_OUT),
  436. /* PQ GPIO */
  437. PINMUX_DATA(PQ4_DATA, PQ4_IN, PQ4_OUT),
  438. PINMUX_DATA(PQ3_DATA, PQ3_IN, PQ3_OUT),
  439. PINMUX_DATA(PQ2_DATA, PQ2_IN, PQ2_OUT),
  440. PINMUX_DATA(PQ1_DATA, PQ1_IN, PQ1_OUT),
  441. PINMUX_DATA(PQ0_DATA, PQ0_IN, PQ0_OUT),
  442. /* PR GPIO */
  443. PINMUX_DATA(PR3_DATA, PR3_IN, PR3_OUT),
  444. PINMUX_DATA(PR2_DATA, PR2_IN, PR2_OUT),
  445. PINMUX_DATA(PR1_DATA, PR1_IN, PR1_OUT),
  446. PINMUX_DATA(PR0_DATA, PR0_IN, PR0_OUT),
  447. /* PA FN */
  448. PINMUX_DATA(D63_AD31_MARK, PA7_FN),
  449. PINMUX_DATA(D62_AD30_MARK, PA6_FN),
  450. PINMUX_DATA(D61_AD29_MARK, PA5_FN),
  451. PINMUX_DATA(D60_AD28_MARK, PA4_FN),
  452. PINMUX_DATA(D59_AD27_MARK, PA3_FN),
  453. PINMUX_DATA(D58_AD26_MARK, PA2_FN),
  454. PINMUX_DATA(D57_AD25_MARK, PA1_FN),
  455. PINMUX_DATA(D56_AD24_MARK, PA0_FN),
  456. /* PB FN */
  457. PINMUX_DATA(D55_AD23_MARK, PB7_FN),
  458. PINMUX_DATA(D54_AD22_MARK, PB6_FN),
  459. PINMUX_DATA(D53_AD21_MARK, PB5_FN),
  460. PINMUX_DATA(D52_AD20_MARK, PB4_FN),
  461. PINMUX_DATA(D51_AD19_MARK, PB3_FN),
  462. PINMUX_DATA(D50_AD18_MARK, PB2_FN),
  463. PINMUX_DATA(D49_AD17_DB5_MARK, PB1_FN),
  464. PINMUX_DATA(D48_AD16_DB4_MARK, PB0_FN),
  465. /* PC FN */
  466. PINMUX_DATA(D47_AD15_DB3_MARK, PC7_FN),
  467. PINMUX_DATA(D46_AD14_DB2_MARK, PC6_FN),
  468. PINMUX_DATA(D45_AD13_DB1_MARK, PC5_FN),
  469. PINMUX_DATA(D44_AD12_DB0_MARK, PC4_FN),
  470. PINMUX_DATA(D43_AD11_DG5_MARK, PC3_FN),
  471. PINMUX_DATA(D42_AD10_DG4_MARK, PC2_FN),
  472. PINMUX_DATA(D41_AD9_DG3_MARK, PC1_FN),
  473. PINMUX_DATA(D40_AD8_DG2_MARK, PC0_FN),
  474. /* PD FN */
  475. PINMUX_DATA(D39_AD7_DG1_MARK, PD7_FN),
  476. PINMUX_DATA(D38_AD6_DG0_MARK, PD6_FN),
  477. PINMUX_DATA(D37_AD5_DR5_MARK, PD5_FN),
  478. PINMUX_DATA(D36_AD4_DR4_MARK, PD4_FN),
  479. PINMUX_DATA(D35_AD3_DR3_MARK, PD3_FN),
  480. PINMUX_DATA(D34_AD2_DR2_MARK, PD2_FN),
  481. PINMUX_DATA(D33_AD1_DR1_MARK, PD1_FN),
  482. PINMUX_DATA(D32_AD0_DR0_MARK, PD0_FN),
  483. /* PE FN */
  484. PINMUX_DATA(REQ1_MARK, PE5_FN),
  485. PINMUX_DATA(REQ2_MARK, PE4_FN),
  486. PINMUX_DATA(REQ3_MARK, P2MSEL0_0, PE3_FN),
  487. PINMUX_DATA(GNT1_MARK, PE2_FN),
  488. PINMUX_DATA(GNT2_MARK, PE1_FN),
  489. PINMUX_DATA(GNT3_MARK, P2MSEL0_0, PE0_FN),
  490. PINMUX_DATA(MMCCLK_MARK, P2MSEL0_1, PE0_FN),
  491. /* PF FN */
  492. PINMUX_DATA(D31_MARK, PF7_FN),
  493. PINMUX_DATA(D30_MARK, PF6_FN),
  494. PINMUX_DATA(D29_MARK, PF5_FN),
  495. PINMUX_DATA(D28_MARK, PF4_FN),
  496. PINMUX_DATA(D27_MARK, PF3_FN),
  497. PINMUX_DATA(D26_MARK, PF2_FN),
  498. PINMUX_DATA(D25_MARK, PF1_FN),
  499. PINMUX_DATA(D24_MARK, PF0_FN),
  500. /* PF FN */
  501. PINMUX_DATA(D23_MARK, PG7_FN),
  502. PINMUX_DATA(D22_MARK, PG6_FN),
  503. PINMUX_DATA(D21_MARK, PG5_FN),
  504. PINMUX_DATA(D20_MARK, PG4_FN),
  505. PINMUX_DATA(D19_MARK, PG3_FN),
  506. PINMUX_DATA(D18_MARK, PG2_FN),
  507. PINMUX_DATA(D17_MARK, PG1_FN),
  508. PINMUX_DATA(D16_MARK, PG0_FN),
  509. /* PH FN */
  510. PINMUX_DATA(SCIF1_SCK_MARK, PH7_FN),
  511. PINMUX_DATA(SCIF1_RXD_MARK, PH6_FN),
  512. PINMUX_DATA(SCIF1_TXD_MARK, PH5_FN),
  513. PINMUX_DATA(SCIF0_CTS_MARK, PH4_FN),
  514. PINMUX_DATA(INTD_MARK, P1MSEL7_1, PH4_FN),
  515. PINMUX_DATA(FCE_MARK, P1MSEL8_1, P1MSEL7_0, PH4_FN),
  516. PINMUX_DATA(SCIF0_RTS_MARK, P1MSEL8_0, P1MSEL7_0, PH3_FN),
  517. PINMUX_DATA(HSPI_CS_MARK, P1MSEL8_0, P1MSEL7_1, PH3_FN),
  518. PINMUX_DATA(FSE_MARK, P1MSEL8_1, P1MSEL7_0, PH3_FN),
  519. PINMUX_DATA(SCIF0_SCK_MARK, P1MSEL8_0, P1MSEL7_0, PH2_FN),
  520. PINMUX_DATA(HSPI_CLK_MARK, P1MSEL8_0, P1MSEL7_1, PH2_FN),
  521. PINMUX_DATA(FRE_MARK, P1MSEL8_1, P1MSEL7_0, PH2_FN),
  522. PINMUX_DATA(SCIF0_RXD_MARK, P1MSEL8_0, P1MSEL7_0, PH1_FN),
  523. PINMUX_DATA(HSPI_RX_MARK, P1MSEL8_0, P1MSEL7_1, PH1_FN),
  524. PINMUX_DATA(FRB_MARK, P1MSEL8_1, P1MSEL7_0, PH1_FN),
  525. PINMUX_DATA(SCIF0_TXD_MARK, P1MSEL8_0, P1MSEL7_0, PH0_FN),
  526. PINMUX_DATA(HSPI_TX_MARK, P1MSEL8_0, P1MSEL7_1, PH0_FN),
  527. PINMUX_DATA(FWE_MARK, P1MSEL8_1, P1MSEL7_0, PH0_FN),
  528. /* PJ FN */
  529. PINMUX_DATA(SCIF5_TXD_MARK, P1MSEL2_0, P1MSEL1_0, PJ7_FN),
  530. PINMUX_DATA(HAC1_SYNC_MARK, P1MSEL2_0, P1MSEL1_1, PJ7_FN),
  531. PINMUX_DATA(SSI1_WS_MARK, P1MSEL2_1, P1MSEL1_0, PJ7_FN),
  532. PINMUX_DATA(SIOF_TXD_PJ_MARK, P2MSEL1_0, P1MSEL4_0, P1MSEL3_0, PJ6_FN),
  533. PINMUX_DATA(HAC0_SDOUT_MARK, P1MSEL4_0, P1MSEL3_1, PJ6_FN),
  534. PINMUX_DATA(SSI0_SDATA_MARK, P1MSEL4_1, P1MSEL3_0, PJ6_FN),
  535. PINMUX_DATA(SIOF_RXD_PJ_MARK, P2MSEL1_0, P1MSEL4_0, P1MSEL3_0, PJ5_FN),
  536. PINMUX_DATA(HAC0_SDIN_MARK, P1MSEL4_0, P1MSEL3_1, PJ5_FN),
  537. PINMUX_DATA(SSI0_SCK_MARK, P1MSEL4_1, P1MSEL3_0, PJ5_FN),
  538. PINMUX_DATA(SIOF_SYNC_PJ_MARK, P2MSEL1_0, P1MSEL4_0, P1MSEL3_0, PJ4_FN),
  539. PINMUX_DATA(HAC0_SYNC_MARK, P1MSEL4_0, P1MSEL3_1, PJ4_FN),
  540. PINMUX_DATA(SSI0_WS_MARK, P1MSEL4_1, P1MSEL3_0, PJ4_FN),
  541. PINMUX_DATA(SIOF_MCLK_PJ_MARK, P2MSEL1_0, P1MSEL4_0, P1MSEL3_0, PJ3_FN),
  542. PINMUX_DATA(HAC_RES_MARK, P1MSEL4_0, P1MSEL3_1, PJ3_FN),
  543. PINMUX_DATA(SIOF_SCK_PJ_MARK, P2MSEL1_0, P1MSEL4_0, P1MSEL3_0, PJ2_FN),
  544. PINMUX_DATA(HAC0_BITCLK_MARK, P1MSEL4_0, P1MSEL3_1, PJ2_FN),
  545. PINMUX_DATA(SSI0_CLK_MARK, P1MSEL4_1, P1MSEL3_0, PJ2_FN),
  546. PINMUX_DATA(HAC1_BITCLK_MARK, P1MSEL2_0, PJ1_FN),
  547. PINMUX_DATA(SSI1_CLK_MARK, P1MSEL2_1, P1MSEL1_0, PJ1_FN),
  548. PINMUX_DATA(TCLK_MARK, P1MSEL9_0, PJ0_FN),
  549. PINMUX_DATA(IOIS16_MARK, P1MSEL9_1, PJ0_FN),
  550. /* PK FN */
  551. PINMUX_DATA(STATUS0_MARK, P1MSEL15_0, PK7_FN),
  552. PINMUX_DATA(DRAK0_PK3_MARK, P1MSEL15_1, PK7_FN),
  553. PINMUX_DATA(STATUS1_MARK, P1MSEL15_0, PK6_FN),
  554. PINMUX_DATA(DRAK1_PK2_MARK, P1MSEL15_1, PK6_FN),
  555. PINMUX_DATA(DACK2_MARK, P1MSEL12_0, P1MSEL11_0, PK5_FN),
  556. PINMUX_DATA(SCIF2_TXD_MARK, P1MSEL12_1, P1MSEL11_0, PK5_FN),
  557. PINMUX_DATA(MMCCMD_MARK, P1MSEL12_1, P1MSEL11_1, PK5_FN),
  558. PINMUX_DATA(SIOF_TXD_PK_MARK, P2MSEL1_1,
  559. P1MSEL12_0, P1MSEL11_1, PK5_FN),
  560. PINMUX_DATA(DACK3_MARK, P1MSEL12_0, P1MSEL11_0, PK4_FN),
  561. PINMUX_DATA(SCIF2_SCK_MARK, P1MSEL12_1, P1MSEL11_0, PK4_FN),
  562. PINMUX_DATA(MMCDAT_MARK, P1MSEL12_1, P1MSEL11_1, PK4_FN),
  563. PINMUX_DATA(SIOF_SCK_PK_MARK, P2MSEL1_1,
  564. P1MSEL12_0, P1MSEL11_1, PK4_FN),
  565. PINMUX_DATA(DREQ0_MARK, PK3_FN),
  566. PINMUX_DATA(DREQ1_MARK, PK2_FN),
  567. PINMUX_DATA(DRAK0_PK1_MARK, PK1_FN),
  568. PINMUX_DATA(DRAK1_PK0_MARK, PK0_FN),
  569. /* PL FN */
  570. PINMUX_DATA(DREQ2_MARK, P1MSEL13_0, PL7_FN),
  571. PINMUX_DATA(INTB_MARK, P1MSEL13_1, PL7_FN),
  572. PINMUX_DATA(DREQ3_MARK, P1MSEL13_0, PL6_FN),
  573. PINMUX_DATA(INTC_MARK, P1MSEL13_1, PL6_FN),
  574. PINMUX_DATA(DRAK2_MARK, P1MSEL10_0, PL5_FN),
  575. PINMUX_DATA(CE2A_MARK, P1MSEL10_1, PL5_FN),
  576. PINMUX_DATA(IRL4_MARK, P1MSEL14_0, PL4_FN),
  577. PINMUX_DATA(FD4_MARK, P1MSEL14_1, PL4_FN),
  578. PINMUX_DATA(IRL5_MARK, P1MSEL14_0, PL3_FN),
  579. PINMUX_DATA(FD5_MARK, P1MSEL14_1, PL3_FN),
  580. PINMUX_DATA(IRL6_MARK, P1MSEL14_0, PL2_FN),
  581. PINMUX_DATA(FD6_MARK, P1MSEL14_1, PL2_FN),
  582. PINMUX_DATA(IRL7_MARK, P1MSEL14_0, PL1_FN),
  583. PINMUX_DATA(FD7_MARK, P1MSEL14_1, PL1_FN),
  584. PINMUX_DATA(DRAK3_MARK, P1MSEL10_0, PL0_FN),
  585. PINMUX_DATA(CE2B_MARK, P1MSEL10_1, PL0_FN),
  586. /* PM FN */
  587. PINMUX_DATA(BREQ_BSACK_MARK, PM1_FN),
  588. PINMUX_DATA(BACK_BSREQ_MARK, PM0_FN),
  589. /* PN FN */
  590. PINMUX_DATA(SCIF5_RXD_MARK, P1MSEL2_0, P1MSEL1_0, PN7_FN),
  591. PINMUX_DATA(HAC1_SDIN_MARK, P1MSEL2_0, P1MSEL1_1, PN7_FN),
  592. PINMUX_DATA(SSI1_SCK_MARK, P1MSEL2_1, P1MSEL1_0, PN7_FN),
  593. PINMUX_DATA(SCIF5_SCK_MARK, P1MSEL2_0, P1MSEL1_0, PN6_FN),
  594. PINMUX_DATA(HAC1_SDOUT_MARK, P1MSEL2_0, P1MSEL1_1, PN6_FN),
  595. PINMUX_DATA(SSI1_SDATA_MARK, P1MSEL2_1, P1MSEL1_0, PN6_FN),
  596. PINMUX_DATA(SCIF3_TXD_MARK, P1MSEL0_0, PN5_FN),
  597. PINMUX_DATA(FCLE_MARK, P1MSEL0_1, PN5_FN),
  598. PINMUX_DATA(SCIF3_RXD_MARK, P1MSEL0_0, PN4_FN),
  599. PINMUX_DATA(FALE_MARK, P1MSEL0_1, PN4_FN),
  600. PINMUX_DATA(SCIF3_SCK_MARK, P1MSEL0_0, PN3_FN),
  601. PINMUX_DATA(FD0_MARK, P1MSEL0_1, PN3_FN),
  602. PINMUX_DATA(SCIF4_TXD_MARK, P1MSEL0_0, PN2_FN),
  603. PINMUX_DATA(FD1_MARK, P1MSEL0_1, PN2_FN),
  604. PINMUX_DATA(SCIF4_RXD_MARK, P1MSEL0_0, PN1_FN),
  605. PINMUX_DATA(FD2_MARK, P1MSEL0_1, PN1_FN),
  606. PINMUX_DATA(SCIF4_SCK_MARK, P1MSEL0_0, PN0_FN),
  607. PINMUX_DATA(FD3_MARK, P1MSEL0_1, PN0_FN),
  608. /* PP FN */
  609. PINMUX_DATA(DEVSEL_DCLKOUT_MARK, PP5_FN),
  610. PINMUX_DATA(STOP_CDE_MARK, PP4_FN),
  611. PINMUX_DATA(LOCK_ODDF_MARK, PP3_FN),
  612. PINMUX_DATA(TRDY_DISPL_MARK, PP2_FN),
  613. PINMUX_DATA(IRDY_HSYNC_MARK, PP1_FN),
  614. PINMUX_DATA(PCIFRAME_VSYNC_MARK, PP0_FN),
  615. /* PQ FN */
  616. PINMUX_DATA(INTA_MARK, PQ4_FN),
  617. PINMUX_DATA(GNT0_GNTIN_MARK, PQ3_FN),
  618. PINMUX_DATA(REQ0_REQOUT_MARK, PQ2_FN),
  619. PINMUX_DATA(PERR_MARK, PQ1_FN),
  620. PINMUX_DATA(SERR_MARK, PQ0_FN),
  621. /* PR FN */
  622. PINMUX_DATA(WE7_CBE3_MARK, PR3_FN),
  623. PINMUX_DATA(WE6_CBE2_MARK, PR2_FN),
  624. PINMUX_DATA(WE5_CBE1_MARK, PR1_FN),
  625. PINMUX_DATA(WE4_CBE0_MARK, PR0_FN),
  626. /* MISC FN */
  627. PINMUX_DATA(SCIF2_RXD_MARK, P1MSEL6_0, P1MSEL5_0),
  628. PINMUX_DATA(SIOF_RXD_MARK, P2MSEL1_1, P1MSEL6_1, P1MSEL5_0),
  629. PINMUX_DATA(MRESETOUT_MARK, P2MSEL2_0),
  630. PINMUX_DATA(IRQOUT_MARK, P2MSEL2_1),
  631. };
  632. static const struct sh_pfc_pin pinmux_pins[] = {
  633. /* PA */
  634. PINMUX_GPIO(PA7),
  635. PINMUX_GPIO(PA6),
  636. PINMUX_GPIO(PA5),
  637. PINMUX_GPIO(PA4),
  638. PINMUX_GPIO(PA3),
  639. PINMUX_GPIO(PA2),
  640. PINMUX_GPIO(PA1),
  641. PINMUX_GPIO(PA0),
  642. /* PB */
  643. PINMUX_GPIO(PB7),
  644. PINMUX_GPIO(PB6),
  645. PINMUX_GPIO(PB5),
  646. PINMUX_GPIO(PB4),
  647. PINMUX_GPIO(PB3),
  648. PINMUX_GPIO(PB2),
  649. PINMUX_GPIO(PB1),
  650. PINMUX_GPIO(PB0),
  651. /* PC */
  652. PINMUX_GPIO(PC7),
  653. PINMUX_GPIO(PC6),
  654. PINMUX_GPIO(PC5),
  655. PINMUX_GPIO(PC4),
  656. PINMUX_GPIO(PC3),
  657. PINMUX_GPIO(PC2),
  658. PINMUX_GPIO(PC1),
  659. PINMUX_GPIO(PC0),
  660. /* PD */
  661. PINMUX_GPIO(PD7),
  662. PINMUX_GPIO(PD6),
  663. PINMUX_GPIO(PD5),
  664. PINMUX_GPIO(PD4),
  665. PINMUX_GPIO(PD3),
  666. PINMUX_GPIO(PD2),
  667. PINMUX_GPIO(PD1),
  668. PINMUX_GPIO(PD0),
  669. /* PE */
  670. PINMUX_GPIO(PE5),
  671. PINMUX_GPIO(PE4),
  672. PINMUX_GPIO(PE3),
  673. PINMUX_GPIO(PE2),
  674. PINMUX_GPIO(PE1),
  675. PINMUX_GPIO(PE0),
  676. /* PF */
  677. PINMUX_GPIO(PF7),
  678. PINMUX_GPIO(PF6),
  679. PINMUX_GPIO(PF5),
  680. PINMUX_GPIO(PF4),
  681. PINMUX_GPIO(PF3),
  682. PINMUX_GPIO(PF2),
  683. PINMUX_GPIO(PF1),
  684. PINMUX_GPIO(PF0),
  685. /* PG */
  686. PINMUX_GPIO(PG7),
  687. PINMUX_GPIO(PG6),
  688. PINMUX_GPIO(PG5),
  689. PINMUX_GPIO(PG4),
  690. PINMUX_GPIO(PG3),
  691. PINMUX_GPIO(PG2),
  692. PINMUX_GPIO(PG1),
  693. PINMUX_GPIO(PG0),
  694. /* PH */
  695. PINMUX_GPIO(PH7),
  696. PINMUX_GPIO(PH6),
  697. PINMUX_GPIO(PH5),
  698. PINMUX_GPIO(PH4),
  699. PINMUX_GPIO(PH3),
  700. PINMUX_GPIO(PH2),
  701. PINMUX_GPIO(PH1),
  702. PINMUX_GPIO(PH0),
  703. /* PJ */
  704. PINMUX_GPIO(PJ7),
  705. PINMUX_GPIO(PJ6),
  706. PINMUX_GPIO(PJ5),
  707. PINMUX_GPIO(PJ4),
  708. PINMUX_GPIO(PJ3),
  709. PINMUX_GPIO(PJ2),
  710. PINMUX_GPIO(PJ1),
  711. PINMUX_GPIO(PJ0),
  712. /* PK */
  713. PINMUX_GPIO(PK7),
  714. PINMUX_GPIO(PK6),
  715. PINMUX_GPIO(PK5),
  716. PINMUX_GPIO(PK4),
  717. PINMUX_GPIO(PK3),
  718. PINMUX_GPIO(PK2),
  719. PINMUX_GPIO(PK1),
  720. PINMUX_GPIO(PK0),
  721. /* PL */
  722. PINMUX_GPIO(PL7),
  723. PINMUX_GPIO(PL6),
  724. PINMUX_GPIO(PL5),
  725. PINMUX_GPIO(PL4),
  726. PINMUX_GPIO(PL3),
  727. PINMUX_GPIO(PL2),
  728. PINMUX_GPIO(PL1),
  729. PINMUX_GPIO(PL0),
  730. /* PM */
  731. PINMUX_GPIO(PM1),
  732. PINMUX_GPIO(PM0),
  733. /* PN */
  734. PINMUX_GPIO(PN7),
  735. PINMUX_GPIO(PN6),
  736. PINMUX_GPIO(PN5),
  737. PINMUX_GPIO(PN4),
  738. PINMUX_GPIO(PN3),
  739. PINMUX_GPIO(PN2),
  740. PINMUX_GPIO(PN1),
  741. PINMUX_GPIO(PN0),
  742. /* PP */
  743. PINMUX_GPIO(PP5),
  744. PINMUX_GPIO(PP4),
  745. PINMUX_GPIO(PP3),
  746. PINMUX_GPIO(PP2),
  747. PINMUX_GPIO(PP1),
  748. PINMUX_GPIO(PP0),
  749. /* PQ */
  750. PINMUX_GPIO(PQ4),
  751. PINMUX_GPIO(PQ3),
  752. PINMUX_GPIO(PQ2),
  753. PINMUX_GPIO(PQ1),
  754. PINMUX_GPIO(PQ0),
  755. /* PR */
  756. PINMUX_GPIO(PR3),
  757. PINMUX_GPIO(PR2),
  758. PINMUX_GPIO(PR1),
  759. PINMUX_GPIO(PR0),
  760. };
  761. #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
  762. static const struct pinmux_func pinmux_func_gpios[] = {
  763. /* FN */
  764. GPIO_FN(D63_AD31),
  765. GPIO_FN(D62_AD30),
  766. GPIO_FN(D61_AD29),
  767. GPIO_FN(D60_AD28),
  768. GPIO_FN(D59_AD27),
  769. GPIO_FN(D58_AD26),
  770. GPIO_FN(D57_AD25),
  771. GPIO_FN(D56_AD24),
  772. GPIO_FN(D55_AD23),
  773. GPIO_FN(D54_AD22),
  774. GPIO_FN(D53_AD21),
  775. GPIO_FN(D52_AD20),
  776. GPIO_FN(D51_AD19),
  777. GPIO_FN(D50_AD18),
  778. GPIO_FN(D49_AD17_DB5),
  779. GPIO_FN(D48_AD16_DB4),
  780. GPIO_FN(D47_AD15_DB3),
  781. GPIO_FN(D46_AD14_DB2),
  782. GPIO_FN(D45_AD13_DB1),
  783. GPIO_FN(D44_AD12_DB0),
  784. GPIO_FN(D43_AD11_DG5),
  785. GPIO_FN(D42_AD10_DG4),
  786. GPIO_FN(D41_AD9_DG3),
  787. GPIO_FN(D40_AD8_DG2),
  788. GPIO_FN(D39_AD7_DG1),
  789. GPIO_FN(D38_AD6_DG0),
  790. GPIO_FN(D37_AD5_DR5),
  791. GPIO_FN(D36_AD4_DR4),
  792. GPIO_FN(D35_AD3_DR3),
  793. GPIO_FN(D34_AD2_DR2),
  794. GPIO_FN(D33_AD1_DR1),
  795. GPIO_FN(D32_AD0_DR0),
  796. GPIO_FN(REQ1),
  797. GPIO_FN(REQ2),
  798. GPIO_FN(REQ3),
  799. GPIO_FN(GNT1),
  800. GPIO_FN(GNT2),
  801. GPIO_FN(GNT3),
  802. GPIO_FN(MMCCLK),
  803. GPIO_FN(D31),
  804. GPIO_FN(D30),
  805. GPIO_FN(D29),
  806. GPIO_FN(D28),
  807. GPIO_FN(D27),
  808. GPIO_FN(D26),
  809. GPIO_FN(D25),
  810. GPIO_FN(D24),
  811. GPIO_FN(D23),
  812. GPIO_FN(D22),
  813. GPIO_FN(D21),
  814. GPIO_FN(D20),
  815. GPIO_FN(D19),
  816. GPIO_FN(D18),
  817. GPIO_FN(D17),
  818. GPIO_FN(D16),
  819. GPIO_FN(SCIF1_SCK),
  820. GPIO_FN(SCIF1_RXD),
  821. GPIO_FN(SCIF1_TXD),
  822. GPIO_FN(SCIF0_CTS),
  823. GPIO_FN(INTD),
  824. GPIO_FN(FCE),
  825. GPIO_FN(SCIF0_RTS),
  826. GPIO_FN(HSPI_CS),
  827. GPIO_FN(FSE),
  828. GPIO_FN(SCIF0_SCK),
  829. GPIO_FN(HSPI_CLK),
  830. GPIO_FN(FRE),
  831. GPIO_FN(SCIF0_RXD),
  832. GPIO_FN(HSPI_RX),
  833. GPIO_FN(FRB),
  834. GPIO_FN(SCIF0_TXD),
  835. GPIO_FN(HSPI_TX),
  836. GPIO_FN(FWE),
  837. GPIO_FN(SCIF5_TXD),
  838. GPIO_FN(HAC1_SYNC),
  839. GPIO_FN(SSI1_WS),
  840. GPIO_FN(SIOF_TXD_PJ),
  841. GPIO_FN(HAC0_SDOUT),
  842. GPIO_FN(SSI0_SDATA),
  843. GPIO_FN(SIOF_RXD_PJ),
  844. GPIO_FN(HAC0_SDIN),
  845. GPIO_FN(SSI0_SCK),
  846. GPIO_FN(SIOF_SYNC_PJ),
  847. GPIO_FN(HAC0_SYNC),
  848. GPIO_FN(SSI0_WS),
  849. GPIO_FN(SIOF_MCLK_PJ),
  850. GPIO_FN(HAC_RES),
  851. GPIO_FN(SIOF_SCK_PJ),
  852. GPIO_FN(HAC0_BITCLK),
  853. GPIO_FN(SSI0_CLK),
  854. GPIO_FN(HAC1_BITCLK),
  855. GPIO_FN(SSI1_CLK),
  856. GPIO_FN(TCLK),
  857. GPIO_FN(IOIS16),
  858. GPIO_FN(STATUS0),
  859. GPIO_FN(DRAK0_PK3),
  860. GPIO_FN(STATUS1),
  861. GPIO_FN(DRAK1_PK2),
  862. GPIO_FN(DACK2),
  863. GPIO_FN(SCIF2_TXD),
  864. GPIO_FN(MMCCMD),
  865. GPIO_FN(SIOF_TXD_PK),
  866. GPIO_FN(DACK3),
  867. GPIO_FN(SCIF2_SCK),
  868. GPIO_FN(MMCDAT),
  869. GPIO_FN(SIOF_SCK_PK),
  870. GPIO_FN(DREQ0),
  871. GPIO_FN(DREQ1),
  872. GPIO_FN(DRAK0_PK1),
  873. GPIO_FN(DRAK1_PK0),
  874. GPIO_FN(DREQ2),
  875. GPIO_FN(INTB),
  876. GPIO_FN(DREQ3),
  877. GPIO_FN(INTC),
  878. GPIO_FN(DRAK2),
  879. GPIO_FN(CE2A),
  880. GPIO_FN(IRL4),
  881. GPIO_FN(FD4),
  882. GPIO_FN(IRL5),
  883. GPIO_FN(FD5),
  884. GPIO_FN(IRL6),
  885. GPIO_FN(FD6),
  886. GPIO_FN(IRL7),
  887. GPIO_FN(FD7),
  888. GPIO_FN(DRAK3),
  889. GPIO_FN(CE2B),
  890. GPIO_FN(BREQ_BSACK),
  891. GPIO_FN(BACK_BSREQ),
  892. GPIO_FN(SCIF5_RXD),
  893. GPIO_FN(HAC1_SDIN),
  894. GPIO_FN(SSI1_SCK),
  895. GPIO_FN(SCIF5_SCK),
  896. GPIO_FN(HAC1_SDOUT),
  897. GPIO_FN(SSI1_SDATA),
  898. GPIO_FN(SCIF3_TXD),
  899. GPIO_FN(FCLE),
  900. GPIO_FN(SCIF3_RXD),
  901. GPIO_FN(FALE),
  902. GPIO_FN(SCIF3_SCK),
  903. GPIO_FN(FD0),
  904. GPIO_FN(SCIF4_TXD),
  905. GPIO_FN(FD1),
  906. GPIO_FN(SCIF4_RXD),
  907. GPIO_FN(FD2),
  908. GPIO_FN(SCIF4_SCK),
  909. GPIO_FN(FD3),
  910. GPIO_FN(DEVSEL_DCLKOUT),
  911. GPIO_FN(STOP_CDE),
  912. GPIO_FN(LOCK_ODDF),
  913. GPIO_FN(TRDY_DISPL),
  914. GPIO_FN(IRDY_HSYNC),
  915. GPIO_FN(PCIFRAME_VSYNC),
  916. GPIO_FN(INTA),
  917. GPIO_FN(GNT0_GNTIN),
  918. GPIO_FN(REQ0_REQOUT),
  919. GPIO_FN(PERR),
  920. GPIO_FN(SERR),
  921. GPIO_FN(WE7_CBE3),
  922. GPIO_FN(WE6_CBE2),
  923. GPIO_FN(WE5_CBE1),
  924. GPIO_FN(WE4_CBE0),
  925. GPIO_FN(SCIF2_RXD),
  926. GPIO_FN(SIOF_RXD),
  927. GPIO_FN(MRESETOUT),
  928. GPIO_FN(IRQOUT),
  929. };
  930. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  931. { PINMUX_CFG_REG("PACR", 0xffe70000, 16, 2) {
  932. PA7_FN, PA7_OUT, PA7_IN, 0,
  933. PA6_FN, PA6_OUT, PA6_IN, 0,
  934. PA5_FN, PA5_OUT, PA5_IN, 0,
  935. PA4_FN, PA4_OUT, PA4_IN, 0,
  936. PA3_FN, PA3_OUT, PA3_IN, 0,
  937. PA2_FN, PA2_OUT, PA2_IN, 0,
  938. PA1_FN, PA1_OUT, PA1_IN, 0,
  939. PA0_FN, PA0_OUT, PA0_IN, 0 }
  940. },
  941. { PINMUX_CFG_REG("PBCR", 0xffe70002, 16, 2) {
  942. PB7_FN, PB7_OUT, PB7_IN, 0,
  943. PB6_FN, PB6_OUT, PB6_IN, 0,
  944. PB5_FN, PB5_OUT, PB5_IN, 0,
  945. PB4_FN, PB4_OUT, PB4_IN, 0,
  946. PB3_FN, PB3_OUT, PB3_IN, 0,
  947. PB2_FN, PB2_OUT, PB2_IN, 0,
  948. PB1_FN, PB1_OUT, PB1_IN, 0,
  949. PB0_FN, PB0_OUT, PB0_IN, 0 }
  950. },
  951. { PINMUX_CFG_REG("PCCR", 0xffe70004, 16, 2) {
  952. PC7_FN, PC7_OUT, PC7_IN, 0,
  953. PC6_FN, PC6_OUT, PC6_IN, 0,
  954. PC5_FN, PC5_OUT, PC5_IN, 0,
  955. PC4_FN, PC4_OUT, PC4_IN, 0,
  956. PC3_FN, PC3_OUT, PC3_IN, 0,
  957. PC2_FN, PC2_OUT, PC2_IN, 0,
  958. PC1_FN, PC1_OUT, PC1_IN, 0,
  959. PC0_FN, PC0_OUT, PC0_IN, 0 }
  960. },
  961. { PINMUX_CFG_REG("PDCR", 0xffe70006, 16, 2) {
  962. PD7_FN, PD7_OUT, PD7_IN, 0,
  963. PD6_FN, PD6_OUT, PD6_IN, 0,
  964. PD5_FN, PD5_OUT, PD5_IN, 0,
  965. PD4_FN, PD4_OUT, PD4_IN, 0,
  966. PD3_FN, PD3_OUT, PD3_IN, 0,
  967. PD2_FN, PD2_OUT, PD2_IN, 0,
  968. PD1_FN, PD1_OUT, PD1_IN, 0,
  969. PD0_FN, PD0_OUT, PD0_IN, 0 }
  970. },
  971. { PINMUX_CFG_REG("PECR", 0xffe70008, 16, 2) {
  972. 0, 0, 0, 0,
  973. 0, 0, 0, 0,
  974. PE5_FN, PE5_OUT, PE5_IN, 0,
  975. PE4_FN, PE4_OUT, PE4_IN, 0,
  976. PE3_FN, PE3_OUT, PE3_IN, 0,
  977. PE2_FN, PE2_OUT, PE2_IN, 0,
  978. PE1_FN, PE1_OUT, PE1_IN, 0,
  979. PE0_FN, PE0_OUT, PE0_IN, 0 }
  980. },
  981. { PINMUX_CFG_REG("PFCR", 0xffe7000a, 16, 2) {
  982. PF7_FN, PF7_OUT, PF7_IN, 0,
  983. PF6_FN, PF6_OUT, PF6_IN, 0,
  984. PF5_FN, PF5_OUT, PF5_IN, 0,
  985. PF4_FN, PF4_OUT, PF4_IN, 0,
  986. PF3_FN, PF3_OUT, PF3_IN, 0,
  987. PF2_FN, PF2_OUT, PF2_IN, 0,
  988. PF1_FN, PF1_OUT, PF1_IN, 0,
  989. PF0_FN, PF0_OUT, PF0_IN, 0 }
  990. },
  991. { PINMUX_CFG_REG("PGCR", 0xffe7000c, 16, 2) {
  992. PG7_FN, PG7_OUT, PG7_IN, 0,
  993. PG6_FN, PG6_OUT, PG6_IN, 0,
  994. PG5_FN, PG5_OUT, PG5_IN, 0,
  995. PG4_FN, PG4_OUT, PG4_IN, 0,
  996. PG3_FN, PG3_OUT, PG3_IN, 0,
  997. PG2_FN, PG2_OUT, PG2_IN, 0,
  998. PG1_FN, PG1_OUT, PG1_IN, 0,
  999. PG0_FN, PG0_OUT, PG0_IN, 0 }
  1000. },
  1001. { PINMUX_CFG_REG("PHCR", 0xffe7000e, 16, 2) {
  1002. PH7_FN, PH7_OUT, PH7_IN, 0,
  1003. PH6_FN, PH6_OUT, PH6_IN, 0,
  1004. PH5_FN, PH5_OUT, PH5_IN, 0,
  1005. PH4_FN, PH4_OUT, PH4_IN, 0,
  1006. PH3_FN, PH3_OUT, PH3_IN, 0,
  1007. PH2_FN, PH2_OUT, PH2_IN, 0,
  1008. PH1_FN, PH1_OUT, PH1_IN, 0,
  1009. PH0_FN, PH0_OUT, PH0_IN, 0 }
  1010. },
  1011. { PINMUX_CFG_REG("PJCR", 0xffe70010, 16, 2) {
  1012. PJ7_FN, PJ7_OUT, PJ7_IN, 0,
  1013. PJ6_FN, PJ6_OUT, PJ6_IN, 0,
  1014. PJ5_FN, PJ5_OUT, PJ5_IN, 0,
  1015. PJ4_FN, PJ4_OUT, PJ4_IN, 0,
  1016. PJ3_FN, PJ3_OUT, PJ3_IN, 0,
  1017. PJ2_FN, PJ2_OUT, PJ2_IN, 0,
  1018. PJ1_FN, PJ1_OUT, PJ1_IN, 0,
  1019. PJ0_FN, PJ0_OUT, PJ0_IN, 0 }
  1020. },
  1021. { PINMUX_CFG_REG("PKCR", 0xffe70012, 16, 2) {
  1022. PK7_FN, PK7_OUT, PK7_IN, 0,
  1023. PK6_FN, PK6_OUT, PK6_IN, 0,
  1024. PK5_FN, PK5_OUT, PK5_IN, 0,
  1025. PK4_FN, PK4_OUT, PK4_IN, 0,
  1026. PK3_FN, PK3_OUT, PK3_IN, 0,
  1027. PK2_FN, PK2_OUT, PK2_IN, 0,
  1028. PK1_FN, PK1_OUT, PK1_IN, 0,
  1029. PK0_FN, PK0_OUT, PK0_IN, 0 }
  1030. },
  1031. { PINMUX_CFG_REG("PLCR", 0xffe70014, 16, 2) {
  1032. PL7_FN, PL7_OUT, PL7_IN, 0,
  1033. PL6_FN, PL6_OUT, PL6_IN, 0,
  1034. PL5_FN, PL5_OUT, PL5_IN, 0,
  1035. PL4_FN, PL4_OUT, PL4_IN, 0,
  1036. PL3_FN, PL3_OUT, PL3_IN, 0,
  1037. PL2_FN, PL2_OUT, PL2_IN, 0,
  1038. PL1_FN, PL1_OUT, PL1_IN, 0,
  1039. PL0_FN, PL0_OUT, PL0_IN, 0 }
  1040. },
  1041. { PINMUX_CFG_REG("PMCR", 0xffe70016, 16, 2) {
  1042. 0, 0, 0, 0,
  1043. 0, 0, 0, 0,
  1044. 0, 0, 0, 0,
  1045. 0, 0, 0, 0,
  1046. 0, 0, 0, 0,
  1047. 0, 0, 0, 0,
  1048. PM1_FN, PM1_OUT, PM1_IN, 0,
  1049. PM0_FN, PM0_OUT, PM0_IN, 0 }
  1050. },
  1051. { PINMUX_CFG_REG("PNCR", 0xffe70018, 16, 2) {
  1052. PN7_FN, PN7_OUT, PN7_IN, 0,
  1053. PN6_FN, PN6_OUT, PN6_IN, 0,
  1054. PN5_FN, PN5_OUT, PN5_IN, 0,
  1055. PN4_FN, PN4_OUT, PN4_IN, 0,
  1056. PN3_FN, PN3_OUT, PN3_IN, 0,
  1057. PN2_FN, PN2_OUT, PN2_IN, 0,
  1058. PN1_FN, PN1_OUT, PN1_IN, 0,
  1059. PN0_FN, PN0_OUT, PN0_IN, 0 }
  1060. },
  1061. { PINMUX_CFG_REG("PPCR", 0xffe7001a, 16, 2) {
  1062. 0, 0, 0, 0,
  1063. 0, 0, 0, 0,
  1064. PP5_FN, PP5_OUT, PP5_IN, 0,
  1065. PP4_FN, PP4_OUT, PP4_IN, 0,
  1066. PP3_FN, PP3_OUT, PP3_IN, 0,
  1067. PP2_FN, PP2_OUT, PP2_IN, 0,
  1068. PP1_FN, PP1_OUT, PP1_IN, 0,
  1069. PP0_FN, PP0_OUT, PP0_IN, 0 }
  1070. },
  1071. { PINMUX_CFG_REG("PQCR", 0xffe7001c, 16, 2) {
  1072. 0, 0, 0, 0,
  1073. 0, 0, 0, 0,
  1074. 0, 0, 0, 0,
  1075. PQ4_FN, PQ4_OUT, PQ4_IN, 0,
  1076. PQ3_FN, PQ3_OUT, PQ3_IN, 0,
  1077. PQ2_FN, PQ2_OUT, PQ2_IN, 0,
  1078. PQ1_FN, PQ1_OUT, PQ1_IN, 0,
  1079. PQ0_FN, PQ0_OUT, PQ0_IN, 0 }
  1080. },
  1081. { PINMUX_CFG_REG("PRCR", 0xffe7001e, 16, 2) {
  1082. 0, 0, 0, 0,
  1083. 0, 0, 0, 0,
  1084. 0, 0, 0, 0,
  1085. 0, 0, 0, 0,
  1086. PR3_FN, PR3_OUT, PR3_IN, 0,
  1087. PR2_FN, PR2_OUT, PR2_IN, 0,
  1088. PR1_FN, PR1_OUT, PR1_IN, 0,
  1089. PR0_FN, PR0_OUT, PR0_IN, 0 }
  1090. },
  1091. { PINMUX_CFG_REG("P1MSELR", 0xffe70080, 16, 1) {
  1092. P1MSEL15_0, P1MSEL15_1,
  1093. P1MSEL14_0, P1MSEL14_1,
  1094. P1MSEL13_0, P1MSEL13_1,
  1095. P1MSEL12_0, P1MSEL12_1,
  1096. P1MSEL11_0, P1MSEL11_1,
  1097. P1MSEL10_0, P1MSEL10_1,
  1098. P1MSEL9_0, P1MSEL9_1,
  1099. P1MSEL8_0, P1MSEL8_1,
  1100. P1MSEL7_0, P1MSEL7_1,
  1101. P1MSEL6_0, P1MSEL6_1,
  1102. P1MSEL5_0, 0,
  1103. P1MSEL4_0, P1MSEL4_1,
  1104. P1MSEL3_0, P1MSEL3_1,
  1105. P1MSEL2_0, P1MSEL2_1,
  1106. P1MSEL1_0, P1MSEL1_1,
  1107. P1MSEL0_0, P1MSEL0_1 }
  1108. },
  1109. { PINMUX_CFG_REG("P2MSELR", 0xffe70082, 16, 1) {
  1110. 0, 0,
  1111. 0, 0,
  1112. 0, 0,
  1113. 0, 0,
  1114. 0, 0,
  1115. 0, 0,
  1116. 0, 0,
  1117. 0, 0,
  1118. 0, 0,
  1119. 0, 0,
  1120. 0, 0,
  1121. 0, 0,
  1122. 0, 0,
  1123. P2MSEL2_0, P2MSEL2_1,
  1124. P2MSEL1_0, P2MSEL1_1,
  1125. P2MSEL0_0, P2MSEL0_1 }
  1126. },
  1127. {}
  1128. };
  1129. static const struct pinmux_data_reg pinmux_data_regs[] = {
  1130. { PINMUX_DATA_REG("PADR", 0xffe70020, 8) {
  1131. PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
  1132. PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA }
  1133. },
  1134. { PINMUX_DATA_REG("PBDR", 0xffe70022, 8) {
  1135. PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA,
  1136. PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA }
  1137. },
  1138. { PINMUX_DATA_REG("PCDR", 0xffe70024, 8) {
  1139. PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA,
  1140. PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA }
  1141. },
  1142. { PINMUX_DATA_REG("PDDR", 0xffe70026, 8) {
  1143. PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA,
  1144. PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA }
  1145. },
  1146. { PINMUX_DATA_REG("PEDR", 0xffe70028, 8) {
  1147. 0, 0, PE5_DATA, PE4_DATA,
  1148. PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA }
  1149. },
  1150. { PINMUX_DATA_REG("PFDR", 0xffe7002a, 8) {
  1151. PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA,
  1152. PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA }
  1153. },
  1154. { PINMUX_DATA_REG("PGDR", 0xffe7002c, 8) {
  1155. PG7_DATA, PG6_DATA, PG5_DATA, PG4_DATA,
  1156. PG3_DATA, PG2_DATA, PG1_DATA, PG0_DATA }
  1157. },
  1158. { PINMUX_DATA_REG("PHDR", 0xffe7002e, 8) {
  1159. PH7_DATA, PH6_DATA, PH5_DATA, PH4_DATA,
  1160. PH3_DATA, PH2_DATA, PH1_DATA, PH0_DATA }
  1161. },
  1162. { PINMUX_DATA_REG("PJDR", 0xffe70030, 8) {
  1163. PJ7_DATA, PJ6_DATA, PJ5_DATA, PJ4_DATA,
  1164. PJ3_DATA, PJ2_DATA, PJ1_DATA, PJ0_DATA }
  1165. },
  1166. { PINMUX_DATA_REG("PKDR", 0xffe70032, 8) {
  1167. PK7_DATA, PK6_DATA, PK5_DATA, PK4_DATA,
  1168. PK3_DATA, PK2_DATA, PK1_DATA, PK0_DATA }
  1169. },
  1170. { PINMUX_DATA_REG("PLDR", 0xffe70034, 8) {
  1171. PL7_DATA, PL6_DATA, PL5_DATA, PL4_DATA,
  1172. PL3_DATA, PL2_DATA, PL1_DATA, PL0_DATA }
  1173. },
  1174. { PINMUX_DATA_REG("PMDR", 0xffe70036, 8) {
  1175. 0, 0, 0, 0,
  1176. 0, 0, PM1_DATA, PM0_DATA }
  1177. },
  1178. { PINMUX_DATA_REG("PNDR", 0xffe70038, 8) {
  1179. PN7_DATA, PN6_DATA, PN5_DATA, PN4_DATA,
  1180. PN3_DATA, PN2_DATA, PN1_DATA, PN0_DATA }
  1181. },
  1182. { PINMUX_DATA_REG("PPDR", 0xffe7003a, 8) {
  1183. 0, 0, PP5_DATA, PP4_DATA,
  1184. PP3_DATA, PP2_DATA, PP1_DATA, PP0_DATA }
  1185. },
  1186. { PINMUX_DATA_REG("PQDR", 0xffe7003c, 8) {
  1187. 0, 0, 0, PQ4_DATA,
  1188. PQ3_DATA, PQ2_DATA, PQ1_DATA, PQ0_DATA }
  1189. },
  1190. { PINMUX_DATA_REG("PRDR", 0xffe7003e, 8) {
  1191. 0, 0, 0, 0,
  1192. PR3_DATA, PR2_DATA, PR1_DATA, PR0_DATA }
  1193. },
  1194. { },
  1195. };
  1196. const struct sh_pfc_soc_info sh7785_pinmux_info = {
  1197. .name = "sh7785_pfc",
  1198. .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
  1199. .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
  1200. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  1201. .pins = pinmux_pins,
  1202. .nr_pins = ARRAY_SIZE(pinmux_pins),
  1203. .func_gpios = pinmux_func_gpios,
  1204. .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
  1205. .cfg_regs = pinmux_config_regs,
  1206. .data_regs = pinmux_data_regs,
  1207. .pinmux_data = pinmux_data,
  1208. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  1209. };