Unable to change the default SPIM_MOSI pin in led_strip example

I was trying out the led_strip example in the zephyr samples on my nrf52dk/nrf52832 board with a single external WS2812B neopixel led connected at P0.23, using the  WS2812B-SPI driver which is working perfectly fine.

But then as a part of learning exercise, I connected the WS2812B neopixel led to P0.07 and added pin control node to the existing boards/nrf52dk_nrf52832.overlay file. Although the program is compiling, but the the neopixel is not turning on at P0.07.

I have attached the overlay file code here for reference. Kindly please let me know, what I maybe doing wrong, as I am just a beginner.

/*
 * Copyright (c) 2019, Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

#include "../nrf52-bindings.h"




&arduino_spi { /* MOSI on D11 / P0.23 */
	

	compatible = "nordic,nrf-spim";
	pinctrl-0 = <&spi2_default_alt>;
	pinctrl-1 = <&spi2_default_alt>;
	pinctrl-names = "default","sleep";
	status = "okay";

	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 = <1>; /* 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_alt:spi2_default_alt{
		group1 {
			psels = <NRF_PSEL(SPIM_MOSI, 0, 07)>;
		};
	};
	spi2_sleep_alt:spi2_sleep_alt{
		group1 {
			psels = <NRF_PSEL(SPIM_MOSI, 0, 07)>;
			low-power-enable;
		};
	};
};

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

Parents Reply Children
No Data
Related