1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/leds/leds-bcm6328.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: LEDs connected to Broadcom BCM6328 controller
10 - Álvaro Fernández Rojas <noltari@gmail.com>
13 This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
14 In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
15 However, on some devices there are Serial LEDs (LEDs connected to a 74x164
16 controller), which can either be controlled by software (exporting the 74x164
18 Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or by hardware
20 Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
21 exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
22 controlled, so the only chance to keep them working is by using this driver.
24 BCM6328 LED controller has a HWDIS register, which controls whether a LED
25 should be controlled by a hardware signal instead of the MODE register value,
26 with 0 meaning hardware control enabled and 1 hardware control disabled. This
27 is usually 1:1 for hardware to LED signals, but through the activity/link
28 registers you have some limited control over rerouting the LEDs (as
29 explained later in brcm,link-signal-sources). Even if a LED is hardware
30 controlled you are still able to make it blink or light it up if it isn't,
31 but you can't turn it off if the hardware decides to light it up. For this
32 reason, hardware controlled LEDs aren't registered as LED class devices.
34 Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
38 const: brcm,bcm6328-leds
45 description: Enables Serial LEDs.
49 description: Enables Serial LEDs multiplexing.
53 description: Makes clock signal active low.
57 description: Makes data signal active low.
59 brcm,serial-shift-inv:
61 description: Inverts Serial LEDs shift direction.
79 description: LED pin number (only LEDs 0 to 23 are valid).
83 description: Makes LED active low.
85 brcm,hardware-controlled:
87 description: Makes this LED hardware controlled.
89 brcm,link-signal-sources:
90 $ref: /schemas/types.yaml#/definitions/uint32-array
94 An array of hardware link signal sources. Up to four link hardware
95 signals can get muxed into these LEDs. Only valid for LEDs 0 to 7,
96 where LED signals 0 to 3 may be muxed to LEDs 0 to 3, and signals 4 to
97 7 may be muxed to LEDs 4 to 7. A signal can be muxed to more than one
98 LED, and one LED can have more than one source signal.
100 brcm,activity-signal-sources:
101 $ref: /schemas/types.yaml#/definitions/uint32-array
105 An array of hardware activity signal sources. Up to four activity
106 hardware signals can get muxed into these LEDs. Only valid for LEDs 0
107 to 7, where LED signals 0 to 3 may be muxed to LEDs 0 to 3, and
108 signals 4 to 7 may be muxed to LEDs 4 to 7. A signal can be muxed to
109 more than one LED, and one LED can have more than one source signal.
114 unevaluatedProperties: false
121 additionalProperties: false
125 /* BCM6328 with 4 EPHY LEDs */
126 led-controller@10000800 {
127 compatible = "brcm,bcm6328-leds";
128 #address-cells = <1>;
130 reg = <0x10000800 0x24>;
141 label = "green:inet";
147 label = "green:power";
148 default-state = "on";
153 brcm,hardware-controlled;
158 brcm,hardware-controlled;
163 brcm,hardware-controlled;
168 brcm,hardware-controlled;
172 /* BCM63268 with Serial/GPHY0 LEDs */
173 led-controller@10001900 {
174 compatible = "brcm,bcm6328-leds";
175 #address-cells = <1>;
177 reg = <0x10001900 0x24>;
180 brcm,serial-shift-inv;
184 brcm,hardware-controlled;
185 brcm,link-signal-sources = <0>;
190 brcm,hardware-controlled;
191 brcm,link-signal-sources = <1>;
221 label = "green:inet";
226 brcm,hardware-controlled;
231 brcm,hardware-controlled;
236 brcm,hardware-controlled;
241 brcm,hardware-controlled;
246 brcm,hardware-controlled;
251 brcm,hardware-controlled;
256 brcm,hardware-controlled;
262 label = "green:power";
263 default-state = "on";
267 /* BCM6362 with 1 LED for each EPHY */
268 led-controller@10001900 {
269 compatible = "brcm,bcm6328-leds";
270 #address-cells = <1>;
272 reg = <0x10001900 0x24>;
276 brcm,hardware-controlled;
277 brcm,link-signal-sources = <0>;
278 brcm,activity-signal-sources = <0>;
279 /* USB link/activity routed to USB LED */
284 brcm,hardware-controlled;
285 brcm,activity-signal-sources = <1>;
286 /* INET activity routed to INET LED */
291 brcm,hardware-controlled;
292 brcm,link-signal-sources = <4>;
293 /* EPHY0 link routed to EPHY0 LED */
298 brcm,hardware-controlled;
299 brcm,link-signal-sources = <5>;
300 /* EPHY1 link routed to EPHY1 LED */
305 brcm,hardware-controlled;
306 brcm,link-signal-sources = <6>;
307 /* EPHY2 link routed to EPHY2 LED */
312 brcm,hardware-controlled;
313 brcm,link-signal-sources = <7>;
314 /* EPHY3 link routed to EPHY3 LED */
320 label = "green:power";
321 default-state = "on";
325 /* BCM6362 with 1 LED for all EPHYs */
326 led-controller@10001900 {
327 compatible = "brcm,bcm6328-leds";
328 #address-cells = <1>;
330 reg = <0x10001900 0x24>;
334 brcm,hardware-controlled;
335 brcm,link-signal-sources = <0 1>;
336 brcm,activity-signal-sources = <0 1>;
337 /* USB/INET link/activity routed to USB LED */
342 brcm,hardware-controlled;
343 brcm,link-signal-sources = <4 5 6 7>;
344 /* EPHY0/1/2/3 link routed to EPHY0 LED */
350 label = "green:power";
351 default-state = "on";
355 /* BCM6362 with EPHY LEDs swapped */
356 led-controller@10001900 {
357 compatible = "brcm,bcm6328-leds";
358 #address-cells = <1>;
360 reg = <0x10001900 0x24>;
364 brcm,hardware-controlled;
365 brcm,link-signal-sources = <0>;
366 brcm,activity-signal-sources = <0 1>;
367 /* USB link/act and INET act routed to USB LED */
372 brcm,hardware-controlled;
373 brcm,link-signal-sources = <7>;
374 /* EPHY3 link routed to EPHY0 LED */
379 brcm,hardware-controlled;
380 brcm,link-signal-sources = <6>;
381 /* EPHY2 link routed to EPHY1 LED */
386 brcm,hardware-controlled;
387 brcm,link-signal-sources = <5>;
388 /* EPHY1 link routed to EPHY2 LED */
393 brcm,hardware-controlled;
394 brcm,link-signal-sources = <4>;
395 /* EPHY0 link routed to EPHY3 LED */
401 label = "green:power";
402 default-state = "on";