Commit Graph

1 Commits

Author SHA1 Message Date
Martí Bolívar 8ea9941fe3 samples: led_ws2812: force SPIM on nRF52-DK
The WS2812 SPI driver needs the pixel data to be clocked out on time,
with no gaps between SPI frames. This makes the nordic,nrf-spi
compatible unsuitable for use, since the corresponding driver doesn't
use EasyDMA to clock out the tx buffers.

Force the arduino_spi node in the DT to SPIM mode by setting its
compatible to nordic,nrf-spim. On nRF52832, this driver is disabled by
default due to Product Anomaly Notice (PAN) 58.

We happen to not be affected by PAN 58 in this instance, because we
never read data over the SPIM, only write it. So it's safe to enable
the SPIM driver. This requires a board-specific Kconfig fragment for
nRF52-DK to enable CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58.

Fixes: #29877
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-17 10:24:33 -06:00