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 v8 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema
Date: Thu, 17 Sep 2026 20:08:49 +0000	[thread overview]
Message-ID: <178967572953.22033.7825853149442957564@kernel.org> (raw)
In-Reply-To: <20260915-wiznet-link-gpio-v8-1-d173622474cc@marmottus.net>

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 0 · Low: 2

- [Low] In Documentation/devicetree/bindings/net/wiznet,w5100.yaml the
  new schema applies one global `spi-max-frequency: maximum: 80000000`…
- [Low] This patch is not a pure format conversion: the removed
  Documentation/devicetree/bindings/net/wiznet,w5x00.txt explicitly…

--

dt-bindings: net: wiznet,w5100: convert to DT schema

This converts the Wiznet w5x00 SPI Ethernet controller binding from plain
text to a YAML schema covering wiznet,w5100, wiznet,w5200 and wiznet,w5500,
and adds a MAINTAINERS entry for the new file.

> diff --git a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> new file mode 100644
> index 0000000000000..25098308eb6e5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> @@ -0,0 +1,68 @@

[ ... ]

> +allOf:
> +  - $ref: /schemas/net/ethernet-controller.yaml#
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - wiznet,w5100
> +      - wiznet,w5200
> +      - wiznet,w5500
> +
> +  interrupts:
> +    maxItems: 1
> +    description: Main interrupt (INT pin on the device).
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    description:
> +      According to the datasheets, w5500 and w5200 allow a maximum of 80 MHz
> +      while w5100 is reported by users to allow a maximum of 14 MHz. However,
> +      board designs may need to limit this value.
> +    maximum: 80000000

[Severity: Low]
The description says the 14 MHz limit applies only to w5100 while 80 MHz
applies to w5200/w5500, but the single maximum: 80000000 is applied to all
three compatibles.  Should the w5100 limit be expressed as a conditional so
dt_binding_check can enforce it?

With this schema as written, a node like:

    ethernet@0 {
        compatible = "wiznet,w5100";
        reg = <0>;
        spi-max-frequency = <80000000>;
        ...
    };

passes validation even though it is roughly 5.7x the documented w5100
ceiling.  Would something like this in the allOf block match the intent of
the description?

    allOf:
      - if:
          properties:
            compatible:
              contains:
                const: wiznet,w5100
        then:
          properties:
            spi-max-frequency:
              maximum: 14000000

Per-compatible spi-max-frequency constraints are already expressed this way
in other net bindings, for example
Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml and
Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml.

The same unconditional maximum: 80000000 is still present at the end of the
series (commit ebaf57af, "w5100: detect carrier state using link status bit
and optional interrupt"), so no later patch adjusts this.

[ ... ]

> +        ethernet@0 {
> +            compatible = "wiznet,w5500";
> +            reg = <0>;
> +            pinctrl-names = "default";
> +            pinctrl-0 = <&eth1_pins>;
> +            interrupt-parent = <&gpio>;
> +            interrupts = <25 IRQ_TYPE_LEVEL_LOW>;

[Severity: Low]
This changes the recommended trigger type from IRQ_TYPE_EDGE_FALLING in the
removed .txt binding to IRQ_TYPE_LEVEL_LOW, and the deleted text also
claimed "w5x00 natively generates falling edge interrupts".  Could the
commit message mention this correction?

The new value agrees with the driver, which requests the device interrupt
level-low in w5100_probe():

    err = request_threaded_irq(priv->irq, NULL, w5100_interrupt,
                               IRQF_TRIGGER_LOW | IRQF_ONESHOT,
                               netdev_name(ndev), ndev);

The commit message body only says the binding is converted from plain text
to DT schema.  The only record of the trigger change is the v8 changelog
line "Change edge-falling to level-low" below the --- separator, which git
does not keep.

Would a Fixes: 0114214eca21 ("dt-bindings: net: wiznet: add w5x00 support")
tag be appropriate here as well?

> +            spi-max-frequency = <30000000>;
> +            local-mac-address = [ a0 b0 c0 d0 e0 f0 ];
> +        };
> +    };
> +...

> diff --git a/Documentation/devicetree/bindings/net/wiznet,w5x00.txt b/Documentation/devicetree/bindings/net/wiznet,w5x00.txt
> deleted file mode 100644
> index e9665798c4be6..0000000000000
> --- a/Documentation/devicetree/bindings/net/wiznet,w5x00.txt
> +++ /dev/null
> @@ -1,50 +0,0 @@

[ ... ]

> -- interrupts: Specify the interrupt index within the interrupt controller (referred
> -              to above in interrupt-parent) and interrupt type. w5x00 natively
> -              generates falling edge interrupts, however, additional board logic
> -              might invert the signal.

[ ... ]

> -		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260915-wiznet-link-gpio-v8-0-d173622474cc%40marmottus.net

  reply	other threads:[~2026-09-17 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  8:06 [PATCH net-next v8 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-09-15  8:06 ` [PATCH net-next v8 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-17 20:08   ` netdev-bot+sashiko [this message]
2026-09-15  8:06 ` [PATCH net-next v8 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crepin Leblond
2026-09-17 10:04   ` Krzysztof Kozlowski
2026-09-17 12:02     ` Arthur Crepin Leblond
2026-09-17 20:08   ` netdev-bot+sashiko
2026-09-15  8:06 ` [PATCH net-next v8 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-17 20:08   ` 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=178967572953.22033.7825853149442957564@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®