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 v7 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible
Date: Mon, 23 Nov 2026 10:13:13 +0000 [thread overview]
Message-ID: <179542879318.3135.2219798604934758241@kernel.org> (raw)
In-Reply-To: <20261119-support_ast2700-v7-2-33c8ca2d0dd7@aspeedtech.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Concern: the commit message for "dt-bindings: net: ftgmac100: Add
AST2700 compatible" says "ftgmac100_probe_dt() takes the NC-SI path…
- [Low] In "dt-bindings: net: ftgmac100: Add AST2700 compatible", the new
AST2700 conditional in…
- [Low] Concern: the binding adds `aspeed,ast2700-mac` as a standalone
compatible, but at this commit…
--
dt-bindings: net: ftgmac100: Add AST2700 compatible
This commit adds aspeed,ast2700-mac to the ftgmac100 binding. It allows the
reset line for it and adds it to the clocks/clock-names conditionals. It
also adds an AST2700-only rule that requires exactly one of phy-mode or
use-ncsi.
> Require exactly one of "phy-mode" or "use-ncsi" in the device tree
> when the AST2700 compatible is used. The driver only enforces
> "phy-mode" when NC-SI is not in use: ftgmac100_probe_dt() takes the
> NC-SI path before ftgmac100_mii_probe(), where the AST2700 phy-mode
> check lives, is ever reached.
[Severity: Low]
At this commit, ftgmac100_mii_probe() in
drivers/net/ethernet/faraday/ftgmac100.c has no AST2700 phy-mode check. It
falls back to RGMII when phy-mode is missing.
Does this paragraph refer to the check added later in the series by
"net: ftgmac100: Require phy-mode for AST2700"?
ftgmac100_mii_probe() {
...
err = of_get_phy_mode(np, &phy_intf);
if (err) {
if (priv->mac_id == FTGMAC100_AST2700) {
dev_err(priv->dev, "phy-mode is required for this SoC\n");
return -EINVAL;
}
...
}
After the full series is applied, the description matches the code. That
is because ftgmac100_probe_dt() returns through ftgmac100_probe_ncsi()
before it reaches ftgmac100_mii_probe(). Could the message say that a
following patch adds the check, so it is also accurate at this commit?
> diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> index 9d352e3686aaf..95f4993939cf6 100644
> --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> @@ -16,6 +16,7 @@ properties:
> - aspeed,ast2400-mac
> - aspeed,ast2500-mac
> - aspeed,ast2600-mac
> + - aspeed,ast2700-mac
[Severity: Low]
At this commit, ftgmac100_of_match[] in
drivers/net/ethernet/faraday/ftgmac100.c has no entry for
aspeed,ast2700-mac. There is also no FTGMAC100_AST2700 mac_id and no
is_aspeed handling. Can a schema-valid AST2700 node bind to the driver at
this point?
The next patch in the series, "net: ftgmac100: Add AST2700 compatible
support", appears to fix this by adding:
{ .compatible = "aspeed,ast2700-mac",
.data = &ftgmac100_match_data_ast2700 },
It also adds FTGMAC100_AST2700 to the is_aspeed branch of
ftgmac100_probe(). Adding the binding before the driver is the usual
order, and no in-tree DTS uses this compatible yet. I'm mentioning it only
for completeness.
[ ... ]
> @@ -79,12 +80,24 @@ allOf:
> contains:
> enum:
> - aspeed,ast2600-mac
> + - aspeed,ast2700-mac
> then:
> properties:
> resets: true
> else:
> properties:
> resets: false
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: aspeed,ast2700-mac
> + then:
> + oneOf:
> + - required:
> + - phy-mode
> + - required:
> + - use-ncsi
[Severity: Low]
oneOf fails when both subschemas match. Will an AST2700 node with both
phy-mode = "rmii" and use-ncsi then fail dtbs_check?
The driver accepts that combination. ftgmac100_probe_dt() checks use-ncsi
first:
if (of_get_property(np, "use-ncsi", NULL))
return ftgmac100_probe_ncsi(netdev, priv, pdev);
ftgmac100_probe_ncsi() then always connects with RMII and never reads
phy-mode:
err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
PHY_INTERFACE_MODE_RMII);
Existing nodes for this binding already use this pairing, for example
&mac2 and &mac3 in aspeed-bmc-asus-x4tf.dts:
phy-mode = "rmii";
use-ncsi;
The same pattern appears in aspeed-bmc-inventec-starscream.dts,
aspeed-bmc-nvidia-gb200nvl-bmc.dts and aspeed-bmc-quanta-s6q.dts.
The commit message's stated reason is to avoid rejecting nodes that only
have use-ncsi, and anyOf would do that too. Would anyOf fit better here?
If the goal is to stop a non-RMII mode from being used with NC-SI, a rule
like "if: required: [use-ncsi] then: properties: phy-mode: const: rmii"
could express that instead.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119-support_ast2700-v7-0-33c8ca2d0dd7%40aspeedtech.com
next prev parent reply other threads:[~2026-11-23 10:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 9:32 [PATCH net-next v7 0/7] net: ftgmac100: Add AST2700 support Jacky Chou
2026-11-19 9:32 ` [PATCH net-next v7 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko [this message]
2026-11-19 9:32 ` [PATCH net-next v7 3/7] net: ftgmac100: Add AST2700 compatible support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 4/7] net: ftgmac100: Enable AST2700 RMII support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 5/7] net: ftgmac100: Require phy-mode for AST2700 Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 6/7] net: ftgmac100: Add AST2700 upper DMA address support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 7/7] net: ftgmac100: Allow building on ARM64 Jacky Chou
2026-11-23 10:13 ` 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=179542879318.3135.2219798604934758241@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