| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/leds/onnn,ncp5623.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: ON Semiconductor NCP5623 multi-LED Driver |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Abdel Alkuor <[email protected]> |
| 11 |
|
| 12 |
description: |
| 13 |
NCP5623 Triple Output I2C Controlled LED Driver. |
| 14 |
https://www.onsemi.com/pdf/datasheet/ncp5623-d.pdf |
| 15 |
|
| 16 |
properties: |
| 17 |
compatible: |
| 18 |
enum: |
| 19 |
- onnn,ncp5623 |
| 20 |
|
| 21 |
reg: |
| 22 |
enum: |
| 23 |
- 0x38 |
| 24 |
- 0x39 |
| 25 |
|
| 26 |
multi-led: |
| 27 |
type: object |
| 28 |
$ref: leds-class-multicolor.yaml# |
| 29 |
unevaluatedProperties: false |
| 30 |
|
| 31 |
properties: |
| 32 |
"#address-cells": |
| 33 |
const: 1 |
| 34 |
|
| 35 |
"#size-cells": |
| 36 |
const: 0 |
| 37 |
|
| 38 |
patternProperties: |
| 39 |
"^led@[0-2]$": |
| 40 |
type: object |
| 41 |
$ref: common.yaml# |
| 42 |
unevaluatedProperties: false |
| 43 |
|
| 44 |
properties: |
| 45 |
reg: |
| 46 |
minimum: 0 |
| 47 |
maximum: 2 |
| 48 |
|
| 49 |
required: |
| 50 |
- reg |
| 51 |
- color |
| 52 |
|
| 53 |
required: |
| 54 |
- "#address-cells" |
| 55 |
- "#size-cells" |
| 56 |
|
| 57 |
required: |
| 58 |
- compatible |
| 59 |
- reg |
| 60 |
- multi-led |
| 61 |
|
| 62 |
additionalProperties: false |
| 63 |
|
| 64 |
examples: |
| 65 |
- | |
| 66 |
#include <dt-bindings/leds/common.h> |
| 67 |
|
| 68 |
i2c { |
| 69 |
#address-cells = <1>; |
| 70 |
#size-cells = <0>; |
| 71 |
|
| 72 |
led-controller@38 { |
| 73 |
compatible = "onnn,ncp5623"; |
| 74 |
reg = <0x38>; |
| 75 |
|
| 76 |
multi-led { |
| 77 |
color = <LED_COLOR_ID_RGB>; |
| 78 |
|
| 79 |
#address-cells = <1>; |
| 80 |
#size-cells = <0>; |
| 81 |
|
| 82 |
led@0 { |
| 83 |
reg = <0>; |
| 84 |
color = <LED_COLOR_ID_RED>; |
| 85 |
}; |
| 86 |
|
| 87 |
led@1 { |
| 88 |
reg = <1>; |
| 89 |
color = <LED_COLOR_ID_GREEN>; |
| 90 |
}; |
| 91 |
|
| 92 |
led@2 { |
| 93 |
reg = <2>; |
| 94 |
color = <LED_COLOR_ID_BLUE>; |
| 95 |
}; |
| 96 |
}; |
| 97 |
}; |
| 98 |
}; |