:: [maemo-leste] Backlight on Droid4 -…
Top Page
Delete this message
Reply to this message
Author: Pavel Machek
Date:  
To: Sebastian Reichel, jjhiblot, tomi.valkeinen
CC: Tony Lindgren, Merlijn Wajer, maemo-leste, Ivaylo Dimitrov
Old-Topics: Re: [maemo-leste] Droid 4 in 5.3-rc1, development boards
Subject: [maemo-leste] Backlight on Droid4 -- was Re: Droid 4 in 5.3-rc1, development boards
Hi!

> On Mon, Jul 29, 2019 at 03:55:23PM +0200, Pavel Machek wrote:
> > > Oh and the new backlight module comes up blanked right now so it
> > > needs to be manually enabled via sysfs.
> >
> > Or you can enable ledtrig-backlight and apply this.
> >
> > (I know, we need better solution).
>
> https://lore.kernel.org/lkml/20190717141514.21171-1-jjhiblot@ti.com/
>
> The above patchset is the proper solution. It is a backlight
> driver, which takes the LED driver as input and exposes a
> proper backlight device. This makes it possible to reference
> the backlight in DT:
>
> ----------------
> led-node {
>     blabla;
> };

>
> backlight-node {
>     blabla;
>     led = <&led-node>;
> };

>
> panel-node {
>     backlight = <&backlight-node>;
> };
> ----------------


Hmm, I guess I should try to get it to work.

I came up with this, and ... it does not work. If you see something
obviously wrong, tell me.

Thanks,
                                Pavel


diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index 62af1b8..0195580 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -202,12 +202,22 @@
         };
     };


+    backlight: backlight {
+             compatible = "led-backlight";
+
+         leds = <&backlight_led>;
+         brightness-levels = <0 4 8 16 32 64 128 255>;
+         default-brightness-level = <6>;
+    };
+
     lcd0: display {
         compatible = "panel-dsi-cm";
         label = "lcd0";
         vddi-supply = <&lcd_regulator>;
         reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;    /* gpio101 */


+        backlight = <&backlight>;
+
         width-mm = <50>;
         height-mm = <89>;


@@ -417,12 +427,11 @@
         ramp-up-us = <1024>;
         ramp-down-us = <8193>;


-        led@0 {
+        backlight_led: led@0 {
             reg = <0>;
             led-sources = <2>;
             ti,led-mode = <0>;
             label = ":backlight";
-            linux,default-trigger = "backlight";
         };


         led@1 {



--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html