[PATCH 0/3] nfc: st-nci: three ST21NFCD fixes found bringing v4 up on the Fairphone 4

From: Tim auf der Landwehr

Date: Tue Sep 29 2026 - 18:50:47 EST


These are the three fixes from bringing your v4 st,st21nfcd series up on the
Fairphone 4 (sm7225, Adreno). They apply on top of v4. Sending them here so you
can fold whatever is useful into v5; z3ntu (Luca) asked me to sync them into your
series (sm6350-mainline/linux#14).

1. Map the proprietary RF protocol 0x90 to NFC_PROTO_MIFARE_MASK, or
nci_add_new_protocol drops a MIFARE Classic as unmappable.
2. Restart the reference clock on power-up, scoped to the raw-NCI part. This is
the wedge Luca reported: after a poll enable/disable/enable the controller
stops answering NCI (DEV_UP CORE_RESET times out), and it only recovers when
the input clock is stopped and restarted, not on a reset pulse alone. On FP4
this took DEV_UP from 0/6 to 12/12 across cycles.
3. Treat the idle 0x7e first read as no-data, or buf[2] is taken as a length and
the next real frame desyncs off the bus ("invalid frame len").

All three checkpatch --strict clean; verified on an FP4 with the mic/NFC DTS.

Tim auf der Landwehr (3):
nfc: st-nci: map proprietary RF 0x90 to MIFARE
nfc: st-nci: restart the reference clock on power-up
nfc: st-nci: treat the idle 0x7e read as no-data

drivers/nfc/st-nci/core.c | 15 +++++++++++--
drivers/nfc/st-nci/i2c.c | 44 +++++++++++++++++++++++++++++++--------
2 files changed, 48 insertions(+), 11 deletions(-)

--
2.55.0