leds-aw2013.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. title: AWINIC AW2013 3-channel LED Driver
  7. maintainers:
  8. - Nikita Travkin <nikitos.tr@gmail.com>
  9. description: |
  10. The AW2013 is a 3-channel LED driver with I2C interface. It can control
  11. LED brightness with PWM output.
  12. properties:
  13. compatible:
  14. const: awinic,aw2013
  15. reg:
  16. maxItems: 1
  17. interrupts:
  18. maxItems: 1
  19. description: Open-drain, low active interrupt pin "INTN".
  20. Used to report completion of operations (power up, LED breath effects).
  21. vcc-supply:
  22. description: Regulator providing power to the "VCC" pin.
  23. vio-supply:
  24. description: Regulator providing power for pull-up of the I/O lines.
  25. "VIO1" in the typical application circuit example of the datasheet.
  26. Note that this regulator does not directly connect to AW2013, but is
  27. needed for the correct operation of the interrupt and I2C lines.
  28. "#address-cells":
  29. const: 1
  30. "#size-cells":
  31. const: 0
  32. patternProperties:
  33. "^led@[0-2]$":
  34. type: object
  35. $ref: common.yaml#
  36. unevaluatedProperties: false
  37. properties:
  38. reg:
  39. description: Index of the LED.
  40. minimum: 0
  41. maximum: 2
  42. required:
  43. - compatible
  44. - reg
  45. - "#address-cells"
  46. - "#size-cells"
  47. additionalProperties: false
  48. examples:
  49. - |
  50. #include <dt-bindings/gpio/gpio.h>
  51. #include <dt-bindings/interrupt-controller/irq.h>
  52. #include <dt-bindings/leds/common.h>
  53. i2c {
  54. #address-cells = <1>;
  55. #size-cells = <0>;
  56. led-controller@45 {
  57. compatible = "awinic,aw2013";
  58. reg = <0x45>;
  59. interrupts = <42 IRQ_TYPE_LEVEL_LOW>;
  60. #address-cells = <1>;
  61. #size-cells = <0>;
  62. vcc-supply = <&pm8916_l17>;
  63. led@0 {
  64. reg = <0>;
  65. led-max-microamp = <5000>;
  66. function = LED_FUNCTION_INDICATOR;
  67. color = <LED_COLOR_ID_RED>;
  68. };
  69. led@1 {
  70. reg = <1>;
  71. led-max-microamp = <5000>;
  72. function = LED_FUNCTION_INDICATOR;
  73. color = <LED_COLOR_ID_GREEN>;
  74. };
  75. led@2 {
  76. reg = <2>;
  77. led-max-microamp = <5000>;
  78. function = LED_FUNCTION_INDICATOR;
  79. color = <LED_COLOR_ID_BLUE>;
  80. };
  81. };
  82. };
  83. ...