From: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>,
David Heidelberg <david@ixit.cz>,
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>, Conor Dooley <conor+dt@kernel.org>,
oe-linux-nfc@lists.linux.dev, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 1/2] dt-bindings: net: nfc: samsung,s3fwrn5: add S3NRN4V and clk-req-gpios
Date: Sun, 5 Jul 2026 21:06:19 +0200 [thread overview]
Message-ID: <20260705190621.128257-2-jorijnvdgraaf@catcrafts.net> (raw)
In-Reply-To: <20260705190621.128257-1-jorijnvdgraaf@catcrafts.net>
The S3NRN4V is an S3FWRN5-family NCI NFC controller found e.g. on the
Fairphone 6 (SM7635). Its host interface is NCI over I2C like the
S3FWRN5, but it is not compatible with any of the existing parts, so no
fallback compatible applies: its bootloader speaks a different protocol
and its RF configuration is loaded through a different proprietary
command set.
Document the optional clk-req-gpios property: the controller's CLK_REQ
output is asserted for as long as the chip needs its external reference
clock, notably while generating the 13.56 MHz poll carrier. The pin is
a level signal reflecting the chip's current clock demand, not a
one-shot event, so it is modelled as a GPIO. No user of the handshake
is known on the already-supported parts, so the property is restricted
to the S3NRN4V (easily relaxed should one appear), and it depends on
clocks, as its purpose is gating an external clock.
Also document the PVDD supply, the externally switched rail powering
the controller (boards feed it from a PMIC LDO). It is required for the
new device; deployed DTs for the existing parts never described a
supply, so for those it stays optional. Add an example for the new
device exercising the new properties.
Assisted-by: Claude:claude-opus-4-8
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
---
Changes in v2:
- Drop the -i2c bus suffix from the new compatible; the parent bus
node already implies the interface (Requested by: Conor Dooley).
- Document the PVDD supply; required for the S3NRN4V, optional for the
existing parts whose deployed DTs never described a supply.
- Add an S3NRN4V example exercising clk-req-gpios, clocks and
pvdd-supply.
- Make clk-req-gpios depend on clocks.
- Describe the CLK_REQ pin in hardware terms (what the pin is, not
what the OS does with it).
- Rework the commit message: justify the GPIO modelling in hardware
terms and explain why no fallback compatible applies.
v1: https://lore.kernel.org/20260703202601.78563-2-jorijnvdgraaf@catcrafts.net
.../bindings/net/nfc/samsung,s3fwrn5.yaml | 65 ++++++++++++++++++-
1 file changed, 64 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
index 12baee45752c..1e784a90d015 100644
--- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
+++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
@@ -14,12 +14,20 @@ properties:
enum:
- samsung,s3fwrn5-i2c
- samsung,s3fwrn82
+ - samsung,s3nrn4v
en-gpios:
maxItems: 1
description:
Output GPIO pin used for enabling/disabling the chip
+ clk-req-gpios:
+ maxItems: 1
+ description:
+ Input GPIO pin connected to the controller's CLK_REQ output, which the
+ controller asserts for as long as it requires its external reference
+ clock.
+
interrupts:
maxItems: 1
@@ -29,6 +37,9 @@ properties:
clocks:
maxItems: 1
+ pvdd-supply:
+ description: PVDD power supply
+
wake-gpios:
maxItems: 1
description:
@@ -53,17 +64,45 @@ required:
- en-gpios
- wake-gpios
+# The clock-request handshake gates an external clock, so it needs one.
+dependencies:
+ clk-req-gpios: [ clocks ]
+
allOf:
- if:
properties:
compatible:
contains:
- const: samsung,s3fwrn5-i2c
+ enum:
+ - samsung,s3fwrn5-i2c
+ - samsung,s3nrn4v
then:
required:
- interrupts
- reg
+ # No user of the clock-request handshake is known on the other parts.
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: samsung,s3nrn4v
+ then:
+ properties:
+ clk-req-gpios: false
+
+ # Deployed DTs for the older parts never described a supply, so PVDD is
+ # only required for the new device.
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,s3nrn4v
+ then:
+ required:
+ - pvdd-supply
+
examples:
- |
#include <dt-bindings/gpio/gpio.h>
@@ -97,3 +136,27 @@ examples:
};
};
+ # S3NRN4V with a clock-request gated external clock
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc@27 {
+ compatible = "samsung,s3nrn4v";
+ reg = <0x27>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <31 IRQ_TYPE_EDGE_RISING>;
+
+ en-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
+ wake-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
+ clk-req-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+
+ clocks = <&rpmhcc 4>;
+ pvdd-supply = <&nfc_pvdd>;
+ };
+ };
--
2.55.0
next prev parent reply other threads:[~2026-07-05 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 19:06 [PATCH net-next v2 0/2] nfc: s3fwrn5: support the S3NRN4V variant Jorijn van der Graaf
2026-07-05 19:06 ` Jorijn van der Graaf [this message]
2026-07-07 16:08 ` [PATCH net-next v2 1/2] dt-bindings: net: nfc: samsung,s3fwrn5: add S3NRN4V and clk-req-gpios Conor Dooley
2026-07-05 19:06 ` [PATCH net-next v2 2/2] nfc: s3fwrn5: support the S3NRN4V variant Jorijn van der Graaf
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=20260705190621.128257-2-jorijnvdgraaf@catcrafts.net \
--to=jorijnvdgraaf@catcrafts.net \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=david@ixit.cz \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
--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