Dragino LPS8 is a LoRa/LoRaWAN gateway with single Wi-Fi 4 radio and a
single Fast Ethernet port, based around Dragino HE module.
Specifications:
CPU: Atheros AR9330 SoC @400MHz,
RAM: 64MB DDR,
Flash: 16MB SPI-NOR,
Ethernet: One 100Mbps port.
Wireless: built-in 1x1 802.11 2.4GHz radio,
USB: single USB2.0 High speed host port,
LoRa: Semtech SX1301 or compatible module, dependent on LoRa band.
Power: USB-C 5V, with the usual 5,1k CC resistors missing - use type
A-to-C cable.
LEDs:
- LAN (red)
- WAN/Status (RGB, blue: status, green: WLAN, red: WAN)
- LoRa (bicolor, controlled by Semtech module)
UART: 3.3V 115200-8-N-1 at internal expansion header J2
RxD: pin 4
TxD: pin 6
GND: pin 8
Label MAC: Wi-Fi interface.
Installation:
Log in via SSH to the unit, default username and password are 'root' and
'dragino', respectively. SSH listens on port 2222.
Just 'sysupgrade -n' from vendor firmware, dropping old configuration.
Restore vendor firmware:
the same as installation, just 'sysupgrade -F -n', dropping configuration.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Dragino MS14 is a small router/development kit with two Fast Ethernet
ports, with single 1x1 2,4GHz Wi-Fi radio and expansion headers.
Specifications:
CPU: Atheros AR9330 SoC @400MHz,
RAM: 64MB DDR,
Flash: 16MB SPI-NOR,
Ethernet: Two 100Mbps ports, LAN on eth0, WAN on eth1,
Wireless: built-in 1x1 802.11 2.4GHz radio,
USB: single USB2.0 High speed host port,
LEDs: 4 status LEDs for system, LAN, WAN and WLAN.
UART: 115200-8-N-1 at the 2x8 header
Label MAC: Wi-Fi interface.
The board support is ported over from old ar71xx target, and only
partially verified using LPS8 board, which will be introduced next.
Installation:
Log in via SSH to the unit, default username and password are 'root' and
'dragino', respectively. SSH listens on port 2222.
Just 'sysupgrade -n' from vendor firmware, dropping old configuration.
Update with configuration from ar71xx builds may be possible, but isn't
guaranteed, as the builds are many releases apart.
Restore vendor firmware:
the same as installation, just 'sysupgrade -F -n', dropping configuration.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
A recently added patch needs to be refreshed. Do that with make
target/linux/refresh.
Fixes: 89ef8aaf3e ("kernel: backport lm63 enhancements")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Fix typo in backup partition offset: `0xfe000` should be `0xfe0000`.
The incorrect offset caused the partition to be mapped at `0x0fe000`
instead of `0xfe0000`, placing it inside the firmware partition range.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23511
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hardware:
- SoC: MediaTek MT7628AN (MIPS 580MHz)
- Flash: 8 MiB NOR
- RAM: 64 MiB DDR2
- WLAN: 2.4 GHz (MT7628)
- Ethernet: 1x 10/100 Mbps WAN, 3x 10/100 LAN (MT7628)
- Buttons: 1x Reset, 1x wps
- LEDs: Front: 1x Red, 1x White
- Serial console: unpopulated header, 115200 8n1
- Power: 12v barrel
MAC addresses:
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| LAN/WAN | d4:0d:ab:xx:xx:x0 | label |
| WLAN 2g | d4:0d:ab:xx:xx:x1 | label+1 |
+---------+-------------------+-----------+
Migration to OpenWrt:
- Download the RSA-signed intermediate firmware from the Cudy website: `openwrt-ramips-mt76x8-cudy_wr300-squashfs-flash.bin`
- Connect the computer to the LAN and flash the intermediate firmware via the OEM web interface
- OpenWrt is now accessible via 192.168.1.1
Revert to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the WAN port (upper port)
- Provide the Cudy firmware as `recovery.bin` in the TFTP server
- Power on the device and hold the reset button immediately after the first LED blink
- The recovery process will start
- When the recovery process is done, OEM firmware is accessible via 192.168.10.1 again
General information:
- No possibility to load an initramfs image via U-Boot because there is no option to interrupt U-Boot
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23426
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
These were found by running:
comm -12 <(sort target/linux/generic/config-6.18) \
<(sort target/linux/armsr/config-6.18)
A similar process has been run between armsr/config-6.18
and armsr/armv8/config-6.18, though I have not pruned
the armv8 as much. Once the main branch switches armsr
to 6.18 we can do a more aggressive deduplication.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The armv8 configuration has more features enabled compared to armv7,
as armv8 is intended to run on a selection of real hardware, while
armsr/armv7 almost always runs only in QEMU.
Some kmod dependency issues were appearing on armv7 builds which
did not appear elsewhere. To minimise these issues, we will
move the framebuffer feature set to the top level of the target.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Set the configuration options that were prompted for
by the new kernel.
ARCH_CIX (Cixtech) has been enabled as their SoCs
have appeared in high end arm64 hardware.
There are also new Arm64 SoCs from Renesas and
Allwinner that should be bootable with the right
firmware stack.
There are minimal changes in the armv7 config,
only CONFIG_PAGE_BLOCK_MAX_ORDER has a unique
setting.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
NXP has introduced an evolved version of the LS1028A ENETC
IP in their new i.MX94/5 family. While the two devices
share a common lineage, they are different enough that
they cannot be implemented in the same driver.
Hence some functions from the LS1028A ENETC driver have been
split into a 'library'.
When a kmod package for the new ENETC (nxp-enetc4) is introduced then
the packaging for the common library will need to be reworked.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
In target/linux/generic/backport-6.18/ we have backported
bitfield changes from 6.19.
This change to drivers/soc/renesas/rz-sysc.c was part
of the same patch series and is needed to resolve
a duplicate definition compile error.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
In OpenWrt we have backported changes to bitfield.h
from kernel 6.19.
A backport fix, 9966c8cc987e ("irqchip/renesas-rzv2h:
Prevent TINT spurious interrupt during resume") into
linux-stable/linux-6.18.y modified irq-renesas-rzv2h.c
to include it's own field_get, which does not exist
in the 6.18 branch, causing a compile error.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Now, that the support for e750a/e600g/e600gac is merged, enable link state
reporting for the Fast Ethernet port attached through the built-in switch,
so it can generate netifd and hotplug events as well, for example -
- to control DHCP client.
Signed-off-by: 张 鹏 <sd20@qxwlan.com>
Link: https://github.com/openwrt/openwrt/pull/9971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add node for swphy1 in qca953x.dtsi, as it is common part - but make it
disabled, as this one is rarely used in other devices. Enable it in
RBmAP-2nD and attach to eth1 as PHY.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/9971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Now, that the support for ZF7372 is merged, enable link state reporting
for the Fast Ethernet port attached through the built-in switch, so
it can generate netifd and hotplug events as well, for example -
- to control DHCP client.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/9971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Introduce the property from previous commit on the SoCs which use a
fixed 1000FD link to their internal switch. This way, devices which have
a single port attached through it can drop the "fixed-link" node if
needed, and attach proper phy-handle provided by built-in switch to
the port, to report link status information on userspace.
AR7100 is skipped intentionally, because its connection to built-in
switch isn't a fixed-link.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/9971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
To support reporting link state of PHYs attached to built-in switch,
add a device tree knob which allows to force 1000Mbps/FD mode,
which is the link mode between eth1 MAC and the on-chip switch, even if
no "fixed-link" node is present. Re-use the "builtin-switch" name
already used in respective MDIO nodes.
This way, a phy-handle property can be added to eth1 node, and devices,
which have a single port attached through the built-in switch,
can report proper link state of that to userspace.
To perform that, one needs to delete the 'fixed-link' node and map the
correct swphy node to 'phy-handle' property. One of those is still
required to be present in the eth1 node.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/9971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
EN7581 or AN7583 SoCs support connecting multiple external SerDes (e.g.
Ethernet or USB SerDes) to GDM3 or GDM4 ports via a hw arbiter that
manages the traffic in a TDM manner. As a result multiple net_devices can
connect to the same GDM{3,4} port and there is a theoretical "1:n"
relation between GDM ports and net_devices.
┌─────────────────────────────────┐
│ │ ┌──────┐
│ P1 GDM1 ├────►MT7530│
│ │ └──────┘
│ │ ETH0 (DSA conduit)
│ │
│ PSE/FE │
│ │
│ │
│ │ ┌─────┐
│ P0 CDM1 ├────►QDMA0│
│ P4 P9 GDM4 │ └─────┘
└──┬─────────────────────────┬────┘
│ │
┌──▼──┐ ┌────▼────┐
│ PPE │ │ ARB │
└─────┘ └─┬─────┬─┘
│ │
┌──▼──┐┌─▼───┐
│ ETH ││ USB │
└─────┘└─────┘
ETH1 ETH2
This series introduces support for multiple net_devices connected to the
same Frame Engine (FE) GDM port (GDM3 or GDM4) via an external hw
arbiter. Please note GDM1 or GDM2 does not support the connection with
the external arbiter.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23481
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
I mistakenly assumed napi_gro_receive could not be used here. But it
turns out I needed to take the address of mal's napi_device.
Important to get everything possible out of this old underpowered
platform.
Upstream for whatever reason wants to do away with
netif_receive_skb_list.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23382
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Fix by replacing memset with manual 0 assignments. The first patch was
rightly rejected by upstream as it affects everything so keep it in 9xx.
Upstream message for it is:
dcbz instruction shouldn't be used on non-cached memory. Using
it on non-cached memory can result in alignment exception and
implies a heavy handling.
Instead of silentely emulating the instruction and resulting in high
performance degradation, warn whenever an alignment exception is
taken in kernel mode due to dcbz, so that the user is made aware that
dcbz instruction has been used unexpectedly by the kernel.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23382
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Specifications:
SoC: MediaTek MT7988A (4 cores)
RAM: 1024MiB
Flash: Winbond SPI-NAND 128 MiB
Network: 1 WAN (2.5G), 3 LAN (1G), 1 SFP+ (10G)
2 SIM slots
Buttons: Reset, WPS
Power: DC 12V 3A (Recommend 19V to avoid voltage drop)
WiFi: MT7996 2.4Ghz, 5.8Ghz and 6Ghz (BE19000)
- 2.4Ghz and 5.8Ghz share same dual band antenna (4)
- 6Ghz uses dedicated 6G antenna (4)
Misc: 1 USB2.0 port, UART header
Installation:
A. Through U-Boot menu:
- Prepare your connecting computer to use a static IP in
network 192.168.1.0/24
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware then
you got the right model.
- Upload the sysupgrade file.
Note 1: Recovery GUI can be used to recover from an incorrect
firmware flash.
Note 2: There is a GPIO watchdog that expires after 2 minutes
so flashing sysupgrade via U-boot needs to be done
quickly within that timer.
B. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled
(modified by the seller), you can easily upgrade
by going to the dashboard (192.168.1.1) and then
navigate to System -> Backup/Flash firmware,
then flash the firmware
MAC Addresses:
LAN(printed MAC) : F8:5E:3C:xx:xx:xx (Factory, 0xffff4)
WAN : F8:5E:3C:xx:xx:xx (Factory, 0xffffa)
SFP+ : F8:5E:3C:xx:xx:xx (Factory, 0xfffee)
2.4GHz : F8:5E:3C:xx:xx:xx (Factory, 0x4)
5GHz : F8:5E:3C:xx:xx:xx (Factory, 0x4) + 0x10
6Ghz : F8:5E:3C:xx:xx:xx (Factory, 0x4) + 0x20
Signed-off-by: Tuan Phan <pttuan@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23053
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
**Huasifei WH3000R NAND**
Wi-Fi 6 router based on MediaTek MT7981B SoC.
MT7981B+MT7976CN+MT7531AE
**Specifications**
SoC: Filogic 820 MT7981B (1.3GHz)
RAM: DDR3 512MB
Flash: 256MiB Winbond SPI NAND
WiFi: MT7976C: 2.4GHz 2x2, 5GHz 2x2
Ethernet: MT7531: 3x 1GbE LAN + 1x 1GbE WAN
USB: 1x USB 3.0 port
Two buttons: reset and mesh
LEDs: RGB (red, green, blue together)
UART: 3.3V, TX, RX, GND / 115200 8N1
DC power interface
+---------+-------------------+--------------------------+
| | MAC | Algorithm |
+---------+-------------------+--------------------------+
| LAN | 58:23:BC:xx:xx:x2 | label+1 |
| WAN | 58:23:BC:xx:xx:x1 | label+0 (eeprom) |
| WLAN 2g | 58:23:BC:xx:xx:x3 | label+2 |
| WLAN 5g | 58:23:BC:xx:xx:x4 | label+3 |
+---------+-------------------+--------------------------+
Since it's convenient for the users to check and tell MAC
to their internet providers from the router label, we set
WAN as a base MAC located at 'Factory', 0x4.
Discussed this with the vendor.
**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the LAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWrt sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.
**Installation via sysupgrade**
Just flash sysupgrade file via
[LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash)
without saving the settings.
**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1`
and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000r-nand-squashfs-sysupgrade.bin
```
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23156
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add support for the AlwayLink M01K43 5G CPE router.
Hardware specifications:
- SoC: MediaTek MT7981B (Filogic 820), dual-core Cortex-A53
- RAM: 256 MiB DDR3 (0x40000000, size 0x10000000)
- Flash: 128 MiB SPI-NAND (UBI, root) + 4 MiB SPI-NOR (bootloader)
- Ethernet: 4x 1 GbE LAN + 1x 2.5 GbE WAN
(MT7531 DSA switch; WAN via RTL8221B 2.5GbE PHY on MAC1)
- WiFi: MT7981 built-in 2x2 802.11ax (2.4 GHz + 5 GHz)
- USB: 1x xHCI (USB 2.0 only; USB 3.0 PHY pins not routed)
- Modem: M.2 B-Key slot wired for USB (tested: Quectel RM551E-GL,
Quectel RM520N-GL via QMI)
- LEDs: 10x GPIO LEDs (status, WAN, LAN, WiFi 2.4/5, signal bars)
- Buttons: WPS, Reset, RFKill
- Power: 12 V DC barrel jack
- UART: 3.3 V TTL header on PCB, 115200 8N1, no flow control
PCB silkscreen: M01K43 v5.0
Manufacturer: Shenzhen AlwayLink Wireless Technology Co., Ltd.
MAC addresses come from the 'ledeinfo' partition (mtd6) at offset 0x18
(label macaddr_ledeinfo_18); the stored value is the LAN MAC.
interface this port vendor firmware
------------------- ----------- --------------------------
eth0 / LAN bridge base + 0 base + 0
eth1 / WAN base + 1 base + 1
wifi 2.4 GHz band@0 base + 2 base (driver-derived)
wifi 5 GHz band@1 base + 3 base + LAA bit (driver)
The vendor's ethernet scheme (LAN = base, WAN = base + 1) is reproduced
exactly. For WiFi the vendor's proprietary mt_wifi driver ignores the
stored per-radio MAC and derives each BSSID from the base by setting the
locally-administered bit, so the radios are not given clean unicast
offsets. Under mainline mt76 + DSA, reusing the base (LAN) MAC on a radio
collides at L2 with the gmac0 conduit, so this port assigns the 2.4 GHz
and 5 GHz radios base + 2 and base + 3 — unique unicast addresses in the
same OUI block.
Installation
------------
Stock firmware defaults (verified on shipping units):
LAN IP: 192.168.100.1
SSH/web: user 'root', password 'admin'
Serial: 3.3 V TTL UART header on PCB, 115200 8N1, no flow control
Image artifacts produced by this device definition:
openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-factory.bin
openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-sysupgrade.bin
Before flashing, back up the per-unit partitions (cannot be
regenerated):
ssh root@192.168.100.1
dd if=/dev/mtd3 of=/tmp/factory.bin bs=1 count=655360
dd if=/dev/mtd6 of=/tmp/ledeinfo.bin bs=1 count=65536
exit
scp root@192.168.100.1:/tmp/factory.bin .
scp root@192.168.100.1:/tmp/ledeinfo.bin .
Method 1 - From an existing OpenWrt install (sysupgrade):
IMG=openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-sysupgrade.bin
scp "$IMG" root@192.168.1.1:/tmp/sysupgrade.bin
ssh root@192.168.1.1 sysupgrade -n /tmp/sysupgrade.bin
Method 2 - U-Boot serial recovery via TFTP (requires 3.3 V USB-UART
adapter):
1. Attach 3.3 V USB-UART (TX, RX, GND) to the PCB header. Open a
terminal at 115200 8N1, no flow control.
2. Configure a TFTP server on the host PC at IP 192.168.2.88.
Place the factory image in the TFTP root, renamed if desired.
3. Power on the router. The BL2/U-Boot banner prints within ~1
second; press any key during the autoboot countdown to enter
the U-Boot menu.
4. From the menu, select 'Upgrade ubi'. U-Boot's default IP is
192.168.2.1 and it expects the TFTP server at 192.168.2.88.
Provide the factory image filename when prompted.
5. Wait for the write to complete; U-Boot reboots into OpenWrt.
Method 3 - From a NAND programmer (brick-recovery path):
1. Clip onto or desolder the SPI-NAND chip and dump the full
128 MiB with a programmer (e.g. RT809H, CH341A with NAND
adapter). Keep the dump as a recovery image.
2. Using the same programmer, write the factory.bin image to
the UBI region of the NAND. The SPI-NOR (BL2/u-boot-env/
Factory/FIP/woem/ledeinfo/nvram) must NOT be erased - those
partitions are per-unit and live on the separate 4 MiB NOR.
3. Reseat the chip and power on. The bootloader on NOR will
load the new kernel and rootfs from UBI.
Signed-off-by: Richard Jones <richard@netsolution.shop>
Link: https://github.com/openwrt/openwrt/pull/22818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The target was recently switched to 6.18. However, it was missed to drop
the kernel config 6.12 and a rebase unintendedly reverted previous
changes. Since the config isn't needed anymore, drop it.
Fixes: d3a7e89569 ("qoriq: switch to 6.18 kernel")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>