Commit graph

28621 commits

Author SHA1 Message Date
Carsten Spieß 2b1d7965c7 octeon: ubnt-edgerouter-e300: fix missing MTD partition
The MAC addresses should be read from 3rd MTD partition,
but only two MTD partitions are populated.

To fix it, a partitions node has to surround the partition
nodes in device tree.

Tested with Edgerouter 6P

Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
(fixed checkpatch complains)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-07-15 17:05:58 +02:00
Carsten Spieß 9009672930 octeon: ubnt-edgerouter-e300: fix LED settings
LEDs on Edgerouter 6P didn't work correctly:
blue /white LED swapped, on/off state inverted

Fixed in device tree:
swap the GPIO ports for power:blue and power:white LEDs
change LED activity from LOW to HIGH

Tested on Edgerouter 6P

Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
2023-07-15 17:05:58 +02:00
Christian Svensson 6bf0e76494 octeon: n821: add Cisco vEdge 1000 base
This is the first commit to introduce the base for the N821 board used
in Cisco vEdge 1000.

This commit does not include the custom CPLD drivers but rather
everything else that is already present in the upstream kernel.

This results in an image that boots, but e.g. the SFP ports are not
usable.

Hardware:

  - CPU: Cavium Networks CN6130, 4 cores @ 1.0 GHz
  - Flash:
    - 16 MiB SPI NOR presented as 2x8 MiB for A/B boot recovery
    - 8192 MiB eMMC
  - RAM: 4096 MiB
  - Ethernet 1Gbit ports: 1x
  - Ethernet SFP ports: 8x
  - USB ports: 2x 3.0 Type-A on front panel
  - Serial: Two, one internal and one external
  - JTAG: Yes
  - LED count: 18x
  - Button count: 1x
  - GPIOs: 1x
  - Power: 2x redundant DC 12V barrel plug
  - Extra: Slot for SD card on front

See the OpenWrt wiki for more hardware details.

Installation:

  - Flash squashfs to /dev/sda2 and put kernel on /dev/sda1.
  - Update uboot's bootcmd environment variable to match.

Full installation guide will be added to OpenWrt wiki when sysupgrade
support is added.

Signed-off-by: Christian Svensson <blue@cmd.nu>
Signed-off-by: Tommy Nevtelen <tommy@nevtelen.com>
Tested-by: Viktor Ekmark <viktor@ekmark.se>
Tested-by: Daniel Wennberg <github@networkninja.se>
2023-07-15 17:05:58 +02:00
Christian Svensson 861b608ab5 octeon: enable AT24 unconditionally
For the N821 platform we need to load the AT24 EEPROM driver before
everything else in order for the MAC address to be available at
driver initialization time.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-07-15 17:05:58 +02:00
Tomasz Maciej Nowak 2d5f7035cf sdk: rename README
'help' target fails not finding a file, so follow up on a change[2] made
as a fix for main README[1].

1. d0113711a3 ("README: port to 21st century")
2. 751486b31f ("build: fix README.md reference after rename")

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-07-15 17:02:42 +02:00
Tomasz Maciej Nowak e40b9a7fa0 ib: split out processing user provided packages
Some device recipes remove default target packages. If user tries to add
them back they will be ignored, since packages list is processed in one
go. Process the device recipe packages first and do user ones later, so
additions won't get filtered out.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-07-15 17:02:42 +02:00
Rafał Miłecki 37ff916af7 bcm53xx: backport DT changes queued for v6.6
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 13:34:34 +02:00
Rafał Miłecki 8fb0c196e8 bcm4908: drop accidentally pushed 6.1 hack patches
Fixes: 2953d3c156 ("bcm4908: add testing support for kernel 6.1")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:44:21 +02:00
Rafał Miłecki 28b6224104 ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
This drops a use of downstream "mac-address-increment".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:38:12 +02:00
Rafał Miłecki f1492fcc09 ramips: use fixed layout cell "mac-base" for Netgear R6220
This drops a use of downstream "mac-address-increment".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:38:12 +02:00
Rafał Miłecki 42fbaf96cb ramips: set Netgear R6220 MAC NVMEM cell directly in the part node
There is no need to use reference if original node it specified in
exactly the same file. This is a minor cleanup simplifying DTS code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:38:12 +02:00
Rafał Miłecki 2953d3c156 bcm4908: add testing support for kernel 6.1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:38:12 +02:00
Rafał Miłecki 1817e864a2 kernel: make CFE bootfs MTD parser available for ARCH_BCMBCA
It's a new Broadcom symbol introduced in v6.0.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-14 11:38:12 +02:00
Rafał Miłecki 61f674df4f kernel: nvmem: fix "fixed-layout" & support "mac-base"
DT binding for MAC cells in fixed layout was upstream approved and
accepted. Add support for it. This can replace quite some of our
downstream hacks.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-13 19:41:48 +02:00
Arınç ÜNAL 8bf9a8a5e6 ramips: add wan2 support for MQmaker WiTi
The PHY of the wan2 port on MQmaker WiTi is wired to the second MAC of the
SoC. Rename the wan interface to wan1 and define it under the switch node,
effectively disabling the PHY muxing of the MT7530 switch's phy4.

Define the PHY of the wan2 port and adjust the gmac1 node accordingly. Now
that the PHY muxing feature is not being used anymore, the wan2 port can be
used to achieve 2 Gbps total bandwidth to the CPU.

Tested-by: Demetris Ierokipides <ierokipides.dem@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2023-07-12 20:36:32 +02:00
Arınç ÜNAL 50ecca74cb ramips: rename to GnuBee GB-PC1 and GnuBee GB-PC2
Rename GB-PC1 to GnuBee GB-PC1, and GB-PC2 to GnuBee GB-PC2. Let's not make
naming exceptions because of marketing whims.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2023-07-12 20:36:32 +02:00
Rafał Miłecki 8674b41c0d bcm53xx: backport DT changes from v6.5
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-11 10:30:15 +02:00
Rafał Miłecki c7655e207f bcm53xx: drop Linksys EA6500 V2 fix for RAM from 6.1
This patch is ready and easy to upstream but noone is willing to take
care of it. Drop it (as requested) to simplify maintenance.

Link: https://github.com/openwrt/openwrt/pull/10940#issuecomment-1318157072
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-11 10:30:15 +02:00
Rafał Miłecki d54f3b2cfd kernel: bgmac: fix regressed support for BCM53573 SoCs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-10 11:38:29 +02:00
Rafał Miłecki 83aeb0bbd4 bcm47xx: fix bgmac MTU patch filename
Fixes: 4970dd027b ("bcm47xx: revert bgmac back to the old limited max frame size")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-10 11:38:22 +02:00
Wenli Looi 520c9917f8 ath79: add support for ASUS RT-AC59U / ZenWiFi CD6
ASUS RT-AC59U / RT-AC59U v2 are wi-fi routers with a large number of
alternate names, including RT-AC1200GE, RT-AC1300G PLUS, RT-AC1500UHP,
RT-AC57U v2/v3, RT-AC58U v2/v3, and RT-ACRH12.

ASUS ZenWiFi AC Mini(CD6) is a mesh wifi system. The unit labeled CD6R
is the router, and CD6N is the node.

Hardware:

- SoC: QCN5502
- RAM: 128 MiB
- UART: 115200 baud (labeled on boards)
- Wireless:
  - 2.4GHz: QCN5502 on-chip 4x4 802.11b/g/n
    currently unsupported due to missing support for QCN550x in ath9k
  - 5GHz: QCA9888 pcie 5GHz 2x2 802.11a/n/ac
- Flash: SPI NOR
  - RT-AC59U / CD6N: 16 MiB
  - RT-AC59U v2 / CD6R: 32 MiB
- Ethernet: gigabit
  - RT-AC59U / RT-AC59U v2: 4x LAN 1x WAN
  - CD6R: 3x LAN 1x WAN
  - CD6N: 2x LAN
- USB:
  - RT-AC59U / RT-AC59U v2: 1 port USB 2.0
  - CD6R / CD6N: none

WiFi calibration data contains valid MAC addresses.

The initramfs image is uncompressed because I was unable to boot a
compressed initramfs from memory (gzip or lzma). Booting a compressed
image from flash works fine.

Installation:

To install without opening the case:

