Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / qcom-msm8974pro-fairphone-fp2.dts
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-msm8974pro.dtsi"
3 #include "qcom-pm8841.dtsi"
4 #include "qcom-pm8941.dtsi"
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
8
9 / {
10         model = "Fairphone 2";
11         compatible = "fairphone,fp2", "qcom,msm8974";
12
13         aliases {
14                 mmc0 = &sdhc_1;
15                 mmc1 = &sdhc_2;
16                 serial0 = &blsp1_uart2;
17         };
18
19         chosen {
20                 stdout-path = "serial0:115200n8";
21         };
22
23         gpio-keys {
24                 compatible = "gpio-keys";
25
26                 pinctrl-names = "default";
27                 pinctrl-0 = <&gpio_keys_pin_a>;
28
29                 key-camera-snapshot {
30                         label = "camera_snapshot";
31                         gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_CAMERA>;
33                         wakeup-source;
34                         debounce-interval = <15>;
35                 };
36
37                 key-volume-down {
38                         label = "volume_down";
39                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_VOLUMEDOWN>;
41                         wakeup-source;
42                         debounce-interval = <15>;
43                 };
44
45                 key-volume-up {
46                         label = "volume_up";
47                         gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_VOLUMEUP>;
49                         wakeup-source;
50                         debounce-interval = <15>;
51                 };
52         };
53
54         vibrator {
55                 compatible = "gpio-vibrator";
56                 enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
57                 vcc-supply = <&pm8941_l18>;
58         };
59 };
60
61 &blsp1_i2c2 {
62         status = "okay";
63
64         touchscreen@41 {
65                 compatible = "ilitek,ili2120";
66                 reg = <0x41>;
67                 interrupt-parent = <&tlmm>;
68                 interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
69                 reset-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;
70
71                 touchscreen-size-x = <1080>;
72                 touchscreen-size-y = <1920>;
73         };
74 };
75
76 &blsp1_uart2 {
77         status = "okay";
78 };
79
80 &imem {
81         reboot-mode {
82                 mode-normal = <0x77665501>;
83                 mode-bootloader = <0x77665500>;
84                 mode-recovery = <0x77665502>;
85         };
86 };
87
88 &otg {
89         status = "okay";
90
91         phys = <&usb_hs1_phy>;
92         phy-select = <&tcsr 0xb000 0>;
93         extcon = <&smbb>, <&usb_id>;
94         vbus-supply = <&chg_otg>;
95
96         hnp-disable;
97         srp-disable;
98         adp-disable;
99
100         ulpi {
101                 phy@a {
102                         status = "okay";
103
104                         v1p8-supply = <&pm8941_l6>;
105                         v3p3-supply = <&pm8941_l24>;
106
107                         extcon = <&smbb>;
108                         qcom,init-seq = /bits/ 8 <0x1 0x64>;
109                 };
110         };
111 };
112
113 &pm8941_gpios {
114         gpio_keys_pin_a: gpio-keys-active-state {
115                 pins = "gpio1", "gpio2", "gpio5";
116                 function = "normal";
117
118                 bias-pull-up;
119                 power-source = <PM8941_GPIO_S3>;
120         };
121 };
122
123 &pm8941_lpg {
124         status = "okay";
125
126         qcom,power-source = <1>;
127
128         multi-led {
129                 color = <LED_COLOR_ID_RGB>;
130                 function = LED_FUNCTION_STATUS;
131
132                 #address-cells = <1>;
133                 #size-cells = <0>;
134
135                 led@7 {
136                         reg = <7>;
137                         color = <LED_COLOR_ID_RED>;
138                 };
139
140                 led@6 {
141                         reg = <6>;
142                         color = <LED_COLOR_ID_GREEN>;
143                 };
144
145                 led@5 {
146                         reg = <5>;
147                         color = <LED_COLOR_ID_BLUE>;
148                 };
149         };
150 };
151
152 &pronto {
153         status = "okay";
154
155         vddmx-supply = <&pm8841_s1>;
156         vddcx-supply = <&pm8841_s2>;
157         vddpx-supply = <&pm8941_s3>;
158
159         pinctrl-names = "default";
160         pinctrl-0 = <&wcnss_pin_a>;
161
162         iris {
163                 vddxo-supply = <&pm8941_l6>;
164                 vddrfa-supply = <&pm8941_l11>;
165                 vddpa-supply = <&pm8941_l19>;
166                 vdddig-supply = <&pm8941_s3>;
167         };
168
169         smd-edge {
170                 qcom,remote-pid = <4>;
171                 label = "pronto";
172
173                 wcnss {
174                         status = "okay";
175                 };
176         };
177 };
178
179 &remoteproc_adsp {
180         status = "okay";
181         cx-supply = <&pm8841_s2>;
182 };
183
184 &remoteproc_mss {
185         status = "okay";
186         cx-supply = <&pm8841_s2>;
187         mss-supply = <&pm8841_s3>;
188         mx-supply = <&pm8841_s1>;
189         pll-supply = <&pm8941_l12>;
190 };
191
192 &rpm_requests {
193         pm8841-regulators {
194                 compatible = "qcom,rpm-pm8841-regulators";
195
196                 pm8841_s1: s1 {
197                         regulator-min-microvolt = <675000>;
198                         regulator-max-microvolt = <1050000>;
199                 };
200
201                 pm8841_s2: s2 {
202                         regulator-min-microvolt = <500000>;
203                         regulator-max-microvolt = <1050000>;
204                 };
205
206                 pm8841_s3: s3 {
207                         regulator-min-microvolt = <1050000>;
208                         regulator-max-microvolt = <1050000>;
209                 };
210         };
211
212         pm8941-regulators {
213                 compatible = "qcom,rpm-pm8941-regulators";
214
215                 vdd_l1_l3-supply = <&pm8941_s1>;
216                 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
217                 vdd_l4_l11-supply = <&pm8941_s1>;
218                 vdd_l5_l7-supply = <&pm8941_s2>;
219                 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
220                 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
221                 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
222                 vdd_l21-supply = <&vreg_boost>;
223
224                 pm8941_s1: s1 {
225                         regulator-min-microvolt = <1300000>;
226                         regulator-max-microvolt = <1300000>;
227                         regulator-always-on;
228                         regulator-boot-on;
229                 };
230
231                 pm8941_s2: s2 {
232                         regulator-min-microvolt = <2150000>;
233                         regulator-max-microvolt = <2150000>;
234                         regulator-boot-on;
235                 };
236
237                 pm8941_s3: s3 {
238                         regulator-min-microvolt = <1800000>;
239                         regulator-max-microvolt = <1800000>;
240                         regulator-always-on;
241                         regulator-boot-on;
242                 };
243
244                 pm8941_l1: l1 {
245                         regulator-min-microvolt = <1225000>;
246                         regulator-max-microvolt = <1225000>;
247                         regulator-always-on;
248                         regulator-boot-on;
249                 };
250
251                 pm8941_l2: l2 {
252                         regulator-min-microvolt = <1200000>;
253                         regulator-max-microvolt = <1200000>;
254                 };
255
256                 pm8941_l3: l3 {
257                         regulator-min-microvolt = <1225000>;
258                         regulator-max-microvolt = <1225000>;
259                 };
260
261                 pm8941_l4: l4 {
262                         regulator-min-microvolt = <1225000>;
263                         regulator-max-microvolt = <1225000>;
264                 };
265
266                 pm8941_l5: l5 {
267                         regulator-min-microvolt = <1800000>;
268                         regulator-max-microvolt = <1800000>;
269                 };
270
271                 pm8941_l6: l6 {
272                         regulator-min-microvolt = <1800000>;
273                         regulator-max-microvolt = <1800000>;
274                         regulator-boot-on;
275                 };
276
277                 pm8941_l7: l7 {
278                         regulator-min-microvolt = <1800000>;
279                         regulator-max-microvolt = <1800000>;
280                         regulator-boot-on;
281                 };
282
283                 pm8941_l8: l8 {
284                         regulator-min-microvolt = <1800000>;
285                         regulator-max-microvolt = <1800000>;
286                 };
287
288                 pm8941_l9: l9 {
289                         regulator-min-microvolt = <1800000>;
290                         regulator-max-microvolt = <2950000>;
291                 };
292
293                 pm8941_l10: l10 {
294                         regulator-min-microvolt = <1800000>;
295                         regulator-max-microvolt = <2950000>;
296                 };
297
298                 pm8941_l11: l11 {
299                         regulator-min-microvolt = <1225000>;
300                         regulator-max-microvolt = <1350000>;
301                 };
302
303                 pm8941_l12: l12 {
304                         regulator-min-microvolt = <1800000>;
305                         regulator-max-microvolt = <1800000>;
306                         regulator-always-on;
307                         regulator-boot-on;
308                 };
309
310                 pm8941_l13: l13 {
311                         regulator-min-microvolt = <1800000>;
312                         regulator-max-microvolt = <2950000>;
313                         regulator-boot-on;
314                 };
315
316                 pm8941_l14: l14 {
317                         regulator-min-microvolt = <1800000>;
318                         regulator-max-microvolt = <1800000>;
319                 };
320
321                 pm8941_l15: l15 {
322                         regulator-min-microvolt = <2050000>;
323                         regulator-max-microvolt = <2050000>;
324                 };
325
326                 pm8941_l16: l16 {
327                         regulator-min-microvolt = <2700000>;
328                         regulator-max-microvolt = <2700000>;
329                 };
330
331                 pm8941_l17: l17 {
332                         regulator-min-microvolt = <2850000>;
333                         regulator-max-microvolt = <2850000>;
334                 };
335
336                 pm8941_l18: l18 {
337                         regulator-min-microvolt = <2850000>;
338                         regulator-max-microvolt = <2850000>;
339                 };
340
341                 pm8941_l19: l19 {
342                         regulator-min-microvolt = <2900000>;
343                         regulator-max-microvolt = <3350000>;
344                 };
345
346                 pm8941_l20: l20 {
347                         regulator-min-microvolt = <2950000>;
348                         regulator-max-microvolt = <2950000>;
349                         regulator-system-load = <200000>;
350                         regulator-allow-set-load;
351                         regulator-boot-on;
352                 };
353
354                 pm8941_l21: l21 {
355                         regulator-min-microvolt = <2950000>;
356                         regulator-max-microvolt = <2950000>;
357                         regulator-boot-on;
358                 };
359
360                 pm8941_l22: l22 {
361                         regulator-min-microvolt = <3000000>;
362                         regulator-max-microvolt = <3300000>;
363                 };
364
365                 pm8941_l23: l23 {
366                         regulator-min-microvolt = <3000000>;
367                         regulator-max-microvolt = <3000000>;
368                 };
369
370                 pm8941_l24: l24 {
371                         regulator-min-microvolt = <3075000>;
372                         regulator-max-microvolt = <3075000>;
373                         regulator-boot-on;
374                 };
375         };
376 };
377
378 &sdhc_1 {
379         status = "okay";
380
381         vmmc-supply = <&pm8941_l20>;
382         vqmmc-supply = <&pm8941_s3>;
383
384         pinctrl-names = "default", "sleep";
385         pinctrl-0 = <&sdc1_on>;
386         pinctrl-1 = <&sdc1_off>;
387 };
388
389 &sdhc_2 {
390         status = "okay";
391
392         vmmc-supply = <&pm8941_l21>;
393         vqmmc-supply = <&pm8941_l13>;
394
395         pinctrl-names = "default", "sleep";
396         pinctrl-0 = <&sdc2_on>;
397         pinctrl-1 = <&sdc2_off>;
398 };
399
400 &smbb {
401         usb-charge-current-limit = <1500000>;
402         qcom,fast-charge-safe-current = <1500000>;
403         qcom,fast-charge-current-limit = <1500000>;
404         qcom,fast-charge-safe-voltage = <4380000>;
405         qcom,fast-charge-high-threshold-voltage = <4350000>;
406         qcom,auto-recharge-threshold-voltage = <4240000>;
407         qcom,minimum-input-voltage = <4450000>;
408 };
409
410 &tlmm {
411         sdc1_on: sdc1-on {
412                 clk {
413                         pins = "sdc1_clk";
414                         drive-strength = <16>;
415                         bias-disable;
416                 };
417
418                 cmd-data {
419                         pins = "sdc1_cmd", "sdc1_data";
420                         drive-strength = <10>;
421                         bias-pull-up;
422                 };
423         };
424
425         sdc2_on: sdc2-on {
426                 clk {
427                         pins = "sdc2_clk";
428                         drive-strength = <10>;
429                         bias-disable;
430                 };
431
432                 cmd-data {
433                         pins = "sdc2_cmd", "sdc2_data";
434                         drive-strength = <6>;
435                         bias-pull-up;
436                 };
437         };
438
439         wcnss_pin_a: wcnss-pin-active {
440                 wlan {
441                         pins =  "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
442                         function = "wlan";
443
444                         drive-strength = <6>;
445                         bias-pull-down;
446                 };
447
448                 bt {
449                         pins = "gpio35", "gpio43", "gpio44";
450                         function = "bt";
451
452                         drive-strength = <2>;
453                         bias-pull-down;
454                 };
455
456                 fm {
457                         pins = "gpio41", "gpio42";
458                         function = "fm";
459
460                         drive-strength = <2>;
461                         bias-pull-down;
462                 };
463         };
464 };