Article View: linux.kernel.netdev
Article #17197Re: [PATCH net-next v6 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 13:54
Date: Mon, 16 Nov 2026 13:54
170 lines
14266 bytes
14266 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
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] In
Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml,…
- [Medium] dt-bindings: net: ftgmac100: requiring phy-mode on AST2700
breaks use-ncsi
- [Low] This commit adds a new allOf block (faraday,ftgmac100.yaml lines
90-97) that makes `phy-mode` mandatory for `aspeed,ast2700-mac`.
--
dt-bindings: net: ftgmac100: Add AST2700 compatible
This commit adds aspeed,ast2700-mac to the FTGMAC100 binding as a
standalone compatible. It extends the resets and clocks conditionals to
cover AST2700, and it makes phy-mode a required property for AST2700.
> diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> index 9d352e3686aaf..613d4f1caa4fa 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
>
> reg:
> maxItems: 1
[Severity: Medium]
An earlier patch in this series ("dt-bindings: net: ftgmac100: Make Aspeed
compatibles standalone") turned properties:compatible into a flat enum.
That enum accepts only a single string:
compatible:
enum:
- faraday,ftgmac100
- aspeed,ast2400-mac
- aspeed,ast2500-mac
- aspeed,ast2600-mac
- aspeed,ast2700-mac
dt-schema expands this into a list that holds one item. A compatible with
two entries then fails with "is too long".
Do the in-tree Aspeed MAC nodes still validate? At the end of the series
they all still use the two-string form:
arch/arm/boot/dts/aspeed/aspeed-g4.dtsi:
compatible = "aspeed,ast2400-mac", "faraday,ftgmac100";
arch/arm/boot/dts/aspeed/aspeed-g5.dtsi:
compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi:
compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
No patch in the series updates these nodes. If that is right, dtbs_check
fails for every AST2400/AST2500/AST2600 board.
The binding also seems to contradict itself. This patch extends the
if/contains blocks for resets, phy-mode and clocks. Those blocks are
written for compatible lists with more than one entry, but the top-level
enum never lets such a list validate.
Could the binding use a oneOf that accepts both the standalone form and
the legacy pair of aspeed,*-mac plus faraday,ftgmac100? The other option
is to convert the in-tree DTS files in the same series.
[ ... ]
> @@ -79,12 +80,21 @@ 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:
> + required:
> + - phy-mode
[Severity: Medium]
Is phy-mode really mandatory for every AST2700 MAC node? The binding
also documents the use-ncsi boolean. That mode runs the NC-SI stack
over RMII instead of talking to an MDIO PHY. The first example in this
file sets use-ncsi and has no phy-mode property, and that is a valid
setup on the earlier Aspeed parts.
With this rule, an aspeed,ast2700-mac node that uses use-ncsi fails
dtbs_check unless it also carries a redundant phy-mode.
The driver does not seem to need phy-mode in that case either.
ftgmac100_probe_dt() checks use-ncsi first and calls
ftgmac100_probe_ncsi(). That path registers a fixed PHY and connects
it with PHY_INTERFACE_MODE_RMII without ever reading phy-mode.
The commit message says the rule matches the driver's probe-time
requirement. However, the check added later in this series ("net:
ftgmac100: Require phy-mode for AST2700") sits in ftgmac100_mii_probe().
That function only runs for the legacy MDIO bus scan, which happens
only when there is no use-ncsi, fixed-link, phy-handle or mdio child
node. On AST2600 and AST2700 that path returns -ENODEV anyway, because
ftgmac100_setup_mdio() is only called for Faraday, AST2400 and
AST2500.
A binding should also describe hardware constraints rather than what
one version of the Linux driver checks at probe time.
Should the requirement be dropped? Or should it apply only to nodes
without use-ncsi, for example by adding a not/required use-ncsi
condition to the if clause?
[Severity: Low]
Can every AST2700 MAC instance meet this new requirement? The local
phy-mode enum allows only RGMII and RMII modes:
phy-mode:
enum:
- rgmii
- rgmii-id
- rgmii-rxid
- rgmii-txid
- rmii
AST2700 SoC1 appears to have three MACs. There are three resets
(SCU1_RESET_MAC0/1/2) and three gate clocks (SCU1_CLK_GATE_MAC0CLK,
MAC1CLK and MAC2CLK).
However, there are only two RMII reference clocks (SCU1_CLK_MAC0RCLK and
SCU1_CLK_MAC1RCLK). The only RGMII/RMII pin groups are RGMII0, RGMII1,
RMII0 and RMII1. There is also an SGMII group in
arch/arm64/boot/dts/aspeed/aspeed-g7-soc1-pinctrl.dtsi:
pinctrl_sgmii_default: sgmii-default-state {
function = "SGMII";
groups = "SGMII";
This suggests the third MAC supports only SGMII. That is an inference
from the pinctrl, clock and reset headers, not from a datasheet.
If so, a node for that MAC fails validation either way. Without phy-mode
it breaks the new required rule, and phy-mode = "sgmii" is rejected by
the enum.
Should sgmii be allowed for aspeed,ast2700-mac, so the binding describes
every instance of the hardware even before the driver supports SGMII?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112-support_ast2700-v6-0-238020bf46cf%40aspeedtech.com
Technical Details
Message-ID:
<179483725554.3136.8359940788845125105@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364368-linux-kernel-netdev=dewy.ruReferences:
<20261112-support_ast2700-v6-2-238020bf46cf@aspeedtech.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364368-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v6 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible Date: Mon, 16 Nov 2026 13:54:15 +0000 Organization: Usenet Network Message-ID: <179483725554.3136.8359940788845125105@kernel.org> References: <20261112-support_ast2700-v6-2-238020bf46cf@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2077574"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:e5gDUCGlHzen0n52cYGNOH30HGI= sha256:7GNabSQ915kGDj7piaG28Ksm6Jn76N2LM8/Y4PtTfWU= sha1:WOF0TanHcMkanoXhwSTd4xacxRs= sha256:nPcq6R7HPDO4N6ZmU4c46F9m0pByzCRTb2y4Fhm7MIo= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id BEC37114C40; Mon, 16 Nov 2026 16:54:41 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ozKhhtNCApsu; Mon, 16 Nov 2026 16:54:37 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364368-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 72695114C3D; Mon, 16 Nov 2026 16:54:29 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 77F00336B3; Mon, 16 Nov 2026 13:54:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794837258; b=Y0f+SQ2PeBMnOkgxslpggo38mI5wpNYY+9Yr+FezVNAXUzX9J5NukDDeACmBwWDoLSSL rUtV9hzsW8ow6XVRoTkvL9vy37MIQ4vezAyRkMErvb8gmhJD+DQ9wSLtFVE9rj27qE/Zl abLnqWgZ6CSVjh96vpMktu1Qr4Uy8wpfsmh5ibYhNxEofFEd0fC+7rr9F8UQensrXDp6o V6i9BN2Akvr8UDt6gnfGNWLFaFEaL/ProSROSyxm4dGnSpzTkmG4+oHkODwdgUda3Sh7Z 01LZCQUaIoUbkWlGYCN4V3Wbgqijg7HqYDWZ8CL79AuhMWSmxr57I51eUtzXJhlL63g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794837258; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=/IkU5tW0YII2MEyQTcF8gz9ioztuqMFX7WFdUsByRRI=; b=wxu8KGxh5hI8hhyKZkTw5UijBk/62/KCs+jR8XLWCzH0+qh5I2UgY9TsIxGNbVnvUaYT wkGaHTyIapwrkF4/fqUk/lCdL7o0Nj7x7rUR1zNrNCOzL4RXm9i4OH6UqgKmgrPFpiEsE h+gW3/Tx/R5s4WJG3/ceG4UOxN4IyeQJ3Gt5JO60WTZH1364dnqB85jpb1ctNTY9hWvTf Cb7h+KNthx50SStILWoq9PxGogb9Nkbax/vpYoR4b03aZDLvaCH3aMbaplM+GLOSbthSq lUwvZQm1Wlh9UrQND1wlXBDyqk449Oivtap0fYBHY9BUDywU/nlTwRD+esQ3JZxQ7aA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UjKw0yGx; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1152606A338; Mon, 16 Nov 2026 13:54:17 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UjKw0yGx X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794837257; b=1O0PRMqqk2sLzUi9imQOa69KptmgmxeA8oSdVeIutJH2SJeI0ZuJ1nQMZfivGYZJQQ4O OAJfshSBO8bzhfl0nKhvwHZpR9PkEQD6q1AsxfTmCoVk3nSw4qs2zodP0MRQ6BQr17DoS WEz+0qidmwVjC3eQ09pKV0+ZV9X17gtKoAtBhaDhIkaqZo2DVnFw2eHmNe74UBFWBRklJ uuckS+G4GOwoit6tbNDMUn+RY+yaZ4keEom6UzoczY5RIzQw69LXVG5e5e/QlIDNq6Hze v2lzaH/4EgLKhmk2IfuU7h2ib/1w4UqUjPVQBZZyjJSSVmVFQIe3vYI0LoTB9qGjF9A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794837257; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=/IkU5tW0YII2MEyQTcF8gz9ioztuqMFX7WFdUsByRRI=; b=iQ6t4FRr8bVuMXC0ws+TJCE9CKGHVSmkA8yFm1v5gJkAOXCcy6jRe+X1mRtB862ua/u8 hbA57y1AsNSAyZopZXLKJQTPpziH4k68s/rSi6bJbVJaZZJxtvhrashRxH61JwDQlWTlU tyhoRLG0c2JtrCdThOqXnfErP1KI1UoNdFez1B1eAi5mygLAnbN4CFNQeiKYCWj0Yq4Ni 4a051yztyKrkaVRn9+16fYU1sKTqhvedvzQLoR/6MySplnsJcQc+a34BouicXbD4saCX0 9kHrNMjSg0+eFIneFfyaQcXbbwaJuxplsUHTZUEHdzcCnvlhIlU6YrnZdzw4P4Y5bHg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UjKw0yGx; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FA05606A88B; Mon, 16 Nov 2026 13:54:17 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 092F91F000C9; Mon, 16 Nov 2026 13:54:15 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794837256; bh=/IkU5tW0YII2MEyQTcF8gz9ioztuqMFX7WFdUsByRRI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=UjKw0yGxV5vw0AqGxEO9d8ErsVtalvGoYT9Tw8yCMKwHVui0rcTxUTC7EvkOQEN1f LQ4bkWhN4eAz7l34gpNvlkh+8lOw6P5WPbZqbQUTrJ2Lz8FUXvyVa6KnK0gzWMkWAo UF0OdcnQShhImSWJ50CHnvMfZwt2BLNyNR/OFcBxShaSZSfvcU0mDc5haaHeN5R1ur GQRcy1HL+l6GKRlNKqm8uJQjVo9adafjbLJoj9JV4VcW8mcYv0fvmOZ5e6nFiFxML8 ZwZou5fWcR/K83SQp6OrgjD4R0j+F/Ij8nBJbnCC7UCXjCHQL1Niy3FE4srxLThLJ+ uggWx/kV/ALxg== X-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 X-In-Reply-To: <20261112-support_ast2700-v6-2-238020bf46cf@aspeedtech.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list