Skip to content

Commit 8ca3999

Browse files
thedjnKhenrikbrixandersen
authored andcommitted
boards: Add chain length and colour mapping to LED strips
Adds chain length and colour mapping properties to LED strip devices on boards where these parameters are now required Signed-off-by: Jamie McCrae <spam@helper3000.net>
1 parent f4a3771 commit 8ca3999

File tree

6 files changed

+33
-0
lines changed

6 files changed

+33
-0
lines changed

boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <nordic/nrf52840_qiaa.dtsi>
99
#include "adafruit_itsybitsy_nrf52840-pinctrl.dtsi"
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
#include <zephyr/dt-bindings/led/led.h>
1112

1213
/ {
1314
model = "Adafruit ItsyBitsy nRF52840 Express";
@@ -107,6 +108,10 @@
107108
compatible = "apa,apa102";
108109
reg = <0>;
109110
spi-max-frequency = <5250000>;
111+
chain-length = <1>;
112+
color-mapping = <LED_COLOR_ID_BLUE
113+
LED_COLOR_ID_GREEN
114+
LED_COLOR_ID_RED>;
110115
};
111116
};
112117

boards/adafruit/trinket_m0/adafruit_trinket_m0.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <atmel/samd21.dtsi>
99
#include <atmel/samx2xx18.dtsi>
1010
#include "adafruit_trinket_m0-pinctrl.dtsi"
11+
#include <zephyr/dt-bindings/led/led.h>
1112

1213
/ {
1314
model = "Adafruit Trinket M0";
@@ -87,6 +88,10 @@
8788
compatible = "apa,apa102";
8889
reg = <0>;
8990
spi-max-frequency = <24000000>;
91+
chain-length = <1>;
92+
color-mapping = <LED_COLOR_ID_BLUE
93+
LED_COLOR_ID_GREEN
94+
LED_COLOR_ID_RED>;
9095
};
9196
};
9297

boards/bcdevices/plt_demo_v2/blueclover_plt_demo_v2_nrf52832.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <nordic/nrf52832_qfaa.dtsi>
99
#include "blueclover_plt_demo_v2_nrf52832-pinctrl.dtsi"
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
#include <zephyr/dt-bindings/led/led.h>
1112

1213
/ {
1314
model = "Blue Clover PLT Demo Board V2";
@@ -107,6 +108,10 @@
107108
compatible = "apa,apa102";
108109
reg = <0>;
109110
spi-max-frequency = <5250000>;
111+
chain-length = <4>;
112+
color-mapping = <LED_COLOR_ID_BLUE
113+
LED_COLOR_ID_GREEN
114+
LED_COLOR_ID_RED>;
110115
};
111116
};
112117

samples/drivers/led_strip/boards/96b_carbon_stm32f401xe.overlay

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <zephyr/dt-bindings/led/led.h>
8+
79
&spi2 {
810

911
lpd8806: lpd8806@0 {
1012
compatible = "greeled,lpd8806";
1113
reg = <0>;
1214
spi-max-frequency = <2000000>;
15+
chain-length = <1>;
16+
color-mapping = <LED_COLOR_ID_RED
17+
LED_COLOR_ID_GREEN
18+
LED_COLOR_ID_BLUE>;
1319
};
1420
};
1521

samples/drivers/led_strip/boards/nucleo_l432kc.overlay

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <zephyr/dt-bindings/led/led.h>
8+
79
&spi1 {
810

911
apa102: apa102@0 {
1012
compatible = "apa,apa102";
1113
reg = <0>;
1214
spi-max-frequency = <5250000>;
15+
chain-length = <1>;
16+
color-mapping = <LED_COLOR_ID_BLUE
17+
LED_COLOR_ID_GREEN
18+
LED_COLOR_ID_RED>;
1319
};
1420
};
1521

tests/drivers/build_all/display/app.overlay

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* (and be extended to test) real hardware.
1111
*/
1212

13+
#include <zephyr/dt-bindings/led/led.h>
14+
1315
/ {
1416
test {
1517
#address-cells = <1>;
@@ -83,6 +85,10 @@
8385
compatible = "greeled,lpd8806";
8486
reg = <2>;
8587
spi-max-frequency = <2000000>;
88+
chain-length = <1>;
89+
color-mapping = <LED_COLOR_ID_RED
90+
LED_COLOR_ID_GREEN
91+
LED_COLOR_ID_BLUE>;
8692
};
8793

8894
test_led_strip_1: ws2812_spi@3 {

0 commit comments

Comments
 (0)