diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-03-05 00:44:29 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-03-07 18:34:25 -0500 |
commit | ef2b1a0f1eb299c2d00addfee3a2631395d9bdb5 (patch) | |
tree | d5c6a5a13cf4b69910909988e1d8bd5ba1fe6865 /arch/arm/mach-tegra/board-harmony.c | |
parent | 986afbe493b09846dffbe5c1bf9a428a839b6ca2 (diff) |
ARM: tegra: harmony: Beginnings of audio support
This change includes everything required to enable audio on Harmony, except
those parts which rely on code not currently in Tegra's for-next branch, i.e.
except those parts which rely on merges of the Tegra I2C driver or latest
ASoC subsystem.
* Define GPIO names for audio-related GPIOs
* Set up platform data and platform device for ASoC machine driver
* Register audio-related platform devices
* Initialize audio-related clocks
* Correctly configure pinmux and GPIO enables for audio-related pins
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 2c4a234f8acb..38c2ab864503 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * arch/arm/mach-tegra/board-harmony.c | 2 | * arch/arm/mach-tegra/board-harmony.c |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Google, Inc. | 4 | * Copyright (C) 2010 Google, Inc. |
5 | * Copyright (C) 2011 NVIDIA, Inc. | ||
5 | * | 6 | * |
6 | * This software is licensed under the terms of the GNU General Public | 7 | * This software is licensed under the terms of the GNU General Public |
7 | * License version 2, as published by the Free Software Foundation, and | 8 | * License version 2, as published by the Free Software Foundation, and |
@@ -22,12 +23,14 @@ | |||
22 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
23 | #include <linux/pda_power.h> | 24 | #include <linux/pda_power.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/gpio.h> | ||
25 | 27 | ||
26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
29 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
30 | 32 | ||
33 | #include <mach/harmony_audio.h> | ||
31 | #include <mach/iomap.h> | 34 | #include <mach/iomap.h> |
32 | #include <mach/irqs.h> | 35 | #include <mach/irqs.h> |
33 | #include <mach/sdhci.h> | 36 | #include <mach/sdhci.h> |
@@ -60,11 +63,30 @@ static struct platform_device debug_uart = { | |||
60 | }, | 63 | }, |
61 | }; | 64 | }; |
62 | 65 | ||
66 | static struct harmony_audio_platform_data harmony_audio_pdata = { | ||
67 | .gpio_spkr_en = TEGRA_GPIO_SPKR_EN, | ||
68 | .gpio_hp_det = TEGRA_GPIO_HP_DET, | ||
69 | .gpio_int_mic_en = TEGRA_GPIO_INT_MIC_EN, | ||
70 | .gpio_ext_mic_en = TEGRA_GPIO_EXT_MIC_EN, | ||
71 | }; | ||
72 | |||
73 | static struct platform_device harmony_audio_device = { | ||
74 | .name = "tegra-snd-harmony", | ||
75 | .id = 0, | ||
76 | .dev = { | ||
77 | .platform_data = &harmony_audio_pdata, | ||
78 | }, | ||
79 | }; | ||
80 | |||
63 | static struct platform_device *harmony_devices[] __initdata = { | 81 | static struct platform_device *harmony_devices[] __initdata = { |
64 | &debug_uart, | 82 | &debug_uart, |
65 | &tegra_sdhci_device1, | 83 | &tegra_sdhci_device1, |
66 | &tegra_sdhci_device2, | 84 | &tegra_sdhci_device2, |
67 | &tegra_sdhci_device4, | 85 | &tegra_sdhci_device4, |
86 | &tegra_i2s_device1, | ||
87 | &tegra_das_device, | ||
88 | &tegra_pcm_device, | ||
89 | &harmony_audio_device, | ||
68 | }; | 90 | }; |
69 | 91 | ||
70 | static void __init tegra_harmony_fixup(struct machine_desc *desc, | 92 | static void __init tegra_harmony_fixup(struct machine_desc *desc, |
@@ -80,6 +102,10 @@ static void __init tegra_harmony_fixup(struct machine_desc *desc, | |||
80 | static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = { | 102 | static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = { |
81 | /* name parent rate enabled */ | 103 | /* name parent rate enabled */ |
82 | { "uartd", "pll_p", 216000000, true }, | 104 | { "uartd", "pll_p", 216000000, true }, |
105 | { "pll_a", "pll_p_out1", 56448000, true }, | ||
106 | { "pll_a_out0", "pll_a", 11289600, true }, | ||
107 | { "cdev1", NULL, 0, true }, | ||
108 | { "i2s1", "pll_a_out0", 11289600, false}, | ||
83 | { NULL, NULL, 0, 0}, | 109 | { NULL, NULL, 0, 0}, |
84 | }; | 110 | }; |
85 | 111 | ||