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>
This commit is contained in:
Jamie McCrae 2024-04-17 18:34:34 +01:00 committed by Henrik Brix Andersen
commit f4a3771f8e
3 changed files with 29 additions and 39 deletions

View file

@ -0,0 +1,24 @@
# Copyright (c) 2019, Linaro Limited
# Copyright (c) 2019, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
# Common fields for LED strips
properties:
chain-length:
type: int
required: true
description: |
The number of devices in the daisy-chain.
color-mapping:
type: array
required: true
description: |
Channel to color mapping (or pixel order).
For example a GRB channel to color mapping would be
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;

View file

@ -6,7 +6,8 @@ description: |
Driver bindings for daisy chains of a TLC5971 devices using a single device Driver bindings for daisy chains of a TLC5971 devices using a single device
tree node. Length of daisy chains in pixels is defined by the chain-length tree node. Length of daisy chains in pixels is defined by the chain-length
property. property. Note: chain-length must be a multiple of 4. A single TLC5971 device
supports 4 RGB LEDs.
The color order of the TLC5971 is BGR. Applications can provide custom mappings The color order of the TLC5971 is BGR. Applications can provide custom mappings
using the color-mapping property. using the color-mapping property.
@ -28,23 +29,4 @@ description: |
compatible: "ti,tlc5971" compatible: "ti,tlc5971"
include: spi-device.yaml include: [spi-device.yaml, led-strip.yaml]
properties:
chain-length:
type: int
required: true
description: |
The number of RGB LEDs in the daisy-chain.
Must be multiple of 4. A single TLC5971 device supports 4 RGB LEDs.
color-mapping:
type: array
required: true
description: |
Channel to color mapping (or pixel order).
For example a BGR channel to color mapping would be
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;

View file

@ -34,25 +34,9 @@ description: |
property. The pixel order depends on the model and it can be configured property. The pixel order depends on the model and it can be configured
using the color-mapping property. using the color-mapping property.
include: led-strip.yaml
properties: properties:
chain-length:
type: int
required: true
description: |
The number of devices in the daisy-chain.
color-mapping:
type: array
required: true
description: |
Channel to color mapping (or pixel order).
For example a GRB channel to color mapping would be
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
reset-delay: reset-delay:
type: int type: int
default: 8 default: 8