Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
From: AngeloGioacchino Del Regno
Date: Tue Nov 17 2026 - 09:21:44 EST
On 11/17/26 14:12, Krzysztof Kozlowski wrote:
On 17/11/2026 14:00, AngeloGioacchino Del Regno wrote:
On 11/17/26 13:55, Krzysztof Kozlowski wrote:
On 17/11/2026 13:53, AngeloGioacchino Del Regno wrote:
On 11/17/26 13:35, Krzysztof Kozlowski wrote:
On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@xxxxxxxxx>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
---
arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
1 file changed, 369 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
index 27cf32d7ae35..a50bae4307c1 100644
--- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
@@ -16,6 +16,22 @@
/ {
compatible = "mediatek,mt8167";
+ aliases {
+ aal0 = &aal;
+ ccorr0 = &ccorr;
+ color0 = &color;
+ dither0 = &dither;
+ dpi0 = &dpi0;
+ dpi1 = &dpi1;
+ dsi0 = &dsi;
+ gamma0 = γ
+ ovl0 = &ovl0;
+ pwm0 = &disp_pwm;
+ rdma0 = &rdma0;
+ rdma1 = &rdma1;
+ wdma0 = &wdma;
Folks, what is happening here? Why Mediatek is adding bunch of
undocumented aliases? This should have never been accepted to Mediatek SoC.
It's always been like this on MediaTek from day 1, what's up with that!?
I wrote what is wrong - they are undocumented. You were never allowed to
add undocumented ABI, never. Even 10 years ago.
Well, that's right.
I don't know what is day 1 in this context, but for a few (5-8 years?)
we do not allow more custom aliases. Neither new DTS users of these.
That actually poses a severe issue, as mediatek-drm relies on aliases to find out
the instance number of the display controller components, on all SoCs.
If someone sent these for DT maintainers review, we would provide review
telling they are not allowed and you need to use other methods. The
problem is that someone sneaked undocumented ABI.
Instance IDs are not allowed in DT - neither as aliases nor as properties.
Okay.
If the graph topology or phandles do not point to proper relation
between components, then the recommended way I know (happy to learn more
myself) is to map instances to IDs in the drivers. For example
Qualcomm/MSM is doing that.
They do point to proper relation between components, but connecting one IP to
another is one thing, knowing the fixed hardware instance number (so how many of
those hardware IPs are there, and which one is that exact one) is another.
Any advice on how to possibly resolve this without rewriting the entire thing?
Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
Driver needs that, so why exactly stupid?
Really feels like going back to the days when devicetree was not a thing and all of
the MMIOs (on ARM at least) were added into a mach file.
>
You do not represent any
actual hardware information in DT with these aliases.
That depends on how you see it (as in, on the point of view), really, because well
technically the second ReadDMA IP is ... not the ... primary, as it's the secondary
one - as much as the third DPI is not the primary one (even though DRM can make it
so that it can be used as a primary output, but that's a software thing, not HW).
So... well, with that point of view... those aliases *are* representing information
about the hardware.
But I know that you're not complaining just about this, and this reply is not a way
to argue all that much, just a bit of thinking out loud.
>
You want to tell
drivers how drivers should behave - that's not a job for DT,
I want to tell drivers what is the first or the second or the third hardware
instance of the same IP, I don't want to tell drivers how drivers should behave
from devicetree.
The drivers are behaving differently with different hardware (read as: hardware
that is *physically* located in front of something else, or somewhere else anyway)
as in with different hardware instances.
that's job
for driver data. Of course if there is smarter way than MMIO->ID, I am
all in.
You can't imagine how much I was hoping for you to say something about an
alternative solution to that.
As I said, it feels a bit like pre-DT times, but what I get from you is that this
is cleaner than just adding information about the real hardware instance number in
devicetree (no that's not just MediaTek, qcom also had similar issues as you said).
Cheers,
Angelo