1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
Commit Graph

26380 Commits

Author SHA1 Message Date
Raylynn Knight
580723e86a realtek: add support for ZyXEL GS1900-16
The ZyXEL GS1900-16 is a 16 port gigabit switch similar to other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-16
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB Macronix MX25L12835F
* RAM:       128 MiB DDR2 SDRAM Nanya NT5TU128M8HE
* Ethernet:  16x 10/100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             16 ethernet port link/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESET" button on front panel
* Power      120-240V AC C13
* UART:      1 serial header (J12) with populated standard pin connector on
             the right back of the PCB.
             Pinout (front to back):
             + Pin 1 - VCC marked with white dot
             + Pin 2 - RX
             + Pin 3 - TX
             + PIn 4 - GND

Serial connection parameters:  115200 8N1.

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

OEM upgrade method:

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware
* Select the HTTP radio button
* Select the Active radio button
* Use the browse button to locate the
realtek-generic-zyxel_gs1900-16-initramfs-kernel.bin
file amd select open so File Path is update with filename.
* Select the Apply button. Screen will display "Prepare
for firmware upgrade ...".
*Wait until screen shows "Do you really want to reboot?"
then select the OK button
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/realtek-generic-zyxel_gs1900-16-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
   > rtk network on
* Since the GS1900-16 is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from the first partition anyway (hardcoded in the DTS). To make sure we are
  manipulating the first partition, issue the following commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
   > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-16-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-16-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Raylynn Knight <rayknight@me.com>
[removed duplicate patch title, align RAM specification]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-07 17:23:45 +02:00
Matthew Hagan
d9fae43202 kernel: backports: add Huawei MA5671A tx-fault workaround
This workaround will allow the MA5671A to function, ignoring the
persistently asserted tx-fault.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
(added 5.15 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 16:27:27 +02:00
Christian Lamparter
b2c9c4dda2 apm821xx: add support for kernel 5.15 for testing
This patch copies over refreshed config and patches from 5.10
with the following changes:

 - dropped superfluous tc654/tc655 variant detection patch
   (tc654 support will become available upstream starting with
   5.17-rc7+).

 - dropped xhci msi(x) workaround... as the broken MSI(X)
   is now gone.

 - dropped dwc2 workaround since the driver was fixed and it
   works without it.

Please note: Netgear WNDAP660 & WNDAP620 users:

Due to the kernel's size increase, uboot will likely break
because it is overwrite the kernel during decompression.

To fix this (and debrick affected devices, no reflash
necessary), attach the RJ45-Serial-Console cable and
enter the following in the uboot prompt during bootup:

 setenv kernel_addr_r 1100000
 saveenv
 run bootcmd

to restore the old/previous behavior:

 setenv kernel_addr_r 600000
 saveenv
 run bootcmd

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 16:27:27 +02:00
Christian Lamparter
b47c641ee3 generic: 5.15: add missing symbol
Found during apm821xx refresh.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 14:35:37 +02:00
Christian Lamparter
c97c8b814a kernel/x86: move x86' specific watchdogs to the x86 target
upstream linux have these watchdogs locked behind X86.
These will not build on other architectures. So move them
to target/linux/x86/modules.mk

drivers/watchdog/Kconfig:

|config F71808E_WDT
|	tristate "Fintek F718xx, F818xx Super I/O Watchdog"
|	depends on X86
|[...]
|config IT87_WDT
|	tristate "IT87 Watchdog Timer"
|	depends on X86
|[...]
|config ITCO_WDT
|	tristate "Intel TCO Timer/Watchdog"
|	depends on (X86 || IA64) && PCI
|[...]
|config W83627HF_WDT
|	tristate "Watchdog timer for W83627HF/W83627DHG and compatibles"
|	depends on X86
|[...]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 14:31:22 +02:00
Christian Lamparter
0cd1fc0fe5 x86: detangle meraki-mx100 / nu801 build confusion
Grommish reported the dreaded build error that happend with 5.4
since the kernel didn't have the cgpio v2 interface. His reason
for the removed 5.4 was that the octeon target had a memory leak
issue, so he had to backport the removed 5.4 kernel for his tests.

Chen Minqiang chimed in and noted that no matter what (i.e.
@TARGET_x86 in depends) didn't prevent the package from being build
on other targets.

From what I can tell, the reason for this was that +nu801 meant
that kmod-meraki-mx100 pulled in an unconditional dependency as
part of to the kernel build.

|scripts/package-metadata.pl mk tmp/.packageinfo
|
|$(curdir)/kernel/linux/compile += $(curdir)/firmware/linux-firmware/compile \
|	$(curdir)/firmware/prism54-firmware/compile \
|	$(curdir)/kernel/gpio-button-hotplug/compile \
|	>>> $(curdir)/system/gpio-cdev/nu801/compile <<<

change this by making the dependency conditional on the
meraki-mx100 module itself. Note that the nu801 enables/sets
the  KCONFIG for the cgpio v2 interface itself, since the
userspace program and not the kernel meraki-mx100 relies on it.

Reference: <https://github.com/openwrt/openwrt/commit/eeb8fd4ce7e9>
Reported-by: Grommish <grommish@gmail.com>
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 14:31:22 +02:00
Christian Lamparter
d022451906 x86: add ib700wdt module for x86 qemu watchdogs
QEMU+Libvirt can emulate the ib700wdt watchdogs
which due to its I/O-Port mapping makes it x86
specific.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 14:31:22 +02:00
Christian Lamparter
afcb6b1524 armvirt: 64: enable driver for QEMU' supported watchdog
QEMU can emulate several watchdogs:
aspeed SoC, i6300esb, ib700wdt, imx2, cmsdk-apb and sbsa_gwdt.

Out of these, the ARM SBSA Generic Watchdog (sbsa_gwdt)
makes the most sense for the armvirt' 64 target. Both imx2 and
aspeed are guarded by special vendor specific CONFIG_ in the
upstream kernel.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-07 14:31:21 +02:00
Felix Fietkau
203ffc4ca7 kernel: fix corrupted padding on small packets with mt753x dsa
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-06 21:55:20 +02:00
Felix Fietkau
b5f25d43b7 kernel: backport flow offload fixes to 5.10
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-06 21:47:53 +02:00
Felix Fietkau
726ef8ba2d kernel: fix flow offload issues with pppoe
sync xt_FLOWOFFLOAD code with latest version of nft_flow_offload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-06 15:50:32 +02:00
Sungbo Eo
cb1dc49c18 ipq40xx: consolidate ar40xx driver files
Commit f4fb63d2ab4f ("ipq40xx: 5.10: move AR40xx to MDIO drivers") moved
the ar40xx driver files to kernel version specific directories to place
them in different subdirectory in kernel tree. But now kernel 5.4 is
gone and there is no reason to keep them separate. Move them back to
common files/ directory.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-05 09:19:00 +09:00
Nick Hainke
1526ccebd4 ipq40xx: 5.15: fix ar40xx driver
Also apply commit ab7e53e5cce7 ("ipq40xx: 5.10: fix ar40xx driver") to
5.15 driver.

The commit fixes the data corruption on TX packets. Packets are
transmitted, but their contents are replaced with zeros. This error is
caused by the lack of guard (50 ms) intervals between calibration phases.
This error is treated by adding mdelay(50) to the calibration function
code. In the original qca-ssda code, these mdelays were existing, but in
the ar41xx.c they are gone.

Fixes: 87318eb17936 ("ipq40xx: 5:15: copy config and patch from 5.10")

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-05-05 09:19:00 +09:00
Ptilopsis Leucotis
b697b5c55e ramips: add i2c in dts for GL-MT300N-V2
According wiki https://docs.gl-inet.com/en/2/hardware/mt300n-v2/
GL-MT300N-V2 have I2C interface on GPIO4, GPIO5.
Adding I2C in device tree make possible using I2C on this device.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
2022-05-05 09:19:00 +09:00
Rodrigo Balerdi
f8b0010dfb ipq806x: add support for Arris TR4400 v2 / RAC2V1A
Hardware specs:
  SoC: Qualcomm IPQ8065 (dual core Cortex-A15)
  RAM: 512 MB DDR3
  Flash: 256 MB NAND, 32 MB NOR
  WiFi: QCA9983 2.4 GHz, QCA9984 5 GHz
  Switch: QCA8337
  Ethernet: 5x 10/100/1000 Mbit/s
  USB: 1x USB 3.0 Type-A
  Buttons: WPS, Reset
  Power: 12 VDC, 2.5 A

Ethernet ports:
  1x WAN: connected to eth2
  4x LAN: connected via the switch to eth0 and eth1
          (eth0 is disabled in OEM firmware)

MAC addresses (OEM and OpenWrt):
  fw_env @ 0x00  d4🆎82:??:??:?a  LAN (eth1)
  fw_env @ 0x06  d4🆎82:??:??:?b  WAN (eth2)
  fw_env @ 0x0c  d4🆎82:??:??:?c  WLAN 2.4 GHz (ath1)
  fw_env @ 0x12  d4🆎82:??:??:?d  WLAN 5 GHz (ath0)
  fw_env @ 0x18  d4🆎82:??:??:?e  OEM usage unknown (eth0 in OpenWrt)

  OID d4🆎82 is registered to:
  ARRIS Group, Inc., 6450 Sequence Drive, San Diego CA 92121, US

More info:
  https://openwrt.org/inbox/toh/arris/tr4400_v2

IMPORTANT:

This port requires moving the 'fw_env' partition prior to first boot to
consolidate 70% of the usable space in flash into a contiguous partition.
'fw_env' contains factory-programmed MAC addresses, SSIDs, and passwords.
Its contents must be copied to 'rootfs_1' prior to booting via initramfs.
Note that the stock 'fw_env' partition  will be wiped during sysupgrade.

A writable 'stock_fw_env' partition pointing to the old, stock location
is included in the port to help rolling back this change if desired.

Installation:

- Requires serial access and a TFTP server.
- Fully boot stock, press ENTER, type in:
mtd erase /dev/mtd21
dd if=/dev/mtd22 bs=128K count=1 | mtd write - /dev/mtd21
umount /config && ubidetach -m 23 && mtd erase /dev/mtd23
- Reboot and interrupt U-Boot by pressing a key, type in:
set mtdids 'nand0=nand0'
set mtdparts 'mtdparts=nand0:155M@0x6500000(mtd_ubi)'
set bootcmd 'ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm'
env save
- Setup TFTP server serving initramfs image as 'recovery.bin', type in:
set ipaddr 192.168.1.1
set serverip 192.168.1.2
tftpboot recovery.bin && bootm
- Use sysupgrade to install squashfs image.

This port is based on work done by AmadeusGhost <amadeus@jmu.edu.cn>.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
[add 5.15 changes for 0069-arm-boot-add-dts-files.patch]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-05 09:19:00 +09:00
Arınç ÜNAL
f4e219fd5e packages: nvram: add NVRAM quirks for bcm53xx target
Add NVRAM quirks script for the bcm53xx target. Split NVRAM quirks for the
bcm47xx and bcm53xx targets. Move clear partialboot NVRAM quirk for Linksys
EA9500 here. Add set wireless LED behaviour quirk for Asus RT-AC88U.

Use boot() instead of start() as nvram commands are meant to be executed
only once, at boot.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-05-04 21:51:20 +02:00
Tamas Balogh
65dc9e0980 ramips: ethernet: ralink: add led_source dts-binding
this adds the new dts-binding "mediatek,led_source"
currently for MT7628AN and MT7688 built-in switches,
which is documented as a 3-bit field configuring the
switch LEDs for various control schemes from 0 to 3.

Normally this is not needed, but e.g. for Asus RT-AC1200-V2
it is a must to set it to the anyway undocumented value
of 4, to have the switch LEDs react correctly on link/act
events. This is an MT7628DAN device, but I doubt this is
a speciality of this particular SoC.

Also added the RT305X_ESW_LED_OFF value to LED states.
Did also rename the register RT5350_EWS_REG_LED_POLARITY
to RT5350_EWS_REG_LED_CONTROL, which is the correct name.
Also making use of defines for some hardcoded values.

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
2022-05-01 13:40:13 +09:00
Pawel Dembicki
55553a45f8 kirkwood: set testing kernel version to 5.15
This patch configures kernel testing version for kirkwood target.

Compile tested: all
Run tested: Endian 4i

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2022-05-01 13:40:13 +09:00
Pawel Dembicki
11fdfc2eca kirkwood: refresh 5.15 kernel config
Done by "make kernel_oldconfig".

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2022-05-01 13:40:13 +09:00
Pawel Dembicki
62be521ca7 generic: 5.15: add missing symbol
Found durring kirkwood refreshing.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2022-05-01 13:40:13 +09:00
Pawel Dembicki
8e6ee6cbaf kirkwood: copy config and patches to 5.15
This patch makes only a copy of 5.10 config and patches.

Patches merged in upstream was omited.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2022-05-01 13:40:13 +09:00
Sungbo Eo
daee22c7c0 ipq40xx: 5.15: refresh subtarget config
Update config with `make kernel_oldconfig CONFIG_TARGET=subtarget`.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-01 13:40:13 +09:00
Robert Marko
376834a743 ipq40xx: 5.15: refresh config
Refresh 5.15 kernel config for IPQ40xx due to large number of generic
config changes.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Robert Marko
2114b22ef3 ipq40xx: 5.15: drop upstreamed sleep clock patch
Patch that corrects sleep clock frequency has already been backported
to 5.15 stable so remove the duplicate patch.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
17b7756b5a ipq40xx: 5.15: add testing kernel version
Add 5.15 kernel as a testing kernel version in the Makefile.

Linksys EA6350v3/EA8300/MR8300 will not build with buildbot settings and
should be disabled when the target is switched, unless the image size is
reduced again.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
[add comment for increased kernel size]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7517955eac ipq40xx: 5.15: refresh kernel patches
Refresh kernel patches.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7c692f685b ipq40xx: refresh ess driver and phy with new api
Kernel 5.15 have some new api for ethtool and phy.
Add ifdef to fix compilation error.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7a72fcc1c5 ipq40xx: fix wrong nand definition for wpj419
Fix wrong nand definition for wpj419 that differ from the upstream
node name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
07ddbb9961 ipq40xx: 5:15: refresh config
Refresh config for kernel 5.15 using make kernel_menuconfig

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
29e177e4ee ipq40xx: 5:15: refresh patches
- Drop upstream patch
- Refresh dts patch

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
87318eb179 ipq40xx: 5:15: copy config and patch from 5.10
Copy config and patch from 5.10 to 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Alban Bedel
d806c3caf3 ramips: zbt-wg2626: Fix the LAN ports names
The current names don't match with the labels on the case, reverse
the LAN ports order so they match.

Signed-off-by: Alban Bedel <albeu@free.fr>
2022-05-01 13:39:56 +09:00
Alban Bedel
f953a1a4bf ramips: zbt-wg2626: Add the reset gpio for PCIe port 1
The 2.4GHz interface doesn't come up properly with the log showing:

    mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)

