Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/msm8916-samsung-fortuna-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
11 / {
12 aliases {
13 mmc0 = &sdhc_1; /* eMMC */
14 mmc1 = &sdhc_2; /* SD card */
15 serial0 = &blsp_uart2;
16 };
17
18 chosen {
19 stdout-path = "serial0";
20 };
21
22 reserved-memory {
23 /* Additional memory used by Samsung firmware modifications */
24 tz-apps@85a00000 {
25 reg = <0x0 0x85a00000 0x0 0x600000>;
26 no-map;
27 };
28 };
29
30 battery: battery {
31 compatible = "simple-battery";
32 precharge-current-microamp = <450000>;
33 precharge-upper-limit-microvolt = <3500000>;
34 };
35
36 clk_pwm_backlight: backlight {
37 compatible = "pwm-backlight";
38 pwms = <&clk_pwm 0 100000>;
39
40 enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
41
42 brightness-levels = <0 255>;
43 num-interpolated-steps = <255>;
44 default-brightness-level = <128>;
45
46 pinctrl-0 = <&backlight_en_default>;
47 pinctrl-names = "default";
48 };
49
50 clk_pwm: pwm {
51 compatible = "clk-pwm";
52 #pwm-cells = <2>;
53
54 clocks = <&gcc GCC_GP2_CLK>;
55
56 pinctrl-0 = <&backlight_pwm_default>;
57 pinctrl-names = "default";
58 };
59
60 gpio-keys {
61 compatible = "gpio-keys";
62
63 pinctrl-0 = <&gpio_keys_default>;
64 pinctrl-names = "default";
65
66 label = "GPIO Buttons";
67
68 button-volume-up {
69 label = "Volume Up";
70 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_VOLUMEUP>;
72 };
73
74 button-home {
75 label = "Home";
76 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_HOMEPAGE>;
78 };
79 };
80
81 haptic {
82 compatible = "regulator-haptic";
83 haptic-supply = <&reg_motor_vdd>;
84 min-microvolt = <3300000>;
85 max-microvolt = <3300000>;
86 };
87
88 i2c_nfc: i2c-nfc {
89 compatible = "i2c-gpio";
90 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
91 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
92
93 pinctrl-0 = <&nfc_i2c_default>;
94 pinctrl-names = "default";
95
96 #address-cells = <1>;
97 #size-cells = <0>;
98
99 s3fwrn5_nfc: nfc@27 {
100 compatible = "samsung,s3fwrn5-i2c";
101 reg = <0x27>;
102
103 interrupts-extended = <&tlmm 21 IRQ_TYPE_EDGE_RISING>;
104
105 en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
106 wake-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
107
108 clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
109
110 pinctrl-0 = <&nfc_default>, <&nfc_clk_req>;
111 pinctrl-names = "default";
112
113 status = "disabled";
114 };
115 };
116
117 reg_motor_vdd: regulator-motor-vdd {
118 compatible = "regulator-fixed";
119 regulator-name = "motor_vdd";
120 regulator-min-microvolt = <3300000>;
121 regulator-max-microvolt = <3300000>;
122
123 gpio = <&tlmm 72 GPIO_ACTIVE_HIGH>;
124 enable-active-high;
125
126 pinctrl-0 = <&motor_en_default>;
127 pinctrl-names = "default";
128 };
129
130 reg_vdd_tsp_a: regulator-vdd-tsp-a {
131 compatible = "regulator-fixed";
132 regulator-name = "vdd_tsp_a";
133 regulator-min-microvolt = <3000000>;
134 regulator-max-microvolt = <3000000>;
135
136 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
137 enable-active-high;
138
139 pinctrl-0 = <&tsp_en_default>;
140 pinctrl-names = "default";
141 };
142 };
143
144 &blsp_i2c1 {
145 status = "okay";
146
147 muic: extcon@25 {
148 compatible = "siliconmitus,sm5502-muic";
149 reg = <0x25>;
150 interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>;
151 pinctrl-0 = <&muic_int_default>;
152 pinctrl-names = "default";
153
154 usb_con: connector {
155 compatible = "usb-b-connector";
156 label = "micro-USB";
157 type = "micro";
158 };
159 };
160 };
161
162 &blsp_i2c2 {
163 /* Available sensors vary depending on model variant */
164 status = "okay";
165
166 bosch_accel: accelerometer@10 {
167 compatible = "bosch,bmc150_accel";
168 reg = <0x10>;
169 interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_RISING>;
170
171 vdd-supply = <&pm8916_l5>;
172 vddio-supply = <&pm8916_l5>;
173
174 pinctrl-0 = <&accel_int_default>;
175 pinctrl-names = "default";
176
177 mount-matrix = "0", "-1", "0",
178 "-1", "0", "0",
179 "0", "0", "1";
180
181 status = "disabled";
182 };
183
184 bosch_magn: magnetometer@12 {
185 compatible = "bosch,bmc150_magn";
186 reg = <0x12>;
187
188 vdd-supply = <&pm8916_l5>;
189 vddio-supply = <&pm8916_l5>;
190
191 mount-matrix = "0", "-1", "0",
192 "-1", "0", "0",
193 "0", "0", "1";
194
195 status = "disabled";
196 };
197
198 st_accel: accelerometer@1d {
199 compatible = "st,lsm303c-accel";
200 reg = <0x1d>;
201 interrupts-extended = <&tlmm 115 IRQ_TYPE_LEVEL_HIGH>;
202
203 vdd-supply = <&pm8916_l17>;
204 vddio-supply = <&pm8916_l5>;
205
206 pinctrl-0 = <&accel_int_default>;
207 pinctrl-names = "default";
208
209 st,drdy-int-pin = <1>;
210 mount-matrix = "0", "-1", "0",
211 "1", "0", "0",
212 "0", "0", "-1";
213
214 status = "disabled";
215 };
216
217 st_magn: magnetometer@1e {
218 compatible = "st,lsm303c-magn";
219 reg = <0x1e>;
220
221 vdd-supply = <&pm8916_l17>;
222 vddio-supply = <&pm8916_l5>;
223
224 mount-matrix = "0", "-1", "0",
225 "1", "0", "0",
226 "0", "0", "-1";
227
228 status = "disabled";
229 };
230 };
231
232 &blsp_i2c4 {
233 status = "okay";
234
235 fuel-gauge@35 {
236 compatible = "richtek,rt5033-battery";
237 reg = <0x35>;
238
239 interrupts-extended = <&tlmm 121 IRQ_TYPE_EDGE_FALLING>;
240
241 pinctrl-0 = <&fg_alert_default>;
242 pinctrl-names = "default";
243
244 power-supplies = <&charger>;
245 };
246 };
247
248 &blsp_i2c5 {
249 status = "okay";
250
251 touchscreen: touchscreen@20 {
252 compatible = "zinitix,bt541";
253 reg = <0x20>;
254
255 interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>;
256
257 touchscreen-size-x = <540>;
258 touchscreen-size-y = <960>;
259
260 vcca-supply = <&reg_vdd_tsp_a>;
261 vdd-supply = <&pm8916_l6>;
262
263 pinctrl-0 = <&tsp_int_default>;
264 pinctrl-names = "default";
265
266 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
267 };
268 };
269
270 &blsp_i2c6 {
271 status = "okay";
272
273 pmic@34 {
274 compatible = "richtek,rt5033";
275 reg = <0x34>;
276
277 interrupts-extended = <&tlmm 62 IRQ_TYPE_EDGE_FALLING>;
278
279 pinctrl-0 = <&pmic_int_default>;
280 pinctrl-names = "default";
281
282 regulators {
283 rt5033_reg_safe_ldo: SAFE_LDO {
284 regulator-min-microvolt = <4900000>;
285 regulator-max-microvolt = <4900000>;
286 regulator-always-on;
287 };
288
289 /*
290 * Needed for camera, but not used yet.
291 * Define empty nodes to allow disabling the unused
292 * regulators.
293 */
294 LDO {};
295 BUCK {};
296 };
297
298 charger: charger {
299 compatible = "richtek,rt5033-charger";
300 monitored-battery = <&battery>;
301 richtek,usb-connector = <&usb_con>;
302 };
303 };
304 };
305
306 &blsp_uart2 {
307 pinctrl-0 = <&blsp_uart2_console_default>;
308 pinctrl-1 = <&blsp_uart2_console_sleep>;
309 pinctrl-names = "default", "sleep";
310 status = "okay";
311 };
312
313 &mpss_mem {
314 reg = <0x0 0x86800000 0x0 0x5000000>;
315 };
316
317 &pm8916_resin {
318 linux,code = <KEY_VOLUMEDOWN>;
319 status = "okay";
320 };
321
322 &pm8916_rpm_regulators {
323 pm8916_l17: l17 {
324 regulator-min-microvolt = <2850000>;
325 regulator-max-microvolt = <2850000>;
326 };
327 };
328
329 &sdhc_1 {
330 status = "okay";
331 };
332
333 &sdhc_2 {
334 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
335 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
336 pinctrl-names = "default", "sleep";
337
338 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
339
340 status = "okay";
341 };
342
343 &sound {
344 model = "msm8916-1mic";
345 audio-routing =
346 "AMIC1", "MIC BIAS External1",
347 "AMIC2", "MIC BIAS Internal2",
348 "AMIC3", "MIC BIAS External1";
349 };
350
351 &usb {
352 extcon = <&muic>, <&muic>;
353 status = "okay";
354 };
355
356 &usb_hs_phy {
357 extcon = <&muic>;
358 };
359
360 &venus {
361 status = "okay";
362 };
363
364 &venus_mem {
365 status = "okay";
366 };
367
368 &wcnss {
369 status = "okay";
370 };
371
372 &wcnss_iris {
373 compatible = "qcom,wcn3620";
374 };
375
376 &wcnss_mem {
377 status = "okay";
378 };
379
380 &tlmm {
381 accel_int_default: accel-int-default-state {
382 pins = "gpio115";
383 function = "gpio";
384 drive-strength = <2>;
385 bias-disable;
386 };
387
388 backlight_en_default: backlight-en-default-state {
389 pins = "gpio98";
390 function = "gpio";
391 drive-strength = <2>;
392 bias-disable;
393 };
394
395 backlight_pwm_default: backlight-pwm-default-state {
396 pins = "gpio50";
397 function = "gcc_gp2_clk_a";
398 };
399
400 fg_alert_default: fg-alert-default-state {
401 pins = "gpio121";
402 function = "gpio";
403 drive-strength = <2>;
404 bias-disable;
405 };
406
407 gpio_keys_default: gpio-keys-default-state {
408 pins = "gpio107", "gpio109";
409 function = "gpio";
410 drive-strength = <2>;
411 bias-pull-up;
412 };
413
414 motor_en_default: motor-en-default-state {
415 pins = "gpio72";
416 function = "gpio";
417 drive-strength = <2>;
418 bias-disable;
419 };
420
421 muic_int_default: muic-int-default-state {
422 pins = "gpio12";
423 function = "gpio";
424 drive-strength = <2>;
425 bias-disable;
426 };
427
428 nfc_default: nfc-default-state {
429 irq-pins {
430 pins = "gpio21";
431 function = "gpio";
432 drive-strength = <2>;
433 bias-pull-down;
434 };
435
436 nfc-pins {
437 pins = "gpio20", "gpio49";
438 function = "gpio";
439 drive-strength = <2>;
440 bias-disable;
441 };
442 };
443
444 nfc_i2c_default: nfc-i2c-default-state {
445 pins = "gpio0", "gpio1";
446 function = "gpio";
447 drive-strength = <2>;
448 bias-disable;
449 };
450
451 pmic_int_default: pmic-int-default-state {
452 pins = "gpio62";
453 function = "gpio";
454 drive-strength = <2>;
455 bias-disable;
456 };
457
458 sdc2_cd_default: sdc2-cd-default-state {
459 pins = "gpio38";
460 function = "gpio";
461 drive-strength = <2>;
462 bias-disable;
463 };
464
465 tsp_en_default: tsp-en-default-state {
466 pins = "gpio73";
467 function = "gpio";
468 drive-strength = <2>;
469 bias-disable;
470 };
471
472 tsp_int_default: tsp-int-default-state {
473 pins = "gpio13";
474 function = "gpio";
475 drive-strength = <2>;
476 bias-disable;
477 };
478 };
479
480 &pm8916_gpios {
481 nfc_clk_req: nfc-clk-req-state {
482 pins = "gpio2";
483 function = "func1";
484 power-source = <PM8916_GPIO_L2>;
485 bias-disable;
486 input-enable;
487 };
488 };