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			   <141>, /* GCC_WCSS_Q6_AHB_CLK */
66			   <142>; /* GCC_WCSS_Q6_AXIM_CLK */
67};
68
69&pms405_spmi_regulators {
70	vdd_s3-supply = <&vph_pwr>;
71
72	pms405_s3: s3 {
73		regulator-always-on;
74		regulator-boot-on;
75		regulator-name = "vdd_apc";
76		regulator-initial-mode = <1>;
77		regulator-min-microvolt = <1048000>;
78		regulator-max-microvolt = <1384000>;
79	};
80};
81
82&pcie {
83	status = "ok";
84
85	perst-gpio = <&tlmm 43 GPIO_ACTIVE_LOW>;
86
87	pinctrl-names = "default";
88	pinctrl-0 = <&perst_state>;
89};
90
91&pcie_phy {
92	status = "ok";
93
94	vdda-vp-supply = <&vreg_l3_1p05>;
95	vdda-vph-supply = <&vreg_l5_1p8>;
96};
97
98&remoteproc_adsp {
99	status = "ok";
100};
101
102&remoteproc_cdsp {
103	status = "ok";
104};
105
106&remoteproc_wcss {
107	status = "ok";
108};
109
110&rpm_requests {
111	pms405-regulators {
112		compatible = "qcom,rpm-pms405-regulators";
113
114		vdd_s1-supply = <&vph_pwr>;
115		vdd_s2-supply = <&vph_pwr>;
116		vdd_s3-supply = <&vph_pwr>;
117		vdd_s4-supply = <&vph_pwr>;
118		vdd_s5-supply = <&vph_pwr>;
119		vdd_l1_l2-supply = <&vreg_s5_1p35>;
120		vdd_l3_l8-supply = <&vreg_s5_1p35>;
121		vdd_l4-supply = <&vreg_s5_1p35>;
122		vdd_l5_l6-supply = <&vreg_s4_1p8>;
123		vdd_l7-supply = <&vph_pwr>;
124		vdd_l9-supply = <&vreg_s5_1p35>;
125		vdd_l10_l11_l12_l13-supply = <&vph_pwr>;
126
127		vreg_s4_1p8: s4 {
128			regulator-min-microvolt = <1728000>;
129			regulator-max-microvolt = <1920000>;
130		};
131
132		vreg_s5_1p35: s5 {
133			regulator-min-microvolt = <1352000>;
134			regulator-max-microvolt = <1352000>;
135		};
136
137		vreg_l1_1p3: l1 {
138			regulator-min-microvolt = <1240000>;
139			regulator-max-microvolt = <1352000>;
140		};
141
142		vreg_l2_1p275: l2 {
143			regulator-min-microvolt = <1048000>;
144			regulator-max-microvolt = <1280000>;
145		};
146
147		vreg_l3_1p05: l3 {
148			regulator-min-microvolt = <1048000>;
149			regulator-max-microvolt = <1160000>;
150		};
151
152		vreg_l4_1p2: l4 {
153			regulator-min-microvolt = <1144000>;
154			regulator-max-microvolt = <1256000>;
155		};
156
157		vreg_l5_1p8: l5 {
158			regulator-min-microvolt = <1800000>;
159			regulator-max-microvolt = <1800000>;
160		};
161
162		vreg_l6_1p8: l6 {
163			regulator-min-microvolt = <1800000>;
164			regulator-max-microvolt = <1800000>;
165			regulator-always-on;
166		};
167
168		vreg_l7_1p8: l7 {
169			regulator-min-microvolt = <1616000>;
170			regulator-max-microvolt = <3000000>;
171		};
172
173		vreg_l8_1p2: l8 {
174			regulator-min-microvolt = <1136000>;
175			regulator-max-microvolt = <1352000>;
176		};
177
178		vreg_l10_3p3: l10 {
179			regulator-min-microvolt = <2936000>;
180			regulator-max-microvolt = <3088000>;
181		};
182
183		vreg_l11_sdc2: l11 {
184			regulator-min-microvolt = <2696000>;
185			regulator-max-microvolt = <3304000>;
186		};
187
188		vreg_l12_3p3: l12 {
189			regulator-min-microvolt = <2968000>;
190			regulator-max-microvolt = <3300000>;
191		};
192
193		vreg_l13_3p3: l13 {
194			regulator-min-microvolt = <3000000>;
195			regulator-max-microvolt = <3300000>;
196		};
197	};
198};
199
200&sdcc1 {
201	status = "ok";
202
203	mmc-ddr-1_8v;
204	mmc-hs400-1_8v;
205	bus-width = <8>;
206	non-removable;
207
208	pinctrl-names = "default", "sleep";
209	pinctrl-0 = <&sdc1_on>;
210	pinctrl-1 = <&sdc1_off>;
211};
212
213&tlmm {
214	perst_state: perst {
215		pins = "gpio43";
216		function = "gpio";
217
218		drive-strength = <2>;
219		bias-disable;
220		output-low;
221	};
222
223	sdc1_on: sdc1-on {
224		clk {
225			pins = "sdc1_clk";
226			bias-disable;
227			drive-strength = <16>;
228		};
229
230		cmd {
231			pins = "sdc1_cmd";
232			bias-pull-up;
233			drive-strength = <10>;
234		};
235
236		data {
237			pins = "sdc1_data";
238			bias-pull-up;
239			drive-strength = <10>;
240		};
241
242		rclk {
243			pins = "sdc1_rclk";
244			bias-pull-down;
245		};
246	};
247
248	sdc1_off: sdc1-off {
249		clk {
250			pins = "sdc1_clk";
251			bias-disable;
252			drive-strength = <2>;
253		};
254
255		cmd {
256			pins = "sdc1_cmd";
257			bias-pull-up;
258			drive-strength = <2>;
259		};
260
261		data {
262			pins = "sdc1_data";
263			bias-pull-up;
264			drive-strength = <2>;
265		};
266
267		rclk {
268			pins = "sdc1_rclk";
269			bias-pull-down;
270		};
271	};
272};
273
274&wifi {
275	status = "okay";
276	vdd-0.8-cx-mx-supply = <&vreg_l2_1p275>;
277	vdd-1.8-xo-supply = <&vreg_l5_1p8>;
278	vdd-1.3-rfa-supply = <&vreg_l1_1p3>;
279};
280
281/* PINCTRL - additions to nodes defined in qcs404.dtsi */
282
283&blsp1_uart2_default {
284	rx {
285		drive-strength = <2>;
286		bias-disable;
287	};
288
289	tx {
290		drive-strength = <2>;
291		bias-disable;
292	};
293};
294
295&blsp1_uart3_default {
296	cts {
297		pins = "gpio84";
298		bias-disable;
299	};
300
301	rts-tx {
302		pins = "gpio85", "gpio82";
303		drive-strength = <2>;
304		bias-disable;
305	};
306
307	rx {
308		pins = "gpio83";
309		bias-pull-up;
310	};
311};
312