Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes

From: Krzysztof Kozlowski

Date: Tue Nov 17 2026 - 11:00:41 EST


On 17/11/2026 15:21, AngeloGioacchino Del Regno wrote:
>
>>>
>>> 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.

Well, adding an alias just to tell that device node with MMIO address
0xdeadbeef is ID 0 is very similar, just placed differently. The
"aliases" are the mapping between MMIO and ID. Driver code also can do
the mapping between MMIO and ID.

>
> >
>> 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.

Being simply "second" is not alone useful information. It's pointless,
it does not matter neither to hardware nor to drivers. If it matters,
then probably that "second" has some other meaning and it maps to an
actual hardware topology difference, then often it deserves its own
compatible or property, depending on the difference.

>
> >
>> 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.

Then alias is not the way to represent these differences.

>
>> 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).

Sure, I understand. This is an workaround and might be less applicable
here. It might be possible that your hardware needs a dedicated
property. Unfortunately, this cannot be a custom per-device alias.

Best regards,
Krzysztof