milos-linux/drivers
Jorijn van der Graaf 9cd00a65e8 nfc: s3fwrn5: support the S3NRN4V variant
The S3NRN4V (e.g. on the Fairphone 6, SM7635) is an S3FWRN5-family NFC
controller that needs different bring-up, selected with a new
samsung,s3nrn4v compatible:

 - It ships with working firmware behind a bootloader protocol this
   driver does not implement (GET_BOOTINFO times out), so the firmware
   download step is skipped. Its RF registers are (re)loaded with the
   proprietary DUAL_OPTION command (the HW and SW register blobs merged
   into a single stream) instead of the START/SET/STOP_RFREG sequence.

 - Its reference clock speed is configured with the single-byte FW_CFG
   form, sent from the ->setup hook (after CORE_RESET, before CORE_INIT).
   The selector value (0x11) is taken from the vendor configuration for
   this part; its encoding is not documented.

 - It gates its XI clock through a CLK_REQ line: the chip drives it high
   when it needs the clock, notably to synthesise the 13.56 MHz poll
   carrier. Left always-on, the free-running clock never lets the chip's
   TX PLL lock on a fresh start and it cannot poll (it falls back to
   listen only). Service the handshake when a clk-req GPIO is described,
   gating the clock on it; without one the clock stays always-on.

The variant is carried as match data by both the OF and the I2C device
id tables so the two match paths agree, and the OF table is now
referenced unconditionally for its match data, so drop the
of_match_ptr()/__maybe_unused annotations from it.

The error policy differs between the two configuration steps on purpose:
a clock misconfiguration is fatal (a ->setup failure aborts CORE_INIT),
whereas an RF-register update failure is only warned about and bring-up
continues, since the chip falls back to the RF registers programmed in
its flash and NFC may still work.

Unlike the host-endian word read in the legacy rfreg path, the
DUAL_OPTION checksum is accumulated with get_unaligned_le32() and emitted
little-endian explicitly, so it is correct regardless of CPU endianness.

Existing S3FWRN5 / S3FWRN82 setups keep the firmware-download path and
the always-on clock, unchanged.

