Skip to contentSkip to conversation

arm64: dts: mediatek: Split Ciri into overlays

RFC PATCH New Chen-Yu Tsai 1 participant 4 messages Dec 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: mediatek: Split Ciri into overlays

Hi everyone,

This series intends to serve as an example on how we could reorganize the Chromebook device trees into a common design base DTB and split-out DTBOs for component options. There will be no SKU-specific DTBO that handles changing the top level compatible and "model" properties. If these are important or needed in place of the generic board strings, the bootloader could be made to insert the correct ones.

A separate YAML file is created to keep a mapping between the composite DTB and SKU-specific top level compatible strings. These are needed to build a FIT image that the bootloader can then match the correct DTB with its own known compatible strings.

I expect the last patch, which drops the SKU specifities and adds the YAML file to be quite contentious. However I think it would greatly reduce the number of source files we have to manage, given we have or will have dozens of SKUs for some models.

This is related to my "Device Tree Metadata: How Bootloaders Pick DTBs and Apply Overlays" talk at the Device Tree MC at Plumbers [1].

Thanks
ChenYu

[1] https://lpc.events/event/19/contributions/2025/

Chen-Yu Tsai (3):
dt-bindings: arm: mediatek: Add generic Ciri "base" board
arm64: dts: mt8188-ciri: Split into base and overlays based on
components
[EXAMPLE] arm64: dts: mediatek: ciri: Drop SKU-specific overlays

 .../devicetree/bindings/arm/mediatek.yaml     |  4 +
 arch/arm64/boot/dts/mediatek/Makefile         | 26 ++++++
 ...88-geralt-ciri-audio-max98390-es8326.dtso} | 40 ++++++---
 ...88-geralt-ciri-audio-max98390-rt5682s.dtso | 81 +++++++++++++++++++
 ...188-geralt-ciri-audio-tas2563-es8326.dtso} | 18 ++---
 ...88-geralt-ciri-audio-tas2563-rt5682s.dtso} | 46 +++++------
 .../mt8188-geralt-ciri-panel-boe.dtso         | 10 +++
 .../mt8188-geralt-ciri-panel-ivo.dtso         | 10 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku0.dts  | 32 --------
 .../dts/mediatek/mt8188-geralt-ciri-sku2.dts  | 59 --------------
 .../dts/mediatek/mt8188-geralt-ciri-sku3.dts  | 32 --------
 .../dts/mediatek/mt8188-geralt-ciri-sku4.dts  | 48 -----------
 .../dts/mediatek/mt8188-geralt-ciri-sku7.dts  | 48 -----------
 ...eralt-ciri.dtsi => mt8188-geralt-ciri.dts} | 54 ++-----------
 arch/arm64/boot/dts/mediatek/mt8188.yaml      | 51 ++++++++++++
 15 files changed, 244 insertions(+), 315 deletions(-)
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku1.dts => mt8188-geralt-ciri-audio-max98390-es8326.dtso} (59%)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-max98390-rt5682s.dtso
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku5.dts => mt8188-geralt-ciri-audio-tas2563-es8326.dtso} (78%)
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku6.dts => mt8188-geralt-ciri-audio-tas2563-rt5682s.dtso} (52%)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-boe.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-ivo.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri.dtsi => mt8188-geralt-ciri.dts} (81%)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.yaml
Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
#1 lore raw

RFC PATCH 1/3 dt-bindings: arm: mediatek: Add generic Ciri "base" board

To reorganize all the Ciri SKUs into device tree overlays, there needs to be a base device tree with its own compatible string.

Add a new entry for the generic Ciri "base" with just the fallback generic "google,ciri" compatible string.

---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/mediatek.yaml +4 -0
index 718d732174b9..9cff861c6e38 100644
@@ -372,6 +372,10 @@ properties:
           - enum:
               - mediatek,mt8186-evb
           - const: mediatek,mt8186
+      - description: Google Ciri (Lenovo Chromebook Duet (11", 9))
+        items:
+          - const: google,ciri
+          - const: mediatek,mt8188
       - description: Google Ciri (Lenovo Chromebook Duet (11", 9))
         items:
           - enum:
Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
#2 lore raw

RFC PATCH 2/3 arm64: dts: mt8188-ciri: Split into base and overlays based on components

In reply to Chen-Yu Tsai

The MT8188-based Ciri device has 8 SKUs. These are derived from the combinations of 3 types of components (headphone codec, speaker codec, and display panel), each having 2 options.

Decompose the existing dtsi / dts files into 6 overlays for each component option. The audio codec have combined audio routing and graph connections, cannot be easily separated into separate bits without adding even more glue overlays. The per-SKU dts files are also converted to overlays, though now they only contain the final board compatible and model name.

---
 arch/arm64/boot/dts/mediatek/Makefile         | 34 ++++++++
 ...88-geralt-ciri-audio-max98390-es8326.dtso} | 40 ++++++---
 ...88-geralt-ciri-audio-max98390-rt5682s.dtso | 81 +++++++++++++++++++
 ...188-geralt-ciri-audio-tas2563-es8326.dtso} | 18 ++---
 ...88-geralt-ciri-audio-tas2563-rt5682s.dtso} | 46 +++++------
 .../mt8188-geralt-ciri-panel-boe.dtso         | 10 +++
 .../mt8188-geralt-ciri-panel-ivo.dtso         | 10 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku0.dts  | 32 --------
 .../dts/mediatek/mt8188-geralt-ciri-sku0.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku1.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku2.dts  | 59 --------------
 .../dts/mediatek/mt8188-geralt-ciri-sku2.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku3.dts  | 32 --------
 .../dts/mediatek/mt8188-geralt-ciri-sku3.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku4.dts  | 48 -----------
 .../dts/mediatek/mt8188-geralt-ciri-sku4.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku5.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku6.dtso | 11 +++
 .../dts/mediatek/mt8188-geralt-ciri-sku7.dts  | 48 -----------
 .../dts/mediatek/mt8188-geralt-ciri-sku7.dtso | 11 +++
 ...eralt-ciri.dtsi => mt8188-geralt-ciri.dts} | 54 ++-----------
 21 files changed, 285 insertions(+), 315 deletions(-)
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku1.dts => mt8188-geralt-ciri-audio-max98390-es8326.dtso} (59%)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-max98390-rt5682s.dtso
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku5.dts => mt8188-geralt-ciri-audio-tas2563-es8326.dtso} (78%)
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri-sku6.dts => mt8188-geralt-ciri-audio-tas2563-rt5682s.dtso} (52%)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-boe.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-ivo.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dtso
 rename arch/arm64/boot/dts/mediatek/{mt8188-geralt-ciri.dtsi => mt8188-geralt-ciri.dts} (81%)
arch/arm64/boot/dts/mediatek/Makefile +34 -0
index c5fd6191a925..39a844386366 100644
@@ -86,6 +86,40 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262148.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-voltorb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
+
+mt8188-geralt-ciri-sku0-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-boe.dtbo \
+				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo \
+				mt8188-geralt-ciri-sku0.dtbo
+mt8188-geralt-ciri-sku1-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-ivo.dtbo \
+				mt8188-geralt-ciri-audio-max98390-es8326.dtbo \
+				mt8188-geralt-ciri-sku1.dtbo
+mt8188-geralt-ciri-sku2-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-boe.dtbo \
+				mt8188-geralt-ciri-audio-max98390-es8326.dtbo \
+				mt8188-geralt-ciri-sku2.dtbo
+mt8188-geralt-ciri-sku3-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-ivo.dtbo \
+				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo \
+				mt8188-geralt-ciri-sku3.dtbo
+mt8188-geralt-ciri-sku4-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-boe.dtbo \
+				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo \
+				mt8188-geralt-ciri-sku4.dtbo
+mt8188-geralt-ciri-sku5-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-ivo.dtbo \
+				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo \
+				mt8188-geralt-ciri-sku5.dtbo
+mt8188-geralt-ciri-sku6-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-boe.dtbo \
+				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo \
+				mt8188-geralt-ciri-sku6.dtbo
+mt8188-geralt-ciri-sku7-dtbs := mt8188-geralt-ciri.dtb \
+				mt8188-geralt-ciri-panel-ivo.dtbo \
+				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo \
+				mt8188-geralt-ciri-sku7.dtbo
+
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-geralt-ciri-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-geralt-ciri-sku1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-geralt-ciri-sku2.dtb
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-max98390-es8326.dtso renamed from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts +29 -11
similarity index 59%
rename from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts
rename to arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-max98390-es8326.dtso
index ef5ea9d12b1d..b99bd4c78ec5 100644
@@ -2,20 +2,14 @@
 /*
  * Copyright 2023 Google LLC
  */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 /dts-v1/;
