Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / qcom / sda660-inforce-ifc6560.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Copyright (c) 2021, Linaro Ltd.
4  * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
5  * Copyright (c) 2020, AngeloGioacchino Del Regno
6  *                     <angelogioacchino.delregno@somainline.org>
7  */
8
9 /dts-v1/;
10
11 #include "sdm660.dtsi"
12 #include "pm660.dtsi"
13 #include "pm660l.dtsi"
14
15 / {
16         model = "Inforce 6560 Single Board Computer";
17         compatible = "inforce,ifc6560", "qcom,sda660";
18         chassis-type = "embedded"; /* SBC */
19
20         aliases {
21                 serial0 = &blsp1_uart2;
22                 serial1 = &blsp2_uart1;
23         };
24
25         chosen {
26                 stdout-path = "serial0:115200n8";
27         };
28
29         gpio-keys {
30                 compatible = "gpio-keys";
31
32                 volup {
33                         label = "Volume Up";
34                         gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_VOLUMEUP>;
36                         debounce-interval = <15>;
37                 };
38         };
39
40         /*
41          * Until we hook up type-c detection, we
42          * have to stick with this. But it works.
43          */
44         extcon_usb: extcon-usb {
45                 compatible = "linux,extcon-usb-gpio";
46                 id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
47         };
48
49         hdmi-out {
50                 compatible = "hdmi-connector";
51                 type = "a";
52
53                 port {
54                         hdmi_con: endpoint {
55                                 remote-endpoint = <&adv7533_out>;
56                         };
57                 };
58         };
59
60         vph_pwr: vph-pwr-regulator {
61                 compatible = "regulator-fixed";
62                 regulator-name = "vph_pwr";
63                 regulator-min-microvolt = <3800000>;
64                 regulator-max-microvolt = <3800000>;
65
66                 regulator-always-on;
67                 regulator-boot-on;
68         };
69
70         v3p3_bck_bst: v3p3-bck-bst-regulator {
71                 compatible = "regulator-fixed";
72                 regulator-name = "v3p3_bck_bst";
73
74                 regulator-min-microvolt = <3300000>;
75                 regulator-max-microvolt = <3300000>;
76
77                 vin-supply = <&vph_pwr>;
78         };
79
80         v1p2_ldo: v1p2-ldo-regulator {
81                 compatible = "regulator-fixed";
82                 regulator-name = "v1p2_ldo";
83
84                 regulator-min-microvolt = <1200000>;
85                 regulator-max-microvolt = <1200000>;
86
87                 vin-supply = <&vph_pwr>;
88         };
89
90         v5p0_boost: v5p0-boost-regulator {
91                 compatible = "regulator-fixed";
92                 regulator-name = "v5p0_boost";
93
94                 regulator-min-microvolt = <5000000>;
95                 regulator-max-microvolt = <5000000>;
96
97                 vin-supply = <&vph_pwr>;
98         };
99 };
100
101 &adsp_pil {
102         firmware-name = "qcom/ifc6560/adsp.mbn";
103 };
104
105 &blsp_i2c6 {
106         status = "okay";
107
108         adv7533: hdmi@39 {
109                 compatible = "adi,adv7535";
110                 reg = <0x39>, <0x66>;
111                 reg-names = "main", "edid";
112
113                 interrupt-parent = <&pm660l_gpios>;
114                 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
115
116                 clocks = <&rpmcc RPM_SMD_BB_CLK2>;
117                 clock-names = "cec";
118                 /*
119                  * Limit to 3 lanes to prevent the bridge from changing amount
120                  * of lanes in the fly. MSM DSI host doesn't like that.
121                  */
122                 adi,dsi-lanes = <3>;
123                 avdd-supply = <&vreg_l13a_1p8>;
124                 dvdd-supply = <&vreg_l13a_1p8>;
125                 pvdd-supply = <&vreg_l13a_1p8>;
126                 a2vdd-supply = <&vreg_l13a_1p8>;
127                 v3p3-supply = <&v3p3_bck_bst>;
128
129                 ports {
130                         #address-cells = <1>;
131                         #size-cells = <0>;
132
133                         port@0 {
134                                 reg = <0>;
135
136                                 adv7533_in: endpoint {
137                                         remote-endpoint = <&dsi0_out>;
138                                 };
139                         };
140
141                         port@1 {
142                                 reg = <1>;
143
144                                 adv7533_out: endpoint {
145                                         remote-endpoint = <&hdmi_con>;
146                                 };
147                         };
148                 };
149         };
150 };
151
152 &blsp1_dma {
153         /*
154          * The board will lock up if we toggle the BLSP clock, unless the
155          * BAM DMA interconnects support is in place.
156          */
157         /delete-property/ clocks;
158 };
159
160 &blsp1_uart2 {
161         status = "okay";
162 };
163
164 &blsp2_dma {
165         /*
166          * The board will lock up if we toggle the BLSP clock, unless the
167          * BAM DMA interconnects support is in place.
168          */
169         /delete-property/ clocks;
170 };
171
172 &blsp2_uart1 {
173         status = "okay";
174
175         bluetooth {
176                 compatible = "qcom,wcn3990-bt";
177
178                 vddio-supply = <&vreg_l13a_1p8>;
179                 vddxo-supply = <&vreg_l9a_1p8>;
180                 vddrf-supply = <&vreg_l6a_1p3>;
181                 vddch0-supply = <&vreg_l19a_3p3>;
182                 max-speed = <3200000>;
183         };
184 };
185
186 &dsi0 {
187         status = "okay";
188         vdda-supply = <&vreg_l1a_1p225>;
189 };
190
191 &dsi0_out {
192         remote-endpoint = <&adv7533_in>;
193         data-lanes = <0 1 2 3>;
194 };
195
196 &dsi0_phy {
197         status = "okay";
198         vcca-supply = <&vreg_l1b_0p925>;
199 };
200
201 &mdss {
202         status = "okay";
203 };
204
205 &mmss_smmu {
206         status = "okay";
207 };
208
209 &pon_pwrkey {
210         status = "okay";
211 };
212
213 &pon_resin {
214         status = "okay";
215
216         linux,code = <KEY_VOLUMEUP>;
217 };
218
219 &qusb2phy0 {
220         status = "okay";
221
222         vdd-supply = <&vreg_l1b_0p925>;
223         vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
224 };
225
226 &qusb2phy1 {
227         status = "okay";
228
229         vdd-supply = <&vreg_l1b_0p925>;
230         vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
231 };
232
233 &rpm_requests {
234         pm660-regulators {
235                 compatible = "qcom,rpm-pm660-regulators";
236
237                 vdd_s1-supply = <&vph_pwr>;
238                 vdd_s2-supply = <&vph_pwr>;
239                 vdd_s3-supply = <&vph_pwr>;
240                 vdd_s4-supply = <&vph_pwr>;
241                 vdd_s5-supply = <&vph_pwr>;
242                 vdd_s6-supply = <&vph_pwr>;
243
244                 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
245                 vdd_l2_l3-supply = <&vreg_s2b_1p05>;
246                 vdd_l5-supply = <&vreg_s2b_1p05>;
247                 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
248                 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
249
250                 vreg_s4a_2p04: s4 {
251                         regulator-min-microvolt = <1805000>;
252                         regulator-max-microvolt = <2040000>;
253                         regulator-enable-ramp-delay = <200>;
254                         regulator-ramp-delay = <0>;
255                         regulator-always-on;
256                 };
257
258                 vreg_s5a_1p35: s5 {
259                         regulator-min-microvolt = <1224000>;
260                         regulator-max-microvolt = <1350000>;
261                         regulator-enable-ramp-delay = <200>;
262                         regulator-ramp-delay = <0>;
263                 };
264
265                 vreg_l1a_1p225: l1 {
266                         regulator-min-microvolt = <1150000>;
267                         regulator-max-microvolt = <1250000>;
268                         regulator-enable-ramp-delay = <250>;
269                         regulator-allow-set-load;
270                 };
271
272                 vreg_l6a_1p3: l6 {
273                         regulator-min-microvolt = <1304000>;
274                         regulator-max-microvolt = <1368000>;
275                         regulator-enable-ramp-delay = <250>;
276                         regulator-ramp-delay = <0>;
277                         regulator-allow-set-load;
278                 };
279
280                 vreg_l8a_1p8: l8 {
281                         regulator-min-microvolt = <1800000>;
282                         regulator-max-microvolt = <1800000>;
283                         regulator-enable-ramp-delay = <250>;
284                         regulator-ramp-delay = <0>;
285                         regulator-system-load = <325000>;
286                         regulator-allow-set-load;
287                 };
288
289                 vreg_l9a_1p8: l9 {
290                         regulator-min-microvolt = <1804000>;
291                         regulator-max-microvolt = <1896000>;
292                         regulator-enable-ramp-delay = <250>;
293                         regulator-ramp-delay = <0>;
294                         regulator-allow-set-load;
295                 };
296
297                 vreg_l13a_1p8: l13 {
298                         /* This gives power to the LPDDR4: never turn it off! */
299                         regulator-min-microvolt = <1800000>;
300                         regulator-max-microvolt = <1944000>;
301                         regulator-enable-ramp-delay = <250>;
302                         regulator-ramp-delay = <0>;
303                         regulator-always-on;
304                         regulator-boot-on;
305                 };
306
307                 vreg_l19a_3p3: l19 {
308                         regulator-min-microvolt = <3312000>;
309                         regulator-max-microvolt = <3400000>;
310                         regulator-enable-ramp-delay = <250>;
311                         regulator-ramp-delay = <0>;
312                         regulator-allow-set-load;
313                 };
314         };
315
316         pm660l-regulators {
317                 compatible = "qcom,rpm-pm660l-regulators";
318
319                 vdd_s1-supply = <&vph_pwr>;
320                 vdd_s2-supply = <&vph_pwr>;
321                 vdd_s3_s4-supply = <&vph_pwr>;
322                 vdd_s5-supply = <&vph_pwr>;
323                 vdd_s6-supply = <&vph_pwr>;
324
325                 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
326                 vdd_l2-supply = <&vreg_bob>;
327                 vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
328                 vdd_l4_l6-supply = <&vreg_bob>;
329                 vdd_bob-supply = <&vph_pwr>;
330
331                 vreg_s2b_1p05: s2 {
332                         regulator-min-microvolt = <1050000>;
333                         regulator-max-microvolt = <1050000>;
334                         regulator-enable-ramp-delay = <200>;
335                         regulator-ramp-delay = <0>;
336                 };
337
338                 vreg_l1b_0p925: l1 {
339                         regulator-min-microvolt = <800000>;
340                         regulator-max-microvolt = <925000>;
341                         regulator-enable-ramp-delay = <250>;
342                         regulator-allow-set-load;
343                 };
344
345                 vreg_l2b_2p95: l2 {
346                         regulator-min-microvolt = <1648000>;
347                         regulator-max-microvolt = <3100000>;
348                         regulator-enable-ramp-delay = <250>;
349                         regulator-ramp-delay = <0>;
350                         regulator-allow-set-load;
351                 };
352
353                 vreg_l4b_2p95: l4 {
354                         regulator-min-microvolt = <2944000>;
355                         regulator-max-microvolt = <2952000>;
356                         regulator-enable-ramp-delay = <250>;
357                         regulator-ramp-delay = <0>;
358
359                         regulator-min-microamp = <200>;
360                         regulator-max-microamp = <600000>;
361                         regulator-system-load = <570000>;
362                         regulator-allow-set-load;
363                 };
364
365                 /*
366                  * Downstream specifies a range of 1721-3600mV,
367                  * but the only assigned consumers are SDHCI2 VMMC
368                  * and Coresight QPDI that both request pinned 2.95V.
369                  * Tighten the range to 1.8-3.328 (closest to 3.3) to
370                  * make the mmc driver happy.
371                  */
372                 vreg_l5b_2p95: l5 {
373                         regulator-min-microvolt = <1800000>;
374                         regulator-max-microvolt = <3328000>;
375                         regulator-enable-ramp-delay = <250>;
376                         regulator-system-load = <800000>;
377                         regulator-ramp-delay = <0>;
378                         regulator-allow-set-load;
379                 };
380
381                 vreg_l7b_3p125: l7 {
382                         regulator-min-microvolt = <2700000>;
383                         regulator-max-microvolt = <3125000>;
384                         regulator-enable-ramp-delay = <250>;
385                 };
386
387                 vreg_l8b_3p3: l8 {
388                         regulator-min-microvolt = <2800000>;
389                         regulator-max-microvolt = <3400000>;
390                         regulator-enable-ramp-delay = <250>;
391                         regulator-ramp-delay = <0>;
392                 };
393
394                 vreg_bob: bob {
395                         regulator-min-microvolt = <3300000>;
396                         regulator-max-microvolt = <3624000>;
397                         regulator-enable-ramp-delay = <500>;
398                         regulator-ramp-delay = <0>;
399                 };
400         };
401 };
402
403 &sdc2_state_on {
404         sd-cd {
405                 pins = "gpio54";
406                 bias-pull-up;
407                 drive-strength = <2>;
408         };
409 };
410
411 &sdc2_state_off {
412         sd-cd {
413                 pins = "gpio54";
414                 bias-disable;
415                 drive-strength = <2>;
416         };
417 };
418
419 &sdhc_1 {
420         status = "okay";
421         supports-cqe;
422
423         vmmc-supply = <&vreg_l4b_2p95>;
424         vqmmc-supply = <&vreg_l8a_1p8>;
425
426         mmc-ddr-1_8v;
427         mmc-hs400-1_8v;
428         mmc-hs400-enhanced-strobe;
429 };
430
431 &sdhc_2 {
432         status = "okay";
433
434         vmmc-supply = <&vreg_l5b_2p95>;
435         vqmmc-supply = <&vreg_l2b_2p95>;
436
437         cd-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
438         no-sdio;
439         no-emmc;
440 };
441
442 &tlmm {
443         gpio-reserved-ranges = <0 4>, <8 4>;
444 };
445
446 &usb2 {
447         status = "okay";
448 };
449
450 &usb2_dwc3 {
451         dr_mode = "host";
452 };
453
454 &usb3 {
455         status = "okay";
456 };
457
458 &usb3_dwc3 {
459         dr_mode = "peripheral";
460         extcon = <&extcon_usb>;
461 };