diff mbox series

[1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment

Message ID 20230816112143.1.I7227efd47e0dc42b6ff243bd22aa1a3e01923220@changeid
State Accepted
Commit 8ff1aaba032dd00e71aadeafa0ef2f79d3693c99
Headers show
Series [1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment | expand

Commit Message

Doug Anderson Aug. 16, 2023, 6:21 p.m. UTC
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

Comments

Konrad Dybcio Aug. 26, 2023, 9:34 a.m. UTC | #1
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
Doug Anderson Sept. 14, 2023, 11:37 p.m. UTC | #2
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
Bjorn Andersson Sept. 20, 2023, 2:13 a.m. UTC | #3
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,
diff mbox series

Patch

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";
-};