Re: [PATCH v5 0/4] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD)
From: Val Packett
Date: Mon Oct 12 2026 - 14:52:49 EST
On 10/5/26 5:51 PM, Kristian Brox wrote:
This adds NFC on the Fairphone 5 (qcm6490). The board uses an ST21NFCD
on I2C. That part speaks raw NCI; the current st-nci driver always
wraps NDLC, so using st,st21nfcb-i2c leaves the adapter unusable.
The series adds a st,st21nfcd compatible for the raw-NCI path and the
Fairphone 5 DT node. Boards that already use st21nfcb / st21nfcc keep
the NDLC path.
A later poll start that times out in "failed to set local general bytes"
is still unreproduced on this phone.
Signed-off-by: Kristian Brox <isyourbrainfoss@xxxxxxxxx>
---
Link to v4:
https://lore.kernel.org/oe-linux-nfc/20260902-fp5-st21nfcd-v4-v4-0-ded2f1c501be@xxxxxxxxx/
Changes in v5:
- Map proprietary RF protocol 0x90 to MIFARE (Tim). On this phone a
Classic 1K was accepted as 0x90 and was not dropped.
- Binding carries Reviewed-by from Krzysztof Kozlowski. DTS carries
Reviewed-by from Konrad Dybcio and Abel Vesa. The patch bodies are
the v4 patches. The raw-NCI driver change is unchanged.
- Tim's reference-clock restart and leading-0x7e check were tried on
this phone and left out.
Hi, I've been trying to enable the st21nfcj on the Motorola Edge 30, which uses the same protocol.
These mentioned left-out patches seemed like they would help, but they didn't really. The leading-0x7e check does skip over the "7e 60 00" but is not enough to untangle the desynced mess that starts with "79 3e 59 c0"..
sendQlen=1 unackQlen=0
ndlc frame written:
ndlc: 00000000: 20 00 01 01
incoming frame:
ndlc: 00000000: 7e 60 00
incoming frame:
ndlc: 00000000: 1f 01 01 20
rcvQlen=1
incoming frame:
ndlc: 00000000: 02 1a 04 04 01 20 92
rcvQlen=1
incoming frame:
ndlc: 00000000: 80 02 03 01 59 c0
rcvQlen=1
nci: nci_rx_work: unknown MT 0x4
incoming frame:
ndlc: 00000000: 79 3e 59 c0 47 75 00 00 00 01 00 00 61 66 02 7e
ndlc: 00000010: 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 40
ndlc: 00000020: 00 01 00 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e
ndlc: 00000030: 60 00 1f 02 01 20 02 1a 04 04 01 20 92 80 02 03
ndlc: 00000040: 01 59 c0 79 3e 59 c0 47 75 00 00 00 01 00 00 61
ndlc: 00000050: 66 02 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e
rcvQlen=1
nci: nci_ntf_packet: unknown ntf opcode 0x93e
nci: __nci_request: wait_for_completion_interruptible_timeout failed 0
I've tried changing things like interrupt trigger (with rising edge only 1f 01 01 20 arrives, with falling edge nothing) but nothing seems to help. I wonder if anyone has any idea of what might be the actual cause of those strange frames. It's interesting that these two workaround patches were found necessary on one phone but not on another..
Thanks,
~val