incorporated feedback from PR

This commit is contained in:
Andreas Erhard committed 2026-09-17 12:08:37 +02:00
1 parent eb83b8be09
commit 575274786a
6 files changed
+222 -11

No files matched your search

+215 -6
View File
@@ -1,4 +1,5 @@
### SWTG024AS
# SWTG024AS
SWTG024AS has at least 4 variants that look the same.
Variants are `managed` and a `unmanaged` version.
@@ -8,16 +9,224 @@ Also the RJ45 connectors can be all plastic/non-shielded or with metal shielding
## Brands
|Brand|Type|Managed|PCB|PCB Label|Flash|Chip RTL|
|---|---|---|---|---|---|---|
| LIANGUO |SWTG024AS |No| SWTG024AS-v2.0-17452 | CM-23-11-2336 023-17453| 512 KiB | 8272 |
| Horaco |ZX-SWTG124AS | Yes | SWTG024AS-v2.0 | ??? | ??? | 8272 |
| Xikestore |SKS3200M-4GPY2XF | Yes | SWTG024AS-v1.0 | CM-23-08-2043 023-16721 | 2048 KiB | 8272 |
| Binardat | 2G06-04210GSM | No | PCB-SWTG024AS-A-2.0.1 | --- | 16MB | RTL8372N |
| Horaco | ZX-SWTG124AS | Yes | SWTG024AS-v2.0 | ??? | ??? | 8272 |
| LIANGUO | SWTG024AS | No | SWTG024AS-v2.0-17452 | CM-23-11-2336 023-17453 | 512 KiB | 8272 |
| ONT | ONT-S207CW-62TS-SE | No | PCB-SWTG024AS-A-2.0.1 | --- | 16MB | RTL8372N |
| Sodola | SL-SWTG124AS-D | Yes | SWTG024AS-v2.0-17452 | ??? | 2048 KiB | 8272 |
| Xikestore | SKS3200M-4GPY2XF | Yes | SWTG024AS-v1.0 | CM-23-08-2043 023-16721 | 2048 KiB | 8272 |
## PCB
<img src="photos/SWTG024AS-v2.0-unmanaged/SWTG024AS-v2.0-top-uman.png" width="300" />
# SWTG024AS-v2.0 managed vs unmanged
## PCB-SWTG024AS-A-2.0.1 Variant
**Note:** ONT-S207CW-62TS-SE and Binardat 2G06-04210GSM are **identical in hardware** to this PCB variant. The only difference is the brand label.
### Compatible Devices
The following devices use the **same PCB-SWTG024AS-A-2.0.1 hardware** and are fully compatible with the same firmware configuration:
| Brand | Model | Notes |
|---|---|---|
| ONT | ONT-S207CW-62TS-SE | Original device |
| Binardat | 2G06-04210GSM | Identical hardware, same firmware |
All these devices can use **MACHINE_PCB_SWTG024AS_A_2_0_1** with the LED configuration from this document.
### Photos (Binardat 2G06-04210GSM)
**Front View:**
<img src="photos/SWTG024AS-v2.0-unmanaged/binardat-2g06-04210gsm-front.jpg" width="400" />
**Back View:**
<img src="photos/SWTG024AS-v2.0-unmanaged/binardat-2g06-04210gsm-back.jpg" width="400" />
**PCB View:**
<img src="photos/SWTG024AS-v2.0-unmanaged/binardat-2g06-04210gsm-pcb.jpg" width="400" />
*Photos courtesy of [andreas5232](https://github.com/andreas5232) from [emesix/ONT-S207CW-62TS-SE#1](https://github.com/emesix/ONT-S207CW-62TS-SE/issues/1)*
### Hardware Specification
| Feature | Value |
|---|---|
| **CPU** | RTL8372N (detected via serial: "Detecting CPU: RTL8372N") |
| **Flash** | GD25Q128E (16MB) |
| **RAM** | Integrated in RTL8372N |
| **RJ45 Ports** | 4x 2.5GBase-T (Ports 1-4) |
| **SFP+ Ports** | 2x 10G (Ports 5-6) |
| **Console** | 115200 baud (RTLPlayground firmware) / 9600 baud (stock firmware) |
| **Web UI IP** | 192.168.2.1 |
| **Loader Mode IP** | 192.168.10.247 |
### Port Layout
```
┌─────────────────────────────────────────────┐
│ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │
│ │RJ45 │ │RJ45 │ │RJ45 │ │RJ45 │ │SFP+ │ │SFP+ │ │
│ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │ 5 │ │ 6 │ │
│ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │
│ │
│ [System LEDs] │
└─────────────────────────────────────────────┘
```
### Port Mapping
Physical front panel (left to right):
- Ports 1-4: RJ45 2.5GBase-T
- Ports 5-6: SFP+ 10G (Port 5 = left/J4/SFP1, Port 6 = right/J2/SFP2)
RTLPlayground logical mapping:
- Logical port 3 → Physical SFP1 (J4, left)
- Logical port 8 → Physical SFP2 (J2, right)
- Logical ports 4-7 → Physical RJ45 ports 1-4
| Physical Port | Logical Port | Type | LED Set | Web UI Port |
|---|---|---|---|---|
| 1 | 4 | RJ45 | 0 | 1 |
| 2 | 5 | RJ45 | 0 | 2 |
| 3 | 6 | RJ45 | 0 | 3 |
| 4 | 7 | RJ45 | 0 | 4 |
| 5 | 3 | SFP+ | 1 | 5 |
| 6 | 8 | SFP+ | 1 | 6 |
### LED Behavior (RTLPlayground v10+)
#### RJ45 Ports (1-4)
| LED Color | Speed |
|---|---|
| **Green** | 2.5G |
| **Orange** | 1G / 100M / 10M |
| **Off** | No link |
#### SFP+ Ports (5-6)
| LED Color | Speed |
|---|---|
| **Green** | 10G |
| **Orange** | 2.5G / 1G |
| **Off** | No link / No SFP module |
### RTLPlayground Configuration
**machine.h:**
```c
#define MACHINE_PCB_SWTG024AS_A_2_0_1
```
**machine.c configuration:**
```c
__code const struct machine machine = {
.machine_name = "PCB-SWTG024AS-A-2.0.1",
.isRTL8373 = 0, // RTL8372N
.mac_flash_offset = 0x1FC000,
.min_port = 3,
.max_port = 8,
.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},
// SFP port on SDS0 / logical port 3
.sfp_port[0].pin_detect = GPIO37,
.sfp_port[0].pin_los = GPIO_NA,
.sfp_port[0].pin_tx_disable = GPIO_NA,
.sfp_port[0].sds = 0,
.sfp_port[0].i2c = { .sda = GPIO41_I2C_SDA3_MDIO1, .scl = GPIO40_I2C_SCL3_MDC1 },
// SFP port on SDS1 / logical port 8
.sfp_port[1].pin_detect = GPIO38,
.sfp_port[1].pin_los = GPIO_NA,
.sfp_port[1].pin_tx_disable = GPIO_NA,
.sfp_port[1].sds = 1,
.sfp_port[1].i2c = { .sda = GPIO39_I2C_SDA4, .scl = GPIO40_I2C_SCL3_MDC1 },
.reset_pin = GPIO_NA,
.high_leds = { .mux = LED_28_SYS | LED_29, .enable = LED_27 | LED_28_SYS | LED_29 },
.port_led_set = { 0, 0, 0, 1, 0, 0, 0, 0, 1 },
.led_sets = {
{ // SET0: RJ45 - Green for 2.5G, Orange for 1G/100M/10M
LEDS_2G5 | LEDS_LINK | LEDS_ACT,
LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT,
0,
0
},
{ // SET1: SFP+ - Green for 10G, Orange for 1G/2.5G
LEDS_10G | LEDS_LINK | LEDS_ACT,
LEDS_2G5 | LEDS_1G | LEDS_LINK | LEDS_ACT,
0,
0
},
},
.led_mux_custom = 1,
.led_mux = {
0x00,0x01,0x04,0x05,0x08,0x09,0x0c,0x3f,0x0d,0x10,0x11,0x0e,
0x14,0x11,0x12,0x15,0x15,0x16,0x18,0x19,0x1a,0x19,0x1d,0x1e,
0x1c,0x1d,0x20,0x21
},
};
```
### Firmware History
| Version | Date | Changes | Status |
|---|---|---|---|
| v3 | 2026-09-14 | Original PCB_SWTG024AS_A_2_0_1 config | All ports working, LEDs wrong |
| v10 | 2026-09-17 | LED colors corrected for RJ45 and SFP+ | All ports + LEDs working |
### Known Issues & Fixes
#### Issue: LEDs showing wrong colors
**Symptom:** RJ45 ports show green at all speeds, SFP LEDs don't light up
**Fix:** Use v10 firmware with corrected LED sets and LED mux configuration
#### Issue: No network connectivity after flash
**Symptom:** Switch boots but no ping response
**Fix:** Ensure `.isRTL8373 = 0` (RTL8372N) is set - this device uses RTL8372N, not RTL8373
### Flashing Instructions
#### Via Loader Mode (CH341A)
```bash
flashrom -p ch341a_spi -c "GD25Q128E" -w rtlplayground-PCB_SWTG024AS_A_2_0_1.bin
```
#### Via Web UI
1. Access the web interface at `http://192.168.2.1`
2. Navigate to **Firmware Update** (under System tab)
3. Upload `rtlplayground_oem_upgrade-PCB_SWTG024AS_A_2_0_1.bin`
4. Wait for flash completion and automatic reboot
### Recovery
If flashing fails and the switch does not boot:
1. **Loader Mode Recovery:**
- Hold reset button while powering on
- Switch should be accessible at `192.168.10.247`
- Flash via `curl -T firmware.bin http://192.168.10.247/firmware`
2. **Serial Recovery:**
- Connect via UART (115200 baud for RTLPlayground, 9600 for stock)
- Use CH341A: `flashrom -p ch341a_spi -c "GD25Q128E" -w firmware.bin`
### Stock Firmware Information
- **Default IP:** 192.168.10.247
- **Default Login:** admin/admin (varies by OEM)
- **Console Baud:** 9600
- **CPU:** RTL8372N
- **Hardware detection string:** "PCB-SWTG024AS-A-2.0.1"
**Note:** This variant uses the same PCB as described above but may have different component population.
---
# SWTG024AS-v2.0 managed vs unmanaged
Changes I found with my board vs [Managed version](https://github.com/up-n-atom/SWTG118AS/tree/main/photos/SWGT024AS-v2.0) of the PCB.
### Bottom
@@ -27,7 +236,7 @@ Changes I found with my board vs [Managed version](https://github.com/up-n-atom/
* LED3: Not installed (System Led)
### Top
* K1: Not installed (Reset Button)
* R95: Installed (SFP2 (J2) signal RX-LOS), means that the managed-version can´t use the RX-LOS function.
* R95: Installed (SFP2 (J2) signal RX-LOS), means that the managed-version can't use the RX-LOS function.
* R270: Installed (SFP1 (J4) signal RX-LOS), same here as above.
* R268: Installed (SFP2 (J2) signal TX-DISABLE, but R262 200R pull-down is to high to drive by the SOC, needs mod!)
* U5: Flash is only 512 KiB instead of 2/4 MiB.
Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 KiB

+3 -2
View File
@@ -864,8 +864,9 @@ __code const struct machine machine = {
#elif defined MACHINE_PCB_SWTG024AS_A_2_0_1
// NOTE: ONT-S207CW-62TS-SE uses this same configuration
// See doc/devices/ONT-S207CW-62TS-SE.md for details
// NOTE: ONT-S207CW-62TS-SE and Binardat 2G06-04210GSM use this same configuration
// Both devices share identical PCB (PCB-SWTG024AS-A-2.0.1) with RTL8372N CPU
// See doc/devices/SWTG024AS.md section "PCB-SWTG024AS-A-2.0.1 Variant" for details
__code const struct machine machine = {
.machine_name = "PCB-SWTG024AS-A-2.0.1",
.isRTL8373 = 0,
+4 -3
View File
@@ -46,9 +46,10 @@
// #define MACHINE_FG_8GT_1SX
// #define MACHINE_LIANGUO_HYWS_SGT0108S
// #define MACHINE_POE_2G080110GS
// ONT-S207CW-62TS-SE: Identical to PCB-SWTG024AS-A-2.0.1 (RTL8372N, 4x2.5G + 2x10G SFP+)
// Use MACHINE_PCB_SWTG024AS_A_2_0_1 for ONT-S207CW-62TS-SE
// See doc/devices/ONT-S207CW-62TS-SE.md for configuration details
// ONT-S207CW-62TS-SE and Binardat 2G06-04210GSM: Identical PCB-SWTG024AS-A-2.0.1
// RTL8372N, 4x2.5G RJ45 + 2x10G SFP+, GD25Q128E (16MB)
// Use MACHINE_PCB_SWTG024AS_A_2_0_1 for both devices
// See doc/devices/SWTG024AS.md section "PCB-SWTG024AS-A-2.0.1 Variant" for details
typedef struct {
// GPIO pins for SDA/SCL