Skip to content

Add led-strip Espressif RMT driver#102053

Draft
joelguittet wants to merge 10 commits intozephyrproject-rtos:mainfrom
joelguittet:feature/led-strip-espressif-rmt-driver
Draft

Add led-strip Espressif RMT driver#102053
joelguittet wants to merge 10 commits intozephyrproject-rtos:mainfrom
joelguittet:feature/led-strip-espressif-rmt-driver

Conversation

@joelguittet
Copy link
Contributor

@joelguittet joelguittet commented Jan 9, 2026

A new led-strip driver for WS2812B, based on Espressif RMT.

This pull request depends of #101448, which need to be merged before the review to be done here.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_espressif zephyrproject-rtos/hal_espressif@d73843b zephyrproject-rtos/hal_espressif#510 zephyrproject-rtos/hal_espressif#510/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_espressif DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jan 9, 2026
@zephyrbot zephyrbot added area: Samples Samples area: LED Label to identify LED subsystem area: Devicetree Binding PR modifies or adds a Device Tree binding platform: ESP32 Espressif ESP32 area: Pinctrl area: Boards/SoCs area: RISCV RISCV Architecture (32-bit & 64-bit) area: Xtensa Xtensa Architecture area: DMA Direct Memory Access labels Jan 9, 2026
@joelguittet joelguittet marked this pull request as draft January 10, 2026 08:25

#ifndef ZEPHYR_DRIVERS_MISC_ESPRESSIF_RMT_RMT_PRIVATE_H_
#define ZEPHYR_DRIVERS_MISC_ESPRESSIF_RMT_RMT_PRIVATE_H_

Copy link
Contributor

Choose a reason for hiding this comment

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

rmt_private.h is part of the driver in HAL, I suggest to keep this in there and not replicate. This aligns with other Espressif driver and allows proper hal sync/update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find rmt_private.h in the HAL. And I didn't find the definitions made here in the HAL at all.
So I'm not sure to understand your comment...

#include <zephyr/drivers/misc/espressif_rmt/rmt.h>
#include <zephyr/drivers/misc/espressif_rmt/rmt_rx.h>

#ifdef CONFIG_SOC_SERIES_ESP32
Copy link
Contributor

Choose a reason for hiding this comment

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

All this sigmap.h includes sounds odd. Why can't we use pinctrl?

Copy link
Contributor Author

@joelguittet joelguittet Feb 13, 2026

Choose a reason for hiding this comment

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

This is to use ESP_RMT_SIG_IN0 which is just below. It permit to find a channel ID from the pin. It depends of the SOC. The same exist for rmt_tx.c

@sylvioalves
Copy link
Contributor

@joelguittet great! I only reviewed parts of it. I'll do a next round to evaluate logic and workflow.

@joelguittet joelguittet force-pushed the feature/led-strip-espressif-rmt-driver branch 3 times, most recently from d753223 to 8fd3714 Compare February 13, 2026 23:03
@joelguittet
Copy link
Contributor Author

@joelguittet great! I only reviewed parts of it. I'll do a next round to evaluate logic and workflow.

Thanks a lot @sylvioalves !!
However, this PR is a draft for the led strip driver based on the rmt driver. Only the two last comments are relevant.
Can you continue the review of the rmt stuff in #101448 please ?
Thanks!

@joelguittet joelguittet force-pushed the feature/led-strip-espressif-rmt-driver branch 3 times, most recently from 6b9e434 to 6f3a7b7 Compare March 1, 2026 21:06
@joelguittet joelguittet force-pushed the feature/led-strip-espressif-rmt-driver branch from 6f3a7b7 to d9b33e8 Compare March 18, 2026 14:02
The Espressif RMT driver is created from the ESP-IDF version.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
The RMT peripheral is added to the existing relevant devices.
A DTS bindings is created to support this peripheral.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Adding RMT pinctrl for all relevant ESP32 devices.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Indicate rmt support for all relevant Espressif boards.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Add definition for default rmt pinctrl on all relevant boards.
GPIO12 and GPIO13 are used by default.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Adding this application to test espressif_rmt driver using bytes
encoder.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Adding this application to test espressif_rmt driver using simple
encoder.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Update hal to integrate RMT support.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Support for WS2812 led-strip using Espressif RMT driver.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
This sample is updated to illustrate the usage of WS2812 led-strip
Espressif RMT driver.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
@joelguittet joelguittet force-pushed the feature/led-strip-espressif-rmt-driver branch from d9b33e8 to 364fa8a Compare March 18, 2026 16:04
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Binding PR modifies or adds a Device Tree binding area: DMA Direct Memory Access area: LED Label to identify LED subsystem area: Pinctrl area: RISCV RISCV Architecture (32-bit & 64-bit) area: Samples Samples area: Xtensa Xtensa Architecture DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_espressif platform: ESP32 Espressif ESP32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants