treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / boot / dts / qcom / msm8998-clamshell.dtsi
blob6138b58db6d2ccf3d67b337bc01427ea29ecf8e2
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2019, Jeffrey Hugo. All rights reserved. */
4 /*
5  * Common include for MSM8998 clamshell devices, ie the Lenovo Miix 630,
6  * Asus NovaGo TP370QL, and HP Envy x2.  All three devices are basically the
7  * same, with differences in peripherals.
8  */
10 #include "msm8998.dtsi"
11 #include "pm8998.dtsi"
12 #include "pm8005.dtsi"
14 / {
15         chosen {
16         };
18         vph_pwr: vph-pwr-regulator {
19                 compatible = "regulator-fixed";
20                 regulator-name = "vph_pwr";
21                 regulator-always-on;
22                 regulator-boot-on;
23         };
26 &blsp1_uart3 {
27         status = "okay";
29         bluetooth {
30                 compatible = "qcom,wcn3990-bt";
32                 vddio-supply = <&vreg_s4a_1p8>;
33                 vddxo-supply = <&vreg_l7a_1p8>;
34                 vddrf-supply = <&vreg_l17a_1p3>;
35                 vddch0-supply = <&vreg_l25a_3p3>;
36                 max-speed = <3200000>;
37         };
41  * The laptop FW does not appear to support the retention state as it is
42  * not advertised as enabled in ACPI, and enabling it in DT can cause boot
43  * hangs.
44  */
45 &CPU0 {
46         cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
49 &CPU1 {
50         cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
53 &CPU2 {
54         cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
57 &CPU3 {
58         cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
61 &CPU4 {
62         cpu-idle-states = <&BIG_CPU_SLEEP_1>;
65 &CPU5 {
66         cpu-idle-states = <&BIG_CPU_SLEEP_1>;
69 &CPU6 {
70         cpu-idle-states = <&BIG_CPU_SLEEP_1>;
73 &CPU7 {
74         cpu-idle-states = <&BIG_CPU_SLEEP_1>;
77 &qusb2phy {
78         status = "okay";
80         vdda-pll-supply = <&vreg_l12a_1p8>;
81         vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
84 &rpm_requests {
85         pm8998-regulators {
86                 compatible = "qcom,rpm-pm8998-regulators";
88                 vdd_s1-supply = <&vph_pwr>;
89                 vdd_s2-supply = <&vph_pwr>;
90                 vdd_s3-supply = <&vph_pwr>;
91                 vdd_s4-supply = <&vph_pwr>;
92                 vdd_s5-supply = <&vph_pwr>;
93                 vdd_s6-supply = <&vph_pwr>;
94                 vdd_s7-supply = <&vph_pwr>;
95                 vdd_s8-supply = <&vph_pwr>;
96                 vdd_s9-supply = <&vph_pwr>;
97                 vdd_s10-supply = <&vph_pwr>;
98                 vdd_s11-supply = <&vph_pwr>;
99                 vdd_s12-supply = <&vph_pwr>;
100                 vdd_s13-supply = <&vph_pwr>;
101                 vdd_l1_l27-supply = <&vreg_s7a_1p025>;
102                 vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
103                 vdd_l3_l11-supply = <&vreg_s7a_1p025>;
104                 vdd_l4_l5-supply = <&vreg_s7a_1p025>;
105                 vdd_l6-supply = <&vreg_s5a_2p04>;
106                 vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
107                 vdd_l9-supply = <&vph_pwr>;
108                 vdd_l10_l23_l25-supply = <&vph_pwr>;
109                 vdd_l13_l19_l21-supply = <&vph_pwr>;
110                 vdd_l16_l28-supply = <&vph_pwr>;
111                 vdd_l18_l22-supply = <&vph_pwr>;
112                 vdd_l20_l24-supply = <&vph_pwr>;
113                 vdd_l26-supply = <&vreg_s3a_1p35>;
114                 vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
116                 vreg_s3a_1p35: s3 {
117                         regulator-min-microvolt = <1352000>;
118                         regulator-max-microvolt = <1352000>;
119                 };
120                 vreg_s4a_1p8: s4 {
121                         regulator-min-microvolt = <1800000>;
122                         regulator-max-microvolt = <1800000>;
123                         regulator-allow-set-load;
124                 };
125                 vreg_s5a_2p04: s5 {
126                         regulator-min-microvolt = <1904000>;
127                         regulator-max-microvolt = <2040000>;
128                 };
129                 vreg_s7a_1p025: s7 {
130                         regulator-min-microvolt = <900000>;
131                         regulator-max-microvolt = <1028000>;
132                 };
133                 vreg_l1a_0p875: l1 {
134                         regulator-min-microvolt = <880000>;
135                         regulator-max-microvolt = <880000>;
136                         regulator-allow-set-load;
137                 };
138                 vreg_l2a_1p2: l2 {
139                         regulator-min-microvolt = <1200000>;
140                         regulator-max-microvolt = <1200000>;
141                         regulator-allow-set-load;
142                 };
143                 vreg_l3a_1p0: l3 {
144                         regulator-min-microvolt = <1000000>;
145                         regulator-max-microvolt = <1000000>;
146                 };
147                 vreg_l5a_0p8: l5 {
148                         regulator-min-microvolt = <800000>;
149                         regulator-max-microvolt = <800000>;
150                 };
151                 vreg_l6a_1p8: l6 {
152                         regulator-min-microvolt = <1808000>;
153                         regulator-max-microvolt = <1808000>;
154                 };
155                 vreg_l7a_1p8: l7 {
156                         regulator-min-microvolt = <1800000>;
157                         regulator-max-microvolt = <1800000>;
158                         regulator-allow-set-load;
159                 };
160                 vreg_l8a_1p2: l8 {
161                         regulator-min-microvolt = <1200000>;
162                         regulator-max-microvolt = <1200000>;
163                 };
164                 vreg_l9a_1p8: l9 {
165                         regulator-min-microvolt = <1808000>;
166                         regulator-max-microvolt = <2960000>;
167                 };
168                 vreg_l10a_1p8: l10 {
169                         regulator-min-microvolt = <1808000>;
170                         regulator-max-microvolt = <2960000>;
171                 };
172                 vreg_l11a_1p0: l11 {
173                         regulator-min-microvolt = <1000000>;
174                         regulator-max-microvolt = <1000000>;
175                 };
176                 vreg_l12a_1p8: l12 {
177                         regulator-min-microvolt = <1800000>;
178                         regulator-max-microvolt = <1800000>;
179                 };
180                 vreg_l13a_2p95: l13 {
181                         regulator-min-microvolt = <1808000>;
182                         regulator-max-microvolt = <2960000>;
183                 };
184                 vreg_l14a_1p88: l14 {
185                         regulator-min-microvolt = <1880000>;
186                         regulator-max-microvolt = <1880000>;
187                 };
188                 vreg_15a_1p8: l15 {
189                         regulator-min-microvolt = <1800000>;
190                         regulator-max-microvolt = <1800000>;
191                 };
192                 vreg_l16a_2p7: l16 {
193                         regulator-min-microvolt = <2704000>;
194                         regulator-max-microvolt = <2704000>;
195                 };
196                 vreg_l17a_1p3: l17 {
197                         regulator-min-microvolt = <1304000>;
198                         regulator-max-microvolt = <1304000>;
199                         regulator-allow-set-load;
200                 };
201                 vreg_l18a_2p7: l18 {
202                         regulator-min-microvolt = <2704000>;
203                         regulator-max-microvolt = <2704000>;
204                 };
205                 vreg_l19a_3p0: l19 {
206                         regulator-min-microvolt = <3008000>;
207                         regulator-max-microvolt = <3008000>;
208                 };
209                 vreg_l20a_2p95: l20 {
210                         regulator-min-microvolt = <2960000>;
211                         regulator-max-microvolt = <2960000>;
212                         regulator-allow-set-load;
213                 };
214                 vreg_l21a_2p95: l21 {
215                         regulator-min-microvolt = <2960000>;
216                         regulator-max-microvolt = <2960000>;
217                         regulator-allow-set-load;
218                         regulator-system-load = <800000>;
219                 };
220                 vreg_l22a_2p85: l22 {
221                         regulator-min-microvolt = <2864000>;
222                         regulator-max-microvolt = <2864000>;
223                 };
224                 vreg_l23a_3p3: l23 {
225                         regulator-min-microvolt = <3312000>;
226                         regulator-max-microvolt = <3312000>;
227                 };
228                 vreg_l24a_3p075: l24 {
229                         regulator-min-microvolt = <3088000>;
230                         regulator-max-microvolt = <3088000>;
231                 };
232                 vreg_l25a_3p3: l25 {
233                         regulator-min-microvolt = <3104000>;
234                         regulator-max-microvolt = <3312000>;
235                         regulator-allow-set-load;
236                 };
237                 vreg_l26a_1p2: l26 {
238                         regulator-min-microvolt = <1200000>;
239                         regulator-max-microvolt = <1200000>;
240                 };
241                 vreg_l28_3p0: l28 {
242                         regulator-min-microvolt = <3008000>;
243                         regulator-max-microvolt = <3008000>;
244                 };
246                 vreg_lvs1a_1p8: lvs1 {
247                         regulator-min-microvolt = <1800000>;
248                         regulator-max-microvolt = <1800000>;
249                 };
251                 vreg_lvs2a_1p8: lvs2 {
252                         regulator-min-microvolt = <1800000>;
253                         regulator-max-microvolt = <1800000>;
254                 };
256         };
259 &tlmm {
260         gpio-reserved-ranges = <0 4>, <81 4>;
262         touchpad: touchpad {
263                 config {
264                         pins = "gpio123";
265                         bias-pull-up;           /* pull up */
266                 };
267         };
270 &sdhc2 {
271         status = "okay";
273         vmmc-supply = <&vreg_l21a_2p95>;
274         vqmmc-supply = <&vreg_l13a_2p95>;
276         pinctrl-names = "default", "sleep";
277         pinctrl-0 = <&sdc2_clk_on  &sdc2_cmd_on  &sdc2_data_on  &sdc2_cd_on>;
278         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
281 &usb3 {
282         status = "okay";
285 &usb3_dwc3 {
286         dr_mode = "host"; /* Force to host until we have Type-C hooked up */
289 &usb3phy {
290         status = "okay";
292         vdda-phy-supply = <&vreg_l1a_0p875>;
293         vdda-pll-supply = <&vreg_l2a_1p2>;