ASoC: mpq8064: Add the platform specific change to enable MI2S
Add the platform specific change to support MI2S TX for MPQ8064 platform which is used for the HDMI input from externel HDMI chip to audio DSP in MPQ8064. Change-Id: I1974320adc6570eb3effaa7f30f0d1ba36422fb8 Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user