pfc-r8a7778.c 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149
  1. /*
  2. * r8a7778 processor support - PFC hardware block
  3. *
  4. * Copyright (C) 2013 Renesas Solutions Corp.
  5. * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. * Copyright (C) 2013 Cogent Embedded, Inc.
  7. * Copyright (C) 2015 Ulrich Hecht
  8. *
  9. * based on
  10. * Copyright (C) 2011 Renesas Solutions Corp.
  11. * Copyright (C) 2011 Magnus Damm
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; version 2 of the License.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. */
  22. #include <linux/io.h>
  23. #include <linux/kernel.h>
  24. #include <linux/pinctrl/pinconf-generic.h>
  25. #include "sh_pfc.h"
  26. #define PORT_GP_PUP_1(bank, pin, fn, sfx) \
  27. PORT_GP_CFG_1(bank, pin, fn, sfx, SH_PFC_PIN_CFG_PULL_UP)
  28. #define PORT_GP_PUP_27(bank, fn, sfx) \
  29. PORT_GP_PUP_1(bank, 0, fn, sfx), PORT_GP_PUP_1(bank, 1, fn, sfx), \
  30. PORT_GP_PUP_1(bank, 2, fn, sfx), PORT_GP_PUP_1(bank, 3, fn, sfx), \
  31. PORT_GP_PUP_1(bank, 4, fn, sfx), PORT_GP_PUP_1(bank, 5, fn, sfx), \
  32. PORT_GP_PUP_1(bank, 6, fn, sfx), PORT_GP_PUP_1(bank, 7, fn, sfx), \
  33. PORT_GP_PUP_1(bank, 8, fn, sfx), PORT_GP_PUP_1(bank, 9, fn, sfx), \
  34. PORT_GP_PUP_1(bank, 10, fn, sfx), PORT_GP_PUP_1(bank, 11, fn, sfx), \
  35. PORT_GP_PUP_1(bank, 12, fn, sfx), PORT_GP_PUP_1(bank, 13, fn, sfx), \
  36. PORT_GP_PUP_1(bank, 14, fn, sfx), PORT_GP_PUP_1(bank, 15, fn, sfx), \
  37. PORT_GP_PUP_1(bank, 16, fn, sfx), PORT_GP_PUP_1(bank, 17, fn, sfx), \
  38. PORT_GP_PUP_1(bank, 18, fn, sfx), PORT_GP_PUP_1(bank, 19, fn, sfx), \
  39. PORT_GP_PUP_1(bank, 20, fn, sfx), PORT_GP_PUP_1(bank, 21, fn, sfx), \
  40. PORT_GP_PUP_1(bank, 22, fn, sfx), PORT_GP_PUP_1(bank, 23, fn, sfx), \
  41. PORT_GP_PUP_1(bank, 24, fn, sfx), PORT_GP_PUP_1(bank, 25, fn, sfx), \
  42. PORT_GP_PUP_1(bank, 26, fn, sfx)
  43. #define CPU_ALL_PORT(fn, sfx) \
  44. PORT_GP_CFG_32(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
  45. PORT_GP_CFG_32(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
  46. PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
  47. PORT_GP_CFG_32(3, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
  48. PORT_GP_PUP_27(4, fn, sfx)
  49. enum {
  50. PINMUX_RESERVED = 0,
  51. PINMUX_DATA_BEGIN,
  52. GP_ALL(DATA), /* GP_0_0_DATA -> GP_4_26_DATA */
  53. PINMUX_DATA_END,
  54. PINMUX_FUNCTION_BEGIN,
  55. GP_ALL(FN), /* GP_0_0_FN -> GP_4_26_FN */
  56. /* GPSR0 */
  57. FN_IP0_1_0, FN_PENC0, FN_PENC1, FN_IP0_4_2,
  58. FN_IP0_7_5, FN_IP0_11_8, FN_IP0_14_12, FN_A1,
  59. FN_A2, FN_A3, FN_IP0_15, FN_IP0_16,
  60. FN_IP0_17, FN_IP0_18, FN_IP0_19, FN_IP0_20,
  61. FN_IP0_21, FN_IP0_22, FN_IP0_23, FN_IP0_24,
  62. FN_IP0_25, FN_IP0_26, FN_IP0_27, FN_IP0_28,
  63. FN_IP0_29, FN_IP0_30, FN_IP1_0, FN_IP1_1,
  64. FN_IP1_4_2, FN_IP1_7_5, FN_IP1_10_8, FN_IP1_14_11,
  65. /* GPSR1 */
  66. FN_IP1_23_21, FN_WE0, FN_IP1_24, FN_IP1_27_25,
  67. FN_IP1_29_28, FN_IP2_2_0, FN_IP2_5_3, FN_IP2_8_6,
  68. FN_IP2_11_9, FN_IP2_13_12, FN_IP2_16_14, FN_IP2_17,
  69. FN_IP2_30, FN_IP2_31, FN_IP3_1_0, FN_IP3_4_2,
  70. FN_IP3_7_5, FN_IP3_9_8, FN_IP3_12_10, FN_IP3_15_13,
  71. FN_IP3_18_16, FN_IP3_20_19, FN_IP3_23_21, FN_IP3_26_24,
  72. FN_IP3_27, FN_IP3_28, FN_IP3_29, FN_IP3_30,
  73. FN_IP3_31, FN_IP4_0, FN_IP4_3_1, FN_IP4_6_4,
  74. /* GPSR2 */
  75. FN_IP4_7, FN_IP4_8, FN_IP4_10_9, FN_IP4_12_11,
  76. FN_IP4_14_13, FN_IP4_16_15, FN_IP4_20_17, FN_IP4_24_21,
  77. FN_IP4_26_25, FN_IP4_28_27, FN_IP4_30_29, FN_IP5_1_0,
  78. FN_IP5_3_2, FN_IP5_5_4, FN_IP5_6, FN_IP5_7,
  79. FN_IP5_9_8, FN_IP5_11_10, FN_IP5_12, FN_IP5_14_13,
  80. FN_IP5_17_15, FN_IP5_20_18, FN_AUDIO_CLKA, FN_AUDIO_CLKB,
  81. FN_IP5_22_21, FN_IP5_25_23, FN_IP5_28_26, FN_IP5_30_29,
  82. FN_IP6_1_0, FN_IP6_4_2, FN_IP6_6_5, FN_IP6_7,
  83. /* GPSR3 */
  84. FN_IP6_8, FN_IP6_9, FN_SSI_SCK34, FN_IP6_10,
  85. FN_IP6_12_11, FN_IP6_13, FN_IP6_15_14, FN_IP6_16,
  86. FN_IP6_18_17, FN_IP6_20_19, FN_IP6_21, FN_IP6_23_22,
  87. FN_IP6_25_24, FN_IP6_27_26, FN_IP6_29_28, FN_IP6_31_30,
  88. FN_IP7_1_0, FN_IP7_3_2, FN_IP7_5_4, FN_IP7_8_6,
  89. FN_IP7_11_9, FN_IP7_14_12, FN_IP7_17_15, FN_IP7_20_18,
  90. FN_IP7_21, FN_IP7_24_22, FN_IP7_28_25, FN_IP7_31_29,
  91. FN_IP8_2_0, FN_IP8_5_3, FN_IP8_8_6, FN_IP8_10_9,
  92. /* GPSR4 */
  93. FN_IP8_13_11, FN_IP8_15_14, FN_IP8_18_16, FN_IP8_21_19,
  94. FN_IP8_23_22, FN_IP8_26_24, FN_IP8_29_27, FN_IP9_2_0,
  95. FN_IP9_5_3, FN_IP9_8_6, FN_IP9_11_9, FN_IP9_14_12,
  96. FN_IP9_17_15, FN_IP9_20_18, FN_IP9_23_21, FN_IP9_26_24,
  97. FN_IP9_29_27, FN_IP10_2_0, FN_IP10_5_3, FN_IP10_8_6,
  98. FN_IP10_12_9, FN_IP10_15_13, FN_IP10_18_16, FN_IP10_21_19,
  99. FN_IP10_24_22, FN_AVS1, FN_AVS2,
  100. /* IPSR0 */
  101. FN_PRESETOUT, FN_PWM1, FN_AUDATA0, FN_ARM_TRACEDATA_0,
  102. FN_GPSCLK_C, FN_USB_OVC0, FN_TX2_E, FN_SDA2_B,
  103. FN_AUDATA1, FN_ARM_TRACEDATA_1, FN_GPSIN_C,
  104. FN_USB_OVC1, FN_RX2_E, FN_SCL2_B, FN_SD1_DAT2_A,
  105. FN_MMC_D2, FN_BS, FN_ATADIR0_A, FN_SDSELF_A,
  106. FN_PWM4_B, FN_SD1_DAT3_A, FN_MMC_D3, FN_A0,
  107. FN_ATAG0_A, FN_REMOCON_B, FN_A4, FN_A5,
  108. FN_A6, FN_A7, FN_A8, FN_A9,
  109. FN_A10, FN_A11, FN_A12, FN_A13,
  110. FN_A14, FN_A15, FN_A16, FN_A17,
  111. FN_A18, FN_A19,
  112. /* IPSR1 */
  113. FN_A20, FN_HSPI_CS1_B, FN_A21, FN_HSPI_CLK1_B,
  114. FN_A22, FN_HRTS0_B, FN_RX2_B, FN_DREQ2_A,
  115. FN_A23, FN_HTX0_B, FN_TX2_B, FN_DACK2_A,
  116. FN_TS_SDEN0_A, FN_SD1_CD_A, FN_MMC_D6, FN_A24,
  117. FN_DREQ1_A, FN_HRX0_B, FN_TS_SPSYNC0_A,
  118. FN_SD1_WP_A, FN_MMC_D7, FN_A25, FN_DACK1_A,
  119. FN_HCTS0_B, FN_RX3_C, FN_TS_SDAT0_A, FN_CLKOUT,
  120. FN_HSPI_TX1_B, FN_PWM0_B, FN_CS0, FN_HSPI_RX1_B,
  121. FN_SSI_SCK1_B, FN_ATAG0_B, FN_CS1_A26, FN_SDA2_A,
  122. FN_SCK2_B, FN_MMC_D5, FN_ATADIR0_B, FN_RD_WR,
  123. FN_WE1, FN_ATAWR0_B, FN_SSI_WS1_B, FN_EX_CS0,
  124. FN_SCL2_A, FN_TX3_C, FN_TS_SCK0_A, FN_EX_CS1,
  125. FN_MMC_D4,
  126. /* IPSR2 */
  127. FN_SD1_CLK_A, FN_MMC_CLK, FN_ATACS00, FN_EX_CS2,
  128. FN_SD1_CMD_A, FN_MMC_CMD, FN_ATACS10, FN_EX_CS3,
  129. FN_SD1_DAT0_A, FN_MMC_D0, FN_ATARD0, FN_EX_CS4,
  130. FN_EX_WAIT1_A, FN_SD1_DAT1_A, FN_MMC_D1, FN_ATAWR0_A,
  131. FN_EX_CS5, FN_EX_WAIT2_A, FN_DREQ0_A, FN_RX3_A,
  132. FN_DACK0, FN_TX3_A, FN_DRACK0, FN_EX_WAIT0,
  133. FN_PWM0_C, FN_D0, FN_D1, FN_D2,
  134. FN_D3, FN_D4, FN_D5, FN_D6,
  135. FN_D7, FN_D8, FN_D9, FN_D10,
  136. FN_D11, FN_RD_WR_B, FN_IRQ0, FN_MLB_CLK,
  137. FN_IRQ1_A,
  138. /* IPSR3 */
  139. FN_MLB_SIG, FN_RX5_B, FN_SDA3_A, FN_IRQ2_A,
  140. FN_MLB_DAT, FN_TX5_B, FN_SCL3_A, FN_IRQ3_A,
  141. FN_SDSELF_B, FN_SD1_CMD_B, FN_SCIF_CLK, FN_AUDIO_CLKOUT_B,
  142. FN_CAN_CLK_B, FN_SDA3_B, FN_SD1_CLK_B, FN_HTX0_A,
  143. FN_TX0_A, FN_SD1_DAT0_B, FN_HRX0_A, FN_RX0_A,
  144. FN_SD1_DAT1_B, FN_HSCK0, FN_SCK0, FN_SCL3_B,
  145. FN_SD1_DAT2_B, FN_HCTS0_A, FN_CTS0, FN_SD1_DAT3_B,
  146. FN_HRTS0_A, FN_RTS0, FN_SSI_SCK4, FN_DU0_DR0,
  147. FN_LCDOUT0, FN_AUDATA2, FN_ARM_TRACEDATA_2,
  148. FN_SDA3_C, FN_ADICHS1, FN_TS_SDEN0_B, FN_SSI_WS4,
  149. FN_DU0_DR1, FN_LCDOUT1, FN_AUDATA3, FN_ARM_TRACEDATA_3,
  150. FN_SCL3_C, FN_ADICHS2, FN_TS_SPSYNC0_B,
  151. FN_DU0_DR2, FN_LCDOUT2, FN_DU0_DR3, FN_LCDOUT3,
  152. FN_DU0_DR4, FN_LCDOUT4, FN_DU0_DR5, FN_LCDOUT5,
  153. FN_DU0_DR6, FN_LCDOUT6,
  154. /* IPSR4 */
  155. FN_DU0_DR7, FN_LCDOUT7, FN_DU0_DG0, FN_LCDOUT8,
  156. FN_AUDATA4, FN_ARM_TRACEDATA_4, FN_TX1_D,
  157. FN_CAN0_TX_A, FN_ADICHS0, FN_DU0_DG1, FN_LCDOUT9,
  158. FN_AUDATA5, FN_ARM_TRACEDATA_5, FN_RX1_D,
  159. FN_CAN0_RX_A, FN_ADIDATA, FN_DU0_DG2, FN_LCDOUT10,
  160. FN_DU0_DG3, FN_LCDOUT11, FN_DU0_DG4, FN_LCDOUT12,
  161. FN_RX0_B, FN_DU0_DG5, FN_LCDOUT13, FN_TX0_B,
  162. FN_DU0_DG6, FN_LCDOUT14, FN_RX4_A, FN_DU0_DG7,
  163. FN_LCDOUT15, FN_TX4_A, FN_SSI_SCK2_B, FN_VI0_R0_B,
  164. FN_DU0_DB0, FN_LCDOUT16, FN_AUDATA6, FN_ARM_TRACEDATA_6,
  165. FN_GPSCLK_A, FN_PWM0_A, FN_ADICLK, FN_TS_SDAT0_B,
  166. FN_AUDIO_CLKC, FN_VI0_R1_B, FN_DU0_DB1, FN_LCDOUT17,
  167. FN_AUDATA7, FN_ARM_TRACEDATA_7, FN_GPSIN_A,
  168. FN_ADICS_SAMP, FN_TS_SCK0_B, FN_VI0_R2_B, FN_DU0_DB2,
  169. FN_LCDOUT18, FN_VI0_R3_B, FN_DU0_DB3, FN_LCDOUT19,
  170. FN_VI0_R4_B, FN_DU0_DB4, FN_LCDOUT20,
  171. /* IPSR5 */
  172. FN_VI0_R5_B, FN_DU0_DB5, FN_LCDOUT21, FN_VI1_DATA10_B,
  173. FN_DU0_DB6, FN_LCDOUT22, FN_VI1_DATA11_B,
  174. FN_DU0_DB7, FN_LCDOUT23, FN_DU0_DOTCLKIN,
  175. FN_QSTVA_QVS, FN_DU0_DOTCLKO_UT0, FN_QCLK,
  176. FN_DU0_DOTCLKO_UT1, FN_QSTVB_QVE, FN_AUDIO_CLKOUT_A,
  177. FN_REMOCON_C, FN_SSI_WS2_B, FN_DU0_EXHSYNC_DU0_HSYNC,
  178. FN_QSTH_QHS, FN_DU0_EXVSYNC_DU0_VSYNC, FN_QSTB_QHE,
  179. FN_DU0_EXODDF_DU0_ODDF_DISP_CDE,
  180. FN_QCPV_QDE, FN_FMCLK_D, FN_SSI_SCK1_A, FN_DU0_DISP,
  181. FN_QPOLA, FN_AUDCK, FN_ARM_TRACECLK,
  182. FN_BPFCLK_D, FN_SSI_WS1_A, FN_DU0_CDE, FN_QPOLB,
  183. FN_AUDSYNC, FN_ARM_TRACECTL, FN_FMIN_D,
  184. FN_SD1_CD_B, FN_SSI_SCK78, FN_HSPI_RX0_B, FN_TX1_B,
  185. FN_SD1_WP_B, FN_SSI_WS78, FN_HSPI_CLK0_B, FN_RX1_B,
  186. FN_CAN_CLK_D, FN_SSI_SDATA8, FN_SSI_SCK2_A, FN_HSPI_CS0_B,
  187. FN_TX2_A, FN_CAN0_TX_B, FN_SSI_SDATA7, FN_HSPI_TX0_B,
  188. FN_RX2_A, FN_CAN0_RX_B,
  189. /* IPSR6 */
  190. FN_SSI_SCK6, FN_HSPI_RX2_A, FN_FMCLK_B, FN_CAN1_TX_B,
  191. FN_SSI_WS6, FN_HSPI_CLK2_A, FN_BPFCLK_B, FN_CAN1_RX_B,
  192. FN_SSI_SDATA6, FN_HSPI_TX2_A, FN_FMIN_B, FN_SSI_SCK5,
  193. FN_RX4_C, FN_SSI_WS5, FN_TX4_C, FN_SSI_SDATA5,
  194. FN_RX0_D, FN_SSI_WS34, FN_ARM_TRACEDATA_8,
  195. FN_SSI_SDATA4, FN_SSI_WS2_A, FN_ARM_TRACEDATA_9,
  196. FN_SSI_SDATA3, FN_ARM_TRACEDATA_10,
  197. FN_SSI_SCK012, FN_ARM_TRACEDATA_11,
  198. FN_TX0_D, FN_SSI_WS012, FN_ARM_TRACEDATA_12,
  199. FN_SSI_SDATA2, FN_HSPI_CS2_A, FN_ARM_TRACEDATA_13,
  200. FN_SDA1_A, FN_SSI_SDATA1, FN_ARM_TRACEDATA_14,
  201. FN_SCL1_A, FN_SCK2_A, FN_SSI_SDATA0,
  202. FN_ARM_TRACEDATA_15,
  203. FN_SD0_CLK, FN_SUB_TDO, FN_SD0_CMD, FN_SUB_TRST,
  204. FN_SD0_DAT0, FN_SUB_TMS, FN_SD0_DAT1, FN_SUB_TCK,
  205. FN_SD0_DAT2, FN_SUB_TDI,
  206. /* IPSR7 */
  207. FN_SD0_DAT3, FN_IRQ1_B, FN_SD0_CD, FN_TX5_A,
  208. FN_SD0_WP, FN_RX5_A, FN_VI1_CLKENB, FN_HSPI_CLK0_A,
  209. FN_HTX1_A, FN_RTS1_C, FN_VI1_FIELD, FN_HSPI_CS0_A,
  210. FN_HRX1_A, FN_SCK1_C, FN_VI1_HSYNC, FN_HSPI_RX0_A,
  211. FN_HRTS1_A, FN_FMCLK_A, FN_RX1_C, FN_VI1_VSYNC,
  212. FN_HSPI_TX0, FN_HCTS1_A, FN_BPFCLK_A, FN_TX1_C,
  213. FN_TCLK0, FN_HSCK1_A, FN_FMIN_A, FN_IRQ2_C,
  214. FN_CTS1_C, FN_SPEEDIN, FN_VI0_CLK, FN_CAN_CLK_A,
  215. FN_VI0_CLKENB, FN_SD2_DAT2_B, FN_VI1_DATA0, FN_DU1_DG6,
  216. FN_HSPI_RX1_A, FN_RX4_B, FN_VI0_FIELD, FN_SD2_DAT3_B,
  217. FN_VI0_R3_C, FN_VI1_DATA1, FN_DU1_DG7, FN_HSPI_CLK1_A,
  218. FN_TX4_B, FN_VI0_HSYNC, FN_SD2_CD_B, FN_VI1_DATA2,
  219. FN_DU1_DR2, FN_HSPI_CS1_A, FN_RX3_B,
  220. /* IPSR8 */
  221. FN_VI0_VSYNC, FN_SD2_WP_B, FN_VI1_DATA3, FN_DU1_DR3,
  222. FN_HSPI_TX1_A, FN_TX3_B, FN_VI0_DATA0_VI0_B0,
  223. FN_DU1_DG2, FN_IRQ2_B, FN_RX3_D, FN_VI0_DATA1_VI0_B1,
  224. FN_DU1_DG3, FN_IRQ3_B, FN_TX3_D, FN_VI0_DATA2_VI0_B2,
  225. FN_DU1_DG4, FN_RX0_C, FN_VI0_DATA3_VI0_B3,
  226. FN_DU1_DG5, FN_TX1_A, FN_TX0_C, FN_VI0_DATA4_VI0_B4,
  227. FN_DU1_DB2, FN_RX1_A, FN_VI0_DATA5_VI0_B5,
  228. FN_DU1_DB3, FN_SCK1_A, FN_PWM4, FN_HSCK1_B,
  229. FN_VI0_DATA6_VI0_G0, FN_DU1_DB4, FN_CTS1_A,
  230. FN_PWM5, FN_VI0_DATA7_VI0_G1, FN_DU1_DB5,
  231. FN_RTS1_A, FN_VI0_G2, FN_SD2_CLK_B, FN_VI1_DATA4,
  232. FN_DU1_DR4, FN_HTX1_B, FN_VI0_G3, FN_SD2_CMD_B,
  233. FN_VI1_DATA5, FN_DU1_DR5, FN_HRX1_B,
  234. /* IPSR9 */
  235. FN_VI0_G4, FN_SD2_DAT0_B, FN_VI1_DATA6, FN_DU1_DR6,
  236. FN_HRTS1_B, FN_VI0_G5, FN_SD2_DAT1_B, FN_VI1_DATA7,
  237. FN_DU1_DR7, FN_HCTS1_B, FN_VI0_R0_A, FN_VI1_CLK,
  238. FN_ETH_REF_CLK, FN_DU1_DOTCLKIN, FN_VI0_R1_A,
  239. FN_VI1_DATA8, FN_DU1_DB6, FN_ETH_TXD0, FN_PWM2,
  240. FN_TCLK1, FN_VI0_R2_A, FN_VI1_DATA9, FN_DU1_DB7,
  241. FN_ETH_TXD1, FN_PWM3, FN_VI0_R3_A, FN_ETH_CRS_DV,
  242. FN_IECLK, FN_SCK2_C, FN_VI0_R4_A, FN_ETH_TX_EN,
  243. FN_IETX, FN_TX2_C, FN_VI0_R5_A, FN_ETH_RX_ER,
  244. FN_FMCLK_C, FN_IERX, FN_RX2_C, FN_VI1_DATA10_A,
  245. FN_DU1_DOTCLKOUT, FN_ETH_RXD0, FN_BPFCLK_C,
  246. FN_TX2_D, FN_SDA2_C, FN_VI1_DATA11_A,
  247. FN_DU1_EXHSYNC_DU1_HSYNC, FN_ETH_RXD1, FN_FMIN_C,
  248. FN_RX2_D, FN_SCL2_C,
  249. /* IPSR10 */
  250. FN_SD2_CLK_A, FN_DU1_EXVSYNC_DU1_VSYNC, FN_ATARD1,
  251. FN_ETH_MDC, FN_SDA1_B, FN_SD2_CMD_A,
  252. FN_DU1_EXODDF_DU1_ODDF_DISP_CDE, FN_ATAWR1,
  253. FN_ETH_MDIO, FN_SCL1_B, FN_SD2_DAT0_A, FN_DU1_DISP,
  254. FN_ATACS01, FN_DREQ1_B, FN_ETH_LINK, FN_CAN1_RX_A,
  255. FN_SD2_DAT1_A, FN_DU1_CDE, FN_ATACS11, FN_DACK1_B,
  256. FN_ETH_MAGIC, FN_CAN1_TX_A, FN_PWM6, FN_SD2_DAT2_A,
  257. FN_VI1_DATA12, FN_DREQ2_B, FN_ATADIR1, FN_HSPI_CLK2_B,
  258. FN_GPSCLK_B, FN_SD2_DAT3_A, FN_VI1_DATA13, FN_DACK2_B,
  259. FN_ATAG1, FN_HSPI_CS2_B, FN_GPSIN_B, FN_SD2_CD_A,
  260. FN_VI1_DATA14, FN_EX_WAIT1_B, FN_DREQ0_B, FN_HSPI_RX2_B,
  261. FN_REMOCON_A, FN_SD2_WP_A, FN_VI1_DATA15, FN_EX_WAIT2_B,
  262. FN_DACK0_B, FN_HSPI_TX2_B, FN_CAN_CLK_C,
  263. /* SEL */
  264. FN_SEL_SCIF5_A, FN_SEL_SCIF5_B,
  265. FN_SEL_SCIF4_A, FN_SEL_SCIF4_B, FN_SEL_SCIF4_C,
  266. FN_SEL_SCIF3_A, FN_SEL_SCIF3_B, FN_SEL_SCIF3_C, FN_SEL_SCIF3_D,
  267. FN_SEL_SCIF2_A, FN_SEL_SCIF2_B, FN_SEL_SCIF2_C, FN_SEL_SCIF2_D, FN_SEL_SCIF2_E,
  268. FN_SEL_SCIF1_A, FN_SEL_SCIF1_B, FN_SEL_SCIF1_C, FN_SEL_SCIF1_D,
  269. FN_SEL_SCIF0_A, FN_SEL_SCIF0_B, FN_SEL_SCIF0_C, FN_SEL_SCIF0_D,
  270. FN_SEL_SSI2_A, FN_SEL_SSI2_B,
  271. FN_SEL_SSI1_A, FN_SEL_SSI1_B,
  272. FN_SEL_VI1_A, FN_SEL_VI1_B,
  273. FN_SEL_VI0_A, FN_SEL_VI0_B, FN_SEL_VI0_C, FN_SEL_VI0_D,
  274. FN_SEL_SD2_A, FN_SEL_SD2_B,
  275. FN_SEL_SD1_A, FN_SEL_SD1_B,
  276. FN_SEL_IRQ3_A, FN_SEL_IRQ3_B,
  277. FN_SEL_IRQ2_A, FN_SEL_IRQ2_B, FN_SEL_IRQ2_C,
  278. FN_SEL_IRQ1_A, FN_SEL_IRQ1_B,
  279. FN_SEL_DREQ2_A, FN_SEL_DREQ2_B,
  280. FN_SEL_DREQ1_A, FN_SEL_DREQ1_B,
  281. FN_SEL_DREQ0_A, FN_SEL_DREQ0_B,
  282. FN_SEL_WAIT2_A, FN_SEL_WAIT2_B,
  283. FN_SEL_WAIT1_A, FN_SEL_WAIT1_B,
  284. FN_SEL_CAN1_A, FN_SEL_CAN1_B,
  285. FN_SEL_CAN0_A, FN_SEL_CAN0_B,
  286. FN_SEL_CANCLK_A, FN_SEL_CANCLK_B,
  287. FN_SEL_CANCLK_C, FN_SEL_CANCLK_D,
  288. FN_SEL_HSCIF1_A, FN_SEL_HSCIF1_B,
  289. FN_SEL_HSCIF0_A, FN_SEL_HSCIF0_B,
  290. FN_SEL_REMOCON_A, FN_SEL_REMOCON_B, FN_SEL_REMOCON_C,
  291. FN_SEL_FM_A, FN_SEL_FM_B, FN_SEL_FM_C, FN_SEL_FM_D,
  292. FN_SEL_GPS_A, FN_SEL_GPS_B, FN_SEL_GPS_C,
  293. FN_SEL_TSIF0_A, FN_SEL_TSIF0_B,
  294. FN_SEL_HSPI2_A, FN_SEL_HSPI2_B,
  295. FN_SEL_HSPI1_A, FN_SEL_HSPI1_B,
  296. FN_SEL_HSPI0_A, FN_SEL_HSPI0_B,
  297. FN_SEL_I2C3_A, FN_SEL_I2C3_B, FN_SEL_I2C3_C,
  298. FN_SEL_I2C2_A, FN_SEL_I2C2_B, FN_SEL_I2C2_C,
  299. FN_SEL_I2C1_A, FN_SEL_I2C1_B,
  300. PINMUX_FUNCTION_END,
  301. PINMUX_MARK_BEGIN,
  302. /* GPSR0 */
  303. PENC0_MARK, PENC1_MARK, A1_MARK, A2_MARK, A3_MARK,
  304. /* GPSR1 */
  305. WE0_MARK,
  306. /* GPSR2 */
  307. AUDIO_CLKA_MARK,
  308. AUDIO_CLKB_MARK,
  309. /* GPSR3 */
  310. SSI_SCK34_MARK,
  311. /* GPSR4 */
  312. AVS1_MARK,
  313. AVS2_MARK,
  314. VI0_R0_C_MARK, /* see sel_vi0 */
  315. VI0_R1_C_MARK, /* see sel_vi0 */
  316. VI0_R2_C_MARK, /* see sel_vi0 */
  317. /* VI0_R3_C_MARK, */
  318. VI0_R4_C_MARK, /* see sel_vi0 */
  319. VI0_R5_C_MARK, /* see sel_vi0 */
  320. VI0_R0_D_MARK, /* see sel_vi0 */
  321. VI0_R1_D_MARK, /* see sel_vi0 */
  322. VI0_R2_D_MARK, /* see sel_vi0 */
  323. VI0_R3_D_MARK, /* see sel_vi0 */
  324. VI0_R4_D_MARK, /* see sel_vi0 */
  325. VI0_R5_D_MARK, /* see sel_vi0 */
  326. /* IPSR0 */
  327. PRESETOUT_MARK, PWM1_MARK, AUDATA0_MARK,
  328. ARM_TRACEDATA_0_MARK, GPSCLK_C_MARK, USB_OVC0_MARK,
  329. TX2_E_MARK, SDA2_B_MARK, AUDATA1_MARK, ARM_TRACEDATA_1_MARK,
  330. GPSIN_C_MARK, USB_OVC1_MARK, RX2_E_MARK, SCL2_B_MARK,
  331. SD1_DAT2_A_MARK, MMC_D2_MARK, BS_MARK,
  332. ATADIR0_A_MARK, SDSELF_A_MARK, PWM4_B_MARK, SD1_DAT3_A_MARK,
  333. MMC_D3_MARK, A0_MARK, ATAG0_A_MARK, REMOCON_B_MARK,
  334. A4_MARK, A5_MARK, A6_MARK, A7_MARK,
  335. A8_MARK, A9_MARK, A10_MARK, A11_MARK,
  336. A12_MARK, A13_MARK, A14_MARK, A15_MARK,
  337. A16_MARK, A17_MARK, A18_MARK, A19_MARK,
  338. /* IPSR1 */
  339. A20_MARK, HSPI_CS1_B_MARK, A21_MARK,
  340. HSPI_CLK1_B_MARK, A22_MARK, HRTS0_B_MARK,
  341. RX2_B_MARK, DREQ2_A_MARK, A23_MARK, HTX0_B_MARK,
  342. TX2_B_MARK, DACK2_A_MARK, TS_SDEN0_A_MARK,
  343. SD1_CD_A_MARK, MMC_D6_MARK, A24_MARK, DREQ1_A_MARK,
  344. HRX0_B_MARK, TS_SPSYNC0_A_MARK, SD1_WP_A_MARK,
  345. MMC_D7_MARK, A25_MARK, DACK1_A_MARK, HCTS0_B_MARK,
  346. RX3_C_MARK, TS_SDAT0_A_MARK, CLKOUT_MARK,
  347. HSPI_TX1_B_MARK, PWM0_B_MARK, CS0_MARK,
  348. HSPI_RX1_B_MARK, SSI_SCK1_B_MARK,
  349. ATAG0_B_MARK, CS1_A26_MARK, SDA2_A_MARK, SCK2_B_MARK,
  350. MMC_D5_MARK, ATADIR0_B_MARK, RD_WR_MARK, WE1_MARK,
  351. ATAWR0_B_MARK, SSI_WS1_B_MARK, EX_CS0_MARK, SCL2_A_MARK,
  352. TX3_C_MARK, TS_SCK0_A_MARK, EX_CS1_MARK, MMC_D4_MARK,
  353. /* IPSR2 */
  354. SD1_CLK_A_MARK, MMC_CLK_MARK, ATACS00_MARK, EX_CS2_MARK,
  355. SD1_CMD_A_MARK, MMC_CMD_MARK, ATACS10_MARK, EX_CS3_MARK,
  356. SD1_DAT0_A_MARK, MMC_D0_MARK, ATARD0_MARK,
  357. EX_CS4_MARK, EX_WAIT1_A_MARK, SD1_DAT1_A_MARK,
  358. MMC_D1_MARK, ATAWR0_A_MARK, EX_CS5_MARK, EX_WAIT2_A_MARK,
  359. DREQ0_A_MARK, RX3_A_MARK, DACK0_MARK, TX3_A_MARK,
  360. DRACK0_MARK, EX_WAIT0_MARK, PWM0_C_MARK, D0_MARK,
  361. D1_MARK, D2_MARK, D3_MARK, D4_MARK,
  362. D5_MARK, D6_MARK, D7_MARK, D8_MARK,
  363. D9_MARK, D10_MARK, D11_MARK, RD_WR_B_MARK,
  364. IRQ0_MARK, MLB_CLK_MARK, IRQ1_A_MARK,
  365. /* IPSR3 */
  366. MLB_SIG_MARK, RX5_B_MARK, SDA3_A_MARK, IRQ2_A_MARK,
  367. MLB_DAT_MARK, TX5_B_MARK, SCL3_A_MARK, IRQ3_A_MARK,
  368. SDSELF_B_MARK, SD1_CMD_B_MARK, SCIF_CLK_MARK, AUDIO_CLKOUT_B_MARK,
  369. CAN_CLK_B_MARK, SDA3_B_MARK, SD1_CLK_B_MARK, HTX0_A_MARK,
  370. TX0_A_MARK, SD1_DAT0_B_MARK, HRX0_A_MARK,
  371. RX0_A_MARK, SD1_DAT1_B_MARK, HSCK0_MARK,
  372. SCK0_MARK, SCL3_B_MARK, SD1_DAT2_B_MARK,
  373. HCTS0_A_MARK, CTS0_MARK, SD1_DAT3_B_MARK,
  374. HRTS0_A_MARK, RTS0_MARK, SSI_SCK4_MARK,
  375. DU0_DR0_MARK, LCDOUT0_MARK, AUDATA2_MARK, ARM_TRACEDATA_2_MARK,
  376. SDA3_C_MARK, ADICHS1_MARK, TS_SDEN0_B_MARK,
  377. SSI_WS4_MARK, DU0_DR1_MARK, LCDOUT1_MARK, AUDATA3_MARK,
  378. ARM_TRACEDATA_3_MARK, SCL3_C_MARK, ADICHS2_MARK,
  379. TS_SPSYNC0_B_MARK, DU0_DR2_MARK, LCDOUT2_MARK,
  380. DU0_DR3_MARK, LCDOUT3_MARK, DU0_DR4_MARK, LCDOUT4_MARK,
  381. DU0_DR5_MARK, LCDOUT5_MARK, DU0_DR6_MARK, LCDOUT6_MARK,
  382. /* IPSR4 */
  383. DU0_DR7_MARK, LCDOUT7_MARK, DU0_DG0_MARK, LCDOUT8_MARK,
  384. AUDATA4_MARK, ARM_TRACEDATA_4_MARK,
  385. TX1_D_MARK, CAN0_TX_A_MARK, ADICHS0_MARK, DU0_DG1_MARK,
  386. LCDOUT9_MARK, AUDATA5_MARK, ARM_TRACEDATA_5_MARK,
  387. RX1_D_MARK, CAN0_RX_A_MARK, ADIDATA_MARK, DU0_DG2_MARK,
  388. LCDOUT10_MARK, DU0_DG3_MARK, LCDOUT11_MARK, DU0_DG4_MARK,
  389. LCDOUT12_MARK, RX0_B_MARK, DU0_DG5_MARK, LCDOUT13_MARK,
  390. TX0_B_MARK, DU0_DG6_MARK, LCDOUT14_MARK, RX4_A_MARK,
  391. DU0_DG7_MARK, LCDOUT15_MARK, TX4_A_MARK, SSI_SCK2_B_MARK,
  392. VI0_R0_B_MARK, DU0_DB0_MARK, LCDOUT16_MARK, AUDATA6_MARK,
  393. ARM_TRACEDATA_6_MARK, GPSCLK_A_MARK, PWM0_A_MARK,
  394. ADICLK_MARK, TS_SDAT0_B_MARK, AUDIO_CLKC_MARK,
  395. VI0_R1_B_MARK, DU0_DB1_MARK, LCDOUT17_MARK, AUDATA7_MARK,
  396. ARM_TRACEDATA_7_MARK, GPSIN_A_MARK, ADICS_SAMP_MARK,
  397. TS_SCK0_B_MARK, VI0_R2_B_MARK, DU0_DB2_MARK, LCDOUT18_MARK,
  398. VI0_R3_B_MARK, DU0_DB3_MARK, LCDOUT19_MARK, VI0_R4_B_MARK,
  399. DU0_DB4_MARK, LCDOUT20_MARK,
  400. /* IPSR5 */
  401. VI0_R5_B_MARK, DU0_DB5_MARK, LCDOUT21_MARK, VI1_DATA10_B_MARK,
  402. DU0_DB6_MARK, LCDOUT22_MARK, VI1_DATA11_B_MARK,
  403. DU0_DB7_MARK, LCDOUT23_MARK, DU0_DOTCLKIN_MARK,
  404. QSTVA_QVS_MARK, DU0_DOTCLKO_UT0_MARK,
  405. QCLK_MARK, DU0_DOTCLKO_UT1_MARK, QSTVB_QVE_MARK,
  406. AUDIO_CLKOUT_A_MARK, REMOCON_C_MARK, SSI_WS2_B_MARK,
  407. DU0_EXHSYNC_DU0_HSYNC_MARK, QSTH_QHS_MARK,
  408. DU0_EXVSYNC_DU0_VSYNC_MARK, QSTB_QHE_MARK,
  409. DU0_EXODDF_DU0_ODDF_DISP_CDE_MARK,
  410. QCPV_QDE_MARK, FMCLK_D_MARK, SSI_SCK1_A_MARK,
  411. DU0_DISP_MARK, QPOLA_MARK, AUDCK_MARK, ARM_TRACECLK_MARK,
  412. BPFCLK_D_MARK, SSI_WS1_A_MARK, DU0_CDE_MARK, QPOLB_MARK,
  413. AUDSYNC_MARK, ARM_TRACECTL_MARK, FMIN_D_MARK,
  414. SD1_CD_B_MARK, SSI_SCK78_MARK, HSPI_RX0_B_MARK,
  415. TX1_B_MARK, SD1_WP_B_MARK, SSI_WS78_MARK, HSPI_CLK0_B_MARK,
  416. RX1_B_MARK, CAN_CLK_D_MARK, SSI_SDATA8_MARK,
  417. SSI_SCK2_A_MARK, HSPI_CS0_B_MARK,
  418. TX2_A_MARK, CAN0_TX_B_MARK, SSI_SDATA7_MARK,
  419. HSPI_TX0_B_MARK, RX2_A_MARK, CAN0_RX_B_MARK,
  420. /* IPSR6 */
  421. SSI_SCK6_MARK, HSPI_RX2_A_MARK, FMCLK_B_MARK,
  422. CAN1_TX_B_MARK, SSI_WS6_MARK, HSPI_CLK2_A_MARK,
  423. BPFCLK_B_MARK, CAN1_RX_B_MARK, SSI_SDATA6_MARK,
  424. HSPI_TX2_A_MARK, FMIN_B_MARK, SSI_SCK5_MARK,
  425. RX4_C_MARK, SSI_WS5_MARK, TX4_C_MARK, SSI_SDATA5_MARK,
  426. RX0_D_MARK, SSI_WS34_MARK, ARM_TRACEDATA_8_MARK,
  427. SSI_SDATA4_MARK, SSI_WS2_A_MARK, ARM_TRACEDATA_9_MARK,
  428. SSI_SDATA3_MARK, ARM_TRACEDATA_10_MARK,
  429. SSI_SCK012_MARK, ARM_TRACEDATA_11_MARK,
  430. TX0_D_MARK, SSI_WS012_MARK, ARM_TRACEDATA_12_MARK,
  431. SSI_SDATA2_MARK, HSPI_CS2_A_MARK,
  432. ARM_TRACEDATA_13_MARK, SDA1_A_MARK, SSI_SDATA1_MARK,
  433. ARM_TRACEDATA_14_MARK, SCL1_A_MARK, SCK2_A_MARK,
  434. SSI_SDATA0_MARK, ARM_TRACEDATA_15_MARK,
  435. SD0_CLK_MARK, SUB_TDO_MARK, SD0_CMD_MARK, SUB_TRST_MARK,
  436. SD0_DAT0_MARK, SUB_TMS_MARK, SD0_DAT1_MARK, SUB_TCK_MARK,
  437. SD0_DAT2_MARK, SUB_TDI_MARK,
  438. /* IPSR7 */
  439. SD0_DAT3_MARK, IRQ1_B_MARK, SD0_CD_MARK, TX5_A_MARK,
  440. SD0_WP_MARK, RX5_A_MARK, VI1_CLKENB_MARK,
  441. HSPI_CLK0_A_MARK, HTX1_A_MARK, RTS1_C_MARK, VI1_FIELD_MARK,
  442. HSPI_CS0_A_MARK, HRX1_A_MARK, SCK1_C_MARK, VI1_HSYNC_MARK,
  443. HSPI_RX0_A_MARK, HRTS1_A_MARK, FMCLK_A_MARK, RX1_C_MARK,
  444. VI1_VSYNC_MARK, HSPI_TX0_MARK, HCTS1_A_MARK, BPFCLK_A_MARK,
  445. TX1_C_MARK, TCLK0_MARK, HSCK1_A_MARK, FMIN_A_MARK,
  446. IRQ2_C_MARK, CTS1_C_MARK, SPEEDIN_MARK, VI0_CLK_MARK,
  447. CAN_CLK_A_MARK, VI0_CLKENB_MARK, SD2_DAT2_B_MARK,
  448. VI1_DATA0_MARK, DU1_DG6_MARK, HSPI_RX1_A_MARK,
  449. RX4_B_MARK, VI0_FIELD_MARK, SD2_DAT3_B_MARK,
  450. VI0_R3_C_MARK, VI1_DATA1_MARK, DU1_DG7_MARK, HSPI_CLK1_A_MARK,
  451. TX4_B_MARK, VI0_HSYNC_MARK, SD2_CD_B_MARK, VI1_DATA2_MARK,
  452. DU1_DR2_MARK, HSPI_CS1_A_MARK, RX3_B_MARK,
  453. /* IPSR8 */
  454. VI0_VSYNC_MARK, SD2_WP_B_MARK, VI1_DATA3_MARK, DU1_DR3_MARK,
  455. HSPI_TX1_A_MARK, TX3_B_MARK, VI0_DATA0_VI0_B0_MARK,
  456. DU1_DG2_MARK, IRQ2_B_MARK, RX3_D_MARK, VI0_DATA1_VI0_B1_MARK,
  457. DU1_DG3_MARK, IRQ3_B_MARK, TX3_D_MARK, VI0_DATA2_VI0_B2_MARK,
  458. DU1_DG4_MARK, RX0_C_MARK, VI0_DATA3_VI0_B3_MARK,
  459. DU1_DG5_MARK, TX1_A_MARK, TX0_C_MARK, VI0_DATA4_VI0_B4_MARK,
  460. DU1_DB2_MARK, RX1_A_MARK, VI0_DATA5_VI0_B5_MARK,
  461. DU1_DB3_MARK, SCK1_A_MARK, PWM4_MARK, HSCK1_B_MARK,
  462. VI0_DATA6_VI0_G0_MARK, DU1_DB4_MARK, CTS1_A_MARK,
  463. PWM5_MARK, VI0_DATA7_VI0_G1_MARK, DU1_DB5_MARK,
  464. RTS1_A_MARK, VI0_G2_MARK, SD2_CLK_B_MARK, VI1_DATA4_MARK,
  465. DU1_DR4_MARK, HTX1_B_MARK, VI0_G3_MARK, SD2_CMD_B_MARK,
  466. VI1_DATA5_MARK, DU1_DR5_MARK, HRX1_B_MARK,
  467. /* IPSR9 */
  468. VI0_G4_MARK, SD2_DAT0_B_MARK, VI1_DATA6_MARK,
  469. DU1_DR6_MARK, HRTS1_B_MARK, VI0_G5_MARK, SD2_DAT1_B_MARK,
  470. VI1_DATA7_MARK, DU1_DR7_MARK, HCTS1_B_MARK, VI0_R0_A_MARK,
  471. VI1_CLK_MARK, ETH_REF_CLK_MARK, DU1_DOTCLKIN_MARK,
  472. VI0_R1_A_MARK, VI1_DATA8_MARK, DU1_DB6_MARK, ETH_TXD0_MARK,
  473. PWM2_MARK, TCLK1_MARK, VI0_R2_A_MARK, VI1_DATA9_MARK,
  474. DU1_DB7_MARK, ETH_TXD1_MARK, PWM3_MARK, VI0_R3_A_MARK,
  475. ETH_CRS_DV_MARK, IECLK_MARK, SCK2_C_MARK,
  476. VI0_R4_A_MARK, ETH_TX_EN_MARK, IETX_MARK,
  477. TX2_C_MARK, VI0_R5_A_MARK, ETH_RX_ER_MARK, FMCLK_C_MARK,
  478. IERX_MARK, RX2_C_MARK, VI1_DATA10_A_MARK,
  479. DU1_DOTCLKOUT_MARK, ETH_RXD0_MARK,
  480. BPFCLK_C_MARK, TX2_D_MARK, SDA2_C_MARK, VI1_DATA11_A_MARK,
  481. DU1_EXHSYNC_DU1_HSYNC_MARK, ETH_RXD1_MARK, FMIN_C_MARK,
  482. RX2_D_MARK, SCL2_C_MARK,
  483. /* IPSR10 */
  484. SD2_CLK_A_MARK, DU1_EXVSYNC_DU1_VSYNC_MARK, ATARD1_MARK,
  485. ETH_MDC_MARK, SDA1_B_MARK, SD2_CMD_A_MARK,
  486. DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK, ATAWR1_MARK,
  487. ETH_MDIO_MARK, SCL1_B_MARK, SD2_DAT0_A_MARK,
  488. DU1_DISP_MARK, ATACS01_MARK, DREQ1_B_MARK, ETH_LINK_MARK,
  489. CAN1_RX_A_MARK, SD2_DAT1_A_MARK, DU1_CDE_MARK,
  490. ATACS11_MARK, DACK1_B_MARK, ETH_MAGIC_MARK, CAN1_TX_A_MARK,
  491. PWM6_MARK, SD2_DAT2_A_MARK, VI1_DATA12_MARK,
  492. DREQ2_B_MARK, ATADIR1_MARK, HSPI_CLK2_B_MARK,
  493. GPSCLK_B_MARK, SD2_DAT3_A_MARK, VI1_DATA13_MARK,
  494. DACK2_B_MARK, ATAG1_MARK, HSPI_CS2_B_MARK,
  495. GPSIN_B_MARK, SD2_CD_A_MARK, VI1_DATA14_MARK,
  496. EX_WAIT1_B_MARK, DREQ0_B_MARK, HSPI_RX2_B_MARK,
  497. REMOCON_A_MARK, SD2_WP_A_MARK, VI1_DATA15_MARK,
  498. EX_WAIT2_B_MARK, DACK0_B_MARK,
  499. HSPI_TX2_B_MARK, CAN_CLK_C_MARK,
  500. PINMUX_MARK_END,
  501. };
  502. static const u16 pinmux_data[] = {
  503. PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
  504. PINMUX_SINGLE(PENC0),
  505. PINMUX_SINGLE(PENC1),
  506. PINMUX_SINGLE(A1),
  507. PINMUX_SINGLE(A2),
  508. PINMUX_SINGLE(A3),
  509. PINMUX_SINGLE(WE0),
  510. PINMUX_SINGLE(AUDIO_CLKA),
  511. PINMUX_SINGLE(AUDIO_CLKB),
  512. PINMUX_SINGLE(SSI_SCK34),
  513. PINMUX_SINGLE(AVS1),
  514. PINMUX_SINGLE(AVS2),
  515. /* IPSR0 */
  516. PINMUX_IPSR_GPSR(IP0_1_0, PRESETOUT),
  517. PINMUX_IPSR_GPSR(IP0_1_0, PWM1),
  518. PINMUX_IPSR_GPSR(IP0_4_2, AUDATA0),
  519. PINMUX_IPSR_GPSR(IP0_4_2, ARM_TRACEDATA_0),
  520. PINMUX_IPSR_MSEL(IP0_4_2, GPSCLK_C, SEL_GPS_C),
  521. PINMUX_IPSR_GPSR(IP0_4_2, USB_OVC0),
  522. PINMUX_IPSR_GPSR(IP0_4_2, TX2_E),
  523. PINMUX_IPSR_MSEL(IP0_4_2, SDA2_B, SEL_I2C2_B),
  524. PINMUX_IPSR_GPSR(IP0_7_5, AUDATA1),
  525. PINMUX_IPSR_GPSR(IP0_7_5, ARM_TRACEDATA_1),
  526. PINMUX_IPSR_MSEL(IP0_7_5, GPSIN_C, SEL_GPS_C),
  527. PINMUX_IPSR_GPSR(IP0_7_5, USB_OVC1),
  528. PINMUX_IPSR_MSEL(IP0_7_5, RX2_E, SEL_SCIF2_E),
  529. PINMUX_IPSR_MSEL(IP0_7_5, SCL2_B, SEL_I2C2_B),
  530. PINMUX_IPSR_MSEL(IP0_11_8, SD1_DAT2_A, SEL_SD1_A),
  531. PINMUX_IPSR_GPSR(IP0_11_8, MMC_D2),
  532. PINMUX_IPSR_GPSR(IP0_11_8, BS),
  533. PINMUX_IPSR_GPSR(IP0_11_8, ATADIR0_A),
  534. PINMUX_IPSR_GPSR(IP0_11_8, SDSELF_A),
  535. PINMUX_IPSR_GPSR(IP0_11_8, PWM4_B),
  536. PINMUX_IPSR_MSEL(IP0_14_12, SD1_DAT3_A, SEL_SD1_A),
  537. PINMUX_IPSR_GPSR(IP0_14_12, MMC_D3),
  538. PINMUX_IPSR_GPSR(IP0_14_12, A0),
  539. PINMUX_IPSR_GPSR(IP0_14_12, ATAG0_A),
  540. PINMUX_IPSR_MSEL(IP0_14_12, REMOCON_B, SEL_REMOCON_B),
  541. PINMUX_IPSR_GPSR(IP0_15, A4),
  542. PINMUX_IPSR_GPSR(IP0_16, A5),
  543. PINMUX_IPSR_GPSR(IP0_17, A6),
  544. PINMUX_IPSR_GPSR(IP0_18, A7),
  545. PINMUX_IPSR_GPSR(IP0_19, A8),
  546. PINMUX_IPSR_GPSR(IP0_20, A9),
  547. PINMUX_IPSR_GPSR(IP0_21, A10),
  548. PINMUX_IPSR_GPSR(IP0_22, A11),
  549. PINMUX_IPSR_GPSR(IP0_23, A12),
  550. PINMUX_IPSR_GPSR(IP0_24, A13),
  551. PINMUX_IPSR_GPSR(IP0_25, A14),
  552. PINMUX_IPSR_GPSR(IP0_26, A15),
  553. PINMUX_IPSR_GPSR(IP0_27, A16),
  554. PINMUX_IPSR_GPSR(IP0_28, A17),
  555. PINMUX_IPSR_GPSR(IP0_29, A18),
  556. PINMUX_IPSR_GPSR(IP0_30, A19),
  557. /* IPSR1 */
  558. PINMUX_IPSR_GPSR(IP1_0, A20),
  559. PINMUX_IPSR_MSEL(IP1_0, HSPI_CS1_B, SEL_HSPI1_B),
  560. PINMUX_IPSR_GPSR(IP1_1, A21),
  561. PINMUX_IPSR_MSEL(IP1_1, HSPI_CLK1_B, SEL_HSPI1_B),
  562. PINMUX_IPSR_GPSR(IP1_4_2, A22),
  563. PINMUX_IPSR_MSEL(IP1_4_2, HRTS0_B, SEL_HSCIF0_B),
  564. PINMUX_IPSR_MSEL(IP1_4_2, RX2_B, SEL_SCIF2_B),
  565. PINMUX_IPSR_MSEL(IP1_4_2, DREQ2_A, SEL_DREQ2_A),
  566. PINMUX_IPSR_GPSR(IP1_7_5, A23),
  567. PINMUX_IPSR_GPSR(IP1_7_5, HTX0_B),
  568. PINMUX_IPSR_GPSR(IP1_7_5, TX2_B),
  569. PINMUX_IPSR_GPSR(IP1_7_5, DACK2_A),
  570. PINMUX_IPSR_MSEL(IP1_7_5, TS_SDEN0_A, SEL_TSIF0_A),
  571. PINMUX_IPSR_MSEL(IP1_10_8, SD1_CD_A, SEL_SD1_A),
  572. PINMUX_IPSR_GPSR(IP1_10_8, MMC_D6),
  573. PINMUX_IPSR_GPSR(IP1_10_8, A24),
  574. PINMUX_IPSR_MSEL(IP1_10_8, DREQ1_A, SEL_DREQ1_A),
  575. PINMUX_IPSR_MSEL(IP1_10_8, HRX0_B, SEL_HSCIF0_B),
  576. PINMUX_IPSR_MSEL(IP1_10_8, TS_SPSYNC0_A, SEL_TSIF0_A),
  577. PINMUX_IPSR_MSEL(IP1_14_11, SD1_WP_A, SEL_SD1_A),
  578. PINMUX_IPSR_GPSR(IP1_14_11, MMC_D7),
  579. PINMUX_IPSR_GPSR(IP1_14_11, A25),
  580. PINMUX_IPSR_GPSR(IP1_14_11, DACK1_A),
  581. PINMUX_IPSR_MSEL(IP1_14_11, HCTS0_B, SEL_HSCIF0_B),
  582. PINMUX_IPSR_MSEL(IP1_14_11, RX3_C, SEL_SCIF3_C),
  583. PINMUX_IPSR_MSEL(IP1_14_11, TS_SDAT0_A, SEL_TSIF0_A),
  584. PINMUX_IPSR_NOGP(IP1_16_15, CLKOUT),
  585. PINMUX_IPSR_NOGP(IP1_16_15, HSPI_TX1_B),
  586. PINMUX_IPSR_NOGP(IP1_16_15, PWM0_B),
  587. PINMUX_IPSR_NOGP(IP1_17, CS0),
  588. PINMUX_IPSR_NOGM(IP1_17, HSPI_RX1_B, SEL_HSPI1_B),
  589. PINMUX_IPSR_NOGM(IP1_20_18, SSI_SCK1_B, SEL_SSI1_B),
  590. PINMUX_IPSR_NOGP(IP1_20_18, ATAG0_B),
  591. PINMUX_IPSR_NOGP(IP1_20_18, CS1_A26),
  592. PINMUX_IPSR_NOGM(IP1_20_18, SDA2_A, SEL_I2C2_A),
  593. PINMUX_IPSR_NOGM(IP1_20_18, SCK2_B, SEL_SCIF2_B),
  594. PINMUX_IPSR_GPSR(IP1_23_21, MMC_D5),
  595. PINMUX_IPSR_GPSR(IP1_23_21, ATADIR0_B),
  596. PINMUX_IPSR_GPSR(IP1_23_21, RD_WR),
  597. PINMUX_IPSR_GPSR(IP1_24, WE1),
  598. PINMUX_IPSR_GPSR(IP1_24, ATAWR0_B),
  599. PINMUX_IPSR_MSEL(IP1_27_25, SSI_WS1_B, SEL_SSI1_B),
  600. PINMUX_IPSR_GPSR(IP1_27_25, EX_CS0),
  601. PINMUX_IPSR_MSEL(IP1_27_25, SCL2_A, SEL_I2C2_A),
  602. PINMUX_IPSR_GPSR(IP1_27_25, TX3_C),
  603. PINMUX_IPSR_MSEL(IP1_27_25, TS_SCK0_A, SEL_TSIF0_A),
  604. PINMUX_IPSR_GPSR(IP1_29_28, EX_CS1),
  605. PINMUX_IPSR_GPSR(IP1_29_28, MMC_D4),
  606. /* IPSR2 */
  607. PINMUX_IPSR_GPSR(IP2_2_0, SD1_CLK_A),
  608. PINMUX_IPSR_GPSR(IP2_2_0, MMC_CLK),
  609. PINMUX_IPSR_GPSR(IP2_2_0, ATACS00),
  610. PINMUX_IPSR_GPSR(IP2_2_0, EX_CS2),
  611. PINMUX_IPSR_MSEL(IP2_5_3, SD1_CMD_A, SEL_SD1_A),
  612. PINMUX_IPSR_GPSR(IP2_5_3, MMC_CMD),
  613. PINMUX_IPSR_GPSR(IP2_5_3, ATACS10),
  614. PINMUX_IPSR_GPSR(IP2_5_3, EX_CS3),
  615. PINMUX_IPSR_MSEL(IP2_8_6, SD1_DAT0_A, SEL_SD1_A),
  616. PINMUX_IPSR_GPSR(IP2_8_6, MMC_D0),
  617. PINMUX_IPSR_GPSR(IP2_8_6, ATARD0),
  618. PINMUX_IPSR_GPSR(IP2_8_6, EX_CS4),
  619. PINMUX_IPSR_MSEL(IP2_8_6, EX_WAIT1_A, SEL_WAIT1_A),
  620. PINMUX_IPSR_MSEL(IP2_11_9, SD1_DAT1_A, SEL_SD1_A),
  621. PINMUX_IPSR_GPSR(IP2_11_9, MMC_D1),
  622. PINMUX_IPSR_GPSR(IP2_11_9, ATAWR0_A),
  623. PINMUX_IPSR_GPSR(IP2_11_9, EX_CS5),
  624. PINMUX_IPSR_MSEL(IP2_11_9, EX_WAIT2_A, SEL_WAIT2_A),
  625. PINMUX_IPSR_MSEL(IP2_13_12, DREQ0_A, SEL_DREQ0_A),
  626. PINMUX_IPSR_MSEL(IP2_13_12, RX3_A, SEL_SCIF3_A),
  627. PINMUX_IPSR_GPSR(IP2_16_14, DACK0),
  628. PINMUX_IPSR_GPSR(IP2_16_14, TX3_A),
  629. PINMUX_IPSR_GPSR(IP2_16_14, DRACK0),
  630. PINMUX_IPSR_GPSR(IP2_17, EX_WAIT0),
  631. PINMUX_IPSR_GPSR(IP2_17, PWM0_C),
  632. PINMUX_IPSR_NOGP(IP2_18, D0),
  633. PINMUX_IPSR_NOGP(IP2_19, D1),
  634. PINMUX_IPSR_NOGP(IP2_20, D2),
  635. PINMUX_IPSR_NOGP(IP2_21, D3),
  636. PINMUX_IPSR_NOGP(IP2_22, D4),
  637. PINMUX_IPSR_NOGP(IP2_23, D5),
  638. PINMUX_IPSR_NOGP(IP2_24, D6),
  639. PINMUX_IPSR_NOGP(IP2_25, D7),
  640. PINMUX_IPSR_NOGP(IP2_26, D8),
  641. PINMUX_IPSR_NOGP(IP2_27, D9),
  642. PINMUX_IPSR_NOGP(IP2_28, D10),
  643. PINMUX_IPSR_NOGP(IP2_29, D11),
  644. PINMUX_IPSR_GPSR(IP2_30, RD_WR_B),
  645. PINMUX_IPSR_GPSR(IP2_30, IRQ0),
  646. PINMUX_IPSR_GPSR(IP2_31, MLB_CLK),
  647. PINMUX_IPSR_MSEL(IP2_31, IRQ1_A, SEL_IRQ1_A),
  648. /* IPSR3 */
  649. PINMUX_IPSR_GPSR(IP3_1_0, MLB_SIG),
  650. PINMUX_IPSR_MSEL(IP3_1_0, RX5_B, SEL_SCIF5_B),
  651. PINMUX_IPSR_MSEL(IP3_1_0, SDA3_A, SEL_I2C3_A),
  652. PINMUX_IPSR_MSEL(IP3_1_0, IRQ2_A, SEL_IRQ2_A),
  653. PINMUX_IPSR_GPSR(IP3_4_2, MLB_DAT),
  654. PINMUX_IPSR_GPSR(IP3_4_2, TX5_B),
  655. PINMUX_IPSR_MSEL(IP3_4_2, SCL3_A, SEL_I2C3_A),
  656. PINMUX_IPSR_MSEL(IP3_4_2, IRQ3_A, SEL_IRQ3_A),
  657. PINMUX_IPSR_GPSR(IP3_4_2, SDSELF_B),
  658. PINMUX_IPSR_MSEL(IP3_7_5, SD1_CMD_B, SEL_SD1_B),
  659. PINMUX_IPSR_GPSR(IP3_7_5, SCIF_CLK),
  660. PINMUX_IPSR_GPSR(IP3_7_5, AUDIO_CLKOUT_B),
  661. PINMUX_IPSR_MSEL(IP3_7_5, CAN_CLK_B, SEL_CANCLK_B),
  662. PINMUX_IPSR_MSEL(IP3_7_5, SDA3_B, SEL_I2C3_B),
  663. PINMUX_IPSR_GPSR(IP3_9_8, SD1_CLK_B),
  664. PINMUX_IPSR_GPSR(IP3_9_8, HTX0_A),
  665. PINMUX_IPSR_GPSR(IP3_9_8, TX0_A),
  666. PINMUX_IPSR_MSEL(IP3_12_10, SD1_DAT0_B, SEL_SD1_B),
  667. PINMUX_IPSR_MSEL(IP3_12_10, HRX0_A, SEL_HSCIF0_A),
  668. PINMUX_IPSR_MSEL(IP3_12_10, RX0_A, SEL_SCIF0_A),
  669. PINMUX_IPSR_MSEL(IP3_15_13, SD1_DAT1_B, SEL_SD1_B),
  670. PINMUX_IPSR_MSEL(IP3_15_13, HSCK0, SEL_HSCIF0_A),
  671. PINMUX_IPSR_GPSR(IP3_15_13, SCK0),
  672. PINMUX_IPSR_MSEL(IP3_15_13, SCL3_B, SEL_I2C3_B),
  673. PINMUX_IPSR_MSEL(IP3_18_16, SD1_DAT2_B, SEL_SD1_B),
  674. PINMUX_IPSR_MSEL(IP3_18_16, HCTS0_A, SEL_HSCIF0_A),
  675. PINMUX_IPSR_GPSR(IP3_18_16, CTS0),
  676. PINMUX_IPSR_MSEL(IP3_20_19, SD1_DAT3_B, SEL_SD1_B),
  677. PINMUX_IPSR_MSEL(IP3_20_19, HRTS0_A, SEL_HSCIF0_A),
  678. PINMUX_IPSR_GPSR(IP3_20_19, RTS0),
  679. PINMUX_IPSR_GPSR(IP3_23_21, SSI_SCK4),
  680. PINMUX_IPSR_GPSR(IP3_23_21, DU0_DR0),
  681. PINMUX_IPSR_GPSR(IP3_23_21, LCDOUT0),
  682. PINMUX_IPSR_GPSR(IP3_23_21, AUDATA2),
  683. PINMUX_IPSR_GPSR(IP3_23_21, ARM_TRACEDATA_2),
  684. PINMUX_IPSR_MSEL(IP3_23_21, SDA3_C, SEL_I2C3_C),
  685. PINMUX_IPSR_GPSR(IP3_23_21, ADICHS1),
  686. PINMUX_IPSR_MSEL(IP3_23_21, TS_SDEN0_B, SEL_TSIF0_B),
  687. PINMUX_IPSR_GPSR(IP3_26_24, SSI_WS4),
  688. PINMUX_IPSR_GPSR(IP3_26_24, DU0_DR1),
  689. PINMUX_IPSR_GPSR(IP3_26_24, LCDOUT1),
  690. PINMUX_IPSR_GPSR(IP3_26_24, AUDATA3),
  691. PINMUX_IPSR_GPSR(IP3_26_24, ARM_TRACEDATA_3),
  692. PINMUX_IPSR_MSEL(IP3_26_24, SCL3_C, SEL_I2C3_C),
  693. PINMUX_IPSR_GPSR(IP3_26_24, ADICHS2),
  694. PINMUX_IPSR_MSEL(IP3_26_24, TS_SPSYNC0_B, SEL_TSIF0_B),
  695. PINMUX_IPSR_GPSR(IP3_27, DU0_DR2),
  696. PINMUX_IPSR_GPSR(IP3_27, LCDOUT2),
  697. PINMUX_IPSR_GPSR(IP3_28, DU0_DR3),
  698. PINMUX_IPSR_GPSR(IP3_28, LCDOUT3),
  699. PINMUX_IPSR_GPSR(IP3_29, DU0_DR4),
  700. PINMUX_IPSR_GPSR(IP3_29, LCDOUT4),
  701. PINMUX_IPSR_GPSR(IP3_30, DU0_DR5),
  702. PINMUX_IPSR_GPSR(IP3_30, LCDOUT5),
  703. PINMUX_IPSR_GPSR(IP3_31, DU0_DR6),
  704. PINMUX_IPSR_GPSR(IP3_31, LCDOUT6),
  705. /* IPSR4 */
  706. PINMUX_IPSR_GPSR(IP4_0, DU0_DR7),
  707. PINMUX_IPSR_GPSR(IP4_0, LCDOUT7),
  708. PINMUX_IPSR_GPSR(IP4_3_1, DU0_DG0),
  709. PINMUX_IPSR_GPSR(IP4_3_1, LCDOUT8),
  710. PINMUX_IPSR_GPSR(IP4_3_1, AUDATA4),
  711. PINMUX_IPSR_GPSR(IP4_3_1, ARM_TRACEDATA_4),
  712. PINMUX_IPSR_GPSR(IP4_3_1, TX1_D),
  713. PINMUX_IPSR_GPSR(IP4_3_1, CAN0_TX_A),
  714. PINMUX_IPSR_GPSR(IP4_3_1, ADICHS0),
  715. PINMUX_IPSR_GPSR(IP4_6_4, DU0_DG1),
  716. PINMUX_IPSR_GPSR(IP4_6_4, LCDOUT9),
  717. PINMUX_IPSR_GPSR(IP4_6_4, AUDATA5),
  718. PINMUX_IPSR_GPSR(IP4_6_4, ARM_TRACEDATA_5),
  719. PINMUX_IPSR_MSEL(IP4_6_4, RX1_D, SEL_SCIF1_D),
  720. PINMUX_IPSR_MSEL(IP4_6_4, CAN0_RX_A, SEL_CAN0_A),
  721. PINMUX_IPSR_GPSR(IP4_6_4, ADIDATA),
  722. PINMUX_IPSR_GPSR(IP4_7, DU0_DG2),
  723. PINMUX_IPSR_GPSR(IP4_7, LCDOUT10),
  724. PINMUX_IPSR_GPSR(IP4_8, DU0_DG3),
  725. PINMUX_IPSR_GPSR(IP4_8, LCDOUT11),
  726. PINMUX_IPSR_GPSR(IP4_10_9, DU0_DG4),
  727. PINMUX_IPSR_GPSR(IP4_10_9, LCDOUT12),
  728. PINMUX_IPSR_MSEL(IP4_10_9, RX0_B, SEL_SCIF0_B),
  729. PINMUX_IPSR_GPSR(IP4_12_11, DU0_DG5),
  730. PINMUX_IPSR_GPSR(IP4_12_11, LCDOUT13),
  731. PINMUX_IPSR_GPSR(IP4_12_11, TX0_B),
  732. PINMUX_IPSR_GPSR(IP4_14_13, DU0_DG6),
  733. PINMUX_IPSR_GPSR(IP4_14_13, LCDOUT14),
  734. PINMUX_IPSR_MSEL(IP4_14_13, RX4_A, SEL_SCIF4_A),
  735. PINMUX_IPSR_GPSR(IP4_16_15, DU0_DG7),
  736. PINMUX_IPSR_GPSR(IP4_16_15, LCDOUT15),
  737. PINMUX_IPSR_GPSR(IP4_16_15, TX4_A),
  738. PINMUX_IPSR_MSEL(IP4_20_17, SSI_SCK2_B, SEL_SSI2_B),
  739. PINMUX_DATA(VI0_R0_B_MARK, FN_IP4_20_17, FN_VI0_R0_B, FN_SEL_VI0_B), /* see sel_vi0 */
  740. PINMUX_DATA(VI0_R0_D_MARK, FN_IP4_20_17, FN_VI0_R0_B, FN_SEL_VI0_D), /* see sel_vi0 */
  741. PINMUX_IPSR_GPSR(IP4_20_17, DU0_DB0),
  742. PINMUX_IPSR_GPSR(IP4_20_17, LCDOUT16),
  743. PINMUX_IPSR_GPSR(IP4_20_17, AUDATA6),
  744. PINMUX_IPSR_GPSR(IP4_20_17, ARM_TRACEDATA_6),
  745. PINMUX_IPSR_MSEL(IP4_20_17, GPSCLK_A, SEL_GPS_A),
  746. PINMUX_IPSR_GPSR(IP4_20_17, PWM0_A),
  747. PINMUX_IPSR_GPSR(IP4_20_17, ADICLK),
  748. PINMUX_IPSR_MSEL(IP4_20_17, TS_SDAT0_B, SEL_TSIF0_B),
  749. PINMUX_IPSR_GPSR(IP4_24_21, AUDIO_CLKC),
  750. PINMUX_DATA(VI0_R1_B_MARK, FN_IP4_24_21, FN_VI0_R1_B, FN_SEL_VI0_B), /* see sel_vi0 */
  751. PINMUX_DATA(VI0_R1_D_MARK, FN_IP4_24_21, FN_VI0_R1_B, FN_SEL_VI0_D), /* see sel_vi0 */
  752. PINMUX_IPSR_GPSR(IP4_24_21, DU0_DB1),
  753. PINMUX_IPSR_GPSR(IP4_24_21, LCDOUT17),
  754. PINMUX_IPSR_GPSR(IP4_24_21, AUDATA7),
  755. PINMUX_IPSR_GPSR(IP4_24_21, ARM_TRACEDATA_7),
  756. PINMUX_IPSR_MSEL(IP4_24_21, GPSIN_A, SEL_GPS_A),
  757. PINMUX_IPSR_GPSR(IP4_24_21, ADICS_SAMP),
  758. PINMUX_IPSR_MSEL(IP4_24_21, TS_SCK0_B, SEL_TSIF0_B),
  759. PINMUX_DATA(VI0_R2_B_MARK, FN_IP4_26_25, FN_VI0_R2_B, FN_SEL_VI0_B), /* see sel_vi0 */
  760. PINMUX_DATA(VI0_R2_D_MARK, FN_IP4_26_25, FN_VI0_R2_B, FN_SEL_VI0_D), /* see sel_vi0 */
  761. PINMUX_IPSR_GPSR(IP4_26_25, DU0_DB2),
  762. PINMUX_IPSR_GPSR(IP4_26_25, LCDOUT18),
  763. PINMUX_IPSR_MSEL(IP4_28_27, VI0_R3_B, SEL_VI0_B),
  764. PINMUX_IPSR_GPSR(IP4_28_27, DU0_DB3),
  765. PINMUX_IPSR_GPSR(IP4_28_27, LCDOUT19),
  766. PINMUX_DATA(VI0_R4_B_MARK, FN_IP4_30_29, FN_VI0_R4_B, FN_SEL_VI0_B), /* see sel_vi0 */
  767. PINMUX_DATA(VI0_R4_D_MARK, FN_IP4_30_29, FN_VI0_R4_B, FN_SEL_VI0_D), /* see sel_vi0 */
  768. PINMUX_IPSR_GPSR(IP4_30_29, DU0_DB4),
  769. PINMUX_IPSR_GPSR(IP4_30_29, LCDOUT20),
  770. /* IPSR5 */
  771. PINMUX_DATA(VI0_R5_B_MARK, FN_IP5_1_0, FN_VI0_R5_B, FN_SEL_VI0_B), /* see sel_vi0 */
  772. PINMUX_DATA(VI0_R5_D_MARK, FN_IP5_1_0, FN_VI0_R5_B, FN_SEL_VI0_D), /* see sel_vi0 */
  773. PINMUX_IPSR_GPSR(IP5_1_0, DU0_DB5),
  774. PINMUX_IPSR_GPSR(IP5_1_0, LCDOUT21),
  775. PINMUX_IPSR_MSEL(IP5_3_2, VI1_DATA10_B, SEL_VI1_B),
  776. PINMUX_IPSR_GPSR(IP5_3_2, DU0_DB6),
  777. PINMUX_IPSR_GPSR(IP5_3_2, LCDOUT22),
  778. PINMUX_IPSR_MSEL(IP5_5_4, VI1_DATA11_B, SEL_VI1_B),
  779. PINMUX_IPSR_GPSR(IP5_5_4, DU0_DB7),
  780. PINMUX_IPSR_GPSR(IP5_5_4, LCDOUT23),
  781. PINMUX_IPSR_GPSR(IP5_6, DU0_DOTCLKIN),
  782. PINMUX_IPSR_GPSR(IP5_6, QSTVA_QVS),
  783. PINMUX_IPSR_GPSR(IP5_7, DU0_DOTCLKO_UT0),
  784. PINMUX_IPSR_GPSR(IP5_7, QCLK),
  785. PINMUX_IPSR_GPSR(IP5_9_8, DU0_DOTCLKO_UT1),
  786. PINMUX_IPSR_GPSR(IP5_9_8, QSTVB_QVE),
  787. PINMUX_IPSR_GPSR(IP5_9_8, AUDIO_CLKOUT_A),
  788. PINMUX_IPSR_MSEL(IP5_9_8, REMOCON_C, SEL_REMOCON_C),
  789. PINMUX_IPSR_MSEL(IP5_11_10, SSI_WS2_B, SEL_SSI2_B),
  790. PINMUX_IPSR_GPSR(IP5_11_10, DU0_EXHSYNC_DU0_HSYNC),
  791. PINMUX_IPSR_GPSR(IP5_11_10, QSTH_QHS),
  792. PINMUX_IPSR_GPSR(IP5_12, DU0_EXVSYNC_DU0_VSYNC),
  793. PINMUX_IPSR_GPSR(IP5_12, QSTB_QHE),
  794. PINMUX_IPSR_GPSR(IP5_14_13, DU0_EXODDF_DU0_ODDF_DISP_CDE),
  795. PINMUX_IPSR_GPSR(IP5_14_13, QCPV_QDE),
  796. PINMUX_IPSR_MSEL(IP5_14_13, FMCLK_D, SEL_FM_D),
  797. PINMUX_IPSR_MSEL(IP5_17_15, SSI_SCK1_A, SEL_SSI1_A),
  798. PINMUX_IPSR_GPSR(IP5_17_15, DU0_DISP),
  799. PINMUX_IPSR_GPSR(IP5_17_15, QPOLA),
  800. PINMUX_IPSR_GPSR(IP5_17_15, AUDCK),
  801. PINMUX_IPSR_GPSR(IP5_17_15, ARM_TRACECLK),
  802. PINMUX_IPSR_GPSR(IP5_17_15, BPFCLK_D),
  803. PINMUX_IPSR_MSEL(IP5_20_18, SSI_WS1_A, SEL_SSI1_A),
  804. PINMUX_IPSR_GPSR(IP5_20_18, DU0_CDE),
  805. PINMUX_IPSR_GPSR(IP5_20_18, QPOLB),
  806. PINMUX_IPSR_GPSR(IP5_20_18, AUDSYNC),
  807. PINMUX_IPSR_GPSR(IP5_20_18, ARM_TRACECTL),
  808. PINMUX_IPSR_MSEL(IP5_20_18, FMIN_D, SEL_FM_D),
  809. PINMUX_IPSR_MSEL(IP5_22_21, SD1_CD_B, SEL_SD1_B),
  810. PINMUX_IPSR_GPSR(IP5_22_21, SSI_SCK78),
  811. PINMUX_IPSR_MSEL(IP5_22_21, HSPI_RX0_B, SEL_HSPI0_B),
  812. PINMUX_IPSR_GPSR(IP5_22_21, TX1_B),
  813. PINMUX_IPSR_MSEL(IP5_25_23, SD1_WP_B, SEL_SD1_B),
  814. PINMUX_IPSR_GPSR(IP5_25_23, SSI_WS78),
  815. PINMUX_IPSR_MSEL(IP5_25_23, HSPI_CLK0_B, SEL_HSPI0_B),
  816. PINMUX_IPSR_MSEL(IP5_25_23, RX1_B, SEL_SCIF1_B),
  817. PINMUX_IPSR_MSEL(IP5_25_23, CAN_CLK_D, SEL_CANCLK_D),
  818. PINMUX_IPSR_GPSR(IP5_28_26, SSI_SDATA8),
  819. PINMUX_IPSR_MSEL(IP5_28_26, SSI_SCK2_A, SEL_SSI2_A),
  820. PINMUX_IPSR_MSEL(IP5_28_26, HSPI_CS0_B, SEL_HSPI0_B),
  821. PINMUX_IPSR_GPSR(IP5_28_26, TX2_A),
  822. PINMUX_IPSR_GPSR(IP5_28_26, CAN0_TX_B),
  823. PINMUX_IPSR_GPSR(IP5_30_29, SSI_SDATA7),
  824. PINMUX_IPSR_GPSR(IP5_30_29, HSPI_TX0_B),
  825. PINMUX_IPSR_MSEL(IP5_30_29, RX2_A, SEL_SCIF2_A),
  826. PINMUX_IPSR_MSEL(IP5_30_29, CAN0_RX_B, SEL_CAN0_B),
  827. /* IPSR6 */
  828. PINMUX_IPSR_GPSR(IP6_1_0, SSI_SCK6),
  829. PINMUX_IPSR_MSEL(IP6_1_0, HSPI_RX2_A, SEL_HSPI2_A),
  830. PINMUX_IPSR_MSEL(IP6_1_0, FMCLK_B, SEL_FM_B),
  831. PINMUX_IPSR_GPSR(IP6_1_0, CAN1_TX_B),
  832. PINMUX_IPSR_GPSR(IP6_4_2, SSI_WS6),
  833. PINMUX_IPSR_MSEL(IP6_4_2, HSPI_CLK2_A, SEL_HSPI2_A),
  834. PINMUX_IPSR_GPSR(IP6_4_2, BPFCLK_B),
  835. PINMUX_IPSR_MSEL(IP6_4_2, CAN1_RX_B, SEL_CAN1_B),
  836. PINMUX_IPSR_GPSR(IP6_6_5, SSI_SDATA6),
  837. PINMUX_IPSR_GPSR(IP6_6_5, HSPI_TX2_A),
  838. PINMUX_IPSR_MSEL(IP6_6_5, FMIN_B, SEL_FM_B),
  839. PINMUX_IPSR_GPSR(IP6_7, SSI_SCK5),
  840. PINMUX_IPSR_MSEL(IP6_7, RX4_C, SEL_SCIF4_C),
  841. PINMUX_IPSR_GPSR(IP6_8, SSI_WS5),
  842. PINMUX_IPSR_GPSR(IP6_8, TX4_C),
  843. PINMUX_IPSR_GPSR(IP6_9, SSI_SDATA5),
  844. PINMUX_IPSR_MSEL(IP6_9, RX0_D, SEL_SCIF0_D),
  845. PINMUX_IPSR_GPSR(IP6_10, SSI_WS34),
  846. PINMUX_IPSR_GPSR(IP6_10, ARM_TRACEDATA_8),
  847. PINMUX_IPSR_GPSR(IP6_12_11, SSI_SDATA4),
  848. PINMUX_IPSR_MSEL(IP6_12_11, SSI_WS2_A, SEL_SSI2_A),
  849. PINMUX_IPSR_GPSR(IP6_12_11, ARM_TRACEDATA_9),
  850. PINMUX_IPSR_GPSR(IP6_13, SSI_SDATA3),
  851. PINMUX_IPSR_GPSR(IP6_13, ARM_TRACEDATA_10),
  852. PINMUX_IPSR_GPSR(IP6_15_14, SSI_SCK012),
  853. PINMUX_IPSR_GPSR(IP6_15_14, ARM_TRACEDATA_11),
  854. PINMUX_IPSR_GPSR(IP6_15_14, TX0_D),
  855. PINMUX_IPSR_GPSR(IP6_16, SSI_WS012),
  856. PINMUX_IPSR_GPSR(IP6_16, ARM_TRACEDATA_12),
  857. PINMUX_IPSR_GPSR(IP6_18_17, SSI_SDATA2),
  858. PINMUX_IPSR_MSEL(IP6_18_17, HSPI_CS2_A, SEL_HSPI2_A),
  859. PINMUX_IPSR_GPSR(IP6_18_17, ARM_TRACEDATA_13),
  860. PINMUX_IPSR_MSEL(IP6_18_17, SDA1_A, SEL_I2C1_A),
  861. PINMUX_IPSR_GPSR(IP6_20_19, SSI_SDATA1),
  862. PINMUX_IPSR_GPSR(IP6_20_19, ARM_TRACEDATA_14),
  863. PINMUX_IPSR_MSEL(IP6_20_19, SCL1_A, SEL_I2C1_A),
  864. PINMUX_IPSR_MSEL(IP6_20_19, SCK2_A, SEL_SCIF2_A),
  865. PINMUX_IPSR_GPSR(IP6_21, SSI_SDATA0),
  866. PINMUX_IPSR_GPSR(IP6_21, ARM_TRACEDATA_15),
  867. PINMUX_IPSR_GPSR(IP6_23_22, SD0_CLK),
  868. PINMUX_IPSR_GPSR(IP6_23_22, SUB_TDO),
  869. PINMUX_IPSR_GPSR(IP6_25_24, SD0_CMD),
  870. PINMUX_IPSR_GPSR(IP6_25_24, SUB_TRST),
  871. PINMUX_IPSR_GPSR(IP6_27_26, SD0_DAT0),
  872. PINMUX_IPSR_GPSR(IP6_27_26, SUB_TMS),
  873. PINMUX_IPSR_GPSR(IP6_29_28, SD0_DAT1),
  874. PINMUX_IPSR_GPSR(IP6_29_28, SUB_TCK),
  875. PINMUX_IPSR_GPSR(IP6_31_30, SD0_DAT2),
  876. PINMUX_IPSR_GPSR(IP6_31_30, SUB_TDI),
  877. /* IPSR7 */
  878. PINMUX_IPSR_GPSR(IP7_1_0, SD0_DAT3),
  879. PINMUX_IPSR_MSEL(IP7_1_0, IRQ1_B, SEL_IRQ1_B),
  880. PINMUX_IPSR_GPSR(IP7_3_2, SD0_CD),
  881. PINMUX_IPSR_GPSR(IP7_3_2, TX5_A),
  882. PINMUX_IPSR_GPSR(IP7_5_4, SD0_WP),
  883. PINMUX_IPSR_MSEL(IP7_5_4, RX5_A, SEL_SCIF5_A),
  884. PINMUX_IPSR_GPSR(IP7_8_6, VI1_CLKENB),
  885. PINMUX_IPSR_MSEL(IP7_8_6, HSPI_CLK0_A, SEL_HSPI0_A),
  886. PINMUX_IPSR_GPSR(IP7_8_6, HTX1_A),
  887. PINMUX_IPSR_MSEL(IP7_8_6, RTS1_C, SEL_SCIF1_C),
  888. PINMUX_IPSR_GPSR(IP7_11_9, VI1_FIELD),
  889. PINMUX_IPSR_MSEL(IP7_11_9, HSPI_CS0_A, SEL_HSPI0_A),
  890. PINMUX_IPSR_MSEL(IP7_11_9, HRX1_A, SEL_HSCIF1_A),
  891. PINMUX_IPSR_MSEL(IP7_11_9, SCK1_C, SEL_SCIF1_C),
  892. PINMUX_IPSR_GPSR(IP7_14_12, VI1_HSYNC),
  893. PINMUX_IPSR_MSEL(IP7_14_12, HSPI_RX0_A, SEL_HSPI0_A),
  894. PINMUX_IPSR_MSEL(IP7_14_12, HRTS1_A, SEL_HSCIF1_A),
  895. PINMUX_IPSR_MSEL(IP7_14_12, FMCLK_A, SEL_FM_A),
  896. PINMUX_IPSR_MSEL(IP7_14_12, RX1_C, SEL_SCIF1_C),
  897. PINMUX_IPSR_GPSR(IP7_17_15, VI1_VSYNC),
  898. PINMUX_IPSR_GPSR(IP7_17_15, HSPI_TX0),
  899. PINMUX_IPSR_MSEL(IP7_17_15, HCTS1_A, SEL_HSCIF1_A),
  900. PINMUX_IPSR_GPSR(IP7_17_15, BPFCLK_A),
  901. PINMUX_IPSR_GPSR(IP7_17_15, TX1_C),
  902. PINMUX_IPSR_GPSR(IP7_20_18, TCLK0),
  903. PINMUX_IPSR_MSEL(IP7_20_18, HSCK1_A, SEL_HSCIF1_A),
  904. PINMUX_IPSR_MSEL(IP7_20_18, FMIN_A, SEL_FM_A),
  905. PINMUX_IPSR_MSEL(IP7_20_18, IRQ2_C, SEL_IRQ2_C),
  906. PINMUX_IPSR_MSEL(IP7_20_18, CTS1_C, SEL_SCIF1_C),
  907. PINMUX_IPSR_GPSR(IP7_20_18, SPEEDIN),
  908. PINMUX_IPSR_GPSR(IP7_21, VI0_CLK),
  909. PINMUX_IPSR_MSEL(IP7_21, CAN_CLK_A, SEL_CANCLK_A),
  910. PINMUX_IPSR_GPSR(IP7_24_22, VI0_CLKENB),
  911. PINMUX_IPSR_MSEL(IP7_24_22, SD2_DAT2_B, SEL_SD2_B),
  912. PINMUX_IPSR_GPSR(IP7_24_22, VI1_DATA0),
  913. PINMUX_IPSR_GPSR(IP7_24_22, DU1_DG6),
  914. PINMUX_IPSR_MSEL(IP7_24_22, HSPI_RX1_A, SEL_HSPI1_A),
  915. PINMUX_IPSR_MSEL(IP7_24_22, RX4_B, SEL_SCIF4_B),
  916. PINMUX_IPSR_GPSR(IP7_28_25, VI0_FIELD),
  917. PINMUX_IPSR_MSEL(IP7_28_25, SD2_DAT3_B, SEL_SD2_B),
  918. PINMUX_DATA(VI0_R3_C_MARK, FN_IP7_28_25, FN_VI0_R3_C, FN_SEL_VI0_C), /* see sel_vi0 */
  919. PINMUX_DATA(VI0_R3_D_MARK, FN_IP7_28_25, FN_VI0_R3_C, FN_SEL_VI0_D), /* see sel_vi0 */
  920. PINMUX_IPSR_GPSR(IP7_28_25, VI1_DATA1),
  921. PINMUX_IPSR_GPSR(IP7_28_25, DU1_DG7),
  922. PINMUX_IPSR_MSEL(IP7_28_25, HSPI_CLK1_A, SEL_HSPI1_A),
  923. PINMUX_IPSR_GPSR(IP7_28_25, TX4_B),
  924. PINMUX_IPSR_GPSR(IP7_31_29, VI0_HSYNC),
  925. PINMUX_IPSR_MSEL(IP7_31_29, SD2_CD_B, SEL_SD2_B),
  926. PINMUX_IPSR_GPSR(IP7_31_29, VI1_DATA2),
  927. PINMUX_IPSR_GPSR(IP7_31_29, DU1_DR2),
  928. PINMUX_IPSR_MSEL(IP7_31_29, HSPI_CS1_A, SEL_HSPI1_A),
  929. PINMUX_IPSR_MSEL(IP7_31_29, RX3_B, SEL_SCIF3_B),
  930. /* IPSR8 */
  931. PINMUX_IPSR_GPSR(IP8_2_0, VI0_VSYNC),
  932. PINMUX_IPSR_MSEL(IP8_2_0, SD2_WP_B, SEL_SD2_B),
  933. PINMUX_IPSR_GPSR(IP8_2_0, VI1_DATA3),
  934. PINMUX_IPSR_GPSR(IP8_2_0, DU1_DR3),
  935. PINMUX_IPSR_GPSR(IP8_2_0, HSPI_TX1_A),
  936. PINMUX_IPSR_GPSR(IP8_2_0, TX3_B),
  937. PINMUX_IPSR_GPSR(IP8_5_3, VI0_DATA0_VI0_B0),
  938. PINMUX_IPSR_GPSR(IP8_5_3, DU1_DG2),
  939. PINMUX_IPSR_MSEL(IP8_5_3, IRQ2_B, SEL_IRQ2_B),
  940. PINMUX_IPSR_MSEL(IP8_5_3, RX3_D, SEL_SCIF3_D),
  941. PINMUX_IPSR_GPSR(IP8_8_6, VI0_DATA1_VI0_B1),
  942. PINMUX_IPSR_GPSR(IP8_8_6, DU1_DG3),
  943. PINMUX_IPSR_MSEL(IP8_8_6, IRQ3_B, SEL_IRQ3_B),
  944. PINMUX_IPSR_GPSR(IP8_8_6, TX3_D),
  945. PINMUX_IPSR_GPSR(IP8_10_9, VI0_DATA2_VI0_B2),
  946. PINMUX_IPSR_GPSR(IP8_10_9, DU1_DG4),
  947. PINMUX_IPSR_MSEL(IP8_10_9, RX0_C, SEL_SCIF0_C),
  948. PINMUX_IPSR_GPSR(IP8_13_11, VI0_DATA3_VI0_B3),
  949. PINMUX_IPSR_GPSR(IP8_13_11, DU1_DG5),
  950. PINMUX_IPSR_GPSR(IP8_13_11, TX1_A),
  951. PINMUX_IPSR_GPSR(IP8_13_11, TX0_C),
  952. PINMUX_IPSR_GPSR(IP8_15_14, VI0_DATA4_VI0_B4),
  953. PINMUX_IPSR_GPSR(IP8_15_14, DU1_DB2),
  954. PINMUX_IPSR_MSEL(IP8_15_14, RX1_A, SEL_SCIF1_A),
  955. PINMUX_IPSR_GPSR(IP8_18_16, VI0_DATA5_VI0_B5),
  956. PINMUX_IPSR_GPSR(IP8_18_16, DU1_DB3),
  957. PINMUX_IPSR_MSEL(IP8_18_16, SCK1_A, SEL_SCIF1_A),
  958. PINMUX_IPSR_GPSR(IP8_18_16, PWM4),
  959. PINMUX_IPSR_MSEL(IP8_18_16, HSCK1_B, SEL_HSCIF1_B),
  960. PINMUX_IPSR_GPSR(IP8_21_19, VI0_DATA6_VI0_G0),
  961. PINMUX_IPSR_GPSR(IP8_21_19, DU1_DB4),
  962. PINMUX_IPSR_MSEL(IP8_21_19, CTS1_A, SEL_SCIF1_A),
  963. PINMUX_IPSR_GPSR(IP8_21_19, PWM5),
  964. PINMUX_IPSR_GPSR(IP8_23_22, VI0_DATA7_VI0_G1),
  965. PINMUX_IPSR_GPSR(IP8_23_22, DU1_DB5),
  966. PINMUX_IPSR_MSEL(IP8_23_22, RTS1_A, SEL_SCIF1_A),
  967. PINMUX_IPSR_GPSR(IP8_26_24, VI0_G2),
  968. PINMUX_IPSR_GPSR(IP8_26_24, SD2_CLK_B),
  969. PINMUX_IPSR_GPSR(IP8_26_24, VI1_DATA4),
  970. PINMUX_IPSR_GPSR(IP8_26_24, DU1_DR4),
  971. PINMUX_IPSR_GPSR(IP8_26_24, HTX1_B),
  972. PINMUX_IPSR_GPSR(IP8_29_27, VI0_G3),
  973. PINMUX_IPSR_MSEL(IP8_29_27, SD2_CMD_B, SEL_SD2_B),
  974. PINMUX_IPSR_GPSR(IP8_29_27, VI1_DATA5),
  975. PINMUX_IPSR_GPSR(IP8_29_27, DU1_DR5),
  976. PINMUX_IPSR_MSEL(IP8_29_27, HRX1_B, SEL_HSCIF1_B),
  977. /* IPSR9 */
  978. PINMUX_IPSR_GPSR(IP9_2_0, VI0_G4),
  979. PINMUX_IPSR_MSEL(IP9_2_0, SD2_DAT0_B, SEL_SD2_B),
  980. PINMUX_IPSR_GPSR(IP9_2_0, VI1_DATA6),
  981. PINMUX_IPSR_GPSR(IP9_2_0, DU1_DR6),
  982. PINMUX_IPSR_MSEL(IP9_2_0, HRTS1_B, SEL_HSCIF1_B),
  983. PINMUX_IPSR_GPSR(IP9_5_3, VI0_G5),
  984. PINMUX_IPSR_MSEL(IP9_5_3, SD2_DAT1_B, SEL_SD2_B),
  985. PINMUX_IPSR_GPSR(IP9_5_3, VI1_DATA7),
  986. PINMUX_IPSR_GPSR(IP9_5_3, DU1_DR7),
  987. PINMUX_IPSR_MSEL(IP9_5_3, HCTS1_B, SEL_HSCIF1_B),
  988. PINMUX_DATA(VI0_R0_A_MARK, FN_IP9_8_6, FN_VI0_R0_A, FN_SEL_VI0_A), /* see sel_vi0 */
  989. PINMUX_DATA(VI0_R0_C_MARK, FN_IP9_8_6, FN_VI0_R0_A, FN_SEL_VI0_C), /* see sel_vi0 */
  990. PINMUX_IPSR_GPSR(IP9_8_6, VI1_CLK),
  991. PINMUX_IPSR_GPSR(IP9_8_6, ETH_REF_CLK),
  992. PINMUX_IPSR_GPSR(IP9_8_6, DU1_DOTCLKIN),
  993. PINMUX_DATA(VI0_R1_A_MARK, FN_IP9_11_9, FN_VI0_R1_A, FN_SEL_VI0_A), /* see sel_vi0 */
  994. PINMUX_DATA(VI0_R1_C_MARK, FN_IP9_11_9, FN_VI0_R1_A, FN_SEL_VI0_C), /* see sel_vi0 */
  995. PINMUX_IPSR_GPSR(IP9_11_9, VI1_DATA8),
  996. PINMUX_IPSR_GPSR(IP9_11_9, DU1_DB6),
  997. PINMUX_IPSR_GPSR(IP9_11_9, ETH_TXD0),
  998. PINMUX_IPSR_GPSR(IP9_11_9, PWM2),
  999. PINMUX_IPSR_GPSR(IP9_11_9, TCLK1),
  1000. PINMUX_DATA(VI0_R2_A_MARK, FN_IP9_14_12, FN_VI0_R2_A, FN_SEL_VI0_A), /* see sel_vi0 */
  1001. PINMUX_DATA(VI0_R2_C_MARK, FN_IP9_14_12, FN_VI0_R2_A, FN_SEL_VI0_C), /* see sel_vi0 */
  1002. PINMUX_IPSR_GPSR(IP9_14_12, VI1_DATA9),
  1003. PINMUX_IPSR_GPSR(IP9_14_12, DU1_DB7),
  1004. PINMUX_IPSR_GPSR(IP9_14_12, ETH_TXD1),
  1005. PINMUX_IPSR_GPSR(IP9_14_12, PWM3),
  1006. PINMUX_IPSR_MSEL(IP9_17_15, VI0_R3_A, SEL_VI0_A),
  1007. PINMUX_IPSR_GPSR(IP9_17_15, ETH_CRS_DV),
  1008. PINMUX_IPSR_GPSR(IP9_17_15, IECLK),
  1009. PINMUX_IPSR_MSEL(IP9_17_15, SCK2_C, SEL_SCIF2_C),
  1010. PINMUX_DATA(VI0_R4_A_MARK, FN_IP9_20_18, FN_VI0_R4_A, FN_SEL_VI0_A), /* see sel_vi0 */
  1011. PINMUX_DATA(VI0_R3_C_MARK, FN_IP9_20_18, FN_VI0_R4_A, FN_SEL_VI0_C), /* see sel_vi0 */
  1012. PINMUX_IPSR_GPSR(IP9_20_18, ETH_TX_EN),
  1013. PINMUX_IPSR_GPSR(IP9_20_18, IETX),
  1014. PINMUX_IPSR_GPSR(IP9_20_18, TX2_C),
  1015. PINMUX_DATA(VI0_R5_A_MARK, FN_IP9_23_21, FN_VI0_R5_A, FN_SEL_VI0_A), /* see sel_vi0 */
  1016. PINMUX_DATA(VI0_R5_C_MARK, FN_IP9_23_21, FN_VI0_R5_A, FN_SEL_VI0_C), /* see sel_vi0 */
  1017. PINMUX_IPSR_GPSR(IP9_23_21, ETH_RX_ER),
  1018. PINMUX_IPSR_MSEL(IP9_23_21, FMCLK_C, SEL_FM_C),
  1019. PINMUX_IPSR_GPSR(IP9_23_21, IERX),
  1020. PINMUX_IPSR_MSEL(IP9_23_21, RX2_C, SEL_SCIF2_C),
  1021. PINMUX_IPSR_MSEL(IP9_26_24, VI1_DATA10_A, SEL_VI1_A),
  1022. PINMUX_IPSR_GPSR(IP9_26_24, DU1_DOTCLKOUT),
  1023. PINMUX_IPSR_GPSR(IP9_26_24, ETH_RXD0),
  1024. PINMUX_IPSR_GPSR(IP9_26_24, BPFCLK_C),
  1025. PINMUX_IPSR_GPSR(IP9_26_24, TX2_D),
  1026. PINMUX_IPSR_MSEL(IP9_26_24, SDA2_C, SEL_I2C2_C),
  1027. PINMUX_IPSR_MSEL(IP9_29_27, VI1_DATA11_A, SEL_VI1_A),
  1028. PINMUX_IPSR_GPSR(IP9_29_27, DU1_EXHSYNC_DU1_HSYNC),
  1029. PINMUX_IPSR_GPSR(IP9_29_27, ETH_RXD1),
  1030. PINMUX_IPSR_MSEL(IP9_29_27, FMIN_C, SEL_FM_C),
  1031. PINMUX_IPSR_MSEL(IP9_29_27, RX2_D, SEL_SCIF2_D),
  1032. PINMUX_IPSR_MSEL(IP9_29_27, SCL2_C, SEL_I2C2_C),
  1033. /* IPSR10 */
  1034. PINMUX_IPSR_GPSR(IP10_2_0, SD2_CLK_A),
  1035. PINMUX_IPSR_GPSR(IP10_2_0, DU1_EXVSYNC_DU1_VSYNC),
  1036. PINMUX_IPSR_GPSR(IP10_2_0, ATARD1),
  1037. PINMUX_IPSR_GPSR(IP10_2_0, ETH_MDC),
  1038. PINMUX_IPSR_MSEL(IP10_2_0, SDA1_B, SEL_I2C1_B),
  1039. PINMUX_IPSR_MSEL(IP10_5_3, SD2_CMD_A, SEL_SD2_A),
  1040. PINMUX_IPSR_GPSR(IP10_5_3, DU1_EXODDF_DU1_ODDF_DISP_CDE),
  1041. PINMUX_IPSR_GPSR(IP10_5_3, ATAWR1),
  1042. PINMUX_IPSR_GPSR(IP10_5_3, ETH_MDIO),
  1043. PINMUX_IPSR_MSEL(IP10_5_3, SCL1_B, SEL_I2C1_B),
  1044. PINMUX_IPSR_MSEL(IP10_8_6, SD2_DAT0_A, SEL_SD2_A),
  1045. PINMUX_IPSR_GPSR(IP10_8_6, DU1_DISP),
  1046. PINMUX_IPSR_GPSR(IP10_8_6, ATACS01),
  1047. PINMUX_IPSR_MSEL(IP10_8_6, DREQ1_B, SEL_DREQ1_B),
  1048. PINMUX_IPSR_GPSR(IP10_8_6, ETH_LINK),
  1049. PINMUX_IPSR_MSEL(IP10_8_6, CAN1_RX_A, SEL_CAN1_A),
  1050. PINMUX_IPSR_MSEL(IP10_12_9, SD2_DAT1_A, SEL_SD2_A),
  1051. PINMUX_IPSR_GPSR(IP10_12_9, DU1_CDE),
  1052. PINMUX_IPSR_GPSR(IP10_12_9, ATACS11),
  1053. PINMUX_IPSR_GPSR(IP10_12_9, DACK1_B),
  1054. PINMUX_IPSR_GPSR(IP10_12_9, ETH_MAGIC),
  1055. PINMUX_IPSR_GPSR(IP10_12_9, CAN1_TX_A),
  1056. PINMUX_IPSR_GPSR(IP10_12_9, PWM6),
  1057. PINMUX_IPSR_MSEL(IP10_15_13, SD2_DAT2_A, SEL_SD2_A),
  1058. PINMUX_IPSR_GPSR(IP10_15_13, VI1_DATA12),
  1059. PINMUX_IPSR_MSEL(IP10_15_13, DREQ2_B, SEL_DREQ2_B),
  1060. PINMUX_IPSR_GPSR(IP10_15_13, ATADIR1),
  1061. PINMUX_IPSR_MSEL(IP10_15_13, HSPI_CLK2_B, SEL_HSPI2_B),
  1062. PINMUX_IPSR_MSEL(IP10_15_13, GPSCLK_B, SEL_GPS_B),
  1063. PINMUX_IPSR_MSEL(IP10_18_16, SD2_DAT3_A, SEL_SD2_A),
  1064. PINMUX_IPSR_GPSR(IP10_18_16, VI1_DATA13),
  1065. PINMUX_IPSR_GPSR(IP10_18_16, DACK2_B),
  1066. PINMUX_IPSR_GPSR(IP10_18_16, ATAG1),
  1067. PINMUX_IPSR_MSEL(IP10_18_16, HSPI_CS2_B, SEL_HSPI2_B),
  1068. PINMUX_IPSR_MSEL(IP10_18_16, GPSIN_B, SEL_GPS_B),
  1069. PINMUX_IPSR_MSEL(IP10_21_19, SD2_CD_A, SEL_SD2_A),
  1070. PINMUX_IPSR_GPSR(IP10_21_19, VI1_DATA14),
  1071. PINMUX_IPSR_MSEL(IP10_21_19, EX_WAIT1_B, SEL_WAIT1_B),
  1072. PINMUX_IPSR_MSEL(IP10_21_19, DREQ0_B, SEL_DREQ0_B),
  1073. PINMUX_IPSR_MSEL(IP10_21_19, HSPI_RX2_B, SEL_HSPI2_B),
  1074. PINMUX_IPSR_MSEL(IP10_21_19, REMOCON_A, SEL_REMOCON_A),
  1075. PINMUX_IPSR_MSEL(IP10_24_22, SD2_WP_A, SEL_SD2_A),
  1076. PINMUX_IPSR_GPSR(IP10_24_22, VI1_DATA15),
  1077. PINMUX_IPSR_MSEL(IP10_24_22, EX_WAIT2_B, SEL_WAIT2_B),
  1078. PINMUX_IPSR_GPSR(IP10_24_22, DACK0_B),
  1079. PINMUX_IPSR_GPSR(IP10_24_22, HSPI_TX2_B),
  1080. PINMUX_IPSR_MSEL(IP10_24_22, CAN_CLK_C, SEL_CANCLK_C),
  1081. };
  1082. /* Pin numbers for pins without a corresponding GPIO port number are computed
  1083. * from the row and column numbers with a 1000 offset to avoid collisions with
  1084. * GPIO port numbers.
  1085. */
  1086. #define PIN_NUMBER(row, col) (1000+((row)-1)*25+(col)-1)
  1087. static const struct sh_pfc_pin pinmux_pins[] = {
  1088. PINMUX_GPIO_GP_ALL(),
  1089. /* Pins not associated with a GPIO port */
  1090. SH_PFC_PIN_NAMED(3, 20, C20),
  1091. SH_PFC_PIN_NAMED(20, 1, T1),
  1092. SH_PFC_PIN_NAMED(25, 2, Y2),
  1093. };
  1094. /* - macro */
  1095. #define SH_PFC_PINS(name, args...) \
  1096. static const unsigned int name ##_pins[] = { args }
  1097. #define SH_PFC_MUX1(name, arg1) \
  1098. static const unsigned int name ##_mux[] = { arg1##_MARK }
  1099. #define SH_PFC_MUX2(name, arg1, arg2) \
  1100. static const unsigned int name ##_mux[] = { arg1##_MARK, arg2##_MARK, }
  1101. #define SH_PFC_MUX3(name, arg1, arg2, arg3) \
  1102. static const unsigned int name ##_mux[] = { arg1##_MARK, arg2##_MARK, \
  1103. arg3##_MARK }
  1104. #define SH_PFC_MUX4(name, arg1, arg2, arg3, arg4) \
  1105. static const unsigned int name ##_mux[] = { arg1##_MARK, arg2##_MARK, \
  1106. arg3##_MARK, arg4##_MARK }
  1107. #define SH_PFC_MUX8(name, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
  1108. static const unsigned int name ##_mux[] = { arg1##_MARK, arg2##_MARK, \
  1109. arg3##_MARK, arg4##_MARK, \
  1110. arg5##_MARK, arg6##_MARK, \
  1111. arg7##_MARK, arg8##_MARK, }
  1112. /* - AUDIO macro -------------------------------------------------------------*/
  1113. #define AUDIO_PFC_PIN(name, pin) SH_PFC_PINS(name, pin)
  1114. #define AUDIO_PFC_DAT(name, pin) SH_PFC_MUX1(name, pin)
  1115. /* - AUDIO clock -------------------------------------------------------------*/
  1116. AUDIO_PFC_PIN(audio_clk_a, RCAR_GP_PIN(2, 22));
  1117. AUDIO_PFC_DAT(audio_clk_a, AUDIO_CLKA);
  1118. AUDIO_PFC_PIN(audio_clk_b, RCAR_GP_PIN(2, 23));
  1119. AUDIO_PFC_DAT(audio_clk_b, AUDIO_CLKB);
  1120. AUDIO_PFC_PIN(audio_clk_c, RCAR_GP_PIN(2, 7));
  1121. AUDIO_PFC_DAT(audio_clk_c, AUDIO_CLKC);
  1122. AUDIO_PFC_PIN(audio_clkout_a, RCAR_GP_PIN(2, 16));
  1123. AUDIO_PFC_DAT(audio_clkout_a, AUDIO_CLKOUT_A);
  1124. AUDIO_PFC_PIN(audio_clkout_b, RCAR_GP_PIN(1, 16));
  1125. AUDIO_PFC_DAT(audio_clkout_b, AUDIO_CLKOUT_B);
  1126. /* - CAN macro --------_----------------------------------------------------- */
  1127. #define CAN_PFC_PINS(name, args...) SH_PFC_PINS(name, args)
  1128. #define CAN_PFC_DATA(name, tx, rx) SH_PFC_MUX2(name, tx, rx)
  1129. #define CAN_PFC_CLK(name, clk) SH_PFC_MUX1(name, clk)
  1130. /* - CAN0 ------------------------------------------------------------------- */
  1131. CAN_PFC_PINS(can0_data_a, RCAR_GP_PIN(1, 30), RCAR_GP_PIN(1, 31));
  1132. CAN_PFC_DATA(can0_data_a, CAN0_TX_A, CAN0_RX_A);
  1133. CAN_PFC_PINS(can0_data_b, RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 27));
  1134. CAN_PFC_DATA(can0_data_b, CAN0_TX_B, CAN0_RX_B);
  1135. /* - CAN1 ------------------------------------------------------------------- */
  1136. CAN_PFC_PINS(can1_data_a, RCAR_GP_PIN(4, 20), RCAR_GP_PIN(4, 19));
  1137. CAN_PFC_DATA(can1_data_a, CAN1_TX_A, CAN1_RX_A);
  1138. CAN_PFC_PINS(can1_data_b, RCAR_GP_PIN(2, 28), RCAR_GP_PIN(2, 29));
  1139. CAN_PFC_DATA(can1_data_b, CAN1_TX_B, CAN1_RX_B);
  1140. /* - CAN_CLK --------------------------------------------------------------- */
  1141. CAN_PFC_PINS(can_clk_a, RCAR_GP_PIN(3, 24));
  1142. CAN_PFC_CLK(can_clk_a, CAN_CLK_A);
  1143. CAN_PFC_PINS(can_clk_b, RCAR_GP_PIN(1, 16));
  1144. CAN_PFC_CLK(can_clk_b, CAN_CLK_B);
  1145. CAN_PFC_PINS(can_clk_c, RCAR_GP_PIN(4, 24));
  1146. CAN_PFC_CLK(can_clk_c, CAN_CLK_C);
  1147. CAN_PFC_PINS(can_clk_d, RCAR_GP_PIN(2, 25));
  1148. CAN_PFC_CLK(can_clk_d, CAN_CLK_D);
  1149. /* - Ether ------------------------------------------------------------------ */
  1150. SH_PFC_PINS(ether_rmii, RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11),
  1151. RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 9),
  1152. RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16),
  1153. RCAR_GP_PIN(4, 12), RCAR_GP_PIN(4, 14),
  1154. RCAR_GP_PIN(4, 18), RCAR_GP_PIN(4, 17));
  1155. static const unsigned int ether_rmii_mux[] = {
  1156. ETH_TXD0_MARK, ETH_TXD1_MARK, ETH_TX_EN_MARK, ETH_REF_CLK_MARK,
  1157. ETH_RXD0_MARK, ETH_RXD1_MARK, ETH_CRS_DV_MARK, ETH_RX_ER_MARK,
  1158. ETH_MDIO_MARK, ETH_MDC_MARK,
  1159. };
  1160. SH_PFC_PINS(ether_link, RCAR_GP_PIN(4, 19));
  1161. SH_PFC_MUX1(ether_link, ETH_LINK);
  1162. SH_PFC_PINS(ether_magic, RCAR_GP_PIN(4, 20));
  1163. SH_PFC_MUX1(ether_magic, ETH_MAGIC);
  1164. /* - SCIF macro ------------------------------------------------------------- */
  1165. #define SCIF_PFC_PIN(name, args...) SH_PFC_PINS(name, args)
  1166. #define SCIF_PFC_DAT(name, tx, rx) SH_PFC_MUX2(name, tx, rx)
  1167. #define SCIF_PFC_CTR(name, cts, rts) SH_PFC_MUX2(name, cts, rts)
  1168. #define SCIF_PFC_CLK(name, sck) SH_PFC_MUX1(name, sck)
  1169. /* - HSCIF0 ----------------------------------------------------------------- */
  1170. SCIF_PFC_PIN(hscif0_data_a, RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18));
  1171. SCIF_PFC_DAT(hscif0_data_a, HTX0_A, HRX0_A);
  1172. SCIF_PFC_PIN(hscif0_data_b, RCAR_GP_PIN(0, 29), RCAR_GP_PIN(0, 30));
  1173. SCIF_PFC_DAT(hscif0_data_b, HTX0_B, HRX0_B);
  1174. SCIF_PFC_PIN(hscif0_ctrl_a, RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 21));
  1175. SCIF_PFC_CTR(hscif0_ctrl_a, HCTS0_A, HRTS0_A);
  1176. SCIF_PFC_PIN(hscif0_ctrl_b, RCAR_GP_PIN(0, 31), RCAR_GP_PIN(0, 28));
  1177. SCIF_PFC_CTR(hscif0_ctrl_b, HCTS0_B, HRTS0_B);
  1178. SCIF_PFC_PIN(hscif0_clk, RCAR_GP_PIN(1, 19));
  1179. SCIF_PFC_CLK(hscif0_clk, HSCK0);
  1180. /* - HSCIF1 ----------------------------------------------------------------- */
  1181. SCIF_PFC_PIN(hscif1_data_a, RCAR_GP_PIN(3, 19), RCAR_GP_PIN(3, 20));
  1182. SCIF_PFC_DAT(hscif1_data_a, HTX1_A, HRX1_A);
  1183. SCIF_PFC_PIN(hscif1_data_b, RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 6));
  1184. SCIF_PFC_DAT(hscif1_data_b, HTX1_B, HRX1_B);
  1185. SCIF_PFC_PIN(hscif1_ctrl_a, RCAR_GP_PIN(3, 22), RCAR_GP_PIN(3, 21));
  1186. SCIF_PFC_CTR(hscif1_ctrl_a, HCTS1_A, HRTS1_A);
  1187. SCIF_PFC_PIN(hscif1_ctrl_b, RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 7));
  1188. SCIF_PFC_CTR(hscif1_ctrl_b, HCTS1_B, HRTS1_B);
  1189. SCIF_PFC_PIN(hscif1_clk_a, RCAR_GP_PIN(3, 23));
  1190. SCIF_PFC_CLK(hscif1_clk_a, HSCK1_A);
  1191. SCIF_PFC_PIN(hscif1_clk_b, RCAR_GP_PIN(4, 2));
  1192. SCIF_PFC_CLK(hscif1_clk_b, HSCK1_B);
  1193. /* - HSPI macro --------------------------------------------------------------*/
  1194. #define HSPI_PFC_PIN(name, args...) SH_PFC_PINS(name, args)
  1195. #define HSPI_PFC_DAT(name, clk, cs, rx, tx) SH_PFC_MUX4(name, clk, cs, rx, tx)
  1196. /* - HSPI0 -------------------------------------------------------------------*/
  1197. HSPI_PFC_PIN(hspi0_a, RCAR_GP_PIN(3, 19), RCAR_GP_PIN(3, 20),
  1198. RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 22));
  1199. HSPI_PFC_DAT(hspi0_a, HSPI_CLK0_A, HSPI_CS0_A,
  1200. HSPI_RX0_A, HSPI_TX0);
  1201. HSPI_PFC_PIN(hspi0_b, RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
  1202. RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 27));
  1203. HSPI_PFC_DAT(hspi0_b, HSPI_CLK0_B, HSPI_CS0_B,
  1204. HSPI_RX0_B, HSPI_TX0_B);
  1205. /* - HSPI1 -------------------------------------------------------------------*/
  1206. HSPI_PFC_PIN(hspi1_a, RCAR_GP_PIN(3, 26), RCAR_GP_PIN(3, 27),
  1207. RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 28));
  1208. HSPI_PFC_DAT(hspi1_a, HSPI_CLK1_A, HSPI_CS1_A,
  1209. HSPI_RX1_A, HSPI_TX1_A);
  1210. HSPI_PFC_PIN(hspi1_b, RCAR_GP_PIN(0, 27), RCAR_GP_PIN(0, 26),
  1211. PIN_NUMBER(20, 1), PIN_NUMBER(25, 2));
  1212. HSPI_PFC_DAT(hspi1_b, HSPI_CLK1_B, HSPI_CS1_B,
  1213. HSPI_RX1_B, HSPI_TX1_B);
  1214. /* - HSPI2 -------------------------------------------------------------------*/
  1215. HSPI_PFC_PIN(hspi2_a, RCAR_GP_PIN(2, 29), RCAR_GP_PIN(3, 8),
  1216. RCAR_GP_PIN(2, 28), RCAR_GP_PIN(2, 30));
  1217. HSPI_PFC_DAT(hspi2_a, HSPI_CLK2_A, HSPI_CS2_A,
  1218. HSPI_RX2_A, HSPI_TX2_A);
  1219. HSPI_PFC_PIN(hspi2_b, RCAR_GP_PIN(4, 21), RCAR_GP_PIN(4, 22),
  1220. RCAR_GP_PIN(4, 23), RCAR_GP_PIN(4, 24));
  1221. HSPI_PFC_DAT(hspi2_b, HSPI_CLK2_B, HSPI_CS2_B,
  1222. HSPI_RX2_B, HSPI_TX2_B);
  1223. /* - I2C macro ------------------------------------------------------------- */
  1224. #define I2C_PFC_PIN(name, args...) SH_PFC_PINS(name, args)
  1225. #define I2C_PFC_MUX(name, sda, scl) SH_PFC_MUX2(name, sda, scl)
  1226. /* - I2C1 ------------------------------------------------------------------ */
  1227. I2C_PFC_PIN(i2c1_a, RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9));
  1228. I2C_PFC_MUX(i2c1_a, SDA1_A, SCL1_A);
  1229. I2C_PFC_PIN(i2c1_b, RCAR_GP_PIN(4, 17), RCAR_GP_PIN(4, 18));
  1230. I2C_PFC_MUX(i2c1_b, SDA1_B, SCL1_B);
  1231. /* - I2C2 ------------------------------------------------------------------ */
  1232. I2C_PFC_PIN(i2c2_a, PIN_NUMBER(3, 20), RCAR_GP_PIN(1, 3));
  1233. I2C_PFC_MUX(i2c2_a, SDA2_A, SCL2_A);
  1234. I2C_PFC_PIN(i2c2_b, RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 4));
  1235. I2C_PFC_MUX(i2c2_b, SDA2_B, SCL2_B);
  1236. I2C_PFC_PIN(i2c2_c, RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16));
  1237. I2C_PFC_MUX(i2c2_c, SDA2_C, SCL2_C);
  1238. /* - I2C3 ------------------------------------------------------------------ */
  1239. I2C_PFC_PIN(i2c3_a, RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15));
  1240. I2C_PFC_MUX(i2c3_a, SDA3_A, SCL3_A);
  1241. I2C_PFC_PIN(i2c3_b, RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 19));
  1242. I2C_PFC_MUX(i2c3_b, SDA3_B, SCL3_B);
  1243. I2C_PFC_PIN(i2c3_c, RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 23));
  1244. I2C_PFC_MUX(i2c3_c, SDA3_C, SCL3_C);
  1245. /* - MMC macro -------------------------------------------------------------- */
  1246. #define MMC_PFC_PINS(name, args...) SH_PFC_PINS(name, args)
  1247. #define MMC_PFC_CTRL(name, clk, cmd) SH_PFC_MUX2(name, clk, cmd)
  1248. #define MMC_PFC_DAT1(name, d0) SH_PFC_MUX1(name, d0)
  1249. #define MMC_PFC_DAT4(name, d0, d1, d2, d3) SH_PFC_MUX4(name, d0, d1, d2, d3)
  1250. #define MMC_PFC_DAT8(name, d0, d1, d2, d3, d4, d5, d6, d7) \
  1251. SH_PFC_MUX8(name, d0, d1, d2, d3, d4, d5, d6, d7)
  1252. /* - MMC -------------------------------------------------------------------- */
  1253. MMC_PFC_PINS(mmc_ctrl, RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6));
  1254. MMC_PFC_CTRL(mmc_ctrl, MMC_CLK, MMC_CMD);
  1255. MMC_PFC_PINS(mmc_data1, RCAR_GP_PIN(1, 7));
  1256. MMC_PFC_DAT1(mmc_data1, MMC_D0);
  1257. MMC_PFC_PINS(mmc_data4, RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8),
  1258. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6));
  1259. MMC_PFC_DAT4(mmc_data4, MMC_D0, MMC_D1,
  1260. MMC_D2, MMC_D3);
  1261. MMC_PFC_PINS(mmc_data8, RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8),
  1262. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6),
  1263. RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 0),
  1264. RCAR_GP_PIN(0, 30), RCAR_GP_PIN(0, 31));
  1265. MMC_PFC_DAT8(mmc_data8, MMC_D0, MMC_D1,
  1266. MMC_D2, MMC_D3,
  1267. MMC_D4, MMC_D5,
  1268. MMC_D6, MMC_D7);
  1269. /* - SCIF CLOCK ------------------------------------------------------------- */
  1270. SCIF_PFC_PIN(scif_clk, RCAR_GP_PIN(1, 16));
  1271. SCIF_PFC_CLK(scif_clk, SCIF_CLK);
  1272. /* - SCIF0 ------------------------------------------------------------------ */
  1273. SCIF_PFC_PIN(scif0_data_a, RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18));
  1274. SCIF_PFC_DAT(scif0_data_a, TX0_A, RX0_A);
  1275. SCIF_PFC_PIN(scif0_data_b, RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 2));
  1276. SCIF_PFC_DAT(scif0_data_b, TX0_B, RX0_B);
  1277. SCIF_PFC_PIN(scif0_data_c, RCAR_GP_PIN(4, 0), RCAR_GP_PIN(3, 31));
  1278. SCIF_PFC_DAT(scif0_data_c, TX0_C, RX0_C);
  1279. SCIF_PFC_PIN(scif0_data_d, RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 1));
  1280. SCIF_PFC_DAT(scif0_data_d, TX0_D, RX0_D);
  1281. SCIF_PFC_PIN(scif0_ctrl, RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 21));
  1282. SCIF_PFC_CTR(scif0_ctrl, CTS0, RTS0);
  1283. SCIF_PFC_PIN(scif0_clk, RCAR_GP_PIN(1, 19));
  1284. SCIF_PFC_CLK(scif0_clk, SCK0);
  1285. /* - SCIF1 ------------------------------------------------------------------ */
  1286. SCIF_PFC_PIN(scif1_data_a, RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1));
  1287. SCIF_PFC_DAT(scif1_data_a, TX1_A, RX1_A);
  1288. SCIF_PFC_PIN(scif1_data_b, RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 25));
  1289. SCIF_PFC_DAT(scif1_data_b, TX1_B, RX1_B);
  1290. SCIF_PFC_PIN(scif1_data_c, RCAR_GP_PIN(3, 22), RCAR_GP_PIN(3, 21));
  1291. SCIF_PFC_DAT(scif1_data_c, TX1_C, RX1_C);
  1292. SCIF_PFC_PIN(scif1_data_d, RCAR_GP_PIN(1, 30), RCAR_GP_PIN(1, 31));
  1293. SCIF_PFC_DAT(scif1_data_d, TX1_D, RX1_D);
  1294. SCIF_PFC_PIN(scif1_ctrl_a, RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 4));
  1295. SCIF_PFC_CTR(scif1_ctrl_a, CTS1_A, RTS1_A);
  1296. SCIF_PFC_PIN(scif1_ctrl_c, RCAR_GP_PIN(3, 23), RCAR_GP_PIN(3, 19));
  1297. SCIF_PFC_CTR(scif1_ctrl_c, CTS1_C, RTS1_C);
  1298. SCIF_PFC_PIN(scif1_clk_a, RCAR_GP_PIN(4, 2));
  1299. SCIF_PFC_CLK(scif1_clk_a, SCK1_A);
  1300. SCIF_PFC_PIN(scif1_clk_c, RCAR_GP_PIN(3, 20));
  1301. SCIF_PFC_CLK(scif1_clk_c, SCK1_C);
  1302. /* - SCIF2 ------------------------------------------------------------------ */
  1303. SCIF_PFC_PIN(scif2_data_a, RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 27));
  1304. SCIF_PFC_DAT(scif2_data_a, TX2_A, RX2_A);
  1305. SCIF_PFC_PIN(scif2_data_b, RCAR_GP_PIN(0, 29), RCAR_GP_PIN(0, 28));
  1306. SCIF_PFC_DAT(scif2_data_b, TX2_B, RX2_B);
  1307. SCIF_PFC_PIN(scif2_data_c, RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 14));
  1308. SCIF_PFC_DAT(scif2_data_c, TX2_C, RX2_C);
  1309. SCIF_PFC_PIN(scif2_data_d, RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16));
  1310. SCIF_PFC_DAT(scif2_data_d, TX2_D, RX2_D);
  1311. SCIF_PFC_PIN(scif2_data_e, RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 4));
  1312. SCIF_PFC_DAT(scif2_data_e, TX2_E, RX2_E);
  1313. SCIF_PFC_PIN(scif2_clk_a, RCAR_GP_PIN(3, 9));
  1314. SCIF_PFC_CLK(scif2_clk_a, SCK2_A);
  1315. SCIF_PFC_PIN(scif2_clk_b, PIN_NUMBER(3, 20));
  1316. SCIF_PFC_CLK(scif2_clk_b, SCK2_B);
  1317. SCIF_PFC_PIN(scif2_clk_c, RCAR_GP_PIN(4, 12));
  1318. SCIF_PFC_CLK(scif2_clk_c, SCK2_C);
  1319. /* - SCIF3 ------------------------------------------------------------------ */
  1320. SCIF_PFC_PIN(scif3_data_a, RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9));
  1321. SCIF_PFC_DAT(scif3_data_a, TX3_A, RX3_A);
  1322. SCIF_PFC_PIN(scif3_data_b, RCAR_GP_PIN(3, 28), RCAR_GP_PIN(3, 27));
  1323. SCIF_PFC_DAT(scif3_data_b, TX3_B, RX3_B);
  1324. SCIF_PFC_PIN(scif3_data_c, RCAR_GP_PIN(1, 3), RCAR_GP_PIN(0, 31));
  1325. SCIF_PFC_DAT(scif3_data_c, TX3_C, RX3_C);
  1326. SCIF_PFC_PIN(scif3_data_d, RCAR_GP_PIN(3, 30), RCAR_GP_PIN(3, 29));
  1327. SCIF_PFC_DAT(scif3_data_d, TX3_D, RX3_D);
  1328. /* - SCIF4 ------------------------------------------------------------------ */
  1329. SCIF_PFC_PIN(scif4_data_a, RCAR_GP_PIN(2, 5), RCAR_GP_PIN(2, 4));
  1330. SCIF_PFC_DAT(scif4_data_a, TX4_A, RX4_A);
  1331. SCIF_PFC_PIN(scif4_data_b, RCAR_GP_PIN(3, 26), RCAR_GP_PIN(3, 25));
  1332. SCIF_PFC_DAT(scif4_data_b, TX4_B, RX4_B);
  1333. SCIF_PFC_PIN(scif4_data_c, RCAR_GP_PIN(3, 0), RCAR_GP_PIN(2, 31));
  1334. SCIF_PFC_DAT(scif4_data_c, TX4_C, RX4_C);
  1335. /* - SCIF5 ------------------------------------------------------------------ */
  1336. SCIF_PFC_PIN(scif5_data_a, RCAR_GP_PIN(3, 17), RCAR_GP_PIN(3, 18));
  1337. SCIF_PFC_DAT(scif5_data_a, TX5_A, RX5_A);
  1338. SCIF_PFC_PIN(scif5_data_b, RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14));
  1339. SCIF_PFC_DAT(scif5_data_b, TX5_B, RX5_B);
  1340. /* - SDHI macro ------------------------------------------------------------- */
  1341. #define SDHI_PFC_PINS(name, args...) SH_PFC_PINS(name, args)
  1342. #define SDHI_PFC_DAT1(name, d0) SH_PFC_MUX1(name, d0)
  1343. #define SDHI_PFC_DAT4(name, d0, d1, d2, d3) SH_PFC_MUX4(name, d0, d1, d2, d3)
  1344. #define SDHI_PFC_CTRL(name, clk, cmd) SH_PFC_MUX2(name, clk, cmd)
  1345. #define SDHI_PFC_CDPN(name, cd) SH_PFC_MUX1(name, cd)
  1346. #define SDHI_PFC_WPPN(name, wp) SH_PFC_MUX1(name, wp)
  1347. /* - SDHI0 ------------------------------------------------------------------ */
  1348. SDHI_PFC_PINS(sdhi0_cd, RCAR_GP_PIN(3, 17));
  1349. SDHI_PFC_CDPN(sdhi0_cd, SD0_CD);
  1350. SDHI_PFC_PINS(sdhi0_ctrl, RCAR_GP_PIN(3, 11), RCAR_GP_PIN(3, 12));
  1351. SDHI_PFC_CTRL(sdhi0_ctrl, SD0_CLK, SD0_CMD);
  1352. SDHI_PFC_PINS(sdhi0_data1, RCAR_GP_PIN(3, 13));
  1353. SDHI_PFC_DAT1(sdhi0_data1, SD0_DAT0);
  1354. SDHI_PFC_PINS(sdhi0_data4, RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
  1355. RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16));
  1356. SDHI_PFC_DAT4(sdhi0_data4, SD0_DAT0, SD0_DAT1,
  1357. SD0_DAT2, SD0_DAT3);
  1358. SDHI_PFC_PINS(sdhi0_wp, RCAR_GP_PIN(3, 18));
  1359. SDHI_PFC_WPPN(sdhi0_wp, SD0_WP);
  1360. /* - SDHI1 ------------------------------------------------------------------ */
  1361. SDHI_PFC_PINS(sdhi1_cd_a, RCAR_GP_PIN(0, 30));
  1362. SDHI_PFC_CDPN(sdhi1_cd_a, SD1_CD_A);
  1363. SDHI_PFC_PINS(sdhi1_cd_b, RCAR_GP_PIN(2, 24));
  1364. SDHI_PFC_CDPN(sdhi1_cd_b, SD1_CD_B);
  1365. SDHI_PFC_PINS(sdhi1_ctrl_a, RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6));
  1366. SDHI_PFC_CTRL(sdhi1_ctrl_a, SD1_CLK_A, SD1_CMD_A);
  1367. SDHI_PFC_PINS(sdhi1_ctrl_b, RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16));
  1368. SDHI_PFC_CTRL(sdhi1_ctrl_b, SD1_CLK_B, SD1_CMD_B);
  1369. SDHI_PFC_PINS(sdhi1_data1_a, RCAR_GP_PIN(1, 7));
  1370. SDHI_PFC_DAT1(sdhi1_data1_a, SD1_DAT0_A);
  1371. SDHI_PFC_PINS(sdhi1_data1_b, RCAR_GP_PIN(1, 18));
  1372. SDHI_PFC_DAT1(sdhi1_data1_b, SD1_DAT0_B);
  1373. SDHI_PFC_PINS(sdhi1_data4_a, RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8),
  1374. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6));
  1375. SDHI_PFC_DAT4(sdhi1_data4_a, SD1_DAT0_A, SD1_DAT1_A,
  1376. SD1_DAT2_A, SD1_DAT3_A);
  1377. SDHI_PFC_PINS(sdhi1_data4_b, RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 19),
  1378. RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 21));
  1379. SDHI_PFC_DAT4(sdhi1_data4_b, SD1_DAT0_B, SD1_DAT1_B,
  1380. SD1_DAT2_B, SD1_DAT3_B);
  1381. SDHI_PFC_PINS(sdhi1_wp_a, RCAR_GP_PIN(0, 31));
  1382. SDHI_PFC_WPPN(sdhi1_wp_a, SD1_WP_A);
  1383. SDHI_PFC_PINS(sdhi1_wp_b, RCAR_GP_PIN(2, 25));
  1384. SDHI_PFC_WPPN(sdhi1_wp_b, SD1_WP_B);
  1385. /* - SDH2 ------------------------------------------------------------------- */
  1386. SDHI_PFC_PINS(sdhi2_cd_a, RCAR_GP_PIN(4, 23));
  1387. SDHI_PFC_CDPN(sdhi2_cd_a, SD2_CD_A);
  1388. SDHI_PFC_PINS(sdhi2_cd_b, RCAR_GP_PIN(3, 27));
  1389. SDHI_PFC_CDPN(sdhi2_cd_b, SD2_CD_B);
  1390. SDHI_PFC_PINS(sdhi2_ctrl_a, RCAR_GP_PIN(4, 17), RCAR_GP_PIN(4, 18));
  1391. SDHI_PFC_CTRL(sdhi2_ctrl_a, SD2_CLK_A, SD2_CMD_A);
  1392. SDHI_PFC_PINS(sdhi2_ctrl_b, RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 6));
  1393. SDHI_PFC_CTRL(sdhi2_ctrl_b, SD2_CLK_B, SD2_CMD_B);
  1394. SDHI_PFC_PINS(sdhi2_data1_a, RCAR_GP_PIN(4, 19));
  1395. SDHI_PFC_DAT1(sdhi2_data1_a, SD2_DAT0_A);
  1396. SDHI_PFC_PINS(sdhi2_data1_b, RCAR_GP_PIN(4, 7));
  1397. SDHI_PFC_DAT1(sdhi2_data1_b, SD2_DAT0_B);
  1398. SDHI_PFC_PINS(sdhi2_data4_a, RCAR_GP_PIN(4, 19), RCAR_GP_PIN(4, 20),
  1399. RCAR_GP_PIN(4, 21), RCAR_GP_PIN(4, 22));
  1400. SDHI_PFC_DAT4(sdhi2_data4_a, SD2_DAT0_A, SD2_DAT1_A,
  1401. SD2_DAT2_A, SD2_DAT3_A);
  1402. SDHI_PFC_PINS(sdhi2_data4_b, RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 8),
  1403. RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26));
  1404. SDHI_PFC_DAT4(sdhi2_data4_b, SD2_DAT0_B, SD2_DAT1_B,
  1405. SD2_DAT2_B, SD2_DAT3_B);
  1406. SDHI_PFC_PINS(sdhi2_wp_a, RCAR_GP_PIN(4, 24));
  1407. SDHI_PFC_WPPN(sdhi2_wp_a, SD2_WP_A);
  1408. SDHI_PFC_PINS(sdhi2_wp_b, RCAR_GP_PIN(3, 28));
  1409. SDHI_PFC_WPPN(sdhi2_wp_b, SD2_WP_B);
  1410. /* - SSI macro -------------------------------------------------------------- */
  1411. #define SSI_PFC_PINS(name, args...) SH_PFC_PINS(name, args)
  1412. #define SSI_PFC_CTRL(name, sck, ws) SH_PFC_MUX2(name, sck, ws)
  1413. #define SSI_PFC_DATA(name, d) SH_PFC_MUX1(name, d)
  1414. /* - SSI 0/1/2 -------------------------------------------------------------- */
  1415. SSI_PFC_PINS(ssi012_ctrl, RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7));
  1416. SSI_PFC_CTRL(ssi012_ctrl, SSI_SCK012, SSI_WS012);
  1417. SSI_PFC_PINS(ssi0_data, RCAR_GP_PIN(3, 10));
  1418. SSI_PFC_DATA(ssi0_data, SSI_SDATA0);
  1419. SSI_PFC_PINS(ssi1_a_ctrl, RCAR_GP_PIN(2, 20), RCAR_GP_PIN(2, 21));
  1420. SSI_PFC_CTRL(ssi1_a_ctrl, SSI_SCK1_A, SSI_WS1_A);
  1421. SSI_PFC_PINS(ssi1_b_ctrl, PIN_NUMBER(3, 20), RCAR_GP_PIN(1, 3));
  1422. SSI_PFC_CTRL(ssi1_b_ctrl, SSI_SCK1_B, SSI_WS1_B);
  1423. SSI_PFC_PINS(ssi1_data, RCAR_GP_PIN(3, 9));
  1424. SSI_PFC_DATA(ssi1_data, SSI_SDATA1);
  1425. SSI_PFC_PINS(ssi2_a_ctrl, RCAR_GP_PIN(2, 26), RCAR_GP_PIN(3, 4));
  1426. SSI_PFC_CTRL(ssi2_a_ctrl, SSI_SCK2_A, SSI_WS2_A);
  1427. SSI_PFC_PINS(ssi2_b_ctrl, RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 17));
  1428. SSI_PFC_CTRL(ssi2_b_ctrl, SSI_SCK2_B, SSI_WS2_B);
  1429. SSI_PFC_PINS(ssi2_data, RCAR_GP_PIN(3, 8));
  1430. SSI_PFC_DATA(ssi2_data, SSI_SDATA2);
  1431. /* - SSI 3/4 ---------------------------------------------------------------- */
  1432. SSI_PFC_PINS(ssi34_ctrl, RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3));
  1433. SSI_PFC_CTRL(ssi34_ctrl, SSI_SCK34, SSI_WS34);
  1434. SSI_PFC_PINS(ssi3_data, RCAR_GP_PIN(3, 5));
  1435. SSI_PFC_DATA(ssi3_data, SSI_SDATA3);
  1436. SSI_PFC_PINS(ssi4_ctrl, RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 23));
  1437. SSI_PFC_CTRL(ssi4_ctrl, SSI_SCK4, SSI_WS4);
  1438. SSI_PFC_PINS(ssi4_data, RCAR_GP_PIN(3, 4));
  1439. SSI_PFC_DATA(ssi4_data, SSI_SDATA4);
  1440. /* - SSI 5 ------------------------------------------------------------------ */
  1441. SSI_PFC_PINS(ssi5_ctrl, RCAR_GP_PIN(2, 31), RCAR_GP_PIN(3, 0));
  1442. SSI_PFC_CTRL(ssi5_ctrl, SSI_SCK5, SSI_WS5);
  1443. SSI_PFC_PINS(ssi5_data, RCAR_GP_PIN(3, 1));
  1444. SSI_PFC_DATA(ssi5_data, SSI_SDATA5);
  1445. /* - SSI 6 ------------------------------------------------------------------ */
  1446. SSI_PFC_PINS(ssi6_ctrl, RCAR_GP_PIN(2, 28), RCAR_GP_PIN(2, 29));
  1447. SSI_PFC_CTRL(ssi6_ctrl, SSI_SCK6, SSI_WS6);
  1448. SSI_PFC_PINS(ssi6_data, RCAR_GP_PIN(2, 30));
  1449. SSI_PFC_DATA(ssi6_data, SSI_SDATA6);
  1450. /* - SSI 7/8 --------------------------------------------------------------- */
  1451. SSI_PFC_PINS(ssi78_ctrl, RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 25));
  1452. SSI_PFC_CTRL(ssi78_ctrl, SSI_SCK78, SSI_WS78);
  1453. SSI_PFC_PINS(ssi7_data, RCAR_GP_PIN(2, 27));
  1454. SSI_PFC_DATA(ssi7_data, SSI_SDATA7);
  1455. SSI_PFC_PINS(ssi8_data, RCAR_GP_PIN(2, 26));
  1456. SSI_PFC_DATA(ssi8_data, SSI_SDATA8);
  1457. /* - USB0 ------------------------------------------------------------------- */
  1458. SH_PFC_PINS(usb0, RCAR_GP_PIN(0, 1));
  1459. SH_PFC_MUX1(usb0, PENC0);
  1460. SH_PFC_PINS(usb0_ovc, RCAR_GP_PIN(0, 3));
  1461. SH_PFC_MUX1(usb0_ovc, USB_OVC0);
  1462. /* - USB1 ------------------------------------------------------------------- */
  1463. SH_PFC_PINS(usb1, RCAR_GP_PIN(0, 2));
  1464. SH_PFC_MUX1(usb1, PENC1);
  1465. SH_PFC_PINS(usb1_ovc, RCAR_GP_PIN(0, 4));
  1466. SH_PFC_MUX1(usb1_ovc, USB_OVC1);
  1467. /* - VIN macros ------------------------------------------------------------- */
  1468. #define VIN_PFC_PINS(name, args...) SH_PFC_PINS(name, args)
  1469. #define VIN_PFC_DAT8(name, d0, d1, d2, d3, d4, d5, d6, d7) \
  1470. SH_PFC_MUX8(name, d0, d1, d2, d3, d4, d5, d6, d7)
  1471. #define VIN_PFC_CLK(name, clk) SH_PFC_MUX1(name, clk)
  1472. #define VIN_PFC_SYNC(name, hsync, vsync) SH_PFC_MUX2(name, hsync, vsync)
  1473. /* - VIN0 ------------------------------------------------------------------- */
  1474. VIN_PFC_PINS(vin0_data8, RCAR_GP_PIN(3, 29), RCAR_GP_PIN(3, 30),
  1475. RCAR_GP_PIN(3, 31), RCAR_GP_PIN(4, 0),
  1476. RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 2),
  1477. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 4));
  1478. VIN_PFC_DAT8(vin0_data8, VI0_DATA0_VI0_B0, VI0_DATA1_VI0_B1,
  1479. VI0_DATA2_VI0_B2, VI0_DATA3_VI0_B3,
  1480. VI0_DATA4_VI0_B4, VI0_DATA5_VI0_B5,
  1481. VI0_DATA6_VI0_G0, VI0_DATA7_VI0_G1);
  1482. VIN_PFC_PINS(vin0_clk, RCAR_GP_PIN(3, 24));
  1483. VIN_PFC_CLK(vin0_clk, VI0_CLK);
  1484. VIN_PFC_PINS(vin0_sync, RCAR_GP_PIN(3, 27), RCAR_GP_PIN(3, 28));
  1485. VIN_PFC_SYNC(vin0_sync, VI0_HSYNC, VI0_VSYNC);
  1486. /* - VIN1 ------------------------------------------------------------------- */
  1487. VIN_PFC_PINS(vin1_data8, RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26),
  1488. RCAR_GP_PIN(3, 27), RCAR_GP_PIN(3, 28),
  1489. RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 6),
  1490. RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 8));
  1491. VIN_PFC_DAT8(vin1_data8, VI1_DATA0, VI1_DATA1,
  1492. VI1_DATA2, VI1_DATA3,
  1493. VI1_DATA4, VI1_DATA5,
  1494. VI1_DATA6, VI1_DATA7);
  1495. VIN_PFC_PINS(vin1_clk, RCAR_GP_PIN(4, 9));
  1496. VIN_PFC_CLK(vin1_clk, VI1_CLK);
  1497. VIN_PFC_PINS(vin1_sync, RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 22));
  1498. VIN_PFC_SYNC(vin1_sync, VI1_HSYNC, VI1_VSYNC);
  1499. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1500. SH_PFC_PIN_GROUP(audio_clk_a),
  1501. SH_PFC_PIN_GROUP(audio_clk_b),
  1502. SH_PFC_PIN_GROUP(audio_clk_c),
  1503. SH_PFC_PIN_GROUP(audio_clkout_a),
  1504. SH_PFC_PIN_GROUP(audio_clkout_b),
  1505. SH_PFC_PIN_GROUP(can0_data_a),
  1506. SH_PFC_PIN_GROUP(can0_data_b),
  1507. SH_PFC_PIN_GROUP(can1_data_a),
  1508. SH_PFC_PIN_GROUP(can1_data_b),
  1509. SH_PFC_PIN_GROUP(can_clk_a),
  1510. SH_PFC_PIN_GROUP(can_clk_b),
  1511. SH_PFC_PIN_GROUP(can_clk_c),
  1512. SH_PFC_PIN_GROUP(can_clk_d),
  1513. SH_PFC_PIN_GROUP(ether_rmii),
  1514. SH_PFC_PIN_GROUP(ether_link),
  1515. SH_PFC_PIN_GROUP(ether_magic),
  1516. SH_PFC_PIN_GROUP(hscif0_data_a),
  1517. SH_PFC_PIN_GROUP(hscif0_data_b),
  1518. SH_PFC_PIN_GROUP(hscif0_ctrl_a),
  1519. SH_PFC_PIN_GROUP(hscif0_ctrl_b),
  1520. SH_PFC_PIN_GROUP(hscif0_clk),
  1521. SH_PFC_PIN_GROUP(hscif1_data_a),
  1522. SH_PFC_PIN_GROUP(hscif1_data_b),
  1523. SH_PFC_PIN_GROUP(hscif1_ctrl_a),
  1524. SH_PFC_PIN_GROUP(hscif1_ctrl_b),
  1525. SH_PFC_PIN_GROUP(hscif1_clk_a),
  1526. SH_PFC_PIN_GROUP(hscif1_clk_b),
  1527. SH_PFC_PIN_GROUP(hspi0_a),
  1528. SH_PFC_PIN_GROUP(hspi0_b),
  1529. SH_PFC_PIN_GROUP(hspi1_a),
  1530. SH_PFC_PIN_GROUP(hspi1_b),
  1531. SH_PFC_PIN_GROUP(hspi2_a),
  1532. SH_PFC_PIN_GROUP(hspi2_b),
  1533. SH_PFC_PIN_GROUP(i2c1_a),
  1534. SH_PFC_PIN_GROUP(i2c1_b),
  1535. SH_PFC_PIN_GROUP(i2c2_a),
  1536. SH_PFC_PIN_GROUP(i2c2_b),
  1537. SH_PFC_PIN_GROUP(i2c2_c),
  1538. SH_PFC_PIN_GROUP(i2c3_a),
  1539. SH_PFC_PIN_GROUP(i2c3_b),
  1540. SH_PFC_PIN_GROUP(i2c3_c),
  1541. SH_PFC_PIN_GROUP(mmc_ctrl),
  1542. SH_PFC_PIN_GROUP(mmc_data1),
  1543. SH_PFC_PIN_GROUP(mmc_data4),
  1544. SH_PFC_PIN_GROUP(mmc_data8),
  1545. SH_PFC_PIN_GROUP(scif_clk),
  1546. SH_PFC_PIN_GROUP(scif0_data_a),
  1547. SH_PFC_PIN_GROUP(scif0_data_b),
  1548. SH_PFC_PIN_GROUP(scif0_data_c),
  1549. SH_PFC_PIN_GROUP(scif0_data_d),
  1550. SH_PFC_PIN_GROUP(scif0_ctrl),
  1551. SH_PFC_PIN_GROUP(scif0_clk),
  1552. SH_PFC_PIN_GROUP(scif1_data_a),
  1553. SH_PFC_PIN_GROUP(scif1_data_b),
  1554. SH_PFC_PIN_GROUP(scif1_data_c),
  1555. SH_PFC_PIN_GROUP(scif1_data_d),
  1556. SH_PFC_PIN_GROUP(scif1_ctrl_a),
  1557. SH_PFC_PIN_GROUP(scif1_ctrl_c),
  1558. SH_PFC_PIN_GROUP(scif1_clk_a),
  1559. SH_PFC_PIN_GROUP(scif1_clk_c),
  1560. SH_PFC_PIN_GROUP(scif2_data_a),
  1561. SH_PFC_PIN_GROUP(scif2_data_b),
  1562. SH_PFC_PIN_GROUP(scif2_data_c),
  1563. SH_PFC_PIN_GROUP(scif2_data_d),
  1564. SH_PFC_PIN_GROUP(scif2_data_e),
  1565. SH_PFC_PIN_GROUP(scif2_clk_a),
  1566. SH_PFC_PIN_GROUP(scif2_clk_b),
  1567. SH_PFC_PIN_GROUP(scif2_clk_c),
  1568. SH_PFC_PIN_GROUP(scif3_data_a),
  1569. SH_PFC_PIN_GROUP(scif3_data_b),
  1570. SH_PFC_PIN_GROUP(scif3_data_c),
  1571. SH_PFC_PIN_GROUP(scif3_data_d),
  1572. SH_PFC_PIN_GROUP(scif4_data_a),
  1573. SH_PFC_PIN_GROUP(scif4_data_b),
  1574. SH_PFC_PIN_GROUP(scif4_data_c),
  1575. SH_PFC_PIN_GROUP(scif5_data_a),
  1576. SH_PFC_PIN_GROUP(scif5_data_b),
  1577. SH_PFC_PIN_GROUP(sdhi0_cd),
  1578. SH_PFC_PIN_GROUP(sdhi0_ctrl),
  1579. SH_PFC_PIN_GROUP(sdhi0_data1),
  1580. SH_PFC_PIN_GROUP(sdhi0_data4),
  1581. SH_PFC_PIN_GROUP(sdhi0_wp),
  1582. SH_PFC_PIN_GROUP(sdhi1_cd_a),
  1583. SH_PFC_PIN_GROUP(sdhi1_cd_b),
  1584. SH_PFC_PIN_GROUP(sdhi1_ctrl_a),
  1585. SH_PFC_PIN_GROUP(sdhi1_ctrl_b),
  1586. SH_PFC_PIN_GROUP(sdhi1_data1_a),
  1587. SH_PFC_PIN_GROUP(sdhi1_data1_b),
  1588. SH_PFC_PIN_GROUP(sdhi1_data4_a),
  1589. SH_PFC_PIN_GROUP(sdhi1_data4_b),
  1590. SH_PFC_PIN_GROUP(sdhi1_wp_a),
  1591. SH_PFC_PIN_GROUP(sdhi1_wp_b),
  1592. SH_PFC_PIN_GROUP(sdhi2_cd_a),
  1593. SH_PFC_PIN_GROUP(sdhi2_cd_b),
  1594. SH_PFC_PIN_GROUP(sdhi2_ctrl_a),
  1595. SH_PFC_PIN_GROUP(sdhi2_ctrl_b),
  1596. SH_PFC_PIN_GROUP(sdhi2_data1_a),
  1597. SH_PFC_PIN_GROUP(sdhi2_data1_b),
  1598. SH_PFC_PIN_GROUP(sdhi2_data4_a),
  1599. SH_PFC_PIN_GROUP(sdhi2_data4_b),
  1600. SH_PFC_PIN_GROUP(sdhi2_wp_a),
  1601. SH_PFC_PIN_GROUP(sdhi2_wp_b),
  1602. SH_PFC_PIN_GROUP(ssi012_ctrl),
  1603. SH_PFC_PIN_GROUP(ssi0_data),
  1604. SH_PFC_PIN_GROUP(ssi1_a_ctrl),
  1605. SH_PFC_PIN_GROUP(ssi1_b_ctrl),
  1606. SH_PFC_PIN_GROUP(ssi1_data),
  1607. SH_PFC_PIN_GROUP(ssi2_a_ctrl),
  1608. SH_PFC_PIN_GROUP(ssi2_b_ctrl),
  1609. SH_PFC_PIN_GROUP(ssi2_data),
  1610. SH_PFC_PIN_GROUP(ssi34_ctrl),
  1611. SH_PFC_PIN_GROUP(ssi3_data),
  1612. SH_PFC_PIN_GROUP(ssi4_ctrl),
  1613. SH_PFC_PIN_GROUP(ssi4_data),
  1614. SH_PFC_PIN_GROUP(ssi5_ctrl),
  1615. SH_PFC_PIN_GROUP(ssi5_data),
  1616. SH_PFC_PIN_GROUP(ssi6_ctrl),
  1617. SH_PFC_PIN_GROUP(ssi6_data),
  1618. SH_PFC_PIN_GROUP(ssi78_ctrl),
  1619. SH_PFC_PIN_GROUP(ssi7_data),
  1620. SH_PFC_PIN_GROUP(ssi8_data),
  1621. SH_PFC_PIN_GROUP(usb0),
  1622. SH_PFC_PIN_GROUP(usb0_ovc),
  1623. SH_PFC_PIN_GROUP(usb1),
  1624. SH_PFC_PIN_GROUP(usb1_ovc),
  1625. SH_PFC_PIN_GROUP(vin0_data8),
  1626. SH_PFC_PIN_GROUP(vin0_clk),
  1627. SH_PFC_PIN_GROUP(vin0_sync),
  1628. SH_PFC_PIN_GROUP(vin1_data8),
  1629. SH_PFC_PIN_GROUP(vin1_clk),
  1630. SH_PFC_PIN_GROUP(vin1_sync),
  1631. };
  1632. static const char * const audio_clk_groups[] = {
  1633. "audio_clk_a",
  1634. "audio_clk_b",
  1635. "audio_clk_c",
  1636. "audio_clkout_a",
  1637. "audio_clkout_b",
  1638. };
  1639. static const char * const can0_groups[] = {
  1640. "can0_data_a",
  1641. "can0_data_b",
  1642. "can_clk_a",
  1643. "can_clk_b",
  1644. "can_clk_c",
  1645. "can_clk_d",
  1646. };
  1647. static const char * const can1_groups[] = {
  1648. "can1_data_a",
  1649. "can1_data_b",
  1650. "can_clk_a",
  1651. "can_clk_b",
  1652. "can_clk_c",
  1653. "can_clk_d",
  1654. };
  1655. static const char * const ether_groups[] = {
  1656. "ether_rmii",
  1657. "ether_link",
  1658. "ether_magic",
  1659. };
  1660. static const char * const hscif0_groups[] = {
  1661. "hscif0_data_a",
  1662. "hscif0_data_b",
  1663. "hscif0_ctrl_a",
  1664. "hscif0_ctrl_b",
  1665. "hscif0_clk",
  1666. };
  1667. static const char * const hscif1_groups[] = {
  1668. "hscif1_data_a",
  1669. "hscif1_data_b",
  1670. "hscif1_ctrl_a",
  1671. "hscif1_ctrl_b",
  1672. "hscif1_clk_a",
  1673. "hscif1_clk_b",
  1674. };
  1675. static const char * const hspi0_groups[] = {
  1676. "hspi0_a",
  1677. "hspi0_b",
  1678. };
  1679. static const char * const hspi1_groups[] = {
  1680. "hspi1_a",
  1681. "hspi1_b",
  1682. };
  1683. static const char * const hspi2_groups[] = {
  1684. "hspi2_a",
  1685. "hspi2_b",
  1686. };
  1687. static const char * const i2c1_groups[] = {
  1688. "i2c1_a",
  1689. "i2c1_b",
  1690. };
  1691. static const char * const i2c2_groups[] = {
  1692. "i2c2_a",
  1693. "i2c2_b",
  1694. "i2c2_c",
  1695. };
  1696. static const char * const i2c3_groups[] = {
  1697. "i2c3_a",
  1698. "i2c3_b",
  1699. "i2c3_c",
  1700. };
  1701. static const char * const mmc_groups[] = {
  1702. "mmc_ctrl",
  1703. "mmc_data1",
  1704. "mmc_data4",
  1705. "mmc_data8",
  1706. };
  1707. static const char * const scif_clk_groups[] = {
  1708. "scif_clk",
  1709. };
  1710. static const char * const scif0_groups[] = {
  1711. "scif0_data_a",
  1712. "scif0_data_b",
  1713. "scif0_data_c",
  1714. "scif0_data_d",
  1715. "scif0_ctrl",
  1716. "scif0_clk",
  1717. };
  1718. static const char * const scif1_groups[] = {
  1719. "scif1_data_a",
  1720. "scif1_data_b",
  1721. "scif1_data_c",
  1722. "scif1_data_d",
  1723. "scif1_ctrl_a",
  1724. "scif1_ctrl_c",
  1725. "scif1_clk_a",
  1726. "scif1_clk_c",
  1727. };
  1728. static const char * const scif2_groups[] = {
  1729. "scif2_data_a",
  1730. "scif2_data_b",
  1731. "scif2_data_c",
  1732. "scif2_data_d",
  1733. "scif2_data_e",
  1734. "scif2_clk_a",
  1735. "scif2_clk_b",
  1736. "scif2_clk_c",
  1737. };
  1738. static const char * const scif3_groups[] = {
  1739. "scif3_data_a",
  1740. "scif3_data_b",
  1741. "scif3_data_c",
  1742. "scif3_data_d",
  1743. };
  1744. static const char * const scif4_groups[] = {
  1745. "scif4_data_a",
  1746. "scif4_data_b",
  1747. "scif4_data_c",
  1748. };
  1749. static const char * const scif5_groups[] = {
  1750. "scif5_data_a",
  1751. "scif5_data_b",
  1752. };
  1753. static const char * const sdhi0_groups[] = {
  1754. "sdhi0_cd",
  1755. "sdhi0_ctrl",
  1756. "sdhi0_data1",
  1757. "sdhi0_data4",
  1758. "sdhi0_wp",
  1759. };
  1760. static const char * const sdhi1_groups[] = {
  1761. "sdhi1_cd_a",
  1762. "sdhi1_cd_b",
  1763. "sdhi1_ctrl_a",
  1764. "sdhi1_ctrl_b",
  1765. "sdhi1_data1_a",
  1766. "sdhi1_data1_b",
  1767. "sdhi1_data4_a",
  1768. "sdhi1_data4_b",
  1769. "sdhi1_wp_a",
  1770. "sdhi1_wp_b",
  1771. };
  1772. static const char * const sdhi2_groups[] = {
  1773. "sdhi2_cd_a",
  1774. "sdhi2_cd_b",
  1775. "sdhi2_ctrl_a",
  1776. "sdhi2_ctrl_b",
  1777. "sdhi2_data1_a",
  1778. "sdhi2_data1_b",
  1779. "sdhi2_data4_a",
  1780. "sdhi2_data4_b",
  1781. "sdhi2_wp_a",
  1782. "sdhi2_wp_b",
  1783. };
  1784. static const char * const ssi_groups[] = {
  1785. "ssi012_ctrl",
  1786. "ssi0_data",
  1787. "ssi1_a_ctrl",
  1788. "ssi1_b_ctrl",
  1789. "ssi1_data",
  1790. "ssi2_a_ctrl",
  1791. "ssi2_b_ctrl",
  1792. "ssi2_data",
  1793. "ssi34_ctrl",
  1794. "ssi3_data",
  1795. "ssi4_ctrl",
  1796. "ssi4_data",
  1797. "ssi5_ctrl",
  1798. "ssi5_data",
  1799. "ssi6_ctrl",
  1800. "ssi6_data",
  1801. "ssi78_ctrl",
  1802. "ssi7_data",
  1803. "ssi8_data",
  1804. };
  1805. static const char * const usb0_groups[] = {
  1806. "usb0",
  1807. "usb0_ovc",
  1808. };
  1809. static const char * const usb1_groups[] = {
  1810. "usb1",
  1811. "usb1_ovc",
  1812. };
  1813. static const char * const vin0_groups[] = {
  1814. "vin0_data8",
  1815. "vin0_clk",
  1816. "vin0_sync",
  1817. };
  1818. static const char * const vin1_groups[] = {
  1819. "vin1_data8",
  1820. "vin1_clk",
  1821. "vin1_sync",
  1822. };
  1823. static const struct sh_pfc_function pinmux_functions[] = {
  1824. SH_PFC_FUNCTION(audio_clk),
  1825. SH_PFC_FUNCTION(can0),
  1826. SH_PFC_FUNCTION(can1),
  1827. SH_PFC_FUNCTION(ether),
  1828. SH_PFC_FUNCTION(hscif0),
  1829. SH_PFC_FUNCTION(hscif1),
  1830. SH_PFC_FUNCTION(hspi0),
  1831. SH_PFC_FUNCTION(hspi1),
  1832. SH_PFC_FUNCTION(hspi2),
  1833. SH_PFC_FUNCTION(i2c1),
  1834. SH_PFC_FUNCTION(i2c2),
  1835. SH_PFC_FUNCTION(i2c3),
  1836. SH_PFC_FUNCTION(mmc),
  1837. SH_PFC_FUNCTION(scif_clk),
  1838. SH_PFC_FUNCTION(scif0),
  1839. SH_PFC_FUNCTION(scif1),
  1840. SH_PFC_FUNCTION(scif2),
  1841. SH_PFC_FUNCTION(scif3),
  1842. SH_PFC_FUNCTION(scif4),
  1843. SH_PFC_FUNCTION(scif5),
  1844. SH_PFC_FUNCTION(sdhi0),
  1845. SH_PFC_FUNCTION(sdhi1),
  1846. SH_PFC_FUNCTION(sdhi2),
  1847. SH_PFC_FUNCTION(ssi),
  1848. SH_PFC_FUNCTION(usb0),
  1849. SH_PFC_FUNCTION(usb1),
  1850. SH_PFC_FUNCTION(vin0),
  1851. SH_PFC_FUNCTION(vin1),
  1852. };
  1853. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  1854. { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) {
  1855. GP_0_31_FN, FN_IP1_14_11,
  1856. GP_0_30_FN, FN_IP1_10_8,
  1857. GP_0_29_FN, FN_IP1_7_5,
  1858. GP_0_28_FN, FN_IP1_4_2,
  1859. GP_0_27_FN, FN_IP1_1,
  1860. GP_0_26_FN, FN_IP1_0,
  1861. GP_0_25_FN, FN_IP0_30,
  1862. GP_0_24_FN, FN_IP0_29,
  1863. GP_0_23_FN, FN_IP0_28,
  1864. GP_0_22_FN, FN_IP0_27,
  1865. GP_0_21_FN, FN_IP0_26,
  1866. GP_0_20_FN, FN_IP0_25,
  1867. GP_0_19_FN, FN_IP0_24,
  1868. GP_0_18_FN, FN_IP0_23,
  1869. GP_0_17_FN, FN_IP0_22,
  1870. GP_0_16_FN, FN_IP0_21,
  1871. GP_0_15_FN, FN_IP0_20,
  1872. GP_0_14_FN, FN_IP0_19,
  1873. GP_0_13_FN, FN_IP0_18,
  1874. GP_0_12_FN, FN_IP0_17,
  1875. GP_0_11_FN, FN_IP0_16,
  1876. GP_0_10_FN, FN_IP0_15,
  1877. GP_0_9_FN, FN_A3,
  1878. GP_0_8_FN, FN_A2,
  1879. GP_0_7_FN, FN_A1,
  1880. GP_0_6_FN, FN_IP0_14_12,
  1881. GP_0_5_FN, FN_IP0_11_8,
  1882. GP_0_4_FN, FN_IP0_7_5,
  1883. GP_0_3_FN, FN_IP0_4_2,
  1884. GP_0_2_FN, FN_PENC1,
  1885. GP_0_1_FN, FN_PENC0,
  1886. GP_0_0_FN, FN_IP0_1_0 }
  1887. },
  1888. { PINMUX_CFG_REG("GPSR1", 0xfffc0008, 32, 1) {
  1889. GP_1_31_FN, FN_IP4_6_4,
  1890. GP_1_30_FN, FN_IP4_3_1,
  1891. GP_1_29_FN, FN_IP4_0,
  1892. GP_1_28_FN, FN_IP3_31,
  1893. GP_1_27_FN, FN_IP3_30,
  1894. GP_1_26_FN, FN_IP3_29,
  1895. GP_1_25_FN, FN_IP3_28,
  1896. GP_1_24_FN, FN_IP3_27,
  1897. GP_1_23_FN, FN_IP3_26_24,
  1898. GP_1_22_FN, FN_IP3_23_21,
  1899. GP_1_21_FN, FN_IP3_20_19,
  1900. GP_1_20_FN, FN_IP3_18_16,
  1901. GP_1_19_FN, FN_IP3_15_13,
  1902. GP_1_18_FN, FN_IP3_12_10,
  1903. GP_1_17_FN, FN_IP3_9_8,
  1904. GP_1_16_FN, FN_IP3_7_5,
  1905. GP_1_15_FN, FN_IP3_4_2,
  1906. GP_1_14_FN, FN_IP3_1_0,
  1907. GP_1_13_FN, FN_IP2_31,
  1908. GP_1_12_FN, FN_IP2_30,
  1909. GP_1_11_FN, FN_IP2_17,
  1910. GP_1_10_FN, FN_IP2_16_14,
  1911. GP_1_9_FN, FN_IP2_13_12,
  1912. GP_1_8_FN, FN_IP2_11_9,
  1913. GP_1_7_FN, FN_IP2_8_6,
  1914. GP_1_6_FN, FN_IP2_5_3,
  1915. GP_1_5_FN, FN_IP2_2_0,
  1916. GP_1_4_FN, FN_IP1_29_28,
  1917. GP_1_3_FN, FN_IP1_27_25,
  1918. GP_1_2_FN, FN_IP1_24,
  1919. GP_1_1_FN, FN_WE0,
  1920. GP_1_0_FN, FN_IP1_23_21 }
  1921. },
  1922. { PINMUX_CFG_REG("GPSR2", 0xfffc000c, 32, 1) {
  1923. GP_2_31_FN, FN_IP6_7,
  1924. GP_2_30_FN, FN_IP6_6_5,
  1925. GP_2_29_FN, FN_IP6_4_2,
  1926. GP_2_28_FN, FN_IP6_1_0,
  1927. GP_2_27_FN, FN_IP5_30_29,
  1928. GP_2_26_FN, FN_IP5_28_26,
  1929. GP_2_25_FN, FN_IP5_25_23,
  1930. GP_2_24_FN, FN_IP5_22_21,
  1931. GP_2_23_FN, FN_AUDIO_CLKB,
  1932. GP_2_22_FN, FN_AUDIO_CLKA,
  1933. GP_2_21_FN, FN_IP5_20_18,
  1934. GP_2_20_FN, FN_IP5_17_15,
  1935. GP_2_19_FN, FN_IP5_14_13,
  1936. GP_2_18_FN, FN_IP5_12,
  1937. GP_2_17_FN, FN_IP5_11_10,
  1938. GP_2_16_FN, FN_IP5_9_8,
  1939. GP_2_15_FN, FN_IP5_7,
  1940. GP_2_14_FN, FN_IP5_6,
  1941. GP_2_13_FN, FN_IP5_5_4,
  1942. GP_2_12_FN, FN_IP5_3_2,
  1943. GP_2_11_FN, FN_IP5_1_0,
  1944. GP_2_10_FN, FN_IP4_30_29,
  1945. GP_2_9_FN, FN_IP4_28_27,
  1946. GP_2_8_FN, FN_IP4_26_25,
  1947. GP_2_7_FN, FN_IP4_24_21,
  1948. GP_2_6_FN, FN_IP4_20_17,
  1949. GP_2_5_FN, FN_IP4_16_15,
  1950. GP_2_4_FN, FN_IP4_14_13,
  1951. GP_2_3_FN, FN_IP4_12_11,
  1952. GP_2_2_FN, FN_IP4_10_9,
  1953. GP_2_1_FN, FN_IP4_8,
  1954. GP_2_0_FN, FN_IP4_7 }
  1955. },
  1956. { PINMUX_CFG_REG("GPSR3", 0xfffc0010, 32, 1) {
  1957. GP_3_31_FN, FN_IP8_10_9,
  1958. GP_3_30_FN, FN_IP8_8_6,
  1959. GP_3_29_FN, FN_IP8_5_3,
  1960. GP_3_28_FN, FN_IP8_2_0,
  1961. GP_3_27_FN, FN_IP7_31_29,
  1962. GP_3_26_FN, FN_IP7_28_25,
  1963. GP_3_25_FN, FN_IP7_24_22,
  1964. GP_3_24_FN, FN_IP7_21,
  1965. GP_3_23_FN, FN_IP7_20_18,
  1966. GP_3_22_FN, FN_IP7_17_15,
  1967. GP_3_21_FN, FN_IP7_14_12,
  1968. GP_3_20_FN, FN_IP7_11_9,
  1969. GP_3_19_FN, FN_IP7_8_6,
  1970. GP_3_18_FN, FN_IP7_5_4,
  1971. GP_3_17_FN, FN_IP7_3_2,
  1972. GP_3_16_FN, FN_IP7_1_0,
  1973. GP_3_15_FN, FN_IP6_31_30,
  1974. GP_3_14_FN, FN_IP6_29_28,
  1975. GP_3_13_FN, FN_IP6_27_26,
  1976. GP_3_12_FN, FN_IP6_25_24,
  1977. GP_3_11_FN, FN_IP6_23_22,
  1978. GP_3_10_FN, FN_IP6_21,
  1979. GP_3_9_FN, FN_IP6_20_19,
  1980. GP_3_8_FN, FN_IP6_18_17,
  1981. GP_3_7_FN, FN_IP6_16,
  1982. GP_3_6_FN, FN_IP6_15_14,
  1983. GP_3_5_FN, FN_IP6_13,
  1984. GP_3_4_FN, FN_IP6_12_11,
  1985. GP_3_3_FN, FN_IP6_10,
  1986. GP_3_2_FN, FN_SSI_SCK34,
  1987. GP_3_1_FN, FN_IP6_9,
  1988. GP_3_0_FN, FN_IP6_8 }
  1989. },
  1990. { PINMUX_CFG_REG("GPSR4", 0xfffc0014, 32, 1) {
  1991. 0, 0,
  1992. 0, 0,
  1993. 0, 0,
  1994. 0, 0,
  1995. 0, 0,
  1996. GP_4_26_FN, FN_AVS2,
  1997. GP_4_25_FN, FN_AVS1,
  1998. GP_4_24_FN, FN_IP10_24_22,
  1999. GP_4_23_FN, FN_IP10_21_19,
  2000. GP_4_22_FN, FN_IP10_18_16,
  2001. GP_4_21_FN, FN_IP10_15_13,
  2002. GP_4_20_FN, FN_IP10_12_9,
  2003. GP_4_19_FN, FN_IP10_8_6,
  2004. GP_4_18_FN, FN_IP10_5_3,
  2005. GP_4_17_FN, FN_IP10_2_0,
  2006. GP_4_16_FN, FN_IP9_29_27,
  2007. GP_4_15_FN, FN_IP9_26_24,
  2008. GP_4_14_FN, FN_IP9_23_21,
  2009. GP_4_13_FN, FN_IP9_20_18,
  2010. GP_4_12_FN, FN_IP9_17_15,
  2011. GP_4_11_FN, FN_IP9_14_12,
  2012. GP_4_10_FN, FN_IP9_11_9,
  2013. GP_4_9_FN, FN_IP9_8_6,
  2014. GP_4_8_FN, FN_IP9_5_3,
  2015. GP_4_7_FN, FN_IP9_2_0,
  2016. GP_4_6_FN, FN_IP8_29_27,
  2017. GP_4_5_FN, FN_IP8_26_24,
  2018. GP_4_4_FN, FN_IP8_23_22,
  2019. GP_4_3_FN, FN_IP8_21_19,
  2020. GP_4_2_FN, FN_IP8_18_16,
  2021. GP_4_1_FN, FN_IP8_15_14,
  2022. GP_4_0_FN, FN_IP8_13_11 }
  2023. },
  2024. { PINMUX_CFG_REG_VAR("IPSR0", 0xfffc0020, 32,
  2025. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2026. 1, 1, 1, 1, 1, 1, 3, 4, 3, 3, 2) {
  2027. /* IP0_31 [1] */
  2028. 0, 0,
  2029. /* IP0_30 [1] */
  2030. FN_A19, 0,
  2031. /* IP0_29 [1] */
  2032. FN_A18, 0,
  2033. /* IP0_28 [1] */
  2034. FN_A17, 0,
  2035. /* IP0_27 [1] */
  2036. FN_A16, 0,
  2037. /* IP0_26 [1] */
  2038. FN_A15, 0,
  2039. /* IP0_25 [1] */
  2040. FN_A14, 0,
  2041. /* IP0_24 [1] */
  2042. FN_A13, 0,
  2043. /* IP0_23 [1] */
  2044. FN_A12, 0,
  2045. /* IP0_22 [1] */
  2046. FN_A11, 0,
  2047. /* IP0_21 [1] */
  2048. FN_A10, 0,
  2049. /* IP0_20 [1] */
  2050. FN_A9, 0,
  2051. /* IP0_19 [1] */
  2052. FN_A8, 0,
  2053. /* IP0_18 [1] */
  2054. FN_A7, 0,
  2055. /* IP0_17 [1] */
  2056. FN_A6, 0,
  2057. /* IP0_16 [1] */
  2058. FN_A5, 0,
  2059. /* IP0_15 [1] */
  2060. FN_A4, 0,
  2061. /* IP0_14_12 [3] */
  2062. FN_SD1_DAT3_A, FN_MMC_D3, 0, FN_A0,
  2063. FN_ATAG0_A, 0, FN_REMOCON_B, 0,
  2064. /* IP0_11_8 [4] */
  2065. FN_SD1_DAT2_A, FN_MMC_D2, 0, FN_BS,
  2066. FN_ATADIR0_A, 0, FN_SDSELF_B, 0,
  2067. FN_PWM4_B, 0, 0, 0,
  2068. 0, 0, 0, 0,
  2069. /* IP0_7_5 [3] */
  2070. FN_AUDATA1, FN_ARM_TRACEDATA_1, FN_GPSIN_C, FN_USB_OVC1,
  2071. FN_RX2_E, FN_SCL2_B, 0, 0,
  2072. /* IP0_4_2 [3] */
  2073. FN_AUDATA0, FN_ARM_TRACEDATA_0, FN_GPSCLK_C, FN_USB_OVC0,
  2074. FN_TX2_E, FN_SDA2_B, 0, 0,
  2075. /* IP0_1_0 [2] */
  2076. FN_PRESETOUT, 0, FN_PWM1, 0,
  2077. }
  2078. },
  2079. { PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32,
  2080. 1, 1, 2, 3, 1, 3, 3, 1, 2, 4, 3, 3, 3, 1, 1) {
  2081. /* IP1_31 [1] */
  2082. 0, 0,
  2083. /* IP1_30 [1] */
  2084. 0, 0,
  2085. /* IP1_29_28 [2] */
  2086. FN_EX_CS1, FN_MMC_D4, 0, 0,
  2087. /* IP1_27_25 [3] */
  2088. FN_SSI_WS1_B, FN_EX_CS0, FN_SCL2_A, FN_TX3_C,
  2089. FN_TS_SCK0_A, 0, 0, 0,
  2090. /* IP1_24 [1] */
  2091. FN_WE1, FN_ATAWR0_B,
  2092. /* IP1_23_21 [3] */
  2093. FN_MMC_D5, FN_ATADIR0_B, 0, FN_RD_WR,
  2094. 0, 0, 0, 0,
  2095. /* IP1_20_18 [3] */
  2096. FN_SSI_SCK1_B, FN_ATAG0_B, FN_CS1_A26, FN_SDA2_A,
  2097. FN_SCK2_B, 0, 0, 0,
  2098. /* IP1_17 [1] */
  2099. FN_CS0, FN_HSPI_RX1_B,
  2100. /* IP1_16_15 [2] */
  2101. FN_CLKOUT, FN_HSPI_TX1_B, FN_PWM0_B, 0,
  2102. /* IP1_14_11 [4] */
  2103. FN_SD1_WP_A, FN_MMC_D7, 0, FN_A25,
  2104. FN_DACK1_A, 0, FN_HCTS0_B, FN_RX3_C,
  2105. FN_TS_SDAT0_A, 0, 0, 0,
  2106. 0, 0, 0, 0,
  2107. /* IP1_10_8 [3] */
  2108. FN_SD1_CLK_B, FN_MMC_D6, 0, FN_A24,
  2109. FN_DREQ1_A, 0, FN_HRX0_B, FN_TS_SPSYNC0_A,
  2110. /* IP1_7_5 [3] */
  2111. FN_A23, FN_HTX0_B, FN_TX2_B, FN_DACK2_A,
  2112. FN_TS_SDEN0_A, 0, 0, 0,
  2113. /* IP1_4_2 [3] */
  2114. FN_A22, FN_HRTS0_B, FN_RX2_B, FN_DREQ2_A,
  2115. 0, 0, 0, 0,
  2116. /* IP1_1 [1] */
  2117. FN_A21, FN_HSPI_CLK1_B,
  2118. /* IP1_0 [1] */
  2119. FN_A20, FN_HSPI_CS1_B,
  2120. }
  2121. },
  2122. { PINMUX_CFG_REG_VAR("IPSR2", 0xfffc0028, 32,
  2123. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2124. 1, 1, 1, 1, 3, 2, 3, 3, 3, 3) {
  2125. /* IP2_31 [1] */
  2126. FN_MLB_CLK, FN_IRQ1_A,
  2127. /* IP2_30 [1] */
  2128. FN_RD_WR_B, FN_IRQ0,
  2129. /* IP2_29 [1] */
  2130. FN_D11, 0,
  2131. /* IP2_28 [1] */
  2132. FN_D10, 0,
  2133. /* IP2_27 [1] */
  2134. FN_D9, 0,
  2135. /* IP2_26 [1] */
  2136. FN_D8, 0,
  2137. /* IP2_25 [1] */
  2138. FN_D7, 0,
  2139. /* IP2_24 [1] */
  2140. FN_D6, 0,
  2141. /* IP2_23 [1] */
  2142. FN_D5, 0,
  2143. /* IP2_22 [1] */
  2144. FN_D4, 0,
  2145. /* IP2_21 [1] */
  2146. FN_D3, 0,
  2147. /* IP2_20 [1] */
  2148. FN_D2, 0,
  2149. /* IP2_19 [1] */
  2150. FN_D1, 0,
  2151. /* IP2_18 [1] */
  2152. FN_D0, 0,
  2153. /* IP2_17 [1] */
  2154. FN_EX_WAIT0, FN_PWM0_C,
  2155. /* IP2_16_14 [3] */
  2156. FN_DACK0, 0, 0, FN_TX3_A,
  2157. FN_DRACK0, 0, 0, 0,
  2158. /* IP2_13_12 [2] */
  2159. FN_DREQ0_A, 0, 0, FN_RX3_A,
  2160. /* IP2_11_9 [3] */
  2161. FN_SD1_DAT1_A, FN_MMC_D1, 0, FN_ATAWR0_A,
  2162. FN_EX_CS5, FN_EX_WAIT2_A, 0, 0,
  2163. /* IP2_8_6 [3] */
  2164. FN_SD1_DAT0_A, FN_MMC_D0, 0, FN_ATARD0,
  2165. FN_EX_CS4, FN_EX_WAIT1_A, 0, 0,
  2166. /* IP2_5_3 [3] */
  2167. FN_SD1_CMD_A, FN_MMC_CMD, 0, FN_ATACS10,
  2168. FN_EX_CS3, 0, 0, 0,
  2169. /* IP2_2_0 [3] */
  2170. FN_SD1_CLK_A, FN_MMC_CLK, 0, FN_ATACS00,
  2171. FN_EX_CS2, 0, 0, 0,
  2172. }
  2173. },
  2174. { PINMUX_CFG_REG_VAR("IPSR3", 0xfffc002c, 32,
  2175. 1, 1, 1, 1, 1, 3, 3, 2,
  2176. 3, 3, 3, 2, 3, 3, 2) {
  2177. /* IP3_31 [1] */
  2178. FN_DU0_DR6, FN_LCDOUT6,
  2179. /* IP3_30 [1] */
  2180. FN_DU0_DR5, FN_LCDOUT5,
  2181. /* IP3_29 [1] */
  2182. FN_DU0_DR4, FN_LCDOUT4,
  2183. /* IP3_28 [1] */
  2184. FN_DU0_DR3, FN_LCDOUT3,
  2185. /* IP3_27 [1] */
  2186. FN_DU0_DR2, FN_LCDOUT2,
  2187. /* IP3_26_24 [3] */
  2188. FN_SSI_WS4, FN_DU0_DR1, FN_LCDOUT1, FN_AUDATA3,
  2189. FN_ARM_TRACEDATA_3, FN_SCL3_C, FN_ADICHS2, FN_TS_SPSYNC0_B,
  2190. /* IP3_23_21 [3] */
  2191. FN_SSI_SCK4, FN_DU0_DR0, FN_LCDOUT0, FN_AUDATA2,
  2192. FN_ARM_TRACEDATA_2, FN_SDA3_C, FN_ADICHS1, FN_TS_SDEN0_B,
  2193. /* IP3_20_19 [2] */
  2194. FN_SD1_DAT3_B, FN_HRTS0_A, FN_RTS0, 0,
  2195. /* IP3_18_16 [3] */
  2196. FN_SD1_DAT2_B, FN_HCTS0_A, FN_CTS0, 0,
  2197. 0, 0, 0, 0,
  2198. /* IP3_15_13 [3] */
  2199. FN_SD1_DAT1_B, FN_HSCK0, FN_SCK0, FN_SCL3_B,
  2200. 0, 0, 0, 0,
  2201. /* IP3_12_10 [3] */
  2202. FN_SD1_DAT0_B, FN_HRX0_A, FN_RX0_A, 0,
  2203. 0, 0, 0, 0,
  2204. /* IP3_9_8 [2] */
  2205. FN_SD1_CLK_B, FN_HTX0_A, FN_TX0_A, 0,
  2206. /* IP3_7_5 [3] */
  2207. FN_SD1_CMD_B, FN_SCIF_CLK, FN_AUDIO_CLKOUT_B, FN_CAN_CLK_B,
  2208. FN_SDA3_B, 0, 0, 0,
  2209. /* IP3_4_2 [3] */
  2210. FN_MLB_DAT, FN_TX5_B, FN_SCL3_A, FN_IRQ3_A,
  2211. FN_SDSELF_B, 0, 0, 0,
  2212. /* IP3_1_0 [2] */
  2213. FN_MLB_SIG, FN_RX5_B, FN_SDA3_A, FN_IRQ2_A,
  2214. }
  2215. },
  2216. { PINMUX_CFG_REG_VAR("IPSR4", 0xfffc0030, 32,
  2217. 1, 2, 2, 2, 4, 4, 2, 2, 2, 2, 1, 1, 3, 3, 1) {
  2218. /* IP4_31 [1] */
  2219. 0, 0,
  2220. /* IP4_30_29 [2] */
  2221. FN_VI0_R4_B, FN_DU0_DB4, FN_LCDOUT20, 0,
  2222. /* IP4_28_27 [2] */
  2223. FN_VI0_R3_B, FN_DU0_DB3, FN_LCDOUT19, 0,
  2224. /* IP4_26_25 [2] */
  2225. FN_VI0_R2_B, FN_DU0_DB2, FN_LCDOUT18, 0,
  2226. /* IP4_24_21 [4] */
  2227. FN_AUDIO_CLKC, FN_VI0_R1_B, FN_DU0_DB1, FN_LCDOUT17,
  2228. FN_AUDATA7, FN_ARM_TRACEDATA_7, FN_GPSIN_A, 0,
  2229. FN_ADICS_SAMP, FN_TS_SCK0_B, 0, 0,
  2230. 0, 0, 0, 0,
  2231. /* IP4_20_17 [4] */
  2232. FN_SSI_SCK2_B, FN_VI0_R0_B, FN_DU0_DB0, FN_LCDOUT16,
  2233. FN_AUDATA6, FN_ARM_TRACEDATA_6, FN_GPSCLK_A, FN_PWM0_A,
  2234. FN_ADICLK, FN_TS_SDAT0_B, 0, 0,
  2235. 0, 0, 0, 0,
  2236. /* IP4_16_15 [2] */
  2237. FN_DU0_DG7, FN_LCDOUT15, FN_TX4_A, 0,
  2238. /* IP4_14_13 [2] */
  2239. FN_DU0_DG6, FN_LCDOUT14, FN_RX4_A, 0,
  2240. /* IP4_12_11 [2] */
  2241. FN_DU0_DG5, FN_LCDOUT13, FN_TX0_B, 0,
  2242. /* IP4_10_9 [2] */
  2243. FN_DU0_DG4, FN_LCDOUT12, FN_RX0_B, 0,
  2244. /* IP4_8 [1] */
  2245. FN_DU0_DG3, FN_LCDOUT11,
  2246. /* IP4_7 [1] */
  2247. FN_DU0_DG2, FN_LCDOUT10,
  2248. /* IP4_6_4 [3] */
  2249. FN_DU0_DG1, FN_LCDOUT9, FN_AUDATA5, FN_ARM_TRACEDATA_5,
  2250. FN_RX1_D, FN_CAN0_RX_A, FN_ADIDATA, 0,
  2251. /* IP4_3_1 [3] */
  2252. FN_DU0_DG0, FN_LCDOUT8, FN_AUDATA4, FN_ARM_TRACEDATA_4,
  2253. FN_TX1_D, FN_CAN0_TX_A, FN_ADICHS0, 0,
  2254. /* IP4_0 [1] */
  2255. FN_DU0_DR7, FN_LCDOUT7,
  2256. }
  2257. },
  2258. { PINMUX_CFG_REG_VAR("IPSR5", 0xfffc0034, 32,
  2259. 1, 2, 3, 3, 2, 3, 3, 2, 1, 2, 2, 1, 1, 2, 2, 2) {
  2260. /* IP5_31 [1] */
  2261. 0, 0,
  2262. /* IP5_30_29 [2] */
  2263. FN_SSI_SDATA7, FN_HSPI_TX0_B, FN_RX2_A, FN_CAN0_RX_B,
  2264. /* IP5_28_26 [3] */
  2265. FN_SSI_SDATA8, FN_SSI_SCK2_A, FN_HSPI_CS0_B, FN_TX2_A,
  2266. FN_CAN0_TX_B, 0, 0, 0,
  2267. /* IP5_25_23 [3] */
  2268. FN_SD1_WP_B, FN_SSI_WS78, FN_HSPI_CLK0_B, FN_RX1_B,
  2269. FN_CAN_CLK_D, 0, 0, 0,
  2270. /* IP5_22_21 [2] */
  2271. FN_SD1_CD_B, FN_SSI_SCK78, FN_HSPI_RX0_B, FN_TX1_B,
  2272. /* IP5_20_18 [3] */
  2273. FN_SSI_WS1_A, FN_DU0_CDE, FN_QPOLB, FN_AUDSYNC,
  2274. FN_ARM_TRACECTL, FN_FMIN_D, 0, 0,
  2275. /* IP5_17_15 [3] */
  2276. FN_SSI_SCK1_A, FN_DU0_DISP, FN_QPOLA, FN_AUDCK,
  2277. FN_ARM_TRACECLK, FN_BPFCLK_D, 0, 0,
  2278. /* IP5_14_13 [2] */
  2279. FN_DU0_EXODDF_DU0_ODDF_DISP_CDE, FN_QCPV_QDE,
  2280. FN_FMCLK_D, 0,
  2281. /* IP5_12 [1] */
  2282. FN_DU0_EXVSYNC_DU0_VSYNC, FN_QSTB_QHE,
  2283. /* IP5_11_10 [2] */
  2284. FN_SSI_WS2_B, FN_DU0_EXHSYNC_DU0_HSYNC,
  2285. FN_QSTH_QHS, 0,
  2286. /* IP5_9_8 [2] */
  2287. FN_DU0_DOTCLKO_UT1, FN_QSTVB_QVE,
  2288. FN_AUDIO_CLKOUT_A, FN_REMOCON_C,
  2289. /* IP5_7 [1] */
  2290. FN_DU0_DOTCLKO_UT0, FN_QCLK,
  2291. /* IP5_6 [1] */
  2292. FN_DU0_DOTCLKIN, FN_QSTVA_QVS,
  2293. /* IP5_5_4 [2] */
  2294. FN_VI1_DATA11_B, FN_DU0_DB7, FN_LCDOUT23, 0,
  2295. /* IP5_3_2 [2] */
  2296. FN_VI1_DATA10_B, FN_DU0_DB6, FN_LCDOUT22, 0,
  2297. /* IP5_1_0 [2] */
  2298. FN_VI0_R5_B, FN_DU0_DB5, FN_LCDOUT21, 0,
  2299. }
  2300. },
  2301. { PINMUX_CFG_REG_VAR("IPSR6", 0xfffc0038, 32,
  2302. 2, 2, 2, 2, 2, 1, 2, 2, 1, 2,
  2303. 1, 2, 1, 1, 1, 1, 2, 3, 2) {
  2304. /* IP6_31_30 [2] */
  2305. FN_SD0_DAT2, 0, FN_SUB_TDI, 0,
  2306. /* IP6_29_28 [2] */
  2307. FN_SD0_DAT1, 0, FN_SUB_TCK, 0,
  2308. /* IP6_27_26 [2] */
  2309. FN_SD0_DAT0, 0, FN_SUB_TMS, 0,
  2310. /* IP6_25_24 [2] */
  2311. FN_SD0_CMD, 0, FN_SUB_TRST, 0,
  2312. /* IP6_23_22 [2] */
  2313. FN_SD0_CLK, 0, FN_SUB_TDO, 0,
  2314. /* IP6_21 [1] */
  2315. FN_SSI_SDATA0, FN_ARM_TRACEDATA_15,
  2316. /* IP6_20_19 [2] */
  2317. FN_SSI_SDATA1, FN_ARM_TRACEDATA_14,
  2318. FN_SCL1_A, FN_SCK2_A,
  2319. /* IP6_18_17 [2] */
  2320. FN_SSI_SDATA2, FN_HSPI_CS2_A,
  2321. FN_ARM_TRACEDATA_13, FN_SDA1_A,
  2322. /* IP6_16 [1] */
  2323. FN_SSI_WS012, FN_ARM_TRACEDATA_12,
  2324. /* IP6_15_14 [2] */
  2325. FN_SSI_SCK012, FN_ARM_TRACEDATA_11,
  2326. FN_TX0_D, 0,
  2327. /* IP6_13 [1] */
  2328. FN_SSI_SDATA3, FN_ARM_TRACEDATA_10,
  2329. /* IP6_12_11 [2] */
  2330. FN_SSI_SDATA4, FN_SSI_WS2_A,
  2331. FN_ARM_TRACEDATA_9, 0,
  2332. /* IP6_10 [1] */
  2333. FN_SSI_WS34, FN_ARM_TRACEDATA_8,
  2334. /* IP6_9 [1] */
  2335. FN_SSI_SDATA5, FN_RX0_D,
  2336. /* IP6_8 [1] */
  2337. FN_SSI_WS5, FN_TX4_C,
  2338. /* IP6_7 [1] */
  2339. FN_SSI_SCK5, FN_RX4_C,
  2340. /* IP6_6_5 [2] */
  2341. FN_SSI_SDATA6, FN_HSPI_TX2_A,
  2342. FN_FMIN_B, 0,
  2343. /* IP6_4_2 [3] */
  2344. FN_SSI_WS6, FN_HSPI_CLK2_A,
  2345. FN_BPFCLK_B, FN_CAN1_RX_B,
  2346. 0, 0, 0, 0,
  2347. /* IP6_1_0 [2] */
  2348. FN_SSI_SCK6, FN_HSPI_RX2_A,
  2349. FN_FMCLK_B, FN_CAN1_TX_B,
  2350. }
  2351. },
  2352. { PINMUX_CFG_REG_VAR("IPSR7", 0xfffc003c, 32,
  2353. 3, 4, 3, 1, 3, 3, 3, 3, 3, 2, 2, 2) {
  2354. /* IP7_31_29 [3] */
  2355. FN_VI0_HSYNC, FN_SD2_CD_B, FN_VI1_DATA2, FN_DU1_DR2,
  2356. 0, FN_HSPI_CS1_A, FN_RX3_B, 0,
  2357. /* IP7_28_25 [4] */
  2358. FN_VI0_FIELD, FN_SD2_DAT3_B, FN_VI0_R3_C, FN_VI1_DATA1,
  2359. FN_DU1_DG7, 0, FN_HSPI_CLK1_A, FN_TX4_B,
  2360. 0, 0, 0, 0,
  2361. 0, 0, 0, 0,
  2362. /* IP7_24_22 [3] */
  2363. FN_VI0_CLKENB, FN_SD2_DAT2_B, FN_VI1_DATA0, FN_DU1_DG6,
  2364. 0, FN_HSPI_RX1_A, FN_RX4_B, 0,
  2365. /* IP7_21 [1] */
  2366. FN_VI0_CLK, FN_CAN_CLK_A,
  2367. /* IP7_20_18 [3] */
  2368. FN_TCLK0, FN_HSCK1_A, FN_FMIN_A, 0,
  2369. FN_IRQ2_C, FN_CTS1_C, FN_SPEEDIN, 0,
  2370. /* IP7_17_15 [3] */
  2371. FN_VI1_VSYNC, FN_HSPI_TX0, FN_HCTS1_A, FN_BPFCLK_A,
  2372. 0, FN_TX1_C, 0, 0,
  2373. /* IP7_14_12 [3] */
  2374. FN_VI1_HSYNC, FN_HSPI_RX0_A, FN_HRTS1_A, FN_FMCLK_A,
  2375. 0, FN_RX1_C, 0, 0,
  2376. /* IP7_11_9 [3] */
  2377. FN_VI1_FIELD, FN_HSPI_CS0_A, FN_HRX1_A, 0,
  2378. FN_SCK1_C, 0, 0, 0,
  2379. /* IP7_8_6 [3] */
  2380. FN_VI1_CLKENB, FN_HSPI_CLK0_A, FN_HTX1_A, 0,
  2381. FN_RTS1_C, 0, 0, 0,
  2382. /* IP7_5_4 [2] */
  2383. FN_SD0_WP, 0, FN_RX5_A, 0,
  2384. /* IP7_3_2 [2] */
  2385. FN_SD0_CD, 0, FN_TX5_A, 0,
  2386. /* IP7_1_0 [2] */
  2387. FN_SD0_DAT3, 0, FN_IRQ1_B, 0,
  2388. }
  2389. },
  2390. { PINMUX_CFG_REG_VAR("IPSR8", 0xfffc0040, 32,
  2391. 1, 1, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 3) {
  2392. /* IP8_31 [1] */
  2393. 0, 0,
  2394. /* IP8_30 [1] */
  2395. 0, 0,
  2396. /* IP8_29_27 [3] */
  2397. FN_VI0_G3, FN_SD2_CMD_B, FN_VI1_DATA5, FN_DU1_DR5,
  2398. 0, FN_HRX1_B, 0, 0,
  2399. /* IP8_26_24 [3] */
  2400. FN_VI0_G2, FN_SD2_CLK_B, FN_VI1_DATA4, FN_DU1_DR4,
  2401. 0, FN_HTX1_B, 0, 0,
  2402. /* IP8_23_22 [2] */
  2403. FN_VI0_DATA7_VI0_G1, FN_DU1_DB5,
  2404. FN_RTS1_A, 0,
  2405. /* IP8_21_19 [3] */
  2406. FN_VI0_DATA6_VI0_G0, FN_DU1_DB4,
  2407. FN_CTS1_A, FN_PWM5,
  2408. 0, 0, 0, 0,
  2409. /* IP8_18_16 [3] */
  2410. FN_VI0_DATA5_VI0_B5, FN_DU1_DB3, FN_SCK1_A, FN_PWM4,
  2411. 0, FN_HSCK1_B, 0, 0,
  2412. /* IP8_15_14 [2] */
  2413. FN_VI0_DATA4_VI0_B4, FN_DU1_DB2, FN_RX1_A, 0,
  2414. /* IP8_13_11 [3] */
  2415. FN_VI0_DATA3_VI0_B3, FN_DU1_DG5, FN_TX1_A, FN_TX0_C,
  2416. 0, 0, 0, 0,
  2417. /* IP8_10_9 [2] */
  2418. FN_VI0_DATA2_VI0_B2, FN_DU1_DG4, FN_RX0_C, 0,
  2419. /* IP8_8_6 [3] */
  2420. FN_VI0_DATA1_VI0_B1, FN_DU1_DG3, FN_IRQ3_B, FN_TX3_D,
  2421. 0, 0, 0, 0,
  2422. /* IP8_5_3 [3] */
  2423. FN_VI0_DATA0_VI0_B0, FN_DU1_DG2, FN_IRQ2_B, FN_RX3_D,
  2424. 0, 0, 0, 0,
  2425. /* IP8_2_0 [3] */
  2426. FN_VI0_VSYNC, FN_SD2_WP_B, FN_VI1_DATA3, FN_DU1_DR3,
  2427. 0, FN_HSPI_TX1_A, FN_TX3_B, 0,
  2428. }
  2429. },
  2430. { PINMUX_CFG_REG_VAR("IPSR9", 0xfffc0044, 32,
  2431. 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3) {
  2432. /* IP9_31 [1] */
  2433. 0, 0,
  2434. /* IP9_30 [1] */
  2435. 0, 0,
  2436. /* IP9_29_27 [3] */
  2437. FN_VI1_DATA11_A, FN_DU1_EXHSYNC_DU1_HSYNC,
  2438. FN_ETH_RXD1, FN_FMIN_C,
  2439. 0, FN_RX2_D,
  2440. FN_SCL2_C, 0,
  2441. /* IP9_26_24 [3] */
  2442. FN_VI1_DATA10_A, FN_DU1_DOTCLKOUT,
  2443. FN_ETH_RXD0, FN_BPFCLK_C,
  2444. 0, FN_TX2_D,
  2445. FN_SDA2_C, 0,
  2446. /* IP9_23_21 [3] */
  2447. FN_VI0_R5_A, 0, FN_ETH_RX_ER, FN_FMCLK_C,
  2448. FN_IERX, FN_RX2_C, 0, 0,
  2449. /* IP9_20_18 [3] */
  2450. FN_VI0_R4_A, FN_ETH_TX_EN, 0, 0,
  2451. FN_IETX, FN_TX2_C, 0, 0,
  2452. /* IP9_17_15 [3] */
  2453. FN_VI0_R3_A, FN_ETH_CRS_DV, 0, FN_IECLK,
  2454. FN_SCK2_C, 0, 0, 0,
  2455. /* IP9_14_12 [3] */
  2456. FN_VI0_R2_A, FN_VI1_DATA9, FN_DU1_DB7, FN_ETH_TXD1,
  2457. 0, FN_PWM3, 0, 0,
  2458. /* IP9_11_9 [3] */
  2459. FN_VI0_R1_A, FN_VI1_DATA8, FN_DU1_DB6, FN_ETH_TXD0,
  2460. 0, FN_PWM2, FN_TCLK1, 0,
  2461. /* IP9_8_6 [3] */
  2462. FN_VI0_R0_A, FN_VI1_CLK, FN_ETH_REF_CLK, FN_DU1_DOTCLKIN,
  2463. 0, 0, 0, 0,
  2464. /* IP9_5_3 [3] */
  2465. FN_VI0_G5, FN_SD2_DAT1_B, FN_VI1_DATA7, FN_DU1_DR7,
  2466. 0, FN_HCTS1_B, 0, 0,
  2467. /* IP9_2_0 [3] */
  2468. FN_VI0_G4, FN_SD2_DAT0_B, FN_VI1_DATA6, FN_DU1_DR6,
  2469. 0, FN_HRTS1_B, 0, 0,
  2470. }
  2471. },
  2472. { PINMUX_CFG_REG_VAR("IPSR10", 0xfffc0048, 32,
  2473. 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 4, 3, 3, 3) {
  2474. /* IP10_31 [1] */
  2475. 0, 0,
  2476. /* IP10_30 [1] */
  2477. 0, 0,
  2478. /* IP10_29 [1] */
  2479. 0, 0,
  2480. /* IP10_28 [1] */
  2481. 0, 0,
  2482. /* IP10_27 [1] */
  2483. 0, 0,
  2484. /* IP10_26 [1] */
  2485. 0, 0,
  2486. /* IP10_25 [1] */
  2487. 0, 0,
  2488. /* IP10_24_22 [3] */
  2489. FN_SD2_WP_A, FN_VI1_DATA15, FN_EX_WAIT2_B, FN_DACK0_B,
  2490. FN_HSPI_TX2_B, FN_CAN_CLK_C, 0, 0,
  2491. /* IP10_21_19 [3] */
  2492. FN_SD2_CD_A, FN_VI1_DATA14, FN_EX_WAIT1_B, FN_DREQ0_B,
  2493. FN_HSPI_RX2_B, FN_REMOCON_A, 0, 0,
  2494. /* IP10_18_16 [3] */
  2495. FN_SD2_DAT3_A, FN_VI1_DATA13, FN_DACK2_B, FN_ATAG1,
  2496. FN_HSPI_CS2_B, FN_GPSIN_B, 0, 0,
  2497. /* IP10_15_13 [3] */
  2498. FN_SD2_DAT2_A, FN_VI1_DATA12, FN_DREQ2_B, FN_ATADIR1,
  2499. FN_HSPI_CLK2_B, FN_GPSCLK_B, 0, 0,
  2500. /* IP10_12_9 [4] */
  2501. FN_SD2_DAT1_A, FN_DU1_CDE, FN_ATACS11, FN_DACK1_B,
  2502. FN_ETH_MAGIC, FN_CAN1_TX_A, 0, FN_PWM6,
  2503. 0, 0, 0, 0,
  2504. 0, 0, 0, 0,
  2505. /* IP10_8_6 [3] */
  2506. FN_SD2_DAT0_A, FN_DU1_DISP, FN_ATACS01, FN_DREQ1_B,
  2507. FN_ETH_LINK, FN_CAN1_RX_A, 0, 0,
  2508. /* IP10_5_3 [3] */
  2509. FN_SD2_CMD_A, FN_DU1_EXODDF_DU1_ODDF_DISP_CDE,
  2510. FN_ATAWR1, FN_ETH_MDIO,
  2511. FN_SCL1_B, 0,
  2512. 0, 0,
  2513. /* IP10_2_0 [3] */
  2514. FN_SD2_CLK_A, FN_DU1_EXVSYNC_DU1_VSYNC,
  2515. FN_ATARD1, FN_ETH_MDC,
  2516. FN_SDA1_B, 0,
  2517. 0, 0,
  2518. }
  2519. },
  2520. { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xfffc0050, 32,
  2521. 1, 1, 2, 2, 3, 2, 2, 1, 1, 1, 1, 2,
  2522. 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) {
  2523. /* SEL 31 [1] */
  2524. 0, 0,
  2525. /* SEL_30 (SCIF5) [1] */
  2526. FN_SEL_SCIF5_A, FN_SEL_SCIF5_B,
  2527. /* SEL_29_28 (SCIF4) [2] */
  2528. FN_SEL_SCIF4_A, FN_SEL_SCIF4_B,
  2529. FN_SEL_SCIF4_C, 0,
  2530. /* SEL_27_26 (SCIF3) [2] */
  2531. FN_SEL_SCIF3_A, FN_SEL_SCIF3_B,
  2532. FN_SEL_SCIF3_C, FN_SEL_SCIF3_D,
  2533. /* SEL_25_23 (SCIF2) [3] */
  2534. FN_SEL_SCIF2_A, FN_SEL_SCIF2_B,
  2535. FN_SEL_SCIF2_C, FN_SEL_SCIF2_D,
  2536. FN_SEL_SCIF2_E, 0,
  2537. 0, 0,
  2538. /* SEL_22_21 (SCIF1) [2] */
  2539. FN_SEL_SCIF1_A, FN_SEL_SCIF1_B,
  2540. FN_SEL_SCIF1_C, FN_SEL_SCIF1_D,
  2541. /* SEL_20_19 (SCIF0) [2] */
  2542. FN_SEL_SCIF0_A, FN_SEL_SCIF0_B,
  2543. FN_SEL_SCIF0_C, FN_SEL_SCIF0_D,
  2544. /* SEL_18 [1] */
  2545. 0, 0,
  2546. /* SEL_17 (SSI2) [1] */
  2547. FN_SEL_SSI2_A, FN_SEL_SSI2_B,
  2548. /* SEL_16 (SSI1) [1] */
  2549. FN_SEL_SSI1_A, FN_SEL_SSI1_B,
  2550. /* SEL_15 (VI1) [1] */
  2551. FN_SEL_VI1_A, FN_SEL_VI1_B,
  2552. /* SEL_14_13 (VI0) [2] */
  2553. FN_SEL_VI0_A, FN_SEL_VI0_B,
  2554. FN_SEL_VI0_C, FN_SEL_VI0_D,
  2555. /* SEL_12 [1] */
  2556. 0, 0,
  2557. /* SEL_11 (SD2) [1] */
  2558. FN_SEL_SD2_A, FN_SEL_SD2_B,
  2559. /* SEL_10 (SD1) [1] */
  2560. FN_SEL_SD1_A, FN_SEL_SD1_B,
  2561. /* SEL_9 (IRQ3) [1] */
  2562. FN_SEL_IRQ3_A, FN_SEL_IRQ3_B,
  2563. /* SEL_8_7 (IRQ2) [2] */
  2564. FN_SEL_IRQ2_A, FN_SEL_IRQ2_B,
  2565. FN_SEL_IRQ2_C, 0,
  2566. /* SEL_6 (IRQ1) [1] */
  2567. FN_SEL_IRQ1_A, FN_SEL_IRQ1_B,
  2568. /* SEL_5 [1] */
  2569. 0, 0,
  2570. /* SEL_4 (DREQ2) [1] */
  2571. FN_SEL_DREQ2_A, FN_SEL_DREQ2_B,
  2572. /* SEL_3 (DREQ1) [1] */
  2573. FN_SEL_DREQ1_A, FN_SEL_DREQ1_B,
  2574. /* SEL_2 (DREQ0) [1] */
  2575. FN_SEL_DREQ0_A, FN_SEL_DREQ0_B,
  2576. /* SEL_1 (WAIT2) [1] */
  2577. FN_SEL_WAIT2_A, FN_SEL_WAIT2_B,
  2578. /* SEL_0 (WAIT1) [1] */
  2579. FN_SEL_WAIT1_A, FN_SEL_WAIT1_B,
  2580. }
  2581. },
  2582. { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xfffc0054, 32,
  2583. 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
  2584. 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1) {
  2585. /* SEL_31 [1] */
  2586. 0, 0,
  2587. /* SEL_30 [1] */
  2588. 0, 0,
  2589. /* SEL_29 [1] */
  2590. 0, 0,
  2591. /* SEL_28 [1] */
  2592. 0, 0,
  2593. /* SEL_27 (CAN1) [1] */
  2594. FN_SEL_CAN1_A, FN_SEL_CAN1_B,
  2595. /* SEL_26 (CAN0) [1] */
  2596. FN_SEL_CAN0_A, FN_SEL_CAN0_B,
  2597. /* SEL_25_24 (CANCLK) [2] */
  2598. FN_SEL_CANCLK_A, FN_SEL_CANCLK_B,
  2599. FN_SEL_CANCLK_C, FN_SEL_CANCLK_D,
  2600. /* SEL_23 (HSCIF1) [1] */
  2601. FN_SEL_HSCIF1_A, FN_SEL_HSCIF1_B,
  2602. /* SEL_22 (HSCIF0) [1] */
  2603. FN_SEL_HSCIF0_A, FN_SEL_HSCIF0_B,
  2604. /* SEL_21 [1] */
  2605. 0, 0,
  2606. /* SEL_20 [1] */
  2607. 0, 0,
  2608. /* SEL_19 [1] */
  2609. 0, 0,
  2610. /* SEL_18 [1] */
  2611. 0, 0,
  2612. /* SEL_17 [1] */
  2613. 0, 0,
  2614. /* SEL_16 [1] */
  2615. 0, 0,
  2616. /* SEL_15 [1] */
  2617. 0, 0,
  2618. /* SEL_14_13 (REMOCON) [2] */
  2619. FN_SEL_REMOCON_A, FN_SEL_REMOCON_B,
  2620. FN_SEL_REMOCON_C, 0,
  2621. /* SEL_12_11 (FM) [2] */
  2622. FN_SEL_FM_A, FN_SEL_FM_B,
  2623. FN_SEL_FM_C, FN_SEL_FM_D,
  2624. /* SEL_10_9 (GPS) [2] */
  2625. FN_SEL_GPS_A, FN_SEL_GPS_B,
  2626. FN_SEL_GPS_C, 0,
  2627. /* SEL_8 (TSIF0) [1] */
  2628. FN_SEL_TSIF0_A, FN_SEL_TSIF0_B,
  2629. /* SEL_7 (HSPI2) [1] */
  2630. FN_SEL_HSPI2_A, FN_SEL_HSPI2_B,
  2631. /* SEL_6 (HSPI1) [1] */
  2632. FN_SEL_HSPI1_A, FN_SEL_HSPI1_B,
  2633. /* SEL_5 (HSPI0) [1] */
  2634. FN_SEL_HSPI0_A, FN_SEL_HSPI0_B,
  2635. /* SEL_4_3 (I2C3) [2] */
  2636. FN_SEL_I2C3_A, FN_SEL_I2C3_B,
  2637. FN_SEL_I2C3_C, 0,
  2638. /* SEL_2_1 (I2C2) [2] */
  2639. FN_SEL_I2C2_A, FN_SEL_I2C2_B,
  2640. FN_SEL_I2C2_C, 0,
  2641. /* SEL_0 (I2C1) [1] */
  2642. FN_SEL_I2C1_A, FN_SEL_I2C1_B,
  2643. }
  2644. },
  2645. { },
  2646. };
  2647. #define PUPR0 0x100
  2648. #define PUPR1 0x104
  2649. #define PUPR2 0x108
  2650. #define PUPR3 0x10c
  2651. #define PUPR4 0x110
  2652. #define PUPR5 0x114
  2653. static const struct {
  2654. u16 reg : 11;
  2655. u16 bit : 5;
  2656. } pullups[] = {
  2657. [RCAR_GP_PIN(0, 6)] = { PUPR0, 0 }, /* A0 */
  2658. [RCAR_GP_PIN(0, 7)] = { PUPR0, 1 }, /* A1 */
  2659. [RCAR_GP_PIN(0, 8)] = { PUPR0, 2 }, /* A2 */
  2660. [RCAR_GP_PIN(0, 9)] = { PUPR0, 3 }, /* A3 */
  2661. [RCAR_GP_PIN(0, 10)] = { PUPR0, 4 }, /* A4 */
  2662. [RCAR_GP_PIN(0, 11)] = { PUPR0, 5 }, /* A5 */
  2663. [RCAR_GP_PIN(0, 12)] = { PUPR0, 6 }, /* A6 */
  2664. [RCAR_GP_PIN(0, 13)] = { PUPR0, 7 }, /* A7 */
  2665. [RCAR_GP_PIN(0, 14)] = { PUPR0, 8 }, /* A8 */
  2666. [RCAR_GP_PIN(0, 15)] = { PUPR0, 9 }, /* A9 */
  2667. [RCAR_GP_PIN(0, 16)] = { PUPR0, 10 }, /* A10 */
  2668. [RCAR_GP_PIN(0, 17)] = { PUPR0, 11 }, /* A11 */
  2669. [RCAR_GP_PIN(0, 18)] = { PUPR0, 12 }, /* A12 */
  2670. [RCAR_GP_PIN(0, 19)] = { PUPR0, 13 }, /* A13 */
  2671. [RCAR_GP_PIN(0, 20)] = { PUPR0, 14 }, /* A14 */
  2672. [RCAR_GP_PIN(0, 21)] = { PUPR0, 15 }, /* A15 */
  2673. [RCAR_GP_PIN(0, 22)] = { PUPR0, 16 }, /* A16 */
  2674. [RCAR_GP_PIN(0, 23)] = { PUPR0, 17 }, /* A17 */
  2675. [RCAR_GP_PIN(0, 24)] = { PUPR0, 18 }, /* A18 */
  2676. [RCAR_GP_PIN(0, 25)] = { PUPR0, 19 }, /* A19 */
  2677. [RCAR_GP_PIN(0, 26)] = { PUPR0, 20 }, /* A20 */
  2678. [RCAR_GP_PIN(0, 27)] = { PUPR0, 21 }, /* A21 */
  2679. [RCAR_GP_PIN(0, 28)] = { PUPR0, 22 }, /* A22 */
  2680. [RCAR_GP_PIN(0, 29)] = { PUPR0, 23 }, /* A23 */
  2681. [RCAR_GP_PIN(0, 30)] = { PUPR0, 24 }, /* A24 */
  2682. [RCAR_GP_PIN(0, 31)] = { PUPR0, 25 }, /* A25 */
  2683. [RCAR_GP_PIN(1, 3)] = { PUPR0, 26 }, /* /EX_CS0 */
  2684. [RCAR_GP_PIN(1, 4)] = { PUPR0, 27 }, /* /EX_CS1 */
  2685. [RCAR_GP_PIN(1, 5)] = { PUPR0, 28 }, /* /EX_CS2 */
  2686. [RCAR_GP_PIN(1, 6)] = { PUPR0, 29 }, /* /EX_CS3 */
  2687. [RCAR_GP_PIN(1, 7)] = { PUPR0, 30 }, /* /EX_CS4 */
  2688. [RCAR_GP_PIN(1, 8)] = { PUPR0, 31 }, /* /EX_CS5 */
  2689. [RCAR_GP_PIN(0, 0)] = { PUPR1, 0 }, /* /PRESETOUT */
  2690. [RCAR_GP_PIN(0, 5)] = { PUPR1, 1 }, /* /BS */
  2691. [RCAR_GP_PIN(1, 0)] = { PUPR1, 2 }, /* RD//WR */
  2692. [RCAR_GP_PIN(1, 1)] = { PUPR1, 3 }, /* /WE0 */
  2693. [RCAR_GP_PIN(1, 2)] = { PUPR1, 4 }, /* /WE1 */
  2694. [RCAR_GP_PIN(1, 11)] = { PUPR1, 5 }, /* EX_WAIT0 */
  2695. [RCAR_GP_PIN(1, 9)] = { PUPR1, 6 }, /* DREQ0 */
  2696. [RCAR_GP_PIN(1, 10)] = { PUPR1, 7 }, /* DACK0 */
  2697. [RCAR_GP_PIN(1, 12)] = { PUPR1, 8 }, /* IRQ0 */
  2698. [RCAR_GP_PIN(1, 13)] = { PUPR1, 9 }, /* IRQ1 */
  2699. [RCAR_GP_PIN(1, 22)] = { PUPR2, 0 }, /* DU0_DR0 */
  2700. [RCAR_GP_PIN(1, 23)] = { PUPR2, 1 }, /* DU0_DR1 */
  2701. [RCAR_GP_PIN(1, 24)] = { PUPR2, 2 }, /* DU0_DR2 */
  2702. [RCAR_GP_PIN(1, 25)] = { PUPR2, 3 }, /* DU0_DR3 */
  2703. [RCAR_GP_PIN(1, 26)] = { PUPR2, 4 }, /* DU0_DR4 */
  2704. [RCAR_GP_PIN(1, 27)] = { PUPR2, 5 }, /* DU0_DR5 */
  2705. [RCAR_GP_PIN(1, 28)] = { PUPR2, 6 }, /* DU0_DR6 */
  2706. [RCAR_GP_PIN(1, 29)] = { PUPR2, 7 }, /* DU0_DR7 */
  2707. [RCAR_GP_PIN(1, 30)] = { PUPR2, 8 }, /* DU0_DG0 */
  2708. [RCAR_GP_PIN(1, 31)] = { PUPR2, 9 }, /* DU0_DG1 */
  2709. [RCAR_GP_PIN(2, 0)] = { PUPR2, 10 }, /* DU0_DG2 */
  2710. [RCAR_GP_PIN(2, 1)] = { PUPR2, 11 }, /* DU0_DG3 */
  2711. [RCAR_GP_PIN(2, 2)] = { PUPR2, 12 }, /* DU0_DG4 */
  2712. [RCAR_GP_PIN(2, 3)] = { PUPR2, 13 }, /* DU0_DG5 */
  2713. [RCAR_GP_PIN(2, 4)] = { PUPR2, 14 }, /* DU0_DG6 */
  2714. [RCAR_GP_PIN(2, 5)] = { PUPR2, 15 }, /* DU0_DG7 */
  2715. [RCAR_GP_PIN(2, 6)] = { PUPR2, 16 }, /* DU0_DB0 */
  2716. [RCAR_GP_PIN(2, 7)] = { PUPR2, 17 }, /* DU0_DB1 */
  2717. [RCAR_GP_PIN(2, 8)] = { PUPR2, 18 }, /* DU0_DB2 */
  2718. [RCAR_GP_PIN(2, 9)] = { PUPR2, 19 }, /* DU0_DB3 */
  2719. [RCAR_GP_PIN(2, 10)] = { PUPR2, 20 }, /* DU0_DB4 */
  2720. [RCAR_GP_PIN(2, 11)] = { PUPR2, 21 }, /* DU0_DB5 */
  2721. [RCAR_GP_PIN(2, 12)] = { PUPR2, 22 }, /* DU0_DB6 */
  2722. [RCAR_GP_PIN(2, 13)] = { PUPR2, 23 }, /* DU0_DB7 */
  2723. [RCAR_GP_PIN(2, 14)] = { PUPR2, 24 }, /* DU0_DOTCLKIN */
  2724. [RCAR_GP_PIN(2, 15)] = { PUPR2, 25 }, /* DU0_DOTCLKOUT0 */
  2725. [RCAR_GP_PIN(2, 17)] = { PUPR2, 26 }, /* DU0_HSYNC */
  2726. [RCAR_GP_PIN(2, 18)] = { PUPR2, 27 }, /* DU0_VSYNC */
  2727. [RCAR_GP_PIN(2, 19)] = { PUPR2, 28 }, /* DU0_EXODDF */
  2728. [RCAR_GP_PIN(2, 20)] = { PUPR2, 29 }, /* DU0_DISP */
  2729. [RCAR_GP_PIN(2, 21)] = { PUPR2, 30 }, /* DU0_CDE */
  2730. [RCAR_GP_PIN(2, 16)] = { PUPR2, 31 }, /* DU0_DOTCLKOUT1 */
  2731. [RCAR_GP_PIN(3, 24)] = { PUPR3, 0 }, /* VI0_CLK */
  2732. [RCAR_GP_PIN(3, 25)] = { PUPR3, 1 }, /* VI0_CLKENB */
  2733. [RCAR_GP_PIN(3, 26)] = { PUPR3, 2 }, /* VI0_FIELD */
  2734. [RCAR_GP_PIN(3, 27)] = { PUPR3, 3 }, /* /VI0_HSYNC */
  2735. [RCAR_GP_PIN(3, 28)] = { PUPR3, 4 }, /* /VI0_VSYNC */
  2736. [RCAR_GP_PIN(3, 29)] = { PUPR3, 5 }, /* VI0_DATA0 */
  2737. [RCAR_GP_PIN(3, 30)] = { PUPR3, 6 }, /* VI0_DATA1 */
  2738. [RCAR_GP_PIN(3, 31)] = { PUPR3, 7 }, /* VI0_DATA2 */
  2739. [RCAR_GP_PIN(4, 0)] = { PUPR3, 8 }, /* VI0_DATA3 */
  2740. [RCAR_GP_PIN(4, 1)] = { PUPR3, 9 }, /* VI0_DATA4 */
  2741. [RCAR_GP_PIN(4, 2)] = { PUPR3, 10 }, /* VI0_DATA5 */
  2742. [RCAR_GP_PIN(4, 3)] = { PUPR3, 11 }, /* VI0_DATA6 */
  2743. [RCAR_GP_PIN(4, 4)] = { PUPR3, 12 }, /* VI0_DATA7 */
  2744. [RCAR_GP_PIN(4, 5)] = { PUPR3, 13 }, /* VI0_G2 */
  2745. [RCAR_GP_PIN(4, 6)] = { PUPR3, 14 }, /* VI0_G3 */
  2746. [RCAR_GP_PIN(4, 7)] = { PUPR3, 15 }, /* VI0_G4 */
  2747. [RCAR_GP_PIN(4, 8)] = { PUPR3, 16 }, /* VI0_G5 */
  2748. [RCAR_GP_PIN(4, 21)] = { PUPR3, 17 }, /* VI1_DATA12 */
  2749. [RCAR_GP_PIN(4, 22)] = { PUPR3, 18 }, /* VI1_DATA13 */
  2750. [RCAR_GP_PIN(4, 23)] = { PUPR3, 19 }, /* VI1_DATA14 */
  2751. [RCAR_GP_PIN(4, 24)] = { PUPR3, 20 }, /* VI1_DATA15 */
  2752. [RCAR_GP_PIN(4, 9)] = { PUPR3, 21 }, /* ETH_REF_CLK */
  2753. [RCAR_GP_PIN(4, 10)] = { PUPR3, 22 }, /* ETH_TXD0 */
  2754. [RCAR_GP_PIN(4, 11)] = { PUPR3, 23 }, /* ETH_TXD1 */
  2755. [RCAR_GP_PIN(4, 12)] = { PUPR3, 24 }, /* ETH_CRS_DV */
  2756. [RCAR_GP_PIN(4, 13)] = { PUPR3, 25 }, /* ETH_TX_EN */
  2757. [RCAR_GP_PIN(4, 14)] = { PUPR3, 26 }, /* ETH_RX_ER */
  2758. [RCAR_GP_PIN(4, 15)] = { PUPR3, 27 }, /* ETH_RXD0 */
  2759. [RCAR_GP_PIN(4, 16)] = { PUPR3, 28 }, /* ETH_RXD1 */
  2760. [RCAR_GP_PIN(4, 17)] = { PUPR3, 29 }, /* ETH_MDC */
  2761. [RCAR_GP_PIN(4, 18)] = { PUPR3, 30 }, /* ETH_MDIO */
  2762. [RCAR_GP_PIN(4, 19)] = { PUPR3, 31 }, /* ETH_LINK */
  2763. [RCAR_GP_PIN(3, 6)] = { PUPR4, 0 }, /* SSI_SCK012 */
  2764. [RCAR_GP_PIN(3, 7)] = { PUPR4, 1 }, /* SSI_WS012 */
  2765. [RCAR_GP_PIN(3, 10)] = { PUPR4, 2 }, /* SSI_SDATA0 */
  2766. [RCAR_GP_PIN(3, 9)] = { PUPR4, 3 }, /* SSI_SDATA1 */
  2767. [RCAR_GP_PIN(3, 8)] = { PUPR4, 4 }, /* SSI_SDATA2 */
  2768. [RCAR_GP_PIN(3, 2)] = { PUPR4, 5 }, /* SSI_SCK34 */
  2769. [RCAR_GP_PIN(3, 3)] = { PUPR4, 6 }, /* SSI_WS34 */
  2770. [RCAR_GP_PIN(3, 5)] = { PUPR4, 7 }, /* SSI_SDATA3 */
  2771. [RCAR_GP_PIN(3, 4)] = { PUPR4, 8 }, /* SSI_SDATA4 */
  2772. [RCAR_GP_PIN(2, 31)] = { PUPR4, 9 }, /* SSI_SCK5 */
  2773. [RCAR_GP_PIN(3, 0)] = { PUPR4, 10 }, /* SSI_WS5 */
  2774. [RCAR_GP_PIN(3, 1)] = { PUPR4, 11 }, /* SSI_SDATA5 */
  2775. [RCAR_GP_PIN(2, 28)] = { PUPR4, 12 }, /* SSI_SCK6 */
  2776. [RCAR_GP_PIN(2, 29)] = { PUPR4, 13 }, /* SSI_WS6 */
  2777. [RCAR_GP_PIN(2, 30)] = { PUPR4, 14 }, /* SSI_SDATA6 */
  2778. [RCAR_GP_PIN(2, 24)] = { PUPR4, 15 }, /* SSI_SCK78 */
  2779. [RCAR_GP_PIN(2, 25)] = { PUPR4, 16 }, /* SSI_WS78 */
  2780. [RCAR_GP_PIN(2, 27)] = { PUPR4, 17 }, /* SSI_SDATA7 */
  2781. [RCAR_GP_PIN(2, 26)] = { PUPR4, 18 }, /* SSI_SDATA8 */
  2782. [RCAR_GP_PIN(3, 23)] = { PUPR4, 19 }, /* TCLK0 */
  2783. [RCAR_GP_PIN(3, 11)] = { PUPR4, 20 }, /* SD0_CLK */
  2784. [RCAR_GP_PIN(3, 12)] = { PUPR4, 21 }, /* SD0_CMD */
  2785. [RCAR_GP_PIN(3, 13)] = { PUPR4, 22 }, /* SD0_DAT0 */
  2786. [RCAR_GP_PIN(3, 14)] = { PUPR4, 23 }, /* SD0_DAT1 */
  2787. [RCAR_GP_PIN(3, 15)] = { PUPR4, 24 }, /* SD0_DAT2 */
  2788. [RCAR_GP_PIN(3, 16)] = { PUPR4, 25 }, /* SD0_DAT3 */
  2789. [RCAR_GP_PIN(3, 17)] = { PUPR4, 26 }, /* SD0_CD */
  2790. [RCAR_GP_PIN(3, 18)] = { PUPR4, 27 }, /* SD0_WP */
  2791. [RCAR_GP_PIN(2, 22)] = { PUPR4, 28 }, /* AUDIO_CLKA */
  2792. [RCAR_GP_PIN(2, 23)] = { PUPR4, 29 }, /* AUDIO_CLKB */
  2793. [RCAR_GP_PIN(1, 14)] = { PUPR4, 30 }, /* IRQ2 */
  2794. [RCAR_GP_PIN(1, 15)] = { PUPR4, 31 }, /* IRQ3 */
  2795. [RCAR_GP_PIN(0, 1)] = { PUPR5, 0 }, /* PENC0 */
  2796. [RCAR_GP_PIN(0, 2)] = { PUPR5, 1 }, /* PENC1 */
  2797. [RCAR_GP_PIN(0, 3)] = { PUPR5, 2 }, /* USB_OVC0 */
  2798. [RCAR_GP_PIN(0, 4)] = { PUPR5, 3 }, /* USB_OVC1 */
  2799. [RCAR_GP_PIN(1, 16)] = { PUPR5, 4 }, /* SCIF_CLK */
  2800. [RCAR_GP_PIN(1, 17)] = { PUPR5, 5 }, /* TX0 */
  2801. [RCAR_GP_PIN(1, 18)] = { PUPR5, 6 }, /* RX0 */
  2802. [RCAR_GP_PIN(1, 19)] = { PUPR5, 7 }, /* SCK0 */
  2803. [RCAR_GP_PIN(1, 20)] = { PUPR5, 8 }, /* /CTS0 */
  2804. [RCAR_GP_PIN(1, 21)] = { PUPR5, 9 }, /* /RTS0 */
  2805. [RCAR_GP_PIN(3, 19)] = { PUPR5, 10 }, /* HSPI_CLK0 */
  2806. [RCAR_GP_PIN(3, 20)] = { PUPR5, 11 }, /* /HSPI_CS0 */
  2807. [RCAR_GP_PIN(3, 21)] = { PUPR5, 12 }, /* HSPI_RX0 */
  2808. [RCAR_GP_PIN(3, 22)] = { PUPR5, 13 }, /* HSPI_TX0 */
  2809. [RCAR_GP_PIN(4, 20)] = { PUPR5, 14 }, /* ETH_MAGIC */
  2810. [RCAR_GP_PIN(4, 25)] = { PUPR5, 15 }, /* AVS1 */
  2811. [RCAR_GP_PIN(4, 26)] = { PUPR5, 16 }, /* AVS2 */
  2812. };
  2813. static unsigned int r8a7778_pinmux_get_bias(struct sh_pfc *pfc,
  2814. unsigned int pin)
  2815. {
  2816. void __iomem *addr;
  2817. if (WARN_ON_ONCE(!pullups[pin].reg))
  2818. return PIN_CONFIG_BIAS_DISABLE;
  2819. addr = pfc->windows->virt + pullups[pin].reg;
  2820. if (ioread32(addr) & BIT(pullups[pin].bit))
  2821. return PIN_CONFIG_BIAS_PULL_UP;
  2822. else
  2823. return PIN_CONFIG_BIAS_DISABLE;
  2824. }
  2825. static void r8a7778_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
  2826. unsigned int bias)
  2827. {
  2828. void __iomem *addr;
  2829. u32 value;
  2830. u32 bit;
  2831. if (WARN_ON_ONCE(!pullups[pin].reg))
  2832. return;
  2833. addr = pfc->windows->virt + pullups[pin].reg;
  2834. bit = BIT(pullups[pin].bit);
  2835. value = ioread32(addr) & ~bit;
  2836. if (bias == PIN_CONFIG_BIAS_PULL_UP)
  2837. value |= bit;
  2838. iowrite32(value, addr);
  2839. }
  2840. static const struct sh_pfc_soc_operations r8a7778_pfc_ops = {
  2841. .get_bias = r8a7778_pinmux_get_bias,
  2842. .set_bias = r8a7778_pinmux_set_bias,
  2843. };
  2844. const struct sh_pfc_soc_info r8a7778_pinmux_info = {
  2845. .name = "r8a7778_pfc",
  2846. .ops = &r8a7778_pfc_ops,
  2847. .unlock_reg = 0xfffc0000, /* PMMR */
  2848. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  2849. .pins = pinmux_pins,
  2850. .nr_pins = ARRAY_SIZE(pinmux_pins),
  2851. .groups = pinmux_groups,
  2852. .nr_groups = ARRAY_SIZE(pinmux_groups),
  2853. .functions = pinmux_functions,
  2854. .nr_functions = ARRAY_SIZE(pinmux_functions),
  2855. .cfg_regs = pinmux_config_regs,
  2856. .pinmux_data = pinmux_data,
  2857. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  2858. };