ASoC: multi-component - ASoC Multi-Component Support
[deliverable/linux.git] / arch / arm / mach-omap2 / board-zoom2.c
1 /*
2 * Copyright (C) 2009 Texas Instruments Inc.
3 * Mikkel Christensen <mlc@ti.com>
4 *
5 * Modified from mach-omap2/board-ldp.c
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/platform_device.h>
15 #include <linux/input.h>
16 #include <linux/gpio.h>
17 #include <linux/i2c/twl.h>
18
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
21
22 #include <plat/common.h>
23 #include <plat/board.h>
24
25 #include <mach/board-zoom.h>
26
27 #include "mux.h"
28 #include "sdram-micron-mt46h32m32lf-6.h"
29
30 static void __init omap_zoom2_init_irq(void)
31 {
32 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
33 mt46h32m32lf6_sdrc_params);
34 omap_init_irq();
35 omap_gpio_init();
36 }
37
38 /* EXTMUTE callback function */
39 void zoom2_set_hs_extmute(int mute)
40 {
41 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
42 }
43
44 static struct twl4030_madc_platform_data zoom2_madc_data = {
45 .irq_line = 1,
46 };
47
48 static struct twl4030_codec_audio_data zoom2_audio_data = {
49 .audio_mclk = 26000000,
50 .ramp_delay_value = 3, /* 161 ms */
51 .hs_extmute = 1,
52 .set_hs_extmute = zoom2_set_hs_extmute,
53 };
54
55 static struct twl4030_codec_data zoom2_codec_data = {
56 .audio_mclk = 26000000,
57 .audio = &zoom2_audio_data,
58 };
59
60 static struct twl4030_platform_data zoom2_twldata = {
61 .irq_base = TWL4030_IRQ_BASE,
62 .irq_end = TWL4030_IRQ_END,
63
64 /* platform_data for children goes here */
65 .bci = &zoom2_bci_data,
66 .madc = &zoom2_madc_data,
67 .usb = &zoom2_usb_data,
68 .gpio = &zoom2_gpio_data,
69 .keypad = &zoom2_kp_twl4030_data,
70 .codec = &zoom2_codec_data,
71 .vmmc1 = &zoom2_vmmc1,
72 .vmmc2 = &zoom2_vmmc2,
73 .vsim = &zoom2_vsim,
74 };
75
76 static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
77 {
78 I2C_BOARD_INFO("twl4030", 0x48),
79 .flags = I2C_CLIENT_WAKE,
80 .irq = INT_34XX_SYS_NIRQ,
81 .platform_data = &zoom2_twldata,
82 },
83 };
84
85 static int __init omap3_zoom2_i2c_init(void)
86 {
87 omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo,
88 ARRAY_SIZE(zoom2_i2c_boardinfo));
89 return 0;
90 }
91
92
93 #ifdef CONFIG_OMAP_MUX
94 static struct omap_board_mux board_mux[] __initdata = {
95 { .reg_offset = OMAP_MUX_TERMINATOR },
96 };
97 #else
98 #define board_mux NULL
99 #endif
100
101 static void __init omap_zoom2_init(void)
102 {
103 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
104 zoom_peripherals_init();
105 omap3_zoom2_i2c_init();
106 zoom_debugboard_init();
107 }
108
109 static void __init omap_zoom2_map_io(void)
110 {
111 omap2_set_globals_343x();
112 omap34xx_map_common_io();
113 }
114
115 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
116 .phys_io = ZOOM_UART_BASE,
117 .io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
118 .boot_params = 0x80000100,
119 .map_io = omap_zoom2_map_io,
120 .init_irq = omap_zoom2_init_irq,
121 .init_machine = omap_zoom2_init,
122 .timer = &omap_timer,
123 MACHINE_END
This page took 0.041669 seconds and 5 git commands to generate.