1// SPDX-License-Identifier: GPL-2.0
2// Copyright (c) 2018, Linaro Limited
3
4#include <dt-bindings/gpio/gpio.h>
5#include "qcs404.dtsi"
6#include "pms405.dtsi"
7
8/ {
9	aliases {
10		serial0 = &blsp1_uart2;
11		serial1 = &blsp1_uart3;
12	};
13
14	chosen {
15		stdout-path = "serial0";
16	};
17
18	vph_pwr: vph-pwr-regulator {
19		compatible = "regulator-fixed";
20		regulator-name = "vph_pwr";
21		regulator-always-on;
22		regulator-boot-on;
23	};
24
25	vdd_ch0_3p3:
26	vdd_esmps3_3p3: vdd-esmps3-3p3-regulator {
27		compatible = "regulator-fixed";
28		regulator-name = "eSMPS3_3P3";
29
30		regulator-min-microvolt = <3300000>;
31		regulator-max-microvolt = <3300000>;
32		regulator-always-on;
33	};
34};
35
36&blsp1_uart3 {
37	status = "okay";
38
39	bluetooth {
40		compatible = "qcom,wcn3990-bt";
41		vddio-supply = <&vreg_l6_1p8>;
42		vddxo-supply = <&vreg_l5_1p8>;
43		vddrf-supply = <&vreg_l1_1p3>;
44		vddch0-supply = <&vdd_ch0_3p3>;
45
46		local-bd-address = [ 02 00 00 00 5a ad ];
47
48		max-speed = <3200000>;
49	};
50};
51
52&blsp1_dma {
53	qcom,controlled-remotely;
54};
55
56&blsp2_dma {
57	qcom,controlled-remotely;
58};
59
60&gcc {
61	protected-clocks = <GCC_BIMC_CDSP_CLK>,
62			   <GCC_CDSP_CFG_AHB_CLK>,
63			   <GCC_CDSP_BIMC_CLK_SRC>,
64			   <GCC_CDSP_TBU_CLK>;
65};
66
67&pms405_spmi_regulators {
68	vdd_s3-supply = <&vph_pwr>;
69
70	pms405_s3: s3 {
71		regulator-always-on;
72		regulator-boot-on;
73		regulator-name = "vdd_apc";
74		regulator-min-microvolt = <1048000>;
75		regulator-max-microvolt = <1384000>;
76	};
77};
78
79&pcie {
80	status = "ok";
81
82	perst-gpio = <&tlmm 43 GPIO_ACTIVE_LOW>;
83
84	pinctrl-names = "default";
85	pinctrl-0 = <&perst_state>;
86};
87
88&pcie_phy {
89	status = "ok";
90
91	vdda-vp-supply = <&vreg_l3_1p05>;
92	vdda-vph-supply = <&vreg_l5_1p8>;
93};
94
95&remoteproc_adsp {
96	status = "ok";
97};
98
99&remoteproc_cdsp {
100	status = "ok";
101};
102
103&remoteproc_wcss {
104	status = "ok";
105};
106
107&rpm_requests {
108	pms405-regulators {
109		compatible = "qcom,rpm-pms405-regulators";
110
111		vdd_s1-supply = <&vph_pwr>;
112		vdd_s2-supply = <&vph_pwr>;
113		vdd_s3-supply = <&vph_pwr>;
114		vdd_s4-supply = <&vph_pwr>;
115		vdd_s5-supply = <&vph_pwr>;
116		vdd_l1_l2-supply = <&vreg_s5_1p35>;
117		vdd_l3_l8-supply = <&vreg_s5_1p35>;
118		vdd_l4-supply = <&vreg_s5_1p35>;
119		vdd_l5_l6-supply = <&vreg_s4_1p8>;
120		vdd_l7-supply = <&vph_pwr>;
121		vdd_l9-supply = <&vreg_s5_1p35>;
122		vdd_l10_l11_l12_l13-supply = <&vph_pwr>;
123
124		vreg_s4_1p8: s4 {
125			regulator-min-microvolt = <1728000>;
126			regulator-max-microvolt = <1920000>;
127		};
128
129		vreg_s5_1p35: s5 {
130			regulator-min-microvolt = <1352000>;
131			regulator-max-microvolt = <1352000>;
132		};
133
134		vreg_l1_1p3: l1 {
135			regulator-min-microvolt = <1240000>;
136			regulator-max-microvolt = <1352000>;
137		};
138
139		vreg_l2_1p275: l2 {
140			regulator-min-microvolt = <1048000>;
141			regulator-max-microvolt = <1280000>;
142		};
143
144		vreg_l3_1p05: l3 {
145			regulator-min-microvolt = <1048000>;
146			regulator-max-microvolt = <1160000>;
147		};
148
149		vreg_l4_1p2: l4 {
150			regulator-min-microvolt = <1144000>;
151			regulator-max-microvolt = <1256000>;
152		};
153
154		vreg_l5_1p8: l5 {
155			regulator-min-microvolt = <1800000>;
156			regulator-max-microvolt = <1800000>;
157		};
158
159		vreg_l6_1p8: l6 {
160			regulator-min-microvolt = <1800000>;
161			regulator-max-microvolt = <1800000>;
162			regulator-always-on;
163		};
164
165		vreg_l7_1p8: l7 {
166			regulator-min-microvolt = <1616000>;
167			regulator-max-microvolt = <3000000>;
168		};
169
170		vreg_l8_1p2: l8 {
171			regulator-min-microvolt = <1136000>;
172			regulator-max-microvolt = <1352000>;
173		};
174
175		vreg_l10_3p3: l10 {
176			regulator-min-microvolt = <2936000>;
177			regulator-max-microvolt = <3088000>;
178		};
179
180		vreg_l11_sdc2: l11 {
181			regulator-min-microvolt = <2696000>;
182			regulator-max-microvolt = <3304000>;
183		};
184
185		vreg_l12_3p3: l12 {
186			regulator-min-microvolt = <2968000>;
187			regulator-max-microvolt = <3300000>;
188		};
189
190		vreg_l13_3p3: l13 {
191			regulator-min-microvolt = <3000000>;
192			regulator-max-microvolt = <3300000>;
193		};
194	};
195};
196
197&sdcc1 {
198	status = "ok";
199
200	mmc-ddr-1_8v;
201	mmc-hs400-1_8v;
202	bus-width = <8>;
203	non-removable;
204
205	pinctrl-names = "default", "sleep";
206	pinctrl-0 = <&sdc1_on>;
207	pinctrl-1 = <&sdc1_off>;
208};
209
210&tlmm {
211	perst_state: perst {
212		pins = "gpio43";
213		function = "gpio";
214
215		drive-strength = <2>;
216		bias-disable;
217		output-low;
218	};
219
220	sdc1_on: sdc1-on {
221		clk {
222			pins = "sdc1_clk";
223			bias-disable;
224			drive-strength = <16>;
225		};
226
227		cmd {
228			pins = "sdc1_cmd";
229			bias-pull-up;
230			drive-strength = <10>;
231		};
232
233		data {
234			pins = "sdc1_data";
235			bias-pull-up;
236			drive-strength = <10>;
237		};
238
239		rclk {
240			pins = "sdc1_rclk";
241			bias-pull-down;
242		};
243	};
244
245	sdc1_off: sdc1-off {
246		clk {
247			pins = "sdc1_clk";
248			bias-disable;
249			drive-strength = <2>;
250		};
251
252		cmd {
253			pins = "sdc1_cmd";
254			bias-pull-up;
255			drive-strength = <2>;
256		};
257
258		data {
259			pins = "sdc1_data";
260			bias-pull-up;
261			drive-strength = <2>;
262		};
263
264		rclk {
265			pins = "sdc1_rclk";
266			bias-pull-down;
267		};
268	};
269};
270
271&wifi {
272	status = "okay";
273};
274
275/* PINCTRL - additions to nodes defined in qcs404.dtsi */
276
277&blsp1_uart2_default {
278	rx {
279		drive-strength = <2>;
280		bias-disable;
281	};
282
283	tx {
284		drive-strength = <2>;
285		bias-disable;
286	};
287};
288
289&blsp1_uart3_default {
290	cts {
291		pins = "gpio84";
292		bias-disable;
293	};
294
295	rts-tx {
296		pins = "gpio85", "gpio82";
297		drive-strength = <2>;
298		bias-disable;
299	};
300
301	rx {
302		pins = "gpio83";
303		bias-pull-up;
304	};
305};
306