Thread (10 messages) flat view 10 messages, 3 authors, 11h ago

Re: [net-next,v6,1/3] dt-bindings: net: wiznet,w5100: convert to DT schema

From: netdev-bot+sashiko@kernel.org
Date: 2026-09-03 00:56:02
Also in: linux-devicetree, lkml

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

Critical: 0 · High: 0 · Medium: 0 · Low: 1

- [Low] The new schema enforces one `spi-max-frequency: maximum:
  80000000` for all three compatibles (wiznet,w5100, wiznet,w5200,…

--

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

This converts the Wiznet w5x00 SPI Ethernet controller binding from plain
text to a YAML DT schema, covering the wiznet,w5100, wiznet,w5200 and
wiznet,w5500 compatibles. The old wiznet,w5x00.txt file is removed.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
new file mode 100644
index 0000000000000..601d828bae927
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
@@ -0,0 +1,66 @@
[ ... ]
+properties:
+  compatible:
+    enum:
+      - wiznet,w5100
+      - wiznet,w5200
+      - wiznet,w5500
+
+  interrupts:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency:
+    description:
+      According to the w5500 datasheet, the chip allows a maximum of 80 MHz,
+      however, board designs may need to limit this value.
+    maximum: 80000000
[Severity: Low]
Should the 80 MHz limit be conditional on the compatible string?

The description scopes the number to the w5500 datasheet, but the maximum
applies to all three compatibles enumerated just above, including
wiznet,w5100 and wiznet,w5200, whose SPI slave interfaces are rated lower
(the W5100 SPI timing figures are in the tens of MHz, not 80 MHz).

With a single top-level maximum, a device tree that clocks a wiznet,w5100
at 80000000 passes dt_binding_check without a complaint, and the value is
then handed straight to spi->max_speed_hz for the register accesses done by
w5100_spi_read()/w5100_spi_write() in
drivers/net/ethernet/wiznet/w5100-spi.c, which use a different opcode
protocol from the w5200/w5500 ops.

Would per-variant limits be more accurate here, for example:

    allOf:
      - if:
          properties:
            compatible:
              contains:
                enum:
                  - wiznet,w5100
        then:
          properties:
            spi-max-frequency:
              maximum: <w5100 limit>

Note the exact W5100 and W5200 fSCLK ratings are not derivable from the
tree, so this is based on the schema's own statement that the number comes
from the w5500 datasheet.

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831-wiznet-link-gpio-v6-0-abee6c5c966e%40marmottus.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help