xref: /linux/Documentation/devicetree/bindings/leds/leds-aw2013.yaml (revision 03c11eb3b16dc0058589751dfd91f254be2be613)
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
239422bcf1SStephan Gerhold  interrupts:
249422bcf1SStephan Gerhold    maxItems: 1
259422bcf1SStephan Gerhold    description: Open-drain, low active interrupt pin "INTN".
269422bcf1SStephan Gerhold      Used to report completion of operations (power up, LED breath effects).
279422bcf1SStephan Gerhold
289f6b72e4SNikita Travkin  vcc-supply:
299f6b72e4SNikita Travkin    description: Regulator providing power to the "VCC" pin.
309f6b72e4SNikita Travkin
31*2cccb179SStephan Gerhold  vio-supply:
32*2cccb179SStephan Gerhold    description: Regulator providing power for pull-up of the I/O lines.
33*2cccb179SStephan Gerhold      "VIO1" in the typical application circuit example of the datasheet.
34*2cccb179SStephan Gerhold      Note that this regulator does not directly connect to AW2013, but is
35*2cccb179SStephan Gerhold      needed for the correct operation of the interrupt and I2C lines.
36*2cccb179SStephan Gerhold
379f6b72e4SNikita Travkin  "#address-cells":
389f6b72e4SNikita Travkin    const: 1
399f6b72e4SNikita Travkin
409f6b72e4SNikita Travkin  "#size-cells":
419f6b72e4SNikita Travkin    const: 0
429f6b72e4SNikita Travkin
439f6b72e4SNikita TravkinpatternProperties:
449f6b72e4SNikita Travkin  "^led@[0-2]$":
459f6b72e4SNikita Travkin    type: object
46086e9074SRob Herring    $ref: common.yaml#
47fe469e83SKrzysztof Kozlowski    unevaluatedProperties: false
489f6b72e4SNikita Travkin
499f6b72e4SNikita Travkin    properties:
509f6b72e4SNikita Travkin      reg:
519f6b72e4SNikita Travkin        description: Index of the LED.
529f6b72e4SNikita Travkin        minimum: 0
539f6b72e4SNikita Travkin        maximum: 2
549f6b72e4SNikita Travkin
559f6b72e4SNikita Travkinrequired:
569f6b72e4SNikita Travkin  - compatible
579f6b72e4SNikita Travkin  - reg
589f6b72e4SNikita Travkin  - "#address-cells"
599f6b72e4SNikita Travkin  - "#size-cells"
609f6b72e4SNikita Travkin
619f6b72e4SNikita TravkinadditionalProperties: false
629f6b72e4SNikita Travkin
639f6b72e4SNikita Travkinexamples:
649f6b72e4SNikita Travkin  - |
659f6b72e4SNikita Travkin    #include <dt-bindings/gpio/gpio.h>
669422bcf1SStephan Gerhold    #include <dt-bindings/interrupt-controller/irq.h>
679f6b72e4SNikita Travkin    #include <dt-bindings/leds/common.h>
689f6b72e4SNikita Travkin
6920a72af1SRob Herring    i2c {
709f6b72e4SNikita Travkin        #address-cells = <1>;
719f6b72e4SNikita Travkin        #size-cells = <0>;
729f6b72e4SNikita Travkin
739f6b72e4SNikita Travkin        led-controller@45 {
749f6b72e4SNikita Travkin            compatible = "awinic,aw2013";
759f6b72e4SNikita Travkin            reg = <0x45>;
769422bcf1SStephan Gerhold            interrupts = <42 IRQ_TYPE_LEVEL_LOW>;
779f6b72e4SNikita Travkin            #address-cells = <1>;
789f6b72e4SNikita Travkin            #size-cells = <0>;
799f6b72e4SNikita Travkin
809f6b72e4SNikita Travkin            vcc-supply = <&pm8916_l17>;
819f6b72e4SNikita Travkin
829f6b72e4SNikita Travkin            led@0 {
839f6b72e4SNikita Travkin                reg = <0>;
849f6b72e4SNikita Travkin                led-max-microamp = <5000>;
859f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
869f6b72e4SNikita Travkin                color = <LED_COLOR_ID_RED>;
879f6b72e4SNikita Travkin            };
889f6b72e4SNikita Travkin
899f6b72e4SNikita Travkin            led@1 {
909f6b72e4SNikita Travkin                reg = <1>;
919f6b72e4SNikita Travkin                led-max-microamp = <5000>;
929f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
939f6b72e4SNikita Travkin                color = <LED_COLOR_ID_GREEN>;
949f6b72e4SNikita Travkin            };
959f6b72e4SNikita Travkin
969f6b72e4SNikita Travkin            led@2 {
979f6b72e4SNikita Travkin                reg = <2>;
989f6b72e4SNikita Travkin                led-max-microamp = <5000>;
999f6b72e4SNikita Travkin                function = LED_FUNCTION_INDICATOR;
1009f6b72e4SNikita Travkin                color = <LED_COLOR_ID_BLUE>;
1019f6b72e4SNikita Travkin            };
1029f6b72e4SNikita Travkin        };
1039f6b72e4SNikita Travkin    };
1049f6b72e4SNikita Travkin...
105