Doug Zobel | 72b5a88 | 2023-11-17 12:38:11 +0100 | [diff] [blame] | 1 | LEDs connected to TI LP5562 controller |
| 2 | |
| 3 | This driver works with a TI LP5562 4-channel LED controller. |
| 4 | CONFIG_LED_BLINK is supported using the controller engines. However |
| 5 | there are only 3 engines available for the 4 channels. This means |
| 6 | that the blue and white channels share the same engine. When both |
| 7 | blue and white LEDs are set to blink, they will share the same blink |
| 8 | rate. Changing the blink rate of the blue LED will affect the white |
| 9 | LED and vice-versa. Manual on/off is handled independently for all 4 |
| 10 | channels. |
| 11 | |
| 12 | Required 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 | |
| 18 | Optional properties: |
| 19 | - enable-gpios : Enable GPIO |
| 20 | - clock-mode : u8, configures the clock mode: |
| 21 | - 0 # automode |
| 22 | - 1 # internal |
| 23 | - 2 # external |
| 24 | |
| 25 | Each LED is represented as a sub-node of the ti,lp5562 device. |
| 26 | |
| 27 | LED sub-node required properties: |
| 28 | - reg : Zero-based channel identifier: |
| 29 | - 0 red |
| 30 | - 1 green |
| 31 | - 2 blue |
| 32 | - 3 white |
| 33 | |
| 34 | LED 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 | |
| 39 | Example: |
| 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 | }; |