public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices)
@ 2026-03-22 14:24 David Heidelberg via B4 Relay
  2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-03-22 14:24 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel, David Heidelberg

There isn't upstream driver.

I'm openining this as a starter. We need a NFC drivers I assume. I tried
quick check, but both of NFC drivers register

nfc: nfc_init: NFC Core ver 0.1
NET: Registered PF_NFC protocol family

but efficiently does nothing. In the See section, there are some ways
how to make NFC work, but rely on patched vendor libs, missing updates
etc.

1. What hardware is present on Snapdragon 845, is there some
   documentation? It seems that both sdm845 devices has almost identical
   setup, thus it's NFC solution integrated? @Qualcomm

2. What's the right approach to continue? Should we upstream these
   definitions and then start developing user-space stack? @netdev (I
   see orphaned)

Since looking at NFC mailing list (oe-linux-nfc) and seeing it's pretty
much dead, would be cool to revive it.

Also there is some effort from Arch people [1], but likely without clean
path to mainline.

Can we revieve the NFC effort? I'm offering limited maintanance (in case
people would send patches).

See:
 - https://gitlab.com/sdm845-mainline/linux/-/merge_requests/62
 - https://github.com/NXPNFCLinux/linux_libnfc-nci/
   - https://github.com/biemster/pmos-openbox-conky/blob/main/libnfc-nci.patch
   - https://github.com/biemster/pmos-openbox-conky/blob/main/nfctest.patch
   - pull request
   - full of hacks

 - [1] https://github.com/zmr-233/linux-nxp-nfc-fix

Signed-off-by: David Heidelberg <david@ixit.cz>
---
David Heidelberg (1):
      arm64: dts: qcom: sdm845-shift-axolotl: Enable NFC

biemster (1):
      arm64: dts: qcom: sdm845-oneplus: Enable NFC

 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 32 +++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts  | 33 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
---
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
change-id: 20251118-oneplus-nfc-c00ef1cdfa9b

Best regards,
-- 
David Heidelberg <david@ixit.cz>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC
  2026-03-22 14:24 [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) David Heidelberg via B4 Relay
@ 2026-03-22 14:24 ` David Heidelberg via B4 Relay
  2026-03-23 11:35   ` Konrad Dybcio
  2026-03-23 11:56   ` Krzysztof Kozlowski
  2026-03-22 14:24 ` [PATCH QUESTION 2/2] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-03-22 14:24 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel, David Heidelberg

From: biemster <l.j.beemster@gmail.com>

Definition of the NFC.

Co-developed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 5b121ea5520f5..34f476299b114 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -392,6 +392,26 @@ &gpu_zap_shader {
 	firmware-name = "qcom/sdm845/OnePlus/enchilada/a630_zap.mbn";
 };
 
