diff --git a/arch/arm/mach-msm/board-8064-gpiomux.c b/arch/arm/mach-msm/board-8064-gpiomux.c index aa3cf2387b8..99a3fa1f1cf 100644 --- a/arch/arm/mach-msm/board-8064-gpiomux.c +++ b/arch/arm/mach-msm/board-8064-gpiomux.c @@ -809,6 +809,71 @@ static struct msm_gpiomux_config mdm_configs[] __initdata = { }, }; +static struct gpiomux_setting mi2s_act_cfg = { + .func = GPIOMUX_FUNC_1, + .drv = GPIOMUX_DRV_8MA, + .pull = GPIOMUX_PULL_NONE, +}; + +static struct gpiomux_setting mi2s_sus_cfg = { + .func = GPIOMUX_FUNC_GPIO, + .drv = GPIOMUX_DRV_2MA, + .pull = GPIOMUX_PULL_DOWN, +}; + +static struct msm_gpiomux_config mpq8064_mi2s_configs[] __initdata = { + { + .gpio = 27, /* mi2s ws */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + { + .gpio = 28, /* mi2s sclk */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + { + .gpio = 29, /* mi2s dout3 */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + { + .gpio = 30, /* mi2s dout2 */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + + { + .gpio = 31, /* mi2s dout1 */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + { + .gpio = 32, /* mi2s dout0 */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, + + { + .gpio = 33, /* mi2s mclk */ + .settings = { + [GPIOMUX_ACTIVE] = &mi2s_act_cfg, + [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, + }, + }, +}; static struct msm_gpiomux_config apq8064_mxt_configs[] __initdata = { { /* TS INTERRUPT */ .gpio = 6, @@ -950,6 +1015,11 @@ void __init apq8064_init_gpiomux(void) " as audio is not the primary user" " for these GPIO Pins\n", __func__); + if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || + machine_is_mpq8064_dtv()) + msm_gpiomux_install(mpq8064_mi2s_configs, + ARRAY_SIZE(mpq8064_mi2s_configs)); + msm_gpiomux_install(apq8064_ext_regulator_configs, ARRAY_SIZE(apq8064_ext_regulator_configs)); diff --git a/arch/arm/mach-msm/board-8064.c b/arch/arm/mach-msm/board-8064.c index 0b1eafd93a6..322b353c9a7 100644 --- a/arch/arm/mach-msm/board-8064.c +++ b/arch/arm/mach-msm/board-8064.c @@ -1930,6 +1930,7 @@ static struct platform_device *common_devices[] __initdata = { &apq_cpudai0, &apq_cpudai1, &mpq_cpudai_sec_i2s_rx, + &mpq_cpudai_mi2s_tx, &apq_cpudai_hdmi_rx, &apq_cpudai_bt_rx, &apq_cpudai_bt_tx, diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c index 2bc2428c961..39eddfa66c0 100644 --- a/arch/arm/mach-msm/devices-8064.c +++ b/arch/arm/mach-msm/devices-8064.c @@ -481,6 +481,19 @@ struct platform_device apq_cpudai_auxpcm_tx = { }, }; +struct msm_mi2s_data mpq_mi2s_tx_data = { + .sd_lines = MSM_MI2S_SD0 | MSM_MI2S_SD1 | MSM_MI2S_SD2 | MSM_MI2S_SD3, + .capability = MSM_MI2S_CAP_TX, +}; + +struct platform_device mpq_cpudai_mi2s_tx = { + .name = "msm-dai-q6", + .id = 7, /*MI2S_TX */ + .dev = { + .platform_data = &mpq_mi2s_tx_data, + }, +}; + struct platform_device apq_cpu_fe = { .name = "msm-dai-fe", .id = -1, diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h index c396faa6b2b..9e3ac637dcc 100644 --- a/arch/arm/mach-msm/devices.h +++ b/arch/arm/mach-msm/devices.h @@ -238,6 +238,7 @@ extern struct platform_device apq_pcm; extern struct platform_device apq_pcm_routing; extern struct platform_device apq_cpudai0; extern struct platform_device apq_cpudai1; +extern struct platform_device mpq_cpudai_mi2s_tx; extern struct platform_device apq_cpudai_hdmi_rx; extern struct platform_device apq_cpudai_bt_rx; extern struct platform_device apq_cpudai_bt_tx;