Commit 214945cb authored by Douglas Anderson's avatar Douglas Anderson Committed by Bjorn Andersson

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarSheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230816112143.2.I29a5a330b6994afca81871f74bbacaf55b155937@changeidSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 8ff1aaba
......@@ -10,7 +10,6 @@
/* Deleted nodes from sc7180-trogdor.dtsi */
/delete-node/ &alc5682;
/delete-node/ &pp3300_codec;
/ {
......
......@@ -7,6 +7,8 @@
/* This file must be included after sc7180-trogdor.dtsi */
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
/* BOARD-SPECIFIC TOP LEVEL NODES */
......
......@@ -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)";
......
......@@ -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+)";
......
......@@ -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)";
......
......@@ -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+)";
......
......@@ -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)";
......
......@@ -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"
/ {
......
......@@ -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";
......
......@@ -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"
/ {
......
......@@ -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"
/ {
......
......@@ -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";
......
......@@ -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"
/ {
......
......@@ -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)";
......
......@@ -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)";
......
......@@ -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)";
......
......@@ -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)";
......
......@@ -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"
/ {
......
......@@ -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;
......
......@@ -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"
/ {
......
// 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";
};
// 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 {
......
......@@ -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";
};
......@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ BOE panel board";
......
......@@ -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";
};
......@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ INX panel board";
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment