On Sun, Sep 06, 2026 at 10:19:46AM +0200, Markus Stockhausen wrote:
The ethernet MDIO controller of the Realtek Otto switches has a default
MDC clock frequency of 2.5MHz. Via configuration bits one can adapt this.
Depending on the series the following can be set
- RTL838x: 2.5 Mhz, 10 MHz
- RTL839x, RTL930x, RTL931x: 1.25 MHz, 2.5 MHz, 5 Mhz
Enhance the driver so it allows to set the clock frequency via device
tree. This helps to
- simplify protocol analysis with a logic analyzer (lower speeds)
- reduce MDIO access times during normal operation (higher speeds)
Note: While the devices normally support a per-bus frequency selection,
the RTL839x is an exception from that. It can only select the speed for
both buses globally. To avoid device tree special treatment for this,
use the per-bus speeds for this series too. Return an error if the
RTL839x Devicetree specifies different frequencies for the first and
second bus.
Signed-off-by: Markus Stockhausen <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew