[PATCH] net: ti: am65-cpsw-nuss: invoke phy_config() in driver's .start callback
Heiko Thiery
heiko.thiery at gmail.com
Mon Sep 8 13:06:01 CEST 2025
Hi,
Am Mo., 8. Sept. 2025 um 13:02 Uhr schrieb Siddharth Vadapalli
<s-vadapalli at ti.com>:
>
> On Mon, Sep 08, 2025 at 10:52:37AM +0200, Heiko Thiery wrote:
> > Hi Siddhardth,
> >
> > Am Mi., 16. Apr. 2025 um 14:57 Uhr schrieb Siddharth Vadapalli
> > <s-vadapalli at ti.com>:
> > >
> > > Currently, the phy_config() API is invoked by the driver only once since it
> > > has been probed. While this works in general, it doesn't allow the driver
> > > to bring the PHY back to its default reset state. As a result, the driver
> > > might not be able to recover the PHY from a bad state. To address this,
> > > move phy_config() into the driver's start callback (am65_cpsw_start()).
> > >
> > > Apart from providing the means to recover the PHY in the event of failure,
> > > the implementation is in line with the idea of "reset and configure" that
> > > is already followed by am65_cpsw_start() when it comes to programming the
> > > CPSW MAC.
> > >
> >
> > I do not know if this is the same issue here, but I see that in case
> > no cable is connected and I try to do a dhcp command the board/network
> > stack of a J722S EVM stays in a broken state. After plugging a cable
> > it is not possible to do a successful dhcp. It requires a reset to get
> > a working network again. Same issue can be reproduced when unterrupt a
> > running dhcp task with CTRL-C.
> >
> > ----
> > U-Boot 2025.07-rc3-g259a4765c26b (Sep 08 2025 - 10:44:20 +0200)
> >
> > SoC: J722S SR1.0 HS-FS
> > Model: Texas Instruments J722S EVM
> > DRAM: 2 GiB (total 8 GiB)
> > Core: 91 devices, 29 uclasses, devicetree: separate
> > MMC: mmc at fa10000: 0, mmc at fa00000: 1
> > Loading Environment from nowhere... OK
> > In: serial at 2800000
> > Out: serial at 2800000
> > Err: serial at 2800000
> > Net: eth0: ethernet at 8000000port@1
> > Hit any key to stop autoboot: 0
> > => dhcp
> > ethernet at 8000000port@1 Waiting for PHY auto negotiation to
> > complete......... TIMEOUT !
> > am65_cpsw_nuss_port ethernet at 8000000port@1: phy_startup failed
> > am65_cpsw_nuss_port ethernet at 8000000port@1: am65_cpsw_start end error
> > BOOTP broadcast 1
> >
> > ----
> >
> > Do you have an idea what is going on here?
>
> The following are some experiments that I performed along with the
> results:
> 1. Board: J784S4-EVM
> U-Boot: 2025.10-rc3 (latest)
> Results of the test:
> dhcp fails when the Ethernet cable is not connected. Connecting the
> cable and re-running the 'dhcp' command works. Reset is not required.
> 2. Board: J784S4-EVM
> U-Boot: 2025.07-rc3 (same as the one being used in above test logs)
> Results of the test:
> Identical to '1.'.
> 3. Board: J722S-EVM
> U-Boot: 2025.07-rc3 (same as the one being used in above test logs)
> Results of the test:
> Issue reported above is seen.
> 4. Board: J722S-EVM
> U-Boot: 2025.07-rc3 (same as the one being used in above test logs)
> + Revert commit corresponding to the current patch which is:
> https://github.com/u-boot/u-boot/commit/05dc050059d2
> Results of the test:
> Issue reported above is still seen.
> 5. Board: AM62P5-SK
> U-Boot: 2025.07-rc3 (same as the one being used in above test logs)
> + Revert commit corresponding to the current patch which is:
> https://github.com/u-boot/u-boot/commit/05dc050059d2
> Results of the test:
> Issue reported above is still seen.
>
> To summarize, the issue is unrelated to the current patch. Moreover,
> the issue is not seen on the J784S4-EVM. I will spend time trying to
> narrow down the root-cause of the issue.
Great, thank you!
> Regards,
> Siddharth.
More information about the U-Boot
mailing list