modify live DT with OF_LIVE breaking phy_connect?

Simon Glass sjg at chromium.org
Wed Oct 9 03:56:41 CEST 2024


Hi Tim,

On Mon, 7 Oct 2024 at 14:16, Tim Harvey <tharvey at gateworks.com> wrote:
>
> Greetings,
>
> I have a need to adjust the U-Boot device-tree live with some board
> revision specific fixups. It would seem I need to enable OF_LIVE to do
> so but when I do this on imx8mm U-Boot proper seems to fail
> phy_connect() called from the network device probe.
>
> The board I'm working with is an imx8mm-venice board and using
> imx8mm_venice_defconfig (without OF_LIVE) results in:
> U-Boot 2024.10-00735-gc530f6079c70 (Oct 07 2024 - 12:58:38 -0700)
>
> CPU:   Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
> CPU:   Industrial temperature grade (-40C to 105C) at 44C
> Reset cause: POR
> Model: Gateworks Venice GW73xx-0x i.MX8MM Development Kit
> DRAM:  4 GiB
> Core:  226 devices, 32 uclasses, devicetree: separate
> WDT:   Started watchdog at 30280000 with servicing every 1000ms (60s timeout)
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... Reading from redundant MMC(2)... OK
> In:    serial at 30890000
> Out:   serial at 30890000
> Err:   serial at 30890000
> SEC0:  RNG instantiated
> Net:   GPY111 eth0: ethernet at 30be0000 [PRIME]
> GSC     : boot watchdog disabled
> Thermal protection:enabled at 96C
> Hit any key to stop autoboot:  0
>
> Yet as soon as I enable OF_LIVE:
>
> U-Boot 2024.10-00735-gc530f6079c70 (Oct 07 2024 - 12:59:35 -0700)
>
> CPU:   Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
> CPU:   Industrial temperature grade (-40C to 105C) at 49C
> Reset cause: POR
> Model: Gateworks Venice GW73xx-0x i.MX8MM Development Kit
> DRAM:  4 GiB
> Core:  214 devices, 32 uclasses, devicetree: separate
> WDT:   Started watchdog at 30280000 with servicing every 1000ms (60s timeout)
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... Reading from redundant MMC(2)... OK
> In:    serial at 30890000
> Out:   serial at 30890000
> Err:   serial at 30890000
> SEC0:  RNG instantiated
> Net:   Could not get PHY for mdio: addr 0
> Could not get PHY for FEC0: addr 0
> Could not get PHY for mdio: addr 0
> Could not get PHY for FEC0: addr 0
> No ethernet found.
> ^^^ phy_connect failing
>
> Any idea what I'm missing here?
>
> Are there other ways I should be modifying the live dt in U-Boot?

I am not sure, but the best option would be to debug the PHY stuff and
try to see what is going wrong.

Since the number of devices is smaller, I suspect that there is some
code which doesn't use the ofnode API. But it is hard to say what is
going on.

For modifying the devicetree, you can do it just before relocation
using the flattree if you like. The reason livetree is better is that
the nodes don't move around when changes are made.

Regards,
Simon


More information about the U-Boot mailing list