Assisted-by: Claude:claude-opus-4-8
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
2026-07-05 20:37:57 +02:00
..
accel accel/amdxdna: Fix mm_struct reference leak in aie2_populate_range() 2026-06-11 09:50:07 -07:00
accessibility
acpi ACPI: button: Add missing device class clearing on probe failures 2026-05-25 09:52:34 +02:00
amba
android rust_binder: Avoid holding lock when dropping delivered_death 2026-05-22 11:55:48 +02:00
ata ata: libata-scsi: do not needlessly defer commands when using PMP with FBS 2026-05-18 12:26:51 +02:00
atm net: remove unused ATM protocols and legacy ATM device drivers 2026-04-23 12:21:14 -07:00
auxdisplay auxdisplay: Kconfig: drop unneeded quotes in PANEL_BOOT_MESSAGE dep 2026-05-17 07:58:30 +02:00
base drivers/base/memory: set mem->altmap after successful device registration 2026-06-27 11:08:17 +01:00
bcma
block zram: fix use-after-free in zram_bvec_write_partial() 2026-06-03 16:25:50 -07:00
bluetooth Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading 2026-05-27 16:44:02 -04:00
bus Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
cache cache: ax45mp: Fix device node reference leak in ax45mp_cache_init() 2026-02-06 19:54:40 +00:00
cdrom cdrom, scsi: sr: propagate read-only status to block layer via set_disk_ro() 2026-04-27 15:52:51 -06:00
cdx
char agp/amd64: Fix broken error propagation in agp_amd64_probe() 2026-06-27 11:08:17 +01:00
clk FROMLIST v2 clk: qcom: gxclkctl: Remove GX/GMxC rail votes to align with IFPC 2026-06-30 15:48:33 +02:00
clocksource
comedi comedi: comedi_test: fix check for valid scan_begin_src in waveform_ai_cmdtest() 2026-05-21 10:34:04 +02:00
connector
counter counter: Fix refcount leak in counter_alloc() error path 2026-05-03 13:48:39 +09:00
cpufreq amd-pstate fixes for 7.1 (2026-06-02) 2026-06-08 15:20:04 +02:00
cpuidle powerpc updates for 7.1 2026-04-14 17:10:15 -07:00
crypto crypto: qat - remove unused character device and IOCTLs 2026-06-27 11:08:17 +01:00
cxl CXL changes for v7.1 2026-04-17 15:52:58 -07:00
dax dax changes for 7.1 2026-04-21 14:12:01 -07:00
dca
devfreq PM / devfreq: tegra30-devfreq: add support for Tegra114 2026-04-04 03:15:39 +09:00
dibs
dio
dma dmaengine updates for v7.1 2026-04-17 10:29:01 -07:00
dma-buf dma-buf: fix UAF in dma_buf_fd() tracepoint 2026-05-28 20:05:43 +05:30
dpll dpll: zl3073x: make frequency monitor a per-device attribute 2026-05-28 14:05:29 +02:00
edac EDAC/versalnet: Fix device name memory leak 2026-05-05 14:49:48 +02:00
eisa
extcon
firewire
firmware Char/Misc driver fixes for 7.1-final 2026-06-12 09:00:28 -07:00
fpga
fsi
fwctl fwctl: pds: Validate RPC input size before parsing 2026-05-19 10:44:32 -03:00
gnss
gpib Revert "gpib: cb7210: Fix region leak when request_irq fails" 2026-05-30 12:25:36 +02:00
gpio gpiolib: handle gpio-hogs only once 2026-06-10 10:12:57 +02:00
gpu Revert "drm/panel: novatek-nt37705: Configure for 10-bit" 2026-06-30 15:48:36 +02:00
greybus greybus: gb-beagleplay: bound bootloader receive buffering 2026-04-02 15:55:09 +02:00
hid HID: Input: Add battery list cleanup with devm action 2026-06-19 13:50:58 +02:00
hsi HSI: omap_ssi_port: remove depends on ARM 2026-04-02 22:33:44 +02:00
hte hte: tegra194: Add Tegra264 GTE support 2026-04-12 23:29:31 -07:00
hv mshv: support 1G hugepages by passing them as 2M-aligned chunks 2026-05-27 15:30:15 -07:00
hwmon hwmon: (pmbus/adm1266) serialize sequencer_state debugfs read with pmbus_lock 2026-05-21 07:00:39 -07:00
hwspinlock hwspinlock: u8500: delete driver 2026-04-06 09:43:18 -05:00
hwtracing Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
i2c i2c: imx-lpi2c: fix resource leaks switching to devm_dma_request_chan() 2026-06-09 10:13:09 +02:00
i3c i3c: mipi-i3c-hci: fix IBI payload length calculation for final status 2026-04-12 22:06:02 +02:00
idle
iio iio: adc: ti-ads1298: add bounds check to pga_settings index 2026-06-27 11:08:17 +01:00
infiniband RDMA/srp: bound SRP_RSP sense copy by the received length 2026-06-08 13:43:23 -03:00
input Input: eswin_touch - Remove 10s probe delay 2026-06-30 15:48:37 +02:00
interconnect FROMGIT interconnect: Add devm_of_icc_get_by_index() as exported API for users 2026-06-30 15:48:20 +02:00
iommu dma-mapping fixes for Linux 7.1 2026-06-11 14:22:26 -07:00
ipack
irqchip irqchip/renesas-rzt2h: Use pm_runtime_put_sync() in probe error path 2026-05-21 20:11:29 +02:00
leds leds: class: Make led_remove_lookup() NULL-aware 2026-04-09 13:49:19 +01:00
macintosh
mailbox mailbox: mailbox-test: make data_ready a per-instance variable 2026-04-18 13:10:14 -05:00
mcb
md - fix race condition in dm-cache-policy-smq 2026-06-01 19:55:30 -07:00
media FROMLIST v2 media: iris: Add support for Milos (VPU v2.0) 2026-06-30 15:48:28 +02:00
memory memory: atmel-ebi: Allow deferred probing 2026-05-04 19:15:59 +02:00
memstick
message
mfd MFD for v7.1 2026-04-20 11:31:01 -07:00
misc misc: fastrpc: fix use-after-free race in fastrpc_map_create 2026-06-05 17:20:51 +02:00
mmc MMC core: 2026-06-03 09:09:24 -07:00
most most: usb: Use kzalloc_objs for endpoint address array 2026-04-02 17:06:09 +02:00
mtd mtd: spinand: winbond: Fix ODTR write VCR on W35NxxJW 2026-04-27 15:08:04 +02:00
mux Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
net octeontx2-af: fix IP fragment flag corruption on custom KPU profile load 2026-06-11 12:59:34 +02:00
nfc nfc: s3fwrn5: support the S3NRN4V variant 2026-07-05 20:37:57 +02:00
ntb pci-v7.1-changes 2026-04-15 14:41:21 -07:00
nubus Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nvdimm vfs-7.1-rc1.integrity 2026-04-13 10:40:26 -07:00
nvme Including fixes from netfilter. 2026-05-28 13:13:48 -07:00
nvmem nvmem: core: fix use-after-free bugs in error paths 2026-06-05 17:18:58 +02:00
of memblock: updates for 7.0-rc1 2026-04-18 11:29:14 -07:00
opp
parisc parisc: Fix IRQ leak in LASI driver 2026-05-04 11:48:12 +02:00
parport parport: Fix race between port and client registration 2026-05-22 12:19:02 +02:00
pci pci-v7.1-fixes-2 2026-05-21 15:02:12 -07:00
pcmcia PCMCIA fixes and cleanups for v7.1 2026-04-23 11:22:16 -07:00
peci Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
perf arm64 updates for 7.1: 2026-04-14 16:48:56 -07:00
phy phy: qcom: qmp-usbc: Fix out-of-bounds array access in dp swing config 2026-05-19 15:42:11 +05:30
pinctrl Revert "pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7 14AGP11" 2026-05-30 00:00:33 +02:00
platform platform-drivers-x86 for v7.1-4 2026-05-22 15:45:26 -07:00
pmdomain pmdomain: imx: fix OF node refcount 2026-06-03 11:49:37 +02:00
pnp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
power USB / Thunderbolt changes for 7.1-rc1 2026-04-19 08:47:40 -07:00
powercap powercap: intel_rapl: Consolidate PL4 and PMU support flags into rapl_defaults 2026-04-01 16:03:05 +02:00
pps pps: change pps_class to a const struct 2026-04-02 16:33:00 +02:00
ps3
ptp ptp: ocp: fix resource freeing order 2026-06-09 19:26:56 -07:00
pwm pwm: Two driver fixes 2026-04-23 08:37:07 -07:00
rapidio Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ras
regulator regulator: mt6363: select CONFIG_IRQ_DOMAIN 2026-05-26 15:17:16 +01:00
remoteproc rpmsg updates for v7.1 2026-04-17 14:18:55 -07:00
resctrl arm_mpam: Check whether the config array is allocated before destroying it 2026-05-14 09:52:05 +01:00
reset reset: eyeq: drop device_set_of_node_from_dev() done by parent 2026-04-28 19:03:50 -07:00
rpmsg rpmsg: Constify buffer passed to send API 2026-04-06 09:37:51 -05:00
rtc RTC for 7.1 2026-04-25 16:39:03 -07:00
s390 s390/cio: Restore GFP_DMA for CHSC allocation 2026-05-11 16:27:25 +02:00
sbus
scsi SCSI fixes on 20260531 2026-05-31 08:45:08 -07:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: Avoid ABBA on tx_lock/ctrl->lock 2026-06-05 17:19:51 +02:00
soc FROMLIST v2 soc: qcom: ubwc: Add config for Milos 2026-06-30 15:48:31 +02:00
soundwire soundwire updates for 7.1 2026-04-17 10:16:53 -07:00
spi spi: Fixes for v7.1 2026-06-12 11:06:16 -07:00
spmi
ssb
staging Staging driver fixes for 7.1-final 2026-06-12 10:10:12 -07:00
target scsi: target: iscsi: Validate CHAP_R length before base64 decode 2026-05-22 23:06:00 -04:00
tc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tee QCOMTEE fix for v7.1 2026-05-28 15:31:48 +02:00
thermal bitmap updates for v7.1 2026-04-14 08:55:18 -07:00
thunderbolt thunderbolt: Limit XDomain response copy to actual frame size 2026-05-26 15:18:31 +02:00
tty serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails 2026-06-27 11:08:17 +01:00
ufs soc: fixes for 7.1, part 2 2026-06-02 10:54:11 -07:00
uio uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory 2026-05-22 12:19:02 +02:00
usb USB: serial: kl5kusb105: fix bulk-out buffer overflow 2026-06-08 13:43:10 +02:00
vdpa vdpa: use generic driver_override infrastructure 2026-04-04 00:47:50 +02:00
vfio vfio/pci: Check BAR resources before exporting a DMABUF 2026-05-14 11:39:03 -06:00
vhost Including fixes from Netfilter. 2026-04-23 16:50:42 -07:00
video fbdev: udlfb: add vm_ops to dlfb_ops_mmap to prevent use-after-free 2026-05-04 10:35:55 +02:00
virt virt: sev-guest: Explicitly leak pages in unknown state 2026-05-20 18:03:17 -07:00
virtio mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
w1 w1: ds2490: drop redundant device reference 2026-04-03 10:55:12 +02:00
watchdog watchdog: ni903x_wdt: Convert to a platform driver 2026-04-07 21:06:59 +02:00
xen ACPI: PAD: xen: Check ACPI_COMPANION() against NULL 2026-05-12 19:01:37 +02:00
zorro
Kconfig net: remove ISDN subsystem and Bluetooth CMTP 2026-04-23 10:24:02 -07:00
Makefile net: remove ISDN subsystem and Bluetooth CMTP 2026-04-23 10:24:02 -07:00