Add support for WSA and VA codec macros along with WSA soundwire
controller required for getting audio on RB5.

Signed-off-by: Srinivas Kandagatla <srinivas.kandaga...@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.barysh...@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 56 ++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi 
b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index ce8ae776160d..d2ade3ab3389 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2691,6 +2691,62 @@
                        };
                };
 
+               wsamacro: codec@3240000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&wsa_swr_active>;
+
+                       compatible = "qcom,sm8250-lpass-wsa-macro";
+                       reg = <0 0x3240000 0 0x1000>;
+                       clocks = <&audiocc LPASS_CDC_WSA_MCLK>,
+                               <&audiocc LPASS_CDC_WSA_NPL>,
+                               <&q6afecc LPASS_HW_MACRO_VOTE 
LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+                               <&q6afecc LPASS_HW_DCODEC_VOTE 
LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+                               <&aoncc LPASS_CDC_VA_MCLK>,
+                               <&vamacro>;
+
+                       clock-names = "mclk", "npl", "macro", "dcodec", "va", 
"fsgen";
+
+                       #clock-cells = <0>;
+                       clock-frequency = <9600000>;
+                       clock-output-names = "mclk";
+                       #sound-dai-cells = <1>;
+               };
+
+               swr0: soundwire-controller@3250000 {
+                       reg = <0 0x3250000 0 0x2000>;
+                       compatible = "qcom,soundwire-v1.5.1";
+                       interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&wsamacro>;
+                       clock-names = "iface";
+
+                       qcom,din-ports = <2>;
+                       qcom,dout-ports = <6>;
+
+                       qcom,ports-sinterval-low =      /bits/ 8 <0x07 0x1F 
0x3F 0x07 0x1F 0x3F 0x0F 0x0F>;
+                       qcom,ports-offset1 =            /bits/ 8 <0x01 0x02 
0x0C 0x06 0x12 0x0D 0x07 0x0A >;
+                       qcom,ports-offset2 =            /bits/ 8 <0xFF 0x00 
0x1F 0xFF 0x00 0x1F 0x00 0x00>;
+                       qcom,ports-block-pack-mode =    /bits/ 8 <0x0 0x0 0x1 
0x0 0x0 0x1 0x0 0x0>;
+
+                       #sound-dai-cells = <1>;
+                       #address-cells = <2>;
+                       #size-cells = <0>;
+               };
+
+               vamacro: codec@3370000 {
+                       compatible = "qcom,sm8250-lpass-va-macro";
+                       reg = <0 0x3370000 0 0x1000>;
+                       clocks = <&aoncc LPASS_CDC_VA_MCLK>,
+                               <&q6afecc LPASS_HW_MACRO_VOTE 
LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+                               <&q6afecc LPASS_HW_DCODEC_VOTE 
LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+
+                       clock-names = "mclk", "macro", "dcodec";
+
+                       #clock-cells = <0>;
+                       clock-frequency = <9600000>;
+                       clock-output-names = "fsgen";
+                       #sound-dai-cells = <1>;
+               };
+
                adsp: remoteproc@17300000 {
                        compatible = "qcom,sm8250-adsp-pas";
                        reg = <0 0x17300000 0 0x100>;
-- 
2.21.0

Reply via email to