As seen on other MT7621 boards this is caused by a missing reset GPIO.
The MT7621 dtsi set GPIO 19 as PCIe reset GPIO, which on this board
reset the 5GHz interface on port 0. Add GPIO 8 to the PCIe reset GPIO
list to also reset the 2.4GHz interface on port 1.

Signed-off-by: Alban Bedel <albeu@free.fr>
2022-05-01 11:21:23 +08:00
Nick Hainke
88527294cd ath79: add Netgear WNDAP360
SoC: Atheros AR7161
RAM: DDR 128 MiB (hynix h5dU5162ETR-E3C)
Flash: SPI-NOR 8 MiB (mx25l6406em2i-12g)
WLAN: 2.4/5 GHz
2.4 GHz: Atheros AR9220
5 GHz: Atheros AR9223
Ethernet: 4x 10/100/1000 Mbps (Atheros AR8021)
LEDs/Keys: 2/2 (Internet + System LED, Mesh button + Reset pin)
UART: RJ45 9600,8N1
Power: 12 VDC, 1.0 A

Installation instruction:
0. Make sure you have latest original firmware (3.7.11.4)
1. Connect to the Serial Port with a Serial Cable RJ45 to DB9/RS232
   (9600,8N1)
   screen  /dev/ttyUSB0 9600,cs8,-parenb,-cstopb,-hupcl,-crtscts,clocal
2. Configure your IP-Address to 192.168.1.42
3. When device boots hit spacebar
3. Configure the device for tftpboot
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.42
   saveenv
4. Reset the device
   reset
5. Hit again the spacebar
6. Now load the image via tftp:
   tftpboot 0x81000000 INITRAMFS.bin
7. Boot the image:
   bootm 0x81000000
8. Copy the squashfs-image to the device.
9. Do a sysupgrade.

https://openwrt.org/toh/netgear/wndap360

