Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Andre Przywara <andre.przywara@arm.com>,
	Richard Genoud <richard.genoud@bootlin.com>,
	Maxime Ripard <mripard@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Saravana Kannan <saravanak@kernel.org>,
	Lee Jones <lee@kernel.org>, Heiko Stuebner <heiko@sntech.de>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com, mfd@lists.linux.dev,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH 16/21] net: phy: add X-Powers AC200/AC300 EPHY driver
Date: Tue, 4 Aug 2026 17:19:25 +0200	[thread overview]
Message-ID: <9d201ac0-a4e3-4b74-a6ae-72c3b33bd519@bootlin.com> (raw)
In-Reply-To: <20260802-submit-acx00-of-dynamic-v1-v1-16-0a53cd9e21cc@gmail.com>

Hi James,

On 8/3/26 07:14, James Hilliard wrote:
> AC200 and AC300 contain compatible Fast Ethernet link-PHY implementations
> which report the same ID, but their identification registers are not
> accessible until the companion-specific control interface completes
> its power-up sequence. Match the ID supplied by firmware and require
> an X-Powers control reference because the Rockchip RK630 PHY reports
> the same ID.
> 
> On fixed hardware, reference one already enabled control device. A fixed
> AC300 system may optionally read the configuration field for calibration-
> range tuning; its absence selects the normal range. On systems which may
> contain either companion, require a logical two-bit NVMEM field to select
> the control interface and the AC300 calibration range. Enable a selected
> fail-needs-probe node when CONFIG_OF_DYNAMIC is available; otherwise the
> same topology works when both candidate providers are already enabled.
> Validate that each phandle references the expected control-device type and
> restore the selector's status changeset if dynamic device creation fails.
> 
> Keep a device link to the selected provider and defer until its driver
> binds. Verify that the MAC interface agrees with the provider's phy-mode
> before resetting the hardware. Power the control block before each PHY
> reset, shut it down during PHY suspend, and restore the vendor
> configuration after resume. If control power-off fails during suspend,
> attempt to power the PHY back on and restore its link configuration before
> returning the error. Pass the link address to the AC200 provider for
> EPHY_CTL.PHY_ADDR programming; the AC300 provider instead validates its
> package-strapped address relationship.
> 
> Apply the common vendor analog initialization and SID-derived tuning while
> preserving unrelated register fields. Support a board-selected xMII
> receive-clock inversion and report and configure forced or automatic
> MDI/MDI-X state.
> 
> Expose UAPS through the ethtool energy-detect power-down tunable as its
> no-transmit mode. Accumulate the hardware receive-byte, receive-packet and
> receive-CRC-error counters across PHY resets, expose all three as driver
> statistics and map CRC errors to the standardized PHY receive-error
> counter. Treat counter snapshots as best-effort telemetry so a read failure
> cannot prevent PHY recovery.
> 
> Start both standard EEE advertisement and the PHY-autonomous Intelligent
> EEE transmitter disabled, matching the vendor configuration. Preserve the
> supported modes so ethtool can enable and configure both at runtime. The
> PHY has no documented programmable LPI timer, so reject a nonzero timer
> when enabling Tx LPI while accepting any timer value when disabling it.
> Clear BMCR_PDOWN before soft reset because ACx00 can acknowledge reset
> while powered down without restarting its link logic.
> 
> Use the shared PHY interrupt for link changes when firmware provides one;
> otherwise retain the normal phylib polling fallback. On wakeup-source
> systems with a routed interrupt, expose magic-packet and link-change
> Wake-on-LAN, program the detector MAC address for magic wake, and arm the
> nested IRQ as a wake source. Keep the PHY powered while either PHY or MAC
> Wake-on-LAN is active. During suspend, leave only requested PHY wake events
> unmasked, then restore normal link monitoring on resume. Do not advertise
> either wake mode in polling mode because the CPU cannot poll while
> suspended.
> 
> Register standard PHY LEDs for the described package outputs and expose
> their fixed link/activity, 100 Mbps speed and duplex rules to the netdev
> trigger. Use the vendor fallback of all three outputs active-low when no
> LED topology is provided; otherwise apply the described output set and
> shared polarity. Quiesce the provider if PHY probing or removal tears down
> the link device.

That's a very verbose commit message, which gives it an 'LLM generated' vibe.

Can you submit that driver separately and split down into multiple pieces ?

1457 lines is quite big for a PHY driver, especially one that supports
just a pair of PHYs. That makes it hard to review.

Can you plit it into more logical chunks, one bringing basic features,
one for LEDs, one for WoL, one for stats, etc.

Thanks,

