Skip to content

Raspberry Pi 5 Support

Jeremy Garff edited this page Oct 12, 2024 · 20 revisions

Experimental 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 12. Other pins and more channels will be added to the driver soon. I know there has been significant demand for this feature, so I wanted to get this out as soon as I could.

Requirements

  • Rasbperry Pi OS 64-bit
  • WS281X Pi 5 Development Branch
  • Kernel Header Package
  • Device Tree Compiler
  • Device Tree Overlay
  • pinctrl Utility

Installing Required Components

  • 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

Building the Kernel Driver

  • Check out the pi5 branch

    $ git checkout pi5

  • Go into the rp1_ws281x_pwm subdirectory.

    $ cd rp1_ws281x_pwm

  • Build the kernel module.

    $ make

Building Device Tree Overlay

  • Build the device tree overlay

    $ ./dts.sh

Loading the Kernel Driver

  • 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 12).

    $ sudo pinctrl set a3 pn

Clone this wiki locally