Skip to content

Commit

Permalink
Update nice_nano_v2.overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
rain2813 authored Mar 11, 2024
1 parent df0c201 commit 4485f32
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions config/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi3 {
&spi1 {
compatible = "nordic,nrf-spim";
/* Cannot be used together with i2c0. */
status = "okay";

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
Expand All @@ -32,10 +19,9 @@
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <26>; /* arbitrary; change at will */
chain-length = <26>; /* There are per-key RGB, but the first 6 are underglow */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
Expand Down

0 comments on commit 4485f32

Please sign in to comment.