Skip to content

Commit

Permalink
PR Checkout: Update spi definition for Zephyr 3.2+ compatibility mmcc…
Browse files Browse the repository at this point in the history
  • Loading branch information
DaisukeAok committed May 1, 2024
1 parent e6d47a6 commit 99943f0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 18 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added config/.DS_Store
Binary file not shown.
32 changes: 23 additions & 9 deletions config/boards/shields/hillside46/boards/nice_nano.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@

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

&spi1 {
&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 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI def, but not used by ws2812 driver.
sck-pin = <5>;
miso-pin = <7>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
Expand All @@ -24,10 +38,10 @@
chain-length = <4>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};

/ {
Expand Down
32 changes: 23 additions & 9 deletions config/boards/shields/hillside46/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@

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

&spi1 {
&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 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI def, but not used by ws2812 driver.
sck-pin = <5>;
miso-pin = <7>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
Expand All @@ -24,10 +38,10 @@
chain-length = <4>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};

/ {
Expand Down

0 comments on commit 99943f0

Please sign in to comment.