summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavindra Lokhande <rlokhande@nvidia.com>2011-01-11 15:42:34 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2011-01-12 06:01:28 -0800
commit6b27d35c0ccb5193691282feef2e1d5abfdd1ce2 (patch)
tree4bc608c93f4e8f748ef94a14b3a5325db164ff83
parent0f04e9f691396f4d1e4288fff91ae8f5862dbba3 (diff)
[ARM] tegra: whistler: added das device
Added das device in board file. Set platform data for das device Change-Id: I61d2aa56d360ba0d47f802e2a74d1529328a02a3 Reviewed-on: http://git-master/r/15483 Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-whistler.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c
index f69c1bdcd84f..36ec4aed8eb0 100644
--- a/arch/arm/mach-tegra/board-whistler.c
+++ b/arch/arm/mach-tegra/board-whistler.c
@@ -47,6 +47,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/usb_phy.h>
+#include <mach/tegra_das.h>
#include "board.h"
#include "clock.h"
@@ -201,6 +202,73 @@ static struct tegra_i2c_platform_data whistler_dvc_platform_data = {
.is_dvc = true,
};
+static struct tegra_das_platform_data tegra_das_pdata = {
+ .tegra_dap_port_info_table = {
+ [0] = {
+ .dac_port = tegra_das_port_none,
+ .codec_type = tegra_audio_codec_type_none,
+ .device_property = {
+ .num_channels = 0,
+ .bits_per_sample = 0,
+ .rate = 0,
+ .dac_dap_data_comm_format = 0,
+ },
+ },
+ /* I2S1 <--> DAC1 <--> DAP1 <--> Hifi Codec */
+ [1] = {
+ .dac_port = tegra_das_port_i2s1,
+ .codec_type = tegra_audio_codec_type_hifi,
+ .device_property = {
+ .num_channels = 2,
+ .bits_per_sample = 16,
+ .rate = 44100,
+ .dac_dap_data_comm_format = dac_dap_data_format_i2s,
+ },
+ },
+ [2] = {
+ .dac_port = tegra_das_port_none,
+ .codec_type = tegra_audio_codec_type_none,
+ .device_property = {
+ .num_channels = 0,
+ .bits_per_sample = 0,
+ .rate = 0,
+ .dac_dap_data_comm_format = 0,
+ },
+ },
+ [3] = {
+ .dac_port = tegra_das_port_none,
+ .codec_type = tegra_audio_codec_type_none,
+ .device_property = {
+ .num_channels = 0,
+ .bits_per_sample = 0,
+ .rate = 0,
+ .dac_dap_data_comm_format = 0,
+ },
+ },
+ [4] = {
+ .dac_port = tegra_das_port_none,
+ .codec_type = tegra_audio_codec_type_none,
+ .device_property = {
+ .num_channels = 0,
+ .bits_per_sample = 0,
+ .rate = 0,
+ .dac_dap_data_comm_format = 0,
+ },
+ },
+ },
+
+ .tegra_das_con_table = {
+ [0] = {
+ .con_id = tegra_das_port_con_id_hifi,
+ .num_entries = 2,
+ .con_line = {
+ [0] = {tegra_das_port_i2s1, tegra_das_port_dap1, true},
+ [1] = {tegra_das_port_dap1, tegra_das_port_i2s1, false},
+ },
+ },
+ }
+};
+
static void whistler_i2c_init(void)
{
tegra_i2c_device1.dev.platform_data = &whistler_i2c1_platform_data;
@@ -260,6 +328,7 @@ static struct platform_device *whistler_devices[] __initdata = {
&tegra_avp_device,
&whistler_scroll_device,
&tegra_camera,
+ &tegra_das_device,
};
static struct synaptics_i2c_rmi_platform_data synaptics_pdata= {
@@ -390,6 +459,8 @@ static void __init tegra_whistler_init(void)
andusb_plat.serial_number = kstrdup(serial, GFP_KERNEL);
platform_add_devices(whistler_devices, ARRAY_SIZE(whistler_devices));
+ tegra_das_device.dev.platform_data = &tegra_das_pdata;
+
whistler_sdhci_init();
whistler_i2c_init();
whistler_regulator_init();