| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: LEDs connected to tlc59116 or tlc59108 |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Andrew Lunn <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
enum: |
| 15 |
- ti,tlc59108 |
| 16 |
- ti,tlc59116 |
| 17 |
|
| 18 |
reg: |
| 19 |
maxItems: 1 |
| 20 |
|
| 21 |
"#address-cells": |
| 22 |
const: 1 |
| 23 |
|
| 24 |
"#size-cells": |
| 25 |
const: 0 |
| 26 |
|
| 27 |
patternProperties: |
| 28 |
"^led@[0-9a-f]$": |
| 29 |
type: object |
| 30 |
$ref: common.yaml# |
| 31 |
properties: |
| 32 |
reg: |
| 33 |
items: |
| 34 |
minimum: 0 |
| 35 |
maximum: 15 |
| 36 |
|
| 37 |
unevaluatedProperties: false |
| 38 |
|
| 39 |
required: |
| 40 |
- compatible |
| 41 |
- reg |
| 42 |
- "#address-cells" |
| 43 |
- "#size-cells" |
| 44 |
|
| 45 |
allOf: |
| 46 |
- if: |
| 47 |
properties: |
| 48 |
compatible: |
| 49 |
contains: |
| 50 |
const: ti,tlc59108 |
| 51 |
then: |
| 52 |
patternProperties: |
| 53 |
"^led@[0-9a-f]$": |
| 54 |
properties: |
| 55 |
reg: |
| 56 |
items: |
| 57 |
maximum: 7 |
| 58 |
|
| 59 |
additionalProperties: false |
| 60 |
|
| 61 |
examples: |
| 62 |
- | |
| 63 |
i2c { |
| 64 |
#address-cells = <1>; |
| 65 |
#size-cells = <0>; |
| 66 |
|
| 67 |
led-controller@68 { |
| 68 |
compatible = "ti,tlc59116"; |
| 69 |
reg = <0x68>; |
| 70 |
#address-cells = <1>; |
| 71 |
#size-cells = <0>; |
| 72 |
|
| 73 |
led@0 { |
| 74 |
reg = <0x0>; |
| 75 |
label = "wrt1900ac:amber:wan"; |
| 76 |
}; |
| 77 |
|
| 78 |
led@2 { |
| 79 |
reg = <0x2>; |
| 80 |
label = "wrt1900ac:white:2g"; |
| 81 |
}; |
| 82 |
|
| 83 |
led@9 { |
| 84 |
reg = <0x9>; |
| 85 |
label = "wrt1900ac:green:alive"; |
| 86 |
linux,default-trigger = "heartbeat"; |
| 87 |
}; |
| 88 |
}; |
| 89 |
}; |
| 90 |
|