Skip to content

Add PCB-SWTG024AS V2.0 #263

Open
Lynn-Becky wants to merge 4 commits into
logicog:mainfrom
Lynn-Becky:feat/PCB-SWTG024AS-V2.0
Open

Add PCB-SWTG024AS V2.0 #263
Lynn-Becky wants to merge 4 commits into
logicog:mainfrom
Lynn-Becky:feat/PCB-SWTG024AS-V2.0

Conversation

@Lynn-Becky

Copy link
Copy Markdown

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

Copilot AI review requested due to automatic review settings June 20, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_0 in machine.h.
  • Introduces a new struct machine configuration block in machine.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.

Comment thread machine.c
Comment on lines +900 to +902
__code const struct machine machine = {
.machine_name = "PCB-SWTG024AS-V2.0",
.isRTL8373 = 0,
@logicog

logicog commented Jun 20, 2026

Copy link
Copy Markdown
Owner

I would not listen to Copilot regarding the machine name. Without the suffix is better. Do you have pictures of the PCB?

@Lynn-Becky

Copy link
Copy Markdown
Author

I would not listen to Copilot regarding the machine name. Without the suffix is better. Do you have pictures of the PCB?

IMG_20260620_231515 IMG_20260620_231510

@Lynn-Becky

Lynn-Becky commented Jun 21, 2026

Copy link
Copy Markdown
Author

I would not listen to Copilot regarding the machine name. Without the suffix is better. Do you have pictures of the PCB?

IMG_20260621_010849 ​I tried to fix the switching issue on the 5th RJ45 port, but no way i have to proceed it.

@vDorst vDorst left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread machine.c
Comment on lines +921 to +933
.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
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add use comments, which port type and led colour this set is driving?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants