mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: arthur@marmottus.net
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, arnd@arndb.de,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v11 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt
Date: Mon, 28 Sep 2026 10:23:17 +0000	[thread overview]
Message-ID: <179059099703.3145.14706585546923275926@kernel.org> (raw)
In-Reply-To: <20260924-wiznet-link-gpio-v11-2-42a332517b30@marmottus.net>

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] The new allOf conditional in
  Documentation/devicetree/bindings/net/wiznet,w5100.yaml (`if: not:…

--

dt-bindings: net: wiznet,w5100: add link status interrupt

This patch adds an optional second interrupt to the wiznet,w5100 binding.
The second interrupt is meant to be wired to the LINKLED pin so link
status changes can be detected. A new allOf conditional limits every
compatible except wiznet,w5500 to a single interrupt.

> diff --git a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> index df83f90b3919..b0d1e1d699dc 100644
> --- a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> +++ b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml

[ ... ]

> @@ -24,8 +20,16 @@ properties:
>        - wiznet,w5500
>  
>    interrupts:
> -    maxItems: 1
> -    description: Main interrupt (INT pin on the device).
> +    minItems: 1
> +    description:
> +      The main interrupt (INT pin) is mandatory on all devices. The w5500
> +      additionally supports an optional second interrupt for link status changes
> +      (LINKLED pin). If it is not specified, link state changes will not be
> +      reported.
> +    items:
> +      - description: Main interrupt (INT pin on the device).
> +      - description:
> +          Optional interrupt for link status changes (LINKLED pin on w5500).

[ ... ]

> +allOf:
> +  - $ref: /schemas/net/ethernet-controller.yaml#
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - wiznet,w5500
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 1

[Severity: Low]
Is this restriction based on a hardware difference, or does it follow the
driver implementation?

As far as I can tell, the w5200 (and the w5100) also have a LINKLED
output. The w5200 also has a readable link bit in PHYSTATUS, so the same
"LINKLED edge, then read the link register" approach looks like it would
work there too. I haven't been able to confirm this against the
datasheets, so please correct me if that's wrong.

In the follow-up driver patch, w5100_probe() only reads the second
interrupt on the W5500:

drivers/net/ethernet/wiznet/w5100.c:w5100_probe() {
    ...
	if (ops->chip_id == W5500) {
		priv->link_irq = fwnode_irq_get(dev_fwnode(dev), 1);
    ...
}

The older link_gpio / w5100_detect_link() logic that commit dacf281771a9
("w5100: remove unused gpio link detection") removed was not tied to a
particular chip, so link status wiring was not limited to the w5500
before.

With this patch, a w5200 board that routes LINKLED to a SoC interrupt
line would fail dtbs_check with "too many items". The w5100 seems to
have no link-status register, so the case is weaker there, but the w5200
case still seems to apply.

The commit message only says:

  "This second interrupt is only supported on wiznet,w5500."

The item description says "LINKLED pin on w5500". Could the commit
message name the hardware reason, or could the conditional be relaxed
to cover the w5200?

A smaller point: because the conditional uses "not: contains:", any
WIZnet compatible added later will also get maxItems: 1 by default.

> +
>  unevaluatedProperties: false
>  
>  examples:

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260924-wiznet-link-gpio-v11-0-42a332517b30%40marmottus.net

  parent reply	other threads:[~2026-09-28 10:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  9:48 [PATCH net-next v11 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-09-24  9:48 ` [PATCH net-next v11 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-28 10:23   ` netdev-bot+sashiko
2026-09-24  9:48 ` [PATCH net-next v11 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crepin Leblond
2026-09-24 16:57   ` Conor Dooley
2026-09-28 10:23   ` netdev-bot+sashiko [this message]
2026-09-24  9:48 ` [PATCH net-next v11 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-28 10:23   ` netdev-bot+sashiko
2026-09-30  0:40 ` [PATCH net-next v11 0/3] w5100: restore GPIO-based link detection patchwork-bot+netdevbpf
2026-09-30  7:17   ` Arthur Crepin Leblond

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=179059099703.3145.14706585546923275926@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=arthur@marmottus.net \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®