summaryrefslogtreecommitdiff
path: root/dts-pinephone-drop-modem-power-node.patch
blob: b90ecede8a90bd239a4573cc49040c3639ead4bf (plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
From 602d05e416ae0d0fba3022fa2c3d195164b406c6 Mon Sep 17 00:00:00 2001
From: Clayton Craft <clayton@craftyguy.net>
Date: Wed, 16 Dec 2020 20:16:14 -0800
Subject: [PATCH] dts: pinephone: drop modem-power node

---
 .../allwinner/sun50i-a64-pinephone-1.0.dts    | 26 +++---------------
 .../allwinner/sun50i-a64-pinephone-1.1.dts    | 27 +++----------------
 .../allwinner/sun50i-a64-pinephone-1.2.dts    | 27 +++----------------
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 12 +++++++++
 4 files changed, 24 insertions(+), 68 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
index a21c6d78a..7f0cfdafe 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -86,28 +86,6 @@ &reg_drivevbus {
 	status = "okay";
 };
 
-&uart3 {
-	modem {
-		compatible = "quectel,eg25";
-		char-device-name = "modem-power";
-
-		power-supply = <&reg_vbat_bb>; /* PL7 */
-
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-
-		sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-		wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
-
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
-		dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
-		quectel,qdai = "1,1,0,1,0,0,1,1";
-	};
-};
-
 &usbphy {
 	usb-role-switch;
 
@@ -118,6 +96,10 @@ usb0_drd_sw: endpoint {
 	};
 };
 
+&ring_indicator {
+	gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
+};
+
 &sgm3140 {
 	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
index 61ff56b17..5e85ddc12 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -109,34 +109,15 @@ &reg_drivevbus {
 	status = "okay";
 };
 
+&ring_indicator {
+	gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
+};
+
 &sgm3140 {
 	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 };
 
-&uart3 {
-	modem {
-		compatible = "quectel,eg25";
-		char-device-name = "modem-power";
-
-		power-supply = <&reg_vbat_bb>; /* PL7 */
-
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-		//status-pwrkey-multiplexed; /* status acts as pwrkey */
-
-		sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-		wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
-
-		dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
-		quectel,qdai = "1,1,0,1,0,0,1,1";
-	};
-};
-
 &usbphy {
 	usb-role-switch;
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index fe7d567a8..f4b9b0991 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -101,34 +101,15 @@ &reg_anx1v0 {
 	enable-active-high;
 };
 
+&ring_indicator {
+	gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
+};
+
 &sgm3140 {
 	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 };
 
-&uart3 {
-	modem {
-		compatible = "quectel,eg25";
-		char-device-name = "modem-power";
-
-		power-supply = <&reg_vbat_bb>; /* PL7 */
-
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
-		status-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-
-		host-ready-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-		wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-RI */
-
-		dtr-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-DTR */
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
-		quectel,qdai = "1,1,0,1,0,0,1,1";
-	};
-};
-
 &usbphy {
 	usb-role-switch;
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 346113382..7b48126d1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -192,6 +192,17 @@ ec25_codec: ec25-codec {
 		sound-name-prefix = "Modem";
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		ring_indicator: ring-indicator {
+			label = "Ring Indicator";
+			linux,can-disable;
+			linux,code = <KEY_WAKEUP>;
+			wakeup-source;
+		};
+	};
+
 	i2c_csi: i2c-csi {
 		compatible = "i2c-gpio";
 		sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
@@ -264,6 +275,7 @@ reg_usb_5v: usb-5v {
 	reg_vbat_bb: vbat-bb {
 		compatible = "regulator-fixed";
 		regulator-name = "vbat-bb";
+		regulator-always-on;
 		regulator-min-microvolt = <3500000>;
 		regulator-max-microvolt = <3500000>;
 		gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
-- 
2.31.1