Skip to content

Conversation

@awawa-dev
Copy link
Owner

@awawa-dev awawa-dev commented Oct 24, 2025

Add support for GPIO PWM for Raspberry Pi 5 using its RP1/PIO controller.
1 Requires root! Works only for Raspberry Pi 5 or newer if equipped with RP1 controller.
2 Must define LED strip in the overlay first!

  • For example: echo "dtoverlay=ws2812-pio,gpio=18,num_leds=30,rgbw" | sudo tee -a /boot/firmware/config.txt
    or edit /boot/firmware/config.txt manually
  • Adjust num_leds: total number of LEDs, must be configured the same in HyperHDR
  • Adjust rgbw only for sk6812 RGBW, otherwise remove it
  • After editing /boot/firmware/config.txt restart is required
  • If you configure everything correctly, you should see the /dev/leds0 device

Warning

Requires fixed ws2812 PIO kernel module: raspberrypi/linux#7108
As for 2025-10-29 you need to switch Trixie kernel to testing kernel version and reboot:
sudo rpi-update beb2783757e6aa6c4abe4187dc74da4ce2f451fc
It will be included in the next RPi OS release for kernel > 6.12.55


Testing setup:

obraz
obraz
obraz obraz

Results of testing using fixed kernel module:

obraz
obraz
obraz

Kernel driver hardcoded gamma causing its useless:
input 1–6 → 0,
input 7–8 → 1,

input 128 → 55 (0x37),
input 224 → 191 (0xBF),
input 255 → 255.

so it makes from LED strip capable of rendering 256x256x256 colors something inferior that is capable of rendering around 120x120x120 even if we would reverse that unfortunate gamma on our side (set: user gamma to 0.4545 in the processing tab) due to the gamma compression

@awawa-dev awawa-dev changed the title Add PWM support for Raspberry Pi 5 (RP1/rp2040) Add PWM support for Raspberry Pi 5 (RP1/PIO) Oct 24, 2025
@awawa-dev awawa-dev linked an issue Oct 24, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raspberry 5 rp1_ws281x_pwm

2 participants