AWINIC AW2013 3-channel LED Driver

Schema identifier ($id): "http://devicetree.org/schemas/leds/leds-aw2013.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Nikita Travkin <nikitos.tr@gmail.com>"

The AW2013 is a 3-channel LED driver with I2C interface. It can control LED brightness with PWM output.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "awinic,aw2013"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Open-drain, low active interrupt pin "INTN". Used to report completion of operations (power up, LED breath effects).

vcc-supply — not listed as required here #

Regulator providing power to the "VCC" pin.

vio-supply — not listed as required here #

Regulator providing power for pull-up of the I/O lines. "VIO1" in the typical application circuit example of the datasheet. Note that this regulator does not directly connect to AW2013, but is needed for the correct operation of the interrupt and I2C lines.

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^led@[0-2]$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — not listed as required here

Index of the LED.

Minimum value (minimum): 0

Maximum value (maximum): 2

Required in this object (required): "compatible", "reg", "#address-cells", "#size-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    led-controller@45 {
        compatible = "awinic,aw2013";
        reg = <0x45>;
        interrupts = <42 IRQ_TYPE_LEVEL_LOW>;
        #address-cells = <1>;
        #size-cells = <0>;

        vcc-supply = <&pm8916_l17>;

        led@0 {
            reg = <0>;
            led-max-microamp = <5000>;
            function = LED_FUNCTION_INDICATOR;
            color = <LED_COLOR_ID_RED>;
        };

        led@1 {
            reg = <1>;
            led-max-microamp = <5000>;
            function = LED_FUNCTION_INDICATOR;
            color = <LED_COLOR_ID_GREEN>;
        };

        led@2 {
            reg = <2>;
            led-max-microamp = <5000>;
            function = LED_FUNCTION_INDICATOR;
            color = <LED_COLOR_ID_BLUE>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page