TP-Link TL-SG2452P
The TL-SG2452P, also known as T1600G-52PS, is a 48 (52) port Gigabit switch with PoE on all 48 RJ45 ports and 4 additional SFP ports. Only v4 is supported by OpenWrt, the earlier versions are based on a Broadcom SoC and cannot be supported.
Non-working features
- SFP ports: No support for the PHY at the moment
- PoE: Additional workaround necessary to enable the ports (see below)
- LEDs: Additional workaround necessary to enable the LEDs (see below)
- Fan control: Only high and medium speed available, manual only
Supported Versions
Hardware Highlights
Installation
Serial console method
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. To install OpenWRT:
Prepare a tftp server with:
- server address: 192.168.0.146
- the image as: “uImage.img”
Power on device, and stop boot by pressing any key. Once the shell is active:
- Ground out the CLK (pin 16) of the ROM (U6)
- Select option “3. Start”
- Bootloader notes that “The kernel has been damaged!”
- Release CLK as soon as bootloader thinks image is corrupted.
- Bootloader enters automatic recovery -- details printed on console
- 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:
- server address: 192.168.0.146
- the image as: “uImage.img”
- Watch network traffic (tcpdump or wireshark works)
- Power on the device.
- Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U6)
- When 192.168.0.30 makes tftp requests, release pin 16
- Wait 2-3 minutes for device to auto-flash and boot OpenWRT
Workarounds
PoE
The PoE modules and the kernel hwmon driver work, but the ICs are not in the correct mode during startup. In order to enable them, the package `i2c-tools` needs to installed and a startup script is required (e.g. /etc/rc.local):
i2cset -y 0 0x30 0x12 0xff for i in `seq 3 14`; do echo 1 > /sys/class/hwmon/hwmon$i/in0_enable echo 1 > /sys/class/hwmon/hwmon$i/in1_enable echo 1 > /sys/class/hwmon/hwmon$i/in2_enable echo 1 > /sys/class/hwmon/hwmon$i/in3_enable done
LEDs
The following commands enable the LEDs on the ports - you can put them into /etc/rc.local:
cd /sys/kernel/debug/rtl838x/led echo 0x0060f568 > led_glb_ctrl echo 0x00007dea > led_set_0_1 echo 0xffffffff > led_copr_pmask_ctrl_0 echo 0x000fffff > led_copr_pmask_ctrl_1 echo 0xffffffff > led_combo_ctrl_0 echo 0x000fffff > led_combo_ctrl_1
Hardware
Info
Architecture | MIPS |
---|---|
Vendor | Realtek |
Bootloader | (Crippled) U-Boot |
System-On-Chip | RTL8393M |
CPU/Speed | 500 MHz |
Flash-Chip | Winbond |
Flash size | 32 MiB |
RAM | 256 MiB |
Wireless | None |
Ethernet | 1GBit |
Switch | 48x GBit, 4x SFP |
USB | none |
Serial | Yes |
JTAG | No |