xref: /linux/Documentation/devicetree/bindings/leds/leds-aw2013.yaml (revision 086e9074f52f6f623e1d6d02edc3cb661bb04f4e)
19f6b72e4SNikita Travkin# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
29f6b72e4SNikita Travkin%YAML 1.2
39f6b72e4SNikita Travkin---
49f6b72e4SNikita Travkin$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml#
59f6b72e4SNikita Travkin$schema: http://devicetree.org/meta-schemas/core.yaml#
69f6b72e4SNikita Travkin
79f6b72e4SNikita Travkintitle: AWINIC AW2013 3-channel LED Driver
89f6b72e4SNikita Travkin
99f6b72e4SNikita Travkinmaintainers:
109f6b72e4SNikita Travkin  - Nikita Travkin <nikitos.tr@gmail.com>
119f6b72e4SNikita Travkin
129f6b72e4SNikita Travkindescription: |
139f6b72e4SNikita Travkin  The AW2013 is a 3-channel LED driver with I2C interface. It can control
149f6b72e4SNikita Travkin  LED brightness with PWM output.
159f6b72e4SNikita Travkin
169f6b72e4SNikita Travkinproperties:
179f6b72e4SNikita Travkin  compatible:
189f6b72e4SNikita Travkin    const: awinic,aw2013
199f6b72e4SNikita Travkin
209f6b72e4SNikita Travkin  reg:
219f6b72e4SNikita Travkin    maxItems: 1
229f6b72e4SNikita Travkin
239f6b72e4SNikita Travkin  vcc-supply:
249f6b72e4SNikita Travkin    description: Regulator providing power to the "VCC" pin.
259f6b72e4SNikita Travkin
269f6b72e4SNikita Travkin  "#address-cells":
279f6b72e4SNikita Travkin    const: 1
289f6b72e4SNikita Travkin
299f6b72e4SNikita Travkin  "#size-cells":
309f6b72e4SNikita Travkin    const: 0
319f6b72e4SNikita Travkin
329f6b72e4SNikita TravkinpatternProperties:
339f6b72e4SNikita Travkin  "^led@[0-2]$":
349f6b72e4SNikita Travkin    type: object
35*086e9074SRob Herring    $ref: common.yaml#
369f6b72e4SNikita Travkin
379f6b72e4SNikita Travkin    properties:
389f6b72e4SNikita Travkin      reg:
399f6b72e4SNikita Travkin        description: Index of the LED.
409f6b72e4SNikita Travkin        minimum: 0
419f6b72e4SNikita Travkin        maximum: 2
429f6b72e4SNikita Travkin
439f6b72e4SNikita Travkinrequired:
449f6b72e4SNikita Travkin  - compatible
459f6b72e4SNikita Travkin  - reg
469f6b72e4SNikita Travkin  - "#address-cells"
479f6b72e4SNikita Travkin  - "#size-cells"
489f6b72e4SNikita Travkin
499f6b72e4SNikita TravkinadditionalProperties: false
509f6b72e4SNikita Travkin
519f6b72e4SNikita Travkinexamples:
529f6b72e4SNikita Travkin  - |
539f6b72e4SNikita Travkin    #include <dt-bindings/gpio/gpio.h>
549f6b72e4SNikita Travkin    #include <dt-bindings/leds/common.h>
559f6b72e4SNikita Travkin
569f6b72e4SNikita Travkin    i2c0 {
579f6b72e4SNikita Travkin        #address-cells = <1>;
589f6b72e4SNikita Travkin        #size-cells = <0>;
599f6b72e4SNikita Travkin
609f6b72e4SNikita Travkin        led-controller@45 {
619f6b72e4SNikita Travkin            compatible = "awinic,aw2013";
629f6b72e4SNikita Travkin            reg = <0x45>;
639f6b72e4SNikita Travkin            #address-cells = <1>;
649f6b72e4SNikita Travkin            #size-cells = <0>;
659f6b72e4SNikita Travkin
669f6b72e4SNikita Travkin            vcc-supply = <&pm8916_l17>;
679f6b72e4SNikita Travkin
689f6b72e4SNikita Travkin            led@0 {
699f6b72e4SNikita Travkin                reg = <0>;
709f6b72e4SNikita Travkin                led-max-microamp = <5000>;
719f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
729f6b72e4SNikita Travkin                color = <LED_COLOR_ID_RED>;
739f6b72e4SNikita Travkin            };
749f6b72e4SNikita Travkin
759f6b72e4SNikita Travkin            led@1 {
769f6b72e4SNikita Travkin                reg = <1>;
779f6b72e4SNikita Travkin                led-max-microamp = <5000>;
789f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
799f6b72e4SNikita Travkin                color = <LED_COLOR_ID_GREEN>;
809f6b72e4SNikita Travkin            };
819f6b72e4SNikita Travkin
829f6b72e4SNikita Travkin            led@2 {
839f6b72e4SNikita Travkin                reg = <2>;
849f6b72e4SNikita Travkin                led-max-microamp = <5000>;
859f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
869f6b72e4SNikita Travkin                color = <LED_COLOR_ID_BLUE>;
879f6b72e4SNikita Travkin            };
889f6b72e4SNikita Travkin        };
899f6b72e4SNikita Travkin    };
909f6b72e4SNikita Travkin...
91