// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022, Linaro Limited */ /dts-v1/; #include #include #include #include #include #include #include #include "sc8280xp.dtsi" #include "sc8280xp-pmics.dtsi" / { model = "Lenovo ThinkPad X13s"; compatible = "lenovo,thinkpad-x13s", "qcom,sc8280xp"; backlight { compatible = "pwm-backlight"; pwms = <&pmc8280c_lpg 3 1000000>; enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; pinctrl-names = "default"; pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; }; thermal-zones { skin-temp-thermal { polling-delay-passive = <250>; polling-delay = <0>; thermal-sensors = <&pmk8280_adc_tm 5>; trips { skin_temp_alert0: trip-point0 { temperature = <55000>; hysteresis = <1000>; type = "passive"; }; skin_temp_alert1: trip-point1 { temperature = <58000>; hysteresis = <1000>; type = "passive"; }; skin-temp-crit { temperature = <73000>; hysteresis = <1000>; type = "critical"; }; }; cooling-maps { map0 { trip = <&skin_temp_alert0>; cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&skin_temp_alert1>; cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&hall_int_n_default>; switch-lid { gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; linux,input-type = ; linux,code = ; wakeup-source; wakeup-event-action = ; }; }; vreg_edp_bl: regulator-edp-bl { compatible = "regulator-fixed"; regulator-name = "VBL9"; regulator-min-microvolt = <3600000>; regulator-max-microvolt = <3600000>; gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&edp_bl_reg_en>; regulator-boot-on; }; vreg_misc_3p3: regulator-misc-3p3 { compatible = "regulator-fixed"; regulator-name = "VCC3B"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&misc_3p3_reg_en>; regulator-boot-on; regulator-always-on; }; vreg_nvme: regulator-nvme { compatible = "regulator-fixed"; regulator-name = "VCC3_SSD"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&tlmm 135 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&nvme_reg_en>; regulator-boot-on; }; }; &apps_rsc { pmc8280-1-rpmh-regulators { compatible = "qcom,pm8350-rpmh-regulators"; qcom,pmic-id = "b"; vdd-l3-l5-supply = <&vreg_s11b>; vreg_s11b: smps11 { regulator-name = "vreg_s11b"; regulator-min-microvolt = <1272000>; regulator-max-microvolt = <1272000>; regulator-initial-mode = ; }; vreg_l3b: ldo3 { regulator-name = "vreg_l3b"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-initial-mode = ; regulator-boot-on; }; vreg_l4b: ldo4 { regulator-name = "vreg_l4b"; regulator-min-microvolt = <912000>; regulator-max-microvolt = <912000>; regulator-initial-mode = ; }; vreg_l6b: ldo6 { regulator-name = "vreg_l6b"; regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>; regulator-initial-mode = ; regulator-boot-on; regulator-always-on; /* FIXME: VDD_A_EDP_0_0P9 */ }; }; pmc8280c-rpmh-regulators { compatible = "qcom,pm8350c-rpmh-regulators"; qcom,pmic-id = "c"; vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-initial-mode = ; }; vreg_l12c: ldo12 { regulator-name = "vreg_l12c"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-initial-mode = ; }; vreg_l13c: ldo13 { regulator-name = "vreg_l13c"; regulator-min-microvolt = <3072000>; regulator-max-microvolt = <3072000>; regulator-initial-mode = ; }; }; pmc8280-2-rpmh-regulators { compatible = "qcom,pm8350-rpmh-regulators"; qcom,pmic-id = "d"; vdd-l1-l4-supply = <&vreg_s11b>; vreg_l3d: ldo3 { regulator-name = "vreg_l3d"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-initial-mode = ; }; vreg_l4d: ldo4 { regulator-name = "vreg_l4d"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-initial-mode = ; }; vreg_l6d: ldo6 { regulator-name = "vreg_l6d"; regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>; regulator-initial-mode = ; }; vreg_l7d: ldo7 { regulator-name = "vreg_l7d"; regulator-min-microvolt = <3072000>; regulator-max-microvolt = <3072000>; regulator-initial-mode = ; }; vreg_l9d: ldo9 { regulator-name = "vreg_l9d"; regulator-min-microvolt = <912000>; regulator-max-microvolt = <912000>; regulator-initial-mode = ; }; }; }; &pcie2a { perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&vreg_nvme>; pinctrl-names = "default"; pinctrl-0 = <&pcie2a_default>; status = "okay"; }; &pcie2a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>; status = "okay"; }; &pmc8280c_lpg { status = "okay"; }; &pmk8280_adc_tm { status = "okay"; sys-therm@0 { reg = <0>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@1 { reg = <1>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@2 { reg = <2>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@3 { reg = <3>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@4 { reg = <4>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@5 { reg = <5>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@6 { reg = <6>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; sys-therm@7 { reg = <7>; io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; }; &pmk8280_pon_pwrkey { status = "okay"; }; &pmk8280_pon_resin { status = "okay"; }; &pmk8280_vadc { status = "okay"; pmic-die-temp@3 { reg = ; qcom,pre-scaling = <1 1>; }; xo-therm@44 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; pmic-die-temp@103 { reg = ; qcom,pre-scaling = <1 1>; }; sys-therm@144 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@145 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@146 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@147 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; pmic-die-temp@303 { reg = ; qcom,pre-scaling = <1 1>; }; sys-therm@344 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@345 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@346 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; sys-therm@347 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; }; pmic-die-temp@403 { reg = ; qcom,pre-scaling = <1 1>; }; }; &qup0 { status = "okay"; }; &qup0_i2c4 { clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&qup0_i2c4_default>; status = "okay"; /* FIXME: verify */ touchscreen@10 { compatible = "hid-over-i2c"; reg = <0x10>; hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; vdd-supply = <&vreg_misc_3p3>; pinctrl-names = "default"; pinctrl-0 = <&ts0_default>; }; }; &qup1 { status = "okay"; }; &qup2 { status = "okay"; }; &qup2_i2c5 { clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&qup2_i2c5_default>; status = "okay"; touchpad@15 { compatible = "hid-over-i2c"; reg = <0x15>; hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; vdd-supply = <&vreg_misc_3p3>; pinctrl-names = "default"; pinctrl-0 = <&tpad_default>; wakeup-source; status = "disabled"; }; touchpad@2c { compatible = "hid-over-i2c"; reg = <0x2c>; hid-descr-addr = <0x20>; interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; vdd-supply = <&vreg_misc_3p3>; pinctrl-names = "default"; pinctrl-0 = <&tpad_default>; wakeup-source; }; keyboard@68 { compatible = "hid-over-i2c"; reg = <0x68>; hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; vdd-supply = <&vreg_misc_3p3>; pinctrl-names = "default"; pinctrl-0 = <&kybd_default>; wakeup-source; }; }; &remoteproc_adsp { firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; status = "okay"; }; &remoteproc_nsp0 { firmware-name = "qcom/sc8280xp/LENOVO/21BX/qccdsp8280.mbn"; status = "okay"; }; &usb_0 { status = "okay"; }; &usb_0_dwc3 { /* TODO: Define USB-C connector properly */ dr_mode = "host"; }; &usb_0_hsphy { vdda-pll-supply = <&vreg_l9d>; vdda18-supply = <&vreg_l1c>; vdda33-supply = <&vreg_l7d>; status = "okay"; }; &usb_0_qmpphy { vdda-phy-supply = <&vreg_l9d>; vdda-pll-supply = <&vreg_l4d>; status = "okay"; }; &usb_1 { status = "okay"; }; &usb_1_dwc3 { /* TODO: Define USB-C connector properly */ dr_mode = "host"; }; &usb_1_hsphy { vdda-pll-supply = <&vreg_l4b>; vdda18-supply = <&vreg_l1c>; vdda33-supply = <&vreg_l13c>; status = "okay"; }; &usb_1_qmpphy { vdda-phy-supply = <&vreg_l4b>; vdda-pll-supply = <&vreg_l3b>; status = "okay"; }; &xo_board_clk { clock-frequency = <38400000>; }; /* PINCTRL */ &pmc8280_1_gpios { edp_bl_en: edp-bl-en-state { pins = "gpio8"; function = "normal"; }; edp_bl_reg_en: edp-bl-reg-en-state { pins = "gpio9"; function = "normal"; }; misc_3p3_reg_en: misc-3p3-reg-en-state { pins = "gpio1"; function = "normal"; }; }; &pmc8280c_gpios { edp_bl_pwm: edp-bl-pwm-state { pins = "gpio8"; function = "func1"; }; }; &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; hall_int_n_default: hall-int-n-state { pins = "gpio107"; function = "gpio"; input-enable; bias-disable; }; kybd_default: kybd-default-state { disable-pins { pins = "gpio102"; function = "gpio"; output-low; }; int-n-pins { pins = "gpio104"; function = "gpio"; bias-disable; }; reset-pins { pins = "gpio105"; function = "gpio"; bias-disable; }; }; nvme_reg_en: nvme-reg-en-state { pins = "gpio135"; function = "gpio"; drive-strength = <2>; bias-disable; }; pcie2a_default: pcie2a-default-state { clkreq-n-pins { pins = "gpio142"; function = "pcie2a_clkreq"; drive-strength = <2>; bias-pull-up; }; perst-n-pins { pins = "gpio143"; function = "gpio"; drive-strength = <2>; bias-pull-down; }; wake-n-pins { pins = "gpio145"; function = "gpio"; drive-strength = <2>; bias-pull-up; }; }; qup0_i2c4_default: qup0-i2c4-default-state { pins = "gpio171", "gpio172"; function = "qup4"; bias-disable; drive-strength = <16>; }; qup2_i2c5_default: qup2-i2c5-default-state { pins = "gpio81", "gpio82"; function = "qup21"; bias-disable; drive-strength = <16>; }; tpad_default: tpad-default-state { int-n-pins { pins = "gpio182"; function = "gpio"; bias-disable; }; }; ts0_default: ts0-default-state { int-n-pins { pins = "gpio175"; function = "gpio"; bias-disable; }; reset-n-pins { pins = "gpio99"; function = "gpio"; output-high; drive-strength = <16>; }; }; };