aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-zoom-peripherals.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c89
1 files changed, 11 insertions, 78 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 8495f82fcbab..13a644233667 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -226,41 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
226 {} /* Terminator */ 226 {} /* Terminator */
227}; 227};
228 228
229static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
230 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
231 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
232};
233
234static struct regulator_consumer_supply zoom_vdda_dac_supply[] = {
235 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
236};
237
238static struct regulator_init_data zoom_vpll2 = {
239 .constraints = {
240 .min_uV = 1800000,
241 .max_uV = 1800000,
242 .valid_modes_mask = REGULATOR_MODE_NORMAL
243 | REGULATOR_MODE_STANDBY,
244 .valid_ops_mask = REGULATOR_CHANGE_MODE
245 | REGULATOR_CHANGE_STATUS,
246 },
247 .num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
248 .consumer_supplies = zoom_vpll2_supplies,
249};
250
251static struct regulator_init_data zoom_vdac = {
252 .constraints = {
253 .min_uV = 1800000,
254 .max_uV = 1800000,
255 .valid_modes_mask = REGULATOR_MODE_NORMAL
256 | REGULATOR_MODE_STANDBY,
257 .valid_ops_mask = REGULATOR_CHANGE_MODE
258 | REGULATOR_CHANGE_STATUS,
259 },
260 .num_consumer_supplies = ARRAY_SIZE(zoom_vdda_dac_supply),
261 .consumer_supplies = zoom_vdda_dac_supply,
262};
263
264static int zoom_twl_gpio_setup(struct device *dev, 229static int zoom_twl_gpio_setup(struct device *dev,
265 unsigned gpio, unsigned ngpio) 230 unsigned gpio, unsigned ngpio)
266{ 231{
@@ -285,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute)
285 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); 250 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
286} 251}
287 252
288static int zoom_batt_table[] = {
289/* 0 C*/
29030800, 29500, 28300, 27100,
29126000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
29217200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
29311600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
2948020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
2955640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
2964040, 3910, 3790, 3670, 3550
297};
298
299static struct twl4030_bci_platform_data zoom_bci_data = {
300 .battery_tmp_tbl = zoom_batt_table,
301 .tblsize = ARRAY_SIZE(zoom_batt_table),
302};
303
304static struct twl4030_usb_data zoom_usb_data = {
305 .usb_mode = T2_USB_MODE_ULPI,
306};
307
308static struct twl4030_gpio_platform_data zoom_gpio_data = { 253static struct twl4030_gpio_platform_data zoom_gpio_data = {
309 .gpio_base = OMAP_MAX_GPIO_LINES, 254 .gpio_base = OMAP_MAX_GPIO_LINES,
310 .irq_base = TWL4030_GPIO_IRQ_BASE, 255 .irq_base = TWL4030_GPIO_IRQ_BASE,
@@ -312,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = {
312 .setup = zoom_twl_gpio_setup, 257 .setup = zoom_twl_gpio_setup,
313}; 258};
314 259
315static struct twl4030_madc_platform_data zoom_madc_data = {
316 .irq_line = 1,
317};
318
319static struct twl4030_codec_audio_data zoom_audio_data;
320
321static struct twl4030_codec_data zoom_codec_data = {
322 .audio_mclk = 26000000,
323 .audio = &zoom_audio_data,
324};
325
326static struct twl4030_platform_data zoom_twldata = { 260static struct twl4030_platform_data zoom_twldata = {
327 .irq_base = TWL4030_IRQ_BASE,
328 .irq_end = TWL4030_IRQ_END,
329
330 /* platform_data for children goes here */ 261 /* platform_data for children goes here */
331 .bci = &zoom_bci_data,
332 .madc = &zoom_madc_data,
333 .usb = &zoom_usb_data,
334 .gpio = &zoom_gpio_data, 262 .gpio = &zoom_gpio_data,
335 .keypad = &zoom_kp_twl4030_data, 263 .keypad = &zoom_kp_twl4030_data,
336 .codec = &zoom_codec_data,
337 .vmmc1 = &zoom_vmmc1, 264 .vmmc1 = &zoom_vmmc1,
338 .vmmc2 = &zoom_vmmc2, 265 .vmmc2 = &zoom_vmmc2,
339 .vsim = &zoom_vsim, 266 .vsim = &zoom_vsim,
340 .vpll2 = &zoom_vpll2,
341 .vdac = &zoom_vdac,
342}; 267};
343 268
344static int __init omap_i2c_init(void) 269static int __init omap_i2c_init(void)
345{ 270{
271 omap3_pmic_get_config(&zoom_twldata,
272 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
273 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
274 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
275
346 if (machine_is_omap_zoom2()) { 276 if (machine_is_omap_zoom2()) {
347 zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ 277 struct twl4030_codec_audio_data *audio_data;
348 zoom_audio_data.hs_extmute = 1; 278 audio_data = zoom_twldata.codec->audio;
349 zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; 279
280 audio_data->ramp_delay_value = 3; /* 161 ms */
281 audio_data->hs_extmute = 1;
282 audio_data->set_hs_extmute = zoom2_set_hs_extmute;
350 } 283 }
351 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); 284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
352 omap_register_i2c_bus(2, 400, NULL, 0); 285 omap_register_i2c_bus(2, 400, NULL, 0);