Maxime



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-08-04 15:19 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  5:14 [PATCH 00/21] net: phy: add X-Powers AC200/AC300 EPHY support James Hilliard
2026-08-03  5:14 ` [PATCH 01/21] dt-bindings: net: allwinner: add H616 EMAC1 James Hilliard
2026-08-03 13:03   ` Andrew Lunn
2026-08-03  5:14 ` [PATCH 02/21] net: stmmac: sun8i: add support for Allwinner " James Hilliard
2026-08-03  5:14 ` [PATCH 03/21] arm64: dts: allwinner: h616: add EMAC1 controller James Hilliard
2026-08-03  7:01   ` Krzysztof Kozlowski
2026-08-03  5:14 ` [PATCH 04/21] net: mdio: factor out OF child registration helpers James Hilliard
2026-08-03  5:14 ` [PATCH 05/21] net: mdio: make device map changes hotplug-safe James Hilliard
2026-08-03  5:14 ` [PATCH 06/21] net: mdio: support dynamic OF device changes James Hilliard
2026-08-03  5:14 ` [PATCH 07/21] dt-bindings: net: x-powers: add AC200 EPHY control James Hilliard
2026-08-03 13:40   ` Andrew Lunn
2026-08-03 18:03     ` James Hilliard
2026-08-03  5:14 ` [PATCH 08/21] dt-bindings: mfd: x-powers: add AC200 James Hilliard
2026-08-03  7:07   ` Krzysztof Kozlowski
2026-08-03  7:54     ` James Hilliard
2026-08-03  8:20       ` Krzysztof Kozlowski
2026-08-03  8:21         ` Krzysztof Kozlowski
2026-08-03 16:36           ` James Hilliard
2026-08-03 21:34         ` James Hilliard
2026-08-03 22:06           ` Andrew Lunn
2026-08-03 13:18   ` Andrew Lunn
2026-08-03 16:45     ` James Hilliard
2026-08-03 16:51       ` Chen-Yu Tsai
2026-08-04  2:14         ` Andrew Lunn
2026-08-03  5:14 ` [PATCH 09/21] mfd: add X-Powers AC200 support James Hilliard
2026-08-03  5:14 ` [PATCH 10/21] net: phy: add X-Powers AC200 EPHY control driver James Hilliard
2026-08-03 13:50   ` Andrew Lunn
2026-08-03 16:09     ` James Hilliard
2026-08-03 17:48       ` Andrew Lunn
2026-08-03 18:45         ` James Hilliard
2026-08-04  2:07           ` Chen-Yu Tsai
2026-08-04  4:32             ` James Hilliard
2026-08-04  2:22           ` Andrew Lunn
2026-08-04  4:37             ` James Hilliard
2026-08-04 14:54               ` Andrew Lunn
2026-08-04 15:26                 ` James Hilliard
2026-08-04 18:04                   ` Andrew Lunn
2026-08-04 18:29                     ` James Hilliard
2026-08-04 19:44                       ` Andrew Lunn
2026-08-03  5:14 ` [PATCH 11/21] dt-bindings: net: x-powers: add AC300 EPHY control James Hilliard
2026-08-03  5:14 ` [PATCH 12/21] net: phy: add X-Powers AC300 EPHY control driver James Hilliard
2026-08-03  5:14 ` [PATCH 13/21] dt-bindings: net: x-powers: add AC200/AC300 EPHY James Hilliard
2026-08-03  5:14 ` [PATCH 14/21] net: phy: support configuring PHY-autonomous Tx LPI James Hilliard
2026-08-03  5:14 ` [PATCH 15/21] net: phylink: allow PHY-autonomous EEE without MAC LPI James Hilliard
2026-08-03 13:23   ` Andrew Lunn
2026-08-03  5:14 ` [PATCH 16/21] net: phy: add X-Powers AC200/AC300 EPHY driver James Hilliard
2026-08-04 15:19   ` Maxime Chevallier [this message]
2026-08-03  5:14 ` [PATCH 17/21] arm64: dts: allwinner: h616: add ACx00 EPHY resources James Hilliard
2026-08-03  5:14 ` [PATCH 18/21] arm64: dts: allwinner: orangepi-zero2w: enable Ethernet expansion James Hilliard
2026-08-03  5:14 ` [PATCH 19/21] arm64: dts: allwinner: h6: add AC200 EPHY resources James Hilliard
2026-08-03  5:14 ` [PATCH 20/21] arm64: dts: allwinner: h6: tanix: enable AC200 EPHY James Hilliard
2026-08-03  5:14 ` [PATCH 21/21] arm64: defconfig: enable X-Powers ACx00 Ethernet support James Hilliard
2026-08-03  7:00   ` Krzysztof Kozlowski
2026-08-03  7:22     ` James Hilliard
2026-08-03 13:01 ` [PATCH 00/21] net: phy: add X-Powers AC200/AC300 EPHY support Andrew Lunn
2026-08-03 13:14 ` Andrew Lunn
2026-08-03 13:26 ` Andre Przywara
2026-08-03 13:30   ` Andrew Lunn
2026-08-03 15:57   ` James Hilliard
2026-08-04  5:03     ` Jernej Škrabec
2026-08-04  5:48       ` James Hilliard
2026-08-04 17:38         ` Andrew Lunn
2026-08-04 18:18           ` James Hilliard
2026-08-03 13:52 ` Andrew Lunn
2026-08-03 13:54   ` Andre Przywara
2026-08-03 13:57     ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d201ac0-a4e3-4b74-a6ae-72c3b33bd519@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andre.przywara@arm.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=heiko@sntech.de \
    --cc=hkallweit1@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=joabreu@synopsys.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mfd@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=richard.genoud@bootlin.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=saravanak@kernel.org \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox