Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] how do I run an lvds display with the LP8551 backlight driver

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115

【Linux】 how do I run an lvds display with the LP8551 backlight driver

Posted at 9/5/2023 16:55:32      View:736 | Replies:8        Print      Only Author   [Copy Link] 1#
hello, please tell me which DTS to take and how to edit it to run the LVDS display with the LP8551 backlight driver
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/6/2023 15:54:06        Only Author  2#
Help! I'll give you a bowl of rice and a cat wife
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 9/7/2023 10:19:22        Only Author  3#
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/7/2023 16:08:15        Only Author  4#
Last edited by Paquq In 9/7/2023 16:43 Editor

thanks for the links. I have a problem at the moment: I can't turn on GPIO3_B0 to turn on the power for the I2C backlight controller, as it can be done correctly in dts. the LP855x driver starts, but there is no power and i2c on the board, it cannot configure.
P.S.one more question: is it necessary to use lp3943@60?
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 9/7/2023 17:39:49        Only Author  5#
After the pin is applied by the driver, you cannot directly control it at the system layer, and the driver needs to provide a control interface.
According to the specifications and functions of the LP855X chip, add the corresponding attributes to dts. These properties can include register addresses, power controls, brightness controls, etc.
You can find some examples online.

  1. lp8551@60 {
  2.     compatible = "ti,lp8551";
  3.     reg = <0x60>;
  4.     reg-names = "lp8551";
  5.     enable-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  6.     brightness-levels = <0 64 128 192 255>;
  7.     default-brightness-level = <255>;
  8.     ...
  9. };
Copy the code


https://gitlab.com/firefly-linux ... .txt?ref_type=heads
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/7/2023 20:24:43        Only Author  6#
thanks for the reply. is there a document describing GPIO RK3568, because enabling GPIO3_B0 does not give a result, I have suspicions that it does not relate to MIPI0_DSI0/LVDS in any way
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 9/8/2023 16:49:24        Only Author  7#
Paquq Posted at 9/7/2023 20:24
thanks for the reply. is there a document describing GPIO RK3568, because enabling GPIO3_B0 does not ...

https://wiki.t-firefly.com/en/Core-3568J/driver_gpio.html
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/8/2023 16:58:51        Only Author  8#
I found the necessary GPIOs, enable them using /sys/class/gpio, and i2c works. I have specified the necessary GPIOs in dts, but they do not turn on at boot, so the driver does not work either. part of the DTS and the log is attached.

DTS:

&i2c1 {
        #address-cells = <1>;
        #size_cells = <0>;

        backlight: backlight@2c {
//                compatible = "pwm-backlight";

                compatible = "ti,lp8551";
                reg = <0x2c>;
                bl-name = "lcd-bl";

                enable-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>, <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>; //pin-pwm - low; bl_en - high

                pwms = <&pwm4 0 25000 0>;
                brightness-levels = <
                          0  20  20  21  21  22  22  23
                        ...............................
                        248 249 250 251 252 253 254 255
                >;
                default-brightness-level = <200>;
        };
};

KERNEL LOG:
root@firefly:~# dmesg | grep lp855
[    1.381622] lp855x 1-002c: Looking up power-supply from device tree
[    1.381636] lp855x 1-002c: Looking up power-supply property in node /i2c@fe5a0000/backlight@2c failed
[    1.381673] lp855x 1-002c: 1-002c supply power not found, using dummy regulator
[    1.381789] lp855x 1-002c: Linked as a consumer to regulator.0
[    1.381823] lp855x 1-002c: Looking up enable-supply from device tree
[    1.381837] lp855x 1-002c: Looking up enable-supply property in node /i2c@fe5a0000/backlight@2c failed
[    1.382048] lp855x 1-002c: device config err: -6
[    1.382147] lp855x 1-002c: Dropping the link to regulator.0

Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/13/2023 16:35:04        Only Author  9#
thank you very much, everything worked, helped a lot
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list