From 511d35f63d961d2f48d8e29fdd20e68cacac0d2e Mon Sep 17 00:00:00 2001 From: diijkstra <16804536+diijkstra@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:34:28 +0100 Subject: [PATCH] TEG-S562: Port LEDs Added support for all leds on the device. Stock port sets are slightly differently configured, where additional LED0 on SET_0 and LED1&LED2 where configured for link/collisions/duplex. This has not been reproduced as those lines are probably not connected anywhere. --- doc/devices/TEG-S562.md | 7 +++---- machine.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/devices/TEG-S562.md b/doc/devices/TEG-S562.md index 5122f4e..6a49427 100644 --- a/doc/devices/TEG-S562.md +++ b/doc/devices/TEG-S562.md @@ -14,10 +14,11 @@ The memory chip is `Winbond W25Q16JV` with 16M-bit size. 1. 2.5G ports on all advertised speeds. 2. SFP+ communication. 3. Serial, Web UI. +4. All LEDs ## Known issues -1. LEDs are not initialized properly. +None. ## PCB @@ -136,8 +137,6 @@ GPIO mapping unknown. ## LEDs -Leds are not yet working as in stock firmware. This will be handled later. - Ports 1-4 are amber for 100M/1G links, Green for 2.5G. Port 5-6 are green for 10G/1G link. Both should flash on activity. @@ -166,7 +165,7 @@ Voltage is made by a `APW8713` (U3). ### `3.3` Voltage -Voltage is crated regulated by chip marke as `GoIAT` (U2). +Voltage is crated regulated by chip marked as `GoIAT` (U2). ## SFP SPI diff --git a/machine.c b/machine.c index 8b8fdbf..14f2579 100644 --- a/machine.c +++ b/machine.c @@ -339,6 +339,22 @@ __code const struct machine machine = { .sfp_port[1].sds = 1, .sfp_port[1].i2c = { .sda = GPIO49_I2C_SDA1, .scl = GPIO48_I2C_SCL1 }, .reset_pin = GPIO_NA, + .port_led_set = { 0, 0, 0, 1, 0, 0, 0, 0, 1}, + .led_sets = { + { + 0, // Unused + LEDS_2G5 | LEDS_LINK | LEDS_ACT, // Green + LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, // Amber + 0 // Unused + }, + { + 0, // Unused + 0, // Unused + LEDS_10G | LEDS_1G | LEDS_LINK | LEDS_ACT, // Green + 0, // Unused + }, + }, + }; void machine_custom_init(void) { }