The device should be converted from kmod-owl-loader to nvmem-cells in the
future. Nvmem cells were not working. Maybe ATH9K_PCI_NO_EEPROM is missing.
That is why this commit is still using kmod-owl-loader. In the future
the device tree may look like this:

&ath9k0 {
       nvmem-cells = <&macaddr_art_120c>, <&cal_art_1000>;
       nvmem-cell-names = "mac-address", "calibration";
};

&ath9k1 {
       nvmem-cells = <&macaddr_art_520c>, <&cal_art_5000>;
       nvmem-cell-names = "mac-address", "calibration";
};

&art {
	...
	cal_art_1000: cal@1000 {
		reg = <0x1000 0xeb8>;
	};

	cal_art_5000: cal@5000 {
		reg = <0x5000 0xeb8>;
	};
};

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-04-30 23:56:47 +02:00
PtilopsisLeucotis
6e9c814022 ath79: add USB power control for GL-AR300M series
Add USB power control in DTS for GL.iNet models:
- AR300M;
- AR300M-Ext;
- AR300M16;
- AR300M16-Ext.

Signed-off-by: PtilopsisLeucotis <PtilopsisLeucotis@yandex.com>
2022-04-30 23:56:47 +02:00
Foica David
063e9047cc ath79: add support for TP-Link Deco M4R v1 and v2
This commit adds support for the TP-Link Deco M4R (it can also be M4,
TP-Link uses both names) v1 and v2. It is similar hardware-wise to the
Archer C6 v2. Software-wise it is very different. V2 has a bit different
layout from V1 but the chips are the same and the OEM firmware is the same
for both versions.

Specifications:
SoC: QCA9563-AL3A
RAM: Zentel A3R1GE40JBF
Wireless 2.4GHz: QCA9563-AL3A (main SoC)
Wireless 5GHz: QCA9886
Ethernet Switch: QCA8337N-AL3C
Flash: 16 MB SPI NOR

Flashing:

The device's bootloader only accepts images that are signed using
TP-Link's RSA key, therefore this way of flashing is not possible. The
device has a web GUI that should be accessible after setting up the device
using the app (it requires the app to set it up first because the web GUI
asks for the TP-Link account password) but for unknown reasons, the web
GUI also refuses custom images.

There is a debug firmware image that has been shared on the device's
OpenWrt forum thread that has telnet unlocked, which the bootloader will
accept because it is signed. It can be used to transfer an OpenWrt image
file over to the device and then be used with mtd to flash the device.

Pre-requisites:

- Debug firmware.
- A way of transferring the file to the router, you can use an FTP server
  as an example.
- Set a static IP of 192.168.0.2/255.255.255.0 on your computer.
- OpenWrt image.

Installation:

- Unplug your router and turn it upside down. Using a long and thin object
  like a SIM unlock tool, press and hold the reset button on the router and
  replug it. Keep holding it until the LED flashes yellow.
- Open 192.168.0.1. You should see the bootloader recovery's webpage.
  Choose the debug firmware that you downloaded and flash it. Wait until the
  router reboots (at this stage you can remove the static IP).

- Open a terminal window and connect to the router via telnet (the primary
  router should have a 192.168.0.1 IP address, secondary routers are
  different).
- Transfer the file over to the router, you can use curl to download it
  from the internet (use the insecure flag and make sure your source accepts
  insecure downloads) or from an FTP server.
- The router's default mtd partition scheme has kernel and rootfs
  separated. We can use dd to split the OpenWrt image file and flash it with
  mtd:

   dd if=openwrt.bin of=kernel.bin skip=0 count=8192 bs=256
   dd if=openwrt.bin of=rootfs.bin skip=8192 bs=256

- Once the images are ready, you have to flash the device using mtd
  (make sure to flash the correct partitions or you may be left with a
  hard bricked router):

   mtd write kernel.bin kernel
   mtd write rootfs.bin rootfs

- Flashing is done, reboot the device now.

Signed-off-by: Foica David <superh552@gmail.com>
2022-04-30 23:56:47 +02:00
Davide Fioravanti
32e6942d72 ramips: add support for Wavlink WL-WN533A8
The Wavlink WL-WN533A8 is an AC3000 router with 5 gigabit ethernet ports
and one USB 3.0 port.
It's also known as Wavlink QUANTUM T8.

Hardware
--------
SoC:   Mediatek MT7621A
RAM:   128MB (Nanya NT5CB64M16GP-EK)
FLASH: 16MB NOR (GigaDevice GD25Q127CSIG3)
ETH:
  - 5x 10/100/1000 Mbps Ethernet (4x LAN + 1x WAN)
WIFI:
  - 1x MT7615DN (2x 2x2:2) 2.4GHz and 5GHz DBDC
  - 1x MT7615NE (4x4:4) 5GHz
  - 8 external antennas
BTN:
  - 1x Reset button
  - 1x WPS button
  - 1x Turbo button
  - 1x Touchlink button
  - 1x ON/OFF switch
LEDS:
  - 1x Red led (system status)
  - 1x Blue led (system status)
  - 7x Blue leds (wifi led + 5 ethernet ports + power)
USB:
  - 1x USB 3.0 port
UART:
  - 57600-8-N-1
    J4

Everything works correctly.

Installation
------------
Flash the initramfs image in the OEM firmware interface
(http://192.168.10.1/update.shtml).
When Openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.
(Procedure tested on fw M33A8.V5030.190716 and M33A8.V5030.201204)

Restore OEM Firmware
--------------------
Flash the firmware update available online directly from LUCI.
You can download it from:
https://www.wavlink.com/en_us/firmware/details/f2d247ecba.html
Warning: Remember to not keep settings!
Warning2: Remember to force the flash.

Notes
-----
1) Router mac addresses:
   LAN		XX:XX:XX:XX:XX:63 (factory @ 0xe006)
   WAN		XX:XX:XX:XX:XX:64 (factory @ 0xe000)
   WIFI 2G/5G	XX:XX:XX:XX:XX:65 (factory @ 0x04)
   WIFI 5G	XX:XX:XX:XX:XX:66 (factory @ 0x8004)

   LABEL	XX:XX:XX:XX:XX:65

   In OEM firmware the DBDC wifi interfaces have these mac addresses:
     2G) 82:XX:XX:XX:XX:65
     5G) 80:XX:XX:XX:XX:65

   While in OpenWrt the addresses are:
     2G) 80:XX:XX:XX:XX:65
     5G) 02:XX:XX:XX:XX:65

2) radio0 will show as 2G/5G interface but only 2G is really usable.

3) There is just one wifi led for all wifi interfaces.
   It currently shows only the radio0 GHz wifi activity.

4) My unit was shipped with M33A8.V5030.190716 firmware which contains
   the http://192.168.10.1/webcmd.shtml page. Entering "telnetd" in
   the input box it will start the telnet daemon. Now you can access
   the telnet console on port 2323 with these credentials:
     username: admin2860
     password: admin

5) The M33A8.V5030.201204 firmware version, doesn't contain anymore the
   webcmd.shtml page. If your router is shipped with a previous firmware
   version and you want to back it up, you can follow the back up
   procedure of the WS-WN583A6.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2022-04-30 23:56:47 +02:00
