From abf7909b370500e08e028220d9e71806047b7a28 Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Thu, 16 Jan 2020 11:38:54 -0800 Subject: [PATCH 1/3] bindings: Documentation: Add swr mic device tree documentation Add swr mic device tree documentation for Lahaina target. Change-Id: I916fe3d6fc48d8705be8fc197aa807c96064cce5 --- bindings/sound/wcd_codec.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bindings/sound/wcd_codec.txt b/bindings/sound/wcd_codec.txt index b68033f9e350..9fc9a8fbb42c 100644 --- a/bindings/sound/wcd_codec.txt +++ b/bindings/sound/wcd_codec.txt @@ -438,3 +438,22 @@ wsa883x_0221: wsa883x@02170221 { qcom,cdc-vdd-1p8-current = <20000>; qcom,cdc-static-supplies = "cdc-vdd-1p8"; }; + +SWR MIC Soundwire slave device as child of Soundwire master in digital codec + +Required properties: + - compatible = "qcom,swr-dmic"; + - reg: Specifies the SWR MIC soundwire slave unique device address + - qcom,swr-dmic-prefix: Prefix to use for alsa widgets and routes + - qcom,codec-name: Name for the corresponding swr mic codec + - qcom,mic-bias-num: Mic bias number that turns on this device's power supply + +Example: +swr_dmic_01: dmic_swr@58350220 { + compatible = "qcom,swr-dmic"; + reg = <0x08 0x58350220>; + qcom,swr-dmic-prefix = "SWR_MIC0"; + qcom,codec-name = "swr-dmic-01"; + qcom,mic-bias-num = <1>; + wcd-handle = <&wcd938x_codec>; +}; From 521ef4a3c9da809341ac5baa51245cf59b47a909 Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Fri, 17 Jan 2020 11:34:28 -0800 Subject: [PATCH 2/3] bindings: Documentation: Update swr mic device tree documentation Add wcd handle property to swr mic device tree documentation for Lahaina target. Change-Id: Iddb49e6ba87c19a12af286df1b2d942715dc0fd8 --- bindings/sound/wcd_codec.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/sound/wcd_codec.txt b/bindings/sound/wcd_codec.txt index 9fc9a8fbb42c..9c89d4652617 100644 --- a/bindings/sound/wcd_codec.txt +++ b/bindings/sound/wcd_codec.txt @@ -447,6 +447,7 @@ Required properties: - qcom,swr-dmic-prefix: Prefix to use for alsa widgets and routes - qcom,codec-name: Name for the corresponding swr mic codec - qcom,mic-bias-num: Mic bias number that turns on this device's power supply + - qcom,wcd-handle: pHandle to wcd node that can enable this device's supply Example: swr_dmic_01: dmic_swr@58350220 { @@ -455,5 +456,5 @@ swr_dmic_01: dmic_swr@58350220 { qcom,swr-dmic-prefix = "SWR_MIC0"; qcom,codec-name = "swr-dmic-01"; qcom,mic-bias-num = <1>; - wcd-handle = <&wcd938x_codec>; + qcom,wcd-handle = <&wcd938x_codec>; }; From 9c460a008faaf2483cc06bfabd82d5fe37c86744 Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Wed, 15 Jan 2020 15:03:16 -0800 Subject: [PATCH 3/3] ARM: dts: msm: Add swr dmic nodes on Lahaina To support swr dmic devices on Lahaina target, add the corresponding nodes to tx macro. Change-Id: Iaa30bf229246372e670f68ce7b90f16c6cf6532b --- qcom/lahaina-audio-overlay.dtsi | 58 +++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/qcom/lahaina-audio-overlay.dtsi b/qcom/lahaina-audio-overlay.dtsi index 8d905b20adff..c1cee1d34f1e 100644 --- a/qcom/lahaina-audio-overlay.dtsi +++ b/qcom/lahaina-audio-overlay.dtsi @@ -54,13 +54,49 @@ <2 SWRM_TX2_CH3 0x4>, <2 SWRM_TX2_CH4 0x8>, <3 SWRM_TX3_CH1 0x1>, <3 SWRM_TX3_CH2 0x2>, <3 SWRM_TX3_CH3 0x4>, <3 SWRM_TX3_CH4 0x8>; - qcom,swr-num-dev = <1>; + qcom,swr-num-dev = <5>; qcom,swr-clock-stop-mode0 = <1>; qcom,swr-mstr-irq-wakeup-capable = <1>; wcd938x_tx_slave: wcd938x-tx-slave { compatible = "qcom,wcd938x-slave"; reg = <0x0D 0x01170223>; }; + + swr_dmic_01: dmic_swr@58350220 { + compatible = "qcom,swr-dmic"; + reg = <0x08 0x58350220>; + qcom,swr-dmic-prefix = "SWR_MIC0"; + qcom,codec-name = "swr-dmic-01"; + qcom,mic-bias-num = <3>; + qcom,wcd-handle = <&wcd938x_codec>; + }; + + swr_dmic_02: dmic_swr@58350221 { + compatible = "qcom,swr-dmic"; + reg = <0x08 0x58350221>; + qcom,swr-dmic-prefix = "SWR_MIC1"; + qcom,codec-name = "swr-dmic-02"; + qcom,mic-bias-num = <1>; + qcom,wcd-handle = <&wcd938x_codec>; + }; + + swr_dmic_03: dmic_swr@58350222 { + compatible = "qcom,swr-dmic"; + reg = <0x08 0x58350222>; + qcom,swr-dmic-prefix = "SWR_MIC2"; + qcom,codec-name = "swr-dmic-03"; + qcom,mic-bias-num = <1>; + qcom,wcd-handle = <&wcd938x_codec>; + }; + + swr_dmic_04: dmic_swr@58350223 { + compatible = "qcom,swr-dmic"; + reg = <0x08 0x58350223>; + qcom,swr-dmic-prefix = "SWR_MIC3"; + qcom,codec-name = "swr-dmic-04"; + qcom,mic-bias-num = <3>; + qcom,wcd-handle = <&wcd938x_codec>; + }; }; }; @@ -246,6 +282,18 @@ "IN2_HPHR", "HPHR_OUT", "IN3_AUX", "AUX_OUT", "WSA SRC0_INP", "SRC0", + "SWR_MIC0 SWR_DMIC", "Analog Mic3", + "Analog Mic3", "MIC BIAS3", + "SWR_MIC1 SWR_DMIC", "Analog Mic1", + "Analog Mic1", "MIC BIAS1", + "SWR_MIC2 SWR_DMIC", "Analog Mic1", + "Analog Mic1", "MIC BIAS1", + "SWR_MIC3 SWR_DMIC", "Analog Mic3", + "Analog Mic3", "MIC BIAS3", + "TX SWR_INPUT", "SWR_MIC0 SWR_DMIC_OUTPUT", + "TX SWR_INPUT", "SWR_MIC1 SWR_DMIC_OUTPUT", + "TX SWR_INPUT", "SWR_MIC2 SWR_DMIC_OUTPUT", + "TX SWR_INPUT", "SWR_MIC3 SWR_DMIC_OUTPUT", "WSA_TX DEC0_INP", "TX DEC0 MUX", "WSA_TX DEC1_INP", "TX DEC1 MUX", "RX_TX DEC0_INP", "TX DEC0 MUX", @@ -274,9 +322,13 @@ "Digital Mic5", "VA MIC BIAS4"; qcom,msm-mbhc-hphl-swh = <1>; qcom,msm-mbhc-gnd-swh = <1>; - asoc-codec = <&stub_codec>, <&bolero>, <&ext_disp_audio_codec>; + asoc-codec = <&stub_codec>, <&bolero>, <&ext_disp_audio_codec>, + <&swr_dmic_01>, <&swr_dmic_02>, + <&swr_dmic_03>, <&swr_dmic_04>; asoc-codec-names = "msm-stub-codec.1", "bolero_codec", - "msm-ext-disp-audio-codec-rx"; + "msm-ext-disp-audio-codec-rx", + "swr-dmic-01", "swr-dmic-02", + "swr-dmic-03", "swr-dmic-04"; qcom,wsa-max-devs = <2>; qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>, <&wsa881x_0213>, <&wsa881x_0214>;