xref: /freebsd/sys/contrib/device-tree/Bindings/leds/leds-spi-byte.txt (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
1* Single Byte SPI LED Device Driver.
2
3The driver can be used for controllers with a very simple SPI protocol:
4- one LED is controlled by a single byte on MOSI
5- the value of the byte gives the brightness between two values (lowest to
6  highest)
7- no return value is necessary (no MISO signal)
8
9The value for lowest and highest brightness is dependent on the device and
10therefore on the compatible string.
11
12Depending on the compatible string some special functions (like hardware
13accelerated blinking) might can be supported too.
14
15The driver currently only supports one LED. The properties of the LED are
16configured in a sub-node in the device node.
17
18Required properties:
19- compatible: should be one of
20   * "ubnt,acb-spi-led"		microcontroller (SONiX 8F26E611LA) based device
21				used for example in Ubiquiti airCube ISP
22
23Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
24apply.
25
26LED sub-node properties:
27- label:
28	see Documentation/devicetree/bindings/leds/common.txt
29- default-state:
30	see Documentation/devicetree/bindings/leds/common.txt
31	Only "on" and "off" are supported.
32
33Example:
34
35led-controller@0 {
36	compatible = "ubnt,acb-spi-led";
37	reg = <0>;
38	spi-max-frequency = <100000>;
39
40	led {
41		label = "white:status";
42		default-state = "on";
43	};
44};
45