blob: fccd8fec8b8f7cd43574ad52ea4dec0fd4a250cb [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8939-pm8916.dtsi"
6
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/interrupt-controller/irq.h>
10
11/ {
12 model = "Samsung Galaxy A7 (2015)";
13 compatible = "samsung,a7", "qcom,msm8939";
14 chassis-type = "handset";
15
16 aliases {
17 mmc0 = &sdhc_1; /* SDC1 eMMC slot */
18 mmc1 = &sdhc_2; /* SDC2 SD card slot */
19 serial0 = &blsp_uart2;
20 };
21
22 chosen {
23 stdout-path = "serial0";
24 };
25
26 reserved-memory {
27 /* Additional memory used by Samsung firmware modifications */
28 tz-apps@85500000 {
29 reg = <0x0 0x85500000 0x0 0xb00000>;
30 no-map;
31 };
32 };
33
34 gpio-hall-sensor {
35 compatible = "gpio-keys";
36
37 pinctrl-0 = <&gpio_hall_sensor_default>;
38 pinctrl-names = "default";
39
40 label = "GPIO Hall Effect Sensor";
41
42 event-hall-sensor {
43 label = "Hall Effect Sensor";
44 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
45 linux,input-type = <EV_SW>;
46 linux,code = <SW_LID>;
47 linux,can-disable;
48 };
49 };
50
51 gpio-keys {
52 compatible = "gpio-keys";
53
54 pinctrl-0 = <&gpio_keys_default>;
55 pinctrl-names = "default";
56
57 label = "GPIO Buttons";
58
59 button-volume-up {
60 label = "Volume Up";
61 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_VOLUMEUP>;
63 };
64
65 button-home {
66 label = "Home";
67 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
68 linux,code = <KEY_HOMEPAGE>;
69 };
70 };
71
72 i2c-fg {
73 compatible = "i2c-gpio";
74 sda-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
75 scl-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
76
77 pinctrl-0 = <&fg_i2c_default>;
78 pinctrl-names = "default";
79
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 battery@35 {
84 compatible = "richtek,rt5033-battery";
85 reg = <0x35>;
86
87 interrupt-parent = <&tlmm>;
88 interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
89
90 pinctrl-0 = <&fg_alert_default>;
91 pinctrl-names = "default";
92 };
93 };
94
95 i2c-nfc {
96 compatible = "i2c-gpio";
97 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
98 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
99
100 pinctrl-0 = <&nfc_i2c_default>;
101 pinctrl-names = "default";
102
103 #address-cells = <1>;
104 #size-cells = <0>;
105
106 nfc@2b {
107 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
108 reg = <0x2b>;
109
110 interrupt-parent = <&tlmm>;
111 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
112
113 enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>;
114 firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
115
116 pinctrl-0 = <&nfc_default>;
117 pinctrl-names = "default";
118 };
119 };
120
121 i2c-sensor {
122 compatible = "i2c-gpio";
123 sda-gpios = <&tlmm 84 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
124 scl-gpios = <&tlmm 85 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
125
126 pinctrl-0 = <&sensor_i2c_default>;
127 pinctrl-names = "default";
128
129 #address-cells = <1>;
130 #size-cells = <0>;
131
132 accelerometer: accelerometer@10 {
133 compatible = "bosch,bmc150_accel";
134 reg = <0x10>;
135 interrupt-parent = <&tlmm>;
136 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
137
138 vdd-supply = <&pm8916_l17>;
139 vddio-supply = <&pm8916_l5>;
140
141 pinctrl-0 = <&accel_int_default>;
142 pinctrl-names = "default";
143
144 mount-matrix = "-1", "0", "0",
145 "0", "-1", "0",
146 "0", "0", "1";
147 };
148
149 magnetometer@12 {
150 compatible = "bosch,bmc150_magn";
151 reg = <0x12>;
152
153 vdd-supply = <&pm8916_l17>;
154 vddio-supply = <&pm8916_l5>;
155 };
156 };
157
158 i2c-tkey {
159 compatible = "i2c-gpio";
160 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
161 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
162
163 pinctrl-0 = <&tkey_i2c_default>;
164 pinctrl-names = "default";
165
166 #address-cells = <1>;
167 #size-cells = <0>;
168
169 touchkey@20 {
170 /* Note: Actually an ABOV MCU that implements same interface */
171 compatible = "coreriver,tc360-touchkey";
172 reg = <0x20>;
173
174 interrupt-parent = <&tlmm>;
175 interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
176
177 vcc-supply = <&reg_touch_key>;
178 vdd-supply = <&reg_keyled>;
179 vddio-supply = <&pm8916_l6>;
180
181 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
182
183 pinctrl-0 = <&tkey_default>;
184 pinctrl-names = "default";
185 };
186 };
187
188 pwm_vibrator: pwm-vibrator {
189 compatible = "clk-pwm";
190 #pwm-cells = <2>;
191
192 clocks = <&gcc GCC_GP2_CLK>;
193
194 pinctrl-0 = <&motor_pwm_default>;
195 pinctrl-names = "default";
196 };
197
198 reg_keyled: regulator-keyled {
199 compatible = "regulator-fixed";
200 regulator-name = "keyled";
201 regulator-min-microvolt = <3300000>;
202 regulator-max-microvolt = <3300000>;
203
204 /* NOTE: On some variants e.g. SM-A700FD it's GPIO 91 */
205 gpio = <&tlmm 100 GPIO_ACTIVE_HIGH>;
206 enable-active-high;
207
208 pinctrl-0 = <&tkey_led_en_default>;
209 pinctrl-names = "default";
210 };
211
212 reg_touch_key: regulator-touch-key {
213 compatible = "regulator-fixed";
214 regulator-name = "touch_key";
215 regulator-min-microvolt = <2800000>;
216 regulator-max-microvolt = <2800000>;
217
218 gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;
219 enable-active-high;
220
221 pinctrl-0 = <&tkey_en_default>;
222 pinctrl-names = "default";
223 };
224
225 reg_tsp_vdd: regulator-tsp-vdd {
226 compatible = "regulator-fixed";
227 regulator-name = "tsp_vdd";
228 regulator-min-microvolt = <1800000>;
229 regulator-max-microvolt = <1800000>;
230 vin-supply = <&pm8916_s4>;
231
232 gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
233 enable-active-high;
234
235 pinctrl-0 = <&reg_tsp_io_en_default>;
236 pinctrl-names = "default";
237 };
238
239 reg_vdd_tsp: regulator-vdd-tsp {
240 compatible = "regulator-fixed";
241 regulator-name = "vdd_tsp";
242 regulator-min-microvolt = <3300000>;
243 regulator-max-microvolt = <3300000>;
244
245 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
246 enable-active-high;
247
248 pinctrl-0 = <&reg_tsp_en_default>;
249 pinctrl-names = "default";
250 };
251
252 reg_vibrator: regulator-vibrator {
253 compatible = "regulator-fixed";
254 regulator-name = "motor_en";
255 regulator-min-microvolt = <3000000>;
256 regulator-max-microvolt = <3000000>;
257
258 gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
259 enable-active-high;
260
261 pinctrl-0 = <&motor_en_default>;
262 pinctrl-names = "default";
263 };
264
265 vibrator {
266 compatible = "pwm-vibrator";
267
268 pwms = <&pwm_vibrator 0 100000>;
269 pwm-names = "enable";
270
271 vcc-supply = <&reg_vibrator>;
272 };
273};
274
275&blsp_i2c1 {
276 status = "okay";
277
278 muic: extcon@25 {
279 compatible = "siliconmitus,sm5502-muic";
280 reg = <0x25>;
281
282 interrupt-parent = <&tlmm>;
283 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
284
285 pinctrl-0 = <&muic_int_default>;
286 pinctrl-names = "default";
287 };
288};
289
290&blsp_i2c5 {
291 status = "okay";
292
293 touchscreen@24 {
294 compatible = "cypress,tt21000";
295
296 reg = <0x24>;
297 interrupt-parent = <&tlmm>;
298 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
299
300 vdd-supply = <&reg_vdd_tsp>;
301 vddio-supply = <&reg_tsp_vdd>;
302
303 pinctrl-0 = <&tsp_int_default>;
304 pinctrl-names = "default";
305 };
306};
307
308&blsp_uart2 {
309 status = "okay";
310};
311
312&pm8916_resin {
313 linux,code = <KEY_VOLUMEDOWN>;
314 status = "okay";
315};
316
317&pm8916_rpm_regulators {
318 pm8916_l17: l17 {
319 regulator-min-microvolt = <2850000>;
320 regulator-max-microvolt = <2850000>;
321 };
322};
323
324&sdhc_1 {
325 status = "okay";
326};
327
328&sdhc_2 {
329 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
330 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
331 pinctrl-names = "default", "sleep";
332
333 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
334
335 status = "okay";
336};
337
338&usb {
339 extcon = <&muic>, <&muic>;
340 status = "okay";
341};
342
343&usb_hs_phy {
344 extcon = <&muic>;
345};
346
347&wcnss {
348 status = "okay";
349};
350
351&wcnss_iris {
352 compatible = "qcom,wcn3660b";
353};
354
355&wcnss_mem {
356 status = "okay";
357};
358
359&tlmm {
360 accel_int_default: accel-int-default-state {
361 pins = "gpio115";
362 function = "gpio";
363 drive-strength = <2>;
364 bias-disable;
365 };
366
367 fg_alert_default: fg-alert-default-state {
368 pins = "gpio121";
369 function = "gpio";
370 drive-strength = <2>;
371 bias-disable;
372 };
373
374 fg_i2c_default: fg-i2c-default-state {
375 pins = "gpio105", "gpio106";
376 function = "gpio";
377 drive-strength = <2>;
378 bias-disable;
379 };
380
381 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
382 pins = "gpio52";
383 function = "gpio";
384 drive-strength = <2>;
385 bias-disable;
386 };
387
388 gpio_keys_default: gpio-keys-default-state {
389 pins = "gpio107", "gpio109";
390 function = "gpio";
391 drive-strength = <2>;
392 bias-pull-up;
393 };
394
395 motor_en_default: motor-en-default-state {
396 pins = "gpio86";
397 function = "gpio";
398 drive-strength = <2>;
399 bias-disable;
400 };
401
402 motor_pwm_default: motor-pwm-default-state {
403 pins = "gpio50";
404 function = "gcc_gp2_clk_a";
405 };
406
407 muic_int_default: muic-int-default-state {
408 pins = "gpio12";
409 function = "gpio";
410 drive-strength = <2>;
411 bias-disable;
412 };
413
414 nfc_default: nfc-default-state {
415 irq-pins {
416 pins = "gpio21";
417 function = "gpio";
418 drive-strength = <2>;
419 bias-pull-down;
420 };
421
422 nfc-pins {
423 pins = "gpio49", "gpio116";
424 function = "gpio";
425 drive-strength = <2>;
426 bias-disable;
427 };
428 };
429
430 nfc_i2c_default: nfc-i2c-default-state {
431 pins = "gpio0", "gpio1";
432 function = "gpio";
433 drive-strength = <2>;
434 bias-disable;
435 };
436
437 reg_tsp_en_default: reg-tsp-en-default-state {
438 pins = "gpio73";
439 function = "gpio";
440 drive-strength = <2>;
441 bias-disable;
442 };
443
444 reg_tsp_io_en_default: reg-tsp-io-en-default-state {
445 pins = "gpio8";
446 function = "gpio";
447 drive-strength = <2>;
448 bias-disable;
449 };
450
451 sdc2_cd_default: sdc2-cd-default-state {
452 pins = "gpio38";
453 function = "gpio";
454 drive-strength = <2>;
455 bias-disable;
456 };
457
458 sensor_i2c_default: sensor-i2c-default-state {
459 pins = "gpio84", "gpio85";
460 function = "gpio";
461 drive-strength = <2>;
462 bias-disable;
463 };
464
465 tkey_default: tkey-default-state {
466 pins = "gpio20";
467 function = "gpio";
468 drive-strength = <2>;
469 bias-disable;
470 };
471
472 tkey_en_default: tkey-en-default-state {
473 pins = "gpio56";
474 function = "gpio";
475 drive-strength = <2>;
476 bias-disable;
477 };
478
479 tkey_i2c_default: tkey-i2c-default-state {
480 pins = "gpio16", "gpio17";
481 function = "gpio";
482 drive-strength = <2>;
483 bias-disable;
484 };
485
486 tkey_led_en_default: tkey-led-en-default-state {
487 pins = "gpio100";
488 function = "gpio";
489 drive-strength = <2>;
490 bias-disable;
491 };
492
493 tsp_int_default: tsp-int-default-state {
494 pins = "gpio13";
495 function = "gpio";
496 drive-strength = <2>;
497 bias-disable;
498 };
499};