Davide Fioravanti
57b6dcd826 ramips: create shared DTSI for Wavlink WN53XAX devices
Most of the definitions for WN531A6 will be shared with WN533A8 in a
future commit, so put them in a shared DTSI.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2022-04-30 23:56:47 +02:00
Martin Kennedy
1d06277407 mpc85xx: Fix output location of padded dtb
In commit 7e614820a892 ("mpc85xx: add support for Extreme Networks
WS-AP3825i"), we borrowed a recipe convention from apm821xx for device
tree blob padding. Unfortunately, in the apm821xx target, the image
recipes name the device tree blob differently, meaning that in
mpc85xx, the padded dtb is never consumed.

Change the definition of `Build/dtb` so that it outputs the padded dtb
to the correct location for it to be consumed.

Also, rename the recipe to `Build/pad-dtb`, so it is clear we
are building and padding the device tree blob.

This change fixes Github issue #9779 [1].

[1]: https://github.com/openwrt/openwrt/issues/9779

Fixes: 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i")
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
2022-04-30 23:56:47 +02:00
Robert Marko
714b88c1ab kernel: 5.15: add missing symbol
CONFIG_QCOM_SPMI_ADC_TM5 gets uncovered while building IPQ40xx with 5.15.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-04-30 21:27:46 +02:00
John Audia
e08942e76a kernel: bump 5.10 to 5.10.113
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <graysky@archlinux.us>
2022-04-30 21:27:45 +02:00
Chuanhong Guo
d9ea9c06e9 mediatek: build ubnt-ledbar as a module
The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because
of its I2C dependency. Build it as a module and let buildroot handle
this config option instead.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-30 23:13:33 +08:00
Chuanhong Guo
dcf7285b71 mediatek: mt7629: disable auxadc in kconfig
manually edit kconfig to disable MT6577_AUXADC

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-30 23:13:33 +08:00
Chuanhong Guo
3816b2231c mediatek: mt7623: disable various input devices
Disable support for joysticks, micee and tablets. There's no actual
driver selected in kconfig, and including kernel support is just a
waste of space. Besides that, I believe nobody wants these on a router.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-30 23:13:33 +08:00
Chuanhong Guo
99cd44487e mediatek: mt7622: add irq for spi-nor controller
Save some CPU from unnecessary polling and make SPI flash reading
a tiny bit faster.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-30 23:13:33 +08:00
Daniel Golle
593fe90b53
mediatek: remove left-overs from Linux 5.10
Remove patches and configuration for Linux 5.10 which have been left
in the tree despite the target having been switched to Linux 5.15.

Fixes: c283defa88 ("mediatek: switch to 5.15")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:24 +01:00
Daniel Golle
eb96f1413a
mediatek: enable multi-core scheduling
Set CONFIG_SCHED_MC in config-5.15 to have make the scheduler aware
of shared caches.

Reported-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:19 +01:00
Daniel Golle
9b4041fa2e
mediatek: refresh patches for Linux 5.15
Run `make target/linux/refresh` to align patches with OpenWrt style.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:15 +01:00
Daniel Golle
5d135fcf9d
mediatek: backport recent DTS improvements for MT7622 SoC
Daniel Golle:
 190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch

Rui Salvaterra:
 191-arm64-dts-mt7622-specify-the-L2-cache-topology.patch
 192-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:10 +01:00
Daniel Golle
2acf355e56
kernel: don't parse FIT partition on NAND-backed mtdblock
ubiblock devices should be used on NAND flash to store the uImage.FIT
in case the bootloader supports that -- otherwise only rootfs is stored
in UBI while the uImage.FIT contains only the kernel and dtb.
Hence there is no need to enable parsing partitions on NAND mtdblock
devices, it is even responsible for the ugly warning on-opening of the
mtdblock device now. Just don't do it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:05 +01:00
Daniel Golle
27fac9c08f
kernel: backport patch to relax mtdblock NAND warning
Instead of warning loudly about mtdblock devices being created, rather
just warn if they are actually used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 15:59:59 +01:00
Chuanhong Guo
852126680e mediatek: mt7629: disable mtk thermal
Manually edit kconfig to disable CONFIG_MTK_THERMAL

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-29 11:47:04 +08:00
Chuanhong Guo
5de8c3dc1f mediatek: mt7623: disable ecc engine support
There's no board using nand on this target atm.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-29 11:32:51 +08:00
Chuanhong Guo
b2d802f839 mediatek: mt7623 enable arch-timer with a patch
Last attempt on this has a typo and doen't work.
It seems that this is a common problem occurring on every kernel bump,
so let's enforce arch timer support for mt7623 with a patch instead.

Fixes: 9a22943eb2 ("mediatek: 5.15: re-enable arch timer on MT7623 as well")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-29 11:32:28 +08:00
Nick Hainke
ab7e53e5cc ipq40xx: 5.10: fix ar40xx driver
This commit is completely based on the work of adron-s:
https://github.com/openwrt/openwrt/pull/4721#issuecomment-1101108651

The commit fixes the data corruption on TX packets. Packets are
transmitted, but their contents are replaced with zeros. This error is
caused by the lack of guard (50 ms) intervals between calibration phases.
This error is treated by adding mdelay(50) to the calibration function
code. In the original qca-ssda code [0], these mdelays were existing, but
in the ar41xx.c they are gone.

Tested on:
- Fritz!Box 4040
- Fritz!Box 7530
- Mikrotik SXTsq 5AC
- ZyXEL NBG6617

- [0] https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk/-/blob/NHSS.QSDK.11.4/src/init/ssdk_init.c#L2072

Suggested-by: Serhii Serhieiev <adron@mstnt.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-04-29 00:27:25 +02:00
Chuanhong Guo
c283defa88 mediatek: switch to 5.15
the SPI-NAND driver switch breaks dts compatibility. It's too much work
to backport all ECC framework support to 5.10 so let's switch the target
to 5.15 instead.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 21:57:18 +08:00
Chuanhong Guo
6470018c57 mediatek: enable snfi for mt7629
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 21:57:18 +08:00
Chuanhong Guo
fe079b7e0e mediatek: restore support for Fidelix FM35X1GA
This patch was dropped when the spi-nand driver got replaced last time.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 21:57:06 +08:00
Chuanhong Guo
68d5efaa10 mediatek: add an upstreamed spi-nand driver
This patch implements the spi-nand controller driver as an ECC-capable
spi-mem controller to use the upstream SPI-NAND driver.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 18:06:00 +08:00
Chuanhong Guo
2138956bdc mediatek: spi-nand: check for 1 byte BBM only
the OOB layout in MTK SNFI uses the 2nd byte, and anything using OOB
will make the block a bad-block in spi-nand driver.
Hack it for now. We need a proper solution upstream.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 18:06:00 +08:00
Chuanhong Guo
861efe158a mediatek: v5.15: backport spi-mem ecc support
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 18:06:00 +08:00
Chuanhong Guo
3e5925225e mediatek: drop spi-nand driver from mtk
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-04-28 18:06:00 +08:00
Sander Vanheule
8fa4361f55 ath79: add support for TP-Link EAP265 HD
The EAP265 HD is a rebadged EAP245v3, so images are compatible with both
devices.

Link: https://fccid.io/TE7EAP265HD/Letter/6-Request-for-FCC-Change-ID-4823578.pdf
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-04-27 20:29:37 +02:00
David Bauer
c6d52515e0 mpc85xx: set WS-AP3825i mac-address in preinit
The bootloader does seem to not correctly patch in the MAC address for
eth0 / eth1 in some cases. While the root cause is not known, manually
applying the MAC-Address in preinit does not hurt.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-04-26 00:56:51 +02:00
David Bauer
8b3c313515 mpc85xx: define reset-delay for WS-AP3825i eth PHY
The WS-AP3825i uses Atheros PHYs which according to the datasheet
require the reset to be asserted for at least 1 ms.

This fixes broken eth1 upon soft-reboot. eth0 is no affected, as the
ifup / ifdown cycle in preinit prevents this issue from happening when
the system is ready.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-04-26 00:56:19 +02:00
Martin Weinelt
089eb02abc ath79: ubnt: drop swconfig on ac-{lite,lr,mesh}
These don't have switches that could be configured using swconfig.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2022-04-23 22:22:12 +02:00
Marcin Gordziejewski
39799974a3 ramips: add support for TP-Link RE650 v2
TP-Link RE650 v2 is largely similar to v1 that
is already supported by OpenWrt. Notable differences
is differnt SPI Flash - 8 MB instead of 16 MB
(from cFeon instead of Winbond) and a different
configuration of PCIE connections to wifi chips.
Otherwise it's largely the same product as v1

Hardware specification:

- SoC 880 MHz - MediaTek MT7621AT
- 128 MB of DDR3 RAM
- 8 MB - cFeon QH64A-104HIP
- 4T4R 2.4 GHz - MediaTek MT7615E
- 4T4R 5 GHz - MediaTek MT7615E
- 1x 1 Gbps Ethernet - MT7621AT integrated
- 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2))
- 4x buttons (Reset, Power, WPS, LED)
- UART pinout - GND, RX, TX, labeled in the middle of the PCB,
  requires soldering because they're not through holes.

  Serial console @ 57600,8n1

Flash instructions:

Upload
openwrt-ramips-mt7621-tplink_re650-v2-squashfs-factory.bin
from the RE650 web interface.

TFTP recovery to stock firmware:
I didn't try recovering back to the stock firmware, however,
if there is such process for other RExxx devices, it seems like
it could be similar here.

Signed-off-by: Marcin Gordziejewski <openwrt@flicksfix.com>
2022-04-23 22:02:27 +02:00
Clemens Hopfer
4891b86538 ramips: add support for YunCore AX820/HWAP-AX820
There are two versions which are identical apart from the enclosure:
  YunCore AX820: indoor ceiling mount AP with integrated antennas
  YunCore HWAP-AX820: outdoor enclosure with external (N) connectors

