blob: 4e0c742959a6273a5d2cf7cb0c44ddfca3d7bcb1 [file] [log] [blame]
Doug Zobel72b5a882023-11-17 12:38:11 +01001LEDs connected to TI LP5562 controller
2
3This driver works with a TI LP5562 4-channel LED controller.
4CONFIG_LED_BLINK is supported using the controller engines. However
5there are only 3 engines available for the 4 channels. This means
6that the blue and white channels share the same engine. When both
7blue and white LEDs are set to blink, they will share the same blink
8rate. Changing the blink rate of the blue LED will affect the white
9LED and vice-versa. Manual on/off is handled independently for all 4
10channels.
11
12Required properties:
13 - compatible : should be "ti,lp5562".
14 - #address-cells : must be 1.
15 - #size-cells : must be 0.
16 - reg : LP5562 LED controller I2C address.
17
18Optional properties:
19 - enable-gpios : Enable GPIO
20 - clock-mode : u8, configures the clock mode:
21 - 0 # automode
22 - 1 # internal
23 - 2 # external
24
25Each LED is represented as a sub-node of the ti,lp5562 device.
26
27LED sub-node required properties:
28 - reg : Zero-based channel identifier:
29 - 0 red
30 - 1 green
31 - 2 blue
32 - 3 white
33
34LED sub-node optional properties:
35 - chan-name : name of LED
36 - max-cur : LED current at max brightness in 100uA steps (0x00 - 0xFF)
37 Default : 100 (10 mA)
38
39Example:
40 leds0: lp5562@30 {
41 compatible = "ti,lp5562";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 enable-gpios = <&gpio3 9 GPIO_ACTIVE_HIGH>;
45 reg = <0x30>;
46 clock-mode = /bits/8 <1>;
47
48 led@0 {
49 reg = <0>;
50 chan-name = "red";
51 max-cur = /bits/ 8 <200>; /* 20mA */
52 };
53 led@1 {
54 reg = <1>;
55 chan-name = "green";
56 max-cur = /bits/ 8 <200>; /* 20mA */
57 };
58 led@2 {
59 reg = <2>;
60 chan-name = "blue";
61 max-cur = /bits/ 8 <200>; /* 20mA */
62 };
63 };