diff --git a/doc/devices/ZOERAX_HG0402XG_V1.1.md b/doc/devices/ZOERAX_HG0402XG_V1.1.md new file mode 100644 index 00000000..1ed210ae --- /dev/null +++ b/doc/devices/ZOERAX_HG0402XG_V1.1.md @@ -0,0 +1,36 @@ +### HG0402XG V1.1 + +## Brands +|Brand|Type|Managed|PCB|Flash|Chip RTL| +|---|---|---|---|---|---| +| ZoeRax | HG0402XG | No| HG0402XG V1.1 | 1M (Winbond 25Q) | | + +### Label specifications + +- **Name**: ZOERAX 2.5G 2SFP 4-Port Gigabit Switch +- **Model**: HG0402XG-EU +- **Ports**: + - 4 × RJ45: 10/100/1000/2500 Mbps + - 2 × SFP+: 1000 / 2500 / 10000 Mbps + + +## PCB + + + + +Be aware that the UART header is metric, the pitch is 2mm. The JST PH2.0mm header shown was addeded after purchase + +The slider switch controls microcontroller U4 in order to configure the VLAN on/off settings. U4 can reset the SoC +and also write into its registers to configure VLAN. With RTLPlayground the slider cannot be used for anything else +than triggering reset. Any change in the position will trigger this reset. + +### Installation + +Using SPI clamp on-board is the only method for initial installation. + +### What works + +- All four 2.5GBASE-T RJ45 ports at 10/100/1000/2500 Mbps +- SFP ports with various 1G/10G Fiber and Ethernet modules +- LEDs diff --git a/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_bottom.jpg b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_bottom.jpg new file mode 100644 index 00000000..225cb3c8 Binary files /dev/null and b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_bottom.jpg differ diff --git a/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_label.jpg b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_label.jpg new file mode 100644 index 00000000..6d7f70be Binary files /dev/null and b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_label.jpg differ diff --git a/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_top.jpg b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_top.jpg new file mode 100644 index 00000000..151c5335 Binary files /dev/null and b/doc/devices/photos/HG0402XG_V1_1/ZOERAX_HG0402XG_V1_1_top.jpg differ diff --git a/doc/supported_devices.md b/doc/supported_devices.md index 08245ea5..5d330db0 100644 --- a/doc/supported_devices.md +++ b/doc/supported_devices.md @@ -52,6 +52,7 @@ The following devices have been tested and are fully working: | YuanLey | YS25-0402 | No | [PCB-K0402WS-V3.0](devices/PCB-K0402WS-V3.0.md) | 2M | 4 + 2 | | YuanLey | YS25-0402M | Yes | [SIRIVISION_S25G2206FP_V1_1](devices/SIRIVISION_S25G2206FP_V1_1.md) | 2M | 4 + 2 | | Ztyuav | Z-QWYT0402 | No | [PCB-K0402WS-V3.0](devices/PCB-K0402WS-V3.0.md) | | 4 + 2 | +| ZoeRax | HG0402XG | No | [HG0402XG_V1.1](devices/ZOERAX_HG0402XG_V1.1.md) | 1M | 4 + 2 | For KP-9000-6XH-X2 / KP-9000-6XHML-X2 / Mokerlink 2G040210GSM devices, select the machine target by PCB revision. The ML/non-ML or managed/unmanaged label diff --git a/machine/ZOERAX_HG0402XG_V1_1.c b/machine/ZOERAX_HG0402XG_V1_1.c new file mode 100644 index 00000000..c5641aee --- /dev/null +++ b/machine/ZOERAX_HG0402XG_V1_1.c @@ -0,0 +1,41 @@ +#include "machine_defs.h" +__code const struct machine machine = { + MACHINE_COMMON_SETTING, + .n_sfp = 2, + .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, 1, 0, 0, 0, 0, 2}, + // Left SFP port (5) + .sfp_port[0].pin_detect = GPIO30_ACL_BIT3_EN, + .sfp_port[0].pin_los = GPIO_NA, + .sfp_port[0].pin_tx_disable = GPIO_NA, + .sfp_port[0].sds = 1, + .sfp_port[0].i2c = I2CBUS( GPIO39_I2C_SDA4, GPIO40_I2C_SCL3_MDC1 ), + // Right SFP port (6) + .sfp_port[1].pin_detect = GPIO50_I2C_SCL2_UART1_TX, + .sfp_port[1].pin_los = GPIO_NA, + .sfp_port[1].pin_tx_disable = GPIO_NA, + .sfp_port[1].sds = 0, + .sfp_port[1].i2c = I2CBUS( GPIO41_I2C_SDA3_MDIO1, GPIO40_I2C_SCL3_MDC1 ), + .reset_pin = GPIO_NA, + .high_leds = { .mux = LED_27 | LED_29, .enable = LED_28_SYS | LED_29 }, + .port_led_set = { 0, 0, 0, 1, 0, 0, 0, 0, 1}, + /* On Ethernet: Left led is orange, right green + * 100M and 1G give right led green with activity + * 2.5GBit adds solid left orange LED + * LEDs for the SFP-ports are the same as for the Ethernet ports + */ + .led_sets = { { LEDS_2G5 | LEDS_LINK | LEDS_ACT, + 0, + LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, + LEDS_2G5 | LEDS_LINK | LEDS_ACT + }, + { LEDS_2G5 | LEDS_TWO_PAIR_1G | LEDS_1G | LEDS_500M | LEDS_100M | LEDS_10M | + LEDS_LINK | LEDS_ACT | LEDS_10G | LEDS_TWO_PAIR_5G | LEDS_5G | LEDS_TWO_PAIR_2G5, + LEDS_1G | LEDS_LINK, + LEDS_LINK, + LEDS_COL | LEDS_DUPLEX + } + } +}; + diff --git a/machine/ZOERAX_HG0402XG_V1_1.h b/machine/ZOERAX_HG0402XG_V1_1.h new file mode 100644 index 00000000..26d01405 --- /dev/null +++ b/machine/ZOERAX_HG0402XG_V1_1.h @@ -0,0 +1,7 @@ +#ifndef _MACHINE_ZOERAX_HG0402XG_V1_1_H_ +#define _MACHINE_ZOERAX_HG0402XG_V1_1_H_ + +#define MACHINE_MODEL "ZoeRax HG0402XG V1.1" +#define MACHINE_CHIPSET RTL8372 + +#endif