linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro
@ 2023-01-13 16:22 Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Neither qcom,sm8250-lpass-rx-macro bindings nor the driver use
"clock-frequency" property.

  sm8250-mtp.dtb: rxmacro@3200000: Unevaluated properties are not allowed ('clock-frequency' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index f614992709d2..b22569101314 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2301,7 +2301,6 @@ rxmacro: rxmacro@3200000 {
 			clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
 
 			#clock-cells = <0>;
-			clock-frequency = <9600000>;
 			clock-output-names = "mclk";
 			#sound-dai-cells = <1>;
 		};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-14 20:33   ` Konrad Dybcio
  2023-01-17  3:56   ` Bjorn Andersson
  2023-01-13 16:22 ` [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

WCD9340 codec node is not a property of the SoC, but board.  Move it to
separate file and include it in the specific boards.  On all others,
keep the Slimbus node disabled as it is empty.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../boot/dts/qcom/sdm845-audio-wcd9340.dtsi   | 69 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  1 +
 .../qcom/sdm845-xiaomi-beryllium-common.dtsi  |  1 +
 .../boot/dts/qcom/sdm845-xiaomi-polaris.dts   |  1 +
 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 60 +---------------
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  1 +
 .../boot/dts/qcom/sdm850-samsung-w737.dts     |  1 +
 7 files changed, 75 insertions(+), 59 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
new file mode 100644
index 000000000000..5bcce7d0d709
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
@@ -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>;
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 6b355589edb3..3726465acbde 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-audio-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
index 64de4ed9b0c8..e530a676b250 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -7,6 +7,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-audio-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
index a80c3dd9a2da..f81619c8a3ba 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
@@ -13,6 +13,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm845.dtsi"
+#include "sdm845-audio-wcd9340.dtsi"
 #include "pm8998.dtsi"
 #include "pmi8998.dtsi"
 #include "pm8005.dtsi"
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 4c256431280a..f9b1d7a60fd6 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -3831,65 +3831,7 @@ slim: slim-ngd@171c0000 {
 			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 {
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index d9581f4440b3..5586c95aa1ff 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -13,6 +13,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm850.dtsi"
+#include "sdm845-audio-wcd9340.dtsi"
 #include "pm8998.dtsi"
 
 /*
diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
index 6730804f4e3e..40223704a2c7 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
@@ -14,6 +14,7 @@
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
 #include "sdm850.dtsi"
+#include "sdm845-audio-wcd9340.dtsi"
 #include "pm8998.dtsi"
 
 /*
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-14 20:33   ` Konrad Dybcio
  2023-01-13 16:22 ` [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Pin configuration fow WCD9340 is the same in all users, so move it to
common file to reduce the code duplication (which still allows further
customizations per board).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi | 15 +++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts        | 11 -----------
 .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi  | 11 -----------
 .../arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 10 ----------
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts     | 11 -----------
 arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts  | 11 -----------
 6 files changed, 15 insertions(+), 54 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
index 5bcce7d0d709..33718cb95c83 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
@@ -32,6 +32,10 @@ wcd9340: codec@1,0 {
 			#clock-cells = <0>;
 			clock-frequency = <9600000>;
 			clock-output-names = "mclk";
+
+			pinctrl-0 = <&wcd_intr_default>;
+			pinctrl-names = "default";
+
 			qcom,micbias1-microvolt = <1800000>;
 			qcom,micbias2-microvolt = <1800000>;
 			qcom,micbias3-microvolt = <1800000>;
@@ -67,3 +71,14 @@ swm: swm@c85 {
 		};
 	};
 };
+
+&tlmm {
+	wcd_intr_default: wcd-intr-default-state {
+		pins = "gpio54";
+		function = "gpio";
+
+		input-enable;
+		bias-pull-down;
+		drive-strength = <2>;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 3726465acbde..33ec79afbb62 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -971,15 +971,6 @@ sdc2_card_det_n: sd-card-det-n-state {
 		function = "gpio";
 		bias-pull-up;
 	};
-
-	wcd_intr_default: wcd-intr-default-state {
-		pins = "gpio54";
-		function = "gpio";
-
-		input-enable;
-		bias-pull-down;
-		drive-strength = <2>;
-	};
 };
 
 &uart3 {
@@ -1085,8 +1076,6 @@ &venus {
 };
 
 &wcd9340 {
-	pinctrl-0 = <&wcd_intr_default>;
-	pinctrl-names = "default";
 	clock-names = "extclk";
 	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
index e530a676b250..a7a3f7ce2809 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -466,15 +466,6 @@ sdc2_card_det_n: sd-card-det-n-state {
 		function = "gpio";
 		bias-pull-up;
 	};
-
-	wcd_intr_default: wcd-intr-default-state {
-		pins = "gpio54";
-		function = "gpio";
-
-		input-enable;
-		bias-pull-down;
-		drive-strength = <2>;
-	};
 };
 
 &uart6 {
@@ -543,8 +534,6 @@ &venus {
 };
 
 &wcd9340 {
-	pinctrl-0 = <&wcd_intr_default>;
-	pinctrl-names = "default";
 	clock-names = "extclk";
 	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
index f81619c8a3ba..1ceeea0885b9 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
@@ -616,14 +616,6 @@ sde_dsi_suspend: sde-dsi-suspend-state {
 		drive-strength = <2>;
 		bias-pull-down;
 	};
-
-	wcd_intr_default: wcd-intr-default-state {
-		pins = "gpio54";
-		function = "gpio";
-		input-enable;
-		bias-pull-down;
-		drive-strength = <2>;
-	};
 };
 
 &uart6 {
@@ -700,8 +692,6 @@ &venus {
 };
 
 &wcd9340 {
-	pinctrl-0 = <&wcd_intr_default>;
-	pinctrl-names = "default";
 	clock-names = "extclk";
 	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index 5586c95aa1ff..f3dd0ff1d5c6 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -628,15 +628,6 @@ i2c11_hid_active: i2c11-hid-active-state {
 		drive-strength = <2>;
 	};
 
-	wcd_intr_default: wcd-intr-default-state {
-		pins = "gpio54";
-		function = "gpio";
-
-		input-enable;
-		bias-pull-down;
-		drive-strength = <2>;
-	};
-
 	lid_pin_active: lid-pin-state {
 		pins = "gpio124";
 		function = "gpio";
@@ -747,8 +738,6 @@ &venus {
 };
 
 &wcd9340 {
-	pinctrl-0 = <&wcd_intr_default>;
-	pinctrl-names = "default";
 	clock-names = "extclk";
 	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
index 40223704a2c7..fc9369eafd23 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
@@ -552,15 +552,6 @@ pen_rst_l: pen-rst-l-state {
 		 */
 		output-high;
 	};
-
-	wcd_intr_default: wcd-intr-default-state {
-		pins = "gpio54";
-		function = "gpio";
-
-		input-enable;
-		bias-pull-down;
-		drive-strength = <2>;
-	};
 };
 
 &uart6 {
@@ -656,8 +647,6 @@ &venus {
 };
 
 &wcd9340 {
-	pinctrl-0 = <&wcd_intr_default>;
-	pinctrl-names = "default";
 	clock-names = "extclk";
 	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-14 20:34   ` Konrad Dybcio
  2023-01-13 16:22 ` [PATCH 5/6] arm64: dts: qcom: sc8280xp: drop bogus clock-controller property Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Clock for WCD9340 is coming from the SoC and is the same in all users,
so move it to common file to reduce the code duplication (which still
allows further customizations per board).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi           | 3 +++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts                   | 2 --
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 2 --
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts           | 2 --
 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts         | 2 --
 arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts             | 2 --
 6 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
index 33718cb95c83..0d7c37f39176 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
@@ -29,6 +29,9 @@ wcd9340: codec@1,0 {
 			interrupt-controller;
 			#interrupt-cells = <1>;
 
+			clock-names = "extclk";
+			clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
+
 			#clock-cells = <0>;
 			clock-frequency = <9600000>;
 			clock-output-names = "mclk";
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 33ec79afbb62..9c9a587ea7a9 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -1076,8 +1076,6 @@ &venus {
 };
 
 &wcd9340 {
-	clock-names = "extclk";
-	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
 	vdd-buck-supply = <&vreg_s4a_1p8>;
 	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
index a7a3f7ce2809..4f8ffc0da141 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -534,8 +534,6 @@ &venus {
 };
 
 &wcd9340 {
-	clock-names = "extclk";
-	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
 	vdd-buck-supply = <&vreg_s4a_1p8>;
 	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
index 1ceeea0885b9..d9c4af06ab63 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
@@ -692,8 +692,6 @@ &venus {
 };
 
 &wcd9340 {
-	clock-names = "extclk";
-	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
 	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
 	vdd-buck-supply = <&vreg_s4a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index f3dd0ff1d5c6..5094e7e6dc48 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -738,8 +738,6 @@ &venus {
 };
 
 &wcd9340 {
-	clock-names = "extclk";
-	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
 	vdd-buck-supply = <&vreg_s4a_1p8>;
 	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
index fc9369eafd23..65de8d595736 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
@@ -647,8 +647,6 @@ &venus {
 };
 
 &wcd9340 {
-	clock-names = "extclk";
-	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
 	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
 	vdd-buck-supply = <&vreg_s4a_1p8>;
 	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/6] arm64: dts: qcom: sc8280xp: drop bogus clock-controller property
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-01-13 16:22 ` [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro Krzysztof Kozlowski
  2023-01-14 20:32 ` [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Konrad Dybcio
  5 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

There is no "clock-controller" property:

  sa8295p-adp.dtb: service@2: clock-controller: 'clock-controller' does not match any of the regexes: 'pinctrl-[0-9]+'
    From schema: Documentation/devicetree/bindings/sound/qcom,q6prm.yaml

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index b22e4bc45ae8..5f2bb35a39bf 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -1715,7 +1715,6 @@ q6prm: service@2 {
 									 "msm/adsp/audio_pd";
 						q6prmcc: clock-controller {
 							compatible = "qcom,q6prm-lpass-clocks";
-							clock-controller;
 							#clock-cells = <2>;
 						};
 					};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-01-13 16:22 ` [PATCH 5/6] arm64: dts: qcom: sc8280xp: drop bogus clock-controller property Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-14 20:34   ` Konrad Dybcio
  2023-01-14 20:32 ` [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Konrad Dybcio
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

tx-macro does not have children and does not allow address/size cells:

  sc8280xp-crd.dtb: txmacro@3220000: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 5f2bb35a39bf..4986db9d35ad 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -1788,8 +1788,6 @@ txmacro: txmacro@3220000 {
 			clock-output-names = "mclk";
 
 			#clock-cells = <0>;
-			#address-cells = <2>;
-			#size-cells = <2>;
 			#sound-dai-cells = <1>;
 		};
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro
  2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2023-01-13 16:22 ` [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro Krzysztof Kozlowski
@ 2023-01-14 20:32 ` Konrad Dybcio
  5 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-14 20:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> Neither qcom,sm8250-lpass-rx-macro bindings nor the driver use
> "clock-frequency" property.
> 
>   sm8250-mtp.dtb: rxmacro@3200000: Unevaluated properties are not allowed ('clock-frequency' was unexpected)
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index f614992709d2..b22569101314 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -2301,7 +2301,6 @@ rxmacro: rxmacro@3200000 {
>  			clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
>  
>  			#clock-cells = <0>;
> -			clock-frequency = <9600000>;
>  			clock-output-names = "mclk";
>  			#sound-dai-cells = <1>;
>  		};

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
@ 2023-01-14 20:33   ` Konrad Dybcio
  2023-01-15 11:21     ` Krzysztof Kozlowski
  2023-01-17  3:56   ` Bjorn Andersson
  1 sibling, 1 reply; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-14 20:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> WCD9340 codec node is not a property of the SoC, but board.  Move it to
> separate file and include it in the specific boards.  On all others,
> keep the Slimbus node disabled as it is empty.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Generally this should be SoC-independent, for example some newer
MSM8998 devices shipped with the 9340 codec that most 845 devices
used, but earlier ones used the WCD9335 found on MSM8996

Konrad
>  .../boot/dts/qcom/sdm845-audio-wcd9340.dtsi   | 69 +++++++++++++++++++
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  1 +
>  .../qcom/sdm845-xiaomi-beryllium-common.dtsi  |  1 +
>  .../boot/dts/qcom/sdm845-xiaomi-polaris.dts   |  1 +
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 60 +---------------
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  1 +
>  .../boot/dts/qcom/sdm850-samsung-w737.dts     |  1 +
>  7 files changed, 75 insertions(+), 59 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> new file mode 100644
> index 000000000000..5bcce7d0d709
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> @@ -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>;
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 6b355589edb3..3726465acbde 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -11,6 +11,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> index 64de4ed9b0c8..e530a676b250 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> @@ -7,6 +7,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> index a80c3dd9a2da..f81619c8a3ba 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> @@ -13,6 +13,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  #include "pm8005.dtsi"
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 4c256431280a..f9b1d7a60fd6 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -3831,65 +3831,7 @@ slim: slim-ngd@171c0000 {
>  			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 {
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index d9581f4440b3..5586c95aa1ff 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -13,6 +13,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm850.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  
>  /*
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> index 6730804f4e3e..40223704a2c7 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> @@ -14,6 +14,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm850.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  
>  /*

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl
  2023-01-13 16:22 ` [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl Krzysztof Kozlowski
@ 2023-01-14 20:33   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-14 20:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> Pin configuration fow WCD9340 is the same in all users, so move it to
> common file to reduce the code duplication (which still allows further
> customizations per board).
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Modulo the file name thing from [2/6]

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  .../arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi | 15 +++++++++++++++
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts        | 11 -----------
>  .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi  | 11 -----------
>  .../arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 10 ----------
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts     | 11 -----------
>  arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts  | 11 -----------
>  6 files changed, 15 insertions(+), 54 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> index 5bcce7d0d709..33718cb95c83 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> @@ -32,6 +32,10 @@ wcd9340: codec@1,0 {
>  			#clock-cells = <0>;
>  			clock-frequency = <9600000>;
>  			clock-output-names = "mclk";
> +
> +			pinctrl-0 = <&wcd_intr_default>;
> +			pinctrl-names = "default";
> +
>  			qcom,micbias1-microvolt = <1800000>;
>  			qcom,micbias2-microvolt = <1800000>;
>  			qcom,micbias3-microvolt = <1800000>;
> @@ -67,3 +71,14 @@ swm: swm@c85 {
>  		};
>  	};
>  };
> +
> +&tlmm {
> +	wcd_intr_default: wcd-intr-default-state {
> +		pins = "gpio54";
> +		function = "gpio";
> +
> +		input-enable;
> +		bias-pull-down;
> +		drive-strength = <2>;
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 3726465acbde..33ec79afbb62 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -971,15 +971,6 @@ sdc2_card_det_n: sd-card-det-n-state {
>  		function = "gpio";
>  		bias-pull-up;
>  	};
> -
> -	wcd_intr_default: wcd-intr-default-state {
> -		pins = "gpio54";
> -		function = "gpio";
> -
> -		input-enable;
> -		bias-pull-down;
> -		drive-strength = <2>;
> -	};
>  };
>  
>  &uart3 {
> @@ -1085,8 +1076,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	pinctrl-0 = <&wcd_intr_default>;
> -	pinctrl-names = "default";
>  	clock-names = "extclk";
>  	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> index e530a676b250..a7a3f7ce2809 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> @@ -466,15 +466,6 @@ sdc2_card_det_n: sd-card-det-n-state {
>  		function = "gpio";
>  		bias-pull-up;
>  	};
> -
> -	wcd_intr_default: wcd-intr-default-state {
> -		pins = "gpio54";
> -		function = "gpio";
> -
> -		input-enable;
> -		bias-pull-down;
> -		drive-strength = <2>;
> -	};
>  };
>  
>  &uart6 {
> @@ -543,8 +534,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	pinctrl-0 = <&wcd_intr_default>;
> -	pinctrl-names = "default";
>  	clock-names = "extclk";
>  	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> index f81619c8a3ba..1ceeea0885b9 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> @@ -616,14 +616,6 @@ sde_dsi_suspend: sde-dsi-suspend-state {
>  		drive-strength = <2>;
>  		bias-pull-down;
>  	};
> -
> -	wcd_intr_default: wcd-intr-default-state {
> -		pins = "gpio54";
> -		function = "gpio";
> -		input-enable;
> -		bias-pull-down;
> -		drive-strength = <2>;
> -	};
>  };
>  
>  &uart6 {
> @@ -700,8 +692,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	pinctrl-0 = <&wcd_intr_default>;
> -	pinctrl-names = "default";
>  	clock-names = "extclk";
>  	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index 5586c95aa1ff..f3dd0ff1d5c6 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -628,15 +628,6 @@ i2c11_hid_active: i2c11-hid-active-state {
>  		drive-strength = <2>;
>  	};
>  
> -	wcd_intr_default: wcd-intr-default-state {
> -		pins = "gpio54";
> -		function = "gpio";
> -
> -		input-enable;
> -		bias-pull-down;
> -		drive-strength = <2>;
> -	};
> -
>  	lid_pin_active: lid-pin-state {
>  		pins = "gpio124";
>  		function = "gpio";
> @@ -747,8 +738,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	pinctrl-0 = <&wcd_intr_default>;
> -	pinctrl-names = "default";
>  	clock-names = "extclk";
>  	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> index 40223704a2c7..fc9369eafd23 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> @@ -552,15 +552,6 @@ pen_rst_l: pen-rst-l-state {
>  		 */
>  		output-high;
>  	};
> -
> -	wcd_intr_default: wcd-intr-default-state {
> -		pins = "gpio54";
> -		function = "gpio";
> -
> -		input-enable;
> -		bias-pull-down;
> -		drive-strength = <2>;
> -	};
>  };
>  
>  &uart6 {
> @@ -656,8 +647,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	pinctrl-0 = <&wcd_intr_default>;
> -	pinctrl-names = "default";
>  	clock-names = "extclk";
>  	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks
  2023-01-13 16:22 ` [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks Krzysztof Kozlowski
@ 2023-01-14 20:34   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-14 20:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> Clock for WCD9340 is coming from the SoC and is the same in all users,
> so move it to common file to reduce the code duplication (which still
> allows further customizations per board).
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi           | 3 +++
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts                   | 2 --
>  arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 2 --
>  arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts           | 2 --
>  arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts         | 2 --
>  arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts             | 2 --
>  6 files changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> index 33718cb95c83..0d7c37f39176 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> @@ -29,6 +29,9 @@ wcd9340: codec@1,0 {
>  			interrupt-controller;
>  			#interrupt-cells = <1>;
>  
> +			clock-names = "extclk";
> +			clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
> +
>  			#clock-cells = <0>;
>  			clock-frequency = <9600000>;
>  			clock-output-names = "mclk";
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 33ec79afbb62..9c9a587ea7a9 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -1076,8 +1076,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	clock-names = "extclk";
> -	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>  	vdd-buck-supply = <&vreg_s4a_1p8>;
>  	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> index a7a3f7ce2809..4f8ffc0da141 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> @@ -534,8 +534,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	clock-names = "extclk";
> -	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>  	vdd-buck-supply = <&vreg_s4a_1p8>;
>  	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> index 1ceeea0885b9..d9c4af06ab63 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> @@ -692,8 +692,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	clock-names = "extclk";
> -	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>  	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
>  	vdd-buck-supply = <&vreg_s4a_1p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index f3dd0ff1d5c6..5094e7e6dc48 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -738,8 +738,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	clock-names = "extclk";
> -	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>  	vdd-buck-supply = <&vreg_s4a_1p8>;
>  	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> index fc9369eafd23..65de8d595736 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> @@ -647,8 +647,6 @@ &venus {
>  };
>  
>  &wcd9340 {
> -	clock-names = "extclk";
> -	clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
>  	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>  	vdd-buck-supply = <&vreg_s4a_1p8>;
>  	vdd-buck-sido-supply = <&vreg_s4a_1p8>;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro
  2023-01-13 16:22 ` [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro Krzysztof Kozlowski
@ 2023-01-14 20:34   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-14 20:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> tx-macro does not have children and does not allow address/size cells:
> 
>   sc8280xp-crd.dtb: txmacro@3220000: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index 5f2bb35a39bf..4986db9d35ad 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -1788,8 +1788,6 @@ txmacro: txmacro@3220000 {
>  			clock-output-names = "mclk";
>  
>  			#clock-cells = <0>;
> -			#address-cells = <2>;
> -			#size-cells = <2>;
>  			#sound-dai-cells = <1>;
>  		};
>  

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-14 20:33   ` Konrad Dybcio
@ 2023-01-15 11:21     ` Krzysztof Kozlowski
  2023-01-16  5:55       ` Dmitry Baryshkov
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-15 11:21 UTC (permalink / raw)
  To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On 14/01/2023 21:33, Konrad Dybcio wrote:
> 
> 
> On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
>> WCD9340 codec node is not a property of the SoC, but board.  Move it to
>> separate file and include it in the specific boards.  On all others,
>> keep the Slimbus node disabled as it is empty.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
> Generally this should be SoC-independent, for example some newer
> MSM8998 devices shipped with the 9340 codec that most 845 devices
> used, but earlier ones used the WCD9335 found on MSM8996

OK, but I don't get if you expect me to change anything?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-15 11:21     ` Krzysztof Kozlowski
@ 2023-01-16  5:55       ` Dmitry Baryshkov
  2023-01-16  7:58         ` Krzysztof Kozlowski
  2023-01-16  8:54         ` Konrad Dybcio
  0 siblings, 2 replies; 18+ messages in thread
From: Dmitry Baryshkov @ 2023-01-16  5:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Sun, 15 Jan 2023 at 13:21, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 14/01/2023 21:33, Konrad Dybcio wrote:
> >
> >
> > On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
> >> WCD9340 codec node is not a property of the SoC, but board.  Move it to
> >> separate file and include it in the specific boards.  On all others,
> >> keep the Slimbus node disabled as it is empty.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> ---
> > Generally this should be SoC-independent, for example some newer
> > MSM8998 devices shipped with the 9340 codec that most 845 devices
> > used, but earlier ones used the WCD9335 found on MSM8996
>
> OK, but I don't get if you expect me to change anything?

Maybe it might make sense to name new include file just 'wcd9340.dtsi'
rather than 'sdm845-somthing.dtsi'? Same applies to the wcd9335 codec
found in msm8996.dtsi, if you are going to extract it too.

Note to Konrad: I don't see slimbus support in the msm8998.dtsi. Are
there any pending patches?

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-16  5:55       ` Dmitry Baryshkov
@ 2023-01-16  7:58         ` Krzysztof Kozlowski
  2023-01-16  8:56           ` Konrad Dybcio
  2023-01-16  8:54         ` Konrad Dybcio
  1 sibling, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-16  7:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On 16/01/2023 06:55, Dmitry Baryshkov wrote:
> On Sun, 15 Jan 2023 at 13:21, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 14/01/2023 21:33, Konrad Dybcio wrote:
>>>
>>>
>>> On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
>>>> WCD9340 codec node is not a property of the SoC, but board.  Move it to
>>>> separate file and include it in the specific boards.  On all others,
>>>> keep the Slimbus node disabled as it is empty.
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> ---
>>> Generally this should be SoC-independent, for example some newer
>>> MSM8998 devices shipped with the 9340 codec that most 845 devices
>>> used, but earlier ones used the WCD9335 found on MSM8996
>>
>> OK, but I don't get if you expect me to change anything?
> 
> Maybe it might make sense to name new include file just 'wcd9340.dtsi'
> rather than 'sdm845-somthing.dtsi'? Same applies to the wcd9335 codec
> found in msm8996.dtsi, if you are going to extract it too.

Ah, then I vote against, because it is not only codec, but also it's bus
attachment. It cannot be re-used on other devices.

Same approach with sc7280 audios - not re-usable for other SoCs.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-16  5:55       ` Dmitry Baryshkov
  2023-01-16  7:58         ` Krzysztof Kozlowski
@ 2023-01-16  8:54         ` Konrad Dybcio
  1 sibling, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-16  8:54 UTC (permalink / raw)
  To: Dmitry Baryshkov, Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel



On 16.01.2023 06:55, Dmitry Baryshkov wrote:
> On Sun, 15 Jan 2023 at 13:21, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 14/01/2023 21:33, Konrad Dybcio wrote:
>>>
>>>
>>> On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
>>>> WCD9340 codec node is not a property of the SoC, but board.  Move it to
>>>> separate file and include it in the specific boards.  On all others,
>>>> keep the Slimbus node disabled as it is empty.
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> ---
>>> Generally this should be SoC-independent, for example some newer
>>> MSM8998 devices shipped with the 9340 codec that most 845 devices
>>> used, but earlier ones used the WCD9335 found on MSM8996
>>
>> OK, but I don't get if you expect me to change anything?
> 
> Maybe it might make sense to name new include file just 'wcd9340.dtsi'
> rather than 'sdm845-somthing.dtsi'? Same applies to the wcd9335 codec
> found in msm8996.dtsi, if you are going to extract it too.
> 
> Note to Konrad: I don't see slimbus support in the msm8998.dtsi. Are
> there any pending patches?
There was *something* at one point.. Gotta play archeology again!

Konrad
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-16  7:58         ` Krzysztof Kozlowski
@ 2023-01-16  8:56           ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2023-01-16  8:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel



On 16.01.2023 08:58, Krzysztof Kozlowski wrote:
> On 16/01/2023 06:55, Dmitry Baryshkov wrote:
>> On Sun, 15 Jan 2023 at 13:21, Krzysztof Kozlowski
>> <krzysztof.kozlowski@linaro.org> wrote:
>>>
>>> On 14/01/2023 21:33, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 13.01.2023 17:22, Krzysztof Kozlowski wrote:
>>>>> WCD9340 codec node is not a property of the SoC, but board.  Move it to
>>>>> separate file and include it in the specific boards.  On all others,
>>>>> keep the Slimbus node disabled as it is empty.
>>>>>
>>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>> ---
>>>> Generally this should be SoC-independent, for example some newer
>>>> MSM8998 devices shipped with the 9340 codec that most 845 devices
>>>> used, but earlier ones used the WCD9335 found on MSM8996
>>>
>>> OK, but I don't get if you expect me to change anything?
>>
>> Maybe it might make sense to name new include file just 'wcd9340.dtsi'
>> rather than 'sdm845-somthing.dtsi'? Same applies to the wcd9335 codec
>> found in msm8996.dtsi, if you are going to extract it too.
> 
> Ah, then I vote against, because it is not only codec, but also it's bus
> attachment. It cannot be re-used on other devices.
> 
> Same approach with sc7280 audios - not re-usable for other SoCs.
Riight.. and interrupts and so on, let's keep it SoC-bound.

Konrad
> 
> Best regards,
> Krzysztof
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
  2023-01-14 20:33   ` Konrad Dybcio
@ 2023-01-17  3:56   ` Bjorn Andersson
  2023-01-17  7:51     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 18+ messages in thread
From: Bjorn Andersson @ 2023-01-17  3:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel

On Fri, Jan 13, 2023 at 05:22:41PM +0100, Krzysztof Kozlowski wrote:
> WCD9340 codec node is not a property of the SoC, but board.  Move it to
> separate file and include it in the specific boards.  On all others,
> keep the Slimbus node disabled as it is empty.
> 

I think this seems like a reasonable idea. But without clearly
documenting your intentions/guidelines we will soon have
sdm845-display.dtsi, sdm845-pcie.dtsi etc.

So please start there.

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../boot/dts/qcom/sdm845-audio-wcd9340.dtsi   | 69 +++++++++++++++++++
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  1 +
>  .../qcom/sdm845-xiaomi-beryllium-common.dtsi  |  1 +
>  .../boot/dts/qcom/sdm845-xiaomi-polaris.dts   |  1 +
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 60 +---------------
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  1 +
>  .../boot/dts/qcom/sdm850-samsung-w737.dts     |  1 +
>  7 files changed, 75 insertions(+), 59 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> new file mode 100644
> index 000000000000..5bcce7d0d709
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi

Why does this include the substring "audio"?

Regards,
Bjorn

> @@ -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>;
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 6b355589edb3..3726465acbde 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -11,6 +11,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> index 64de4ed9b0c8..e530a676b250 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> @@ -7,6 +7,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> index a80c3dd9a2da..f81619c8a3ba 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> @@ -13,6 +13,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  #include "pmi8998.dtsi"
>  #include "pm8005.dtsi"
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 4c256431280a..f9b1d7a60fd6 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -3831,65 +3831,7 @@ slim: slim-ngd@171c0000 {
>  			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 {
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index d9581f4440b3..5586c95aa1ff 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -13,6 +13,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm850.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  
>  /*
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> index 6730804f4e3e..40223704a2c7 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts
> @@ -14,6 +14,7 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm850.dtsi"
> +#include "sdm845-audio-wcd9340.dtsi"
>  #include "pm8998.dtsi"
>  
>  /*
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file
  2023-01-17  3:56   ` Bjorn Andersson
@ 2023-01-17  7:51     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-17  7:51 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel

On 17/01/2023 04:56, Bjorn Andersson wrote:
> On Fri, Jan 13, 2023 at 05:22:41PM +0100, Krzysztof Kozlowski wrote:
>> WCD9340 codec node is not a property of the SoC, but board.  Move it to
>> separate file and include it in the specific boards.  On all others,
>> keep the Slimbus node disabled as it is empty.
>>
> 
> I think this seems like a reasonable idea. But without clearly
> documenting your intentions/guidelines we will soon have
> sdm845-display.dtsi, sdm845-pcie.dtsi etc.
> 
> So please start there.

You said like this started the process but it is already there for
sc7280. Where do you want to store such documentation? In commit msg?

> 
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../boot/dts/qcom/sdm845-audio-wcd9340.dtsi   | 69 +++++++++++++++++++
>>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  1 +
>>  .../qcom/sdm845-xiaomi-beryllium-common.dtsi  |  1 +
>>  .../boot/dts/qcom/sdm845-xiaomi-polaris.dts   |  1 +
>>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 60 +---------------
>>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  1 +
>>  .../boot/dts/qcom/sdm850-samsung-w737.dts     |  1 +
>>  7 files changed, 75 insertions(+), 59 deletions(-)
>>  create mode 100644 arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
>> new file mode 100644
>> index 000000000000..5bcce7d0d709
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/sdm845-audio-wcd9340.dtsi
> 
> Why does this include the substring "audio"?

To indicate it covers entire audio, which points me to the fact that
probably I can also move there sound node.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-01-17  7:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 16:22 [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Krzysztof Kozlowski
2023-01-13 16:22 ` [PATCH 2/6] arm64: dts: qcom: sdm845: move WCD9340 codec to separate file Krzysztof Kozlowski
2023-01-14 20:33   ` Konrad Dybcio
2023-01-15 11:21     ` Krzysztof Kozlowski
2023-01-16  5:55       ` Dmitry Baryshkov
2023-01-16  7:58         ` Krzysztof Kozlowski
2023-01-16  8:56           ` Konrad Dybcio
2023-01-16  8:54         ` Konrad Dybcio
2023-01-17  3:56   ` Bjorn Andersson
2023-01-17  7:51     ` Krzysztof Kozlowski
2023-01-13 16:22 ` [PATCH 3/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl Krzysztof Kozlowski
2023-01-14 20:33   ` Konrad Dybcio
2023-01-13 16:22 ` [PATCH 4/6] arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks Krzysztof Kozlowski
2023-01-14 20:34   ` Konrad Dybcio
2023-01-13 16:22 ` [PATCH 5/6] arm64: dts: qcom: sc8280xp: drop bogus clock-controller property Krzysztof Kozlowski
2023-01-13 16:22 ` [PATCH 6/6] arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro Krzysztof Kozlowski
2023-01-14 20:34   ` Konrad Dybcio
2023-01-14 20:32 ` [PATCH 1/6] arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).