1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916.dtsi"
6#include "pm8916.dtsi"
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9
10/ {
11	model = "Longcheer L8150";
12	compatible = "longcheer,l8150", "qcom,msm8916-v1-qrd/9-v1", "qcom,msm8916";
13
14	aliases {
15		serial0 = &blsp1_uart2;
16	};
17
18	chosen {
19		stdout-path = "serial0";
20	};
21
22	reserved-memory {
23		// wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000
24		/delete-node/ wcnss@89300000;
25
26		wcnss_mem: wcnss@8b600000 {
27			reg = <0x0 0x8b600000 0x0 0x600000>;
28			no-map;
29		};
30	};
31
32	soc {
33		sdhci@7824000 {
34			status = "okay";
35
36			vmmc-supply = <&pm8916_l8>;
37			vqmmc-supply = <&pm8916_l5>;
38
39			pinctrl-names = "default", "sleep";
40			pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
41			pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
42		};
43
44		sdhci@7864000 {
45			status = "okay";
46
47			vmmc-supply = <&pm8916_l11>;
48			vqmmc-supply = <&pm8916_l12>;
49
50			pinctrl-names = "default", "sleep";
51			pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
52			pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
53
54			non-removable;
55		};
56
57		serial@78b0000 {
58			status = "okay";
59			pinctrl-names = "default", "sleep";
60			pinctrl-0 = <&blsp1_uart2_default>;
61			pinctrl-1 = <&blsp1_uart2_sleep>;
62		};
63
64		usb@78d9000 {
65			status = "okay";
66			dr_mode = "peripheral";
67			extcon = <&usb_vbus>;
68
69			hnp-disable;
70			srp-disable;
71			adp-disable;
72
73			ulpi {
74				phy {
75					extcon = <&usb_vbus>;
76					v1p8-supply = <&pm8916_l7>;
77					v3p3-supply = <&pm8916_l13>;
78				};
79			};
80		};
81
82		wcnss@a21b000 {
83			status = "okay";
84		};
85
86		/*
87		 * Attempting to enable these devices causes a "synchronous
88		 * external abort". Suspected cause is that the debug power
89		 * domain is not enabled by default on this device.
90		 * Disable these devices for now to avoid the crash.
91		 *
92		 * See: https://lore.kernel.org/linux-arm-msm/20190618202623.GA53651@gerhold.net/
93		 */
94		tpiu@820000 { status = "disabled"; };
95		funnel@821000 { status = "disabled"; };
96		replicator@824000 { status = "disabled"; };
97		etf@825000 { status = "disabled"; };
98		etr@826000 { status = "disabled"; };
99		funnel@841000 { status = "disabled"; };
100		debug@850000 { status = "disabled"; };
101		debug@852000 { status = "disabled"; };
102		debug@854000 { status = "disabled"; };
103		debug@856000 { status = "disabled"; };
104		etm@85c000 { status = "disabled"; };
105		etm@85d000 { status = "disabled"; };
106		etm@85e000 { status = "disabled"; };
107		etm@85f000 { status = "disabled"; };
108	};
109
110	// FIXME: Use extcon device provided by charger driver when available
111	usb_vbus: usb-vbus {
112		compatible = "linux,extcon-usb-gpio";
113		vbus-gpio = <&msmgpio 62 GPIO_ACTIVE_HIGH>;
114		pinctrl-names = "default";
115		pinctrl-0 = <&usb_vbus_default>;
116	};
117
118	gpio-keys {
119		compatible = "gpio-keys";
120
121		pinctrl-names = "default";
122		pinctrl-0 = <&gpio_keys_default>;
123
124		label = "GPIO Buttons";
125
126		volume-up {
127			label = "Volume Up";
128			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
129			linux,code = <KEY_VOLUMEUP>;
130		};
131	};
132};
133
134&msmgpio {
135	gpio_keys_default: gpio_keys_default {
136		pinmux {
137			function = "gpio";
138			pins = "gpio107";
139		};
140		pinconf {
141			pins = "gpio107";
142			drive-strength = <2>;
143			bias-pull-up;
144		};
145	};
146
147	usb_vbus_default: usb-vbus-default {
148		pinmux {
149			function = "gpio";
150			pins = "gpio62";
151		};
152		pinconf {
153			pins = "gpio62";
154			bias-pull-up;
155		};
156	};
157};
158
159&spmi_bus {
160	pm8916@0 {
161		pon@800 {
162			volume-down {
163				compatible = "qcom,pm8941-resin";
164				interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
165				bias-pull-up;
166				linux,code = <KEY_VOLUMEDOWN>;
167			};
168		};
169	};
170};
171
172&smd_rpm_regulators {
173	vdd_l1_l2_l3-supply = <&pm8916_s3>;
174	vdd_l4_l5_l6-supply = <&pm8916_s4>;
175	vdd_l7-supply = <&pm8916_s4>;
176
177	s1 {
178		regulator-min-microvolt = <500000>;
179		regulator-max-microvolt = <1300000>;
180	};
181
182	s3 {
183		regulator-min-microvolt = <1200000>;
184		regulator-max-microvolt = <1300000>;
185	};
186
187	s4 {
188		regulator-min-microvolt = <1800000>;
189		regulator-max-microvolt = <2100000>;
190	};
191
192	l1 {
193		regulator-min-microvolt = <1225000>;
194		regulator-max-microvolt = <1225000>;
195	};
196
197	l2 {
198		regulator-min-microvolt = <1200000>;
199		regulator-max-microvolt = <1200000>;
200	};
201
202	l3 {
203		regulator-min-microvolt = <500000>;
204		regulator-max-microvolt = <1287500>;
205	};
206
207	l4 {
208		regulator-min-microvolt = <2050000>;
209		regulator-max-microvolt = <2050000>;
210	};
211
212	l5 {
213		regulator-min-microvolt = <1800000>;
214		regulator-max-microvolt = <1800000>;
215	};
216
217	l6 {
218		regulator-min-microvolt = <1800000>;
219		regulator-max-microvolt = <1800000>;
220	};
221
222	l7 {
223		regulator-min-microvolt = <1800000>;
224		regulator-max-microvolt = <1800000>;
225	};
226
227	l8 {
228		regulator-min-microvolt = <2850000>;
229		regulator-max-microvolt = <2900000>;
230	};
231
232	l9 {
233		regulator-min-microvolt = <3300000>;
234		regulator-max-microvolt = <3300000>;
235	};
236
237	l10 {
238		regulator-min-microvolt = <2700000>;
239		regulator-max-microvolt = <2800000>;
240	};
241
242	l11 {
243		regulator-min-microvolt = <1800000>;
244		regulator-max-microvolt = <2950000>;
245		regulator-allow-set-load;
246		regulator-system-load = <200000>;
247	};
248
249	l12 {
250		regulator-min-microvolt = <1800000>;
251		regulator-max-microvolt = <2950000>;
252	};
253
254	l13 {
255		regulator-min-microvolt = <3075000>;
256		regulator-max-microvolt = <3075000>;
257	};
258
259	l14 {
260		regulator-min-microvolt = <1800000>;
261		regulator-max-microvolt = <3300000>;
262	};
263
264	l15 {
265		regulator-min-microvolt = <1800000>;
266		regulator-max-microvolt = <3300000>;
267	};
268
269	l16 {
270		regulator-min-microvolt = <1800000>;
271		regulator-max-microvolt = <3300000>;
272	};
273
274	l17 {
275		regulator-min-microvolt = <2850000>;
276		regulator-max-microvolt = <2850000>;
277	};
278
279	l18 {
280		regulator-min-microvolt = <2700000>;
281		regulator-max-microvolt = <2700000>;
282	};
283};
284