[PATCH] arm64: dts: qcom: sdm845-oneplus-common: add PN553 NFC

From: Gergo Koteles
Date: Tue Mar 07 2023 - 13:58:36 EST


The OnePlus 6/6T both have a NQ330 (PN553 + P73N2M0).
The PN533 supported by the nxp-nci-i2c driver in mainline.
It detects/reads NFC tags using "nfctool".

Signed-off-by: Gergo Koteles <soyer@xxxxxx>
---
.../boot/dts/qcom/sdm845-oneplus-common.dtsi | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 64638ea94db7..4dfc9ade7596 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -380,6 +380,25 @@ zap-shader {
};
};

+&i2c3 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ 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-names = "default";
+ pinctrl-0 = <&nfc_int_active &nfc_enable_active>;
+ };
+};
+
&i2c10 {
status = "okay";
clock-frequency = <100000>;
@@ -753,6 +772,20 @@ &usb_1_hsphy {
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;

+ nfc_int_active: nfc-int-active-state {
+ pins = "gpio63";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ nfc_enable_active: nfc-enable-active-state {
+ pins = "gpio12", "gpio62";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
tri_state_key_default: tri-state-key-default-state {
pins = "gpio40", "gpio42", "gpio26";
function = "gpio";
--
2.39.2