Xiao BLE - WS2812 with Zephyr

!!!Update!!!

The overlay file is working now. SPI2 needs to be used, with the MISO and SCK pin defined (even though they are unused). 

Hi,

After successfully setting up zephyr and running the blinky example on the Seeed XIAO BLE nRF52840 Sense, I tried to test a connected Adafruit NeoPixel Jewel Ring. Unfortunately nothing seems to be happening, I am pretty sure that I forgot about something or my overlay file is faulty. The LED Ring is connected to the SPI MOSI pin. If someone could guide me in the right direction or give specific advice, I would be very grateful.

Zephyr documentation: https://docs.zephyrproject.org/latest/samples/drivers/led_ws2812/README.html

The overlay function for the xiao_ble_sense board

#include <zephyr/dt-bindings/led/led.h>
#include "../nrf52-bindings.h"


&spi2 {
	compatible = "nordic,nrf-spim";
	status = "okay";
	pinctrl-0 = <&spi2_default>;
	pinctrl-1 = <&spi2_sleep>;
	cs-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; // D10
    pinctrl-names = "default", "sleep";

	led_strip: ws2812@0 {
		compatible = "worldsemi,ws2812-spi";

		/* SPI */
		reg = <0>; /* ignored, but necessary for SPI bindings */
		spi-max-frequency = <SPI_FREQ>;

		/* WS2812 */
		chain-length = <12>; /* arbitrary; change at will */
		color-mapping = <LED_COLOR_ID_GREEN
				         LED_COLOR_ID_RED
				         LED_COLOR_ID_BLUE>;
		spi-one-frame = <ONE_FRAME>;
		spi-zero-frame = <ZERO_FRAME>;
	};
};

&pinctrl {
    spi2_default: spi2_default {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
				<NRF_PSEL(SPIM_MOSI, 1, 15)>,
				<NRF_PSEL(SPIM_MISO, 1, 14)>;
		};
	};

	spi2_sleep: spi2_sleep {
		group1 {
			psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
				<NRF_PSEL(SPIM_MOSI, 1, 15)>,
				<NRF_PSEL(SPIM_MISO, 1, 14)>;
			low-power-enable;
		};
	};
};

/ {
	aliases {
		led-strip = &led_strip;
	};
};

.conf file:

CONFIG_WS2812_STRIP_SPI=y
CONFIG_SPI=y

XIAO BLE pinout:

Related