[PATCH v9 0/4] mfd: add X-Powers AC200 support
From: James Hilliard
Date: Thu Sep 03 2026 - 16:11:46 EST
The X-Powers AC200 is an I2C-controlled mixed-signal companion IC with
a paged register map shared by its audio, video, RTC and Fast Ethernet
PHY functions.
Add the parent binding and an I2C provider which enables and rate-locks
the shared input clock, initializes the paged regmap and deasserts the
common reset without resetting state left by firmware. The common reset
remains deasserted during removal and shutdown, so unbinding the provider
does not disrupt independently enumerated functions or discard wake state.
Describe and instantiate the audio codec and TV encoder as MFD children,
and provide the shared regmap interrupt controller needed by the TV
encoder. Only enabled, DT-described function devices are instantiated;
PHY-only systems therefore acquire no unused platform devices. The ASoC
codec and DRM bridge drivers are separate subsystem work and are not part
of this MFD-only series.
The current regmap consumer is the separately submitted AC200/AC300
Ethernet PHY series:
https://patch.msgid.link/20260818-submit-acx00-of-dynamic-v1-v9-0-b8c8d9ad0d83@xxxxxxxxx
The PHY remains enumerated on MDIO, its primary management bus. Its AC200
package node follows the x-powers,ac200 phandle for ancillary I2C register
access, adds a managed device link and obtains the regmap with
dev_get_regmap(). This series and the PHY series can be merged in either
order; AC200 Ethernet support requires both.
The child descriptions and MFD implementation are adapted from earlier
work by Jernej Skrabec and Andre Przywara, with their authorship and
sign-off chain retained:
https://github.com/jernejsk/linux-1/commits/opi3-eth/
Public AC200 documentation is linked from:
https://linux-sunxi.org/AC200
Validation included dt_binding_check with dtschema 2026.6, a W=1
x86_64 object build and strict checkpatch checks. On AC200 hardware, a
writable common-register marker survived supplier unbind and rebind. The
provider and PHY then completed 100 overlapping bind cycles; both MFD
cells were removed and recreated during every cycle while both device
links remained valid and the 100 Mbps full-duplex link recovered.
Afterward, 100 pings in each direction completed without loss and 8 MiB
transfers in both directions compared correctly.
The available board does not expose the codec, TV encoder or INTB pin, so
the functional audio, video and interrupt paths were not runtime-tested.
Temporary child nodes nevertheless instantiated both MFD devices, and a
temporary probe driver bound to each and read the parent common-control
register as 0x1.
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
---
Changes v8 -> v9:
- deassert common reset without first resetting the entire chip
- leave common reset deasserted during removal and shutdown, preventing
supplier unbind from disrupting the PHY or discarding RTC/WoL state
(reported by Sashiko and queried by Lee Jones)
- stop storing the regmap as unused driver data after dropping teardown
callbacks
- describe the audio codec and TV encoder MFD children
- add the AC200 interrupt definitions and shared regmap IRQ controller
- register only enabled, DT-described codec and TV encoder function devices
- retain Jernej Skrabec and Andre Przywara's authorship and sign-off chain
for the adapted child and MFD work
- make the base provider depend on COMMON_CLK before child support is added
- require an upstream interrupt when the parent is an interrupt controller
- credit Jernej Skrabec in the module metadata
- exercise child enumeration and parent-regmap access with temporary probes
- rebase on the current MFD for-mfd-next branch
- verify register-state preservation across supplier unbind and rebind
- Link to v8: https://patch.msgid.link/20260902-submit-ac200-mfd-v8-0-2aa06720b8ac@xxxxxxxxx
Changes v7 -> v8:
- identify the PHY series as the current regmap consumer
- describe future MFD children and the MDIO/I2C split
- store the regmap directly as driver data (suggested by Lee Jones)
- reset the chip from the remove callback (suggested by Lee Jones)
- drop the revision log and inherited-driver attribution (suggested by Lee Jones)
- add Krzysztof's Reviewed-by tag to the binding
- rebase on the current MFD for-mfd-next branch
- Link to v7: https://patch.msgid.link/20260811-submit-ac200-mfd-v7-0-8b06f552a4d7@xxxxxxxxx
Changes v6 -> v7:
- drop the managed external-syscon helper and AC200 syscon registration
- leave the regmap attached to the I2C provider for direct device lookup
- reduce the MFD series from three patches to two
- Link to v6: https://patch.msgid.link/20260811-submit-ac200-mfd-v6-0-c5b1292c8498@xxxxxxxxx
Changes v5 -> v6:
- split the MFD work from the independently mergeable networking series
- put the merge routing and shared DT design at the start of the cover letter
- rebase on the MFD for-mfd-next branch
- Link to v5: https://patch.msgid.link/20260809-submit-acx00-of-dynamic-v1-v5-0-bfa1f8518b28@xxxxxxxxx
To: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
To: James Hilliard <james.hilliard1@xxxxxxxxx>
To: Lee Jones <lee@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: linux-sunxi@xxxxxxxxxxxxxxx
Cc: mfd@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
James Hilliard (2):
dt-bindings: mfd: x-powers: Add AC200
mfd: ac200: Add X-Powers AC200 support
Jernej Skrabec (2):
dt-bindings: mfd: x-powers: Describe AC200 functions
mfd: ac200: Add codec and TV encoder cells
.../devicetree/bindings/mfd/x-powers,ac200.yaml | 186 +++++++++++++++++
MAINTAINERS | 9 +
drivers/mfd/Kconfig | 15 ++
drivers/mfd/Makefile | 1 +
drivers/mfd/ac200.c | 230 +++++++++++++++++++++
include/dt-bindings/mfd/x-powers,ac200.h | 13 ++
6 files changed, 454 insertions(+)
---
base-commit: b07adc1a304c7ca9ac25a01051561538757363c9
change-id: 20260811-submit-ac200-mfd-8bad6d09e285
Best regards,
--
James Hilliard <james.hilliard1@xxxxxxxxx>