21 #include <mach/cputype.h>
25 #include <mach/irqs.h>
26 #include <mach/time.h>
28 #include <mach/common.h>
37 #define DM355_UART2_BASE (IO_PHYS + 0x206000)
42 #define DM355_REF_FREQ 24000000
56 static struct clk ref_clk = {
62 static struct clk pll1_clk = {
66 .pll_data = &pll1_data,
69 static struct clk pll1_aux_clk = {
70 .name =
"pll1_aux_clk",
75 static struct clk pll1_sysclk1 = {
76 .name =
"pll1_sysclk1",
82 static struct clk pll1_sysclk2 = {
83 .name =
"pll1_sysclk2",
89 static struct clk pll1_sysclk3 = {
90 .name =
"pll1_sysclk3",
96 static struct clk pll1_sysclk4 = {
97 .name =
"pll1_sysclk4",
103 static struct clk pll1_sysclkbp = {
104 .name =
"pll1_sysclkbp",
110 static struct clk vpss_dac_clk = {
112 .parent = &pll1_sysclk3,
116 static struct clk vpss_master_clk = {
117 .name =
"vpss_master",
118 .parent = &pll1_sysclk4,
123 static struct clk vpss_slave_clk = {
124 .name =
"vpss_slave",
125 .parent = &pll1_sysclk4,
129 static struct clk clkout1_clk = {
131 .parent = &pll1_aux_clk,
135 static struct clk clkout2_clk = {
137 .parent = &pll1_sysclkbp,
140 static struct clk pll2_clk = {
144 .pll_data = &pll2_data,
147 static struct clk pll2_sysclk1 = {
148 .name =
"pll2_sysclk1",
154 static struct clk pll2_sysclkbp = {
155 .name =
"pll2_sysclkbp",
161 static struct clk clkout3_clk = {
163 .parent = &pll2_sysclkbp,
167 static struct clk arm_clk = {
169 .parent = &pll1_sysclk1,
193 static struct clk mjcp_clk = {
195 .parent = &pll1_sysclk1,
199 static struct clk uart0_clk = {
201 .parent = &pll1_aux_clk,
205 static struct clk uart1_clk = {
207 .parent = &pll1_aux_clk,
211 static struct clk uart2_clk = {
213 .parent = &pll1_sysclk2,
219 .parent = &pll1_aux_clk,
223 static struct clk asp0_clk = {
225 .parent = &pll1_sysclk2,
229 static struct clk asp1_clk = {
231 .parent = &pll1_sysclk2,
235 static struct clk mmcsd0_clk = {
237 .parent = &pll1_sysclk2,
241 static struct clk mmcsd1_clk = {
243 .parent = &pll1_sysclk2,
247 static struct clk spi0_clk = {
249 .parent = &pll1_sysclk2,
253 static struct clk spi1_clk = {
255 .parent = &pll1_sysclk2,
259 static struct clk spi2_clk = {
261 .parent = &pll1_sysclk2,
265 static struct clk gpio_clk = {
267 .parent = &pll1_sysclk2,
271 static struct clk aemif_clk = {
273 .parent = &pll1_sysclk2,
277 static struct clk pwm0_clk = {
279 .parent = &pll1_aux_clk,
283 static struct clk pwm1_clk = {
285 .parent = &pll1_aux_clk,
289 static struct clk pwm2_clk = {
291 .parent = &pll1_aux_clk,
295 static struct clk pwm3_clk = {
297 .parent = &pll1_aux_clk,
301 static struct clk timer0_clk = {
303 .parent = &pll1_aux_clk,
307 static struct clk timer1_clk = {
309 .parent = &pll1_aux_clk,
313 static struct clk timer2_clk = {
315 .parent = &pll1_aux_clk,
320 static struct clk timer3_clk = {
322 .parent = &pll1_aux_clk,
326 static struct clk rto_clk = {
328 .parent = &pll1_aux_clk,
332 static struct clk usb_clk = {
334 .parent = &pll1_sysclk2,
341 CLK(
NULL,
"pll1_sysclk1", &pll1_sysclk1),
342 CLK(
NULL,
"pll1_sysclk2", &pll1_sysclk2),
343 CLK(
NULL,
"pll1_sysclk3", &pll1_sysclk3),
344 CLK(
NULL,
"pll1_sysclk4", &pll1_sysclk4),
345 CLK(
NULL,
"pll1_aux", &pll1_aux_clk),
346 CLK(
NULL,
"pll1_sysclkbp", &pll1_sysclkbp),
347 CLK(
NULL,
"vpss_dac", &vpss_dac_clk),
348 CLK(
NULL,
"vpss_master", &vpss_master_clk),
349 CLK(
NULL,
"vpss_slave", &vpss_slave_clk),
350 CLK(
NULL,
"clkout1", &clkout1_clk),
351 CLK(
NULL,
"clkout2", &clkout2_clk),
353 CLK(
NULL,
"pll2_sysclk1", &pll2_sysclk1),
354 CLK(
NULL,
"pll2_sysclkbp", &pll2_sysclkbp),
355 CLK(
NULL,
"clkout3", &clkout3_clk),
358 CLK(
NULL,
"uart0", &uart0_clk),
359 CLK(
NULL,
"uart1", &uart1_clk),
360 CLK(
NULL,
"uart2", &uart2_clk),
361 CLK(
"i2c_davinci.1",
NULL, &i2c_clk),
362 CLK(
"davinci-mcbsp.0",
NULL, &asp0_clk),
363 CLK(
"davinci-mcbsp.1",
NULL, &asp1_clk),
364 CLK(
"davinci_mmc.0",
NULL, &mmcsd0_clk),
365 CLK(
"davinci_mmc.1",
NULL, &mmcsd1_clk),
366 CLK(
"spi_davinci.0",
NULL, &spi0_clk),
367 CLK(
"spi_davinci.1",
NULL, &spi1_clk),
368 CLK(
"spi_davinci.2",
NULL, &spi2_clk),
370 CLK(
NULL,
"aemif", &aemif_clk),
375 CLK(
NULL,
"timer0", &timer0_clk),
376 CLK(
NULL,
"timer1", &timer1_clk),
377 CLK(
"watchdog",
NULL, &timer2_clk),
378 CLK(
NULL,
"timer3", &timer3_clk),
388 static struct resource dm355_spi0_resources[] = {
415 .name =
"spi_davinci",
418 .dma_mask = &dm355_spi0_dma_mask,
420 .platform_data = &dm355_spi0_pdata,
422 .num_resources =
ARRAY_SIZE(dm355_spi0_resources),
423 .resource = dm355_spi0_resources,
433 if (chipselect_mask &
BIT(0))
435 if (chipselect_mask &
BIT(1))
454 static const struct mux_config dm355_pins[] = {
455 #ifdef CONFIG_DAVINCI_MUX
571 queue_tc_mapping[][2] = {
579 queue_priority_mapping[][2] = {
601 static struct resource edma_resources[] = {
605 .end = 0x01c00000 +
SZ_64K - 1,
611 .end = 0x01c10000 +
SZ_1K - 1,
617 .end = 0x01c10400 +
SZ_1K - 1,
636 .dev.platform_data = dm355_edma_info,
638 .resource = edma_resources,
641 static struct resource dm355_asp1_resources[] = {
660 .name =
"davinci-mcbsp",
662 .num_resources =
ARRAY_SIZE(dm355_asp1_resources),
663 .resource = dm355_asp1_resources,
666 static void dm355_ccdc_setup_pinmux(
void)
677 static struct resource dm355_vpss_resources[] = {
682 .end = 0x01c70800 + 0xff,
689 .end = 0x01c70000 + 0xf,
697 .dev.platform_data =
"dm355_vpss",
698 .num_resources =
ARRAY_SIZE(dm355_vpss_resources),
699 .resource = dm355_vpss_resources,
702 static struct resource vpfe_resources[] = {
716 static struct resource dm355_ccdc_resource[] = {
721 .end = 0x01c70600 + 0x1ff,
725 .name =
"dm355_ccdc",
727 .num_resources =
ARRAY_SIZE(dm355_ccdc_resource),
728 .resource = dm355_ccdc_resource,
730 .dma_mask = &vpfe_capture_dma_mask,
732 .platform_data = dm355_ccdc_setup_pinmux,
740 .resource = vpfe_resources,
742 .dma_mask = &vpfe_capture_dma_mask,
749 vpfe_capture_dev.
dev.platform_data =
cfg;
754 static struct map_desc dm355_io_desc[] = {
774 .manufacturer = 0x00f,
825 .name =
"serial8250",
828 .platform_data = dm355_serial_platform_data,
833 .io_desc = dm355_io_desc,
835 .jtag_id_reg = 0x01c40028,
838 .cpu_clks = dm355_clks,
839 .psc_bases = dm355_psc_bases,
842 .pinmux_pins = dm355_pins,
846 .intc_irq_prios = dm355_default_priorities,
848 .timer_info = &dm355_timer_info,
853 .serial_dev = &dm355_serial_device,
854 .sram_dma = 0x00010000,
867 dm355_asp1_device.
dev.platform_data =
pdata;
877 static int __init dm355_init_devices(
void)