mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

Due to the fact that Lenovo Thinkpad T14s Gen6 is available with both OLED and LCD, the backlight control differs HW-wise. For the LCD variant, the panel's backlight is controlled via one of the PWMs provided by the PMK8550 PMIC. For the OLED variant, the backlight is internal to the panel and therefore it is not described in devicetree. For this reason, create a generic dtsi for the T14s by renaming the existing dts. While at it, add a node name to panel and drop the enable gpio and pinctrl properties from the panel node. Then add the LCD variant dts file with the old name and describe all backlight related nodes. So the existing dts will now be used for LCD variant while for OLED new dts will be added. Tested-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20250314140325.4143779-3-abel.vesa@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
61 lines
1.1 KiB
Plaintext
61 lines
1.1 KiB
Plaintext
// SPDX-License-Identifier: BSD-3-Clause
|
|
/*
|
|
* Copyright (c) 2025, Linaro Limited
|
|
*/
|
|
|
|
#include "x1e78100-lenovo-thinkpad-t14s.dtsi"
|
|
|
|
/ {
|
|
model = "Lenovo ThinkPad T14s Gen 6 (LCD)";
|
|
compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
|
|
"qcom,x1e78100", "qcom,x1e80100";
|
|
|
|
backlight: backlight {
|
|
compatible = "pwm-backlight";
|
|
pwms = <&pmk8550_pwm 0 4266537>;
|
|
enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
|
|
power-supply = <&vreg_edp_bl>;
|
|
|
|
pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
vreg_edp_bl: regulator-edp-bl {
|
|
compatible = "regulator-fixed";
|
|
|
|
regulator-name = "VBL9";
|
|
regulator-min-microvolt = <3600000>;
|
|
regulator-max-microvolt = <3600000>;
|
|
|
|
gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
|
|
enable-active-high;
|
|
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&edp_bl_reg_en>;
|
|
|
|
regulator-boot-on;
|
|
};
|
|
};
|
|
|
|
&panel {
|
|
backlight = <&backlight>;
|
|
};
|
|
|
|
&pmc8380_3_gpios {
|
|
edp_bl_reg_en: edp-bl-reg-en-state {
|
|
pins = "gpio10";
|
|
function = "normal";
|
|
};
|
|
};
|
|
|
|
&pmk8550_gpios {
|
|
edp_bl_pwm: edp-bl-pwm-state {
|
|
pins = "gpio5";
|
|
function = "func3";
|
|
};
|
|
};
|
|
|
|
&pmk8550_pwm {
|
|
status = "okay";
|
|
};
|