arm64: dts: qcom: sc7180: Reorganize trogdor rt5682 audio codec dts

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>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230816112143.2.I29a5a330b6994afca81871f74bbacaf55b155937@changeid
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
Douglas Anderson
2023-08-16 11:21:54 -07:00
committed by Bjorn Andersson
parent 8ff1aaba03
commit 214945cbf3
27 changed files with 104 additions and 36 deletions

View File

@@ -10,7 +10,6 @@
/* Deleted nodes from sc7180-trogdor.dtsi */
/delete-node/ &alc5682;
/delete-node/ &pp3300_codec;
/ {

View File

@@ -7,6 +7,8 @@
/* This file must be included after sc7180-trogdor.dtsi */
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
/* BOARD-SPECIFIC TOP LEVEL NODES */

View File

@@ -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)";

View File

@@ -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+)";

View File

@@ -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)";

View File

@@ -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+)";

View File

@@ -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)";

View File

@@ -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"
/ {

View File

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

View File

@@ -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"
/ {

View File

@@ -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"
/ {

View File

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

View File

@@ -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"
/ {

View File

@@ -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)";

View File

@@ -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)";

View File

@@ -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)";

View File

@@ -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)";

View File

@@ -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"
/ {

View File

@@ -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;

View File

@@ -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"
/ {

View File

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

View File

@@ -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 {

View File

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

View File

@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ BOE panel board";

View File

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

View File

@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ INX panel board";

View File

@@ -372,7 +372,6 @@
sound: sound {
compatible = "google,sc7180-trogdor";
model = "sc7180-rt5682-max98357a-1mic";
audio-routing =
"Headphone Jack", "HPOL",
@@ -747,32 +746,6 @@ ap_tp_i2c: &i2c7 {
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 {