blob: e2708c74e95afd2f199306a9e868f2bbd6f26de3 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Luca Weiss <luca@z3ntu.xyz>
4 */
5/dts-v1/;
6
7#include <dt-bindings/leds/common.h>
8#include "sdm632.dtsi"
9#include "pm8953.dtsi"
10#include "pmi632.dtsi"
11
12/ {
13 model = "Fairphone 3";
14 compatible = "fairphone,fp3", "qcom,sdm632";
15 chassis-type = "handset";
16 qcom,msm-id = <349 0>;
17 qcom,board-id = <8 0x10000>;
18
19 aliases {
20 mmc0 = &sdhc_1;
21 mmc1 = &sdhc_2;
22 serial0 = &uart_0;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 gpio-keys {
30 compatible = "gpio-keys";
31
32 key-volume-up {
33 label = "volume_up";
34 linux,code = <KEY_VOLUMEUP>;
35 gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 vph_pwr: vph-pwr-regulator {
40 compatible = "regulator-fixed";
41 regulator-name = "vph_pwr";
42 regulator-always-on;
43 regulator-boot-on;
44 };
45};
46
47&hsusb_phy {
48 status = "okay";
49 vdd-supply = <&pm8953_l3>;
50 vdda-pll-supply = <&pm8953_l7>;
51 vdda-phy-dpdm-supply = <&pm8953_l13>;
52};
53
54&i2c_3 {
55 status = "okay";
56
57 touchscreen@48 {
58 compatible = "himax,hx83112b";
59 reg = <0x48>;
60 interrupt-parent = <&tlmm>;
61 interrupts = <65 IRQ_TYPE_LEVEL_LOW>;
62 touchscreen-size-x = <1080>;
63 touchscreen-size-y = <2160>;
64 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
65 };
66};
67
68&i2c_5 {
69 status = "okay";
70
71 nfc@28 {
72 compatible = "nxp,nq310", "nxp,nxp-nci-i2c";
73 reg = <0x28>;
74
75 interrupt-parent = <&tlmm>;
76 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
77
78 enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
79 firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
80 };
81};
82
Tom Rini93743d22024-04-01 09:08:13 -040083&lpass {
84 status = "okay";
85};
86
Tom Rini53633a82024-02-29 12:33:36 -050087&pm8953_resin {
88 status = "okay";
89 linux,code = <KEY_VOLUMEDOWN>;
90};
91
92&pmi632_lpg {
93 status = "okay";
94
95 multi-led {
96 color = <LED_COLOR_ID_RGB>;
97 function = LED_FUNCTION_STATUS;
98
99 #address-cells = <1>;
100 #size-cells = <0>;
101
102 led@1 {
103 reg = <1>;
104 color = <LED_COLOR_ID_RED>;
105 };
106
107 led@2 {
108 reg = <2>;
109 color = <LED_COLOR_ID_GREEN>;
110 };
111
112 led@3 {
113 reg = <3>;
114 color = <LED_COLOR_ID_BLUE>;
115 };
116 };
117};
118
Tom Rini762f85b2024-07-20 11:15:10 -0600119&pmi632_typec {
120 status = "okay";
121
122 connector {
123 compatible = "usb-c-connector";
124
125 power-role = "dual";
126 data-role = "dual";
127 self-powered;
128
129 typec-power-opmode = "default";
130 pd-disable;
131
132 port {
133 pmi632_hs_in: endpoint {
134 remote-endpoint = <&usb_dwc3_hs>;
135 };
136 };
137 };
138};
139
140&pmi632_vbus {
141 regulator-min-microamp = <500000>;
142 regulator-max-microamp = <1000000>;
143 status = "okay";
144};
145
Tom Rini53633a82024-02-29 12:33:36 -0500146&sdhc_1 {
147 status = "okay";
148 vmmc-supply = <&pm8953_l8>;
149 vqmmc-supply = <&pm8953_l5>;
150};
151
152&sdhc_2 {
153 status = "okay";
154 vmmc-supply = <&pm8953_l11>;
155 vqmmc-supply = <&pm8953_l12>;
156
157 cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
158};
159
160&rpm_requests {
161 regulators {
162 compatible = "qcom,rpm-pm8953-regulators";
163
164 vdd_l1-supply = <&pm8953_s3>;
165 vdd_l2_l3-supply = <&pm8953_s3>;
166 vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
167 vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
168 vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
169
170 pm8953_s3: s3 {
171 regulator-min-microvolt = <984000>;
172 regulator-max-microvolt = <1240000>;
173 };
174 pm8953_s4: s4 {
175 regulator-min-microvolt = <1036000>;
176 regulator-max-microvolt = <2040000>;
177 };
178 pm8953_s5: s5 {
179 regulator-min-microvolt = <1036000>;
180 regulator-max-microvolt = <2040000>;
181 };
182
183 pm8953_l1: l1 {
184 regulator-min-microvolt = <975000>;
185 regulator-max-microvolt = <1050000>;
186 };
187 pm8953_l2: l2 {
188 regulator-min-microvolt = <975000>;
189 regulator-max-microvolt = <1175000>;
190 };
191 pm8953_l3: l3 {
192 regulator-min-microvolt = <925000>;
193 regulator-max-microvolt = <925000>;
194 };
195 pm8953_l5: l5 {
196 regulator-min-microvolt = <1800000>;
197 regulator-max-microvolt = <1800000>;
198 };
199 pm8953_l6: l6 {
200 regulator-min-microvolt = <1800000>;
201 regulator-max-microvolt = <1800000>;
202 };
203 pm8953_l7: l7 {
204 regulator-min-microvolt = <1800000>;
205 regulator-max-microvolt = <1900000>;
206 };
207 pm8953_l8: l8 {
208 regulator-min-microvolt = <2900000>;
209 regulator-max-microvolt = <2900000>;
210 };
211 pm8953_l9: l9 {
212 regulator-min-microvolt = <3000000>;
213 regulator-max-microvolt = <3300000>;
214 };
215 pm8953_l10: l10 {
216 regulator-min-microvolt = <2800000>;
217 regulator-max-microvolt = <3000000>;
218 };
219 pm8953_l11: l11 {
220 regulator-min-microvolt = <2950000>;
221 regulator-max-microvolt = <2950000>;
222 };
223 pm8953_l12: l12 {
224 regulator-min-microvolt = <1800000>;
225 regulator-max-microvolt = <2950000>;
226 };
227 pm8953_l13: l13 {
228 regulator-min-microvolt = <3125000>;
229 regulator-max-microvolt = <3125000>;
230 };
231 pm8953_l16: l16 {
232 regulator-min-microvolt = <1800000>;
233 regulator-max-microvolt = <1800000>;
234 };
235 pm8953_l17: l17 {
236 regulator-min-microvolt = <2850000>;
237 regulator-max-microvolt = <2850000>;
238 };
239 pm8953_l19: l19 {
240 regulator-min-microvolt = <1200000>;
241 regulator-max-microvolt = <1350000>;
242 };
243 pm8953_l22: l22 {
244 regulator-min-microvolt = <2800000>;
245 regulator-max-microvolt = <2800000>;
246 };
247 pm8953_l23: l23 {
248 regulator-min-microvolt = <975000>;
249 regulator-max-microvolt = <1225000>;
250 };
251 };
252};
253
254&tlmm {
255 /*
256 * 0-3: unused but protected by TZ
257 * 135-138: fingerprint reader (SPI)
258 */
259 gpio-reserved-ranges = <0 4>, <135 4>;
260};
261
262&uart_0 {
263 status = "okay";
264};
265
266&usb3 {
267 status = "okay";
268};
269
Tom Rini762f85b2024-07-20 11:15:10 -0600270&usb_dwc3_hs {
271 remote-endpoint = <&pmi632_hs_in>;
Tom Rini53633a82024-02-29 12:33:36 -0500272};
Tom Rini93743d22024-04-01 09:08:13 -0400273
274&wcnss {
275 status = "okay";
276
277 vddpx-supply = <&pm8953_l5>;
278};
279
280&wcnss_iris {
281 compatible = "qcom,wcn3680";
282
283 vddxo-supply = <&pm8953_l7>;
284 vddrfa-supply = <&pm8953_l19>;
285 vddpa-supply = <&pm8953_l9>;
286 vdddig-supply = <&pm8953_l5>;
287};