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