Skip to content

espressif/rmt: replace rmtchar with arch-specific lirc adapter#18654

Open
PiyushPatle26 wants to merge 1 commit intoapache:masterfrom
PiyushPatle26:espressif-rmt-lirc-refactor
Open

espressif/rmt: replace rmtchar with arch-specific lirc adapter#18654
PiyushPatle26 wants to merge 1 commit intoapache:masterfrom
PiyushPatle26:espressif-rmt-lirc-refactor

Conversation

@PiyushPatle26
Copy link
Copy Markdown

@PiyushPatle26 PiyushPatle26 commented Mar 30, 2026

Replace the ESP-specific rmtchar upper-half with arch-local esp_lirc adapters for Xtensa and RISC-V.

This moves the RMT upper-half out of drivers/rmt, registers LIRC
devices from the ESP board bring-up paths, and removes the old common
rmtchar driver and headers.

Also update the ESP Kconfig and build wiring to build esp_lirc when
ESP_RMT and DRIVERS_RC are enabled.

Tested on: ESP32-DEVKITC (Chip v1.0)
booted with CONFIG_ESP32_IGNORE_CHIP_REVISION_CHECK=y for local validation only

  • flashed and booted successfully to NSH
  • confirmed device registration:
    • /dev/lirc0
    • /dev/lirc1
    • /dev/leds0
  • confirmed the previous TX registration collision was fixed
    • before fix: board_rmt_txinitialize() failed: -17
    • after fix: both /dev/lirc0 and /dev/lirc1 register
  • confirmed the RX worker thread crash was fixed
    • before fix: opening the RX side triggered a kernel panic in esp_lirc_rx_thread
    • after fix: devices open successfully

Fixes discovered during hardware validation:

  • register TX as /dev/lirc1 so RX and TX do not collide
  • parse the RX worker thread argument from the correct argv slot
  • keep RX devices from advertising TX capability

Logs:
image

Irtest seems struck so need guidance on what must be changed to validate completely

Replace the ESP-specific rmtchar upper-half with arch-local esp_lirc
adapters for Xtensa and RISC-V.

 This moves the RMT upper-half out of drivers/rmt, registers LIRC
 devices from the ESP board bring-up paths, and removes the old common
 rmtchar driver and headers.

 Also update the ESP Kconfig and build wiring to build esp_lirc when
 ESP_RMT and DRIVERS_RC are enabled.

 Fixes discovered during hardware validation:
  - register TX as /dev/lirc1 so RX and TX do not collide
  - parse the RX worker thread argument from the correct argv slot
  - keep RX devices from advertising TX capability

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Area: Drivers Drivers issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: risc-v Board: xtensa labels Mar 31, 2026
@@ -2,46 +2,3 @@
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we remove ALL files under drivers/rmt

@@ -1,2 +1,2 @@
############################################################################
# drivers/rmt/Make.defs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove drivers/rmt/Make.defs

@@ -1 +1 @@
# ##############################################################################
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove drivers/rmt/CMakeLists.txt

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

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Area: Drivers Drivers issues Board: risc-v Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants