^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Crane Merchandising System - cr0014114 LED driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) -------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) This LED Board is widely used in vending machines produced
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) by Crane Merchandising Systems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - compatible: "crane,cr0014114"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) apply. In particular, "reg" and "spi-max-frequency" properties must be given.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) LED sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) - function :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - color :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - label :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) see Documentation/devicetree/bindings/leds/common.txt (deprecated)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - linux,default-trigger : (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) -------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #include <dt-bindings/leds/common.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) led-controller@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) compatible = "crane,cr0014114";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) reg = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) spi-max-frequency = <50000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #address-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #size-cells = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) led@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) reg = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) function = "coin";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) color = <LED_COLOR_ID_RED>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) led@1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) reg = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) function = "coin";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) color = <LED_COLOR_ID_GREEN>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) led@2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) reg = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) function = "coin";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) color = <LED_COLOR_ID_BLUE>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) led@3 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) reg = <3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) function = "bill";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) color = <LED_COLOR_ID_RED>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) led@4 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) reg = <4>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) function = "bill";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) color = <LED_COLOR_ID_GREEN>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) led@5 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) reg = <5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) function = "bill";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) color = <LED_COLOR_ID_BLUE>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) };