1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/input/input.h>
3
4#include "qcom-msm8960.dtsi"
5
6/ {
7	model = "Qualcomm MSM8960 CDP";
8	compatible = "qcom,msm8960-cdp", "qcom,msm8960";
9
10	aliases {
11		serial0 = &gsbi5_serial;
12	};
13
14	chosen {
15		stdout-path = "serial0:115200n8";
16	};
17
18	ext_l2: gpio-regulator {
19		compatible = "regulator-fixed";
20		regulator-name = "ext_l2";
21		gpio = <&msmgpio 91 0>;
22		startup-delay-us = <10000>;
23		enable-active-high;
24	};
25};
26
27&gsbi1 {
28	qcom,mode = <GSBI_PROT_SPI>;
29	pinctrl-names = "default";
30	pinctrl-0 = <&spi1_default>;
31	status = "okay";
32};
33
34&gsbi1_spi {
35	status = "okay";
36
37	ethernet@0 {
38		compatible = "micrel,ks8851";
39		reg = <0>;
40		interrupt-parent = <&msmgpio>;
41		interrupts = <90 IRQ_TYPE_LEVEL_LOW>;
42		spi-max-frequency = <5400000>;
43		vdd-supply = <&ext_l2>;
44		vdd-io-supply = <&pm8921_lvs6>;
45		reset-gpios = <&msmgpio 89 0>;
46	};
47};
48
49&gsbi5 {
50	qcom,mode = <GSBI_PROT_I2C_UART>;
51	status = "okay";
52};
53
54&gsbi5_serial {
55	status = "okay";
56};
57
58&msmgpio {
59	spi1_default: spi1-default-state {
60		 mosi-pins {
61			pins = "gpio6";
62			function = "gsbi1";
63			drive-strength = <12>;
64			bias-disable;
65		 };
66
67		 miso-pins {
68			pins = "gpio7";
69			function = "gsbi1";
70			drive-strength = <12>;
71			bias-disable;
72		 };
73
74		 cs-pins {
75			pins = "gpio8";
76			function = "gsbi1";
77			drive-strength = <12>;
78			bias-disable;
79			output-low;
80		 };
81
82		 clk-pins {
83			pins = "gpio9";
84			function = "gsbi1";
85			drive-strength = <12>;
86			bias-disable;
87		 };
88	};
89};
90
91&pmicintc {
92	keypad@148 {
93		linux,keymap = <
94			MATRIX_KEY(0, 0, KEY_VOLUMEUP)
95			MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
96			MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
97			MATRIX_KEY(0, 3, KEY_CAMERA)
98			>;
99		keypad,num-rows = <1>;
100		keypad,num-columns = <5>;
101	};
102};
103
104&rpm {
105	regulators {
106		compatible = "qcom,rpm-pm8921-regulators";
107		vin_lvs1_3_6-supply = <&pm8921_s4>;
108		vin_lvs2-supply = <&pm8921_s4>;
109		vin_lvs4_5_7-supply = <&pm8921_s4>;
110		vdd_ncp-supply = <&pm8921_l6>;
111		vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
112		vdd_l21_l23_l29-supply = <&pm8921_s8>;
113		vdd_l24-supply = <&pm8921_s1>;
114		vdd_l25-supply = <&pm8921_s1>;
115		vdd_l27-supply = <&pm8921_s7>;
116		vdd_l28-supply = <&pm8921_s7>;
117
118		/* Buck SMPS */
119		pm8921_s1: s1 {
120			regulator-always-on;
121			regulator-min-microvolt = <1225000>;
122			regulator-max-microvolt = <1225000>;
123			qcom,switch-mode-frequency = <3200000>;
124			bias-pull-down;
125		};
126
127		pm8921_s2: s2 {
128			regulator-min-microvolt = <1300000>;
129			regulator-max-microvolt = <1300000>;
130			qcom,switch-mode-frequency = <1600000>;
131			bias-pull-down;
132		};
133
134		pm8921_s3: s3 {
135			regulator-min-microvolt = <500000>;
136			regulator-max-microvolt = <1150000>;
137			qcom,switch-mode-frequency = <4800000>;
138			bias-pull-down;
139		};
140
141		pm8921_s4: s4 {
142			regulator-always-on;
143			regulator-min-microvolt = <1800000>;
144			regulator-max-microvolt = <1800000>;
145			qcom,switch-mode-frequency = <1600000>;
146			bias-pull-down;
147			qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
148		};
149
150		pm8921_s7: s7 {
151			regulator-min-microvolt = <1150000>;
152			regulator-max-microvolt = <1150000>;
153			qcom,switch-mode-frequency = <3200000>;
154			bias-pull-down;
155		};
156
157		pm8921_s8: s8 {
158			regulator-always-on;
159			regulator-min-microvolt = <2050000>;
160			regulator-max-microvolt = <2050000>;
161			qcom,switch-mode-frequency = <1600000>;
162			bias-pull-down;
163		};
164
165		/* PMOS LDO */
166		pm8921_l1: l1 {
167			regulator-always-on;
168			regulator-min-microvolt = <1050000>;
169			regulator-max-microvolt = <1050000>;
170			bias-pull-down;
171		};
172
173		pm8921_l2: l2 {
174			regulator-min-microvolt = <1200000>;
175			regulator-max-microvolt = <1200000>;
176			bias-pull-down;
177		};
178
179		pm8921_l3: l3 {
180			regulator-min-microvolt = <3075000>;
181			regulator-max-microvolt = <3075000>;
182			bias-pull-down;
183		};
184
185		pm8921_l4: l4 {
186			regulator-always-on;
187			regulator-min-microvolt = <1800000>;
188			regulator-max-microvolt = <1800000>;
189			bias-pull-down;
190		};
191
192		pm8921_l5: l5 {
193			regulator-min-microvolt = <2950000>;
194			regulator-max-microvolt = <2950000>;
195			bias-pull-down;
196		};
197
198		pm8921_l6: l6 {
199			regulator-min-microvolt = <2950000>;
200			regulator-max-microvolt = <2950000>;
201			bias-pull-down;
202		};
203
204		pm8921_l7: l7 {
205			regulator-always-on;
206			regulator-min-microvolt = <1850000>;
207			regulator-max-microvolt = <2950000>;
208			bias-pull-down;
209		};
210
211		pm8921_l8: l8 {
212			regulator-min-microvolt = <2800000>;
213			regulator-max-microvolt = <3000000>;
214			bias-pull-down;
215		};
216
217		pm8921_l9: l9 {
218			regulator-min-microvolt = <3000000>;
219			regulator-max-microvolt = <3000000>;
220			bias-pull-down;
221		};
222
223		pm8921_l10: l10 {
224			regulator-min-microvolt = <3000000>;
225			regulator-max-microvolt = <3000000>;
226			bias-pull-down;
227		};
228
229		pm8921_l11: l11 {
230			regulator-min-microvolt = <2850000>;
231			regulator-max-microvolt = <2850000>;
232			bias-pull-down;
233		};
234
235		pm8921_l12: l12 {
236			regulator-min-microvolt = <1200000>;
237			regulator-max-microvolt = <1200000>;
238			bias-pull-down;
239		};
240
241		pm8921_l14: l14 {
242			regulator-min-microvolt = <1800000>;
243			regulator-max-microvolt = <1800000>;
244			bias-pull-down;
245		};
246
247		pm8921_l15: l15 {
248			regulator-min-microvolt = <1800000>;
249			regulator-max-microvolt = <2950000>;
250			bias-pull-down;
251		};
252
253		pm8921_l16: l16 {
254			regulator-min-microvolt = <2800000>;
255			regulator-max-microvolt = <2800000>;
256			bias-pull-down;
257		};
258
259		pm8921_l17: l17 {
260			regulator-min-microvolt = <1800000>;
261			regulator-max-microvolt = <2950000>;
262			bias-pull-down;
263		};
264
265		pm8921_l18: l18 {
266			regulator-min-microvolt = <1300000>;
267			regulator-max-microvolt = <1300000>;
268			bias-pull-down;
269		};
270
271		pm8921_l21: l21 {
272			regulator-min-microvolt = <1900000>;
273			regulator-max-microvolt = <1900000>;
274			bias-pull-down;
275		};
276
277		pm8921_l22: l22 {
278			regulator-min-microvolt = <2750000>;
279			regulator-max-microvolt = <2750000>;
280			bias-pull-down;
281		};
282
283		pm8921_l23: l23 {
284			regulator-always-on;
285			regulator-min-microvolt = <1800000>;
286			regulator-max-microvolt = <1800000>;
287			bias-pull-down;
288		};
289
290		pm8921_l24: l24 {
291			regulator-min-microvolt = <750000>;
292			regulator-max-microvolt = <1150000>;
293			bias-pull-down;
294		};
295
296		pm8921_l25: l25 {
297			regulator-always-on;
298			regulator-min-microvolt = <1250000>;
299			regulator-max-microvolt = <1250000>;
300			bias-pull-down;
301		};
302
303		/* Low Voltage Switch */
304		pm8921_lvs1: lvs1 {
305			bias-pull-down;
306		};
307
308		pm8921_lvs2: lvs2 {
309			bias-pull-down;
310		};
311
312		pm8921_lvs3: lvs3 {
313			bias-pull-down;
314		};
315
316		pm8921_lvs4: lvs4 {
317			bias-pull-down;
318		};
319
320		pm8921_lvs5: lvs5 {
321			bias-pull-down;
322		};
323
324		pm8921_lvs6: lvs6 {
325			bias-pull-down;
326		};
327
328		pm8921_lvs7: lvs7 {
329			bias-pull-down;
330		};
331
332		pm8921_ncp: ncp {
333			regulator-min-microvolt = <1800000>;
334			regulator-max-microvolt = <1800000>;
335			qcom,switch-mode-frequency = <1600000>;
336		};
337	};
338};
339
340/* eMMC */
341&sdcc1 {
342	status = "okay";
343};
344
345/* External micro SD card */
346&sdcc3 {
347	status = "okay";
348};
349