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

dt-bindings: net: dsa: qca8k: add LEDs definition example

Add LEDs definition example for qca8k Switch Family to describe how they
should be defined for a correct usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Christian Marangi and committed by
David S. Miller
ed617bc0 57b6c752

+22
+22
Documentation/devicetree/bindings/net/dsa/qca8k.yaml
··· 18 18 PHY it is connected to. In this config, an internal mdio-bus is registered and 19 19 the MDIO master is used for communication. Mixed external and internal 20 20 mdio-bus configurations are not supported by the hardware. 21 + Each phy has at most 3 LEDs connected and can be declared 22 + using the standard LEDs structure. 21 23 22 24 properties: 23 25 compatible: ··· 119 117 examples: 120 118 - | 121 119 #include <dt-bindings/gpio/gpio.h> 120 + #include <dt-bindings/leds/common.h> 122 121 123 122 mdio { 124 123 #address-cells = <1>; ··· 229 226 label = "lan1"; 230 227 phy-mode = "internal"; 231 228 phy-handle = <&internal_phy_port1>; 229 + 230 + leds { 231 + #address-cells = <1>; 232 + #size-cells = <0>; 233 + 234 + led@0 { 235 + reg = <0>; 236 + color = <LED_COLOR_ID_WHITE>; 237 + function = LED_FUNCTION_LAN; 238 + default-state = "keep"; 239 + }; 240 + 241 + led@1 { 242 + reg = <1>; 243 + color = <LED_COLOR_ID_AMBER>; 244 + function = LED_FUNCTION_LAN; 245 + default-state = "keep"; 246 + }; 247 + }; 232 248 }; 233 249 234 250 port@2 {