[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <baf9c0c0-5960-437e-b725-c58c9f0a5580@lunn.ch>
Date: Tue, 3 Dec 2024 21:29:28 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Andrew Lunn <andrew+netdev@...n.ch>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com, Phil Elwell <phil@...pberrypi.org>
Subject: Re: [PATCH net-next v1 02/21] net: usb: lan78xx: Remove KSZ9031 PHY
fixup
On Tue, Dec 03, 2024 at 08:21:35AM +0100, Oleksij Rempel wrote:
> Remove the KSZ9031RNX PHY fixup from the lan78xx driver. The fixup applied
> specific RGMII pad skew configurations globally, but these settings violate the
> RGMII specification and cause more harm than benefit.
>
> Key issues with the fixup:
> 1. **Non-Compliant Timing**: The fixup's delay settings fall outside the RGMII
> specification requirements of 1.5 ns to 2.0 ns:
> - RX Path: Total delay of **2.16 ns** (PHY internal delay of 1.2 ns + 0.96
> ns skew).
> - TX Path: Total delay of **0.96 ns**, significantly below the RGMII minimum
> of 1.5 ns.
>
> 2. **Redundant or Incorrect Configurations**:
> - The RGMII skew registers written by the fixup do not meaningfully alter
> the PHY's default behavior and fail to account for its internal delays.
> - The TX_DATA pad skew was not configured, relying on power-on defaults
> that are insufficient for RGMII compliance.
>
> 3. **Micrel Driver Support**: By setting `PHY_INTERFACE_MODE_RGMII_ID`, the
> Micrel driver can calculate and assign appropriate skew values for the
> KSZ9031 PHY. This ensures better timing configurations without relying on
> external fixups.
>
> 4. **System Interference**: The fixup applied globally, reconfiguring all
> KSZ9031 PHYs in the system, even those unrelated to the LAN78xx adapter.
> This could lead to unintended and harmful behavior on unrelated interfaces.
>
> While the fixup is removed, a better mechanism is still needed to dynamically
> determine the optimal combination of PHY and MAC delays to fully meet RGMII
> requirements without relying on Device Tree or global fixups. This would allow
> for robust operation across different hardware configurations.
>
> The Micrel driver is capable of using the interface mode value to calculate and
> apply better skew values, providing a configuration much closer to the RGMII
> specification than the fixup. Removing the fixup ensures better default
> behavior and prevents harm to other system interfaces.
PHY_INTERFACE_MODE_RGMII_ID should be good enough for most
hardware. It seems like USB dongle developers don't really understand
phylib.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists