Merge "ARM: dts: msm: Add audio support for SA515M CCARD boards"

tirimbino
qctecmdr 6 years ago committed by Gerrit - the friendly Code Review server
commit 82d45cdea1
  1. 71
      Documentation/devicetree/bindings/sound/qcom-audio-dev.txt
  2. 3
      Documentation/devicetree/bindings/sound/tlv320aic3x.txt
  3. 1
      arch/arm/configs/vendor/sdxprairie-auto-perf_defconfig
  4. 1
      arch/arm/configs/vendor/sdxprairie-auto_defconfig
  5. 46
      arch/arm64/boot/dts/qcom/sa515m-ccard.dtsi
  6. 15
      arch/arm64/boot/dts/qcom/sdxprairie-pinctrl.dtsi
  7. 15
      sound/soc/codecs/tlv320aic3x.c

@ -1859,6 +1859,77 @@ Example:
"msm-dai-q6-auxpcm.2";
};
* SDX ASoC Auto Machine driver
Required properties:
- compatible : "qcom,sdx-asoc-snd-auto"
- qcom,model : The user-visible name of this sound card.
- qcom,prim_mi2s_aux_master : Handle to prim_master pinctrl configurations
- qcom,prim_mi2s_aux_slave : Handle to prim_slave pinctrl configurations
- qcom,sec_mi2s_aux_master : Handle to sec_master pinctrl configurations
- qcom,sec_mi2s_aux_slave : Handle to sec_slave pinctrl configurations
- asoc-platform: This is phandle list containing the references to platform device
nodes that are used as part of the sound card dai-links.
- asoc-platform-names: This property contains list of platform names. The order of
the platform names should match to that of the phandle order
given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
cpu dai names should match to that of the phandle order give
in "asoc-cpu". The cpu names are in the form of "%s.%d" form,
where the id (%d) field represents the back-end AFE port id that
this CPU dai is associated with.
- asoc-codec: This is phandle list containing the references to codec dai device
nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
codec dai names should match to that of the phandle order given
in "asoc-codec".
Example:
sound-auto {
compatible = "qcom,sdx-asoc-snd-auto";
qcom,model = "sdx-auto-i2s-snd-card";
qcom,prim_mi2s_aux_master = <&prim_master>;
qcom,prim_mi2s_aux_slave = <&prim_slave>;
qcom,sec_mi2s_aux_master = <&sec_master>;
qcom,sec_mi2s_aux_slave = <&sec_slave>;
asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
<&loopback>, <&hostless>, <&afe>, <&routing>,
<&pcm_dtmf>, <&host_pcm>, <&compress>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-voip-dsp", "msm-pcm-voice",
"msm-pcm-loopback", "msm-pcm-hostless",
"msm-pcm-afe", "msm-pcm-routing",
"msm-pcm-dtmf", "msm-voice-host-pcm",
"msm-compress-dsp";
asoc-cpu = <&dai_pri_auxpcm>, <&mi2s_prim>, <&mi2s_sec>,
<&dtmf_tx>,
<&rx_capture_tx>, <&rx_playback_rx>,
<&tx_capture_tx>, <&tx_playback_rx>,
<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>,
<&afe_proxy_tx>, <&incall_record_rx>,
<&incall_record_tx>, <&incall_music_rx>,
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
<&dai_sec_auxpcm>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-stub-dev.4", "msm-dai-stub-dev.5",
"msm-dai-stub-dev.6", "msm-dai-stub-dev.7",
"msm-dai-stub-dev.8", "msm-dai-q6-dev.224",
"msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
"msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
"msm-dai-q6-auxpcm.2";
asoc-codec = <&tlv320aic3x_codec>, <&stub_codec>;
asoc-codec-names = "tlv320aic3x-codec", "msm-stub-codec.1";
};
* voice-mhi-audio
Required properties:

@ -17,7 +17,8 @@ Required properties:
Optional properties:
- gpio-reset - gpio pin number used for codec reset
- gpio-reset - gpio pin number used for codec reset, default active low
- reset-inverted - set the reset gpio mode as active high
- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
- Not supported on tlv320aic3104
- ai3x-micbias-vg - MicBias Voltage required.

@ -281,6 +281,7 @@ CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_TLV320AIC3X=y
CONFIG_UHID=y
CONFIG_HID_APPLE=y
CONFIG_HID_ELECOM=y

@ -282,6 +282,7 @@ CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_TLV320AIC3X=y
CONFIG_UHID=y
CONFIG_HID_APPLE=y
CONFIG_HID_ELECOM=y

@ -23,6 +23,51 @@
gpio = <&tlmm 23 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
snd_tlv3x: sound-auto {
compatible = "qcom,sdx-asoc-snd-auto";
qcom,model = "sdx-auto-i2s-snd-card";
qcom,prim_mi2s_aux_master = <&prim_master>;
qcom,prim_mi2s_aux_slave = <&prim_slave>;
qcom,sec_mi2s_aux_master = <&sec_master>;
qcom,sec_mi2s_aux_slave = <&sec_slave>;
pinctrl-names = "default";
pinctrl-0 = <&a2b_cdc_sel_default>, <&i2s_mclk_active>;
asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
<&loopback>, <&hostless>, <&afe>, <&routing>,
<&pcm_dtmf>, <&host_pcm>, <&compress>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-voip-dsp", "msm-pcm-voice",
"msm-pcm-loopback", "msm-pcm-hostless",
"msm-pcm-afe", "msm-pcm-routing",
"msm-pcm-dtmf", "msm-voice-host-pcm",
"msm-compress-dsp";
asoc-cpu = <&dai_pri_auxpcm>, <&mi2s_prim>, <&mi2s_sec>,
<&dtmf_tx>,
<&rx_capture_tx>, <&rx_playback_rx>,
<&tx_capture_tx>, <&tx_playback_rx>,
<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>,
<&afe_proxy_tx>, <&incall_record_rx>,
<&incall_record_tx>, <&incall_music_rx>,
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
<&dai_sec_auxpcm>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-stub-dev.4", "msm-dai-stub-dev.5",
"msm-dai-stub-dev.6", "msm-dai-stub-dev.7",
"msm-dai-stub-dev.8", "msm-dai-q6-dev.224",
"msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
"msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
"msm-dai-q6-auxpcm.2";
asoc-codec = <&tlv320aic3x_codec>, <&stub_codec>;
asoc-codec-names = "tlv320aic3x-codec", "msm-stub-codec.1";
};
};
/* delete pm8150b nodes */
@ -113,6 +158,7 @@
reset-inverted;
AVDD-supply = <&codec_vreg>;
IOVDD-supply = <&codec_vreg>;
ai3x-ocmv = <1>;
};
eeprom@52 {

@ -1473,5 +1473,20 @@
};
};
a2b_cdc_sel {
a2b_cdc_sel_default: a2b_cdc_sel_default {
mux {
pins = "gpio97";
function = "gpio";
};
config {
pins = "gpio97";
drive-strength = <8>;
bias-disable;
output-high;
};
};
};
};
};

@ -84,6 +84,7 @@ struct aic3x_priv {
struct list_head list;
int master;
int gpio_reset;
bool reset_inverted;
int power;
#define AIC3X_MODEL_3X 0
#define AIC3X_MODEL_33 1
@ -1355,7 +1356,8 @@ static int aic3x_regulator_event(struct notifier_block *nb,
* of the supplies was disabled
*/
if (gpio_is_valid(aic3x->gpio_reset))
gpio_set_value(aic3x->gpio_reset, 0);
gpio_set_value(aic3x->gpio_reset,
aic3x->reset_inverted);
regcache_mark_dirty(aic3x->regmap);
}
@ -1377,7 +1379,8 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
if (gpio_is_valid(aic3x->gpio_reset)) {
udelay(1);
gpio_set_value(aic3x->gpio_reset, 1);
gpio_set_value(aic3x->gpio_reset,
!aic3x->reset_inverted);
}
/* Sync reg_cache with the hardware */
@ -1810,6 +1813,9 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
else
aic3x->gpio_reset = -1;
aic3x->reset_inverted =
of_property_read_bool(np, "reset-inverted");
if (of_property_read_u32_array(np, "ai3x-gpio-func",
ai3x_setup->gpio_func, 2) >= 0) {
aic3x->setup = ai3x_setup;
@ -1846,7 +1852,8 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
ret = gpio_request(aic3x->gpio_reset, "tlv320aic3x reset");
if (ret != 0)
goto err;
gpio_direction_output(aic3x->gpio_reset, 0);
gpio_direction_output(aic3x->gpio_reset,
aic3x->reset_inverted);
}
for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++)
@ -1894,7 +1901,7 @@ static int aic3x_i2c_remove(struct i2c_client *client)
snd_soc_unregister_codec(&client->dev);
if (gpio_is_valid(aic3x->gpio_reset) &&
!aic3x_is_shared_reset(aic3x)) {
gpio_set_value(aic3x->gpio_reset, 0);
gpio_set_value(aic3x->gpio_reset, aic3x->reset_inverted);
gpio_free(aic3x->gpio_reset);
}
return 0;

Loading…
Cancel
Save