[PATCH net-next v2 0/3] Add Cortina Systems CS7542 MDIO controller support
From: Fil Dunsky via B4 Relay
Date: Mon Nov 23 2026 - 15:41:08 EST
Add the Clause 22 MDIO controller used by the CS7542 network engine.
The driver retains the MDC prescaler initialized by platform firmware and
uses bounded polling for each transaction. It is independent of the
pending Cortina platform series and COMPILE_TEST.
V2 follows Andrew Lunn's review: remove the pending-frame state and keep
one straightforward transaction/poll per read or write. No timeout was
observed at the normal firmware-selected MDC rate. The timeout mentioned
in v1 validation was deliberately induced only in a RAM test by slowing
the prescaler; it was not evidence of a normal bus failure. No clock-loss
recovery guarantee is provided by this driver.
Validation:
- Full independent ARM vmlinux/modules builds with driver=y and=m,
COMPILE_TEST=n, without the platform series.
- Actual driver read/write/wait functions: 5125 address, data and timeout
cases under UBSan, including no data read after timeout.
- Binding and strict driver checks; b4 dependency/preflight checks.
V2 booted Linux 7.4 in RAM on Almond+: PHY IDs 004d:d036, the firmware
prescaler 00200001, and same-value advertisement write/readback passed.
A deliberately slowed MDC produced ETIMEDOUT at about 14ms; restoring the
prescaler returned the correct IDs. Final RAM result: failures=0 and
automatic return to installed OpenWrt. No NAND driver was loaded and no
flash writes were performed.
---
Changes in v2:
- Drop the pending-frame state as requested by Andrew Lunn.
- Sort Kconfig by prompt after MDIO_CAVIUM and sort the Makefile entry.
- Add Andrew's Reviewed-by to the MAINTAINERS patch only.
- Link to v1: https://patch.msgid.link/20261123-b4-cs7542-mdio-v1-0-626d0a0e3b4d@xxxxxxxxx
To: Fil Dunsky <filipp.dunsky@xxxxxxxxx>
To: Andrew Lunn <andrew+netdev@xxxxxxx>
To: "David S. Miller" <davem@xxxxxxxxxxxxx>
To: Eric Dumazet <edumazet@xxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
To: Paolo Abeni <pabeni@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Andrew Lunn <andrew@xxxxxxx>
To: Heiner Kallweit <hkallweit1@xxxxxxxxx>
To: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
Fil Dunsky (3):
dt-bindings: net: Add Cortina CS7542 MDIO controller
net: mdio: Add Cortina CS7542 bus controller
MAINTAINERS: Add Cortina CS7542 MDIO controller entry
.../bindings/net/cortina,cs7542-mdio.yaml | 48 +++++++++
MAINTAINERS | 7 ++
drivers/net/mdio/Kconfig | 12 +++
drivers/net/mdio/Makefile | 1 +
drivers/net/mdio/mdio-cs75xx.c | 119 +++++++++++++++++++++
5 files changed, 187 insertions(+)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-b4-cs7542-mdio-ec44e757e824
Best regards,
--
Fil Dunsky <filipp.dunsky@xxxxxxxxx>