-#include "mt8188-geralt-ciri.dtsi"
-
-/ {
-	model = "Google Ciri sku1 board";
-	compatible = "google,ciri-sku1", "google,ciri", "mediatek,mt8188";
-};
-
-&dsi_panel {
-	compatible = "ivo,t109nw41", "himax,hx83102";
-};
+/plugin/;
 
 &i2c0 {
-	/delete-node/ audio-codec@1a;
+	#address-cells = <1>;
+	#size-cells = <0>;
 
 	es8326: audio-codec@19 {
 		compatible = "everest,es8326";
@@ -27,6 +21,23 @@ es8326: audio-codec@19 {
 		everest,jack-pol = [0e];
 		everest,interrupt-clk = [00];
 	};
+
+	max98390_38: amplifier@38 {
+		compatible = "maxim,max98390";
+		reg = <0x38>;
+		sound-name-prefix = "Front Right";
+		reset-gpios = <&pio 118 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&speaker_en>;
+		#sound-dai-cells = <0>;
+	};
+
+	max98390_39: amplifier@39 {
+		compatible = "maxim,max98390";
+		reg = <0x39>;
+		sound-name-prefix = "Front Left";
+		#sound-dai-cells = <0>;
+	};
 };
 
 &sound {
@@ -45,6 +56,13 @@ &sound {
 		"Left Spk", "Front Left BE_OUT",
 		"Right Spk", "Front Right BE_OUT";
 
+	dai-link-1 {
+		codec {
+			sound-dai = <&max98390_38>,
+				    <&max98390_39>;
+		};
+	};
+
 	dai-link-2 {
 		codec {
 			sound-dai = <&es8326>;
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-max98390-rt5682s.dtso new file +81 -0

81 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-tas2563-es8326.dtso renamed from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts +5 -13
similarity index 78%
rename from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts
rename to arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-tas2563-es8326.dtso
index bf87201ccf27..c64094c6c249 100644
@@ -2,22 +2,14 @@
 /*
  * Copyright 2024 Google LLC
  */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 /dts-v1/;
-#include "mt8188-geralt-ciri.dtsi"
-
-/ {
-	model = "Google Ciri sku5 board (rev4)";
-	compatible = "google,ciri-sku5", "google,ciri", "mediatek,mt8188";
-};
-
-&dsi_panel {
-	compatible = "ivo,t109nw41", "himax,hx83102";
-};
+/plugin/;
 
 &i2c0 {
-	/delete-node/ audio-codec@1a;
-	/delete-node/ amplifier@38;
-	/delete-node/ amplifier@39;
+	#address-cells = <1>;
+	#size-cells = <0>;
 
 	es8326: audio-codec@19 {
 		compatible = "everest,es8326";
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-audio-tas2563-rt5682s.dtso renamed from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts +21 -25

81 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-boe.dtso new file +10 -0
new file mode 100644
index 000000000000..4d61226713bc
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&dsi_panel {
+	compatible = "boe,nv110wum-l60", "himax,hx83102";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-panel-ivo.dtso new file +10 -0
new file mode 100644
index 000000000000..8cdacf64c100
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&dsi_panel {
+	compatible = "ivo,t109nw41", "himax,hx83102";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts deleted +0 -32
deleted file mode 100644
index 79d6d12394b9..000000000000
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2023 Google LLC
- */
-/dts-v1/;
-#include "mt8188-geralt-ciri.dtsi"
-
-/ {
-	model = "Google Ciri sku0 board";
-	compatible = "google,ciri-sku0", "google,ciri", "mediatek,mt8188";
-};
-
-&dsi_panel {
-	compatible = "boe,nv110wum-l60", "himax,hx83102";
-};
-
-&sound {
-	compatible = "mediatek,mt8188-rt5682s";
-	model = "mt8188_m98390_5682";
-
-	audio-routing =
-		"ETDM1_OUT", "ETDM_SPK_PIN",
-		"ETDM2_OUT", "ETDM_HP_PIN",
-		"ETDM1_IN", "ETDM_SPK_PIN",
-		"ETDM2_IN", "ETDM_HP_PIN",
-		"ADDA Capture", "MTKAIF_PIN",
-		"Headphone Jack", "HPOL",
-		"Headphone Jack", "HPOR",
-		"IN1P", "Headset Mic",
-		"Left Spk", "Front Left BE_OUT",
-		"Right Spk", "Front Right BE_OUT";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dtso new file +11 -0
new file mode 100644
index 000000000000..884a7b2d943c
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku0 board";
+	compatible = "google,ciri-sku0", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dtso new file +11 -0
new file mode 100644
index 000000000000..d3ed6ea535d7
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku1 board";
+	compatible = "google,ciri-sku1", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts deleted +0 -59

59 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dtso new file +11 -0
new file mode 100644
index 000000000000..3f9d38bc2ad2
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku2 board";
+	compatible = "google,ciri-sku2", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts deleted +0 -32
deleted file mode 100644
index 524f7f0064c1..000000000000
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-#include "mt8188-geralt-ciri.dtsi"
-
-/ {
-	model = "Google Ciri sku3 board";
-	compatible = "google,ciri-sku3", "google,ciri", "mediatek,mt8188";
-};
-
-&dsi_panel {
-	compatible = "ivo,t109nw41", "himax,hx83102";
-};
-
-&sound {
-	compatible = "mediatek,mt8188-rt5682s";
-	model = "mt8188_m98390_5682";
-
-	audio-routing =
-		"ETDM1_OUT", "ETDM_SPK_PIN",
-		"ETDM2_OUT", "ETDM_HP_PIN",
-		"ETDM1_IN", "ETDM_SPK_PIN",
-		"ETDM2_IN", "ETDM_HP_PIN",
-		"ADDA Capture", "MTKAIF_PIN",
-		"Headphone Jack", "HPOL",
-		"Headphone Jack", "HPOR",
-		"IN1P", "Headset Mic",
-		"Left Spk", "Front Left BE_OUT",
-		"Right Spk", "Front Right BE_OUT";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dtso new file +11 -0
new file mode 100644
index 000000000000..e6a6f8f06141
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku3 board";
+	compatible = "google,ciri-sku3", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts deleted +0 -48

48 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dtso new file +11 -0
new file mode 100644
index 000000000000..ee5b28c4ef00
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku4 board (rev4)";
+	compatible = "google,ciri-sku4", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dtso new file +11 -0
new file mode 100644
index 000000000000..ccf8d2f0eb70
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku5 board (rev4)";
+	compatible = "google,ciri-sku5", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dtso new file +11 -0
new file mode 100644
index 000000000000..773c702b59d8
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku6 board (rev4)";
+	compatible = "google,ciri-sku6", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts deleted +0 -48

48 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dtso new file +11 -0
new file mode 100644
index 000000000000..c22860eab9f8
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2024 Google LLC
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	model = "Google Ciri sku7 board (rev4)";
+	compatible = "google,ciri-sku7", "google,ciri", "mediatek,mt8188";
+};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri.dts renamed from arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri.dtsi +7 -47

88 lines not on this page · raw message

Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
#3 lore raw

RFC PATCH 3/3 arm64: dts: mediatek: ciri: Drop SKU-specific overlays

In reply to Chen-Yu Tsai

The final SKU-specific overlays only set the top level board compatible and model, but add nothing else. The specifics are not super important to the kernel, and could be removed so we don't have to have so many source files.

However, the ChromeOS bootloader (coreboot / depthcharge) selects the device tree blob to load basd on the compatible string, so the mapping from a SKU-specific compatible to a DTB (or a series of DTB/DTBOs) needs to be maintained somewhere to build the FIT image.

Move the SKU-specific top level compatible strings to a separate file stored with the device tree sources, and drop the SKU specific files.

---
This is meant to serve as an example for dropping SKU-specific files that just have specific identifiers that the kernel doesn't care about, i.e. doesn't need to be present in the DTB itself, but need to be preserved for other purposes.

---
 arch/arm64/boot/dts/mediatek/Makefile         | 24 +++------
 .../dts/mediatek/mt8188-geralt-ciri-sku0.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku1.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku2.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku3.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku4.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku5.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku6.dtso | 11 ----
 .../dts/mediatek/mt8188-geralt-ciri-sku7.dtso | 11 ----
 arch/arm64/boot/dts/mediatek/mt8188.yaml      | 51 +++++++++++++++++++
 10 files changed, 59 insertions(+), 104 deletions(-)
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dtso
 delete mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.yaml
arch/arm64/boot/dts/mediatek/Makefile +8 -16
index 39a844386366..5123d15c62c1 100644
@@ -89,36 +89,28 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 
 mt8188-geralt-ciri-sku0-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-boe.dtbo \
-				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo \
-				mt8188-geralt-ciri-sku0.dtbo
+				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo
 mt8188-geralt-ciri-sku1-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-ivo.dtbo \
-				mt8188-geralt-ciri-audio-max98390-es8326.dtbo \
-				mt8188-geralt-ciri-sku1.dtbo
+				mt8188-geralt-ciri-audio-max98390-es8326.dtbo
 mt8188-geralt-ciri-sku2-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-boe.dtbo \
-				mt8188-geralt-ciri-audio-max98390-es8326.dtbo \
-				mt8188-geralt-ciri-sku2.dtbo
+				mt8188-geralt-ciri-audio-max98390-es8326.dtbo
 mt8188-geralt-ciri-sku3-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-ivo.dtbo \
-				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo \
-				mt8188-geralt-ciri-sku3.dtbo
+				mt8188-geralt-ciri-audio-max98390-rt5682s.dtbo
 mt8188-geralt-ciri-sku4-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-boe.dtbo \
-				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo \
-				mt8188-geralt-ciri-sku4.dtbo
+				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo
 mt8188-geralt-ciri-sku5-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-ivo.dtbo \
-				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo \
-				mt8188-geralt-ciri-sku5.dtbo
+				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo
 mt8188-geralt-ciri-sku6-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-boe.dtbo \
-				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo \
-				mt8188-geralt-ciri-sku6.dtbo
+				mt8188-geralt-ciri-audio-tas2563-es8326.dtbo
 mt8188-geralt-ciri-sku7-dtbs := mt8188-geralt-ciri.dtb \
 				mt8188-geralt-ciri-panel-ivo.dtbo \
-				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo \
-				mt8188-geralt-ciri-sku7.dtbo
+				mt8188-geralt-ciri-audio-tas2563-rt5682s.dtbo
 
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-geralt-ciri-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-geralt-ciri-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dtso deleted +0 -11
deleted file mode 100644
index 884a7b2d943c..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2023 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku0 board";
-	compatible = "google,ciri-sku0", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dtso deleted +0 -11
deleted file mode 100644
index d3ed6ea535d7..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2023 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku1 board";
-	compatible = "google,ciri-sku1", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dtso deleted +0 -11
deleted file mode 100644
index 3f9d38bc2ad2..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku2 board";
-	compatible = "google,ciri-sku2", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dtso deleted +0 -11
deleted file mode 100644
index e6a6f8f06141..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku3 board";
-	compatible = "google,ciri-sku3", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dtso deleted +0 -11
deleted file mode 100644
index ee5b28c4ef00..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku4 board (rev4)";
-	compatible = "google,ciri-sku4", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dtso deleted +0 -11
deleted file mode 100644
index ccf8d2f0eb70..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku5 board (rev4)";
-	compatible = "google,ciri-sku5", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dtso deleted +0 -11
deleted file mode 100644
index 773c702b59d8..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku6 board (rev4)";
-	compatible = "google,ciri-sku6", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dtso deleted +0 -11
deleted file mode 100644
index c22860eab9f8..000000000000
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright 2024 Google LLC
- */
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	model = "Google Ciri sku7 board (rev4)";
-	compatible = "google,ciri-sku7", "google,ciri", "mediatek,mt8188";
-};
arch/arm64/boot/dts/mediatek/mt8188.yaml new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog