leds-lp55xx.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. Binding for TI/National Semiconductor LP55xx Led Drivers
  2. Required properties:
  3. - compatible: one of
  4. national,lp5521
  5. national,lp5523
  6. ti,lp55231
  7. ti,lp5562
  8. ti,lp8501
  9. - reg: I2C slave address
  10. - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
  11. Each child has own specific current settings
  12. - led-cur: Current setting at each led channel (mA x10, 0 if led is not connected)
  13. - max-cur: Maximun current at each led channel.
  14. Optional properties:
  15. - enable-gpio: GPIO attached to the chip's enable pin
  16. - label: Used for naming LEDs
  17. - pwr-sel: LP8501 specific property. Power selection for output channels.
  18. 0: D1~9 are connected to VDD
  19. 1: D1~6 with VDD, D7~9 with VOUT
  20. 2: D1~6 with VOUT, D7~9 with VDD
  21. 3: D1~9 are connected to VOUT
  22. Alternatively, each child can have a specific channel name and trigger:
  23. - chan-name (optional): name of channel
  24. - linux,default-trigger (optional): see
  25. Documentation/devicetree/bindings/leds/common.txt
  26. example 1) LP5521
  27. 3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0',
  28. 'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger
  29. on channel 0.
  30. lp5521@32 {
  31. compatible = "national,lp5521";
  32. reg = <0x32>;
  33. label = "lp5521_pri";
  34. clock-mode = /bits/ 8 <2>;
  35. chan0 {
  36. led-cur = /bits/ 8 <0x2f>;
  37. max-cur = /bits/ 8 <0x5f>;
  38. linux,default-trigger = "heartbeat";
  39. };
  40. chan1 {
  41. led-cur = /bits/ 8 <0x2f>;
  42. max-cur = /bits/ 8 <0x5f>;
  43. };
  44. chan2 {
  45. led-cur = /bits/ 8 <0x2f>;
  46. max-cur = /bits/ 8 <0x5f>;
  47. };
  48. };
  49. example 2) LP5523
  50. 9 LED channels with specific name. Internal clock used.
  51. The I2C slave address is configurable with ASEL1 and ASEL0 pins.
  52. Available addresses are 32/33/34/35h.
  53. ASEL1 ASEL0 Address
  54. -------------------------
  55. GND GND 32h
  56. GND VEN 33h
  57. VEN GND 34h
  58. VEN VEN 35h
  59. lp5523@32 {
  60. compatible = "national,lp5523";
  61. reg = <0x32>;
  62. clock-mode = /bits/ 8 <1>;
  63. chan0 {
  64. chan-name = "d1";
  65. led-cur = /bits/ 8 <0x14>;
  66. max-cur = /bits/ 8 <0x20>;
  67. };
  68. chan1 {
  69. chan-name = "d2";
  70. led-cur = /bits/ 8 <0x14>;
  71. max-cur = /bits/ 8 <0x20>;
  72. };
  73. chan2 {
  74. chan-name = "d3";
  75. led-cur = /bits/ 8 <0x14>;
  76. max-cur = /bits/ 8 <0x20>;
  77. };
  78. chan3 {
  79. chan-name = "d4";
  80. led-cur = /bits/ 8 <0x14>;
  81. max-cur = /bits/ 8 <0x20>;
  82. };
  83. chan4 {
  84. chan-name = "d5";
  85. led-cur = /bits/ 8 <0x14>;
  86. max-cur = /bits/ 8 <0x20>;
  87. };
  88. chan5 {
  89. chan-name = "d6";
  90. led-cur = /bits/ 8 <0x14>;
  91. max-cur = /bits/ 8 <0x20>;
  92. };
  93. chan6 {
  94. chan-name = "d7";
  95. led-cur = /bits/ 8 <0x14>;
  96. max-cur = /bits/ 8 <0x20>;
  97. };
  98. chan7 {
  99. chan-name = "d8";
  100. led-cur = /bits/ 8 <0x14>;
  101. max-cur = /bits/ 8 <0x20>;
  102. };
  103. chan8 {
  104. chan-name = "d9";
  105. led-cur = /bits/ 8 <0x14>;
  106. max-cur = /bits/ 8 <0x20>;
  107. };
  108. };
  109. example 3) LP5562
  110. 4 channels are defined.
  111. lp5562@30 {
  112. compatible = "ti,lp5562";
  113. reg = <0x30>;
  114. clock-mode = /bits/8 <2>;
  115. chan0 {
  116. chan-name = "R";
  117. led-cur = /bits/ 8 <0x20>;
  118. max-cur = /bits/ 8 <0x60>;
  119. };
  120. chan1 {
  121. chan-name = "G";
  122. led-cur = /bits/ 8 <0x20>;
  123. max-cur = /bits/ 8 <0x60>;
  124. };
  125. chan2 {
  126. chan-name = "B";
  127. led-cur = /bits/ 8 <0x20>;
  128. max-cur = /bits/ 8 <0x60>;
  129. };
  130. chan3 {
  131. chan-name = "W";
  132. led-cur = /bits/ 8 <0x20>;
  133. max-cur = /bits/ 8 <0x60>;
  134. };
  135. };
  136. example 4) LP8501
  137. 9 channels are defined. The 'pwr-sel' is LP8501 specific property.
  138. Others are same as LP5523.
  139. lp8501@32 {
  140. compatible = "ti,lp8501";
  141. reg = <0x32>;
  142. clock-mode = /bits/ 8 <2>;
  143. pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
  144. chan0 {
  145. chan-name = "d1";
  146. led-cur = /bits/ 8 <0x14>;
  147. max-cur = /bits/ 8 <0x20>;
  148. };
  149. chan1 {
  150. chan-name = "d2";
  151. led-cur = /bits/ 8 <0x14>;
  152. max-cur = /bits/ 8 <0x20>;
  153. };
  154. chan2 {
  155. chan-name = "d3";
  156. led-cur = /bits/ 8 <0x14>;
  157. max-cur = /bits/ 8 <0x20>;
  158. };
  159. chan3 {
  160. chan-name = "d4";
  161. led-cur = /bits/ 8 <0x14>;
  162. max-cur = /bits/ 8 <0x20>;
  163. };
  164. chan4 {
  165. chan-name = "d5";
  166. led-cur = /bits/ 8 <0x14>;
  167. max-cur = /bits/ 8 <0x20>;
  168. };
  169. chan5 {
  170. chan-name = "d6";
  171. led-cur = /bits/ 8 <0x14>;
  172. max-cur = /bits/ 8 <0x20>;
  173. };
  174. chan6 {
  175. chan-name = "d7";
  176. led-cur = /bits/ 8 <0x14>;
  177. max-cur = /bits/ 8 <0x20>;
  178. };
  179. chan7 {
  180. chan-name = "d8";
  181. led-cur = /bits/ 8 <0x14>;
  182. max-cur = /bits/ 8 <0x20>;
  183. };
  184. chan8 {
  185. chan-name = "d9";
  186. led-cur = /bits/ 8 <0x14>;
  187. max-cur = /bits/ 8 <0x20>;
  188. };
  189. };