Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jacky Chou" <jacky_chou@aspeedtech.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v7 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
Date: Fri, 20 Nov 2026 09:32:58 +0000	[thread overview]
Message-ID: <sashiko-outbox-224854@kernel.org> (raw)
In-Reply-To: <20261119-support_ast2700-v7-1-33c8ca2d0dd7@aspeedtech.com>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] dt-bindings: net: ftgmac100: dropping fallback compatible
  breaks dtbs_check
- [Low] dt-bindings: net: ftgmac100: broken two-clock conditional in
  schema
- [Low] dt-bindings: net: ftgmac100: unwieldy per-compatible
  conditionals in schema
- [Low] dt-bindings: net: ftgmac100: inaccurate DMA mask claim in commit
  message
--

commit 9fe0301cae72065a7d7965c7e6fd35afb67ceddd
Author: Jacky Chou <jacky_chou@aspeedtech.com>

dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone

This commit updates the Faraday FTGMAC100 binding schema to make the
Aspeed MAC compatibles standalone and constrains the clocks and
clock-names properties per compatible.

> 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 commit message claim about the DMA mask accurate for these three
compatibles?

ftgmac100_probe() configures the descriptor ring end-of-ring masks and
Aspeed clocks for FTGMAC100_AST2400, FTGMAC100_AST2500, and
FTGMAC100_AST2600, but does not configure a DMA mask for any of them.

> 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: Medium]
As reported by Rob Herring on v4 [1], does removing the two-string
compatible combination break DT schema backward compatibility and cause
dtbs_check errors on existing device trees?

All MAC nodes in arch/arm/boot/dts/aspeed/aspeed-g4.dtsi,
arch/arm/boot/dts/aspeed/aspeed-g5.dtsi, and
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi still pair the Aspeed compatible
with "faraday,ftgmac100".  Retaining the two-string entry (with
deprecated: true) alongside the standalone compatibles would preserve
compatibility without introducing validation regressions.

> @@ -88,22 +85,76 @@ allOf:
>      else:
>        properties:
>          resets: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: aspeed,ast2400-mac
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 1
> +        clock-names:
> +          maxItems: 1
> +      required:
> +        - clocks
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - aspeed,ast2500-mac
> +              - aspeed,ast2600-mac
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 2
> +        clock-names:
> +          minItems: 1
> +          maxItems: 2
> +      required:
> +        - clocks
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - aspeed,ast2400-mac
> +                - aspeed,ast2500-mac
> +                - aspeed,ast2600-mac
> +    then:
> +      properties:
> +        clocks: false
> +        clock-names: false

[Severity: Low]
This isn't a bug, but now that the Aspeed compatibles are standalone and
do not share resets, clocks, or clock-names with plain faraday,ftgmac100,
would splitting the Aspeed MAC binding into its own schema document be
cleaner than piling per-compatible if/then conditionals and duplicated
minItems/maxItems constraints into faraday,ftgmac100.yaml?

> +  - if:
> +      properties:
> +        clocks:
> +          minItems: 2
> +    then:
> +      required:
> +        - clock-names

[Severity: Low]
Does omitting required: [clocks] from this if block cause nodes without a
clocks property to require clock-names?

In JSON Schema, a properties constraint succeeds when the tested property
is absent, so a plain faraday,ftgmac100 node without clocks matches this
if condition and hits required: [clock-names] even though the previous
rule sets clock-names: false.  In addition, because clock-names allows
minItems: 1, the then branch needs properties: clock-names: minItems: 2 so
a node with two clocks cannot pass validation with only a single
clock-names entry while ftgmac100_setup_clk() looks up the second clock by
the name "RCLK".

[1] https://lore.kernel.org/r/20261020181441.GA510274-robh@kernel.org

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-support_ast2700-v7-0-33c8ca2d0dd7@aspeedtech.com?part=1

  reply	other threads:[~2026-11-20  9:32 UTC|newest]

Thread overview: 11+ 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-20  9:32   ` sashiko-bot [this message]
2026-11-19  9:32 ` [PATCH net-next v7 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible Jacky Chou
2026-11-19  9:32 ` [PATCH net-next v7 3/7] net: ftgmac100: Add AST2700 compatible support Jacky Chou
2026-11-20  9:32   ` sashiko-bot
2026-11-19  9:32 ` [PATCH net-next v7 4/7] net: ftgmac100: Enable AST2700 RMII support Jacky Chou
2026-11-19  9:32 ` [PATCH net-next v7 5/7] net: ftgmac100: Require phy-mode for AST2700 Jacky Chou
2026-11-20  9:33   ` sashiko-bot
2026-11-19  9:32 ` [PATCH net-next v7 6/7] net: ftgmac100: Add AST2700 upper DMA address support Jacky Chou
2026-11-19  9:32 ` [PATCH net-next v7 7/7] net: ftgmac100: Allow building on ARM64 Jacky Chou

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=sashiko-outbox-224854@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jacky_chou@aspeedtech.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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