From: Ian Pangilinan
Date: Sun, 28 July 2022 11:27:00 +0800
Subject: [PATCH] ramips: add support for Tozed S12 Plus (UNISOC)
Tozed S12 Plus (UNISOC) is a Cat.6 LTE CPE. It is known as ZLT S12 Pro
in some markets.
Product link: https://www.sztozed.com/en/contents/58/84.html
Hardware Highlights:
* SOC: MT7621A 2C4T @ 880MHz
* RAM: DDR3 256MB @ 800MHz
* FLASH: MX25L12805D 16MB SPI NOR
* WLAN0: MT7612E 5GHz 802.11nac 2x2:2 @ 867Mbps
* WLAN1: MT7603E 2.4GHz 802.11bgn 2x2:2 @ 300Mbps
* SWITCH: MT7530 4-port GbE
* WWAN: UNISOC SL8563 Cat.6 LTE
* SIM: 1x Mini-SIM 2FF
* BUTTONS: Reset, WPS, Wi-Fi
* LEDS: Power (Yellow/Blue), Wi-Fi, Data (Red/Blue), Signal1-5,
Telephone
* POWER: 12VDc 2A
There is an existing PR for this device here:
https://github.com/openwrt/openwrt/pull/10321, but the author seems to
have abandoned it after a week of no update in reply to reviewer
suggestions and inquiries. This submission aims to remedy the
shortcomings of that PR and will be made up-to-date by this author.
The device can be sysupgrade-d directly from the stock firmware. The
flash layout remains the same between stock and OpenWrt.
This is the flash layout from stock firmware:
0x-0x0003 : "u-boot"
0x0003-0x00038000 : "u-boot-env"
0x0004-0x0005 : "factory"
0x0005-0x0100 : "firmware"
0x-0x00217058 : "kernel"
0x00217058-0x00fb : "rootfs"
0x00c3-0x00fb : "rootfs_data"
0x00038000-0x0004 : "tozed-conf"
Installation Instructions:
Stock firmware runs an old OpenWrt SNAPSHOT release. Installation can be
either via
a) webui (gain superadmin access, use the sysupgrade image),
b) sysupgrade (gain root shell access, use the sysupgrade image), or
c) tftpboot in the bootloader.
Instructions below are for c). Connect the USB-TTL serial converter as
follows when facing the board upright on the side of the buttons and
RJ45 ports, located under the WPS/Wi-Fi buttons from left to right:
(TX) (GND) (RX)
Baud rate is 115200.
1. Connect the computer to the device via ethernet cable. Set a static
adddress of 10.10.10.3/24 to the wired interface.
2. Start the TFTP server, point it to where the initramfs image is
located. Rename the image to 'test.bin'.
3. Turn on the device. There will be a three-second delay before the
default 'Boot system code via flash' is selected.
4. Interrupt the boot process by pressing 1 to 'System Load Linux to
SDRAM via TFTP'.
5. Press enter to accept the default 'Input device IP (10.10.10.123)'.
6. Press enter to accept the default 'Input server IP (10.10.10.3)'.
7. Press enter to accept the default 'Input Linux Kernel filename ()',
or enter 'test.bin'.
8. Wait for the initramfs image to finish loading.
9. Reconnect the wired interface to any LAN ports of the device via
DHCP.
9. Flash the sysupgrade image at
http://192.168.1.1/cgi-bin/luci/admin/system/flash
What Works?
+ LEDs
+ Buttons
+ Wired LAN and WAN
+ Wireless LAN
What Doesn't?
- Wireless WAN
- Telephone
The only non-configurable LEDs are those from each of the switch ports.
They function as intended. I set the yellow and blue power LEDs as
status indicators for OpenWrt. There is also an exported GPIO to reset
the WWAN.
Support fgor WWAN could come at a later date. I have setup LAN4 of the
device as WAN.
Signed-off-by: Ian Pangilinan
---
.../dts/mt7621_tozed_s12-unisoc-plus.dts (new) | 278
+
target/linux/ramips/image/mt7621.mk| 10 +
.../mt7621/base-files/etc/board.d/02_network | 1 +
3 files changed, 289 insertions(+), 0 deletion(-)
create mode 100644 target/linux/ramips/dts/mt7621_notion_r281.dts
create mode 100644
target/linux/ramips/dts/mt7621_tozed_s12-unisoc-plus.dts
diff --git a/target/linux/ramips/dts/mt7621_tozed_s12-unisoc-plus.dts
b/target/linux/ramips/dts/mt7621_tozed_s12-unisoc-plus.dts
new file mode 100644
index 00..b4697ee63d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tozed_s12-unisoc-plus.dts
@@ -0,0 +1,278 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+// Copyright (C) 2022, Ian Pangilinan
+
+#include "mt7621.dtsi"
+
+#include
+#include
+
+/ {
+ compatible = "tozed,s12-unisoc-plus", "mediatek,mt7621-soc";
+ model = "Tozed S12 Plus (UNISOC)";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_power0;
+ led-failsafe = &led_power0;
+ led-running = &led_power1;
+ led-upgrade = &led_power0;
+ label-mac-device = &gmac0;
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+