-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Drivers led implement driver for tlc59731 rgb controller #68455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drivers led implement driver for tlc59731 rgb controller #68455
Conversation
cedaa5c to
bded838
Compare
bded838 to
30c9dcd
Compare
30c9dcd to
bffee23
Compare
|
STM32WB5MM_DK doc should be updated to inform the user that RGB and IR LEDs share MCU resources, & so to use the RGB LED, JP5 must be ON and JP4 OFF (GPIO H1 becomes the chip select for the RGB device on spi1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @javad123javad,
Thanks for contributing support for the TLC59731 controller !
I started to review the driver but at some point (reading the datasheet) I realized that the TLC59731 is a LED strip controller (i.e. which can be cascaded). If it is correct, then you need to migrate this driver into the led_strip subsystem.
Additionally, while it is possible to use the CPU to send pulses through a GPIO (as you did), you may prefer to use an SPI controller instead. The idea is to program the SPI controller to send pulses through the MOSI pin. This method allows to offload the CPU. See the ws2812_spi driver as an example. I am not sure if it is possible here, but please check it.
dts/bindings/led/ti,tlc59731.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the TLC59731 controller specification I read that the brightness granularity of each channel is fixed to 256. So what is the purpose for the {min,max}_brightness properties ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall Grayscale brightness of the RGB led is controlled by this properties. Furthermore, according to section 8.4 of the datasheet, it is possible to control the brightness of each channel:
The TLC59731 can adjust the brightness of each output channel using a pulse width modulation (PWM) control
scheme. The PWM data bit length for each output is 8 bits. The architecture of 8 bits per channel results in 256
brightness steps, from 0% to 99.98% ON-time duty cycle
Hi @simonguinot |
1a35d1b to
1756520
Compare
3cae81b to
1139961
Compare
TLC59731 is a 3-Channel, 8-Bit, PWM LED Driver with TI Single-Wire interface (EasySet) protocol. Signed-off-by: Javad Rahimipetroudi <[email protected]>
This patch add RGB LED support for the TI TLC59731 RGB controller. Signed-off-by: Javad Rahimipetroudi <[email protected]>
This patch adds sample test case for TI TLC59731 RGB controller. Signed-off-by: Javad Rahimipetroudi <[email protected]>
1139961 to
d324abd
Compare
|
Hi @javad123javad. Please close this PR and open a new one when it is ready. |
Hi @simonguinot |
From what I can see it is definitely not ready. I can see a |
This patch series add driver support for TI TLC59731 RGB controller, along side the changes applied for STM32WB5MM_DK board and a demo samples based on this board.