Skip to content

Commit cff33a6

Browse files
committed
dts: bindings: led: introduce leds-group-multicolor binding
The leds-group-multicolor binding allows to combines several monochromatic LEDs into one multi-color LED. Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
1 parent 8f68c38 commit cff33a6

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) 2025 Seagate Technology LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
This bindings allow to combines several monochromatic LEDs into one
6+
multi-color LED.
7+
8+
Here is an example that defines an RGB LED with a group of monochromatic
9+
PWM LEDs. Note that the pwms property definition handle depends on the PWM
10+
controller model. In this example, an STM32 PWM controller is assumed.
11+
12+
/ {
13+
monochromatic-leds {
14+
compatible = "pwm-leds";
15+
16+
red_pwm_led: led-0 {
17+
pwms = <&pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
18+
};
19+
20+
green_pwm_led: led-1 {
21+
pwms = <&pwm2 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
22+
};
23+
24+
blue_pwm_led: led-2 {
25+
pwms = <&pwm3 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
26+
};
27+
};
28+
29+
multi-led {
30+
compatible = "leds-group-multicolor";
31+
32+
leds = <&red_pwm_led>, <&green_pwm_led>, <&blue_pwm_led>;
33+
label = "RGB LED";
34+
color-mapping = <LED_COLOR_ID_RED>,
35+
<LED_COLOR_ID_GREEN>,
36+
<LED_COLOR_ID_BLUE>;
37+
};
38+
};
39+
40+
compatible: "leds-group-multicolor"
41+
42+
include: led-node.yaml
43+
44+
properties:
45+
leds:
46+
required: true
47+
type: phandles
48+
description: |
49+
References to monochromatic LED nodes.

0 commit comments

Comments
 (0)