All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Stephan Gerhold <stephan@gerhold.net>
Subject: [PATCH 5/5] arm64: dts: qcom: msm8916-huawei-g7: Add NFC
Date: Fri, 14 May 2021 12:43:28 +0200	[thread overview]
Message-ID: <20210514104328.18756-5-stephan@gerhold.net> (raw)
In-Reply-To: <20210514104328.18756-1-stephan@gerhold.net>

The Huawei Ascend G7 supports NFC using the NXP PN547, which is
supported by the nxp-nci-i2c driver in mainline. It seems to detect
NFC tags using "nfctool" just fine, although it seems like there
are not really any useful applications making use of the Linux NFC
subsystem. :(

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 .../arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
index 5ad4e921b110..e0075b574190 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
@@ -193,6 +193,24 @@ rmi4-f11@11 {
 	};
 };
 
+&blsp_i2c6 {
+	status = "okay";
+
+	nfc@28 {
+		compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
+		reg = <0x28>;
+
+		interrupt-parent = <&msmgpio>;
+		interrupts = <21 IRQ_TYPE_EDGE_RISING>;
+
+		enable-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
+		firmware-gpios = <&msmgpio 2 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&nfc_default>;
+	};
+};
+
 &blsp1_uart2 {
 	status = "okay";
 };
@@ -378,6 +396,14 @@ gpio_leds_default: gpio-leds-default {
 		bias-disable;
 	};
 
+	nfc_default: nfc-default {
+		pins = "gpio2", "gpio20", "gpio21";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	mag_reset_default: mag-reset-default {
 		pins = "gpio36";
 		function = "gpio";
-- 
2.31.1


  parent reply	other threads:[~2021-05-14 10:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 10:43 [PATCH 1/5] arm64: dts: qcom: msm8916: Add device tree for Huawei Ascend G7 Stephan Gerhold
2021-05-14 10:43 ` [PATCH 2/5] arm64: dts: qcom: msm8916-huawei-g7: Add touchscreen Stephan Gerhold
2021-05-14 10:43 ` [PATCH 3/5] arm64: dts: qcom: msm8916-huawei-g7: Add sensors Stephan Gerhold
2021-05-14 10:43 ` [PATCH 4/5] arm64: dts: qcom: msm8916-huawei-g7: Add display regulator Stephan Gerhold
2021-05-14 10:43 ` Stephan Gerhold [this message]
2021-06-10 15:32 ` [PATCH 1/5] arm64: dts: qcom: msm8916: Add device tree for Huawei Ascend G7 Bjorn Andersson
2021-06-10 15:45   ` Stephan Gerhold

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=20210514104328.18756-5-stephan@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=phone-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.