From 2d3103669a4acc01d6a08bb1742dd21fd5c6ea7d Mon Sep 17 00:00:00 2001 From: Dietmar Muscholik <dietmar.muscholik@seco.com> Date: Tue, 28 Jan 2025 14:16:25 +0000 Subject: [PATCH] [E81] Add enable-gpio and backlight to eDP-displays In the DP-driver there is "qcom,edp-vcc-en-gpio" that a gpio can be assigned to in the DT and that powers on the display. But this gpio is switched AFTER the display has been powered on. Thus there is no other way to turn on a display but using a hog-gpio. There is no way to assign a backlight-device to (e)DP, not even a PWM, only a bunch of gpios. So the pwm is configured as gpio, meaning there is no way to adjust the backlight-brightness but 2 ways to switch the backlight off, because both gpios must be high. --- .../boot/dts/seco/include/display-e81-edp.dtsi | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/arch/arm64/boot/dts/seco/include/display-e81-edp.dtsi b/arch/arm64/boot/dts/seco/include/display-e81-edp.dtsi index 69b6927d10fb6..5be98ca29cd02 100644 --- a/arch/arm64/boot/dts/seco/include/display-e81-edp.dtsi +++ b/arch/arm64/boot/dts/seco/include/display-e81-edp.dtsi @@ -17,6 +17,7 @@ //#include "dsi-panel-ext-bridge-1080p.dtsi" //#include "qcm6490-sde-display.dtsi" #include "qcm6490-sde.dtsi" +#include "e81-pinfunc.h" /* &redriver { @@ -135,9 +136,8 @@ &mdss_edp0 { pinctrl-2 = <&edp_hpd_default>; qcom,dp-hpd-gpio = <&tlmm 60 0>; qcom,dp-gpio-aux-switch; - //qcom,edp-vcc-en-gpio = <&tlmm 80 0>; - //qcom,edp-vcc-en-gpio = <&stm32 24 0>; - //qcom,no-backlight-support; + qcom,edp-pwm-en-gpio = <&pm8350c_gpios 8 GPIO_ACTIVE_HIGH>; + qcom,edp-backlight-en-gpio = <LCD0_BKLT_EN GPIO_ACTIVE_HIGH>; qcom,dp-ext-hpd; }; @@ -147,21 +147,12 @@ &mdss_mdp0 { connectors = <&smmu_sde_unsec &mdss_edp0 &mdss_dp0>; }; -// backlight -&backlight0 { - status = "okay"; -}; - -&pm8350c_pwm { - status = "okay"; -}; - // enable display &stm32 { /**/ gpio_lcd0_vdd_en { gpio-hog; - gpios = <24 (GPIO_PUSH_PULL | GPIO_ACTIVE_HIGH)>; + gpios = <LCD0_VDD_EN_PIN (GPIO_PUSH_PULL | GPIO_ACTIVE_HIGH)>; output-high; }; /**/ -- GitLab