1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2020-2023, Linaro Limited
9 #include <dt-bindings/firmware/qcom,scm.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/gpio-keys.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
14 #include "sc8180x.dtsi"
15 #include "sc8180x-pmics.dtsi"
18 model = "Lenovo Flex 5G";
19 compatible = "lenovo,flex-5g", "qcom,sc8180x";
25 backlight: backlight {
26 compatible = "pwm-backlight";
27 pwms = <&pmc8180c_lpg 4 1000000>;
28 enable-gpios = <&pmc8180c_gpios 8 GPIO_ACTIVE_HIGH>;
30 pinctrl-0 = <&bl_pwm_default>;
31 pinctrl-names = "default";
35 compatible = "gpio-keys";
37 pinctrl-0 = <&hall_int_active_state>;
38 pinctrl-names = "default";
41 gpios = <&tlmm 121 GPIO_ACTIVE_LOW>;
42 linux,input-type = <EV_SW>;
43 linux,code = <SW_LID>;
45 wakeup-event-action = <EV_ACT_DEASSERTED>;
50 compatible = "qcom,sc8180x-pmic-glink", "qcom,pmic-glink";
56 compatible = "usb-c-connector";
68 pmic_glink_con0_hs: endpoint {
69 remote-endpoint = <&usb_prim_role_switch>;
76 pmic_glink_con0_ss: endpoint {
77 remote-endpoint = <&usb_prim_qmpphy_out>;
84 pmic_glink_con0_sbu: endpoint {
85 remote-endpoint = <&usbprim_sbu_mux>;
92 compatible = "usb-c-connector";
103 pmic_glink_con1_hs: endpoint {
104 remote-endpoint = <&usb_sec_role_switch>;
111 pmic_glink_con1_ss: endpoint {
112 remote-endpoint = <&usb_sec_qmpphy_out>;
119 pmic_glink_con1_sbu: endpoint {
120 remote-endpoint = <&usbsec_sbu_mux>;
128 rmtfs_mem: rmtfs-region@85500000 {
129 compatible = "qcom,rmtfs-mem";
130 reg = <0x0 0x85500000 0x0 0x200000>;
133 qcom,client-id = <1>;
134 qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
137 wlan_mem: wlan-region@8bc00000 {
138 reg = <0x0 0x8bc00000 0x0 0x180000>;
142 mpss_mem: mpss-region@8d800000 {
143 reg = <0x0 0x8d800000 0x0 0x3000000>;
147 adsp_mem: adsp-region@90800000 {
148 reg = <0x0 0x90800000 0x0 0x1c00000>;
152 gpu_mem: gpu-region@98715000 {
153 reg = <0x0 0x98715000 0x0 0x2000>;
157 cdsp_mem: cdsp-region@98900000 {
158 reg = <0x0 0x98900000 0x0 0x1400000>;
163 vph_pwr: vph-pwr-regulator {
164 compatible = "regulator-fixed";
165 regulator-name = "vph_pwr";
166 regulator-min-microvolt = <3700000>;
167 regulator-max-microvolt = <3700000>;
170 vreg_s4a_1p8: pm8150-s4-regulator {
171 compatible = "regulator-fixed";
172 regulator-name = "vreg_s4a_1p8";
174 regulator-min-microvolt = <1800000>;
175 regulator-max-microvolt = <1800000>;
180 vin-supply = <&vph_pwr>;
184 compatible = "pericom,pi3usb102", "gpio-sbu-mux";
186 enable-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
187 select-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
189 pinctrl-names = "default";
190 pinctrl-0 = <&usbprim_sbu_default>;
196 usbprim_sbu_mux: endpoint {
197 remote-endpoint = <&pmic_glink_con0_sbu>;
203 compatible = "pericom,pi3usb102", "gpio-sbu-mux";
205 enable-gpios = <&tlmm 188 GPIO_ACTIVE_LOW>;
206 select-gpios = <&tlmm 187 GPIO_ACTIVE_HIGH>;
208 pinctrl-names = "default";
209 pinctrl-0 = <&usbsec_sbu_default>;
215 usbsec_sbu_mux: endpoint {
216 remote-endpoint = <&pmic_glink_con1_sbu>;
224 compatible = "qcom,pmc8180-rpmh-regulators";
227 vdd-s5-supply = <&vph_pwr>;
228 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>;
230 vreg_s5a_2p0: smps5 {
231 regulator-min-microvolt = <2040000>;
232 regulator-max-microvolt = <2100000>;
236 regulator-min-microvolt = <1800000>;
237 regulator-max-microvolt = <1800000>;
238 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
242 regulator-min-microvolt = <1296000>;
243 regulator-max-microvolt = <1304000>;
244 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
247 vreg_l12a_1p8: ldo12 {
248 regulator-min-microvolt = <1800000>;
249 regulator-max-microvolt = <1800000>;
250 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
255 compatible = "qcom,pmc8180c-rpmh-regulators";
258 vdd-s6-supply = <&vph_pwr>;
259 vdd-l2-l3-supply = <&vreg_s6c_1p35>;
260 vdd-bob-supply = <&vph_pwr>;
262 vreg_s6c_1p35: smps6 {
263 regulator-min-microvolt = <1350000>;
264 regulator-max-microvolt = <1372000>;
265 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
269 regulator-min-microvolt = <1200000>;
270 regulator-max-microvolt = <1200000>;
271 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
274 vreg_l10c_3p3: ldo10 {
275 regulator-min-microvolt = <3000000>;
276 regulator-max-microvolt = <3312000>;
277 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
280 vreg_l11c_3p3: ldo11 {
281 regulator-min-microvolt = <3296000>;
282 regulator-max-microvolt = <3304000>;
283 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
287 regulator-min-microvolt = <3296000>;
288 regulator-max-microvolt = <3350000>;
289 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
294 compatible = "qcom,pmc8180-rpmh-regulators";
297 vdd-s4-supply = <&vph_pwr>;
298 vdd-s5-supply = <&vph_pwr>;
299 vdd-l2-l10-supply = <&vreg_bob>;
300 vdd-l3-l4-l5-l18-supply = <&vreg_s4e_0p98>;
301 vdd-l7-l12-l14-l15-supply = <&vreg_s5e_2p05>;
302 vdd-l13-l16-l17-supply = <&vreg_bob>;
304 vreg_s4e_0p98: smps4 {
305 regulator-min-microvolt = <992000>;
306 regulator-max-microvolt = <992000>;
307 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
310 vreg_s5e_2p05: smps5 {
311 regulator-min-microvolt = <2040000>;
312 regulator-max-microvolt = <2040000>;
313 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
316 vreg_l1e_0p75: ldo1 {
317 regulator-min-microvolt = <752000>;
318 regulator-max-microvolt = <752000>;
319 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
322 vreg_l5e_0p88: ldo5 {
323 regulator-min-microvolt = <880000>;
324 regulator-max-microvolt = <880000>;
325 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
329 regulator-min-microvolt = <1800000>;
330 regulator-max-microvolt = <1800000>;
331 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
334 vreg_l10e_2p9: ldo10 {
335 regulator-min-microvolt = <2904000>;
336 regulator-max-microvolt = <2904000>;
337 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
340 vreg_l16e_3p0: ldo16 {
341 regulator-min-microvolt = <3072000>;
342 regulator-max-microvolt = <3072000>;
343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
352 memory-region = <&gpu_mem>;
353 firmware-name = "qcom/sc8180x/qcdxkmsuc8180.mbn";
358 clock-frequency = <100000>;
360 pinctrl-0 = <&i2c1_active>, <&i2c1_hid_active>;
361 pinctrl-names = "default";
366 compatible = "hid-over-i2c";
368 hid-descr-addr = <0x1>;
370 interrupts-extended = <&tlmm 122 IRQ_TYPE_LEVEL_LOW>;
375 clock-frequency = <100000>;
377 pinctrl-0 = <&i2c7_active>, <&i2c7_hid_active>;
378 pinctrl-names = "default";
383 compatible = "hid-over-i2c";
385 hid-descr-addr = <0x20>;
387 interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_LOW>;
391 compatible = "hid-over-i2c";
393 hid-descr-addr = <0x20>;
395 interrupts-extended = <&tlmm 24 IRQ_TYPE_LEVEL_LOW>;
409 remote-endpoint = <&usb_prim_qmpphy_dp_in>;
418 remote-endpoint = <&usb_sec_qmpphy_dp_in>;
422 data-lanes = <0 1 2 3>;
424 pinctrl-0 = <&edp_hpd_active>;
425 pinctrl-names = "default";
431 compatible = "edp-panel";
434 backlight = <&backlight>;
437 auo_b140han06_in: endpoint {
438 remote-endpoint = <&mdss_edp_out>;
447 mdss_edp_out: endpoint {
448 remote-endpoint = <&auo_b140han06_in>;
455 perst-gpio = <&tlmm 178 GPIO_ACTIVE_LOW>;
456 wake-gpio = <&tlmm 180 GPIO_ACTIVE_HIGH>;
457 pinctrl-0 = <&pcie3_default_state>;
458 pinctrl-names = "default";
464 vdda-phy-supply = <&vreg_l5e_0p88>;
465 vdda-pll-supply = <&vreg_l3c_1p2>;
487 memory-region = <&adsp_mem>;
488 firmware-name = "qcom/sc8180x/LENOVO/82AK/qcadsp8180.mbn";
494 memory-region = <&cdsp_mem>;
495 firmware-name = "qcom/sc8180x/LENOVO/82AK/qccdsp8180.mbn";
501 memory-region = <&mpss_mem>;
502 firmware-name = "qcom/sc8180x/LENOVO/82AK/qcmpss8180_nm.mbn";
508 pinctrl-0 = <&uart13_state>;
509 pinctrl-names = "default";
514 compatible = "qcom,wcn3998-bt";
516 vddio-supply = <&vreg_s4a_1p8>;
517 vddxo-supply = <&vreg_l7a_1p8>;
518 vddrf-supply = <&vreg_l9a_1p3>;
519 vddch0-supply = <&vreg_l11c_3p3>;
520 max-speed = <3200000>;
525 reset-gpios = <&tlmm 190 GPIO_ACTIVE_LOW>;
527 vcc-supply = <&vreg_l10e_2p9>;
528 vcc-max-microamp = <155000>;
530 vccq2-supply = <&vreg_l7e_1p8>;
531 vccq2-max-microamp = <425000>;
537 vdda-phy-supply = <&vreg_l5e_0p88>;
538 vdda-pll-supply = <&vreg_l3c_1p2>;
544 vdda-pll-supply = <&vreg_l5e_0p88>;
545 vdda18-supply = <&vreg_l12a_1p8>;
546 vdda33-supply = <&vreg_l16e_3p0>;
552 vdda-phy-supply = <&vreg_l3c_1p2>;
553 vdda-pll-supply = <&vreg_l5e_0p88>;
568 &usb_prim_qmpphy_dp_in {
569 remote-endpoint = <&mdss_dp0_out>;
572 &usb_prim_qmpphy_out {
573 remote-endpoint = <&pmic_glink_con0_ss>;
576 &usb_prim_role_switch {
577 remote-endpoint = <&pmic_glink_con0_hs>;
581 vdda-pll-supply = <&vreg_l5e_0p88>;
582 vdda18-supply = <&vreg_l12a_1p8>;
583 vdda33-supply = <&vreg_l16e_3p0>;
589 vdda-phy-supply = <&vreg_l3c_1p2>;
590 vdda-pll-supply = <&vreg_l5e_0p88>;
597 &usb_sec_qmpphy_dp_in {
598 remote-endpoint = <&mdss_dp1_out>;
601 &usb_sec_qmpphy_out {
602 remote-endpoint = <&pmic_glink_con1_ss>;
605 &usb_sec_role_switch {
606 remote-endpoint = <&pmic_glink_con1_hs>;
618 memory-region = <&wlan_mem>;
620 vdd-0.8-cx-mx-supply = <&vreg_l1e_0p75>;
621 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
622 vdd-1.3-rfa-supply = <&vreg_l9a_1p3>;
623 vdd-3.3-ch0-supply = <&vreg_l11c_3p3>;
624 vdd-3.3-ch1-supply = <&vreg_l10c_3p3>;
630 clock-frequency = <38400000>;
636 bl_pwm_default: bl-pwm-default-state {
650 gpio-reserved-ranges = <0 4>, <47 4>, <126 4>;
652 edp_hpd_active: epd-hpd-active-state {
654 function = "edp_hot";
657 hall_int_active_state: hall-int-active-state {
664 i2c1_active: i2c1-active-state {
665 pins = "gpio114", "gpio115";
669 drive-strength = <2>;
672 i2c1_hid_active: i2c1-hid-active-state {
677 drive-strength = <2>;
680 i2c7_active: i2c7-active-state {
681 pins = "gpio98", "gpio99";
685 drive-strength = <2>;
688 i2c7_hid_active: i2c7-hid-active-state {
689 pins = "gpio37", "gpio24";
693 drive-strength = <2>;
696 pcie3_default_state: pcie3-default-state {
707 drive-strength = <2>;
716 drive-strength = <2>;
721 usbprim_sbu_default: usbprim-sbu-state {
726 drive-strength = <16>;
734 drive-strength = <16>;
738 usbsec_sbu_default: usbsec-sbu-state {
743 drive-strength = <16>;
751 drive-strength = <16>;
755 uart13_state: uart13-state {
763 pins = "gpio44", "gpio45";
765 drive-strength = <2>;