diff options
author | Nitin Pai <npai@nvidia.com> | 2012-03-15 10:57:11 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-23 21:16:40 -0700 |
commit | 3024872189daa1bbe5773094a807b71ec32929e8 (patch) | |
tree | 69c356afd2d9b084f588986fd6eb22a35a3fe3af /arch/arm/mach-tegra/board-p1852.c | |
parent | caf884cceb39f7a314ad023d340d2b27d0889240 (diff) |
arm: tegra: p1852: instantiated audio drivers
Instantiated audio drivers for I2S and AHUB.
Instantiated the machine driver for P1852 boards.
Added clocks that were not initialized by QB which are needed to be on.
Bug 948478
Change-Id: I6e696f97ed114ae684a74d9b9869066606dfaa22
Signed-off-by: Nitin Pai <npai@nvidia.com>
Reviewed-on: http://git-master/r/90252
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
Tested-by: Bob Johnston <bjohnston@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Rebase-Id: R0d2ec794b1d1b6780f8e3ba292f44c69ea784db7
Diffstat (limited to 'arch/arm/mach-tegra/board-p1852.c')
-rw-r--r-- | arch/arm/mach-tegra/board-p1852.c | 70 |
1 files changed, 65 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-p1852.c b/arch/arm/mach-tegra/board-p1852.c index 4b978da9f63d..b53f9a7311f4 100644 --- a/arch/arm/mach-tegra/board-p1852.c +++ b/arch/arm/mach-tegra/board-p1852.c @@ -43,6 +43,7 @@ #include <mach/io.h> #include <mach/pci.h> #include <mach/audio.h> +#include <mach/tegra_p1852_pdata.h> #include <asm/mach/flash.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -113,11 +114,20 @@ static __initdata struct tegra_clk_init_table p1852_clk_init_table[] = { { "sbc5", "pll_m", 100000000, true}, { "sbc6", "pll_m", 100000000, true}, { "cpu_g", "cclk_g", 900000000, true}, - { "i2s0", "clk_m", 12288000, false}, - { "i2s1", "clk_m", 12288000, false}, - { "i2s2", "clk_m", 12288000, false}, - { "i2s3", "clk_m", 12288000, false}, - { "i2s4", "clk_m", 12288000, false}, + { "i2s0", "pll_a_out0", 12288000, false}, + { "i2s1", "pll_a_out0", 12288000, false}, + { "i2s2", "pll_a_out0", 12288000, false}, + { "i2s3", "pll_a_out0", 12288000, false}, + { "i2s4", "pll_a_out0", 12288000, false}, + { "audio0", "i2s0_sync", 12288000, false}, + { "audio1", "i2s1_sync", 12288000, false}, + { "audio2", "i2s2_sync", 12288000, false}, + { "audio3", "i2s3_sync", 12288000, false}, + { "audio4", "i2s4_sync", 12288000, false}, + { "apbif", "clk_m", 12000000, false}, + { "dam0", "clk_m", 12000000, true}, + { "dam1", "clk_m", 12000000, true}, + { "dam2", "clk_m", 12000000, true}, { "vi", "pll_p", 200000000, true}, { "vi_sensor", "pll_p", 150000000, true}, { "vde", "pll_c", 484000000, true}, @@ -221,6 +231,55 @@ static void __init p1852_uart_init(void) ARRAY_SIZE(p1852_uart_devices)); } +static struct tegra_p1852_platform_data p1852_audio_pdata = { + .codec_info[0] = { + .codec_dai_name = "dit-hifi", + .cpu_dai_name = "tegra30-i2s.0", + .codec_name = "spdif-dit.0", + .name = "tegra-i2s-1", + .i2s_format = format_i2s, + .master = 1, + }, + .codec_info[1] = { + .codec_dai_name = "dit-hifi", + .cpu_dai_name = "tegra30-i2s.1", + .codec_name = "spdif-dit.1", + .name = "tegra-i2s-2", + .i2s_format = format_i2s, + .master = 0, + }, + +}; + +static struct platform_device generic_codec_1 = { + .name = "spdif-dit", + .id = 0, +}; +static struct platform_device generic_codec_2 = { + .name = "spdif-dit", + .id = 1, +}; + +static struct platform_device tegra_snd_p1852 = { + .name = "tegra-snd-p1852", + .id = 0, + .dev = { + .platform_data = &p1852_audio_pdata, + }, +}; + +static void p1852_i2s_audio_init(void) +{ + platform_device_register(&tegra_pcm_device); + platform_device_register(&generic_codec_1); + platform_device_register(&generic_codec_2); + platform_device_register(&tegra_i2s_device0); + platform_device_register(&tegra_i2s_device1); + platform_device_register(&tegra_ahub_device); + platform_device_register(&tegra_snd_p1852); +} + + #if defined(CONFIG_SPI_TEGRA) && defined(CONFIG_SPI_SPIDEV) static struct spi_board_info tegra_spi_devices[] __initdata = { { @@ -362,6 +421,7 @@ static void __init tegra_p1852_init(void) tegra_clk_init_from_table(p1852_clk_init_table); p1852_pinmux_init(); p1852_i2c_init(); + p1852_i2s_audio_init(); p1852_gpio_init(); p1852_uart_init(); p1852_usb_init(); |