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:
parent
f4a3771f8e
commit
8ca399919b
6 changed files with 33 additions and 0 deletions
|
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue