Skip to content

Add ethernet support for the Amlogic T7

Lucas Tanure linux-amlogic linux-arm-kernel linux-devicetree lkml netdev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest7 patches 7 repliesIn review
  2. v67 patches 3 repliesSuperseded
  3. v57 patches 8 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v47 patches11 repliesSuperseded
v38 patches19 repliesSuperseded
v2 RFC7 patches16 repliesSuperseded
v1 RFC6 patches12 repliesSuperseded

Changes in v7 from the cover letter

- no Assisted-by trailer (Krzysztof)
- patch 2: the T7 gets a binding file of its own (Rob, Sashiko); the pclk description names the glue registers (Krzysztof); rx-internal-delay-ps as constraints, default 0, maximum 3000, multipleOf 200 (Rob); tx-internal-delay-ps stays false, the meta-schema refuses "not" on a top-level property, so the reason is a comment above it (Rob); "snps,dwmac" dropped from the compatible list (Rob)
- patch 6: "snps,dwmac" dropped from the node (Rob)
- patch 4: Andrew's Reviewed-by

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7dt-bindings: net: amlogic,meson-dwmac: list the compatible combinationsDocumentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml+14 -151 reply
2/7dt-bindings: net: add amlogic,t7-dwmacDocumentation/devicetree/bindings/net/amlogic,t7-dwmac.yaml+112 -02 replies
3/7net: stmmac: dwmac-meson8b: add support for the Amlogic T7drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c+19 -00 replies
4/7net: stmmac: dwmac-meson8b: follow the generic RGMII delay rules on the T7drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c+41 -11 reply
5/7arm64: dts: amlogic: t7: add the ethernet pinctrl nodesarch/arm64/boot/dts/amlogic/amlogic-t7.dtsi+30 -01 reply
6/7arm64: dts: amlogic: t7: add the ethernet controllerarch/arm64/boot/dts/amlogic/amlogic-t7.dtsi+58 -01 reply
7/7arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet portarch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts+23 -01 reply

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchConor DooleyNeil ArmstrongMaxime ChevallierMartin BlumenstinglAndrew Lunn
1/7A-b R-b
2/7A-b
3/7R-b R-b R-b
4/7R-b R-b
5/7R-b R-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/7] Add ethernet support for the Amlogic T7

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.

Tested on v7.4-rc2 on the Khadas VIM4: 942/940Mbit/s with iperf3, no error.

Changes since v6:
- no Assisted-by trailer (Krzysztof)
- patch 2: the T7 gets a binding file of its own (Rob, Sashiko); the pclk description names the glue registers (Krzysztof); rx-internal-delay-ps as constraints, default 0, maximum 3000, multipleOf 200 (Rob); tx-internal-delay-ps stays false, the meta-schema refuses "not" on a top-level property, so the reason is a comment above it (Rob); "snps,dwmac" dropped from the compatible list (Rob)
- patch 6: "snps,dwmac" dropped from the node (Rob)
- patch 4: Andrew's Reviewed-by

Changes since v5:
- patch 2: the T7 block follows the Meson8b..G12A block instead of splitting it in two; default: 0 for rx-internal-delay-ps on the T7 (Sashiko). The explicit false lines stay, as asked in review.

Changes since v4:
- patch 4: the old delay code is left untouched; the T7 only gets a callback of its own, and the probe parsing it shares validates the RX value (Andrew); no NULL check on the callback (Martin)
- 0 accepted for rx-internal-delay-ps, the T7 joins the G12A list (Andrew)
- comment on the deprecated vendor delay properties (Andrew)
- the MDIO mux and the on-chip PHY bus start disabled in the dtsi; the VIM4 enables the mux (Sashiko)

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 (Andrew)
- 0 dropped from rx-internal-delay-ps (Martin); vendor delay properties explicitly false for the T7 (Andrew)
- init_delays callback; patch 4 renamed (Martin, Andrew)
- VIM4 without tx-internal-delay-ps, the PHY TX delay works (Martin)
- Meson8m2 moved to the dwmac-3.70a list; its boards warn in dtbs_check until Martin's dtsi patch lands (Martin, Conor)
- the delay table in ethernet-controller.yaml dropped
- Martin's Reviewed-by on patch 3

Changes since v2:
- T7-only delay path (Andrew), PHY mode from phy_fix_phy_mode_for_mac_delays() (Maxime)
- tx-internal-delay-ps checked against the hardware values (Sashiko)
- vendor delay properties not valid for the T7 (Neil, Andrew)
- no max-speed on either PHY (Andrew); VIM4 PHY interrupt on GPIOH_6 (Sashiko)
- the T7 node owns sys_ethphy as "pclk"
- no longer RFC; Conor's Ack dropped from patch 2 and Neil's R-b from patch 6

Changes since v1:
- the driver honours the generic delay properties; VIM4 moved to rgmii-id with tx-internal-delay-ps = <2000>, Neil's R-b dropped

Lucas Tanure (7):
dt-bindings: net: amlogic,meson-dwmac: list the compatible
combinations
dt-bindings: net: 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     |  29 +++--
 .../bindings/net/amlogic,t7-dwmac.yaml        | 112 ++++++++++++++++++
 .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts |  23 ++++
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi   |  88 ++++++++++++++
 .../ethernet/stmicro/stmmac/dwmac-meson8b.c   |  61 +++++++++-
 5 files changed, 297 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/amlogic,t7-dwmac.yaml

base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea

Signature · 1 line
2.56.1