xref: /linux/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi (revision 34f2573661e3e644efaf383178af634a2fd67828)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Matti Lehtimäki <matti.lehtimaki@gmail.com>
4 */
5
6/*
7 * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on
8 * the SoC on the given device.
9 */
10
11#include <dt-bindings/input/input.h>
12#include "pm8226.dtsi"
13
14/delete-node/ &adsp_region;
15/delete-node/ &mba_region;
16/delete-node/ &mpss_region;
17/delete-node/ &smem_region;
18
19/ {
20	aliases {
21		mmc0 = &sdhc_1; /* SDC1 eMMC slot */
22		mmc1 = &sdhc_2; /* SDC2 SD card slot */
23		display0 = &framebuffer0;
24	};
25
26	chosen {
27		#address-cells = <1>;
28		#size-cells = <1>;
29		ranges;
30
31		stdout-path = "display0";
32
33		framebuffer0: framebuffer@3200000 {
34			compatible = "simple-framebuffer";
35			reg = <0x03200000 0x800000>;
36			width = <1280>;
37			height = <800>;
38			stride = <(1280 * 3)>;
39			format = "r8g8b8";
40		};
41	};
42
43	gpio-hall-sensor {
44		compatible = "gpio-keys";
45
46		event-hall-sensor {
47			label = "Hall Effect Sensor";
48			gpios = <&tlmm 110 GPIO_ACTIVE_LOW>;
49			linux,input-type = <EV_SW>;
50			linux,code = <SW_LID>;
51			debounce-interval = <15>;
52			linux,can-disable;
53			wakeup-source;
54		};
55	};
56
57	gpio-keys {
58		compatible = "gpio-keys";
59		autorepeat;
60
61		key-home {
62			label = "Home";
63			gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
64			linux,code = <KEY_HOMEPAGE>;
65			debounce-interval = <15>;
66		};
67
68		key-volume-down {
69			label = "Volume Down";
70			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
71			linux,code = <KEY_VOLUMEDOWN>;
72			debounce-interval = <15>;
73		};
74
75		key-volume-up {
76			label = "Volume Up";
77			gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
78			linux,code = <KEY_VOLUMEUP>;
79			debounce-interval = <15>;
80		};
81	};
82
83	i2c-backlight {
84		compatible = "i2c-gpio";
85		sda-gpios = <&tlmm 20 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
86		scl-gpios = <&tlmm 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
87
88		pinctrl-0 = <&backlight_i2c_default_state>;
89		pinctrl-names = "default";
90
91		i2c-gpio,delay-us = <4>;
92
93		#address-cells = <1>;
94		#size-cells = <0>;
95
96		backlight@2c {
97			compatible = "ti,lp8556";
98			reg = <0x2c>;
99
100			dev-ctrl = /bits/ 8 <0x80>;
101			init-brt = /bits/ 8 <0x3f>;
102
103			pwms = <&backlight_pwm 0 100000>;
104			pwm-names = "lp8556";
105
106			rom-a0h {
107				rom-addr = /bits/ 8 <0xa0>;
108				rom-val = /bits/ 8 <0x44>;
109			};
110
111			rom-a1h {
112				rom-addr = /bits/ 8 <0xa1>;
113				rom-val = /bits/ 8 <0x6c>;
114			};
115
116			rom-a5h {
117				rom-addr = /bits/ 8 <0xa5>;
118				rom-val = /bits/ 8 <0x24>;
119			};
120		};
121	};
122
123	backlight_pwm: pwm {
124		compatible = "clk-pwm";
125		#pwm-cells = <2>;
126		clocks = <&mmcc CAMSS_GP0_CLK>;
127		pinctrl-0 = <&backlight_pwm_default_state>;
128		pinctrl-names = "default";
129	};
130
131	reg_tsp_1p8v: regulator-tsp-1p8v {
132		compatible = "regulator-fixed";
133		regulator-name = "tsp_1p8v";
134		regulator-min-microvolt = <1800000>;
135		regulator-max-microvolt = <1800000>;
136
137		gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>;
138		enable-active-high;
139
140		pinctrl-names = "default";
141		pinctrl-0 = <&tsp_en_default_state>;
142	};
143
144	reserved-memory {
145		#address-cells = <1>;
146		#size-cells = <1>;
147		ranges;
148
149		framebuffer@3200000 {
150			reg = <0x03200000 0x800000>;
151			no-map;
152		};
153
154		mpss_region: mpss@8400000 {
155			reg = <0x08400000 0x1f00000>;
156			no-map;
157		};
158
159		mba_region: mba@a300000 {
160			reg = <0x0a300000 0x100000>;
161			no-map;
162		};
163
164		reserved@cb00000 {
165			reg = <0x0cb00000 0x700000>;
166			no-map;
167		};
168
169		wcnss@d200000 {
170			reg = <0x0d200000 0x700000>;
171			no-map;
172		};
173
174		adsp_region: adsp@d900000 {
175			reg = <0x0d900000 0x1800000>;
176			no-map;
177		};
178
179		venus@f100000 {
180			reg = <0x0f100000 0x500000>;
181			no-map;
182		};
183
184		smem_region: smem@fa00000 {
185			reg = <0x0fa00000 0x100000>;
186			no-map;
187		};
188
189		reserved@fb00000 {
190			reg = <0x0fb00000 0x260000>;
191			no-map;
192		};
193
194		rfsa@fd60000 {
195			reg = <0x0fd60000 0x20000>;
196			no-map;
197		};
198
199		rmtfs@fd80000 {
200			compatible = "qcom,rmtfs-mem";
201			reg = <0x0fd80000 0x180000>;
202			no-map;
203
204			qcom,client-id = <1>;
205		};
206	};
207};
208
209&adsp {
210	status = "okay";
211};
212
213&blsp1_i2c4 {
214	status = "okay";
215
216	muic: usb-switch@25 {
217		compatible = "siliconmitus,sm5502-muic";
218		reg = <0x25>;
219
220		interrupt-parent = <&tlmm>;
221		interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
222
223		pinctrl-names = "default";
224		pinctrl-0 = <&muic_int_default_state>;
225	};
226};
227
228&blsp1_uart3 {
229	status = "okay";
230};
231
232&modem {
233	mx-supply = <&pm8226_l3>;
234	pll-supply = <&pm8226_l8>;
235
236	status = "okay";
237};
238
239&rpm_requests {
240	regulators {
241		compatible = "qcom,rpm-pm8226-regulators";
242
243		pm8226_s3: s3 {
244			regulator-min-microvolt = <1200000>;
245			regulator-max-microvolt = <1300000>;
246		};
247
248		pm8226_s4: s4 {
249			regulator-min-microvolt = <1800000>;
250			regulator-max-microvolt = <2200000>;
251		};
252
253		pm8226_s5: s5 {
254			regulator-min-microvolt = <1150000>;
255			regulator-max-microvolt = <1150000>;
256		};
257
258		pm8226_l1: l1 {
259			regulator-min-microvolt = <1225000>;
260			regulator-max-microvolt = <1225000>;
261		};
262
263		pm8226_l2: l2 {
264			regulator-min-microvolt = <1200000>;
265			regulator-max-microvolt = <1200000>;
266		};
267
268		pm8226_l3: l3 {
269			regulator-min-microvolt = <750000>;
270			regulator-max-microvolt = <1350000>;
271			regulator-always-on;
272		};
273
274		pm8226_l4: l4 {
275			regulator-min-microvolt = <1200000>;
276			regulator-max-microvolt = <1200000>;
277		};
278
279		pm8226_l5: l5 {
280			regulator-min-microvolt = <1200000>;
281			regulator-max-microvolt = <1200000>;
282		};
283
284		pm8226_l6: l6 {
285			regulator-min-microvolt = <1800000>;
286			regulator-max-microvolt = <1800000>;
287			regulator-always-on;
288		};
289
290		pm8226_l7: l7 {
291			regulator-min-microvolt = <1850000>;
292			regulator-max-microvolt = <1850000>;
293		};
294
295		pm8226_l8: l8 {
296			regulator-min-microvolt = <1800000>;
297			regulator-max-microvolt = <1800000>;
298			regulator-always-on;
299		};
300
301		pm8226_l9: l9 {
302			regulator-min-microvolt = <2050000>;
303			regulator-max-microvolt = <2050000>;
304		};
305
306		pm8226_l10: l10 {
307			regulator-min-microvolt = <1800000>;
308			regulator-max-microvolt = <1800000>;
309		};
310
311		pm8226_l12: l12 {
312			regulator-min-microvolt = <1800000>;
313			regulator-max-microvolt = <1800000>;
314		};
315
316		pm8226_l14: l14 {
317			regulator-min-microvolt = <2750000>;
318			regulator-max-microvolt = <2750000>;
319		};
320
321		pm8226_l15: l15 {
322			regulator-min-microvolt = <1800000>;
323			regulator-max-microvolt = <3300000>;
324		};
325
326		pm8226_l16: l16 {
327			regulator-min-microvolt = <3000000>;
328			regulator-max-microvolt = <3350000>;
329		};
330
331		pm8226_l17: l17 {
332			regulator-min-microvolt = <2950000>;
333			regulator-max-microvolt = <2950000>;
334
335			regulator-system-load = <200000>;
336			regulator-allow-set-load;
337			regulator-always-on;
338		};
339
340		pm8226_l18: l18 {
341			regulator-min-microvolt = <2950000>;
342			regulator-max-microvolt = <2950000>;
343		};
344
345		pm8226_l19: l19 {
346			regulator-min-microvolt = <2850000>;
347			regulator-max-microvolt = <3000000>;
348		};
349
350		pm8226_l20: l20 {
351			regulator-min-microvolt = <3075000>;
352			regulator-max-microvolt = <3075000>;
353		};
354
355		pm8226_l21: l21 {
356			regulator-min-microvolt = <1800000>;
357			regulator-max-microvolt = <2950000>;
358		};
359
360		pm8226_l22: l22 {
361			regulator-min-microvolt = <1800000>;
362			regulator-max-microvolt = <3000000>;
363		};
364
365		pm8226_l23: l23 {
366			regulator-min-microvolt = <1800000>;
367			regulator-max-microvolt = <3300000>;
368		};
369
370		pm8226_l24: l24 {
371			regulator-min-microvolt = <1300000>;
372			regulator-max-microvolt = <1350000>;
373		};
374
375		pm8226_l25: l25 {
376			regulator-min-microvolt = <1775000>;
377			regulator-max-microvolt = <2125000>;
378		};
379
380		pm8226_l26: l26 {
381			regulator-min-microvolt = <1225000>;
382			regulator-max-microvolt = <1300000>;
383		};
384
385		pm8226_l27: l27 {
386			regulator-min-microvolt = <1800000>;
387			regulator-max-microvolt = <1800000>;
388		};
389
390		pm8226_l28: l28 {
391			regulator-min-microvolt = <1800000>;
392			regulator-max-microvolt = <2950000>;
393		};
394
395		pm8226_lvs1: lvs1 {};
396	};
397};
398
399&sdhc_1 {
400	vmmc-supply = <&pm8226_l17>;
401	vqmmc-supply = <&pm8226_l6>;
402
403	bus-width = <8>;
404	non-removable;
405
406	status = "okay";
407};
408
409&sdhc_2 {
410	vmmc-supply = <&pm8226_l18>;
411	vqmmc-supply = <&pm8226_l21>;
412
413	bus-width = <4>;
414	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
415
416	status = "okay";
417};
418
419&tlmm {
420	accel_int_default_state: accel-int-default-state {
421		pins = "gpio54";
422		function = "gpio";
423		drive-strength = <2>;
424		bias-disable;
425	};
426
427	backlight_i2c_default_state: backlight-i2c-default-state {
428		pins = "gpio20", "gpio21";
429		function = "gpio";
430		drive-strength = <2>;
431		bias-disable;
432	};
433
434	backlight_pwm_default_state: backlight-pwm-default-state {
435		pins = "gpio33";
436		function = "gp0_clk";
437	};
438
439	muic_int_default_state: muic-int-default-state {
440		pins = "gpio67";
441		function = "gpio";
442		drive-strength = <2>;
443		bias-disable;
444	};
445
446	tsp_en_default_state: tsp-en-default-state {
447		pins = "gpio31";
448		function = "gpio";
449		drive-strength = <2>;
450		bias-disable;
451	};
452
453	tsp_int_rst_default_state: tsp-int-rst-default-state {
454		pins = "gpio17";
455		function = "gpio";
456		drive-strength = <10>;
457		bias-pull-up;
458	};
459};
460
461&usb {
462	extcon = <&muic>, <&muic>;
463	status = "okay";
464};
465
466&usb_hs_phy {
467	extcon = <&muic>;
468	v1p8-supply = <&pm8226_l10>;
469	v3p3-supply = <&pm8226_l20>;
470};
471