* [PATCH v8 0/4] Add ethernet support for the Amlogic T7
@ 2026-11-21 21:30 Lucas Tanure
2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Lucas Tanure @ 2026-11-21 21:30 UTC (permalink / raw)
To: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue
Cc: netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel
Patches 1 to 4 of v7, the bindings and the driver, are in net-next:
2297f88ce0b8 dt-bindings: net: amlogic,meson-dwmac: list the compatible combinations
18029931478b dt-bindings: net: add amlogic,t7-dwmac
c4c851a3325e net: stmmac: dwmac-meson8b: add support for the Amlogic T7
4fdc7da7e13d net: stmmac: dwmac-meson8b: follow the generic RGMII delay rules on the T7
This version carries the rest: a new binding patch for the MDIO
multiplexer, and the three device tree patches. Patch 1 is for netdev,
patches 2 to 4 for the Amlogic tree; the device tree patches build
without the driver part.
The T7 has the same ethernet glue as the G12A. The glue registers sit
in a block gated by sys_ethphy, so the controller node lists that
clock as "pclk", and the pipeline stage between the controller and the
DRAM has a gate of its own, listed as well. The MDIO multiplexer gets a
T7 compatible with the G12A one as fallback. The VIM4 is plain
rgmii-id, with the PHY at the address its pins strap.
Tested on v7.4-rc2 on the Khadas VIM4 with the PHY at address 1:
941/944Mbit/s with iperf3, no error. A scan of the bus shows the
PHY at 0 and at 1 and nothing else.
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 v7:
- patches 1 to 4 of v7 are in net-next and are not resent; the
numbers below are the new ones
- new patch 1: the MDIO multiplexer binding gets "amlogic,t7-mdio-mux"
with the G12A compatible as fallback, and patch 3 uses it in the
multiplexer node (Martin)
- patch 4: the VIM4 PHY node uses address 1, where the PHY is strapped;
address 0 only worked through the RTL8211F broadcast address (Martin)
- patch 2: Martin's Reviewed-by
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 (4):
dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible
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,g12a-mdio-mux.yaml | 6 +-
.../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 23 +++++
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 88 +++++++++++++++++++
3 files changed, 116 insertions(+), 1 deletion(-)
base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea
--
2.56.1
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible 2026-11-21 21:30 [PATCH v8 0/4] Add ethernet support for the Amlogic T7 Lucas Tanure @ 2026-11-21 21:30 ` Lucas Tanure 2026-11-22 14:37 ` Krzysztof Kozlowski 2026-11-24 20:45 ` Martin Blumenstingl 2026-11-21 21:31 ` [PATCH v8 2/4] arm64: dts: amlogic: t7: add the ethernet pinctrl nodes Lucas Tanure ` (2 subsequent siblings) 3 siblings, 2 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-21 21:30 UTC (permalink / raw) To: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue Cc: netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel The T7 has the same management bus multiplexer as the G12A, in front of the same on-chip 100M PHY, and the G12A driver runs it unchanged. But a device tree that names only the G12A string leaves no way to tell the two apart later: if a difference between the two blocks turns up, every T7 board would have to change its compatible to get the fix. Give the T7 a compatible of its own with the G12A one as fallback, so the existing driver keeps binding and a T7-specific match can be added without touching the boards. Signed-off-by: Lucas Tanure <tanure@linux.com> --- .../devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml b/Documentation/devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml index ec5c038ce6a0..ad95562d1f3b 100644 --- a/Documentation/devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml +++ b/Documentation/devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml @@ -19,7 +19,11 @@ allOf: properties: compatible: - const: amlogic,g12a-mdio-mux + oneOf: + - const: amlogic,g12a-mdio-mux + - items: + - const: amlogic,t7-mdio-mux + - const: amlogic,g12a-mdio-mux reg: maxItems: 1 -- 2.56.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible 2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure @ 2026-11-22 14:37 ` Krzysztof Kozlowski 2026-11-24 20:45 ` Martin Blumenstingl 1 sibling, 0 replies; 16+ messages in thread From: Krzysztof Kozlowski @ 2026-11-22 14:37 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Sat, Nov 21, 2026 at 09:30:59PM +0000, Lucas Tanure wrote: > The T7 has the same management bus multiplexer as the G12A, in front > of the same on-chip 100M PHY, and the G12A driver runs it unchanged. > But a device tree that names only the G12A string leaves no way to > tell the two apart later: if a difference between the two blocks > turns up, every T7 board would have to change its compatible to get > the fix. > > Give the T7 a compatible of its own with the G12A one as fallback, so > the existing driver keeps binding and a T7-specific match can be added > without touching the boards. Drop paragraph, no need to explain obvious schema and driver is irrelevant here. > > Signed-off-by: Lucas Tanure <tanure@linux.com> > --- > .../devicetree/bindings/net/amlogic,g12a-mdio-mux.yaml | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible 2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure 2026-11-22 14:37 ` Krzysztof Kozlowski @ 2026-11-24 20:45 ` Martin Blumenstingl 1 sibling, 0 replies; 16+ messages in thread From: Martin Blumenstingl @ 2026-11-24 20:45 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: > > The T7 has the same management bus multiplexer as the G12A, in front > of the same on-chip 100M PHY, and the G12A driver runs it unchanged. > But a device tree that names only the G12A string leaves no way to > tell the two apart later: if a difference between the two blocks > turns up, every T7 board would have to change its compatible to get > the fix. > > Give the T7 a compatible of its own with the G12A one as fallback, so > the existing driver keeps binding and a T7-specific match can be added > without touching the boards. > > Signed-off-by: Lucas Tanure <tanure@linux.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v8 2/4] arm64: dts: amlogic: t7: add the ethernet pinctrl nodes 2026-11-21 21:30 [PATCH v8 0/4] Add ethernet support for the Amlogic T7 Lucas Tanure 2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure @ 2026-11-21 21:31 ` Lucas Tanure 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure 2026-11-21 21:31 ` [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure 3 siblings, 0 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-21 21:31 UTC (permalink / raw) To: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue Cc: netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel The SoC brings its ethernet interface out on bank Z, but no pin groups were described, so a board had no way to hand those pins over to the MAC. Describe them as the two sets a board actually needs: the nine pins the interface always uses, and the five extra ones RGMII adds for its wider data path. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Lucas Tanure <tanure@linux.com> --- arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi index 6894c06a836b..7bd53ec16607 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi @@ -376,6 +376,36 @@ }; }; + eth_pins: eth { + mux { + groups = "eth_mdio", + "eth_mdc", + "eth_rgmii_rx_clk", + "eth_rx_dv", + "eth_rxd0", + "eth_rxd1", + "eth_txen", + "eth_txd0", + "eth_txd1"; + function = "eth"; + drive-strength-microamp = <4000>; + bias-disable; + }; + }; + + eth_rgmii_pins: eth-rgmii { + mux { + groups = "eth_rxd2_rgmii", + "eth_rxd3_rgmii", + "eth_rgmii_tx_clk", + "eth_txd2_rgmii", + "eth_txd3_rgmii"; + function = "eth"; + drive-strength-microamp = <4000>; + bias-disable; + }; + }; + i2c0_ao_d_pins: i2c0-ao-d { mux { groups = "i2c0_ao_sck_d", -- 2.56.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-21 21:30 [PATCH v8 0/4] Add ethernet support for the Amlogic T7 Lucas Tanure 2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure 2026-11-21 21:31 ` [PATCH v8 2/4] arm64: dts: amlogic: t7: add the ethernet pinctrl nodes Lucas Tanure @ 2026-11-21 21:31 ` Lucas Tanure 2026-11-24 20:46 ` Martin Blumenstingl ` (2 more replies) 2026-11-21 21:31 ` [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure 3 siblings, 3 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-21 21:31 UTC (permalink / raw) To: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue Cc: netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel The SoC has a Synopsys gigabit MAC, glue registers for the interface type and clock timing, and a multiplexer that points the management bus at the on-chip 100M PHY or the external pins. None of it was described. The controller reaches memory through a pipeline stage with a gate nothing else claims, so it is switched off as unused. The glue registers share a clock with the multiplexer, which probes after the controller has programmed them: unless the controller holds that clock, the writes are lost and the port keeps the bootloader's delays. The multiplexer and the on-chip PHY bus start disabled: a board enables the multiplexer with the controller, and the on-chip bus only when it uses that PHY. Signed-off-by: Lucas Tanure <tanure@linux.com> --- arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi index 7bd53ec16607..eb7f46c98b0b 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi @@ -250,6 +250,31 @@ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; }; + ethmac: ethernet@fdc00000 { + compatible = "amlogic,t7-dwmac", "snps,dwmac-5.10a"; + reg = <0x0 0xfdc00000 0x0 0x10000>, + <0x0 0xfe024000 0x0 0x8>; + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq"; + clocks = <&clkc_periphs CLKID_SYS_ETH>, + <&scmi_clk CLKID_FCLK_DIV2>, + <&mpll CLKID_MPLL2>, + <&clkc_periphs CLKID_SYS_AMPIPE_ETH>, + <&clkc_periphs CLKID_SYS_ETHPHY>; + clock-names = "stmmaceth", "clkin0", "clkin1", "pipeline", + "pclk"; + power-domains = <&pwrc PWRC_T7_ETH_ID>; + rx-fifo-depth = <4096>; + tx-fifo-depth = <2048>; + status = "disabled"; + + mdio0: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + apb4: bus@fe000000 { compatible = "simple-bus"; reg = <0x0 0xfe000000 0x0 0x480000>; @@ -645,6 +670,39 @@ <10 11 12 13 14 15 16 17 18 19 20 21>; }; + eth_phy: mdio-multiplexer@28000 { + compatible = "amlogic,t7-mdio-mux", "amlogic,g12a-mdio-mux"; + reg = <0x0 0x28000 0x0 0xa4>; + clocks = <&clkc_periphs CLKID_SYS_ETHPHY>, + <&xtal>, + <&scmi_clk CLKID_FCLK_50M>; + clock-names = "pclk", "clkin0", "clkin1"; + mdio-parent-bus = <&mdio0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + ext_mdio: mdio@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + int_mdio: mdio@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + internal_ephy: ethernet-phy@8 { + compatible = "ethernet-phy-id0180.3301", + "ethernet-phy-ieee802.3-c22"; + interrupts = <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>; + reg = <8>; + }; + }; + }; + uart_a: serial@78000 { compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart"; reg = <0x0 0x78000 0x0 0x18>; -- 2.56.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure @ 2026-11-24 20:46 ` Martin Blumenstingl 2026-11-24 21:37 ` Martin Blumenstingl 2026-11-25 14:52 ` netdev-bot+sashiko 2 siblings, 0 replies; 16+ messages in thread From: Martin Blumenstingl @ 2026-11-24 20:46 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: > > The SoC has a Synopsys gigabit MAC, glue registers for the interface > type and clock timing, and a multiplexer that points the management bus > at the on-chip 100M PHY or the external pins. None of it was described. > > The controller reaches memory through a pipeline stage with a gate > nothing else claims, so it is switched off as unused. The > glue registers share a clock with the multiplexer, which probes after > the controller has programmed them: unless the controller holds that > clock, the writes are lost and the port keeps the > bootloader's delays. > > The multiplexer and the on-chip PHY bus start disabled: a board enables > the multiplexer with the controller, and the on-chip bus only when it > uses that PHY. > > Signed-off-by: Lucas Tanure <tanure@linux.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Also I checked sashiko's comments: those seem to show up because it didn't see the patches in net-next (not sure if/how it should know) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure 2026-11-24 20:46 ` Martin Blumenstingl @ 2026-11-24 21:37 ` Martin Blumenstingl 2026-11-24 21:38 ` Martin Blumenstingl 2026-11-26 11:44 ` Lucas Tanure 2026-11-25 14:52 ` netdev-bot+sashiko 2 siblings, 2 replies; 16+ messages in thread From: Martin Blumenstingl @ 2026-11-24 21:37 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: [...] > + int_mdio: mdio@1 { > + reg = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; Lucas, Igor (+Cc) has taken a closer look at the MDIO mux, see [0] What he's saying is that (in my own words): - status = "disabled" is unnecessary - if you had problems without status = "disabled": Igor's patch should fix it, can you please test it? [0] https://lore.kernel.org/linux-amlogic/20261124-re-martin-g12a-mux-t7@iav.lv/T/#m240f885979c7c3a84af26ee8b60d38f3092f0c0a ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-24 21:37 ` Martin Blumenstingl @ 2026-11-24 21:38 ` Martin Blumenstingl 2026-11-26 11:44 ` Lucas Tanure 1 sibling, 0 replies; 16+ messages in thread From: Martin Blumenstingl @ 2026-11-24 21:38 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel, iav On Tue, Nov 24, 2026 at 10:37 PM Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote: > > On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: > [...] > > + int_mdio: mdio@1 { > > + reg = <1>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + status = "disabled"; > Lucas, Igor (+Cc) has taken a closer look at the MDIO mux, see [0] Sorry, I forgot to Cc him :-( Now he's actually looped in ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-24 21:37 ` Martin Blumenstingl 2026-11-24 21:38 ` Martin Blumenstingl @ 2026-11-26 11:44 ` Lucas Tanure 1 sibling, 0 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-26 11:44 UTC (permalink / raw) To: Martin Blumenstingl Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Tue, Nov 24, 2026 at 9:37 PM Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote: > > On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: > [...] > > + int_mdio: mdio@1 { > > + reg = <1>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + status = "disabled"; > Lucas, Igor (+Cc) has taken a closer look at the MDIO mux, see [0] > What he's saying is that (in my own words): > - status = "disabled" is unnecessary > - if you had problems without status = "disabled": Igor's patch should > fix it, can you please test it? > > > [0] https://lore.kernel.org/linux-amlogic/20261124-re-martin-g12a-mux-t7@iav.lv/T/#m240f885979c7c3a84af26ee8b60d38f3092f0c0a I never saw a problem without it. v1 to v4 had the on-chip bus enabled and the VIM4 ran at full speed. v5 disabled it after a review comment, so that a board enables only the bus it uses, and Igor calls that ordinary practice for a new SoC. I am fine either way: keep the line, or drop it in v9 if you prefer. Tested Igor's patch on the VIM4 on linux-next (next-20261120, which has it and the T7 driver) with the on-chip bus enabled, the MAC on the external RTL8211F: - both buses come up, mdio_mux-0.0:01 (RTL8211F, the MAC's PHY) and mdio_mux-0.1:08 (Meson G12A Internal PHY); link 1Gbps/Full; ETH_PHY_CNTL2 reads 0x0 after the attach - while receiving 942 Mbit/s with iperf3, I unbound and re-bound the internal PHY driver twice (phy_probe reads the PHY through the mux): after each bind ETH_PHY_CNTL2 reads 0x40, SMI_SRC_MAC only, USE_INTERNAL and RX_CLK_EPHY clear - the stream kept 941 to 942 Mbit/s in every 2 s interval, 0 retransmits, 0 errors in 2.4M received packets, and receive keeps running with the register left at 0x40 So the data path stays on the external PHY across an internal access, on the T7 as well. Lucas ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure 2026-11-24 20:46 ` Martin Blumenstingl 2026-11-24 21:37 ` Martin Blumenstingl @ 2026-11-25 14:52 ` netdev-bot+sashiko 2026-11-26 12:48 ` Lucas Tanure 2 siblings, 1 reply; 16+ messages in thread From: netdev-bot+sashiko @ 2026-11-25 14:52 UTC (permalink / raw) To: tanure Cc: xianwei.zhao, andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, neil.armstrong, khilman, jbrunet, martin.blumenstingl, maxime.chevallier, mcoquelin.stm32, alexandre.torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider. Critical: 0 · High: 2 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [High] No driver or binding in the tree accepts the new ethmac node's compatible pair, "amlogic,t7-dwmac" + "snps,dwmac-5.10a". - [High] The commit message names two problems and claims this patch handles them: 1. - [Medium] The T7 MAC is declared as "snps,dwmac-5.10a". -- arm64: dts: amlogic: t7: add the ethernet controller This patch adds the T7 Synopsys MAC node, its PRG_ETH glue registers, and a g12a-compatible MDIO multiplexer to amlogic-t7.dtsi. The multiplexer also gets an internal PHY bus. The MAC, the multiplexer and the internal PHY bus are all disabled by default. > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > index 7bd53ec166071..eb7f46c98b0b4 100644 > --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > @@ -250,6 +250,31 @@ gic: interrupt-controller@fff01000 { > interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; > }; > > + ethmac: ethernet@fdc00000 { > + compatible = "amlogic,t7-dwmac", "snps,dwmac-5.10a"; [Severity: High] Which driver is expected to bind this node? I can't find anything in the tree that accepts either compatible string. meson8b_dwmac_match[] in drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c lists only the meson8b, meson8m2, meson-gxbb, meson-axg and meson-g12a compatibles. This node has no G12A or AXG fallback. dwmac_generic_match[] in dwmac-generic.c stops at snps,dwmac-4.10a. The only use of "snps,dwmac-5.10a" is the stmmac_gmac4_compats[] feature-detection list in stmmac_platform.c. That list is only consulted after some driver has already bound. The later patch "arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port" sets ethmac and eth_phy to okay. Wouldn't the board then end up without ethernet? meson8b_init_rgmii_delays(), set_phy_mode() and meson8b_init_prg_eth() only run from meson8b_dwmac_probe(). So the PRG_ETH registers at 0xfe024000 keep the bootloader's interface mode and delays. The stmmac MDIO bus for mdio0 is never registered either. That makes g12a_mdio_mux_probe()->mdio_mux_init() on mdio-parent-bus = <&mdio0> return -EPROBE_DEFER forever. The node also looks like it fails dtbs_check against amlogic,meson-dwmac.yaml: - select has no T7 string. - The fallback contains list only allows snps,dwmac-3.70a or snps,dwmac. - clock-names is fixed to stmmaceth/clkin0/clkin1/timing-adjustment. The commit message says the multiplexer "probes after the controller has programmed them" and that "unless the controller holds that clock, the writes are lost". No driver in the tree does that for this node, and this series only adds a T7 binding for the MDIO mux. Is there a dt-bindings patch and a driver match patch that this depends on and should mention? [Severity: Medium] Is snps,dwmac-5.10a the right IP version for this MAC? The string is in stmmac_gmac4_compats[], so stmmac would drive the core with the GMAC4/5 register map and descriptor format. The S4 node in meson-s4.dtsi seems to describe the same block. It has: - the MAC at 0xfdc00000 and the glue at 0xfe024000 - macirq on GIC_SPI 74 - the same rx and tx fifo depths - an ETH power domain - a g12a-compatible mux at apb+0x28000 But it declares the core as 3.70a: compatible = "amlogic,meson-axg-dwmac", "snps,dwmac-3.70a", "snps,dwmac"; If the T7 core is also 3.70a, then once a driver binds, stmmac would read the version register at the wrong offset. It would also use the wrong DMA and descriptor layout. Could the version be checked against the hardware version register (0x20 on 3.x, 0x110 on 4.x and later) and stated in the commit message? > + reg = <0x0 0xfdc00000 0x0 0x10000>, > + <0x0 0xfe024000 0x0 0x8>; > + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "macirq"; > + clocks = <&clkc_periphs CLKID_SYS_ETH>, > + <&scmi_clk CLKID_FCLK_DIV2>, > + <&mpll CLKID_MPLL2>, > + <&clkc_periphs CLKID_SYS_AMPIPE_ETH>, > + <&clkc_periphs CLKID_SYS_ETHPHY>; > + clock-names = "stmmaceth", "clkin0", "clkin1", "pipeline", > + "pclk"; [Severity: High] The commit message says the pipeline gate "is switched off as unused", and that the controller has to hold the clock it shares with the glue registers. Does listing these two clocks here keep either of them enabled? Nothing under drivers/net requests a "pipeline" clock: - stmmac_probe_config_dt() only gets stmmaceth, pclk and ptp_ref. - meson8b_dwmac_probe() only gets "timing-adjustment", plus clkin0 and clkin1 as mux parents. The only "pipeline" consumer in the tree is meson-gx-mmc.c, and it claims the clock explicitly with devm_clk_get_enabled(). Also, t7_sys_ampipe_eth is declared without CLK_IGNORE_UNUSED: drivers/clk/meson/t7-peripherals.c: static T7_SYS_PCLK(sys_ampipe_eth, SYS_CLK_EN0_REG0, 20, 0); Even after a T7 entry is added to dwmac-meson8b, wouldn't clk_disable_unused still gate CLKID_SYS_AMPIPE_ETH? That would cut the MAC's DMA path to memory. For CLKID_SYS_ETHPHY, the mux is the only holder until a MAC driver binds this node: drivers/net/mdio/mdio-mux-meson-g12a.c:g12a_mdio_mux_probe() { ... pclk = devm_clk_get_enabled(dev, "pclk"); ... } That reference is dropped whenever the mux probe defers or fails. This looks like the same ordering hazard the commit message says it closes. The five-entry clock-names list also doesn't match amlogic,meson-dwmac.yaml. That schema allows at most four entries, with index 3 being timing-adjustment. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121213102.143130-1-tanure%40linux.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller 2026-11-25 14:52 ` netdev-bot+sashiko @ 2026-11-26 12:48 ` Lucas Tanure 0 siblings, 0 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-26 12:48 UTC (permalink / raw) To: netdev-bot+sashiko Cc: xianwei.zhao, andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, neil.armstrong, khilman, jbrunet, martin.blumenstingl, maxime.chevallier, mcoquelin.stm32, alexandre.torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Wed, Nov 25, 2026 at 2:53 PM <netdev-bot+sashiko@kernel.org> wrote: > > Thank you for your contribution! Sashiko AI review found 3 potential > issue(s) to consider. > > Critical: 0 · High: 2 · Medium: 1 · Low: 0 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [High] No driver or binding in the tree accepts the new ethmac node's > compatible pair, "amlogic,t7-dwmac" + "snps,dwmac-5.10a". They are in net-next since 2026-11-20, from v7 of this series: 18029931478b ("dt-bindings: net: add amlogic,t7-dwmac") documents the compatible pair and the five clocks, and c4c851a3325e ("net: stmmac: dwmac-meson8b: add support for the Amlogic T7") matches amlogic,t7-dwmac. The cover letter lists all four commits. This device tree patch goes through the Amlogic tree. > - [High] The commit message names two problems and claims this patch > handles them: 1. Same commits: the driver claims the pipeline clock with devm_clk_get_enabled(), and the stmmac core takes "pclk" in stmmac_probe_config_dt() and enables it in stmmac_bus_clks_config(). Once the MAC probes, the node holds both clocks; the multiplexer's own reference to pclk is no longer the only one. > - [Medium] The T7 MAC is declared as "snps,dwmac-5.10a". It is a 5.10a core. The A311D2 datasheet (section 14.3) says so, the version register at 0x110 reads 0x1251 on the VIM4 (User ID 0x12, Synopsys ID 0x51, printed by stmmac at probe), and the GMAC4/5 DMA and descriptor layout moves 941/944 Mbit/s with no error. The S4 node describes another SoC. pw-bot: cr > > -- > > arm64: dts: amlogic: t7: add the ethernet controller > > This patch adds the T7 Synopsys MAC node, its PRG_ETH glue registers, and > a g12a-compatible MDIO multiplexer to amlogic-t7.dtsi. The multiplexer > also gets an internal PHY bus. The MAC, the multiplexer and the internal > PHY bus are all disabled by default. > > > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > > index 7bd53ec166071..eb7f46c98b0b4 100644 > > --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > > +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > > @@ -250,6 +250,31 @@ gic: interrupt-controller@fff01000 { > > interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; > > }; > > > > + ethmac: ethernet@fdc00000 { > > + compatible = "amlogic,t7-dwmac", "snps,dwmac-5.10a"; > > [Severity: High] > Which driver is expected to bind this node? I can't find anything in the > tree that accepts either compatible string. > > meson8b_dwmac_match[] in drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c > lists only the meson8b, meson8m2, meson-gxbb, meson-axg and meson-g12a > compatibles. This node has no G12A or AXG fallback. > > dwmac_generic_match[] in dwmac-generic.c stops at snps,dwmac-4.10a. The > only use of "snps,dwmac-5.10a" is the stmmac_gmac4_compats[] > feature-detection list in stmmac_platform.c. That list is only consulted > after some driver has already bound. > > The later patch "arm64: dts: amlogic: t7: khadas-vim4: enable the > ethernet port" sets ethmac and eth_phy to okay. Wouldn't the board then > end up without ethernet? > > meson8b_init_rgmii_delays(), set_phy_mode() and meson8b_init_prg_eth() > only run from meson8b_dwmac_probe(). So the PRG_ETH registers at > 0xfe024000 keep the bootloader's interface mode and delays. > > The stmmac MDIO bus for mdio0 is never registered either. That makes > g12a_mdio_mux_probe()->mdio_mux_init() on mdio-parent-bus = <&mdio0> > return -EPROBE_DEFER forever. > > The node also looks like it fails dtbs_check against > amlogic,meson-dwmac.yaml: > > - select has no T7 string. > - The fallback contains list only allows snps,dwmac-3.70a or snps,dwmac. > - clock-names is fixed to stmmaceth/clkin0/clkin1/timing-adjustment. > > The commit message says the multiplexer "probes after the controller has > programmed them" and that "unless the controller holds that clock, the > writes are lost". No driver in the tree does that for this node, and this > series only adds a T7 binding for the MDIO mux. > > Is there a dt-bindings patch and a driver match patch that this depends > on and should mention? > > [Severity: Medium] > Is snps,dwmac-5.10a the right IP version for this MAC? The string is in > stmmac_gmac4_compats[], so stmmac would drive the core with the GMAC4/5 > register map and descriptor format. > > The S4 node in meson-s4.dtsi seems to describe the same block. It has: > > - the MAC at 0xfdc00000 and the glue at 0xfe024000 > - macirq on GIC_SPI 74 > - the same rx and tx fifo depths > - an ETH power domain > - a g12a-compatible mux at apb+0x28000 > > But it declares the core as 3.70a: > > compatible = "amlogic,meson-axg-dwmac", > "snps,dwmac-3.70a", > "snps,dwmac"; > > If the T7 core is also 3.70a, then once a driver binds, stmmac would read > the version register at the wrong offset. It would also use the wrong DMA > and descriptor layout. > > Could the version be checked against the hardware version register (0x20 > on 3.x, 0x110 on 4.x and later) and stated in the commit message? > > > + reg = <0x0 0xfdc00000 0x0 0x10000>, > > + <0x0 0xfe024000 0x0 0x8>; > > + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; > > + interrupt-names = "macirq"; > > + clocks = <&clkc_periphs CLKID_SYS_ETH>, > > + <&scmi_clk CLKID_FCLK_DIV2>, > > + <&mpll CLKID_MPLL2>, > > + <&clkc_periphs CLKID_SYS_AMPIPE_ETH>, > > + <&clkc_periphs CLKID_SYS_ETHPHY>; > > + clock-names = "stmmaceth", "clkin0", "clkin1", "pipeline", > > + "pclk"; > > [Severity: High] > The commit message says the pipeline gate "is switched off as unused", > and that the controller has to hold the clock it shares with the glue > registers. Does listing these two clocks here keep either of them > enabled? > > Nothing under drivers/net requests a "pipeline" clock: > > - stmmac_probe_config_dt() only gets stmmaceth, pclk and ptp_ref. > - meson8b_dwmac_probe() only gets "timing-adjustment", plus clkin0 and > clkin1 as mux parents. > > The only "pipeline" consumer in the tree is meson-gx-mmc.c, and it claims > the clock explicitly with devm_clk_get_enabled(). > > Also, t7_sys_ampipe_eth is declared without CLK_IGNORE_UNUSED: > > drivers/clk/meson/t7-peripherals.c: > static T7_SYS_PCLK(sys_ampipe_eth, SYS_CLK_EN0_REG0, 20, 0); > > Even after a T7 entry is added to dwmac-meson8b, wouldn't > clk_disable_unused still gate CLKID_SYS_AMPIPE_ETH? That would cut the > MAC's DMA path to memory. > > For CLKID_SYS_ETHPHY, the mux is the only holder until a MAC driver binds > this node: > > drivers/net/mdio/mdio-mux-meson-g12a.c:g12a_mdio_mux_probe() { > ... > pclk = devm_clk_get_enabled(dev, "pclk"); > ... > } > > That reference is dropped whenever the mux probe defers or fails. This > looks like the same ordering hazard the commit message says it closes. > > The five-entry clock-names list also doesn't match > amlogic,meson-dwmac.yaml. That schema allows at most four entries, with > index 3 being timing-adjustment. > > [ ... ] > > -- > Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121213102.143130-1-tanure%40linux.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port 2026-11-21 21:30 [PATCH v8 0/4] Add ethernet support for the Amlogic T7 Lucas Tanure ` (2 preceding siblings ...) 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure @ 2026-11-21 21:31 ` Lucas Tanure 2026-11-24 20:47 ` Martin Blumenstingl 2026-11-25 14:52 ` netdev-bot+sashiko 3 siblings, 2 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-21 21:31 UTC (permalink / raw) To: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue Cc: netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel The board carries a Realtek RTL8211F gigabit PHY on the external management bus, connected to the MAC over RGMII. Its address pins strap it to 1; it also answers on 0, the RTL8211F broadcast address, so the vendor tree lists 0. Enable the controller and the management bus multiplexer, hand the controller the ethernet pins and point it at the PHY. RGMII needs a delay on each of its two clocks. The board traces add none, so the PHY adds both, which is what rgmii-id asks of it. The PHY interrupt is on GPIOH_6, so link changes are reported, not polled. The reset is an RC network on the board, not a SoC pin: no reset line. Signed-off-by: Lucas Tanure <tanure@linux.com> --- .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts index 0fa83362b417..7b86ab2579aa 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts @@ -14,6 +14,7 @@ compatible = "khadas,vim4", "amlogic,a311d2", "amlogic,t7"; aliases { + ethernet0 = ðmac; serial0 = &uart_a; mmc0 = &sd_emmc_c; mmc1 = &sd_emmc_b; @@ -256,6 +257,28 @@ }; }; +ðmac { + status = "okay"; + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + phy-mode = "rgmii-id"; + phy-handle = <&external_phy>; +}; + +ð_phy { + status = "okay"; +}; + +&ext_mdio { + external_phy: ethernet-phy@1 { + /* Realtek RTL8211FD-CG */ + reg = <1>; + + interrupt-parent = <&gpio_intc>; + interrupts = <GPIOH_6 IRQ_TYPE_LEVEL_LOW>; + }; +}; + &i2c_m_ao_a { status = "okay"; pinctrl-0 = <&i2c0_ao_d_pins>; -- 2.56.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port 2026-11-21 21:31 ` [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure @ 2026-11-24 20:47 ` Martin Blumenstingl 2026-11-25 14:52 ` netdev-bot+sashiko 1 sibling, 0 replies; 16+ messages in thread From: Martin Blumenstingl @ 2026-11-24 20:47 UTC (permalink / raw) To: Lucas Tanure Cc: xianwei.zhao, Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Kevin Hilman, Jerome Brunet, Maxime Chevallier, Maxime Coquelin, Alexandre Torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Sat, Nov 21, 2026 at 10:31 PM Lucas Tanure <tanure@linux.com> wrote: > > The board carries a Realtek RTL8211F gigabit PHY on the external > management bus, connected to the MAC over RGMII. Its address pins > strap it to 1; it also answers on 0, the RTL8211F broadcast address, > so the vendor tree lists 0. > > Enable the controller and the management bus multiplexer, hand the > controller the ethernet pins and point it at the PHY. RGMII needs a > delay on each of its two clocks. The board traces add none, so the PHY > adds both, which is what rgmii-id asks of it. > > The PHY interrupt is on GPIOH_6, so link changes are reported, not > polled. The reset is an RC network on the board, not a SoC pin: no > reset line. > > Signed-off-by: Lucas Tanure <tanure@linux.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port 2026-11-21 21:31 ` [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure 2026-11-24 20:47 ` Martin Blumenstingl @ 2026-11-25 14:52 ` netdev-bot+sashiko 2026-11-26 12:49 ` Lucas Tanure 1 sibling, 1 reply; 16+ messages in thread From: netdev-bot+sashiko @ 2026-11-25 14:52 UTC (permalink / raw) To: tanure Cc: xianwei.zhao, andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, neil.armstrong, khilman, jbrunet, martin.blumenstingl, maxime.chevallier, mcoquelin.stm32, alexandre.torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The commit says it enables the Khadas VIM4 ethernet port. -- arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port This patch enables the T7 ethernet MAC and the MDIO multiplexer on the Khadas VIM4. It also describes the RTL8211F RGMII PHY at address 1 on the external MDIO bus, with its interrupt on GPIOH_6. With phy-mode = "rgmii-id", the PHY adds both RGMII delays. > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts > index 0fa83362b4179..7b86ab2579aaa 100644 > --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts > +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts [ ... ] > @@ -256,6 +257,28 @@ xtal: xtal-clk { > }; > }; > > +ðmac { > + status = "okay"; > + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; > + pinctrl-names = "default"; > + phy-mode = "rgmii-id"; > + phy-handle = <&external_phy>; > +}; > + > +ð_phy { > + status = "okay"; > +}; [Severity: Medium] Can any driver at this revision bind to the ethmac node this enables? The node in amlogic-t7.dtsi has: arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi: ethmac: ethernet@fdc00000 { compatible = "amlogic,t7-dwmac", "snps,dwmac-5.10a"; The amlogic,t7-dwmac string appears only in amlogic-t7.dtsi. The Amlogic glue driver's match table, meson8b_dwmac_match[] in dwmac-meson8b.c, ends at g12a: { .compatible = "amlogic,meson-g12a-dwmac", .data = &meson_g12a_dwmac_data, }, { } dwmac_generic_match[] in dwmac-generic.c ends at snps,dwmac-4.10a, plus snps,dwmac and the snps,dwxgmac entries. Under drivers/, the only place that names snps,dwmac-5.10a is stmmac_gmac4_compats[] in stmmac_platform.c. That list detects the core version. It is not an of_match_table. If nothing probes ethmac, its mdio0 child bus is never registered. The eth_phy mux enabled just above binds through the amlogic,g12a-mdio-mux fallback and has mdio-parent-bus = <&mdio0>. So mdio_mux_init() would defer on every attempt: drivers/net/mdio/mdio-mux.c:mdio_mux_init() { ... parent_bus = of_mdio_find_bus(parent_bus_node); if (!parent_bus) { ret_val = -EPROBE_DEFER; goto err_parent_bus; } ... } Wouldn't that leave ext_mdio and external_phy unregistered, so that phy-handle never resolves? Also, nothing would program the PRG_ETH glue window, which is the second reg region at 0xfe024000. That window holds the RGMII mode select, the clkin0/clkin1 TX clock mux and the MAC-side delays. Nothing would claim the pipeline clock (CLKID_SYS_AMPIPE_ETH) either. The previous patch in the series, "arm64: dts: amlogic: t7: add the ethernet controller", says this gate is otherwise turned off as unused. It also says the port keeps the bootloader's delays unless the controller programs them. amlogic,meson-dwmac.yaml does not document amlogic,t7-dwmac, so dtbs_check would report the now-enabled node as undocumented. Does this patch depend on a separate glue driver and binding series? If so, could the commit message name that prerequisite, or could this patch be sent together with it? [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121213102.143130-1-tanure%40linux.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port 2026-11-25 14:52 ` netdev-bot+sashiko @ 2026-11-26 12:49 ` Lucas Tanure 0 siblings, 0 replies; 16+ messages in thread From: Lucas Tanure @ 2026-11-26 12:49 UTC (permalink / raw) To: netdev-bot+sashiko Cc: xianwei.zhao, andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, neil.armstrong, khilman, jbrunet, martin.blumenstingl, maxime.chevallier, mcoquelin.stm32, alexandre.torgue, netdev, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel On Wed, Nov 25, 2026 at 2:53 PM <netdev-bot+sashiko@kernel.org> wrote: > > Thank you for your contribution! Sashiko AI review found 1 potential > issue(s) to consider. > > Critical: 0 · High: 0 · Medium: 1 · Low: 0 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [Medium] The commit says it enables the Khadas VIM4 ethernet port. > > -- > > arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port > > This patch enables the T7 ethernet MAC and the MDIO multiplexer on the > Khadas VIM4. It also describes the RTL8211F RGMII PHY at address 1 on the > external MDIO bus, with its interrupt on GPIOH_6. With phy-mode = > "rgmii-id", the PHY adds both RGMII delays. > > > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts > > index 0fa83362b4179..7b86ab2579aaa 100644 > > --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts > > +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts > > [ ... ] > > > @@ -256,6 +257,28 @@ xtal: xtal-clk { > > }; > > }; > > > > +ðmac { > > + status = "okay"; > > + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; > > + pinctrl-names = "default"; > > + phy-mode = "rgmii-id"; > > + phy-handle = <&external_phy>; > > +}; > > + > > +ð_phy { > > + status = "okay"; > > +}; > > [Severity: Medium] > Can any driver at this revision bind to the ethmac node this enables? Yes. c4c851a3325e ("net: stmmac: dwmac-meson8b: add support for the Amlogic T7"), in net-next since 2026-11-20, matches amlogic,t7-dwmac, and 18029931478b documents it; the cover letter lists both. Tested on this board on top of them: the PHY attaches at mdio_mux-0.0:01 and iperf3 runs at 941/944 Mbit/s. > > The node in amlogic-t7.dtsi has: > > arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi: > ethmac: ethernet@fdc00000 { > compatible = "amlogic,t7-dwmac", "snps,dwmac-5.10a"; > > The amlogic,t7-dwmac string appears only in amlogic-t7.dtsi. The Amlogic > glue driver's match table, meson8b_dwmac_match[] in dwmac-meson8b.c, ends > at g12a: > > { > .compatible = "amlogic,meson-g12a-dwmac", > .data = &meson_g12a_dwmac_data, > }, > { } > > dwmac_generic_match[] in dwmac-generic.c ends at snps,dwmac-4.10a, plus > snps,dwmac and the snps,dwxgmac entries. Under drivers/, the only place > that names snps,dwmac-5.10a is stmmac_gmac4_compats[] in > stmmac_platform.c. That list detects the core version. It is not an > of_match_table. > > If nothing probes ethmac, its mdio0 child bus is never registered. The > eth_phy mux enabled just above binds through the amlogic,g12a-mdio-mux > fallback and has mdio-parent-bus = <&mdio0>. So mdio_mux_init() would > defer on every attempt: > > drivers/net/mdio/mdio-mux.c:mdio_mux_init() { > ... > parent_bus = of_mdio_find_bus(parent_bus_node); > if (!parent_bus) { > ret_val = -EPROBE_DEFER; > goto err_parent_bus; > } > ... > } > > Wouldn't that leave ext_mdio and external_phy unregistered, so that > phy-handle never resolves? > > Also, nothing would program the PRG_ETH glue window, which is the second > reg region at 0xfe024000. That window holds the RGMII mode select, the > clkin0/clkin1 TX clock mux and the MAC-side delays. > > Nothing would claim the pipeline clock (CLKID_SYS_AMPIPE_ETH) either. The > previous patch in the series, "arm64: dts: amlogic: t7: add the ethernet > controller", says this gate is otherwise turned off as unused. It also > says the port keeps the bootloader's delays unless the controller > programs them. > > amlogic,meson-dwmac.yaml does not document amlogic,t7-dwmac, so > dtbs_check would report the now-enabled node as undocumented. > > Does this patch depend on a separate glue driver and binding series? If > so, could the commit message name that prerequisite, or could this patch > be sent together with it? > > [ ... ] > > -- > Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121213102.143130-1-tanure%40linux.com ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-11-26 12:49 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-21 21:30 [PATCH v8 0/4] Add ethernet support for the Amlogic T7 Lucas Tanure 2026-11-21 21:30 ` [PATCH v8 1/4] dt-bindings: net: amlogic,g12a-mdio-mux: add the T7 compatible Lucas Tanure 2026-11-22 14:37 ` Krzysztof Kozlowski 2026-11-24 20:45 ` Martin Blumenstingl 2026-11-21 21:31 ` [PATCH v8 2/4] arm64: dts: amlogic: t7: add the ethernet pinctrl nodes Lucas Tanure 2026-11-21 21:31 ` [PATCH v8 3/4] arm64: dts: amlogic: t7: add the ethernet controller Lucas Tanure 2026-11-24 20:46 ` Martin Blumenstingl 2026-11-24 21:37 ` Martin Blumenstingl 2026-11-24 21:38 ` Martin Blumenstingl 2026-11-26 11:44 ` Lucas Tanure 2026-11-25 14:52 ` netdev-bot+sashiko 2026-11-26 12:48 ` Lucas Tanure 2026-11-21 21:31 ` [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port Lucas Tanure 2026-11-24 20:47 ` Martin Blumenstingl 2026-11-25 14:52 ` netdev-bot+sashiko 2026-11-26 12:49 ` Lucas Tanure
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox