forked from silime/ArchLinux-Packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfc.patch
80 lines (75 loc) · 1.9 KB
/
nfc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From f92f80b0ace30f84637a6eef6d29849fcae3d6ee Mon Sep 17 00:00:00 2001
From: Silime <[email protected]>
Date: Thu, 25 Aug 2022 01:01:56 +0800
Subject: [PATCH] add nfc support
---
.../boot/dts/qcom/sdm845-oneplus-common.dtsi | 32 +++++++++++++++++++
arch/arm64/configs/sdm845.config | 7 ++++
2 files changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index badc526e7..574d7396f 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -419,6 +419,21 @@ zap-shader {
};
};
+&i2c3 {
+ status = "okay";
+ nfc@28 {
+ compatible = "nxp,pn544-i2c";
+ reg = <0x28>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
+ enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>;
+ firmware-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&nfc_int_active &nfc_enable_active>;
+ };
+
+};
+
&i2c10 {
status = "okay";
clock-frequency = <100000>;
@@ -839,6 +854,23 @@ mux {
input-enable;
};
};
+ nfc_int_active: nfc_int_active {
+ mux {
+ pins = "gpio63";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ nfc_enable_active: nfc_enable_active {
+ mux {
+ pins = "gpio12", "gpio116";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
};
&venus {
diff --git a/arch/arm64/configs/sdm845.config b/arch/arm64/configs/sdm845.config
index 36f2ac836..97ebe1902 100644
--- a/arch/arm64/configs/sdm845.config
+++ b/arch/arm64/configs/sdm845.config
@@ -8,6 +8,13 @@ CONFIG_HID_RMI=m
CONFIG_RMI4_CORE=m
CONFIG_RMI4_I2C=m
CONFIG_RMI4_F55=y
+CONFIG_NFC_SHDLC=y
+CONFIG_NFC_HCI=m
+CONFIG_NFC_NXP_NCI=m
+CONFIG_NFC_NXP_NCI_I2C=m
+CONFIG_NFC_PN544=m
+CONFIG_NFC_PN544_MEI=m
+CONFIG_NFC_PN544_I2C=m
# OnePlus 6T
CONFIG_SND_SOC_TFA98XX=m
--
2.34.1