arm64: dts: qcom: sdm845: move codec to separate file
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 23 Jan 2023 08:42:58 +0000 (09:42 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 9 Feb 2023 00:02:10 +0000 (16:02 -0800)
Re-organize SDM845 audio codec into separate, audio DTSI which
should be included and customized by the SDM845 boards wanting audio.
The codec node is anyway not a property of the SoC, but the boards.

On all others boards not using audio, keep the Slimbus node disabled as
it is empty.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230123084300.22353-4-krzysztof.kozlowski@linaro.org
arch/arm64/boot/dts/qcom/sdm845-db845c.dts
arch/arm64/boot/dts/qcom/sdm845-wcd9340.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
arch/arm64/boot/dts/qcom/sdm845.dtsi
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts

index 8d4229ae6010c0ff231b471e159e900133afc449..f8d685304819813d1fd95012150bc07a35df50bb 100644 (file)
@@ -11,6 +11,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-wcd9340.dtsi
new file mode 100644 (file)
index 0000000..5bcce7d
--- /dev/null
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SDM845 SoC device tree source
+ *
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ */
+
+&slim {
+       status = "okay";
+
+       slim@1 {
+               reg = <1>;
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               wcd9340_ifd: ifd@0,0 {
+                       compatible = "slim217,250";
+                       reg = <0 0>;
+               };
+
+               wcd9340: codec@1,0 {
+                       compatible = "slim217,250";
+                       reg = <1 0>;
+                       slim-ifc-dev = <&wcd9340_ifd>;
+
+                       #sound-dai-cells = <1>;
+
+                       interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+
+                       #clock-cells = <0>;
+                       clock-frequency = <9600000>;
+                       clock-output-names = "mclk";
+                       qcom,micbias1-microvolt = <1800000>;
+                       qcom,micbias2-microvolt = <1800000>;
+                       qcom,micbias3-microvolt = <1800000>;
+                       qcom,micbias4-microvolt = <1800000>;
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       wcdgpio: gpio-controller@42 {
+                               compatible = "qcom,wcd9340-gpio";
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x42 0x2>;
+                       };
+
+                       swm: swm@c85 {
+                               compatible = "qcom,soundwire-v1.3.0";
+                               reg = <0xc85 0x40>;
+                               interrupts-extended = <&wcd9340 20>;
+
+                               qcom,dout-ports = <6>;
+                               qcom,din-ports = <2>;
+                               qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>;
+                               qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>;
+                               qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>;
+
+                               #sound-dai-cells = <1>;
+                               clocks = <&wcd9340>;
+                               clock-names = "iface";
+                               #address-cells = <2>;
+                               #size-cells = <0>;
+                       };
+               };
+       };
+};
index 51c679677058459f89c938a53f9585d20799c3d0..045f832eb9f8980a1e87e67ee90996a2fdc7b072 100644 (file)
@@ -7,6 +7,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
index 8b42efbf19962599c8c97cc3eb9c069d117be181..c66747a93e240d791dbc7d7183ed0c6d4eb970f7 100644 (file)
@@ -13,6 +13,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 #include "pm8005.dtsi"
index 9ffc0fe07c215bd009a617d3e12b3e8c3931fcc5..479859bd8ab331e4d5b32ba0c8dcc54cce98d749 100644 (file)
                        iommus = <&apps_smmu 0x1806 0x0>;
                        #address-cells = <1>;
                        #size-cells = <0>;
-
-                       slim@1 {
-                               reg = <1>;
-                               #address-cells = <2>;
-                               #size-cells = <0>;
-
-                               wcd9340_ifd: ifd@0,0 {
-                                       compatible = "slim217,250";
-                                       reg = <0 0>;
-                               };
-
-                               wcd9340: codec@1,0 {
-                                       compatible = "slim217,250";
-                                       reg = <1 0>;
-                                       slim-ifc-dev = <&wcd9340_ifd>;
-
-                                       #sound-dai-cells = <1>;
-
-                                       interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>;
-                                       interrupt-controller;
-                                       #interrupt-cells = <1>;
-
-                                       #clock-cells = <0>;
-                                       clock-frequency = <9600000>;
-                                       clock-output-names = "mclk";
-                                       qcom,micbias1-microvolt = <1800000>;
-                                       qcom,micbias2-microvolt = <1800000>;
-                                       qcom,micbias3-microvolt = <1800000>;
-                                       qcom,micbias4-microvolt = <1800000>;
-
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-
-                                       wcdgpio: gpio-controller@42 {
-                                               compatible = "qcom,wcd9340-gpio";
-                                               gpio-controller;
-                                               #gpio-cells = <2>;
-                                               reg = <0x42 0x2>;
-                                       };
-
-                                       swm: swm@c85 {
-                                               compatible = "qcom,soundwire-v1.3.0";
-                                               reg = <0xc85 0x40>;
-                                               interrupts-extended = <&wcd9340 20>;
-
-                                               qcom,dout-ports = <6>;
-                                               qcom,din-ports = <2>;
-                                               qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>;
-                                               qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>;
-                                               qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>;
-
-                                               #sound-dai-cells = <1>;
-                                               clocks = <&wcd9340>;
-                                               clock-names = "iface";
-                                               #address-cells = <2>;
-                                               #size-cells = <0>;
-                                       };
-                               };
-                       };
+                       status = "disabled";
                };
 
                lmh_cluster1: lmh@17d70800 {
index 15c8a86220422fbaf323a06d767aabc00c7df31c..668ba8a7dbbdf0f94e6e209233606e6eecc14f5d 100644 (file)
@@ -13,6 +13,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm850.dtsi"
+#include "sdm845-wcd9340.dtsi"
 #include "pm8998.dtsi"
 
 /*
index 6e361fe184f5240000fe338f577cd5ab9102a2a8..9d2e13819ad57e0239045460d5e53f97a0eff6a9 100644 (file)
@@ -14,6 +14,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm850.dtsi"
+#include "sdm845-wcd9340.dtsi"
 #include "pm8998.dtsi"
 
 /*