Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/cznic,turris-omnia-leds.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: CZ.NIC's Turris Omnia LEDs driver
8
9maintainers:
10 - Marek Behún <kabel@kernel.org>
11
12description:
13 This module adds support for the RGB LEDs found on the front panel of the
14 Turris Omnia router. There are 12 RGB LEDs that are controlled by a
15 microcontroller that communicates via the I2C bus. Each LED is described
16 as a subnode of this I2C device.
17
18properties:
19 compatible:
20 const: cznic,turris-omnia-leds
21
22 reg:
23 description: I2C slave address of the microcontroller.
24 maxItems: 1
25
26 interrupts:
27 description:
28 Specifier for the global LED brightness changed by front button press
29 interrupt.
30 maxItems: 1
31
32 "#address-cells":
33 const: 1
34
35 "#size-cells":
36 const: 0
37
38patternProperties:
39 "^multi-led@[0-9a-b]$":
40 type: object
41 $ref: leds-class-multicolor.yaml#
42 unevaluatedProperties: false
43
44 description:
45 This node represents one of the RGB LED devices on Turris Omnia.
46 No subnodes need to be added for subchannels since this controller only
47 supports RGB LEDs.
48
49 properties:
50 reg:
51 minimum: 0
52 maximum: 11
53 description:
54 This property identifies one of the LEDs on the front panel of the
55 Turris Omnia router.
56
57 required:
58 - reg
59
60additionalProperties: false
61
62examples:
63 - |
64
65 #include <dt-bindings/interrupt-controller/irq.h>
66 #include <dt-bindings/leds/common.h>
67
68 i2c {
69 #address-cells = <1>;
70 #size-cells = <0>;
71
72 led-controller@2b {
73 compatible = "cznic,turris-omnia-leds";
74 reg = <0x2b>;
75 interrupts-extended = <&mcu 11 IRQ_TYPE_NONE>;
76 #address-cells = <1>;
77 #size-cells = <0>;
78
79 multi-led@0 {
80 /*
81 * No subnodes are needed, this controller only supports RGB
82 * LEDs.
83 */
84 reg = <0>;
85 color = <LED_COLOR_ID_MULTI>;
86 function = LED_FUNCTION_POWER;
87 linux,default-trigger = "heartbeat";
88 };
89
90 multi-led@a {
91 reg = <0xa>;
92 color = <LED_COLOR_ID_MULTI>;
93 function = LED_FUNCTION_INDICATOR;
94 function-enumerator = <1>;
95 };
96 };
97 };
98
99...