Hardware specs:
  SoC: MediaTek MT7621DAT
  Flash: 16 MiB SPI NOR
  RAM: 128MiB (DDR3, integrated)
  WiFi: MT7905DAN+MT7975DN 2.4/5GHz 2T2R 802.11ax
  Ethernet: 10/100/1000 Mbps x2 (WAN/PoE+LAN)
  LED: Status (green)
  Button: Reset
  Power: 802.11af/at PoE; DC 12V,1A
  Antennas: AX820(indoor): 4dBi internal; HWAP-AX820(outdoor): external

Flash instructions:
  The "OpenWRT support" version of the AX820 comes with a LEDE-based
  firmware with proprietary MTK drivers and a luci webinterface and
  ssh accessible under 192.168.1.1 on LAN; user root, no password.
  The sysupgrade.bin can be flashed using luci or sysupgrade via ssh,
  you will have to force the upgrade due to a different factory name.
  Remember: Do *not* preserve factory configuration!

MAC addresses as used by OEM firmware:
  use   address            source
  2g    44:D1:FA:*:0b      Factory 0x0004 (label)
  5g    46:D1:FA:*:0b      LAA of 2g
  lan   44:D1:FA:*:0c      Factory 0xe000
  wan   44:D1:FA:*:0d      Factory 0xe000 + 1
The wan MAC can also be found in 0xe006 but is not used by OEM dtb.

Due to different MAC handling in mt76 the LAA derived from lan is used
for 2g to prevent duplicate MACs when creating multiple interfaces.

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
2022-04-23 20:46:25 +02:00
Rui Salvaterra
daa35a4d60 kernel: bump 5.15 to 5.15.35
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-04-23 20:46:25 +02:00
John Audia
cab20be008 kernel: bump 5.10 to 5.10.112
Manually rebased:
  ath79/patches-5.10/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <graysky@archlinux.us>
2022-04-23 20:46:25 +02:00
Huangbin Zhan
b8ed98b100 bcm63xx: fix description fix name case
The `Description` should be capital.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2022-04-23 20:46:25 +02:00
Lech Perczak
8a1003c598 ath79: ZTE MF286R: add comgt-ncm to DEVICE_PACKAGES
When adding support to the router's built-in modem, this required
package was omitted, because it was already enabled in the image
configuration in use for testing, and this went unnoticed.
In result, the modem still isn't fully supported in official images.
As it is the primary WAN interface, add the missing package.

Fixes: e02fb42c53ba ("comgt: support ZTE MF286R modem")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-04-23 20:46:25 +02:00
Daniel Golle
690f715267
kernel: update FIT partition parser to new property name
The commit "uboot-mediatek: replace patch with accepted commit" changed
the name of the boot configuration property from 'bootconf' to
'u-boot,bootconf'. Reflect this change in the FIT partition parser.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-20 15:23:02 +01:00
Rui Salvaterra
6e837bc5d8 kernel: x86: remove an upstreamed patch
012-pcengines-apu2-detect-apuv4-board.patch is upstream since Linux 5.5 [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.5&id=3d00da1de3ea36ba44f4a7ba76c8c8b16f98204b

Acked-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-04-20 11:53:07 +01:00
Felix Fietkau
92add80414 kernel: add missing config symbols
MPLS feature symbols are normally only set when kmod-mpls is enabled, but the
CONFIG_MPLS symbol they depend on could also have been selected by openvswitch
instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-04-20 10:04:19 +02:00
Daniel Golle
fc245338d6
mediatek: mt7622: remove '0x' prefix from pstore address in dts
Adresses of device tree nodes are typically noted without the '0x'
prefix. While having the '0x' prefix doesn't hurt when using Linux,
more recent versions of U-Boot will add a duplicate ramoops node as a
simple string compare is used to check if the node is already present.

Remove the '0x' prefix to avoid the kernel warning resulting from
U-Boot adding a dupplicate pstore/ramoops node.

See also https://lists.denx.de/pipermail/u-boot/2022-April/481810.html

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-19 17:07:23 +01:00
Eneas U de Queiroz
3f2d0703b6 mediatek: remove crypto-hw-mtk package
The MediaTek's Crypto Engine module is only available for mt7623, in
which case it is built into the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-04-19 19:05:32 +08:00
David Musil
e20de22442 ath79: add support for MikroTik RouterBOARD wAP-2nD (wAP)
The MikroTik RouterBOARD wAP-2nd (sold as wAP) is a small
2.4 GHz 802.11b/g/n PoE-capable AP.

Specifications:
 - SoC: Qualcomm Atheros QCA9533
 - Flash: 16 MB (SPI)
 - RAM: 64 MB
 - Ethernet: 1x 10/100 Mbps (PoE in)
 - WiFi: AR9531 2T2R 2.4 GHz (SoC)
 - 3x green LEDs (1x lan, 1x wlan, 1x user)

 See https://mikrotik.com/product/RBwAP2nD for more info.

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Note: following 781d4bfb397cdd12ee0151eb66c577f470e3377d
 The network setup avoids using the integrated switch and connects the
 single Ethernet port directly. This way, link speed (10/100 Mbps) is
 properly reported by eth0.

Signed-off-by: David Musil <0x444d@protonmail.com>
2022-04-18 07:24:09 +02:00
Ray Wang
9a750aae62 ramips: add support for OrayBox X3A
OrayBox X3A is a 2.4/5GHz dual band AC router, based on MediaTek MT7621.

Specification:
* SoC: MT7621
* RAM: DDR3 128 MiB
* Flash: 16 MiB NOR (XM25Q128)
* Wi-Fi: (single chip hosting both 2.4G and 5G)
  * 2.4GHz: MT7615
  * 5GHz: MT7615
* Ethernet: 3x 1000Mbps
  * Switch: MT7530
* LED:
  * Ethernet LEDs: On the back of the router, hardware-controlled.
  * Status LEDs: One "pixel-like" RGB LED in the front of the router,
                 which is actually made up of 3 individual LEDs (with
                 dedicated GPIO pins) with the color of Red, Green,
                 and Blue.
                 The OEM firmware only lights up one color at a time to
                 indicate status, but that's very boring, and the colors
                 actually look great when combined, so I've improvised a
                 little and made them indicate netdev activities.
                 My test results:
                 GPIO 13/14/15
                 000 white (actually more like bright green or cyan
                            because the brightness of the green LED is
                            higher than red and blue)
                 001 bright purple
                 010 bright green
                 011 red
                 100 bright cyan
                 101 blue
                 110 green
                 111 off

Flash Layout:
 0x0000000-0x0030000 : "u-boot"
 0x0030000-0x0040000 : "u-boot-env"
 0x0040000-0x0050000 : "factory"
 0x0050000-0x0f50000 : "firmware"
 /*0x0f50000 to 0x0fe0000 is undefined, same as OEM firmware*/
 0x0fe0000-0x0ff0000 : "bdinfo"
 0x0ff0000-0x1000000 : "reserve"

MAC address:
 MAC               Source                          Description    Fix
 A0:CX:XX:BX:XX:0D BDINFO_9                        LAN(LABEL)     DTS
 A0:CX:XX:BX:XX:0E BDINFO_9 + 1                    WAN            DTS
 A2:CX:XX:BX:XX:0F FACTORY_4                       WIFI2G         DTS
 A2:CX:XX:CX:XX:0F SETBIT 7 (FACTORY_4 + 0x100000) WIFI5G         HOTPLUG
 A6:CX:XX:BX:XX:0F N/A                             WIFI2G_CLIENT  N/A
 A6:DX:XX:BX:XX:0F N/A                             WIFI5G_CLIENT  N/A

Stock dmesg:
https://pastebin.com/2t2jwLdf

Stock Dumps:
https://pastebin.com/LDLxSWX3

Installation via SSH (does not void your warranty):
1.  -----UNLOCK SSH-----
1.1 Set computer IP to DHCP mode, load 'http://10.168.1.1/cgi-bin/luci' in
    your browser. Password is 'admin'.
1.2 Click the "备份且导出" (backup and export) button, and download the
    config file.
1.3 Open the downloaded file with 7zip, navigate to '/etc/config/'.
1.4 Edit the file './system'. Change the '0' into '1' under
    "config sys 'ssh'".
1.5 Save the file.
1.6 Upload the file by clicking the "导入且恢复" (import and recover)
    button. The router will automatically reboot.
2.  -----FLASH THE OPENWRT FIRMWARE-----
2.1 Use any scp tool to upload the 'sysupgrade' firmware to the '/tmp/'
    folder to your router. It should be root@10.168.1.1 and the password
    is 'admin'.
2.2 SSH into the router, also root@10.168.1.1 and the password is 'admin'.
2.3 **IMPORTANT** Type command 'dd if=/dev/mtd3 of=/tmp/firmware.bin', to
    backup the stock firmware. Since the OEM does not provide firmware
    download on their website, this is the only way to get it.
2.3 **ALSO IMPORTANT** Use any scp tool to download your backed-up stock
    firmware from '/tmp/' to your local drive. Then you'd better use a hex
    reading tool to have a rough look at it to make sure nothing is
    corrupt. Or u can just back up again and cross check the MD5.
2.4 Type command 'mtd write /tmp/XXX.bin firmware', and it should flash
    the firmware.
2.5 Verify that nothing went wrong. If you're confident, type 'reboot' and
    reboot the router.

Revert to stock firmware:
1.  load stock firmware using mtd (make sure u have a backup).

Signed-off-by: Ray Wang <raywang777@foxmail.com>
2022-04-17 14:10:11 +02:00
Martin Kennedy
a5ac8ad0ba realtek: add ZyXEL GS1900-24HP v1 support
The ZyXEL GS1900-24HP v1 is a 24 port PoE switch with two SFP ports,
similar to the other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24HP v1
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB
* RAM:       Winbond W9751G8KB-25 64 MiB DDR2 SDRAM
* Ethernet:  24x 10/100/1000 Mbps, 2x SFP 100/1000 Mbps
* LEDs:
  * 1 PWR LED (green, not configurable)
  * 1 SYS LED (green, configurable)
  * 24 ethernet port link/activity LEDs (green, SoC controlled)
  * 24 ethernet port PoE status LEDs
  * 2 SFP status/activity LEDs (green, SoC controlled)
* Buttons:
  * 1 "RESET" button on front panel (soft reset)
  * 1 button ('SW1') behind right hex grate (hardwired power-off)
* PoE:
  * Management MCU: ST Micro ST32F100 Microcontroller
  * 6 BCM59111 PSE chips
  * 170W power budget
* Power:     120-240V AC C13
* UART:      Internal populated 10-pin header ('J5') providing RS232;
             connected to SoC UART through a TI or SIPEX 3232C for voltage
             level shifting.

* 'J5' RS232 Pinout (dot as pin 1):
  2) SoC RXD
  3) GND
  10) SoC TXD

