]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: add support for V3 variant of SG2008P 20616/head
authorDaniel Tang <tangrs@google.com>
Sun, 5 Oct 2025 23:32:30 +0000 (23:32 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 16 Jun 2026 07:42:19 +0000 (09:42 +0200)
commitbd587778450269bdff410e6148a50ba73edceecc
tree9aac7430ad8318f0d60c31de4fbcdb4e4c418db3
parent5b2c8f4ff94ef7c339586c8a59a684009f1b7194
realtek: add support for V3 variant of SG2008P

Add basic support for the TP-Link SG2008P V3 variant. The switch appears
to be identical to the V1 variant, except that it uses the MP3924
instead of the TPS23861 PoE chip.

Specifications:
---------------
 * SoC:       Realtek RTL8380M
 * Flash:     32 MiB SPI flash (Vendor varies)
 * RAM:       256 MiB (Vendor varies)
 * Ethernet:  8x 10/100/1000 Mbps with PoE on 4 ports
 * Buttons:   1x "Reset" button on front panel
 * Power:     53.5V DC barrel jack
 * UART:      1x serial header, unpopulated
 * PoE:       1x MPS MP3924 I2C PoE controller

Works:
------
  - (8) RJ-45 ethernet ports
  - Switch functions
  - System LED
  - Basic PoE support (no driver, but a startup script puts the chip
    into AUTO mode)

Not yet enabled:
----------------
  - PoE, Link/Act, PoE max and System LEDs

Install via web interface:
-------------------------

Not supported at this time.

Install via serial console/tftp:
--------------------------------

The footprints R27 (0201) and R28 (0402) are not populated. To enable
serial console, 50 ohm resistors should be soldered -- any value from
0 ohm to 50 ohm will work. R27 can be replaced by a solder bridge.

The u-boot firmware drops to a TP-Link specific "BOOTUTIL" shell at
38400 baud. There is no known way to exit out of this shell, and no
way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade
image first. However, if the image exceeds 6MiB in size, it will not
work. The sysupgrade image can also be flashed. To install OpenWRT:

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"

Power on device, and stop boot by pressing any key.
Once the shell is active:
 1. Ground out the CLK (pin 16) of the ROM (U7)
 2. Select option "3. Start"
 3. Bootloader notes that "The kernel has been damaged!"
 4. Release CLK as sson as bootloader thinks image is corrupted.
 5. Bootloader enters automatic recovery -- details printed on console
 6. Watch as the bootloader flashes and boots OpenWRT.

Blind install via tftp:
-----------------------

This method works when it's not feasible to install a serial header.

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"
 3. Watch network traffic (tcpdump or wireshark works)
 4. Power on the device.
 5. Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U7)
 6. When 192.168.0.30 makes tftp requests, release pin 16
 7. Wait 2-3 minutes for device to auto-flash and boot OpenWRT

Signed-off-by: Daniel Tang <tangrs@google.com>
Link: https://github.com/openwrt/openwrt/pull/20616
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
package/boot/uboot-tools/uboot-envtools/files/realtek
target/linux/realtek/base-files/etc/board.d/02_network
target/linux/realtek/base-files/etc/init.d/i2c_poe [new file with mode: 0755]
target/linux/realtek/base-files/lib/upgrade/platform.sh
target/linux/realtek/dts/rtl8380_tplink_sg2008p-v3.dts [new file with mode: 0644]
target/linux/realtek/image/rtl838x.mk