From 5a4bfe38775ad5febf9b9fc58f0432f786a3d5d5 Mon Sep 17 00:00:00 2001 From: Siddharth Vadapalli Date: Thu, 24 Jul 2025 19:45:36 +0530 Subject: 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 Acked-by: Jerome Forissier [jf: add missing #include ] Signed-off-by: Jerome Forissier --- doc/usage/environment.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/usage') diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst index bb6c351b441..77197d79380 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -335,6 +335,15 @@ netretry Useful on scripts which control the retry operation themselves. +phy_aneg_timeout + If set, the specified value will override CONFIG_PHY_ANEG_TIMEOUT. + This variable has the same base and unit as CONFIG_PHY_ANEG_TIMEOUT + which is "decimal" and "millisecond" respectively. The default value + of CONFIG_PHY_ANEG_TIMEOUT may be sufficient for most use-cases, but + certain link-partners may require a larger timeout due to the Ethernet + PHY they use. Alternatively, the timeout can be reduced as well if the + use-case demands it. + rng_seed_size Size of random value added to device-tree node /chosen/rng-seed. This variable is given as a decimal number. -- cgit v1.3.1