Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: mediatek: Remove undocumented, unapproved aliases
@ 2026-11-17 13:05 Krzysztof Kozlowski
  2026-11-17 13:19 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 13:05 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek
  Cc: Krzysztof Kozlowski

The ovl, aal, color, dsi, gce, rdma, split and other aliases were never
approved by Devicetree maintainers, because they were never documented
as actual ABI.  Drop them, because no new custom aliases are allowed for
years now.

This might break users of this undocumented ABI, so these should be
updated to use only documented and approved ABI.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 arch/arm64/boot/dts/mediatek/mt6795.dtsi      | 17 ----------
 arch/arm64/boot/dts/mediatek/mt8173.dtsi      | 16 ---------
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      |  5 ---
 arch/arm64/boot/dts/mediatek/mt8186.dtsi      |  7 ----
 .../boot/dts/mediatek/mt8188-geralt.dtsi      |  1 -
 arch/arm64/boot/dts/mediatek/mt8188.dtsi      | 33 -------------------
 arch/arm64/boot/dts/mediatek/mt8192.dtsi      |  8 -----
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 24 --------------
 arch/arm64/boot/dts/mediatek/mt8365.dtsi      | 13 --------
 .../dts/mediatek/mt8390-genio-common.dtsi     |  1 -
 .../dts/mediatek/mt8390-tungsten-smarc.dtsi   |  1 -
 11 files changed, 126 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 6dd706b27830..971fb19e95df 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -21,23 +21,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		ovl0 = &ovl0;
-		ovl1 = &ovl1;
-		rdma0 = &rdma0;
-		rdma1 = &rdma1;
-		rdma2 = &rdma2;
-		wdma0 = &wdma0;
-		wdma1 = &wdma1;
-		color0 = &color0;
-		color1 = &color1;
-		split0 = &split0;
-		split1 = &split1;
-		dpi0 = &dpi0;
-		dsi0 = &dsi0;
-		dsi1 = &dsi1;
-	};
-
 	psci {
 		compatible = "arm,psci-0.2";
 		method = "smc";
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 6ec50125cea0..868b0fb84449 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -22,22 +22,6 @@ / {
 	#size-cells = <2>;
 
 	aliases {
-		ovl0 = &ovl0;
-		ovl1 = &ovl1;
-		rdma0 = &rdma0;
-		rdma1 = &rdma1;
-		rdma2 = &rdma2;
-		wdma0 = &wdma0;
-		wdma1 = &wdma1;
-		color0 = &color0;
-		color1 = &color1;
-		split0 = &split0;
-		split1 = &split1;
-		dpi0 = &dpi0;
-		dsi0 = &dsi0;
-		dsi1 = &dsi1;
-		mdp-rdma0 = &mdp_rdma0;
-		mdp-rdma1 = &mdp_rdma1;
 		mdp-rsz0 = &mdp_rsz0;
 		mdp-rsz1 = &mdp_rsz1;
 		mdp-rsz2 = &mdp_rsz2;
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 7414c10ee664..2c3836555e55 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -35,11 +35,6 @@ aliases {
 		i2c9 = &i2c9;
 		i2c10 = &i2c10;
 		i2c11 = &i2c11;
-		ovl0 = &ovl0;
-		ovl-2l0 = &ovl_2l0;
-		ovl-2l1 = &ovl_2l1;
-		rdma0 = &rdma0;
-		rdma1 = &rdma1;
 	};
 
 	cluster0_opp: opp-table-cluster0 {
diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index 621408439ffa..2f82eb532f30 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -22,13 +22,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		ovl0 = &ovl0;
-		ovl-2l0 = &ovl_2l0;
-		rdma0 = &rdma0;
-		rdma1 = &rdma1;
-	};
-
 	fhctl: fhctl@1000ce00 {
 		compatible = "mediatek,mt8186-fhctl";
 		clocks = <&apmixedsys CLK_APMIXED_TVDPLL>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
index 801eee735afe..883141d8a6d5 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
@@ -9,7 +9,6 @@
 
 / {
 	aliases {
-		dsi0 = &disp_dsi0;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
 		i2c2 = &i2c2;
diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
index 14a320f0c70c..f14b23dd57aa 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
@@ -23,39 +23,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		dp-intf0 = &dp_intf0;
-		dp-intf1 = &dp_intf1;
-		dpi1 = &dpi1;
-		dsc0 = &dsc0;
-		ethdr0 = &ethdr0;
-		gce0 = &gce0;
-		gce1 = &gce1;
-		merge0 = &merge0;
-		merge1 = &merge1;
-		merge2 = &merge2;
-		merge3 = &merge3;
-		merge4 = &merge4;
-		merge5 = &merge5;
-		mutex0 = &mutex0;
-		mutex1 = &mutex1;
-		padding0 = &padding0;
-		padding1 = &padding1;
-		padding2 = &padding2;
-		padding3 = &padding3;
-		padding4 = &padding4;
-		padding5 = &padding5;
-		padding6 = &padding6;
-		padding7 = &padding7;
-		vdo1-rdma0 = &vdo1_rdma0;
-		vdo1-rdma1 = &vdo1_rdma1;
-		vdo1-rdma2 = &vdo1_rdma2;
-		vdo1-rdma3 = &vdo1_rdma3;
-		vdo1-rdma4 = &vdo1_rdma4;
-		vdo1-rdma5 = &vdo1_rdma5;
-		vdo1-rdma6 = &vdo1_rdma6;
-		vdo1-rdma7 = &vdo1_rdma7;
-	};
 
 	cpus {
 		#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
index 898953acdb61..bf5893e3002b 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
@@ -23,14 +23,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		ovl0 = &ovl0;
-		ovl-2l0 = &ovl_2l0;
-		ovl-2l2 = &ovl_2l2;
-		rdma0 = &rdma0;
-		rdma4 = &rdma4;
-	};
-
 	clk13m: fixed-factor-clock-13m {
 		compatible = "fixed-factor-clock";
 		#clock-cells = <0>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 9aaf8b6edcb5..389fb9d7ea89 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -23,30 +23,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		dp-intf0 = &dp_intf0;
-		dp-intf1 = &dp_intf1;
-		dpi1 = &dpi1;
-		gce0 = &gce0;
-		gce1 = &gce1;
-		hdmi0 = &hdmi;
-		ethdr0 = &ethdr0;
-		mutex0 = &mutex;
-		mutex1 = &mutex1;
-		merge1 = &merge1;
-		merge2 = &merge2;
-		merge3 = &merge3;
-		merge4 = &merge4;
-		merge5 = &merge5;
-		vdo1-rdma0 = &vdo1_rdma0;
-		vdo1-rdma1 = &vdo1_rdma1;
-		vdo1-rdma2 = &vdo1_rdma2;
-		vdo1-rdma3 = &vdo1_rdma3;
-		vdo1-rdma4 = &vdo1_rdma4;
-		vdo1-rdma5 = &vdo1_rdma5;
-		vdo1-rdma6 = &vdo1_rdma6;
-		vdo1-rdma7 = &vdo1_rdma7;
-	};
 
 	cpus {
 		#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 2e782558fb77..4b05f6a864d4 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -20,19 +20,6 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	aliases {
-		aal0 = &aal0;
-		ccorr0 = &ccorr0;
-		color0 = &color0;
-		dither0 = &dither0;
-		dpi0 = &dpi0;
-		dsi0 = &dsi0;
-		gamma0 = &gamma0;
-		ovl0 = &ovl0;
-		rdma0 = &rdma0;
-		rdma1 = &rdma1;
-	};
-
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index 669eaec662f3..a938539c92b8 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -21,7 +21,6 @@
 
 / {
 	aliases {
-		dsi0 = &disp_dsi0;
 		ethernet0 = &eth;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-tungsten-smarc.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-tungsten-smarc.dtsi
index f2ad9265be31..d70bed80274b 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-tungsten-smarc.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-tungsten-smarc.dtsi
@@ -16,7 +16,6 @@
 
 / {
 	aliases {
-		dsi0 = &disp_dsi0;
 		ethernet0 = &eth;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
-- 
2.53.0


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

* Re: [PATCH] arm64: dts: mediatek: Remove undocumented, unapproved aliases
  2026-11-17 13:05 [PATCH] arm64: dts: mediatek: Remove undocumented, unapproved aliases Krzysztof Kozlowski
@ 2026-11-17 13:19 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-17 13:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski, devicetree; +Cc: robh, conor+dt

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] arm64: dts: mediatek: removing gce aliases causes unclocked
  MMIO in cmdq_init()
- [High] arm64: dts: mediatek: removing ovl_adaptor aliases breaks
  ovl_adaptor_comp_init()
- [High] arm64: dts: mediatek: removing ddp and mutex aliases breaks
  mtk_drm_probe()
- [Low] arm64: dts: mediatek: mt8173: incomplete removal of undocumented
  mdp-* aliases
--

commit 0c6075438efac906bb8687313653fb8c36767eef
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

arm64: dts: mediatek: Remove undocumented, unapproved aliases

This commit removes undocumented display and mailbox device tree aliases from
several MediaTek SoC and board dtsi files.

[ ... ]

> diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> index 6ec50125cea02..868b0fb844499 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> @@ -22,22 +22,6 @@ / {
>  	#size-cells = <2>;
>  
>  	aliases {
> -		ovl0 = &ovl0;
> -		ovl1 = &ovl1;
> -		rdma0 = &rdma0;
> -		rdma1 = &rdma1;
> -		rdma2 = &rdma2;
> -		wdma0 = &wdma0;
> -		wdma1 = &wdma1;
> -		color0 = &color0;
> -		color1 = &color1;
> -		split0 = &split0;
> -		split1 = &split1;
> -		dpi0 = &dpi0;
> -		dsi0 = &dsi0;
> -		dsi1 = &dsi1;
> -		mdp-rdma0 = &mdp_rdma0;
> -		mdp-rdma1 = &mdp_rdma1;
>  		mdp-rsz0 = &mdp_rsz0;
>  		mdp-rsz1 = &mdp_rsz1;
>  		mdp-rsz2 = &mdp_rsz2;

[Severity: Low]
This isn't a bug, but should mdp-rsz0..2, mdp-wdma0, and mdp-wrot0..1 also be
dropped here?  Like mdp-rdma0 and mdp-rdma1, they are undocumented custom
aliases that are unused by drivers/media/platform/mediatek/mdp/.

[ ... ]

> diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
> index 14a320f0c70cb..f14b23dd57aa7 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
> @@ -23,39 +23,6 @@ / {
>  	#address-cells = <2>;
>  	#size-cells = <2>;
>  
> -	aliases {
> -		dp-intf0 = &dp_intf0;
> -		dp-intf1 = &dp_intf1;
> -		dpi1 = &dpi1;
> -		dsc0 = &dsc0;
> -		ethdr0 = &ethdr0;
> -		gce0 = &gce0;
> -		gce1 = &gce1;

[Severity: High]
Does removing gce0 and gce1 on MT8188 and MT8195 cause cmdq_init() to perform
MMIO writes with the GCE clocks disabled?

On both SoCs, cmdq->pdata->gce_num is 2, so cmdq_get_clocks() looks up the
clocks via the "gce" alias and silently skips nodes with a negative alias_id:

drivers/mailbox/mtk-cmdq-mailbox.c:cmdq_get_clocks() {
	...
	for_each_child_of_node_scoped(parent, node) {
		int alias_id = of_alias_get_id(node, gce_name);

		if (alias_id < 0 || alias_id >= cmdq->pdata->gce_num)
			continue;

		clks = &cmdq->clocks[alias_id];
	...
	return 0;
}

Without gce0 and gce1, cmdq_get_clocks() returns 0 with cmdq->clocks[].clk
left NULL.  clk_bulk_prepare() and clk_bulk_enable() then succeed as no-ops
before cmdq_init() and cmdq_runtime_resume() write to GCE registers, hanging
the bus or triggering an SError on boot.

> -		merge0 = &merge0;
> -		merge1 = &merge1;
> -		merge2 = &merge2;
> -		merge3 = &merge3;
> -		merge4 = &merge4;
> -		merge5 = &merge5;
> -		mutex0 = &mutex0;
> -		mutex1 = &mutex1;

[Severity: High]
Does removing the mutex and DDP component aliases break multi-instance
component matching and leak device_node references in mtk_drm_probe()?

In mtk_drm_probe(), MTK_DISP_MUTEX nodes are matched with:

drivers/gpu/drm/mediatek/mtk_drm_drv.c:mtk_drm_probe() {
	...
		if (comp_type == MTK_DISP_MUTEX) {
			int id;

			id = of_alias_get_id(node, "mutex");
			if (id < 0 || id == private->data->mmsys_id) {
				private->mutex_node = of_node_get(node);
	...
}

When mutex0 and mutex1 are removed on MT8188 and MT8195, id is -ENODEV for
both sibling mutex nodes, so VDOSYS0 (mmsys_id 0) matches mutex0 and then
overwrites private->mutex_node with mutex1, binding VDOSYS0 to VDOSYS1's
hardware disp-mutex and leaking mutex0's OF node reference.

Similarly, mtk_ddp_comp_get_id() accepts id < 0 as matching the first entry
of that component type in mtk_ddp_matches[]:

drivers/gpu/drm/mediatek/mtk_ddp_comp.c:mtk_ddp_comp_get_id() {
	int id = of_alias_get_id(node, mtk_ddp_comp_stem[comp_type]);
	int i;

	for (i = 0; i < ARRAY_SIZE(mtk_ddp_matches); i++) {
		if (comp_type == mtk_ddp_matches[i].type &&
		    (id < 0 || id == mtk_ddp_matches[i].alias_id))
			return i;
	}
	...
}

Without the DDP aliases (ovl*, ovl-2l*, rdma*, color*, dpi*, dsi*, dp-intf*,
merge*, etc.), secondary component instances collapse onto instance 0's
comp_id, overwriting private->comp_node[comp_id] (leaking the prior
device_node reference) and private->ddp_comp[comp_id] while leaving their own
component slots unpopulated.

> -		padding0 = &padding0;
> -		padding1 = &padding1;
> -		padding2 = &padding2;
> -		padding3 = &padding3;
> -		padding4 = &padding4;
> -		padding5 = &padding5;
> -		padding6 = &padding6;
> -		padding7 = &padding7;
> -		vdo1-rdma0 = &vdo1_rdma0;
> -		vdo1-rdma1 = &vdo1_rdma1;
> -		vdo1-rdma2 = &vdo1_rdma2;
> -		vdo1-rdma3 = &vdo1_rdma3;
> -		vdo1-rdma4 = &vdo1_rdma4;
> -		vdo1-rdma5 = &vdo1_rdma5;
> -		vdo1-rdma6 = &vdo1_rdma6;
> -		vdo1-rdma7 = &vdo1_rdma7;
> -	};

[Severity: High]
Does removing the ethdr, merge, padding, and vdo1-rdma aliases break probing
of mediatek-disp-ovl-adaptor on MT8188 and MT8195?

ovl_adaptor_comp_get_id() requires a non-negative alias ID matching
comp_matches[]:

drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c:ovl_adaptor_comp_get_id() {
	int alias_id = of_alias_get_id(node, private_comp_stem[type]);
	int i;

	for (i = 0; i < ARRAY_SIZE(comp_matches); i++)
		if (comp_matches[i].type == type &&
		    comp_matches[i].alias_id == alias_id)
			return i;

	dev_warn(dev, "Failed to get id. type: %d, alias: %d\n", type, alias_id);
	return -EINVAL;
}

When those aliases are removed, of_alias_get_id() returns -ENODEV for every
sub-component, causing ovl_adaptor_comp_init() to skip all children and fail
probe with -ENODEV.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117130556.234785-2-krzysztof.kozlowski@oss.qualcomm.com?part=1

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

end of thread, other threads:[~2026-11-17 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 13:05 [PATCH] arm64: dts: mediatek: Remove undocumented, unapproved aliases Krzysztof Kozlowski
2026-11-17 13:19 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox