Added config for HASIVO_S600W_4GT_2XGT_SE (4x2.5G, 2x10G)

SysLed behavior logic added so it can mimic any original style
This commit is contained in:
SkullyDev committed 2026-09-15 00:37:27 +03:00
1 parent 9f107b6e60
commit 974052877d
4 files changed
+60 -2

No files matched your search

+41
View File
@@ -1226,6 +1226,47 @@ __code const struct machine machine = {
0x1d, 0x20, 0x21 }, 0x1d, 0x20, 0x21 },
}; };
#elif defined MACHINE_HASIVO_S600W_4GT_2XGT_SE
__code const struct machine machine = {
.machine_name = "Hasivo S600W-4GT-2XGT-SE",
.isRTL8373 = 0,
.min_port = 3,
.max_port = 8,
.n_sfp = 0,
.n_10g = 2,
.sys_led_mode = SYS_LED_SLOW,
.log_to_phys_port = {0, 0, 0, 5, 1, 2, 3, 4, 6},
.phys_to_log_port = {4, 5, 6, 7, 3, 8, 0, 0, 0},
.is_sfp = {0, 0, 0, 0, 0, 0, 0, 0, 0},
.reset_pin = GPIO54_ACL_BIT2_EN,
.high_leds = { .mux = LED_28_SYS | LED_29, .enable = LED_28_SYS | LED_29 },
.port_led_set = { 0, 0, 0, 1, 0, 0, 0, 0, 1 },
.led_sets = {
{
LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
LEDS_2G5 | LEDS_LINK,
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK,
0,
},
{
LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
LEDS_10G | LEDS_LINK,
LEDS_5G | LEDS_2G5 | LEDS_LINK,
0,
},
},
.led_mux_custom = 1,
.led_mux = {
0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
0x3f, 0x3f, 0x3f, 0x0f, 0x20,
0x21, 0x22, 0x10, 0x11, 0x12,
0x14, 0x15, 0x16, 0x18, 0x19,
0x1a, 0x1c, 0x1d, 0x1e, 0x0c,
0x0d, 0x0e, 0x23
},
};
#else #else
#error "Please select a machine type in machine.h" #error "Please select a machine type in machine.h"
#endif #endif
+2
View File
@@ -45,6 +45,7 @@
// #define MACHINE_FG_4GT_2SX_V2_0 // #define MACHINE_FG_4GT_2SX_V2_0
// #define MACHINE_FG_8GT_1SX // #define MACHINE_FG_8GT_1SX
// #define MACHINE_POE_2G080110GS // #define MACHINE_POE_2G080110GS
// #define MACHINE_HASIVO_S600W_4GT_2XGT_SE
typedef struct { typedef struct {
// GPIO pins for SDA/SCL // GPIO pins for SDA/SCL
@@ -77,6 +78,7 @@ struct sfp_port
typedef struct machine { typedef struct machine {
char machine_name[30]; char machine_name[30];
uint8_t isRTL8373; uint8_t isRTL8373;
uint8_t sys_led_mode;
// Lowest logical port number // Lowest logical port number
uint8_t min_port; uint8_t min_port;
// Highest logical port number // Highest logical port number
+7
View File
@@ -117,6 +117,13 @@ void machine_custom_init(void) __banked
REG_SET(RTL837X_REG_LED_GLB_IO_EN, 0x7624155b); REG_SET(RTL837X_REG_LED_GLB_IO_EN, 0x7624155b);
} }
#elif defined MACHINE_HASIVO_S600W_4GT_2XGT_SE
void machine_custom_init(void) __banked
{
// For this device, the reset button triggers this input
gpio_input_setup(GPIO54_ACL_BIT2_EN);
}
#else #else
void machine_custom_init(void) __banked { } void machine_custom_init(void) __banked { }
#endif #endif
+10 -2
View File
@@ -1141,7 +1141,11 @@ void handle_button(void)
else else
{ {
print_string("Short button press detected; no action.\n"); print_string("Short button press detected; no action.\n");
set_sys_led_state(SYS_LED_ON); if (machine.sys_led_mode) {
set_sys_led_state(machine.sys_led_mode);
} else {
set_sys_led_state(SYS_LED_ON);
}
} }
} }
else else
@@ -1747,7 +1751,11 @@ void main(void)
print_cmd_prompt(); print_cmd_prompt();
idle_ready = 1; idle_ready = 1;
set_sys_led_state(SYS_LED_ON); if (machine.sys_led_mode) {
set_sys_led_state(machine.sys_led_mode);
} else {
set_sys_led_state(SYS_LED_ON);
}
cmd_editor_init(); cmd_editor_init();