This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP5569: Help regarding LP5569 linux driver & it's usage

Part Number: LP5569
Other Parts Discussed in Thread: LP5523,

Hi,

I need help regarding the control of led driver LP5569, via linux driver. We have included a kernel code for LP5569 which is similar to the kernel code of LP5523 (leds-lp5569.c), as shown in the query https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/921319/lp5569-lp5569/3423178?tisearch=e2e-sitesearch&keymatch=lp5569%2520kernel#3423178. Also we have included the led in the device tree and after flashing the new image, we got the following inside the folder.

Could you please provide more insight on how to use these interfaces and sample sequences, so that we could get a head-start to sequence the leds. Also please provide some information regarding the sequences and how to make custom sequences.

  • Hi Anjali,

    Nice to hear you.

    Sorry I'm not sure what you are asking, do you have some problem about the I2C interface and control sequences?

    Please provide me more specific questions so I can answer you clearly.

    Thanks!

    Ives

  • Hi Ives,

    We are new to this area,the linux version which we are using is 5.4.

    So we require help in the control sequences as in how to light up the led, how to pre program certain patterns in the led driver and how to use it. We did not get any folders in the /sys/class/leds/ folder. So is there any mistake from our side, which we can rectify. Also it would be helpful if you could provide the kernel module code for lp5569, if you have any. We tried using the one provided in the forum link above, but nothing seems to work fine.

  • Hi Anjali,

    We never use linux system to control the device before,

    Can I just provide you the control sequences for you?

  • Ok sure, I will try to use that!

  • Hi Anjali,

    1)Let the device into NORMAL mode by the figure below:

    2)If you want to control device by manual mode, you need to write LEDx_PWM (default 00h) and LEDx_CURRENT(default AFh) to control the output.

    3)If you want to control device by autonomous engine, follow the steps below:

    4)Set chx_mode in LED_ENGINE_CONTROL2 register to 01 to load program to SRAM

    5)Select LED operation mode by LEDx_CONTROL register.

    6)Ensure each engine program start address.

    7)Select program memory page

    8)If you want one engine to control more than one LEDs, please map the LEDs you want to use to ENGINEx_MAPPINGx register.

    9)Write your program instruction one by one to PROGRAM_MEM_xx, the device will execute it one by one.

    10)Set chx_exec in LED_ENGINE_CONTROL1 register to 10 for free run program.

    11)Set chx_mode in LED_ENGINE_CONTROL2 register to 10 to run program.

    If you have any questions, please let me know.

    Thanks!

    Best Regards,

    Ives Li

  • Sure Ives Li, I will try this and reach out if there is any issues!.

    Thanks,

    Anjali

  • Please let me know if you have any problem, Thanks!