+&i2c3 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	nfc@28 {
+		compatible = "nxp,nxp-nci-i2c";
+		reg = <0x28>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <63 IRQ_TYPE_EDGE_RISING>;
+
+		enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+		firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&nfc_default>;
+		pinctrl-names = "default";
+	};
+};
+
 &i2c10 {
 	status = "okay";
 	clock-frequency = <100000>;
@@ -594,6 +614,11 @@ &qupv3_id_0 {
 	status = "okay";
 };
 
+&qup_i2c3_default {
+	drive-strength = <2>;
+	bias-disable;
+};
+
 &qup_i2c10_default {
 	drive-strength = <2>;
 	bias-disable;
@@ -926,6 +951,13 @@ speaker_default: speaker-default-state {
 		bias-pull-up;
 		output-high;
 	};
+
+	nfc_default: nfc-default-state {
+		pins = "gpio12", "gpio62", "gpio63";
+		function = "gpio";
+		drive-strength = <6>;
+		bias-pull-up;
+	};
 };
 
 &venus {

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH QUESTION 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Enable NFC
  2026-03-22 14:24 [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) David Heidelberg via B4 Relay
  2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
@ 2026-03-22 14:24 ` David Heidelberg via B4 Relay
  2026-03-22 19:48 ` [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) Krzysztof Kozlowski
  2026-03-23 11:34 ` Konrad Dybcio
  3 siblings, 0 replies; 8+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-03-22 14:24 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel, David Heidelberg

From: David Heidelberg <david@ixit.cz>

Definition of the NFC.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 33 +++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index 51b041f91d3e2..bc336584c9fb9 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -431,6 +431,25 @@ &gpu_zap_shader {
 	firmware-name = "qcom/sdm845/SHIFT/axolotl/a630_zap.mbn";
 };
 
+&i2c3 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	nfc@28 {
+		compatible = "nxp,nq310", "nxp,nxp-nci-i2c";
+		reg = <0x28>;
+
+		interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_RISING>;
+
+		enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+		firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&nfc_int_default &nfc_enable_default>;
+		pinctrl-names = "default";
+	};
+};
+
 &i2c5 {
 	status = "okay";
 
@@ -609,6 +628,20 @@ &slpi_pas {
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <81 4>;
 
+	nfc_int_default: nfc-int-default-state {
+		pins = "gpio63";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	nfc_enable_default: nfc-enable-default-state {
+		pins = "gpio12", "gpio62";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
 	sde_dsi_active: sde-dsi-active-state {
 		pins = "gpio6", "gpio11";
 		function = "gpio";

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices)
  2026-03-22 14:24 [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) David Heidelberg via B4 Relay
  2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
  2026-03-22 14:24 ` [PATCH QUESTION 2/2] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
@ 2026-03-22 19:48 ` Krzysztof Kozlowski
  2026-03-23 22:56   ` David Heidelberg
  2026-03-23 11:34 ` Konrad Dybcio
  3 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-22 19:48 UTC (permalink / raw)
  To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel

On 22/03/2026 15:24, David Heidelberg via B4 Relay wrote:
> There isn't upstream driver.
> 
> I'm openining this as a starter. We need a NFC drivers I assume. I tried
> quick check, but both of NFC drivers register
> 
> nfc: nfc_init: NFC Core ver 0.1
> NET: Registered PF_NFC protocol family
> 
> but efficiently does nothing. In the See section, there are some ways
> how to make NFC work, but rely on patched vendor libs, missing updates
> etc.
> 
> 1. What hardware is present on Snapdragon 845, is there some
>    documentation? It seems that both sdm845 devices has almost identical
>    setup, thus it's NFC solution integrated? @Qualcomm
> 
> 2. What's the right approach to continue? Should we upstream these
>    definitions and then start developing user-space stack? @netdev (I
>    see orphaned)

User space stack is there already.

> 
> Since looking at NFC mailing list (oe-linux-nfc) and seeing it's pretty
> much dead, would be cool to revive it.
> 
> Also there is some effort from Arch people [1], but likely without clean
> path to mainline.
> 
> Can we revieve the NFC effort? I'm offering limited maintanance (in case
> people would send patches).
> 
> See:
>  - https://gitlab.com/sdm845-mainline/linux/-/merge_requests/62
>  - https://github.com/NXPNFCLinux/linux_libnfc-nci/

I don't know which interface libnfc-nci is using. There are multiple NFC
stack implementations in general, but the one using kernel interface is
neard.

You will not get another stack, but taking care of Linux nfc and neard
would be appreciated.

Let me release a new version for it.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices)
  2026-03-22 14:24 [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) David Heidelberg via B4 Relay
                   ` (2 preceding siblings ...)
  2026-03-22 19:48 ` [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) Krzysztof Kozlowski
@ 2026-03-23 11:34 ` Konrad Dybcio
  3 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2026-03-23 11:34 UTC (permalink / raw)
  To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel

On 3/22/26 3:24 PM, David Heidelberg via B4 Relay wrote:
> There isn't upstream driver.
> 
> I'm openining this as a starter. We need a NFC drivers I assume. I tried
> quick check, but both of NFC drivers register
> 
> nfc: nfc_init: NFC Core ver 0.1
> NET: Registered PF_NFC protocol family
> 
> but efficiently does nothing. In the See section, there are some ways
> how to make NFC work, but rely on patched vendor libs, missing updates
> etc.
> 
> 1. What hardware is present on Snapdragon 845, is there some
>    documentation? It seems that both sdm845 devices has almost identical
>    setup, thus it's NFC solution integrated? @Qualcomm

As far as I'm able to tell, they're clearly external ICs

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC
  2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
@ 2026-03-23 11:35   ` Konrad Dybcio
  2026-03-23 11:56   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2026-03-23 11:35 UTC (permalink / raw)
  To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel

On 3/22/26 3:24 PM, David Heidelberg via B4 Relay wrote:
> From: biemster <l.j.beemster@gmail.com>
> 
> Definition of the NFC.
> 
> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index 5b121ea5520f5..34f476299b114 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -392,6 +392,26 @@ &gpu_zap_shader {
>  	firmware-name = "qcom/sdm845/OnePlus/enchilada/a630_zap.mbn";
>  };
>  
> +&i2c3 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	nfc@28 {
> +		compatible = "nxp,nxp-nci-i2c";
> +		reg = <0x28>;
> +
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <63 IRQ_TYPE_EDGE_RISING>;

interrupts-extended, please

Konrad


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC
  2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
  2026-03-23 11:35   ` Konrad Dybcio
@ 2026-03-23 11:56   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-23 11:56 UTC (permalink / raw)
  To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel

On 22/03/2026 15:24, David Heidelberg via B4 Relay wrote:
> From: biemster <l.j.beemster@gmail.com>
> 
> Definition of the NFC.
> 

Incomplete DCO. We cannot take commits where author is anonymous and did
not sign the DCO.

You can however take ownership, after reading carefully the DCO
requirements and agreeing/certifying what they state.

> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices)
  2026-03-22 19:48 ` [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) Krzysztof Kozlowski
@ 2026-03-23 22:56   ` David Heidelberg
  0 siblings, 0 replies; 8+ messages in thread
From: David Heidelberg @ 2026-03-23 22:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Petr Hodina, biemster, netdev, linux-arm-msm, oe-linux-nfc,
	devicetree, linux-kernel, phone-devel

> 
> You will not get another stack, but taking care of Linux nfc and neard
> would be appreciated.

Just tested with `neard`, `nfctool -d nfc0 -p` and the HW is able to detect tag 
(didn't do more testing for now, but it's good start).

Thank you for the new release!

I'll send non-QUESTION series ~ tomorrow.

David

> 
> Let me release a new version for it.
> 
> Best regards,
> Krzysztof

-- 
David Heidelberg


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-23 22:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 14:24 [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) David Heidelberg via B4 Relay
2026-03-22 14:24 ` [PATCH QUESTION 1/2] arm64: dts: qcom: sdm845-oneplus: Enable NFC David Heidelberg via B4 Relay
2026-03-23 11:35   ` Konrad Dybcio
2026-03-23 11:56   ` Krzysztof Kozlowski
2026-03-22 14:24 ` [PATCH QUESTION 2/2] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2026-03-22 19:48 ` [PATCH QUESTION 0/2] NFC support in Linux (and support for Qualcomm SDM845 devices) Krzysztof Kozlowski
2026-03-23 22:56   ` David Heidelberg
2026-03-23 11:34 ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox