Skip to content

Instantly share code, notes, and snippets.

@svanheule
Last active October 7, 2022 15:46
Show Gist options
  • Select an option

  • Save svanheule/0c36b0dd2a76153899998350a6491966 to your computer and use it in GitHub Desktop.

Select an option

Save svanheule/0c36b0dd2a76153899998350a6491966 to your computer and use it in GitHub Desktop.
&switchcore {
port-leds {
compatible = "realtek,maple-port-led";
#address-cells = <3>;
#size-cells = <0>;
realtek,output-mode = "serial";
/*
* For lan_100-*, use rtl_hw_trigger values 'f' (Link/Act 100M/10M)
* Fol lan_1000-*, use rtl_hw_trigger values '13' (Link/Act 1G)
*/
[email protected] {
reg = <8 0 0>;
label = "amber:lan_100-8";
};
[email protected] {
reg = <8 1 0>;
label = "green:lan_1000-8";
};
[email protected] {
reg = <8 2 0>;
label = ":lan_status-8";
};
[email protected] {
reg = <9 0 0>;
label = "amber:lan_100-7";
};
[email protected] {
reg = <9 1 0>;
label = "green:lan_1000-7";
};
[email protected] {
reg = <9 2 0>;
label = ":lan_status-7";
};
[email protected] {
reg = <10 0 0>;
label = "amber:lan_100-6";
};
[email protected] {
reg = <10 1 0>;
label = "green:lan_1000-6";
};
[email protected] {
reg = <10 2 0>;
label = ":lan_status-6";
};
[email protected] {
reg = <11 0 0>;
label = "amber:lan_100-5";
};
[email protected] {
reg = <11 1 0>;
label = "green:lan_1000-5";
};
[email protected] {
reg = <11 2 0>;
label = ":lan_status-5";
};
[email protected] {
reg = <12 0 0>;
label = "amber:lan_100-4";
};
[email protected] {
reg = <12 1 0>;
label = "green:lan_1000-4";
};
[email protected] {
reg = <12 2 0>;
label = ":lan_status-4";
};
[email protected] {
reg = <13 0 0>;
label = "amber:lan_100-3";
};
[email protected] {
reg = <13 1 0>;
label = "green:lan_1000-3";
};
[email protected] {
reg = <13 2 0>;
label = ":lan_status-3";
};
[email protected] {
reg = <14 0 0>;
label = "amber:lan_100-2";
};
[email protected] {
reg = <14 1 0>;
label = "green:lan_1000-2";
};
[email protected] {
reg = <14 2 0>;
label = ":lan_status-2";
};
[email protected] {
reg = <15 0 0>;
label = "amber:lan_100-1";
};
[email protected] {
reg = <15 1 0>;
label = "green:lan_1000-1";
};
[email protected] {
reg = <15 2 0>;
label = ":lan_status-1";
};
/*
* SFP cage port status
* For lan_100-{9,10}, rtl_hw_trigger should be 'c' to match vendor behaviour (Link 100M)
* For lan_1000-{9,10}, rtl_hw_trigger should be '13' to match vendor behaviour (Link/Act 1G)
*/
[email protected] {
reg = <24 0 0>;
label = "amber:lan_100-9";
};
[email protected] {
reg = <24 1 0>;
label = "green:lan_1000-9";
};
[email protected] {
reg = <26 0 0>;
label = "amber:lan_100-9";
};
[email protected] {
reg = <26 1 0>;
label = "green:lan_1000-9";
};
/* System status, use labels for standard OpenWrt LED aliases */
status_1: [email protected] {
reg = <20 0 0>;
label = ":status-1";
};
status_2: [email protected] {
reg = <20 1 0>;
label = ":status-2";
};
/* SFP cage laser signals */
[email protected] {
reg = <24 2 0>;
label = ":sfp_laser-1";
linux,default-trigger = "default-on";
};
[email protected] {
reg = <26 2 0>;
label = ":sfp_laser-2";
linux,default-trigger = "default-on";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment