* Drive audio-related pins, don't tri-state them. * Initially enable audio-related clocks. * Add platform data and device list for the I2C bus containing the audio codec. * Pull in the DAS and I2S platform devices. Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx> --- arch/arm/mach-tegra/board-harmony-pinmux.c | 4 +- arch/arm/mach-tegra/board-harmony.c | 30 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c index 78980e4..7cd7a8a 100644 --- a/arch/arm/mach-tegra/board-harmony-pinmux.c +++ b/arch/arm/mach-tegra/board-harmony-pinmux.c @@ -26,11 +26,11 @@ static __initdata struct tegra_pingroup_config harmony_pinmux[] = { {TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_OSC, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_OSC, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CSUS, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, - {TEGRA_PINGROUP_DAP1, TEGRA_MUX_DAP1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_DAP1, TEGRA_MUX_DAP1, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_DAP2, TEGRA_MUX_DAP2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_DAP3, TEGRA_MUX_DAP3, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_DAP4, TEGRA_MUX_DAP4, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index ee01dd0..1400fc5 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -23,6 +23,8 @@ #include <linux/mtd/partitions.h> #include <linux/dma-mapping.h> #include <linux/pda_power.h> +#include <linux/i2c.h> +#include <linux/i2c-tegra.h> #include <linux/io.h> #include <linux/delay.h> @@ -164,6 +166,18 @@ static struct platform_device pda_power_device = { }, }; +static struct tegra_i2c_platform_data harmony_i2c1_platform_data = { + .adapter_nr = 0, + .bus_count = 1, + .bus_clk_rate = { 400000, 0 }, +}; + +static struct i2c_board_info __initdata harmony_i2c_bus1_board_info[] = { + { + I2C_BOARD_INFO("wm8903", 0x1a), + }, +}; + static struct platform_device *harmony_devices[] __initdata = { &debug_uart, &pmu_device, @@ -179,6 +193,8 @@ static struct platform_device *harmony_devices[] __initdata = { &tegra_spi_device3, &tegra_spi_device4, &tegra_gart_device, + &tegra_i2s_device1, + &tegra_das_device, }; static void __init tegra_harmony_fixup(struct machine_desc *desc, @@ -194,6 +210,15 @@ static void __init tegra_harmony_fixup(struct machine_desc *desc, static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = { /* name parent rate enabled */ { "uartd", "pll_p", 216000000, true }, + { "clk_dev1", NULL, 26000000, true}, + { "clk_m", NULL, 12000000, true}, + { "pll_p", "clk_m", 216000000, true}, + { "pll_p_out1", "pll_p", 28800000, true}, + { "pll_a", "pll_p_out1", 56448000, true}, + { "pll_a_out0", "pll_a", 11289600, true}, + { "i2s1", "pll_a_out0", 11289600, true}, + { "audio", "pll_a_out0", 11289600, true}, + { "audio_2x", "audio", 22579200, true}, { NULL, NULL, 0, 0}, }; @@ -205,8 +230,13 @@ static void __init tegra_harmony_init(void) harmony_pinmux_init(); + tegra_i2c_device1.dev.platform_data = &harmony_i2c1_platform_data; + platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices)); + i2c_register_board_info(0, harmony_i2c_bus1_board_info, + ARRAY_SIZE(harmony_i2c_bus1_board_info)); + harmony_panel_init(); harmony_sdhci_init(); } -- 1.7.0.4 nvpublic -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html