Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Minda Chen" <minda.chen@starfivetech.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org
Subject: Re: [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support
Date: Fri, 08 May 2026 17:14:48 +0000	[thread overview]
Message-ID: <20260508171449.62CACC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260507094115.8355-3-minda.chen@starfivetech.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The compatible string 'starfive,jhb100-dwmac' incorrectly uses 'starfive,jh7110-dwmac' as a fallback, violating Device Tree ABI backwards compatibility rules.
- [Medium] The schema logic for 'starfive,jhb100-dwmac' relies on the invalid fallback string, resulting in incorrect nesting and missing 'select' validation.
--

commit 99d98f58cde78e6cc89acf897a5b4bac3713e9c4
Author: Minda Chen <minda.chen@starfivetech.com>

dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support

This commit adds support for the jhb100 GMAC, which is based on the Synopsys
designware GMAC core. It introduces a new compatible string and updates the
interrupt and reset constraints, as the jhb100 hardware has only one reset
signal and one interrupt line.

> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -30,6 +30,10 @@ properties:
>        - items:
>            - const: starfive,jh7110-dwmac
>            - const: snps,dwmac-5.20
> +      - items:
> +          - const: starfive,jhb100-dwmac
> +          - const: starfive,jh7110-dwmac
> +          - const: snps,dwmac-5.20

The starfive,jhb100-dwmac hardware physically provides only 1 interrupt and
1 reset, but the fallback starfive,jh7110-dwmac strictly requires 3
interrupts and 2 resets. Does this break Device Tree ABI backwards
compatibility? 

An unmodified legacy operating system matching the fallback would expect the
missing resources and might fail to initialize. Should the
starfive,jh7110-dwmac fallback be removed from this list?

[ ... ]

> @@ -107,20 +111,39 @@ allOf:
>            contains:
>              const: starfive,jh7110-dwmac
>      then:
> -      properties:
> -        interrupts:
> -          minItems: 3
> -          maxItems: 3
> -
> -        interrupt-names:
> -          minItems: 3
> -          maxItems: 3
> -
> -        resets:
> -          minItems: 2
> -
> -        reset-names:
> -          minItems: 2
> +      if:
> +        properties:
> +          compatible:
> +            contains:
> +              const: starfive,jhb100-dwmac

These interrupt and reset constraints for jhb100 are nested inside an outer
condition checking for starfive,jh7110-dwmac. If the invalid fallback is
removed from the compatible array above, will jhb100 nodes fail this outer
condition and silently bypass their specific constraints?

Furthermore, if a device tree correctly drops the jh7110 fallback, will
dt_binding_check silently ignore the jhb100 node entirely because it is
missing from the custom select block at the top of the schema? 

Could these constraints be evaluated in an independent if block, and the
new compatible string be added to the select block?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507094115.8355-1-minda.chen@starfivetech.com?part=2

  reply	other threads:[~2026-05-08 17:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
2026-05-07  9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
2026-05-07 12:31   ` Andrew Lunn
2026-05-07 17:36   ` Conor Dooley
2026-05-07  9:41 ` [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support Minda Chen
2026-05-08 17:14   ` sashiko-bot [this message]
2026-05-07  9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
2026-05-07 17:42   ` Conor Dooley
2026-05-12 11:11     ` Minda Chen
2026-05-12 16:33       ` Conor Dooley
2026-05-08 17:14   ` sashiko-bot
2026-05-07  9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
2026-05-07 12:41   ` Andrew Lunn
2026-05-08  9:35     ` Minda Chen
2026-05-07 17:44   ` Conor Dooley
2026-05-08  9:35     ` Minda Chen
2026-05-07  9:41 ` [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag Minda Chen
2026-05-07 12:42   ` Andrew Lunn
2026-05-07 12:31 ` [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Andrew Lunn

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=20260508171449.62CACC2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=minda.chen@starfivetech.com \
    --cc=robh@kernel.org \
    --cc=sashiko@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