diff --git a/qcom/sdx-audio-lpass.dtsi b/qcom/sdx-audio-lpass.dtsi index 8a5b8374ea3f..bc1beebeac0c 100644 --- a/qcom/sdx-audio-lpass.dtsi +++ b/qcom/sdx-audio-lpass.dtsi @@ -14,7 +14,7 @@ }; qcom,msm-audio-ion { - compatible = "qcom,msm-audio-ion"; + compatible = "qcom,msm-audio-ion-cma"; memory-region = <&audio_mem>; }; diff --git a/qcom/sdx-wsa881x.dtsi b/qcom/sdx-wsa881x.dtsi index 4cf0330514ff..bd4ba29d6156 100644 --- a/qcom/sdx-wsa881x.dtsi +++ b/qcom/sdx-wsa881x.dtsi @@ -1,35 +1,16 @@ -&soc { +&i2c_3 { tavil_codec { swr_master { compatible = "qcom,swr-wcd"; #address-cells = <2>; #size-cells = <0>; - - wsa881x_0211: wsa881x@20170211 { - status = "disabled"; - compatible = "qcom,wsa881x"; - reg = <0x00 0x20170211>; - qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd1>; - }; - - wsa881x_0212: wsa881x@20170212 { - status = "disabled"; - compatible = "qcom,wsa881x"; - reg = <0x00 0x20170212>; - qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd2>; - }; - - wsa881x_0213: wsa881x@21170213 { - status = "disabled"; - compatible = "qcom,wsa881x"; - reg = <0x00 0x21170213>; - qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd1>; - }; + qcom,swr-num-dev = <1>; wsa881x_0214: wsa881x@21170214 { compatible = "qcom,wsa881x"; reg = <0x00 0x21170214>; - qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd2>; + qcom,spkr-sd-n-node = <&wsa_spkr_wcd_sd1>; + qcom,wsa-prefix = "SpkrLeft"; }; }; }; diff --git a/qcom/sdxlemur-audio-overlay.dtsi b/qcom/sdxlemur-audio-overlay.dtsi index 950bc2e383a5..172f7237318f 100644 --- a/qcom/sdxlemur-audio-overlay.dtsi +++ b/qcom/sdxlemur-audio-overlay.dtsi @@ -6,41 +6,40 @@ qcom,audio-routing = "RX_BIAS", "MCLK", "MADINPUT", "MCLK", - "AMIC2", "MIC BIAS2", - "MIC BIAS2", "Headset Mic", - "AMIC3", "MIC BIAS2", - "MIC BIAS2", "ANCRight Headset Mic", - "AMIC4", "MIC BIAS2", - "MIC BIAS2", "ANCLeft Headset Mic", - "AMIC5", "MIC BIAS3", - "MIC BIAS3", "Handset Mic", + "AMIC2", "Headset Mic", + "Headset Mic", "MIC BIAS2", + "AMIC3", "ANCRight Headset Mic", + "ANCRight Headset Mic", "MIC BIAS2", + "AMIC4", "ANCLeft Headset Mic", + "ANCLeft Headset Mic", "MIC BIAS2", + "AMIC5", "Handset Mic", + "Handset Mic", "MIC BIAS3", + "DMIC1", "Digital Mic1", "DMIC1", "MIC BIAS1", - "MIC BIAS1", "Digital Mic1", + "DMIC2", "Digital Mic2", "DMIC2", "MIC BIAS3", - "MIC BIAS3", "Digital Mic2", + "DMIC3", "Digital Mic3", "DMIC3", "MIC BIAS3", - "MIC BIAS3", "Digital Mic3", + "DMIC4", "Digital Mic4", "DMIC4", "MIC BIAS4", - "MIC BIAS4", "Digital Mic4", + "DMIC5", "Digital Mic5", "DMIC5", "MIC BIAS4", - "MIC BIAS4", "Digital Mic5", - "SpkrRight IN", "SPK2 OUT"; + "SpkrLeft IN", "SPK2 OUT"; qcom,msm-mbhc-hphl-swh = <1>; qcom,msm-mbhc-gnd-swh = <1>; qcom,msm-mbhc-hs-mic-max-threshold-mv = <1700>; qcom,msm-mbhc-hs-mic-min-threshold-mv = <50>; qcom,cdc-ext-clk-rate = <19200000>; - qcom,tavil-mclk-clk-freq = <9600000>; + qcom,tavil-mclk-clk-freq = <12288000>; asoc-codec = <&stub_codec>; asoc-codec-names = "msm-stub-codec.1"; - qcom,wsa-max-devs = <2>; - qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>, - <&wsa881x_0213>, <&wsa881x_0214>; - qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight", - "SpkrLeft", "SpkrRight"; + qcom,wsa-max-devs = <1>; + qcom,swr-num-dev = <1>; + qcom,wsa-devs = <&wsa881x_0214>; + qcom,wsa-aux-dev-prefix = "SpkrLeft"; }; &soc { @@ -50,7 +49,7 @@ interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&tlmm>; - qcom,gpio-connect = <&tlmm 96 0>; + qcom,gpio-connect = <&tlmm 48 0>; pinctrl-names = "default"; pinctrl-0 = <&wcd_intr_default>; }; @@ -58,7 +57,7 @@ clock_audio_up: audio_ext_clk_up { compatible = "qcom,audio-ref-clk"; qcom,codec-ext-clk-src = ; - qcom,codec-lpass-clk-id = <770>; + qcom,codec-lpass-clk-id = <0x302>; qcom,codec-lpass-ext-clk-freq = <9600000>; qcom,use-pinctrl = <1>; pinctrl-names = "sleep", "active"; @@ -67,16 +66,17 @@ #clock-cells = <1>; }; - wcd_rst_gpio: msm_cdc_pinctrl@92 { + wcd_rst_gpio: msm_cdc_pinctrl@49 { compatible = "qcom,msm-cdc-pinctrl"; - qcom,cdc-rst-n-gpio = <&tlmm 92 0>; + qcom,cdc-rst-n-gpio = <&tlmm 49 0>; pinctrl-names = "aud_active", "aud_sleep"; pinctrl-0 = <&cdc_reset_active>; pinctrl-1 = <&cdc_reset_sleep>; }; }; -&soc { +&i2c_3 { + status = "ok"; wcd934x_cdc: tavil_codec { compatible = "qcom,tavil-i2c"; reg = <0x0d>; @@ -91,23 +91,23 @@ clock-names = "wcd_clk"; clocks = <&clock_audio_up 0>; - cdc-vdd-buck-supply = <&pmxprairie_l6>; + cdc-vdd-buck-supply = <&pmx65_l6>; qcom,cdc-vdd-buck-voltage = <1800000 1800000>; qcom,cdc-vdd-buck-current = <650000>; - cdc-buck-sido-supply = <&pmxprairie_l6>; + cdc-buck-sido-supply = <&pmx65_l6>; qcom,cdc-buck-sido-voltage = <1800000 1800000>; qcom,cdc-buck-sido-current = <250000>; - cdc-vdd-tx-h-supply = <&pmxprairie_l6>; + cdc-vdd-tx-h-supply = <&pmx65_l6>; qcom,cdc-vdd-tx-h-voltage = <1800000 1800000>; qcom,cdc-vdd-tx-h-current = <25000>; - cdc-vdd-rx-h-supply = <&pmxprairie_l6>; + cdc-vdd-rx-h-supply = <&pmx65_l6>; qcom,cdc-vdd-rx-h-voltage = <1800000 1800000>; qcom,cdc-vdd-rx-h-current = <25000>; - cdc-vddpx-1-supply = <&pmxprairie_l6>; + cdc-vddpx-1-supply = <&pmx65_l6>; qcom,cdc-vddpx-1-voltage = <1800000 1800000>; qcom,cdc-vddpx-1-current = <10000>; diff --git a/qcom/sdxlemur-cdp-audio-overlay.dtsi b/qcom/sdxlemur-cdp-audio-overlay.dtsi new file mode 100644 index 000000000000..589ba030b873 --- /dev/null +++ b/qcom/sdxlemur-cdp-audio-overlay.dtsi @@ -0,0 +1,14 @@ +#include "sdxlemur-audio-overlay.dtsi" + +&soc { + sound-tavil { + qcom,wsa-max-devs = <1>; + qcom,wsa-devs = <&wsa881x_0214>; + qcom,wsa-aux-dev-prefix = "SpkrLeft"; + }; +}; + +&wsa_spkr_wcd_sd2 { + pinctrl-0 = <&spkr_1_wcd_en_active>; + pinctrl-1 = <&spkr_1_wcd_en_sleep>; +}; diff --git a/qcom/sdxlemur-cdp.dtsi b/qcom/sdxlemur-cdp.dtsi index 2d64f22dc8a6..4f802df82626 100644 --- a/qcom/sdxlemur-cdp.dtsi +++ b/qcom/sdxlemur-cdp.dtsi @@ -1,5 +1,6 @@ #include "sdxlemur-pmic-overlay.dtsi" #include "sdxlemur-cnss.dtsi" +#include "sdxlemur-cdp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-ion.dtsi b/qcom/sdxlemur-ion.dtsi index 5eb8ae2d48f1..3ad735dd3ecb 100644 --- a/qcom/sdxlemur-ion.dtsi +++ b/qcom/sdxlemur-ion.dtsi @@ -10,6 +10,12 @@ reg = ; qcom,ion-heap-type = "MSM_SYSTEM"; }; + + qcom,ion-heap@8 { /* AUDIO HEAP */ + reg = ; + memory-region = <&audio_mem>; + qcom,ion-heap-type = "DMA"; + }; }; }; diff --git a/qcom/sdxlemur-mtp-audio-overlay.dtsi b/qcom/sdxlemur-mtp-audio-overlay.dtsi new file mode 100644 index 000000000000..b6680a1d9226 --- /dev/null +++ b/qcom/sdxlemur-mtp-audio-overlay.dtsi @@ -0,0 +1,10 @@ +#include "sdxlemur-audio-overlay.dtsi" + +&soc { + sound-tavil { + qcom,wsa-max-devs = <1>; + qcom,wsa-devs = <&wsa881x_0214>; + qcom,wsa-aux-dev-prefix = "SpkrLeft"; + }; +}; + diff --git a/qcom/sdxlemur-mtp-cpe.dtsi b/qcom/sdxlemur-mtp-cpe.dtsi index e39236090d51..42f218547fd1 100644 --- a/qcom/sdxlemur-mtp-cpe.dtsi +++ b/qcom/sdxlemur-mtp-cpe.dtsi @@ -1,4 +1,5 @@ #include "sdxlemur-mtp.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-mtp-mbb-ntn3-pcie.dtsi b/qcom/sdxlemur-mtp-mbb-ntn3-pcie.dtsi index e39236090d51..42f218547fd1 100644 --- a/qcom/sdxlemur-mtp-mbb-ntn3-pcie.dtsi +++ b/qcom/sdxlemur-mtp-mbb-ntn3-pcie.dtsi @@ -1,4 +1,5 @@ #include "sdxlemur-mtp.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-mtp-mbb-pcie-ep.dtsi b/qcom/sdxlemur-mtp-mbb-pcie-ep.dtsi index 4b0b1069ad6f..5ba52a7dd66f 100644 --- a/qcom/sdxlemur-mtp-mbb-pcie-ep.dtsi +++ b/qcom/sdxlemur-mtp-mbb-pcie-ep.dtsi @@ -1,5 +1,6 @@ #include "sdxlemur-mtp.dtsi" #include "sdxlemur.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-mtp-mbb-pcie-rc-ep.dtsi b/qcom/sdxlemur-mtp-mbb-pcie-rc-ep.dtsi index 575214139b71..b5afaa63db11 100644 --- a/qcom/sdxlemur-mtp-mbb-pcie-rc-ep.dtsi +++ b/qcom/sdxlemur-mtp-mbb-pcie-rc-ep.dtsi @@ -1,4 +1,5 @@ #include "sdxlemur-mtp.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-mtp-mbb.dtsi b/qcom/sdxlemur-mtp-mbb.dtsi index b350930cd462..fe3402b3a3d0 100644 --- a/qcom/sdxlemur-mtp-mbb.dtsi +++ b/qcom/sdxlemur-mtp-mbb.dtsi @@ -3,6 +3,7 @@ #include #include #include "sdxlemur-cnss.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &pm7250b_clkdiv { clocks = <&rpmhcc RPMH_CXO_CLK>; diff --git a/qcom/sdxlemur-mtp.dtsi b/qcom/sdxlemur-mtp.dtsi index 7213eb337afb..586d9c3fe0dd 100644 --- a/qcom/sdxlemur-mtp.dtsi +++ b/qcom/sdxlemur-mtp.dtsi @@ -1,4 +1,5 @@ #include "sdxlemur-pmic-overlay.dtsi" +#include "sdxlemur-mtp-audio-overlay.dtsi" &soc { diff --git a/qcom/sdxlemur-pinctrl.dtsi b/qcom/sdxlemur-pinctrl.dtsi index 9e46bae72197..d336e3fa3eb4 100644 --- a/qcom/sdxlemur-pinctrl.dtsi +++ b/qcom/sdxlemur-pinctrl.dtsi @@ -1157,12 +1157,12 @@ wcd9xxx_intr { wcd_intr_default: wcd_intr_default { mux { - pins = "gpio96"; + pins = "gpio48"; function = "gpio"; }; config { - pins = "gpio96"; + pins = "gpio48"; drive-strength = <2>; /* 2 mA */ bias-pull-down; /* pull down */ input-enable; @@ -1173,12 +1173,12 @@ cdc_reset_ctrl { cdc_reset_sleep: cdc_reset_sleep { mux { - pins = "gpio92"; + pins = "gpio49"; function = "gpio"; }; config { - pins = "gpio92"; + pins = "gpio49"; drive-strength = <2>; bias-disable; output-low; @@ -1187,12 +1187,12 @@ cdc_reset_active:cdc_reset_active { mux { - pins = "gpio92"; + pins = "gpio49"; function = "gpio"; }; config { - pins = "gpio92"; + pins = "gpio49"; drive-strength = <8>; bias-pull-down; output-high; @@ -1275,7 +1275,7 @@ pri_ws_active_master: pri_ws_active_master { mux { pins = "gpio12"; - function = "pri_mi2s"; + function = "pri_mi2s_ws"; }; config { @@ -1303,7 +1303,7 @@ pri_ws_active_slave: pri_ws_active_slave { mux { pins = "gpio12"; - function = "pri_mi2s"; + function = "pri_mi2s_ws"; }; config { diff --git a/qcom/sdxlemur-wcd.dtsi b/qcom/sdxlemur-wcd.dtsi index 512253fd0ddd..40853ca660c5 100644 --- a/qcom/sdxlemur-wcd.dtsi +++ b/qcom/sdxlemur-wcd.dtsi @@ -1,8 +1,8 @@ -&soc { +&i2c_3 { tavil_codec { wcd: wcd_pinctrl@5 { compatible = "qcom,wcd-pinctrl"; - qcom,num-gpios = <5>; + qcom,gpios-count = <5>; gpio-controller; #gpio-cells = <2>; diff --git a/qcom/sdxlemur.dtsi b/qcom/sdxlemur.dtsi index dbecd245a777..9d092c20fb70 100644 --- a/qcom/sdxlemur.dtsi +++ b/qcom/sdxlemur.dtsi @@ -52,7 +52,8 @@ audio_mem: audio_region@0 { compatible = "shared-dma-pool"; - no-map; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + reusable; size = <0x400000>; };