Devicetree
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: Paul Sajna <sajattack@postmarketos.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC
Date: Sun, 6 Sep 2026 23:32:09 +0200	[thread overview]
Message-ID: <28fb606b-8631-483a-a02e-ecd16e9cc238@ixit.cz> (raw)
In-Reply-To: <20260906-sdm845-lg-judy-nfc-v2-1-63aeb7b1a5f6@postmarketos.org>

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,


  reply	other threads:[~2026-09-06 21:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 21:11 [PATCH v2] arm64: dts: qcom: sdm845-lg: Enable NFC Paul Sajna
2026-09-06 21:32 ` David Heidelberg [this message]
2026-09-09 13:16   ` Konrad Dybcio
2026-09-15 19:11     ` David Heidelberg
2026-09-30 12:37 ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28fb606b-8631-483a-a02e-ecd16e9cc238@ixit.cz \
    --to=david@ixit.cz \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sajattack@postmarketos.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox