diff mbox series

arm64: dts: qcom: c630: Add backlight controller

Message ID 20201208044703.973382-1-bjorn.andersson@linaro.org
State Accepted
Commit a28106a2734f602d852a9269526f5880df352b51
Headers show
Series arm64: dts: qcom: c630: Add backlight controller | expand

Commit Message

Bjorn Andersson Dec. 8, 2020, 4:47 a.m. UTC
The Lenovo Yoga C630 uses the PWM controller in the TI SN65DSI86 bridge
chip to provide a signal for the backlight control and has TLMM GPIO 11
attached to some regulator that drives the backlight.

Unfortunately the regulator attached to this gpio is also powering the
camera, so turning off backlight result in the detachment of the camera
as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

This depends on the implementation of the pwm_chip in the TI SN65DSI86 bridge
driver [1], but posting this for reference and testing of said patch. The patch
can further be improved by the inclusion of something like [2] and by adding
"backlight = <&backlight>; to the panel node, which will result in DPMS
operations turning the panel on and off.

[1] https://lore.kernel.org/linux-arm-msm/20201208044022.972872-1-bjorn.andersson@linaro.org/
[2] https://lore.kernel.org/lkml/20201208044446.973238-1-bjorn.andersson@linaro.org/

 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index bdd5d92ee6c3..851e5833cab5 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -64,6 +64,12 @@  sn65dsi86_refclk: sn65dsi86-refclk {
 
 		clock-frequency = <19200000>;
 	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&sn65dsi86 1000000>;
+		enable-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &adsp_pas {
@@ -385,6 +391,8 @@  sn65dsi86: bridge@2c {
 		clocks = <&sn65dsi86_refclk>;
 		clock-names = "refclk";
 
+		#pwm-cells = <1>;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;