Skip to content

drivers: led: Added driver for PCA9533 LED dimmer #92752

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

petrosyan-van
Copy link
Contributor

@petrosyan-van petrosyan-van commented Jul 6, 2025

This PR implements a driver for the PCA9533 I2C LED dimmer with support for:

  • 4 individual LEDs (LED0-LED3)
  • Brightness control using two PWM engines
  • Configurable blink patterns with period control
  • Efficient engine sharing between LEDs
  • Power management integration

Tested on STM32U585 on a custom board. The chip has no specific power management features, but the driver includes PM hooks to respect power-domain relationships.

The PCA9533 is a simple 4-channel LED controller with two PWM engines that can be shared among LEDs.

Originally I was thinking to combine PCA9533 with PCA9633, but they actually have some major differences, like PWM engine limitation and inability to use PWM on all LED outputs at the same time on PCA9533

@petrosyan-van petrosyan-van force-pushed the drivers_led_pca9533 branch 3 times, most recently from 7b6c157 to 23b320f Compare July 6, 2025 21:18
@petrosyan-van petrosyan-van marked this pull request as ready for review July 6, 2025 22:01
@github-actions github-actions bot added area: LED Label to identify LED subsystem platform: NXP Drivers NXP Semiconductors, drivers labels Jul 6, 2025
Copy link
Contributor

@simonguinot simonguinot left a comment

Choose a reason for hiding this comment

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

Hi @petrosyan-van,

Thanks for this LED driver. Please find a preliminary review below. I'll read it more carefully at the next pass.

@simonguinot simonguinot requested review from kartben, soburi, fabiobaltieri and thedjnK and removed request for Raymond0225 July 16, 2025 10:52
@petrosyan-van petrosyan-van force-pushed the drivers_led_pca9533 branch 2 times, most recently from cf4641c to e917b96 Compare July 16, 2025 12:28
Added DT binding for the PCA9533 LED Dimmer

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
@petrosyan-van petrosyan-van force-pushed the drivers_led_pca9533 branch 2 times, most recently from e3c09e6 to 5094895 Compare July 16, 2025 13:06
@petrosyan-van
Copy link
Contributor Author

Thanks a lot for the feedback!
I think I applied all changes :)

• Supports led_on/off, led_set_brightness (0–100 %, 152 Hz default),
  and led_blink (7 ms – 1.685 s) with automatic sharing of the two
  on-chip PWM engines; returns –EBUSY when a third distinct pair is
  requested.

• Includes basic runtime-PM boilerplate to honour power-domain control;
  the device itself has no dedicated low-power states.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
PCA9533 is added to the overlay so the new driver
is compiled by the automated “build all LED drivers” test

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LED Label to identify LED subsystem platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants