mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC
@ 2026-09-06 21:11 Paul Sajna
  2026-09-06 21:32 ` David Heidelberg
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Sajna @ 2026-09-06 21:11 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: David Heidelberg, linux-arm-msm, devicetree, linux-kernel,
	phone-devel, ~postmarketos/upstreaming, Paul Sajna

Add the i2c and tlmm nodes to support the NXP PN547 NFC chip

Downstream dtsi for reference:
https://github.com/LineageOS/android_kernel_lge_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-judyln_lao_com/sdm845-judyln_lao_com-nfc.dtsi

Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
Changes in v2:
- correct drive-strength
- add gpio116
- Link to v1: https://lore.kernel.org/r/20260902-sdm845-lg-judy-nfc-v1-1-282173900569@postmarketos.org
---
 arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 31 ++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index b030a10009c5..c77da1b0d57d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -471,6 +471,25 @@ &gpu {
 	status = "okay";
 };
 
+&i2c3 {
+	clock-frequency = <1000000>;
+
+	status = "okay";
+
+	nfc@28 {
+		compatible = "nxp,pn547", "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_default>;
+		pinctrl-names = "default";
+	};
+};
+
 &ipa {
 	status = "okay";
 };
@@ -551,6 +570,11 @@ &qupv3_id_1 {
 	status = "okay";
 };
 
+&qup_i2c3_default {
+	drive-strength = <2>;
+	bias-disable;
+};
+
 &qup_uart9_rx {
 	drive-strength = <2>;
 	bias-pull-up;
@@ -609,6 +633,13 @@ sd_card_det_n: sd-card-det-n-state {
 		function = "gpio";
 		bias-pull-up;
 	};
+
+	nfc_default: nfc-default-state {
+		pins = "gpio12", "gpio62", "gpio63", "gpio116";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
 };
 
 &uart6 {

---
base-commit: 32b6ef9a5d0eca44f9cd91f52f4faa89f145a0de
change-id: 20260902-sdm845-lg-judy-nfc-5f9e5775393d

Best regards,
-- 
Paul Sajna <sajattack@postmarketos.org>


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

* Re: [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC
  2026-09-06 21:11 [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC Paul Sajna
@ 2026-09-06 21:32 ` David Heidelberg
  2026-09-09 13:16   ` Konrad Dybcio
  0 siblings, 1 reply; 4+ messages in thread
From: David Heidelberg @ 2026-09-06 21:32 UTC (permalink / raw)
  To: Paul Sajna, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming

On 06/09/2026 23:11, Paul Sajna wrote:
> Add the i2c and tlmm nodes to support the NXP PN547 NFC chip
> 
> Downstream dtsi for reference:
> https://github.com/LineageOS/android_kernel_lge_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-judyln_lao_com/sdm845-judyln_lao_com-nfc.dtsi
> 
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---
> Changes in v2:
> - correct drive-strength
> - add gpio116
> - Link to v1: https://lore.kernel.org/r/20260902-sdm845-lg-judy-nfc-v1-1-282173900569@postmarketos.org
> ---
>   arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 31 ++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> index b030a10009c5..c77da1b0d57d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> @@ -471,6 +471,25 @@ &gpu {
>   	status = "okay";
>   };
>   
> +&i2c3 {
> +	clock-frequency = <1000000>;
> +
> +	status = "okay";
> +
> +	nfc@28 {
> +		compatible = "nxp,pn547", "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_default>;
> +		pinctrl-names = "default";
> +	};
> +};
> +
>   &ipa {
>   	status = "okay";
>   };
> @@ -551,6 +570,11 @@ &qupv3_id_1 {
>   	status = "okay";
>   };
>   
> +&qup_i2c3_default {
> +	drive-strength = <2>;
> +	bias-disable;
> +};
> +
>   &qup_uart9_rx {
>   	drive-strength = <2>;
>   	bias-pull-up;
> @@ -609,6 +633,13 @@ sd_card_det_n: sd-card-det-n-state {
>   		function = "gpio";
>   		bias-pull-up;
>   	};
> +
> +	nfc_default: nfc-default-state {
> +		pins = "gpio12", "gpio62", "gpio63", "gpio116";

here the verbosity may not be bad (device-tree functions as documentation too)
gpio116 is associated with eSE NFC part (just guessing, but... it worked before, 
so), and generally the pn547 doesn't need it at all to work.

TBH not sure if there or what consensus is here about this. The eSE needs it, 
but we don't have the driver thus also no integration with NFC part.

David

> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-up;
> +	};
>   };
>   
>   &uart6 {
> 
> ---
> base-commit: 32b6ef9a5d0eca44f9cd91f52f4faa89f145a0de
> change-id: 20260902-sdm845-lg-judy-nfc-5f9e5775393d
> 
> Best regards,


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

* Re: [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC
  2026-09-06 21:32 ` David Heidelberg
