Commit 89a32a4e authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Bjorn Andersson

arm64: dts: qcom: db845c: add analog audio support

This patch adds support to Analog audio via WSA881x speakers.
Reviewed-by: default avatarVinod Koul <vkoul@kernel.org>
Tested-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200312143024.11059-6-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 606057bd
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi" #include "sdm845.dtsi"
#include "pm8998.dtsi" #include "pm8998.dtsi"
#include "pmi8998.dtsi" #include "pmi8998.dtsi"
...@@ -429,6 +431,37 @@ resin { ...@@ -429,6 +431,37 @@ resin {
}; };
}; };
/* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
&q6afedai {
qi2s@22 {
reg = <22>;
qcom,sd-lines = <0 1 2 3>;
};
};
&q6asmdai {
dai@0 {
reg = <0>;
direction = <2>;
};
dai@1 {
reg = <1>;
direction = <2>;
};
dai@2 {
reg = <2>;
direction = <1>;
};
dai@3 {
reg = <3>;
direction = <2>;
is-compress-dai;
};
};
&qupv3_id_0 { &qupv3_id_0 {
status = "okay"; status = "okay";
}; };
...@@ -450,6 +483,89 @@ &sdhc_2 { ...@@ -450,6 +483,89 @@ &sdhc_2 {
cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>; cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
}; };
&sound {
compatible = "qcom,db845c-sndcard";
pinctrl-0 = <&quat_mi2s_active
&quat_mi2s_sd0_active
&quat_mi2s_sd1_active
&quat_mi2s_sd2_active
&quat_mi2s_sd3_active>;
pinctrl-names = "default";
model = "DB845c";
audio-routing =
"RX_BIAS", "MCLK",
"AMIC1", "MIC BIAS1",
"AMIC2", "MIC BIAS2",
"DMIC0", "MIC BIAS1",
"DMIC1", "MIC BIAS1",
"DMIC2", "MIC BIAS3",
"DMIC3", "MIC BIAS3",
"SpkrLeft IN", "SPK1 OUT",
"SpkrRight IN", "SPK2 OUT",
"MM_DL1", "MultiMedia1 Playback",
"MM_DL2", "MultiMedia2 Playback",
"MM_DL4", "MultiMedia4 Playback",
"MultiMedia3 Capture", "MM_UL3";
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
mm2-dai-link {
link-name = "MultiMedia2";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
};
};
mm3-dai-link {
link-name = "MultiMedia3";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
};
};
mm4-dai-link {
link-name = "MultiMedia4";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
};
};
slim-dai-link {
link-name = "SLIM Playback";
cpu {
sound-dai = <&q6afedai SLIMBUS_0_RX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>;
};
};
slimcap-dai-link {
link-name = "SLIM Capture";
cpu {
sound-dai = <&q6afedai SLIMBUS_0_TX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&wcd9340 1>;
};
};
};
&spi2 { &spi2 {
/* On Low speed expansion */ /* On Low speed expansion */
label = "LS-SPI0"; label = "LS-SPI0";
...@@ -553,6 +669,15 @@ sdc2_card_det_n: sd-card-det-n { ...@@ -553,6 +669,15 @@ sdc2_card_det_n: sd-card-det-n {
function = "gpio"; function = "gpio";
bias-pull-up; bias-pull-up;
}; };
wcd_intr_default: wcd_intr_default {
pins = <54>;
function = "gpio";
input-enable;
bias-pull-down;
drive-strength = <2>;
};
}; };
&uart3 { &uart3 {
...@@ -649,6 +774,39 @@ &ufs_mem_phy { ...@@ -649,6 +774,39 @@ &ufs_mem_phy {
vdda-pll-supply = <&vreg_l26a_1p2>; vdda-pll-supply = <&vreg_l26a_1p2>;
}; };
&wcd9340{
pinctrl-0 = <&wcd_intr_default>;
pinctrl-names = "default";
clock-names = "extclk";
clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
reset-gpios = <&tlmm 64 0>;
vdd-buck-supply = <&vreg_s4a_1p8>;
vdd-buck-sido-supply = <&vreg_s4a_1p8>;
vdd-tx-supply = <&vreg_s4a_1p8>;
vdd-rx-supply = <&vreg_s4a_1p8>;
vdd-io-supply = <&vreg_s4a_1p8>;
swm: swm@c85 {
left_spkr: wsa8810-left{
compatible = "sdw10217201000";
reg = <0 1>;
powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
#thermal-sensor-cells = <0>;
sound-name-prefix = "SpkrLeft";
#sound-dai-cells = <0>;
};
right_spkr: wsa8810-right{
compatible = "sdw10217201000";
powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
reg = <0 2>;
#thermal-sensor-cells = <0>;
sound-name-prefix = "SpkrRight";
#sound-dai-cells = <0>;
};
};
};
&wifi { &wifi {
status = "okay"; status = "okay";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment