]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: add support for TP-Link TL-ST1008F v2.0
authorJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 2 May 2025 21:39:14 +0000 (21:39 +0000)
committerPaul Spooren <mail@aparcar.org>
Mon, 16 Jun 2025 11:30:52 +0000 (13:30 +0200)
commit39b9b491bb585ba6c16dfc28e5dd0316c8fe7b0d
tree91c69196b2a82ff6093f313917f81842e1d17318
parent53b213b99b9ff801336a44354b9f163847b2a13b
realtek: add support for TP-Link TL-ST1008F v2.0

The TP-Link TL-ST1008F is an 8-port multi-gig switch with 8x SFP+ ports
which support 1G/2.5G/10G speeds. Out of the box it is an unmanaged
switch but with RTL9303 and sufficient RAM + Flash it easily can run as
a managed Linux switch.

Hardware:
 - Realtek RTL9303 Switch SoC
 - Winbond 25Q256JVFQ (32MB flash)
 - Samsung K4B4G1646E-BYMA (512MB DDR3 SDRAM)
 - TCA9534 GPIO extender to control the port LEDs
 - 8x SFP+ 1/2.5/10G slot
 - Serial: 3V3 logic, 115200 8N1
 - 5-pin JTAG
 - physical tri-state switch (used by stock firmware for port speed
   config)
 - 24-LED port speed matrix
 - robust full-metal case

Power is supplied via a 12V 2A standard barrel connector.
There are THT holes on the PCB for serial console next to the flash chip
and JTAG pads. Serial uses 3V3 logic and standard 115200-8N1 config.
Pinout is labeled on the PCB.

All ports/connectors and LEDs are on the back, only Power LED is on the
front.

Hints before flashing
----------------------

* It is recommended to backup the stock flash contents before proceeding.
  Backup can be done from U-Boot (with memory display), from OpenWrt
  initramfs or probably with SPI flash programmer.
  There is no stock recovery functionality.
* Use a small image for RAM boot or first flash. Since you need to use
  ymodem, this is really slow and takes time.
* This does not keep the dual-partition layout for firmware to have more
  space available for a single OpenWrt installation.

Initial flashing
----------------------

The stock U-boot has broken networking thus no TFTP available. Serial
transfer only.

1. Open device and connect serial as per layout and settings
   (recommended to use picocom, ymodem not working with minicom)
2. Connect power to device and press Esc when prompted to enter
   the U-Boot console.
3. Boot initramfs
  * in the U-Boot console:
      loady 0x82000000 (load OpenWrt image via ymodem)
      CTRL-A CTRL-S <initramfs.bin> (specify initramfs image for
                                         picocom to upload)
      bootm 0x82000000 (boot initramfs from RAM)
(Just to be on the safe side, backup your flash now while RAM-booted)
4. Connect network to your device
5. Upload the sysupgrade image (e.g. with scp)
6. Do sysupgrade

There's no need to adjust the bootcmd in U-Boot. Networking is running
fine once the realtek driver initialized everything in OpenWrt. No
functional difference with running 'rtk network on' within U-Boot
before. Running this even fails and returns with an error.

Return to stock
------------------

This only works if you did a backup of the flash before flashing
OpenWrt. Stock dump then can be flashed from within U-Boot or OpenWrt.
There is no vendor firmware image because this is an unmanaged switch!

CAUTION: Make sure to not overwrite the U-Boot partition(s). If you do
 not have a flash programmer, you may not be able to debrick
 your device then.

Co-authored-by: Balázs Triszka <balika011@gmail.com>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/base-files/etc/board.d/02_network
target/linux/realtek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr [new file with mode: 0644]
target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts [new file with mode: 0644]
target/linux/realtek/image/rtl930x.mk