Skip to content

Commit 9f6b72e

Browse files
TravMuravpavelmachek
authored andcommitted
dt-bindings: leds: Add binding for aw2013
Add YAML devicetree binding for AWINIC AW2013 3-channel led driver Signed-off-by: Nikita Travkin <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent c85c7cd commit 9f6b72e

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: AWINIC AW2013 3-channel LED Driver
8+
9+
maintainers:
10+
- Nikita Travkin <[email protected]>
11+
12+
description: |
13+
The AW2013 is a 3-channel LED driver with I2C interface. It can control
14+
LED brightness with PWM output.
15+
16+
properties:
17+
compatible:
18+
const: awinic,aw2013
19+
20+
reg:
21+
maxItems: 1
22+
23+
vcc-supply:
24+
description: Regulator providing power to the "VCC" pin.
25+
26+
"#address-cells":
27+
const: 1
28+
29+
"#size-cells":
30+
const: 0
31+
32+
patternProperties:
33+
"^led@[0-2]$":
34+
type: object
35+
allOf:
36+
- $ref: common.yaml#
37+
38+
properties:
39+
reg:
40+
description: Index of the LED.
41+
minimum: 0
42+
maximum: 2
43+
44+
required:
45+
- compatible
46+
- reg
47+
- "#address-cells"
48+
- "#size-cells"
49+
50+
additionalProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/gpio/gpio.h>
55+
#include <dt-bindings/leds/common.h>
56+
57+
i2c0 {
58+
#address-cells = <1>;
59+
#size-cells = <0>;
60+
61+
led-controller@45 {
62+
compatible = "awinic,aw2013";
63+
reg = <0x45>;
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
67+
vcc-supply = <&pm8916_l17>;
68+
69+
led@0 {
70+
reg = <0>;
71+
led-max-microamp = <5000>;
72+
function = LED_FUNCTION_INDICATOR;
73+
color = <LED_COLOR_ID_RED>;
74+
};
75+
76+
led@1 {
77+
reg = <1>;
78+
led-max-microamp = <5000>;
79+
function = LED_FUNCTION_INDICATOR;
80+
color = <LED_COLOR_ID_GREEN>;
81+
};
82+
83+
led@2 {
84+
reg = <2>;
85+
led-max-microamp = <5000>;
86+
function = LED_FUNCTION_INDICATOR;
87+
color = <LED_COLOR_ID_BLUE>;
88+
};
89+
};
90+
};
91+
...

0 commit comments

Comments
 (0)