diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
commit | 6124a4e430b64d1577438c8648c59e996d02e73e (patch) | |
tree | 49cfafad785d1c9e403a5b0d755298b9af2c260f /arch/arm/mach-omap2/board-omap3touchbook.c | |
parent | 8e267f3da5f117d2f1316cf6ddf740f93f1c73aa (diff) | |
parent | 580975d7f48d7d047e22bb0f42adf7557801d8d4 (diff) |
Merge branch 'imx/dt' into next/dt
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3touchbook.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 97 |
1 files changed, 29 insertions, 68 deletions
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 5f649faf7377..852ea0464057 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -51,7 +51,6 @@ | |||
51 | 51 | ||
52 | #include "mux.h" | 52 | #include "mux.h" |
53 | #include "hsmmc.h" | 53 | #include "hsmmc.h" |
54 | #include "timer-gp.h" | ||
55 | #include "common-board-devices.h" | 54 | #include "common-board-devices.h" |
56 | 55 | ||
57 | #include <asm/setup.h> | 56 | #include <asm/setup.h> |
@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = { | |||
114 | .ctrl_name = "internal", | 113 | .ctrl_name = "internal", |
115 | }; | 114 | }; |
116 | 115 | ||
117 | static struct regulator_consumer_supply touchbook_vmmc1_supply = { | 116 | static struct regulator_consumer_supply touchbook_vmmc1_supply[] = { |
118 | .supply = "vmmc", | 117 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
119 | }; | 118 | }; |
120 | 119 | ||
121 | static struct regulator_consumer_supply touchbook_vsim_supply = { | 120 | static struct regulator_consumer_supply touchbook_vsim_supply[] = { |
122 | .supply = "vmmc_aux", | 121 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
123 | }; | 122 | }; |
124 | 123 | ||
125 | static struct gpio_led gpio_leds[]; | 124 | static struct gpio_led gpio_leds[]; |
@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, | |||
137 | mmc[0].gpio_cd = gpio + 0; | 136 | mmc[0].gpio_cd = gpio + 0; |
138 | omap2_hsmmc_init(mmc); | 137 | omap2_hsmmc_init(mmc); |
139 | 138 | ||
140 | /* link regulators to MMC adapters */ | ||
141 | touchbook_vmmc1_supply.dev = mmc[0].dev; | ||
142 | touchbook_vsim_supply.dev = mmc[0].dev; | ||
143 | |||
144 | /* REVISIT: need ehci-omap hooks for external VBUS | 139 | /* REVISIT: need ehci-omap hooks for external VBUS |
145 | * power switch and overcurrent detect | 140 | * power switch and overcurrent detect |
146 | */ | 141 | */ |
@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = { | |||
167 | .setup = touchbook_twl_gpio_setup, | 162 | .setup = touchbook_twl_gpio_setup, |
168 | }; | 163 | }; |
169 | 164 | ||
170 | static struct regulator_consumer_supply touchbook_vdac_supply = { | 165 | static struct regulator_consumer_supply touchbook_vdac_supply[] = { |
166 | { | ||
171 | .supply = "vdac", | 167 | .supply = "vdac", |
172 | .dev = &omap3_touchbook_lcd_device.dev, | 168 | .dev = &omap3_touchbook_lcd_device.dev, |
169 | }, | ||
173 | }; | 170 | }; |
174 | 171 | ||
175 | static struct regulator_consumer_supply touchbook_vdvi_supply = { | 172 | static struct regulator_consumer_supply touchbook_vdvi_supply[] = { |
173 | { | ||
176 | .supply = "vdvi", | 174 | .supply = "vdvi", |
177 | .dev = &omap3_touchbook_lcd_device.dev, | 175 | .dev = &omap3_touchbook_lcd_device.dev, |
176 | }, | ||
178 | }; | 177 | }; |
179 | 178 | ||
180 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 179 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -188,8 +187,8 @@ static struct regulator_init_data touchbook_vmmc1 = { | |||
188 | | REGULATOR_CHANGE_MODE | 187 | | REGULATOR_CHANGE_MODE |
189 | | REGULATOR_CHANGE_STATUS, | 188 | | REGULATOR_CHANGE_STATUS, |
190 | }, | 189 | }, |
191 | .num_consumer_supplies = 1, | 190 | .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply), |
192 | .consumer_supplies = &touchbook_vmmc1_supply, | 191 | .consumer_supplies = touchbook_vmmc1_supply, |
193 | }; | 192 | }; |
194 | 193 | ||
195 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 194 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -203,62 +202,15 @@ static struct regulator_init_data touchbook_vsim = { | |||
203 | | REGULATOR_CHANGE_MODE | 202 | | REGULATOR_CHANGE_MODE |
204 | | REGULATOR_CHANGE_STATUS, | 203 | | REGULATOR_CHANGE_STATUS, |
205 | }, | 204 | }, |
206 | .num_consumer_supplies = 1, | 205 | .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply), |
207 | .consumer_supplies = &touchbook_vsim_supply, | 206 | .consumer_supplies = touchbook_vsim_supply, |
208 | }; | ||
209 | |||
210 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
211 | static struct regulator_init_data touchbook_vdac = { | ||
212 | .constraints = { | ||
213 | .min_uV = 1800000, | ||
214 | .max_uV = 1800000, | ||
215 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
216 | | REGULATOR_MODE_STANDBY, | ||
217 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
218 | | REGULATOR_CHANGE_STATUS, | ||
219 | }, | ||
220 | .num_consumer_supplies = 1, | ||
221 | .consumer_supplies = &touchbook_vdac_supply, | ||
222 | }; | ||
223 | |||
224 | /* VPLL2 for digital video outputs */ | ||
225 | static struct regulator_init_data touchbook_vpll2 = { | ||
226 | .constraints = { | ||
227 | .name = "VDVI", | ||
228 | .min_uV = 1800000, | ||
229 | .max_uV = 1800000, | ||
230 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
231 | | REGULATOR_MODE_STANDBY, | ||
232 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
233 | | REGULATOR_CHANGE_STATUS, | ||
234 | }, | ||
235 | .num_consumer_supplies = 1, | ||
236 | .consumer_supplies = &touchbook_vdvi_supply, | ||
237 | }; | ||
238 | |||
239 | static struct twl4030_usb_data touchbook_usb_data = { | ||
240 | .usb_mode = T2_USB_MODE_ULPI, | ||
241 | }; | ||
242 | |||
243 | static struct twl4030_codec_audio_data touchbook_audio_data; | ||
244 | |||
245 | static struct twl4030_codec_data touchbook_codec_data = { | ||
246 | .audio_mclk = 26000000, | ||
247 | .audio = &touchbook_audio_data, | ||
248 | }; | 207 | }; |
249 | 208 | ||
250 | static struct twl4030_platform_data touchbook_twldata = { | 209 | static struct twl4030_platform_data touchbook_twldata = { |
251 | .irq_base = TWL4030_IRQ_BASE, | ||
252 | .irq_end = TWL4030_IRQ_END, | ||
253 | |||
254 | /* platform_data for children goes here */ | 210 | /* platform_data for children goes here */ |
255 | .usb = &touchbook_usb_data, | ||
256 | .gpio = &touchbook_gpio_data, | 211 | .gpio = &touchbook_gpio_data, |
257 | .codec = &touchbook_codec_data, | ||
258 | .vmmc1 = &touchbook_vmmc1, | 212 | .vmmc1 = &touchbook_vmmc1, |
259 | .vsim = &touchbook_vsim, | 213 | .vsim = &touchbook_vsim, |
260 | .vdac = &touchbook_vdac, | ||
261 | .vpll2 = &touchbook_vpll2, | ||
262 | }; | 214 | }; |
263 | 215 | ||
264 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | 216 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { |
@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | |||
270 | static int __init omap3_touchbook_i2c_init(void) | 222 | static int __init omap3_touchbook_i2c_init(void) |
271 | { | 223 | { |
272 | /* Standard TouchBook bus */ | 224 | /* Standard TouchBook bus */ |
273 | omap3_pmic_init("twl4030", &touchbook_twldata); | 225 | omap3_pmic_get_config(&touchbook_twldata, |
226 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
227 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
228 | |||
229 | touchbook_twldata.vdac->num_consumer_supplies = | ||
230 | ARRAY_SIZE(touchbook_vdac_supply); | ||
231 | touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply; | ||
274 | 232 | ||
233 | touchbook_twldata.vpll2->constraints.name = "VDVI"; | ||
234 | touchbook_twldata.vpll2->num_consumer_supplies = | ||
235 | ARRAY_SIZE(touchbook_vdvi_supply); | ||
236 | touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply; | ||
237 | |||
238 | omap3_pmic_init("twl4030", &touchbook_twldata); | ||
275 | /* Additional TouchBook bus */ | 239 | /* Additional TouchBook bus */ |
276 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, | 240 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, |
277 | ARRAY_SIZE(touchBook_i2c_boardinfo)); | 241 | ARRAY_SIZE(touchBook_i2c_boardinfo)); |
@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void) | |||
371 | 335 | ||
372 | static void __init omap3_touchbook_init_irq(void) | 336 | static void __init omap3_touchbook_init_irq(void) |
373 | { | 337 | { |
374 | omap_init_irq(); | 338 | omap3_init_irq(); |
375 | #ifdef CONFIG_OMAP_32K_TIMER | ||
376 | omap2_gp_clockevent_set_gptimer(12); | ||
377 | #endif | ||
378 | } | 339 | } |
379 | 340 | ||
380 | static struct platform_device *omap3_touchbook_devices[] __initdata = { | 341 | static struct platform_device *omap3_touchbook_devices[] __initdata = { |
@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | |||
449 | .init_early = omap3_touchbook_init_early, | 410 | .init_early = omap3_touchbook_init_early, |
450 | .init_irq = omap3_touchbook_init_irq, | 411 | .init_irq = omap3_touchbook_init_irq, |
451 | .init_machine = omap3_touchbook_init, | 412 | .init_machine = omap3_touchbook_init, |
452 | .timer = &omap_timer, | 413 | .timer = &omap3_secure_timer, |
453 | MACHINE_END | 414 | MACHINE_END |