]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - Documentation/devicetree/bindings/leds/leds-bcm6328.txt
ARM, locking/atomics: Implement _relaxed variants of atomic[64]_{inc,dec}
[karo-tx-linux.git] / Documentation / devicetree / bindings / leds / leds-bcm6328.txt
1 LEDs connected to Broadcom BCM6328 controller
2
3 This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
4 In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
5 However, on some devices there are Serial LEDs (LEDs connected to a 74x164
6 controller), which can either be controlled by software (exporting the 74x164
7 as spi-gpio. See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
8 by hardware using this driver.
9 Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
10 exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
11 controlled, so the only chance to keep them working is by using this driver.
12
13 BCM6328 LED controller has a HWDIS register, which controls whether a LED
14 should be controlled by a hardware signal instead of the MODE register value,
15 with 0 meaning hardware control enabled and 1 hardware control disabled. This
16 is usually 1:1 for hardware to LED signals, but through the activity/link
17 registers you have some limited control over rerouting the LEDs (as
18 explained later in brcm,link-signal-sources). Even if a LED is hardware
19 controlled you are still able to make it blink or light it up if it isn't,
20 but you can't turn it off if the hardware decides to light it up. For this
21 reason, hardware controlled LEDs aren't registered as LED class devices.
22
23 Required properties:
24   - compatible : should be "brcm,bcm6328-leds".
25   - #address-cells : must be 1.
26   - #size-cells : must be 0.
27   - reg : BCM6328 LED controller address and size.
28
29 Optional properties:
30   - brcm,serial-leds : Boolean, enables Serial LEDs.
31     Default : false
32
33 Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
34
35 LED sub-node required properties:
36   - reg : LED pin number (only LEDs 0 to 23 are valid).
37
38 LED sub-node optional properties:
39   a) Optional properties for sub-nodes related to software controlled LEDs:
40     - label : see Documentation/devicetree/bindings/leds/common.txt
41     - active-low : Boolean, makes LED active low.
42       Default : false
43     - default-state : see
44       Documentation/devicetree/bindings/leds/leds-gpio.txt
45     - linux,default-trigger : see
46       Documentation/devicetree/bindings/leds/common.txt
47
48   b) Optional properties for sub-nodes related to hardware controlled LEDs:
49     - brcm,hardware-controlled : Boolean, makes this LED hardware controlled.
50       Default : false
51     - brcm,link-signal-sources : An array of hardware link
52       signal sources. Up to four link hardware signals can get muxed into
53       these LEDs. Only valid for LEDs 0 to 7, where LED signals 0 to 3 may
54       be muxed to LEDs 0 to 3, and signals 4 to 7 may be muxed to LEDs
55       4 to 7. A signal can be muxed to more than one LED, and one LED can
56       have more than one source signal.
57     - brcm,activity-signal-sources : An array of hardware activity
58       signal sources. Up to four activity hardware signals can get muxed into
59       these LEDs. Only valid for LEDs 0 to 7, where LED signals 0 to 3 may
60       be muxed to LEDs 0 to 3, and signals 4 to 7 may be muxed to LEDs
61       4 to 7. A signal can be muxed to more than one LED, and one LED can
62       have more than one source signal.
63
64 Examples:
65 Scenario 1 : BCM6328 with 4 EPHY LEDs
66         leds0: led-controller@10000800 {
67                 compatible = "brcm,bcm6328-leds";
68                 #address-cells = <1>;
69                 #size-cells = <0>;
70                 reg = <0x10000800 0x24>;
71
72                 alarm_red@2 {
73                         reg = <2>;
74                         active-low;
75                         label = "red:alarm";
76                 };
77                 inet_green@3 {
78                         reg = <3>;
79                         active-low;
80                         label = "green:inet";
81                 };
82                 power_green@4 {
83                         reg = <4>;
84                         active-low;
85                         label = "green:power";
86                         default-state = "on";
87                 };
88                 ephy0_spd@17 {
89                         reg = <17>;
90                         brcm,hardware-controlled;
91                 };
92                 ephy1_spd@18 {
93                         reg = <18>;
94                         brcm,hardware-controlled;
95                 };
96                 ephy2_spd@19 {
97                         reg = <19>;
98                         brcm,hardware-controlled;
99                 };
100                 ephy3_spd@20 {
101                         reg = <20>;
102                         brcm,hardware-controlled;
103                 };
104         };
105
106 Scenario 2 : BCM63268 with Serial/GPHY0 LEDs
107         leds0: led-controller@10001900 {
108                 compatible = "brcm,bcm6328-leds";
109                 #address-cells = <1>;
110                 #size-cells = <0>;
111                 reg = <0x10001900 0x24>;
112                 brcm,serial-leds;
113
114                 gphy0_spd0@0 {
115                         reg = <0>;
116                         brcm,hardware-controlled;
117                         brcm,link-signal-sources = <0>;
118                 };
119                 gphy0_spd1@1 {
120                         reg = <1>;
121                         brcm,hardware-controlled;
122                         brcm,link-signal-sources = <1>;
123                 };
124                 inet_red@2 {
125                         reg = <2>;
126                         active-low;
127                         label = "red:inet";
128                 };
129                 dsl_green@3 {
130                         reg = <3>;
131                         active-low;
132                         label = "green:dsl";
133                 };
134                 usb_green@4 {
135                         reg = <4>;
136                         active-low;
137                         label = "green:usb";
138                 };
139                 wps_green@7 {
140                         reg = <7>;
141                         active-low;
142                         label = "green:wps";
143                 };
144                 inet_green@8 {
145                         reg = <8>;
146                         active-low;
147                         label = "green:inet";
148                 };
149                 ephy0_act@9 {
150                         reg = <9>;
151                         brcm,hardware-controlled;
152                 };
153                 ephy1_act@10 {
154                         reg = <10>;
155                         brcm,hardware-controlled;
156                 };
157                 ephy2_act@11 {
158                         reg = <11>;
159                         brcm,hardware-controlled;
160                 };
161                 gphy0_act@12 {
162                         reg = <12>;
163                         brcm,hardware-controlled;
164                 };
165                 ephy0_spd@13 {
166                         reg = <13>;
167                         brcm,hardware-controlled;
168                 };
169                 ephy1_spd@14 {
170                         reg = <14>;
171                         brcm,hardware-controlled;
172                 };
173                 ephy2_spd@15 {
174                         reg = <15>;
175                         brcm,hardware-controlled;
176                 };
177                 power_green@20 {
178                         reg = <20>;
179                         active-low;
180                         label = "green:power";
181                         default-state = "on";
182                 };
183         };
184
185 Scenario 3 : BCM6362 with 1 LED for each EPHY
186         leds0: led-controller@10001900 {
187                 compatible = "brcm,bcm6328-leds";
188                 #address-cells = <1>;
189                 #size-cells = <0>;
190                 reg = <0x10001900 0x24>;
191
192                 usb@0 {
193                         reg = <0>;
194                         brcm,hardware-controlled;
195                         brcm,link-signal-sources = <0>;
196                         brcm,activity-signal-sources = <0>;
197                         /* USB link/activity routed to USB LED */
198                 };
199                 inet@1 {
200                         reg = <1>;
201                         brcm,hardware-controlled;
202                         brcm,activity-signal-sources = <1>;
203                         /* INET activity routed to INET LED */
204                 };
205                 ephy0@4 {
206                         reg = <4>;
207                         brcm,hardware-controlled;
208                         brcm,link-signal-sources = <4>;
209                         /* EPHY0 link routed to EPHY0 LED */
210                 };
211                 ephy1@5 {
212                         reg = <5>;
213                         brcm,hardware-controlled;
214                         brcm,link-signal-sources = <5>;
215                         /* EPHY1 link routed to EPHY1 LED */
216                 };
217                 ephy2@6 {
218                         reg = <6>;
219                         brcm,hardware-controlled;
220                         brcm,link-signal-sources = <6>;
221                         /* EPHY2 link routed to EPHY2 LED */
222                 };
223                 ephy3@7 {
224                         reg = <7>;
225                         brcm,hardware-controlled;
226                         brcm,link-signal-sources = <7>;
227                         /* EPHY3 link routed to EPHY3 LED */
228                 };
229                 power_green@20 {
230                         reg = <20>;
231                         active-low;
232                         label = "green:power";
233                         default-state = "on";
234                 };
235         };
236
237 Scenario 4 : BCM6362 with 1 LED for all EPHYs
238         leds0: led-controller@10001900 {
239                 compatible = "brcm,bcm6328-leds";
240                 #address-cells = <1>;
241                 #size-cells = <0>;
242                 reg = <0x10001900 0x24>;
243
244                 usb@0 {
245                         reg = <0>;
246                         brcm,hardware-controlled;
247                         brcm,link-signal-sources = <0 1>;
248                         brcm,activity-signal-sources = <0 1>;
249                         /* USB/INET link/activity routed to USB LED */
250                 };
251                 ephy@4 {
252                         reg = <4>;
253                         brcm,hardware-controlled;
254                         brcm,link-signal-sources = <4 5 6 7>;
255                         /* EPHY0/1/2/3 link routed to EPHY0 LED */
256                 };
257                 power_green@20 {
258                         reg = <20>;
259                         active-low;
260                         label = "green:power";
261                         default-state = "on";
262                 };
263         };
264
265 Scenario 5 : BCM6362 with EPHY LEDs swapped
266         leds0: led-controller@10001900 {
267                 compatible = "brcm,bcm6328-leds";
268                 #address-cells = <1>;
269                 #size-cells = <0>;
270                 reg = <0x10001900 0x24>;
271
272                 usb@0 {
273                         reg = <0>;
274                         brcm,hardware-controlled;
275                         brcm,link-signal-sources = <0>;
276                         brcm,activity-signal-sources = <0 1>;
277                         /* USB link/act and INET act routed to USB LED */
278                 };
279                 ephy0@4 {
280                         reg = <4>;
281                         brcm,hardware-controlled;
282                         brcm,link-signal-sources = <7>;
283                         /* EPHY3 link routed to EPHY0 LED */
284                 };
285                 ephy1@5 {
286                         reg = <5>;
287                         brcm,hardware-controlled;
288                         brcm,link-signal-sources = <6>;
289                         /* EPHY2 link routed to EPHY1 LED */
290                 };
291                 ephy2@6 {
292                         reg = <6>;
293                         brcm,hardware-controlled;
294                         brcm,link-signal-sources = <5>;
295                         /* EPHY1 link routed to EPHY2 LED */
296                 };
297                 ephy3@7 {
298                         reg = <7>;
299                         brcm,hardware-controlled;
300                         brcm,link-signal-sources = <4>;
301                         /* EPHY0 link routed to EPHY3 LED */
302                 };
303                 power_green@20 {
304                         reg = <20>;
305                         active-low;
306                         label = "green:power";
307                         default-state = "on";
308                 };
309         };