mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: tanure@linux.com
Cc: xianwei.zhao@amlogic.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, neil.armstrong@linaro.org,
	khilman@baylibre.com, jbrunet@baylibre.com,
	martin.blumenstingl@googlemail.com,
	maxime.chevallier@bootlin.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, 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: Re: [PATCH v8 4/4] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port
Date: Wed, 25 Nov 2026 14:52:58 +0000	[thread overview]
Message-ID: <179561837863.3135.7453763060716815613@kernel.org> (raw)
In-Reply-To: <20261121213102.143130-5-tanure@linux.com>

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 {
>  	};
>  };
>  
> +&ethmac {
> +	status = "okay";
> +	pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;
> +	pinctrl-names = "default";
> +	phy-mode = "rgmii-id";
> +	phy-handle = <&external_phy>;
> +};
> +
> +&eth_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

      parent reply	other threads:[~2026-11-25 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-25 14:52   ` netdev-bot+sashiko
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 [this message]

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=179561837863.3135.7453763060716815613@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --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=tanure@linux.com \
    --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®