Serial connection parameters: 115200 8N1.

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

OEM upgrade method:

* Log in to OEM management web interface

* Navigate to Maintenance > Firmware > Management

* If "Active Image" has the first option selected, OpenWrt will need to be
  flashed to the "Active" partition. If the second option is selected,
  OpenWrt will need to be flashed to the "Backup" partition.

* Navigate to Maintenance > Firmware > Upload

* Upload the openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-initramfs-kernel.bin
  file by your preferred method to the previously determined partition.
  When prompted, select to boot from the newly flashed image, and reboot
  the switch.

* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:

  > sysupgrade /tmp/openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-squashfs-sysupgrade.bin

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).

* Set up a TFTP server on your client and make it serve the initramfs
  image.

* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:

  > rtk network on

* Since the GS1900-24HP v1 is a dual-partition device, you want to keep the
  OEM firmware on the backup partition for the time being. OpenWrt can
  only be installed in the first partition anyway (hardcoded in the
  DTS). To ensure we are set to boot from the first partition, issue the
  following commands:

  > setsys bootpartition 0
  > savesys

* Download the image onto the device and boot from it:

  > tftpboot 0x81f00000 192.168.1.10:openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-initramfs-kernel.bin
  > bootm

* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:

  > sysupgrade /tmp/openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-squashfs-sysupgrade.bin

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[Add info on PoE hardware to commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-04-16 17:26:56 +02:00
Chukun Pan
45b3111b99 ipq806x: RT4230W: utilize nvmem-cells for ath10k caldata
Converts extraction entries from 11-ath10k-caldata into
nvmem-cells in the individual board's device-tree file.

Same as commit 2047058 ("ipq806x: utilize nvmem-cells
for pre-calibration data")

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-04-16 16:59:31 +02:00
Chukun Pan
eee41e33ec ipq806x: Askey RT4230W REV6: enable onboard spi flash
There is a mr25h256 spi flash on this machine. From the mtd backup
of the stock firmware, this spi flash is empty.

[    3.652745] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16,
fifo:64
[    3.653925] spi-nor spi0.0: mr25h256 (32 Kbytes)

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2022-04-16 16:59:31 +02:00
Andrew Powers-Holmes
6f1efb2898 ath79: add support for Sophos AP100/AP55 family
The Sophos AP100, AP100C, AP55, and AP55C are dual-band 802.11ac access
points based on the Qualcomm QCA9558 SoC. They share PCB designs with
several devices that already have partial or full support, most notably the
Devolo DVL1750i/e.

The AP100 and AP100C are hardware-identical to the AP55 and AP55C, however
the 55 models' ART does not contain calibration data for their third chain
despite it being present on the PCB.

Specifications common to all models:
 - Qualcomm QCA9558 SoC @ 720 MHz (MIPS 74Kc Big-endian processor)
 - 128 MB RAM
 - 16 MB SPI flash
 - 1x 10/100/1000 Mbps Ethernet port, 802.3af PoE-in
 - Green and Red status LEDs sharing a single external light-pipe
 - Reset button on PCB[1]
 - Piezo beeper on PCB[2]
 - Serial UART header on PCB
 - Alternate power supply via 5.5x2.1mm DC jack @ 12 VDC

Unique to AP100 and AP100C:
 - 3T3R 2.4GHz 802.11b/g/n via SoC WMAC
 - 3T3R 5.8GHz 802.11a/n/ac via QCA9880 (PCI Express)

AP55 and AP55C:
 - 2T2R 2.4GHz 802.11b/g/n via SoC WMAC
 - 2T2R 5.8GHz 802.11a/n/ac via QCA9880 (PCI Express)

AP100 and AP55:
 - External RJ45 serial console port[3]
 - USB 2.0 Type A port, power controlled via GPIO 11

Flashing instructions:

This firmware can be flashed either via a compatible Sophos SG or XG
firewall appliance, which does not require disassembling the device, or via
the U-Boot console available on the internal UART header.

To flash via XG appliance:
 - Register on Sophos' website for a no-cost Home Use XG firewall license
 - Download and install the XG software on a compatible PC or virtual
   machine, complete initial appliance setup, and enable SSH console access
 - Connect the target AP device to the XG appliance's LAN interface
 - Approve the AP from the XG Web UI and wait until it shows as Active
   (this can take 3-5 minutes)
 - Connect to the XG appliance over SSH and access the Advanced Console
   (Menu option 5, then menu option 3)
 - Run `sudo awetool` and select the menu option to connect to an AP via
   SSH. When prompted to enable SSH on the target AP, select Yes.
 - Wait 2-3 minutes, then select the AP from the awetool menu again. This
   will connect you to a root shell on the target AP.
 - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc
 - Run `mtd -r write /tmp/openwrt.bin astaro_image`
 - When complete, the access point will reboot to OpenWRT.

To flash via U-Boot serial console:
 - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with
   netmask 255.255.255.0
 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP100C'
 - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4]
 - Connect the AP ethernet to your PC's ethernet port
 - Connect a terminal to the UART at 115200 8/N/1 as usual
 - Power on the AP and press a key to cancel autoboot when prompted
 - Run the following commands at the U-Boot console:
    - `tftpboot`
    - `cp.b $fileaddr 0x9f070000 $filesize`
    - `boot`
 - The access point will boot to OpenWRT.

MAC addresses as verified by OEM firmware:

use   address     source
LAN   label       config 0x201a (label)
2g    label + 1   art 0x1002    (also found at config 0x2004)
5g    label + 9   art 0x5006

Increments confirmed across three AP55C, two AP55, and one AP100C.

These changes have been tested to function on both current master and
21.02.0 without any obvious issues.

[1] Button is present but does not alter state of any GPIO on SoC
[2] Buzzer and driver circuitry is present on PCB but is not connected to
    any GPIO. Shorting an unpopulated resistor next to the driver circuitry
    should connect the buzzer to GPIO 4, but this is unconfirmed.
[3] This external RJ45 serial port is disabled in the OEM firmware, but
    works in OpenWRT without additional configuration, at least on my
    three test units.
[4] On AP100/AP55 models the UART header is accessible after removing
    the device's top cover. On AP100C/AP55C models, the PCB must be removed
    for access; three screws secure it to the case.
    Pin 1 is marked on the silkscreen. Pins from 1-4 are 3.3V, GND, TX, RX

Signed-off-by: Andrew Powers-Holmes <andrew@omnom.net>
2022-04-16 16:59:29 +02:00
Ryan Mounce
c2140e32ce ath79: add support for MikroTik RouterBOARD 962UiGS-5HacT2HnT (hAP ac)
This patch adds support for the MikroTik RouterBOARD 962UiGS-5HacT2HnT (hAP ac)

Specifications:
- SoC: QCA9558
- RAM: 128 MB
- Flash: 16 MB SPI
- 2.4GHz WLAN: 3x3:3 802.11n on SoC
- 5GHz WLAN: 3x3:3 802.11ac on QCA9880 connected via PCIe
- Switch: 5x 1000/100/10 on QCA8337 connected via RGMII
- SFP cage: connected via SGMII (tested with genuine & generic GLC-T)
- USB: 1x type A, GPIO power switch
- PoE: Passive input on Ether1, GPIO switched passthrough to Ether5
- Reset button
- "SFP" LED connected to SoC
- Ethernet LEDs connected to QCA8337 switch
- Green WLAN LED connected to QCA9880

Not working:
- Red WLAN LED

Installation:
TFTP boot initramfs image and then perform sysupgrade. Follow common
MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
2022-04-16 16:59:29 +02:00
Russell Morris
fb3f519e59 ramips: mt7621: make u_env partition r/w for Linksys EA7xxx devices
Make u_env partition read/write - currently cannot write to it, which
blocks fw_setenv. This in turn breaks features like Advanced Reboot,
which rely on setting the environment variable boot_part (1 or 2).

Signed-off-by: Russell Morris <rmorris@rkmorris.us>
2022-04-16 16:59:29 +02:00
Tamas Balogh
a4bf562aa7 ramips: add support for ASUS RT-AC1200-V2
Hardware specifications:
SoC: MT7628DAN MIPS_24KEc@580MHz 2.4G-n 2x2
WiFi: MT7613BEN 5G-ac 160MHz 2x2
Switch: 4x100M built-in SoC
Flash: 16MB W25Q128JVSQ SPI-NOR
DRAM: 64MB built-in SoC

MAC addresses as verified by OEM firmware:
use address source
Lan/Wan/2G *:60 factory 0x4 (label)
5G *:64 factory 0x8000

Serial console: 57600,8n1

Installation:

Asus windows recovery tool:

install the Asus firmware restoration utility
unplug the router, hold the reset button while powering it on
release when the power LED flashes slowly
specify a static IP on your computer:
IP address: 192.168.1.75
Subnet mask 255.255.255.0
start the Asus firmware restoration utility, specify the factory image
and press upload
do NOT power off the device after OpenWrt has booted until the LED flashing
after flashing OpenWrt, there will be first no 5GHz Wifi available probably,
wait until blinking finishes and do a reboot
TFTP Recovery method:

set computer to a static ip, 192.168.1.75
connect computer to the LAN 1 port of the router
hold the reset button while powering on the router for a few seconds
send firmware image using a tftp client; i.e from linux:
$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put factory.bin
tftp> quit
do NOT power off the device after OpenWrt has booted until the LED flashing
after flashing OpenWrt, there will be first no 5GHz Wifi available probably,
wait until blinking finishes and do a reboot

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
2022-04-16 15:30:11 +02:00
Rui Salvaterra
de7535a6ac kernel: bump 5.15 to 5.15.34
Deleted (upstreamed):
generic/pending-5.15/850-0003-PCI-aardvark-Fix-support-for-MSI-interrupts.patch [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.34&id=60eabd66d17fa2cbc31f670b2f201f0bc54090a2

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-04-16 14:02:13 +02:00
John Audia
0085dd6cb5 kernel: bump 5.10 to 5.10.111
Removed upstreamed:
  pending-5.10/850-0003-PCI-aardvark-Fix-support-for-MSI-interrupts.patch
  apm821xx/patches-5.10/150-ata-sata_dwc_460ex-Fix-crash-due-to-OOB-write.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <graysky@archlinux.us>
2022-04-16 14:02:11 +02:00
Abdul Aziz Amar
78c3534645 ramips: add support for BOLT! Arion
This device is from now-defunct BOLT! ISP in Indonesia.
The original firmware is based on mediatek SDK running linux 2.6 or 3.x in later revision.

Specifications:

- SoC:      MediaTek MT7621
- Flash:    32 MiB NOR SPI
- RAM:      128 MiB DDR3
- Ethernet: 2x 10/100/1000 Mbps (switched, LAN + WAN)
- WIFI0:    MT7603E 2.4GHz 802.11b/g/n
- WIFI1:    MT7612E 5GHz 802.11ac
- Antennas: 2x internal, non-detachable
- LEDs:     Programmable LEDs: 5 blue LEDs (wlan, tel, sig1-3) and 2 red LEDs (wlan and sig1)
            Non-programmable "Power"  LED
- Buttons:  Reset and WPS

Instalation:
Install from TFTP

Set your PC IP to 10.10.10.3 and gateway to 10.10.10.123
Press "1" when turning on the router, and type the initramfs file name

You also need to solder pin header or cable to J4 or neighboring test points (T19-T21)
Pinouts from top to bottom: GND, TX, RX, VCC (3.3v)
Baudrate: 57600n8

There's also an additional gigabit transformer and RTL8211FD managed by the LTE module on the backside of the PCB.

Signed-off-by: Abdul Aziz Amar <abdulaziz.amar@gmail.com>
2022-04-16 14:02:11 +02:00
Davide Fioravanti
bb505d82ad ramips: add support for Wavlink WL-WN531A3
The Wavlink WL-WN531A3 is an AC1200 router with 5 fast ethernet ports
and one USB 2.0 port.
It's also known as Wavlink QUANTUM D4.

Hardware
--------
SoC:   Mediatek MT7628AN
RAM:   64MB
FLASH: 8MB NOR (GigaDevice GD25Q64CSIG3)
ETH:
  - 5x 10/100 Mbps Ethernet (4x LAN + 1x WAN)
WIFI:
  - 2.4GHz: 1x (integrated in SOC) (2x2:2)
  - 5GHz:   1x MT7612E (2x2:2)
  - 4 external antennas
BTN:
  - 1x Reset button
  - 1x WPS button
  - 1x Turbo button
  - 1x Touchlink button
  - 1x ON/OFF switch
LEDS:
  - 1x Red led (system status)
  - 1x Blue led (system status)
  - 7x Blue leds (wifi led + 5 ethernet ports + power)
USB:
  - 1x USB 2.0 port
UART:
  - 57600-8-N-1
    J1
      O VCC +3,3V (near lan ports)
      o RX
      o TX
      o GND

Everything works correctly.

Currently there is no firmware update available. Because of this, in
order to restore the OEM firmware, you must firstly dump the OEM
firmware from your router before you flash the OpenWrt image.

Backup the OEM Firmware
-----------------------
The following steps are to be intended for users having little to none
experience in linux. Obviously there are many ways to backup the OEM
firmware, but probably this is the easiest way for this router.
Procedure tested on M31A3.V4300.200420 firmware version.

1) Go to http://192.168.10.1/webcmd.shtml

2) Type the following line in the "Command" input box and then press enter:
	mkdir /etc_ro/lighttpd/www/dev; cp /dev/mtd0ro /etc_ro/lighttpd/www/dev/mtd0ro; ls -la /etc_ro/lighttpd/www/dev/mtd0ro

