diff --git a/doc/devices/HI-K0801WS.md b/doc/devices/HI-K0801WS.md new file mode 100644 index 0000000..ce50a44 --- /dev/null +++ b/doc/devices/HI-K0801WS.md @@ -0,0 +1,36 @@ +# Hisource Hi-K0801WS + +Following is documentation for unmanaged switch marked as `Hi-K0801WS`. + +Using SPI clamp in-board is the only method for initial installation. + +### Label specifications + +- **Name**: 2.5G Ethernet Switch +- **Model**: Hi-K0801WS +- **Ports**: + - 8 × RJ45: 10/100/1000/2500 Mbps + - 1 × SFP: 1000 / 2500 / 10000 Mbps + +### What works (expected from label + similar devices) + +- All eight 2.5GBASE-T RJ45 ports at 10/100/1000/2500 Mbps +- SFP port supporting 1G, 2.5G and 10G modules +- LEDs + +### PCB overview + +**Board markings** +- Top silkscreen: PCB-KO801W-V2.0 / DIP-KO801WS-V2.0 + +Top side + + + +Bottom + + + +## Power supply + +Input power is delivered via barell plug, `12V 1A` adapter was provided. diff --git a/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-bottom.jpg b/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-bottom.jpg new file mode 100644 index 0000000..e87a452 Binary files /dev/null and b/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-bottom.jpg differ diff --git a/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-top.jpg b/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-top.jpg new file mode 100644 index 0000000..913723b Binary files /dev/null and b/doc/devices/photos/K0801W-V2.0-unmanaged/PCB-top.jpg differ diff --git a/machine.c b/machine.c index 24fcbd3..d2d5d50 100644 --- a/machine.c +++ b/machine.c @@ -613,6 +613,57 @@ __code const struct machine machine = { }, }; + +#elif defined MACHINE_HI_K0801WS +__code const struct machine machine = { + .machine_name = "Hi-Source HI-k0801WS", + .isRTL8373 = 1, + .min_port = 0, + .max_port = 8, + .n_sfp = 1, + .log_to_phys_port = {1, 2, 3, 4, 5, 6, 7, 8, 9}, + .phys_to_log_port = {0, 1, 2, 3, 4, 5, 6, 7, 8}, + .is_sfp = {0, 0, 0, 0, 0, 0, 0, 0, 1}, + + .sfp_port[0].pin_detect = GPIO30_ACL_BIT3_EN, + .sfp_port[0].pin_los = GPIO37, + .sfp_port[0].pin_tx_disable = GPIO_NA, + .sfp_port[0].sds = 1, + .sfp_port[0].i2c = { + .sda = GPIO39_I2C_SDA4, + .scl = GPIO40_I2C_SCL3_MDC1 + }, + + .reset_pin = GPIO_NA, + + .high_leds = { + .mux = LED_27 | LED_29, + .enable = LED_28_SYS | LED_29 + }, + + /* Ports 1-8 use set 0, port 9 SFP uses set 1 */ + .port_led_set = {0, 0, 0, 0, 0, 0, 0, 0, 1}, + + .led_sets = { + { /* Set 0: RJ45 copper ports + * Amber = 2.5G + * Green = 1G/100M/10M with activity + */ + LEDS_2G5 | LEDS_LINK | LEDS_ACT, /* Amber */ + 0, + LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, /* Green */ + 0 + }, + { /* Set 1: SFP port, single green LED for all valid speeds */ + LEDS_10G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, + 0, + 0, + 0 + }, + }, +}; + + void machine_custom_init(void) { } #else diff --git a/machine.h b/machine.h index d7daa96..610a757 100644 --- a/machine.h +++ b/machine.h @@ -22,6 +22,7 @@ // #define MACHINE_LIANGUO_ZX_SWTGW215AS // #define MACHINE_ZX310S_4T2XH // #define MACHINE_DEFAULT_8C_1SFP +// #define MACHINE_HI_K0801WS typedef struct { // GPIO pins for SDA/SCL