* [PATCH v3 1/3] dt-bindings: net: nfc: add st,st21nfcd
2026-08-20 20:56 [PATCH v3 0/3] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD) Kristian Brox
@ 2026-08-20 20:56 ` Kristian Brox
2026-08-20 20:56 ` [PATCH v3 2/3] nfc: st-nci: add raw NCI path for ST21NFCD Kristian Brox
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kristian Brox @ 2026-08-20 20:56 UTC (permalink / raw)
Cc: Krzysztof Kozlowski, Luca Weiss, Dmitry Baryshkov, oe-linux-nfc,
netdev, devicetree, linux-kernel, linux-arm-msm, Kristian Brox
Add a compatible for the ST ST21NFCD NFC controller. Document optional
SYS_CLK (clocks) and VPS_IO (vdd-io-supply), and add an I2C example
that uses interrupts-extended.
Signed-off-by: Kristian Brox <isyourbrainfoss@proton.me>
---
.../devicetree/bindings/net/nfc/st,st-nci.yaml | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
index 1dcbddbc5..c859797f4 100644
--- a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
+++ b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
@@ -15,6 +15,7 @@ properties:
- st,st21nfcb-i2c
- st,st21nfcb-spi
- st,st21nfcc-i2c
+ - st,st21nfcd
reset-gpios:
description: Output GPIO pin used for resetting the controller
@@ -36,6 +37,15 @@ properties:
Specifies that the uicc swp signal can be physically connected to the
controller
+ clocks:
+ maxItems: 1
+ description:
+ External reference clock connected to SYS_CLK.
+
+ vdd-io-supply:
+ description:
+ Digital I/O supply (VPS_IO).
+
required:
- compatible
- interrupts
@@ -49,6 +59,7 @@ if:
enum:
- st,st21nfcb-i2c
- st,st21nfcc-i2c
+ - st,st21nfcd
then:
properties:
spi-max-frequency: false
@@ -81,6 +92,26 @@ examples:
};
};
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc@8 {
+ compatible = "st,st21nfcd";
+ reg = <0x08>;
+
+ interrupts-extended = <&gpio5 2 IRQ_TYPE_LEVEL_HIGH>;
+ reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
+
+ clocks = <&clk>;
+ vdd-io-supply = <&vdd_io>;
+ };
+ };
+
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 2/3] nfc: st-nci: add raw NCI path for ST21NFCD
2026-08-20 20:56 [PATCH v3 0/3] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD) Kristian Brox
2026-08-20 20:56 ` [PATCH v3 1/3] dt-bindings: net: nfc: add st,st21nfcd Kristian Brox
@ 2026-08-20 20:56 ` Kristian Brox
2026-08-20 20:56 ` [PATCH v3 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: add ST21NFCD NFC Kristian Brox
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kristian Brox @ 2026-08-20 20:56 UTC (permalink / raw)
Cc: Krzysztof Kozlowski, Luca Weiss, Dmitry Baryshkov, oe-linux-nfc,
netdev, devicetree, linux-kernel, linux-arm-msm, Kristian Brox
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@proton.me>
---
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(-)
diff --git a/drivers/nfc/st-nci/core.c b/drivers/nfc/st-nci/core.c
index a367136d4..2356f16b8 100644
--- a/drivers/nfc/st-nci/core.c
+++ b/drivers/nfc/st-nci/core.c
@@ -18,8 +18,13 @@
static int st_nci_init(struct nci_dev *ndev)
{
+ struct st_nci_info *info = nci_get_drvdata(ndev);
struct nci_mode_set_cmd cmd;
+ /* ST21NFCD has no NDLC proprietary SET_NFC_MODE */
+ if (info->ndlc->raw_nci)
+ return 0;
+
cmd.cmd_type = ST_NCI_SET_NFC_MODE;
cmd.mode = 1;
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index 152c20b6b..cfddb7ffe 100644
--- a/drivers/nfc/st-nci/i2c.c
+++ b/drivers/nfc/st-nci/i2c.c
@@ -10,10 +10,13 @@
#include <linux/i2c.h>
#include <linux/gpio/consumer.h>
#include <linux/acpi.h>
+#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/nfc.h>
#include <linux/of.h>
+#include <linux/property.h>
+#include <linux/regulator/consumer.h>
#include "st-nci.h"
@@ -22,10 +25,17 @@
/* ndlc header */
#define ST_NCI_FRAME_HEADROOM 1
#define ST_NCI_FRAME_TAILROOM 0
+#define ST_NCI_RAW_FRAME_HEADROOM 0
#define ST_NCI_I2C_MIN_SIZE 4 /* PCB(1) + NCI Packet header(3) */
+#define ST_NCI_NCI_HDR_SIZE 3 /* raw NCI: MT/PBF/GID + OID + len */
#define ST_NCI_I2C_MAX_SIZE 250 /* req 4.2.1 */
+enum st_nci_i2c_proto {
+ ST_NCI_I2C_PROTO_NDLC = 0,
+ ST_NCI_I2C_PROTO_RAW_NCI,
+};
+
#define ST_NCI_DRIVER_NAME "st_nci"
#define ST_NCI_I2C_DRIVER_NAME "st_nci_i2c"
@@ -34,6 +44,7 @@ struct st_nci_i2c_phy {
struct llt_ndlc *ndlc;
bool irq_active;
+ bool raw_nci;
struct gpio_desc *gpiod_reset;
@@ -111,6 +122,42 @@ static int st_nci_i2c_read(struct st_nci_i2c_phy *phy,
u8 buf[ST_NCI_I2C_MAX_SIZE];
struct i2c_client *client = phy->i2c_dev;
+ if (phy->raw_nci) {
+ r = i2c_master_recv(client, buf, ST_NCI_NCI_HDR_SIZE);
+ if (r < 0) {
+ usleep_range(1000, 4000);
+ r = i2c_master_recv(client, buf, ST_NCI_NCI_HDR_SIZE);
+ }
+ if (r != ST_NCI_NCI_HDR_SIZE)
+ return -EREMOTEIO;
+
+ len = buf[2];
+ if (len > ST_NCI_I2C_MAX_SIZE) {
+ nfc_err(&client->dev, "invalid frame len\n");
+ return -EBADMSG;
+ }
+
+ *skb = alloc_skb(ST_NCI_NCI_HDR_SIZE + len, GFP_KERNEL);
+ if (!*skb)
+ return -ENOMEM;
+
+ skb_put(*skb, ST_NCI_NCI_HDR_SIZE);
+ memcpy((*skb)->data, buf, ST_NCI_NCI_HDR_SIZE);
+
+ if (!len)
+ return 0;
+
+ r = i2c_master_recv(client, buf, len);
+ if (r != len) {
+ kfree_skb(*skb);
+ return -EREMOTEIO;
+ }
+
+ skb_put(*skb, len);
+ memcpy((*skb)->data + ST_NCI_NCI_HDR_SIZE, buf, len);
+ return 0;
+ }
+
r = i2c_master_recv(client, buf, ST_NCI_I2C_MIN_SIZE);
if (r < 0) { /* Retry, chip was in standby */
usleep_range(1000, 4000);
@@ -211,6 +258,8 @@ static int st_nci_i2c_probe(struct i2c_client *client)
return -ENOMEM;
phy->i2c_dev = client;
+ phy->raw_nci = (uintptr_t)device_get_match_data(dev) ==
+ ST_NCI_I2C_PROTO_RAW_NCI;
i2c_set_clientdata(client, phy);
@@ -225,19 +274,31 @@ static int st_nci_i2c_probe(struct i2c_client *client)
return -ENODEV;
}
+ r = devm_regulator_get_enable_optional(dev, "vdd-io");
+ if (r && r != -ENODEV)
+ return dev_err_probe(dev, r, "failed to enable vdd-io\n");
+
+ r = PTR_ERR_OR_ZERO(devm_clk_get_optional_enabled(dev, NULL));
+ if (r)
+ return dev_err_probe(dev, r, "failed to enable clock\n");
+
phy->se_status.is_ese_present =
device_property_read_bool(dev, "ese-present");
phy->se_status.is_uicc_present =
device_property_read_bool(dev, "uicc-present");
r = ndlc_probe(phy, &i2c_phy_ops, &client->dev,
- ST_NCI_FRAME_HEADROOM, ST_NCI_FRAME_TAILROOM,
+ phy->raw_nci ? ST_NCI_RAW_FRAME_HEADROOM :
+ ST_NCI_FRAME_HEADROOM,
+ ST_NCI_FRAME_TAILROOM,
&phy->ndlc, &phy->se_status);
if (r < 0) {
nfc_err(&client->dev, "Unable to register ndlc layer\n");
return r;
}
+ phy->ndlc->raw_nci = phy->raw_nci;
+
phy->irq_active = true;
r = devm_request_threaded_irq(&client->dev, client->irq, NULL,
st_nci_irq_thread_fn,
@@ -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 },
+ {}
};
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", },
+ { .compatible = "st,st21nfcd",
+ .data = (void *)ST_NCI_I2C_PROTO_RAW_NCI },
+ {}
};
MODULE_DEVICE_TABLE(of, of_st_nci_i2c_match);
diff --git a/drivers/nfc/st-nci/ndlc.c b/drivers/nfc/st-nci/ndlc.c
index be4808859..b3192460c 100644
--- a/drivers/nfc/st-nci/ndlc.c
+++ b/drivers/nfc/st-nci/ndlc.c
@@ -62,8 +62,9 @@ void ndlc_close(struct llt_ndlc *ndlc)
/* toggle reset pin */
ndlc->ops->enable(ndlc->phy_id);
- nci_prop_cmd(ndlc->ndev, ST_NCI_CORE_PROP,
- sizeof(struct nci_mode_set_cmd), (__u8 *)&cmd);
+ if (!ndlc->raw_nci)
+ nci_prop_cmd(ndlc->ndev, ST_NCI_CORE_PROP,
+ sizeof(struct nci_mode_set_cmd), (__u8 *)&cmd);
ndlc->powered = 0;
ndlc->ops->disable(ndlc->phy_id);
@@ -72,11 +73,13 @@ EXPORT_SYMBOL(ndlc_close);
int ndlc_send(struct llt_ndlc *ndlc, struct sk_buff *skb)
{
- /* add ndlc header */
- u8 pcb = PCB_TYPE_DATAFRAME | PCB_DATAFRAME_RETRANSMIT_NO |
- PCB_FRAME_CRC_INFO_NOTPRESENT;
+ if (!ndlc->raw_nci) {
+ /* add ndlc header */
+ u8 pcb = PCB_TYPE_DATAFRAME | PCB_DATAFRAME_RETRANSMIT_NO |
+ PCB_FRAME_CRC_INFO_NOTPRESENT;
- *(u8 *)skb_push(skb, 1) = pcb;
+ *(u8 *)skb_push(skb, 1) = pcb;
+ }
skb_queue_tail(&ndlc->send_q, skb);
schedule_work(&ndlc->sm_work);
@@ -103,6 +106,10 @@ static void llt_ndlc_send_queue(struct llt_ndlc *ndlc)
ndlc->hard_fault = r;
break;
}
+ if (ndlc->raw_nci) {
+ kfree_skb(skb);
+ continue;
+ }
time_sent = jiffies;
*(unsigned long *)skb->cb = time_sent;
@@ -154,6 +161,10 @@ static void llt_ndlc_rcv_queue(struct llt_ndlc *ndlc)
pr_debug("rcvQlen=%d\n", ndlc->rcv_q.qlen);
while ((skb = skb_dequeue(&ndlc->rcv_q)) != NULL) {
+ if (ndlc->raw_nci) {
+ nci_recv_frame(ndlc->ndev, skb);
+ continue;
+ }
pcb = skb->data[0];
skb_pull(skb, 1);
if ((pcb & PCB_TYPE_MASK) == PCB_TYPE_SUPERVISOR) {
diff --git a/drivers/nfc/st-nci/ndlc.h b/drivers/nfc/st-nci/ndlc.h
index c24ce9b0d..5c1f8baf0 100644
--- a/drivers/nfc/st-nci/ndlc.h
+++ b/drivers/nfc/st-nci/ndlc.h
@@ -39,6 +39,8 @@ struct llt_ndlc {
*/
int hard_fault;
int powered;
+ /* ST21NFCD: raw NCI on the wire, no NDLC PCB / ACK timers */
+ bool raw_nci;
};
int ndlc_open(struct llt_ndlc *ndlc);
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 607ec768e..44cc102bc 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
@@ -621,6 +621,9 @@ int st_nci_discover_se(struct nci_dev *ndev)
int se_count = 0;
struct st_nci_info *info = nci_get_drvdata(ndev);
+ if (info->ndlc->raw_nci)
+ return 0;
+
r = st_nci_hci_network_init(ndev);
if (r != 0)
return r;
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3 0/3] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD)
2026-08-20 20:56 [PATCH v3 0/3] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD) Kristian Brox
` (3 preceding siblings ...)
2026-08-21 6:09 ` [PATCH v3 0/3] nfc: st-nci: Fairphone 5 NFC bring-up (ST21NFCD) Krzysztof Kozlowski
@ 2026-08-21 9:28 ` Luca Weiss
4 siblings, 0 replies; 6+ messages in thread
From: Luca Weiss @ 2026-08-21 9:28 UTC (permalink / raw)
To: Kristian Brox
Cc: Krzysztof Kozlowski, Luca Weiss, Dmitry Baryshkov, oe-linux-nfc,
netdev, devicetree, linux-kernel, linux-arm-msm
Hi Kristian,
On Thu Aug 20, 2026 at 10:56 PM CEST, 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.
>
> Patches are against linux-nfc/for-next (v7.2-rc7). Hardware test was on
> a Fairphone 5 running postmarketOS, with these changes as modules on a
> 7.1.2 sc7280 kernel:
>
> - nfctool: Powered: Yes
> - initiator poll / neard: NTAG 215, NDEF URI read OK
>
> ese-present and uicc-present follow the public schematic (NFC_SWP1/SWP2:
> SWP_SE to SIM1, SWP_UICC to SIM2). SE/HCE is not tested.
>
> CLK_REQ (GPIO 39) is omitted, as on Fairphone 6 NFC. VBAT and VDD_TX sit
> on VPH_PWR and are not modelled. VCC_UICC_IN (L4C) is not modelled;
> UICC SWP is untested.
Thanks for working on NFC!
Unfortunately it doesn't really seem to work for me, based on v7.2
kernel.
When running "sudo nfctool -d nfc0 -1 -p", the dmesg gets a bunch of
spam:
[ 29.097978] ndlc: 00000000: 20 00 01 01
[ 29.100953] ndlc: 00000000: 60 00 1f 01 01 20 02 1a 04 04 01 20 92 80 02 03
[ 29.100969] ndlc: 00000010: 01 59 c0 cf fd 59 c0 89 7f 00 00 00 01 00 00 6d
[ 29.100974] ndlc: 00000020: 3b 02
[ 29.103348] ndlc: 00000000: 6f 02 0c 11 20 00 07 07 02 cf fd 00 00 01 03
[ 29.103470] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.104136] ndlc: 00000000: 40 00 01 00
[ 29.104308] ndlc: 00000000: 20 01 02 00 00
[ 29.107831] ndlc: 00000000: 60 00 1f 02 01 20 02 1a 04 04 01 20 92 80 02 03
[ 29.107866] ndlc: 00000010: 01 59 c0 cf fd 59 c0 89 7f 00 00 00 01 00 00 6d
[ 29.107871] ndlc: 00000020: 3b 02
[ 29.110353] ndlc: 00000000: 6f 02 0c 11 20 00 07 07 02 cf fd 00 00 4b 6b
[ 29.110474] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.113292] ndlc: 00000000: 40 01 18 00 1a 7e 06 00 02 00 02 ff ff 00 0c 01
[ 29.113307] ndlc: 00000010: 05 01 00 02 00 03 00 00 00 90 00
[ 29.113471] ndlc: 00000000: 21 00 01 00
[ 29.114311] ndlc: 00000000: 60 06 03 01 01 01
[ 29.115856] ndlc: 00000000: 41 00 01 00
[ 29.115937] ndlc: 00000000: 22 00 01 01
[ 29.117507] ndlc: 00000000: 42 00 02 00 02
[ 29.117599] ndlc: 00000000: 20 02 14 01 29 11 46 66 6d 01 01 11 04 01 96 03
[ 29.117603] ndlc: 00000010: 02 00 01 02 02 07 ff
[ 29.118976] ndlc: 00000000: 62 00 08 81 01 00 01 03 01 02 00
[ 29.122709] ndlc: 00000000: 62 00 08 83 01 00 01 03 01 02 00
[ 29.123604] ndlc: 00000000: 40 02 02 00 00
[ 29.124294] ndlc: 00000000: 20 02 14 01 61 11 46 66 6d 01 01 11 04 01 96 03
[ 29.124305] ndlc: 00000010: 02 00 01 02 02 07 ff
[ 29.127697] ndlc: 00000000: 40 02 02 00 00
[ 29.128139] ndlc: 00000000: 21 03 09 04 00 01 01 01 02 01 06 01
[ 29.130378] ndlc: 00000000: 41 03 01 00
[ 29.133173] ndlc: 00000000: 6f 02 09 11 20 00 16 04 00 00 63 6b
[ 29.133247] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.143965] ndlc: 00000000: 6f 02 13 11 20 00 12 04 00 00 65 5b 0a 08 01 00
[ 29.143989] ndlc: 00000010: 01 52 00 00 6a 6d
[ 29.144936] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.153545] ndlc: 00000000: 6f 02 0f 11 20 00 0a 0a 07 00 03 05 00 08 00 00
[ 29.153634] ndlc: 00000010: 70 74
[ 29.154439] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.182777] ndlc: 00000000: 6f 02 11 11 20 00 0a 0c 19 00 05 00 ff ff 00 03
[ 29.182801] ndlc: 00000010: 00 00 8f 10
[ 29.182868] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.196213] ndlc: 00000000: 6f 02 0a 11 20 00 0a 05 0a 00 00 9b 4b
[ 29.196414] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.206067] ndlc: 00000000: 6f 02 09 11 20 00 13 04 00 00 9d 47
[ 29.206740] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 29.586059] dw9719 17-000e: Error writing reg 0x0002: -6
[ 30.100584] ndlc: 00000000: 6f 02 09 11 20 00 12 04 00 03 a7 f5
[ 30.100662] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 30.110815] ndlc: 00000000: 6f 02 0d 11 20 00 0a 08 01 00 01 52 00 03 ad 07
[ 30.111019] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 30.120807] ndlc: 00000000: 6f 02 0f 11 20 00 0a 0a 07 00 03 05 00 08 00 03
[ 30.120828] ndlc: 00000010: b3 0d
[ 30.120899] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 30.149554] ndlc: 00000000: 6f 02 11 11 20 00 0a 0c 19 00 05 00 ff ff 00 03
[ 30.149574] ndlc: 00000010: 00 03 d1 a8
[ 30.149649] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 30.163030] ndlc: 00000000: 6f 02 0a 11 20 00 0a 05 0a 00 03 dd e2
[ 30.163100] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 30.172938] ndlc: 00000000: 6f 02 09 11 20 00 13 04 00 03 df df
[ 30.172998] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.065969] ndlc: 00000000: 6f 02 09 11 20 00 12 04 00 06 e9 b2
[ 31.066050] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.076104] ndlc: 00000000: 6f 02 0d 11 20 00 0a 08 01 00 01 52 00 06 ee c4
[ 31.076513] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.086223] ndlc: 00000000: 6f 02 0f 11 20 00 0a 0a 07 00 03 05 00 08 00 06
[ 31.086273] ndlc: 00000010: f4 cb
[ 31.086933] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.114930] ndlc: 00000000: 6f 02 11 11 20 00 0a 0c 19 00 05 00 ff ff 00 03
[ 31.114962] ndlc: 00000010: 00 07 13 69
[ 31.115044] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.128340] ndlc: 00000000: 6f 02 0a 11 20 00 0a 05 0a 00 07 1f a4
[ 31.128410] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 31.138209] ndlc: 00000000: 6f 02 09 11 20 00 13 04 00 07 21 a0
[ 31.138278] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.031735] ndlc: 00000000: 6f 02 09 11 20 00 12 04 00 0a 2a cf
[ 32.032139] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.041357] ndlc: 00000000: 6f 02 0d 11 20 00 0a 08 01 00 01 52 00 0a 2f e1
[ 32.041713] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.051198] ndlc: 00000000: 6f 02 0f 11 20 00 0a 0a 07 00 03 05 00 08 00 0a
[ 32.051227] ndlc: 00000010: 35 e7
[ 32.051575] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.080201] ndlc: 00000000: 6f 02 11 11 20 00 0a 0c 19 00 05 00 ff ff 00 03
[ 32.080221] ndlc: 00000010: 00 0a 54 88
[ 32.080603] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.093508] ndlc: 00000000: 6f 02 0a 11 20 00 0a 05 0a 00 0a 60 c4
[ 32.093893] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.103180] ndlc: 00000000: 6f 02 09 11 20 00 13 04 00 0a 62 c0
[ 32.103507] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 32.995129] ndlc: 00000000: 6f 02 09 11 20 00 12 04 00 0d 6b f2
[ 32.995544] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.005468] ndlc: 00000000: 6f 02 0d 11 20 00 0a 08 01 00 01 52 00 0d 71 04
[ 33.005574] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.015571] ndlc: 00000000: 6f 02 0f 11 20 00 0a 0a 07 00 03 05 00 08 00 0d
[ 33.015591] ndlc: 00000010: 77 0a
[ 33.015684] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.044216] ndlc: 00000000: 6f 02 11 11 20 00 0a 0c 19 00 05 00 ff ff 00 03
[ 33.044237] ndlc: 00000010: 00 0d 95 ac
[ 33.044606] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.057961] ndlc: 00000000: 6f 02 0a 11 20 00 0a 05 0a 00 0d a1 e8
[ 33.058351] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.067653] ndlc: 00000000: 6f 02 09 11 20 00 13 04 00 0d a3 e4
[ 33.068030] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
[ 33.476119] ndlc: 00000000: 21 06 01 00
[ 33.479380] ndlc: 00000000: 41 06 01 00
[ 33.481131] ndlc: 00000000: 6f 02 09 11 20 00 17 04 00 0f 0e e1
[ 33.481217] nci: nci_ntf_packet: unsupported ntf opcode 0xf02
Sometimes my simple NFC tag seems to be detected, but it sometimes takes
quite a while. And starting and stopping (Ctrl-C) the nfctool process
doesn't make it any better, it quickly gets into an error state.
Can you please confirm how you tested this on your side, and if I'm
maybe missing some parts?
Regards
Luca
> To/Cc from scripts/get_maintainer.pl via b4 prep --auto-to-cc on this tree.
>
> Changes in v3:
> - Binding: new compatible is a different ST part (not a driver-sharing note)
> - Binding: drop NDLC/raw-NCI description on compatible
> - Binding example uses interrupts-extended
> - DTS: one nfc_default pinctrl group, pins sorted, no output-high
> - No In-Reply-To; To/Cc from get_maintainer.pl on linux-nfc/for-next
>
> Changes in v2:
> - Compatible is st,st21nfcd (no -i2c suffix)
> - Sent without PGP/MIME
> - DTS: interrupts-extended and pinctrl for IRQ/reset
> - DTS: ese-present / uicc-present (schematic)
> - DTS: SYS_CLK from LN_BB_CLK2, VPS_IO from L18B
> - Binding: optional clocks and vdd-io-supply
> - Driver: optional clk / vdd-io enable
>
> Signed-off-by: Kristian Brox <isyourbrainfoss@proton.me>
> ---
> Kristian Brox (3):
> dt-bindings: net: nfc: add st,st21nfcd
> nfc: st-nci: add raw NCI path for ST21NFCD
> arm64: dts: qcom: qcm6490-fairphone-fp5: add ST21NFCD NFC
>
> .../devicetree/bindings/net/nfc/st,st-nci.yaml | 31 ++++++++
> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 34 ++++++++-
> 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 +
> 7 files changed, 166 insertions(+), 19 deletions(-)
> ---
> base-commit: 9f69d05b5a85c417c73fa2d5c7a2d507ac81cf4b
> change-id: 20260820-fp5-st21nfcd-v3-bde6c248beed
>
> Best regards,
> --
> Kristian Brox <isyourbrainfoss@proton.me>
^ permalink raw reply [flat|nested] 6+ messages in thread