- Set your computer IP address to 192.168.1.10/24
- Power up with the Reset button pressed
- Release the Reset button after about 5 seconds or until you see the
  power LED blinking slowly
- Upload OpenWRT factory image via TFTP client to 192.168.1.1

Revert to stock firmware using the same TFTP method.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2023-07-08 20:19:00 +02:00
Daniel Golle 712fa3eff8 mediatek: replace hack for MaxLinear 2.5G PHY
Replace hack with proper patch also for Linux 5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-08 17:36:19 +01:00
Daniel Golle f321a49fd5 mediatek: dts: mt7988a: remove boottrap hack
The PHY driver now uses regmap created from pio syscon, we no longer
need the boottrap device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-08 17:36:19 +01:00
Daniel Golle 9fac590096 mediatek: use backported Ethernet PHY driver also for 5.15
Backport in-SoC Gigabit Ethernet PHY driver instead of carrying the
driver in files-5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-08 17:36:19 +01:00
Mathew McBride 094c37708a layerscape: base-files: remove redundant RAMFS_COPY_* additions
All the tools (e.g fw_setenv, ubiupdatevol) and config (fw_env.config)
needed for sysupgrade are already included in /lib/upgrade/stage2

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-07-08 18:33:18 +02:00
Daniel Golle 1f1e0b1144 mediatek: dts: mt7988a: wire-up mediatek,pio for PHY LEDs
The PHY driver needs to read a register containing the values of the
bootstrap pins (which happen to be the PHY LEDs) to determine the LED
polarities. Allow regmap access to first pinctrl bank by adding the
'syscon' compatible, and reference the pinctrl in the MDIO bus where
the PHY driver will look for it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-08 16:36:49 +01:00
Christian Svensson c170fc78ba kernel: remove CRYPTO_BLAKE2S from all >=5.15
This option was removed from upstream kernel back in 2022.
See commits:
 2d16803c562ecc644803d42ba98a8e0aef9c014e (>=6.0)
 3dd33a09f5dc12ccb0902923c4c784eb0f8c7554 (>=5.15.61 backport)

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-07-08 16:54:01 +02:00
Daniel Golle 6b52a9b752 kernel: add two missing symbols in 6.1
Two more new symbols were discovered when building mediatek targets
with CONFIG_ALL_KMODS=y.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-08 15:10:12 +01:00
Rani Hod a94b34b29a apm821xx: fix autoloading of kmod-hw-crypto4xx
Fixes: 55fbcad20a (apm821xx: make crypto4xx as a standalone module)
Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-07-08 15:38:42 +02:00
John Audia 0dc0504fc8 kernel: bump 5.15 to 5.15.120
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-07 17:07:26 +02:00
Daniel Golle 1321007e1f mediatek: expose testing Linux 6.1 testing kernel
Set KERNEL_TESTING_PATCHVER:=6.1 to allow building all subtargets with
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Daniel Golle 30d38d7541 mediatek: adapt kernel configuration for Linux 6.1
Update kernel configuration to build Linux 6.1 for all subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Daniel Golle 775fd1fc85 mediatek: copy config-5.15 to config-6.1 for all subtargets
To ease review, first copy all subtargets' kernel config-5.15 to the
to-be-adapted config-6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Daniel Golle 659f4a13dd mediatek: adapt files and patches for Linux 6.1
With Linux 6.1 many of our downstream patches and out-of-tree files
can be removed or at least replaced by backported upstream commits.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[fix CMDLINE_OVERRIDE for arm64]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2023-07-07 14:01:39 +02:00
Daniel Golle d85438f454 mediatek: copy patches and files for Linux 6.1
First step only copies patches-5.15 and files-5.15 to
patches-6.1 and files-6.1 respectively.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Daniel Golle 0c5605b70c mediatek: prepare old rtk switch driver for use with Linux 6.1
The old RealTek RTL8367S switch driver which is used for some MT7622
devices needs to be modified to no longer free the GPIO after reset
has completed.
This is due to Linux 5.19 removing devm_gpio_free via commit
2b038e786f83 ("gpiolib: devres: Get rid of unused devm_gpio_free()")

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Daniel Golle e386b279fd generic: 6.1: fix uImage.FIT partitions on mtdblock and ubiblock
When refreshing the hack patches for Linux 6.1 the part of the uImage.FIT
partition parser patch which takes care of allowing mtdblock and ubiblock
devices to have partitions has been dropped, supposedly by accident.
Re-add a that part to the patch, so devices using a uImage.FIT filesystem
sub-image as rootfs can work with Linux 6.1.

