-
Notifications
You must be signed in to change notification settings - Fork 639
Raspberry Pi 5 Support
Support for the Raspberry Pi 5 is now available. Due to significant changes in the Raspberry Pi hardware, namely the RP1 chipset, a kernel module is now required. Currently these instructions are for using GPIO 18. Other pins and more channels will be added to the driver soon.
There has been significant demand for this feature. I wanted to get something out as soon as I could, so not all features (all channels, inverted signal, etc.) are working yet.
Unfortunately I don't have much time to work through hardware setup issues. It's best to have a working setup on a prior Raspberry Pi model before attempting to use the Pi5. The hardware setup is the same. This will help us focus on Pi 5 specific issues. Thanks.
Lastly, this project relates to electricity and electronic hardware. I take no responsibility for damage to person, property, Pi, LEDs, or anything else. You need to know what you're doing. As always, use at your own risk.
- Rasbperry Pi OS 64-bit
- Repository pi5 branch
- Kernel Header Package
- Device Tree Compiler
- Device Tree Overlay
- pinctrl Utility
- Kernel Header Package
$ sudo apt install linux-headers
- Device Tree Compiler
$ sudo apt install device-tree-compiler
- Pin Control Utility
$ sudo apt install raspi-utils
- Check out the pi5 branch
$ git checkout pi5
- Go into the rp1_ws281x_pwm subdirectory.
$ cd rp1_ws281x_pwm
- Build the kernel module.
$ make
- Build the device tree overlay
$ ./dts.sh
- Loading the kernel module from the driver directory.
$ sudo insmod ./rp1_ws281x_pwm.ko
- Loading the device tree overlay. This will initialize the device.
$ sudo dtoverlay -d . rp1_ws281x_pwm
- Setting up the GPIO (for GPIO 18).
$ sudo pinctrl set 18 a3 pn
- From the base directory, build the library and test program
$ cmake . ; make
- Run the test program
$ sudo ./test