linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Lin, Meng-Bo" <linmengbo0689@protonmail.com>,
	linux-kernel@vger.kernel.org
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Olof Johansson <olof@lixom.net>,
	Stephan Gerhold <stephan@gerhold.net>,
	Nikita Travkin <nikita@trvn.ru>,
	soc@kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Joe Mason <buddyjojo06@outlook.com>
Subject: Re: [PATCH 7/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add NFC
Date: Thu, 22 Jun 2023 17:20:55 +0200	[thread overview]
Message-ID: <218a76d9-d00b-3856-80b1-7d2f11b4ff1f@linaro.org> (raw)
In-Reply-To: <20230622000437.48367-1-linmengbo0689@protonmail.com>

On 22/06/2023 02:05, Lin, Meng-Bo wrote:
> From: Joe Mason <buddyjojo06@outlook.com>
> 
> The Samsung Galaxy Ace 4, Core Prime and some Grand Prime have a
> Samsung S3FWRN5 NFC chip that works quite well with the s3fwrn5 driver
> in the Linux NFC subsystem.
> 
> The clock setup for the NFC chip is a bit special (although this
> seems to be a common approach used for Qualcomm devices with NFC):
> 
> The NFC chip has an output GPIO that is asserted whenever the clock
> is needed to function properly. On the A3/A5 this is wired up to
> PM8916 GPIO2, which is then configured with a special function
> (NFC_CLK_REQ or BB_CLK2_REQ).
> 
> Enabling the rpmcc RPM_SMD_BB_CLK2_PIN clock will then instruct
> PM8916 to automatically enable the clock whenever the NFC chip
> requests it. The advantage is that the clock is only enabled when
> needed and we don't need to manage it ourselves from the NFC driver.
> 
> Grand Prime SM-G530Y (fortunaltezt) has a NXP PN547, which is supported
> by the nxp-nci-i2c driver in mainline.
> 
> It seems to detect NFC tags using "nfctool" just fine, although more
> testing is difficult given there seem to be very few useful applications
> making use of the Linux NFC subsystem.
> 
> Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
> [Put i2c-nfc and NFC pinctrl into fortuna.dtsi to share it with other variants]
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

This and other SoB chains look like missing Co-developed-by.

> [Add pn547_nfc]
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---


> +		/* Available NFC chip varies depending on model variant */
> +		pn547_nfc: nfc@2b {
> +			compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
> +			reg = <0x2b>;
> +
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <21 IRQ_TYPE_EDGE_RISING>;
> +
> +			enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
> +			firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
> +
> +			pinctrl-0 = <&nfc_default>;
> +			pinctrl-names = "default";
> +
> +			status = "disabled";
> +		};
> +
> +		s3fwrn5_nfc: nfc@27 {
> +			compatible = "samsung,s3fwrn5-i2c";
> +			reg = <0x27>;
> +
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <21 IRQ_TYPE_EDGE_RISING>;
> +
> +			en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
> +			wake-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
> +
> +			clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
> +
> +			pinctrl-0 = <&nfc_default>, <&nfc_clk_req>;
> +			pinctrl-names = "default";
> +
> +			status = "disabled";

Common part does not have two NFCs. It seems common part has zero
NFCs... or should be put into different file.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2023-06-22 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  0:00 [PATCH 0/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
2023-06-22  0:03 ` [PATCH 2/7] " Lin, Meng-Bo
2023-06-22  0:04 ` [PATCH 4/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add rt5033 battery Lin, Meng-Bo
2023-06-22  0:04 ` [PATCH 5/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen Lin, Meng-Bo
2023-06-22  0:05 ` [PATCH 6/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add accelerometer/magnetometer Lin, Meng-Bo
2023-06-22 15:17   ` Krzysztof Kozlowski
2023-06-22  0:05 ` [PATCH 7/7] arm64: dts: qcom: msm8916-samsung-fortuna: Add NFC Lin, Meng-Bo
2023-06-22 15:20   ` Krzysztof Kozlowski [this message]

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=218a76d9-d00b-3856-80b1-7d2f11b4ff1f@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=buddyjojo06@outlook.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linmengbo0689@protonmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@trvn.ru \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    --cc=stephan@gerhold.net \
    --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;
as well as URLs for NNTP newsgroup(s).