ARM: tegra: vcm3.0: t124: support audio driver
Songhee Baek [Wed, 18 Sep 2013 03:35:23 +0000 (20:35 -0700)]
 + wm8731 supply entry
 + fixing I2S pin direction
 + adding I2S0/I2S4 instantiation in dts
 + adding tegra_snd_vcm30_t124 platform device

Bug 1373091

Change-Id: Ia42e94b41fc94ad5702e5f65db471d8ab678c3d6
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/299362
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>

arch/arm/boot/dts/tegra124-vcm30_t124.dts
arch/arm/mach-tegra/board-vcm30_t124-pinmux-t12x.h
arch/arm/mach-tegra/board-vcm30_t124.c

index c15a648..cfbbe11 100644 (file)
                 compatible = "nvidia,tegra114-hsuart";
                 status = "okay";
         };
+
+       ahub {
+               status = "okay";
+
+               i2s@70301000 {
+                       status = "okay";
+               };
+               i2s@70301400 {
+                       status = "okay";
+               };
+               amx@70303000 {
+                       status = "okay";
+               };
+               adx@70303800 {
+                       status = "okay";
+               };
+       };
 };
index 68697c8..ef2f1c9 100644 (file)
@@ -122,8 +122,8 @@ static __initdata struct tegra_pingroup_config vcm30_t124_pinmux_common[] = {
        /* I2S4 pinmux */
        DEFAULT_PINMUX(GPIO_PBB6,     I2S4,        NORMAL,    NORMAL,   INPUT),
        DEFAULT_PINMUX(GPIO_PBB7,     I2S4,        NORMAL,    NORMAL,   OUTPUT),
-       DEFAULT_PINMUX(GPIO_PCC1,     I2S4,        NORMAL,    NORMAL,   OUTPUT),
-       DEFAULT_PINMUX(GPIO_PCC2,     I2S4,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(GPIO_PCC1,     I2S4,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(GPIO_PCC2,     I2S4,        NORMAL,    NORMAL,   INPUT),
 
        /* I2C2 pinmux */
        I2C_PINMUX(GEN2_I2C_SCL, I2C2, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
index 8b73e13..cff6ef2 100644 (file)
@@ -52,6 +52,7 @@ static __initdata struct tegra_clk_init_table vcm30_t124_clk_init_table[] = {
        { "hda",        "pll_p",        108000000,      false},
        { "hda2codec_2x", "pll_p",      48000000,       false},
        { "pwm",        "pll_p",        3187500,        false},
+       { "i2s0",       "pll_a_out0",   0,              false},
        { "i2s1",       "pll_a_out0",   0,              false},
        { "i2s3",       "pll_a_out0",   0,              false},
        { "i2s4",       "pll_a_out0",   0,              false},
@@ -168,6 +169,13 @@ static void vcm30_t124_nor_init(void)
        platform_device_register(&tegra_nor_device);
 }
 
+static struct i2c_board_info __initdata wm8731_board_info = {
+       I2C_BOARD_INFO("wm8731", 0x1a),
+};
+
+static struct i2c_board_info __initdata ad1937_board_info = {
+       I2C_BOARD_INFO("ad1937", 0x07),
+};
 
 static void vcm30_t124_i2c_init(void)
 {
@@ -185,6 +193,9 @@ static void vcm30_t124_i2c_init(void)
        platform_device_register(&tegra12_i2c_device3);
        platform_device_register(&tegra12_i2c_device2);
        platform_device_register(&tegra12_i2c_device1);
+
+       i2c_register_board_info(0, &wm8731_board_info, 1);
+       i2c_register_board_info(0, &ad1937_board_info, 1);
 }
 
 /* Register debug UART in old fashion and use DT for all others */
@@ -296,6 +307,11 @@ static void vcm30_t124_sata_init(void)
 static void vcm30_t124_sata_init(void) { }
 #endif
 
+static struct platform_device tegra_snd_vcm30t124 = {
+       .name = "tegra-snd-vcm30t124",
+       .id = 0,
+};
+
 /* FIXME: Check which devices are needed from the below list */
 static struct platform_device *vcm30_t124_devices[] __initdata = {
        &tegra_pmu_device,
@@ -307,17 +323,7 @@ static struct platform_device *vcm30_t124_devices[] __initdata = {
 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
        &tegra12_se_device,
 #endif
-       &tegra_ahub_device,
-       &tegra_dam_device0,
-       &tegra_dam_device1,
-       &tegra_dam_device2,
-       &tegra_i2s_device1,
-       &tegra_i2s_device3,
-       &tegra_i2s_device4,
-       &tegra_spdif_device,
-       &spdif_dit_device,
-       &bluetooth_dit_device,
-       &tegra_hda_device,
+       &tegra_snd_vcm30t124,
 };
 
 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
@@ -470,6 +476,10 @@ struct of_dev_auxdata vcm30_t124_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra124-vi", TEGRA_VI_BASE, "vi", NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISP_BASE, "isp", NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
+       OF_DEV_AUXDATA("nvidia,tegra124-apbdma", 0x60020000, "tegra-apbdma",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra124-ahub", 0x70300000,
+                               "tegra30-ahub-apbif", NULL),
        {}
 };
 #endif