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