Re: [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port
From: Lucas Tanure
Date: Thu Nov 26 2026 - 07:49:40 EST
On Wed, Nov 25, 2026 at 2:53 PM <netdev-bot+sashiko@xxxxxxxxxx> 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