Re: [PATCH] mx6cuboxi: fix ethernet after synchronise device-tree

On Thu, Jul 28, 2022 at 10:05:40AM +0300, Josua Mayer wrote:
The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying addresses. U-Boot needs to auto-detect which phy is actually present, and at which address it is responding.
Auto-detection from multiple phy nodes specified in device-tree does not currently work correct. As a work-around merge all three possible phys into one node with the special address 0xffffffff which indicates to the generic phy driver to probe all addresses. Also fixup this fake address before booting Linux, *if* booting with U-Boot's internal dtb.
Signed-off-by: Josua Mayer josua@solid-run.com Fixes: d0399a46e7cd
Tested-by: Tom Rini trini@konsulko.com

Hi Tom,
On Thu, Jul 28, 2022 at 8:41 AM Tom Rini trini@konsulko.com wrote:
On Thu, Jul 28, 2022 at 10:05:40AM +0300, Josua Mayer wrote:
The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying addresses. U-Boot needs to auto-detect which phy is actually present, and at which address it is responding.
Auto-detection from multiple phy nodes specified in device-tree does not currently work correct. As a work-around merge all three possible phys into one node with the special address 0xffffffff which indicates to the generic phy driver to probe all addresses. Also fixup this fake address before booting Linux, *if* booting with U-Boot's internal dtb.
Signed-off-by: Josua Mayer josua@solid-run.com Fixes: d0399a46e7cd
Tested-by: Tom Rini trini@konsulko.com
It's great that it worked, but if we take the patch as-is, then we will run into issues again in the future when a new re-sync is done.
I see two alternatives:
1. Make the arch/arm/dts/imx6qdl-sr-som.dtsi changes into arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi, so that the main dtsi can still be used from Linux.
2. Make the same dtsi work for both Linux and U-Boot.
What do you think?

On Thu, Jul 28, 2022 at 08:51:01AM -0300, Fabio Estevam wrote:
Hi Tom,
On Thu, Jul 28, 2022 at 8:41 AM Tom Rini trini@konsulko.com wrote:
On Thu, Jul 28, 2022 at 10:05:40AM +0300, Josua Mayer wrote:
The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying addresses. U-Boot needs to auto-detect which phy is actually present, and at which address it is responding.
Auto-detection from multiple phy nodes specified in device-tree does not currently work correct. As a work-around merge all three possible phys into one node with the special address 0xffffffff which indicates to the generic phy driver to probe all addresses. Also fixup this fake address before booting Linux, *if* booting with U-Boot's internal dtb.
Signed-off-by: Josua Mayer josua@solid-run.com Fixes: d0399a46e7cd
Tested-by: Tom Rini trini@konsulko.com
It's great that it worked, but if we take the patch as-is, then we will run into issues again in the future when a new re-sync is done.
Agreed.
I see two alternatives:
- Make the arch/arm/dts/imx6qdl-sr-som.dtsi changes into
arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi, so that the main dtsi can still be used from Linux.
- Make the same dtsi work for both Linux and U-Boot.
What do you think?
If we can make #2 work that would be the best path forward I hope.
participants (2)
-
Fabio Estevam
-
Tom Rini