Sofle Shield: Add underglow support
Update sofle underglow to zephyr 3
This commit is contained in:
parent
185457bc11
commit
c244a5cb7b
7 changed files with 155 additions and 0 deletions
|
@ -46,4 +46,10 @@ endchoice
|
||||||
|
|
||||||
endif # LVGL
|
endif # LVGL
|
||||||
|
|
||||||
|
if ZMK_RGB_UNDERGLOW
|
||||||
|
|
||||||
|
config WS2812_STRIP
|
||||||
|
default y
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
35
app/boards/shields/sofle/boards/nice_nano.overlay
Normal file
35
app/boards/shields/sofle/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
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";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <29>; /* 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
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
35
app/boards/shields/sofle/boards/nice_nano_v2.overlay
Normal file
35
app/boards/shields/sofle/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
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";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <29>; /* 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
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
35
app/boards/shields/sofle/boards/nrfmicro_11.overlay
Normal file
35
app/boards/shields/sofle/boards/nrfmicro_11.overlay
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
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";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <29>; /* 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
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
35
app/boards/shields/sofle/boards/nrfmicro_13.overlay
Normal file
35
app/boards/shields/sofle/boards/nrfmicro_13.overlay
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
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";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <29>; /* 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
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,3 +7,11 @@
|
||||||
# Uncomment these two lines to add support for encoders
|
# Uncomment these two lines to add support for encoders
|
||||||
# CONFIG_EC11=y
|
# CONFIG_EC11=y
|
||||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
|
# Uncomment this line below to add rgb underglow / backlight support
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
|
|
||||||
|
# Uncomment the line below to disable external power toggling by the underglow.
|
||||||
|
# By default toggling the underglow on and off also toggles external power
|
||||||
|
# on and off. This also causes the display to turn off.
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
|
||||||
|
|
|
@ -9,6 +9,7 @@ features:
|
||||||
- keys
|
- keys
|
||||||
- display
|
- display
|
||||||
- encoder
|
- encoder
|
||||||
|
- underglow
|
||||||
siblings:
|
siblings:
|
||||||
- sofle_left
|
- sofle_left
|
||||||
- sofle_right
|
- sofle_right
|
||||||
|
|
Loading…
Add table
Reference in a new issue