Skip to content

refactor(ws2812): use DMA from device tree, not hardcoded#474

Open
fouge wants to merge 1 commit intomainfrom
cyril-orbs-935-ws2812_pwm_stm32-to-use-dma-set-in-dts
Open

refactor(ws2812): use DMA from device tree, not hardcoded#474
fouge wants to merge 1 commit intomainfrom
cyril-orbs-935-ws2812_pwm_stm32-to-use-dma-set-in-dts

Conversation

@fouge
Copy link
Copy Markdown
Collaborator

@fouge fouge commented Feb 13, 2026

Replace hardcoded DMA1 references in the WS2812 PWM STM32 driver with proper device tree-based DMA configuration using the Zephyr DMA API.

  • Replace LL DMA calls (LL_DMA_Init, LL_DMA_EnableChannel, etc.) with Zephyr DMA API (dma_config, dma_start, dma_stop)
  • Replace dma-channel/timer-number DTS properties with standard dmas phandle-array referencing the DMAMUX controller
  • Remove hardcoded DMA1 nodelabel, DMA IRQ base, DMAMUX request mapping table, and DMA channel-to-LL mapping tables
  • Remove DYNAMIC_INTERRUPTS Kconfig dependency (DMA driver handles IRQs)
  • Update pearl_main.dts to use dmas/dma-names properties with proper DMAMUX request IDs (TIM1_UP=0x2E, TIM20_UP=0x5A)

Replace hardcoded DMA1 references in the WS2812 PWM STM32 driver with
proper device tree-based DMA configuration using the Zephyr DMA API.

- Replace LL DMA calls (LL_DMA_Init, LL_DMA_EnableChannel, etc.) with
  Zephyr DMA API (dma_config, dma_start, dma_stop)
- Replace dma-channel/timer-number DTS properties with standard `dmas`
  phandle-array referencing the DMAMUX controller
- Remove hardcoded DMA1 nodelabel, DMA IRQ base, DMAMUX request mapping
  table, and DMA channel-to-LL mapping tables
- Remove DYNAMIC_INTERRUPTS Kconfig dependency (DMA driver handles IRQs)
- Update pearl_main.dts to use dmas/dma-names properties with proper
  DMAMUX request IDs (TIM1_UP=0x2E, TIM20_UP=0x5A)

Signed-off-by: Cyril Fougeray <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant