xref: /linux/arch/arm64/boot/dts/qcom/sa8540p-ride.dts (revision 9f2c9170934eace462499ba0bfe042cc72900173)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Linaro Limited
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11
12#include "sa8540p.dtsi"
13#include "pm8450a.dtsi"
14
15/ {
16	model = "Qualcomm SA8540P Ride";
17	compatible = "qcom,sa8540p-ride", "qcom,sa8540p";
18
19	aliases {
20		serial0 = &qup2_uart17;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26};
27
28&apps_rsc {
29	regulators-0 {
30		compatible = "qcom,pm8150-rpmh-regulators";
31		qcom,pmic-id = "a";
32
33		vreg_l3a: ldo3 {
34			regulator-name = "vreg_l3a";
35			regulator-min-microvolt = <1200000>;
36			regulator-max-microvolt = <1208000>;
37			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
38		};
39
40		vreg_l5a: ldo5 {
41			regulator-name = "vreg_l5a";
42			regulator-min-microvolt = <912000>;
43			regulator-max-microvolt = <912000>;
44			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
45		};
46
47		vreg_l7a: ldo7 {
48			regulator-name = "vreg_l7a";
49			regulator-min-microvolt = <1800000>;
50			regulator-max-microvolt = <1800000>;
51			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
52		};
53
54		vreg_l11a: ldo11 {
55			regulator-name = "vreg_l11a";
56			regulator-min-microvolt = <880000>;
57			regulator-max-microvolt = <880000>;
58			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
59		};
60
61		vreg_l13a: ldo13 {
62			regulator-name = "vreg_l13a";
63			regulator-min-microvolt = <3072000>;
64			regulator-max-microvolt = <3072000>;
65			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
66		};
67	};
68
69	regulators-1 {
70		compatible = "qcom,pm8150-rpmh-regulators";
71		qcom,pmic-id = "c";
72
73		vreg_l1c: ldo1 {
74			regulator-name = "vreg_l1c";
75			regulator-min-microvolt = <912000>;
76			regulator-max-microvolt = <912000>;
77			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
78		};
79
80		vreg_l2c: ldo2 {
81			regulator-name = "vreg_l2c";
82			regulator-min-microvolt = <3072000>;
83			regulator-max-microvolt = <3072000>;
84			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
85		};
86
87		vreg_l4c: ldo4 {
88			regulator-name = "vreg_l4c";
89			regulator-min-microvolt = <1200000>;
90			regulator-max-microvolt = <1208000>;
91			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
92		};
93
94		vreg_l6c: ldo6 {
95			regulator-name = "vreg_l6c";
96			regulator-min-microvolt = <1200000>;
97			regulator-max-microvolt = <1200000>;
98			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
99			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
100						   RPMH_REGULATOR_MODE_HPM>;
101			regulator-allow-set-load;
102		};
103
104		vreg_l7c: ldo7 {
105			regulator-name = "vreg_l7c";
106			regulator-min-microvolt = <1800000>;
107			regulator-max-microvolt = <1800000>;
108			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109		};
110
111		vreg_l17c: ldo17 {
112			regulator-name = "vreg_l17c";
113			regulator-min-microvolt = <2504000>;
114			regulator-max-microvolt = <2504000>;
115			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
116			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
117						   RPMH_REGULATOR_MODE_HPM>;
118			regulator-allow-set-load;
119		};
120	};
121
122	regulators-2 {
123		compatible = "qcom,pm8150-rpmh-regulators";
124		qcom,pmic-id = "g";
125
126		vreg_l3g: ldo3 {
127			regulator-name = "vreg_l3g";
128			regulator-min-microvolt = <1200000>;
129			regulator-max-microvolt = <1200000>;
130			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
131		};
132
133		vreg_l7g: ldo7 {
134			regulator-name = "vreg_l7g";
135			regulator-min-microvolt = <1800000>;
136			regulator-max-microvolt = <1800000>;
137			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
138		};
139
140		vreg_l8g: ldo8 {
141			regulator-name = "vreg_l8g";
142			regulator-min-microvolt = <880000>;
143			regulator-max-microvolt = <880000>;
144			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
145		};
146	};
147};
148
149&pcie3a {
150	ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>,
151		 <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x20000000>,
152		 <0x03000000 0x6 0x00000000 0x6 0x00000000 0x2 0x00000000>;
153
154	perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
155	wake-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
156
157	pinctrl-names = "default";
158	pinctrl-0 = <&pcie3a_default>;
159
160	status = "okay";
161};
162
163&pcie3a_phy {
164	vdda-phy-supply = <&vreg_l11a>;
165	vdda-pll-supply = <&vreg_l3a>;
166
167	status = "okay";
168};
169
170&qup2 {
171	status = "okay";
172};
173
174&qup2_uart17 {
175	compatible = "qcom,geni-debug-uart";
176	status = "okay";
177};
178
179&remoteproc_nsp0 {
180	firmware-name = "qcom/sa8540p/cdsp.mbn";
181	status = "okay";
182};
183
184&remoteproc_nsp1 {
185	firmware-name = "qcom/sa8540p/cdsp1.mbn";
186	status = "okay";
187};
188
189&tlmm {
190	pcie3a_default: pcie3a-default-state {
191		perst-pins {
192			pins = "gpio151";
193			function = "gpio";
194			drive-strength = <2>;
195			bias-pull-down;
196		};
197
198		clkreq-pins {
199			pins = "gpio150";
200			function = "pcie3a_clkreq";
201			drive-strength = <2>;
202			bias-pull-up;
203		};
204
205		wake-pins {
206			pins = "gpio56";
207			function = "gpio";
208			drive-strength = <2>;
209			bias-pull-up;
210		};
211	};
212};
213
214&ufs_mem_hc {
215	reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
216
217	vcc-supply = <&vreg_l17c>;
218	vccq-supply = <&vreg_l6c>;
219
220	status = "okay";
221};
222
223&ufs_mem_phy {
224	vdda-phy-supply = <&vreg_l8g>;
225	vdda-pll-supply = <&vreg_l3g>;
226
227	status = "okay";
228};
229
230&usb_0 {
231	status = "okay";
232};
233
234&usb_0_dwc3 {
235	dr_mode = "peripheral";
236};
237
238&usb_0_hsphy {
239	vdda-pll-supply = <&vreg_l5a>;
240	vdda18-supply = <&vreg_l7a>;
241	vdda33-supply = <&vreg_l13a>;
242
243	status = "okay";
244};
245
246&usb_0_qmpphy {
247	vdda-phy-supply = <&vreg_l3a>;
248	vdda-pll-supply = <&vreg_l5a>;
249
250	status = "okay";
251};
252
253&usb_2_hsphy0 {
254	vdda-pll-supply = <&vreg_l5a>;
255	vdda18-supply = <&vreg_l7g>;
256	vdda33-supply = <&vreg_l13a>;
257
258	status = "okay";
259};
260
261&usb_2_qmpphy0 {
262	vdda-phy-supply = <&vreg_l3a>;
263	vdda-pll-supply = <&vreg_l5a>;
264
265	status = "okay";
266};
267
268&xo_board_clk {
269	clock-frequency = <38400000>;
270};
271