blob: 8a79e245db1ff07cece54ece3b3d64f515dd775c [file] [log] [blame]
Mark A. Greer55c79a42009-06-03 18:36:54 -07001/*
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 */
David Lechner3952af12018-05-18 11:48:07 -050011#include <linux/clk-provider.h>
12#include <linux/clk/davinci.h>
Russell King2f8163b2011-07-26 10:53:52 +010013#include <linux/gpio.h>
Mark A. Greer55c79a42009-06-03 18:36:54 -070014#include <linux/init.h>
KV Sujithf606d382013-08-18 10:48:59 +053015#include <linux/platform_data/gpio-davinci.h>
Mark A. Greer55c79a42009-06-03 18:36:54 -070016
17#include <asm/mach/map.h>
18
Mark A. Greer55c79a42009-06-03 18:36:54 -070019#include <mach/common.h>
David Lechner3952af12018-05-18 11:48:07 -050020#include <mach/cputype.h>
Mark A. Greer55c79a42009-06-03 18:36:54 -070021#include <mach/da8xx.h>
David Lechner3952af12018-05-18 11:48:07 -050022#include <mach/irqs.h>
23#include <mach/time.h>
Mark A. Greer55c79a42009-06-03 18:36:54 -070024
Mark A. Greer55c79a42009-06-03 18:36:54 -070025#include "mux.h"
26
David Lechner3952af12018-05-18 11:48:07 -050027#ifndef CONFIG_COMMON_CLK
28#include "clock.h"
29#include "psc.h"
30#endif
31
Mark A. Greer55c79a42009-06-03 18:36:54 -070032/* Offsets of the 8 compare registers on the da830 */
33#define DA830_CMP12_0 0x60
34#define DA830_CMP12_1 0x64
35#define DA830_CMP12_2 0x68
36#define DA830_CMP12_3 0x6c
37#define DA830_CMP12_4 0x70
38#define DA830_CMP12_5 0x74
39#define DA830_CMP12_6 0x78
40#define DA830_CMP12_7 0x7c
41
42#define DA830_REF_FREQ 24000000
43
David Lechner3952af12018-05-18 11:48:07 -050044#ifndef CONFIG_COMMON_CLK
Mark A. Greer55c79a42009-06-03 18:36:54 -070045static struct pll_data pll0_data = {
46 .num = 1,
Rajashekhara, Sudhakarbea238f2009-07-10 02:08:31 -040047 .phys_base = DA8XX_PLL0_BASE,
Mark A. Greer55c79a42009-06-03 18:36:54 -070048 .flags = PLL_HAS_PREDIV | PLL_HAS_POSTDIV,
49};
50
51static struct clk ref_clk = {
52 .name = "ref_clk",
53 .rate = DA830_REF_FREQ,
54};
55
56static struct clk pll0_clk = {
57 .name = "pll0",
58 .parent = &ref_clk,
59 .pll_data = &pll0_data,
60 .flags = CLK_PLL,
61};
62
63static struct clk pll0_aux_clk = {
64 .name = "pll0_aux_clk",
65 .parent = &pll0_clk,
66 .flags = CLK_PLL | PRE_PLL,
67};
68
69static struct clk pll0_sysclk2 = {
70 .name = "pll0_sysclk2",
71 .parent = &pll0_clk,
72 .flags = CLK_PLL,
73 .div_reg = PLLDIV2,
74};
75
76static struct clk pll0_sysclk3 = {
77 .name = "pll0_sysclk3",
78 .parent = &pll0_clk,
79 .flags = CLK_PLL,
80 .div_reg = PLLDIV3,
81};
82
83static struct clk pll0_sysclk4 = {
84 .name = "pll0_sysclk4",
85 .parent = &pll0_clk,
86 .flags = CLK_PLL,
87 .div_reg = PLLDIV4,
88};
89
90static struct clk pll0_sysclk5 = {
91 .name = "pll0_sysclk5",
92 .parent = &pll0_clk,
93 .flags = CLK_PLL,
94 .div_reg = PLLDIV5,
95};
96
97static struct clk pll0_sysclk6 = {
98 .name = "pll0_sysclk6",
99 .parent = &pll0_clk,
100 .flags = CLK_PLL,
101 .div_reg = PLLDIV6,
102};
103
104static struct clk pll0_sysclk7 = {
105 .name = "pll0_sysclk7",
106 .parent = &pll0_clk,
107 .flags = CLK_PLL,
108 .div_reg = PLLDIV7,
109};
110
111static struct clk i2c0_clk = {
112 .name = "i2c0",
113 .parent = &pll0_aux_clk,
114};
115
116static struct clk timerp64_0_clk = {
117 .name = "timer0",
118 .parent = &pll0_aux_clk,
119};
120
121static struct clk timerp64_1_clk = {
122 .name = "timer1",
123 .parent = &pll0_aux_clk,
124};
125
126static struct clk arm_rom_clk = {
127 .name = "arm_rom",
128 .parent = &pll0_sysclk2,
129 .lpsc = DA8XX_LPSC0_ARM_RAM_ROM,
130 .flags = ALWAYS_ENABLED,
131};
132
133static struct clk scr0_ss_clk = {
134 .name = "scr0_ss",
135 .parent = &pll0_sysclk2,
136 .lpsc = DA8XX_LPSC0_SCR0_SS,
137 .flags = ALWAYS_ENABLED,
138};
139
140static struct clk scr1_ss_clk = {
141 .name = "scr1_ss",
142 .parent = &pll0_sysclk2,
143 .lpsc = DA8XX_LPSC0_SCR1_SS,
144 .flags = ALWAYS_ENABLED,
145};
146
147static struct clk scr2_ss_clk = {
148 .name = "scr2_ss",
149 .parent = &pll0_sysclk2,
150 .lpsc = DA8XX_LPSC0_SCR2_SS,
151 .flags = ALWAYS_ENABLED,
152};
153
154static struct clk dmax_clk = {
155 .name = "dmax",
156 .parent = &pll0_sysclk2,
Subhasish Ghosh9a9fb122011-03-07 14:06:57 +0000157 .lpsc = DA8XX_LPSC0_PRUSS,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700158 .flags = ALWAYS_ENABLED,
159};
160
161static struct clk tpcc_clk = {
162 .name = "tpcc",
163 .parent = &pll0_sysclk2,
164 .lpsc = DA8XX_LPSC0_TPCC,
165 .flags = ALWAYS_ENABLED | CLK_PSC,
166};
167
168static struct clk tptc0_clk = {
169 .name = "tptc0",
170 .parent = &pll0_sysclk2,
171 .lpsc = DA8XX_LPSC0_TPTC0,
172 .flags = ALWAYS_ENABLED,
173};
174
175static struct clk tptc1_clk = {
176 .name = "tptc1",
177 .parent = &pll0_sysclk2,
178 .lpsc = DA8XX_LPSC0_TPTC1,
179 .flags = ALWAYS_ENABLED,
180};
181
182static struct clk mmcsd_clk = {
183 .name = "mmcsd",
184 .parent = &pll0_sysclk2,
185 .lpsc = DA8XX_LPSC0_MMC_SD,
186};
187
188static struct clk uart0_clk = {
189 .name = "uart0",
190 .parent = &pll0_sysclk2,
191 .lpsc = DA8XX_LPSC0_UART0,
192};
193
194static struct clk uart1_clk = {
195 .name = "uart1",
196 .parent = &pll0_sysclk2,
197 .lpsc = DA8XX_LPSC1_UART1,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400198 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700199};
200
201static struct clk uart2_clk = {
202 .name = "uart2",
203 .parent = &pll0_sysclk2,
204 .lpsc = DA8XX_LPSC1_UART2,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400205 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700206};
207
208static struct clk spi0_clk = {
209 .name = "spi0",
210 .parent = &pll0_sysclk2,
211 .lpsc = DA8XX_LPSC0_SPI0,
212};
213
214static struct clk spi1_clk = {
215 .name = "spi1",
216 .parent = &pll0_sysclk2,
217 .lpsc = DA8XX_LPSC1_SPI1,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400218 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700219};
220
221static struct clk ecap0_clk = {
222 .name = "ecap0",
223 .parent = &pll0_sysclk2,
224 .lpsc = DA8XX_LPSC1_ECAP,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400225 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700226};
227
228static struct clk ecap1_clk = {
229 .name = "ecap1",
230 .parent = &pll0_sysclk2,
231 .lpsc = DA8XX_LPSC1_ECAP,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400232 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700233};
234
235static struct clk ecap2_clk = {
236 .name = "ecap2",
237 .parent = &pll0_sysclk2,
238 .lpsc = DA8XX_LPSC1_ECAP,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400239 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700240};
241
242static struct clk pwm0_clk = {
243 .name = "pwm0",
244 .parent = &pll0_sysclk2,
245 .lpsc = DA8XX_LPSC1_PWM,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400246 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700247};
248
249static struct clk pwm1_clk = {
250 .name = "pwm1",
251 .parent = &pll0_sysclk2,
252 .lpsc = DA8XX_LPSC1_PWM,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400253 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700254};
255
256static struct clk pwm2_clk = {
257 .name = "pwm2",
258 .parent = &pll0_sysclk2,
259 .lpsc = DA8XX_LPSC1_PWM,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400260 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700261};
262
263static struct clk eqep0_clk = {
264 .name = "eqep0",
265 .parent = &pll0_sysclk2,
266 .lpsc = DA830_LPSC1_EQEP,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400267 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700268};
269
270static struct clk eqep1_clk = {
271 .name = "eqep1",
272 .parent = &pll0_sysclk2,
273 .lpsc = DA830_LPSC1_EQEP,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400274 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700275};
276
277static struct clk lcdc_clk = {
278 .name = "lcdc",
279 .parent = &pll0_sysclk2,
280 .lpsc = DA8XX_LPSC1_LCDC,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400281 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700282};
283
284static struct clk mcasp0_clk = {
285 .name = "mcasp0",
286 .parent = &pll0_sysclk2,
287 .lpsc = DA8XX_LPSC1_McASP0,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400288 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700289};
290
291static struct clk mcasp1_clk = {
292 .name = "mcasp1",
293 .parent = &pll0_sysclk2,
294 .lpsc = DA830_LPSC1_McASP1,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400295 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700296};
297
298static struct clk mcasp2_clk = {
299 .name = "mcasp2",
300 .parent = &pll0_sysclk2,
301 .lpsc = DA830_LPSC1_McASP2,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400302 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700303};
304
305static struct clk usb20_clk = {
306 .name = "usb20",
307 .parent = &pll0_sysclk2,
308 .lpsc = DA8XX_LPSC1_USB20,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400309 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700310};
311
Alexandre Bailon398dbc72017-04-05 19:17:50 +0200312static struct clk cppi41_clk = {
313 .name = "cppi41",
314 .parent = &usb20_clk,
315};
316
Mark A. Greer55c79a42009-06-03 18:36:54 -0700317static struct clk aemif_clk = {
318 .name = "aemif",
319 .parent = &pll0_sysclk3,
320 .lpsc = DA8XX_LPSC0_EMIF25,
321 .flags = ALWAYS_ENABLED,
322};
323
324static struct clk aintc_clk = {
325 .name = "aintc",
326 .parent = &pll0_sysclk4,
327 .lpsc = DA8XX_LPSC0_AINTC,
328 .flags = ALWAYS_ENABLED,
329};
330
331static struct clk secu_mgr_clk = {
332 .name = "secu_mgr",
333 .parent = &pll0_sysclk4,
334 .lpsc = DA8XX_LPSC0_SECU_MGR,
335 .flags = ALWAYS_ENABLED,
336};
337
338static struct clk emac_clk = {
339 .name = "emac",
340 .parent = &pll0_sysclk4,
341 .lpsc = DA8XX_LPSC1_CPGMAC,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400342 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700343};
344
345static struct clk gpio_clk = {
346 .name = "gpio",
347 .parent = &pll0_sysclk4,
348 .lpsc = DA8XX_LPSC1_GPIO,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400349 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700350};
351
352static struct clk i2c1_clk = {
353 .name = "i2c1",
354 .parent = &pll0_sysclk4,
355 .lpsc = DA8XX_LPSC1_I2C,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400356 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700357};
358
359static struct clk usb11_clk = {
360 .name = "usb11",
361 .parent = &pll0_sysclk4,
362 .lpsc = DA8XX_LPSC1_USB11,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400363 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700364};
365
366static struct clk emif3_clk = {
367 .name = "emif3",
368 .parent = &pll0_sysclk5,
369 .lpsc = DA8XX_LPSC1_EMIF3C,
Sergei Shtylyov789a7852009-09-30 19:48:03 +0400370 .gpsc = 1,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700371 .flags = ALWAYS_ENABLED,
Mark A. Greer55c79a42009-06-03 18:36:54 -0700372};
373
374static struct clk arm_clk = {
375 .name = "arm",
376 .parent = &pll0_sysclk6,
377 .lpsc = DA8XX_LPSC0_ARM,
378 .flags = ALWAYS_ENABLED,
379};
380
381static struct clk rmii_clk = {
382 .name = "rmii",
383 .parent = &pll0_sysclk7,
384};
385
Kevin Hilman08aca082010-01-11 08:22:23 -0800386static struct clk_lookup da830_clks[] = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700387 CLK(NULL, "ref", &ref_clk),
388 CLK(NULL, "pll0", &pll0_clk),
389 CLK(NULL, "pll0_aux", &pll0_aux_clk),
390 CLK(NULL, "pll0_sysclk2", &pll0_sysclk2),
391 CLK(NULL, "pll0_sysclk3", &pll0_sysclk3),
392 CLK(NULL, "pll0_sysclk4", &pll0_sysclk4),
393 CLK(NULL, "pll0_sysclk5", &pll0_sysclk5),
394 CLK(NULL, "pll0_sysclk6", &pll0_sysclk6),
395 CLK(NULL, "pll0_sysclk7", &pll0_sysclk7),
396 CLK("i2c_davinci.1", NULL, &i2c0_clk),
397 CLK(NULL, "timer0", &timerp64_0_clk),
Ivan Khoronzhuk84374812013-11-27 15:31:53 +0200398 CLK("davinci-wdt", NULL, &timerp64_1_clk),
Mark A. Greer55c79a42009-06-03 18:36:54 -0700399 CLK(NULL, "arm_rom", &arm_rom_clk),
400 CLK(NULL, "scr0_ss", &scr0_ss_clk),
401 CLK(NULL, "scr1_ss", &scr1_ss_clk),
402 CLK(NULL, "scr2_ss", &scr2_ss_clk),
403 CLK(NULL, "dmax", &dmax_clk),
404 CLK(NULL, "tpcc", &tpcc_clk),
405 CLK(NULL, "tptc0", &tptc0_clk),
406 CLK(NULL, "tptc1", &tptc1_clk),
Manjunathappa, Prakashd7ca4c72013-03-28 18:41:59 +0530407 CLK("da830-mmc.0", NULL, &mmcsd_clk),
Manjunathappa, Prakash19955c32013-06-19 14:45:38 +0530408 CLK("serial8250.0", NULL, &uart0_clk),
409 CLK("serial8250.1", NULL, &uart1_clk),
410 CLK("serial8250.2", NULL, &uart2_clk),
Michael Williamson4918b402011-02-22 13:36:59 +0000411 CLK("spi_davinci.0", NULL, &spi0_clk),
412 CLK("spi_davinci.1", NULL, &spi1_clk),
Mark A. Greer55c79a42009-06-03 18:36:54 -0700413 CLK(NULL, "ecap0", &ecap0_clk),
414 CLK(NULL, "ecap1", &ecap1_clk),
415 CLK(NULL, "ecap2", &ecap2_clk),
416 CLK(NULL, "pwm0", &pwm0_clk),
417 CLK(NULL, "pwm1", &pwm1_clk),
418 CLK(NULL, "pwm2", &pwm2_clk),
419 CLK("eqep.0", NULL, &eqep0_clk),
420 CLK("eqep.1", NULL, &eqep1_clk),
Manjunathappa81cec3c2012-11-20 18:11:01 +0530421 CLK("da8xx_lcdc.0", "fck", &lcdc_clk),
Chaithrika U Se33ef5e2009-08-11 17:01:59 -0400422 CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
423 CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
424 CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
David Lechner102402a2018-01-06 21:19:52 -0600425 CLK("musb-da8xx", NULL, &usb20_clk),
Alexandre Bailon398dbc72017-04-05 19:17:50 +0200426 CLK("cppi41-dmaengine", NULL, &cppi41_clk),
Mark A. Greer55c79a42009-06-03 18:36:54 -0700427 CLK(NULL, "aemif", &aemif_clk),
428 CLK(NULL, "aintc", &aintc_clk),
429 CLK(NULL, "secu_mgr", &secu_mgr_clk),
430 CLK("davinci_emac.1", NULL, &emac_clk),
Lad, Prabhakar46c18332013-08-15 11:31:33 +0530431 CLK("davinci_mdio.0", "fck", &emac_clk),
Mark A. Greer55c79a42009-06-03 18:36:54 -0700432 CLK(NULL, "gpio", &gpio_clk),
433 CLK("i2c_davinci.2", NULL, &i2c1_clk),
David Lechner102402a2018-01-06 21:19:52 -0600434 CLK("ohci-da8xx", NULL, &usb11_clk),
Mark A. Greer55c79a42009-06-03 18:36:54 -0700435 CLK(NULL, "emif3", &emif3_clk),
436 CLK(NULL, "arm", &arm_clk),
437 CLK(NULL, "rmii", &rmii_clk),
438 CLK(NULL, NULL, NULL),
439};
David Lechner3952af12018-05-18 11:48:07 -0500440#endif
Mark A. Greer55c79a42009-06-03 18:36:54 -0700441
Mark A. Greer55c79a42009-06-03 18:36:54 -0700442/*
443 * Device specific mux setup
444 *
445 * soc description mux mode mode mux dbg
446 * reg offset mask mode
447 */
448static const struct mux_config da830_pins[] = {
449#ifdef CONFIG_DAVINCI_MUX
450 MUX_CFG(DA830, GPIO7_14, 0, 0, 0xf, 1, false)
451 MUX_CFG(DA830, RTCK, 0, 0, 0xf, 8, false)
452 MUX_CFG(DA830, GPIO7_15, 0, 4, 0xf, 1, false)
453 MUX_CFG(DA830, EMU_0, 0, 4, 0xf, 8, false)
454 MUX_CFG(DA830, EMB_SDCKE, 0, 8, 0xf, 1, false)
455 MUX_CFG(DA830, EMB_CLK_GLUE, 0, 12, 0xf, 1, false)
456 MUX_CFG(DA830, EMB_CLK, 0, 12, 0xf, 2, false)
457 MUX_CFG(DA830, NEMB_CS_0, 0, 16, 0xf, 1, false)
458 MUX_CFG(DA830, NEMB_CAS, 0, 20, 0xf, 1, false)
459 MUX_CFG(DA830, NEMB_RAS, 0, 24, 0xf, 1, false)
460 MUX_CFG(DA830, NEMB_WE, 0, 28, 0xf, 1, false)
461 MUX_CFG(DA830, EMB_BA_1, 1, 0, 0xf, 1, false)
462 MUX_CFG(DA830, EMB_BA_0, 1, 4, 0xf, 1, false)
463 MUX_CFG(DA830, EMB_A_0, 1, 8, 0xf, 1, false)
464 MUX_CFG(DA830, EMB_A_1, 1, 12, 0xf, 1, false)
465 MUX_CFG(DA830, EMB_A_2, 1, 16, 0xf, 1, false)
466 MUX_CFG(DA830, EMB_A_3, 1, 20, 0xf, 1, false)
467 MUX_CFG(DA830, EMB_A_4, 1, 24, 0xf, 1, false)
468 MUX_CFG(DA830, EMB_A_5, 1, 28, 0xf, 1, false)
469 MUX_CFG(DA830, GPIO7_0, 1, 0, 0xf, 8, false)
470 MUX_CFG(DA830, GPIO7_1, 1, 4, 0xf, 8, false)
471 MUX_CFG(DA830, GPIO7_2, 1, 8, 0xf, 8, false)
472 MUX_CFG(DA830, GPIO7_3, 1, 12, 0xf, 8, false)
473 MUX_CFG(DA830, GPIO7_4, 1, 16, 0xf, 8, false)
474 MUX_CFG(DA830, GPIO7_5, 1, 20, 0xf, 8, false)
475 MUX_CFG(DA830, GPIO7_6, 1, 24, 0xf, 8, false)
476 MUX_CFG(DA830, GPIO7_7, 1, 28, 0xf, 8, false)
477 MUX_CFG(DA830, EMB_A_6, 2, 0, 0xf, 1, false)
478 MUX_CFG(DA830, EMB_A_7, 2, 4, 0xf, 1, false)
479 MUX_CFG(DA830, EMB_A_8, 2, 8, 0xf, 1, false)
480 MUX_CFG(DA830, EMB_A_9, 2, 12, 0xf, 1, false)
481 MUX_CFG(DA830, EMB_A_10, 2, 16, 0xf, 1, false)
482 MUX_CFG(DA830, EMB_A_11, 2, 20, 0xf, 1, false)
483 MUX_CFG(DA830, EMB_A_12, 2, 24, 0xf, 1, false)
484 MUX_CFG(DA830, EMB_D_31, 2, 28, 0xf, 1, false)
485 MUX_CFG(DA830, GPIO7_8, 2, 0, 0xf, 8, false)
486 MUX_CFG(DA830, GPIO7_9, 2, 4, 0xf, 8, false)
487 MUX_CFG(DA830, GPIO7_10, 2, 8, 0xf, 8, false)
488 MUX_CFG(DA830, GPIO7_11, 2, 12, 0xf, 8, false)
489 MUX_CFG(DA830, GPIO7_12, 2, 16, 0xf, 8, false)
490 MUX_CFG(DA830, GPIO7_13, 2, 20, 0xf, 8, false)
491 MUX_CFG(DA830, GPIO3_13, 2, 24, 0xf, 8, false)
492 MUX_CFG(DA830, EMB_D_30, 3, 0, 0xf, 1, false)
493 MUX_CFG(DA830, EMB_D_29, 3, 4, 0xf, 1, false)
494 MUX_CFG(DA830, EMB_D_28, 3, 8, 0xf, 1, false)
495 MUX_CFG(DA830, EMB_D_27, 3, 12, 0xf, 1, false)
496 MUX_CFG(DA830, EMB_D_26, 3, 16, 0xf, 1, false)
497 MUX_CFG(DA830, EMB_D_25, 3, 20, 0xf, 1, false)
498 MUX_CFG(DA830, EMB_D_24, 3, 24, 0xf, 1, false)
499 MUX_CFG(DA830, EMB_D_23, 3, 28, 0xf, 1, false)
500 MUX_CFG(DA830, EMB_D_22, 4, 0, 0xf, 1, false)
501 MUX_CFG(DA830, EMB_D_21, 4, 4, 0xf, 1, false)
502 MUX_CFG(DA830, EMB_D_20, 4, 8, 0xf, 1, false)
503 MUX_CFG(DA830, EMB_D_19, 4, 12, 0xf, 1, false)
504 MUX_CFG(DA830, EMB_D_18, 4, 16, 0xf, 1, false)
505 MUX_CFG(DA830, EMB_D_17, 4, 20, 0xf, 1, false)
506 MUX_CFG(DA830, EMB_D_16, 4, 24, 0xf, 1, false)
507 MUX_CFG(DA830, NEMB_WE_DQM_3, 4, 28, 0xf, 1, false)
508 MUX_CFG(DA830, NEMB_WE_DQM_2, 5, 0, 0xf, 1, false)
509 MUX_CFG(DA830, EMB_D_0, 5, 4, 0xf, 1, false)
510 MUX_CFG(DA830, EMB_D_1, 5, 8, 0xf, 1, false)
511 MUX_CFG(DA830, EMB_D_2, 5, 12, 0xf, 1, false)
512 MUX_CFG(DA830, EMB_D_3, 5, 16, 0xf, 1, false)
513 MUX_CFG(DA830, EMB_D_4, 5, 20, 0xf, 1, false)
514 MUX_CFG(DA830, EMB_D_5, 5, 24, 0xf, 1, false)
515 MUX_CFG(DA830, EMB_D_6, 5, 28, 0xf, 1, false)
516 MUX_CFG(DA830, GPIO6_0, 5, 4, 0xf, 8, false)
517 MUX_CFG(DA830, GPIO6_1, 5, 8, 0xf, 8, false)
518 MUX_CFG(DA830, GPIO6_2, 5, 12, 0xf, 8, false)
519 MUX_CFG(DA830, GPIO6_3, 5, 16, 0xf, 8, false)
520 MUX_CFG(DA830, GPIO6_4, 5, 20, 0xf, 8, false)
521 MUX_CFG(DA830, GPIO6_5, 5, 24, 0xf, 8, false)
522 MUX_CFG(DA830, GPIO6_6, 5, 28, 0xf, 8, false)
523 MUX_CFG(DA830, EMB_D_7, 6, 0, 0xf, 1, false)
524 MUX_CFG(DA830, EMB_D_8, 6, 4, 0xf, 1, false)
525 MUX_CFG(DA830, EMB_D_9, 6, 8, 0xf, 1, false)
526 MUX_CFG(DA830, EMB_D_10, 6, 12, 0xf, 1, false)
527 MUX_CFG(DA830, EMB_D_11, 6, 16, 0xf, 1, false)
528 MUX_CFG(DA830, EMB_D_12, 6, 20, 0xf, 1, false)
529 MUX_CFG(DA830, EMB_D_13, 6, 24, 0xf, 1, false)
530 MUX_CFG(DA830, EMB_D_14, 6, 28, 0xf, 1, false)
531 MUX_CFG(DA830, GPIO6_7, 6, 0, 0xf, 8, false)
532 MUX_CFG(DA830, GPIO6_8, 6, 4, 0xf, 8, false)
533 MUX_CFG(DA830, GPIO6_9, 6, 8, 0xf, 8, false)
534 MUX_CFG(DA830, GPIO6_10, 6, 12, 0xf, 8, false)
535 MUX_CFG(DA830, GPIO6_11, 6, 16, 0xf, 8, false)
536 MUX_CFG(DA830, GPIO6_12, 6, 20, 0xf, 8, false)
537 MUX_CFG(DA830, GPIO6_13, 6, 24, 0xf, 8, false)
538 MUX_CFG(DA830, GPIO6_14, 6, 28, 0xf, 8, false)
539 MUX_CFG(DA830, EMB_D_15, 7, 0, 0xf, 1, false)
540 MUX_CFG(DA830, NEMB_WE_DQM_1, 7, 4, 0xf, 1, false)
541 MUX_CFG(DA830, NEMB_WE_DQM_0, 7, 8, 0xf, 1, false)
542 MUX_CFG(DA830, SPI0_SOMI_0, 7, 12, 0xf, 1, false)
543 MUX_CFG(DA830, SPI0_SIMO_0, 7, 16, 0xf, 1, false)
544 MUX_CFG(DA830, SPI0_CLK, 7, 20, 0xf, 1, false)
545 MUX_CFG(DA830, NSPI0_ENA, 7, 24, 0xf, 1, false)
546 MUX_CFG(DA830, NSPI0_SCS_0, 7, 28, 0xf, 1, false)
547 MUX_CFG(DA830, EQEP0I, 7, 12, 0xf, 2, false)
548 MUX_CFG(DA830, EQEP0S, 7, 16, 0xf, 2, false)
549 MUX_CFG(DA830, EQEP1I, 7, 20, 0xf, 2, false)
550 MUX_CFG(DA830, NUART0_CTS, 7, 24, 0xf, 2, false)
551 MUX_CFG(DA830, NUART0_RTS, 7, 28, 0xf, 2, false)
552 MUX_CFG(DA830, EQEP0A, 7, 24, 0xf, 4, false)
553 MUX_CFG(DA830, EQEP0B, 7, 28, 0xf, 4, false)
554 MUX_CFG(DA830, GPIO6_15, 7, 0, 0xf, 8, false)
555 MUX_CFG(DA830, GPIO5_14, 7, 4, 0xf, 8, false)
556 MUX_CFG(DA830, GPIO5_15, 7, 8, 0xf, 8, false)
557 MUX_CFG(DA830, GPIO5_0, 7, 12, 0xf, 8, false)
558 MUX_CFG(DA830, GPIO5_1, 7, 16, 0xf, 8, false)
559 MUX_CFG(DA830, GPIO5_2, 7, 20, 0xf, 8, false)
560 MUX_CFG(DA830, GPIO5_3, 7, 24, 0xf, 8, false)
561 MUX_CFG(DA830, GPIO5_4, 7, 28, 0xf, 8, false)
562 MUX_CFG(DA830, SPI1_SOMI_0, 8, 0, 0xf, 1, false)
563 MUX_CFG(DA830, SPI1_SIMO_0, 8, 4, 0xf, 1, false)
564 MUX_CFG(DA830, SPI1_CLK, 8, 8, 0xf, 1, false)
565 MUX_CFG(DA830, UART0_RXD, 8, 12, 0xf, 1, false)
566 MUX_CFG(DA830, UART0_TXD, 8, 16, 0xf, 1, false)
567 MUX_CFG(DA830, AXR1_10, 8, 20, 0xf, 1, false)
568 MUX_CFG(DA830, AXR1_11, 8, 24, 0xf, 1, false)
569 MUX_CFG(DA830, NSPI1_ENA, 8, 28, 0xf, 1, false)
570 MUX_CFG(DA830, I2C1_SCL, 8, 0, 0xf, 2, false)
571 MUX_CFG(DA830, I2C1_SDA, 8, 4, 0xf, 2, false)
572 MUX_CFG(DA830, EQEP1S, 8, 8, 0xf, 2, false)
573 MUX_CFG(DA830, I2C0_SDA, 8, 12, 0xf, 2, false)
574 MUX_CFG(DA830, I2C0_SCL, 8, 16, 0xf, 2, false)
575 MUX_CFG(DA830, UART2_RXD, 8, 28, 0xf, 2, false)
576 MUX_CFG(DA830, TM64P0_IN12, 8, 12, 0xf, 4, false)
577 MUX_CFG(DA830, TM64P0_OUT12, 8, 16, 0xf, 4, false)
578 MUX_CFG(DA830, GPIO5_5, 8, 0, 0xf, 8, false)
579 MUX_CFG(DA830, GPIO5_6, 8, 4, 0xf, 8, false)
580 MUX_CFG(DA830, GPIO5_7, 8, 8, 0xf, 8, false)
581 MUX_CFG(DA830, GPIO5_8, 8, 12, 0xf, 8, false)
582 MUX_CFG(DA830, GPIO5_9, 8, 16, 0xf, 8, false)
583 MUX_CFG(DA830, GPIO5_10, 8, 20, 0xf, 8, false)
584 MUX_CFG(DA830, GPIO5_11, 8, 24, 0xf, 8, false)
585 MUX_CFG(DA830, GPIO5_12, 8, 28, 0xf, 8, false)
586 MUX_CFG(DA830, NSPI1_SCS_0, 9, 0, 0xf, 1, false)
587 MUX_CFG(DA830, USB0_DRVVBUS, 9, 4, 0xf, 1, false)
588 MUX_CFG(DA830, AHCLKX0, 9, 8, 0xf, 1, false)
589 MUX_CFG(DA830, ACLKX0, 9, 12, 0xf, 1, false)
590 MUX_CFG(DA830, AFSX0, 9, 16, 0xf, 1, false)
591 MUX_CFG(DA830, AHCLKR0, 9, 20, 0xf, 1, false)
592 MUX_CFG(DA830, ACLKR0, 9, 24, 0xf, 1, false)
593 MUX_CFG(DA830, AFSR0, 9, 28, 0xf, 1, false)
594 MUX_CFG(DA830, UART2_TXD, 9, 0, 0xf, 2, false)
595 MUX_CFG(DA830, AHCLKX2, 9, 8, 0xf, 2, false)
596 MUX_CFG(DA830, ECAP0_APWM0, 9, 12, 0xf, 2, false)
597 MUX_CFG(DA830, RMII_MHZ_50_CLK, 9, 20, 0xf, 2, false)
598 MUX_CFG(DA830, ECAP1_APWM1, 9, 24, 0xf, 2, false)
599 MUX_CFG(DA830, USB_REFCLKIN, 9, 8, 0xf, 4, false)
600 MUX_CFG(DA830, GPIO5_13, 9, 0, 0xf, 8, false)
601 MUX_CFG(DA830, GPIO4_15, 9, 4, 0xf, 8, false)
602 MUX_CFG(DA830, GPIO2_11, 9, 8, 0xf, 8, false)
603 MUX_CFG(DA830, GPIO2_12, 9, 12, 0xf, 8, false)
604 MUX_CFG(DA830, GPIO2_13, 9, 16, 0xf, 8, false)
605 MUX_CFG(DA830, GPIO2_14, 9, 20, 0xf, 8, false)
606 MUX_CFG(DA830, GPIO2_15, 9, 24, 0xf, 8, false)
607 MUX_CFG(DA830, GPIO3_12, 9, 28, 0xf, 8, false)
608 MUX_CFG(DA830, AMUTE0, 10, 0, 0xf, 1, false)
609 MUX_CFG(DA830, AXR0_0, 10, 4, 0xf, 1, false)
610 MUX_CFG(DA830, AXR0_1, 10, 8, 0xf, 1, false)
611 MUX_CFG(DA830, AXR0_2, 10, 12, 0xf, 1, false)
612 MUX_CFG(DA830, AXR0_3, 10, 16, 0xf, 1, false)
613 MUX_CFG(DA830, AXR0_4, 10, 20, 0xf, 1, false)
614 MUX_CFG(DA830, AXR0_5, 10, 24, 0xf, 1, false)
615 MUX_CFG(DA830, AXR0_6, 10, 28, 0xf, 1, false)
616 MUX_CFG(DA830, RMII_TXD_0, 10, 4, 0xf, 2, false)
617 MUX_CFG(DA830, RMII_TXD_1, 10, 8, 0xf, 2, false)
618 MUX_CFG(DA830, RMII_TXEN, 10, 12, 0xf, 2, false)
619 MUX_CFG(DA830, RMII_CRS_DV, 10, 16, 0xf, 2, false)
620 MUX_CFG(DA830, RMII_RXD_0, 10, 20, 0xf, 2, false)
621 MUX_CFG(DA830, RMII_RXD_1, 10, 24, 0xf, 2, false)
622 MUX_CFG(DA830, RMII_RXER, 10, 28, 0xf, 2, false)
623 MUX_CFG(DA830, AFSR2, 10, 4, 0xf, 4, false)
624 MUX_CFG(DA830, ACLKX2, 10, 8, 0xf, 4, false)
625 MUX_CFG(DA830, AXR2_3, 10, 12, 0xf, 4, false)
626 MUX_CFG(DA830, AXR2_2, 10, 16, 0xf, 4, false)
627 MUX_CFG(DA830, AXR2_1, 10, 20, 0xf, 4, false)
628 MUX_CFG(DA830, AFSX2, 10, 24, 0xf, 4, false)
629 MUX_CFG(DA830, ACLKR2, 10, 28, 0xf, 4, false)
630 MUX_CFG(DA830, NRESETOUT, 10, 0, 0xf, 8, false)
631 MUX_CFG(DA830, GPIO3_0, 10, 4, 0xf, 8, false)
632 MUX_CFG(DA830, GPIO3_1, 10, 8, 0xf, 8, false)
633 MUX_CFG(DA830, GPIO3_2, 10, 12, 0xf, 8, false)
634 MUX_CFG(DA830, GPIO3_3, 10, 16, 0xf, 8, false)
635 MUX_CFG(DA830, GPIO3_4, 10, 20, 0xf, 8, false)
636 MUX_CFG(DA830, GPIO3_5, 10, 24, 0xf, 8, false)
637 MUX_CFG(DA830, GPIO3_6, 10, 28, 0xf, 8, false)
638 MUX_CFG(DA830, AXR0_7, 11, 0, 0xf, 1, false)
639 MUX_CFG(DA830, AXR0_8, 11, 4, 0xf, 1, false)
640 MUX_CFG(DA830, UART1_RXD, 11, 8, 0xf, 1, false)
641 MUX_CFG(DA830, UART1_TXD, 11, 12, 0xf, 1, false)
642 MUX_CFG(DA830, AXR0_11, 11, 16, 0xf, 1, false)
643 MUX_CFG(DA830, AHCLKX1, 11, 20, 0xf, 1, false)
644 MUX_CFG(DA830, ACLKX1, 11, 24, 0xf, 1, false)
645 MUX_CFG(DA830, AFSX1, 11, 28, 0xf, 1, false)
646 MUX_CFG(DA830, MDIO_CLK, 11, 0, 0xf, 2, false)
647 MUX_CFG(DA830, MDIO_D, 11, 4, 0xf, 2, false)
648 MUX_CFG(DA830, AXR0_9, 11, 8, 0xf, 2, false)
649 MUX_CFG(DA830, AXR0_10, 11, 12, 0xf, 2, false)
650 MUX_CFG(DA830, EPWM0B, 11, 20, 0xf, 2, false)
651 MUX_CFG(DA830, EPWM0A, 11, 24, 0xf, 2, false)
652 MUX_CFG(DA830, EPWMSYNCI, 11, 28, 0xf, 2, false)
653 MUX_CFG(DA830, AXR2_0, 11, 16, 0xf, 4, false)
654 MUX_CFG(DA830, EPWMSYNC0, 11, 28, 0xf, 4, false)
655 MUX_CFG(DA830, GPIO3_7, 11, 0, 0xf, 8, false)
656 MUX_CFG(DA830, GPIO3_8, 11, 4, 0xf, 8, false)
657 MUX_CFG(DA830, GPIO3_9, 11, 8, 0xf, 8, false)
658 MUX_CFG(DA830, GPIO3_10, 11, 12, 0xf, 8, false)
659 MUX_CFG(DA830, GPIO3_11, 11, 16, 0xf, 8, false)
660 MUX_CFG(DA830, GPIO3_14, 11, 20, 0xf, 8, false)
661 MUX_CFG(DA830, GPIO3_15, 11, 24, 0xf, 8, false)
662 MUX_CFG(DA830, GPIO4_10, 11, 28, 0xf, 8, false)
663 MUX_CFG(DA830, AHCLKR1, 12, 0, 0xf, 1, false)
664 MUX_CFG(DA830, ACLKR1, 12, 4, 0xf, 1, false)
665 MUX_CFG(DA830, AFSR1, 12, 8, 0xf, 1, false)
666 MUX_CFG(DA830, AMUTE1, 12, 12, 0xf, 1, false)
667 MUX_CFG(DA830, AXR1_0, 12, 16, 0xf, 1, false)
668 MUX_CFG(DA830, AXR1_1, 12, 20, 0xf, 1, false)
669 MUX_CFG(DA830, AXR1_2, 12, 24, 0xf, 1, false)
670 MUX_CFG(DA830, AXR1_3, 12, 28, 0xf, 1, false)
671 MUX_CFG(DA830, ECAP2_APWM2, 12, 4, 0xf, 2, false)
672 MUX_CFG(DA830, EHRPWMGLUETZ, 12, 12, 0xf, 2, false)
673 MUX_CFG(DA830, EQEP1A, 12, 28, 0xf, 2, false)
674 MUX_CFG(DA830, GPIO4_11, 12, 0, 0xf, 8, false)
675 MUX_CFG(DA830, GPIO4_12, 12, 4, 0xf, 8, false)
676 MUX_CFG(DA830, GPIO4_13, 12, 8, 0xf, 8, false)
677 MUX_CFG(DA830, GPIO4_14, 12, 12, 0xf, 8, false)
678 MUX_CFG(DA830, GPIO4_0, 12, 16, 0xf, 8, false)
679 MUX_CFG(DA830, GPIO4_1, 12, 20, 0xf, 8, false)
680 MUX_CFG(DA830, GPIO4_2, 12, 24, 0xf, 8, false)
681 MUX_CFG(DA830, GPIO4_3, 12, 28, 0xf, 8, false)
682 MUX_CFG(DA830, AXR1_4, 13, 0, 0xf, 1, false)
683 MUX_CFG(DA830, AXR1_5, 13, 4, 0xf, 1, false)
684 MUX_CFG(DA830, AXR1_6, 13, 8, 0xf, 1, false)
685 MUX_CFG(DA830, AXR1_7, 13, 12, 0xf, 1, false)
686 MUX_CFG(DA830, AXR1_8, 13, 16, 0xf, 1, false)
687 MUX_CFG(DA830, AXR1_9, 13, 20, 0xf, 1, false)
688 MUX_CFG(DA830, EMA_D_0, 13, 24, 0xf, 1, false)
689 MUX_CFG(DA830, EMA_D_1, 13, 28, 0xf, 1, false)
690 MUX_CFG(DA830, EQEP1B, 13, 0, 0xf, 2, false)
691 MUX_CFG(DA830, EPWM2B, 13, 4, 0xf, 2, false)
692 MUX_CFG(DA830, EPWM2A, 13, 8, 0xf, 2, false)
693 MUX_CFG(DA830, EPWM1B, 13, 12, 0xf, 2, false)
694 MUX_CFG(DA830, EPWM1A, 13, 16, 0xf, 2, false)
695 MUX_CFG(DA830, MMCSD_DAT_0, 13, 24, 0xf, 2, false)
696 MUX_CFG(DA830, MMCSD_DAT_1, 13, 28, 0xf, 2, false)
697 MUX_CFG(DA830, UHPI_HD_0, 13, 24, 0xf, 4, false)
698 MUX_CFG(DA830, UHPI_HD_1, 13, 28, 0xf, 4, false)
699 MUX_CFG(DA830, GPIO4_4, 13, 0, 0xf, 8, false)
700 MUX_CFG(DA830, GPIO4_5, 13, 4, 0xf, 8, false)
701 MUX_CFG(DA830, GPIO4_6, 13, 8, 0xf, 8, false)
702 MUX_CFG(DA830, GPIO4_7, 13, 12, 0xf, 8, false)
703 MUX_CFG(DA830, GPIO4_8, 13, 16, 0xf, 8, false)
704 MUX_CFG(DA830, GPIO4_9, 13, 20, 0xf, 8, false)
705 MUX_CFG(DA830, GPIO0_0, 13, 24, 0xf, 8, false)
706 MUX_CFG(DA830, GPIO0_1, 13, 28, 0xf, 8, false)
707 MUX_CFG(DA830, EMA_D_2, 14, 0, 0xf, 1, false)
708 MUX_CFG(DA830, EMA_D_3, 14, 4, 0xf, 1, false)
709 MUX_CFG(DA830, EMA_D_4, 14, 8, 0xf, 1, false)
710 MUX_CFG(DA830, EMA_D_5, 14, 12, 0xf, 1, false)
711 MUX_CFG(DA830, EMA_D_6, 14, 16, 0xf, 1, false)
712 MUX_CFG(DA830, EMA_D_7, 14, 20, 0xf, 1, false)
713 MUX_CFG(DA830, EMA_D_8, 14, 24, 0xf, 1, false)
714 MUX_CFG(DA830, EMA_D_9, 14, 28, 0xf, 1, false)
715 MUX_CFG(DA830, MMCSD_DAT_2, 14, 0, 0xf, 2, false)
716 MUX_CFG(DA830, MMCSD_DAT_3, 14, 4, 0xf, 2, false)
717 MUX_CFG(DA830, MMCSD_DAT_4, 14, 8, 0xf, 2, false)
718 MUX_CFG(DA830, MMCSD_DAT_5, 14, 12, 0xf, 2, false)
719 MUX_CFG(DA830, MMCSD_DAT_6, 14, 16, 0xf, 2, false)
720 MUX_CFG(DA830, MMCSD_DAT_7, 14, 20, 0xf, 2, false)
721 MUX_CFG(DA830, UHPI_HD_8, 14, 24, 0xf, 2, false)
722 MUX_CFG(DA830, UHPI_HD_9, 14, 28, 0xf, 2, false)
723 MUX_CFG(DA830, UHPI_HD_2, 14, 0, 0xf, 4, false)
724 MUX_CFG(DA830, UHPI_HD_3, 14, 4, 0xf, 4, false)
725 MUX_CFG(DA830, UHPI_HD_4, 14, 8, 0xf, 4, false)
726 MUX_CFG(DA830, UHPI_HD_5, 14, 12, 0xf, 4, false)
727 MUX_CFG(DA830, UHPI_HD_6, 14, 16, 0xf, 4, false)
728 MUX_CFG(DA830, UHPI_HD_7, 14, 20, 0xf, 4, false)
729 MUX_CFG(DA830, LCD_D_8, 14, 24, 0xf, 4, false)
730 MUX_CFG(DA830, LCD_D_9, 14, 28, 0xf, 4, false)
731 MUX_CFG(DA830, GPIO0_2, 14, 0, 0xf, 8, false)
732 MUX_CFG(DA830, GPIO0_3, 14, 4, 0xf, 8, false)
733 MUX_CFG(DA830, GPIO0_4, 14, 8, 0xf, 8, false)
734 MUX_CFG(DA830, GPIO0_5, 14, 12, 0xf, 8, false)
735 MUX_CFG(DA830, GPIO0_6, 14, 16, 0xf, 8, false)
736 MUX_CFG(DA830, GPIO0_7, 14, 20, 0xf, 8, false)
737 MUX_CFG(DA830, GPIO0_8, 14, 24, 0xf, 8, false)
738 MUX_CFG(DA830, GPIO0_9, 14, 28, 0xf, 8, false)
739 MUX_CFG(DA830, EMA_D_10, 15, 0, 0xf, 1, false)
740 MUX_CFG(DA830, EMA_D_11, 15, 4, 0xf, 1, false)
741 MUX_CFG(DA830, EMA_D_12, 15, 8, 0xf, 1, false)
742 MUX_CFG(DA830, EMA_D_13, 15, 12, 0xf, 1, false)
743 MUX_CFG(DA830, EMA_D_14, 15, 16, 0xf, 1, false)
744 MUX_CFG(DA830, EMA_D_15, 15, 20, 0xf, 1, false)
745 MUX_CFG(DA830, EMA_A_0, 15, 24, 0xf, 1, false)
746 MUX_CFG(DA830, EMA_A_1, 15, 28, 0xf, 1, false)
747 MUX_CFG(DA830, UHPI_HD_10, 15, 0, 0xf, 2, false)
748 MUX_CFG(DA830, UHPI_HD_11, 15, 4, 0xf, 2, false)
749 MUX_CFG(DA830, UHPI_HD_12, 15, 8, 0xf, 2, false)
750 MUX_CFG(DA830, UHPI_HD_13, 15, 12, 0xf, 2, false)
751 MUX_CFG(DA830, UHPI_HD_14, 15, 16, 0xf, 2, false)
752 MUX_CFG(DA830, UHPI_HD_15, 15, 20, 0xf, 2, false)
753 MUX_CFG(DA830, LCD_D_7, 15, 24, 0xf, 2, false)
754 MUX_CFG(DA830, MMCSD_CLK, 15, 28, 0xf, 2, false)
755 MUX_CFG(DA830, LCD_D_10, 15, 0, 0xf, 4, false)
756 MUX_CFG(DA830, LCD_D_11, 15, 4, 0xf, 4, false)
757 MUX_CFG(DA830, LCD_D_12, 15, 8, 0xf, 4, false)
758 MUX_CFG(DA830, LCD_D_13, 15, 12, 0xf, 4, false)
759 MUX_CFG(DA830, LCD_D_14, 15, 16, 0xf, 4, false)
760 MUX_CFG(DA830, LCD_D_15, 15, 20, 0xf, 4, false)
761 MUX_CFG(DA830, UHPI_HCNTL0, 15, 28, 0xf, 4, false)
762 MUX_CFG(DA830, GPIO0_10, 15, 0, 0xf, 8, false)
763 MUX_CFG(DA830, GPIO0_11, 15, 4, 0xf, 8, false)
764 MUX_CFG(DA830, GPIO0_12, 15, 8, 0xf, 8, false)
765 MUX_CFG(DA830, GPIO0_13, 15, 12, 0xf, 8, false)
766 MUX_CFG(DA830, GPIO0_14, 15, 16, 0xf, 8, false)
767 MUX_CFG(DA830, GPIO0_15, 15, 20, 0xf, 8, false)
768 MUX_CFG(DA830, GPIO1_0, 15, 24, 0xf, 8, false)
769 MUX_CFG(DA830, GPIO1_1, 15, 28, 0xf, 8, false)
770 MUX_CFG(DA830, EMA_A_2, 16, 0, 0xf, 1, false)
771 MUX_CFG(DA830, EMA_A_3, 16, 4, 0xf, 1, false)
772 MUX_CFG(DA830, EMA_A_4, 16, 8, 0xf, 1, false)
773 MUX_CFG(DA830, EMA_A_5, 16, 12, 0xf, 1, false)
774 MUX_CFG(DA830, EMA_A_6, 16, 16, 0xf, 1, false)
775 MUX_CFG(DA830, EMA_A_7, 16, 20, 0xf, 1, false)
776 MUX_CFG(DA830, EMA_A_8, 16, 24, 0xf, 1, false)
777 MUX_CFG(DA830, EMA_A_9, 16, 28, 0xf, 1, false)
778 MUX_CFG(DA830, MMCSD_CMD, 16, 0, 0xf, 2, false)
779 MUX_CFG(DA830, LCD_D_6, 16, 4, 0xf, 2, false)
780 MUX_CFG(DA830, LCD_D_3, 16, 8, 0xf, 2, false)
781 MUX_CFG(DA830, LCD_D_2, 16, 12, 0xf, 2, false)
782 MUX_CFG(DA830, LCD_D_1, 16, 16, 0xf, 2, false)
783 MUX_CFG(DA830, LCD_D_0, 16, 20, 0xf, 2, false)
784 MUX_CFG(DA830, LCD_PCLK, 16, 24, 0xf, 2, false)
785 MUX_CFG(DA830, LCD_HSYNC, 16, 28, 0xf, 2, false)
786 MUX_CFG(DA830, UHPI_HCNTL1, 16, 0, 0xf, 4, false)
787 MUX_CFG(DA830, GPIO1_2, 16, 0, 0xf, 8, false)
788 MUX_CFG(DA830, GPIO1_3, 16, 4, 0xf, 8, false)
789 MUX_CFG(DA830, GPIO1_4, 16, 8, 0xf, 8, false)
790 MUX_CFG(DA830, GPIO1_5, 16, 12, 0xf, 8, false)
791 MUX_CFG(DA830, GPIO1_6, 16, 16, 0xf, 8, false)
792 MUX_CFG(DA830, GPIO1_7, 16, 20, 0xf, 8, false)
793 MUX_CFG(DA830, GPIO1_8, 16, 24, 0xf, 8, false)
794 MUX_CFG(DA830, GPIO1_9, 16, 28, 0xf, 8, false)
795 MUX_CFG(DA830, EMA_A_10, 17, 0, 0xf, 1, false)
796 MUX_CFG(DA830, EMA_A_11, 17, 4, 0xf, 1, false)
797 MUX_CFG(DA830, EMA_A_12, 17, 8, 0xf, 1, false)
798 MUX_CFG(DA830, EMA_BA_1, 17, 12, 0xf, 1, false)
799 MUX_CFG(DA830, EMA_BA_0, 17, 16, 0xf, 1, false)
800 MUX_CFG(DA830, EMA_CLK, 17, 20, 0xf, 1, false)
801 MUX_CFG(DA830, EMA_SDCKE, 17, 24, 0xf, 1, false)
802 MUX_CFG(DA830, NEMA_CAS, 17, 28, 0xf, 1, false)
803 MUX_CFG(DA830, LCD_VSYNC, 17, 0, 0xf, 2, false)
804 MUX_CFG(DA830, NLCD_AC_ENB_CS, 17, 4, 0xf, 2, false)
805 MUX_CFG(DA830, LCD_MCLK, 17, 8, 0xf, 2, false)
806 MUX_CFG(DA830, LCD_D_5, 17, 12, 0xf, 2, false)
807 MUX_CFG(DA830, LCD_D_4, 17, 16, 0xf, 2, false)
808 MUX_CFG(DA830, OBSCLK, 17, 20, 0xf, 2, false)
809 MUX_CFG(DA830, NEMA_CS_4, 17, 28, 0xf, 2, false)
810 MUX_CFG(DA830, UHPI_HHWIL, 17, 12, 0xf, 4, false)
811 MUX_CFG(DA830, AHCLKR2, 17, 20, 0xf, 4, false)
812 MUX_CFG(DA830, GPIO1_10, 17, 0, 0xf, 8, false)
813 MUX_CFG(DA830, GPIO1_11, 17, 4, 0xf, 8, false)
814 MUX_CFG(DA830, GPIO1_12, 17, 8, 0xf, 8, false)
815 MUX_CFG(DA830, GPIO1_13, 17, 12, 0xf, 8, false)
816 MUX_CFG(DA830, GPIO1_14, 17, 16, 0xf, 8, false)
817 MUX_CFG(DA830, GPIO1_15, 17, 20, 0xf, 8, false)
818 MUX_CFG(DA830, GPIO2_0, 17, 24, 0xf, 8, false)
819 MUX_CFG(DA830, GPIO2_1, 17, 28, 0xf, 8, false)
820 MUX_CFG(DA830, NEMA_RAS, 18, 0, 0xf, 1, false)
821 MUX_CFG(DA830, NEMA_WE, 18, 4, 0xf, 1, false)
822 MUX_CFG(DA830, NEMA_CS_0, 18, 8, 0xf, 1, false)
823 MUX_CFG(DA830, NEMA_CS_2, 18, 12, 0xf, 1, false)
824 MUX_CFG(DA830, NEMA_CS_3, 18, 16, 0xf, 1, false)
825 MUX_CFG(DA830, NEMA_OE, 18, 20, 0xf, 1, false)
826 MUX_CFG(DA830, NEMA_WE_DQM_1, 18, 24, 0xf, 1, false)
827 MUX_CFG(DA830, NEMA_WE_DQM_0, 18, 28, 0xf, 1, false)
828 MUX_CFG(DA830, NEMA_CS_5, 18, 0, 0xf, 2, false)
829 MUX_CFG(DA830, UHPI_HRNW, 18, 4, 0xf, 2, false)
830 MUX_CFG(DA830, NUHPI_HAS, 18, 8, 0xf, 2, false)
831 MUX_CFG(DA830, NUHPI_HCS, 18, 12, 0xf, 2, false)
832 MUX_CFG(DA830, NUHPI_HDS1, 18, 20, 0xf, 2, false)
833 MUX_CFG(DA830, NUHPI_HDS2, 18, 24, 0xf, 2, false)
834 MUX_CFG(DA830, NUHPI_HINT, 18, 28, 0xf, 2, false)
835 MUX_CFG(DA830, AXR0_12, 18, 4, 0xf, 4, false)
836 MUX_CFG(DA830, AMUTE2, 18, 16, 0xf, 4, false)
837 MUX_CFG(DA830, AXR0_13, 18, 20, 0xf, 4, false)
838 MUX_CFG(DA830, AXR0_14, 18, 24, 0xf, 4, false)
839 MUX_CFG(DA830, AXR0_15, 18, 28, 0xf, 4, false)
840 MUX_CFG(DA830, GPIO2_2, 18, 0, 0xf, 8, false)
841 MUX_CFG(DA830, GPIO2_3, 18, 4, 0xf, 8, false)
842 MUX_CFG(DA830, GPIO2_4, 18, 8, 0xf, 8, false)
843 MUX_CFG(DA830, GPIO2_5, 18, 12, 0xf, 8, false)
844 MUX_CFG(DA830, GPIO2_6, 18, 16, 0xf, 8, false)
845 MUX_CFG(DA830, GPIO2_7, 18, 20, 0xf, 8, false)
846 MUX_CFG(DA830, GPIO2_8, 18, 24, 0xf, 8, false)
847 MUX_CFG(DA830, GPIO2_9, 18, 28, 0xf, 8, false)
848 MUX_CFG(DA830, EMA_WAIT_0, 19, 0, 0xf, 1, false)
849 MUX_CFG(DA830, NUHPI_HRDY, 19, 0, 0xf, 2, false)
850 MUX_CFG(DA830, GPIO2_10, 19, 0, 0xf, 8, false)
851#endif
852};
853
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700854const short da830_emif25_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700855 DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
856 DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
857 DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
858 DA830_EMA_D_12, DA830_EMA_D_13, DA830_EMA_D_14, DA830_EMA_D_15,
859 DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3,
860 DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7,
861 DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11,
862 DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_EMA_CLK,
863 DA830_EMA_SDCKE, DA830_NEMA_CS_4, DA830_NEMA_CS_5, DA830_NEMA_WE,
864 DA830_NEMA_CS_0, DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE,
865 DA830_NEMA_WE_DQM_1, DA830_NEMA_WE_DQM_0, DA830_EMA_WAIT_0,
866 -1
867};
868
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700869const short da830_spi0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700870 DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
871 DA830_NSPI0_SCS_0,
872 -1
873};
874
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700875const short da830_spi1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700876 DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
877 DA830_NSPI1_SCS_0,
878 -1
879};
880
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700881const short da830_mmc_sd_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700882 DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
883 DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
884 DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
885 DA830_MMCSD_CMD,
886 -1
887};
888
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700889const short da830_uart0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700890 DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
891 -1
892};
893
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700894const short da830_uart1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700895 DA830_UART1_RXD, DA830_UART1_TXD,
896 -1
897};
898
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700899const short da830_uart2_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700900 DA830_UART2_RXD, DA830_UART2_TXD,
901 -1
902};
903
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700904const short da830_usb20_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700905 DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
906 -1
907};
908
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700909const short da830_usb11_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700910 DA830_USB_REFCLKIN,
911 -1
912};
913
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700914const short da830_uhpi_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700915 DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
916 DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
917 DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
918 DA830_UHPI_HD_12, DA830_UHPI_HD_13, DA830_UHPI_HD_14, DA830_UHPI_HD_15,
919 DA830_UHPI_HCNTL0, DA830_UHPI_HCNTL1, DA830_UHPI_HHWIL, DA830_UHPI_HRNW,
920 DA830_NUHPI_HAS, DA830_NUHPI_HCS, DA830_NUHPI_HDS1, DA830_NUHPI_HDS2,
921 DA830_NUHPI_HINT, DA830_NUHPI_HRDY,
922 -1
923};
924
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700925const short da830_cpgmac_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700926 DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
927 DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
928 DA830_MDIO_D,
929 -1
930};
931
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700932const short da830_emif3c_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700933 DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
934 DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
935 DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
936 DA830_EMB_A_3, DA830_EMB_A_4, DA830_EMB_A_5, DA830_EMB_A_6,
937 DA830_EMB_A_7, DA830_EMB_A_8, DA830_EMB_A_9, DA830_EMB_A_10,
938 DA830_EMB_A_11, DA830_EMB_A_12, DA830_NEMB_WE_DQM_3,
939 DA830_NEMB_WE_DQM_2, DA830_EMB_D_0, DA830_EMB_D_1, DA830_EMB_D_2,
940 DA830_EMB_D_3, DA830_EMB_D_4, DA830_EMB_D_5, DA830_EMB_D_6,
941 DA830_EMB_D_7, DA830_EMB_D_8, DA830_EMB_D_9, DA830_EMB_D_10,
942 DA830_EMB_D_11, DA830_EMB_D_12, DA830_EMB_D_13, DA830_EMB_D_14,
943 DA830_EMB_D_15, DA830_EMB_D_16, DA830_EMB_D_17, DA830_EMB_D_18,
944 DA830_EMB_D_19, DA830_EMB_D_20, DA830_EMB_D_21, DA830_EMB_D_22,
945 DA830_EMB_D_23, DA830_EMB_D_24, DA830_EMB_D_25, DA830_EMB_D_26,
946 DA830_EMB_D_27, DA830_EMB_D_28, DA830_EMB_D_29, DA830_EMB_D_30,
947 DA830_EMB_D_31, DA830_NEMB_WE_DQM_1, DA830_NEMB_WE_DQM_0,
948 -1
949};
950
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700951const short da830_mcasp0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700952 DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
953 DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
954 DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
955 DA830_AXR0_4, DA830_AXR0_5, DA830_AXR0_6, DA830_AXR0_7,
956 DA830_AXR0_8, DA830_AXR0_9, DA830_AXR0_10, DA830_AXR0_11,
957 DA830_AXR0_12, DA830_AXR0_13, DA830_AXR0_14, DA830_AXR0_15,
958 -1
959};
960
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700961const short da830_mcasp1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700962 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
963 DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
964 DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
965 DA830_AXR1_4, DA830_AXR1_5, DA830_AXR1_6, DA830_AXR1_7,
966 DA830_AXR1_8, DA830_AXR1_9, DA830_AXR1_10, DA830_AXR1_11,
967 -1
968};
969
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700970const short da830_mcasp2_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700971 DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
972 DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
973 DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
974 -1
975};
976
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700977const short da830_i2c0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700978 DA830_I2C0_SDA, DA830_I2C0_SCL,
979 -1
980};
981
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700982const short da830_i2c1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700983 DA830_I2C1_SCL, DA830_I2C1_SDA,
984 -1
985};
986
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700987const short da830_lcdcntl_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700988 DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
989 DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
990 DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
991 DA830_LCD_D_12, DA830_LCD_D_13, DA830_LCD_D_14, DA830_LCD_D_15,
992 DA830_LCD_PCLK, DA830_LCD_HSYNC, DA830_LCD_VSYNC, DA830_NLCD_AC_ENB_CS,
993 DA830_LCD_MCLK,
994 -1
995};
996
Andi Kleenbcad6dc2012-10-04 17:11:28 -0700997const short da830_pwm_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -0700998 DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
999 DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
1000 DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
1001 -1
1002};
1003
Andi Kleenbcad6dc2012-10-04 17:11:28 -07001004const short da830_ecap0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001005 DA830_ECAP0_APWM0,
1006 -1
1007};
1008
Andi Kleenbcad6dc2012-10-04 17:11:28 -07001009const short da830_ecap1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001010 DA830_ECAP1_APWM1,
1011 -1
1012};
1013
Andi Kleenbcad6dc2012-10-04 17:11:28 -07001014const short da830_ecap2_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001015 DA830_ECAP2_APWM2,
1016 -1
1017};
1018
Andi Kleenbcad6dc2012-10-04 17:11:28 -07001019const short da830_eqep0_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001020 DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
1021 -1
1022};
1023
Andi Kleenbcad6dc2012-10-04 17:11:28 -07001024const short da830_eqep1_pins[] __initconst = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001025 DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
1026 -1
1027};
1028
Mark A. Greer55c79a42009-06-03 18:36:54 -07001029/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
1030static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = {
1031 [IRQ_DA8XX_COMMTX] = 7,
1032 [IRQ_DA8XX_COMMRX] = 7,
1033 [IRQ_DA8XX_NINT] = 7,
1034 [IRQ_DA8XX_EVTOUT0] = 7,
1035 [IRQ_DA8XX_EVTOUT1] = 7,
1036 [IRQ_DA8XX_EVTOUT2] = 7,
1037 [IRQ_DA8XX_EVTOUT3] = 7,
1038 [IRQ_DA8XX_EVTOUT4] = 7,
1039 [IRQ_DA8XX_EVTOUT5] = 7,
1040 [IRQ_DA8XX_EVTOUT6] = 7,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001041 [IRQ_DA8XX_EVTOUT7] = 7,
1042 [IRQ_DA8XX_CCINT0] = 7,
1043 [IRQ_DA8XX_CCERRINT] = 7,
1044 [IRQ_DA8XX_TCERRINT0] = 7,
1045 [IRQ_DA8XX_AEMIFINT] = 7,
1046 [IRQ_DA8XX_I2CINT0] = 7,
1047 [IRQ_DA8XX_MMCSDINT0] = 7,
1048 [IRQ_DA8XX_MMCSDINT1] = 7,
1049 [IRQ_DA8XX_ALLINT0] = 7,
1050 [IRQ_DA8XX_RTC] = 7,
1051 [IRQ_DA8XX_SPINT0] = 7,
1052 [IRQ_DA8XX_TINT12_0] = 7,
1053 [IRQ_DA8XX_TINT34_0] = 7,
1054 [IRQ_DA8XX_TINT12_1] = 7,
1055 [IRQ_DA8XX_TINT34_1] = 7,
1056 [IRQ_DA8XX_UARTINT0] = 7,
1057 [IRQ_DA8XX_KEYMGRINT] = 7,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001058 [IRQ_DA830_MPUERR] = 7,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001059 [IRQ_DA8XX_CHIPINT0] = 7,
1060 [IRQ_DA8XX_CHIPINT1] = 7,
1061 [IRQ_DA8XX_CHIPINT2] = 7,
1062 [IRQ_DA8XX_CHIPINT3] = 7,
1063 [IRQ_DA8XX_TCERRINT1] = 7,
1064 [IRQ_DA8XX_C0_RX_THRESH_PULSE] = 7,
1065 [IRQ_DA8XX_C0_RX_PULSE] = 7,
1066 [IRQ_DA8XX_C0_TX_PULSE] = 7,
1067 [IRQ_DA8XX_C0_MISC_PULSE] = 7,
1068 [IRQ_DA8XX_C1_RX_THRESH_PULSE] = 7,
1069 [IRQ_DA8XX_C1_RX_PULSE] = 7,
1070 [IRQ_DA8XX_C1_TX_PULSE] = 7,
1071 [IRQ_DA8XX_C1_MISC_PULSE] = 7,
1072 [IRQ_DA8XX_MEMERR] = 7,
1073 [IRQ_DA8XX_GPIO0] = 7,
1074 [IRQ_DA8XX_GPIO1] = 7,
1075 [IRQ_DA8XX_GPIO2] = 7,
1076 [IRQ_DA8XX_GPIO3] = 7,
1077 [IRQ_DA8XX_GPIO4] = 7,
1078 [IRQ_DA8XX_GPIO5] = 7,
1079 [IRQ_DA8XX_GPIO6] = 7,
1080 [IRQ_DA8XX_GPIO7] = 7,
1081 [IRQ_DA8XX_GPIO8] = 7,
1082 [IRQ_DA8XX_I2CINT1] = 7,
1083 [IRQ_DA8XX_LCDINT] = 7,
1084 [IRQ_DA8XX_UARTINT1] = 7,
1085 [IRQ_DA8XX_MCASPINT] = 7,
1086 [IRQ_DA8XX_ALLINT1] = 7,
1087 [IRQ_DA8XX_SPINT1] = 7,
1088 [IRQ_DA8XX_UHPI_INT1] = 7,
1089 [IRQ_DA8XX_USB_INT] = 7,
1090 [IRQ_DA8XX_IRQN] = 7,
1091 [IRQ_DA8XX_RWAKEUP] = 7,
1092 [IRQ_DA8XX_UARTINT2] = 7,
1093 [IRQ_DA8XX_DFTSSINT] = 7,
1094 [IRQ_DA8XX_EHRPWM0] = 7,
1095 [IRQ_DA8XX_EHRPWM0TZ] = 7,
1096 [IRQ_DA8XX_EHRPWM1] = 7,
1097 [IRQ_DA8XX_EHRPWM1TZ] = 7,
1098 [IRQ_DA830_EHRPWM2] = 7,
1099 [IRQ_DA830_EHRPWM2TZ] = 7,
1100 [IRQ_DA8XX_ECAP0] = 7,
1101 [IRQ_DA8XX_ECAP1] = 7,
1102 [IRQ_DA8XX_ECAP2] = 7,
1103 [IRQ_DA830_EQEP0] = 7,
1104 [IRQ_DA830_EQEP1] = 7,
1105 [IRQ_DA830_T12CMPINT0_0] = 7,
1106 [IRQ_DA830_T12CMPINT1_0] = 7,
1107 [IRQ_DA830_T12CMPINT2_0] = 7,
1108 [IRQ_DA830_T12CMPINT3_0] = 7,
1109 [IRQ_DA830_T12CMPINT4_0] = 7,
1110 [IRQ_DA830_T12CMPINT5_0] = 7,
1111 [IRQ_DA830_T12CMPINT6_0] = 7,
1112 [IRQ_DA830_T12CMPINT7_0] = 7,
1113 [IRQ_DA830_T12CMPINT0_1] = 7,
1114 [IRQ_DA830_T12CMPINT1_1] = 7,
1115 [IRQ_DA830_T12CMPINT2_1] = 7,
1116 [IRQ_DA830_T12CMPINT3_1] = 7,
1117 [IRQ_DA830_T12CMPINT4_1] = 7,
1118 [IRQ_DA830_T12CMPINT5_1] = 7,
1119 [IRQ_DA830_T12CMPINT6_1] = 7,
1120 [IRQ_DA830_T12CMPINT7_1] = 7,
1121 [IRQ_DA8XX_ARMCLKSTOPREQ] = 7,
1122};
1123
1124static struct map_desc da830_io_desc[] = {
1125 {
1126 .virtual = IO_VIRT,
1127 .pfn = __phys_to_pfn(IO_PHYS),
1128 .length = IO_SIZE,
1129 .type = MT_DEVICE
1130 },
1131 {
1132 .virtual = DA8XX_CP_INTC_VIRT,
1133 .pfn = __phys_to_pfn(DA8XX_CP_INTC_BASE),
1134 .length = DA8XX_CP_INTC_SIZE,
1135 .type = MT_DEVICE
1136 },
1137};
1138
Cyril Chemparathye4c822c2010-05-07 17:06:36 -04001139static u32 da830_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
Mark A. Greer55c79a42009-06-03 18:36:54 -07001140
1141/* Contents of JTAG ID register used to identify exact cpu type */
1142static struct davinci_id da830_ids[] = {
1143 {
1144 .variant = 0x0,
1145 .part_no = 0xb7df,
1146 .manufacturer = 0x017, /* 0x02f >> 1 */
1147 .cpu_id = DAVINCI_CPU_ID_DA830,
Kevin Hilmanf2024a992009-09-29 11:09:21 -07001148 .name = "da830/omap-l137 rev1.0",
1149 },
1150 {
1151 .variant = 0x8,
1152 .part_no = 0xb7df,
1153 .manufacturer = 0x017,
1154 .cpu_id = DAVINCI_CPU_ID_DA830,
1155 .name = "da830/omap-l137 rev1.1",
1156 },
1157 {
1158 .variant = 0x9,
1159 .part_no = 0xb7df,
1160 .manufacturer = 0x017,
1161 .cpu_id = DAVINCI_CPU_ID_DA830,
1162 .name = "da830/omap-l137 rev2.0",
Mark A. Greer55c79a42009-06-03 18:36:54 -07001163 },
1164};
1165
KV Sujithf606d382013-08-18 10:48:59 +05301166static struct davinci_gpio_platform_data da830_gpio_platform_data = {
1167 .ngpio = 128,
KV Sujithf606d382013-08-18 10:48:59 +05301168};
1169
1170int __init da830_register_gpio(void)
1171{
1172 return da8xx_register_gpio(&da830_gpio_platform_data);
1173}
1174
Mark A. Greer55c79a42009-06-03 18:36:54 -07001175static struct davinci_timer_instance da830_timer_instance[2] = {
1176 {
Cyril Chemparathy1bcd38a2010-05-07 17:06:35 -04001177 .base = DA8XX_TIMER64P0_BASE,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001178 .bottom_irq = IRQ_DA8XX_TINT12_0,
1179 .top_irq = IRQ_DA8XX_TINT34_0,
1180 .cmp_off = DA830_CMP12_0,
1181 .cmp_irq = IRQ_DA830_T12CMPINT0_0,
1182 },
1183 {
Cyril Chemparathy1bcd38a2010-05-07 17:06:35 -04001184 .base = DA8XX_TIMER64P1_BASE,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001185 .bottom_irq = IRQ_DA8XX_TINT12_1,
1186 .top_irq = IRQ_DA8XX_TINT34_1,
1187 .cmp_off = DA830_CMP12_0,
1188 .cmp_irq = IRQ_DA830_T12CMPINT0_1,
1189 },
1190};
1191
1192/*
1193 * T0_BOT: Timer 0, bottom : Used for clock_event & clocksource
1194 * T0_TOP: Timer 0, top : Used by DSP
1195 * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer
1196 */
1197static struct davinci_timer_info da830_timer_info = {
1198 .timers = da830_timer_instance,
1199 .clockevent_id = T0_BOT,
1200 .clocksource_id = T0_BOT,
1201};
1202
Bhumika Goyalab419102017-10-16 12:08:24 +02001203static const struct davinci_soc_info davinci_soc_info_da830 = {
Mark A. Greer55c79a42009-06-03 18:36:54 -07001204 .io_desc = da830_io_desc,
1205 .io_desc_num = ARRAY_SIZE(da830_io_desc),
Cyril Chemparathy3347db82010-05-07 17:06:34 -04001206 .jtag_id_reg = DA8XX_SYSCFG0_BASE + DA8XX_JTAG_ID_REG,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001207 .ids = da830_ids,
1208 .ids_num = ARRAY_SIZE(da830_ids),
Mark A. Greer55c79a42009-06-03 18:36:54 -07001209 .psc_bases = da830_psc_bases,
1210 .psc_bases_num = ARRAY_SIZE(da830_psc_bases),
Cyril Chemparathy779b0d52010-05-07 17:06:38 -04001211 .pinmux_base = DA8XX_SYSCFG0_BASE + 0x120,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001212 .pinmux_pins = da830_pins,
1213 .pinmux_pins_num = ARRAY_SIZE(da830_pins),
Cyril Chemparathybd808942010-05-07 17:06:37 -04001214 .intc_base = DA8XX_CP_INTC_BASE,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001215 .intc_type = DAVINCI_INTC_TYPE_CP_INTC,
1216 .intc_irq_prios = da830_default_priorities,
1217 .intc_irq_num = DA830_N_CP_INTC_IRQ,
1218 .timer_info = &da830_timer_info,
Mark A. Greer55c79a42009-06-03 18:36:54 -07001219 .emac_pdata = &da8xx_emac_pdata,
1220};
1221
1222void __init da830_init(void)
1223{
Mark A. Greer55c79a42009-06-03 18:36:54 -07001224 davinci_common_init(&davinci_soc_info_da830);
Cyril Chemparathybcd6a1c2010-05-07 17:06:39 -04001225
1226 da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
1227 WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
David Lechner96c08172018-01-19 21:20:22 -06001228}
David Lechner6fc9ebb2016-04-14 14:13:35 -05001229
David Lechner96c08172018-01-19 21:20:22 -06001230void __init da830_init_time(void)
1231{
David Lechner3952af12018-05-18 11:48:07 -05001232#ifdef CONFIG_COMMON_CLK
1233 void __iomem *pll;
1234 struct clk *clk;
1235
1236 clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DA830_REF_FREQ);
1237
1238 pll = ioremap(DA8XX_PLL0_BASE, SZ_4K);
1239
1240 da830_pll_init(NULL, pll, NULL);
1241
1242 clk = clk_get(NULL, "timer0");
1243
1244 davinci_timer_init(clk);
1245#else
David Lechner96c08172018-01-19 21:20:22 -06001246 davinci_clk_init(da830_clks);
David Lechnera7da5272018-05-18 11:48:06 -05001247 davinci_timer_init(&timerp64_0_clk);
David Lechner3952af12018-05-18 11:48:07 -05001248#endif
1249}
1250
1251static struct resource da830_psc0_resources[] = {
1252 {
1253 .start = DA8XX_PSC0_BASE,
1254 .end = DA8XX_PSC0_BASE + SZ_4K - 1,
1255 .flags = IORESOURCE_MEM,
1256 },
1257};
1258
1259static struct platform_device da830_psc0_device = {
1260 .name = "da830-psc0",
1261 .id = -1,
1262 .resource = da830_psc0_resources,
1263 .num_resources = ARRAY_SIZE(da830_psc0_resources),
1264};
1265
1266static struct resource da830_psc1_resources[] = {
1267 {
1268 .start = DA8XX_PSC1_BASE,
1269 .end = DA8XX_PSC1_BASE + SZ_4K - 1,
1270 .flags = IORESOURCE_MEM,
1271 },
1272};
1273
1274static struct platform_device da830_psc1_device = {
1275 .name = "da830-psc1",
1276 .id = -1,
1277 .resource = da830_psc1_resources,
1278 .num_resources = ARRAY_SIZE(da830_psc1_resources),
1279};
1280
1281void __init da830_register_clocks(void)
1282{
1283 /* PLL is registered in da830_init_time() */
1284 platform_device_register(&da830_psc0_device);
1285 platform_device_register(&da830_psc1_device);
Mark A. Greer55c79a42009-06-03 18:36:54 -07001286}