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