Skip to content

Conversation

@javad123javad
Copy link
Contributor

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.

@zephyrbot zephyrbot added platform: STM32 ST Micro STM32 area: Samples Samples area: Devicetree Binding PR modifies or adds a Device Tree binding platform: TI SimpleLink Texas Instruments SimpleLink MCU area: LED Label to identify LED subsystem labels Feb 6, 2024
@javad123javad javad123javad force-pushed the add_tlc59731_strip_led_driver branch from f1cfd50 to 7b67864 Compare February 6, 2024 12:02
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this gpio-leds? That makes it looks as if we have two separate LEDs while in reality there is just one.

What we need is a gpio-hog to force enable it. And that should possibly even be in stm32wb5mm_dk.dts, although I don't know if that is possible in a way that it's only enabled if the rgb_leds is enabled.

Alternatively, it should be a named pin in stm32wb5mm_dk.dts (probably better name it GPIO_SELECT2 like in the schematic) and then driven from the example code like is done below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, However, I couldn't find a suitable binding for the chip select, so I used gpio-leds as it is the closest family to it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a GPIO that you use with the GPIO_DT_SPEC_GET macro, you don't need a compatible at all, because you don't bind it to a driver.

@simonguinot simonguinot self-assigned this Mar 8, 2024
@simonguinot simonguinot requested review from soburi and thedjnK and removed request for Desvauxm-st and mbolivar-ampere March 8, 2024 15:30
Comment on lines 13 to 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonguinot think it would make sense to have a base dts file wit the length property and have include/zephyr/drivers/led_strip.h validate the num_pixels parameter against it (outside the scope of this PR)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonguinot and also for this to error if not supported in the same include so it can be entirely omitted here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function can go

soburi
soburi previously approved these changes Apr 22, 2024
@fabiobaltieri
Copy link
Member

@simonguinot can you re-review please?

@simonguinot
Copy link
Contributor

simonguinot commented Apr 30, 2024

@simonguinot can you re-review please?

The code review is complete and apart from the fact that this driver uses GPIO to configure the LED strip, it is now in good shape.

But I am not sure if it should be merged... @javad123javad, are you still working on an SPI implementation ?

@soburi @thedjnK what do you think ?

@javad123javad
Copy link
Contributor Author

javad123javad commented Apr 30, 2024

@simonguinot can you re-review please?

The code review is complete and apart from the fact that this driver uses GPIO to configure the LED strip, it is now in good shape.

But I am not sure if it should be merged... @javad123javad, are you still working on an SPI implementation ?

@soburi @thedjnK what do you think ?

I am implementing the SPI version in another branch. The development is completed, however, there are some problems relating to the pulse timing that prevent it from working properly.
For this branch, I have applied the suggested changes and seems to be ready to merge.

@fabiobaltieri
Copy link
Member

fabiobaltieri commented May 6, 2024

@simonguinot so can this be merged?

simonguinot
simonguinot previously approved these changes May 7, 2024
@simonguinot
Copy link
Contributor

@simonguinot so can this be merged?

Yes this can be merged.

Copy link
Contributor

@thedjnK thedjnK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation is OK but since we are ready with #71630 can you adjust PR to follow that? Colour grouping is needed and the led strip yaml file can include the new binding, hopefully other can be merged tomorrow

@javad123javad
Copy link
Contributor Author

Implementation is OK but since we are ready with #71630 can you adjust PR to follow that? Colour grouping is needed and the led strip yaml file can include the new binding, hopefully other can be merged tomorrow

Sure, I will apply the changes after #71630 is merged. Because there are some dependencies that I need from this PR.

@thedjnK
Copy link
Contributor

thedjnK commented May 14, 2024

@javad123javad can be updated

@javad123javad javad123javad dismissed stale reviews from simonguinot and soburi via ce26763 May 15, 2024 08:25
@javad123javad javad123javad force-pushed the add_tlc59731_strip_led_driver branch from 4d07df4 to ce26763 Compare May 15, 2024 08:25
Javad Rahimipetroudi added 2 commits May 15, 2024 17:19
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]>
@javad123javad javad123javad force-pushed the add_tlc59731_strip_led_driver branch from ce26763 to 3d31f14 Compare May 15, 2024 15:24
@erwango erwango requested review from soburi and thedjnK May 20, 2024 07:28
@nashif nashif merged commit c46466e into zephyrproject-rtos:main May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree Binding PR modifies or adds a Device Tree binding area: LED Label to identify LED subsystem area: Samples Samples platform: STM32 ST Micro STM32 platform: TI SimpleLink Texas Instruments SimpleLink MCU

Projects

None yet

Development

Successfully merging this pull request may close these issues.