From: Arthur Crepin Leblond <arthur@marmottus.net>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Arthur Crepin Leblond <arthur@marmottus.net>
Subject: [PATCH net-next v10 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt
Date: Mon, 21 Sep 2026 12:52:50 +0200 [thread overview]
Message-ID: <20260921-wiznet-link-gpio-v10-2-5874a7a147a2@marmottus.net> (raw)
In-Reply-To: <20260921-wiznet-link-gpio-v10-0-5874a7a147a2@marmottus.net>
Add an optional link status interrupt which can be connected to the
LINKLED pin on the device to detect link status changes. This second
interrupt is only supported on wiznet,w5500.
Signed-off-by: Arthur Crepin Leblond <arthur@marmottus.net>
---
v9:
- Simplify the interrupts description:
- Describe the 2 interrupts in the top-level properties
- Limit the maximum number to 1 on non-w5500 with a condition
- Somehow only adding minItems in the top-level and then describing
2 items in the if block led to dt checks errors.
v8:
- Remove Krzysztof Kozlowski reviewed-by tag after Sashiko review
changes
- Make the interrupts property conditional
v7:
- No changes
v6:
- Fix DT error: use minItems
- Remove conditional properties
v5:
- Make the DT interrupts property dynamic from the compatible one
- Fix DT bindings errors
v4:
- Update interrupts in DT bindings
v3:
- Fix DT binding errors
v2:
- Convert device tree binding to YAML
---
.../devicetree/bindings/net/wiznet,w5100.yaml | 34 +++++++++++++++++-----
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
index 25098308eb6e..ac2ee725af5d 100644
--- a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
+++ b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
@@ -12,10 +12,6 @@ maintainers:
description: |
This is a standalone 10/100 MBit Ethernet controller with SPI interface.
-allOf:
- - $ref: /schemas/net/ethernet-controller.yaml#
- - $ref: /schemas/spi/spi-peripheral-props.yaml#
-
properties:
compatible:
enum:
@@ -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).
reg:
maxItems: 1
@@ -42,6 +46,21 @@ required:
- reg
- interrupts
+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
+
unevaluatedProperties: false
examples:
@@ -60,7 +79,8 @@ examples:
pinctrl-names = "default";
pinctrl-0 = <ð1_pins>;
interrupt-parent = <&gpio>;
- interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <25 IRQ_TYPE_LEVEL_LOW>,
+ <24 IRQ_TYPE_EDGE_BOTH>;
spi-max-frequency = <30000000>;
local-mac-address = [ a0 b0 c0 d0 e0 f0 ];
};
--
2.55.0
next prev parent reply other threads:[~2026-09-21 10:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 10:52 [PATCH net-next v10 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-09-21 10:52 ` [PATCH net-next v10 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-24 1:55 ` netdev-bot+sashiko
2026-09-24 7:12 ` Arthur Crepin Leblond
2026-09-21 10:52 ` Arthur Crepin Leblond [this message]
2026-09-24 1:55 ` [PATCH net-next v10 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt netdev-bot+sashiko
2026-09-24 7:14 ` Arthur Crepin Leblond
2026-09-21 10:52 ` [PATCH net-next v10 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-21 15:31 ` Arthur Crepin Leblond
2026-09-24 1:55 ` netdev-bot+sashiko
2026-09-24 8:26 ` 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=20260921-wiznet-link-gpio-v10-2-5874a7a147a2@marmottus.net \
--to=arthur@marmottus.net \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--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®