/
msm8939-sony-xperia-kanuti-tulip.dts
618 lines (493 loc) · 12 KB
/
msm8939-sony-xperia-kanuti-tulip.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
// SPDX-License-Identifier: GPL-2.0
/*
* Sony Xperia M4 Aqua device tree source
*
* Copyright (c) 2020, Pavel Dubrova <pashadubrova@gmail.com>
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/sound/apq8016-lpass.h>
#include "msm8939.dtsi"
#include "pm8916.dtsi"
/ {
model = "Sony Xperia M4 Aqua";
compatible = "sony,kanuti-tulip", "qcom,msm8939";
/* Required by bootloader to select correct DTB */
qcom,msm-id = <239 0>;
qcom,board-id = <8 0>;
aliases {
serial0 = &blsp1_uart2;
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&gpio_key_default>;
camera_focus {
label = "camera_focus";
gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_CAMERA_FOCUS>;
wakeup-source;
debounce-interval = <100>;
};
camera_snapshot {
label = "camera_snapshot";
gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <0x2fe>;
wakeup-source;
debounce-interval = <100>;
};
vol_down {
label = "volume_down";
gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEDOWN>;
wakeup-source;
debounce-interval = <100>;
};
vol_up {
label = "volume_up";
gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
wakeup-source;
debounce-interval = <100>;
};
};
reserved-memory {
ramoops@a0000000 {
compatible = "ramoops";
reg = <0x0 0xa0000000 0x0 0x100000>;
record-size = <0x20000>;
console-size = <0x40000>;
ftrace-size = <0x20000>;
pmsg-size = <0x20000>;
ecc-size = <16>;
};
};
amp: analog-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
};
};
&apps_iommu {
power-domains = <&gcc MDSS_GDSC>;
};
&blsp1_dma {
status = "okay";
};
&blsp1_i2c0 {
clock-frequency = <400000>;
status = "okay";
bmc150-accelerometer@10 {
compatible = "bosch,bmc150_accel";
reg = <0x10>;
interrupts = <69 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&tlmm>;
pinctrl-names = "default";
pinctrl-0 = <&bma2x2_default>;
mount-matrix = "1", "0", "0",
"0", "-1", "0",
"0", "0", "-1";
};
bmc150-magnetometer@12 {
compatible = "bosch,bmc150_magn";
reg = <0x12>;
};
led-controller@30 {
compatible = "ti,lp5562";
reg = <0x30>;
clock-mode = /bits/ 8 <2>;
enable-gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
chan@0 {
reg = <0>;
chan-name = "red";
led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>;
color = <LED_COLOR_ID_RED>;
};
chan@1 {
reg = <1>;
chan-name = "green";
led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>;
color = <LED_COLOR_ID_GREEN>;
};
chan@2 {
reg = <2>;
chan-name = "blue";
led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>;
color = <LED_COLOR_ID_BLUE>;
};
chan@3 {
reg = <3>;
chan-name = "white";
led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>;
color = <LED_COLOR_ID_WHITE>;
};
};
/* TODO: Capella CM36286 on 0x60 */
};
&blsp1_i2c4 {
clock-frequency = <400000>;
status = "okay";
smb1360_otg_supply: smb1360-chg-fg@14 {
compatible = "qcom,smb1360-chg-fg";
reg = <0x14>;
interrupts-extended = <&tlmm 62 IRQ_TYPE_LEVEL_LOW>,
<&tlmm 110 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "smb1360_stat_irq",
"smb1360_usb_id_irq";
pinctrl-names = "default";
pinctrl-0 = <&smb_int_default>, <&usb_id_default>;
qcom,empty-soc-disabled;
qcom,chg-inhibit-disabled;
qcom,float-voltage-mv = <4350>;
qcom,iterm-ma = <100>;
qcom,recharge-thresh-mv = <200>;
qcom,fg-auto-recharge-soc = <99>;
qcom,thermal-mitigation = <1500 700 600 0>;
/* TODO: Disable OTG for now */
/* qcom,usb-id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>; */
/* Battery-profile selection properties */
qcom,batt-profile-select;
qcom,smb1360-vadc = <&pm8916_vadc>;
qcom,batt-id-vref-uv = <1800000>;
qcom,batt-id-rpullup-kohm = <100>;
qcom,profile-a-rid-kohm = <324>;
qcom,profile-b-rid-kohm = <181>;
qcom,shdn-after-pwroff;
qcom,charging-timeout = <192>;
io-channels = <&pm8916_vadc VADC_LR_MUX2_BAT_ID>;
io-channel-names = "batt_id";
};
ncp6335d: ncp6335d-regulator@1c {
compatible = "onnn,ncp6335d-regulator";
reg = <0x1c>;
onnn,vsel = <0>;
onnn,slew-ns = <3333>;
onnn,step-size = <6250>;
onnn,min-slew-ns = <416>;
onnn,max-slew-ns = <3333>;
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1350000>;
onnn,min-setpoint = <600000>;
pintrl-names = "default";
pinctrl-0 = <&ext_buck_vsel_default>;
onnn,vsel-gpio = <&tlmm 111 GPIO_ACTIVE_LOW>;
onnn,discharge-enable;
onnn,restore-reg;
onnn,set-en-always;
onnn,register-corruption-workaround;
regulator-always-on;
};
};
&blsp1_i2c5 {
clock-frequency = <400000>;
status = "okay";
tsc@24 {
compatible = "cy,cyttsp4_i2c_adapter";
reg = <0x24>;
/* GPIO 38, high-to-low edge triggered */
interrupts = <13 0x2008>;
interrupt-parent = <&tlmm>;
cy,adapter_id = "cyttsp4_i2c_adapter";
pinctrl-names = "pmx_ts_active","pmx_ts_suspend";
pinctrl-0 = <&ts_int_default &ts_reset_default>;
pinctrl-1 = <&ts_int_sleep &ts_reset_sleep>;
vdd-supply = <&pm8916_l17>;
vcc_i2c-supply = <&pm8916_l6>;
cy,core {
cy,name = "cyttsp4_core";
cy,id = "main_ttsp_core";
gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>, <&tlmm 13 GPIO_ACTIVE_HIGH>;
cy,irq_gpio = <13>;
cy,rst_gpio = <12>;
cy,mt {
cy,name = "cyttsp4_mt";
cy,inp_dev_name = "cyttsp4_mt";
/* CY_MT_FLAG_FLIP | CY_MT_FLAG_INV_X | CY_MT_FLAG_INV_Y */
cy,flags = <0x8>;
cy,abs =
/* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
<0x35 0 1080 0 0
/* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
0x36 0 1920 0 0
/* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
0x3a 0 255 0 0
/* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
0xffff 0 255 0 0
/* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
0x39 0 15 0 0
/* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
0x30 0 255 0 0
/* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
0x31 0 255 0 0
/* ABS_MT_ORIENTATION, -128, 127, 0, 0 */
0x34 0xfffffed7 127 0 0>;
};
};
};
/* TODO: Some devices have CYTTSP5 on 0x34 instead of CYTTSP4 */
};
&blsp1_i2c6 {
clock-frequency = <400000>;
status = "okay";
nfc@28 {
compatible = "nxp,pn544-i2c";
reg = <0x28>;
clock-frequency = <100000>;
interrupt-parent = <&tlmm>;
interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
firmware-gpios = <&tlmm 120 GPIO_ACTIVE_HIGH>;
};
};
&cpr {
vdd-apc-supply = <&ncp6335d>;
};
&dsi0 {
vdda-supply = <&pm8916_l2>;
vddio-supply = <&pm8916_l6>;
panel@0 {
compatible = "truly,nt35521";
reg = <0>;
reset-gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};
};
};
};
&dsi_phy0 {
vddio-supply = <&pm8916_l6>;
};
&dsi0_out {
remote-endpoint = <&panel_in>;
data-lanes = <0 1 2 3>;
};
&lpass {
status = "okay";
};
&lpass_codec {
status = "okay";
};
&otg {
dr_mode = "peripheral";
extcon = <&smb1360_otg_supply>, <&smb1360_otg_supply>;
status = "okay";
};
&pm8916_vadc {
batt_id {
reg = <VADC_LR_MUX2_BAT_ID>;
qcom,ratiometric;
};
};
&pm8916_vib {
status = "okay";
};
&pronto {
status = "okay";
smd-edge {
wcnss {
bt {
/* Device specific. This is my REAL BT MAC address. */
local-bd-address = [ 40 40 a7 85 14 63 ];
};
wifi {
/* Device specific. This is my REAL WLAN MAC address. */
local-mac-address = [ 40 40 a7 5e ac 9e ];
};
};
};
};
&rpm_requests {
pm8916-regulators {
compatible = "qcom,rpm-pm8916-regulators";
vdd_l1_l2_l3-supply = <&pm8916_s3>;
vdd_l4_l5_l6-supply = <&pm8916_s4>;
vdd_l7-supply = <&pm8916_s4>;
pm8916_s1: s1 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1300000>;
};
pm8916_s3: s3 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1300000>;
};
pm8916_s4: s4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2100000>;
};
pm8916_l1: l1 {
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1300000>;
};
pm8916_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};
pm8916_l3: l3 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1287500>;
};
pm8916_l4: l4 {
regulator-min-microvolt = <2050000>;
regulator-max-microvolt = <2050000>;
};
pm8916_l5: l5 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8916_l6: l6 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8916_l7: l7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8916_l8: l8 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2900000>;
};
pm8916_l9: l9 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
pm8916_l10: l10 {
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <2800000>;
};
pm8916_l11: l11 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2950000>;
};
pm8916_l12: l12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2950000>;
};
pm8916_l13: l13 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
};
pm8916_l14: l14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
pm8916_l15: l15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
pm8916_l16: l16 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
pm8916_l17: l17 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
pm8916_l18: l18 {
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <2850000>;
};
};
};
&sdhc_1 {
vmmc-supply = <&pm8916_l8>;
vqmmc-supply = <&pm8916_l5>;
status = "okay";
};
&sdhc_2 {
vmmc-supply = <&pm8916_l11>;
vqmmc-supply = <&pm8916_l12>;
cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&soc {
sound {
compatible = "qcom,apq8016-sbc-sndcard";
reg = <0x07702000 0x4>, <0x07702004 0x4>;
reg-names = "mic-iomux", "spkr-iomux";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cdc_pdm_lines_default>;
pinctrl-1 = <&cdc_pdm_lines_sleep>;
qcom,model = "sony-tulip";
qcom,audio-routing =
"AMIC1", "MIC BIAS External1",
"AMIC2", "MIC BIAS Internal2",
"AMIC3", "MIC BIAS External1";
aux-devs = <&>;
internal-codec-playback-dai-link@0 {
link-name = "WCD";
cpu {
sound-dai = <&lpass MI2S_PRIMARY>;
};
codec {
sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
};
};
internal-codec-capture-dai-link@0 {
link-name = "WCD-Capture";
cpu {
sound-dai = <&lpass MI2S_TERTIARY>;
};
codec {
sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
};
};
};
};
&tlmm {
bma2x2_default: bma2x2-default {
pins = "gpio69";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
ext_buck_vsel_default: ext-buck-vsel-default {
pins = "gpio111";
function = "gpio";
drive-strength = <2>;
};
gpio_key_default: gpio-key-default {
pins = "gpio11", "gpio51", "gpio108", "gpio109";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
mdss_dsi_default: mdss-dsi-default {
pins = "gpio25", "gpio97", "gpio98";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
mdss_dsi_sleep: mdss-dsi-sleep {
pins = "gpio25", "gpio97", "gpio98";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
};
&usb_hs_phy {
v1p8-supply = <&pm8916_l7>;
v3p3-supply = <&pm8916_l13>;
extcon = <&smb1360_otg_supply>;
};
&wcd_codec {
qcom,hphl-jack-type-normally-open;
qcom,mbhc-vthreshold-low = <75 212 525 637 700>;
qcom,mbhc-vthreshold-high = <62 200 462 625 700>;
};