Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/msm8916-samsung-a2015-common.dtsi

raw
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "msm8916-pm8916.dtsi"
4 #include "msm8916-modem-qdsp6.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
10 #include <dt-bindings/sound/apq8016-lpass.h>
11
12 / {
13 aliases {
14 mmc0 = &sdhc_1; /* eMMC */
15 mmc1 = &sdhc_2; /* SD card */
16 serial0 = &blsp_uart2;
17 };
18
19 chosen {
20 stdout-path = "serial0";
21 };
22
23 reserved-memory {
24 /* Additional memory used by Samsung firmware modifications */
25 tz-apps@85500000 {
26 reg = <0x0 0x85500000 0x0 0xb00000>;
27 no-map;
28 };
29 };
30
31 battery: battery {
32 compatible = "simple-battery";
33 precharge-current-microamp = <450000>;
34 precharge-upper-limit-microvolt = <3500000>;
35 };
36
37 clk_pwm: pwm {
38 compatible = "clk-pwm";
39 #pwm-cells = <2>;
40
41 clocks = <&gcc GCC_GP2_CLK>;
42
43 pinctrl-names = "default";
44 pinctrl-0 = <&motor_pwm_default>;
45 status = "disabled";
46 };
47
48 gpio-keys {
49 compatible = "gpio-keys";
50
51 pinctrl-names = "default";
52 pinctrl-0 = <&gpio_keys_default>;
53
54 label = "GPIO Buttons";
55
56 button-volume-up {
57 label = "Volume Up";
58 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_VOLUMEUP>;
60 };
61
62 button-home {
63 label = "Home";
64 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_HOMEPAGE>;
66 };
67 };
68
69 gpio-hall-sensor {
70 compatible = "gpio-keys";
71
72 pinctrl-names = "default";
73 pinctrl-0 = <&gpio_hall_sensor_default>;
74
75 label = "GPIO Hall Effect Sensor";
76
77 event-hall-sensor {
78 label = "Hall Effect Sensor";
79 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
80 linux,input-type = <EV_SW>;
81 linux,code = <SW_LID>;
82 linux,can-disable;
83 };
84 };
85
86 /*
87 * NOTE: A5 connects GPIO 76 to a reglator powering the motor
88 * driver IC but A3 connects the same signal to an ENABLE pin of
89 * the driver.
90 */
91 reg_motor_vdd: regulator-motor-vdd {
92 compatible = "regulator-fixed";
93 regulator-name = "motor_vdd";
94 regulator-min-microvolt = <3000000>;
95 regulator-max-microvolt = <3000000>;
96
97 gpio = <&tlmm 76 GPIO_ACTIVE_HIGH>;
98 enable-active-high;
99
100 pinctrl-names = "default";
101 pinctrl-0 = <&motor_en_default>;
102 };
103
104 reg_vdd_tsp_a: regulator-vdd-tsp-a {
105 compatible = "regulator-fixed";
106 regulator-name = "vdd_tsp_a";
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109
110 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
111 enable-active-high;
112
113 pinctrl-names = "default";
114 pinctrl-0 = <&tsp_en_default>;
115 };
116
117 i2c-muic {
118 compatible = "i2c-gpio";
119 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
120 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
121
122 pinctrl-names = "default";
123 pinctrl-0 = <&muic_i2c_default>;
124
125 #address-cells = <1>;
126 #size-cells = <0>;
127
128 muic: extcon@25 {
129 compatible = "siliconmitus,sm5502-muic";
130
131 reg = <0x25>;
132 interrupt-parent = <&tlmm>;
133 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
134
135 pinctrl-names = "default";
136 pinctrl-0 = <&muic_int_default>;
137
138 usb_con: connector {
139 compatible = "usb-b-connector";
140 label = "micro-USB";
141 type = "micro";
142 };
143 };
144 };
145
146 i2c-tkey {
147 compatible = "i2c-gpio";
148 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
149 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
150
151 pinctrl-names = "default";
152 pinctrl-0 = <&tkey_i2c_default>;
153
154 #address-cells = <1>;
155 #size-cells = <0>;
156
157 touchkey: touchkey@20 {
158 /* Note: Actually an ABOV MCU that implements same interface */
159 compatible = "coreriver,tc360-touchkey";
160 reg = <0x20>;
161
162 interrupt-parent = <&tlmm>;
163 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
164
165 /* vcc/vdd-supply are board-specific */
166 vddio-supply = <&pm8916_l6>;
167
168 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
169
170 pinctrl-names = "default";
171 pinctrl-0 = <&tkey_default>;
172 };
173 };
174
175 i2c-nfc {
176 compatible = "i2c-gpio";
177 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
178 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
179
180 pinctrl-names = "default";
181 pinctrl-0 = <&nfc_i2c_default>;
182
183 #address-cells = <1>;
184 #size-cells = <0>;
185
186 nfc@27 {
187 compatible = "samsung,s3fwrn5-i2c";
188 reg = <0x27>;
189
190 interrupt-parent = <&tlmm>;
191 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
192
193 en-gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
194 wake-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
195
196 clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
197
198 pinctrl-names = "default";
199 pinctrl-0 = <&nfc_default &nfc_clk_req>;
200 };
201 };
202
203 vibrator: vibrator {
204 compatible = "pwm-vibrator";
205
206 pwms = <&clk_pwm 0 100000>;
207 pwm-names = "enable";
208
209 vcc-supply = <&reg_motor_vdd>;
210 status = "disabled";
211 };
212 };
213
214 &blsp_i2c1 {
215 status = "okay";
216
217 speaker_codec: audio-codec@34 {
218 compatible = "nxp,tfa9895";
219 reg = <0x34>;
220 vddd-supply = <&pm8916_l5>;
221 sound-name-prefix = "Speaker";
222 #sound-dai-cells = <0>;
223 };
224 };
225
226 &blsp_i2c2 {
227 status = "okay";
228
229 accelerometer: accelerometer@10 {
230 compatible = "bosch,bmc150_accel";
231 reg = <0x10>;
232 interrupt-parent = <&tlmm>;
233 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
234
235 vdd-supply = <&pm8916_l17>;
236 vddio-supply = <&pm8916_l5>;
237
238 pinctrl-names = "default";
239 pinctrl-0 = <&accel_int_default>;
240 };
241
242 magnetometer@12 {
243 compatible = "bosch,bmc150_magn";
244 reg = <0x12>;
245
246 vdd-supply = <&pm8916_l17>;
247 vddio-supply = <&pm8916_l5>;
248 };
249 };
250
251 &blsp_i2c4 {
252 status = "okay";
253
254 fuel-gauge@35 {
255 compatible = "richtek,rt5033-battery";
256 reg = <0x35>;
257 interrupt-parent = <&tlmm>;
258 interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
259
260 pinctrl-names = "default";
261 pinctrl-0 = <&fg_alert_default>;
262
263 power-supplies = <&charger>;
264 };
265 };
266
267 &blsp_i2c6 {
268 status = "okay";
269
270 pmic@34 {
271 compatible = "richtek,rt5033";
272 reg = <0x34>;
273
274 interrupts-extended = <&tlmm 62 IRQ_TYPE_EDGE_FALLING>;
275
276 pinctrl-0 = <&pmic_int_default>;
277 pinctrl-names = "default";
278
279 regulators {
280 rt5033_reg_safe_ldo: SAFE_LDO {
281 regulator-min-microvolt = <4900000>;
282 regulator-max-microvolt = <4900000>;
283 regulator-always-on;
284 };
285
286 /*
287 * Needed for camera, but not used yet.
288 * Define empty nodes to allow disabling the unused
289 * regulators.
290 */
291 LDO {};
292 BUCK {};
293 };
294
295 charger: charger {
296 compatible = "richtek,rt5033-charger";
297 monitored-battery = <&battery>;
298 richtek,usb-connector = <&usb_con>;
299 };
300 };
301 };
302
303 &blsp_uart2 {
304 status = "okay";
305 pinctrl-0 = <&blsp_uart2_console_default>;
306 pinctrl-1 = <&blsp_uart2_console_sleep>;
307 pinctrl-names = "default", "sleep";
308 };
309
310 &gpu {
311 status = "okay";
312 };
313
314 /*
315 * For some reason the speaker amplifier is connected to the second SD line
316 * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
317 * device tree, otherwise audio will seemingly play fine on the wrong SD line
318 * but the speaker stays silent.
319 *
320 * When routing audio via QDSP6 (the default) the &lpass node is reserved and
321 * the definitions from &q6afedai are used. When the modem is disabled audio can
322 * be alternatively routed directly to the LPASS hardware with reduced latency.
323 * The definitions for &lpass are here for completeness to simplify changing the
324 * setup with minor changes to the DT (either manually or with DT overlays).
325 */
326 &lpass {
327 dai-link@3 {
328 reg = <MI2S_QUATERNARY>;
329 qcom,playback-sd-lines = <1>;
330 };
331 };
332
333 &mdss {
334 status = "okay";
335 };
336
337 &mdss_dsi0 {
338 pinctrl-names = "default", "sleep";
339 pinctrl-0 = <&mdss_default>;
340 pinctrl-1 = <&mdss_sleep>;
341 };
342
343 &mpss_mem {
344 reg = <0x0 0x86800000 0x0 0x5400000>;
345 };
346
347 &pm8916_resin {
348 status = "okay";
349 linux,code = <KEY_VOLUMEDOWN>;
350 };
351
352 &pm8916_rpm_regulators {
353 pm8916_l17: l17 {
354 regulator-min-microvolt = <2850000>;
355 regulator-max-microvolt = <2850000>;
356 };
357 };
358
359 &q6afedai {
360 dai@22 {
361 reg = <QUATERNARY_MI2S_RX>;
362 qcom,sd-lines = <1>;
363 };
364 };
365
366 &sdhc_1 {
367 status = "okay";
368 };
369
370 &sdhc_2 {
371 status = "okay";
372
373 pinctrl-names = "default", "sleep";
374 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
375 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
376
377 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
378 };
379
380 &sound {
381 model = "samsung-a2015";
382 audio-routing =
383 "AMIC1", "MIC BIAS External1",
384 "AMIC2", "MIC BIAS Internal2",
385 "AMIC3", "MIC BIAS External1";
386
387 pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
388 pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
389 pinctrl-names = "default", "sleep";
390
391 sound_link_backend2: backend2-dai-link {
392 link-name = "Quaternary MI2S";
393
394 cpu {
395 sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
396 };
397 platform {
398 sound-dai = <&q6routing>;
399 };
400 codec {
401 sound-dai = <&speaker_codec>;
402 };
403 };
404 };
405
406 &usb {
407 status = "okay";
408 extcon = <&muic>, <&muic>;
409 };
410
411 &usb_hs_phy {
412 extcon = <&muic>;
413 };
414
415 &venus {
416 status = "okay";
417 };
418
419 &venus_mem {
420 status = "okay";
421 };
422
423 &tlmm {
424 accel_int_default: accel-int-default-state {
425 pins = "gpio115";
426 function = "gpio";
427
428 drive-strength = <2>;
429 bias-disable;
430 };
431
432 fg_alert_default: fg-alert-default-state {
433 pins = "gpio121";
434 function = "gpio";
435
436 drive-strength = <2>;
437 bias-disable;
438 };
439
440 gpio_keys_default: gpio-keys-default-state {
441 pins = "gpio107", "gpio109";
442 function = "gpio";
443
444 drive-strength = <2>;
445 bias-pull-up;
446 };
447
448 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
449 pins = "gpio52";
450 function = "gpio";
451
452 drive-strength = <2>;
453 bias-disable;
454 };
455
456 mdss_default: mdss-default-state {
457 pins = "gpio25";
458 function = "gpio";
459
460 drive-strength = <8>;
461 bias-disable;
462 };
463 mdss_sleep: mdss-sleep-state {
464 pins = "gpio25";
465 function = "gpio";
466
467 drive-strength = <2>;
468 bias-pull-down;
469 };
470
471 motor_en_default: motor-en-default-state {
472 pins = "gpio76";
473 function = "gpio";
474
475 drive-strength = <2>;
476 bias-disable;
477 };
478
479 motor_pwm_default: motor-pwm-default-state {
480 pins = "gpio50";
481 function = "gcc_gp2_clk_a";
482 };
483
484 muic_i2c_default: muic-i2c-default-state {
485 pins = "gpio105", "gpio106";
486 function = "gpio";
487
488 drive-strength = <2>;
489 bias-disable;
490 };
491
492 muic_int_default: muic-int-default-state {
493 pins = "gpio12";
494 function = "gpio";
495
496 drive-strength = <2>;
497 bias-disable;
498 };
499
500 nfc_default: nfc-default-state {
501 nfc-pins {
502 pins = "gpio20", "gpio49";
503 function = "gpio";
504
505 drive-strength = <2>;
506 bias-disable;
507 };
508
509 irq-pins {
510 pins = "gpio21";
511 function = "gpio";
512
513 drive-strength = <2>;
514 bias-pull-down;
515 };
516 };
517
518 nfc_i2c_default: nfc-i2c-default-state {
519 pins = "gpio0", "gpio1";
520 function = "gpio";
521
522 drive-strength = <2>;
523 bias-disable;
524 };
525
526 pmic_int_default: pmic-int-default-state {
527 pins = "gpio62";
528 function = "gpio";
529 drive-strength = <2>;
530 bias-disable;
531 };
532
533 sdc2_cd_default: sdc2-cd-default-state {
534 pins = "gpio38";
535 function = "gpio";
536 drive-strength = <2>;
537 bias-disable;
538 };
539
540 tkey_default: tkey-default-state {
541 pins = "gpio98";
542 function = "gpio";
543
544 drive-strength = <2>;
545 bias-disable;
546 };
547
548 tkey_i2c_default: tkey-i2c-default-state {
549 pins = "gpio16", "gpio17";
550 function = "gpio";
551
552 drive-strength = <2>;
553 bias-disable;
554 };
555
556 tsp_en_default: tsp-en-default-state {
557 pins = "gpio73";
558 function = "gpio";
559
560 drive-strength = <2>;
561 bias-disable;
562 };
563
564 ts_int_default: ts-int-default-state {
565 pins = "gpio13";
566 function = "gpio";
567
568 drive-strength = <2>;
569 bias-disable;
570 };
571 };
572
573 &pm8916_gpios {
574 nfc_clk_req: nfc-clk-req-state {
575 pins = "gpio2";
576 function = "func1";
577
578 input-enable;
579 bias-disable;
580 power-source = <PM8916_GPIO_L2>;
581 };
582 };