zephyr/drivers/led_strip
TOKITA Hiroshi 6699d4d4f9 drivers: led_strip: add rpi_pico's PIO based ws2812 driver
Add driver that based on RPI-PICO's PIO feature for ws2812.

This driver can handle WS2812 or compatible LED strips.
The single PIO node can handle up to 4 strips.
Any pins that can be configured for PIO can be used for strips.

I verified the samples/driver/led_ws2812 sample
working with WS2812(144 pcs) led strip using following patches.

- samples/drivers/led_ws2812/boards/rpi_pico.overlay

```
/ {
        aliases {
                led-strip = &ws2812;
        };
};

&pinctrl {
        ws2812_pio0_default: ws2812_pio0_default {
                ws2812 {
                        pinmux = <PIO0_P21>;
                };
        };
};

&pio0 {
        status = "okay";

        pio-ws2812 {
                compatible = "worldsemi,ws2812-rpi_pico-pio";
                status = "okay";
                pinctrl-0 = <&ws2812_pio0_default>;
                pinctrl-names = "default";
                bit-waveform = <3>, <3>, <4>;

                ws2812: ws2812 {
                        status = "okay";
                        output-pin = <21>;
                        chain-length = <144>;
                        color-mapping = <LED_COLOR_ID_GREEN
                                         LED_COLOR_ID_RED
                                         LED_COLOR_ID_BLUE>;
                        reset-delay = <280>;
                        frequency = <800000>;
                };
        };
};

```

- samples/drivers/led_ws2812/boards/rpi_pico.conf

```
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y
```

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-10 12:10:36 +01:00
..
apa102.c drivers: led_strip: apa102: add multi instances support 2023-05-31 10:23:22 +01:00
CMakeLists.txt drivers: led_strip: add rpi_pico's PIO based ws2812 driver 2024-01-10 12:10:36 +01:00
Kconfig drivers: kconfig: unify menuconfig title strings 2023-03-28 15:06:06 +02:00
Kconfig.apa102 kconfig: Global whitespace/consistency cleanup 2019-11-01 15:53:23 +01:00
Kconfig.lpd880x kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
Kconfig.tlc5971 drivers: led_strip: add tlc5971 driver 2022-03-23 12:50:11 +01:00
Kconfig.ws2812 drivers: led_strip: add rpi_pico's PIO based ws2812 driver 2024-01-10 12:10:36 +01:00
lpd880x.c sys: util: migrate all files to DIV_ROUND_UP 2023-04-11 12:00:37 +02:00
tlc5971.c drivers: tests: replace usage of spi_is_ready with spi_is_ready_dt 2022-12-07 09:40:23 -06:00
ws2812_gpio.c drivers: gpio: use gpio_is_ready_dt helper function 2023-08-28 08:48:35 -05:00
ws2812_i2s.c kernel: Modify the signature of k_mem_slab_free() 2023-09-03 18:20:59 -04:00
ws2812_rpi_pico_pio.c drivers: led_strip: add rpi_pico's PIO based ws2812 driver 2024-01-10 12:10:36 +01:00
ws2812_spi.c drivers: spi: update drivers that were using spi cpol and cpha 2023-10-25 18:30:28 -07:00