From a4d02630c985b167a6e0ff3fd07a6980bbb495b5 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Sat, 18 Nov 2023 20:45:38 +0100 Subject: [PATCH] board/netconf: Define standard behavior for port LEDs By default, assume that any LED with the function "tp", "sfp" or "port" is attached to either an Ethernet PHY or MAC, with support for offloading the "netdev" trigger. Use green LEDs to indicate link/activity. Disable any yellow LEDs for now, later on we can add alarm indications etc. to these. --- board/netconf/rootfs/etc/iitod.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/board/netconf/rootfs/etc/iitod.json b/board/netconf/rootfs/etc/iitod.json index caf454ca..d214be9b 100644 --- a/board/netconf/rootfs/etc/iitod.json +++ b/board/netconf/rootfs/etc/iitod.json @@ -29,6 +29,21 @@ }, "output": { + "led-group": { + "port-link-act": { + "match": ["*:green:tp", "*:green:sfp", "*:green:port" ], + + "rules": [ + { "if": "true", "then": { "trigger": "netdev", "link": 1, "rx": 1, "tx": 1 } } + ] + }, + "port-alarm": { + "match": ["*:yellow:tp", "*:yellow:sfp", "*:yellow:port" ], + + "rules": [ + ] + } + }, "led": { "red:status": { "rules": [