arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi | 2 ++ arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 1 + arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 2 -- arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-emcon.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-innocomm-wb15-evk.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-kontron-bl-osm-s.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-phg.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mm-ucm-som.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts | 1 + arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-verdin-ivy.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-verdin-mallow.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 - arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 1 + arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 - arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-kontron-pitx-imx8m.dts | 1 + arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-thor96.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 - arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 5 +++++ arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dts | 1 + arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 -- arch/arm64/boot/dts/freescale/imx8x-colibri-aster.dtsi | 6 ++++++ arch/arm64/boot/dts/freescale/imx8x-colibri-eval-v3.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8x-colibri-iris.dtsi | 1 + arch/arm64/boot/dts/freescale/mba8mx.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/mba8xx.dtsi | 2 ++ 56 files changed, 143 insertions(+), 7 deletions(-)
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
Best regards,
Krzysztof
---
Krzysztof Kozlowski (6):
arm64: dts: imx8qxp: Move Ethernet aliases out of SoC DTSI
arm64: dts: imx8dxl: Move Ethernet aliases out of SoC DTSI
arm64: dts: imx8mm: Move Ethernet aliases out of SoC DTSI
arm64: dts: imx8mn: Move Ethernet aliases out of SoC DTSI
arm64: dts: imx8mq: Move Ethernet aliases out of SoC DTSI
arm64: dts: imx8qm: Add Ethernet aliases
arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi | 2 ++
arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 1 +
arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 2 --
arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-emcon.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-innocomm-wb15-evk.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-kontron-bl-osm-s.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-phg.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mm-ucm-som.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-verdin-ivy.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-verdin-mallow.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 -
arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 -
arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-kontron-pitx-imx8m.dts | 1 +
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-thor96.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 -
arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 5 +++++
arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dts | 1 +
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 --
arch/arm64/boot/dts/freescale/imx8x-colibri-aster.dtsi | 6 ++++++
arch/arm64/boot/dts/freescale/imx8x-colibri-eval-v3.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx8x-colibri-iris.dtsi | 1 +
arch/arm64/boot/dts/freescale/mba8mx.dtsi | 4 ++++
arch/arm64/boot/dts/freescale/mba8xx.dtsi | 2 ++
56 files changed, 143 insertions(+), 7 deletions(-)
---
base-commit: 393d0c54cae31317deaa9043320c5fd9454deabc
change-id: 20250425-dts-imx-aliases-ethernet-37d8552939de
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
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 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. 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, but I simply don't see the strong benefit of this patch to justify creating churn and possible regressions with those OOT users. 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 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. Regards, Lucas > Best regards, > Krzysztof > > --- > Krzysztof Kozlowski (6): > arm64: dts: imx8qxp: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8dxl: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mm: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mn: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mq: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8qm: Add Ethernet aliases > > arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi | 2 ++ > arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 1 + > arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 2 -- > arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-emcon.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-innocomm-wb15-evk.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-kontron-bl-osm-s.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-phg.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mm-ucm-som.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-verdin-ivy.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-verdin-mallow.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 - > arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 - > arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-kontron-pitx-imx8m.dts | 1 + > arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-thor96.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 - > arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 5 +++++ > arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dts | 1 + > arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 ++++ > arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 -- > arch/arm64/boot/dts/freescale/imx8x-colibri-aster.dtsi | 6 ++++++ > arch/arm64/boot/dts/freescale/imx8x-colibri-eval-v3.dtsi | 1 + > arch/arm64/boot/dts/freescale/imx8x-colibri-iris.dtsi | 1 + > arch/arm64/boot/dts/freescale/mba8mx.dtsi | 4 ++++ > arch/arm64/boot/dts/freescale/mba8xx.dtsi | 2 ++ > 56 files changed, 143 insertions(+), 7 deletions(-) > --- > base-commit: 393d0c54cae31317deaa9043320c5fd9454deabc > change-id: 20250425-dts-imx-aliases-ethernet-37d8552939de > > Best regards,
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
Am Dienstag, dem 29.04.2025 um 16:30 +0200 schrieb Krzysztof Kozlowski: > 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. > While that is the commonly agreed interpretation today, I do not see any language in the DT spec itself or kernel Documentation/devicetree that would mandate aliases to be used in this way. In fact there are examples to the contrary like Documentation/devicetree/bindings/serial/samsung_uart.yaml which says: "Each Samsung UART should have an alias [...] as specified by User's Manual of respective SoC." So I would argue that there is no hard line between correct/incorrect for the historical usage of the alias nodes on the i.MX platform. > > 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? > Some usecases depend on the aliases being the same between kernel and bootloader. Historically that has been guaranteed on the i.MX platform by the aliases in the SoC DTSI, when the board didn't have a need to change them. With this series applied some other users may now end up with missing aliases if the only include the DTSI. > > > > 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. I am not too sympathetic about out-of-tree users myself, but I don't think we should make their life harder deliberately. > > > 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. > In this specific case I don't see a need to change the existing code. If new SoCs should change the alias use, this is something that can be implemented on the SoC maintainer level. No need to introduce churn on the existing platforms to enforce a new rule for newly introduced SoCs. > > > > 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. > As I don't see the current usage as objectively wrong, I don't see the need to do this cleanup/rework to the existing SoC DTSIs. > > 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. Yes, there is no formal ABI guarantee with this anywhere, so we can break out-of-tree user when needed. However, I don't think the improvements in this patchset justify such breakage. Regards, Lucas
On 29/04/2025 17:13, Lucas Stach wrote: > Am Dienstag, dem 29.04.2025 um 16:30 +0200 schrieb Krzysztof Kozlowski: >> 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. >> > While that is the commonly agreed interpretation today, I do not see > any language in the DT spec itself or kernel Documentation/devicetree > that would mandate aliases to be used in this way. > > In fact there are examples to the contrary like > Documentation/devicetree/bindings/serial/samsung_uart.yaml which says: > "Each Samsung UART should have an alias [...] as specified by User's > Manual of respective SoC." And that is an ABI. Did I affect ABI here? > > So I would argue that there is no hard line between correct/incorrect > for the historical usage of the alias nodes on the i.MX platform. There is. ABI is documented. There are things which turn out ABI, even though they are not documented, like node names. Was there a problem with refactoring these in NXP? No. > >>> 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? >> > Some usecases depend on the aliases being the same between kernel and > bootloader. Historically that has been guaranteed on the i.MX platform > by the aliases in the SoC DTSI, when the board didn't have a need to I know. > change them. With this series applied some other users may now end up > with missing aliases if the only include the DTSI. Bring actual case, what is broken by this changeset. > >>> >>> 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. > > I am not too sympathetic about out-of-tree users myself, but I don't > think we should make their life harder deliberately. We are making our life easier by maintaining and improving source code: e.g. not creating fake aliases for devices which do not exist on given board. Best regards, Krzysztof
Am Dienstag, dem 29.04.2025 um 17:17 +0200 schrieb Krzysztof Kozlowski: > On 29/04/2025 17:13, Lucas Stach wrote: > > Am Dienstag, dem 29.04.2025 um 16:30 +0200 schrieb Krzysztof Kozlowski: > > > 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. > > > > > While that is the commonly agreed interpretation today, I do not see > > any language in the DT spec itself or kernel Documentation/devicetree > > that would mandate aliases to be used in this way. > > > > In fact there are examples to the contrary like > > Documentation/devicetree/bindings/serial/samsung_uart.yaml which says: > > "Each Samsung UART should have an alias [...] as specified by User's > > Manual of respective SoC." > > And that is an ABI. Did I affect ABI here? > > > > > So I would argue that there is no hard line between correct/incorrect > > for the historical usage of the alias nodes on the i.MX platform. > > There is. ABI is documented. There are things which turn out ABI, even > though they are not documented, like node names. Was there a problem > with refactoring these in NXP? > > No. > In fact there was significant fallout from the node name changes, as assumptions in bootloader code on how to fix up DTs passed to the kernel were invalidated. We did not make a fuzz about those cases and just fixed the breakage in the bootloader, because we agreed with the overall benefit of those changes to the i.MX ecosystem. > > > > > > > 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? > > > > > Some usecases depend on the aliases being the same between kernel and > > bootloader. Historically that has been guaranteed on the i.MX platform > > by the aliases in the SoC DTSI, when the board didn't have a need to > > I know. > > > change them. With this series applied some other users may now end up > > with missing aliases if the only include the DTSI. > > Bring actual case, what is broken by this changeset. > > > > > > > > > > > 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. > > > > I am not too sympathetic about out-of-tree users myself, but I don't > > think we should make their life harder deliberately. > > We are making our life easier by maintaining and improving source code: > e.g. not creating fake aliases for devices which do not exist on given > board. Sorry, I disagree with this sweeping statement when looking at the specific changes in this patchset. I simply do not see how this change significantly improves future maintenance of existing DTs for the i.MX platform to justify the breakage inflicted upon existing OOT users. I'm not the one to decide whether or not to take those patches, but IMHO the overall benefit of those patches to the i.MX ecosystem is not a net positive. Regards, Lucas
Hello, On Tue, Apr 29, 2025 at 11:39:20AM +0200, Lucas Stach wrote: > Am Freitag, dem 25.04.2025 um 21:48 +0200 schrieb Krzysztof Kozlowski: > > 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. > > > 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. FWIW, I agree with Lucas. Francesco
On Fri, Apr 25, 2025 at 09:48:23PM +0200, Krzysztof Kozlowski wrote: >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 > >Best regards, >Krzysztof > >--- >Krzysztof Kozlowski (6): > arm64: dts: imx8qxp: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8dxl: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mm: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mn: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8mq: Move Ethernet aliases out of SoC DTSI > arm64: dts: imx8qm: Add Ethernet aliases > For the patchset: Reviewed-by: Peng Fan <peng.fan@nxp.com>
© 2016 - 2026 Red Hat, Inc.