Re: [PATCH v3 2/3] nfc: st-nci: add raw NCI path for ST21NFCD

From: David Heidelberg

Date: Sun Aug 23 2026 - 04:32:46 EST


On 20/08/2026 22:56, Kristian Brox wrote:
ST21NFCD does not use NDLC. When the compatible is st,st21nfcd,
talk raw NCI:

- do not add or strip an NDLC PCB
- do not run the T1/T2 ACK timers
- I2C reads are a 3-byte NCI header plus payload
- skip proprietary SET_NFC_MODE and HCI SE discovery

Optionally enable clocks (SYS_CLK) and vdd-io (VPS_IO) when the
DT describes them. Existing st21nfcb / st21nfcc boards keep the
NDLC path and do not need those properties.

Tested on Fairphone 5: adapter powers up and reads an NTAG 215.

Signed-off-by: Kristian Brox <isyourbrainfoss@xxxxxxxxx>
---
drivers/nfc/st-nci/core.c | 5 +++
drivers/nfc/st-nci/i2c.c | 87 ++++++++++++++++++++++++++++++++++++++++-------
drivers/nfc/st-nci/ndlc.c | 23 +++++++++----
drivers/nfc/st-nci/ndlc.h | 2 ++
drivers/nfc/st-nci/se.c | 3 ++
5 files changed, 102 insertions(+), 18 deletions(-)


Hello Kristian,

getting better, but still few nitpicls

1. Always To / Cc maintainer :)
2. read the Sashiko review, there is one issue pointed out

see below,

[...]
@@ -257,23 +318,25 @@ static void st_nci_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id st_nci_i2c_id_table[] = {
- { .name = ST_NCI_DRIVER_NAME },
- { }
+ { ST_NCI_DRIVER_NAME },
+ {}

I believe you reverting recent changes, same below.

};
MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table);
-static const struct acpi_device_id st_nci_i2c_acpi_match[] = {
- { .id = "SMO2101" },
- { .id = "SMO2102" },
- { }
+static const struct acpi_device_id st_nci_i2c_acpi_match[] __maybe_unused = {
+ {"SMO2101"},
+ {"SMO2102"},
+ {}
};
MODULE_DEVICE_TABLE(acpi, st_nci_i2c_acpi_match);
-static const struct of_device_id of_st_nci_i2c_match[] = {
- { .compatible = "st,st21nfcb-i2c" },
- { .compatible = "st,st21nfcb_i2c" },
- { .compatible = "st,st21nfcc-i2c" },
- { }
+static const struct of_device_id of_st_nci_i2c_match[] __maybe_unused = {
+ { .compatible = "st,st21nfcb-i2c", },
+ { .compatible = "st,st21nfcb_i2c", },
+ { .compatible = "st,st21nfcc-i2c", },

The `,` above was removed recently, keep it that way ;-)

+ { .compatible = "st,st21nfcd",
+ .data = (void *)ST_NCI_I2C_PROTO_RAW_NCI },
+ {}
};
MODULE_DEVICE_TABLE(of, of_st_nci_i2c_match);
[...]