1// SPDX-License-Identifier: GPL-2.0-only
2/* Copyright (c) 2015, LGE Inc. All rights reserved.
3 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021, Petr Vorel <petr.vorel@gmail.com>
5 */
6
7/dts-v1/;
8
9#include "msm8992.dtsi"
10#include "pm8994.dtsi"
11#include "pmi8994.dtsi"
12
13/* cont_splash_mem has different memory mapping */
14/delete-node/ &cont_splash_mem;
15
16/ {
17	model = "LG Nexus 5X";
18	compatible = "lg,bullhead", "qcom,msm8992";
19	chassis-type = "handset";
20
21	qcom,msm-id = <251 0>, <252 0>;
22	qcom,pmic-id = <0x10009 0x1000A 0x0 0x0>;
23
24	/* Bullhead firmware doesn't support PSCI */
25	/delete-node/ psci;
26
27	aliases {
28		serial0 = &blsp1_uart2;
29	};
30
31	chosen {
32		stdout-path = "serial0:115200n8";
33	};
34
35	reserved-memory {
36		#address-cells = <2>;
37		#size-cells = <2>;
38		ranges;
39
40		ramoops@1ff00000 {
41			compatible = "ramoops";
42			reg = <0x0 0x1ff00000 0x0 0x40000>;
43			console-size = <0x10000>;
44			record-size = <0x10000>;
45			ftrace-size = <0x10000>;
46			pmsg-size = <0x20000>;
47		};
48
49		cont_splash_mem: memory@3400000 {
50			reg = <0 0x03400000 0 0x1200000>;
51			no-map;
52		};
53	};
54};
55
56&blsp1_uart2 {
57	status = "okay";
58};
59
60&rpm_requests {
61	pm8994_regulators: pm8994-regulators {
62		compatible = "qcom,rpm-pm8994-regulators";
63
64		vdd_l1-supply = <&pm8994_s1>;
65		vdd_l2_26_28-supply = <&pm8994_s3>;
66		vdd_l3_11-supply = <&pm8994_s3>;
67		vdd_l4_27_31-supply = <&pm8994_s3>;
68		vdd_l5_7-supply = <&pm8994_s3>;
69		vdd_l6_12_32-supply = <&pm8994_s5>;
70		vdd_l8_16_30-supply = <&vph_pwr>;
71		vdd_l9_10_18_22-supply = <&vph_pwr>;
72		vdd_l13_19_23_24-supply = <&vph_pwr>;
73		vdd_l14_15-supply = <&pm8994_s5>;
74		vdd_l17_29-supply = <&vph_pwr>;
75		vdd_l20_21-supply = <&vph_pwr>;
76		vdd_l25-supply = <&pm8994_s5>;
77		vdd_lvs1_2-supply = <&pm8994_s4>;
78
79		/* S1, S2, S6 and S12 are managed by RPMPD */
80
81		pm8994_s1: s1 {
82			regulator-min-microvolt = <800000>;
83			regulator-max-microvolt = <800000>;
84		};
85
86		pm8994_s2: s2 {
87			/* TODO */
88		};
89
90		pm8994_s3: s3 {
91			regulator-min-microvolt = <1300000>;
92			regulator-max-microvolt = <1300000>;
93		};
94
95		pm8994_s4: s4 {
96			regulator-min-microvolt = <1800000>;
97			regulator-max-microvolt = <1800000>;
98			regulator-allow-set-load;
99			regulator-system-load = <325000>;
100		};
101
102		pm8994_s5: s5 {
103			regulator-min-microvolt = <2150000>;
104			regulator-max-microvolt = <2150000>;
105		};
106
107		pm8994_s7: s7 {
108			regulator-min-microvolt = <1000000>;
109			regulator-max-microvolt = <1000000>;
110		};
111
112		/* S8, S9, S10 and S11 - SPMI-managed VDD_APC */
113
114		pm8994_l1: l1 {
115			regulator-min-microvolt = <1000000>;
116			regulator-max-microvolt = <1000000>;
117		};
118
119		pm8994_l2: l2 {
120			regulator-min-microvolt = <1250000>;
121			regulator-max-microvolt = <1250000>;
122		};
123
124		pm8994_l3: l3 {
125			regulator-min-microvolt = <1200000>;
126			regulator-max-microvolt = <1200000>;
127		};
128
129		pm8994_l4: l4 {
130			regulator-min-microvolt = <1225000>;
131			regulator-max-microvolt = <1225000>;
132		};
133
134		/* L5 is inaccessible from RPM */
135
136		pm8994_l6: l6 {
137			regulator-min-microvolt = <1800000>;
138			regulator-max-microvolt = <1800000>;
139		};
140
141		/* L7 is inaccessible from RPM */
142
143		pm8994_l8: l8 {
144			regulator-min-microvolt = <1800000>;
145			regulator-max-microvolt = <1800000>;
146		};
147
148		pm8994_l9: l9 {
149			regulator-min-microvolt = <1800000>;
150			regulator-max-microvolt = <1800000>;
151		};
152
153		pm8994_l10: l10 {
154			regulator-min-microvolt = <1800000>;
155			regulator-max-microvolt = <1800000>;
156		};
157
158		pm8994_l11: l11 {
159			regulator-min-microvolt = <1200000>;
160			regulator-max-microvolt = <1200000>;
161		};
162
163		pm8994_l12: l12 {
164			regulator-min-microvolt = <1800000>;
165			regulator-max-microvolt = <1800000>;
166		};
167
168		pm8994_l13: l13 {
169			regulator-min-microvolt = <1800000>;
170			regulator-max-microvolt = <2950000>;
171		};
172
173		pm8994_l14: l14 {
174			regulator-min-microvolt = <1200000>;
175			regulator-max-microvolt = <1200000>;
176		};
177
178		pm8994_l15: l15 {
179			regulator-min-microvolt = <1800000>;
180			regulator-max-microvolt = <1800000>;
181		};
182
183		pm8994_l16: l16 {
184			regulator-min-microvolt = <2700000>;
185			regulator-max-microvolt = <2700000>;
186		};
187
188		pm8994_l17: l17 {
189			regulator-min-microvolt = <2700000>;
190			regulator-max-microvolt = <2700000>;
191		};
192
193		pm8994_l18: l18 {
194			regulator-min-microvolt = <3000000>;
195			regulator-max-microvolt = <3000000>;
196		};
197
198		pm8994_l19: l19 {
199			regulator-min-microvolt = <1800000>;
200			regulator-max-microvolt = <1800000>;
201		};
202
203		pm8994_l20: l20 {
204			regulator-min-microvolt = <2950000>;
205			regulator-max-microvolt = <2950000>;
206			regulator-always-on;
207			regulator-boot-on;
208			regulator-allow-set-load;
209			regulator-system-load = <570000>;
210		};
211
212		pm8994_l21: l21 {
213			regulator-min-microvolt = <1800000>;
214			regulator-max-microvolt = <1800000>;
215			regulator-always-on;
216		};
217
218		pm8994_l22: l22 {
219			regulator-min-microvolt = <3100000>;
220			regulator-max-microvolt = <3100000>;
221		};
222
223		pm8994_l23: l23 {
224			regulator-min-microvolt = <2800000>;
225			regulator-max-microvolt = <2800000>;
226		};
227
228		pm8994_l24: l24 {
229			regulator-min-microvolt = <3075000>;
230			regulator-max-microvolt = <3150000>;
231		};
232
233		pm8994_l25: l25 {
234			regulator-min-microvolt = <1800000>;
235			regulator-max-microvolt = <1800000>;
236		};
237
238		pm8994_l26: l26 {
239			/* TODO: value from downstream
240			regulator-min-microvolt = <987500>;
241			fails to apply */
242		};
243
244		pm8994_l27: l27 {
245			regulator-min-microvolt = <1050000>;
246			regulator-max-microvolt = <1050000>;
247		};
248
249		pm8994_l28: l28 {
250			regulator-min-microvolt = <1000000>;
251			regulator-max-microvolt = <1000000>;
252		};
253
254		pm8994_l29: l29 {
255			/* TODO: Unsupported voltage range.
256			regulator-min-microvolt = <2800000>;
257			regulator-max-microvolt = <2800000>;
258			qcom,init-voltage = <2800000>;
259			*/
260		};
261
262		pm8994_l30: l30 {
263			/* TODO: get this verified
264			regulator-min-microvolt = <1800000>;
265			regulator-max-microvolt = <1800000>;
266			qcom,init-voltage = <1800000>;
267			*/
268		};
269
270		pm8994_l31: l31 {
271			regulator-min-microvolt = <1262500>;
272			regulator-max-microvolt = <1262500>;
273		};
274
275		pm8994_l32: l32 {
276			/* TODO: get this verified
277			regulator-min-microvolt = <1800000>;
278			regulator-max-microvolt = <1800000>;
279			qcom,init-voltage = <1800000>;
280			*/
281		};
282	};
283
284	pmi8994_regulators: pmi8994-regulators {
285		compatible = "qcom,rpm-pmi8994-regulators";
286
287		vdd_s1-supply = <&vph_pwr>;
288		vdd_bst_byp-supply = <&vph_pwr>;
289
290		pmi8994_s1: s1 {};
291
292		/* S2 & S3 - VDD_GFX */
293
294		pmi8994_bby: boost-bypass {};
295	};
296};
297
298&sdhc1 {
299	status = "okay";
300
301	mmc-hs400-1_8v;
302};
303