mux.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. /*
  2. * Table of the DAVINCI register configurations for the PINMUX combinations
  3. *
  4. * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
  5. *
  6. * Based on linux/include/asm-arm/arch-omap/mux.h:
  7. * Copyright (C) 2003 - 2005 Nokia Corporation
  8. *
  9. * Written by Tony Lindgren
  10. *
  11. * 2007 (c) MontaVista Software, Inc. This file is licensed under
  12. * the terms of the GNU General Public License version 2. This program
  13. * is licensed "as is" without any warranty of any kind, whether express
  14. * or implied.
  15. *
  16. * Copyright (C) 2008 Texas Instruments.
  17. */
  18. #ifndef __INC_MACH_MUX_H
  19. #define __INC_MACH_MUX_H
  20. struct mux_config {
  21. const char *name;
  22. const char *mux_reg_name;
  23. const unsigned char mux_reg;
  24. const unsigned char mask_offset;
  25. const unsigned char mask;
  26. const unsigned char mode;
  27. bool debug;
  28. };
  29. enum davinci_dm644x_index {
  30. /* ATA and HDDIR functions */
  31. DM644X_HDIREN,
  32. DM644X_ATAEN,
  33. DM644X_ATAEN_DISABLE,
  34. /* HPI functions */
  35. DM644X_HPIEN_DISABLE,
  36. /* AEAW functions */
  37. DM644X_AEAW,
  38. DM644X_AEAW0,
  39. DM644X_AEAW1,
  40. DM644X_AEAW2,
  41. DM644X_AEAW3,
  42. DM644X_AEAW4,
  43. /* Memory Stick */
  44. DM644X_MSTK,
  45. /* I2C */
  46. DM644X_I2C,
  47. /* ASP function */
  48. DM644X_MCBSP,
  49. /* UART1 */
  50. DM644X_UART1,
  51. /* UART2 */
  52. DM644X_UART2,
  53. /* PWM0 */
  54. DM644X_PWM0,
  55. /* PWM1 */
  56. DM644X_PWM1,
  57. /* PWM2 */
  58. DM644X_PWM2,
  59. /* VLYNQ function */
  60. DM644X_VLYNQEN,
  61. DM644X_VLSCREN,
  62. DM644X_VLYNQWD,
  63. /* EMAC and MDIO function */
  64. DM644X_EMACEN,
  65. /* GPIO3V[0:16] pins */
  66. DM644X_GPIO3V,
  67. /* GPIO pins */
  68. DM644X_GPIO0,
  69. DM644X_GPIO3,
  70. DM644X_GPIO43_44,
  71. DM644X_GPIO46_47,
  72. /* VPBE */
  73. DM644X_RGB666,
  74. /* LCD */
  75. DM644X_LOEEN,
  76. DM644X_LFLDEN,
  77. };
  78. enum davinci_dm646x_index {
  79. /* ATA function */
  80. DM646X_ATAEN,
  81. /* AUDIO Clock */
  82. DM646X_AUDCK1,
  83. DM646X_AUDCK0,
  84. /* CRGEN Control */
  85. DM646X_CRGMUX,
  86. /* VPIF Control */
  87. DM646X_STSOMUX_DISABLE,
  88. DM646X_STSIMUX_DISABLE,
  89. DM646X_PTSOMUX_DISABLE,
  90. DM646X_PTSIMUX_DISABLE,
  91. /* TSIF Control */
  92. DM646X_STSOMUX,
  93. DM646X_STSIMUX,
  94. DM646X_PTSOMUX_PARALLEL,
  95. DM646X_PTSIMUX_PARALLEL,
  96. DM646X_PTSOMUX_SERIAL,
  97. DM646X_PTSIMUX_SERIAL,
  98. };
  99. enum davinci_dm355_index {
  100. /* MMC/SD 0 */
  101. DM355_MMCSD0,
  102. /* MMC/SD 1 */
  103. DM355_SD1_CLK,
  104. DM355_SD1_CMD,
  105. DM355_SD1_DATA3,
  106. DM355_SD1_DATA2,
  107. DM355_SD1_DATA1,
  108. DM355_SD1_DATA0,
  109. /* I2C */
  110. DM355_I2C_SDA,
  111. DM355_I2C_SCL,
  112. /* ASP0 function */
  113. DM355_MCBSP0_BDX,
  114. DM355_MCBSP0_X,
  115. DM355_MCBSP0_BFSX,
  116. DM355_MCBSP0_BDR,
  117. DM355_MCBSP0_R,
  118. DM355_MCBSP0_BFSR,
  119. /* SPI0 */
  120. DM355_SPI0_SDI,
  121. DM355_SPI0_SDENA0,
  122. DM355_SPI0_SDENA1,
  123. /* IRQ muxing */
  124. DM355_INT_EDMA_CC,
  125. DM355_INT_EDMA_TC0_ERR,
  126. DM355_INT_EDMA_TC1_ERR,
  127. /* EDMA event muxing */
  128. DM355_EVT8_ASP1_TX,
  129. DM355_EVT9_ASP1_RX,
  130. DM355_EVT26_MMC0_RX,
  131. /* Video Out */
  132. DM355_VOUT_FIELD,
  133. DM355_VOUT_FIELD_G70,
  134. DM355_VOUT_HVSYNC,
  135. DM355_VOUT_COUTL_EN,
  136. DM355_VOUT_COUTH_EN,
  137. /* Video In Pin Mux */
  138. DM355_VIN_PCLK,
  139. DM355_VIN_CAM_WEN,
  140. DM355_VIN_CAM_VD,
  141. DM355_VIN_CAM_HD,
  142. DM355_VIN_YIN_EN,
  143. DM355_VIN_CINL_EN,
  144. DM355_VIN_CINH_EN,
  145. };
  146. enum davinci_dm365_index {
  147. /* MMC/SD 0 */
  148. DM365_MMCSD0,
  149. /* MMC/SD 1 */
  150. DM365_SD1_CLK,
  151. DM365_SD1_CMD,
  152. DM365_SD1_DATA3,
  153. DM365_SD1_DATA2,
  154. DM365_SD1_DATA1,
  155. DM365_SD1_DATA0,
  156. /* I2C */
  157. DM365_I2C_SDA,
  158. DM365_I2C_SCL,
  159. /* AEMIF */
  160. DM365_AEMIF_AR_A14,
  161. DM365_AEMIF_AR_BA0,
  162. DM365_AEMIF_A3,
  163. DM365_AEMIF_A7,
  164. DM365_AEMIF_D15_8,
  165. DM365_AEMIF_CE0,
  166. DM365_AEMIF_CE1,
  167. DM365_AEMIF_WE_OE,
  168. /* ASP0 function */
  169. DM365_MCBSP0_BDX,
  170. DM365_MCBSP0_X,
  171. DM365_MCBSP0_BFSX,
  172. DM365_MCBSP0_BDR,
  173. DM365_MCBSP0_R,
  174. DM365_MCBSP0_BFSR,
  175. /* SPI0 */
  176. DM365_SPI0_SCLK,
  177. DM365_SPI0_SDI,
  178. DM365_SPI0_SDO,
  179. DM365_SPI0_SDENA0,
  180. DM365_SPI0_SDENA1,
  181. /* UART */
  182. DM365_UART0_RXD,
  183. DM365_UART0_TXD,
  184. DM365_UART1_RXD,
  185. DM365_UART1_TXD,
  186. DM365_UART1_RTS,
  187. DM365_UART1_CTS,
  188. /* EMAC */
  189. DM365_EMAC_TX_EN,
  190. DM365_EMAC_TX_CLK,
  191. DM365_EMAC_COL,
  192. DM365_EMAC_TXD3,
  193. DM365_EMAC_TXD2,
  194. DM365_EMAC_TXD1,
  195. DM365_EMAC_TXD0,
  196. DM365_EMAC_RXD3,
  197. DM365_EMAC_RXD2,
  198. DM365_EMAC_RXD1,
  199. DM365_EMAC_RXD0,
  200. DM365_EMAC_RX_CLK,
  201. DM365_EMAC_RX_DV,
  202. DM365_EMAC_RX_ER,
  203. DM365_EMAC_CRS,
  204. DM365_EMAC_MDIO,
  205. DM365_EMAC_MDCLK,
  206. /* Key Scan */
  207. DM365_KEYSCAN,
  208. /* PWM */
  209. DM365_PWM0,
  210. DM365_PWM0_G23,
  211. DM365_PWM1,
  212. DM365_PWM1_G25,
  213. DM365_PWM2_G87,
  214. DM365_PWM2_G88,
  215. DM365_PWM2_G89,
  216. DM365_PWM2_G90,
  217. DM365_PWM3_G80,
  218. DM365_PWM3_G81,
  219. DM365_PWM3_G85,
  220. DM365_PWM3_G86,
  221. /* SPI1 */
  222. DM365_SPI1_SCLK,
  223. DM365_SPI1_SDO,
  224. DM365_SPI1_SDI,
  225. DM365_SPI1_SDENA0,
  226. DM365_SPI1_SDENA1,
  227. /* SPI2 */
  228. DM365_SPI2_SCLK,
  229. DM365_SPI2_SDO,
  230. DM365_SPI2_SDI,
  231. DM365_SPI2_SDENA0,
  232. DM365_SPI2_SDENA1,
  233. /* SPI3 */
  234. DM365_SPI3_SCLK,
  235. DM365_SPI3_SDO,
  236. DM365_SPI3_SDI,
  237. DM365_SPI3_SDENA0,
  238. DM365_SPI3_SDENA1,
  239. /* SPI4 */
  240. DM365_SPI4_SCLK,
  241. DM365_SPI4_SDO,
  242. DM365_SPI4_SDI,
  243. DM365_SPI4_SDENA0,
  244. DM365_SPI4_SDENA1,
  245. /* Clock */
  246. DM365_CLKOUT0,
  247. DM365_CLKOUT1,
  248. DM365_CLKOUT2,
  249. /* GPIO */
  250. DM365_GPIO20,
  251. DM365_GPIO30,
  252. DM365_GPIO31,
  253. DM365_GPIO32,
  254. DM365_GPIO33,
  255. DM365_GPIO40,
  256. DM365_GPIO64_57,
  257. /* Video */
  258. DM365_VOUT_FIELD,
  259. DM365_VOUT_FIELD_G81,
  260. DM365_VOUT_HVSYNC,
  261. DM365_VOUT_COUTL_EN,
  262. DM365_VOUT_COUTH_EN,
  263. DM365_VIN_CAM_WEN,
  264. DM365_VIN_CAM_VD,
  265. DM365_VIN_CAM_HD,
  266. DM365_VIN_YIN4_7_EN,
  267. DM365_VIN_YIN0_3_EN,
  268. /* IRQ muxing */
  269. DM365_INT_EDMA_CC,
  270. DM365_INT_EDMA_TC0_ERR,
  271. DM365_INT_EDMA_TC1_ERR,
  272. DM365_INT_EDMA_TC2_ERR,
  273. DM365_INT_EDMA_TC3_ERR,
  274. DM365_INT_PRTCSS,
  275. DM365_INT_EMAC_RXTHRESH,
  276. DM365_INT_EMAC_RXPULSE,
  277. DM365_INT_EMAC_TXPULSE,
  278. DM365_INT_EMAC_MISCPULSE,
  279. DM365_INT_IMX0_ENABLE,
  280. DM365_INT_IMX0_DISABLE,
  281. DM365_INT_HDVICP_ENABLE,
  282. DM365_INT_HDVICP_DISABLE,
  283. DM365_INT_IMX1_ENABLE,
  284. DM365_INT_IMX1_DISABLE,
  285. DM365_INT_NSF_ENABLE,
  286. DM365_INT_NSF_DISABLE,
  287. /* EDMA event muxing */
  288. DM365_EVT2_ASP_TX,
  289. DM365_EVT3_ASP_RX,
  290. DM365_EVT2_VC_TX,
  291. DM365_EVT3_VC_RX,
  292. DM365_EVT26_MMC0_RX,
  293. };
  294. enum da830_index {
  295. DA830_GPIO7_14,
  296. DA830_RTCK,
  297. DA830_GPIO7_15,
  298. DA830_EMU_0,
  299. DA830_EMB_SDCKE,
  300. DA830_EMB_CLK_GLUE,
  301. DA830_EMB_CLK,
  302. DA830_NEMB_CS_0,
  303. DA830_NEMB_CAS,
  304. DA830_NEMB_RAS,
  305. DA830_NEMB_WE,
  306. DA830_EMB_BA_1,
  307. DA830_EMB_BA_0,
  308. DA830_EMB_A_0,
  309. DA830_EMB_A_1,
  310. DA830_EMB_A_2,
  311. DA830_EMB_A_3,
  312. DA830_EMB_A_4,
  313. DA830_EMB_A_5,
  314. DA830_GPIO7_0,
  315. DA830_GPIO7_1,
  316. DA830_GPIO7_2,
  317. DA830_GPIO7_3,
  318. DA830_GPIO7_4,
  319. DA830_GPIO7_5,
  320. DA830_GPIO7_6,
  321. DA830_GPIO7_7,
  322. DA830_EMB_A_6,
  323. DA830_EMB_A_7,
  324. DA830_EMB_A_8,
  325. DA830_EMB_A_9,
  326. DA830_EMB_A_10,
  327. DA830_EMB_A_11,
  328. DA830_EMB_A_12,
  329. DA830_EMB_D_31,
  330. DA830_GPIO7_8,
  331. DA830_GPIO7_9,
  332. DA830_GPIO7_10,
  333. DA830_GPIO7_11,
  334. DA830_GPIO7_12,
  335. DA830_GPIO7_13,
  336. DA830_GPIO3_13,
  337. DA830_EMB_D_30,
  338. DA830_EMB_D_29,
  339. DA830_EMB_D_28,
  340. DA830_EMB_D_27,
  341. DA830_EMB_D_26,
  342. DA830_EMB_D_25,
  343. DA830_EMB_D_24,
  344. DA830_EMB_D_23,
  345. DA830_EMB_D_22,
  346. DA830_EMB_D_21,
  347. DA830_EMB_D_20,
  348. DA830_EMB_D_19,
  349. DA830_EMB_D_18,
  350. DA830_EMB_D_17,
  351. DA830_EMB_D_16,
  352. DA830_NEMB_WE_DQM_3,
  353. DA830_NEMB_WE_DQM_2,
  354. DA830_EMB_D_0,
  355. DA830_EMB_D_1,
  356. DA830_EMB_D_2,
  357. DA830_EMB_D_3,
  358. DA830_EMB_D_4,
  359. DA830_EMB_D_5,
  360. DA830_EMB_D_6,
  361. DA830_GPIO6_0,
  362. DA830_GPIO6_1,
  363. DA830_GPIO6_2,
  364. DA830_GPIO6_3,
  365. DA830_GPIO6_4,
  366. DA830_GPIO6_5,
  367. DA830_GPIO6_6,
  368. DA830_EMB_D_7,
  369. DA830_EMB_D_8,
  370. DA830_EMB_D_9,
  371. DA830_EMB_D_10,
  372. DA830_EMB_D_11,
  373. DA830_EMB_D_12,
  374. DA830_EMB_D_13,
  375. DA830_EMB_D_14,
  376. DA830_GPIO6_7,
  377. DA830_GPIO6_8,
  378. DA830_GPIO6_9,
  379. DA830_GPIO6_10,
  380. DA830_GPIO6_11,
  381. DA830_GPIO6_12,
  382. DA830_GPIO6_13,
  383. DA830_GPIO6_14,
  384. DA830_EMB_D_15,
  385. DA830_NEMB_WE_DQM_1,
  386. DA830_NEMB_WE_DQM_0,
  387. DA830_SPI0_SOMI_0,
  388. DA830_SPI0_SIMO_0,
  389. DA830_SPI0_CLK,
  390. DA830_NSPI0_ENA,
  391. DA830_NSPI0_SCS_0,
  392. DA830_EQEP0I,
  393. DA830_EQEP0S,
  394. DA830_EQEP1I,
  395. DA830_NUART0_CTS,
  396. DA830_NUART0_RTS,
  397. DA830_EQEP0A,
  398. DA830_EQEP0B,
  399. DA830_GPIO6_15,
  400. DA830_GPIO5_14,
  401. DA830_GPIO5_15,
  402. DA830_GPIO5_0,
  403. DA830_GPIO5_1,
  404. DA830_GPIO5_2,
  405. DA830_GPIO5_3,
  406. DA830_GPIO5_4,
  407. DA830_SPI1_SOMI_0,
  408. DA830_SPI1_SIMO_0,
  409. DA830_SPI1_CLK,
  410. DA830_UART0_RXD,
  411. DA830_UART0_TXD,
  412. DA830_AXR1_10,
  413. DA830_AXR1_11,
  414. DA830_NSPI1_ENA,
  415. DA830_I2C1_SCL,
  416. DA830_I2C1_SDA,
  417. DA830_EQEP1S,
  418. DA830_I2C0_SDA,
  419. DA830_I2C0_SCL,
  420. DA830_UART2_RXD,
  421. DA830_TM64P0_IN12,
  422. DA830_TM64P0_OUT12,
  423. DA830_GPIO5_5,
  424. DA830_GPIO5_6,
  425. DA830_GPIO5_7,
  426. DA830_GPIO5_8,
  427. DA830_GPIO5_9,
  428. DA830_GPIO5_10,
  429. DA830_GPIO5_11,
  430. DA830_GPIO5_12,
  431. DA830_NSPI1_SCS_0,
  432. DA830_USB0_DRVVBUS,
  433. DA830_AHCLKX0,
  434. DA830_ACLKX0,
  435. DA830_AFSX0,
  436. DA830_AHCLKR0,
  437. DA830_ACLKR0,
  438. DA830_AFSR0,
  439. DA830_UART2_TXD,
  440. DA830_AHCLKX2,
  441. DA830_ECAP0_APWM0,
  442. DA830_RMII_MHZ_50_CLK,
  443. DA830_ECAP1_APWM1,
  444. DA830_USB_REFCLKIN,
  445. DA830_GPIO5_13,
  446. DA830_GPIO4_15,
  447. DA830_GPIO2_11,
  448. DA830_GPIO2_12,
  449. DA830_GPIO2_13,
  450. DA830_GPIO2_14,
  451. DA830_GPIO2_15,
  452. DA830_GPIO3_12,
  453. DA830_AMUTE0,
  454. DA830_AXR0_0,
  455. DA830_AXR0_1,
  456. DA830_AXR0_2,
  457. DA830_AXR0_3,
  458. DA830_AXR0_4,
  459. DA830_AXR0_5,
  460. DA830_AXR0_6,
  461. DA830_RMII_TXD_0,
  462. DA830_RMII_TXD_1,
  463. DA830_RMII_TXEN,
  464. DA830_RMII_CRS_DV,
  465. DA830_RMII_RXD_0,
  466. DA830_RMII_RXD_1,
  467. DA830_RMII_RXER,
  468. DA830_AFSR2,
  469. DA830_ACLKX2,
  470. DA830_AXR2_3,
  471. DA830_AXR2_2,
  472. DA830_AXR2_1,
  473. DA830_AFSX2,
  474. DA830_ACLKR2,
  475. DA830_NRESETOUT,
  476. DA830_GPIO3_0,
  477. DA830_GPIO3_1,
  478. DA830_GPIO3_2,
  479. DA830_GPIO3_3,
  480. DA830_GPIO3_4,
  481. DA830_GPIO3_5,
  482. DA830_GPIO3_6,
  483. DA830_AXR0_7,
  484. DA830_AXR0_8,
  485. DA830_UART1_RXD,
  486. DA830_UART1_TXD,
  487. DA830_AXR0_11,
  488. DA830_AHCLKX1,
  489. DA830_ACLKX1,
  490. DA830_AFSX1,
  491. DA830_MDIO_CLK,
  492. DA830_MDIO_D,
  493. DA830_AXR0_9,
  494. DA830_AXR0_10,
  495. DA830_EPWM0B,
  496. DA830_EPWM0A,
  497. DA830_EPWMSYNCI,
  498. DA830_AXR2_0,
  499. DA830_EPWMSYNC0,
  500. DA830_GPIO3_7,
  501. DA830_GPIO3_8,
  502. DA830_GPIO3_9,
  503. DA830_GPIO3_10,
  504. DA830_GPIO3_11,
  505. DA830_GPIO3_14,
  506. DA830_GPIO3_15,
  507. DA830_GPIO4_10,
  508. DA830_AHCLKR1,
  509. DA830_ACLKR1,
  510. DA830_AFSR1,
  511. DA830_AMUTE1,
  512. DA830_AXR1_0,
  513. DA830_AXR1_1,
  514. DA830_AXR1_2,
  515. DA830_AXR1_3,
  516. DA830_ECAP2_APWM2,
  517. DA830_EHRPWMGLUETZ,
  518. DA830_EQEP1A,
  519. DA830_GPIO4_11,
  520. DA830_GPIO4_12,
  521. DA830_GPIO4_13,
  522. DA830_GPIO4_14,
  523. DA830_GPIO4_0,
  524. DA830_GPIO4_1,
  525. DA830_GPIO4_2,
  526. DA830_GPIO4_3,
  527. DA830_AXR1_4,
  528. DA830_AXR1_5,
  529. DA830_AXR1_6,
  530. DA830_AXR1_7,
  531. DA830_AXR1_8,
  532. DA830_AXR1_9,
  533. DA830_EMA_D_0,
  534. DA830_EMA_D_1,
  535. DA830_EQEP1B,
  536. DA830_EPWM2B,
  537. DA830_EPWM2A,
  538. DA830_EPWM1B,
  539. DA830_EPWM1A,
  540. DA830_MMCSD_DAT_0,
  541. DA830_MMCSD_DAT_1,
  542. DA830_UHPI_HD_0,
  543. DA830_UHPI_HD_1,
  544. DA830_GPIO4_4,
  545. DA830_GPIO4_5,
  546. DA830_GPIO4_6,
  547. DA830_GPIO4_7,
  548. DA830_GPIO4_8,
  549. DA830_GPIO4_9,
  550. DA830_GPIO0_0,
  551. DA830_GPIO0_1,
  552. DA830_EMA_D_2,
  553. DA830_EMA_D_3,
  554. DA830_EMA_D_4,
  555. DA830_EMA_D_5,
  556. DA830_EMA_D_6,
  557. DA830_EMA_D_7,
  558. DA830_EMA_D_8,
  559. DA830_EMA_D_9,
  560. DA830_MMCSD_DAT_2,
  561. DA830_MMCSD_DAT_3,
  562. DA830_MMCSD_DAT_4,
  563. DA830_MMCSD_DAT_5,
  564. DA830_MMCSD_DAT_6,
  565. DA830_MMCSD_DAT_7,
  566. DA830_UHPI_HD_8,
  567. DA830_UHPI_HD_9,
  568. DA830_UHPI_HD_2,
  569. DA830_UHPI_HD_3,
  570. DA830_UHPI_HD_4,
  571. DA830_UHPI_HD_5,
  572. DA830_UHPI_HD_6,
  573. DA830_UHPI_HD_7,
  574. DA830_LCD_D_8,
  575. DA830_LCD_D_9,
  576. DA830_GPIO0_2,
  577. DA830_GPIO0_3,
  578. DA830_GPIO0_4,
  579. DA830_GPIO0_5,
  580. DA830_GPIO0_6,
  581. DA830_GPIO0_7,
  582. DA830_GPIO0_8,
  583. DA830_GPIO0_9,
  584. DA830_EMA_D_10,
  585. DA830_EMA_D_11,
  586. DA830_EMA_D_12,
  587. DA830_EMA_D_13,
  588. DA830_EMA_D_14,
  589. DA830_EMA_D_15,
  590. DA830_EMA_A_0,
  591. DA830_EMA_A_1,
  592. DA830_UHPI_HD_10,
  593. DA830_UHPI_HD_11,
  594. DA830_UHPI_HD_12,
  595. DA830_UHPI_HD_13,
  596. DA830_UHPI_HD_14,
  597. DA830_UHPI_HD_15,
  598. DA830_LCD_D_7,
  599. DA830_MMCSD_CLK,
  600. DA830_LCD_D_10,
  601. DA830_LCD_D_11,
  602. DA830_LCD_D_12,
  603. DA830_LCD_D_13,
  604. DA830_LCD_D_14,
  605. DA830_LCD_D_15,
  606. DA830_UHPI_HCNTL0,
  607. DA830_GPIO0_10,
  608. DA830_GPIO0_11,
  609. DA830_GPIO0_12,
  610. DA830_GPIO0_13,
  611. DA830_GPIO0_14,
  612. DA830_GPIO0_15,
  613. DA830_GPIO1_0,
  614. DA830_GPIO1_1,
  615. DA830_EMA_A_2,
  616. DA830_EMA_A_3,
  617. DA830_EMA_A_4,
  618. DA830_EMA_A_5,
  619. DA830_EMA_A_6,
  620. DA830_EMA_A_7,
  621. DA830_EMA_A_8,
  622. DA830_EMA_A_9,
  623. DA830_MMCSD_CMD,
  624. DA830_LCD_D_6,
  625. DA830_LCD_D_3,
  626. DA830_LCD_D_2,
  627. DA830_LCD_D_1,
  628. DA830_LCD_D_0,
  629. DA830_LCD_PCLK,
  630. DA830_LCD_HSYNC,
  631. DA830_UHPI_HCNTL1,
  632. DA830_GPIO1_2,
  633. DA830_GPIO1_3,
  634. DA830_GPIO1_4,
  635. DA830_GPIO1_5,
  636. DA830_GPIO1_6,
  637. DA830_GPIO1_7,
  638. DA830_GPIO1_8,
  639. DA830_GPIO1_9,
  640. DA830_EMA_A_10,
  641. DA830_EMA_A_11,
  642. DA830_EMA_A_12,
  643. DA830_EMA_BA_1,
  644. DA830_EMA_BA_0,
  645. DA830_EMA_CLK,
  646. DA830_EMA_SDCKE,
  647. DA830_NEMA_CAS,
  648. DA830_LCD_VSYNC,
  649. DA830_NLCD_AC_ENB_CS,
  650. DA830_LCD_MCLK,
  651. DA830_LCD_D_5,
  652. DA830_LCD_D_4,
  653. DA830_OBSCLK,
  654. DA830_NEMA_CS_4,
  655. DA830_UHPI_HHWIL,
  656. DA830_AHCLKR2,
  657. DA830_GPIO1_10,
  658. DA830_GPIO1_11,
  659. DA830_GPIO1_12,
  660. DA830_GPIO1_13,
  661. DA830_GPIO1_14,
  662. DA830_GPIO1_15,
  663. DA830_GPIO2_0,
  664. DA830_GPIO2_1,
  665. DA830_NEMA_RAS,
  666. DA830_NEMA_WE,
  667. DA830_NEMA_CS_0,
  668. DA830_NEMA_CS_2,
  669. DA830_NEMA_CS_3,
  670. DA830_NEMA_OE,
  671. DA830_NEMA_WE_DQM_1,
  672. DA830_NEMA_WE_DQM_0,
  673. DA830_NEMA_CS_5,
  674. DA830_UHPI_HRNW,
  675. DA830_NUHPI_HAS,
  676. DA830_NUHPI_HCS,
  677. DA830_NUHPI_HDS1,
  678. DA830_NUHPI_HDS2,
  679. DA830_NUHPI_HINT,
  680. DA830_AXR0_12,
  681. DA830_AMUTE2,
  682. DA830_AXR0_13,
  683. DA830_AXR0_14,
  684. DA830_AXR0_15,
  685. DA830_GPIO2_2,
  686. DA830_GPIO2_3,
  687. DA830_GPIO2_4,
  688. DA830_GPIO2_5,
  689. DA830_GPIO2_6,
  690. DA830_GPIO2_7,
  691. DA830_GPIO2_8,
  692. DA830_GPIO2_9,
  693. DA830_EMA_WAIT_0,
  694. DA830_NUHPI_HRDY,
  695. DA830_GPIO2_10,
  696. };
  697. enum davinci_da850_index {
  698. /* UART0 function */
  699. DA850_NUART0_CTS,
  700. DA850_NUART0_RTS,
  701. DA850_UART0_RXD,
  702. DA850_UART0_TXD,
  703. /* UART1 function */
  704. DA850_NUART1_CTS,
  705. DA850_NUART1_RTS,
  706. DA850_UART1_RXD,
  707. DA850_UART1_TXD,
  708. /* UART2 function */
  709. DA850_NUART2_CTS,
  710. DA850_NUART2_RTS,
  711. DA850_UART2_RXD,
  712. DA850_UART2_TXD,
  713. /* I2C1 function */
  714. DA850_I2C1_SCL,
  715. DA850_I2C1_SDA,
  716. /* I2C0 function */
  717. DA850_I2C0_SDA,
  718. DA850_I2C0_SCL,
  719. /* EMAC function */
  720. DA850_MII_TXEN,
  721. DA850_MII_TXCLK,
  722. DA850_MII_COL,
  723. DA850_MII_TXD_3,
  724. DA850_MII_TXD_2,
  725. DA850_MII_TXD_1,
  726. DA850_MII_TXD_0,
  727. DA850_MII_RXER,
  728. DA850_MII_CRS,
  729. DA850_MII_RXCLK,
  730. DA850_MII_RXDV,
  731. DA850_MII_RXD_3,
  732. DA850_MII_RXD_2,
  733. DA850_MII_RXD_1,
  734. DA850_MII_RXD_0,
  735. DA850_MDIO_CLK,
  736. DA850_MDIO_D,
  737. DA850_RMII_TXD_0,
  738. DA850_RMII_TXD_1,
  739. DA850_RMII_TXEN,
  740. DA850_RMII_CRS_DV,
  741. DA850_RMII_RXD_0,
  742. DA850_RMII_RXD_1,
  743. DA850_RMII_RXER,
  744. DA850_RMII_MHZ_50_CLK,
  745. /* McASP function */
  746. DA850_ACLKR,
  747. DA850_ACLKX,
  748. DA850_AFSR,
  749. DA850_AFSX,
  750. DA850_AHCLKR,
  751. DA850_AHCLKX,
  752. DA850_AMUTE,
  753. DA850_AXR_15,
  754. DA850_AXR_14,
  755. DA850_AXR_13,
  756. DA850_AXR_12,
  757. DA850_AXR_11,
  758. DA850_AXR_10,
  759. DA850_AXR_9,
  760. DA850_AXR_8,
  761. DA850_AXR_7,
  762. DA850_AXR_6,
  763. DA850_AXR_5,
  764. DA850_AXR_4,
  765. DA850_AXR_3,
  766. DA850_AXR_2,
  767. DA850_AXR_1,
  768. DA850_AXR_0,
  769. /* LCD function */
  770. DA850_LCD_D_7,
  771. DA850_LCD_D_6,
  772. DA850_LCD_D_5,
  773. DA850_LCD_D_4,
  774. DA850_LCD_D_3,
  775. DA850_LCD_D_2,
  776. DA850_LCD_D_1,
  777. DA850_LCD_D_0,
  778. DA850_LCD_D_15,
  779. DA850_LCD_D_14,
  780. DA850_LCD_D_13,
  781. DA850_LCD_D_12,
  782. DA850_LCD_D_11,
  783. DA850_LCD_D_10,
  784. DA850_LCD_D_9,
  785. DA850_LCD_D_8,
  786. DA850_LCD_PCLK,
  787. DA850_LCD_HSYNC,
  788. DA850_LCD_VSYNC,
  789. DA850_NLCD_AC_ENB_CS,
  790. /* MMC/SD0 function */
  791. DA850_MMCSD0_DAT_0,
  792. DA850_MMCSD0_DAT_1,
  793. DA850_MMCSD0_DAT_2,
  794. DA850_MMCSD0_DAT_3,
  795. DA850_MMCSD0_CLK,
  796. DA850_MMCSD0_CMD,
  797. /* MMC/SD1 function */
  798. DA850_MMCSD1_DAT_0,
  799. DA850_MMCSD1_DAT_1,
  800. DA850_MMCSD1_DAT_2,
  801. DA850_MMCSD1_DAT_3,
  802. DA850_MMCSD1_CLK,
  803. DA850_MMCSD1_CMD,
  804. /* EMIF2.5/EMIFA function */
  805. DA850_EMA_D_7,
  806. DA850_EMA_D_6,
  807. DA850_EMA_D_5,
  808. DA850_EMA_D_4,
  809. DA850_EMA_D_3,
  810. DA850_EMA_D_2,
  811. DA850_EMA_D_1,
  812. DA850_EMA_D_0,
  813. DA850_EMA_A_1,
  814. DA850_EMA_A_2,
  815. DA850_NEMA_CS_3,
  816. DA850_NEMA_CS_4,
  817. DA850_NEMA_WE,
  818. DA850_NEMA_OE,
  819. DA850_EMA_D_15,
  820. DA850_EMA_D_14,
  821. DA850_EMA_D_13,
  822. DA850_EMA_D_12,
  823. DA850_EMA_D_11,
  824. DA850_EMA_D_10,
  825. DA850_EMA_D_9,
  826. DA850_EMA_D_8,
  827. DA850_EMA_A_0,
  828. DA850_EMA_A_3,
  829. DA850_EMA_A_4,
  830. DA850_EMA_A_5,
  831. DA850_EMA_A_6,
  832. DA850_EMA_A_7,
  833. DA850_EMA_A_8,
  834. DA850_EMA_A_9,
  835. DA850_EMA_A_10,
  836. DA850_EMA_A_11,
  837. DA850_EMA_A_12,
  838. DA850_EMA_A_13,
  839. DA850_EMA_A_14,
  840. DA850_EMA_A_15,
  841. DA850_EMA_A_16,
  842. DA850_EMA_A_17,
  843. DA850_EMA_A_18,
  844. DA850_EMA_A_19,
  845. DA850_EMA_A_20,
  846. DA850_EMA_A_21,
  847. DA850_EMA_A_22,
  848. DA850_EMA_A_23,
  849. DA850_EMA_BA_1,
  850. DA850_EMA_CLK,
  851. DA850_EMA_WAIT_1,
  852. DA850_NEMA_CS_2,
  853. /* GPIO function */
  854. DA850_GPIO2_4,
  855. DA850_GPIO2_6,
  856. DA850_GPIO2_8,
  857. DA850_GPIO2_15,
  858. DA850_GPIO3_12,
  859. DA850_GPIO3_13,
  860. DA850_GPIO4_0,
  861. DA850_GPIO4_1,
  862. DA850_GPIO6_9,
  863. DA850_GPIO6_10,
  864. DA850_GPIO6_13,
  865. DA850_RTC_ALARM,
  866. /* VPIF Capture */
  867. DA850_VPIF_DIN0,
  868. DA850_VPIF_DIN1,
  869. DA850_VPIF_DIN2,
  870. DA850_VPIF_DIN3,
  871. DA850_VPIF_DIN4,
  872. DA850_VPIF_DIN5,
  873. DA850_VPIF_DIN6,
  874. DA850_VPIF_DIN7,
  875. DA850_VPIF_DIN8,
  876. DA850_VPIF_DIN9,
  877. DA850_VPIF_DIN10,
  878. DA850_VPIF_DIN11,
  879. DA850_VPIF_DIN12,
  880. DA850_VPIF_DIN13,
  881. DA850_VPIF_DIN14,
  882. DA850_VPIF_DIN15,
  883. DA850_VPIF_CLKIN0,
  884. DA850_VPIF_CLKIN1,
  885. DA850_VPIF_CLKIN2,
  886. DA850_VPIF_CLKIN3,
  887. /* VPIF Display */
  888. DA850_VPIF_DOUT0,
  889. DA850_VPIF_DOUT1,
  890. DA850_VPIF_DOUT2,
  891. DA850_VPIF_DOUT3,
  892. DA850_VPIF_DOUT4,
  893. DA850_VPIF_DOUT5,
  894. DA850_VPIF_DOUT6,
  895. DA850_VPIF_DOUT7,
  896. DA850_VPIF_DOUT8,
  897. DA850_VPIF_DOUT9,
  898. DA850_VPIF_DOUT10,
  899. DA850_VPIF_DOUT11,
  900. DA850_VPIF_DOUT12,
  901. DA850_VPIF_DOUT13,
  902. DA850_VPIF_DOUT14,
  903. DA850_VPIF_DOUT15,
  904. DA850_VPIF_CLKO2,
  905. DA850_VPIF_CLKO3,
  906. };
  907. #define PINMUX(x) (4 * (x))
  908. #ifdef CONFIG_DAVINCI_MUX
  909. /* setup pin muxing */
  910. extern int davinci_cfg_reg(unsigned long reg_cfg);
  911. extern int davinci_cfg_reg_list(const short pins[]);
  912. #else
  913. /* boot loader does it all (no warnings from CONFIG_DAVINCI_MUX_WARNINGS) */
  914. static inline int davinci_cfg_reg(unsigned long reg_cfg) { return 0; }
  915. static inline int davinci_cfg_reg_list(const short pins[])
  916. {
  917. return 0;
  918. }
  919. #endif
  920. #endif /* __INC_MACH_MUX_H */