@ 2026-09-09 13:16   ` Konrad Dybcio
  2026-09-15 19:11     ` David Heidelberg
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2026-09-09 13:16 UTC (permalink / raw)
  To: David Heidelberg, Paul Sajna, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming

On 9/6/26 11:32 PM, David Heidelberg wrote:
> On 06/09/2026 23:11, Paul Sajna wrote:
>> Add the i2c and tlmm nodes to support the NXP PN547 NFC chip
>>
>> Downstream dtsi for reference:
>> https://github.com/LineageOS/android_kernel_lge_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-judyln_lao_com/sdm845-judyln_lao_com-nfc.dtsi
>>
>> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
>> ---

[...]

>> +    nfc_default: nfc-default-state {
>> +        pins = "gpio12", "gpio62", "gpio63", "gpio116";
> 
> here the verbosity may not be bad (device-tree functions as documentation too)
> gpio116 is associated with eSE NFC part (just guessing, but... it worked before, so), and generally the pn547 doesn't need it at all to work.
> 
> TBH not sure if there or what consensus is here about this. The eSE needs it, but we don't have the driver thus also no integration with NFC part.

The eSE driver would still be acting on the NFC node, right?

Konrad

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

* Re: [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC
  2026-09-09 13:16   ` Konrad Dybcio
@ 2026-09-15 19:11     ` David Heidelberg
  0 siblings, 0 replies; 4+ messages in thread
From: David Heidelberg @ 2026-09-15 19:11 UTC (permalink / raw)
  To: Konrad Dybcio, Paul Sajna, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming

On 09/09/2026 15:16, Konrad Dybcio wrote:
> On 9/6/26 11:32 PM, David Heidelberg wrote:
>> On 06/09/2026 23:11, Paul Sajna wrote:
>>> Add the i2c and tlmm nodes to support the NXP PN547 NFC chip
>>>
>>> Downstream dtsi for reference:
>>> https://github.com/LineageOS/android_kernel_lge_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/lge/sdm845-judy/sdm845-judyln_lao_com/sdm845-judyln_lao_com-nfc.dtsi
>>>
>>> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
>>> ---
> 
> [...]
> 
>>> +    nfc_default: nfc-default-state {
>>> +        pins = "gpio12", "gpio62", "gpio63", "gpio116";
>>
>> here the verbosity may not be bad (device-tree functions as documentation too)
>> gpio116 is associated with eSE NFC part (just guessing, but... it worked before, so), and generally the pn547 doesn't need it at all to work.
>>
>> TBH not sure if there or what consensus is here about this. The eSE needs it, but we don't have the driver thus also no integration with NFC part.
> 
> The eSE driver would still be acting on the NFC node, right?

So far that's the Android design. So, yes.

David

> 
> Konrad


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

end of thread, other threads:[~2026-09-15 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-06 21:11 [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC Paul Sajna
2026-09-06 21:32 ` David Heidelberg
2026-09-09 13:16   ` Konrad Dybcio
2026-09-15 19:11     ` David Heidelberg

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

all inboxes | Powered by JetHome®