All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
@ 2023-08-16 18:21 Douglas Anderson
  2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Douglas Anderson @ 2023-08-16 18:21 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Sheng-Liang Pan, Douglas Anderson, Andy Gross, Conor Dooley,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring,
	cros-qcom-dts-watchers, devicetree, linux-arm-msm, linux-kernel

Several trogdor boards have moved from the older rt5862i to the newer
rt5862s, at least on newer revisions of boards. Let's get rid of the
dts duplication across boards and promote this to a fragment.

Note: The old boards used to override the "compatible" in the "sound"
node with the exact same thing that was in "sc7180-trogdor.dtsi"
("google,sc7180-trogdor"). I got rid of that.

This is validated to produce the same result when taking the dtbs
generated by the kernel build and then doing:

  for dtb in *trogdor*.dtb; do
    dtc -I dtb -O dts $dtb -o out/$dtb.dts;
  done

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 .../boot/dts/qcom/sc7180-trogdor-kingoftown.dts | 13 +------------
 .../dts/qcom/sc7180-trogdor-pazquel360.dtsi     | 13 +------------
 .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi    | 17 +++++++++++++++++
 ...180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 13 +------------
 ...180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 13 +------------
 5 files changed, 21 insertions(+), 48 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
index 36326ef972dc..d6db7d83adcf 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
@@ -11,19 +11,13 @@
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include <arm/cros-ec-keyboard.dtsi>
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 / {
 	model = "Google Kingoftown";
 	compatible = "google,kingoftown", "qcom,sc7180";
 };
 
-&alc5682 {
-	compatible = "realtek,rt5682s";
-	/delete-property/ VBAT-supply;
-	realtek,dmic1-clk-pin = <2>;
-	realtek,dmic-clk-rate-hz = <2048000>;
-};
-
 &ap_tp_i2c {
 	status = "okay";
 };
@@ -84,11 +78,6 @@ &pp3300_dx_edp {
 	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
 };
 
