blob: 0b29132b74e1da1cec11efb9cd2e90df168790c9 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: GPL-2.0-only
2
3#include "msm8916-pm8916.dtsi"
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
8
9/ {
10 aliases {
11 mmc0 = &sdhc_1; /* eMMC */
12 mmc1 = &sdhc_2; /* SD card */
13 serial0 = &blsp_uart2;
14 };
15
16 chosen {
17 stdout-path = "serial0";
18 };
19
20 reserved-memory {
21 /* Additional memory used by Samsung firmware modifications */
22 tz-apps@85500000 {
23 reg = <0x0 0x85500000 0x0 0xb00000>;
24 no-map;
25 };
26 };
27
28 clk_pwm: pwm {
29 compatible = "clk-pwm";
30 #pwm-cells = <2>;
31
32 clocks = <&gcc GCC_GP2_CLK>;
33
34 pinctrl-names = "default";
35 pinctrl-0 = <&motor_pwm_default>;
36 status = "disabled";
37 };
38
39 gpio-keys {
40 compatible = "gpio-keys";
41
42 pinctrl-names = "default";
43 pinctrl-0 = <&gpio_keys_default>;
44
45 label = "GPIO Buttons";
46
47 button-volume-up {
48 label = "Volume Up";
49 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_VOLUMEUP>;
51 };
52
53 button-home {
54 label = "Home";
55 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_HOMEPAGE>;
57 };
58 };
59
60 gpio-hall-sensor {
61 compatible = "gpio-keys";
62
63 pinctrl-names = "default";
64 pinctrl-0 = <&gpio_hall_sensor_default>;
65
66 label = "GPIO Hall Effect Sensor";
67
68 event-hall-sensor {
69 label = "Hall Effect Sensor";
70 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
71 linux,input-type = <EV_SW>;
72 linux,code = <SW_LID>;
73 linux,can-disable;
74 };
75 };
76
77 /*
78 * NOTE: A5 connects GPIO 76 to a reglator powering the motor
79 * driver IC but A3 connects the same signal to an ENABLE pin of
80 * the driver.
81 */
82 reg_motor_vdd: regulator-motor-vdd {
83 compatible = "regulator-fixed";
84 regulator-name = "motor_vdd";
85 regulator-min-microvolt = <3000000>;
86 regulator-max-microvolt = <3000000>;
87
88 gpio = <&tlmm 76 GPIO_ACTIVE_HIGH>;
89 enable-active-high;
90
91 pinctrl-names = "default";
92 pinctrl-0 = <&motor_en_default>;
93 };
94
95 reg_vdd_tsp_a: regulator-vdd-tsp-a {
96 compatible = "regulator-fixed";
97 regulator-name = "vdd_tsp_a";
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
100
101 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
102 enable-active-high;
103
104 pinctrl-names = "default";
105 pinctrl-0 = <&tsp_en_default>;
106 };
107
108 i2c-muic {
109 compatible = "i2c-gpio";
110 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
111 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
112
113 pinctrl-names = "default";
114 pinctrl-0 = <&muic_i2c_default>;
115
116 #address-cells = <1>;
117 #size-cells = <0>;
118
119 muic: extcon@25 {
120 compatible = "siliconmitus,sm5502-muic";
121
122 reg = <0x25>;
123 interrupt-parent = <&tlmm>;
124 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
125
126 pinctrl-names = "default";
127 pinctrl-0 = <&muic_int_default>;
128 };
129 };
130
131 i2c-tkey {
132 compatible = "i2c-gpio";
133 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
134 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
135
136 pinctrl-names = "default";
137 pinctrl-0 = <&tkey_i2c_default>;
138
139 #address-cells = <1>;
140 #size-cells = <0>;
141
142 touchkey: touchkey@20 {
143 /* Note: Actually an ABOV MCU that implements same interface */
144 compatible = "coreriver,tc360-touchkey";
145 reg = <0x20>;
146
147 interrupt-parent = <&tlmm>;
148 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
149
150 /* vcc/vdd-supply are board-specific */
151 vddio-supply = <&pm8916_l6>;
152
153 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
154
155 pinctrl-names = "default";
156 pinctrl-0 = <&tkey_default>;
157 };
158 };
159
160 i2c-nfc {
161 compatible = "i2c-gpio";
162 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
163 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
164
165 pinctrl-names = "default";
166 pinctrl-0 = <&nfc_i2c_default>;
167
168 #address-cells = <1>;
169 #size-cells = <0>;
170
171 nfc@27 {
172 compatible = "samsung,s3fwrn5-i2c";
173 reg = <0x27>;
174
175 interrupt-parent = <&tlmm>;
176 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
177
178 en-gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
179 wake-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
180
181 clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
182
183 pinctrl-names = "default";
184 pinctrl-0 = <&nfc_default &nfc_clk_req>;
185 };
186 };
187
188 vibrator: vibrator {
189 compatible = "pwm-vibrator";
190
191 pwms = <&clk_pwm 0 100000>;
192 pwm-names = "enable";
193
194 vcc-supply = <&reg_motor_vdd>;
195 status = "disabled";
196 };
197};
198
199&blsp_i2c2 {
200 status = "okay";
201
202 accelerometer: accelerometer@10 {
203 compatible = "bosch,bmc150_accel";
204 reg = <0x10>;
205 interrupt-parent = <&tlmm>;
206 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
207
208 vdd-supply = <&pm8916_l17>;
209 vddio-supply = <&pm8916_l5>;
210
211 pinctrl-names = "default";
212 pinctrl-0 = <&accel_int_default>;
213 };
214
215 magnetometer@12 {
216 compatible = "bosch,bmc150_magn";
217 reg = <0x12>;
218
219 vdd-supply = <&pm8916_l17>;
220 vddio-supply = <&pm8916_l5>;
221 };
222};
223
224&blsp_i2c4 {
225 status = "okay";
226
227 battery@35 {
228 compatible = "richtek,rt5033-battery";
229 reg = <0x35>;
230 interrupt-parent = <&tlmm>;
231 interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
232
233 pinctrl-names = "default";
234 pinctrl-0 = <&fg_alert_default>;
235 };
236};
237
238&blsp_uart2 {
239 status = "okay";
240};
241
242&gpu {
243 status = "okay";
244};
245
246&mdss {
247 status = "okay";
248};
249
250&mdss_dsi0 {
251 pinctrl-names = "default", "sleep";
252 pinctrl-0 = <&mdss_default>;
253 pinctrl-1 = <&mdss_sleep>;
254};
255
256&pm8916_resin {
257 status = "okay";
258 linux,code = <KEY_VOLUMEDOWN>;
259};
260
261&pm8916_rpm_regulators {
262 pm8916_l17: l17 {
263 regulator-min-microvolt = <2850000>;
264 regulator-max-microvolt = <2850000>;
265 };
266};
267
268&sdhc_1 {
269 status = "okay";
270};
271
272&sdhc_2 {
273 status = "okay";
274
275 pinctrl-names = "default", "sleep";
276 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
277 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
278
279 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
280};
281
282&usb {
283 status = "okay";
284 extcon = <&muic>, <&muic>;
285};
286
287&usb_hs_phy {
288 extcon = <&muic>;
289};
290
291&venus {
292 status = "okay";
293};
294
295&venus_mem {
296 status = "okay";
297};
298
299&tlmm {
300 accel_int_default: accel-int-default-state {
301 pins = "gpio115";
302 function = "gpio";
303
304 drive-strength = <2>;
305 bias-disable;
306 };
307
308 fg_alert_default: fg-alert-default-state {
309 pins = "gpio121";
310 function = "gpio";
311
312 drive-strength = <2>;
313 bias-disable;
314 };
315
316 gpio_keys_default: gpio-keys-default-state {
317 pins = "gpio107", "gpio109";
318 function = "gpio";
319
320 drive-strength = <2>;
321 bias-pull-up;
322 };
323
324 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
325 pins = "gpio52";
326 function = "gpio";
327
328 drive-strength = <2>;
329 bias-disable;
330 };
331
332 mdss_default: mdss-default-state {
333 pins = "gpio25";
334 function = "gpio";
335
336 drive-strength = <8>;
337 bias-disable;
338 };
339 mdss_sleep: mdss-sleep-state {
340 pins = "gpio25";
341 function = "gpio";
342
343 drive-strength = <2>;
344 bias-pull-down;
345 };
346
347 motor_en_default: motor-en-default-state {
348 pins = "gpio76";
349 function = "gpio";
350
351 drive-strength = <2>;
352 bias-disable;
353 };
354
355 motor_pwm_default: motor-pwm-default-state {
356 pins = "gpio50";
357 function = "gcc_gp2_clk_a";
358 };
359
360 muic_i2c_default: muic-i2c-default-state {
361 pins = "gpio105", "gpio106";
362 function = "gpio";
363
364 drive-strength = <2>;
365 bias-disable;
366 };
367
368 muic_int_default: muic-int-default-state {
369 pins = "gpio12";
370 function = "gpio";
371
372 drive-strength = <2>;
373 bias-disable;
374 };
375
376 nfc_default: nfc-default-state {
377 nfc-pins {
378 pins = "gpio20", "gpio49";
379 function = "gpio";
380
381 drive-strength = <2>;
382 bias-disable;
383 };
384
385 irq-pins {
386 pins = "gpio21";
387 function = "gpio";
388
389 drive-strength = <2>;
390 bias-pull-down;
391 };
392 };
393
394 nfc_i2c_default: nfc-i2c-default-state {
395 pins = "gpio0", "gpio1";
396 function = "gpio";
397
398 drive-strength = <2>;
399 bias-disable;
400 };
401
402 sdc2_cd_default: sdc2-cd-default-state {
403 pins = "gpio38";
404 function = "gpio";
405 drive-strength = <2>;
406 bias-disable;
407 };
408
409 tkey_default: tkey-default-state {
410 pins = "gpio98";
411 function = "gpio";
412
413 drive-strength = <2>;
414 bias-disable;
415 };
416
417 tkey_i2c_default: tkey-i2c-default-state {
418 pins = "gpio16", "gpio17";
419 function = "gpio";
420
421 drive-strength = <2>;
422 bias-disable;
423 };
424
425 tsp_en_default: tsp-en-default-state {
426 pins = "gpio73";
427 function = "gpio";
428
429 drive-strength = <2>;
430 bias-disable;
431 };
432
433 ts_int_default: ts-int-default-state {
434 pins = "gpio13";
435 function = "gpio";
436
437 drive-strength = <2>;
438 bias-disable;
439 };
440};
441
442&pm8916_gpios {
443 nfc_clk_req: nfc-clk-req-state {
444 pins = "gpio2";
445 function = "func1";
446
447 input-enable;
448 bias-disable;
449 power-source = <PM8916_GPIO_L2>;
450 };
451};