Fixes: 19a246bb65 ("generic: 6.1: manually refresh hack patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-07 14:01:39 +02:00
Koen Vandeputte 0a0b1fd159 kernel: add missing symbols in 6.1
Found these while playing with video pci media adapter support

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2023-07-07 08:20:59 +02:00
Koen Vandeputte 02c1acbfba kernel: add missing symbols in 5.15
Found these while playing with video pci media adapter support

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2023-07-07 08:20:59 +02:00
John Audia a20735da21 kernel: add CONFIG_LOCK_MM_AND_FIND_VMA
6.1.37 introduces a new symbol[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.1.37&id2=v6.1.36

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-05 20:32:37 +02:00
John Audia 79a82d7e87 kernel: bump 6.1 to 6.1.37
Manually rebased:
	generic/hack-6.1/220-arm-gc_sections.patch
	armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-05 20:32:37 +02:00
John Audia b8b4906614 kernel: bump 6.1 to 6.1.36
All patches automatically rebased.

Acknowledgment to @john-tho for the changes to fs.mk to accommodate new paths
introduced in 29429a1f58

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-05 20:32:37 +02:00
Tianling Shen 06e64f9b36 kernel: modules: add xdp-sockets-diag support
Support for PF_XDP sockets monitoring interface used by the ss tool.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-05 20:02:12 +02:00
Christian Lamparter 75505c5ec7 ipq-wifi: fix upstream board-2.bin ZTE M289F snafu
The upstream board-2.bin file in the linux-firmware.git
repository for the QCA4019 contains a packed board-2.bin
for this device for both 2.4G and 5G wifis. This isn't
something that the ath10k driver supports.

Until this feature either gets implemented - which is
very unlikely -, or the upstream boardfile is mended
(both, the original submitter and ath10k-firmware
custodian have been notified). OpenWrt will go back
and use its own bespoke boardfile. This unfortunately
means that 2.4G and on some revisions the 5G WiFi is
not available in the initramfs image for this device.

Fixes: #12886
Reported-by: Christian Heuff <christian@heuff.at>
Debugged-by: Georgios Kourachanis <geo.kourachanis@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-07-04 22:06:59 +02:00
John Audia a41bded032 x86/64: set CONFIG_NVME_HWMON=y
CONFIG_NVME_HWMON exposes /sys/class/nvme/nvme0/device/hwmon
to allow sensors (and others) to see NVMe drive health

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-04 19:37:41 +02:00
Petr Štetiar ce8c639a6c
kernel: introduce KERNEL_WERROR config option
In commit b2d1eb717b ("generic: 5.15: enable Werror by default for
kernel compile") CONFIG_WERROR=y was enabled and all warnings/errors
reported with GCC 12 were fixed.

Keeping this in sync with past/future GCC versions is going to be uphill
battle, so lets introduce new KERNEL_WERROR config option, enable it by
default only for tested/known working combinations and on buildbots.

References: #12687
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-07-04 07:14:22 +02:00
John Audia 946100ba41 x86: set CONFIG_X86_AMD_PLATFORM_DEVICE
Needed by AMD processors using Carrizo and later chipsets

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-03 09:22:03 -04:00
Sander Vanheule 11588c52b4 ramips: mt7621: add TP-Link EAP613 v1
The TP-Link EAP613 v1 is a ceiling-mount 802.11ax access point. It can
be powered via PoE or a DC barrel connector (12V). Connecting to the
UART requires fine soldering and careful manipulation of any soldered
wires.

Device details:
  * SoC: MT7621AT
  * Flash: 16 MiB SPI NOR
  * RAM: 256 MiB DDR3L
  * Wi-Fi:
    * MT7905DA + MT7975D: 2.4 GHz + 5 GHz (DBDC), 2x2:2
    * Two stamped metal antennas (ANT1, ANT2)
    * One PCB antenna (ANT3)
    * One unpopulated antenna (ANT4)
  * Ethernet:
    * 1× 10/100/1000 Mbps port with PoE
  * LEDs:
    * Array of four blue LEDs with one control line
  * Buttons:
    * Reset
  * Board test points:
    * UART: next to CPU RF-shield and power circuits
    * JTAG: under CPU RF-shield (untested)
  * Watchdog: 3PEAK TPV706 (not implemented)

  Althought three antennas are populated, the MT7905DA does not support
  the additional Rx chain for background DFS detection (or Bluetooth)
  according to commit 6cbcc34f50 ("ramips: disable unsupported
  background radar detection").

MAC addresses:
  * LAN: 48:22:54:xx:xx:a2 (device label)
  * WLAN 2.4 GHz: 48:22:54:xx:xx:a2
  * WLAN 5 GHz: 48:22:54:xx:xx:a3

  The radio calibration blob stored in flash also contains valid MAC
  addresses for both radio bands (OUI 00:0c:43).

Factory install:
  1. Enable SSH on the device via web interface
  2. Log in with SSH, and run `cliclientd stopcs`
  3. Upload -factory.bin image via web interface. It may be necessary to
     shorten the filename of the image to e.g. 'factory.bin'.

Recovery:
  1. Open the device by unscrewing four screws from the backside
  2. Carefully remove board from the housing
  3. Connect to UART (3.3V):
    * Find test points labelled "VCC", "GND", "UART_TX", "UART_RX"
    * Solder wires to test points or connect otherwise. Be careful not
      to damage the PCB e.g. by pulling on soldered wires.
    * Open console with 115200n8 settings
  4. Interrupt bootloader and use tftpboot to start an initramfs:
        setenv ipaddr $DEVICE_IP
        setenv serverip $SERVER_IP
        tftpboot 84000000 openwrt-initramfs-kernel.bin
        bootm

  DO NOT use saveenv to store modified u-boot environment variables. The
  environment is saved at flash offset 0x30000, which erases part of the
  (secondary) bootloader.

  The device uses two bootloader stages. The first stage will load the
  second stage from a uImage stored at flash offset 0x10000. In case of
  a damaged second stage, the first stage should allow uploading a new
  image via y-modem (untested).

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2023-07-02 22:14:05 +02:00
Wenli Looi f2f33f77c4 ath79: fix broken 02_network script
Script was broken by an extraneous space.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2023-07-02 01:21:27 +02:00
David Bauer 92eec257dd mediatek: define NMBM management region for WAX220
The NETGEAR WAX220 employs NMBM on SPI-NAND. In order to avoid dealing
with invalid factory data, enable NMBM in the area preceding the UBI
volume.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-07-02 01:06:08 +02:00
Pascal Ernster 87a2f03b86 realtek: Use MDIO_* constants from <linux/mdio.h>
To improve code readability in drivers/net/phy/rtl83xx-phy.c, replace
constants MMD_AN and MMD_VEND2 from drivers/net/phy/rtl83xx-phy.h with
MDIO_MMD_AN and MDIO_MMD_VEND2 from <linux/mdio.h>.

Also, replace
BIT(0) with MDIO_EEE_2_5GT,
BIT(1) with MDIO_EEE_100TX,
BIT(2) with MDIO_EEE_1000T,
BIT(9) with MDIO_AN_CTRL1_RESTART,
BIT(12) with MDIO_AN_CTRL1_ENABLE,
32 with MDIO_AN_10GBT_CTRL,
60 with MDIO_AN_EEE_ADV, and
62 with MDIO_AN_EEE_ADV2
from <linux/mdio.h>.

Suggested-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2023-07-01 20:25:48 +02:00
Pascal Ernster 171e67e2f7 realtek: Use ADVERTISE_* and MII_PHYSID* from <linux/mii.h>
Replace BIT(x) and numerical values in drivers/net/phy/rtl83xx-phy.c
with constants from <linux/mii.h> to improve code readability.

To make reviewing easier, this commit only addresses ADVERTISE_* and
MII_PHYSID* constants.

Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2023-07-01 20:25:48 +02:00
Pascal Ernster 8b2f654d4c realtek: Use MII_BMCR and BMCR_* constants from <linux/mii.h>
Replace numerical values, BIT(x) and (1 << x) in
drivers/net/phy/rtl83xx-phy.c with constants from <linux/mii.h> to
improve code readability.

To make reviewing easier, this commit only addresses MII_BMCR and BMCR_*
constants.

Suggested-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2023-07-01 20:25:48 +02:00
Usama Nassir f24c9b9d86 ramips: Add support for ComFast CF-E390AX
Add support for ComFast CF-E390AX. It is a 802.11 wifi6 cieling AP, based on MediaTek MT7261AT.

Specifications:
SoC: MediaTek MT7621AT
RAM: 128 MiB
Flash: 16 MiB NOR (Macronix mx25l12805d)

Wireless: MT7915E (2.4G) 802.11ax/b/g/n MT7915E (5G) 802.11ac/ax/n
Ethernet: 2 x 1Gbs
Button: 1 x "Reset" button
LED: 1x Blue LED + 1x Red LED + 1x green LED
Power: PoE

Manufacturer Page:
http://en.comfast.com.cn/index.php?m=content&c=index&a=show&catid=84&id=75

Flash Layout:
0x000000000000-0x000000030000 : "bootloader"
0x000000030000-0x000000040000 : "config"
0x000000050000-0x000000060000 : "factory"
0x000000090000-0x000001000000 : "firmware"

First install:
1. Set device into http firmware fail safe upload mode by pressing the reset button for 10 seconds while powering
   it on. Once the LED stops flashing, safe mode will be running.
2. Set PC IP address to 192.168.1.2
3. Browse to 192.168.1.1 and upload the factory image using the web interface.

Signed-off-by: Usama Nassir <usama.nassir@gmail.com>
2023-07-01 16:18:55 +02:00
Joao Henrique Albuquerque 935a63c59d ath79: add support for COMFAST CF-E380AC v2
COMFAST CF-E380AC v2 is a ceiling mount AP with PoE
support, based on Qualcomm/Atheros QCA9558+QCA9880+AR8035.

There are two versions of this model, with different RAM
and U-Boot mtd partition sizes:
- v1: 128 MB of RAM, 128 KB U-Boot image size
- v2: 256 MB of RAM, 256 KB U-Boot image size

Version number is available only inside vendor GUI,
hardware and markings are the same.

Short specification:

- 720/600/200 MHz (CPU/DDR/AHB)
- 1x 10/100/1000 Mbps Ethernet, with PoE support
- 128 or 256 MB of RAM (DDR2)
- 16 MB of FLASH
- 3T3R 2.4 GHz, with external PA (SE2576L), up to 28 dBm
- 3T3R 5 GHz, with external PA (SE5003L1), up to 30 dBm
- 6x internal antennas
- 1x RGB LED, 1x button
- UART (T11), LEDs/GPIO (J7) and USB (T12) headers on PCB
- external watchdog (Pericon Technology PT7A7514)

COMFAST MAC addresses :
Though the OEM firmware has four adresses in the usual locations,
it appears that the assigned addresses are just incremented in a different way:

Interface    address    location
Lan              *:00           0x0
2.4g             *:0A           n/a (0x0 + 10)
5g               *:02           0x6

Unused Addresses found in ART hexdump
address    location
*:01           0x1002
*:03           0x5006

To keep code consistency the MAC address assignments are made based on increments of the one found in 0x0;

Signed-off-by: Joao Henrique Albuquerque <joaohccalbu@gmail.com>
2023-07-01 16:11:27 +02:00
Mikhail Zhilkin 2d6784a033 ramips: add support for Sercomm S1500 devices
This commit adds support for following wireless routers:
 - Beeline SmartBox PRO (Serсomm S1500 AWI)
 - WiFire S1500.NBN (Serсomm S1500 BUC)

This commit is based on this PR:
 - Link: https://github.com/openwrt/openwrt/pull/4770
 - Author: Maximilian Weinmann <x1@disroot.org>
The opening of this PR was agreed with author.

My changes:
- Sorting, minor changes and some movings between dts and dtsi
- Move leds to dts when possible
- Recipes for the factory image
- Update of the installation/recovery/return to stock guides
- Add reset GPIO for the pcie1

Common specification
--------------------
SoC:        MediaTek MT7621AT (880 MHz, 2 cores)
Switch:     MediaTek MT7530 (via SoC MT7621AT)
Wireless:   2.4 GHz, MT7602EN, b/g/n, 2x2
Wireless:   5 GHz, MT7612EN, a/n/ac, 2x2
Ethernet:   5 ports - 5×GbE (WAN, LAN1-4)
Mini PCIe:  via J2 on PCB, not soldered on the board
UART:       J4 -> GND[], TX, VCC(3.3V), RX
BootLoader: U-Boot SerComm/Mediatek

Beeline SmartBox PRO specification
----------------------------------
RAM (Nanya NT5CB128M16FP): 256 MiB
NAND-Flash (ESMT F59L2G81A): 256 MiB
USB ports: 2xUSB2.0
LEDs: Status (white), WPS (blue), 2g (white), 5g (white) + 10 LED Ethernet
Buttons: 2 button (reset, wps), 1 switch button (ROUT<->REP)
Power: 12 VDC, 1.5 A
PCB Sticker: 970AWI0QW00N256SMT Ver. 1.0
CSN: SG15********
MAC LAN: 94:4A:0C:**:**:**
Manufacturer's code: 0AWI0500QW1

WiFire S1500.NBN specification
------------------------------
RAM (Nanya NT5CC64M16GP): 128 MiB
NAND-Flash (ESMT F59L1G81MA): 128 MiB
USB ports: 1xUSB2.0
LEDs: Status (white), WPS (white), 2g (white), 5g (white) + 10 LED Ethernet
Buttons: 2 button (RESET, WPS)
Power: 12 VDC, 1.0 A
PCB Sticker: 970BUC0RW00N128SMT Ver. 1.0
CSN: MH16********
MAC WAN: E0:60:66:**:**:**
Manufacturer's code: 0BUC0500RW1

MAC address table (PRO)
-----------------------
use   address   source
LAN   *:23      factory 0x1000 (label)
WAN   *:24      factory $label +1
2g    *:23      factory $label
5g    *:25      factory $label +2

MAC addresses (NBN)
-------------------
use   address   source
LAN   *:0e      factory 0x1000
WAN   *:0f      LAN +1 (label)
2g    *:0f      LAN +1
5g    *:10      LAN +2

OEM easy installation
---------------------
1. Remove all dots from the factory image filename (except the dot
   before file extension)
2. Upload and update the firmware via the original web interface
3. Two options are possible after the reboot:
   a. OpenWrt - that's OK, the mission accomplished
   b. Stock firmware - install Stock firmware (to switch booflag from
      Sercomm0 to Sercomm1) and then OpenWrt factory image.

Return to Stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
   printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock2
   reboot
2. Install stock firmware via the web OEM firmware interface

Recovery
--------
Use sercomm-recovery tool.
Link: https://github.com/danitool/sercomm-recovery

Tested-by: Pavel Ivanov <pi635v@gmail.com>
Tested-by: Denis Myshaev <denis.myshaev@gmail.com>
Tested-by: Oleg Galeev <olegingaleev@gmail.com>
Tested-By: Ivan Pavlov <AuthorReflex@gmail.com>
Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-07-01 16:05:01 +02:00
Mikhail Zhilkin f560be583a ramips: sercomm.mk: preparation for Sercomm s1500 devices support
This commit moves a part of the code from the "sercomm-factory-cqr" recipe
to the separate "sercomm-mkhash" recipe. This simplifies recipes and
allows insert additional recipes between these code blocks (required for
the future support for Beeline SmartBox PRO router).

dd automatically fills the file by 0x00 if the filesize is less than
offset where we start writing. We drop such dd command so we need to add
--extra-padding-size 0x190 to the sercomm-pid.py call.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-07-01 16:05:01 +02:00
Pavel Pernička dac0a133cf ath79: DTS improvement for buzzer on RB951G-2HnD
Mikrotik RB951 router has a buzzer on the board, which makes annoying noises
due to the interference caused by PoE input or Wifi transmission
when no GPIO pin state is set.
I added buzzer node to device's DTS in order to set deault level to 1
and to provide easier access for it.

Signed-off-by: Pavel Pernička <pernicka.pa@gmail.com>
2023-07-01 15:51:26 +02:00
Mathew McBride 8e7ba6fbae layerscape: remove Traverse LS1043 boards
The Traverse LS1043 boards were not publicly released,
all the production has been going to OEM customers who
do not use the image format defined in the OpenWrt tree.

Only a few samples were circulated outside Traverse
and our OEM customers. The public release (then called
Five64) of this series was cancelled in favour of our
LS1088A based design (Ten64).

It is best to remove these boards to avoid wasting
OpenWrt project and contributor resources.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-07-01 15:47:08 +02:00
Chukun Pan e78d1a06c8 mediatek: filogic: add H3C Magic NX30 Pro support
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: W25N01GVZEIG 128MB
  RAM: NT5CB128M16JR-FL 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Flash instructions:
  1. PC run command: "telnet 192.168.124.1 99"
     Username: H3C, password is the web login
     password of the router.
  2. Download preloader.bin and bl31-uboot.fip
  3. PC run command: "python3 -m http.server 80"
  4. Download files in the telnet window:
     "wget http://192.168.124.xx/xxx.bin"
     Replace xx with your PC's IP and
     the preloader.bin and bl31-uboot.fip.
  5. Flushing openwrt's uboot:
     "mtd write xxx-preloader.bin BL2"
     "mtd write xxx-bl31-uboot.fip FIP"
  6. Connect to the router via the Lan port,
     set a static ip of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  7. Download initramfs image, reboot router,
     waiting for tftp recovery to complete.
  8. After openwrt boots up, perform sysupgrade.

Note:
  1. The u-boot-env partition on mtd is empty,
     OEM stores their env on ubi:u-boot-env.
  2. Back up all mtd partitions before flashing.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-07-01 15:13:08 +02:00
Wenli Looi 73de41898f mediatek: add support for Netgear EX6250v2 series
Netgear EX6250v2, EX6400v3, EX6410v2, EX6470 are wall-plug 802.11ac
(Wi-Fi 5) extenders. Like other MT7629 devices, Wi-Fi does not work
currently as there is no driver.

Related: https://github.com/openwrt/openwrt/pull/5084

For future reference, 2.4GHz MAC = LAN+1, 5GHz MAC = LAN+2.

Specifications:
* MT7629, 256 MiB RAM, 16 MiB SPI NOR
* MT7761N (2.4GHz) / MT7762N (5GHz) - no driver
* Ethernet: 1 port 10/100/1000
* UART: 115200 baud (labeled on board)

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* After installation, perform a factory reset. Wait for the device to
  boot, then hold the reset button for 10 seconds. This is needed
  because sysupgrade in the stock firmware will attempt to preserve its
  configuration using sysupgrade.tgz.
  See https://github.com/openwrt/openwrt/pull/4182

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2023-07-01 14:42:11 +02:00
Wenli Looi 32ea8a9a7e ramips: add support for Netgear EAX12 series
Netgear EAX12, EAX11v2, EAX15v2 are wall-plug 802.11ax (Wi-Fi 6)
extenders that share the SoC, WiFi chip, and image format with the
WAX202.

Specifications:
* MT7621, 256 MiB RAM, 128 MiB NAND
* MT7915: 2.4/5 GHz 2x2 802.11ax (DBDC)
* Ethernet: 1 port 10/100/1000
* UART: 115200 baud (labeled on board)

All LEDs and buttons appear to work without state_default.

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References in GPL source:
https://www.downloads.netgear.com/files/GPL/EAX12_EAX11v2_EAX15v2_GPL_V1.0.3.34_src.tar.gz

* target/linux/ramips/dts/mt7621-rfb-ax-nand.dts
  DTS file for this device.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2023-07-01 14:42:11 +02:00
Wenli Looi 0a1ebccc87 image: add additional fields to Netgear encrypted image
These fields are used for EAX12 and EX6250v2 series, and perhaps other
devices. Compatibility is preserved with the WAX202 and WAX206.

In addition, adds the related vars to DEVICE_VARS so that the variables
work correctly with multiple devices.

References in GPL source:
https://www.downloads.netgear.com/files/GPL/EAX12_EAX11v2_EAX15v2_GPL_V1.0.3.34_src.tar.gz

* tools/imgencoder/src/gj_enc.c
  Contains code that generates the encrypted image.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2023-07-01 14:42:11 +02:00
Zoltan HERPAI f8428f040c mxs: add testing kernel 6.1
Runtime-tested on Olinuxino Maxi.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-07-01 12:54:30 +02:00
Robert Marko 39b2251cd9 treewide: remove CONFIG_FRAME_WARN from kernel configs
CONFIG_FRAME_WARN is set dynamically, so there is no need for it to be set
in target kernel configs, so lets remove it from all configs.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-07-01 11:53:21 +02:00
Robert Marko 7a9a4168bb generic: filter out CONFIG_FRAME_WARN
CONFIG_FRAME_WARN value is set by config/Config-kernel.in based on the
target type dynamically since commit:
16a2051 ("kernel: Set CONFIG_FRAME_WARN depending on target").

However, CONFIG_FRAME_WARN was not set to get filtered out so it ended up
in multiple target configs during refreshes.
So, lets filter out CONFIG_FRAME_WARN as its set dynamically to prevent it
ending up in more target configs.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-07-01 11:52:07 +02:00
John Audia 42cb0f0f26 kernel: bump 5.15 to 5.15.119
Build system: x86_64
Build-tested: x86_64/ACEMAGICIAN T8PLUS, ramips/tplink_archer-a6-v3
Run-tested: x86_64/ACEMAGICIAN T8PLUS, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-01 11:42:11 +02:00
Zoltan HERPAI a0ae7a50e0 mxs: rework image generation
Migrate to "new" image generation method. Device profiles will be generated
based on image/Makefile instead of profiles/ , which will also allow to
automatically build images for all supported devices via buildbot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-30 19:24:52 +02:00
Felix Fietkau dc38199b96 ramips/mt7621: disable the cpufreq driver
It causes a noticeable performance decrease

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-06-30 14:46:49 +02:00
Martin Schiller 5af7d47cd7 kernel: net: phy: realtek: fix rtl822x_probe on unsupported devices
Calling rtl822x_probe() on phy devices which uses the rtl822x_read_mmd()
and rtl822x_write_mmd() functions makes no sense and the probe ends with
an EOPNOTSUPP error.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2023-06-27 13:56:34 +02:00
Hauke Mehrtens 03ce5598a0 kernel: phy: motorcomm: Fix compile
Fix compilation on starfive target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-25 22:48:55 +02:00
Shiji Yang 285f0668f4 ramips: do not print error log when mdio bus is disabled
The mdio bus is used to control externel switch. In most cases, they are
disabled, which is the normal behavior. Treating this as an error makes
no sense, so we need to change the notification level from error to info.

Fixes: a2acdf9607 ("ramips: mt7620: remove useless GMAC nodes")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-06-25 18:48:29 +02:00
Shiji Yang 4e74777fa8 ramips: backport upstream mt762x PCIe driver error log fixes
These patches silence some mt762x PCIe driver error messeges by removing
the useless debugging codes and replacing incorrectly used 'dev_err()'
with 'dev_info()':

PCI: mt7621: Use dev_info() to log PCIe card detection [1]
mips: pci-mt7620: do not print NFTS register value as error log [2]
mips: pci-mt7620: use dev_info() to log PCIe device detection result [3]

Patch [1] has already been merged into the Linux 6.3 branch. Patches [2] and
[3] have been merged into the "mips-next" tree, and they will be part of the
upcoming Linux 6.5.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.4-rc7&id=50233e105a0332ec0f3bc83180c416e6b200471e
[2] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=9f9a035e6156a57d9da062b26d2a48d031744a1e
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=89ec9bbe60b61cc6ae3eddd6d4f43e128f8a88de

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-06-25 18:48:24 +02:00
Alexey Bartenev ce998cb6e1 ramips: add support for D-Link DIR-806A B1 router
General specification:
SoC Type: MediaTek MT7620A (580MHz)
ROM: 8 MB SPI-NOR (MX25L6406E)
RAM: 64 MB DDR (W9751G6KB-25)
Switch: MediaTek MT7530
Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4)
Wireless: 2.4 GHz (MediaTek RT5390): b/g/n
Wireless: 5 GHz (MediaTek MT7610EN): ac/n
Buttons: 2 button (POWER, WPS/RESET)
Bootloader: U-Boot 1.1.3
Power: 12 VDC, 0.5 A

MACs:
| LAN	| [Factory + 0x04] - 2		|
| WLAN 2.4g	| [Factory + 0x04] - 1		|
| WLAN 5g	| [Factory + 0x8004] - 3	|
| WAN	| [Factory + 0x04] - 2		|

OEM easy installation:

1. Use a PC to browse to http://192.168.0.1.
2. Go to the System section and open the Firmware Update section.
3. Under the Local Update at the right, click on the CHOOSE FILE...
4. When a modal window appears, choose the firmware file and click on
 the Open.
5. Next click on the UPDATE FIRMWARE button and upload the firmware image.
Wait for the router to flash and reboot.

OEM installation using the TFTP method (need level converter):

1. Download the latest firmware image.
2. Set up a Tftp server on a PC (e.g. Tftpd32) and place the firmware
 image to the root directory of the server.
3. Power off the router and use a twisted pair cable to connect the PC
 to any of the router's LAN ports.
4. Configure the network adapter of the PC to use IP address 192.168.0.180
 and subnet mask 255.255.255.0.
5. Connect serial port (57600 8N1) and turn on the router.
6. Then interrupt "U-Boot Boot Menu" by hitting 2 key (select "2: Load
 system code then write to Flash via TFTP.").
7. Press Y key when show "Warning!! Erase Linux in Flash then burn new
 one. Are you sure? (Y/N)"
Input device IP (192.168.0.1) ==:192.168.0.1
Input server IP (192.168.0.180) ==:192.168.0.180
Input Linux Kernel filename () ==:firmware_name
The router should download the firmware via TFTP and complete flashing in
 a few minutes.
After flashing is complete, use the PC to browse to http://192.168.1.1 or
 ssh to proceed with the configuration.

Signed-off-by: Alexey Bartenev <41exey@proton.me>
2023-06-25 16:25:01 +02:00
Mathew McBride a7bd96c98f layerscape: add patches for SFP support on DPAA2 platforms
This is required for managed operation of the SFP ports on
the Ten64 (LS1088A) and other boards.

The two issues resolved are:
- Validation of 10G SFP link modes fail as Linux did not
  consider the equivalence of modes like XFI, 10GBase-R
- Fix a locking issue that prevented the system rebooting
  when SFP ports were controlled by the SFP driver.

Please note, these patches are replaced by upstream ones
in 6.x, see: commit 61ec9a8154 ("armvirt: add SFP support
patches for NXP Layerscape DPAA2 platforms") in OpenWrt for
the relevant patches.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-25 16:02:19 +02:00
Mathew McBride af0546da34 layerscape: armv8_64b: add Traverse Ten64 NAND variant
The Ten64 board[1] is based around NXP's Layerscape LS1088A SoC.
It is capable of booting both standard Linux distributions
from disk devices, using EFI, and booting OpenWrt
from NAND.

See the online manual for more information, including the
flash layout[2].

This patchset adds support for generating Ten64 images
for NAND boot.
For disk boot, one can use the EFI support that was
recently added to the armvirt target.

We previously supported NAND users by building
inside our armvirt/EFI target[3], but this approach
is not suitable for OpenWrt upstream. Users who
used our supplied NAND images will be able to upgrade
to this via sysupgrade.

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] - https://www.traverse.com.au/hardware/ten64
[2] - https://ten64doc.traverse.com.au/hardware/flash/
[3] - Example:
285e4360e1
2023-06-25 16:02:19 +02:00
Andreas Böhler f70ee53b08 ipq4019: add support for ZTE MF287+ aka DreiNeo
The ZTE MF287+ is a LTE router used (exclusively?) by the network operator
"3". The MF287 (i.e. non-plus aka 3Neo) is also supported (the only
difference is the LTE modem)

Specifications
==============

SoC: IPQ4018
RAM: 256MiB
Flash: 8MiB SPI-NOR + 128MiB SPI-NAND
LAN: 4x GBit LAN
LTE: ZTE Cat12 (MF287+) / ZTE Cat6 (MF287)
WiFi: 802.11a/b/g/n/ac SoC-integrated

MAC addresses
=============

LAN: from config + 2
WiFi 1: from config
WiFi 2: from config + 1

Installation
============

Option 1 - TFTP
---------------

TFTP installation using UART is preferred. Disassemble the device and
connect serial. Put the initramfs image as openwrt.bin to your TFTP server
and configure a static IP of 192.168.1.100. Load the initramfs image by
typing:

  setenv serverip 192.168.1.100
  setenv ipaddr 192.168.1.1
  tftpboot 0x82000000 openwrt.bin
  bootm 0x82000000

From this intiramfs boot you can take a backup of the currently installed
partitions as no vendor firmware is available for download:

  ubiattach -m14
  cat /dev/ubi0_0 > /tmp/ubi0_0
  cat /dev/ubi0_1 > /tmp/ubi0_1

Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save.

Once booted, transfer the sysupgrade image and run sysupgrade. You might
have to delete the stock volumes first:

  ubirmvol /dev/ubi0 -N ubi_rootfs
  ubirmvol /dev/ubi0 -N kernel

Option 2 - From stock firmware
------------------------------

The installation from stock requires an exploit first. The exploit consists
of a backup file that forces the firmware to download telnetd via TFTP from
192.168.0.22 and run it. Once exploited, you can connect via telnet and
login as admin:admin.

The exploit will be available at the device wiki page.

Once inside the stock firmware, you can transfer the -factory.bin file to
/tmp by using "scp" from the stock frmware or "tftp".

ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write
access - you need to read from one file in /proc. Once done, you need to
erase the UBI partition and flash OpenWrt. Before performing the operation,
make sure that mtd13 is the partition labelled "rootfs" by calling
"cat /proc/mtd".

Complete commands:

  cd /tmp
  tftp -g -r factory.bin 192.168.0.22
  cat /proc/driver/sensor_id
  flash_erase /dev/mtd13 0 0
  dd if=/tmp/factory.bin of=/dev/mtdblock13 bs=131072

Afterwards, reboot your device and you should have a working OpenWrt
installation.

Restore Stock
=============

Option 1 - via UART
-------------------

Boot an OpenWrt initramfs image via TFTP as for the initial installation.
Transfer the two backed-up files to your box to /tmp.

Then, run the following commands - replace $kernel_length and $rootfs_size
by the size of ubi0_0 and ubi0_1 in bytes.

  ubiattach -m 14
  ubirmvol /dev/ubi0 -N kernel
  ubirmvol /dev/ubi0 -N rootfs
  ubirmvol /dev/ubi0 -N rootfs_data
  ubimkvol /dev/ubi0 -N kernel -s $kernel_length
  ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size
  ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0
  ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1

Option 2 - from within OpenWrt
------------------------------

This option requires to flash an initramfs version first so that access
to the flash is possible. This can be achieved by sysupgrading to the
recovery.bin version and rebooting. Once rebooted, you are again in a
default OpenWrt installation, but no partition is mounted.

Follow the commands from Option 1 to flash back to stock.

LTE Modem
=========

The LTE modem is similar to other ZTE devices and controls some more LEDs
and battery management.

Configuring the connection using uqmi works properly, the modem
provides three serial ports and a QMI CDC ethernet interface.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2023-06-25 15:53:03 +02:00
Andreas Böhler 9ffdaa7fa1 ipq40xx: Enable gpio-restart in kernel configuration
Some ZTE devices require the gpio-restart driver to support restarting the
LTE modem along with OpenWrt

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2023-06-25 15:53:03 +02:00
Stefan Weil 8d06bc1751 ramips: add Edimax BR-6208AC V2 support
Specifications:
- Device: Edimax BR-6208AC V2
- SoC: MT7620A
- Flash: 16 MiB
- RAM: 64 MiB
- Switch: 1 WAN, 3 LAN (10/100 Mbps)
- WiFi: MT7620 2.4 GHz + MT7610E 5 GHz
- LEDs: 1x POWER (green, not configurable)
        1x Firmware (green, configurable)
        1x Internet (green, configurable)
        1x VPN (green, configurable)
        1x 2.4G (green, not configurable)
        1x 5G (green, not configurable)

Normal installation:
- Upload the sysupgrade image via the default web interface

Installation with U-Boot and TFTP:
- Requires a TFTP server which provides the sysupgrade image
- Requires a connection to the serial port of the device, rate 57600

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2023-06-25 13:58:26 +02:00
Michał Kępień db02cecd6a ath79: add support for MikroTik RB951G-2HnD
MikroTik RB951G-2HnD is a wireless SOHO router that was previously
supported by the ar71xx target, see commit 7a709573d7 ("ar71xx: add
kernel support for the Mikrotik RB951G board").

Specifications
--------------

  - SoC: Atheros AR9344 (600 MHz)
  - RAM: 128 MB (2x 64 MB)
  - Storage: 128 MB NAND flash (various manufacturers)
  - Ethernet: Atheros AR8327 switch, 5x 10/100/1000 Mbit/s
      - 1x PoE in (port 1, 8-30 V input)
  - Wireless: Atheros AR9340 (802.11b/g/n)
  - USB: 2.0 (1A)
  - 8x LED:
      - 1x power (green, not configurable)
      - 1x user (green, not configurable)
      - 5x GE ports (green, not configurable)
      - 1x wireless (green, not configurable)
  - 1x button (restart)

Unlike on the RB951Ui-2HnD, none of the LEDs on this device seem to be
GPIO-controllable, which was also the case for older OpenWRT versions
that supported this board via a mach file.  The Ethernet port LEDs are
controlled by the switch chip.

See https://mikrotik.com/product/RB951G-2HnD for more details.

Flashing
--------

TFTP boot initramfs image and then perform sysupgrade.  Follow
common MikroTik procedures at https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-06-25 13:18:32 +02:00
Michał Kępień c6ef417094 ath79: mikrotik: extract common bits for RB951x-2HnD devices
Mikrotik RouterBOARD 951Ui-2HnD and Mikrotik RouterBOARD RB951G-2HnD are
very similar devices.  Extract the DTS bits that are identical for these
two boards to a separate DTSI file.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-06-25 13:18:31 +02:00
Luiz Angelo Daros de Luca e95c772894 ath79: 5.15: fix not exported sym ath79_pll_base
ath79_pll_base was declared as extern but no code exported it.
Anyone including arch/mips/include/asm/mach-ath79/ath79.h and compiled
as a module would break with:

ERROR: modpost: "ath79_pll_base" [drivers/net/ethernet/atheros/ag71xx/ag71xx.ko] undefined!

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2023-06-25 13:05:39 +02:00
Maximilian Martin 906e2a1b99 ath79: Add support for MOXA AWK-1137C
Device specifications:
======================

* Qualcomm/Atheros AR9344
* 128 MB of RAM
* 16 MB of SPI NOR flash
* 2x 10/100 Mbps Ethernet
* 2T2R 2.4/5 GHz Wi-Fi
* 4x GPIO-LEDs (1x wifi, 2x ethernet, 1x power)
* 1x GPIO-button (reset)
* 2x fast ethernet
  - lan1
    + builtin switch port 1
    + used as WAN interface
  - lan2
    + builtin switch port 2
    + used as LAN interface
* 9-30V DC
* external antennas

Flashing instructions:
======================

Log in to https://192.168.127.253/
   Username: admin
   Password: moxa

Open Maintenance > Firmware Upgrade and install the factory image.

Serial console access:
======================

Connect a RS232-USB converter to the maintenance port.
   Pinout: (reset button left) [GND] [NC] [RX] [TX]

Firmware Recovery:
==================

When the WLAN and SYS LEDs are flashing, the device is in recovery mode.

Serial console access is required to proceed with recovery.

Download the original image from MOXA and rename it to 'awk-1137c.rom'.
Set up a TFTP server at 192.168.127.1 and connect to a lan port.

Follow the instructions on the serial console to start the recovery.

Signed-off-by: Maximilian Martin <mm@simonwunderlich.de>
2023-06-25 12:59:26 +02:00
Mikhail Zhilkin e4fe3097ef mediatek: add support for Mercusys MR90X v1
This commit adds support for Mercusys MR90X(EU) v1 router.

Device specification
--------------------
SoC Type:   MediaTek MT7986BLA, Cortex-A53, 64-bit
RAM:        MediaTek MT7986BLA (512MB)
Flash:      SPI NAND GigaDevice GD5F1GQ5UEYIGY (128 MB)
Ethernet:   MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8)
Ethernet:   1x2.5Gbe (WAN/LAN 2.5Gbps), 3xGbE (WAN/LAN 1Gbps, LAN1, LAN2)
WLAN 2g:    MediaTek MT7975N, b/g/n/ax, MIMO 4x4
WLAN 5g:    MediaTek MT7975P(N), a/n/ac/ax, MIMO 4x4
LEDs:       1 orange and 1 green status LEDs, 4 green gpio-controlled
            LEDs on ethernet ports
Button:     1 (Reset)
USB ports:  No
Power:      12 VDC, 2 A
Connector:  Barrel
Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI
            slots contain "seconduboot" (also U-Boot 2022.01-rc4)

Serial console (UART)
---------------------
                            V
+-------+-------+-------+-------+
| +3.3V |  GND  |  TX   |  RX   |
+---+---+-------+-------+-------+
    |
    +--- Don't connect

The R3 (TX line) and R6 (RX line) are absent on the PCB. You should
solder them or solder the jumpers.

Installation (UART)
-------------------
1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2
2. Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'
3. Load and run OpenWrt initramfs image:
      tftpboot initramfs-kernel.bin
      bootm
4. Once inside OpenWrt, set / update env variables:
      fw_setenv baudrate 115200
      fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit"
      fw_setenv fdtcontroladdr 5ffc0e70
      fw_setenv ipaddr 192.168.1.1
      fw_setenv loadaddr 0x46000000
      fw_setenv mtdids "spi-nand0=spi-nand0"
      fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data)"
      fw_setenv netmask 255.255.255.0
      fw_setenv serverip 192.168.1.2
      fw_setenv stderr serial@11002000
      fw_setenv stdin serial@11002000
      fw_setenv stdout serial@11002000
      fw_setenv tp_boot_idx 0
5. Run 'sysupgrade -n' with the sysupgrade OpenWrt image

Installation (without UART)
---------------------------
1.  Login as root via SSH (router IP, port 20001, password - your web
    interface password)
2.  Open for editing /etc/hotplug.d/iface/65-iptv (e.g., using WinSCP and
    SSH settings from the p.1)
3.  Add a newline after "#!/bin/sh":
       telnetd -l /bin/login.sh
4.  Save "65-iptv" file
5.  Toggle "IPTV/VLAN Enable" checkbox in the router web interface and
    save
6.  Make sure that telnetd is running:
       netstat -ltunp | grep 23
7.  Login via telnet to router IP, port 23 (no username and password are
    required)
8  Upload OpenWrt "initramfs-kernel.bin" to the "/tmp" folder of the
    router (e.g., using WinSCP and SSH settings from the p.1)
9.  Stock busybox doesn't contain ubiupdatevol command. Hence, we need to
    download and upload the full version of busybox to the router. For
    example, from here:
    https://github.com/xerta555/Busybox-Binaries/raw/master/busybox-arm64
    Upload busybox-arm64 to the /tmp dir of the router and run:
    in the telnet shell:
       cd /tmp
       chmod a+x busybox-arm64
10. Check "initramfs-kernel.bin" size:
       du -h initramfs-kernel.bin
11. Delete old and create new "kernel" volume with appropriate size
    (greater than "initramfs-kernel.bin" size):
       ubirmvol /dev/ubi0 -N kernel
       ubimkvol /dev/ubi0 -n 1 -N kernel -s 9MiB
12. Write OpenWrt "initramfs-kernel.bin" to the flash:
       ./busybox-arm64 ubiupdatevol /dev/ubi0_1 /tmp/initramfs-kernel.bin
13. u-boot-env can be empty so lets create it (or overwrite it if it
    already exists) with the necessary values:
       fw_setenv baudrate 115200
       fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit"
       fw_setenv fdtcontroladdr 5ffc0e70
       fw_setenv ipaddr 192.168.1.1
       fw_setenv loadaddr 0x46000000
       fw_setenv mtdids "spi-nand0=spi-nand0"
       fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data)"
       fw_setenv netmask 255.255.255.0
       fw_setenv serverip 192.168.1.2
       fw_setenv stderr serial@11002000
       fw_setenv stdin serial@11002000
       fw_setenv stdout serial@11002000
       fw_setenv tp_boot_idx 0
14. Reboot to OpenWrt initramfs:
       reboot
15. Login as root via SSH (IP 192.168.1.1, port 22)
16. Upload OpenWrt sysupgrade.bin image to the /tmp dir of the router
17. Run sysupgrade:
       sysupgrade -n /tmp/sysupgrade.bin

Recovery
--------
1. Press Reset button and power on the router
2. Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware

Recovery (UART)
---------------
1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2
2. Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'
3. Load and run OpenWrt initramfs image:
      tftpboot initramfs-kernel.bin
      bootm
4. Do what you need (restore partitions from a backup, install OpenWrt
   etc.)

Stock layout
------------
0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000000300000 : "u-boot-env"
0x000000300000-0x000003500000 : "ubi0"
0x000003500000-0x000006700000 : "ubi1"
0x000006700000-0x000006f00000 : "userconfig"
0x000006f00000-0x000007300000 : "tp_data"

ubi0/ubi1 format
----------------
U-Boot at boot checks that all volumes are in place:
+-------------------------------+
| Volume Name: uboot   Vol ID: 0|
| Volume Name: kernel  Vol ID: 1|
| Volume Name: rootfs  Vol ID: 2|
+-------------------------------+

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| label   | 00:eb:xx:xx:xx:be | label     |
| LAN     | 00:eb:xx:xx:xx:be | label     |
| WAN     | 00:eb:xx:xx:xx:bf | label+1   |
| WLAN 2g | 00:eb:xx:xx:xx:be | label     |
| WLAN 5g | 00:eb:xx:xx:xx:bd | label-1   |
+---------+-------------------+-----------+
label MAC address was found in UBI partition "tp_data", file
"default-mac". OEM wireless eeprom is also there (file
"MT7986_EEPROM.bin").

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-06-25 12:25:22 +02:00
Lech Perczak 9d64cc068f ipq40xx: meraki-mr33, meraki-mr74: disable image generation
After migrating to kernel 5.15, upgrading causes the units to become
soft-bricked, hanging forever at the kernel startup.
Kernel size limitation of 4000000 bytes is suspected here, but this is
not fully confirmed.

Disable the images to protect users from inadvertent bricking of units,
because recovery of those is painful with Cisco's U-boot, until the root
cause is found and fixed.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-06-25 12:04:12 +02:00
Stefan Kalscheuer b308bd50ef kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1
The flag FORCE_MAX_ZONEORDER was renamed to ARCH_FORCE_MAX_ORDER in
Kernel 6.1 [1]. Rename the flag in generic Kconfig and remove it from
target configs.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0192445cb2f7ed1cd7a95a0fc8c7645480baba25

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
2023-06-25 11:26:50 +02:00
Davide Fioravanti f1136fe1fd bcm53xx: add Wavlink Quantum DAX/WL-WN538A8 as alt name
As already documented in the wiki (https://openwrt.org/toh/wavlink/quantum_dax_wn538a8),
this router is based on the Phicomm K3. Just the flashing method is different

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2023-06-25 11:05:34 +02:00
Davide Fioravanti c71dada926 ramips: fix lan leds for Wavlink WL-WN535K1
Previously both lan1 and lan2 leds were wrongly labelled as lan2.
Moreover they were connected to the wrong lan port.
Fixes 8fde82095b ("ramips: add support for Wavlink WL-WN535K1")

Reported-by: Nicolò Maria Semprini <nicosemp@gmail.com>
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2023-06-25 11:02:04 +02:00
John Audia e0fb38f4ee kernel: bump 6.1 to 6.1.35
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-06-23 23:07:17 +02:00
John Audia 1f5fce27c1 kernel: bump 5.15 to 5.15.118
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-06-23 23:05:45 +02:00
Christian Marangi b99dd5b8bd
generic: 6.1: backport qca8k patch enabling additional LED trigger modes
Backport qca8k patch enabling additional netdev LED trigger modes.

Additional mode supported for hw control:
- link_10
- link_100
- link_1000
- half_duplex
- full_duplex

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-23 14:01:21 +02:00
David Bauer 1b467a902e ath79: add support for Aruba AP-115
Hardware
========

CPU   Qualcomm Atheros QCA9558
RAM   256MB DDR2
FLASH 2x 16M SPI-NOR (Macronix MX25L12805D)
WIFI  Qualcomm Atheros QCA9558
      Atheros AR9590

Installation
============

1. Attach to the serial console of the AP-105.
   Interrupt autoboot and change the U-Boot env.

   $ setenv rb_openwrt "setenv ipaddr 192.168.1.1;
     setenv serverip 192.168.1.66;
     netget 0x80060000 ap115.bin; go 0x80060000"
   $ setenv fb_openwrt "bank 1;
     cp.b 0xbf100040 0x80060000 0x10000; go 0x80060000"
   $ setenv bootcmd "run fb_openwrt"
   $ saveenv

2. Load the OpenWrt initramfs image on the device using TFTP.
   Place the initramfs image as "ap105.bin" in the TFTP server
   root directory, connect it to the AP and make the server reachable
   at 192.168.1.66/24.

   $ run rb_openwrt

3. Once OpenWrt booted, transfer the sysupgrade image to the device
   using scp and use sysupgrade to install the firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-06-23 00:20:56 +02:00
Daniel González Cabanelas df8e4b6c2e bmips: add support for Arcadyan AR7516
The Arcadyan AR7516, AKA Orange Bright Box or EE Bright Box 1, is a wifi
fast ethernet router, 2.4 GHz single band with two internal antennas. It
comes with a horizontal stand black shiny casing.

Newer Bright Box 1 model stands vertically, and comes with a totally
different board inside, not compatible with this firmware.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 V7.5 @ 320Mhz
 - RAM: 64 MB DDR2
 - Flash: 8 MB SPI NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: Broadcom BCM43227 802.11bgn (onboard)
 - USB: 1x 2.0
 - ADSL: yes, unsupported
 - Buttons: 2x
 - LEDs: 9x, power LED is hardware controlled
 - UART: yes

Installation in two steps, new CFE bootloader and firmware:

Install new CFE:
  1. Power off the router and press the RESET button
  2. Power on the router and wait some seconds
  3. Release the RESET button
  3. Browse to http://192.168.1.1, this web interface will offer both
     firmware (“Software”) upgrade and bootloader upgrade; be sure to
     use the bootloader section of the upload form.
  4. Upload the new CFE (availabe at the wiki page)
  5. Wait about a minute for flashing to finish and reboot into the new bootloader.

Install OpenWrt via new CFE web UI:
  1. After installing the new CFE, visit http://192.168.1.1
  2. Upload the Openwrt cfe firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-06-22 17:53:32 +02:00
Christian Marangi adc3ee1cc8
generic: 6.1: backport LEDs patch adding additional modes
Backport LEDs patch adding additional modes for split link speed and
half/full duplex state.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-21 12:43:33 +02:00
Flole Systems 984786a2f7 filogic: add support for Netgear WAX220
Hardware
--------
SOC:   MediaTek MT7986
RAM:   1024MB DDR3
FLASH: 128MB SPI-NAND (Winbond)
WIFI:  Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH:   Realtek RTL8221B-VB-CG 2.5 N-Base-T PHY with PoE
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the WAX220. Conect to the serial console,
   interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.2.1
   $ setenv serverip 192.168.2.2
   $ tftpboot openwrt.bin
   $ bootm

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: Flole Systems <flole@flole.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
2023-06-21 23:32:26 +02:00
Joshua O'Leary 008cc836fe zbt-wd323: add GPIO WDT support
Watchdog has not been properly configured for this router - the PCB has a
hardware watchdog connected to one of the GPIO pin 21 [1]
This commit provides this fix [2]

Without this fix, the ZBT-WD323 is unusable in OpenWRT because it power
cycles every 30 seconds due to the watchdog tripping

[1] https://forum.openwrt.org/t/zbt-wd323-router-power-cycles-every-30-seconds/77535/7
[2] https://forum.openwrt.org/t/zbt-wd323-images-unusable-proposed-workaround/162145/5

Signed-off-by: Joshua O'Leary <josh.oleary@mobile-power.co.uk>
2023-06-20 22:08:05 +08:00
Kim DoHyoung 0bbd5699c8 ramips: mt7621: add support for Zbtlink ZBT-WG1608 (32M)
Zbtlink ZBT-WG1608 is a Wi-Fi router intendent to use with WWAN (4G/5G)
modems.

Specifications:
* SoC: MediaTek MT7621A
* RAM: 256/512 MiB
* Flash: 16/32 MiB (SPI NOR)
* Wi-Fi:
  * MediaTek MT7603E : 2.4Ghz
  * MediaTek MT7613BE : 5Ghz
* Ethernet: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
* M.2: 1x slot with USB&SIM
  * EM7455/EM12-G/EM160R/RM500Q-AE
* USB: 1x 3.0 Type-A port
* External storage: 1x microSD (SDXC) slot
* UART: console (115200 baud)
* LED:
  * 1 power indicator
  * 1 WLAN 2.4G controlled (wlan 2G)
  * 3 SoC controlled (wlan 5G, wwan, internet)
  * 5 per Eth phy (4xLAN + WAN)

MAC Addresses:
* LAN    : f8:5e:3c:xx:xx:e0 (Factory, 0xe000 (hex))
* WAN    : f8:5e:3c:xx:xx:e1 (Factory, 0xe006 (hex))
* 2.4 GHz: f8:5e:3c:xx:xx:de (Factory, 0x0004 (hex))
* 5 GHz  : f8:5e:3c:xx:xx:df (Factory, 0x8004 (hex))

Installation:
* Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
  be directly used to install OpenWrt. Firmware must be upgraded using the
  'force' and 'do not save configuration' command line options (or
  correspondig web interface checkboxes) since the vendor firmware is from
  the pre-DSA era.

Recovery Mode:
 * Press reset button, power up the device, wait for about 10sec.
 * Upload sysupgrade image through the firmware recovery mode web page at
  192.168.1.1.

Signed-off-by: Kim DoHyoung <azusahmr@k-on.kr>
2023-06-20 21:48:23 +08:00
Russell Morris 1d6e594aa0 ramips: sunvalley - allow larger sysupgrade
Aligned to size of mtd-concat partition (firmware)
  - in this device we have mtd-concat driver that joins multiple flash partitions
  - since sysupgrade works with mtd devices the rootfs partition is already joined
  - we can use a bigger sysupgrade image than factory/TFTP install images
Checked on hardware, no issues seen.
No modifications to images other than sysupgrade (i.e. TFTP / recovery images not touched).

Signed-off-by: Russell Morris <rmorris@rkmorris.us>
2023-06-20 21:23:58 +08:00
Bjørn Mork b71c870caa
generic: 6.1: re-add two Winbond nand fixes
These patches were earlier mislabled as v6.1 and therefore dropped. They
are in fact from v6.2.

Fixes boot failure on ASUS TUF-AX4200

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2023-06-19 22:03:55 +02:00
Daniel González Cabanelas 6cb3328b4f bmips: add support for NuCom R5010UNv2
The NuCom R5010UNv2 is a wifi fast ethernet router, 2.4 GHz single band
with two external antennas.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 V7.5 @ 320Mhz
 - RAM: 64 MB DDR2
 - Flash: 16 MB SPI NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: Broadcom BCM43217 802.11bgn (onboard)
 - USB: 1x 2.0
 - Buttons: 2x
 - ADSL: yes, unsupported
 - LEDs: 7x
 - UART: yes

Installation via CFE web UI:
  1. Power off the router and press the RESET button
  2. Power on the router and wait 12 or more seconds
  3. Release the RESET button
  4. Browse to http://192.168.1.1 and upload the Openwrt cfe firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-06-19 20:39:52 +02:00