Skip to content

Commit f4a3771

Browse files
thedjnKhenrikbrixandersen
authored andcommitted
dts: bindings: led_strip: Add common binding
Adds a common binding with a chain length and colour ordering property Signed-off-by: Jamie McCrae <spam@helper3000.net>
1 parent 01b4f9d commit f4a3771

File tree

3 files changed

+29
-39
lines changed

3 files changed

+29
-39
lines changed

dts/bindings/led_strip/led-strip.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2019, Linaro Limited
2+
# Copyright (c) 2019, Nordic Semiconductor ASA
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Common fields for LED strips
6+
7+
properties:
8+
chain-length:
9+
type: int
10+
required: true
11+
description: |
12+
The number of devices in the daisy-chain.
13+
14+
color-mapping:
15+
type: array
16+
required: true
17+
description: |
18+
Channel to color mapping (or pixel order).
19+
20+
For example a GRB channel to color mapping would be
21+
22+
color-mapping = <LED_COLOR_ID_GREEN
23+
LED_COLOR_ID_RED
24+
LED_COLOR_ID_BLUE>;

dts/bindings/led_strip/ti,tlc5971.yaml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ description: |
66
77
Driver bindings for daisy chains of a TLC5971 devices using a single device
88
tree node. Length of daisy chains in pixels is defined by the chain-length
9-
property.
9+
property. Note: chain-length must be a multiple of 4. A single TLC5971 device
10+
supports 4 RGB LEDs.
1011
1112
The color order of the TLC5971 is BGR. Applications can provide custom mappings
1213
using the color-mapping property.
@@ -28,23 +29,4 @@ description: |
2829
2930
compatible: "ti,tlc5971"
3031

31-
include: spi-device.yaml
32-
33-
properties:
34-
chain-length:
35-
type: int
36-
required: true
37-
description: |
38-
The number of RGB LEDs in the daisy-chain.
39-
Must be multiple of 4. A single TLC5971 device supports 4 RGB LEDs.
40-
41-
color-mapping:
42-
type: array
43-
required: true
44-
description: |
45-
Channel to color mapping (or pixel order).
46-
For example a BGR channel to color mapping would be
47-
48-
color-mapping = <LED_COLOR_ID_BLUE
49-
LED_COLOR_ID_GREEN
50-
LED_COLOR_ID_RED>;
32+
include: [spi-device.yaml, led-strip.yaml]

dts/bindings/led_strip/ws2812.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,9 @@ description: |
3434
property. The pixel order depends on the model and it can be configured
3535
using the color-mapping property.
3636
37-
properties:
38-
chain-length:
39-
type: int
40-
required: true
41-
description: |
42-
The number of devices in the daisy-chain.
43-
44-
color-mapping:
45-
type: array
46-
required: true
47-
description: |
48-
Channel to color mapping (or pixel order).
49-
50-
For example a GRB channel to color mapping would be
51-
52-
color-mapping = <LED_COLOR_ID_GREEN
53-
LED_COLOR_ID_RED
54-
LED_COLOR_ID_BLUE>;
37+
include: led-strip.yaml
5538

39+
properties:
5640
reset-delay:
5741
type: int
5842
default: 8

0 commit comments

Comments
 (0)