diff --git a/doc/devices/SWTGW215AS.md b/doc/devices/SWTGW215AS.md new file mode 100644 index 0000000..59d868a --- /dev/null +++ b/doc/devices/SWTGW215AS.md @@ -0,0 +1,28 @@ +### ZX-SWTGW215AS + +## Brands +|Brand|Type|Managed|PCB|Flash|Chip RTL| +|---|---|---|---|---|---| +| Lianguo | ZX-SWTGW215AS | Yes | PCB-SWTG115AS-V2.0-16030 | 2MB (FM25Q16A) | RTL8372 family | + +## Overview + +This device is a managed 5-port plus 1 SFP switch supported by RTLPlayground. + +- 5 x RJ45 ports +- 1 x SFP port +- Managed web firmware +- Original SPI flash chip: FM25Q16A + +## RTLPlayground target + +Use machine target `MACHINE_LIANGUO_ZX_SWTGW215AS` for this device. + +## Notes + +- The original unit was fitted with an `FM25Q16A` flash chip. +- In the current codebase, this device is treated as a 5+1 managed variant in the RTL8372 family. +- There is a second SOIC8/SOP8 footprint (label U10) beside the flash chip. Likely +- Uart follows standard pinout scheme for these units. +- T8 Connector seems to be a JTAG port for main CPU +- T3 connector is wired to second(unpopulated) SPI flash footprint diff --git a/doc/devices/photos/ZX-SWTGW215AS/label.jpg b/doc/devices/photos/ZX-SWTGW215AS/label.jpg new file mode 100644 index 0000000..2d61cb5 Binary files /dev/null and b/doc/devices/photos/ZX-SWTGW215AS/label.jpg differ diff --git a/doc/devices/photos/ZX-SWTGW215AS/pcb_bottom.jpg b/doc/devices/photos/ZX-SWTGW215AS/pcb_bottom.jpg new file mode 100644 index 0000000..4aa1672 Binary files /dev/null and b/doc/devices/photos/ZX-SWTGW215AS/pcb_bottom.jpg differ diff --git a/doc/devices/photos/ZX-SWTGW215AS/pcb_top.jpg b/doc/devices/photos/ZX-SWTGW215AS/pcb_top.jpg new file mode 100644 index 0000000..577af86 Binary files /dev/null and b/doc/devices/photos/ZX-SWTGW215AS/pcb_top.jpg differ diff --git a/doc/mods.md b/doc/mods.md index a4bdcb7..27dd370 100644 --- a/doc/mods.md +++ b/doc/mods.md @@ -41,6 +41,8 @@ This list is incomplete. | Winbond | W25Q32FV | | Winbond | W25Q32JV | | Winbond | W25Q16JL | +| Winbond | W25Q16DV | +| Winbond | W25Q80DV | | Fundan | FM25Q16A | *NOTE*: Part numbers are incomplete. Part numbers may contain additional information such as package, temperature specifications, and even the number of devices on a reel. So always check the datasheet so that you have the right orderable partnumber. diff --git a/machine.c b/machine.c index 7ff7a73..2890231 100644 --- a/machine.c +++ b/machine.c @@ -289,6 +289,39 @@ __code const struct machine machine = { }, }; +void machine_custom_init(void) { } +#elif defined MACHINE_LIANGUO_ZX_SWTGW215AS // Has PCB branded PCB-SWTG115AS-V2.0 but is labeled and reports as a ZX-SWTGW215AS, seems to be identical to the "real" ZX-SWTGW215AS except for the LEDs +__code const struct machine machine = { + .machine_name = "Lianguo ZX-SWTGW215AS", + .isRTL8373 = 0, + .min_port = 3, + .max_port = 8, + .n_sfp = 1, + .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, 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 = GPIO54_ACL_BIT2_EN, + .high_leds = { .mux = LED_27 | LED_28 | LED_29, .enable = LED_28 | LED_29 }, + .port_led_set = { 0, 0, 0, 0, 0, 0, 0, 0, 1}, + .led_sets = { { LEDS_2G5 | LEDS_LINK | LEDS_ACT, // Green LED (right) + 0, // unused + LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Amber LED (left) + 0 + }, // unused + { LEDS_10G | LEDS_5G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_LINK | LEDS_ACT, // SFP LED + 0, // unused + 0, // unused + 0 + }, // unused }, + }, + .led_mux_custom = 0, +}; + void machine_custom_init(void) { } #elif defined MACHINE_DEFAULT_8C_1SFP diff --git a/machine.h b/machine.h index 1b4746c..d41438e 100644 --- a/machine.h +++ b/machine.h @@ -18,6 +18,7 @@ // #define MACHINE_SWTGW218AS // #define MACHINE_HI_K0402WS // #define MACHINE_K0501W_V2_0 +// #define MACHINE_LIANGUO_ZX_SWTGW215AS // #define MACHINE_DEFAULT_8C_1SFP typedef struct {