aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2016-10-20 10:20:49 -0400
committerAndy Gross <andy.gross@linaro.org>2016-11-12 23:56:07 -0500
commit5582fcb3829faf5a942e53845b2cb47406fb4248 (patch)
treeca457a8897d93abc913d11ba493c9b14d839a390
parent29ac9652a210fcfaf72ed3a076b38092a2e8d5e4 (diff)
arm64: dts: apq8016-sbc: add analog audio support with multicodec
This patch add support to Analog audio both Playback and Capture via msm8916 WCD muti codec. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
-rw-r--r--arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi61
-rw-r--r--arch/arm64/boot/dts/qcom/msm8916.dtsi9
-rw-r--r--arch/arm64/boot/dts/qcom/pm8916.dtsi45
3 files changed, 114 insertions, 1 deletions
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 1483a959b49e..08bd5ebafb4e 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -15,6 +15,7 @@
15#include "pm8916.dtsi" 15#include "pm8916.dtsi"
16#include "apq8016-sbc-soc-pins.dtsi" 16#include "apq8016-sbc-soc-pins.dtsi"
17#include "apq8016-sbc-pmic-pins.dtsi" 17#include "apq8016-sbc-pmic-pins.dtsi"
18#include <dt-bindings/sound/apq8016-lpass.h>
18 19
19/ { 20/ {
20 aliases { 21 aliases {
@@ -251,6 +252,60 @@
251 vddio-supply = <&pm8916_l6>; 252 vddio-supply = <&pm8916_l6>;
252 }; 253 };
253 }; 254 };
255
256 lpass_codec: codec{
257 status = "okay";
258 };
259
260 /*
261 Internal Codec
262 playback - Primary MI2S
263 capture - Ter MI2S
264
265 External Primary:
266 playback - secondary MI2S
267 capture - Quat MI2S
268
269 External Secondary:
270 playback - Quat MI2S
271 capture - Quat MI2S
272
273 */
274
275 sound: sound {
276 compatible = "qcom,apq8016-sbc-sndcard";
277 reg = <0x07702000 0x4>, <0x07702004 0x4>;
278 reg-names = "mic-iomux", "spkr-iomux";
279
280 status = "okay";
281 pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
282 pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
283 pinctrl-names = "default", "sleep";
284 qcom,model = "DB410c";
285 qcom,audio-routing =
286 "AMIC2", "MIC BIAS Internal2",
287 "AMIC3", "MIC BIAS External1";
288
289 internal-codec-playback-dai-link@0 { /* I2S - Internal codec */
290 link-name = "WCD";
291 cpu { /* PRIMARY */
292 sound-dai = <&lpass MI2S_PRIMARY>;
293 };
294 codec {
295 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
296 };
297 };
298
299 internal-codec-capture-dai-link@0 { /* I2S - Internal codec */
300 link-name = "WCD-Capture";
301 cpu { /* PRIMARY */
302 sound-dai = <&lpass MI2S_TERTIARY>;
303 };
304 codec {
305 sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
306 };
307 };
308 };
254 }; 309 };
255 310
256 usb2513 { 311 usb2513 {
@@ -278,6 +333,12 @@
278 }; 333 };
279}; 334};
280 335
336&wcd_codec {
337 status = "okay";
338 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
339 clock-names = "mclk";
340};
341
281&smd_rpm_regulators { 342&smd_rpm_regulators {
282 vdd_l1_l2_l3-supply = <&pm8916_s3>; 343 vdd_l1_l2_l3-supply = <&pm8916_s3>;
283 vdd_l5-supply = <&pm8916_s3>; 344 vdd_l5-supply = <&pm8916_s3>;
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 04cde24f9786..4221b7d2c0ce 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -504,6 +504,15 @@
504 reg-names = "lpass-lpaif"; 504 reg-names = "lpass-lpaif";
505 }; 505 };
506 506
507 lpass_codec: codec{
508 compatible = "qcom,msm8916-wcd-digital-codec";
509 reg = <0x0771c000 0x400>;
510 clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>,
511 <&gcc GCC_CODEC_DIGCODEC_CLK>;
512 clock-names = "ahbix-clk", "mclk";
513 #sound-dai-cells = <1>;
514 };
515
507 sdhc_1: sdhci@07824000 { 516 sdhc_1: sdhci@07824000 {
508 compatible = "qcom,sdhci-msm-v4"; 517 compatible = "qcom,sdhci-msm-v4";
509 reg = <0x07824900 0x11c>, <0x07824000 0x800>; 518 reg = <0x07824900 0x11c>, <0x07824000 0x800>;
diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index f71679b15d54..53deebf9f515 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -91,9 +91,52 @@
91 }; 91 };
92 92
93 pm8916_1: pm8916@1 { 93 pm8916_1: pm8916@1 {
94 compatible = "qcom,spmi-pmic"; 94 compatible = "qcom,pm8916", "qcom,spmi-pmic";
95 reg = <0x1 SPMI_USID>; 95 reg = <0x1 SPMI_USID>;
96 #address-cells = <1>; 96 #address-cells = <1>;
97 #size-cells = <0>; 97 #size-cells = <0>;
98
99 wcd_codec: codec@f000 {
100 compatible = "qcom,pm8916-wcd-analog-codec";
101 reg = <0xf000 0x200>;
102 reg-names = "pmic-codec-core";
103 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
104 clock-names = "mclk";
105 interrupt-parent = <&spmi_bus>;
106 interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
107 <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
108 <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
109 <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
110 <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
111 <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
112 <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
113 <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
114 <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
115 <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
116 <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
117 <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
118 <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
119 <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
120 interrupt-names = "cdc_spk_cnp_int",
121 "cdc_spk_clip_int",
122 "cdc_spk_ocp_int",
123 "mbhc_ins_rem_det1",
124 "mbhc_but_rel_det",
125 "mbhc_but_press_det",
126 "mbhc_ins_rem_det",
127 "mbhc_switch_int",
128 "cdc_ear_ocp_int",
129 "cdc_hphr_ocp_int",
130 "cdc_hphl_ocp_det",
131 "cdc_ear_cnp_int",
132 "cdc_hphr_cnp_int",
133 "cdc_hphl_cnp_int";
134 vdd-cdc-io-supply = <&pm8916_l5>;
135 vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
136 vdd-micbias-supply = <&pm8916_l13>;
137 #sound-dai-cells = <1>;
138
139 };
140
98 }; 141 };
99}; 142};