pfc-emev2.c 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711
  1. /*
  2. * Pin Function Controller Support
  3. *
  4. * Copyright (C) 2015 Niklas Söderlund
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/init.h>
  11. #include <linux/kernel.h>
  12. #include "sh_pfc.h"
  13. #define CPU_ALL_PORT(fn, pfx, sfx) \
  14. PORT_10(0, fn, pfx, sfx), PORT_90(0, fn, pfx, sfx), \
  15. PORT_10(100, fn, pfx##10, sfx), PORT_10(110, fn, pfx##11, sfx), \
  16. PORT_10(120, fn, pfx##12, sfx), PORT_10(130, fn, pfx##13, sfx), \
  17. PORT_10(140, fn, pfx##14, sfx), PORT_1(150, fn, pfx##150, sfx), \
  18. PORT_1(151, fn, pfx##151, sfx), PORT_1(152, fn, pfx##152, sfx), \
  19. PORT_1(153, fn, pfx##153, sfx), PORT_1(154, fn, pfx##154, sfx), \
  20. PORT_1(155, fn, pfx##155, sfx), PORT_1(156, fn, pfx##156, sfx), \
  21. PORT_1(157, fn, pfx##157, sfx), PORT_1(158, fn, pfx##158, sfx)
  22. enum {
  23. PINMUX_RESERVED = 0,
  24. PINMUX_DATA_BEGIN,
  25. PORT_ALL(DATA),
  26. PINMUX_DATA_END,
  27. PINMUX_FUNCTION_BEGIN,
  28. PORT_ALL(FN),
  29. /* GPSR0 */
  30. FN_LCD3_1_0_PORT18, FN_LCD3_1_0_PORT20, FN_LCD3_1_0_PORT21,
  31. FN_LCD3_1_0_PORT22, FN_LCD3_1_0_PORT23,
  32. FN_JT_SEL, FN_ERR_RST_REQB, FN_REF_CLKO, FN_EXT_CLKI, FN_LCD3_PXCLKB,
  33. /* GPSR1 */
  34. FN_LCD3_9_8_PORT38, FN_LCD3_9_8_PORT39, FN_LCD3_11_10_PORT40,
  35. FN_LCD3_11_10_PORT41, FN_LCD3_11_10_PORT42, FN_LCD3_11_10_PORT43,
  36. FN_IIC_1_0_PORT46, FN_IIC_1_0_PORT47,
  37. FN_LCD3_R0, FN_LCD3_R1, FN_LCD3_R2, FN_LCD3_R3, FN_LCD3_R4, FN_LCD3_R5,
  38. FN_IIC0_SCL, FN_IIC0_SDA, FN_SD_CKI, FN_SDI0_CKO, FN_SDI0_CKI,
  39. FN_SDI0_CMD, FN_SDI0_DATA0, FN_SDI0_DATA1, FN_SDI0_DATA2,
  40. FN_SDI0_DATA3, FN_SDI0_DATA4, FN_SDI0_DATA5, FN_SDI0_DATA6,
  41. FN_SDI0_DATA7, FN_SDI1_CKO, FN_SDI1_CKI, FN_SDI1_CMD,
  42. /* GPSR2 */
  43. FN_AB_1_0_PORT71, FN_AB_1_0_PORT72, FN_AB_1_0_PORT73,
  44. FN_AB_1_0_PORT74, FN_AB_1_0_PORT75, FN_AB_1_0_PORT76,
  45. FN_AB_1_0_PORT77, FN_AB_1_0_PORT78, FN_AB_1_0_PORT79,
  46. FN_AB_1_0_PORT80, FN_AB_1_0_PORT81, FN_AB_1_0_PORT82,
  47. FN_AB_1_0_PORT83, FN_AB_1_0_PORT84, FN_AB_3_2_PORT85,
  48. FN_AB_3_2_PORT86, FN_AB_3_2_PORT87, FN_AB_3_2_PORT88,
  49. FN_AB_5_4_PORT89, FN_AB_5_4_PORT90, FN_AB_7_6_PORT91,
  50. FN_AB_7_6_PORT92, FN_AB_1_0_PORT93, FN_AB_1_0_PORT94,
  51. FN_AB_1_0_PORT95,
  52. FN_SDI1_DATA0, FN_SDI1_DATA1, FN_SDI1_DATA2, FN_SDI1_DATA3,
  53. FN_AB_CLK, FN_AB_CSB0, FN_AB_CSB1,
  54. /* GPSR3 */
  55. FN_AB_13_12_PORT104, FN_AB_13_12_PORT103, FN_AB_11_10_PORT102,
  56. FN_AB_11_10_PORT101, FN_AB_11_10_PORT100, FN_AB_9_8_PORT99,
  57. FN_AB_9_8_PORT98, FN_AB_9_8_PORT97,
  58. FN_USI_1_0_PORT109, FN_USI_1_0_PORT110, FN_USI_1_0_PORT111,
  59. FN_USI_1_0_PORT112, FN_USI_3_2_PORT113, FN_USI_3_2_PORT114,
  60. FN_USI_5_4_PORT115, FN_USI_5_4_PORT116, FN_USI_5_4_PORT117,
  61. FN_USI_5_4_PORT118, FN_USI_7_6_PORT119, FN_USI_9_8_PORT120,
  62. FN_USI_9_8_PORT121,
  63. FN_AB_A20, FN_USI0_CS1, FN_USI0_CS2, FN_USI1_DI,
  64. FN_USI1_DO,
  65. FN_NTSC_CLK, FN_NTSC_DATA0, FN_NTSC_DATA1, FN_NTSC_DATA2,
  66. FN_NTSC_DATA3, FN_NTSC_DATA4,
  67. /* GPRS4 */
  68. FN_HSI_1_0_PORT143, FN_HSI_1_0_PORT144, FN_HSI_1_0_PORT145,
  69. FN_HSI_1_0_PORT146, FN_HSI_1_0_PORT147, FN_HSI_1_0_PORT148,
  70. FN_HSI_1_0_PORT149, FN_HSI_1_0_PORT150,
  71. FN_UART_1_0_PORT157, FN_UART_1_0_PORT158,
  72. FN_NTSC_DATA5, FN_NTSC_DATA6, FN_NTSC_DATA7, FN_CAM_CLKO,
  73. FN_CAM_CLKI, FN_CAM_VS, FN_CAM_HS, FN_CAM_YUV0,
  74. FN_CAM_YUV1, FN_CAM_YUV2, FN_CAM_YUV3, FN_CAM_YUV4,
  75. FN_CAM_YUV5, FN_CAM_YUV6, FN_CAM_YUV7,
  76. FN_JT_TDO, FN_JT_TDOEN, FN_LOWPWR, FN_USB_VBUS, FN_UART1_RX,
  77. FN_UART1_TX,
  78. /* CHG_PINSEL_LCD3 */
  79. FN_SEL_LCD3_1_0_00, FN_SEL_LCD3_1_0_01,
  80. FN_SEL_LCD3_9_8_00, FN_SEL_LCD3_9_8_10,
  81. FN_SEL_LCD3_11_10_00, FN_SEL_LCD3_11_10_01, FN_SEL_LCD3_11_10_10,
  82. /* CHG_PINSEL_IIC */
  83. FN_SEL_IIC_1_0_00, FN_SEL_IIC_1_0_01,
  84. /* CHG_PINSEL_AB */
  85. FN_SEL_AB_1_0_00, FN_SEL_AB_1_0_10, FN_SEL_AB_3_2_00,
  86. FN_SEL_AB_3_2_01, FN_SEL_AB_3_2_10, FN_SEL_AB_3_2_11,
  87. FN_SEL_AB_5_4_00, FN_SEL_AB_5_4_01, FN_SEL_AB_5_4_10,
  88. FN_SEL_AB_5_4_11, FN_SEL_AB_7_6_00, FN_SEL_AB_7_6_01,
  89. FN_SEL_AB_7_6_10,
  90. FN_SEL_AB_9_8_00, FN_SEL_AB_9_8_01, FN_SEL_AB_9_8_10,
  91. FN_SEL_AB_11_10_00, FN_SEL_AB_11_10_10,
  92. FN_SEL_AB_13_12_00, FN_SEL_AB_13_12_10,
  93. /* CHG_PINSEL_USI */
  94. FN_SEL_USI_1_0_00, FN_SEL_USI_1_0_01,
  95. FN_SEL_USI_3_2_00, FN_SEL_USI_3_2_01,
  96. FN_SEL_USI_5_4_00, FN_SEL_USI_5_4_01,
  97. FN_SEL_USI_7_6_00, FN_SEL_USI_7_6_01,
  98. FN_SEL_USI_9_8_00, FN_SEL_USI_9_8_01,
  99. /* CHG_PINSEL_HSI */
  100. FN_SEL_HSI_1_0_00, FN_SEL_HSI_1_0_01,
  101. /* CHG_PINSEL_UART */
  102. FN_SEL_UART_1_0_00, FN_SEL_UART_1_0_01,
  103. PINMUX_FUNCTION_END,
  104. PINMUX_MARK_BEGIN,
  105. /* GPSR0 */
  106. JT_SEL_MARK, ERR_RST_REQB_MARK, REF_CLKO_MARK, EXT_CLKI_MARK,
  107. LCD3_PXCLKB_MARK, SD_CKI_MARK,
  108. /* GPSR1 */
  109. LCD3_R0_MARK, LCD3_R1_MARK, LCD3_R2_MARK, LCD3_R3_MARK, LCD3_R4_MARK,
  110. LCD3_R5_MARK, IIC0_SCL_MARK, IIC0_SDA_MARK, SDI0_CKO_MARK,
  111. SDI0_CKI_MARK, SDI0_CMD_MARK, SDI0_DATA0_MARK, SDI0_DATA1_MARK,
  112. SDI0_DATA2_MARK, SDI0_DATA3_MARK, SDI0_DATA4_MARK, SDI0_DATA5_MARK,
  113. SDI0_DATA6_MARK, SDI0_DATA7_MARK, SDI1_CKO_MARK, SDI1_CKI_MARK,
  114. SDI1_CMD_MARK,
  115. /* GPSR2 */
  116. SDI1_DATA0_MARK, SDI1_DATA1_MARK, SDI1_DATA2_MARK, SDI1_DATA3_MARK,
  117. AB_CLK_MARK, AB_CSB0_MARK, AB_CSB1_MARK,
  118. /* GPSR3 */
  119. AB_A20_MARK, USI0_CS1_MARK, USI0_CS2_MARK, USI1_DI_MARK,
  120. USI1_DO_MARK,
  121. NTSC_CLK_MARK, NTSC_DATA0_MARK, NTSC_DATA1_MARK, NTSC_DATA2_MARK,
  122. NTSC_DATA3_MARK, NTSC_DATA4_MARK,
  123. /* GPSR3 */
  124. NTSC_DATA5_MARK, NTSC_DATA6_MARK, NTSC_DATA7_MARK, CAM_CLKO_MARK,
  125. CAM_CLKI_MARK, CAM_VS_MARK, CAM_HS_MARK, CAM_YUV0_MARK,
  126. CAM_YUV1_MARK, CAM_YUV2_MARK, CAM_YUV3_MARK, CAM_YUV4_MARK,
  127. CAM_YUV5_MARK, CAM_YUV6_MARK, CAM_YUV7_MARK,
  128. JT_TDO_MARK, JT_TDOEN_MARK, USB_VBUS_MARK, LOWPWR_MARK,
  129. UART1_RX_MARK, UART1_TX_MARK,
  130. /* CHG_PINSEL_LCD3 */
  131. LCD3_PXCLK_MARK, LCD3_CLK_I_MARK, LCD3_HS_MARK, LCD3_VS_MARK,
  132. LCD3_DE_MARK, LCD3_R6_MARK, LCD3_R7_MARK, LCD3_G0_MARK, LCD3_G1_MARK,
  133. LCD3_G2_MARK, LCD3_G3_MARK, LCD3_G4_MARK, LCD3_G5_MARK, LCD3_G6_MARK,
  134. LCD3_G7_MARK, LCD3_B0_MARK, LCD3_B1_MARK, LCD3_B2_MARK, LCD3_B3_MARK,
  135. LCD3_B4_MARK, LCD3_B5_MARK, LCD3_B6_MARK, LCD3_B7_MARK,
  136. YUV3_CLK_O_MARK, YUV3_CLK_I_MARK, YUV3_HS_MARK, YUV3_VS_MARK,
  137. YUV3_DE_MARK, YUV3_D0_MARK, YUV3_D1_MARK, YUV3_D2_MARK, YUV3_D3_MARK,
  138. YUV3_D4_MARK, YUV3_D5_MARK, YUV3_D6_MARK, YUV3_D7_MARK, YUV3_D8_MARK,
  139. YUV3_D9_MARK, YUV3_D10_MARK, YUV3_D11_MARK, YUV3_D12_MARK,
  140. YUV3_D13_MARK, YUV3_D14_MARK, YUV3_D15_MARK,
  141. TP33_CLK_MARK, TP33_CTRL_MARK, TP33_DATA0_MARK, TP33_DATA1_MARK,
  142. TP33_DATA2_MARK, TP33_DATA3_MARK, TP33_DATA4_MARK, TP33_DATA5_MARK,
  143. TP33_DATA6_MARK, TP33_DATA7_MARK, TP33_DATA8_MARK, TP33_DATA9_MARK,
  144. TP33_DATA10_MARK, TP33_DATA11_MARK, TP33_DATA12_MARK, TP33_DATA13_MARK,
  145. TP33_DATA14_MARK, TP33_DATA15_MARK,
  146. /* CHG_PINSEL_IIC */
  147. IIC1_SCL_MARK, IIC1_SDA_MARK, UART3_RX_MARK, UART3_TX_MARK,
  148. /* CHG_PINSEL_AB */
  149. AB_CSB2_MARK, AB_CSB3_MARK, AB_RDB_MARK, AB_WRB_MARK,
  150. AB_WAIT_MARK, AB_ADV_MARK, AB_AD0_MARK, AB_AD1_MARK,
  151. AB_AD2_MARK, AB_AD3_MARK, AB_AD4_MARK, AB_AD5_MARK,
  152. AB_AD6_MARK, AB_AD7_MARK, AB_AD8_MARK, AB_AD9_MARK,
  153. AB_AD10_MARK, AB_AD11_MARK, AB_AD12_MARK, AB_AD13_MARK,
  154. AB_AD14_MARK, AB_AD15_MARK, AB_A17_MARK, AB_A18_MARK,
  155. AB_A19_MARK, AB_A21_MARK, AB_A22_MARK, AB_A23_MARK,
  156. AB_A24_MARK, AB_A25_MARK, AB_A26_MARK, AB_A27_MARK,
  157. AB_A28_MARK, AB_BEN0_MARK, AB_BEN1_MARK,
  158. DTV_BCLK_A_MARK, DTV_PSYNC_A_MARK, DTV_VALID_A_MARK,
  159. DTV_DATA_A_MARK,
  160. SDI2_CKO_MARK, SDI2_CKI_MARK, SDI2_CMD_MARK,
  161. SDI2_DATA0_MARK, SDI2_DATA1_MARK, SDI2_DATA2_MARK,
  162. SDI2_DATA3_MARK,
  163. CF_CSB0_MARK, CF_CSB1_MARK, CF_IORDB_MARK,
  164. CF_IOWRB_MARK, CF_IORDY_MARK, CF_RESET_MARK,
  165. CF_D00_MARK, CF_D01_MARK, CF_D02_MARK, CF_D03_MARK,
  166. CF_D04_MARK, CF_D05_MARK, CF_D06_MARK, CF_D07_MARK,
  167. CF_D08_MARK, CF_D09_MARK, CF_D10_MARK, CF_D11_MARK,
  168. CF_D12_MARK, CF_D13_MARK, CF_D14_MARK, CF_D15_MARK,
  169. CF_A00_MARK, CF_A01_MARK, CF_A02_MARK,
  170. CF_INTRQ_MARK, CF_INPACKB_MARK, CF_CDB1_MARK, CF_CDB2_MARK,
  171. USI5_CLK_A_MARK, USI5_DI_A_MARK, USI5_DO_A_MARK,
  172. USI5_CS0_A_MARK, USI5_CS1_A_MARK, USI5_CS2_A_MARK,
  173. /* CHG_PINSEL_USI */
  174. USI0_CS3_MARK, USI0_CS4_MARK, USI0_CS5_MARK,
  175. USI0_CS6_MARK,
  176. USI2_CLK_MARK, USI2_DI_MARK, USI2_DO_MARK,
  177. USI2_CS0_MARK, USI2_CS1_MARK, USI2_CS2_MARK,
  178. USI3_CLK_MARK, USI3_DI_MARK, USI3_DO_MARK,
  179. USI3_CS0_MARK,
  180. USI4_CLK_MARK, USI4_DI_MARK, USI4_DO_MARK,
  181. USI4_CS0_MARK, USI4_CS1_MARK,
  182. PWM0_MARK, PWM1_MARK,
  183. DTV_BCLK_B_MARK, DTV_PSYNC_B_MARK, DTV_VALID_B_MARK,
  184. DTV_DATA_B_MARK,
  185. /* CHG_PINSEL_HSI */
  186. USI5_CLK_B_MARK, USI5_DO_B_MARK, USI5_CS0_B_MARK, USI5_CS1_B_MARK,
  187. USI5_CS2_B_MARK, USI5_CS3_B_MARK, USI5_CS4_B_MARK, USI5_DI_B_MARK,
  188. /* CHG_PINSEL_UART */
  189. UART1_CTSB_MARK, UART1_RTSB_MARK,
  190. UART2_RX_MARK, UART2_TX_MARK,
  191. PINMUX_MARK_END,
  192. };
  193. /* Pin numbers for pins without a corresponding GPIO port number are computed
  194. * from the row and column numbers with a 1000 offset to avoid collisions with
  195. * GPIO port numbers. */
  196. #define PIN_NUMBER(row, col) (1000+((row)-1)*23+(col)-1)
  197. /* Expand to a list of sh_pfc_pin entries (named PORT#).
  198. * NOTE: No config are recorded since the driver do not handle pinconf. */
  199. #define __PIN_CFG(pn, pfx, sfx) SH_PFC_PIN_CFG(pfx, 0)
  200. #define PINMUX_EMEV_GPIO_ALL() CPU_ALL_PORT(__PIN_CFG, , unused)
  201. static const struct sh_pfc_pin pinmux_pins[] = {
  202. PINMUX_EMEV_GPIO_ALL(),
  203. /* Pins not associated with a GPIO port */
  204. SH_PFC_PIN_NAMED(2, 14, B14),
  205. SH_PFC_PIN_NAMED(2, 15, B15),
  206. SH_PFC_PIN_NAMED(2, 16, B16),
  207. SH_PFC_PIN_NAMED(2, 17, B17),
  208. SH_PFC_PIN_NAMED(3, 14, C14),
  209. SH_PFC_PIN_NAMED(3, 15, C15),
  210. SH_PFC_PIN_NAMED(3, 16, C16),
  211. SH_PFC_PIN_NAMED(3, 17, C17),
  212. SH_PFC_PIN_NAMED(4, 14, D14),
  213. SH_PFC_PIN_NAMED(4, 15, D15),
  214. SH_PFC_PIN_NAMED(4, 16, D16),
  215. SH_PFC_PIN_NAMED(4, 17, D17),
  216. };
  217. /* Expand to a list of name_DATA, name_FN marks */
  218. #define __PORT_DATA(pn, pfx, sfx) PINMUX_DATA(PORT##pfx##_DATA, PORT##pfx##_FN)
  219. #define PINMUX_EMEV_DATA_ALL() CPU_ALL_PORT(__PORT_DATA, , unused)
  220. static const u16 pinmux_data[] = {
  221. PINMUX_EMEV_DATA_ALL(), /* PINMUX_DATA(PORTN_DATA, PORTN_FN), */
  222. /* GPSR0 */
  223. /* V9 */
  224. PINMUX_DATA(JT_SEL_MARK, FN_JT_SEL),
  225. /* U9 */
  226. PINMUX_DATA(ERR_RST_REQB_MARK, FN_ERR_RST_REQB),
  227. /* V8 */
  228. PINMUX_DATA(REF_CLKO_MARK, FN_REF_CLKO),
  229. /* U8 */
  230. PINMUX_DATA(EXT_CLKI_MARK, FN_EXT_CLKI),
  231. /* B22*/
  232. PINMUX_IPSR_NOFN(LCD3_1_0_PORT18, LCD3_PXCLK, SEL_LCD3_1_0_00),
  233. PINMUX_IPSR_NOFN(LCD3_1_0_PORT18, YUV3_CLK_O, SEL_LCD3_1_0_01),
  234. /* C21 */
  235. PINMUX_DATA(LCD3_PXCLKB_MARK, FN_LCD3_PXCLKB),
  236. /* A21 */
  237. PINMUX_IPSR_NOFN(LCD3_1_0_PORT20, LCD3_CLK_I, SEL_LCD3_1_0_00),
  238. PINMUX_IPSR_NOFN(LCD3_1_0_PORT20, YUV3_CLK_I, SEL_LCD3_1_0_01),
  239. /* B21 */
  240. PINMUX_IPSR_NOFN(LCD3_1_0_PORT21, LCD3_HS, SEL_LCD3_1_0_00),
  241. PINMUX_IPSR_NOFN(LCD3_1_0_PORT21, YUV3_HS, SEL_LCD3_1_0_01),
  242. /* C20 */
  243. PINMUX_IPSR_NOFN(LCD3_1_0_PORT22, LCD3_VS, SEL_LCD3_1_0_00),
  244. PINMUX_IPSR_NOFN(LCD3_1_0_PORT22, YUV3_VS, SEL_LCD3_1_0_01),
  245. /* D19 */
  246. PINMUX_IPSR_NOFN(LCD3_1_0_PORT23, LCD3_DE, SEL_LCD3_1_0_00),
  247. PINMUX_IPSR_NOFN(LCD3_1_0_PORT23, YUV3_DE, SEL_LCD3_1_0_01),
  248. /* GPSR1 */
  249. /* A20 */
  250. PINMUX_DATA(LCD3_R0_MARK, FN_LCD3_R0),
  251. /* B20 */
  252. PINMUX_DATA(LCD3_R1_MARK, FN_LCD3_R1),
  253. /* A19 */
  254. PINMUX_DATA(LCD3_R2_MARK, FN_LCD3_R2),
  255. /* B19 */
  256. PINMUX_DATA(LCD3_R3_MARK, FN_LCD3_R3),
  257. /* C19 */
  258. PINMUX_DATA(LCD3_R4_MARK, FN_LCD3_R4),
  259. /* B18 */
  260. PINMUX_DATA(LCD3_R5_MARK, FN_LCD3_R5),
  261. /* C18 */
  262. PINMUX_IPSR_NOFN(LCD3_9_8_PORT38, LCD3_R6, SEL_LCD3_9_8_00),
  263. PINMUX_IPSR_NOFN(LCD3_9_8_PORT38, TP33_CLK, SEL_LCD3_9_8_10),
  264. /* D18 */
  265. PINMUX_IPSR_NOFN(LCD3_9_8_PORT39, LCD3_R7, SEL_LCD3_9_8_00),
  266. PINMUX_IPSR_NOFN(LCD3_9_8_PORT39, TP33_CTRL, SEL_LCD3_9_8_10),
  267. /* A18 */
  268. PINMUX_IPSR_NOFN(LCD3_11_10_PORT40, LCD3_G0, SEL_LCD3_11_10_00),
  269. PINMUX_IPSR_NOFN(LCD3_11_10_PORT40, YUV3_D0, SEL_LCD3_11_10_01),
  270. PINMUX_IPSR_NOFN(LCD3_11_10_PORT40, TP33_DATA0, SEL_LCD3_11_10_10),
  271. /* A17 */
  272. PINMUX_IPSR_NOFN(LCD3_11_10_PORT41, LCD3_G1, SEL_LCD3_11_10_00),
  273. PINMUX_IPSR_NOFN(LCD3_11_10_PORT41, YUV3_D1, SEL_LCD3_11_10_01),
  274. PINMUX_IPSR_NOFN(LCD3_11_10_PORT41, TP33_DATA1, SEL_LCD3_11_10_10),
  275. /* B17 */
  276. PINMUX_DATA(LCD3_G2_MARK, FN_SEL_LCD3_11_10_00),
  277. PINMUX_DATA(YUV3_D2_MARK, FN_SEL_LCD3_11_10_01),
  278. PINMUX_DATA(TP33_DATA2_MARK, FN_SEL_LCD3_11_10_10),
  279. /* C17 */
  280. PINMUX_DATA(LCD3_G3_MARK, FN_SEL_LCD3_11_10_00),
  281. PINMUX_DATA(YUV3_D3_MARK, FN_SEL_LCD3_11_10_01),
  282. PINMUX_DATA(TP33_DATA3_MARK, FN_SEL_LCD3_11_10_10),
  283. /* D17 */
  284. PINMUX_DATA(LCD3_G4_MARK, FN_SEL_LCD3_11_10_00),
  285. PINMUX_DATA(YUV3_D4_MARK, FN_SEL_LCD3_11_10_01),
  286. PINMUX_DATA(TP33_DATA4_MARK, FN_SEL_LCD3_11_10_10),
  287. /* B16 */
  288. PINMUX_DATA(LCD3_G5_MARK, FN_SEL_LCD3_11_10_00),
  289. PINMUX_DATA(YUV3_D5_MARK, FN_SEL_LCD3_11_10_01),
  290. PINMUX_DATA(TP33_DATA5_MARK, FN_SEL_LCD3_11_10_10),
  291. /* C16 */
  292. PINMUX_DATA(LCD3_G6_MARK, FN_SEL_LCD3_11_10_00),
  293. PINMUX_DATA(YUV3_D6_MARK, FN_SEL_LCD3_11_10_01),
  294. PINMUX_DATA(TP33_DATA6_MARK, FN_SEL_LCD3_11_10_10),
  295. /* D16 */
  296. PINMUX_DATA(LCD3_G7_MARK, FN_SEL_LCD3_11_10_00),
  297. PINMUX_DATA(YUV3_D7_MARK, FN_SEL_LCD3_11_10_01),
  298. PINMUX_DATA(TP33_DATA7_MARK, FN_SEL_LCD3_11_10_10),
  299. /* A16 */
  300. PINMUX_IPSR_NOFN(LCD3_11_10_PORT42, LCD3_B0, SEL_LCD3_11_10_00),
  301. PINMUX_IPSR_NOFN(LCD3_11_10_PORT42, YUV3_D8, SEL_LCD3_11_10_01),
  302. PINMUX_IPSR_NOFN(LCD3_11_10_PORT42, TP33_DATA8, SEL_LCD3_11_10_10),
  303. /* A15 */
  304. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B1, SEL_LCD3_11_10_00),
  305. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D9, SEL_LCD3_11_10_01),
  306. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA9, SEL_LCD3_11_10_10),
  307. /* B15 */
  308. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B2, SEL_LCD3_11_10_00),
  309. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D10, SEL_LCD3_11_10_01),
  310. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA10, SEL_LCD3_11_10_10),
  311. /* C15 */
  312. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B3, SEL_LCD3_11_10_00),
  313. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D11, SEL_LCD3_11_10_01),
  314. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA11, SEL_LCD3_11_10_10),
  315. /* D15 */
  316. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B4, SEL_LCD3_11_10_00),
  317. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D12, SEL_LCD3_11_10_01),
  318. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA12, SEL_LCD3_11_10_10),
  319. /* B14 */
  320. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B5, SEL_LCD3_11_10_00),
  321. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D13, SEL_LCD3_11_10_01),
  322. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA13, SEL_LCD3_11_10_10),
  323. /* C14 */
  324. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B6, SEL_LCD3_11_10_00),
  325. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D14, SEL_LCD3_11_10_01),
  326. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA14, SEL_LCD3_11_10_10),
  327. /* D14 */
  328. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, LCD3_B7, SEL_LCD3_11_10_00),
  329. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, YUV3_D15, SEL_LCD3_11_10_01),
  330. PINMUX_IPSR_NOFN(LCD3_11_10_PORT43, TP33_DATA15, SEL_LCD3_11_10_10),
  331. /* AA9 */
  332. PINMUX_DATA(IIC0_SCL_MARK, FN_IIC0_SCL),
  333. /* AA8 */
  334. PINMUX_DATA(IIC0_SDA_MARK, FN_IIC0_SDA),
  335. /* Y9 */
  336. PINMUX_IPSR_NOFN(IIC_1_0_PORT46, IIC1_SCL, SEL_IIC_1_0_00),
  337. PINMUX_IPSR_NOFN(IIC_1_0_PORT46, UART3_RX, SEL_IIC_1_0_01),
  338. /* Y8 */
  339. PINMUX_IPSR_NOFN(IIC_1_0_PORT47, IIC1_SDA, SEL_IIC_1_0_00),
  340. PINMUX_IPSR_NOFN(IIC_1_0_PORT47, UART3_TX, SEL_IIC_1_0_01),
  341. /* AC19 */
  342. PINMUX_DATA(SD_CKI_MARK, FN_SD_CKI),
  343. /* AB18 */
  344. PINMUX_DATA(SDI0_CKO_MARK, FN_SDI0_CKO),
  345. /* AC18 */
  346. PINMUX_DATA(SDI0_CKI_MARK, FN_SDI0_CKI),
  347. /* Y12 */
  348. PINMUX_DATA(SDI0_CMD_MARK, FN_SDI0_CMD),
  349. /* AA13 */
  350. PINMUX_DATA(SDI0_DATA0_MARK, FN_SDI0_DATA0),
  351. /* Y13 */
  352. PINMUX_DATA(SDI0_DATA1_MARK, FN_SDI0_DATA1),
  353. /* AA14 */
  354. PINMUX_DATA(SDI0_DATA2_MARK, FN_SDI0_DATA2),
  355. /* Y14 */
  356. PINMUX_DATA(SDI0_DATA3_MARK, FN_SDI0_DATA3),
  357. /* AA15 */
  358. PINMUX_DATA(SDI0_DATA4_MARK, FN_SDI0_DATA4),
  359. /* Y15 */
  360. PINMUX_DATA(SDI0_DATA5_MARK, FN_SDI0_DATA5),
  361. /* AA16 */
  362. PINMUX_DATA(SDI0_DATA6_MARK, FN_SDI0_DATA6),
  363. /* Y16 */
  364. PINMUX_DATA(SDI0_DATA7_MARK, FN_SDI0_DATA7),
  365. /* AB22 */
  366. PINMUX_DATA(SDI1_CKO_MARK, FN_SDI1_CKO),
  367. /* AA23 */
  368. PINMUX_DATA(SDI1_CKI_MARK, FN_SDI1_CKI),
  369. /* AC21 */
  370. PINMUX_DATA(SDI1_CMD_MARK, FN_SDI1_CMD),
  371. /* GPSR2 */
  372. /* AB21 */
  373. PINMUX_DATA(SDI1_DATA0_MARK, FN_SDI1_DATA0),
  374. /* AB20 */
  375. PINMUX_DATA(SDI1_DATA1_MARK, FN_SDI1_DATA1),
  376. /* AB19 */
  377. PINMUX_DATA(SDI1_DATA2_MARK, FN_SDI1_DATA2),
  378. /* AA19 */
  379. PINMUX_DATA(SDI1_DATA3_MARK, FN_SDI1_DATA3),
  380. /* J23 */
  381. PINMUX_DATA(AB_CLK_MARK, FN_AB_CLK),
  382. /* D21 */
  383. PINMUX_DATA(AB_CSB0_MARK, FN_AB_CSB0),
  384. /* E21 */
  385. PINMUX_DATA(AB_CSB1_MARK, FN_AB_CSB1),
  386. /* F20 */
  387. PINMUX_IPSR_NOFN(AB_1_0_PORT71, AB_CSB2, SEL_AB_1_0_00),
  388. PINMUX_IPSR_NOFN(AB_1_0_PORT71, CF_CSB0, SEL_AB_1_0_10),
  389. /* G20 */
  390. PINMUX_IPSR_NOFN(AB_1_0_PORT72, AB_CSB3, SEL_AB_1_0_00),
  391. PINMUX_IPSR_NOFN(AB_1_0_PORT72, CF_CSB1, SEL_AB_1_0_10),
  392. /* J20 */
  393. PINMUX_IPSR_NOFN(AB_1_0_PORT73, AB_RDB, SEL_AB_1_0_00),
  394. PINMUX_IPSR_NOFN(AB_1_0_PORT73, CF_IORDB, SEL_AB_1_0_10),
  395. /* H20 */
  396. PINMUX_IPSR_NOFN(AB_1_0_PORT74, AB_WRB, SEL_AB_1_0_00),
  397. PINMUX_IPSR_NOFN(AB_1_0_PORT74, CF_IOWRB, SEL_AB_1_0_10),
  398. /* L20 */
  399. PINMUX_IPSR_NOFN(AB_1_0_PORT75, AB_WAIT, SEL_AB_1_0_00),
  400. PINMUX_IPSR_NOFN(AB_1_0_PORT75, CF_IORDY, SEL_AB_1_0_10),
  401. /* K20 */
  402. PINMUX_IPSR_NOFN(AB_1_0_PORT76, AB_ADV, SEL_AB_1_0_00),
  403. PINMUX_IPSR_NOFN(AB_1_0_PORT76, CF_RESET, SEL_AB_1_0_10),
  404. /* C23 */
  405. PINMUX_IPSR_NOFN(AB_1_0_PORT77, AB_AD0, SEL_AB_1_0_00),
  406. PINMUX_IPSR_NOFN(AB_1_0_PORT77, CF_D00, SEL_AB_1_0_10),
  407. /* C22 */
  408. PINMUX_IPSR_NOFN(AB_1_0_PORT78, AB_AD1, SEL_AB_1_0_00),
  409. PINMUX_IPSR_NOFN(AB_1_0_PORT78, CF_D01, SEL_AB_1_0_10),
  410. /* D23 */
  411. PINMUX_IPSR_NOFN(AB_1_0_PORT79, AB_AD2, SEL_AB_1_0_00),
  412. PINMUX_IPSR_NOFN(AB_1_0_PORT79, CF_D02, SEL_AB_1_0_10),
  413. /* D22 */
  414. PINMUX_IPSR_NOFN(AB_1_0_PORT80, AB_AD3, SEL_AB_1_0_00),
  415. PINMUX_IPSR_NOFN(AB_1_0_PORT80, CF_D03, SEL_AB_1_0_10),
  416. /* E23 */
  417. PINMUX_IPSR_NOFN(AB_1_0_PORT81, AB_AD4, SEL_AB_1_0_00),
  418. PINMUX_IPSR_NOFN(AB_1_0_PORT81, CF_D04, SEL_AB_1_0_10),
  419. /* E22 */
  420. PINMUX_IPSR_NOFN(AB_1_0_PORT82, AB_AD5, SEL_AB_1_0_00),
  421. PINMUX_IPSR_NOFN(AB_1_0_PORT82, CF_D05, SEL_AB_1_0_10),
  422. /* F23 */
  423. PINMUX_IPSR_NOFN(AB_1_0_PORT83, AB_AD6, SEL_AB_1_0_00),
  424. PINMUX_IPSR_NOFN(AB_1_0_PORT83, CF_D06, SEL_AB_1_0_10),
  425. /* F22 */
  426. PINMUX_IPSR_NOFN(AB_1_0_PORT84, AB_AD7, SEL_AB_1_0_00),
  427. PINMUX_IPSR_NOFN(AB_1_0_PORT84, CF_D07, SEL_AB_1_0_10),
  428. /* F21 */
  429. PINMUX_IPSR_NOFN(AB_3_2_PORT85, AB_AD8, SEL_AB_3_2_00),
  430. PINMUX_IPSR_NOFN(AB_3_2_PORT85, DTV_BCLK_A, SEL_AB_3_2_01),
  431. PINMUX_IPSR_NOFN(AB_3_2_PORT85, CF_D08, SEL_AB_3_2_10),
  432. PINMUX_IPSR_NOFN(AB_3_2_PORT85, USI5_CLK_A, SEL_AB_3_2_11),
  433. /* G23 */
  434. PINMUX_IPSR_NOFN(AB_3_2_PORT86, AB_AD9, SEL_AB_3_2_00),
  435. PINMUX_IPSR_NOFN(AB_3_2_PORT86, DTV_PSYNC_A, SEL_AB_3_2_01),
  436. PINMUX_IPSR_NOFN(AB_3_2_PORT86, CF_D09, SEL_AB_3_2_10),
  437. PINMUX_IPSR_NOFN(AB_3_2_PORT86, USI5_DI_A, SEL_AB_3_2_11),
  438. /* G22 */
  439. PINMUX_IPSR_NOFN(AB_3_2_PORT87, AB_AD10, SEL_AB_3_2_00),
  440. PINMUX_IPSR_NOFN(AB_3_2_PORT87, DTV_VALID_A, SEL_AB_3_2_01),
  441. PINMUX_IPSR_NOFN(AB_3_2_PORT87, CF_D10, SEL_AB_3_2_10),
  442. PINMUX_IPSR_NOFN(AB_3_2_PORT87, USI5_DO_A, SEL_AB_3_2_11),
  443. /* G21 */
  444. PINMUX_IPSR_NOFN(AB_3_2_PORT88, AB_AD11, SEL_AB_3_2_00),
  445. PINMUX_IPSR_NOFN(AB_3_2_PORT88, DTV_DATA_A, SEL_AB_3_2_01),
  446. PINMUX_IPSR_NOFN(AB_3_2_PORT88, CF_D11, SEL_AB_3_2_10),
  447. PINMUX_IPSR_NOFN(AB_3_2_PORT88, USI5_CS0_A, SEL_AB_3_2_11),
  448. /* H23 */
  449. PINMUX_IPSR_NOFN(AB_5_4_PORT89, AB_AD12, SEL_AB_5_4_00),
  450. PINMUX_IPSR_NOFN(AB_5_4_PORT89, SDI2_DATA0, SEL_AB_5_4_01),
  451. PINMUX_IPSR_NOFN(AB_5_4_PORT89, CF_D12, SEL_AB_5_4_10),
  452. PINMUX_IPSR_NOFN(AB_5_4_PORT89, USI5_CS1_A, SEL_AB_5_4_11),
  453. /* H22 */
  454. PINMUX_IPSR_NOFN(AB_5_4_PORT90, AB_AD13, SEL_AB_5_4_00),
  455. PINMUX_IPSR_NOFN(AB_5_4_PORT90, SDI2_DATA1, SEL_AB_5_4_01),
  456. PINMUX_IPSR_NOFN(AB_5_4_PORT90, CF_D13, SEL_AB_5_4_10),
  457. PINMUX_IPSR_NOFN(AB_5_4_PORT90, USI5_CS2_A, SEL_AB_5_4_11),
  458. /* H21 */
  459. PINMUX_IPSR_NOFN(AB_7_6_PORT91, AB_AD14, SEL_AB_7_6_00),
  460. PINMUX_IPSR_NOFN(AB_7_6_PORT91, SDI2_DATA2, SEL_AB_7_6_01),
  461. PINMUX_IPSR_NOFN(AB_7_6_PORT91, CF_D14, SEL_AB_7_6_10),
  462. /* J22 */
  463. PINMUX_IPSR_NOFN(AB_7_6_PORT92, AB_AD15, SEL_AB_7_6_00),
  464. PINMUX_IPSR_NOFN(AB_7_6_PORT92, SDI2_DATA3, SEL_AB_7_6_01),
  465. PINMUX_IPSR_NOFN(AB_7_6_PORT92, CF_D15, SEL_AB_7_6_10),
  466. /* J21 */
  467. PINMUX_IPSR_NOFN(AB_1_0_PORT93, AB_A17, SEL_AB_1_0_00),
  468. PINMUX_IPSR_NOFN(AB_1_0_PORT93, CF_A00, SEL_AB_1_0_10),
  469. /* K21 */
  470. PINMUX_IPSR_NOFN(AB_1_0_PORT94, AB_A18, SEL_AB_1_0_00),
  471. PINMUX_IPSR_NOFN(AB_1_0_PORT94, CF_A01, SEL_AB_1_0_10),
  472. /* L21 */
  473. PINMUX_IPSR_NOFN(AB_1_0_PORT95, AB_A19, SEL_AB_1_0_00),
  474. PINMUX_IPSR_NOFN(AB_1_0_PORT95, CF_A02, SEL_AB_1_0_10),
  475. /* GPSR3 */
  476. /* M21 */
  477. PINMUX_DATA(AB_A20_MARK, FN_AB_A20),
  478. /* N21 */
  479. PINMUX_IPSR_NOFN(AB_9_8_PORT97, AB_A21, SEL_AB_9_8_00),
  480. PINMUX_IPSR_NOFN(AB_9_8_PORT97, SDI2_CKO, SEL_AB_9_8_01),
  481. PINMUX_IPSR_NOFN(AB_9_8_PORT97, CF_INTRQ, SEL_AB_9_8_10),
  482. /* M20 */
  483. PINMUX_IPSR_NOFN(AB_9_8_PORT98, AB_A22, SEL_AB_9_8_00),
  484. PINMUX_IPSR_NOFN(AB_9_8_PORT98, SDI2_CKI, SEL_AB_9_8_01),
  485. /* N20 */
  486. PINMUX_IPSR_NOFN(AB_9_8_PORT99, AB_A23, SEL_AB_9_8_00),
  487. PINMUX_IPSR_NOFN(AB_9_8_PORT99, SDI2_CMD, SEL_AB_9_8_01),
  488. /* L18 */
  489. PINMUX_IPSR_NOFN(AB_11_10_PORT100, AB_A24, SEL_AB_11_10_00),
  490. PINMUX_IPSR_NOFN(AB_11_10_PORT100, CF_INPACKB, SEL_AB_11_10_10),
  491. /* M18 */
  492. PINMUX_IPSR_NOFN(AB_11_10_PORT101, AB_A25, SEL_AB_11_10_00),
  493. PINMUX_IPSR_NOFN(AB_11_10_PORT101, CF_CDB1, SEL_AB_11_10_10),
  494. /* N18 */
  495. PINMUX_IPSR_NOFN(AB_11_10_PORT102, AB_A26, SEL_AB_11_10_00),
  496. PINMUX_IPSR_NOFN(AB_11_10_PORT102, CF_CDB2, SEL_AB_11_10_10),
  497. /* L17 */
  498. PINMUX_IPSR_NOFN(AB_13_12_PORT103, AB_A27, SEL_AB_13_12_00),
  499. PINMUX_IPSR_NOFN(AB_13_12_PORT103, AB_BEN0, SEL_AB_13_12_10),
  500. /* M17 */
  501. PINMUX_IPSR_NOFN(AB_13_12_PORT104, AB_A28, SEL_AB_13_12_00),
  502. PINMUX_IPSR_NOFN(AB_13_12_PORT104, AB_BEN1, SEL_AB_13_12_10),
  503. /* B8 */
  504. PINMUX_DATA(USI0_CS1_MARK, FN_USI0_CS1),
  505. /* B9 */
  506. PINMUX_DATA(USI0_CS2_MARK, FN_USI0_CS2),
  507. /* C10 */
  508. PINMUX_DATA(USI1_DI_MARK, FN_USI1_DI),
  509. /* D10 */
  510. PINMUX_DATA(USI1_DO_MARK, FN_USI1_DO),
  511. /* AB5 */
  512. PINMUX_IPSR_NOFN(USI_1_0_PORT109, USI2_CLK, SEL_USI_1_0_00),
  513. PINMUX_IPSR_NOFN(USI_1_0_PORT109, DTV_BCLK_B, SEL_USI_1_0_01),
  514. /* AA6 */
  515. PINMUX_IPSR_NOFN(USI_1_0_PORT110, USI2_DI, SEL_USI_1_0_00),
  516. PINMUX_IPSR_NOFN(USI_1_0_PORT110, DTV_PSYNC_B, SEL_USI_1_0_01),
  517. /* AA5 */
  518. PINMUX_IPSR_NOFN(USI_1_0_PORT111, USI2_DO, SEL_USI_1_0_00),
  519. PINMUX_IPSR_NOFN(USI_1_0_PORT111, DTV_VALID_B, SEL_USI_1_0_01),
  520. /* Y7 */
  521. PINMUX_IPSR_NOFN(USI_1_0_PORT112, USI2_CS0, SEL_USI_1_0_00),
  522. PINMUX_IPSR_NOFN(USI_1_0_PORT112, DTV_DATA_B, SEL_USI_1_0_01),
  523. /* AA7 */
  524. PINMUX_IPSR_NOFN(USI_3_2_PORT113, USI2_CS1, SEL_USI_3_2_00),
  525. PINMUX_IPSR_NOFN(USI_3_2_PORT113, USI4_CS0, SEL_USI_3_2_01),
  526. /* Y6 */
  527. PINMUX_IPSR_NOFN(USI_3_2_PORT114, USI2_CS2, SEL_USI_3_2_00),
  528. PINMUX_IPSR_NOFN(USI_3_2_PORT114, USI4_CS1, SEL_USI_3_2_01),
  529. /* AC5 */
  530. PINMUX_IPSR_NOFN(USI_5_4_PORT115, USI3_CLK, SEL_USI_5_4_00),
  531. PINMUX_IPSR_NOFN(USI_5_4_PORT115, USI0_CS3, SEL_USI_5_4_01),
  532. /* AC4 */
  533. PINMUX_IPSR_NOFN(USI_5_4_PORT116, USI3_DI, SEL_USI_5_4_00),
  534. PINMUX_IPSR_NOFN(USI_5_4_PORT116, USI0_CS4, SEL_USI_5_4_01),
  535. /* AC3 */
  536. PINMUX_IPSR_NOFN(USI_5_4_PORT117, USI3_DO, SEL_USI_5_4_00),
  537. PINMUX_IPSR_NOFN(USI_5_4_PORT117, USI0_CS5, SEL_USI_5_4_01),
  538. /* AB4 */
  539. PINMUX_IPSR_NOFN(USI_5_4_PORT118, USI3_CS0, SEL_USI_5_4_00),
  540. PINMUX_IPSR_NOFN(USI_5_4_PORT118, USI0_CS6, SEL_USI_5_4_01),
  541. /* AB3 */
  542. PINMUX_IPSR_NOFN(USI_7_6_PORT119, USI4_CLK, SEL_USI_7_6_01),
  543. /* AA4 */
  544. PINMUX_IPSR_NOFN(USI_9_8_PORT120, PWM0, SEL_USI_9_8_00),
  545. PINMUX_IPSR_NOFN(USI_9_8_PORT120, USI4_DI, SEL_USI_9_8_01),
  546. /* Y5 */
  547. PINMUX_IPSR_NOFN(USI_9_8_PORT121, PWM1, SEL_USI_9_8_00),
  548. PINMUX_IPSR_NOFN(USI_9_8_PORT121, USI4_DO, SEL_USI_9_8_01),
  549. /* V20 */
  550. PINMUX_DATA(NTSC_CLK_MARK, FN_NTSC_CLK),
  551. /* P20 */
  552. PINMUX_DATA(NTSC_DATA0_MARK, FN_NTSC_DATA0),
  553. /* P18 */
  554. PINMUX_DATA(NTSC_DATA1_MARK, FN_NTSC_DATA1),
  555. /* R20 */
  556. PINMUX_DATA(NTSC_DATA2_MARK, FN_NTSC_DATA2),
  557. /* R18 */
  558. PINMUX_DATA(NTSC_DATA3_MARK, FN_NTSC_DATA3),
  559. /* T20 */
  560. PINMUX_DATA(NTSC_DATA4_MARK, FN_NTSC_DATA4),
  561. /* GPRS3 */
  562. /* T18 */
  563. PINMUX_DATA(NTSC_DATA5_MARK, FN_NTSC_DATA5),
  564. /* U20 */
  565. PINMUX_DATA(NTSC_DATA6_MARK, FN_NTSC_DATA6),
  566. /* U18 */
  567. PINMUX_DATA(NTSC_DATA7_MARK, FN_NTSC_DATA7),
  568. /* W23 */
  569. PINMUX_DATA(CAM_CLKO_MARK, FN_CAM_CLKO),
  570. /* Y23 */
  571. PINMUX_DATA(CAM_CLKI_MARK, FN_CAM_CLKI),
  572. /* W22 */
  573. PINMUX_DATA(CAM_VS_MARK, FN_CAM_VS),
  574. /* V21 */
  575. PINMUX_DATA(CAM_HS_MARK, FN_CAM_HS),
  576. /* T21 */
  577. PINMUX_DATA(CAM_YUV0_MARK, FN_CAM_YUV0),
  578. /* T22 */
  579. PINMUX_DATA(CAM_YUV1_MARK, FN_CAM_YUV1),
  580. /* T23 */
  581. PINMUX_DATA(CAM_YUV2_MARK, FN_CAM_YUV2),
  582. /* U21 */
  583. PINMUX_DATA(CAM_YUV3_MARK, FN_CAM_YUV3),
  584. /* U22 */
  585. PINMUX_DATA(CAM_YUV4_MARK, FN_CAM_YUV4),
  586. /* U23 */
  587. PINMUX_DATA(CAM_YUV5_MARK, FN_CAM_YUV5),
  588. /* V22 */
  589. PINMUX_DATA(CAM_YUV6_MARK, FN_CAM_YUV6),
  590. /* V23 */
  591. PINMUX_DATA(CAM_YUV7_MARK, FN_CAM_YUV7),
  592. /* K22 */
  593. PINMUX_IPSR_NOFN(HSI_1_0_PORT143, USI5_CLK_B, SEL_HSI_1_0_01),
  594. /* K23 */
  595. PINMUX_IPSR_NOFN(HSI_1_0_PORT144, USI5_DO_B, SEL_HSI_1_0_01),
  596. /* L23 */
  597. PINMUX_IPSR_NOFN(HSI_1_0_PORT145, USI5_CS0_B, SEL_HSI_1_0_01),
  598. /* L22 */
  599. PINMUX_IPSR_NOFN(HSI_1_0_PORT146, USI5_CS1_B, SEL_HSI_1_0_01),
  600. /* N22 */
  601. PINMUX_IPSR_NOFN(HSI_1_0_PORT147, USI5_CS2_B, SEL_HSI_1_0_01),
  602. /* N23 */
  603. PINMUX_IPSR_NOFN(HSI_1_0_PORT148, USI5_CS3_B, SEL_HSI_1_0_01),
  604. /* M23 */
  605. PINMUX_IPSR_NOFN(HSI_1_0_PORT149, USI5_CS4_B, SEL_HSI_1_0_01),
  606. /* M22 */
  607. PINMUX_IPSR_NOFN(HSI_1_0_PORT150, USI5_DI_B, SEL_HSI_1_0_01),
  608. /* D13 */
  609. PINMUX_DATA(JT_TDO_MARK, FN_JT_TDO),
  610. /* F13 */
  611. PINMUX_DATA(JT_TDOEN_MARK, FN_JT_TDOEN),
  612. /* AA12 */
  613. PINMUX_DATA(USB_VBUS_MARK, FN_USB_VBUS),
  614. /* A12 */
  615. PINMUX_DATA(LOWPWR_MARK, FN_LOWPWR),
  616. /* Y11 */
  617. PINMUX_DATA(UART1_RX_MARK, FN_UART1_RX),
  618. /* Y10 */
  619. PINMUX_DATA(UART1_TX_MARK, FN_UART1_TX),
  620. /* AA10 */
  621. PINMUX_IPSR_NOFN(UART_1_0_PORT157, UART1_CTSB, SEL_UART_1_0_00),
  622. PINMUX_IPSR_NOFN(UART_1_0_PORT157, UART2_RX, SEL_UART_1_0_01),
  623. /* AB10 */
  624. PINMUX_IPSR_NOFN(UART_1_0_PORT158, UART1_RTSB, SEL_UART_1_0_00),
  625. PINMUX_IPSR_NOFN(UART_1_0_PORT158, UART2_TX, SEL_UART_1_0_01),
  626. };
  627. #define EMEV_MUX_PIN(name, pin, mark) \
  628. static const unsigned int name##_pins[] = { pin }; \
  629. static const unsigned int name##_mux[] = { mark##_MARK }
  630. /* = [ System ] =========== */
  631. EMEV_MUX_PIN(err_rst_reqb, 3, ERR_RST_REQB);
  632. EMEV_MUX_PIN(ref_clko, 4, REF_CLKO);
  633. EMEV_MUX_PIN(ext_clki, 5, EXT_CLKI);
  634. EMEV_MUX_PIN(lowpwr, 154, LOWPWR);
  635. /* = [ External Memory] === */
  636. static const unsigned int ab_main_pins[] = {
  637. /* AB_RDB, AB_WRB */
  638. 73, 74,
  639. /* AB_AD[0:15] */
  640. 77, 78, 79, 80,
  641. 81, 82, 83, 84,
  642. 85, 86, 87, 88,
  643. 89, 90, 91, 92,
  644. };
  645. static const unsigned int ab_main_mux[] = {
  646. AB_RDB_MARK, AB_WRB_MARK,
  647. AB_AD0_MARK, AB_AD1_MARK, AB_AD2_MARK, AB_AD3_MARK,
  648. AB_AD4_MARK, AB_AD5_MARK, AB_AD6_MARK, AB_AD7_MARK,
  649. AB_AD8_MARK, AB_AD9_MARK, AB_AD10_MARK, AB_AD11_MARK,
  650. AB_AD12_MARK, AB_AD13_MARK, AB_AD14_MARK, AB_AD15_MARK,
  651. };
  652. EMEV_MUX_PIN(ab_clk, 68, AB_CLK);
  653. EMEV_MUX_PIN(ab_csb0, 69, AB_CSB0);
  654. EMEV_MUX_PIN(ab_csb1, 70, AB_CSB1);
  655. EMEV_MUX_PIN(ab_csb2, 71, AB_CSB2);
  656. EMEV_MUX_PIN(ab_csb3, 72, AB_CSB3);
  657. EMEV_MUX_PIN(ab_wait, 75, AB_WAIT);
  658. EMEV_MUX_PIN(ab_adv, 76, AB_ADV);
  659. EMEV_MUX_PIN(ab_a17, 93, AB_A17);
  660. EMEV_MUX_PIN(ab_a18, 94, AB_A18);
  661. EMEV_MUX_PIN(ab_a19, 95, AB_A19);
  662. EMEV_MUX_PIN(ab_a20, 96, AB_A20);
  663. EMEV_MUX_PIN(ab_a21, 97, AB_A21);
  664. EMEV_MUX_PIN(ab_a22, 98, AB_A22);
  665. EMEV_MUX_PIN(ab_a23, 99, AB_A23);
  666. EMEV_MUX_PIN(ab_a24, 100, AB_A24);
  667. EMEV_MUX_PIN(ab_a25, 101, AB_A25);
  668. EMEV_MUX_PIN(ab_a26, 102, AB_A26);
  669. EMEV_MUX_PIN(ab_a27, 103, AB_A27);
  670. EMEV_MUX_PIN(ab_a28, 104, AB_A28);
  671. EMEV_MUX_PIN(ab_ben0, 103, AB_BEN0);
  672. EMEV_MUX_PIN(ab_ben1, 104, AB_BEN1);
  673. /* = [ CAM ] ============== */
  674. EMEV_MUX_PIN(cam_clko, 131, CAM_CLKO);
  675. static const unsigned int cam_pins[] = {
  676. /* CLKI, VS, HS */
  677. 132, 133, 134,
  678. /* CAM_YUV[0:7] */
  679. 135, 136, 137, 138,
  680. 139, 140, 141, 142,
  681. };
  682. static const unsigned int cam_mux[] = {
  683. CAM_CLKI_MARK, CAM_VS_MARK, CAM_HS_MARK,
  684. CAM_YUV0_MARK, CAM_YUV1_MARK, CAM_YUV2_MARK, CAM_YUV3_MARK,
  685. CAM_YUV4_MARK, CAM_YUV5_MARK, CAM_YUV6_MARK, CAM_YUV7_MARK,
  686. };
  687. /* = [ CF ] -============== */
  688. static const unsigned int cf_ctrl_pins[] = {
  689. /* CSB0, CSB1, IORDB, IOWRB, IORDY, RESET,
  690. * A00, A01, A02, INTRQ, INPACKB, CDB1, CDB2 */
  691. 71, 72, 73, 74,
  692. 75, 76, 93, 94,
  693. 95, 97, 100, 101,
  694. 102,
  695. };
  696. static const unsigned int cf_ctrl_mux[] = {
  697. CF_CSB0_MARK, CF_CSB1_MARK, CF_IORDB_MARK, CF_IOWRB_MARK,
  698. CF_IORDY_MARK, CF_RESET_MARK, CF_A00_MARK, CF_A01_MARK,
  699. CF_A02_MARK, CF_INTRQ_MARK, CF_INPACKB_MARK, CF_CDB1_MARK,
  700. CF_CDB2_MARK,
  701. };
  702. static const unsigned int cf_data8_pins[] = {
  703. /* CF_D[0:8] */
  704. 77, 78, 79, 80,
  705. 81, 82, 83, 84,
  706. };
  707. static const unsigned int cf_data8_mux[] = {
  708. CF_D00_MARK, CF_D01_MARK, CF_D02_MARK, CF_D03_MARK,
  709. CF_D04_MARK, CF_D05_MARK, CF_D06_MARK, CF_D07_MARK,
  710. };
  711. static const unsigned int cf_data16_pins[] = {
  712. /* CF_D[0:15] */
  713. 77, 78, 79, 80,
  714. 81, 82, 83, 84,
  715. 85, 86, 87, 88,
  716. 89, 90, 91, 92,
  717. };
  718. static const unsigned int cf_data16_mux[] = {
  719. CF_D00_MARK, CF_D01_MARK, CF_D02_MARK, CF_D03_MARK,
  720. CF_D04_MARK, CF_D05_MARK, CF_D06_MARK, CF_D07_MARK,
  721. CF_D08_MARK, CF_D09_MARK, CF_D10_MARK, CF_D11_MARK,
  722. CF_D12_MARK, CF_D13_MARK, CF_D14_MARK, CF_D15_MARK,
  723. };
  724. /* = [ DTV ] ============== */
  725. static const unsigned int dtv_a_pins[] = {
  726. /* BCLK, PSYNC, VALID, DATA */
  727. 85, 86, 87, 88,
  728. };
  729. static const unsigned int dtv_a_mux[] = {
  730. DTV_BCLK_A_MARK, DTV_PSYNC_A_MARK, DTV_VALID_A_MARK, DTV_DATA_A_MARK,
  731. };
  732. static const unsigned int dtv_b_pins[] = {
  733. /* BCLK, PSYNC, VALID, DATA */
  734. 109, 110, 111, 112,
  735. };
  736. static const unsigned int dtv_b_mux[] = {
  737. DTV_BCLK_B_MARK, DTV_PSYNC_B_MARK, DTV_VALID_B_MARK, DTV_DATA_B_MARK,
  738. };
  739. /* = [ IIC0 ] ============= */
  740. static const unsigned int iic0_pins[] = {
  741. /* SCL, SDA */
  742. 44, 45,
  743. };
  744. static const unsigned int iic0_mux[] = {
  745. IIC0_SCL_MARK, IIC0_SDA_MARK,
  746. };
  747. /* = [ IIC1 ] ============= */
  748. static const unsigned int iic1_pins[] = {
  749. /* SCL, SDA */
  750. 46, 47,
  751. };
  752. static const unsigned int iic1_mux[] = {
  753. IIC1_SCL_MARK, IIC1_SDA_MARK,
  754. };
  755. /* = [ JTAG ] ============= */
  756. static const unsigned int jtag_pins[] = {
  757. /* SEL, TDO, TDOEN */
  758. 2, 151, 152,
  759. };
  760. static const unsigned int jtag_mux[] = {
  761. JT_SEL_MARK, JT_TDO_MARK, JT_TDOEN_MARK,
  762. };
  763. /* = [ LCD/YUV ] ========== */
  764. EMEV_MUX_PIN(lcd3_pxclk, 18, LCD3_PXCLK);
  765. EMEV_MUX_PIN(lcd3_pxclkb, 19, LCD3_PXCLKB);
  766. EMEV_MUX_PIN(lcd3_clk_i, 20, LCD3_CLK_I);
  767. static const unsigned int lcd3_sync_pins[] = {
  768. /* HS, VS, DE */
  769. 21, 22, 23,
  770. };
  771. static const unsigned int lcd3_sync_mux[] = {
  772. LCD3_HS_MARK, LCD3_VS_MARK, LCD3_DE_MARK,
  773. };
  774. static const unsigned int lcd3_rgb888_pins[] = {
  775. /* R[0:7], G[0:7], B[0:7] */
  776. 32, 33, 34, 35,
  777. 36, 37, 38, 39,
  778. 40, 41, PIN_NUMBER(2, 17), PIN_NUMBER(3, 17),
  779. PIN_NUMBER(4, 17), PIN_NUMBER(2, 16), PIN_NUMBER(3, 16),
  780. PIN_NUMBER(4, 16),
  781. 42, 43, PIN_NUMBER(2, 15), PIN_NUMBER(3, 15),
  782. PIN_NUMBER(4, 15), PIN_NUMBER(2, 14), PIN_NUMBER(3, 14),
  783. PIN_NUMBER(4, 14)
  784. };
  785. static const unsigned int lcd3_rgb888_mux[] = {
  786. LCD3_R0_MARK, LCD3_R1_MARK, LCD3_R2_MARK, LCD3_R3_MARK,
  787. LCD3_R4_MARK, LCD3_R5_MARK, LCD3_R6_MARK, LCD3_R7_MARK,
  788. LCD3_G0_MARK, LCD3_G1_MARK, LCD3_G2_MARK, LCD3_G3_MARK,
  789. LCD3_G4_MARK, LCD3_G5_MARK, LCD3_G6_MARK, LCD3_G7_MARK,
  790. LCD3_B0_MARK, LCD3_B1_MARK, LCD3_B2_MARK, LCD3_B3_MARK,
  791. LCD3_B4_MARK, LCD3_B5_MARK, LCD3_B6_MARK, LCD3_B7_MARK,
  792. };
  793. EMEV_MUX_PIN(yuv3_clk_i, 20, YUV3_CLK_I);
  794. static const unsigned int yuv3_pins[] = {
  795. /* CLK_O, HS, VS, DE */
  796. 18, 21, 22, 23,
  797. /* YUV3_D[0:15] */
  798. 40, 41, PIN_NUMBER(2, 17), PIN_NUMBER(3, 17),
  799. PIN_NUMBER(4, 17), PIN_NUMBER(2, 16), PIN_NUMBER(3, 16),
  800. PIN_NUMBER(4, 16),
  801. 42, 43, PIN_NUMBER(2, 15), PIN_NUMBER(3, 15),
  802. PIN_NUMBER(4, 15), PIN_NUMBER(2, 14), PIN_NUMBER(3, 14),
  803. PIN_NUMBER(4, 14),
  804. };
  805. static const unsigned int yuv3_mux[] = {
  806. YUV3_CLK_O_MARK, YUV3_HS_MARK, YUV3_VS_MARK, YUV3_DE_MARK,
  807. YUV3_D0_MARK, YUV3_D1_MARK, YUV3_D2_MARK, YUV3_D3_MARK,
  808. YUV3_D4_MARK, YUV3_D5_MARK, YUV3_D6_MARK, YUV3_D7_MARK,
  809. YUV3_D8_MARK, YUV3_D9_MARK, YUV3_D10_MARK, YUV3_D11_MARK,
  810. YUV3_D12_MARK, YUV3_D13_MARK, YUV3_D14_MARK, YUV3_D15_MARK,
  811. };
  812. /* = [ NTSC ] ============= */
  813. EMEV_MUX_PIN(ntsc_clk, 122, NTSC_CLK);
  814. static const unsigned int ntsc_data_pins[] = {
  815. /* NTSC_DATA[0:7] */
  816. 123, 124, 125, 126,
  817. 127, 128, 129, 130,
  818. };
  819. static const unsigned int ntsc_data_mux[] = {
  820. NTSC_DATA0_MARK, NTSC_DATA1_MARK, NTSC_DATA2_MARK, NTSC_DATA3_MARK,
  821. NTSC_DATA4_MARK, NTSC_DATA5_MARK, NTSC_DATA6_MARK, NTSC_DATA7_MARK,
  822. };
  823. /* = [ PWM0 ] ============= */
  824. EMEV_MUX_PIN(pwm0, 120, PWM0);
  825. /* = [ PWM1 ] ============= */
  826. EMEV_MUX_PIN(pwm1, 121, PWM1);
  827. /* = [ SD ] =============== */
  828. EMEV_MUX_PIN(sd_cki, 48, SD_CKI);
  829. /* = [ SDIO0 ] ============ */
  830. static const unsigned int sdi0_ctrl_pins[] = {
  831. /* CKO, CKI, CMD */
  832. 50, 51, 52,
  833. };
  834. static const unsigned int sdi0_ctrl_mux[] = {
  835. SDI0_CKO_MARK, SDI0_CKI_MARK, SDI0_CMD_MARK,
  836. };
  837. static const unsigned int sdi0_data1_pins[] = {
  838. /* SDI0_DATA[0] */
  839. 53,
  840. };
  841. static const unsigned int sdi0_data1_mux[] = {
  842. SDI0_DATA0_MARK,
  843. };
  844. static const unsigned int sdi0_data4_pins[] = {
  845. /* SDI0_DATA[0:3] */
  846. 53, 54, 55, 56,
  847. };
  848. static const unsigned int sdi0_data4_mux[] = {
  849. SDI0_DATA0_MARK, SDI0_DATA1_MARK, SDI0_DATA2_MARK, SDI0_DATA3_MARK,
  850. };
  851. static const unsigned int sdi0_data8_pins[] = {
  852. /* SDI0_DATA[0:7] */
  853. 53, 54, 55, 56,
  854. 57, 58, 59, 60
  855. };
  856. static const unsigned int sdi0_data8_mux[] = {
  857. SDI0_DATA0_MARK, SDI0_DATA1_MARK, SDI0_DATA2_MARK, SDI0_DATA3_MARK,
  858. SDI0_DATA4_MARK, SDI0_DATA5_MARK, SDI0_DATA6_MARK, SDI0_DATA7_MARK,
  859. };
  860. /* = [ SDIO1 ] ============ */
  861. static const unsigned int sdi1_ctrl_pins[] = {
  862. /* CKO, CKI, CMD */
  863. 61, 62, 63,
  864. };
  865. static const unsigned int sdi1_ctrl_mux[] = {
  866. SDI1_CKO_MARK, SDI1_CKI_MARK, SDI1_CMD_MARK,
  867. };
  868. static const unsigned int sdi1_data1_pins[] = {
  869. /* SDI1_DATA[0] */
  870. 64,
  871. };
  872. static const unsigned int sdi1_data1_mux[] = {
  873. SDI1_DATA0_MARK,
  874. };
  875. static const unsigned int sdi1_data4_pins[] = {
  876. /* SDI1_DATA[0:3] */
  877. 64, 65, 66, 67,
  878. };
  879. static const unsigned int sdi1_data4_mux[] = {
  880. SDI1_DATA0_MARK, SDI1_DATA1_MARK, SDI1_DATA2_MARK, SDI1_DATA3_MARK,
  881. };
  882. /* = [ SDIO2 ] ============ */
  883. static const unsigned int sdi2_ctrl_pins[] = {
  884. /* CKO, CKI, CMD */
  885. 97, 98, 99,
  886. };
  887. static const unsigned int sdi2_ctrl_mux[] = {
  888. SDI2_CKO_MARK, SDI2_CKI_MARK, SDI2_CMD_MARK,
  889. };
  890. static const unsigned int sdi2_data1_pins[] = {
  891. /* SDI2_DATA[0] */
  892. 89,
  893. };
  894. static const unsigned int sdi2_data1_mux[] = {
  895. SDI2_DATA0_MARK,
  896. };
  897. static const unsigned int sdi2_data4_pins[] = {
  898. /* SDI2_DATA[0:3] */
  899. 89, 90, 91, 92,
  900. };
  901. static const unsigned int sdi2_data4_mux[] = {
  902. SDI2_DATA0_MARK, SDI2_DATA1_MARK, SDI2_DATA2_MARK, SDI2_DATA3_MARK,
  903. };
  904. /* = [ TP33 ] ============= */
  905. static const unsigned int tp33_pins[] = {
  906. /* CLK, CTRL */
  907. 38, 39,
  908. /* TP33_DATA[0:15] */
  909. 40, 41, PIN_NUMBER(2, 17), PIN_NUMBER(3, 17),
  910. PIN_NUMBER(4, 17), PIN_NUMBER(2, 16), PIN_NUMBER(3, 16),
  911. PIN_NUMBER(4, 16),
  912. 42, 43, PIN_NUMBER(2, 15), PIN_NUMBER(3, 15),
  913. PIN_NUMBER(4, 15), PIN_NUMBER(2, 14), PIN_NUMBER(3, 14),
  914. PIN_NUMBER(4, 14),
  915. };
  916. static const unsigned int tp33_mux[] = {
  917. TP33_CLK_MARK, TP33_CTRL_MARK,
  918. TP33_DATA0_MARK, TP33_DATA1_MARK, TP33_DATA2_MARK, TP33_DATA3_MARK,
  919. TP33_DATA4_MARK, TP33_DATA5_MARK, TP33_DATA6_MARK, TP33_DATA7_MARK,
  920. TP33_DATA8_MARK, TP33_DATA9_MARK, TP33_DATA10_MARK, TP33_DATA11_MARK,
  921. TP33_DATA12_MARK, TP33_DATA13_MARK, TP33_DATA14_MARK, TP33_DATA15_MARK,
  922. };
  923. /* = [ UART1 ] ============ */
  924. static const unsigned int uart1_data_pins[] = {
  925. /* RX, TX */
  926. 155, 156,
  927. };
  928. static const unsigned int uart1_data_mux[] = {
  929. UART1_RX_MARK, UART1_TX_MARK,
  930. };
  931. static const unsigned int uart1_ctrl_pins[] = {
  932. /* CTSB, RTSB */
  933. 157, 158,
  934. };
  935. static const unsigned int uart1_ctrl_mux[] = {
  936. UART1_CTSB_MARK, UART1_RTSB_MARK,
  937. };
  938. /* = [ UART2 ] ============ */
  939. static const unsigned int uart2_data_pins[] = {
  940. /* RX, TX */
  941. 157, 158,
  942. };
  943. static const unsigned int uart2_data_mux[] = {
  944. UART2_RX_MARK, UART2_TX_MARK,
  945. };
  946. /* = [ UART3 ] ============ */
  947. static const unsigned int uart3_data_pins[] = {
  948. /* RX, TX */
  949. 46, 47,
  950. };
  951. static const unsigned int uart3_data_mux[] = {
  952. UART3_RX_MARK, UART3_TX_MARK,
  953. };
  954. /* = [ USB ] ============== */
  955. EMEV_MUX_PIN(usb_vbus, 153, USB_VBUS);
  956. /* = [ USI0 ] ============== */
  957. EMEV_MUX_PIN(usi0_cs1, 105, USI0_CS1);
  958. EMEV_MUX_PIN(usi0_cs2, 106, USI0_CS2);
  959. EMEV_MUX_PIN(usi0_cs3, 115, USI0_CS3);
  960. EMEV_MUX_PIN(usi0_cs4, 116, USI0_CS4);
  961. EMEV_MUX_PIN(usi0_cs5, 117, USI0_CS5);
  962. EMEV_MUX_PIN(usi0_cs6, 118, USI0_CS6);
  963. /* = [ USI1 ] ============== */
  964. static const unsigned int usi1_pins[] = {
  965. /* DI, DO*/
  966. 107, 108,
  967. };
  968. static const unsigned int usi1_mux[] = {
  969. USI1_DI_MARK, USI1_DO_MARK,
  970. };
  971. /* = [ USI2 ] ============== */
  972. static const unsigned int usi2_pins[] = {
  973. /* CLK, DI, DO*/
  974. 109, 110, 111,
  975. };
  976. static const unsigned int usi2_mux[] = {
  977. USI2_CLK_MARK, USI2_DI_MARK, USI2_DO_MARK,
  978. };
  979. EMEV_MUX_PIN(usi2_cs0, 112, USI2_CS0);
  980. EMEV_MUX_PIN(usi2_cs1, 113, USI2_CS1);
  981. EMEV_MUX_PIN(usi2_cs2, 114, USI2_CS2);
  982. /* = [ USI3 ] ============== */
  983. static const unsigned int usi3_pins[] = {
  984. /* CLK, DI, DO*/
  985. 115, 116, 117,
  986. };
  987. static const unsigned int usi3_mux[] = {
  988. USI3_CLK_MARK, USI3_DI_MARK, USI3_DO_MARK,
  989. };
  990. EMEV_MUX_PIN(usi3_cs0, 118, USI3_CS0);
  991. /* = [ USI4 ] ============== */
  992. static const unsigned int usi4_pins[] = {
  993. /* CLK, DI, DO*/
  994. 119, 120, 121,
  995. };
  996. static const unsigned int usi4_mux[] = {
  997. USI4_CLK_MARK, USI4_DI_MARK, USI4_DO_MARK,
  998. };
  999. EMEV_MUX_PIN(usi4_cs0, 113, USI4_CS0);
  1000. EMEV_MUX_PIN(usi4_cs1, 114, USI4_CS1);
  1001. /* = [ USI5 ] ============== */
  1002. static const unsigned int usi5_a_pins[] = {
  1003. /* CLK, DI, DO*/
  1004. 85, 86, 87,
  1005. };
  1006. static const unsigned int usi5_a_mux[] = {
  1007. USI5_CLK_A_MARK, USI5_DI_A_MARK, USI5_DO_A_MARK,
  1008. };
  1009. EMEV_MUX_PIN(usi5_cs0_a, 88, USI5_CS0_A);
  1010. EMEV_MUX_PIN(usi5_cs1_a, 89, USI5_CS1_A);
  1011. EMEV_MUX_PIN(usi5_cs2_a, 90, USI5_CS2_A);
  1012. static const unsigned int usi5_b_pins[] = {
  1013. /* CLK, DI, DO*/
  1014. 143, 144, 150,
  1015. };
  1016. static const unsigned int usi5_b_mux[] = {
  1017. USI5_CLK_B_MARK, USI5_DI_B_MARK, USI5_DO_B_MARK,
  1018. };
  1019. EMEV_MUX_PIN(usi5_cs0_b, 145, USI5_CS0_B);
  1020. EMEV_MUX_PIN(usi5_cs1_b, 146, USI5_CS1_B);
  1021. EMEV_MUX_PIN(usi5_cs2_b, 147, USI5_CS2_B);
  1022. EMEV_MUX_PIN(usi5_cs3_b, 148, USI5_CS3_B);
  1023. EMEV_MUX_PIN(usi5_cs4_b, 149, USI5_CS4_B);
  1024. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1025. SH_PFC_PIN_GROUP(err_rst_reqb),
  1026. SH_PFC_PIN_GROUP(ref_clko),
  1027. SH_PFC_PIN_GROUP(ext_clki),
  1028. SH_PFC_PIN_GROUP(lowpwr),
  1029. SH_PFC_PIN_GROUP(ab_main),
  1030. SH_PFC_PIN_GROUP(ab_clk),
  1031. SH_PFC_PIN_GROUP(ab_csb0),
  1032. SH_PFC_PIN_GROUP(ab_csb1),
  1033. SH_PFC_PIN_GROUP(ab_csb2),
  1034. SH_PFC_PIN_GROUP(ab_csb3),
  1035. SH_PFC_PIN_GROUP(ab_wait),
  1036. SH_PFC_PIN_GROUP(ab_adv),
  1037. SH_PFC_PIN_GROUP(ab_a17),
  1038. SH_PFC_PIN_GROUP(ab_a18),
  1039. SH_PFC_PIN_GROUP(ab_a19),
  1040. SH_PFC_PIN_GROUP(ab_a20),
  1041. SH_PFC_PIN_GROUP(ab_a21),
  1042. SH_PFC_PIN_GROUP(ab_a22),
  1043. SH_PFC_PIN_GROUP(ab_a23),
  1044. SH_PFC_PIN_GROUP(ab_a24),
  1045. SH_PFC_PIN_GROUP(ab_a25),
  1046. SH_PFC_PIN_GROUP(ab_a26),
  1047. SH_PFC_PIN_GROUP(ab_a27),
  1048. SH_PFC_PIN_GROUP(ab_a28),
  1049. SH_PFC_PIN_GROUP(ab_ben0),
  1050. SH_PFC_PIN_GROUP(ab_ben1),
  1051. SH_PFC_PIN_GROUP(cam_clko),
  1052. SH_PFC_PIN_GROUP(cam),
  1053. SH_PFC_PIN_GROUP(cf_ctrl),
  1054. SH_PFC_PIN_GROUP(cf_data8),
  1055. SH_PFC_PIN_GROUP(cf_data16),
  1056. SH_PFC_PIN_GROUP(dtv_a),
  1057. SH_PFC_PIN_GROUP(dtv_b),
  1058. SH_PFC_PIN_GROUP(iic0),
  1059. SH_PFC_PIN_GROUP(iic1),
  1060. SH_PFC_PIN_GROUP(jtag),
  1061. SH_PFC_PIN_GROUP(lcd3_pxclk),
  1062. SH_PFC_PIN_GROUP(lcd3_pxclkb),
  1063. SH_PFC_PIN_GROUP(lcd3_clk_i),
  1064. SH_PFC_PIN_GROUP(lcd3_sync),
  1065. SH_PFC_PIN_GROUP(lcd3_rgb888),
  1066. SH_PFC_PIN_GROUP(yuv3_clk_i),
  1067. SH_PFC_PIN_GROUP(yuv3),
  1068. SH_PFC_PIN_GROUP(ntsc_clk),
  1069. SH_PFC_PIN_GROUP(ntsc_data),
  1070. SH_PFC_PIN_GROUP(pwm0),
  1071. SH_PFC_PIN_GROUP(pwm1),
  1072. SH_PFC_PIN_GROUP(sd_cki),
  1073. SH_PFC_PIN_GROUP(sdi0_ctrl),
  1074. SH_PFC_PIN_GROUP(sdi0_data1),
  1075. SH_PFC_PIN_GROUP(sdi0_data4),
  1076. SH_PFC_PIN_GROUP(sdi0_data8),
  1077. SH_PFC_PIN_GROUP(sdi1_ctrl),
  1078. SH_PFC_PIN_GROUP(sdi1_data1),
  1079. SH_PFC_PIN_GROUP(sdi1_data4),
  1080. SH_PFC_PIN_GROUP(sdi2_ctrl),
  1081. SH_PFC_PIN_GROUP(sdi2_data1),
  1082. SH_PFC_PIN_GROUP(sdi2_data4),
  1083. SH_PFC_PIN_GROUP(tp33),
  1084. SH_PFC_PIN_GROUP(uart1_data),
  1085. SH_PFC_PIN_GROUP(uart1_ctrl),
  1086. SH_PFC_PIN_GROUP(uart2_data),
  1087. SH_PFC_PIN_GROUP(uart3_data),
  1088. SH_PFC_PIN_GROUP(usb_vbus),
  1089. SH_PFC_PIN_GROUP(usi0_cs1),
  1090. SH_PFC_PIN_GROUP(usi0_cs2),
  1091. SH_PFC_PIN_GROUP(usi0_cs3),
  1092. SH_PFC_PIN_GROUP(usi0_cs4),
  1093. SH_PFC_PIN_GROUP(usi0_cs5),
  1094. SH_PFC_PIN_GROUP(usi0_cs6),
  1095. SH_PFC_PIN_GROUP(usi1),
  1096. SH_PFC_PIN_GROUP(usi2),
  1097. SH_PFC_PIN_GROUP(usi2_cs0),
  1098. SH_PFC_PIN_GROUP(usi2_cs1),
  1099. SH_PFC_PIN_GROUP(usi2_cs2),
  1100. SH_PFC_PIN_GROUP(usi3),
  1101. SH_PFC_PIN_GROUP(usi3_cs0),
  1102. SH_PFC_PIN_GROUP(usi4),
  1103. SH_PFC_PIN_GROUP(usi4_cs0),
  1104. SH_PFC_PIN_GROUP(usi4_cs1),
  1105. SH_PFC_PIN_GROUP(usi5_a),
  1106. SH_PFC_PIN_GROUP(usi5_cs0_a),
  1107. SH_PFC_PIN_GROUP(usi5_cs1_a),
  1108. SH_PFC_PIN_GROUP(usi5_cs2_a),
  1109. SH_PFC_PIN_GROUP(usi5_b),
  1110. SH_PFC_PIN_GROUP(usi5_cs0_b),
  1111. SH_PFC_PIN_GROUP(usi5_cs1_b),
  1112. SH_PFC_PIN_GROUP(usi5_cs2_b),
  1113. SH_PFC_PIN_GROUP(usi5_cs3_b),
  1114. SH_PFC_PIN_GROUP(usi5_cs4_b),
  1115. };
  1116. static const char * const ab_groups[] = {
  1117. "ab_main",
  1118. "ab_clk",
  1119. "ab_csb0",
  1120. "ab_csb1",
  1121. "ab_csb2",
  1122. "ab_csb3",
  1123. "ab_wait",
  1124. "ab_adv",
  1125. "ab_a17",
  1126. "ab_a18",
  1127. "ab_a19",
  1128. "ab_a20",
  1129. "ab_a21",
  1130. "ab_a22",
  1131. "ab_a23",
  1132. "ab_a24",
  1133. "ab_a25",
  1134. "ab_a26",
  1135. "ab_a27",
  1136. "ab_a28",
  1137. "ab_ben0",
  1138. "ab_ben1",
  1139. };
  1140. static const char * const cam_groups[] = {
  1141. "cam_clko",
  1142. "cam",
  1143. };
  1144. static const char * const cf_groups[] = {
  1145. "cf_ctrl",
  1146. "cf_data8",
  1147. "cf_data16",
  1148. };
  1149. static const char * const dtv_groups[] = {
  1150. "dtv_a",
  1151. "dtv_b",
  1152. };
  1153. static const char * const iic0_groups[] = {
  1154. "iic0",
  1155. };
  1156. static const char * const iic1_groups[] = {
  1157. "iic1",
  1158. };
  1159. static const char * const jtag_groups[] = {
  1160. "jtag",
  1161. };
  1162. static const char * const lcd_groups[] = {
  1163. "lcd3_pxclk",
  1164. "lcd3_pxclkb",
  1165. "lcd3_clk_i",
  1166. "lcd3_sync",
  1167. "lcd3_rgb888",
  1168. "yuv3_clk_i",
  1169. "yuv3",
  1170. };
  1171. static const char * const ntsc_groups[] = {
  1172. "ntsc_clk",
  1173. "ntsc_data",
  1174. };
  1175. static const char * const pwm0_groups[] = {
  1176. "pwm0",
  1177. };
  1178. static const char * const pwm1_groups[] = {
  1179. "pwm1",
  1180. };
  1181. static const char * const sd_groups[] = {
  1182. "sd_cki",
  1183. };
  1184. static const char * const sdi0_groups[] = {
  1185. "sdi0_ctrl",
  1186. "sdi0_data1",
  1187. "sdi0_data4",
  1188. "sdi0_data8",
  1189. };
  1190. static const char * const sdi1_groups[] = {
  1191. "sdi1_ctrl",
  1192. "sdi1_data1",
  1193. "sdi1_data4",
  1194. };
  1195. static const char * const sdi2_groups[] = {
  1196. "sdi2_ctrl",
  1197. "sdi2_data1",
  1198. "sdi2_data4",
  1199. };
  1200. static const char * const tp33_groups[] = {
  1201. "tp33",
  1202. };
  1203. static const char * const uart1_groups[] = {
  1204. "uart1_data",
  1205. "uart1_ctrl",
  1206. };
  1207. static const char * const uart2_groups[] = {
  1208. "uart2_data",
  1209. };
  1210. static const char * const uart3_groups[] = {
  1211. "uart3_data",
  1212. };
  1213. static const char * const usb_groups[] = {
  1214. "usb_vbus",
  1215. };
  1216. static const char * const usi0_groups[] = {
  1217. "usi0_cs1",
  1218. "usi0_cs2",
  1219. "usi0_cs3",
  1220. "usi0_cs4",
  1221. "usi0_cs5",
  1222. "usi0_cs6",
  1223. };
  1224. static const char * const usi1_groups[] = {
  1225. "usi1",
  1226. };
  1227. static const char * const usi2_groups[] = {
  1228. "usi2",
  1229. "usi2_cs0",
  1230. "usi2_cs1",
  1231. "usi2_cs2",
  1232. };
  1233. static const char * const usi3_groups[] = {
  1234. "usi3",
  1235. "usi3_cs0",
  1236. };
  1237. static const char * const usi4_groups[] = {
  1238. "usi4",
  1239. "usi4_cs0",
  1240. "usi4_cs1",
  1241. };
  1242. static const char * const usi5_groups[] = {
  1243. "usi5_a",
  1244. "usi5_cs0_a",
  1245. "usi5_cs1_a",
  1246. "usi5_cs2_a",
  1247. "usi5_b",
  1248. "usi5_cs0_b",
  1249. "usi5_cs1_b",
  1250. "usi5_cs2_b",
  1251. "usi5_cs3_b",
  1252. "usi5_cs4_b",
  1253. };
  1254. static const struct sh_pfc_function pinmux_functions[] = {
  1255. SH_PFC_FUNCTION(ab),
  1256. SH_PFC_FUNCTION(cam),
  1257. SH_PFC_FUNCTION(cf),
  1258. SH_PFC_FUNCTION(dtv),
  1259. SH_PFC_FUNCTION(iic0),
  1260. SH_PFC_FUNCTION(iic1),
  1261. SH_PFC_FUNCTION(jtag),
  1262. SH_PFC_FUNCTION(lcd),
  1263. SH_PFC_FUNCTION(ntsc),
  1264. SH_PFC_FUNCTION(pwm0),
  1265. SH_PFC_FUNCTION(pwm1),
  1266. SH_PFC_FUNCTION(sd),
  1267. SH_PFC_FUNCTION(sdi0),
  1268. SH_PFC_FUNCTION(sdi1),
  1269. SH_PFC_FUNCTION(sdi2),
  1270. SH_PFC_FUNCTION(tp33),
  1271. SH_PFC_FUNCTION(uart1),
  1272. SH_PFC_FUNCTION(uart2),
  1273. SH_PFC_FUNCTION(uart3),
  1274. SH_PFC_FUNCTION(usb),
  1275. SH_PFC_FUNCTION(usi0),
  1276. SH_PFC_FUNCTION(usi1),
  1277. SH_PFC_FUNCTION(usi2),
  1278. SH_PFC_FUNCTION(usi3),
  1279. SH_PFC_FUNCTION(usi4),
  1280. SH_PFC_FUNCTION(usi5),
  1281. };
  1282. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  1283. { PINMUX_CFG_REG("GPSR0", 0xe0140200, 32, 1) {
  1284. 0, PORT31_FN, /* PIN: J18 */
  1285. 0, PORT30_FN, /* PIN: H18 */
  1286. 0, PORT29_FN, /* PIN: G18 */
  1287. 0, PORT28_FN, /* PIN: F18 */
  1288. 0, PORT27_FN, /* PIN: F17 */
  1289. 0, PORT26_FN, /* PIN: F16 */
  1290. 0, PORT25_FN, /* PIN: E20 */
  1291. 0, PORT24_FN, /* PIN: D20 */
  1292. FN_LCD3_1_0_PORT23, PORT23_FN, /* PIN: D19 */
  1293. FN_LCD3_1_0_PORT22, PORT22_FN, /* PIN: C20 */
  1294. FN_LCD3_1_0_PORT21, PORT21_FN, /* PIN: B21 */
  1295. FN_LCD3_1_0_PORT20, PORT20_FN, /* PIN: A21 */
  1296. FN_LCD3_PXCLKB, PORT19_FN, /* PIN: C21 */
  1297. FN_LCD3_1_0_PORT18, PORT18_FN, /* PIN: B22 */
  1298. 0, PORT17_FN, /* PIN: W20 */
  1299. 0, PORT16_FN, /* PIN: W21 */
  1300. 0, PORT15_FN, /* PIN: Y19 */
  1301. 0, PORT14_FN, /* PIN: Y20 */
  1302. 0, PORT13_FN, /* PIN: Y21 */
  1303. 0, PORT12_FN, /* PIN: AA20 */
  1304. 0, PORT11_FN, /* PIN: AA21 */
  1305. 0, PORT10_FN, /* PIN: AA22 */
  1306. 0, PORT9_FN, /* PIN: V15 */
  1307. 0, PORT8_FN, /* PIN: V16 */
  1308. 0, PORT7_FN, /* PIN: V17 */
  1309. 0, PORT6_FN, /* PIN: V18 */
  1310. FN_EXT_CLKI, PORT5_FN, /* PIN: U8 */
  1311. FN_REF_CLKO, PORT4_FN, /* PIN: V8 */
  1312. FN_ERR_RST_REQB, PORT3_FN, /* PIN: U9 */
  1313. FN_JT_SEL, PORT2_FN, /* PIN: V9 */
  1314. 0, PORT1_FN, /* PIN: U10 */
  1315. 0, PORT0_FN, /* PIN: V10 */
  1316. }
  1317. },
  1318. { PINMUX_CFG_REG("GPSR1", 0xe0140204, 32, 1) {
  1319. FN_SDI1_CMD, PORT63_FN, /* PIN: AC21 */
  1320. FN_SDI1_CKI, PORT62_FN, /* PIN: AA23 */
  1321. FN_SDI1_CKO, PORT61_FN, /* PIN: AB22 */
  1322. FN_SDI0_DATA7, PORT60_FN, /* PIN: Y16 */
  1323. FN_SDI0_DATA6, PORT59_FN, /* PIN: AA16 */
  1324. FN_SDI0_DATA5, PORT58_FN, /* PIN: Y15 */
  1325. FN_SDI0_DATA4, PORT57_FN, /* PIN: AA15 */
  1326. FN_SDI0_DATA3, PORT56_FN, /* PIN: Y14 */
  1327. FN_SDI0_DATA2, PORT55_FN, /* PIN: AA14 */
  1328. FN_SDI0_DATA1, PORT54_FN, /* PIN: Y13 */
  1329. FN_SDI0_DATA0, PORT53_FN, /* PIN: AA13 */
  1330. FN_SDI0_CMD, PORT52_FN, /* PIN: Y12 */
  1331. FN_SDI0_CKI, PORT51_FN, /* PIN: AC18 */
  1332. FN_SDI0_CKO, PORT50_FN, /* PIN: AB18 */
  1333. 0, PORT49_FN, /* PIN: AB16 */
  1334. FN_SD_CKI, PORT48_FN, /* PIN: AC19 */
  1335. FN_IIC_1_0_PORT47, PORT47_FN, /* PIN: Y8 */
  1336. FN_IIC_1_0_PORT46, PORT46_FN, /* PIN: Y9 */
  1337. FN_IIC0_SDA, PORT45_FN, /* PIN: AA8 */
  1338. FN_IIC0_SCL, PORT44_FN, /* PIN: AA9 */
  1339. FN_LCD3_11_10_PORT43, PORT43_FN, /* PIN: A15 */
  1340. FN_LCD3_11_10_PORT42, PORT42_FN, /* PIN: A16 */
  1341. FN_LCD3_11_10_PORT41, PORT41_FN, /* PIN: A17 */
  1342. FN_LCD3_11_10_PORT40, PORT40_FN, /* PIN: A18 */
  1343. FN_LCD3_9_8_PORT39, PORT39_FN, /* PIN: D18 */
  1344. FN_LCD3_9_8_PORT38, PORT38_FN, /* PIN: C18 */
  1345. FN_LCD3_R5, PORT37_FN, /* PIN: B18 */
  1346. FN_LCD3_R4, PORT36_FN, /* PIN: C19 */
  1347. FN_LCD3_R3, PORT35_FN, /* PIN: B19 */
  1348. FN_LCD3_R2, PORT34_FN, /* PIN: A19 */
  1349. FN_LCD3_R1, PORT33_FN, /* PIN: B20 */
  1350. FN_LCD3_R0, PORT32_FN, /* PIN: A20 */
  1351. }
  1352. },
  1353. { PINMUX_CFG_REG("GPSR2", 0xe0140208, 32, 1) {
  1354. FN_AB_1_0_PORT95, PORT95_FN, /* PIN: L21 */
  1355. FN_AB_1_0_PORT94, PORT94_FN, /* PIN: K21 */
  1356. FN_AB_1_0_PORT93, PORT93_FN, /* PIN: J21 */
  1357. FN_AB_7_6_PORT92, PORT92_FN, /* PIN: J22 */
  1358. FN_AB_7_6_PORT91, PORT91_FN, /* PIN: H21 */
  1359. FN_AB_5_4_PORT90, PORT90_FN, /* PIN: H22 */
  1360. FN_AB_5_4_PORT89, PORT89_FN, /* PIN: H23 */
  1361. FN_AB_3_2_PORT88, PORT88_FN, /* PIN: G21 */
  1362. FN_AB_3_2_PORT87, PORT87_FN, /* PIN: G22 */
  1363. FN_AB_3_2_PORT86, PORT86_FN, /* PIN: G23 */
  1364. FN_AB_3_2_PORT85, PORT85_FN, /* PIN: F21 */
  1365. FN_AB_1_0_PORT84, PORT84_FN, /* PIN: F22 */
  1366. FN_AB_1_0_PORT83, PORT83_FN, /* PIN: F23 */
  1367. FN_AB_1_0_PORT82, PORT82_FN, /* PIN: E22 */
  1368. FN_AB_1_0_PORT81, PORT81_FN, /* PIN: E23 */
  1369. FN_AB_1_0_PORT80, PORT80_FN, /* PIN: D22 */
  1370. FN_AB_1_0_PORT79, PORT79_FN, /* PIN: D23 */
  1371. FN_AB_1_0_PORT78, PORT78_FN, /* PIN: C22 */
  1372. FN_AB_1_0_PORT77, PORT77_FN, /* PIN: C23 */
  1373. FN_AB_1_0_PORT76, PORT76_FN, /* PIN: K20 */
  1374. FN_AB_1_0_PORT75, PORT75_FN, /* PIN: L20 */
  1375. FN_AB_1_0_PORT74, PORT74_FN, /* PIN: H20 */
  1376. FN_AB_1_0_PORT73, PORT73_FN, /* PIN: J20 */
  1377. FN_AB_1_0_PORT72, PORT72_FN, /* PIN: G20 */
  1378. FN_AB_1_0_PORT71, PORT71_FN, /* PIN: F20 */
  1379. FN_AB_CSB1, PORT70_FN, /* PIN: E21 */
  1380. FN_AB_CSB0, PORT69_FN, /* PIN: D21 */
  1381. FN_AB_CLK, PORT68_FN, /* PIN: J23 */
  1382. FN_SDI1_DATA3, PORT67_FN, /* PIN: AA19 */
  1383. FN_SDI1_DATA2, PORT66_FN, /* PIN: AB19 */
  1384. FN_SDI1_DATA1, PORT65_FN, /* PIN: AB20 */
  1385. FN_SDI1_DATA0, PORT64_FN, /* PIN: AB21 */
  1386. }
  1387. },
  1388. { PINMUX_CFG_REG("GPSR3", 0xe014020c, 32, 1) {
  1389. FN_NTSC_DATA4, PORT127_FN, /* PIN: T20 */
  1390. FN_NTSC_DATA3, PORT126_FN, /* PIN: R18 */
  1391. FN_NTSC_DATA2, PORT125_FN, /* PIN: R20 */
  1392. FN_NTSC_DATA1, PORT124_FN, /* PIN: P18 */
  1393. FN_NTSC_DATA0, PORT123_FN, /* PIN: P20 */
  1394. FN_NTSC_CLK, PORT122_FN, /* PIN: V20 */
  1395. FN_USI_9_8_PORT121, PORT121_FN, /* PIN: Y5 */
  1396. FN_USI_9_8_PORT120, PORT120_FN, /* PIN: AA4 */
  1397. FN_USI_7_6_PORT119, PORT119_FN, /* PIN: AB3 */
  1398. FN_USI_5_4_PORT118, PORT118_FN, /* PIN: AB4 */
  1399. FN_USI_5_4_PORT117, PORT117_FN, /* PIN: AC3 */
  1400. FN_USI_5_4_PORT116, PORT116_FN, /* PIN: AC4 */
  1401. FN_USI_5_4_PORT115, PORT115_FN, /* PIN: AC5 */
  1402. FN_USI_3_2_PORT114, PORT114_FN, /* PIN: Y6 */
  1403. FN_USI_3_2_PORT113, PORT113_FN, /* PIN: AA7 */
  1404. FN_USI_1_0_PORT112, PORT112_FN, /* PIN: Y7 */
  1405. FN_USI_1_0_PORT111, PORT111_FN, /* PIN: AA5 */
  1406. FN_USI_1_0_PORT110, PORT110_FN, /* PIN: AA6 */
  1407. FN_USI_1_0_PORT109, PORT109_FN, /* PIN: AB5 */
  1408. FN_USI1_DO, PORT108_FN, /* PIN: D10 */
  1409. FN_USI1_DI, PORT107_FN, /* PIN: C10 */
  1410. FN_USI0_CS2, PORT106_FN, /* PIN: B9 */
  1411. FN_USI0_CS1, PORT105_FN, /* PIN: B8 */
  1412. FN_AB_13_12_PORT104, PORT104_FN, /* PIN: M17 */
  1413. FN_AB_13_12_PORT103, PORT103_FN, /* PIN: L17 */
  1414. FN_AB_11_10_PORT102, PORT102_FN, /* PIN: N18 */
  1415. FN_AB_11_10_PORT101, PORT101_FN, /* PIN: M18 */
  1416. FN_AB_11_10_PORT100, PORT100_FN, /* PIN: L18 */
  1417. FN_AB_9_8_PORT99, PORT99_FN, /* PIN: N20 */
  1418. FN_AB_9_8_PORT98, PORT98_FN, /* PIN: M20 */
  1419. FN_AB_9_8_PORT97, PORT97_FN, /* PIN: N21 */
  1420. FN_AB_A20, PORT96_FN, /* PIN: M21 */
  1421. }
  1422. },
  1423. { PINMUX_CFG_REG("GPSR4", 0xe0140210, 32, 1) {
  1424. 0, 0,
  1425. FN_UART_1_0_PORT158, PORT158_FN, /* PIN: AB10 */
  1426. FN_UART_1_0_PORT157, PORT157_FN, /* PIN: AA10 */
  1427. FN_UART1_TX, PORT156_FN, /* PIN: Y10 */
  1428. FN_UART1_RX, PORT155_FN, /* PIN: Y11 */
  1429. FN_LOWPWR, PORT154_FN, /* PIN: A12 */
  1430. FN_USB_VBUS, PORT153_FN, /* PIN: AA12 */
  1431. FN_JT_TDOEN, PORT152_FN, /* PIN: F13 */
  1432. FN_JT_TDO, PORT151_FN, /* PIN: D13 */
  1433. FN_HSI_1_0_PORT150, PORT150_FN, /* PIN: M22 */
  1434. FN_HSI_1_0_PORT149, PORT149_FN, /* PIN: M23 */
  1435. FN_HSI_1_0_PORT148, PORT148_FN, /* PIN: N23 */
  1436. FN_HSI_1_0_PORT147, PORT147_FN, /* PIN: N22 */
  1437. FN_HSI_1_0_PORT146, PORT146_FN, /* PIN: L22 */
  1438. FN_HSI_1_0_PORT145, PORT145_FN, /* PIN: L23 */
  1439. FN_HSI_1_0_PORT144, PORT144_FN, /* PIN: K23 */
  1440. FN_HSI_1_0_PORT143, PORT143_FN, /* PIN: K22 */
  1441. FN_CAM_YUV7, PORT142_FN, /* PIN: V23 */
  1442. FN_CAM_YUV6, PORT141_FN, /* PIN: V22 */
  1443. FN_CAM_YUV5, PORT140_FN, /* PIN: U23 */
  1444. FN_CAM_YUV4, PORT139_FN, /* PIN: U22 */
  1445. FN_CAM_YUV3, PORT138_FN, /* PIN: U21 */
  1446. FN_CAM_YUV2, PORT137_FN, /* PIN: T23 */
  1447. FN_CAM_YUV1, PORT136_FN, /* PIN: T22 */
  1448. FN_CAM_YUV0, PORT135_FN, /* PIN: T21 */
  1449. FN_CAM_HS, PORT134_FN, /* PIN: V21 */
  1450. FN_CAM_VS, PORT133_FN, /* PIN: W22 */
  1451. FN_CAM_CLKI, PORT132_FN, /* PIN: Y23 */
  1452. FN_CAM_CLKO, PORT131_FN, /* PIN: W23 */
  1453. FN_NTSC_DATA7, PORT130_FN, /* PIN: U18 */
  1454. FN_NTSC_DATA6, PORT129_FN, /* PIN: U20 */
  1455. FN_NTSC_DATA5, PORT128_FN, /* PIN: T18 */
  1456. }
  1457. },
  1458. { PINMUX_CFG_REG_VAR("CHG_PINSEL_LCD3", 0xe0140284, 32,
  1459. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1460. 1, 1, 1, 1, 2, 2, 2, 2, 2, 2) {
  1461. /* 31 - 12 */
  1462. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1463. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1464. 0, 0, 0, 0, 0, 0, 0, 0,
  1465. /* 11 - 10 */
  1466. FN_SEL_LCD3_11_10_00, FN_SEL_LCD3_11_10_01,
  1467. FN_SEL_LCD3_11_10_10, 0,
  1468. /* 9 - 8 */
  1469. FN_SEL_LCD3_9_8_00, 0, FN_SEL_LCD3_9_8_10, 0,
  1470. /* 7 - 2 */
  1471. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1472. /* 1 - 0 */
  1473. FN_SEL_LCD3_1_0_00, FN_SEL_LCD3_1_0_01, 0, 0,
  1474. }
  1475. },
  1476. { PINMUX_CFG_REG_VAR("CHG_PINSEL_UART", 0xe0140288, 32,
  1477. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1478. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) {
  1479. /* 31 - 2 */
  1480. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1481. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1482. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1483. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1484. /* 1 - 0 */
  1485. FN_SEL_UART_1_0_00, FN_SEL_UART_1_0_01, 0, 0,
  1486. }
  1487. },
  1488. { PINMUX_CFG_REG_VAR("CHG_PINSEL_IIC", 0xe014028c, 32,
  1489. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1490. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) {
  1491. /* 31 - 2 */
  1492. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1493. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1494. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1495. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1496. /* 1 - 0 */
  1497. FN_SEL_IIC_1_0_00, FN_SEL_IIC_1_0_01, 0, 0,
  1498. }
  1499. },
  1500. { PINMUX_CFG_REG_VAR("CHG_PINSEL_AB", 0xe0140294, 32,
  1501. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1502. 2, 2, 2, 2, 2, 2, 2, 2) {
  1503. /* 31 - 14 */
  1504. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1505. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1506. 0, 0, 0, 0,
  1507. /* 13 - 12 */
  1508. FN_SEL_AB_13_12_00, 0, FN_SEL_AB_13_12_10, 0,
  1509. /* 11 - 10 */
  1510. FN_SEL_AB_11_10_00, 0, FN_SEL_AB_11_10_10, 0,
  1511. /* 9 - 8 */
  1512. FN_SEL_AB_9_8_00, FN_SEL_AB_9_8_01, FN_SEL_AB_9_8_10, 0,
  1513. /* 7 - 6 */
  1514. FN_SEL_AB_7_6_00, FN_SEL_AB_7_6_01, FN_SEL_AB_7_6_10, 0,
  1515. /* 5 - 4 */
  1516. FN_SEL_AB_5_4_00, FN_SEL_AB_5_4_01,
  1517. FN_SEL_AB_5_4_10, FN_SEL_AB_5_4_11,
  1518. /* 3 - 2 */
  1519. FN_SEL_AB_3_2_00, FN_SEL_AB_3_2_01,
  1520. FN_SEL_AB_3_2_10, FN_SEL_AB_3_2_11,
  1521. /* 1 - 0 */
  1522. FN_SEL_AB_1_0_00, 0, FN_SEL_AB_1_0_10, 0,
  1523. }
  1524. },
  1525. { PINMUX_CFG_REG_VAR("CHG_PINSEL_USI", 0xe0140298, 32,
  1526. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1527. 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2) {
  1528. /* 31 - 10 */
  1529. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1530. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1531. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1532. /* 9 - 8 */
  1533. FN_SEL_USI_9_8_00, FN_SEL_USI_9_8_01, 0, 0,
  1534. /* 7 - 6 */
  1535. FN_SEL_USI_7_6_00, FN_SEL_USI_7_6_01, 0, 0,
  1536. /* 5 - 4 */
  1537. FN_SEL_USI_5_4_00, FN_SEL_USI_5_4_01, 0, 0,
  1538. /* 3 - 2 */
  1539. FN_SEL_USI_3_2_00, FN_SEL_USI_3_2_01, 0, 0,
  1540. /* 1 - 0 */
  1541. FN_SEL_USI_1_0_00, FN_SEL_USI_1_0_01, 0, 0,
  1542. }
  1543. },
  1544. { PINMUX_CFG_REG_VAR("CHG_PINSEL_HSI", 0xe01402a8, 32,
  1545. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1546. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) {
  1547. /* 31 - 2 */
  1548. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1549. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1550. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1551. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1552. /* 1 - 0 */
  1553. FN_SEL_HSI_1_0_00, FN_SEL_HSI_1_0_01, 0, 0,
  1554. }
  1555. },
  1556. { },
  1557. };
  1558. const struct sh_pfc_soc_info emev2_pinmux_info = {
  1559. .name = "emev2_pfc",
  1560. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  1561. .pins = pinmux_pins,
  1562. .nr_pins = ARRAY_SIZE(pinmux_pins),
  1563. .groups = pinmux_groups,
  1564. .nr_groups = ARRAY_SIZE(pinmux_groups),
  1565. .functions = pinmux_functions,
  1566. .nr_functions = ARRAY_SIZE(pinmux_functions),
  1567. .cfg_regs = pinmux_config_regs,
  1568. .pinmux_data = pinmux_data,
  1569. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  1570. };