]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: sdm845-oneplus: Enable NFC
authorDavid Heidelberg <david@ixit.cz>
Fri, 3 Apr 2026 13:58:47 +0000 (15:58 +0200)
committerBjorn Andersson <andersson@kernel.org>
Mon, 27 Apr 2026 19:39:17 +0000 (14:39 -0500)
Enable NFC controller NXP PN553, which is part of the package NXP NQ330
(NFC + eSE).

Based on work of biemster <l.j.beemster@gmail.com>.

Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260403-oneplus-nfc-v3-2-fbdce57d63c1@ixit.cz
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi

index b0b9baf01ec292952679960b0da5ceb9889da4c2..04e11448b53a64a4698264c58e4ae25418785eb1 100644 (file)
        firmware-name = "qcom/sdm845/OnePlus/enchilada/a630_zap.mbn";
 };
 
+&i2c3 {
+       clock-frequency = <400000>;
+
+       status = "okay";
+
+       nfc@28 {
+               compatible = "nxp,pn553", "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-1 = <&nfc_sleep>;
+               pinctrl-names = "default", "sleep";
+       };
+};
+
 &i2c10 {
        status = "okay";
        clock-frequency = <100000>;
        status = "okay";
 };
 
+&qup_i2c3_default {
+       drive-strength = <2>;
+       bias-disable;
+};
+
 &qup_i2c10_default {
        drive-strength = <2>;
        bias-disable;
                bias-pull-up;
                output-high;
        };
+
+       nfc_default: nfc-default-state {
+               enable-pins {
+                       pins = "gpio12", "gpio62";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+
+               int-pins {
+                       pins = "gpio63";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
+
+       nfc_sleep: nfc-sleep-state {
+               enable-pins {
+                       pins = "gpio12", "gpio62";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+
+               int-pins {
+                       pins = "gpio63";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
 };
 
 &venus {