GNU Linux-libre 5.19-rc6-gnu
[releases.git] / arch / arm / boot / dts / qcom-msm8974-sony-xperia-rhine.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-msm8974.dtsi"
3 #include "qcom-pm8841.dtsi"
4 #include "qcom-pm8941.dtsi"
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
7
8 / {
9         aliases {
10                 serial0 = &blsp1_uart2;
11         };
12
13         chosen {
14                 stdout-path = "serial0:115200n8";
15         };
16
17         gpio-keys {
18                 compatible = "gpio-keys";
19
20                 pinctrl-names = "default";
21                 pinctrl-0 = <&gpio_keys_pin_a>;
22
23                 volume-down {
24                         label = "volume_down";
25                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
26                         linux,input-type = <1>;
27                         linux,code = <KEY_VOLUMEDOWN>;
28                 };
29
30                 camera-snapshot {
31                         label = "camera_snapshot";
32                         gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
33                         linux,input-type = <1>;
34                         linux,code = <KEY_CAMERA>;
35                 };
36
37                 camera-focus {
38                         label = "camera_focus";
39                         gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
40                         linux,input-type = <1>;
41                         linux,code = <KEY_CAMERA_FOCUS>;
42                 };
43
44                 volume-up {
45                         label = "volume_up";
46                         gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
47                         linux,input-type = <1>;
48                         linux,code = <KEY_VOLUMEUP>;
49                 };
50         };
51
52         reserved-memory {
53                 #address-cells = <1>;
54                 #size-cells = <1>;
55                 ranges;
56
57                 ramoops@3e8e0000 {
58                         compatible = "ramoops";
59                         reg = <0x3e8e0000 0x200000>;
60
61                         console-size = <0x100000>;
62                         record-size = <0x10000>;
63                         ftrace-size = <0x10000>;
64                         pmsg-size = <0x80000>;
65                 };
66         };
67 };
68
69 &blsp1_i2c2 {
70         status = "okay";
71         clock-frequency = <355000>;
72
73         synaptics@2c {
74                 compatible = "syna,rmi4-i2c";
75                 reg = <0x2c>;
76
77                 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
78
79                 #address-cells = <1>;
80                 #size-cells = <0>;
81
82                 vdd-supply = <&pm8941_l22>;
83                 vio-supply = <&pm8941_lvs3>;
84
85                 pinctrl-names = "default";
86                 pinctrl-0 = <&ts_int_pin>;
87
88                 syna,startup-delay-ms = <10>;
89
90                 rmi4-f01@1 {
91                         reg = <0x1>;
92                         syna,nosleep-mode = <1>;
93                 };
94
95                 rmi4-f11@11 {
96                         reg = <0x11>;
97                         touchscreen-inverted-x;
98                         syna,sensor-type = <1>;
99                 };
100         };
101 };
102
103 &blsp1_i2c6 {
104         status = "okay";
105         clock-frequency = <355000>;
106
107         nfc@28 {
108                 compatible = "nxp,pn544-i2c";
109                 reg = <0x28>;
110
111                 interrupt-parent = <&tlmm>;
112                 interrupts = <59 IRQ_TYPE_EDGE_RISING>;
113
114                 enable-gpios = <&pm8941_gpios 23 GPIO_ACTIVE_HIGH>;
115                 firmware-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>;
116         };
117 };
118
119 &blsp1_uart2 {
120         status = "okay";
121 };
122
123 &blsp2_dma {
124         qcom,controlled-remotely;
125 };
126
127 &blsp2_i2c5 {
128         status = "okay";
129         clock-frequency = <355000>;
130
131         /* sii8334 MHL HDMI bridge */
132 };
133
134 &otg {
135         status = "okay";
136
137         phys = <&usb_hs1_phy>;
138         phy-select = <&tcsr 0xb000 0>;
139         extcon = <&smbb>, <&usb_id>;
140         vbus-supply = <&chg_otg>;
141
142         hnp-disable;
143         srp-disable;
144         adp-disable;
145
146         ulpi {
147                 phy@a {
148                         status = "okay";
149
150                         v1p8-supply = <&pm8941_l6>;
151                         v3p3-supply = <&pm8941_l24>;
152
153                         extcon = <&smbb>;
154                         qcom,init-seq = /bits/ 8 <0x1 0x64>;
155                 };
156         };
157 };
158
159 &pm8941_coincell {
160         status = "okay";
161         qcom,rset-ohms = <2100>;
162         qcom,vset-millivolts = <3000>;
163 };
164
165 &pm8941_gpios {
166         gpio_keys_pin_a: gpio-keys-active {
167                 pins = "gpio2", "gpio3", "gpio4", "gpio5";
168                 function = "normal";
169
170                 bias-pull-up;
171                 power-source = <PM8941_GPIO_S3>;
172         };
173 };
174
175 &pm8941_wled {
176         status = "okay";
177
178         qcom,cs-out;
179         qcom,current-limit = <20>;
180         qcom,current-boost-limit = <805>;
181         qcom,switching-freq = <1600>;
182         qcom,ovp = <29>;
183         qcom,num-strings = <2>;
184 };
185
186 &rpm_requests {
187         pm8841-regulators {
188                 compatible = "qcom,rpm-pm8841-regulators";
189
190                 pm8841_s1: s1 {
191                         regulator-min-microvolt = <675000>;
192                         regulator-max-microvolt = <1050000>;
193                 };
194
195                 pm8841_s2: s2 {
196                         regulator-min-microvolt = <500000>;
197                         regulator-max-microvolt = <1050000>;
198                 };
199
200                 pm8841_s3: s3 {
201                         regulator-min-microvolt = <500000>;
202                         regulator-max-microvolt = <1050000>;
203                 };
204
205                 pm8841_s4: s4 {
206                         regulator-min-microvolt = <500000>;
207                         regulator-max-microvolt = <1050000>;
208                 };
209         };
210
211         pm8941-regulators {
212                 compatible = "qcom,rpm-pm8941-regulators";
213
214                 vdd_l1_l3-supply = <&pm8941_s1>;
215                 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
216                 vdd_l4_l11-supply = <&pm8941_s1>;
217                 vdd_l5_l7-supply = <&pm8941_s2>;
218                 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
219                 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
220                 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
221                 vdd_l21-supply = <&vreg_boost>;
222
223                 pm8941_s1: s1 {
224                         regulator-min-microvolt = <1300000>;
225                         regulator-max-microvolt = <1300000>;
226                         regulator-always-on;
227                         regulator-boot-on;
228                 };
229
230                 pm8941_s2: s2 {
231                         regulator-min-microvolt = <2150000>;
232                         regulator-max-microvolt = <2150000>;
233                         regulator-boot-on;
234                 };
235
236                 pm8941_s3: s3 {
237                         regulator-min-microvolt = <1800000>;
238                         regulator-max-microvolt = <1800000>;
239                         regulator-always-on;
240                         regulator-boot-on;
241                 };
242
243                 pm8941_s4: s4 {
244                         regulator-min-microvolt = <5000000>;
245                         regulator-max-microvolt = <5000000>;
246                 };
247
248                 pm8941_l1: l1 {
249                         regulator-min-microvolt = <1225000>;
250                         regulator-max-microvolt = <1225000>;
251                         regulator-always-on;
252                         regulator-boot-on;
253                 };
254
255                 pm8941_l2: l2 {
256                         regulator-min-microvolt = <1200000>;
257                         regulator-max-microvolt = <1200000>;
258                 };
259
260                 pm8941_l3: l3 {
261                         regulator-min-microvolt = <1200000>;
262                         regulator-max-microvolt = <1200000>;
263                 };
264
265                 pm8941_l4: l4 {
266                         regulator-min-microvolt = <1225000>;
267                         regulator-max-microvolt = <1225000>;
268                 };
269
270                 pm8941_l5: l5 {
271                         regulator-min-microvolt = <1800000>;
272                         regulator-max-microvolt = <1800000>;
273                 };
274
275                 pm8941_l6: l6 {
276                         regulator-min-microvolt = <1800000>;
277                         regulator-max-microvolt = <1800000>;
278                         regulator-boot-on;
279                 };
280
281                 pm8941_l7: l7 {
282                         regulator-min-microvolt = <1800000>;
283                         regulator-max-microvolt = <1800000>;
284                         regulator-boot-on;
285                 };
286
287                 pm8941_l8: l8 {
288                         regulator-min-microvolt = <1800000>;
289                         regulator-max-microvolt = <1800000>;
290                 };
291
292                 pm8941_l9: l9 {
293                         regulator-min-microvolt = <1800000>;
294                         regulator-max-microvolt = <2950000>;
295                 };
296
297                 pm8941_l11: l11 {
298                         regulator-min-microvolt = <1300000>;
299                         regulator-max-microvolt = <1350000>;
300                 };
301
302                 pm8941_l12: l12 {
303                         regulator-min-microvolt = <1800000>;
304                         regulator-max-microvolt = <1800000>;
305                         regulator-always-on;
306                         regulator-boot-on;
307                 };
308
309                 pm8941_l13: l13 {
310                         regulator-min-microvolt = <1800000>;
311                         regulator-max-microvolt = <2950000>;
312                         regulator-boot-on;
313                 };
314
315                 pm8941_l14: l14 {
316                         regulator-min-microvolt = <1800000>;
317                         regulator-max-microvolt = <1800000>;
318                 };
319
320                 pm8941_l15: l15 {
321                         regulator-min-microvolt = <2050000>;
322                         regulator-max-microvolt = <2050000>;
323                 };
324
325                 pm8941_l16: l16 {
326                         regulator-min-microvolt = <2700000>;
327                         regulator-max-microvolt = <2700000>;
328                 };
329
330                 pm8941_l17: l17 {
331                         regulator-min-microvolt = <2700000>;
332                         regulator-max-microvolt = <2700000>;
333                 };
334
335                 pm8941_l18: l18 {
336                         regulator-min-microvolt = <2850000>;
337                         regulator-max-microvolt = <2850000>;
338                 };
339
340                 pm8941_l19: l19 {
341                         regulator-min-microvolt = <3300000>;
342                         regulator-max-microvolt = <3300000>;
343                 };
344
345                 pm8941_l20: l20 {
346                         regulator-min-microvolt = <2950000>;
347                         regulator-max-microvolt = <2950000>;
348                         regulator-system-load = <200000>;
349                         regulator-allow-set-load;
350                         regulator-boot-on;
351                 };
352
353                 pm8941_l21: l21 {
354                         regulator-min-microvolt = <2950000>;
355                         regulator-max-microvolt = <2950000>;
356                         regulator-boot-on;
357                 };
358
359                 pm8941_l22: l22 {
360                         regulator-min-microvolt = <3000000>;
361                         regulator-max-microvolt = <3000000>;
362                 };
363
364                 pm8941_l23: l23 {
365                         regulator-min-microvolt = <2800000>;
366                         regulator-max-microvolt = <2800000>;
367                 };
368
369                 pm8941_l24: l24 {
370                         regulator-min-microvolt = <3075000>;
371                         regulator-max-microvolt = <3075000>;
372                         regulator-boot-on;
373                 };
374
375                 pm8941_lvs3: lvs3 {};
376         };
377 };
378
379 &sdhc_1 {
380         status = "okay";
381
382         vmmc-supply = <&pm8941_l20>;
383         vqmmc-supply = <&pm8941_s3>;
384
385         pinctrl-names = "default", "sleep";
386         pinctrl-0 = <&sdc1_on>;
387         pinctrl-1 = <&sdc1_off>;
388 };
389
390 &sdhc_2 {
391         status = "okay";
392
393         vmmc-supply = <&pm8941_l21>;
394         vqmmc-supply = <&pm8941_l13>;
395
396         cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
397
398         pinctrl-names = "default", "sleep";
399         pinctrl-0 = <&sdc2_on>;
400         pinctrl-1 = <&sdc2_off>;
401 };
402
403 &smbb {
404         qcom,fast-charge-safe-current = <1500000>;
405         qcom,fast-charge-current-limit = <1500000>;
406         qcom,dc-current-limit = <1800000>;
407         qcom,fast-charge-safe-voltage = <4400000>;
408         qcom,fast-charge-high-threshold-voltage = <4350000>;
409         qcom,fast-charge-low-threshold-voltage = <3400000>;
410         qcom,auto-recharge-threshold-voltage = <4200000>;
411         qcom,minimum-input-voltage = <4300000>;
412 };
413
414 &tlmm {
415         ts_int_pin: touch-int {
416                 pins = "gpio61";
417                 function = "gpio";
418                 drive-strength = <2>;
419                 bias-disable;
420                 input-enable;
421         };
422
423         sdc1_on: sdc1-on {
424                 clk {
425                         pins = "sdc1_clk";
426                         drive-strength = <16>;
427                         bias-disable;
428                 };
429
430                 cmd-data {
431                         pins = "sdc1_cmd", "sdc1_data";
432                         drive-strength = <10>;
433                         bias-pull-up;
434                 };
435         };
436
437         sdc2_on: sdc-on {
438                 clk {
439                         pins = "sdc2_clk";
440                         drive-strength = <10>;
441                         bias-disable;
442                 };
443
444                 cmd-data {
445                         pins = "sdc2_cmd", "sdc2_data";
446                         drive-strength = <6>;
447                         bias-pull-up;
448                 };
449
450                 cd {
451                         pins = "gpio62";
452                         function = "gpio";
453                         drive-strength = <2>;
454                         bias-disable;
455                 };
456         };
457 };