mfd: add X-Powers AC200 support
v11 cover mfd: add X-Powers AC200 support
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 a complete binding and an MFD provider with audio codec and TV encoder cells. Describe the audio DAI, analog supply inputs, TV encoder display graph and optional bandgap calibration in the parent node, without separate function nodes.
INTB is optional. When connected, pass the physical IRQ to the TV encoder cell for shared, threaded interrupt handling. There is no DT interrupt controller or private IRQ domain. The ASoC codec and DRM bridge drivers remain separate subsystem work.
The PHY remains enumerated on MDIO. Its separately submitted driver uses the x-powers,ac200 phandle, a managed device link and dev_get_regmap() for ancillary I2C register access:
https://patch.msgid.link/[email protected]
The two series can be merged independently; AC200 Ethernet requires both. This series is based on the MFD for-mfd-next branch.
The binding and MFD implementation adapt earlier work by Jernej Skrabec and Andre Przywara, retaining their sign-off chain:
https://github.com/jernejsk/linux-1/commits/opi3-eth/
Public documentation is linked from https://linux-sunxi.org/AC200.
---
Changes in v11:
- fold the codec and TV encoder properties into the AC200 parent node
while retaining separate Linux MFD cells (requested by Conor Dooley)
- describe only the optional physical INTB connection; remove the DT interrupt-controller properties and internal interrupt-number header
- replace the regmap IRQ controller with a shared physical IRQ resource
for the TV encoder, omitted when INTB is not connected
- mask all sources before enabling INTB and leave per-source interrupt
handling to the function drivers
- pass static const MFD cell arrays directly to the core, without copying
or filtering them by DT child nodes; share the cell initializers between
the IRQ and no-IRQ arrays
- map the function supplies to the parent using MFD supply aliases and
clarify that the distinct AC_LDOIN and TV_VCC inputs may share a regulator
- remove the DMA-mask workaround now that the cells have no OF nodes
- drop the binding Reviewed-by tag, which covered the earlier parent-only binding (requested by Conor Dooley)
- Link to v10: https://patch.msgid.link/[email protected]
Changes v9 -> v10:
- combine the parent and function bindings into one complete binding patch (requested by Conor Dooley)
- introduce the complete MFD provider, IRQ controller and function cells in one driver patch, reducing the series from four patches to two
- retain the existing sign-off chains for the adapted binding and MFD work
- allow enabled codec and TV encoder nodes when INTB is not connected; require the parent IRQ path only when a TV encoder interrupt is declared
or the parent advertises an interrupt controller
- add an unwired TV encoder example
- move the existing 40 ms wait before constructing and publishing the
regmap, and clarify its origin in the vendor resume path
- use automatic platform-device IDs so MFD children from multiple AC200 instances cannot collide
- initialize the parent's DMA mask for its non-DMA children, avoiding
"DMA mask not set" warnings during child enumeration
- explicitly request level-low when no upstream IRQ trigger is configured
- keep INTB disabled until source masking and handler setup are complete,
and disable it before releasing the IRQ chip on failure or removal
- narrow reset-preservation claims to avoiding a provider-initiated global reset; supplier unbind still tears down consumers and releases clocks
- Link to v9: https://patch.msgid.link/[email protected]
Changes v8 -> v9:
- deassert common reset without first resetting the entire chip
- leave common reset deasserted during removal and shutdown, avoiding a provider-initiated chip-wide reset
(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/[email protected]
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/[email protected]
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/[email protected]
Changes v5 -> v6:
- split the MFD work from the independently mergeable networking series
- rebase on the MFD for-mfd-next branch
- Link to v5: https://patch.msgid.link/[email protected]
---
James Hilliard (2):
dt-bindings: mfd: x-powers: Add AC200
mfd: ac200: Add X-Powers AC200 support
.../devicetree/bindings/mfd/x-powers,ac200.yaml | 168 +++++++++++++++ MAINTAINERS | 8 + drivers/mfd/Kconfig | 14 ++ drivers/mfd/Makefile | 1 + drivers/mfd/ac200.c | 231 +++++++++++++++++++++ 5 files changed, 422 insertions(+)
---
base-commit: b07adc1a304c7ca9ac25a01051561538757363c9
change-id: 20260811-submit-ac200-mfd-8bad6d09e285
Best regards,
Signature · 1 line
James Hilliard <[email protected]>
PATCH v11 1/2 dt-bindings: mfd: x-powers: Add AC200
The AC200 is an I2C-controlled mixed-signal companion IC containing audio, video, RTC and Fast Ethernet PHY functions.
Describe the shared input clock, audio DAI, TV encoder display graph and optional bandgap calibration in one parent node. The codec and TV encoder do not need separate firmware nodes.
AC_LDOIN and TV_VCC are distinct 3.3 V supply inputs. Describe them separately without requiring different external regulators. Require the audio supply when the DAI is described and the video supply when the display graph is present, while allowing PHY-only configurations.
Describe the optional shared INTB connection without an internal interrupt domain. Cable detection status remains readable over I2C when INTB is not connected. Include wired and unwired examples.
The Ethernet PHY is represented by a PHY package on its MDIO bus, with a phandle back to this device for access to the package control registers. It therefore does not require an MFD child node. The input clock must run at 24 or 27 MHz when the Ethernet PHY is used, matching the rates encoded by its documented clock selector.
--- .../devicetree/bindings/mfd/x-powers,ac200.yaml | 168 +++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 175 insertions(+)
Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml new file +168 -0
@@ -0,0 +1,168 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/x-powers,ac200.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: X-Powers AC200 mixed-signal IC + +maintainers: + - James Hilliard <[email protected]> + - Jernej Skrabec <[email protected]> + +description: + The AC200 is a mixed-signal companion IC containing audio, video, RTC and + Fast Ethernet PHY functions. Its control registers are accessed over I2C. + The audio codec and TV encoder are described by properties of this node. + The Ethernet PHY is described separately on its MDIO bus. + +allOf: + - $ref: /schemas/sound/dai-common.yaml# + +properties: + compatible: + const: x-powers,ac200 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + AC200 input clock. When using the Ethernet PHY, its configured rate must + be 24 or 27 MHz, matching the rates encoded by the documented EPHY clock + selector. + + interrupts: + maxItems: 1 + description: + The shared, level-triggered, open-drain INTB output for the TV encoder, + Ethernet PHY and RTC interrupts. Omit when INTB is not connected. TV + encoder cable detection status can also be read over I2C without an + interrupt. + + '#sound-dai-cells': + const: 0 + + ac-ldoin-supply: + description: + The 3.3 V supply connected to the AC_LDOIN pin for the audio codec LDO + input. This may be the same regulator as tv-vcc-supply. + + tv-vcc-supply: + description: + The 3.3 V supply connected to the TV_VCC pin for the composite-video + DAC. This may be the same regulator as ac-ldoin-supply. + + nvmem-cells: + maxItems: 1 + description: TV encoder bandgap calibration. + + nvmem-cell-names: + items: + - const: bandgap + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input to the TV encoder, carrying CCIR656. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output to the composite-video connector. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - clocks + +dependencies: + '#sound-dai-cells': [ ac-ldoin-supply ] + ports: [ tv-vcc-supply ] + nvmem-cells: [ nvmem-cell-names ] + nvmem-cell-names: [ nvmem-cells ] + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + interrupt-parent = <&pio>; + interrupts = <1 20 IRQ_TYPE_LEVEL_LOW>; + #sound-dai-cells = <0>; + ac-ldoin-supply = <®_aldo2>; + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + tve_in: endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + tve_out: endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + /* INTB is not connected. */ + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; +...
MAINTAINERS +7 -0
@@ -29504,6 +29504,13 @@ F: drivers/net/wwan/ F: include/linux/wwan.h F: include/uapi/linux/wwan.h +X-POWERS AC200 DRIVERS +M: Jernej Skrabec <[email protected]> +M: James Hilliard <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml + X-POWERS AXP288 PMIC DRIVERS M: Hans de Goede <[email protected]> S: Maintained
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH v11 1/2] dt-bindings: mfd: x-powers: Add AC200
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 16 lines
The AC200 is an I2C-controlled mixed-signal companion IC containing audio, video, RTC and Fast Ethernet PHY functions.
Describe the shared input clock, audio DAI, TV encoder display graph and optional bandgap calibration in one parent node. The codec and TV encoder do not need separate firmware nodes.
AC_LDOINandTV_VCCare distinct 3.3 V supply inputs. Describe them separately without requiring different external regulators. Require the audio supply when the DAI is described and the video supply when the display graph is present, while allowing PHY-only configurations.Describe the optional shared INTB connection without an internal interrupt domain. Cable detection status remains readable over I2C when INTB is not connected. Include wired and unwired examples.
Quoted 8 lines
The Ethernet PHY is represented by a PHY package on its MDIO bus, with a phandle back to this device for access to the package control registers. It therefore does not require an MFD child node. The input clock must run at 24 or 27 MHz when the Ethernet PHY is used, matching the rates encoded by its documented clock selector.
Signed-off-by Jernej Skrabec <[email protected]>Signed-off-by James Hilliard <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Re: [PATCH v11 1/2] dt-bindings: mfd: x-powers: Add AC200
In reply to James HilliardQuoted 16 lines · James Hilliard
The AC200 is an I2C-controlled mixed-signal companion IC containing audio, video, RTC and Fast Ethernet PHY functions.
Describe the shared input clock, audio DAI, TV encoder display graph and optional bandgap calibration in one parent node. The codec and TV encoder do not need separate firmware nodes.
AC_LDOINandTV_VCCare distinct 3.3 V supply inputs. Describe them separately without requiring different external regulators. Require the audio supply when the DAI is described and the video supply when the display graph is present, while allowing PHY-only configurations.Describe the optional shared INTB connection without an internal interrupt domain. Cable detection status remains readable over I2C when INTB is not connected. Include wired and unwired examples.
Quoted 8 lines
The Ethernet PHY is represented by a PHY package on its MDIO bus, with a phandle back to this device for access to the package control registers. It therefore does not require an MFD child node. The input clock must run at 24 or 27 MHz when the Ethernet PHY is used, matching the rates encoded by its documented clock selector.
Signed-off-by Jernej Skrabec <[email protected]>Signed-off-by James Hilliard <[email protected]>
btw, this is kinda odd. Jernej has a signoff, but no other attribution. Are they a coauthor missing a Co-developed-by
Quoted 1 line
---
pw-bot: not-applicable
Thanks,
Conor.
Quoted 200 lines
.../devicetree/bindings/mfd/x-powers,ac200.yaml | 168 +++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 175 insertions(+)Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml new file +168
-0@@ -0,0 +1,168 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/x-powers,ac200.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: X-Powers AC200 mixed-signal IC + +maintainers: + - James Hilliard <[email protected]> + - Jernej Skrabec <[email protected]> + +description: + The AC200 is a mixed-signal companion IC containing audio, video, RTC and + Fast Ethernet PHY functions. Its control registers are accessed over I2C. + The audio codec and TV encoder are described by properties of this node. + The Ethernet PHY is described separately on its MDIO bus. + +allOf: + - $ref: /schemas/sound/dai-common.yaml# + +properties: + compatible: + const: x-powers,ac200 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + AC200 input clock. When using the Ethernet PHY, its configured rate must + be 24 or 27 MHz, matching the rates encoded by the documented EPHY clock + selector. + + interrupts: + maxItems: 1 + description: + The shared, level-triggered, open-drain INTB output for the TV encoder, + Ethernet PHY and RTC interrupts. Omit when INTB is not connected. TV + encoder cable detection status can also be read over I2C without an + interrupt. + + '#sound-dai-cells': + const: 0 + + ac-ldoin-supply: + description: + The 3.3 V supply connected to the AC_LDOIN pin for the audio codec LDO + input. This may be the same regulator as tv-vcc-supply. + + tv-vcc-supply: + description: + The 3.3 V supply connected to the TV_VCC pin for the composite-video + DAC. This may be the same regulator as ac-ldoin-supply. + + nvmem-cells: + maxItems: 1 + description: TV encoder bandgap calibration. + + nvmem-cell-names: + items: + - const: bandgap + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input to the TV encoder, carrying CCIR656. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output to the composite-video connector. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - clocks + +dependencies: + '#sound-dai-cells': [ ac-ldoin-supply ] + ports: [ tv-vcc-supply ] + nvmem-cells: [ nvmem-cell-names ] + nvmem-cell-names: [ nvmem-cells ] + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + interrupt-parent = <&pio>; + interrupts = <1 20 IRQ_TYPE_LEVEL_LOW>; + #sound-dai-cells = <0>; + ac-ldoin-supply = <®_aldo2>; + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + tve_in: endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + tve_out: endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + /* INTB is not connected. */ + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; +...MAINTAINERS +7
-0@@ -29504,6 +29504,13 @@ F: drivers/net/wwan/ F: include/linux/wwan.h F: include/uapi/linux/wwan.h +X-POWERS AC200 DRIVERS +M: Jernej Skrabec <[email protected]> +M: James Hilliard <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml + X-POWERS AXP288 PMIC DRIVERS M: Hans de Goede <[email protected]> S: MaintainedSignature · 2 lines
-- 2.53.0
Re: [PATCH v11 1/2] dt-bindings: mfd: x-powers: Add AC200
Quoted 24 lines · Conor Dooley
Quoted 22 lines · James Hilliard
The AC200 is an I2C-controlled mixed-signal companion IC containing audio, video, RTC and Fast Ethernet PHY functions.
Describe the shared input clock, audio DAI, TV encoder display graph and optional bandgap calibration in one parent node. The codec and TV encoder do not need separate firmware nodes.
AC_LDOINandTV_VCCare distinct 3.3 V supply inputs. Describe them separately without requiring different external regulators. Require the audio supply when the DAI is described and the video supply when the display graph is present, while allowing PHY-only configurations.Describe the optional shared INTB connection without an internal interrupt domain. Cable detection status remains readable over I2C when INTB is not connected. Include wired and unwired examples.
The Ethernet PHY is represented by a PHY package on its MDIO bus, with a phandle back to this device for access to the package control registers. It therefore does not require an MFD child node. The input clock must run at 24 or 27 MHz when the Ethernet PHY is used, matching the rates encoded by its documented clock selector.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Jernej Skrabec <[email protected]>Signed-off-by James Hilliard <[email protected]>btw, this is kinda odd. Jernej has a signoff, but no other attribution. Are they a coauthor missing a Co-developed-by
I had just retained the existing Signed-off-by from some of his patches that got incorporated into this one, is using Co-developed-by better practice for attribution? Should I use both a Co-developed-by and the Signed-off-by for this sort of thing?
His work came from I think this branch and maybe some older ones:
https://github.com/jernejsk/linux-1/commits/opi3-eth/
Quoted 209 lines
Quoted 2 lines
---
Reviewed-by Conor Dooley <[email protected]>pw-bot: not-applicable
Thanks,
Conor.Quoted 200 lines
.../devicetree/bindings/mfd/x-powers,ac200.yaml | 168 +++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 175 insertions(+)Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml new file +168
-0@@ -0,0 +1,168 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/x-powers,ac200.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: X-Powers AC200 mixed-signal IC + +maintainers: + - James Hilliard <[email protected]> + - Jernej Skrabec <[email protected]> + +description: + The AC200 is a mixed-signal companion IC containing audio, video, RTC and + Fast Ethernet PHY functions. Its control registers are accessed over I2C. + The audio codec and TV encoder are described by properties of this node. + The Ethernet PHY is described separately on its MDIO bus. + +allOf: + - $ref: /schemas/sound/dai-common.yaml# + +properties: + compatible: + const: x-powers,ac200 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + AC200 input clock. When using the Ethernet PHY, its configured rate must + be 24 or 27 MHz, matching the rates encoded by the documented EPHY clock + selector. + + interrupts: + maxItems: 1 + description: + The shared, level-triggered, open-drain INTB output for the TV encoder, + Ethernet PHY and RTC interrupts. Omit when INTB is not connected. TV + encoder cable detection status can also be read over I2C without an + interrupt. + + '#sound-dai-cells': + const: 0 + + ac-ldoin-supply: + description: + The 3.3 V supply connected to the AC_LDOIN pin for the audio codec LDO + input. This may be the same regulator as tv-vcc-supply. + + tv-vcc-supply: + description: + The 3.3 V supply connected to the TV_VCC pin for the composite-video + DAC. This may be the same regulator as ac-ldoin-supply. + + nvmem-cells: + maxItems: 1 + description: TV encoder bandgap calibration. + + nvmem-cell-names: + items: + - const: bandgap + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input to the TV encoder, carrying CCIR656. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output to the composite-video connector. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - clocks + +dependencies: + '#sound-dai-cells': [ ac-ldoin-supply ] + ports: [ tv-vcc-supply ] + nvmem-cells: [ nvmem-cell-names ] + nvmem-cell-names: [ nvmem-cells ] + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + interrupt-parent = <&pio>; + interrupts = <1 20 IRQ_TYPE_LEVEL_LOW>; + #sound-dai-cells = <0>; + ac-ldoin-supply = <®_aldo2>; + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + tve_in: endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + tve_out: endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mixed-signal@10 { + compatible = "x-powers,ac200"; + reg = <0x10>; + clocks = <&pwm 5>; + /* INTB is not connected. */ + tv-vcc-supply = <®_aldo2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + endpoint { + remote-endpoint = <&tcon_out_tve>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&composite_in>; + }; + }; + }; + }; + }; +...MAINTAINERS +7
-1@@ -29504,6 +29504,13 @@ F: drivers/net/wwan/ F: include/linux/wwan.h F: include/uapi/linux/wwan.h +X-POWERS AC200 DRIVERS +M: Jernej Skrabec <[email protected]> +M: James Hilliard <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml + X-POWERS AXP288 PMIC DRIVERS M: Hans de Goede <[email protected]> S: Maintained --2.53.0
Re: [PATCH v11 1/2] dt-bindings: mfd: x-powers: Add AC200
Quoted 28 lines · James Hilliard
Quoted 27 lines · Conor Dooley
Quoted 24 lines · James Hilliard
The AC200 is an I2C-controlled mixed-signal companion IC containing audio, video, RTC and Fast Ethernet PHY functions.
Describe the shared input clock, audio DAI, TV encoder display graph and optional bandgap calibration in one parent node. The codec and TV encoder do not need separate firmware nodes.
AC_LDOINandTV_VCCare distinct 3.3 V supply inputs. Describe them separately without requiring different external regulators. Require the audio supply when the DAI is described and the video supply when the display graph is present, while allowing PHY-only configurations.Describe the optional shared INTB connection without an internal interrupt domain. Cable detection status remains readable over I2C when INTB is not connected. Include wired and unwired examples.
The Ethernet PHY is represented by a PHY package on its MDIO bus, with a phandle back to this device for access to the package control registers. It therefore does not require an MFD child node. The input clock must run at 24 or 27 MHz when the Ethernet PHY is used, matching the rates encoded by its documented clock selector.
Signed-off-by Jernej Skrabec <[email protected]>Signed-off-by James Hilliard <[email protected]>
Quoted 7 lines
Quoted 2 lines
btw, this is kinda odd. Jernej has a signoff, but no other attribution. Are they a coauthor missing a Co-developed-by
I had just retained the existing Signed-off-by from some of his patches that got incorporated into this one, is using Co-developed-by better practice for attribution? Should I use both a Co-developed-by and the Signed-off-by for this sort of thing?
Yes, both. Co-developed-by is how you signify that Jernej wrote some of this. Right now, the code is attributed solely to you as the one in the author field of the patch.
PATCH v11 2/2 mfd: ac200: Add X-Powers AC200 support
In reply to James HilliardThe X-Powers AC200 is a mixed-signal companion IC with a paged register map accessed over I2C.
Enable and rate-lock the shared input clock, retain the vendor resume path's 40 ms wait before creating the regmap and accessing registers, and deassert the common reset. No minimum delay is documented. Set only the deassert bit instead of forcing a reset cycle, avoiding a chip-wide reset of unrelated function registers. Leave the common reset deasserted during driver removal and system shutdown; function drivers own their block resets. Supplier unbind still tears down linked consumers and releases the provider's clock references.
Cache only the common page selector. Individual functions can reset independently and invalidate their other registers, so leave all functional registers volatile.
Register the audio codec and TV encoder using static MFD cells and automatically assigned platform device IDs. Their firmware properties belong to the parent node. Map their supply lookups to the parent with MFD supply aliases, without assigning separate OF nodes to the cells.
When INTB is connected, pass its physical IRQ to the TV encoder cell. Select a cell array without IRQ resources when INTB is absent. No regmap IRQ controller or private IRQ domain is needed.
Configure the level-triggered INTB output, defaulting to level-low when the upstream IRQ has no trigger type. Mask all sources before enabling INTB. Function drivers request shared threaded IRQs before enabling their own source, check and clear their own status, and mask their source before freeing the IRQ. Disable INTB after removing the children on failure or removal, while the regmap and clock are still available.
The Ethernet PHY is enumerated on its MDIO bus rather than as an MFD child. It follows the x-powers,ac200 phandle and uses this regmap for ancillary package-control access.
--- MAINTAINERS | 1 + drivers/mfd/Kconfig | 14 ++++ drivers/mfd/Makefile | 1 + drivers/mfd/ac200.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 247 insertions(+)
MAINTAINERS +1 -0
@@ -29510,6 +29510,7 @@ M: James Hilliard <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/mfd/x-powers,ac200.yaml +F: drivers/mfd/ac200.c X-POWERS AXP288 PMIC DRIVERS M: Hans de Goede <[email protected]>
drivers/mfd/Kconfig +14 -0
@@ -205,6 +205,20 @@ config MFD_AC100 This driver include only the core APIs. You have to select individual components like codecs or RTC under the corresponding menus. +config MFD_AC200 + tristate "X-Powers AC200" + depends on COMMON_CLK + depends on I2C + depends on OF + select MFD_CORE + select REGMAP_I2C + help + Support for the X-Powers AC200 mixed-signal companion IC. The AC200 + contains audio, video, RTC and Fast Ethernet PHY functions and is + co-packaged with some Allwinner H6 and H616 SoCs. This driver provides + the shared register access and instantiates the individual function + devices. + config MFD_AXP20X tristate select MFD_CORE
drivers/mfd/Makefile +1 -0
@@ -150,6 +150,7 @@ obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o obj-$(CONFIG_MFD_AC100) += ac100.o +obj-$(CONFIG_MFD_AC200) += ac200.o obj-$(CONFIG_MFD_AXP20X) += axp20x.o obj-$(CONFIG_MFD_AXP20X_I2C) += axp20x-i2c.o obj-$(CONFIG_MFD_AXP20X_RSB) += axp20x-rsb.o
drivers/mfd/ac200.c new file +231 -0
231 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH v11 2/2] mfd: ac200: Add X-Powers AC200 support
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 18 lines
The X-Powers AC200 is a mixed-signal companion IC with a paged register map accessed over I2C.
Enable and rate-lock the shared input clock, retain the vendor resume path's 40 ms wait before creating the regmap and accessing registers, and deassert the common reset. No minimum delay is documented. Set only the deassert bit instead of forcing a reset cycle, avoiding a chip-wide reset of unrelated function registers. Leave the common reset deasserted during driver removal and system shutdown; function drivers own their block resets. Supplier unbind still tears down linked consumers and releases the provider's clock references.
Cache only the common page selector. Individual functions can reset independently and invalidate their other registers, so leave all functional registers volatile.
[ ... ]
ancillary package-control access.
Quoted 3 lines
Signed-off-by Jernej Skrabec <[email protected]>Signed-off-by Andre Przywara <[email protected]>Signed-off-by James Hilliard <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2