aboutsummaryrefslogtreecommitdiff
path: root/doc/device-tree-bindings
diff options
context:
space:
mode:
authorTom Rini2023-12-13 11:25:18 -0500
committerTom Rini2023-12-13 11:35:17 -0500
commitbfe3c7b93b9e722340e0e4950e886a46ba41244e (patch)
tree7b468855cf6b8cbd1c68b91e96dcb5f5bc86ebdd /doc/device-tree-bindings
parentbe4a5f7c35685d228b3abc398a8d86c434274de5 (diff)
parentf9dc67d18ee258d08fa620248d97e206b1cb849f (diff)
Merge patch series "some LED patches"
To quote the author: I wanted to add support for ti,lp5562, and found an old submission from Doug. While trying to modify that to work in current U-Boot, I found a problem with the "move label handling to core" patches. Patch 1 is a prerequisite for the ti,lp5562 driver, which turned out to be needed by Christian as well. Patch 2 is an attempt at (quick-)fixing the mentioned "move label handling to core" problem. The real fix consists of changing remaining drivers to not bind the same driver to the top node as to the child nodes, but I can't test those other drivers. Patch 3 introduces a helper which should allow removing some boilerplate in most individual drivers, and 4,5 apply that in the gpio and pwm drivers. Converting remaining drivers is trivial, but left out for now. Finally patch 6 is the reworked lp5562 driver. While I've changed it to match existing DT bindings (with the goal of making it work with our .dts that is known to work with the linux driver), most of the logic is unchanged from Doug's original patch, so he is still listed as author. Changes in v2: Interchange order of patches 1 and 2, add a few R-bs, and try to trim down the commit message in patch 2.
Diffstat (limited to 'doc/device-tree-bindings')
-rw-r--r--doc/device-tree-bindings/leds/leds-lp5562.txt63
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/device-tree-bindings/leds/leds-lp5562.txt b/doc/device-tree-bindings/leds/leds-lp5562.txt
new file mode 100644
index 00000000000..4e0c742959a
--- /dev/null
+++ b/doc/device-tree-bindings/leds/leds-lp5562.txt
@@ -0,0 +1,63 @@
+LEDs connected to TI LP5562 controller
+
+This driver works with a TI LP5562 4-channel LED controller.
+CONFIG_LED_BLINK is supported using the controller engines. However
+there are only 3 engines available for the 4 channels. This means
+that the blue and white channels share the same engine. When both
+blue and white LEDs are set to blink, they will share the same blink
+rate. Changing the blink rate of the blue LED will affect the white
+LED and vice-versa. Manual on/off is handled independently for all 4
+channels.
+
+Required properties:
+ - compatible : should be "ti,lp5562".
+ - #address-cells : must be 1.
+ - #size-cells : must be 0.
+ - reg : LP5562 LED controller I2C address.
+
+Optional properties:
+ - enable-gpios : Enable GPIO
+ - clock-mode : u8, configures the clock mode:
+ - 0 # automode
+ - 1 # internal
+ - 2 # external
+
+Each LED is represented as a sub-node of the ti,lp5562 device.
+
+LED sub-node required properties:
+ - reg : Zero-based channel identifier:
+ - 0 red
+ - 1 green
+ - 2 blue
+ - 3 white
+
+LED sub-node optional properties:
+ - chan-name : name of LED
+ - max-cur : LED current at max brightness in 100uA steps (0x00 - 0xFF)
+ Default : 100 (10 mA)
+
+Example:
+ leds0: lp5562@30 {
+ compatible = "ti,lp5562";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ enable-gpios = <&gpio3 9 GPIO_ACTIVE_HIGH>;
+ reg = <0x30>;
+ clock-mode = /bits/8 <1>;
+
+ led@0 {
+ reg = <0>;
+ chan-name = "red";
+ max-cur = /bits/ 8 <200>; /* 20mA */
+ };
+ led@1 {
+ reg = <1>;
+ chan-name = "green";
+ max-cur = /bits/ 8 <200>; /* 20mA */
+ };
+ led@2 {
+ reg = <2>;
+ chan-name = "blue";
+ max-cur = /bits/ 8 <200>; /* 20mA */
+ };
+ };