From: netdev-bot+sashiko@kernel.org
To: jacky_chou@aspeedtech.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, ratbert@faraday-tech.com,
edumazet@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, andrew@lunn.ch
Subject: Re: [PATCH net-next v6 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
Date: Mon, 16 Nov 2026 13:54:13 +0000 [thread overview]
Message-ID: <179483725399.3136.620008593469473601@kernel.org> (raw)
In-Reply-To: <20261112-support_ast2700-v6-1-238020bf46cf@aspeedtech.com>
Thank you for your contribution! Sashiko AI review found 5 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 4
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] One of the new allOf conditionals in faraday,ftgmac100.yaml is
vacuously true.
- [Low] The commit message justifies the change partly with a false
claim.
- [Low] After this patch, properties/compatible is an enum of single
strings, so a two-string compatible list is invalid.
- [Low] The patch adds `clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>;` to
the binding example `ethernet@1e660000`, an aspeed,ast2500-mac node…
- [Low] For the plain faraday,ftgmac100 compatible, the new conditional
(lines 118-130) sets `clocks: false` and `clock-names: false`.
--
dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
This patch turns the aspeed,ast2400-mac, aspeed,ast2500-mac and
aspeed,ast2600-mac compatibles into standalone strings, so they no longer
need the faraday,ftgmac100 fallback. It also adds per-compatible limits on
clocks and clock-names. The examples now drop the fallback and list a MAC
clock.
> The aspeed,ast2400-mac, aspeed,ast2500-mac, and aspeed,ast2600-mac
> compatibles are currently only valid when paired with the generic
> "faraday,ftgmac100" fallback: if a node ever bound through the
> generic entry alone, ftgmac100_probe() would set
> rxdes0_edorr_mask/txdes0_edotr_mask to BIT(15) instead of the Aspeed
> BIT(30), skip Aspeed clock setup, and leave the DMA mask too narrow.
[Severity: Low]
Is the "leave the DMA mask too narrow" part accurate? At this commit,
drivers/net/ethernet/faraday/ftgmac100.c does not seem to contain any
dma_set_mask*() or DMA_BIT_MASK() call. That would mean the generic and
Aspeed entries get the same DMA mask.
Later in the series, the only DMA mask code is
dma_set_mask_and_coherent(..., DMA_BIT_MASK(35)), gated by
FTGMAC100_QUIRK_DMA_35BIT. Only ftgmac100_match_data_ast2700 sets that
quirk, so it doesn't cover ast2400/2500/2600 either.
Also, ftgmac100_probe() uses of_device_get_match_data(), which picks the
best match by position in the compatible list:
match_data = of_device_get_match_data(&pdev->dev);
So a node with "aspeed,ast2500-mac", "faraday,ftgmac100" always gets the
AST2500 match data and never the generic entry. The note below the cut
seems to say the same thing.
Could the commit message give the actual reason, that the Aspeed MACs
differ from the generic Faraday programming model (EDORR/EDOTR at BIT(30),
Aspeed clock setup), and drop the DMA mask claim?
> diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> index d14410018bcf6..9d352e3686aaf 100644
> --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> @@ -11,14 +11,11 @@ maintainers:
>
> properties:
> compatible:
> - oneOf:
> - - const: faraday,ftgmac100
> - - items:
> - - enum:
> - - aspeed,ast2400-mac
> - - aspeed,ast2500-mac
> - - aspeed,ast2600-mac
> - - const: faraday,ftgmac100
> + enum:
> + - faraday,ftgmac100
> + - aspeed,ast2400-mac
> + - aspeed,ast2500-mac
> + - aspeed,ast2600-mac
[Severity: Low]
Now that compatible is an enum of single strings, the two-string form no
longer validates. All of the in-tree MAC nodes still use it:
arch/arm/boot/dts/aspeed/aspeed-g4.dtsi (mac0, mac1):
compatible = "aspeed,ast2400-mac", "faraday,ftgmac100";
arch/arm/boot/dts/aspeed/aspeed-g5.dtsi (mac0, mac1):
compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi (mac0..mac3):
compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
Won't dtbs_check warn on every Aspeed board DTS that includes these files
as soon as this lands? The note below the cut says the dtsi update will go
through a separate tree, but nothing in this series touches arch/.
Would it make sense to keep the old pairing as a deprecated oneOf
alternative, so existing DTs keep validating until the dtsi change lands?
[ ... ]
> @@ -88,22 +85,76 @@ allOf:
> else:
> properties:
> resets: false
[ ... ]
> + - if:
> + not:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - aspeed,ast2400-mac
> + - aspeed,ast2500-mac
> + - aspeed,ast2600-mac
> + then:
> + properties:
> + clocks: false
> + clock-names: false
[Severity: Low]
Should the generic faraday,ftgmac100 compatible forbid clocks altogether?
Before this patch, clocks were optional for every compatible, and the
binding describes the first clock as:
clocks:
minItems: 1
items:
- description: MAC IP clock
FTGMAC100 is a licensable IP block, so a non-Aspeed integration would
still normally have a MAC/bus clock input. The driver only calls
ftgmac100_setup_clk() when priv->is_aspeed, but that doesn't mean the
hardware has no clock.
With this change, a generic-compatible node that used to validate with a
clocks property now fails. The commit message says "the plain
faraday,ftgmac100 compatible takes none", but doesn't explain why the IP
clock input is forbidden rather than left optional.
> + - if:
> + properties:
> + clocks:
> + minItems: 2
> + then:
> + required:
> + - clock-names
[Severity: Medium]
Does this if also match nodes that have no clocks property at all?
properties only checks keys that are present, so a node without clocks
satisfies the if, and clock-names becomes required.
Combined with the block above, which sets clocks: false and
clock-names: false for non-Aspeed compatibles, a plain faraday,ftgmac100
node can't pass either way:
- without clock-names: "'clock-names' is a required property"
- with clock-names: "False schema does not allow"
The compatible is still in the top-level enum, and it is still in
ftgmac100_of_match[]:
{ .compatible = "faraday,ftgmac100",
.data = &ftgmac100_match_data_faraday },
An Aspeed node that leaves out clocks would also get an extra clock-names
error on top of the missing-clocks error.
dt_binding_check won't catch this, because both examples are
aspeed,ast2500-mac nodes with exactly one clock.
Would putting the presence check inside the if, as in the presence-based
conditionals in Documentation/devicetree/bindings/example-schema.yaml,
match the commit message's "Require clock-names whenever two clocks are
listed"? For example:
- if:
properties:
clocks:
minItems: 2
required:
- clocks
then:
required:
- clock-names
>
> unevaluatedProperties: false
>
> examples:
> - |
> + #include <dt-bindings/clock/aspeed-clock.h>
> +
> ethernet@1e660000 {
> - compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
> + compatible = "aspeed,ast2500-mac";
> reg = <0x1e660000 0x180>;
> interrupts = <2>;
> + clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>;
> use-ncsi;
> };
[Severity: Low]
This example node uses use-ncsi, which runs over RMII, but it only lists
the MAC clock. Should it also list the MAC1 RCLK gate, along with
clock-names?
In ftgmac100_setup_clk(), RCLK is only enabled when the DT names it:
/* RCLK is for RMII, typically used for NCSI. Optional because it's not
* necessary if it's the AST2400 MAC, or the MAC is configured for
* RGMII, or the controller is not an ASPEED-based controller.
*/
priv->rclk = devm_clk_get_optional_enabled(priv->dev, "RCLK");
On AST2500, aspeed_clk_probe() registers mac1rclk as a plain gate:
/* RMII1 50MHz (RCLK) output enable */
hw = clk_hw_register_gate(dev, "mac1rclk", "mac12rclk", 0,
scu_base + ASPEED_MAC_CLK_DLY, 29, 0,
If nothing claims that gate, can clk_disable_unused() turn off the RMII
reference clock? On a board whose DT was copied from this example, that
would take the NC-SI link down.
The new ast2500/ast2600 rule only asks for minItems: 1, so such a DT would
pass dtbs_check. The in-tree AST2500/AST2600 NC-SI boards (romulus,
witherspoon, tacoma, mtjade, ethanolx, ...) all list both MACCLK and RCLK
with clock-names.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112-support_ast2700-v6-0-238020bf46cf%40aspeedtech.com
next prev parent reply other threads:[~2026-11-16 13:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:39 [PATCH net-next v6 0/7] net: ftgmac100: Add AST2700 support Jacky Chou
2026-11-12 8:39 ` [PATCH net-next v6 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone Jacky Chou
2026-11-12 18:43 ` Conor Dooley
2026-11-16 13:54 ` netdev-bot+sashiko [this message]
2026-11-12 8:39 ` [PATCH net-next v6 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible Jacky Chou
2026-11-12 18:44 ` Conor Dooley
2026-11-16 13:54 ` netdev-bot+sashiko
2026-11-16 14:10 ` Andrew Lunn
2026-11-12 8:39 ` [PATCH net-next v6 3/7] net: ftgmac100: Add AST2700 compatible support Jacky Chou
2026-11-16 13:54 ` netdev-bot+sashiko
2026-11-12 8:39 ` [PATCH net-next v6 4/7] net: ftgmac100: Enable AST2700 RMII support Jacky Chou
2026-11-16 13:54 ` netdev-bot+sashiko
2026-11-12 8:39 ` [PATCH net-next v6 5/7] net: ftgmac100: Require phy-mode for AST2700 Jacky Chou
2026-11-16 13:54 ` netdev-bot+sashiko
2026-11-12 8:39 ` [PATCH net-next v6 6/7] net: ftgmac100: Add AST2700 upper DMA address support Jacky Chou
2026-11-16 13:54 ` netdev-bot+sashiko
2026-11-12 8:39 ` [PATCH net-next v6 7/7] net: ftgmac100: Allow building on ARM64 Jacky Chou
2026-11-16 13:54 ` netdev-bot+sashiko
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=179483725399.3136.620008593469473601@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=jacky_chou@aspeedtech.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ratbert@faraday-tech.com \
--cc=robh@kernel.org \
/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