]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: phy: Support overriding Auto Negotiation timeout with env variable
authorSiddharth Vadapalli <s-vadapalli@ti.com>
Thu, 24 Jul 2025 14:15:36 +0000 (19:45 +0530)
committerJerome Forissier <jerome.forissier@linaro.org>
Fri, 1 Aug 2025 08:42:22 +0000 (10:42 +0200)
commit5a4bfe38775ad5febf9b9fc58f0432f786a3d5d5
tree6626291977868f30252cc772aa9736fab80b6d8d
parent71056afe2094b5a6fad4a2dd940252d1def55e7e
net: phy: Support overriding Auto Negotiation timeout with env variable

The Auto Negotiation procedure between two Ethernet PHYs consists of
determining the best commonly supported parameters among Speed,
Duplex Mode and Flow Control.

The time taken for this procedure is not only dependent on the local
PHY used, but also on the link-partner PHY.

While a timeout can be specified in the form of a "CONFIG" on the basis
of the local PHY present on the device, since the timeout also depends
on the link-partner PHY, it might be necessary to modify the timeout.

To avoid rebuilding the bootloader for a given device, just because it
may be connected to various link-partner PHYs, each with a different
timeout, introduce an environment variable named "phy_aneg_timeout" and
override "CONFIG_PHY_ANEG_TIMEOUT" with "phy_aneg_timeout".

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
[jf: add missing #include <env.h>]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
doc/usage/environment.rst
drivers/net/phy/Kconfig
drivers/net/phy/aquantia.c
drivers/net/phy/phy.c
drivers/net/xilinx_axi_emac.c