From: Lucas Tanure <tanure@linux.com>
To: xianwei.zhao@amlogic.com, Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@kernel.org>,
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>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/7] Add ethernet support for the Amlogic T7
Date: Thu, 22 Oct 2026 21:06:33 +0100 [thread overview]
Message-ID: <20261022200640.3101932-1-tanure@linux.com> (raw)
The T7 has the same ethernet glue as the G12A. This adds the binding,
the driver support and the device tree nodes, and enables the port on
the Khadas VIM4.
Two clocks are new. The pipeline stage between the controller and the
DRAM has its own gate, which nothing else claims. The glue registers
sit in a block gated by sys_ethphy, so far claimed only by the MDIO
mux, which probes after the glue is programmed: every write to
PRG_ETH0/1 was lost. The T7 node lists that clock as "pclk".
The delays follow ethernet-controller.yaml: phy-mode is never changed,
the PHY adds the 2ns, and the T7 accepts only rx-internal-delay-ps, as
fine tuning. Its TX side is a quarter-period phase selector with no
small step, so tx-internal-delay-ps is not valid for it. The VIM4 is
plain rgmii-id. v3 said the RTL8211F TX delay did not work; that test
ran with the glue registers gated, so the bootloader's MAC TX delay
stayed on and the link had 4ns on TX.
Tested on v7.3-4494-g2a08195e4db5 plus "clk: meson: t7: keep the
memory fabric clocks running" (clk-meson-next): 940/941Mbit/s with
iperf3, no CRC error in 421k frames.
Overlaps with Xianwei Zhao's "[PATCH v2 0/3] t7: add some nodes for
Amlogc t7."; I will drop or rebase whatever overlaps once we agree.
Changes since v3:
- phy-mode untouched, the PHY adds the 2ns, rx-internal-delay-ps is
tuning only, tx-internal-delay-ps not valid for the T7
- 0 dropped from rx-internal-delay-ps; vendor delay
properties explicitly false for the T7
- init_delays callback; the old parsing moved into the older-SoC
function, marked not for new SoCs; patch 4 renamed
- VIM4 without tx-internal-delay-ps, the PHY TX delay works
- Meson8m2 moved to the dwmac-3.70a list; its boards warn in
dtbs_check until Martin's dtsi patch lands
- the delay table in ethernet-controller.yaml dropped
- Martin's Reviewed-by on patch 3
Changes since v2:
- the controller-side delays are applied on a T7-only path instead of
changing every Amlogic board (Andrew); the PHY mode left over comes
from phy_fix_phy_mode_for_mac_delays() (Maxime)
- tx-internal-delay-ps is checked against the four values the hardware
has, in the binding and in the driver, instead of being truncated
(Sashiko)
- amlogic,tx-delay-ns and amlogic,rx-delay-ns are not valid for the T7
(Neil, Andrew)
- the on-chip PHY no longer carries max-speed, phylib reads what the
chip reports (Andrew); same for the RTL8211F on the VIM4
- the PHY interrupt line, GPIOH_6, is described on the VIM4 (Sashiko)
- new: the T7 node owns sys_ethphy as "pclk", see above
- new patch 8: the delay ownership table in ethernet-controller.yaml
- no longer RFC
- Conor's Acked-by dropped from patch 2 and Neil's Reviewed-by from
patch 6, as both patches changed. Patches 1, 3 and 5 only moved in
the series, so their tags stay.
Changes since v1:
- new patch 1: honour tx-internal-delay-ps and rx-internal-delay-ps in
the rgmii-*id modes, and pass the PHY whatever delay is left over
- vim4: phy-mode rgmii -> rgmii-id, and amlogic,tx-delay-ns plus
rx-internal-delay-ps replaced by tx-internal-delay-ps = <2000>.
Neil's Reviewed-by dropped from this one, the change is not cosmetic
Lucas Tanure (7):
dt-bindings: net: amlogic,meson-dwmac: list the compatible
combinations
dt-bindings: net: amlogic,meson-dwmac: add amlogic,t7-dwmac
net: stmmac: dwmac-meson8b: add support for the Amlogic T7
net: stmmac: dwmac-meson8b: follow the generic RGMII delay rules on
the T7
arm64: dts: amlogic: t7: add the ethernet pinctrl nodes
arm64: dts: amlogic: t7: add the ethernet controller
arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port
.../bindings/net/amlogic,meson-dwmac.yaml | 89 +++++++++--
.../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 19 +++
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 88 +++++++++++
.../ethernet/stmicro/stmmac/dwmac-meson8b.c | 139 +++++++++++++-----
4 files changed, 284 insertions(+), 51 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-22 20:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 20:06 Lucas Tanure [this message]
2026-10-22 20:06 ` [PATCH v4 1/7] dt-bindings: net: amlogic,meson-dwmac: list the compatible combinations Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 2/7] dt-bindings: net: amlogic,meson-dwmac: add amlogic,t7-dwmac Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 3/7] net: stmmac: dwmac-meson8b: add support for the Amlogic T7 Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 4/7] net: stmmac: dwmac-meson8b: follow the generic RGMII delay rules on the T7 Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 5/7] arm64: dts: amlogic: t7: add the ethernet pinctrl nodes Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 6/7] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure
2026-10-22 20:06 ` [PATCH v4 7/7] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure
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=20261022200640.3101932-1-tanure@linux.com \
--to=tanure@linux.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=xianwei.zhao@amlogic.com \
/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
all inboxes | Powered by JetHome®