treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / boot / dts / qcom / sdm850-lenovo-yoga-c630.dts
blob13dc619687f3a259765f662a99e6b319b3f62666
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Lenovo Yoga C630
4  *
5  * Copyright (c) 2019, Linaro Ltd.
6  */
8 /dts-v1/;
10 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11 #include "sdm845.dtsi"
12 #include "pm8998.dtsi"
14 / {
15         model = "Lenovo Yoga C630";
16         compatible = "lenovo,yoga-c630", "qcom,sdm845";
18         aliases {
19                 hsuart0 = &uart6;
20         };
23 &adsp_pas {
24         firmware-name = "qcom/LENOVO/81JL/qcadsp850.mbn";
25         status = "okay";
28 &apps_rsc {
29         pm8998-rpmh-regulators {
30                 compatible = "qcom,pm8998-rpmh-regulators";
31                 qcom,pmic-id = "a";
33                 vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
34                 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
36                 vreg_s2a_1p125: smps2 {
37                 };
39                 vreg_s3a_1p35: smps3 {
40                         regulator-min-microvolt = <1352000>;
41                         regulator-max-microvolt = <1352000>;
42                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
43                 };
45                 vreg_s4a_1p8: smps4 {
46                         regulator-min-microvolt = <1800000>;
47                         regulator-max-microvolt = <1800000>;
48                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
49                 };
51                 vreg_s5a_2p04: smps5 {
52                         regulator-min-microvolt = <2040000>;
53                         regulator-max-microvolt = <2040000>;
54                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
55                 };
57                 vreg_s7a_1p025: smps7 {
58                 };
60                 vdd_qusb_hs0:
61                 vdda_hp_pcie_core:
62                 vdda_mipi_csi0_0p9:
63                 vdda_mipi_csi1_0p9:
64                 vdda_mipi_csi2_0p9:
65                 vdda_mipi_dsi0_pll:
66                 vdda_mipi_dsi1_pll:
67                 vdda_qlink_lv:
68                 vdda_qlink_lv_ck:
69                 vdda_qrefs_0p875:
70                 vdda_pcie_core:
71                 vdda_pll_cc_ebi01:
72                 vdda_pll_cc_ebi23:
73                 vdda_sp_sensor:
74                 vdda_ufs1_core:
75                 vdda_ufs2_core:
76                 vdda_usb1_ss_core:
77                 vdda_usb2_ss_core:
78                 vreg_l1a_0p875: ldo1 {
79                         regulator-min-microvolt = <880000>;
80                         regulator-max-microvolt = <880000>;
81                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
82                 };
84                 vddpx_10:
85                 vreg_l2a_1p2: ldo2 {
86                         regulator-min-microvolt = <1200000>;
87                         regulator-max-microvolt = <1200000>;
88                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
89                         regulator-always-on;
90                 };
92                 vreg_l3a_1p0: ldo3 {
93                 };
95                 vdd_wcss_cx:
96                 vdd_wcss_mx:
97                 vdda_wcss_pll:
98                 vreg_l5a_0p8: ldo5 {
99                         regulator-min-microvolt = <800000>;
100                         regulator-max-microvolt = <800000>;
101                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
102                 };
104                 vddpx_13:
105                 vreg_l6a_1p8: ldo6 {
106                         regulator-min-microvolt = <1800000>;
107                         regulator-max-microvolt = <1800000>;
108                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109                 };
111                 vreg_l7a_1p8: ldo7 {
112                         regulator-min-microvolt = <1800000>;
113                         regulator-max-microvolt = <1800000>;
114                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
115                 };
117                 vreg_l8a_1p2: ldo8 {
118                 };
120                 vreg_l9a_1p8: ldo9 {
121                 };
123                 vreg_l10a_1p8: ldo10 {
124                 };
126                 vreg_l11a_1p0: ldo11 {
127                 };
129                 vdd_qfprom:
130                 vdd_qfprom_sp:
131                 vdda_apc1_cs_1p8:
132                 vdda_gfx_cs_1p8:
133                 vdda_qrefs_1p8:
134                 vdda_qusb_hs0_1p8:
135                 vddpx_11:
136                 vreg_l12a_1p8: ldo12 {
137                         regulator-min-microvolt = <1800000>;
138                         regulator-max-microvolt = <1800000>;
139                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
140                 };
142                 vddpx_2:
143                 vreg_l13a_2p95: ldo13 {
144                 };
146                 vreg_l14a_1p88: ldo14 {
147                         regulator-min-microvolt = <1880000>;
148                         regulator-max-microvolt = <1880000>;
149                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
150                         regulator-always-on;
151                 };
153                 vreg_l15a_1p8: ldo15 {
154                 };
156                 vreg_l16a_2p7: ldo16 {
157                 };
159                 vreg_l17a_1p3: ldo17 {
160                         regulator-min-microvolt = <1304000>;
161                         regulator-max-microvolt = <1304000>;
162                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
163                 };
165                 vreg_l18a_2p7: ldo18 {
166                 };
168                 vreg_l19a_3p0: ldo19 {
169                         regulator-min-microvolt = <3100000>;
170                         regulator-max-microvolt = <3108000>;
171                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
172                 };
174                 vreg_l20a_2p95: ldo20 {
175                         regulator-min-microvolt = <2960000>;
176                         regulator-max-microvolt = <2960000>;
177                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
178                 };
180                 vreg_l21a_2p95: ldo21 {
181                 };
183                 vreg_l22a_2p85: ldo22 {
184                 };
186                 vreg_l23a_3p3: ldo23 {
187                 };
189                 vdda_qusb_hs0_3p1:
190                 vreg_l24a_3p075: ldo24 {
191                         regulator-min-microvolt = <3075000>;
192                         regulator-max-microvolt = <3083000>;
193                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
194                 };
196                 vreg_l25a_3p3: ldo25 {
197                         regulator-min-microvolt = <3104000>;
198                         regulator-max-microvolt = <3112000>;
199                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
200                 };
202                 vdda_hp_pcie_1p2:
203                 vdda_hv_ebi0:
204                 vdda_hv_ebi1:
205                 vdda_hv_ebi2:
206                 vdda_hv_ebi3:
207                 vdda_mipi_csi_1p25:
208                 vdda_mipi_dsi0_1p2:
209                 vdda_mipi_dsi1_1p2:
210                 vdda_pcie_1p2:
211                 vdda_ufs1_1p2:
212                 vdda_ufs2_1p2:
213                 vdda_usb1_ss_1p2:
214                 vdda_usb2_ss_1p2:
215                 vreg_l26a_1p2: ldo26 {
216                         regulator-min-microvolt = <1200000>;
217                         regulator-max-microvolt = <1208000>;
218                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
219                 };
221                 vreg_l28a_3p0: ldo28 {
222                 };
224                 vreg_lvs1a_1p8: lvs1 {
225                 };
227                 vreg_lvs2a_1p8: lvs2 {
228                 };
229         };
232 &apps_smmu {
233         /* TODO: Figure out how to survive booting with this enabled */
234         status = "disabled";
237 &cdsp_pas {
238         firmware-name = "qcom/LENOVO/81JL/qccdsp850.mbn";
239         status = "okay";
242 &gcc {
243         protected-clocks = <GCC_QSPI_CORE_CLK>,
244                            <GCC_QSPI_CORE_CLK_SRC>,
245                            <GCC_QSPI_CNOC_PERIPH_AHB_CLK>;
248 &i2c1 {
249         status = "okay";
250         clock-frequency = <400000>;
253 &i2c3 {
254         status = "okay";
255         clock-frequency = <400000>;
257         hid@15 {
258                 compatible = "hid-over-i2c";
259                 reg = <0x15>;
260                 hid-descr-addr = <0x1>;
262                 interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>;
263         };
265         hid@2c {
266                 compatible = "hid-over-i2c";
267                 reg = <0x2c>;
268                 hid-descr-addr = <0x20>;
270                 interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>;
272                 pinctrl-names = "default";
273                 pinctrl-0 = <&i2c2_hid_active>;
274         };
277 &i2c5 {
278         status = "okay";
279         clock-frequency = <400000>;
281         hid@10 {
282                 compatible = "hid-over-i2c";
283                 reg = <0x10>;
284                 hid-descr-addr = <0x1>;
286                 interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
288                 pinctrl-names = "default";
289                 pinctrl-0 = <&i2c6_hid_active>;
290         };
293 &i2c11 {
294         status = "okay";
295         clock-frequency = <400000>;
297         hid@5c {
298                 compatible = "hid-over-i2c";
299                 reg = <0x5c>;
300                 hid-descr-addr = <0x1>;
302                 interrupts-extended = <&tlmm 92 IRQ_TYPE_LEVEL_LOW>;
304                 pinctrl-names = "default";
305                 pinctrl-0 = <&i2c12_hid_active>;
306         };
309 &mss_pil {
310         firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn";
313 &qup_i2c12_default {
314         drive-strength = <2>;
315         bias-disable;
318 &qup_uart6_default {
319         pinmux {
320                  pins = "gpio45", "gpio46", "gpio47", "gpio48";
321                  function = "qup6";
322         };
324         cts {
325                 pins = "gpio45";
326                 bias-pull-down;
327         };
329         rts-tx {
330                 pins = "gpio46", "gpio47";
331                 drive-strength = <2>;
332                 bias-disable;
333         };
335         rx {
336                 pins = "gpio48";
337                 bias-pull-up;
338         };
341 &qupv3_id_0 {
342         status = "okay";
345 &qupv3_id_1 {
346         status = "okay";
349 &tlmm {
350         gpio-reserved-ranges = <0 4>, <81 4>;
352         i2c2_hid_active: i2c2-hid-active {
353                 pins = <37>;
354                 function = "gpio";
356                 input-enable;
357                 bias-pull-up;
358                 drive-strength = <2>;
359         };
361         i2c6_hid_active: i2c6-hid-active {
362                 pins = <125>;
363                 function = "gpio";
365                 input-enable;
366                 bias-pull-up;
367                 drive-strength = <2>;
368         };
370         i2c12_hid_active: i2c12-hid-active {
371                 pins = <92>;
372                 function = "gpio";
374                 input-enable;
375                 bias-pull-up;
376                 drive-strength = <2>;
377         };
380 &uart6 {
381         status = "okay";
383         bluetooth {
384                 compatible = "qcom,wcn3990-bt";
386                 vddio-supply = <&vreg_s4a_1p8>;
387                 vddxo-supply = <&vreg_l7a_1p8>;
388                 vddrf-supply = <&vreg_l17a_1p3>;
389                 vddch0-supply = <&vreg_l25a_3p3>;
390                 max-speed = <3200000>;
391         };
394 &ufs_mem_hc {
395         status = "okay";
397         vcc-supply = <&vreg_l20a_2p95>;
398         vcc-max-microamp = <600000>;
401 &ufs_mem_phy {
402         status = "okay";
404         vdda-phy-supply = <&vdda_ufs1_core>;
405         vdda-pll-supply = <&vdda_ufs1_1p2>;
408 &usb_1 {
409         status = "okay";
412 &usb_1_dwc3 {
413         dr_mode = "host";
416 &usb_1_hsphy {
417         status = "okay";
419         vdd-supply = <&vdda_usb1_ss_core>;
420         vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
421         vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
423         qcom,imp-res-offset-value = <8>;
424         qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
425         qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
426         qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
429 &usb_1_qmpphy {
430         status = "okay";
432         vdda-phy-supply = <&vdda_usb1_ss_1p2>;
433         vdda-pll-supply = <&vdda_usb1_ss_core>;
436 &usb_2 {
437         status = "okay";
440 &usb_2_dwc3 {
441         dr_mode = "host";
444 &usb_2_hsphy {
445         status = "okay";
447         vdd-supply = <&vdda_usb2_ss_core>;
448         vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
449         vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
451         qcom,imp-res-offset-value = <8>;
452         qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
455 &usb_2_qmpphy {
456         status = "okay";
458         vdda-phy-supply = <&vdda_usb2_ss_1p2>;
459         vdda-pll-supply = <&vdda_usb2_ss_core>;