From 4c1de659cbb5126901d0b7ac5fa02b1a60e44d2e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 19:01:11 +0100 Subject: [PATCH] board/aarch64: styx: rename second green led and drop second sfp led On Rev. B, the second LED on the copper ports is green instead of yellow. This patch renames them from yellow -> aux => :aux:tp Also on Rev. B, the second LED for SFP ports do not work at all. This patch drops them from the device tree to avoid confusion. Signed-off-by: Joachim Wiberg --- board/aarch64/dts/styx/dcp-sc-28p.dtsi | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/board/aarch64/dts/styx/dcp-sc-28p.dtsi b/board/aarch64/dts/styx/dcp-sc-28p.dtsi index bcd67a4b..7185e06f 100644 --- a/board/aarch64/dts/styx/dcp-sc-28p.dtsi +++ b/board/aarch64/dts/styx/dcp-sc-28p.dtsi @@ -265,25 +265,43 @@ }; }; -#define SWP_LED(_func) \ +#define SWP_LED \ leds { \ #address-cells = <1>; \ #size-cells = <0>; \ \ led@0 { \ reg = <0>; \ - function = _func; \ + function = "tp"; \ color = ; \ default-state = "keep"; \ }; \ led@1 { \ reg = <1>; \ - function = _func; \ - color = ; \ + function = "aux"; \ + color = ; \ default-state = "off"; \ }; \ } +/* SFP LEDs + * Rev A. LEDs do not work at all + * Rev B. only outer-most (green) LEDs work + */ + +#define SFP_LED \ + leds { \ + #address-cells = <1>; \ + #size-cells = <0>; \ + \ + led@0 { \ + reg = <0>; \ + function = "sfp"; \ + color = ; \ + default-state = "keep"; \ + }; \ + } + #define XSWP(_n, _label, _mac_offs, _sfp) \ port@_n { \ reg = <0x ## _n>; \ @@ -293,7 +311,7 @@ phy-mode = "10gbase-r"; \ managed = "in-band-status"; \ sfp = <_sfp>; \ - SWP_LED("sfp"); \ + SFP_LED; \ } #define XSWCPU(_n, _eth) \ @@ -327,7 +345,7 @@ nvmem-cell-names = "mac-address"; \ phy-mode = "gmii"; \ phy-handle = <_phy>; \ - SWP_LED("tp"); \ + SWP_LED; \ } #define GPHY(_n) \