ramips: add support for SIM SIMAX1800U

SIM SIMAX1800U has the similar hardware design as the SIMAX1800T. The
only difference is the Ethernet portmap.

Specification
-------------
- SoC       : Mediatek MT7621
- RAM       : 256 MiB DDR3
- Flash     : 128 MiB NAND Flash
- WLAN      : Mediatek MT7905 DBDC
  - 2.4 GHz : 2x2 MIMO WiFi6
  - 5 GHz   : 2x2 MIMO WiFi6
- Ethernet  : MT7621 built-in 10/100/1000 Mbps 1x WAN; 3x LAN
- UART      : 3.3V, 115200n8
- Buttons   : 1x RESET; 1x WPS/MESH
- LEDs      : 1x Multi-Color(Blue;Green;Red)
- Power     : DC 12V1A
- CMIIT ID  : 2022AP7163
- TFTP IP   :
  - server  : 192.168.1.254
  - router  : 192.168.1.28

TFTP Installation(recommend)
------------
1. Set local tftp server IP "192.168.1.254" and NetMask "255.255.255.0".
2. Rename initramfs-kernel.bin to "factory.bin" and put it in the root
   directory of the tftp server. tftpd64 is a good choice for Windows.
3. Remove all Ethernet cables and WiFi connections from the PC, except
   for the one connected to the SIMAX1800U. Start the TFTP server, plug
   in the power adapter and wait for the OpenWrt system to boot.
4. Backup "firmware" partition and rename it to "firmware.bin". We need
   it to back to the stock firmware.
5. Use "fw_printenv" command to list envs. If "firmware_select=2" is
   observed then set u-boot env variable via command:
   `fw_setenv firmware_select 1`
6. Apply sysupgrade.bin in OpenWrt LuCI.

Web UI Installation
------------
1. Apply update by uploading initramfs-factory.bin to the web UI.
2. Use "fw_printenv" command to list envs. If "firmware_select=2" is
   observed then set u-boot env variable via command:
   `fw_setenv firmware_select 1`
3. Apply squashfs-sysupgrade.bin in OpenWrt LuCI.

Return to Stock Firmware
----------------------------
  Restore the backup firmware partition in the installation step 4.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LABEL   | 98:xx:xx:xx:xx:b2 |
| LAN     | 98:xx:xx:xx:xx:b5 |
| WAN     | 98:xx:xx:xx:xx:b2 |
| WLAN2G  | 98:xx:xx:xx:xx:b4 |
| WLAN5G  | 9a:xx:xx:xx:xx:b4 |
+---------+-------------------+

Tips:
-----------
  User can use `TFTP Installation` method to recover a brick device.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Shiji Yang 2025-07-16 22:30:26 +08:00 committed by Hauke Mehrtens
parent 9ce23ac840
commit 1199a7aad6
8 changed files with 79 additions and 9 deletions

View File

@ -67,16 +67,10 @@
&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy4>;
nvmem-cells = <&macaddr_factory_8004 (-3)>;
nvmem-cell-names = "mac-address";
};
&ethphy4 {
/delete-property/ interrupts;
};
&nand {
status = "okay";
@ -166,7 +160,6 @@
ports {
port@1 {
status = "okay";
label = "lan3";
};
port@2 {
@ -176,7 +169,6 @@
port@3 {
status = "okay";
label = "lan1";
};
};
};

View File

@ -6,3 +6,23 @@
compatible = "haier,har-20s2u1", "mediatek,mt7621-soc";
model = "Haier HAR-20S2U1";
};
&ethphy4 {
/delete-property/ interrupts;
};
&gmac1 {
phy-handle = <&ethphy4>;
};
&switch0 {
ports {
port@1 {
label = "lan3";
};
port@3 {
label = "lan1";
};
};
};

View File

@ -6,3 +6,23 @@
compatible = "sim,simax1800t", "mediatek,mt7621-soc";
model = "SIM SIMAX1800T";
};
&ethphy4 {
/delete-property/ interrupts;
};
&gmac1 {
phy-handle = <&ethphy4>;
};
&switch0 {
ports {
port@1 {
label = "lan3";
};
port@3 {
label = "lan1";
};
};
};

View File

@ -0,0 +1,28 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621_haier-sim_wr1800k.dtsi"
/ {
compatible = "sim,simax1800u", "mediatek,mt7621-soc";
model = "SIM SIMAX1800U";
};
&ethphy0 {
/delete-property/ interrupts;
};
&gmac1 {
phy-handle = <&ethphy0>;
};
&switch0 {
ports {
port@1 {
label = "lan1";
};
port@3 {
label = "lan3";
};
};
};

View File

@ -2615,6 +2615,13 @@ define Device/sim_simax1800t
endef
TARGET_DEVICES += sim_simax1800t
define Device/sim_simax1800u
$(Device/haier-sim_wr1800k)
DEVICE_VENDOR := SIM
DEVICE_MODEL := SIMAX1800U
endef
TARGET_DEVICES += sim_simax1800u
define Device/snr_snr-cpe-me1
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)

View File

@ -22,6 +22,7 @@ ramips_setup_interfaces()
mercusys,mr70x-v1|\
netgear,wax202|\
sim,simax1800t|\
sim,simax1800u|\
tplink,mr600-v2-eu|\
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-ac2100|\

View File

@ -105,7 +105,8 @@ case "$board" in
;;
haier,har-20s2u1|\
jcg,y2|\
sim,simax1800t)
sim,simax1800t|\
sim,simax1800u)
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress
;;

View File

@ -138,6 +138,7 @@ platform_do_upgrade() {
sercomm,na502|\
sercomm,na502s|\
sim,simax1800t|\
sim,simax1800u|\
tplink,ec330-g5u-v1|\
wifire,s1500-nbn|\
xiaomi,mi-router-3g|\