Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: add DT binding for BCM6358 LED controller

This adds device tree binding documentation for the Broadcom BCM6358 LED controller.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>

authored by

Álvaro Fernández Rojas and committed by
Bryan Wu
c87cc342 76931edd

+145
+145
Documentation/devicetree/bindings/leds/leds-bcm6358.txt
··· 1 + LEDs connected to Broadcom BCM6358 controller 2 + 3 + This controller is present on BCM6358 and BCM6368. 4 + In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller), 5 + which can either be controlled by software (exporting the 74x164 as spi-gpio. 6 + See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or 7 + by hardware using this driver. 8 + 9 + Required properties: 10 + - compatible : should be "brcm,bcm6358-leds". 11 + - #address-cells : must be 1. 12 + - #size-cells : must be 0. 13 + - reg : BCM6358 LED controller address and size. 14 + 15 + Optional properties: 16 + - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8. 17 + Default : 1 18 + - brcm,clk-dat-low : Boolean, makes clock and data signals active low. 19 + Default : false 20 + 21 + Each LED is represented as a sub-node of the brcm,bcm6358-leds device. 22 + 23 + LED sub-node required properties: 24 + - reg : LED pin number (only LEDs 0 to 31 are valid). 25 + 26 + LED sub-node optional properties: 27 + - label : see Documentation/devicetree/bindings/leds/common.txt 28 + - active-low : Boolean, makes LED active low. 29 + Default : false 30 + - default-state : see 31 + Documentation/devicetree/bindings/leds/leds-gpio.txt 32 + - linux,default-trigger : see 33 + Documentation/devicetree/bindings/leds/common.txt 34 + 35 + Examples: 36 + Scenario 1 : BCM6358 37 + leds0: led-controller@fffe00d0 { 38 + compatible = "brcm,bcm6358-leds"; 39 + #address-cells = <1>; 40 + #size-cells = <0>; 41 + reg = <0xfffe00d0 0x8>; 42 + 43 + alarm_white { 44 + reg = <0>; 45 + active-low; 46 + label = "white:alarm"; 47 + }; 48 + tv_white { 49 + reg = <2>; 50 + active-low; 51 + label = "white:tv"; 52 + }; 53 + tel_white { 54 + reg = <3>; 55 + active-low; 56 + label = "white:tel"; 57 + }; 58 + adsl_white { 59 + reg = <4>; 60 + active-low; 61 + label = "white:adsl"; 62 + }; 63 + }; 64 + 65 + Scenario 2 : BCM6368 66 + leds0: led-controller@100000d0 { 67 + compatible = "brcm,bcm6358-leds"; 68 + #address-cells = <1>; 69 + #size-cells = <0>; 70 + reg = <0x100000d0 0x8>; 71 + brcm,pol-low; 72 + brcm,clk-div = <4>; 73 + 74 + power_red { 75 + reg = <0>; 76 + active-low; 77 + label = "red:power"; 78 + }; 79 + power_green { 80 + reg = <1>; 81 + active-low; 82 + label = "green:power"; 83 + default-state = "on"; 84 + }; 85 + power_blue { 86 + reg = <2>; 87 + label = "blue:power"; 88 + }; 89 + broadband_red { 90 + reg = <3>; 91 + active-low; 92 + label = "red:broadband"; 93 + }; 94 + broadband_green { 95 + reg = <4>; 96 + label = "green:broadband"; 97 + }; 98 + broadband_blue { 99 + reg = <5>; 100 + active-low; 101 + label = "blue:broadband"; 102 + }; 103 + wireless_red { 104 + reg = <6>; 105 + active-low; 106 + label = "red:wireless"; 107 + }; 108 + wireless_green { 109 + reg = <7>; 110 + active-low; 111 + label = "green:wireless"; 112 + }; 113 + wireless_blue { 114 + reg = <8>; 115 + label = "blue:wireless"; 116 + }; 117 + phone_red { 118 + reg = <9>; 119 + active-low; 120 + label = "red:phone"; 121 + }; 122 + phone_green { 123 + reg = <10>; 124 + active-low; 125 + label = "green:phone"; 126 + }; 127 + phone_blue { 128 + reg = <11>; 129 + label = "blue:phone"; 130 + }; 131 + upgrading_red { 132 + reg = <12>; 133 + active-low; 134 + label = "red:upgrading"; 135 + }; 136 + upgrading_green { 137 + reg = <13>; 138 + active-low; 139 + label = "green:upgrading"; 140 + }; 141 + upgrading_blue { 142 + reg = <14>; 143 + label = "blue:upgrading"; 144 + }; 145 + };