Add PCB-SWTG024AS V2.0 #263
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new machine/board profile for the PCB-SWTG024AS-V2.0 PCB variant used by the LG-SG5T1 (Issue #261), enabling correct port/SFP/LED mapping when compiling firmware for that hardware.
Changes:
- Adds a selectable machine define for
MACHINE_PCB_SWTG024AS_V2_0inmachine.h. - Introduces a new
struct machineconfiguration block inmachine.c(port mapping, SFP GPIO/I2C pins, LED mux/sets, and custom LED init).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| machine.h | Adds a commented-out machine selector define for the new PCB variant. |
| machine.c | Adds the full machine profile + machine_custom_init() for PCB-SWTG024AS-V2.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| __code const struct machine machine = { | ||
| .machine_name = "PCB-SWTG024AS-V2.0", | ||
| .isRTL8373 = 0, |
|
I would not listen to Copilot regarding the machine name. Without the suffix is better. Do you have pictures of the PCB? |
vDorst
left a comment
There was a problem hiding this comment.
See review comment.
Also can you also add basic documentation and pictures about this device?
This is a detailed example: https://github.com/logicog/RTLPlayground/blob/main/doc/devices/SWTG024AS.md
But a basic one is also fine like: https://github.com/logicog/RTLPlayground/blob/main/doc/devices/ZX310S-4T2XH.md.
For the picture, rotate the images so the ethernet ports a facing down and crop the image so only the PCB is visible and less of the table/surroundings.
| .led_sets = { | ||
| { | ||
| LEDS_2G5 | LEDS_LINK | LEDS_ACT, | ||
| LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, | ||
| LEDS_DUPLEX, | ||
| LEDS_2G5 | LEDS_LINK | LEDS_ACT | ||
| }, | ||
| { | ||
| LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_LINK | LEDS_ACT, | ||
| LEDS_10G | LEDS_LINK | LEDS_ACT, | ||
| LEDS_2G5 | LEDS_LINK, | ||
| LEDS_COL | LEDS_DUPLEX | ||
| }, |
There was a problem hiding this comment.
Can you add use comments, which port type and led colour this set is driving?



Add PCB-SWTG024AS-V2.0_16895 , used in LG-SG5T1
#261