Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/sdm632-fairphone-fp3.dts

raw
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (c) 2022, Luca Weiss <[email protected]>
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 vreg_cam_af_2p85: regulator-cam-af-2p85 {
40 compatible = "regulator-fixed";
41 regulator-name = "cam_af_2p85";
42 regulator-min-microvolt = <2850000>;
43 regulator-max-microvolt = <2850000>;
44
45 gpio = <&tlmm 128 GPIO_ACTIVE_HIGH>;
46 enable-active-high;
47
48 vin-supply = <&vph_pwr>;
49 };
50
51 vreg_cam_io_1p8: regulator-cam-io-1p8 {
52 compatible = "regulator-fixed";
53 regulator-name = "cam_io_1p8";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
56
57 gpio = <&tlmm 130 GPIO_ACTIVE_HIGH>;
58 enable-active-high;
59
60 vin-supply = <&vph_pwr>;
61 };
62
63 vreg_cam2_dig_1p2: regulator-cam2-dig-1p2 {
64 compatible = "regulator-fixed";
65 regulator-name = "cam2_dig_1p2";
66 regulator-min-microvolt = <1200000>;
67 regulator-max-microvolt = <1200000>;
68
69 gpio = <&tlmm 46 GPIO_ACTIVE_HIGH>;
70 enable-active-high;
71
72 vin-supply = <&vph_pwr>;
73 };
74
75 /* Dummy regulator until PMI632 has LCDB VSP/VSN support */
76 lcdb_dummy: regulator-lcdb-dummy {
77 compatible = "regulator-fixed";
78 regulator-name = "lcdb_dummy";
79 regulator-min-microvolt = <5500000>;
80 regulator-max-microvolt = <5500000>;
81 };
82
83 vph_pwr: vph-pwr-regulator {
84 compatible = "regulator-fixed";
85 regulator-name = "vph_pwr";
86 regulator-always-on;
87 regulator-boot-on;
88 };
89 };
90
91 &cci {
92 status = "okay";
93 };
94
95 &cci_i2c0 {
96 /* Sony IMX363 (rear) @ 0x10 */
97
98 eeprom@50 {
99 compatible = "belling,bl24s64", "atmel,24c64";
100 reg = <0x50>;
101 vcc-supply = <&vreg_cam_io_1p8>;
102 read-only;
103 };
104
105 /* ON Semi LC898217 VCM @ 0x72 */
106 };
107
108 &cci_i2c1 {
109 /* Samsung S5K4H7YX (front) @ 0x10 */
110 };
111
112 &gpu {
113 status = "okay";
114 };
115
116 &gpu_zap_shader {
117 firmware-name = "qcom/msm8953/fairphone/fp3/a506_zap.mbn";
118 };
119
120 &hsusb_phy {
121 vdd-supply = <&pm8953_l3>;
122 vdda-pll-supply = <&pm8953_l7>;
123 vdda-phy-dpdm-supply = <&pm8953_l13>;
124
125 status = "okay";
126 };
127
128 &i2c_3 {
129 status = "okay";
130
131 touchscreen@48 {
132 compatible = "himax,hx83112b";
133 reg = <0x48>;
134 interrupt-parent = <&tlmm>;
135 interrupts = <65 IRQ_TYPE_LEVEL_LOW>;
136 touchscreen-size-x = <1080>;
137 touchscreen-size-y = <2160>;
138 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
139 };
140 };
141
142 &i2c_5 {
143 status = "okay";
144
145 nfc@28 {
146 compatible = "nxp,nq310", "nxp,nxp-nci-i2c";
147 reg = <0x28>;
148
149 interrupt-parent = <&tlmm>;
150 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
151
152 enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
153 firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
154 };
155 };
156
157 &lpass {
158 firmware-name = "qcom/msm8953/fairphone/fp3/adsp.mbn";
159
160 status = "okay";
161 };
162
163 &mdss {
164 status = "okay";
165 };
166
167 &mdss_dsi0 {
168 vdda-supply = <&pm8953_s3>;
169 status = "okay";
170
171 panel@0 {
172 compatible = "djn,98-03057-6598b-i";
173 reg = <0>;
174
175 reset-gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
176
177 iovcc-supply = <&pm8953_l6>;
178 vsn-supply = <&lcdb_dummy>;
179 vsp-supply = <&lcdb_dummy>;
180
181 pinctrl-0 = <&mdss_te_default>;
182 pinctrl-names = "default";
183
184 port {
185 panel_in: endpoint {
186 remote-endpoint = <&mdss_dsi0_out>;
187 };
188 };
189 };
190 };
191
192 &mdss_dsi0_out {
193 data-lanes = <0 1 2 3>;
194 remote-endpoint = <&panel_in>;
195 };
196
197 &mdss_dsi0_phy {
198 vcca-supply = <&pm8953_l3>;
199 status = "okay";
200 };
201
202 &mpss {
203 firmware-name = "qcom/msm8953/fairphone/fp3/mba.mbn",
204 "qcom/msm8953/fairphone/fp3/modem.mbn";
205 pll-supply = <&pm8953_l7>;
206
207 status = "okay";
208 };
209
210 &pm8953_resin {
211 linux,code = <KEY_VOLUMEDOWN>;
212 status = "okay";
213 };
214
215 &pmi632_lpg {
216 status = "okay";
217
218 multi-led {
219 color = <LED_COLOR_ID_RGB>;
220 function = LED_FUNCTION_STATUS;
221
222 #address-cells = <1>;
223 #size-cells = <0>;
224
225 led@1 {
226 reg = <1>;
227 color = <LED_COLOR_ID_RED>;
228 };
229
230 led@2 {
231 reg = <2>;
232 color = <LED_COLOR_ID_GREEN>;
233 };
234
235 led@3 {
236 reg = <3>;
237 color = <LED_COLOR_ID_BLUE>;
238 };
239 };
240 };
241
242 &pmi632_typec {
243 status = "okay";
244
245 connector {
246 compatible = "usb-c-connector";
247
248 power-role = "dual";
249 data-role = "dual";
250 self-powered;
251
252 typec-power-opmode = "default";
253 pd-disable;
254
255 port {
256 pmi632_hs_in: endpoint {
257 remote-endpoint = <&usb_dwc3_hs>;
258 };
259 };
260 };
261 };
262
263 &pmi632_vbus {
264 regulator-min-microamp = <500000>;
265 regulator-max-microamp = <1000000>;
266 status = "okay";
267 };
268
269 &pmi632_vib {
270 status = "okay";
271 };
272
273 &sdhc_1 {
274 vmmc-supply = <&pm8953_l8>;
275 vqmmc-supply = <&pm8953_l5>;
276
277 status = "okay";
278 };
279
280 &sdhc_2 {
281 vmmc-supply = <&pm8953_l11>;
282 vqmmc-supply = <&pm8953_l12>;
283
284 cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
285
286 status = "okay";
287 };
288
289 &rpm_requests {
290 regulators {
291 compatible = "qcom,rpm-pm8953-regulators";
292
293 vdd_l1-supply = <&pm8953_s3>;
294 vdd_l2_l3-supply = <&pm8953_s3>;
295 vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
296 vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
297 vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
298
299 pm8953_s3: s3 {
300 regulator-min-microvolt = <984000>;
301 regulator-max-microvolt = <1240000>;
302 };
303
304 pm8953_s4: s4 {
305 regulator-min-microvolt = <1036000>;
306 regulator-max-microvolt = <2040000>;
307 };
308
309 pm8953_s5: s5 {
310 regulator-min-microvolt = <1036000>;
311 regulator-max-microvolt = <2040000>;
312 };
313
314 pm8953_l1: l1 {
315 regulator-min-microvolt = <975000>;
316 regulator-max-microvolt = <1050000>;
317 };
318
319 pm8953_l2: l2 {
320 regulator-min-microvolt = <975000>;
321 regulator-max-microvolt = <1175000>;
322 };
323
324 pm8953_l3: l3 {
325 regulator-min-microvolt = <925000>;
326 regulator-max-microvolt = <925000>;
327 };
328
329 pm8953_l5: l5 {
330 regulator-min-microvolt = <1800000>;
331 regulator-max-microvolt = <1800000>;
332 };
333
334 pm8953_l6: l6 {
335 regulator-min-microvolt = <1800000>;
336 regulator-max-microvolt = <1800000>;
337 };
338
339 pm8953_l7: l7 {
340 regulator-min-microvolt = <1800000>;
341 regulator-max-microvolt = <1900000>;
342 };
343
344 pm8953_l8: l8 {
345 regulator-min-microvolt = <2900000>;
346 regulator-max-microvolt = <2900000>;
347 };
348
349 pm8953_l9: l9 {
350 regulator-min-microvolt = <3000000>;
351 regulator-max-microvolt = <3300000>;
352 };
353
354 pm8953_l10: l10 {
355 regulator-min-microvolt = <2800000>;
356 regulator-max-microvolt = <3000000>;
357 };
358
359 pm8953_l11: l11 {
360 regulator-min-microvolt = <2950000>;
361 regulator-max-microvolt = <2950000>;
362 };
363
364 pm8953_l12: l12 {
365 regulator-min-microvolt = <1800000>;
366 regulator-max-microvolt = <2950000>;
367 };
368
369 pm8953_l13: l13 {
370 regulator-min-microvolt = <3125000>;
371 regulator-max-microvolt = <3125000>;
372 };
373
374 pm8953_l16: l16 {
375 regulator-min-microvolt = <1800000>;
376 regulator-max-microvolt = <1800000>;
377 };
378
379 pm8953_l17: l17 {
380 regulator-min-microvolt = <2850000>;
381 regulator-max-microvolt = <2850000>;
382 };
383
384 pm8953_l19: l19 {
385 regulator-min-microvolt = <1200000>;
386 regulator-max-microvolt = <1350000>;
387 };
388
389 pm8953_l22: l22 {
390 regulator-min-microvolt = <2800000>;
391 regulator-max-microvolt = <2800000>;
392 };
393
394 pm8953_l23: l23 {
395 regulator-min-microvolt = <975000>;
396 regulator-max-microvolt = <1225000>;
397 };
398 };
399 };
400
401 &tlmm {
402 /*
403 * 0-3: unused but protected by TZ
404 * 135-138: fingerprint reader (SPI)
405 */
406 gpio-reserved-ranges = <0 4>, <135 4>;
407
408 mdss_te_default: mdss-te-default-state {
409 pins = "gpio24";
410 function = "mdp_vsync";
411 drive-strength = <2>;
412 bias-pull-down;
413 };
414 };
415
416 &uart_0 {
417 status = "okay";
418 };
419
420 &usb3 {
421 status = "okay";
422 };
423
424 &usb_dwc3_hs {
425 remote-endpoint = <&pmi632_hs_in>;
426 };
427
428 &wcnss {
429 firmware-name = "qcom/msm8953/fairphone/fp3/wcnss.mbn";
430 vddpx-supply = <&pm8953_l5>;
431
432 status = "okay";
433 };
434
435 &wcnss_ctrl {
436 firmware-name = "qcom/msm8953/fairphone/fp3/WCNSS_qcom_wlan_nv.bin";
437 };
438
439 &wcnss_iris {
440 compatible = "qcom,wcn3680";
441
442 vddxo-supply = <&pm8953_l7>;
443 vddrfa-supply = <&pm8953_l19>;
444 vddpa-supply = <&pm8953_l9>;
445 vdddig-supply = <&pm8953_l5>;
446 };