3) After few seconds in the textarea should appear this output:
	-rw-r--r--    1 0        0         8388608 /etc_ro/lighttpd/www/dev/mtd0ro

   If your output doesn't match mine, stop reading and ask for
   help in the forum.

4) Open in another tab http://192.168.10.1/dev/mtd0ro to download the
   content of the whole NOR. If the file size is 0 byte, stop reading
   and ask for help in the forum.

5) Come back to the http://192.168.10.1/webcmd.shtml webpage and type:
	rm /etc_ro/lighttpd/www/dev/mtd0ro; for i in 1 2 3 4 ; do cp /dev/mtd${i}ro /etc_ro/lighttpd/www/dev/mtd${i}ro; done; ls -la /etc_ro/lighttpd/www/dev/

6) After few seconds, in the textarea should appear this output:
	-rw-r--r--    1 0        0          196608 mtd1ro
	-rw-r--r--    1 0        0           65536 mtd2ro
	-rw-r--r--    1 0        0           65536 mtd3ro
	-rw-r--r--    1 0        0         8060928 mtd4ro
	drwxr-xr-x    7 0        0               0 ..
	drwxr-xr-x    2 0        0               0 .

   If your output doesn't match mine, stop reading and ask for
   help in the forum.

7) Open the following links to download the partitions of the OEM FW:
	http://192.168.10.1/dev/mtd1ro
	http://192.168.10.1/dev/mtd2ro
	http://192.168.10.1/dev/mtd3ro
	http://192.168.10.1/dev/mtd4ro

   If one (or more) of these files are 0 byte, stop reading and ask
   for help in the forum.

