da830.c 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  1. /*
  2. * TI DA830/OMAP L137 chip specific setup
  3. *
  4. * Author: Mark A. Greer <mgreer@mvista.com>
  5. *
  6. * 2009 (c) MontaVista Software, Inc. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. */
  11. #include <linux/gpio.h>
  12. #include <linux/init.h>
  13. #include <linux/clk.h>
  14. #include <asm/mach/map.h>
  15. #include <mach/psc.h>
  16. #include <mach/irqs.h>
  17. #include <mach/cputype.h>
  18. #include <mach/common.h>
  19. #include <mach/time.h>
  20. #include <mach/da8xx.h>
  21. #include <mach/gpio-davinci.h>
  22. #include "clock.h"
  23. #include "mux.h"
  24. /* Offsets of the 8 compare registers on the da830 */
  25. #define DA830_CMP12_0 0x60
  26. #define DA830_CMP12_1 0x64
  27. #define DA830_CMP12_2 0x68
  28. #define DA830_CMP12_3 0x6c
  29. #define DA830_CMP12_4 0x70
  30. #define DA830_CMP12_5 0x74
  31. #define DA830_CMP12_6 0x78
  32. #define DA830_CMP12_7 0x7c
  33. #define DA830_REF_FREQ 24000000
  34. static struct pll_data pll0_data = {
  35. .num = 1,
  36. .phys_base = DA8XX_PLL0_BASE,
  37. .flags = PLL_HAS_PREDIV | PLL_HAS_POSTDIV,
  38. };
  39. static struct clk ref_clk = {
  40. .name = "ref_clk",
  41. .rate = DA830_REF_FREQ,
  42. };
  43. static struct clk pll0_clk = {
  44. .name = "pll0",
  45. .parent = &ref_clk,
  46. .pll_data = &pll0_data,
  47. .flags = CLK_PLL,
  48. };
  49. static struct clk pll0_aux_clk = {
  50. .name = "pll0_aux_clk",
  51. .parent = &pll0_clk,
  52. .flags = CLK_PLL | PRE_PLL,
  53. };
  54. static struct clk pll0_sysclk2 = {
  55. .name = "pll0_sysclk2",
  56. .parent = &pll0_clk,
  57. .flags = CLK_PLL,
  58. .div_reg = PLLDIV2,
  59. };
  60. static struct clk pll0_sysclk3 = {
  61. .name = "pll0_sysclk3",
  62. .parent = &pll0_clk,
  63. .flags = CLK_PLL,
  64. .div_reg = PLLDIV3,
  65. };
  66. static struct clk pll0_sysclk4 = {
  67. .name = "pll0_sysclk4",
  68. .parent = &pll0_clk,
  69. .flags = CLK_PLL,
  70. .div_reg = PLLDIV4,
  71. };
  72. static struct clk pll0_sysclk5 = {
  73. .name = "pll0_sysclk5",
  74. .parent = &pll0_clk,
  75. .flags = CLK_PLL,
  76. .div_reg = PLLDIV5,
  77. };
  78. static struct clk pll0_sysclk6 = {
  79. .name = "pll0_sysclk6",
  80. .parent = &pll0_clk,
  81. .flags = CLK_PLL,
  82. .div_reg = PLLDIV6,
  83. };
  84. static struct clk pll0_sysclk7 = {
  85. .name = "pll0_sysclk7",
  86. .parent = &pll0_clk,
  87. .flags = CLK_PLL,
  88. .div_reg = PLLDIV7,
  89. };
  90. static struct clk i2c0_clk = {
  91. .name = "i2c0",
  92. .parent = &pll0_aux_clk,
  93. };
  94. static struct clk timerp64_0_clk = {
  95. .name = "timer0",
  96. .parent = &pll0_aux_clk,
  97. };
  98. static struct clk timerp64_1_clk = {
  99. .name = "timer1",
  100. .parent = &pll0_aux_clk,
  101. };
  102. static struct clk arm_rom_clk = {
  103. .name = "arm_rom",
  104. .parent = &pll0_sysclk2,
  105. .lpsc = DA8XX_LPSC0_ARM_RAM_ROM,
  106. .flags = ALWAYS_ENABLED,
  107. };
  108. static struct clk scr0_ss_clk = {
  109. .name = "scr0_ss",
  110. .parent = &pll0_sysclk2,
  111. .lpsc = DA8XX_LPSC0_SCR0_SS,
  112. .flags = ALWAYS_ENABLED,
  113. };
  114. static struct clk scr1_ss_clk = {
  115. .name = "scr1_ss",
  116. .parent = &pll0_sysclk2,
  117. .lpsc = DA8XX_LPSC0_SCR1_SS,
  118. .flags = ALWAYS_ENABLED,
  119. };
  120. static struct clk scr2_ss_clk = {
  121. .name = "scr2_ss",
  122. .parent = &pll0_sysclk2,
  123. .lpsc = DA8XX_LPSC0_SCR2_SS,
  124. .flags = ALWAYS_ENABLED,
  125. };
  126. static struct clk dmax_clk = {
  127. .name = "dmax",
  128. .parent = &pll0_sysclk2,
  129. .lpsc = DA8XX_LPSC0_PRUSS,
  130. .flags = ALWAYS_ENABLED,
  131. };
  132. static struct clk tpcc_clk = {
  133. .name = "tpcc",
  134. .parent = &pll0_sysclk2,
  135. .lpsc = DA8XX_LPSC0_TPCC,
  136. .flags = ALWAYS_ENABLED | CLK_PSC,
  137. };
  138. static struct clk tptc0_clk = {
  139. .name = "tptc0",
  140. .parent = &pll0_sysclk2,
  141. .lpsc = DA8XX_LPSC0_TPTC0,
  142. .flags = ALWAYS_ENABLED,
  143. };
  144. static struct clk tptc1_clk = {
  145. .name = "tptc1",
  146. .parent = &pll0_sysclk2,
  147. .lpsc = DA8XX_LPSC0_TPTC1,
  148. .flags = ALWAYS_ENABLED,
  149. };
  150. static struct clk mmcsd_clk = {
  151. .name = "mmcsd",
  152. .parent = &pll0_sysclk2,
  153. .lpsc = DA8XX_LPSC0_MMC_SD,
  154. };
  155. static struct clk uart0_clk = {
  156. .name = "uart0",
  157. .parent = &pll0_sysclk2,
  158. .lpsc = DA8XX_LPSC0_UART0,
  159. };
  160. static struct clk uart1_clk = {
  161. .name = "uart1",
  162. .parent = &pll0_sysclk2,
  163. .lpsc = DA8XX_LPSC1_UART1,
  164. .gpsc = 1,
  165. };
  166. static struct clk uart2_clk = {
  167. .name = "uart2",
  168. .parent = &pll0_sysclk2,
  169. .lpsc = DA8XX_LPSC1_UART2,
  170. .gpsc = 1,
  171. };
  172. static struct clk spi0_clk = {
  173. .name = "spi0",
  174. .parent = &pll0_sysclk2,
  175. .lpsc = DA8XX_LPSC0_SPI0,
  176. };
  177. static struct clk spi1_clk = {
  178. .name = "spi1",
  179. .parent = &pll0_sysclk2,
  180. .lpsc = DA8XX_LPSC1_SPI1,
  181. .gpsc = 1,
  182. };
  183. static struct clk ecap0_clk = {
  184. .name = "ecap0",
  185. .parent = &pll0_sysclk2,
  186. .lpsc = DA8XX_LPSC1_ECAP,
  187. .gpsc = 1,
  188. };
  189. static struct clk ecap1_clk = {
  190. .name = "ecap1",
  191. .parent = &pll0_sysclk2,
  192. .lpsc = DA8XX_LPSC1_ECAP,
  193. .gpsc = 1,
  194. };
  195. static struct clk ecap2_clk = {
  196. .name = "ecap2",
  197. .parent = &pll0_sysclk2,
  198. .lpsc = DA8XX_LPSC1_ECAP,
  199. .gpsc = 1,
  200. };
  201. static struct clk pwm0_clk = {
  202. .name = "pwm0",
  203. .parent = &pll0_sysclk2,
  204. .lpsc = DA8XX_LPSC1_PWM,
  205. .gpsc = 1,
  206. };
  207. static struct clk pwm1_clk = {
  208. .name = "pwm1",
  209. .parent = &pll0_sysclk2,
  210. .lpsc = DA8XX_LPSC1_PWM,
  211. .gpsc = 1,
  212. };
  213. static struct clk pwm2_clk = {
  214. .name = "pwm2",
  215. .parent = &pll0_sysclk2,
  216. .lpsc = DA8XX_LPSC1_PWM,
  217. .gpsc = 1,
  218. };
  219. static struct clk eqep0_clk = {
  220. .name = "eqep0",
  221. .parent = &pll0_sysclk2,
  222. .lpsc = DA830_LPSC1_EQEP,
  223. .gpsc = 1,
  224. };
  225. static struct clk eqep1_clk = {
  226. .name = "eqep1",
  227. .parent = &pll0_sysclk2,
  228. .lpsc = DA830_LPSC1_EQEP,
  229. .gpsc = 1,
  230. };
  231. static struct clk lcdc_clk = {
  232. .name = "lcdc",
  233. .parent = &pll0_sysclk2,
  234. .lpsc = DA8XX_LPSC1_LCDC,
  235. .gpsc = 1,
  236. };
  237. static struct clk mcasp0_clk = {
  238. .name = "mcasp0",
  239. .parent = &pll0_sysclk2,
  240. .lpsc = DA8XX_LPSC1_McASP0,
  241. .gpsc = 1,
  242. };
  243. static struct clk mcasp1_clk = {
  244. .name = "mcasp1",
  245. .parent = &pll0_sysclk2,
  246. .lpsc = DA830_LPSC1_McASP1,
  247. .gpsc = 1,
  248. };
  249. static struct clk mcasp2_clk = {
  250. .name = "mcasp2",
  251. .parent = &pll0_sysclk2,
  252. .lpsc = DA830_LPSC1_McASP2,
  253. .gpsc = 1,
  254. };
  255. static struct clk usb20_clk = {
  256. .name = "usb20",
  257. .parent = &pll0_sysclk2,
  258. .lpsc = DA8XX_LPSC1_USB20,
  259. .gpsc = 1,
  260. };
  261. static struct clk aemif_clk = {
  262. .name = "aemif",
  263. .parent = &pll0_sysclk3,
  264. .lpsc = DA8XX_LPSC0_EMIF25,
  265. .flags = ALWAYS_ENABLED,
  266. };
  267. static struct clk aintc_clk = {
  268. .name = "aintc",
  269. .parent = &pll0_sysclk4,
  270. .lpsc = DA8XX_LPSC0_AINTC,
  271. .flags = ALWAYS_ENABLED,
  272. };
  273. static struct clk secu_mgr_clk = {
  274. .name = "secu_mgr",
  275. .parent = &pll0_sysclk4,
  276. .lpsc = DA8XX_LPSC0_SECU_MGR,
  277. .flags = ALWAYS_ENABLED,
  278. };
  279. static struct clk emac_clk = {
  280. .name = "emac",
  281. .parent = &pll0_sysclk4,
  282. .lpsc = DA8XX_LPSC1_CPGMAC,
  283. .gpsc = 1,
  284. };
  285. static struct clk gpio_clk = {
  286. .name = "gpio",
  287. .parent = &pll0_sysclk4,
  288. .lpsc = DA8XX_LPSC1_GPIO,
  289. .gpsc = 1,
  290. };
  291. static struct clk i2c1_clk = {
  292. .name = "i2c1",
  293. .parent = &pll0_sysclk4,
  294. .lpsc = DA8XX_LPSC1_I2C,
  295. .gpsc = 1,
  296. };
  297. static struct clk usb11_clk = {
  298. .name = "usb11",
  299. .parent = &pll0_sysclk4,
  300. .lpsc = DA8XX_LPSC1_USB11,
  301. .gpsc = 1,
  302. };
  303. static struct clk emif3_clk = {
  304. .name = "emif3",
  305. .parent = &pll0_sysclk5,
  306. .lpsc = DA8XX_LPSC1_EMIF3C,
  307. .gpsc = 1,
  308. .flags = ALWAYS_ENABLED,
  309. };
  310. static struct clk arm_clk = {
  311. .name = "arm",
  312. .parent = &pll0_sysclk6,
  313. .lpsc = DA8XX_LPSC0_ARM,
  314. .flags = ALWAYS_ENABLED,
  315. };
  316. static struct clk rmii_clk = {
  317. .name = "rmii",
  318. .parent = &pll0_sysclk7,
  319. };
  320. static struct clk_lookup da830_clks[] = {
  321. CLK(NULL, "ref", &ref_clk),
  322. CLK(NULL, "pll0", &pll0_clk),
  323. CLK(NULL, "pll0_aux", &pll0_aux_clk),
  324. CLK(NULL, "pll0_sysclk2", &pll0_sysclk2),
  325. CLK(NULL, "pll0_sysclk3", &pll0_sysclk3),
  326. CLK(NULL, "pll0_sysclk4", &pll0_sysclk4),
  327. CLK(NULL, "pll0_sysclk5", &pll0_sysclk5),
  328. CLK(NULL, "pll0_sysclk6", &pll0_sysclk6),
  329. CLK(NULL, "pll0_sysclk7", &pll0_sysclk7),
  330. CLK("i2c_davinci.1", NULL, &i2c0_clk),
  331. CLK(NULL, "timer0", &timerp64_0_clk),
  332. CLK("watchdog", NULL, &timerp64_1_clk),
  333. CLK(NULL, "arm_rom", &arm_rom_clk),
  334. CLK(NULL, "scr0_ss", &scr0_ss_clk),
  335. CLK(NULL, "scr1_ss", &scr1_ss_clk),
  336. CLK(NULL, "scr2_ss", &scr2_ss_clk),
  337. CLK(NULL, "dmax", &dmax_clk),
  338. CLK(NULL, "tpcc", &tpcc_clk),
  339. CLK(NULL, "tptc0", &tptc0_clk),
  340. CLK(NULL, "tptc1", &tptc1_clk),
  341. CLK("davinci_mmc.0", NULL, &mmcsd_clk),
  342. CLK(NULL, "uart0", &uart0_clk),
  343. CLK(NULL, "uart1", &uart1_clk),
  344. CLK(NULL, "uart2", &uart2_clk),
  345. CLK("spi_davinci.0", NULL, &spi0_clk),
  346. CLK("spi_davinci.1", NULL, &spi1_clk),
  347. CLK(NULL, "ecap0", &ecap0_clk),
  348. CLK(NULL, "ecap1", &ecap1_clk),
  349. CLK(NULL, "ecap2", &ecap2_clk),
  350. CLK(NULL, "pwm0", &pwm0_clk),
  351. CLK(NULL, "pwm1", &pwm1_clk),
  352. CLK(NULL, "pwm2", &pwm2_clk),
  353. CLK("eqep.0", NULL, &eqep0_clk),
  354. CLK("eqep.1", NULL, &eqep1_clk),
  355. CLK("da8xx_lcdc.0", NULL, &lcdc_clk),
  356. CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
  357. CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
  358. CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
  359. CLK(NULL, "usb20", &usb20_clk),
  360. CLK(NULL, "aemif", &aemif_clk),
  361. CLK(NULL, "aintc", &aintc_clk),
  362. CLK(NULL, "secu_mgr", &secu_mgr_clk),
  363. CLK("davinci_emac.1", NULL, &emac_clk),
  364. CLK(NULL, "gpio", &gpio_clk),
  365. CLK("i2c_davinci.2", NULL, &i2c1_clk),
  366. CLK(NULL, "usb11", &usb11_clk),
  367. CLK(NULL, "emif3", &emif3_clk),
  368. CLK(NULL, "arm", &arm_clk),
  369. CLK(NULL, "rmii", &rmii_clk),
  370. CLK(NULL, NULL, NULL),
  371. };
  372. /*
  373. * Device specific mux setup
  374. *
  375. * soc description mux mode mode mux dbg
  376. * reg offset mask mode
  377. */
  378. static const struct mux_config da830_pins[] = {
  379. #ifdef CONFIG_DAVINCI_MUX
  380. MUX_CFG(DA830, GPIO7_14, 0, 0, 0xf, 1, false)
  381. MUX_CFG(DA830, RTCK, 0, 0, 0xf, 8, false)
  382. MUX_CFG(DA830, GPIO7_15, 0, 4, 0xf, 1, false)
  383. MUX_CFG(DA830, EMU_0, 0, 4, 0xf, 8, false)
  384. MUX_CFG(DA830, EMB_SDCKE, 0, 8, 0xf, 1, false)
  385. MUX_CFG(DA830, EMB_CLK_GLUE, 0, 12, 0xf, 1, false)
  386. MUX_CFG(DA830, EMB_CLK, 0, 12, 0xf, 2, false)
  387. MUX_CFG(DA830, NEMB_CS_0, 0, 16, 0xf, 1, false)
  388. MUX_CFG(DA830, NEMB_CAS, 0, 20, 0xf, 1, false)
  389. MUX_CFG(DA830, NEMB_RAS, 0, 24, 0xf, 1, false)
  390. MUX_CFG(DA830, NEMB_WE, 0, 28, 0xf, 1, false)
  391. MUX_CFG(DA830, EMB_BA_1, 1, 0, 0xf, 1, false)
  392. MUX_CFG(DA830, EMB_BA_0, 1, 4, 0xf, 1, false)
  393. MUX_CFG(DA830, EMB_A_0, 1, 8, 0xf, 1, false)
  394. MUX_CFG(DA830, EMB_A_1, 1, 12, 0xf, 1, false)
  395. MUX_CFG(DA830, EMB_A_2, 1, 16, 0xf, 1, false)
  396. MUX_CFG(DA830, EMB_A_3, 1, 20, 0xf, 1, false)
  397. MUX_CFG(DA830, EMB_A_4, 1, 24, 0xf, 1, false)
  398. MUX_CFG(DA830, EMB_A_5, 1, 28, 0xf, 1, false)
  399. MUX_CFG(DA830, GPIO7_0, 1, 0, 0xf, 8, false)
  400. MUX_CFG(DA830, GPIO7_1, 1, 4, 0xf, 8, false)
  401. MUX_CFG(DA830, GPIO7_2, 1, 8, 0xf, 8, false)
  402. MUX_CFG(DA830, GPIO7_3, 1, 12, 0xf, 8, false)
  403. MUX_CFG(DA830, GPIO7_4, 1, 16, 0xf, 8, false)
  404. MUX_CFG(DA830, GPIO7_5, 1, 20, 0xf, 8, false)
  405. MUX_CFG(DA830, GPIO7_6, 1, 24, 0xf, 8, false)
  406. MUX_CFG(DA830, GPIO7_7, 1, 28, 0xf, 8, false)
  407. MUX_CFG(DA830, EMB_A_6, 2, 0, 0xf, 1, false)
  408. MUX_CFG(DA830, EMB_A_7, 2, 4, 0xf, 1, false)
  409. MUX_CFG(DA830, EMB_A_8, 2, 8, 0xf, 1, false)
  410. MUX_CFG(DA830, EMB_A_9, 2, 12, 0xf, 1, false)
  411. MUX_CFG(DA830, EMB_A_10, 2, 16, 0xf, 1, false)
  412. MUX_CFG(DA830, EMB_A_11, 2, 20, 0xf, 1, false)
  413. MUX_CFG(DA830, EMB_A_12, 2, 24, 0xf, 1, false)
  414. MUX_CFG(DA830, EMB_D_31, 2, 28, 0xf, 1, false)
  415. MUX_CFG(DA830, GPIO7_8, 2, 0, 0xf, 8, false)
  416. MUX_CFG(DA830, GPIO7_9, 2, 4, 0xf, 8, false)
  417. MUX_CFG(DA830, GPIO7_10, 2, 8, 0xf, 8, false)
  418. MUX_CFG(DA830, GPIO7_11, 2, 12, 0xf, 8, false)
  419. MUX_CFG(DA830, GPIO7_12, 2, 16, 0xf, 8, false)
  420. MUX_CFG(DA830, GPIO7_13, 2, 20, 0xf, 8, false)
  421. MUX_CFG(DA830, GPIO3_13, 2, 24, 0xf, 8, false)
  422. MUX_CFG(DA830, EMB_D_30, 3, 0, 0xf, 1, false)
  423. MUX_CFG(DA830, EMB_D_29, 3, 4, 0xf, 1, false)
  424. MUX_CFG(DA830, EMB_D_28, 3, 8, 0xf, 1, false)
  425. MUX_CFG(DA830, EMB_D_27, 3, 12, 0xf, 1, false)
  426. MUX_CFG(DA830, EMB_D_26, 3, 16, 0xf, 1, false)
  427. MUX_CFG(DA830, EMB_D_25, 3, 20, 0xf, 1, false)
  428. MUX_CFG(DA830, EMB_D_24, 3, 24, 0xf, 1, false)
  429. MUX_CFG(DA830, EMB_D_23, 3, 28, 0xf, 1, false)
  430. MUX_CFG(DA830, EMB_D_22, 4, 0, 0xf, 1, false)
  431. MUX_CFG(DA830, EMB_D_21, 4, 4, 0xf, 1, false)
  432. MUX_CFG(DA830, EMB_D_20, 4, 8, 0xf, 1, false)
  433. MUX_CFG(DA830, EMB_D_19, 4, 12, 0xf, 1, false)
  434. MUX_CFG(DA830, EMB_D_18, 4, 16, 0xf, 1, false)
  435. MUX_CFG(DA830, EMB_D_17, 4, 20, 0xf, 1, false)
  436. MUX_CFG(DA830, EMB_D_16, 4, 24, 0xf, 1, false)
  437. MUX_CFG(DA830, NEMB_WE_DQM_3, 4, 28, 0xf, 1, false)
  438. MUX_CFG(DA830, NEMB_WE_DQM_2, 5, 0, 0xf, 1, false)
  439. MUX_CFG(DA830, EMB_D_0, 5, 4, 0xf, 1, false)
  440. MUX_CFG(DA830, EMB_D_1, 5, 8, 0xf, 1, false)
  441. MUX_CFG(DA830, EMB_D_2, 5, 12, 0xf, 1, false)
  442. MUX_CFG(DA830, EMB_D_3, 5, 16, 0xf, 1, false)
  443. MUX_CFG(DA830, EMB_D_4, 5, 20, 0xf, 1, false)
  444. MUX_CFG(DA830, EMB_D_5, 5, 24, 0xf, 1, false)
  445. MUX_CFG(DA830, EMB_D_6, 5, 28, 0xf, 1, false)
  446. MUX_CFG(DA830, GPIO6_0, 5, 4, 0xf, 8, false)
  447. MUX_CFG(DA830, GPIO6_1, 5, 8, 0xf, 8, false)
  448. MUX_CFG(DA830, GPIO6_2, 5, 12, 0xf, 8, false)
  449. MUX_CFG(DA830, GPIO6_3, 5, 16, 0xf, 8, false)
  450. MUX_CFG(DA830, GPIO6_4, 5, 20, 0xf, 8, false)
  451. MUX_CFG(DA830, GPIO6_5, 5, 24, 0xf, 8, false)
  452. MUX_CFG(DA830, GPIO6_6, 5, 28, 0xf, 8, false)
  453. MUX_CFG(DA830, EMB_D_7, 6, 0, 0xf, 1, false)
  454. MUX_CFG(DA830, EMB_D_8, 6, 4, 0xf, 1, false)
  455. MUX_CFG(DA830, EMB_D_9, 6, 8, 0xf, 1, false)
  456. MUX_CFG(DA830, EMB_D_10, 6, 12, 0xf, 1, false)
  457. MUX_CFG(DA830, EMB_D_11, 6, 16, 0xf, 1, false)
  458. MUX_CFG(DA830, EMB_D_12, 6, 20, 0xf, 1, false)
  459. MUX_CFG(DA830, EMB_D_13, 6, 24, 0xf, 1, false)
  460. MUX_CFG(DA830, EMB_D_14, 6, 28, 0xf, 1, false)
  461. MUX_CFG(DA830, GPIO6_7, 6, 0, 0xf, 8, false)
  462. MUX_CFG(DA830, GPIO6_8, 6, 4, 0xf, 8, false)
  463. MUX_CFG(DA830, GPIO6_9, 6, 8, 0xf, 8, false)
  464. MUX_CFG(DA830, GPIO6_10, 6, 12, 0xf, 8, false)
  465. MUX_CFG(DA830, GPIO6_11, 6, 16, 0xf, 8, false)
  466. MUX_CFG(DA830, GPIO6_12, 6, 20, 0xf, 8, false)
  467. MUX_CFG(DA830, GPIO6_13, 6, 24, 0xf, 8, false)
  468. MUX_CFG(DA830, GPIO6_14, 6, 28, 0xf, 8, false)
  469. MUX_CFG(DA830, EMB_D_15, 7, 0, 0xf, 1, false)
  470. MUX_CFG(DA830, NEMB_WE_DQM_1, 7, 4, 0xf, 1, false)
  471. MUX_CFG(DA830, NEMB_WE_DQM_0, 7, 8, 0xf, 1, false)
  472. MUX_CFG(DA830, SPI0_SOMI_0, 7, 12, 0xf, 1, false)
  473. MUX_CFG(DA830, SPI0_SIMO_0, 7, 16, 0xf, 1, false)
  474. MUX_CFG(DA830, SPI0_CLK, 7, 20, 0xf, 1, false)
  475. MUX_CFG(DA830, NSPI0_ENA, 7, 24, 0xf, 1, false)
  476. MUX_CFG(DA830, NSPI0_SCS_0, 7, 28, 0xf, 1, false)
  477. MUX_CFG(DA830, EQEP0I, 7, 12, 0xf, 2, false)
  478. MUX_CFG(DA830, EQEP0S, 7, 16, 0xf, 2, false)
  479. MUX_CFG(DA830, EQEP1I, 7, 20, 0xf, 2, false)
  480. MUX_CFG(DA830, NUART0_CTS, 7, 24, 0xf, 2, false)
  481. MUX_CFG(DA830, NUART0_RTS, 7, 28, 0xf, 2, false)
  482. MUX_CFG(DA830, EQEP0A, 7, 24, 0xf, 4, false)
  483. MUX_CFG(DA830, EQEP0B, 7, 28, 0xf, 4, false)
  484. MUX_CFG(DA830, GPIO6_15, 7, 0, 0xf, 8, false)
  485. MUX_CFG(DA830, GPIO5_14, 7, 4, 0xf, 8, false)
  486. MUX_CFG(DA830, GPIO5_15, 7, 8, 0xf, 8, false)
  487. MUX_CFG(DA830, GPIO5_0, 7, 12, 0xf, 8, false)
  488. MUX_CFG(DA830, GPIO5_1, 7, 16, 0xf, 8, false)
  489. MUX_CFG(DA830, GPIO5_2, 7, 20, 0xf, 8, false)
  490. MUX_CFG(DA830, GPIO5_3, 7, 24, 0xf, 8, false)
  491. MUX_CFG(DA830, GPIO5_4, 7, 28, 0xf, 8, false)
  492. MUX_CFG(DA830, SPI1_SOMI_0, 8, 0, 0xf, 1, false)
  493. MUX_CFG(DA830, SPI1_SIMO_0, 8, 4, 0xf, 1, false)
  494. MUX_CFG(DA830, SPI1_CLK, 8, 8, 0xf, 1, false)
  495. MUX_CFG(DA830, UART0_RXD, 8, 12, 0xf, 1, false)
  496. MUX_CFG(DA830, UART0_TXD, 8, 16, 0xf, 1, false)
  497. MUX_CFG(DA830, AXR1_10, 8, 20, 0xf, 1, false)
  498. MUX_CFG(DA830, AXR1_11, 8, 24, 0xf, 1, false)
  499. MUX_CFG(DA830, NSPI1_ENA, 8, 28, 0xf, 1, false)
  500. MUX_CFG(DA830, I2C1_SCL, 8, 0, 0xf, 2, false)
  501. MUX_CFG(DA830, I2C1_SDA, 8, 4, 0xf, 2, false)
  502. MUX_CFG(DA830, EQEP1S, 8, 8, 0xf, 2, false)
  503. MUX_CFG(DA830, I2C0_SDA, 8, 12, 0xf, 2, false)
  504. MUX_CFG(DA830, I2C0_SCL, 8, 16, 0xf, 2, false)
  505. MUX_CFG(DA830, UART2_RXD, 8, 28, 0xf, 2, false)
  506. MUX_CFG(DA830, TM64P0_IN12, 8, 12, 0xf, 4, false)
  507. MUX_CFG(DA830, TM64P0_OUT12, 8, 16, 0xf, 4, false)
  508. MUX_CFG(DA830, GPIO5_5, 8, 0, 0xf, 8, false)
  509. MUX_CFG(DA830, GPIO5_6, 8, 4, 0xf, 8, false)
  510. MUX_CFG(DA830, GPIO5_7, 8, 8, 0xf, 8, false)
  511. MUX_CFG(DA830, GPIO5_8, 8, 12, 0xf, 8, false)
  512. MUX_CFG(DA830, GPIO5_9, 8, 16, 0xf, 8, false)
  513. MUX_CFG(DA830, GPIO5_10, 8, 20, 0xf, 8, false)
  514. MUX_CFG(DA830, GPIO5_11, 8, 24, 0xf, 8, false)
  515. MUX_CFG(DA830, GPIO5_12, 8, 28, 0xf, 8, false)
  516. MUX_CFG(DA830, NSPI1_SCS_0, 9, 0, 0xf, 1, false)
  517. MUX_CFG(DA830, USB0_DRVVBUS, 9, 4, 0xf, 1, false)
  518. MUX_CFG(DA830, AHCLKX0, 9, 8, 0xf, 1, false)
  519. MUX_CFG(DA830, ACLKX0, 9, 12, 0xf, 1, false)
  520. MUX_CFG(DA830, AFSX0, 9, 16, 0xf, 1, false)
  521. MUX_CFG(DA830, AHCLKR0, 9, 20, 0xf, 1, false)
  522. MUX_CFG(DA830, ACLKR0, 9, 24, 0xf, 1, false)
  523. MUX_CFG(DA830, AFSR0, 9, 28, 0xf, 1, false)
  524. MUX_CFG(DA830, UART2_TXD, 9, 0, 0xf, 2, false)
  525. MUX_CFG(DA830, AHCLKX2, 9, 8, 0xf, 2, false)
  526. MUX_CFG(DA830, ECAP0_APWM0, 9, 12, 0xf, 2, false)
  527. MUX_CFG(DA830, RMII_MHZ_50_CLK, 9, 20, 0xf, 2, false)
  528. MUX_CFG(DA830, ECAP1_APWM1, 9, 24, 0xf, 2, false)
  529. MUX_CFG(DA830, USB_REFCLKIN, 9, 8, 0xf, 4, false)
  530. MUX_CFG(DA830, GPIO5_13, 9, 0, 0xf, 8, false)
  531. MUX_CFG(DA830, GPIO4_15, 9, 4, 0xf, 8, false)
  532. MUX_CFG(DA830, GPIO2_11, 9, 8, 0xf, 8, false)
  533. MUX_CFG(DA830, GPIO2_12, 9, 12, 0xf, 8, false)
  534. MUX_CFG(DA830, GPIO2_13, 9, 16, 0xf, 8, false)
  535. MUX_CFG(DA830, GPIO2_14, 9, 20, 0xf, 8, false)
  536. MUX_CFG(DA830, GPIO2_15, 9, 24, 0xf, 8, false)
  537. MUX_CFG(DA830, GPIO3_12, 9, 28, 0xf, 8, false)
  538. MUX_CFG(DA830, AMUTE0, 10, 0, 0xf, 1, false)
  539. MUX_CFG(DA830, AXR0_0, 10, 4, 0xf, 1, false)
  540. MUX_CFG(DA830, AXR0_1, 10, 8, 0xf, 1, false)
  541. MUX_CFG(DA830, AXR0_2, 10, 12, 0xf, 1, false)
  542. MUX_CFG(DA830, AXR0_3, 10, 16, 0xf, 1, false)
  543. MUX_CFG(DA830, AXR0_4, 10, 20, 0xf, 1, false)
  544. MUX_CFG(DA830, AXR0_5, 10, 24, 0xf, 1, false)
  545. MUX_CFG(DA830, AXR0_6, 10, 28, 0xf, 1, false)
  546. MUX_CFG(DA830, RMII_TXD_0, 10, 4, 0xf, 2, false)
  547. MUX_CFG(DA830, RMII_TXD_1, 10, 8, 0xf, 2, false)
  548. MUX_CFG(DA830, RMII_TXEN, 10, 12, 0xf, 2, false)
  549. MUX_CFG(DA830, RMII_CRS_DV, 10, 16, 0xf, 2, false)
  550. MUX_CFG(DA830, RMII_RXD_0, 10, 20, 0xf, 2, false)
  551. MUX_CFG(DA830, RMII_RXD_1, 10, 24, 0xf, 2, false)
  552. MUX_CFG(DA830, RMII_RXER, 10, 28, 0xf, 2, false)
  553. MUX_CFG(DA830, AFSR2, 10, 4, 0xf, 4, false)
  554. MUX_CFG(DA830, ACLKX2, 10, 8, 0xf, 4, false)
  555. MUX_CFG(DA830, AXR2_3, 10, 12, 0xf, 4, false)
  556. MUX_CFG(DA830, AXR2_2, 10, 16, 0xf, 4, false)
  557. MUX_CFG(DA830, AXR2_1, 10, 20, 0xf, 4, false)
  558. MUX_CFG(DA830, AFSX2, 10, 24, 0xf, 4, false)
  559. MUX_CFG(DA830, ACLKR2, 10, 28, 0xf, 4, false)
  560. MUX_CFG(DA830, NRESETOUT, 10, 0, 0xf, 8, false)
  561. MUX_CFG(DA830, GPIO3_0, 10, 4, 0xf, 8, false)
  562. MUX_CFG(DA830, GPIO3_1, 10, 8, 0xf, 8, false)
  563. MUX_CFG(DA830, GPIO3_2, 10, 12, 0xf, 8, false)
  564. MUX_CFG(DA830, GPIO3_3, 10, 16, 0xf, 8, false)
  565. MUX_CFG(DA830, GPIO3_4, 10, 20, 0xf, 8, false)
  566. MUX_CFG(DA830, GPIO3_5, 10, 24, 0xf, 8, false)
  567. MUX_CFG(DA830, GPIO3_6, 10, 28, 0xf, 8, false)
  568. MUX_CFG(DA830, AXR0_7, 11, 0, 0xf, 1, false)
  569. MUX_CFG(DA830, AXR0_8, 11, 4, 0xf, 1, false)
  570. MUX_CFG(DA830, UART1_RXD, 11, 8, 0xf, 1, false)
  571. MUX_CFG(DA830, UART1_TXD, 11, 12, 0xf, 1, false)
  572. MUX_CFG(DA830, AXR0_11, 11, 16, 0xf, 1, false)
  573. MUX_CFG(DA830, AHCLKX1, 11, 20, 0xf, 1, false)
  574. MUX_CFG(DA830, ACLKX1, 11, 24, 0xf, 1, false)
  575. MUX_CFG(DA830, AFSX1, 11, 28, 0xf, 1, false)
  576. MUX_CFG(DA830, MDIO_CLK, 11, 0, 0xf, 2, false)
  577. MUX_CFG(DA830, MDIO_D, 11, 4, 0xf, 2, false)
  578. MUX_CFG(DA830, AXR0_9, 11, 8, 0xf, 2, false)
  579. MUX_CFG(DA830, AXR0_10, 11, 12, 0xf, 2, false)
  580. MUX_CFG(DA830, EPWM0B, 11, 20, 0xf, 2, false)
  581. MUX_CFG(DA830, EPWM0A, 11, 24, 0xf, 2, false)
  582. MUX_CFG(DA830, EPWMSYNCI, 11, 28, 0xf, 2, false)
  583. MUX_CFG(DA830, AXR2_0, 11, 16, 0xf, 4, false)
  584. MUX_CFG(DA830, EPWMSYNC0, 11, 28, 0xf, 4, false)
  585. MUX_CFG(DA830, GPIO3_7, 11, 0, 0xf, 8, false)
  586. MUX_CFG(DA830, GPIO3_8, 11, 4, 0xf, 8, false)
  587. MUX_CFG(DA830, GPIO3_9, 11, 8, 0xf, 8, false)
  588. MUX_CFG(DA830, GPIO3_10, 11, 12, 0xf, 8, false)
  589. MUX_CFG(DA830, GPIO3_11, 11, 16, 0xf, 8, false)
  590. MUX_CFG(DA830, GPIO3_14, 11, 20, 0xf, 8, false)
  591. MUX_CFG(DA830, GPIO3_15, 11, 24, 0xf, 8, false)
  592. MUX_CFG(DA830, GPIO4_10, 11, 28, 0xf, 8, false)
  593. MUX_CFG(DA830, AHCLKR1, 12, 0, 0xf, 1, false)
  594. MUX_CFG(DA830, ACLKR1, 12, 4, 0xf, 1, false)
  595. MUX_CFG(DA830, AFSR1, 12, 8, 0xf, 1, false)
  596. MUX_CFG(DA830, AMUTE1, 12, 12, 0xf, 1, false)
  597. MUX_CFG(DA830, AXR1_0, 12, 16, 0xf, 1, false)
  598. MUX_CFG(DA830, AXR1_1, 12, 20, 0xf, 1, false)
  599. MUX_CFG(DA830, AXR1_2, 12, 24, 0xf, 1, false)
  600. MUX_CFG(DA830, AXR1_3, 12, 28, 0xf, 1, false)
  601. MUX_CFG(DA830, ECAP2_APWM2, 12, 4, 0xf, 2, false)
  602. MUX_CFG(DA830, EHRPWMGLUETZ, 12, 12, 0xf, 2, false)
  603. MUX_CFG(DA830, EQEP1A, 12, 28, 0xf, 2, false)
  604. MUX_CFG(DA830, GPIO4_11, 12, 0, 0xf, 8, false)
  605. MUX_CFG(DA830, GPIO4_12, 12, 4, 0xf, 8, false)
  606. MUX_CFG(DA830, GPIO4_13, 12, 8, 0xf, 8, false)
  607. MUX_CFG(DA830, GPIO4_14, 12, 12, 0xf, 8, false)
  608. MUX_CFG(DA830, GPIO4_0, 12, 16, 0xf, 8, false)
  609. MUX_CFG(DA830, GPIO4_1, 12, 20, 0xf, 8, false)
  610. MUX_CFG(DA830, GPIO4_2, 12, 24, 0xf, 8, false)
  611. MUX_CFG(DA830, GPIO4_3, 12, 28, 0xf, 8, false)
  612. MUX_CFG(DA830, AXR1_4, 13, 0, 0xf, 1, false)
  613. MUX_CFG(DA830, AXR1_5, 13, 4, 0xf, 1, false)
  614. MUX_CFG(DA830, AXR1_6, 13, 8, 0xf, 1, false)
  615. MUX_CFG(DA830, AXR1_7, 13, 12, 0xf, 1, false)
  616. MUX_CFG(DA830, AXR1_8, 13, 16, 0xf, 1, false)
  617. MUX_CFG(DA830, AXR1_9, 13, 20, 0xf, 1, false)
  618. MUX_CFG(DA830, EMA_D_0, 13, 24, 0xf, 1, false)
  619. MUX_CFG(DA830, EMA_D_1, 13, 28, 0xf, 1, false)
  620. MUX_CFG(DA830, EQEP1B, 13, 0, 0xf, 2, false)
  621. MUX_CFG(DA830, EPWM2B, 13, 4, 0xf, 2, false)
  622. MUX_CFG(DA830, EPWM2A, 13, 8, 0xf, 2, false)
  623. MUX_CFG(DA830, EPWM1B, 13, 12, 0xf, 2, false)
  624. MUX_CFG(DA830, EPWM1A, 13, 16, 0xf, 2, false)
  625. MUX_CFG(DA830, MMCSD_DAT_0, 13, 24, 0xf, 2, false)
  626. MUX_CFG(DA830, MMCSD_DAT_1, 13, 28, 0xf, 2, false)
  627. MUX_CFG(DA830, UHPI_HD_0, 13, 24, 0xf, 4, false)
  628. MUX_CFG(DA830, UHPI_HD_1, 13, 28, 0xf, 4, false)
  629. MUX_CFG(DA830, GPIO4_4, 13, 0, 0xf, 8, false)
  630. MUX_CFG(DA830, GPIO4_5, 13, 4, 0xf, 8, false)
  631. MUX_CFG(DA830, GPIO4_6, 13, 8, 0xf, 8, false)
  632. MUX_CFG(DA830, GPIO4_7, 13, 12, 0xf, 8, false)
  633. MUX_CFG(DA830, GPIO4_8, 13, 16, 0xf, 8, false)
  634. MUX_CFG(DA830, GPIO4_9, 13, 20, 0xf, 8, false)
  635. MUX_CFG(DA830, GPIO0_0, 13, 24, 0xf, 8, false)
  636. MUX_CFG(DA830, GPIO0_1, 13, 28, 0xf, 8, false)
  637. MUX_CFG(DA830, EMA_D_2, 14, 0, 0xf, 1, false)
  638. MUX_CFG(DA830, EMA_D_3, 14, 4, 0xf, 1, false)
  639. MUX_CFG(DA830, EMA_D_4, 14, 8, 0xf, 1, false)
  640. MUX_CFG(DA830, EMA_D_5, 14, 12, 0xf, 1, false)
  641. MUX_CFG(DA830, EMA_D_6, 14, 16, 0xf, 1, false)
  642. MUX_CFG(DA830, EMA_D_7, 14, 20, 0xf, 1, false)
  643. MUX_CFG(DA830, EMA_D_8, 14, 24, 0xf, 1, false)
  644. MUX_CFG(DA830, EMA_D_9, 14, 28, 0xf, 1, false)
  645. MUX_CFG(DA830, MMCSD_DAT_2, 14, 0, 0xf, 2, false)
  646. MUX_CFG(DA830, MMCSD_DAT_3, 14, 4, 0xf, 2, false)
  647. MUX_CFG(DA830, MMCSD_DAT_4, 14, 8, 0xf, 2, false)
  648. MUX_CFG(DA830, MMCSD_DAT_5, 14, 12, 0xf, 2, false)
  649. MUX_CFG(DA830, MMCSD_DAT_6, 14, 16, 0xf, 2, false)
  650. MUX_CFG(DA830, MMCSD_DAT_7, 14, 20, 0xf, 2, false)
  651. MUX_CFG(DA830, UHPI_HD_8, 14, 24, 0xf, 2, false)
  652. MUX_CFG(DA830, UHPI_HD_9, 14, 28, 0xf, 2, false)
  653. MUX_CFG(DA830, UHPI_HD_2, 14, 0, 0xf, 4, false)
  654. MUX_CFG(DA830, UHPI_HD_3, 14, 4, 0xf, 4, false)
  655. MUX_CFG(DA830, UHPI_HD_4, 14, 8, 0xf, 4, false)
  656. MUX_CFG(DA830, UHPI_HD_5, 14, 12, 0xf, 4, false)
  657. MUX_CFG(DA830, UHPI_HD_6, 14, 16, 0xf, 4, false)
  658. MUX_CFG(DA830, UHPI_HD_7, 14, 20, 0xf, 4, false)
  659. MUX_CFG(DA830, LCD_D_8, 14, 24, 0xf, 4, false)
  660. MUX_CFG(DA830, LCD_D_9, 14, 28, 0xf, 4, false)
  661. MUX_CFG(DA830, GPIO0_2, 14, 0, 0xf, 8, false)
  662. MUX_CFG(DA830, GPIO0_3, 14, 4, 0xf, 8, false)
  663. MUX_CFG(DA830, GPIO0_4, 14, 8, 0xf, 8, false)
  664. MUX_CFG(DA830, GPIO0_5, 14, 12, 0xf, 8, false)
  665. MUX_CFG(DA830, GPIO0_6, 14, 16, 0xf, 8, false)
  666. MUX_CFG(DA830, GPIO0_7, 14, 20, 0xf, 8, false)
  667. MUX_CFG(DA830, GPIO0_8, 14, 24, 0xf, 8, false)
  668. MUX_CFG(DA830, GPIO0_9, 14, 28, 0xf, 8, false)
  669. MUX_CFG(DA830, EMA_D_10, 15, 0, 0xf, 1, false)
  670. MUX_CFG(DA830, EMA_D_11, 15, 4, 0xf, 1, false)
  671. MUX_CFG(DA830, EMA_D_12, 15, 8, 0xf, 1, false)
  672. MUX_CFG(DA830, EMA_D_13, 15, 12, 0xf, 1, false)
  673. MUX_CFG(DA830, EMA_D_14, 15, 16, 0xf, 1, false)
  674. MUX_CFG(DA830, EMA_D_15, 15, 20, 0xf, 1, false)
  675. MUX_CFG(DA830, EMA_A_0, 15, 24, 0xf, 1, false)
  676. MUX_CFG(DA830, EMA_A_1, 15, 28, 0xf, 1, false)
  677. MUX_CFG(DA830, UHPI_HD_10, 15, 0, 0xf, 2, false)
  678. MUX_CFG(DA830, UHPI_HD_11, 15, 4, 0xf, 2, false)
  679. MUX_CFG(DA830, UHPI_HD_12, 15, 8, 0xf, 2, false)
  680. MUX_CFG(DA830, UHPI_HD_13, 15, 12, 0xf, 2, false)
  681. MUX_CFG(DA830, UHPI_HD_14, 15, 16, 0xf, 2, false)
  682. MUX_CFG(DA830, UHPI_HD_15, 15, 20, 0xf, 2, false)
  683. MUX_CFG(DA830, LCD_D_7, 15, 24, 0xf, 2, false)
  684. MUX_CFG(DA830, MMCSD_CLK, 15, 28, 0xf, 2, false)
  685. MUX_CFG(DA830, LCD_D_10, 15, 0, 0xf, 4, false)
  686. MUX_CFG(DA830, LCD_D_11, 15, 4, 0xf, 4, false)
  687. MUX_CFG(DA830, LCD_D_12, 15, 8, 0xf, 4, false)
  688. MUX_CFG(DA830, LCD_D_13, 15, 12, 0xf, 4, false)
  689. MUX_CFG(DA830, LCD_D_14, 15, 16, 0xf, 4, false)
  690. MUX_CFG(DA830, LCD_D_15, 15, 20, 0xf, 4, false)
  691. MUX_CFG(DA830, UHPI_HCNTL0, 15, 28, 0xf, 4, false)
  692. MUX_CFG(DA830, GPIO0_10, 15, 0, 0xf, 8, false)
  693. MUX_CFG(DA830, GPIO0_11, 15, 4, 0xf, 8, false)
  694. MUX_CFG(DA830, GPIO0_12, 15, 8, 0xf, 8, false)
  695. MUX_CFG(DA830, GPIO0_13, 15, 12, 0xf, 8, false)
  696. MUX_CFG(DA830, GPIO0_14, 15, 16, 0xf, 8, false)
  697. MUX_CFG(DA830, GPIO0_15, 15, 20, 0xf, 8, false)
  698. MUX_CFG(DA830, GPIO1_0, 15, 24, 0xf, 8, false)
  699. MUX_CFG(DA830, GPIO1_1, 15, 28, 0xf, 8, false)
  700. MUX_CFG(DA830, EMA_A_2, 16, 0, 0xf, 1, false)
  701. MUX_CFG(DA830, EMA_A_3, 16, 4, 0xf, 1, false)
  702. MUX_CFG(DA830, EMA_A_4, 16, 8, 0xf, 1, false)
  703. MUX_CFG(DA830, EMA_A_5, 16, 12, 0xf, 1, false)
  704. MUX_CFG(DA830, EMA_A_6, 16, 16, 0xf, 1, false)
  705. MUX_CFG(DA830, EMA_A_7, 16, 20, 0xf, 1, false)
  706. MUX_CFG(DA830, EMA_A_8, 16, 24, 0xf, 1, false)
  707. MUX_CFG(DA830, EMA_A_9, 16, 28, 0xf, 1, false)
  708. MUX_CFG(DA830, MMCSD_CMD, 16, 0, 0xf, 2, false)
  709. MUX_CFG(DA830, LCD_D_6, 16, 4, 0xf, 2, false)
  710. MUX_CFG(DA830, LCD_D_3, 16, 8, 0xf, 2, false)
  711. MUX_CFG(DA830, LCD_D_2, 16, 12, 0xf, 2, false)
  712. MUX_CFG(DA830, LCD_D_1, 16, 16, 0xf, 2, false)
  713. MUX_CFG(DA830, LCD_D_0, 16, 20, 0xf, 2, false)
  714. MUX_CFG(DA830, LCD_PCLK, 16, 24, 0xf, 2, false)
  715. MUX_CFG(DA830, LCD_HSYNC, 16, 28, 0xf, 2, false)
  716. MUX_CFG(DA830, UHPI_HCNTL1, 16, 0, 0xf, 4, false)
  717. MUX_CFG(DA830, GPIO1_2, 16, 0, 0xf, 8, false)
  718. MUX_CFG(DA830, GPIO1_3, 16, 4, 0xf, 8, false)
  719. MUX_CFG(DA830, GPIO1_4, 16, 8, 0xf, 8, false)
  720. MUX_CFG(DA830, GPIO1_5, 16, 12, 0xf, 8, false)
  721. MUX_CFG(DA830, GPIO1_6, 16, 16, 0xf, 8, false)
  722. MUX_CFG(DA830, GPIO1_7, 16, 20, 0xf, 8, false)
  723. MUX_CFG(DA830, GPIO1_8, 16, 24, 0xf, 8, false)
  724. MUX_CFG(DA830, GPIO1_9, 16, 28, 0xf, 8, false)
  725. MUX_CFG(DA830, EMA_A_10, 17, 0, 0xf, 1, false)
  726. MUX_CFG(DA830, EMA_A_11, 17, 4, 0xf, 1, false)
  727. MUX_CFG(DA830, EMA_A_12, 17, 8, 0xf, 1, false)
  728. MUX_CFG(DA830, EMA_BA_1, 17, 12, 0xf, 1, false)
  729. MUX_CFG(DA830, EMA_BA_0, 17, 16, 0xf, 1, false)
  730. MUX_CFG(DA830, EMA_CLK, 17, 20, 0xf, 1, false)
  731. MUX_CFG(DA830, EMA_SDCKE, 17, 24, 0xf, 1, false)
  732. MUX_CFG(DA830, NEMA_CAS, 17, 28, 0xf, 1, false)
  733. MUX_CFG(DA830, LCD_VSYNC, 17, 0, 0xf, 2, false)
  734. MUX_CFG(DA830, NLCD_AC_ENB_CS, 17, 4, 0xf, 2, false)
  735. MUX_CFG(DA830, LCD_MCLK, 17, 8, 0xf, 2, false)
  736. MUX_CFG(DA830, LCD_D_5, 17, 12, 0xf, 2, false)
  737. MUX_CFG(DA830, LCD_D_4, 17, 16, 0xf, 2, false)
  738. MUX_CFG(DA830, OBSCLK, 17, 20, 0xf, 2, false)
  739. MUX_CFG(DA830, NEMA_CS_4, 17, 28, 0xf, 2, false)
  740. MUX_CFG(DA830, UHPI_HHWIL, 17, 12, 0xf, 4, false)
  741. MUX_CFG(DA830, AHCLKR2, 17, 20, 0xf, 4, false)
  742. MUX_CFG(DA830, GPIO1_10, 17, 0, 0xf, 8, false)
  743. MUX_CFG(DA830, GPIO1_11, 17, 4, 0xf, 8, false)
  744. MUX_CFG(DA830, GPIO1_12, 17, 8, 0xf, 8, false)
  745. MUX_CFG(DA830, GPIO1_13, 17, 12, 0xf, 8, false)
  746. MUX_CFG(DA830, GPIO1_14, 17, 16, 0xf, 8, false)
  747. MUX_CFG(DA830, GPIO1_15, 17, 20, 0xf, 8, false)
  748. MUX_CFG(DA830, GPIO2_0, 17, 24, 0xf, 8, false)
  749. MUX_CFG(DA830, GPIO2_1, 17, 28, 0xf, 8, false)
  750. MUX_CFG(DA830, NEMA_RAS, 18, 0, 0xf, 1, false)
  751. MUX_CFG(DA830, NEMA_WE, 18, 4, 0xf, 1, false)
  752. MUX_CFG(DA830, NEMA_CS_0, 18, 8, 0xf, 1, false)
  753. MUX_CFG(DA830, NEMA_CS_2, 18, 12, 0xf, 1, false)
  754. MUX_CFG(DA830, NEMA_CS_3, 18, 16, 0xf, 1, false)
  755. MUX_CFG(DA830, NEMA_OE, 18, 20, 0xf, 1, false)
  756. MUX_CFG(DA830, NEMA_WE_DQM_1, 18, 24, 0xf, 1, false)
  757. MUX_CFG(DA830, NEMA_WE_DQM_0, 18, 28, 0xf, 1, false)
  758. MUX_CFG(DA830, NEMA_CS_5, 18, 0, 0xf, 2, false)
  759. MUX_CFG(DA830, UHPI_HRNW, 18, 4, 0xf, 2, false)
  760. MUX_CFG(DA830, NUHPI_HAS, 18, 8, 0xf, 2, false)
  761. MUX_CFG(DA830, NUHPI_HCS, 18, 12, 0xf, 2, false)
  762. MUX_CFG(DA830, NUHPI_HDS1, 18, 20, 0xf, 2, false)
  763. MUX_CFG(DA830, NUHPI_HDS2, 18, 24, 0xf, 2, false)
  764. MUX_CFG(DA830, NUHPI_HINT, 18, 28, 0xf, 2, false)
  765. MUX_CFG(DA830, AXR0_12, 18, 4, 0xf, 4, false)
  766. MUX_CFG(DA830, AMUTE2, 18, 16, 0xf, 4, false)
  767. MUX_CFG(DA830, AXR0_13, 18, 20, 0xf, 4, false)
  768. MUX_CFG(DA830, AXR0_14, 18, 24, 0xf, 4, false)
  769. MUX_CFG(DA830, AXR0_15, 18, 28, 0xf, 4, false)
  770. MUX_CFG(DA830, GPIO2_2, 18, 0, 0xf, 8, false)
  771. MUX_CFG(DA830, GPIO2_3, 18, 4, 0xf, 8, false)
  772. MUX_CFG(DA830, GPIO2_4, 18, 8, 0xf, 8, false)
  773. MUX_CFG(DA830, GPIO2_5, 18, 12, 0xf, 8, false)
  774. MUX_CFG(DA830, GPIO2_6, 18, 16, 0xf, 8, false)
  775. MUX_CFG(DA830, GPIO2_7, 18, 20, 0xf, 8, false)
  776. MUX_CFG(DA830, GPIO2_8, 18, 24, 0xf, 8, false)
  777. MUX_CFG(DA830, GPIO2_9, 18, 28, 0xf, 8, false)
  778. MUX_CFG(DA830, EMA_WAIT_0, 19, 0, 0xf, 1, false)
  779. MUX_CFG(DA830, NUHPI_HRDY, 19, 0, 0xf, 2, false)
  780. MUX_CFG(DA830, GPIO2_10, 19, 0, 0xf, 8, false)
  781. #endif
  782. };
  783. const short da830_emif25_pins[] __initdata = {
  784. DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
  785. DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
  786. DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
  787. DA830_EMA_D_12, DA830_EMA_D_13, DA830_EMA_D_14, DA830_EMA_D_15,
  788. DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3,
  789. DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7,
  790. DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11,
  791. DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_EMA_CLK,
  792. DA830_EMA_SDCKE, DA830_NEMA_CS_4, DA830_NEMA_CS_5, DA830_NEMA_WE,
  793. DA830_NEMA_CS_0, DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE,
  794. DA830_NEMA_WE_DQM_1, DA830_NEMA_WE_DQM_0, DA830_EMA_WAIT_0,
  795. -1
  796. };
  797. const short da830_spi0_pins[] __initdata = {
  798. DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
  799. DA830_NSPI0_SCS_0,
  800. -1
  801. };
  802. const short da830_spi1_pins[] __initdata = {
  803. DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
  804. DA830_NSPI1_SCS_0,
  805. -1
  806. };
  807. const short da830_mmc_sd_pins[] __initdata = {
  808. DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
  809. DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
  810. DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
  811. DA830_MMCSD_CMD,
  812. -1
  813. };
  814. const short da830_uart0_pins[] __initdata = {
  815. DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
  816. -1
  817. };
  818. const short da830_uart1_pins[] __initdata = {
  819. DA830_UART1_RXD, DA830_UART1_TXD,
  820. -1
  821. };
  822. const short da830_uart2_pins[] __initdata = {
  823. DA830_UART2_RXD, DA830_UART2_TXD,
  824. -1
  825. };
  826. const short da830_usb20_pins[] __initdata = {
  827. DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
  828. -1
  829. };
  830. const short da830_usb11_pins[] __initdata = {
  831. DA830_USB_REFCLKIN,
  832. -1
  833. };
  834. const short da830_uhpi_pins[] __initdata = {
  835. DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
  836. DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
  837. DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
  838. DA830_UHPI_HD_12, DA830_UHPI_HD_13, DA830_UHPI_HD_14, DA830_UHPI_HD_15,
  839. DA830_UHPI_HCNTL0, DA830_UHPI_HCNTL1, DA830_UHPI_HHWIL, DA830_UHPI_HRNW,
  840. DA830_NUHPI_HAS, DA830_NUHPI_HCS, DA830_NUHPI_HDS1, DA830_NUHPI_HDS2,
  841. DA830_NUHPI_HINT, DA830_NUHPI_HRDY,
  842. -1
  843. };
  844. const short da830_cpgmac_pins[] __initdata = {
  845. DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
  846. DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
  847. DA830_MDIO_D,
  848. -1
  849. };
  850. const short da830_emif3c_pins[] __initdata = {
  851. DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
  852. DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
  853. DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
  854. DA830_EMB_A_3, DA830_EMB_A_4, DA830_EMB_A_5, DA830_EMB_A_6,
  855. DA830_EMB_A_7, DA830_EMB_A_8, DA830_EMB_A_9, DA830_EMB_A_10,
  856. DA830_EMB_A_11, DA830_EMB_A_12, DA830_NEMB_WE_DQM_3,
  857. DA830_NEMB_WE_DQM_2, DA830_EMB_D_0, DA830_EMB_D_1, DA830_EMB_D_2,
  858. DA830_EMB_D_3, DA830_EMB_D_4, DA830_EMB_D_5, DA830_EMB_D_6,
  859. DA830_EMB_D_7, DA830_EMB_D_8, DA830_EMB_D_9, DA830_EMB_D_10,
  860. DA830_EMB_D_11, DA830_EMB_D_12, DA830_EMB_D_13, DA830_EMB_D_14,
  861. DA830_EMB_D_15, DA830_EMB_D_16, DA830_EMB_D_17, DA830_EMB_D_18,
  862. DA830_EMB_D_19, DA830_EMB_D_20, DA830_EMB_D_21, DA830_EMB_D_22,
  863. DA830_EMB_D_23, DA830_EMB_D_24, DA830_EMB_D_25, DA830_EMB_D_26,
  864. DA830_EMB_D_27, DA830_EMB_D_28, DA830_EMB_D_29, DA830_EMB_D_30,
  865. DA830_EMB_D_31, DA830_NEMB_WE_DQM_1, DA830_NEMB_WE_DQM_0,
  866. -1
  867. };
  868. const short da830_mcasp0_pins[] __initdata = {
  869. DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
  870. DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
  871. DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
  872. DA830_AXR0_4, DA830_AXR0_5, DA830_AXR0_6, DA830_AXR0_7,
  873. DA830_AXR0_8, DA830_AXR0_9, DA830_AXR0_10, DA830_AXR0_11,
  874. DA830_AXR0_12, DA830_AXR0_13, DA830_AXR0_14, DA830_AXR0_15,
  875. -1
  876. };
  877. const short da830_mcasp1_pins[] __initdata = {
  878. DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
  879. DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
  880. DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
  881. DA830_AXR1_4, DA830_AXR1_5, DA830_AXR1_6, DA830_AXR1_7,
  882. DA830_AXR1_8, DA830_AXR1_9, DA830_AXR1_10, DA830_AXR1_11,
  883. -1
  884. };
  885. const short da830_mcasp2_pins[] __initdata = {
  886. DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
  887. DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
  888. DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
  889. -1
  890. };
  891. const short da830_i2c0_pins[] __initdata = {
  892. DA830_I2C0_SDA, DA830_I2C0_SCL,
  893. -1
  894. };
  895. const short da830_i2c1_pins[] __initdata = {
  896. DA830_I2C1_SCL, DA830_I2C1_SDA,
  897. -1
  898. };
  899. const short da830_lcdcntl_pins[] __initdata = {
  900. DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
  901. DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
  902. DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
  903. DA830_LCD_D_12, DA830_LCD_D_13, DA830_LCD_D_14, DA830_LCD_D_15,
  904. DA830_LCD_PCLK, DA830_LCD_HSYNC, DA830_LCD_VSYNC, DA830_NLCD_AC_ENB_CS,
  905. DA830_LCD_MCLK,
  906. -1
  907. };
  908. const short da830_pwm_pins[] __initdata = {
  909. DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
  910. DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
  911. DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
  912. -1
  913. };
  914. const short da830_ecap0_pins[] __initdata = {
  915. DA830_ECAP0_APWM0,
  916. -1
  917. };
  918. const short da830_ecap1_pins[] __initdata = {
  919. DA830_ECAP1_APWM1,
  920. -1
  921. };
  922. const short da830_ecap2_pins[] __initdata = {
  923. DA830_ECAP2_APWM2,
  924. -1
  925. };
  926. const short da830_eqep0_pins[] __initdata = {
  927. DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
  928. -1
  929. };
  930. const short da830_eqep1_pins[] __initdata = {
  931. DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
  932. -1
  933. };
  934. /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
  935. static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = {
  936. [IRQ_DA8XX_COMMTX] = 7,
  937. [IRQ_DA8XX_COMMRX] = 7,
  938. [IRQ_DA8XX_NINT] = 7,
  939. [IRQ_DA8XX_EVTOUT0] = 7,
  940. [IRQ_DA8XX_EVTOUT1] = 7,
  941. [IRQ_DA8XX_EVTOUT2] = 7,
  942. [IRQ_DA8XX_EVTOUT3] = 7,
  943. [IRQ_DA8XX_EVTOUT4] = 7,
  944. [IRQ_DA8XX_EVTOUT5] = 7,
  945. [IRQ_DA8XX_EVTOUT6] = 7,
  946. [IRQ_DA8XX_EVTOUT7] = 7,
  947. [IRQ_DA8XX_CCINT0] = 7,
  948. [IRQ_DA8XX_CCERRINT] = 7,
  949. [IRQ_DA8XX_TCERRINT0] = 7,
  950. [IRQ_DA8XX_AEMIFINT] = 7,
  951. [IRQ_DA8XX_I2CINT0] = 7,
  952. [IRQ_DA8XX_MMCSDINT0] = 7,
  953. [IRQ_DA8XX_MMCSDINT1] = 7,
  954. [IRQ_DA8XX_ALLINT0] = 7,
  955. [IRQ_DA8XX_RTC] = 7,
  956. [IRQ_DA8XX_SPINT0] = 7,
  957. [IRQ_DA8XX_TINT12_0] = 7,
  958. [IRQ_DA8XX_TINT34_0] = 7,
  959. [IRQ_DA8XX_TINT12_1] = 7,
  960. [IRQ_DA8XX_TINT34_1] = 7,
  961. [IRQ_DA8XX_UARTINT0] = 7,
  962. [IRQ_DA8XX_KEYMGRINT] = 7,
  963. [IRQ_DA830_MPUERR] = 7,
  964. [IRQ_DA8XX_CHIPINT0] = 7,
  965. [IRQ_DA8XX_CHIPINT1] = 7,
  966. [IRQ_DA8XX_CHIPINT2] = 7,
  967. [IRQ_DA8XX_CHIPINT3] = 7,
  968. [IRQ_DA8XX_TCERRINT1] = 7,
  969. [IRQ_DA8XX_C0_RX_THRESH_PULSE] = 7,
  970. [IRQ_DA8XX_C0_RX_PULSE] = 7,
  971. [IRQ_DA8XX_C0_TX_PULSE] = 7,
  972. [IRQ_DA8XX_C0_MISC_PULSE] = 7,
  973. [IRQ_DA8XX_C1_RX_THRESH_PULSE] = 7,
  974. [IRQ_DA8XX_C1_RX_PULSE] = 7,
  975. [IRQ_DA8XX_C1_TX_PULSE] = 7,
  976. [IRQ_DA8XX_C1_MISC_PULSE] = 7,
  977. [IRQ_DA8XX_MEMERR] = 7,
  978. [IRQ_DA8XX_GPIO0] = 7,
  979. [IRQ_DA8XX_GPIO1] = 7,
  980. [IRQ_DA8XX_GPIO2] = 7,
  981. [IRQ_DA8XX_GPIO3] = 7,
  982. [IRQ_DA8XX_GPIO4] = 7,
  983. [IRQ_DA8XX_GPIO5] = 7,
  984. [IRQ_DA8XX_GPIO6] = 7,
  985. [IRQ_DA8XX_GPIO7] = 7,
  986. [IRQ_DA8XX_GPIO8] = 7,
  987. [IRQ_DA8XX_I2CINT1] = 7,
  988. [IRQ_DA8XX_LCDINT] = 7,
  989. [IRQ_DA8XX_UARTINT1] = 7,
  990. [IRQ_DA8XX_MCASPINT] = 7,
  991. [IRQ_DA8XX_ALLINT1] = 7,
  992. [IRQ_DA8XX_SPINT1] = 7,
  993. [IRQ_DA8XX_UHPI_INT1] = 7,
  994. [IRQ_DA8XX_USB_INT] = 7,
  995. [IRQ_DA8XX_IRQN] = 7,
  996. [IRQ_DA8XX_RWAKEUP] = 7,
  997. [IRQ_DA8XX_UARTINT2] = 7,
  998. [IRQ_DA8XX_DFTSSINT] = 7,
  999. [IRQ_DA8XX_EHRPWM0] = 7,
  1000. [IRQ_DA8XX_EHRPWM0TZ] = 7,
  1001. [IRQ_DA8XX_EHRPWM1] = 7,
  1002. [IRQ_DA8XX_EHRPWM1TZ] = 7,
  1003. [IRQ_DA830_EHRPWM2] = 7,
  1004. [IRQ_DA830_EHRPWM2TZ] = 7,
  1005. [IRQ_DA8XX_ECAP0] = 7,
  1006. [IRQ_DA8XX_ECAP1] = 7,
  1007. [IRQ_DA8XX_ECAP2] = 7,
  1008. [IRQ_DA830_EQEP0] = 7,
  1009. [IRQ_DA830_EQEP1] = 7,
  1010. [IRQ_DA830_T12CMPINT0_0] = 7,
  1011. [IRQ_DA830_T12CMPINT1_0] = 7,
  1012. [IRQ_DA830_T12CMPINT2_0] = 7,
  1013. [IRQ_DA830_T12CMPINT3_0] = 7,
  1014. [IRQ_DA830_T12CMPINT4_0] = 7,
  1015. [IRQ_DA830_T12CMPINT5_0] = 7,
  1016. [IRQ_DA830_T12CMPINT6_0] = 7,
  1017. [IRQ_DA830_T12CMPINT7_0] = 7,
  1018. [IRQ_DA830_T12CMPINT0_1] = 7,
  1019. [IRQ_DA830_T12CMPINT1_1] = 7,
  1020. [IRQ_DA830_T12CMPINT2_1] = 7,
  1021. [IRQ_DA830_T12CMPINT3_1] = 7,
  1022. [IRQ_DA830_T12CMPINT4_1] = 7,
  1023. [IRQ_DA830_T12CMPINT5_1] = 7,
  1024. [IRQ_DA830_T12CMPINT6_1] = 7,
  1025. [IRQ_DA830_T12CMPINT7_1] = 7,
  1026. [IRQ_DA8XX_ARMCLKSTOPREQ] = 7,
  1027. };
  1028. static struct map_desc da830_io_desc[] = {
  1029. {
  1030. .virtual = IO_VIRT,
  1031. .pfn = __phys_to_pfn(IO_PHYS),
  1032. .length = IO_SIZE,
  1033. .type = MT_DEVICE
  1034. },
  1035. {
  1036. .virtual = DA8XX_CP_INTC_VIRT,
  1037. .pfn = __phys_to_pfn(DA8XX_CP_INTC_BASE),
  1038. .length = DA8XX_CP_INTC_SIZE,
  1039. .type = MT_DEVICE
  1040. },
  1041. };
  1042. static u32 da830_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
  1043. /* Contents of JTAG ID register used to identify exact cpu type */
  1044. static struct davinci_id da830_ids[] = {
  1045. {
  1046. .variant = 0x0,
  1047. .part_no = 0xb7df,
  1048. .manufacturer = 0x017, /* 0x02f >> 1 */
  1049. .cpu_id = DAVINCI_CPU_ID_DA830,
  1050. .name = "da830/omap-l137 rev1.0",
  1051. },
  1052. {
  1053. .variant = 0x8,
  1054. .part_no = 0xb7df,
  1055. .manufacturer = 0x017,
  1056. .cpu_id = DAVINCI_CPU_ID_DA830,
  1057. .name = "da830/omap-l137 rev1.1",
  1058. },
  1059. {
  1060. .variant = 0x9,
  1061. .part_no = 0xb7df,
  1062. .manufacturer = 0x017,
  1063. .cpu_id = DAVINCI_CPU_ID_DA830,
  1064. .name = "da830/omap-l137 rev2.0",
  1065. },
  1066. };
  1067. static struct davinci_timer_instance da830_timer_instance[2] = {
  1068. {
  1069. .base = DA8XX_TIMER64P0_BASE,
  1070. .bottom_irq = IRQ_DA8XX_TINT12_0,
  1071. .top_irq = IRQ_DA8XX_TINT34_0,
  1072. .cmp_off = DA830_CMP12_0,
  1073. .cmp_irq = IRQ_DA830_T12CMPINT0_0,
  1074. },
  1075. {
  1076. .base = DA8XX_TIMER64P1_BASE,
  1077. .bottom_irq = IRQ_DA8XX_TINT12_1,
  1078. .top_irq = IRQ_DA8XX_TINT34_1,
  1079. .cmp_off = DA830_CMP12_0,
  1080. .cmp_irq = IRQ_DA830_T12CMPINT0_1,
  1081. },
  1082. };
  1083. /*
  1084. * T0_BOT: Timer 0, bottom : Used for clock_event & clocksource
  1085. * T0_TOP: Timer 0, top : Used by DSP
  1086. * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer
  1087. */
  1088. static struct davinci_timer_info da830_timer_info = {
  1089. .timers = da830_timer_instance,
  1090. .clockevent_id = T0_BOT,
  1091. .clocksource_id = T0_BOT,
  1092. };
  1093. static struct davinci_soc_info davinci_soc_info_da830 = {
  1094. .io_desc = da830_io_desc,
  1095. .io_desc_num = ARRAY_SIZE(da830_io_desc),
  1096. .jtag_id_reg = DA8XX_SYSCFG0_BASE + DA8XX_JTAG_ID_REG,
  1097. .ids = da830_ids,
  1098. .ids_num = ARRAY_SIZE(da830_ids),
  1099. .cpu_clks = da830_clks,
  1100. .psc_bases = da830_psc_bases,
  1101. .psc_bases_num = ARRAY_SIZE(da830_psc_bases),
  1102. .pinmux_base = DA8XX_SYSCFG0_BASE + 0x120,
  1103. .pinmux_pins = da830_pins,
  1104. .pinmux_pins_num = ARRAY_SIZE(da830_pins),
  1105. .intc_base = DA8XX_CP_INTC_BASE,
  1106. .intc_type = DAVINCI_INTC_TYPE_CP_INTC,
  1107. .intc_irq_prios = da830_default_priorities,
  1108. .intc_irq_num = DA830_N_CP_INTC_IRQ,
  1109. .timer_info = &da830_timer_info,
  1110. .gpio_type = GPIO_TYPE_DAVINCI,
  1111. .gpio_base = DA8XX_GPIO_BASE,
  1112. .gpio_num = 128,
  1113. .gpio_irq = IRQ_DA8XX_GPIO0,
  1114. .serial_dev = &da8xx_serial_device,
  1115. .emac_pdata = &da8xx_emac_pdata,
  1116. };
  1117. void __init da830_init(void)
  1118. {
  1119. davinci_common_init(&davinci_soc_info_da830);
  1120. da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
  1121. WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
  1122. }