aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap4panda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c60
1 files changed, 59 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 28fc271f7031..e4415917693f 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -28,6 +28,7 @@
28#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
29#include <linux/regulator/fixed.h> 29#include <linux/regulator/fixed.h>
30#include <linux/wl12xx.h> 30#include <linux/wl12xx.h>
31#include <linux/platform_data/omap-abe-twl6040.h>
31 32
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33#include <asm/hardware/gic.h> 34#include <asm/hardware/gic.h>
@@ -91,9 +92,34 @@ static struct platform_device leds_gpio = {
91 }, 92 },
92}; 93};
93 94
95static struct omap_abe_twl6040_data panda_abe_audio_data = {
96 /* Audio out */
97 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
98 /* HandsFree through expasion connector */
99 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
100 /* PandaBoard: FM TX, PandaBoardES: can be connected to audio out */
101 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
102 /* PandaBoard: FM RX, PandaBoardES: audio in */
103 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
104 /* No jack detection. */
105 .jack_detection = 0,
106 /* MCLK input is 38.4MHz */
107 .mclk_freq = 38400000,
108
109};
110
111static struct platform_device panda_abe_audio = {
112 .name = "omap-abe-twl6040",
113 .id = -1,
114 .dev = {
115 .platform_data = &panda_abe_audio_data,
116 },
117};
118
94static struct platform_device *panda_devices[] __initdata = { 119static struct platform_device *panda_devices[] __initdata = {
95 &leds_gpio, 120 &leds_gpio,
96 &wl1271_device, 121 &wl1271_device,
122 &panda_abe_audio,
97}; 123};
98 124
99static const struct usbhs_omap_board_data usbhs_bdata __initconst = { 125static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
@@ -252,8 +278,25 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
252 return 0; 278 return 0;
253} 279}
254 280
281static struct twl4030_codec_data twl6040_codec = {
282 /* single-step ramp for headset and handsfree */
283 .hs_left_step = 0x0f,
284 .hs_right_step = 0x0f,
285 .hf_left_step = 0x1d,
286 .hf_right_step = 0x1d,
287};
288
289static struct twl4030_audio_data twl6040_audio = {
290 .codec = &twl6040_codec,
291 .audpwron_gpio = 127,
292 .naudint_irq = OMAP44XX_IRQ_SYS_2N,
293 .irq_base = TWL6040_CODEC_IRQ_BASE,
294};
295
255/* Panda board uses the common PMIC configuration */ 296/* Panda board uses the common PMIC configuration */
256static struct twl4030_platform_data omap4_panda_twldata; 297static struct twl4030_platform_data omap4_panda_twldata = {
298 .audio = &twl6040_audio,
299};
257 300
258/* 301/*
259 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM 302 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
@@ -485,6 +528,20 @@ void omap4_panda_display_init(void)
485 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); 528 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
486} 529}
487 530
531static void omap4_panda_init_rev(void)
532{
533 if (cpu_is_omap443x()) {
534 /* PandaBoard 4430 */
535 /* ASoC audio configuration */
536 panda_abe_audio_data.card_name = "PandaBoard";
537 panda_abe_audio_data.has_hsmic = 1;
538 } else {
539 /* PandaBoard ES */
540 /* ASoC audio configuration */
541 panda_abe_audio_data.card_name = "PandaBoardES";
542 }
543}
544
488static void __init omap4_panda_init(void) 545static void __init omap4_panda_init(void)
489{ 546{
490 int package = OMAP_PACKAGE_CBS; 547 int package = OMAP_PACKAGE_CBS;
@@ -498,6 +555,7 @@ static void __init omap4_panda_init(void)
498 if (ret) 555 if (ret)
499 pr_err("error setting wl12xx data: %d\n", ret); 556 pr_err("error setting wl12xx data: %d\n", ret);
500 557
558 omap4_panda_init_rev();
501 omap4_panda_i2c_init(); 559 omap4_panda_i2c_init();
502 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); 560 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
503 platform_device_register(&omap_vwlan_device); 561 platform_device_register(&omap_vwlan_device);