8) Store these downloaded files in a safe place.

9) Reboot your router to remove any temporary file in ram.

Installation
------------
Flash the initramfs image in the OEM firmware interface
(http://192.168.10.1/update.shtml).
When Openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.

Restore OEM Firmware
--------------------
Flash the "mtd4ro" file you previously backed-up directly from LUCI.
Warning: Remember to not keep settings!
Warning2: Remember to force the flash.

Notes
-----
1) Router mac addresses:
   LAN		XX:XX:XX:XX:XX:9B (factory @ 0x28)
   WAN		XX:XX:XX:XX:XX:9C (factory @ 0x2e)
   WIFI 2G	XX:XX:XX:XX:XX:9D (factory @ 0x04)
   WIFI 5G	XX:XX:XX:XX:XX:9E (factory @ 0x8004)

   LABEL	XX:XX:XX:XX:XX:9D

2) There is just one wifi led for both wifi interfaces.
   It currently shows only the 2.4 GHz wifi activity.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2022-04-16 14:02:11 +02:00
Martin Blumenstingl
56cd49bdc8 lantiq: fritz736x: Move GPIO resets to the inidvidual board.dts files
FRITZ!Box 7360 V2 and FRITZ!Box 7360 SL both use GPIOs 37 (for &phy0)
and GPIO 44 (for &phy1) to control the PHY's reset lines. FRITZ!Box 7362
SL however uses GPIO 45 (for &phy0) and GPIO 44 (for &phy1). Move the
GPIO reset definitions to each individual board .dts and while at it,
fix the GPIOs for the FRITZ!Box 7362 SL.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-04-16 14:02:11 +02:00
Lech Perczak
c99013e242 kernel: backport ZTE RNDIS bogus MAC address fix
This is required to support built-in modem of ZTE MF286R, in addition to
other external modems, such as MF831, MF910, MF920, which refuse to
reconfigure their remote MAC address, even if "locally administered" bit
is set, leading to dropped traffic towards the host. Add a workaround
for that issue already present in cdc_ether to rndis_host driver as
well.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-04-16 14:02:11 +02:00
Ansuel Smith
3f0d87fd69 ipq806x: fix wrong CPU OPP for ipq8062
Fix wrong CPU OPP for ipq8062. Revision of the SoC added an
extra 25mV for every pvs. Also fix the voltage min/max value
that were wrong.

Reviewed-by: Robert Marko robimarko@gmail.com
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-04-16 11:22:54 +02:00
Rodrigo Balerdi
284f2c2ae0 ipq806x: fix USB bug in 5.10 dtsi additions
The existing device tree has incorrect definitions for usb3_0 and usb3_1
and the blocks they depend upon: their addresses and interrupts are
swapped. However, their clocks and resets are not. The result is that
the USB blocks are non-functional if only one of them is enabled.

This fix backports the definitions from mainline Linux 5.15 to
OpenWrt's 5.10 dtsi additions. See the relevant mainline code here:
https://github.com/torvalds/linux/blob/v5.17/arch/arm/boot/dts/qcom-ipq8064.dtsi#L1062-L1148

This fix does not break existing ports. But some ports may have enabled
both USB blocks even thought their board only implements one, because
enabling a single USB block would not have worked before this fix.
This means that revisiting all ports of ipq806x devices that implement
a single USB port is advised. This work must be done by maintainers that
can determine which USB block corresponds to the implemented port on
their hardware.

Note that this fix swaps the names of the hardware ports. This is
unfortunate, but will happen anyway when switching to kernel 5.15. Thus,
it is best to do this ASAP, before users get to depend on port names.

It is strongly recommended that this fix is backported to 22.03 before
its release. This will minimize the number of users affected by the port
name swap.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
2022-04-16 11:22:54 +02:00
Rodrigo Balerdi
3a4d972d43 ipq806x: remove non-working fixes for USB bug in 5.10 dtsi additions
These workarrounds are incomplete and non-functional, and thus not needed.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
2022-04-16 11:22:54 +02:00
Yousong Zhou
5c147d36ba ath79: port HiWiFi HC6361 from ar71xx
The device was added for ar71xx target and dropped during the ath79
transition, mainly because of the ascii mac address stored in bdinfo
partition

Device page, http://wiki.openwrt.org/toh/hiwifi/hc6361

The vendor u-boot image accepts sysupgrade.bin image with specific
requirements, including having squashfs signature "hsqs" at file offset
0x140000.  This is not possible now that OpenWrt kernel image is at
least 2MB with the signature at offset 0x240000.

Installation of current build of OpenWrt now requires a bootstrap step
of installing an earlier version first.

 - If the vendor u-boot accepts sysupgrade image, hc6361 image of LEDE
   release should work
 - If the vendor u-boot accepts only verified flashsmt image, install
   the one in the above device page.  The image is based on Barrier
   Breaker

   SHA256SUM of the flashsmt image

	81b193b95ea5f8e5c30cd62fa9facf275f39233be4fdeed7038f3deed2736156

After the bootstrap step, current build of OpenWrt can be installed
there fine.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2022-04-16 01:27:09 +00:00
Yousong Zhou
ecd81de7a5 ath79: add nvmem cell mac-address-ascii support
This is needed for devices with mac address stored in ascii format, e.g.
HiWiFi HC6361 to be ported in the following patch.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2022-04-16 00:23:08 +00:00
Thibaut VARÈNE
8084ec8061 ath79: cleanup mikrotik routerboot partitions
For some reason useless labels and aliases have been propagated through
copy-paste. Before the issue spreads any further, this patch cleans up
all relevant DTS files to the canonical form, bringing ath79 in line
with other mikrotik platforms (ramips and ipq40xx).

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-04-15 07:11:18 +02:00
Thibaut VARÈNE
a05dcb0724 ath79: add support for Yuncore A930
Specification:

- QCA9533 (650 MHz), 64 or 128MB RAM, 16MB SPI NOR
- 2x 10/100 Mbps Ethernet, with 802.3at PoE support (WAN)
- 2T2R 802.11b/g/n 2.4GHz

Flash instructions:

If your device comes with generic QSDK based firmware, you can login
over telnet (login: root, empty password, default IP: 192.168.188.253),
issue first (important!) 'fw_setenv' command and then perform regular
upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download
image to the device, SSH server is not available):

  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
  sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin

In case your device runs firmware with YunCore custom GUI, you can use
U-Boot recovery mode:

1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with
   'tftp' image renamed to 'upgrade.bin'
2. Power the device with reset button pressed and release it after 5-7
   seconds, recovery mode should start downloading image from server
   (unfortunately, there is no visible indication that recovery got
   enabled - in case of problems check TFTP server logs)

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-04-15 07:11:18 +02:00
Thibaut VARÈNE
c91df224f5 ath79: add support for Yuncore XD3200
Specification:

- QCA9563 (775MHz), 128MB RAM, 16MB SPI NOR
- 2T2R 802.11b/g/n 2.4GHz
- 2T2R 802.11n/ac 5GHz
- 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port)

LED for 5 GHz WLAN is currently not supported as it is connected directly
to the QCA9882 radio chip.

Flash instructions:

If your device comes with generic QSDK based firmware, you can login
over telnet (login: root, empty password, default IP: 192.168.188.253),
issue first (important!) 'fw_setenv' command and then perform regular
upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download
image to the device, SSH server is not available):

  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
  sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin

In case your device runs firmware with YunCore custom GUI, you can use
U-Boot recovery mode:

1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with
   'tftp' image renamed to 'upgrade.bin'
2. Power the device with reset button pressed and release it after 5-7
   seconds, recovery mode should start downloading image from server
   (unfortunately, there is no visible indication that recovery got
   enabled - in case of problems check TFTP server logs)

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-04-15 07:11:18 +02:00