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 0/2] nfc: s3fwrn5: support the S3NRN4V variant
Date: Sun, 5 Jul 2026 21:06:18 +0200 [thread overview]
Message-ID: <20260705190621.128257-1-jorijnvdgraaf@catcrafts.net> (raw)
This adds support for the Samsung S3NRN4V, an S3FWRN5-family NFC
controller found e.g. on the Fairphone 6 (SM7635), to the s3fwrn5
driver.
The S3NRN4V differs from the already-supported parts in three ways: it
ships with working firmware behind a bootloader protocol the driver
does not implement (so firmware download is skipped), it loads its RF
registers through a different proprietary command (DUAL_OPTION), and it
gates its reference clock through a CLK_REQ line that the driver must
service for the chip to be able to generate the 13.56 MHz poll carrier.
Patch 1 adds the compatible and the clk-req-gpios property to the
binding; patch 2 implements the variant in the driver.
Tested on a Fairphone 6 running a milos-mainline kernel: reader mode polls
and reads ISO 14443-4 tags reliably, both from a fresh boot and across
driver reloads.
Changes in v2:
- Drop the -i2c bus suffix from the new compatible: it is now plain
samsung,s3nrn4v (Requested by: Conor Dooley).
- Close a race in the probe-time CLK_REQ seeding by reading the GPIO
level under clk_lock, so a stale level can never overwrite a fresher
state applied by the irq thread (found by the Sashiko AI review of
v1).
- Binding completeness: document the PVDD supply (required for the
S3NRN4V), add an S3NRN4V example exercising the new properties, make
clk-req-gpios depend on clocks, and describe the CLK_REQ pin in
hardware terms.
- Rework the binding commit message: justify the GPIO modelling in
hardware terms and explain why no fallback compatible applies.
- Add an s3nrn4v i2c_device_id entry carrying the variant so both
match paths agree, and describe the of_match_ptr() removal in the
driver commit message.
- Reject malformed rfreg blobs (word alignment, single-byte section
index bound) up front instead of failing at STOP_UPDATE.
- Handle gpiod_get_value_cansleep() failure in the CLK_REQ sync
instead of treating an error as "clock off".
v1: https://lore.kernel.org/20260703202601.78563-1-jorijnvdgraaf@catcrafts.net
Jorijn van der Graaf (2):
dt-bindings: net: nfc: samsung,s3fwrn5: add S3NRN4V and clk-req-gpios
nfc: s3fwrn5: support the S3NRN4V variant
.../bindings/net/nfc/samsung,s3fwrn5.yaml | 65 ++++++++-
drivers/nfc/s3fwrn5/core.c | 40 ++++-
drivers/nfc/s3fwrn5/i2c.c | 138 ++++++++++++++++--
drivers/nfc/s3fwrn5/nci.c | 119 ++++++++++++++-
drivers/nfc/s3fwrn5/nci.h | 32 +++-
drivers/nfc/s3fwrn5/s3fwrn5.h | 14 +-
drivers/nfc/s3fwrn5/uart.c | 2 +-
7 files changed, 394 insertions(+), 16 deletions(-)
base-commit: 805185b7c7a1069e407b6f7b3bc98e44d415f484
--
2.55.0
next reply other threads:[~2026-07-05 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 19:06 Jorijn van der Graaf [this message]
2026-07-05 19:06 ` [PATCH net-next v2 1/2] dt-bindings: net: nfc: samsung,s3fwrn5: add S3NRN4V and clk-req-gpios Jorijn van der Graaf
2026-07-07 16:08 ` 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-1-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