[PATCH net-next v2 0/8] net: phy: add X-Powers AC200/AC300 EPHY support
James Hilliard <[email protected]> Tue, 04 Aug 2026 20:26:58 -0600
| Newsgroups | gmane.linux.network,gmane.linux.drivers.devicetree,gmane.linux.kernel,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.rockchip |
|---|---|
| Message-ID | <[email protected]> |
This revision deliberately limits the series to the common PHY and the
two package-specific control paths. It does not contain runtime Device
Tree selection, generic MDIO reconfiguration, LEDs, interrupts,
Wake-on-LAN, statistics, EDPD or PHY-autonomous EEE.
The AC200 and AC300 MDIO link endpoints report the same Clause 22 PHY
identifier and use a compatible link-side paged register layout. Neither
endpoint is accessible until its package-specific control path has
initialized it. AC200 uses registers in its I2C MFD regmap, while AC300
exposes a separate non-PHY Clause 22 control device.
Keep those transport-specific resources in separate control drivers and
share only a small private operations interface with the common PHY
driver. A board described by this series references exactly one enabled
control device. The PHY driver creates a managed device link to that
provider, powers the link block before accessing it, and passes the PHY
address and MAC-selected interface mode to the provider.
This split is independent of CONFIG_OF_DYNAMIC. The initial series uses
only fixed descriptions and has no Dynamic MDIO dependency. A separate
development branch can later use bit 0 of the same configuration field
for runtime selection without changing the binding or provider interface
or duplicating the common PHY code.
The series adds:
- a minimal AC200 MFD core and AC200 EPHY control child;
- the AC300 non-PHY MDIO control driver; and
- the shared AC200/AC300 PHY driver with basic link operation, package
calibration, power sequencing and vendor analog initialization.
The reduced v2 series was built and boot-tested on an H616 system with
an AC300 package. The raw SID bytes at offset 0x2c were 0x06 0x05, making
the packed two-bit configuration field 0b01: AC300 with normal calibration
tuning. The driver validated that value against the fixed AC300 provider,
bound at MDIO address 0, negotiated a 100 Mbps full-duplex link and passed
network traffic.
The H616 EMAC1 support has been split into an independent series. Board
Device Trees and defconfig updates will follow after the driver and
binding interfaces settle. That later H616 integration will use the
Allwinner H616 PWM controller as the companion input clock; this code
series neither applies on nor builds against the PWM series.
The AC200 portions build on earlier work by Jernej Skrabec and Andre
Przywara:
https://github.com/jernejsk/linux-1/commits/ac200-v4
Public AC200 and AC300 documentation is linked from:
https://linux-sunxi.org/AC200
The AC200 parent schema references the EPHY-control schema in patch 1.
The AC200 control driver needs the MFD core, so those patches need to be
kept together or placed on an immutable branch. The AC300 control driver
and common PHY driver have no link-time dependency on the AC200 backend.
Assisted-by: OpenAI Codex (gpt-5.6-sol, max)
Signed-off-by: James Hilliard <[email protected]>
---
Changes v1 -> v2:
- split H616 EMAC1, board Device Trees and defconfig into independent
series
- remove Dynamic MDIO changes and runtime Device Tree provider
selection; require exactly one enabled provider
- remove the PHY-autonomous EEE dependency and keep Intelligent EEE
disabled
- defer LEDs, interrupts, Wake-on-LAN, statistics and EDPD to separate
feature patches
- make the MAC-provided phydev->interface the sole interface-mode
source
- retain separate AC200 and AC300 control drivers behind a minimal
private operations structure
- retain the two-bit package-configuration cell, validate its
variant bit against the fixed provider and use its AC300 tuning bit
- reduce the initial AC200 MFD core to the common regmap, supplies,
clock, reset and EPHY child
- leave package LED pads disabled in the basic control drivers
- Link to v1:
https://patch.msgid.link/[email protected]
To: Andrew Lunn <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: James Hilliard <[email protected]>
To: Lee Jones <[email protected]>
To: Andrew Lunn <[email protected]>
To: Heiner Kallweit <[email protected]>
To: Russell King <[email protected]>
To: Heiko Stuebner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
James Hilliard (8):
dt-bindings: net: x-powers: add AC200 EPHY control
dt-bindings: mfd: x-powers: add AC200
mfd: add X-Powers AC200 support
net: phy: add X-Powers AC200 EPHY control driver
dt-bindings: net: x-powers: add AC300 EPHY control
net: phy: add X-Powers AC300 EPHY control driver
dt-bindings: net: x-powers: add AC200/AC300 EPHY
net: phy: add X-Powers AC200/AC300 EPHY driver
.../devicetree/bindings/mfd/x-powers,ac200.yaml | 77 +++
.../bindings/net/x-powers,ac200-ephy-ctl.yaml | 39 ++
.../bindings/net/x-powers,ac300-ephy-ctl.yaml | 70 +++
.../bindings/net/x-powers,acx00-ephy.yaml | 117 +++++
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/ac200.c | 207 ++++++++
drivers/net/phy/Kconfig | 27 +
drivers/net/phy/Makefile | 3 +
drivers/net/phy/xpowers-ac200-ctl.c | 294 +++++++++++
drivers/net/phy/xpowers-ac300-ctl.c | 423 ++++++++++++++++
drivers/net/phy/xpowers-acx00.c | 544 +++++++++++++++++++++
drivers/net/phy/xpowers-acx00.h | 17 +
13 files changed, 1831 insertions(+)
---
base-commit: b16bab325801c7be004222cad0ae296aa5982e79
change-id: 20260802-submit-acx00-of-dynamic-v1-94a0dc15f282
Best regards,
--
James Hilliard <[email protected]>