Re: [PATCH 0/6] arm64: dts: imx: Move Ethernet aliases out of SoC DTSI

Krzysztof Kozlowski
2025-04-29T14:49:42Z

On 29/04/2025 11:39, Lucas Stach wrote:
> Hi Krzysztof,
>
> Am Freitag, dem 25.04.2025 um 21:48 +0200 schrieb Krzysztof Kozlowski:
>> Not tested on hardware.
>>
>> Ethernet interface, like other exposed interfaces, aliases depend on
>> actual board configuration, e.g. its labeling, thus aliases should be
>> defined per each board or each SoM.
>>
>> Some boards (e.g. Gateworks) follow this convention but many do not.
>>
>> This is continuation of my comments from:
>> https://lore.kernel.org/r/16a98816-f43c-4f4d-940e-9da30cb1f73f@kernel.org
>>
> The i.MX boards have traditionally listed aliases for many hardware
> peripherals with the same numbering that's used in the SoC reference

... which is not correct. Aliases should represent how boards are really
labeled, not how reference manual labels them.

> manual. Boards always have the option to override those aliases if they
> have a good reason to do so, e.g. labeling on the physical device.
>
> Other users besides Linux rely on fixed numbering provided by the
> aliases. Both barebox and U-Boot number their ethernet interfaces
> according to the alias.

And?

>
> While you seem to add back aliases for in-tree boards, this breaks the
> majority of boards that include the kernel DTSI from an out-of-tree
> board. I can understand that we can't always accommodate these users,

This is not ABI, so every out of tree user is on their own.

> but I simply don't see the strong benefit of this patch to justify
> creating churn and possible regressions with those OOT users.

They should mainline their code.

It is not only a "churn", but way to stop people from repeating the same
mistake. Every time you bring new soc, people will copy old code thus
this will never change.

>
> Having those aliases in the DTSI has been common practice on the i.MX
> platform since 2012, long before there was any strong consensus on how

Many previous practices were poor practices and decent SoC platforms
fixed and changed it.

We made big cleanups - since ~2 years Samsung is warning free. Since
similar time all Qcom boards use phandle/label override. All of them
were significant effort and quite a shuffling of code. Such effort is
necessary if you want to code to be maintainable and in best shape for
future development.

Unless you claim NXP SoCs are a legacy platform and we should not do
such cleanups.

> those aliases should be used. Breaking existing users for the sake of
> aligning the i.MX platform with more idiomatic DT usage does not seem
> to be a worthwhile trade-off to me.

No existing users are broken. Everyone who decided to stay out of tree
is on their own, but this was their choice. We are not talking here
about ABI.

Best regards,
Krzysztof