]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
arm64: dts: qcom: msm8916-huawei-g7: Add NFC
authorStephan Gerhold <stephan@gerhold.net>
Fri, 14 May 2021 10:43:28 +0000 (12:43 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 10 Jun 2021 16:05:02 +0000 (11:05 -0500)
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>
Link: https://lore.kernel.org/r/20210514104328.18756-5-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts

index 5ad4e921b11087ba3c45231465a0f0e1d567465d..e0075b574190860f644433c01713d1b5fdb1f00b 100644 (file)
        };
 };
 
+&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";
 };
                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";