ti,tca6507.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/ti,tca6507.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: TCA6507 LED and GPIO controller
  7. maintainers:
  8. - NeilBrown <neilb@suse.de>
  9. description:
  10. The TCA6507 is a programmable LED controller connected via I2C that can drive
  11. 7 separate lines either by holding them low, or by pulsing them with modulated
  12. width.
  13. properties:
  14. compatible:
  15. const: ti,tca6507
  16. reg:
  17. description: I2C slave address of the controller.
  18. maxItems: 1
  19. "#address-cells":
  20. const: 1
  21. "#size-cells":
  22. const: 0
  23. gpio-controller: true
  24. "#gpio-cells":
  25. const: 2
  26. gpio-line-names: true
  27. patternProperties:
  28. "^led@[0-6]$":
  29. type: object
  30. $ref: common.yaml#
  31. unevaluatedProperties: false
  32. properties:
  33. reg:
  34. minimum: 0
  35. maximum: 6
  36. required:
  37. - reg
  38. "^gpio@[0-6]$":
  39. type: object
  40. properties:
  41. compatible:
  42. const: gpio
  43. reg:
  44. minimum: 0
  45. maximum: 6
  46. additionalProperties: false
  47. required:
  48. - reg
  49. - compatible
  50. if:
  51. patternProperties:
  52. "^gpio@[0-6]$":
  53. type: object
  54. properties:
  55. compatible:
  56. contains:
  57. const: gpio
  58. then:
  59. required:
  60. - gpio-controller
  61. - "#gpio-cells"
  62. additionalProperties: false
  63. examples:
  64. - |
  65. #include <dt-bindings/gpio/gpio.h>
  66. #include <dt-bindings/leds/common.h>
  67. i2c {
  68. #address-cells = <1>;
  69. #size-cells = <0>;
  70. led-controller@45 {
  71. compatible = "ti,tca6507";
  72. #address-cells = <1>;
  73. #size-cells = <0>;
  74. reg = <0x45>;
  75. gpio-controller;
  76. #gpio-cells = <2>;
  77. gpio-line-names = "wifi_reset@6";
  78. led@0 {
  79. label = "gta04:red:aux";
  80. reg = <0x0>;
  81. };
  82. led@1 {
  83. label = "gta04:green:aux";
  84. reg = <0x1>;
  85. };
  86. led@3 {
  87. reg = <0x3>;
  88. color = <LED_COLOR_ID_RED>;
  89. function = LED_FUNCTION_POWER;
  90. linux,default-trigger = "default-on";
  91. };
  92. led@4 {
  93. color = <LED_COLOR_ID_GREEN>;
  94. function = LED_FUNCTION_POWER;
  95. reg = <0x4>;
  96. };
  97. gpio@6 {
  98. compatible = "gpio";
  99. reg = <0x6>;
  100. };
  101. };
  102. };
  103. ...