-&sound {
-	compatible = "google,sc7180-trogdor";
-	model = "sc7180-rt5682s-max98357a-1mic";
-};
-
 &wifi {
 	qcom,ath10k-calibration-variant = "GO_KINGOFTOWN";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
index 273e2249f018..89034b6702f4 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
@@ -7,13 +7,7 @@
 
 /* This file must be included after sc7180-trogdor.dtsi */
 #include "sc7180-trogdor-pazquel.dtsi"
-
-&alc5682 {
-	compatible = "realtek,rt5682s";
-	realtek,dmic1-clk-pin = <2>;
-	realtek,dmic-clk-rate-hz = <2048000>;
-	/delete-property/ VBAT-supply;
-};
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 ap_ts_pen_1v8: &i2c4 {
 	clock-frequency = <400000>;
@@ -64,11 +58,6 @@ CROS_STD_MAIN_KEYMAP
 	>;
 };
 
-&sound {
-	compatible = "google,sc7180-trogdor";
-	model = "sc7180-rt5682s-max98357a-1mic";
-};
-
 &wifi {
 	qcom,ath10k-calibration-variant = "GO_PAZQUEL360";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
new file mode 100644
index 000000000000..66b8773309d4
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Trogdor dts fragment for SKUs with
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+&alc5682 {
+	compatible = "realtek,rt5682s";
+	/delete-property/ VBAT-supply;
+	realtek,dmic1-clk-pin = <2>;
+	realtek,dmic-clk-rate-hz = <2048000>;
+};
+
+&sound {
+	model = "sc7180-rt5682s-max98357a-1mic";
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
index 6225ab8329c3..842f07f16ed1 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
@@ -11,20 +11,9 @@
 /dts-v1/;
 
 #include "sc7180-trogdor-wormdingler-rev1-boe.dts"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ (BOE, rt5682s)";
 	compatible = "google,wormdingler-sku1025", "qcom,sc7180";
 };
-
-&alc5682 {
-	compatible = "realtek,rt5682s";
-	/delete-property/ VBAT-supply;
-	realtek,dmic1-clk-pin = <2>;
-	realtek,dmic-clk-rate-hz = <2048000>;
-};
-
-&sound {
-	compatible = "google,sc7180-trogdor";
-	model = "sc7180-rt5682s-max98357a-1mic";
-};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
index b40b068dad6a..084870323606 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
@@ -11,20 +11,9 @@
 /dts-v1/;
 
 #include "sc7180-trogdor-wormdingler-rev1-inx.dts"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ (INX, rt5682s)";
 	compatible = "google,wormdingler-sku1", "qcom,sc7180";
 };
-
-&alc5682 {
-	compatible = "realtek,rt5682s";
-	/delete-property/ VBAT-supply;
-	realtek,dmic1-clk-pin = <2>;
-	realtek,dmic-clk-rate-hz = <2048000>;
-};
-
-&sound {
-	compatible = "google,sc7180-trogdor";
-	model = "sc7180-rt5682s-max98357a-1mic";
-};
-- 
2.41.0.694.ge786442a9b-goog


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

* [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
  2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
@ 2023-08-16 18:21 ` Douglas Anderson
  2023-08-17  8:57   ` Sheng-Liang Pan
  2023-08-26  9:36   ` Konrad Dybcio
  2023-08-17  8:24 ` [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Sheng-Liang Pan
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Douglas Anderson @ 2023-08-16 18:21 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Sheng-Liang Pan, Douglas Anderson, Krzysztof Kozlowski,
	Andy Gross, Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski,
	Rob Herring, cros-qcom-dts-watchers, devicetree, linux-arm-msm,
	linux-kernel

It was asserted that the "/delete-property/ VBAT-supply;" that we
needed to do in the rt5682s dts fragment was ugly. Let's change up all
the trogdor device trees to make it explicit which version of "rt5682"
we have and avoid the need for the "delete-property".

As a side effect, this nicely gets rid of the need for a delete-node
in coachz, which doesn't use "rt5682" at all.

A few notes:
- This doesn't get rid of every "/delete-node/" in trogdor, just the
  one that was used for rt5682s.
- Though we no longer have any "/delete-node/", we do still override
  the "model" in the "sound" node in one case (in pompom) since that
  uses the "2mic" sound setup.

This is validated to produce the same result (other than a few
properties being reordered) when taking the dtbs generated by the
kernel build and then doing:

  for dtb in *trogdor*.dtb; do
    dtc -I dtb -O dts $dtb -o out/$dtb.dts;
  done

Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
I'm pretty on the fence about this change. I wrote it up at
Krzysztof's request. While I don't hate it, I'm not convinced that
this is truly more understandable and it does cause a bit of extra
duplication. Happy to let others/Bjorn decide.

 .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi  |  1 -
 .../dts/qcom/sc7180-trogdor-homestar.dtsi     |  2 +
 .../sc7180-trogdor-lazor-limozeen-nots-r5.dts |  1 +
 .../sc7180-trogdor-lazor-limozeen-nots-r9.dts |  1 +
 .../qcom/sc7180-trogdor-lazor-limozeen-r4.dts |  2 +
 .../qcom/sc7180-trogdor-lazor-limozeen-r9.dts |  1 +
 .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts |  1 +
 .../dts/qcom/sc7180-trogdor-lazor-r3-kb.dts   |  1 +
 .../dts/qcom/sc7180-trogdor-lazor-r3-lte.dts  |  1 +
 .../boot/dts/qcom/sc7180-trogdor-lazor-r3.dts |  1 +
 .../dts/qcom/sc7180-trogdor-lazor-r9-kb.dts   |  1 +
 .../dts/qcom/sc7180-trogdor-lazor-r9-lte.dts  |  1 +
 .../boot/dts/qcom/sc7180-trogdor-lazor-r9.dts |  1 +
 .../sc7180-trogdor-pazquel-lte-parade.dts     |  1 +
 .../qcom/sc7180-trogdor-pazquel-lte-ti.dts    |  1 +
 .../qcom/sc7180-trogdor-pazquel-parade.dts    |  1 +
 .../dts/qcom/sc7180-trogdor-pazquel-ti.dts    |  1 +
 .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi  |  1 +
 .../qcom/sc7180-trogdor-quackingstick.dtsi    |  1 +
 .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts |  1 +
 .../dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi  | 38 +++++++++++++++++++
 .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi  | 33 +++++++++++++---
 ...0-trogdor-wormdingler-rev1-boe-rt5682s.dts | 12 +++++-
 .../sc7180-trogdor-wormdingler-rev1-boe.dts   |  1 +
 ...0-trogdor-wormdingler-rev1-inx-rt5682s.dts |  6 ++-
 .../sc7180-trogdor-wormdingler-rev1-inx.dts   |  1 +
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  | 27 -------------
 27 files changed, 104 insertions(+), 36 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi
index a532cc4aac47..53f2b093bd40 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi
@@ -10,7 +10,6 @@
 
 /* Deleted nodes from sc7180-trogdor.dtsi */
 
-/delete-node/ &alc5682;
 /delete-node/ &pp3300_codec;
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi
index b27dcd2ec856..ab51c3a930e1 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi
@@ -7,6 +7,8 @@
 
 /* This file must be included after sc7180-trogdor.dtsi */
 
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
+
 / {
 	/* BOARD-SPECIFIC TOP LEVEL NODES */
 
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
index 7f01573b5543..e7da0d6e8ef5 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor Limozeen without Touchscreen (rev5 - rev8)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
index 913b5fc3ba76..400f9e18977f 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor Limozeen without Touchscreen (rev9+)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r4.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
index d42dcd421146..8a24812b9a00 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
@@ -11,6 +11,8 @@
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
+
 
 / {
 	model = "Google Lazor Limozeen (rev4 - rev8)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r9.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
index 15d77dc5f956..09a4ff13f072 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor Limozeen (rev9+)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
index 80c7108bc51b..b60060a38426 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor (rev1 - 2)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
index 6ff81c1f7c44..3459b81c5628 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-lite.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
index e58e36e35950..ff8f47da109d 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor (rev3 - 8) with LTE";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts
index 76c83f88cb41..dd8f6d95655e 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-lite.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
index 960f7b7ce094..1c4f0773a242 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-lite.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
index 38027f13b9d0..ec73943abc4c 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Lazor (rev9+) with LTE";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dts
index 56dd222650d3..6cedc0ba9653 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-lite.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-parade.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-parade.dts
index 767cb7450c0d..1c3d9f1381ca 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-parade.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-parade.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-pazquel.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Pazquel (Parade,LTE)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-ti.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-ti.dts
index 9145b74e9009..bf170471b00c 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-ti.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-lte-ti.dts
@@ -11,6 +11,7 @@
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-pazquel.dtsi"
 #include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Pazquel (TI,LTE)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-parade.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-parade.dts
index 9a0e6632a786..60ae129b83c9 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-parade.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-parade.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-parade-ps8640.dtsi"
 #include "sc7180-trogdor-pazquel.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Pazquel (Parade)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-ti.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-ti.dts
index 47c5970d8c22..31678a98ce2c 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-ti.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel-ti.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 #include "sc7180-trogdor-pazquel.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Pazquel (TI)";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi
index fd944842dd6c..8a1e267b3d8e 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi
@@ -8,6 +8,7 @@
 #include "sc7180-trogdor.dtsi"
 /* Must come after sc7180-trogdor.dtsi to modify cros_ec */
 #include <arm/cros-ec-keyboard.dtsi>
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi
index 62ab6427dd65..23c1c81900e8 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 /* This board only has 1 USB Type-C port. */
 /delete-node/ &usb_c1;
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
index 671b3691f1bb..c9667751a990 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
@@ -10,6 +10,7 @@
 #include "sc7180-trogdor.dtsi"
 /* Must come after sc7180-trogdor.dtsi to modify cros_ec */
 #include <arm/cros-ec-keyboard.dtsi>
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi
new file mode 100644
index 000000000000..26f2f5de489c
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Trogdor dts fragment for SKUs with rt5682i
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+&hp_i2c {
+	alc5682: codec@1a {
+		compatible = "realtek,rt5682i";
+		reg = <0x1a>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hp_irq>;
+
+		#sound-dai-cells = <1>;
+
+		interrupt-parent = <&tlmm>;
+		/*
+		 * This will get ignored because the interrupt type
+		 * is set in rt5682.c.
+		 */
+		interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
+
+		AVDD-supply = <&pp1800_alc5682>;
+		DBVDD-supply = <&pp1800_alc5682>;
+		LDO1-IN-supply = <&pp1800_alc5682>;
+		MICVDD-supply = <&pp3300_codec>;
+		VBAT-supply = <&pp3300_audio>;
+
+		realtek,dmic1-data-pin = <1>;
+		realtek,dmic1-clk-pin = <1>;
+		realtek,jd-src = <1>;
+	};
+};
+
+&sound {
+	model = "sc7180-rt5682-max98357a-1mic";
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
index 66b8773309d4..ea036a73f875 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
@@ -1,15 +1,36 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Google Trogdor dts fragment for SKUs with
+ * Google Trogdor dts fragment for SKUs with rt5682s
  *
  * Copyright 2023 Google LLC.
  */
 
-&alc5682 {
-	compatible = "realtek,rt5682s";
-	/delete-property/ VBAT-supply;
-	realtek,dmic1-clk-pin = <2>;
-	realtek,dmic-clk-rate-hz = <2048000>;
+&hp_i2c {
+	alc5682: codec@1a {
+		compatible = "realtek,rt5682s";
+		reg = <0x1a>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hp_irq>;
+
+		#sound-dai-cells = <1>;
+
+		interrupt-parent = <&tlmm>;
+		/*
+		 * This will get ignored because the interrupt type
+		 * is set in rt5682.c.
+		 */
+		interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
+
+		AVDD-supply = <&pp1800_alc5682>;
+		DBVDD-supply = <&pp1800_alc5682>;
+		LDO1-IN-supply = <&pp1800_alc5682>;
+		MICVDD-supply = <&pp3300_codec>;
+
+		realtek,dmic1-data-pin = <1>;
+		realtek,dmic1-clk-pin = <2>;
+		realtek,dmic-clk-rate-hz = <2048000>;
+		realtek,jd-src = <1>;
+	};
 };
 
 &sound {
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
index 842f07f16ed1..116f79c25a5d 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
@@ -10,10 +10,20 @@
 
 /dts-v1/;
 
-#include "sc7180-trogdor-wormdingler-rev1-boe.dts"
+#include "sc7180-trogdor-wormdingler.dtsi"
 #include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ (BOE, rt5682s)";
 	compatible = "google,wormdingler-sku1025", "qcom,sc7180";
 };
+
+&mdss_dsi0_phy {
+	qcom,phy-rescode-offset-top = /bits/ 8 <31 31 31 31 (-32)>;
+	qcom,phy-rescode-offset-bot = /bits/ 8 <31 31 31 31 (-32)>;
+	qcom,phy-drive-ldo-level = <450>;
+};
+
+&panel {
+	compatible = "boe,tv110c9m-ll3";
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
index 6eeead70d3eb..72627760e2a4 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
@@ -11,6 +11,7 @@
 /dts-v1/;
 
 #include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ BOE panel board";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
index 084870323606..0bf355e08f78 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
@@ -10,10 +10,14 @@
 
 /dts-v1/;
 
-#include "sc7180-trogdor-wormdingler-rev1-inx.dts"
+#include "sc7180-trogdor-wormdingler.dtsi"
 #include "sc7180-trogdor-rt5682s-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ (INX, rt5682s)";
 	compatible = "google,wormdingler-sku1", "qcom,sc7180";
 };
+
+&panel {
+	compatible = "innolux,hj110iz-01a";
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
index dd34a2297ea0..4b165b826ab3 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
@@ -11,6 +11,7 @@
 /dts-v1/;
 
 #include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
 
 / {
 	model = "Google Wormdingler rev1+ INX panel board";
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 5a33e16a8b67..46aaeba28604 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -372,7 +372,6 @@ keyboard_backlight: led-0 {
 
 	sound: sound {
 		compatible = "google,sc7180-trogdor";
-		model = "sc7180-rt5682-max98357a-1mic";
 
 		audio-routing =
 			"Headphone Jack", "HPOL",
@@ -747,32 +746,6 @@ trackpad: trackpad@15 {
 hp_i2c: &i2c9 {
 	status = "okay";
 	clock-frequency = <400000>;
-
-	alc5682: codec@1a {
-		compatible = "realtek,rt5682i";
-		reg = <0x1a>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&hp_irq>;
-
-		#sound-dai-cells = <1>;
-
-		interrupt-parent = <&tlmm>;
-		/*
-		 * This will get ignored because the interrupt type
-		 * is set in rt5682.c.
-		 */
-		interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
-
-		AVDD-supply = <&pp1800_alc5682>;
-		DBVDD-supply = <&pp1800_alc5682>;
-		LDO1-IN-supply = <&pp1800_alc5682>;
-		MICVDD-supply = <&pp3300_codec>;
-		VBAT-supply = <&pp3300_audio>;
-
-		realtek,dmic1-data-pin = <1>;
-		realtek,dmic1-clk-pin = <1>;
-		realtek,jd-src = <1>;
-	};
 };
 
 &lpasscc {
-- 
2.41.0.694.ge786442a9b-goog


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

* Re: [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
  2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
  2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
@ 2023-08-17  8:24 ` Sheng-Liang Pan
  2023-08-26  9:34 ` Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Sheng-Liang Pan @ 2023-08-17  8:24 UTC (permalink / raw)
  To: Douglas Anderson, Bjorn Andersson
  Cc: Andy Gross, Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski,
	Rob Herring, cros-qcom-dts-watchers, devicetree, linux-arm-msm,
	linux-kernel, sheng-liang.pan

Hi

> Several trogdor boards have moved from the older rt5862i to the newer
> rt5862s, at least on newer revisions of boards. Let's get rid of the
> dts duplication across boards and promote this to a fragment.
>
> Note: The old boards used to override the "compatible" in the "sound"
> node with the exact same thing that was in "sc7180-trogdor.dtsi"
> ("google,sc7180-trogdor"). I got rid of that.
>
> This is validated to produce the same result when taking the dtbs
> generated by the kernel build and then doing:
>
>    for dtb in *trogdor*.dtb; do
>      dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>    done
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
>   .../boot/dts/qcom/sc7180-trogdor-kingoftown.dts | 13 +------------
>   .../dts/qcom/sc7180-trogdor-pazquel360.dtsi     | 13 +------------
>   .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi    | 17 +++++++++++++++++
>   ...180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 13 +------------
>   ...180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 13 +------------
>   5 files changed, 21 insertions(+), 48 deletions(-)
>   create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
> index 36326ef972dc..d6db7d83adcf 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts
> @@ -11,19 +11,13 @@
>   #include "sc7180-trogdor-parade-ps8640.dtsi"
>   #include <arm/cros-ec-keyboard.dtsi>
>   #include "sc7180-trogdor-lte-sku.dtsi"
> +#include "sc7180-trogdor-rt5682s-sku.dtsi"
>   
>   / {
>   	model = "Google Kingoftown";
>   	compatible = "google,kingoftown", "qcom,sc7180";
>   };
>   
> -&alc5682 {
> -	compatible = "realtek,rt5682s";
> -	/delete-property/ VBAT-supply;
> -	realtek,dmic1-clk-pin = <2>;
> -	realtek,dmic-clk-rate-hz = <2048000>;
> -};
> -
>   &ap_tp_i2c {
>   	status = "okay";
>   };
> @@ -84,11 +78,6 @@ &pp3300_dx_edp {
>   	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
>   };
>   
> -&sound {
> -	compatible = "google,sc7180-trogdor";
> -	model = "sc7180-rt5682s-max98357a-1mic";
> -};
> -
>   &wifi {
>   	qcom,ath10k-calibration-variant = "GO_KINGOFTOWN";
>   };
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
> index 273e2249f018..89034b6702f4 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi
> @@ -7,13 +7,7 @@
>   
>   /* This file must be included after sc7180-trogdor.dtsi */
>   #include "sc7180-trogdor-pazquel.dtsi"
> -
> -&alc5682 {
> -	compatible = "realtek,rt5682s";
> -	realtek,dmic1-clk-pin = <2>;
> -	realtek,dmic-clk-rate-hz = <2048000>;
> -	/delete-property/ VBAT-supply;
> -};
> +#include "sc7180-trogdor-rt5682s-sku.dtsi"
>   
>   ap_ts_pen_1v8: &i2c4 {
>   	clock-frequency = <400000>;
> @@ -64,11 +58,6 @@ CROS_STD_MAIN_KEYMAP
>   	>;
>   };
>   
> -&sound {
> -	compatible = "google,sc7180-trogdor";
> -	model = "sc7180-rt5682s-max98357a-1mic";
> -};
> -
>   &wifi {
>   	qcom,ath10k-calibration-variant = "GO_PAZQUEL360";
>   };
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
> new file mode 100644
> index 000000000000..66b8773309d4
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Google Trogdor dts fragment for SKUs with
> + *
> + * Copyright 2023 Google LLC.
> + */
> +
> +&alc5682 {
> +	compatible = "realtek,rt5682s";
> +	/delete-property/ VBAT-supply;
> +	realtek,dmic1-clk-pin = <2>;
> +	realtek,dmic-clk-rate-hz = <2048000>;
> +};
> +
> +&sound {
> +	model = "sc7180-rt5682s-max98357a-1mic";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
> index 6225ab8329c3..842f07f16ed1 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
> @@ -11,20 +11,9 @@
>   /dts-v1/;
>   
>   #include "sc7180-trogdor-wormdingler-rev1-boe.dts"
> +#include "sc7180-trogdor-rt5682s-sku.dtsi"
>   
>   / {
>   	model = "Google Wormdingler rev1+ (BOE, rt5682s)";
>   	compatible = "google,wormdingler-sku1025", "qcom,sc7180";
>   };
> -
> -&alc5682 {
> -	compatible = "realtek,rt5682s";
> -	/delete-property/ VBAT-supply;
> -	realtek,dmic1-clk-pin = <2>;
> -	realtek,dmic-clk-rate-hz = <2048000>;
> -};
> -
> -&sound {
> -	compatible = "google,sc7180-trogdor";
> -	model = "sc7180-rt5682s-max98357a-1mic";
> -};
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
> index b40b068dad6a..084870323606 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
> @@ -11,20 +11,9 @@
>   /dts-v1/;
>   
>   #include "sc7180-trogdor-wormdingler-rev1-inx.dts"
> +#include "sc7180-trogdor-rt5682s-sku.dtsi"
>   
>   / {
>   	model = "Google Wormdingler rev1+ (INX, rt5682s)";
>   	compatible = "google,wormdingler-sku1", "qcom,sc7180";
>   };
> -
> -&alc5682 {
> -	compatible = "realtek,rt5682s";
> -	/delete-property/ VBAT-supply;
> -	realtek,dmic1-clk-pin = <2>;
> -	realtek,dmic-clk-rate-hz = <2048000>;
> -};
> -
> -&sound {
> -	compatible = "google,sc7180-trogdor";
> -	model = "sc7180-rt5682s-max98357a-1mic";
> -};

Reviewed-by: Sheng-Liang Pan 
<sheng-liang.pan@quanta.corp-partner.google.com>


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

* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
  2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
@ 2023-08-17  8:57   ` Sheng-Liang Pan
  2023-08-26  9:36   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Sheng-Liang Pan @ 2023-08-17  8:57 UTC (permalink / raw)
  To: Douglas Anderson, Bjorn Andersson
  Cc: Krzysztof Kozlowski, Andy Gross, Conor Dooley, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, cros-qcom-dts-watchers,
	devicetree, linux-arm-msm, linux-kernel, sheng-liang.pan

Hi

> It was asserted that the "/delete-property/ VBAT-supply;" that we
> needed to do in the rt5682s dts fragment was ugly. Let's change up all
> the trogdor device trees to make it explicit which version of "rt5682"
> we have and avoid the need for the "delete-property".
>
> As a side effect, this nicely gets rid of the need for a delete-node
> in coachz, which doesn't use "rt5682" at all.
>
> A few notes:
> - This doesn't get rid of every "/delete-node/" in trogdor, just the
>    one that was used for rt5682s.
> - Though we no longer have any "/delete-node/", we do still override
>    the "model" in the "sound" node in one case (in pompom) since that
>    uses the "2mic" sound setup.
>
> This is validated to produce the same result (other than a few
> properties being reordered) when taking the dtbs generated by the
> kernel build and then doing:
>
>    for dtb in *trogdor*.dtb; do
>      dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>    done
>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> I'm pretty on the fence about this change. I wrote it up at
> Krzysztof's request. While I don't hate it, I'm not convinced that
> this is truly more understandable and it does cause a bit of extra
> duplication. Happy to let others/Bjorn decide.
>
>   .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi  |  1 -
>   .../dts/qcom/sc7180-trogdor-homestar.dtsi     |  2 +
>   .../sc7180-trogdor-lazor-limozeen-nots-r5.dts |  1 +
>   .../sc7180-trogdor-lazor-limozeen-nots-r9.dts |  1 +
>   .../qcom/sc7180-trogdor-lazor-limozeen-r4.dts |  2 +
>   .../qcom/sc7180-trogdor-lazor-limozeen-r9.dts |  1 +
>   .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts |  1 +
>   .../dts/qcom/sc7180-trogdor-lazor-r3-kb.dts   |  1 +
>   .../dts/qcom/sc7180-trogdor-lazor-r3-lte.dts  |  1 +
>   .../boot/dts/qcom/sc7180-trogdor-lazor-r3.dts |  1 +
>   .../dts/qcom/sc7180-trogdor-lazor-r9-kb.dts   |  1 +
>   .../dts/qcom/sc7180-trogdor-lazor-r9-lte.dts  |  1 +
>   .../boot/dts/qcom/sc7180-trogdor-lazor-r9.dts |  1 +
>   .../sc7180-trogdor-pazquel-lte-parade.dts     |  1 +
>   .../qcom/sc7180-trogdor-pazquel-lte-ti.dts    |  1 +
>   .../qcom/sc7180-trogdor-pazquel-parade.dts    |  1 +
>   .../dts/qcom/sc7180-trogdor-pazquel-ti.dts    |  1 +
>   .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi  |  1 +
>   .../qcom/sc7180-trogdor-quackingstick.dtsi    |  1 +
>   .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts |  1 +
>   .../dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi  | 38 +++++++++++++++++++
>   .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi  | 33 +++++++++++++---
>   ...0-trogdor-wormdingler-rev1-boe-rt5682s.dts | 12 +++++-
>   .../sc7180-trogdor-wormdingler-rev1-boe.dts   |  1 +
>   ...0-trogdor-wormdingler-rev1-inx-rt5682s.dts |  6 ++-
>   .../sc7180-trogdor-wormdingler-rev1-inx.dts   |  1 +
>   arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  | 27 -------------
>   27 files changed, 104 insertions(+), 36 deletions(-)
>   create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682i-sku.dtsi
>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>


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

* Re: [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
  2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
  2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
  2023-08-17  8:24 ` [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Sheng-Liang Pan
@ 2023-08-26  9:34 ` Konrad Dybcio
  2023-09-14 23:37 ` Doug Anderson
  2023-09-20  2:13 ` (subset) " Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-08-26  9:34 UTC (permalink / raw)
  To: Douglas Anderson, Bjorn Andersson
  Cc: Sheng-Liang Pan, Andy Gross, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, cros-qcom-dts-watchers, devicetree, linux-arm-msm,
	linux-kernel

On 16.08.2023 20:21, Douglas Anderson wrote:
> Several trogdor boards have moved from the older rt5862i to the newer
> rt5862s, at least on newer revisions of boards. Let's get rid of the
> dts duplication across boards and promote this to a fragment.
> 
> Note: The old boards used to override the "compatible" in the "sound"
> node with the exact same thing that was in "sc7180-trogdor.dtsi"
> ("google,sc7180-trogdor"). I got rid of that.
> 
> This is validated to produce the same result when taking the dtbs
> generated by the kernel build and then doing:
> 
>   for dtb in *trogdor*.dtb; do
>     dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>   done
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
  2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
  2023-08-17  8:57   ` Sheng-Liang Pan
@ 2023-08-26  9:36   ` Konrad Dybcio
  2023-08-28 15:04     ` Doug Anderson
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2023-08-26  9:36 UTC (permalink / raw)
  To: Douglas Anderson, Bjorn Andersson
  Cc: Sheng-Liang Pan, Krzysztof Kozlowski, Andy Gross, Conor Dooley,
	Krzysztof Kozlowski, Rob Herring, cros-qcom-dts-watchers,
	devicetree, linux-arm-msm, linux-kernel

On 16.08.2023 20:21, Douglas Anderson wrote:
> It was asserted that the "/delete-property/ VBAT-supply;" that we
> needed to do in the rt5682s dts fragment was ugly. Let's change up all
> the trogdor device trees to make it explicit which version of "rt5682"
> we have and avoid the need for the "delete-property".
> 
> As a side effect, this nicely gets rid of the need for a delete-node
> in coachz, which doesn't use "rt5682" at all.
> 
> A few notes:
> - This doesn't get rid of every "/delete-node/" in trogdor, just the
>   one that was used for rt5682s.
> - Though we no longer have any "/delete-node/", we do still override
>   the "model" in the "sound" node in one case (in pompom) since that
>   uses the "2mic" sound setup.
> 
> This is validated to produce the same result (other than a few
> properties being reordered) when taking the dtbs generated by the
> kernel build and then doing:
> 
>   for dtb in *trogdor*.dtb; do
>     dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>   done
> 
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
[...]

> +&mdss_dsi0_phy {
> +	qcom,phy-rescode-offset-top = /bits/ 8 <31 31 31 31 (-32)>;
> +	qcom,phy-rescode-offset-bot = /bits/ 8 <31 31 31 31 (-32)>;
> +	qcom,phy-drive-ldo-level = <450>;
> +};
> +
> +&panel {
> +	compatible = "boe,tv110c9m-ll3";
> +};
This is odd

Konrad


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

* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
  2023-08-26  9:36   ` Konrad Dybcio
@ 2023-08-28 15:04     ` Doug Anderson
  2023-08-28 15:07       ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Doug Anderson @ 2023-08-28 15:04 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Sheng-Liang Pan, Krzysztof Kozlowski,
	Andy Gross, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
	cros-qcom-dts-watchers, devicetree, linux-arm-msm, linux-kernel

Hi,

On Sat, Aug 26, 2023 at 2:36 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 16.08.2023 20:21, Douglas Anderson wrote:
> > It was asserted that the "/delete-property/ VBAT-supply;" that we
> > needed to do in the rt5682s dts fragment was ugly. Let's change up all
> > the trogdor device trees to make it explicit which version of "rt5682"
> > we have and avoid the need for the "delete-property".
> >
> > As a side effect, this nicely gets rid of the need for a delete-node
> > in coachz, which doesn't use "rt5682" at all.
> >
> > A few notes:
> > - This doesn't get rid of every "/delete-node/" in trogdor, just the
> >   one that was used for rt5682s.
> > - Though we no longer have any "/delete-node/", we do still override
> >   the "model" in the "sound" node in one case (in pompom) since that
> >   uses the "2mic" sound setup.
> >
> > This is validated to produce the same result (other than a few
> > properties being reordered) when taking the dtbs generated by the
> > kernel build and then doing:
> >
> >   for dtb in *trogdor*.dtb; do
> >     dtc -I dtb -O dts $dtb -o out/$dtb.dts;
> >   done
> >
> > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> [...]
>
> > +&mdss_dsi0_phy {
> > +     qcom,phy-rescode-offset-top = /bits/ 8 <31 31 31 31 (-32)>;
> > +     qcom,phy-rescode-offset-bot = /bits/ 8 <31 31 31 31 (-32)>;
> > +     qcom,phy-drive-ldo-level = <450>;
> > +};
> > +
> > +&panel {
> > +     compatible = "boe,tv110c9m-ll3";
> > +};
> This is odd

Can you clarify why it's odd? There are two possible panels used in
wormdignler, one with an INX display and one with a BOE display. This
one has the BOE display.

For the BOE display, there is one with the old Realtek audio codec
(rt5682i) and one with the new Realtek audio codec (rt5682s).

Previously, the BOE/rt5682s device tree could just include the
BOE/rt5682i device tree and override the audio. ...but Krzysztof
didn't like that. ...so now we have to duplicate the BOE bits in both
the BOE/rt5682s and BOE/rt5682i files. We could make a fragment for
just this bit, but that feels overboard for something that's in just
two files.

As per my "after the cut" description, I'm not really convinced that
the end result here is easier to understand. Some bits are clearer and
some more complex. I simply wrote it up because it was requested.

-Doug

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

* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
  2023-08-28 15:04     ` Doug Anderson
@ 2023-08-28 15:07       ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-08-28 15:07 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Bjorn Andersson, Sheng-Liang Pan, Krzysztof Kozlowski,
	Andy Gross, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
	cros-qcom-dts-watchers, devicetree, linux-arm-msm, linux-kernel

On 28.08.2023 17:04, Doug Anderson wrote:
> Hi,
> 
> On Sat, Aug 26, 2023 at 2:36 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 16.08.2023 20:21, Douglas Anderson wrote:
>>> It was asserted that the "/delete-property/ VBAT-supply;" that we
>>> needed to do in the rt5682s dts fragment was ugly. Let's change up all
>>> the trogdor device trees to make it explicit which version of "rt5682"
>>> we have and avoid the need for the "delete-property".
>>>
>>> As a side effect, this nicely gets rid of the need for a delete-node
>>> in coachz, which doesn't use "rt5682" at all.
>>>
>>> A few notes:
>>> - This doesn't get rid of every "/delete-node/" in trogdor, just the
>>>   one that was used for rt5682s.
>>> - Though we no longer have any "/delete-node/", we do still override
>>>   the "model" in the "sound" node in one case (in pompom) since that
>>>   uses the "2mic" sound setup.
>>>
>>> This is validated to produce the same result (other than a few
>>> properties being reordered) when taking the dtbs generated by the
>>> kernel build and then doing:
>>>
>>>   for dtb in *trogdor*.dtb; do
>>>     dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>>>   done
>>>
>>> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>> ---
>> [...]
>>
>>> +&mdss_dsi0_phy {
>>> +     qcom,phy-rescode-offset-top = /bits/ 8 <31 31 31 31 (-32)>;
>>> +     qcom,phy-rescode-offset-bot = /bits/ 8 <31 31 31 31 (-32)>;
>>> +     qcom,phy-drive-ldo-level = <450>;
>>> +};
>>> +
>>> +&panel {
>>> +     compatible = "boe,tv110c9m-ll3";
>>> +};
>> This is odd
> 
> Can you clarify why it's odd? There are two possible panels used in
> wormdignler, one with an INX display and one with a BOE display. This
> one has the BOE display.
> 
> For the BOE display, there is one with the old Realtek audio codec
> (rt5682i) and one with the new Realtek audio codec (rt5682s).
> 
> Previously, the BOE/rt5682s device tree could just include the
> BOE/rt5682i device tree and override the audio. ...but Krzysztof
> didn't like that. ...so now we have to duplicate the BOE bits in both
> the BOE/rt5682s and BOE/rt5682i files. We could make a fragment for
> just this bit, but that feels overboard for something that's in just
> two files.
I didn't catch that at all, thought it was an unrelated change that
sneaked in..

> 
> As per my "after the cut" description, I'm not really convinced that
> the end result here is easier to understand. Some bits are clearer and
> some more complex. I simply wrote it up because it was requested.
Yeah I'm not sure either. But then I'm not sure that there is any
fantastic way to go about things with this many SKUs, all of them
just tip the dt-number-vs-duplication ratio one way or the other :/

Konrad

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

* Re: [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
  2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
                   ` (2 preceding siblings ...)
  2023-08-26  9:34 ` Konrad Dybcio
@ 2023-09-14 23:37 ` Doug Anderson
  2023-09-20  2:13 ` (subset) " Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Doug Anderson @ 2023-09-14 23:37 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Sheng-Liang Pan, Andy Gross, Conor Dooley, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, cros-qcom-dts-watchers,
	devicetree, linux-arm-msm, linux-kernel

Hi Bjorn,

On Wed, Aug 16, 2023 at 11:23 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> Several trogdor boards have moved from the older rt5862i to the newer
> rt5862s, at least on newer revisions of boards. Let's get rid of the
> dts duplication across boards and promote this to a fragment.
>
> Note: The old boards used to override the "compatible" in the "sound"
> node with the exact same thing that was in "sc7180-trogdor.dtsi"
> ("google,sc7180-trogdor"). I got rid of that.
>
> This is validated to produce the same result when taking the dtbs
> generated by the kernel build and then doing:
>
>   for dtb in *trogdor*.dtb; do
>     dtc -I dtb -O dts $dtb -o out/$dtb.dts;
>   done
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
>  .../boot/dts/qcom/sc7180-trogdor-kingoftown.dts | 13 +------------
>  .../dts/qcom/sc7180-trogdor-pazquel360.dtsi     | 13 +------------
>  .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi    | 17 +++++++++++++++++
>  ...180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 13 +------------
>  ...180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 13 +------------
>  5 files changed, 21 insertions(+), 48 deletions(-)

If you agree, it would be a wonderful time to land this patch now.
Please let me know if there is anything outstanding you want me to
change.

NOTE: if it were me, I'd land _just_ patch #1 in this series (AKA
${SUBJECT} patch) and skip patch #2. I don't mattery a ton either way,
but it seemed like Konrad agreed with me that the benefits of patch #2
were questionable and, unless someone loves it, I vote for less churn
instead of more churn. :-P

-Doug

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

* Re: (subset) [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
  2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
                   ` (3 preceding siblings ...)
  2023-09-14 23:37 ` Doug Anderson
@ 2023-09-20  2:13 ` Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2023-09-20  2:13 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Sheng-Liang Pan, Andy Gross, Conor Dooley, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, cros-qcom-dts-watchers,
	devicetree, linux-arm-msm, linux-kernel


On Wed, 16 Aug 2023 11:21:53 -0700, Douglas Anderson wrote:
> Several trogdor boards have moved from the older rt5862i to the newer
> rt5862s, at least on newer revisions of boards. Let's get rid of the
> dts duplication across boards and promote this to a fragment.
> 
> Note: The old boards used to override the "compatible" in the "sound"
> node with the exact same thing that was in "sc7180-trogdor.dtsi"
> ("google,sc7180-trogdor"). I got rid of that.
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment
      commit: 8ff1aaba032dd00e71aadeafa0ef2f79d3693c99
[2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts
      commit: 214945cbf375cc27d684f4cd2abb569e8c888688

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-09-20  2:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 18:21 [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Douglas Anderson
2023-08-16 18:21 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts Douglas Anderson
2023-08-17  8:57   ` Sheng-Liang Pan
2023-08-26  9:36   ` Konrad Dybcio
2023-08-28 15:04     ` Doug Anderson
2023-08-28 15:07       ` Konrad Dybcio
2023-08-17  8:24 ` [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Sheng-Liang Pan
2023-08-26  9:34 ` Konrad Dybcio
2023-09-14 23:37 ` Doug Anderson
2023-09-20  2:13 ` (subset) " Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.