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>
This commit is contained in:
Jamie McCrae 2024-04-17 19:51:55 +01:00 committed by Henrik Brix Andersen
commit 8ca399919b
6 changed files with 33 additions and 0 deletions

View file

@ -8,6 +8,7 @@
#include <nordic/nrf52840_qiaa.dtsi>
#include "adafruit_itsybitsy_nrf52840-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
model = "Adafruit ItsyBitsy nRF52840 Express";
@ -107,6 +108,10 @@
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <5250000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};

View file

@ -8,6 +8,7 @@
#include <atmel/samd21.dtsi>
#include <atmel/samx2xx18.dtsi>
#include "adafruit_trinket_m0-pinctrl.dtsi"
#include <zephyr/dt-bindings/led/led.h>
/ {
model = "Adafruit Trinket M0";
@ -87,6 +88,10 @@
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <24000000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};

View file

@ -8,6 +8,7 @@
#include <nordic/nrf52832_qfaa.dtsi>
#include "blueclover_plt_demo_v2_nrf52832-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
model = "Blue Clover PLT Demo Board V2";
@ -107,6 +108,10 @@
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <5250000>;
chain-length = <4>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};

View file

@ -4,12 +4,18 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/led/led.h>
&spi2 {
lpd8806: lpd8806@0 {
compatible = "greeled,lpd8806";
reg = <0>;
spi-max-frequency = <2000000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_RED
LED_COLOR_ID_GREEN
LED_COLOR_ID_BLUE>;
};
};

View file

@ -4,12 +4,18 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/led/led.h>
&spi1 {
apa102: apa102@0 {
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <5250000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};

View file

@ -10,6 +10,8 @@
* (and be extended to test) real hardware.
*/
#include <zephyr/dt-bindings/led/led.h>
/ {
test {
#address-cells = <1>;
@ -83,6 +85,10 @@
compatible = "greeled,lpd8806";
reg = <2>;
spi-max-frequency = <2000000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_RED
LED_COLOR_ID_GREEN
LED_COLOR_ID_BLUE>;
};
test_led_strip_1: ws2812_spi@3 {