Commit Graph

29325 Commits

Author SHA1 Message Date
Lech Perczak
c5a399f372 ramips: dts: rt3050: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Maxim Anisimov
8d75b1de0f ramips: dts: rt3352: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Maxim Anisimov
7eb0458c1f ramips: mtk_eth_soc: wait longer after FE core reset to settle
Enabling the FE core too early causes the system to hang during boot
uncondtionally, after the reset is released. Increate it to 1-1.2ms
range.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split previous commit, provide rationale]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Lech Perczak
3f1be8edee ramips: mtk_eth_soc: allow multiple resets
Use devm_reset_control_array_get_exclusive to register multiple
reset lines in FE driver. This is required to reattach ESW reset to FE
driver again, based on device tree bindings.

While at that, remove unused fe_priv.rst_ppe field, and add error
message if getting the reset fails.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")

Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Roland Reinl
fdb87a91b4 mediatek: Add support for D-Link EAGLE PRO AI R32
R32 is like the M32 part of the EAGLE PRO AI series from D-Link.

Specification:
 - MT7622BV SoC with 2.4GHz wifi
 - MT7975AN + MT7915AN for 5GHz
 - MT7531BE Switch
 - 512MB RAM
 - 128 MB flash
 - 2 LEDs (Status and Internet, both can be either orange or white)
 - 2 buttons (WPS and Reset)

Compared to M32, the R32 has the following differences:
 - 4 LAN ports instead of 2
 - The recory image starts with DLK6E6015001 instaed of DLK6E6010001
 - Individual LEDs for power and internet
 - MAC address is stored at another offset in the ODM partition

MAC addresses:
 - WAN MAC is stored in partition "Odm" at offset 0x81
 - LAN (as printed on the device) is WAN MAC + 1
 - WLAN MAC (2.4 GHz) is WAN MAC + 2
 - WLAN MAC (5GHz) is WAN MAC + 3

Flashing via Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-recovery.bin

Flashing via uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-initramfs-kernel.bin.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
 - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
 - Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later
 - Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-squashfs-sysupgrade.bin
 - Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
 - Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
 - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
 - Run ./m32-firmware-util R32 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
 - Example for firmware R32A1_FW103B01: ./m32-firmware-util R32 --DecryptFactoryImage R32A1_FW103B01.bin R32A1_FW103B01.decrypted.bin

Revert back to stock using uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides the previously created backup of the Kernel1 partition.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to FLASH will start. After a few seconds the stock firmware should start again

There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP.
It can be used if no backup of the Kernel1 partition is reuqired.

Flahsing via OEM web interface is currently not possible, the OEM images are encrypted. Creating images is only possible manually at the moment.
The support for the M32/R32 already includes support for flashing from the OEM web interface:
 - The device tree contains both partitions (Kernel1 and Kernel2) with conditions to select the correct one based on the kernel command line
 - The U-Boot variable "boot_part" is set accordingly during startup to finish the partition swap after flashing from the OEM web interface
 - OpenWrt sysupgrade flashing always uses the partition where it was initially flashed to (no partition swap)

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-01-02 21:22:46 +01:00
Patryk Kowalczyk
b22539b5fe mediatek: filogic: Asus TUF AX6000 fix inverted LED for 2.5Gb LAN port
Router Asus TUF AX6000 have second MaxLinear GPY211 PHY controller for 2.5Gb LAN port.
The 5'th LAN port have inverted status of the LED.
Based on the commit from main branch 90fbec8 we could set proper status of the LED.

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
2024-01-02 19:14:54 +01:00
John Audia
131403d8aa kernel: bump 6.1 to 6.1.70
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.70

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-02 18:28:58 +01:00
Rosen Penev
4693514ca8 oxnas: do not use pcie-controller
This was deprecated in kernel 4.14

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-01 02:34:48 +01:00
Pascal Ernster
4e8c9cebe5 realtek: Use hex for "soc" identifier in debugfs
The upper 16 bits of the 32 bit value encode the SoC model in BCD
notation (for example 0x83806800 on a Netgear GS108Tv3 with an
RTL8380M), so it makes more sense to output the value in hex notation
than in decimal notation.

Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2023-12-31 14:13:43 +01:00
Xavier Franquet
782eb05008 mediatek: filogic: add support ASUS RT-AX59U
(based on support for ASUS RT-AX59U by liushiyou006)

SOC: MediaTek MT7986
RAM: 512MB DDR4
FLASH: 128MB SPI-NAND (Winbond W25N01GV)
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH: MediaTek MT7531 Switch
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Upgrade from AsusWRT to OpenWRT using UART

    Download the OpenWrt initramfs image.
    Copy the image to a TFTP server reachable at 192.168.1.70/24. Rename the image to rtax59u.bin.

    Connect the PC with TFTP server to the RT-AX59U.
    Set a static ip on the ethernet interface of your PC.
    (ip address: 192.168.1.70, subnet mask:255.255.255.0)
    Conect to the serial console, interrupt the autoboot process by pressing '4' when prompted.

    Download & Boot the OpenWrt initramfs image.

    $ setenv ipaddr 192.168.1.1
    $ setenv serverip 192.168.1.70
    $ tftpboot 0x46000000 rtax59u.bin
    $ bootm 0x46000000

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

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

Upgrade from AsusWRT to OpenWRT using WebUI

    Download transit TRX file from https://drive.google.com/drive/folders/1A20QdjK7Udagu31FSszpWAk8-cGlCwsq

    Upgrade firmware from WebUI (192.168.50.1) using downloaded TRX file

    Wait for OpenWRT to boot (192.168.1.1).

    Upgrade system with sysupgrade image using luci or uploading it through scp and executing sysupgrade command

MAC Address for WLAN 5g is not following the same algorithm as in AsusWRT.
We have increased by one the WLAN 5g to avoid collisions with other networks from WLAN 2g
when bit 28 is already set.

              : Stock             : OpenWrt
  WLAN 2g (1) : C8:xx:xx:0D:xx:D4 : C8:xx:xx:0D:xx:D4
  WLAN 2g (2) :                   : CA:xx:xx:0D:xx:D4
  WLAN 2g (3) :                   : CE:xx:xx:0D:xx:D4
  WLAN 5g (1) : CA:xx:xx:1D:xx:D4 : CA:xx:xx:1D:xx:D5
  WLAN 5g (2) :                   : CE:xx:xx:1D:xx:D5
  WLAN 5g (3) :                   : C2:xx:xx:1D:xx:D5

  WLAN 2g (1) : 08:xx:xx:76:xx:BE : 08:xx:xx:76:xx:BE
  WLAN 2g (2) :                   : 0A:xx:xx:76:xx:BE
  WLAN 2g (3) :                   : 0E:xx:xx:76:xx:BE
  WLAN 5g (1) : 0A:xx:xx:76:xx:BE : 0A:xx:xx:76:xx:BF
  WLAN 5g (2) :                   : 0E:xx:xx:76:xx:BF
  WLAN 5g (3) :                   : 02:xx:xx:76:xx:BF

Signed-off-by: Xavier Franquet <xavier@franquet.es>
2023-12-31 00:03:24 +01:00
Rosen Penev
1fa705dbec realtek: fix addresses in DT node names
Mostly wrong address format, one missing address, and one spurious
address suffix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2023-12-30 11:53:47 +01:00
Rafał Miłecki
061a70d33c mediatek: filogic: reorder nodes in mt7988a.dtsi
Use order described as preferred in DTS Coding Style:
1. Sort bus nodes by unit address
2. Use alpha-numerical order for the rest

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-29 12:41:48 +01:00
David Bauer
fab15fa57e mpc85xx: fix reserved-memory node name
Make the node name match the actual memory address.

Fixes: 57d7382cb1 ("mpc85xx: increase available RAM on Extreme Networks WS-AP3825i")

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-28 23:37:51 +01:00
David Bauer
47818fbc01 ramips: fix label-mac for Xiaomi RA75
The label-mac of the repeater is the address used on the 2.4 GHz radio,
not the ethernet MAC.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-28 14:14:34 +01:00
Mikhail Zhilkin
485adc9d3c mediatek: add support for Routerich AX3000
This PR is continuation of work under "mediatek: add support for Routerich
AX3000" #13703 by the agreement with PR #13703 original author (Maximilian
Weinmann <x1@disroot.org>). All reviews from the previous PR were taken
into into account.

Routerich AX3000 is a wireless WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM       : DDR3 256 MiB (ESMT M15T2G16128A)
- Flash     : SPI-NAND 128 MiB (ESMT F50L1G41LB)
- WLAN      : MediaTek MT7976CN dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
- USB       : 1x 2.0
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n8)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
              1x WiFi 2.4 GHz (Blue)
              1x WiFi 5 GHz (Red)
              1x Mesh (Blue)
              3x LAN activity (Blue)
              1x WAN activity (Blue)
              2x WAN no-internet (Red)
- Power     : 12 VDC, 1.5 A

Installation
------------
Flash OpenWrt 'sysupgrade.bin' image using stock firmware web-interface
(without keeping settings).

Return to stock
---------------
Install stock firmware image (without keeping settings) using OpenWrt
sysupgrade method.

Recovery
--------
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 24:0f:5e:xx:xx:b4 | label     |
| LAN     | 24:0f:5e:xx:xx:b5 | label+1   |
| WLAN 2g | 24:0f:5e:xx:xx:b6 | label+2   |
| WLAN 5g | 24:0f:5e:xx:xx:b7 | label+3   |
+---------+-------------------+-----------+
The WLAN 2g MAC was found in 'Factory', 0x4

Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-12-26 17:17:23 +01:00
Ian Oderon
4300bc6688 mediatek: add support for Zbtlink ZBT-Z8103AX
Specifications:
SoC: MediaTek MT7981B
RAM: 256MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 3 LAN (Gigabit)
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND

No. of Antennas: 6
Note: Upon opening the router, only 5 antennas were connected
to the mainboard.

Led Layout:
Power-Mesh-5gwifi-WAN-LAN3-LAN2-LAN1-2gWiFi

Buttons:
Reset-Mesh

Installation:
A. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by the seller),
you can easily upgrade by going to the dashboard (192.168.1.1) and then
navigate to System -> Backup/Flash firmware, then flash the firmware

B. Through TFTP
Standard installation via UART:

1. Connect USB Serial Adapter to the UART, (NOTE: Don't connect the VCC pin).
2. Power on the router. Make sure that you can access your router via UART.
3. Restart the router then repeatedly press ctrl + c to skip default boot.
4. Type > bootmenu
5. Press '2' to select upgrade firmware
6. Press 'Y' on 'Run image after upgrading?'
7. Press '0' and hit 'enter' to select TFTP client (default)
8. Fill the U-Boot's IP address and TFTP server's IP address.
9. Finally, enter the 'firmware' filename.

Signed-off-by: Ian Oderon <ianoderon@gmail.com>
2023-12-26 00:02:19 +01:00
Samir Ibradžić
d737ae99cb qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS
* Revert the switch_lan_bmp and switch_wan_bmp to match the values from
  the original device support DTS
* Add specific malibu_first_phy_addr, as it differs from default for
  this device

Fixes: #14234
Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Samir Ibradžić <sibradzic@gmail.com> # Buffalo WXR-6000AX12P
Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
2023-12-25 19:14:26 +01:00
David Bentham
39e55bdbe2 ramips: correct the PCIe port number for Unielec u7621-01
MT7621 gets a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe
port will cause the PCIe NIC to not work properly. This commit fixes
the wrong port numbers on Unielec u7621-01.

According to the bootlog, MT7612E (5 GHz) is connected to pcie2, and
MT7603E (2 GHz) is connected to pcie1:

[    1.294844] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[    1.308635] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.318277] mt7621-pci 1e140000.pcie: PCIE2 enabled

Also correct the led activity for the MT7603e - not used on the MT7612e

Signed-off-by: David Bentham <db260179@gmail.com>
2023-12-25 19:00:36 +01:00
Shiji Yang
b17cc131c6 ramips: remove systick node for mt7621 SoC dtsi
This node is useless because MT7621 uses the generic mips systick
driver instead of the ralink systick driver.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-12-25 18:57:19 +01:00
Shiji Yang
0e4f49a90d ramips: remove useless resets properties from SoC dtsi
These drivers don't request reset control. And most reset properties
even have incorrect reset source definitions.

1. interrupt controller, ref: arch/mips/ralink/irq.c
2. memory controller, ref: arch/mips/ralink/of.c
3. gpio controller, ref: drivers/gpio/gpio-ralink.c (local patch)
4. systic, ref: arch/mips/ralink/cevt-rt3352.c
5. pwm, ref: drivers/pwm/pwm-mediatek-ramips.c (local patch)

Tested on MT7620 && MT7628.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-12-25 18:57:19 +01:00
Robert Senderek
b42eea0c2f mediatek: enable mt7981-wo-firmware package by default
Add support for wireless offload package in default configuration for
-Cudy WR3000
-Confiabits MT7981
For some reason those ware missing. I confirm this work for my Cudy WR3000

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
2023-12-25 18:49:27 +01:00
Lech Perczak
f024f4b1b0 ath79: generic: disable SPI-NOR write protect unconditionally
Kernel 5.15 introduced a significant change to spi-nor subsystem [1],
which would the SPI-NOR core to no longer unprotect the Flash chips if
their protection bits are non-volatile, which is the case for MX25L6405D
and MX25L12805D, used in Ubiquiti XW and WA lines of devices [2].

However, their bootloader forcibly enables this protection before
continuing to boot, making the kernel not unprotect the flash upon boot,
causing JFFS2 to be unable write to the filesystem. Because sysupgrade
seems to unlock the flash explicitly, the upgrade will work, but the
system will be unable to save configrationm showing the following symptom
in the kernel log:

[   86.168016] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   86.192344] jffs2_build_filesystem(): unlocking the mtd device...
[   86.192443] done.
[   86.200669] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   86.220646] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001e0000
[   86.292388] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001d0000
[   86.324867] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001c0000
[   86.355316] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001b0000
[   86.402855] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001a0000

Disable the write protection unconditionally for ath79/generic subtarget,
so the XW and WA devices can function again. However, this is only a
stopgap solution - it probably should be investigated if there is a way
to selectively unlock the area used by rootfs_data - but given the lock
granularity, this seems unlikely.

With this patch in place, rootfs_data partition on my Nanostation Loco
M5 XW is writable again.

Fixes: #12882
Fixes: #13750
Fixes: 579703f38c ("ath79: switch to 5.15 as default kernel")
Link: http://www.infradead.org/pipermail/linux-mtd/2020-October/082805.html
Link: https://forum.openwrt.org/t/powerbeam-m5-xw-configuration-loss-after-reboot/141925
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-24 12:42:12 +01:00
Tobias Schramm
8b706d9297 realtek: 5.15: rtl93xx: support 100BASE-T and 10BASE-T MAC modes
The MAC embedded in rtl93xx switch SoCs needs different mac mode bits set
to support 10BaseT and 100BaseT link modes. Set them accordingly.

This change has been tested on a ZyXEL XGS1250-12.

Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
2023-12-24 01:36:39 +01:00
Til Kaiser
713dc12960
Revert "x86: add support for Mellanox Spectrum SN2000 Switches"
This reverts commit 3004c20614.

The commit added the needed packages for the new target
to the generic x86_64 image. This results into unwanted
modules and firmware files for other x86 devices.

Additionally, there is the following error message
while booting the image on other x86 devices:
[    8.531720] kmodloader: 1 module could not be probed
[    8.532613] kmodloader: - leds-mlxcpld - 0

For now, the needed packages will have to be selected
manually while configuring the image.

Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
2023-12-23 07:52:05 +00:00
John Audia
4a2ff73177 kernel: bump 6.1 to 6.1.69
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69

Removed upstreamed:
	generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=893597cbabfbc00ee51fd5f73e2028994f49ded6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=1d82735f4bae954d5ba004994b96baec791f874f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=4c2ad8e39c62c5288ca31ebf5c30e34f3bd9d044
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=325556d46bfd13a2fa0d304d0625be86821fd683
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=cac1218b32d7b56832dd36f7baf82f123f305a2a

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-21 11:26:35 +01:00
John Audia
3866cf6e47 kernel: bump 5.15 to 5.15.144
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.144

Removed upstreamed:
	generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=ca75274b17b890e6f6d2951e364360e25f2846e9
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=07ba21627ebbb2c68c357e8d698166c45078d014
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=aa3cc80e8edaa6098b58eb4a613d765496c2dfca
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=4c117984824b4a852a0e0765e5bdea0f1c7d6309
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=404ce6ee69d384096663e3f6987d915090447835

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-20 15:43:16 -05:00
Tianling Shen
b16928aa96 sunxi: mark upstreamed patches as such
Also sort them to start from 001.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
Tianling Shen
193071fb01 sunxi: remove outdated kernel 5.15 files
We're on 6.1 now, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
John Audia
bcb37c84d2 kernel: bump 5.15 to 5.15.143
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.143

Removed upstreamed:
	generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
        mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.143&id=00beca907a7be61da935bb687f9601420fc5f8a8

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:18:55 +01:00
John Audia
1e6c6a36f5 kernel: bump 6.1 to 6.1.68
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.68

Removed upstreamed:
	generic/backport-6.1/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
	mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.68&id=3759e735562a31e44fee825498f05c06e64b25a8

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:12:25 +01:00
Daniel Golle
6d546b3b4c mvebu: fix RTC of IEI-World Puzzle M90x devices
The Puzzle devices come with an I2C-connected Epson RX8130 RTC.
Disable the (dysfunctional) RTC units of the SoC and add driver
kmod-rtc-ds1307 to support the Epson RX8130 instead.

Tested-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-18 22:17:09 +00:00
Rafał Miłecki
493f7f5eee kernel: backport NVMEM changes queued for v6.8
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-18 08:33:04 +01:00
Rafał Miłecki
facaa13a3f kernel: backport upstream brcm_nvram fix for NAND controller
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-18 08:33:04 +01:00
Christian Marangi
85f59c8e27
generic: 6.1: fix list_count_nodes backport patch
Commit 25746a3fa2da ("drm/i915: fix up merge with usb-next branch") was
internally applied to the 5.15 patch but wasn0t applied to the backport
for kernel 6.1. Apply the same treatement also there to fix compilation
warning.

Fixes: a14240d384 ("kernel: backport list_count_nodes()")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-15 16:13:02 +01:00
Furong Xu
314af7018a rockchip: make SMP affinity of RTL8152 on XHCI more robust
XHCI bus numbers are assigned dynamically, it may varies among boards,
match the device irq name with regexp, drop the hardcoded name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-15 18:02:43 +01:00
Pawel Dembicki
5b14a352d9 kirkwood: backport fix Ctera C200 V1 ubi part name to 6.1
From the original Patch:
|In 749237967a downstream dts was replaced with upstream accepted
|patch. But in upstream version last partition was called "rootfs"
|instead "ubi". OpenWrt require "ubi" label for ubi rootfs.
|This patch restore proper label.
|
|Fixes: 749237967a ("kirkwood: Replace dtses with upstream accepted")
|
|Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(patch  updated to include 6.1, dropped label properties)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-15 17:59:35 +01:00
Rafał Miłecki
a14240d384 kernel: backport list_count_nodes()
It's needed by various stuff we backport. That includes NVMEM changes
queued for v6.8.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-15 11:44:38 +01:00
Chukun Pan
c22aa0be3e ipq807x: add support for ZTE MF269
Hardware specifications:
  SoC: Qualcomm IPQ8071A
  RAM: 512MB of DDR3
  Flash1: Eon EN25S64 8MB
  Flash2: MX30UF2G18AC 256MB
  Ethernet: 2x 2.5G RJ45 port
  Phone: 1x RJ11 port (SPI)
  USB: 1x Type-C 2.0 port
  WiFi1: QCN5024 2.4GHz
  WiFi2: QCN5054 5GHz
  Button: Reset, WPS

Flash instructions:
  1. Connect the router via serial port (115200 8N1 1.8V)
  2. Download the initramfs image, rename it to initramfs.bin,
     and host it with the tftp server.
  3. Interrupt U-Boot and run these commands:
     tftpboot initramfs.bin
     bootm
  4. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-14 10:30:19 +08:00
Raylynn Knight
daba89bca3 realtek: Clean up and standardize realtek-poe support
This patch cleans up and standardizes realtek-poe support for realtek
based switches that have supported PoE ports.

The power output of switches supported by realtek-poe package can be
configured in the 02_network ucidef_set_poe() function.  This was missed
when some PoE capable switches supported by realtek-poe were added.

The realtek-poe package at one point replaced a lua-rs232 based script
and some devices were not updated to use the realtek-poe package.
Consistently add realtek-poe package to DEVICE_PACKAGES for switches
with supported PoE.

Signed-off-by: Raylynn Knight <rayknight@me.com>
2023-12-13 20:10:23 +01:00
Dirk Buchwalder
9b598ec8d5
ipq807x: fix edgecore EAP102 lan/wan
We have a report in the forum, that lan/wan is non-functional
on the EAP102 (https://forum.openwrt.org/t/edgecore-eap102/178449)

Fixing that by swapping label and phy-handle of the dp-nodes and
updating the lan/wan bmp.

Note: the original commiter of the device support seems absent for a
long time in the forum and on the OpenWrt github group.

Tested-by: Antonio Della Selva <antonio.dellaselva@uniurb.it>
Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:32:36 +01:00
Chukun Pan
fbcda3616e
ipq807x: add Arcadyan AW1000 support
Hardware specification:
  SoC: Qualcomm IPQ8072A
  Flash: Toshiba NAND 1GiB
  RAM: 1 GiB of DDR3 466 MHz
  Ethernet: 4x 1Gbps + 1x 2.5Gbps
  WiFi1: QCN5024 2.4GHz ax 4x4
  WiFi2: QCN5054 5GHz ax 4x4
  Button: WiFi, WPS, Reset
  Modem: RG500Q-EA
  USB: 1 x USB 3.0
  Power: DC 12V 4A

Flash instructions:
  1. Download the initramfs image, rename it to
     initramfs.bin, and host it with tftp server.
  2. Interrupt U-Boot and run these commands:
     tftpboot initramfs.bin
     bootm
  3. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Chukun Pan
ab6a029573
qualcommax: cleanup whitespace and sort-order
Replace blanks with tabs, also sort base-files alphabetically.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Chukun Pan
9920eebedc
kernel: add support for Toshiba TH58NYG3S0HBAI4
Correct oob size from 128 to 256 for Toshiba TH58NYG3S0HBAI4 flash.
Since it is not ONFI compliant NAND, the model name cannot be read
from anywhere, add a static NAND ID entry to correct this.

However, the NAND ID of this flash is inconsistent with the datasheet.
The actual NAND ID is only 4 ID bytes, the last ID byte is missing.[1]

Maybe this flash is counterfeit, or maybe it's another problem.
Another Toshiba flash had the same problem before. Refer to commit
a83dc6b ("kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx"), put
the patch into qualcommax target to avoid affecting other devices.

The patch is verified on Arcadyan AW1000.

[1] Datasheet available at (the ID table is on page 50):
https://europe.kioxia.com/content/dam/kioxia/newidr/productinfo/datasheet/201910/DST_TH58NYG3S0HBAI4-TDE_EN_31565.pdf

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Christian Marangi
8fc954aeb7
package: kernel: detach of-mdio dependency from stmmac-core
Detach of-mdio dependency from stmmac-core kmod to fix support for
x86_64 target. This target doesn't use OpenFirmware infrastructure and
stmmac-core for the dwmac-intel driver doesn't depends on it.

Add kmod-of-mdio to any other user of stmmac-core as it's not inherit
from stmmac-core anymore.

Fixes: #14209
Fixes: 4b4c940fbc ("x86: Add kmod-dwmac-intel")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-13 17:07:24 +01:00
Christian Marangi
b09e060e2c
package: kernel: move pcs-xpcs from armsr to generic
Move pcs-xpcs kmod from armsr modules.mk to generic modules package.

Also add additional dependency to x86_64 as stmmac-core it's now used
by x86_64 target and depends on this package.

Fixes: 4b4c940fbc ("x86: Add kmod-dwmac-intel")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-13 17:07:24 +01:00
Furong Xu
1438bc583c rockchip: fix eth1 irq affinity
NanoPi R2S and some other RK3328 boards use RTL8152 as eth1,
which is connected to xhci-hcd:usb1 but not xhci-hcd:usb3

|:~# cat /proc/interrupts
|           CPU0       CPU1       CPU2       CPU3
| 11:      53449     171813     129595      87823     GICv2  30 Level     arch_timer
| 18:          0          0          0          0     GICv2  94 Level     rockchip_usb2phy
| 19:          0          0          0          0     GICv2  32 Level     ff1f0000.dma-controller
| 20:          0          0          0          0     GICv2  33 Level     ff1f0000.dma-controller
| 21:          4          0          0          0     GICv2  89 Level     ttyS2
| 22:          0          0          0          0     GICv2  43 Level     ff350800.iommu
| 23:          0          0          0          0     GICv2 106 Level     ff360480.iommu
| 24:          0    1417932          0          0     GICv2  56 Level     eth0
| 25:        334          0          0    4422194     GICv2  99 Level     xhci-hcd:usb1
| 26:          0          0          0          0     GICv2  48 Level     ehci_hcd:usb3
| 27:          0          0          0          0     GICv2  49 Level     ohci_hcd:usb2
| 28:       3285          0          0          0     GICv2  69 Level     ff160000.i2c
| 29:          0          0          0          0  rockchip_gpio_irq  24 Level     rk805
| 30:          0          0          0          0     rk805   0 Edge      rk805_pwrkey_fall
| 35:          0          0          0          0     rk805   5 Edge      RTC alarm
| 37:          0          0          0          0     rk805   7 Edge      rk805_pwrkey_rise
| 38:          0          0          0          0     GICv2  90 Level     rockchip_thermal
| 39:          0          0          0          0     GICv2  72 Edge      ff1a0000.watchdog
| 40:       2601          0          0          0     GICv2  44 Level     dw-mci
| 41:          0          0          0          0  rockchip_gpio_irq   0 Edge      keys
|IPI0:      1559       1208        893       1131       Rescheduling interrupts
|[...]

Fix 40-net-smp-affinity to match the correct device irq name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-12 19:50:43 +01:00
Eric J. Anderson
807acbce66 ath79: make boot-leds service executable
This service was unfunctional due to not having its executable bit
set.

Fixes #13500.

Signed-off-by: Eric J. Anderson <eric.j.ason256@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
f6d739e0e0 imx: enable CONFIG_CPU_FREQ_THERMAL
Without that, imx_thermal fails to initialize on deferred probe, because
it fails to register cpufreq cooling device.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
51a50c73dd imx: imx7d-pico-pi: add CPU supply nodes to device tree
Attach sw1a as "cpu-supply" to both CPUs in order to cpufreq driver to
prove successfully.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
1b2d625cfb imx: enable CONFIG_REGULATOR_PFUZE100 globally
PFUZE100 series of PMICs are used on boards supported by both
subtargets. Enable this for whole i.MX target.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Florian Eckert
aab21ee055 tools: add ledumon and ledhwbmon packages
ledumon:
This program creates a new userspace LED class device and monitors it.
For this it es using the kmod-leds-uled.ko kernel module.

ledhwbmon:
This program monitors LED brightness level changes having its origin
in hardware/firmware, i.e. outside of kernel control.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
8613353b5e kirkwood: add 6.1 kernel as testing
It allow to test 6.1 kernel in Kirkwood.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
9c673d34a0 kirkwood: 6.1: refresh kernel config
Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
c8550de016 kirkwood: kernel: refresh 6.1 patches
Kernel patches copied from 5.15 need to be refreshed.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
bcbb21bb6b kirkwood: copy config 5.15 to 6.1
Config was just copied.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
36aff2a86e kirkwood: copy patches 5.15 to 6.1
Simple copy 5.15 patches.

Upstreamed patch dropped:
001-5.18-Add-Ctera-C-200-V1-board.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(kirkwoor -> kirkwood in subject)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-12 19:34:25 +01:00
Pawel Dembicki
9075cfd609 kirkwood: fix Ctera C200 V1 ubi part name
In 749237967a downstream dts was replaced with upstream accepted
patch. But in upstream version last partition was called "rootfs"
instead "ubi". OpenWrt require "ubi" label for ubi rootfs.
This patch restore proper label.

Fixes: 749237967a ("kirkwood: Replace dtses with upstream accepted")

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 18:52:27 +01:00
Christian Svensson
9a323b50e6 octeon: upgrade to 6.1 kernel
The kernel patches apply with only minor changes. The only other notable
change is that octeon-usb has moved from staging and had its config
macro renamed from CONFIG_OCTEON_USB to CONFIG_USB_OCTEON_HCD.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-12-12 18:42:58 +01:00
John Audia
9380d9efa4 kernel: bump 6.1 to 6.1.66
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.66

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-12 14:24:48 +01:00
Rafał Miłecki
1d364cc9ff kernel: backport upstream nvmem fix for "fixed-layout"
It replaces a pretty much identical downstream patch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-12 12:46:58 +01:00
Christian Marangi
3eca9ba53f
ipq806x: drop useless uci-defaults compat version script
Drop useless uci-defaults compat version script as it's not needed
anymore and should have been dropped on DSA conversion.

The script was needed for Linksys EA7500 and EA8500 for the kernel space
migration. We now handle compat version setting in board.d scripts.

Having this script with actually the wrong value (2.0) cause upgrade
problem and conflicts with board.d script.

Fixes: 337e36e0ef ("ipq806x: convert each device to DSA implementation")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-12 01:28:22 +01:00
Daniel Golle
957a0921e2 mediatek: bananapi-r3: add overlay for ReSpeaker 2-mic hat
Add DT overlay to allow using the ReSpeaker 2-mic hat connected to
the 26-pin header of the BananaPi BPi-R3.

Supported sample formats: S16_LE, S24_LE, S32_LE
Supported sample rates: 8/12/16/24/32/48/96/192 kHz

          |  BPi-R3  |  ReSpeaker 2-mic
  Signal  |  26-pin  |  40-pin
----------+----------+-------------------
 VCC 5V   |    2     |    2
 I2C SDA  |    3     |    3
 I2C SCL  |    5     |    5
 GND      |    6     |    6
 PCM CLK  |   12     |   12
 PCM FS   |   15     |   35
 PCM DIN  |   26     |   38
 GND      |   25     |   39
 PCM DOUT |   22     |   40

Once connected, install the driver and tell U-Boot to apply the DT
overlay:

opkg kmod-sound-soc-mt7986-wm8960
fw_setenv bootconf_base "config-mt7986a-bananapi-bpi-r3#mt7986a-bananapi-bpi-r3-respeaker-2mics"
reboot

To setup the ReSpeaker for Stereo out on the Headphone plug:

amixer sset 'Right Output Mixer PCM' on
amixer sset 'Left Output Mixer PCM' on
amixer sset 'PCM Playback -6dB' off
amixer sset 'O018 I150_Switch' on
amixer sset 'O019 I151_Switch' on
amixer sset 'O124 I032_Switch' on
amixer sset 'O125 I033_Switch' on
amixer sset 'Headphone' 121
amixer sset 'Playback' 255

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
Daniel Golle
25ddc6e437 kernel: modules: break-out WM8960 codec module
Package codec module for WM8960 in its own package to be used by more
than one target.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
Maso Huang
4b82a20e77 mediatek: backport MT7986 audio driver
Pick commits adding drivers for audio engine found in MT7986 from
Linux 6.6 as well as follow-up fixes from Linux 6.7.

Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
John Audia
303ff26dc7 kernel: bump 5.15 to 5.15.142
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.142

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-11 17:39:57 +01:00
Daniel Golle
3aa686f8d4 mediatek: add support for Adtran SmartRG Bonanza Peak series
The Bonanza Peak series are a couple of MT7986-powered 2.5 GBit/s
Wi-Fi 6 residential gateway, access point and mesh router products.

All of them come with an eMMC to boot from, are powered via USB-C and
got a USB 3.0 type-A port. All of them got a Dialog (Renesas) DA14531
Bluetooth module connected via UART. If the device was previously
running stock firmware, the BT chip's internal flash has been loaded
with firmware and it can be attached using hciattach when using
OpenWrt.

SOC: MediaTek MT7986A
RAM: 2 GiB DDR4
eMMC: 8 GiB
Bluetooth: BLE5 (DA14531)
Serial: 3.3V level, 115200 8n1 on 4-pin connector

 * SDG-8612 - Dual-band RJ-45 gateway
   2x 2.5G MaxLinear PHY for WAN port
   3x 1GE LAN ports via MT7531 switch

 * SDG-8614 - Dual-band SFP gateway
   1x SFP cage with up to 2.5G speed
   1x 2.5G MaxLinear PHY for LAN port
   3x 1GE LAN ports via MT7531 switch

 * SDG-8622 - Tri-band mesh router
   2x 2.5G MaxLinear PHY
   The MT7986 2G and 5G are used as 2G and 5G high band.
   There’s a MT7915 PCIe card for 5G low band.

 * SDG-8632 - Tri-band mesh router with 6 GHz
   2x 2.5G MaxLinear PHY
   The MT7986 serves the 2G and 6G bands.
   There’s a MT7915 PCIe card for 5G.

Installation via U-Boot serial console:
0. setup TFTP server with IP 192.168.1.10/24, place initramfs image
renamed to openwrt.XXX where XXX is the internal product number:
 SDG-8612: XXX = 412
 SDG-8614: XXX = 414
 SDG-8622: XXX = 422
 SDG-8632: XXX = 432

1. connect to the serial console and power on the device.
   Interrupt the bootloader by pressing 'st'
2. setenv boot_mode openwrt ; saveenv
3. run boot1
   Load firmware via TFTP and write to flash
4. run boot2
   Now OpenWrt initramfs should boot
5. upload sysupgrade.bin via scp to /tmp
6. sysupgrade

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 06:22:51 +00:00
Daniel Golle
a270f61c00 mediatek: import driver for Adtran SmartRG RGBW LED
Import driver for I2C-connected HolTek MCU controlling the RGBW LED
found in Adtran SmartRG devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 06:22:51 +00:00
Daniel Golle
90fbec89be kernel: hack: support inverted LEDs on MaxLinear GPY211 PHY
Add downstream DT property to setup the PHY LEDs of the MaxLinear
GPY211 PHY in such way that the VDD of the LED is driven by the SoC
pin rather than the GND (which is the default).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 01:21:27 +00:00
Andrey VOLKOV
0a51f13145
generic: 6.1: fix patch 814 Add Qualcomm secure QFPROM support
The backported patch is broken, since kernel 6.1 has not
'include/linux/firmware' directory yet.

Fix the include to the correct path.

Fixes: #14115
Fixes: 52c365f055 ("kernel: backport v6.6 nvmem changes")
Signed-off-by: Andrey VOLKOV <andrey@volkov.fr>
[ improve commit description and title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-09 19:26:32 +01:00
Rosen Penev
bd413fa78d
kernel: remove mac-address-ascii dts support
Deprecated and replaced treewide with mac-base. Remove to avoid modern
usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 17:02:35 +01:00
Rosen Penev
5717c29e6b
kernel: of: remove mac-address-increment support hack
The MAC address increment has been replaced by the new "mac-base"
NVMEM fixed layout. This old implementation can be removed now.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 17:02:35 +01:00
Pascal Coudurier
b8ec063b38
x86: remove unused 5.15 kernel configs and patches
As we move to 6.1 by default, remove unused 5.15 kernel configs and patches

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
2023-12-09 16:52:07 +01:00
Pascal Coudurier
fdf8041107
x86: move to 6.1 kernel by default
6.1 kernel has been in testing for a few month without issues

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
2023-12-09 16:52:07 +01:00
Rosen Penev
8825f0fcd9
ipq806x: fix leading 0 warnings
dtc warns about leading 0s.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:53 +01:00
Rosen Penev
e1043a746a
ipq806x: avoid duplicate partition nodes
Avoids dtc warnings by moving it in a subnode.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:52 +01:00
Rosen Penev
81116ddb9b
ipq806x: reset-gpio to reset-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:49 +01:00
Christian Marangi
682f8fe7e7
ixp4xx: add Generic subtarget definition
Add Generic subtarget definition. This is needed to keep consistent name
on every other target/subtarget and also to permit correct work of CI
workflows that expect a target/subtarget pattern.

Fixes: c16b2293fe ("ixp4xx: Resurrect IXP4xx support using device tree")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-09 14:45:50 +01:00
Daniel Golle
9291f6025f ramips: refresh patches
Refresh ramips patches which got out of sync due to backported changes
of the MediaTek Ethernet driver.

Fixes: 6407ef8d2b ("kernel: backport upstream mediatek WED changes")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-08 23:34:42 +00:00
Felix Fietkau
9ab259ab34 kernel: remove already backported patch, fix build
Fixes: 6407ef8d2b ("kernel: backport upstream mediatek WED changes")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-12-08 15:52:53 +01:00
Felix Fietkau
6407ef8d2b kernel: backport upstream mediatek WED changes
Reorder and update existing patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-12-08 14:29:54 +01:00
Kamil Jońca
ffa40fcc7f ramips: add TP-LINK TL-WR902AC v4
Seems to be very similar to: https://openwrt.org/toh/tp-link/tl-wr902ac_v3
1 x usb
1 x eth
Powered by mini usb port.

Installation:

Can use TFTP method to install:
1. establish TFTP server at 192.168.0.66
2. provide tp_recover.bin file to the TFTP server
3. turn on router with reset button pressed
4. wait for led blinking, then release reset

Specification based on dmesg from already flashed device:

SoC Type: MediaTek MT7628AN ver:1 eco:2
CPU0 revision is: 00019655 (MIPS 24KEc)
Memory: 56028K/65536K available
CPU Clock: 580MHz
WiFi: MT7613BE

MAC addresses are all the same, except wifi5g which last part is decrement by one, ie.:

eth0		40:ed:00:cf:b9:9b
br-lan		40:ed:00:cf:b9:9b
phy0-ap0	40:ed:00:cf:b9:9b
phy1-ap0	40:ed:00:cf:b9:9a

Signed-off-by: Kamil Jońca <kjonca@onet.pl>
2023-12-06 22:59:22 +01:00
Hannu Nyman
8c2df654ad ipq806x: Fix nighthawk R7800/XR450/XR500 wan MAC
Correct the NVMEM mac-base field usage to read the wan MAC
correctly from flash.

Reference to discussion at https://github.com/openwrt/openwrt/pull/13952#issuecomment-1842749122

Fixes: d264d3a60 ("ipq806x: remove mac-address-increment")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2023-12-06 22:43:34 +01:00
Luis Mita
b1fd4b35bf mediatek: add SPDX header for Confiabits MT7981 DTS
Fixing ambiguous licensing.

Signed-off-by: Luis Mita <luis@luismita.com>
2023-12-06 22:11:03 +01:00
Mikhail Zhilkin
f3cdc9f988 ramips: add support for Rostelecom RT-FE-1A
Rostelecom RT-FE-1A is a wireless WiFi 5 router manufactured by Sercomm
company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB
Flash: 128 MiB
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615E): a/n/ac, 4x4
Ethernet: 5x GbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: No
Button: 2 buttons (Reset & WPS)
LEDs:
   - 1x Power (green, unmanaged)
   - 1x Status (green, gpio)
   - 1x 2.4G (green, hardware, mt76-phy0)
   - 1x 2.4G (blue, gpio)
   - 1x 5G (green, hardware, mt76-phy1)
   - 1x 5G (blue, gpio)
   - 5x Ethernet (green, hardware, 4x LAN & WAN)
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

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

1.  Login to the router web interface (default http://192.168.0.1/)
    under "admin" account

2.  Navigate to Settings -> Configuration -> Save to Computer

3.  Decode the configuration. For example, using cfgtool.py tool (see
    related section):
    cfgtool.py -u configurationBackup.cfg

4.  Open configurationBackup.xml and find the following block:

<OBJECT name="User." type="object" writable="1" encryption="0" >
<OBJECT name="1." type="object" writable="1" encryption="0" >
<PARAMETER name="Password" type="string" value="<some value>" writable="1" encryption="1" password="1" />
</OBJECT>

5.  Replace <some value> by a new superadmin password and add a line
    which enabling superadmin login after. For example, the block after
    the changes:

<OBJECT name="User." type="object" writable="1" encryption="0" >
<OBJECT name="1." type="object" writable="1" encryption="0" >
<PARAMETER name="Password" type="string" value="s0meP@ss" writable="1" encryption="1" password="1" />
<PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/>
</OBJECT>

6.  Encode the configuration. For example, using cfgtool.py tool:
       cfgtool.py -p configurationBackup.xml

7.  Upload the changed configuration (configurationBackup_changed.cfg) to
    the router

8.  Login to the router web interface (superadmin:xxxxxxxxxx, where
    xxxxxxxxxx is a new password from the p.5)

9.  Enable SSH access to the router (Settings -> Access control -> SSH)

10. Connect to the router using SSH shell using superadmin account

11. Run in SSH shell:
    sh

12. Make a mtd backup (optional, see related section)

13. Change bootflag to Sercomm1 and reboot:
    printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
    reboot

14. Login to the router web interface under admin account

15. Remove dots from the OpenWrt factory image filename

16. Update firmware via web using OpenWrt factory image

Revert to stock
---------------
Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
   printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3

mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
   cd /tmp
   for i in 0 1 2 3 4 5 6 7 8 9; do nanddump -f mtd$i /dev/mtd$i; \
   tftp -l mtd$i -p 192.168.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
   tftp -l mtd.md5 -p 192.168.0.2

MAC Addresses
-------------
+-----+------------+---------+
| use | address    | example |
+-----+------------+---------+
| LAN | label      | f4:*:66 |
| WAN | label + 11 | f4:*:71 |
| 2g  | label + 2  | f4:*:68 |
| 5g  | label + 3  | f4:*:69 |
+-----+------------+---------+
The label MAC address was found in Factory, 0x21000

cfgtool.py
----------
A tool for decoding and encoding Sercomm configs.
Link: https://github.com/r3d5ky/sercomm_cfg_unpacker

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-12-06 00:12:56 +01:00
Florian Eckert
fd9d1e90b4 tools: add tmon package
Add the 'tmon' packages. This is as a tool to help visualize,
tune, and test the complex thermal subsystem.

We get a compile warning for the tool that the printf format does not
fit. This commit contains a patch that fixes this warning. This patch
has also been sent upstream to the Linux kernel [1].

Links:
[1] https://lore.kernel.org/all/20231204141335.2798194-1-fe@dev.tdt.de/

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-12-05 13:38:41 +01:00
Rafał Miłecki
07765f28b7 mediatek: filogic: add Acelink EW-7886CAX support
Acelink EW-7886CAX is an MT7986A (AKA Filogic 830) based access point.
It has 512 MiB of RAM, one 2.5 Gbps PoE (802.3at) Ethernet port and
on-SoC Wi-Fi. There is no printed MAC label (on my unit).

My unit came with Mediatek's firmware (based on OpenWrt 21.02)
installed. It was possible to simply upgrade using OpenWrt's sysupgrade
tool.

Another verified upgrade method is using U-Boot (requires UART). During
every boot there is "U-Boot Boot Menu". Selecting option "2. Upgrade
firmware" allows using U-Boot's tftp client to load and flash factory
image.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-05 09:06:47 +01:00
David Bauer
d9271aa5b7 mpc85xx: allow mapping of cpu1 spin-table page
The no-map property was incorrectly added, which kept the system-memory
available on the WS-AP3825 limited to 190MB. We are allowed to map the
page containing the CPU1 spin-table, we are just not allowed to write to
it.

Fixes: 57d7382cb1 ("mpc85xx: increase available RAM on Extreme Networks WS-AP3825i")

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-04 14:20:46 +01:00
John Audia
91df0160e6 kernel: bump 6.1 to 6.1.65
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.65

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-04 12:49:47 +01:00
John Audia
c6a41bffc9 kernel: bump 5.15 to 5.15.141
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.141

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-04 12:47:55 +01:00
David Bauer
57d7382cb1 mpc85xx: increase available RAM on Extreme Networks WS-AP3825i
The system-mamory size was page-aligned prior to this commit, only
enabling to use 192MB of system memory of the 256 available.

This was due to the system-memory being manually shrinked to reserve the
upper 1MB for the second-core bootpage in the loader as well as the OS.

Fix this properly in the loader and in Linux using reserved-memory
definitions. This enables the device to use 250MB of system memory.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-03 23:43:19 +01:00
David Bauer
602ff8fbb1 mediatek: remove wireless packages for GL-MT2500
This device does not have wireless hardware, thus we don't need to ship
neither hostapd nor wireless drivers.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-03 06:56:02 +01:00
David Bauer
f82ccee512 mediatek: make GL-MT2500 image work with U-Boot recovery
Append metadata in the special GL.iNet format.
This also enables use of the web-based U-Boot recovery.

U-Boot-Recovery
===============

The GL-MT2500 provides web-based U-Boot recovery. For this, hold the
reset button pressed for 5 seconds when attaching power to the device.

The LED will blink 5 times. Release the reset button.

The OpenWrt sysupgrade image can be installed by navigating to
http://192.168.1.1 in a web-browser.

The device does not work as a DHCP server, so manual IP configuration is
required.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-03 06:50:52 +01:00
David Bauer
9217d85a2c mediatek: remove kernel build-directives for GL-MT2500
The build-directives for the GL-MT2500 are not required, as the default
ones produce working images.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-03 06:49:03 +01:00
David Bauer
fd1a14a75e mediatek: add missing eMMC packages for GL-MT2500
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-03 06:49:03 +01:00
Rosen Penev
78d259e7d2 mpc85xx: fix some dtc warnings
Mostly missing/wrong addresses.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-02 21:57:38 +01:00
Marty Jones
34d2964554 kernel: backport fixes for realtek r8152
Fixes issues with RTL8156 2.5G USB adapters

- # ethtool eth1
Settings for eth1:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
- #

- r8152: break the loop when the budget is exhausted
- r8152: Block future register access if register access fails
- r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
- r8152: add vendor/device ID pair for D-Link DUB-E250
- r8152: try to use a normal budget
- r8152: set bp in bulk
- r8152: adjust generic_ocp_write function
- r8152: fix the autosuspend doesn't work
- r8152: Add __GFP_NOWARN to big allocations
- r8152: reduce the control transfer of rtl8152_get_version()
- r8152: remove rtl_vendor_mode function
- r8152: avoid to change cfg for all devices
- r8152: add USB device driver for config selection
- r8152: use napi_gro_frags
- cdc_ether: no need to blacklist any r8152 devices
- cdc_ether: add u-blox 0x1313 composition

Build system: x86_64
Build-tested: bcm2711, rockchip, x86/64
Run-tested: bcm2711/RPi4B, rockchip/nanopi r2s, x86/64

Signed-off-by: Marty Jones <mj8263788@gmail.com>
2023-12-02 21:57:38 +01:00
Chen Minqiang
cb86e313d3 mediatek: filogic: Update bootcount init script permissions
Change permissions of the bootcount init script from old mode 100644
to new mode 100755 to ensure its executability.

Fixes: 6cc14bf66a ("filogic: support Telenor branded ZyXEL EX5700")
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-12-02 21:57:38 +01:00
Christian Lamparter
3f442c1eb9 ipq40xx: update ASUS RT-AC58U leds DTS nodes
- use color, function, function-enumerator properties.
 - removes the label properties from LED nodes.
 - add panic-indicator to the blue power/status LED.

Note: yes this brings the combined LAN/"switch" LED sort of back,
though I fully admit, it's a bit jank. Do you know a better option?
then please tell/make a PR!

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-02 21:57:38 +01:00
Christian Lamparter
4f7835cbf0 ipq40xx: enable CONFIG_LED_TRIGGER_PHY for AC42U
The AC42U already had PHY Triggers in the DTS.
We are probably going to use them at some point.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-02 21:57:12 +01:00
Shiji Yang
6c41c585e3 generic: add more DT LED color and function definitions
Openwrt supports hundreds of devices. These newly added LED colors
and functions can help developers better describe LED indicators.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-12-02 19:46:14 +01:00
Russell Senior
643a4adf9a qoriq: pad rootfs with zeros
Presently, sysupgrade -n does *not* reset the overlayfs, retaining
unwanted filesystem contents. Adding PADDING=1 in front of
gen_image_generic.sh in image/Makefile ensures that the overlayfs is
recreated on firstboot.

Fixes: 080a769b4d ("qoriq: new target")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[add Fixes tag, rewrite commit subject and message to respect line
length]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-12-02 14:06:56 +02:00
Russell Senior
c342bdca87 qoriq: set compat_version in board.d
Currently, sysupgrade without the -n option complains:

  # sysupgrade -v tmp/openwrt-qoriq-generic-watchguard_firebox-m300-squashfs-sysupgrade.img.gz
  upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
  upgrade: Kernel switched to FIT uImage. Update U-Boot environment.
  upgrade: Reading partition table from bootdisk...
  upgrade: Extract boot sector from the image
  upgrade: Reading partition table from image...
  Image check failed.

So, add the missing 05_compat-version to /etc/board.d/ to allow
sysupgrade to save config without using -f.

Fixes: c4b499bc03 ("qoriq: use FIT uImage for Firebox M300 kernel")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[drop invalid copyright header, add SPDX license header, shorten commit
subject, add fixes tag]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-12-02 14:06:41 +02:00
Hauke Mehrtens
4b4c940fbc x86: Add kmod-dwmac-intel
This adds the Intel Ethernet driver for the Intel Quark/EHL/TGL chips.

Fixes: #13994
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-12-02 00:42:00 +01:00
Hauke Mehrtens
1816e53062 armsr: Move kmod-stmmac-core to common place
Move the kmod-stmmac-core package to the common place to share it with
x86 later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-12-02 00:42:00 +01:00
Luis Mita
2af07eb853 mediatek: add support for Confiabits MT7981
Confiabits MT7981 is a Wi-Fi 6 router based on MediaTek MT7981.

Specification:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND
 - RAM: 256 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 4x 10/100/1000 Mbps MT7531AE (3xLAN, 1xWAN)
 - USB 2.0 port
 - Buttons: 1 Reset button, 1 Mesh button.
 - LEDs: 7x light-blue, 2x warm-white
 - Serial console: internal 4-pin header, 115200 8n1
 - Power: 12 VDC, 1.5 A

MAC addresses in stock firmware and in this commit:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 00:0c:43:xx:xx:e1 | label+1   |
| LAN     | 00:0c:43:xx:xx:e0 | label     |
| WLAN 2g | 00:0c:43:xx:xx:e0 | label     |
| WLAN 5g | 02:0c:43:xx:xx:e0 |           |
+---------+-------------------+-----------+
The label MAC was found in 'Factory', 0x4

Installation:
The stock firmware is OpenWrt-based. If you can reach LuCI or SSH, just use the sysupgrade image
with the 'Keep settings' option turned off.

Signed-off-by: Luis Mita <luis@luismita.com>
2023-11-29 23:52:14 +01:00
Hauke Mehrtens
4211eab085 target: Make TARGET_SERIAL independent of GRUB configuration
GRUB_SERIAL is also used for the default serial on the target and not
only in grub. When no grub was build it was not available and the build
fails.

Rename GRUB_SERIAL to TARGET_SERIAL and make it always available on x86
and armsr targets.

Fixes: #14063
Fixes: b10768476f ("x86,armsr: interpolate GRUB_SERIAL into /etc/inittab")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-29 23:43:01 +01:00
John Audia
6c118efc01 kernel: bump 5.15 to 5.15.140
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.140

Removed upstreamed:
	mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.140&id=06d320ca170b4e59bb261e2ce3ffe84e9154d42b

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-11-29 23:41:33 +01:00
John Audia
c20bedf1f5 kernel: bump 6.1 to 6.1.64
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.64

Removed upstreamed:
	ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch[1]
	mvebu/patches-6.1/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[2]
	qualcommax/patches-6.1/0026-v6.7-clk-qcom-ipq8074-drop-the-CLK_SET_RATE_PARENT-flag-f.patch[3]

Manually rebased:
	bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=3b93096d29c5b9ca2af94be4ee9949c1767acf17
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=b3fd9db79e30d5eb5f76ef1f5b7e4f444af574ea
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=877080a3490102da26b8d969588159b2385f739e

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-11-29 23:38:39 +01:00
Daniel Golle
507ad4f078 mediatek: add kmod-usb3 to default package set of the ZBT-Z8102AX
Include XHCI USB drivers on the ZBT-Z8102AX router, the drivers are
required to be able to use the USB-connected M.2 slots for 4G/5G modems.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-29 21:13:32 +00:00
David Bauer
6b73d9bf49 mediatek: copy config for Acer Predator W6
Config was previously not copied on sysupgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-27 08:02:41 +01:00
David Bauer
1239668648 mediatek: add support for GL.iNet GL-MT2500
Hardware
--------
SoC:  MediaTek MT7981BA
RAM:  1GB DDR4 (NANYA NT5AD512M16C4-JR)
MMC:  8GB eMMC (Samsung 8GTF4R)
ETH:  1000Base-T LAN (ePHY)
      2500Base-T WAN (MaxLinear GPY211C)
BTN:  1x Reset Button
LED:  System (blue/white)
      VPN (white)
USB:  1x USB-A (USB 3.0)
UART: 115200 8N1 - Pinout on board next to LAN port
      Don't connect 3.3V!

Known Issues
------------
U-Boot vendor recovery does not seem to accept any images, neither
GL.iNet images nor OpenWrt images. Recovery requires serial access!

Installation
------------
Upload the OpenWrt sysupgrade image to the Gl.iNet Web-UI. Make sure to
not retain existing settings.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-27 08:02:41 +01:00
David Bauer
54e52fdacb rockchip: require image metadata
All devices in the rockchip target have appended image-metadata. Enforce
the presence of this metadata to avoid flashing incomplete images.

This is the de-facto standard for almost all OpenWrt targets.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-27 07:54:00 +01:00
Lech Perczak
32098554d9
ath79: fortinet-fap-221-b: convert to nvmem-layout
Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the userspace adjustments which are no longer necessary.
While at that, move the mac-base to the common part, as it is again
exactly the same in both models.

And convert ART partition too - keep that one separate, as calibration
data length differs between the models.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-11-27 00:34:49 +01:00
Lech Perczak
7e5e010035
ath79: fortinet-fap-220-b: convert to nvmem-layout
Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the "mac-address-increment" binding.
While at that, convert ART partition too.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-11-27 00:34:49 +01:00
Lech Perczak
cee7622ab0
ath79: fortinet-fap-220-b: fix WLAN MAC addresses
Addresses were swapped compared to the factory firmware. In addition to
that, one of them was shifted by -1. Fix that by setting wlan0 MAC
offset to 9, and wlan1 MAC offset to 2.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-11-27 00:34:49 +01:00
Xiaojun Liu
5899689159 x86 64: Add new device Cordoba Edge Platform
Add new device Cordoba Edge Platform
hardware specifications: CPU - Intel Atom C3000
                           Ethernet - 2 10Gbps ixgbe SPF+
                                      2 1Gbps  ixgbe RJ45/SPF
                                      4 2.5Gbps  igc RJ45
                           WiFi - mt7915e
                           LED  - 3 multicolor(red|blue|green) LEDs

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2023-11-26 20:03:59 +01:00
Tianling Shen
4e09722a68 rockchip: add NanoPi R5C support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
1GB or 4GB LPDDR4X RAM
2x 2500 Base-T
4 LEDs (LAN / WAN / WIFI / POWER)
1 Button (Reset)
8GB or 32GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
c06a71f0b3 rockchip: add NanoPi R5S support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2GB or 4GB LPDDR4X RAM
1x 1000 Base-T
2x 2500 Base-T
4 LEDs (LAN1 / LAN2 / WAN / POWER)
8GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4d9059aed9 rockchip: armv8: broaden boardname
Now we have rk356x support :-)

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4be1e39c4e rockchip: enable drivers for rk356x
Enable all necessary drivers for the rk356x SoCs, including PHY,
SCMI, SPI etc. Also backport 2 upstream patches for sdhci fixes.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
22a9c4b67d rockchip: remove kernel 5.15 patches and config
As we switched to kernel 6.1, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
48c9a4b47c rockchip: switch to kernel 6.1
Required by the following rk3568 support.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
dd8972fde3 rockchip: move image generation command to default
It's applicable for all devices so move it to default to reduce
redudant code. Addtionally introduce a new variable `BOOT_SCRIPT`
to allow custom boot script (if necessary).

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tony Ambardar
a7818e0550 ipq40xx: enable UBI size checks for some Linksys NAND devices
Add correct NAND_SIZE in device definitions for EA6350v3, EA8300, MR8300,
WHW01 and WHW03v2, to enable improved image size checks wrt UBI reserved
blocks on NAND devices.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:21 +01:00
Tony Ambardar
b16e14a220 image: use helper function for size units
Add the make function 'exp_units' for helping evaluate k/m/g size units in
expressions, and use this to consistently replace many ad hoc substitutions
like '$(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE)))' in makefiles.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Tony Ambardar
c66511bc48 ipq40xx: fix typo in Linksys WHW01 image definition
Use lower-case "k" in IMAGE_SIZE for Linksys WHW01, permitting proper unit
conversions in build recipes (e.g. 75776k -> 75776*1024).

Fixes: 2a9f3b7717 ("ipq40xx: fix up Linksys WHW01 board name, device definition")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Rani Hod
e29f4a3f70 ath79: add support for D-link DAP-1720 A1
D-Link DAP-1720 rev A1 is a mains-powered AC1750 Wi-Fi range extender,
manufactured by Alpha Networks [8WAPAC28.1A1G].
(in square brackets: PCB silkscreen markings)

Specifications:
* CPU (Qualcomm Atheros QCA9563-AL3A [U5]):
  775 MHz single core MIPS 74Kc;
* RAM (Winbond W9751G6KB-25J [U3]):
  64 MiB DDR2;
* ROM (Winbond W25Q128FV [U16]):
  16 MiB SPI NOR flash;
* Ethernet (AR8033-AL1A PHY [U1], no switch):
  1 GbE RJ45 port (no PHY LEDs);
* Wi-Fi
  * 2.4 GHz (Qualcomm Atheros QCA9563-AL3A [U5]):
    3x3 802.11n;
  * 5 GHz (Qualcomm Atheros QCA9880-BR4A [U9]):
    3x3 802.11ac Wave 1;
  * 3 foldable dual-band antennas (U.fl) [P1],[P2],[P3];
* GPIO LEDs:
  * RSSI low (red/green) [D2];
  * RSSI medium (green) [D3];
  * RSSI high (green) [D4];
  * status (red/green) [D5];
* GPIO buttons:
  * WPS [SW1], co-located with status LED;
  * reset [SW4], accessible via hole in the side;
* Serial/UART:
  Tx-Gnd-3v3-Rx [JP1], Tx is the square pin, 1.25mm pitch;
  125000-8-n-1 in U-boot, 115200-8-n-1 in kernel;
* Misc:
  * 12V VCC [JP2], fed from internal 12V/1A AC to DC converter;
  * on/off slide switch [SW2] (disconnects VCC mechanically);
  * unpopulated footprints for a Wi-Fi LED [D1];
  * unpopulated footprints for a 4-pin 3-position slide switch (SW3);

MAC addresses:
* Label = LAN;
* 2.4 GHz WiFi = LAN;
* 5 GHz WiFi = LAN+2;

Installation:
* `factory.bin` can be used to install OpenWrt from OEM firmware via the
  standard upgrade webpage at http://192.168.0.50/UpdateFirmware.html
* `recovery.bin` can be used to install OpenWrt (or revert to OEM
  firmware) from D-Link Web Recovery. To enter web recovery, keep reset
  button pressed and then power on the device. Reset button can be
  released when the red status LED is bright; it will then blink slowly.
  Set static IP to 192.168.0.10, navigate to http://192.168.0.50 and
  upload 'recovery.bin'. Note that in web recovery mode the device
  ignores ping and DHCP requests.

Note: 802.11s is not supported by the default `ath10k` driver and
firmware, but is supported by the non-CT driver and firmware variants.
The `-smallbuffers` driver variant is recommended due to RAM size.

Co-developed-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-11-26 18:27:35 +01:00
Rosen Penev
b7f26c6392 ath79: ar: convert to mac-base
Replacement for deprecated mac-address-increment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 21:34:18 -08:00
Rosen Penev
9783340af9 ath79: ar: convert to nvmem-layout
Will allow removing deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 21:34:18 -08:00
Rosen Penev
de1d9da150 ath79: tp9343: convert to nvmem-layout
Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 19:43:35 -08:00
Rosen Penev
ede82f35eb ath79: qcn: convert to nvmem-layout
Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 19:43:32 -08:00
Rosen Penev
b2f1c6ed52 ath79: qca: remove mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
e816591e22 ath79: qca: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
eea4dfaa7b ath79: mikrotik: fix dts warnings
property has invalid length

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
3395184825
ramips: mt7621: nix mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:32 +01:00
Rosen Penev
f4c33d098f
ramips: mt7621: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:32 +01:00
Rosen Penev
3c1c3f4685
ramips: mt7621: add interrupt-controller
Fixes dtc warning:

'#interrupt-cells' found, but node is not an interrupt provider

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:04 +01:00
Rosen Penev
458cb2cd6b
ramips: mt7620a: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:58 +01:00
Rosen Penev
40feb97e56
ramips: mt7620a: convert to nvmem-layout
Allows using mac-base to replace mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:58 +01:00
Rosen Penev
32c1ac8960
ramips: mt7620n: convert to nvmem-layout
nvmem-cells is deprecated. nvmem-layout allows using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:55 +01:00
Rosen Penev
e8084a3c3b
ramips: mt7628: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:58:44 +01:00
Rosen Penev
0a1d15642f
ramips: mt7628: use nvmem-layout
Will allow using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:58:40 +01:00
Rosen Penev
3eb899fd36
mediatek: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:45:26 +01:00
Rosen Penev
405bc5be13
mediatek: convert to nvmem-layout
Will allow removing mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:45:26 +01:00
Rosen Penev
b976fa5d2b
ramips: rtxxxx: remove mac-address-increment
Deprecated and replaced upstream with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:39:52 +01:00
Rosen Penev
5f479a4f34
ramips: rtxxxx: convert to nvmem-layout
Allows replacing mac-adress-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:39:47 +01:00
Chukun Pan
07482d15af
mediatek: filogic: reorder alphabetically
Reorder scripts and image recipes to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:35 +01:00
Chukun Pan
b74ae69596
mediatek: filogic: remove kmod-usb2 for GL-MT6000
The usb driver requires kmod-usb3, not kmod-usb2.
Remove the useless kmod-usb2 from default package.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:34 +01:00
Chukun Pan
1be6347b7d
mediatek: Cetron CT3003: fixes typo for spi properties
Same as commit 3674689, correct 'buswidth' to 'bus-width'.
Also move the nmbm properties outside the partition definition.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:34 +01:00
Rosen Penev
7e316bc53a
ipq40xx: remove mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:54 +01:00
Rosen Penev
fe8dd23882
ipq40xx: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:54 +01:00
Rosen Penev
14467fd515
ipq40xx: fix dtc warnimg
I2C bus unit address format error, expected "62"

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:51 +01:00
Rosen Penev
eadf2ead4e
qualcommax: convert to nvmem-layout
nvmem-cells is deprecated

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 22:51:32 +01:00
Rosen Penev
10b7e2d0df
apm821xx: convert to nvmem-layout
nvmem-cells is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 22:50:32 +01:00
Hauke Mehrtens
d99aed31a0 mediatek: filogic: Fix GPIOs for Zbtlink ZBT-Z8102AX
The PGIO configuration should be added for the ZBT-Z8102AX and not the ZBT-Z8103AX

Fixes: c8c2f52262 ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-25 22:25:42 +01:00
Xiaobo Liu
5fbb1f09ca ramips: mt76x8 add support for RTC class/drivers
This commit adds support for RTC class/drivers to the mt76x8 target.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2023-11-25 18:16:46 +01:00
Darlan Pedro de Campos
2a0c9cc8cd ramips: add support for TP-Link EX220 v1
This device is very similar, if not identical, to the TP-Link AX23 v1
but is targeted at service providers and features a completely different
flash layout.

Hardware
--------

CPU:    MediaTek MT7621 DAT
RAM:    128MB DDR3 (integrated)
FLASH:  16MB SPI-NOR
WiFi:   MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax
SERIAL: 115200 8N1
        LEDs - (3V3 - GND - RX - TX) - ETH ports

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

Flashing is only possible via a serial connection using the sysupgrade
image; the factory image must be signed. You can flash the sysupgrade
image directly through the U-Boot console, or preferably, by booting the
initramfs image and flashing with the sysupgrade command. Follow these
steps for sysupgrade flashing:

1. Establish a UART serial connection.
2. Set up a TFTP server at 192.168.0.2 and copy the initramfs image
   there.
3. Power on the device and press any key to interrupt normal boot.
4. Load the initramfs image using tftpboot.
5. Boot with bootm.
6. If you haven't done so already, back up all stock mtd partitions.
7. Copy the sysupgrade image to the router.
8. Flash OpenWrt through either LuCI or the sysupgrade command. Remember
   not to attempt saving settings.

Revert to stock firmware
------------------------

Flash stock firmware via OEM web-recovery mode. If you don't have access
to the stock firmware image, you will need to restore the firmware
partition backed up earlier.

Web-Recovery
------------

The router supports an HTTP recovery mode:

1. Turn off the router.
2. Press the reset button and power on the device.
3. When all LEDs start flashing, release reset and quickly press it
   again.

The interface is reachable at 192.168.0.1 and supports installation of
the OEM factory image. Note that flashing OpenWrt this way is not
possible, as mentioned above.

Signed-off-by: Darlan Pedro de Campos <darlanpedro@gmail.com>
2023-11-25 16:14:32 +01:00
Filip Milivojevic
288738c59d ramips: Add support for Cudy WR1300 v3
Specifications:
 - SoC: MediaTek MT7621AT
 - RAM: 128 MB (DDR3)
 - Flash: 16 MB (SPI NOR)
 - WiFi: MediaTek MT7603E, MediaTek MT7613BE
 - Switch: 1 WAN, 4 LAN (Gigabit)
 - Buttons: Reset, WPS
 - LEDs: System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS
 - Power: DC 12V 1A tip positive

Download and flash the manufacturer's built OpenWRT image available at
http://www.cudytech.com/openwrt_software_download
Install the new OpenWRT image via luci (System -> Backup/Flash firmware)
Be sure to NOT keep settings. The force upgrade may need to be checked
due to differences in router naming conventions.

Cudy WR1300 v3 differs from v2 only in swapped WiFi chip PCIe slots. Common
nodes are extracted to .dtsi and new v2 and v3 dts are created.

Cudy WR1300 v2 dts now contains ieee80211-freq-limit and has
eeprom_factory_8000 length fixed.

The same manufacturer's built OpenWRT image is provided for both v2 and v3
devices as a step in installing, but for proper WiFi functionality,
a separate build is required.

Recovery:
 - Loads only signed manufacture firmware due to bootloader RSA verification
 - serve tftp-recovery image as /recovery.bin on 192.168.1.88/24
 - connect to any lan ethernet port
 - power on the device while holding the reset button
 - wait at least 8 seconds before releasing reset button for image to
   download
 - See http://www.cudytech.com/newsinfo/547425.html

Signed-off-by: Filip Milivojevic <zekica@gmail.com>
2023-11-25 15:48:41 +01:00
Valerio 'ftp21' Mancini
b5df398a36 mediatek: add Zyxel EX5601-T0 with uboot custom partition
The flash procedure is similar to the Xiaomi AX6000 router.

Load openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb from original Zyxel U-Boot:

tftpboot openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
bootm 0x46000000
Load mtd-rw
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1

Format ubi and create ubootenv partitions

ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
Copy openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb to /tmp and create recovery partition.
If your recovery image is larger than 10MiB, size the recovery partition accordingly to make it fit.

ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2  openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
Copy preloader and uboot to /tmp and write them in the mtd

mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip
Now write the firmware:
sysupgrade -n  /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-squashfs-sysupgrade.itb

To create a correct BL2, I had to add a profile for 'spim:4k+256' as I could not find a way to value the variable 'NAND_TYPE'.

Features and fixes from hitech95 tree has been squashed, I'm attaching his commit message:

The Power LED was not working correctly and not reacting
 to the boot process and statuses.

The board has space (footprint) for an unpopulated Zigbee chip,
 while we dont know the device model having this chip populated
 we have to assure that the common dts doesnt enable
 interfaces that share pins with such device.

In this instance the PCIe and the uart1 and uart2 are disabled.
Some of the control PCIE pins seems to be used for the Zigbee chip,
 UART1 seems to be used as a flash port while UART2 should be the
 main comunication interface of Zigbee chip.

The Zigbee chip should be a EFR32MG21. But the pins used for UART
 seems to be not on standard PINS used by other adapters.
 So it cannot run firmwares shared on the web.
 But it should be possible to build a custom firmware with
 the corrtect pinmux.

This commit also contains the following squashed commit from hitech95
 - mediatek: fix sysupgrade for Zyxel EX7601-T0 ubootmod

Changes and fixes added in common board:
 - added aliases for boot status leds.
 - added aliases for the mac-label-device.
 - added pin claims for core features (MDIO and UART 0)
 - added default LEDs configuration (01_leds)
 - added default network configuration (02_network)
 - added missing kmod-usb3 module for USB3
 - fixed LED names
 - fixed reset pin for SLIC chip
 - removed unused pinmux configurations and devices
 - fix LAN (switch) port numbering
 - using nvmem cells for wifi eeprom, dropping deprecated "mediatek,mtd-eeprom"
 - proper factory partition and mac address handling
 - cleaned up spi_nand sections and partition

Changes and fixxes added in stock layout:
 - added NMBM, if u-boot has it, the kernel must be informed.

Co-authored-by: Nicolò Veronese <nicveronese@gmail.com>
Co-developed-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
2023-11-25 14:51:21 +01:00
Daniel Golle
1b70025ad1 mediatek: remove DTS property added by mistake
Remove bogus 'phy-handle = <&phy0>;', an undefined reference.

Fixes: c8c2f52262 ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-25 03:22:47 +00:00
Mikhail Zhilkin
1b091311aa ramips: add support for Sercomm CPJ routers
This commit adds support for following wireless routers:
 - Rostelecom RT-FL-1 (Serсomm RT-FL-1)
 - Rostelecom S1010 (Serсomm S1010.RT)

The devices are almost identical and the only difference is one bit in the
factory image PID (thanks to Maximilian Weinmann <x1@disroot.org>
(@MaxS0niX) for the info and idea to make one PR for two devices at once).

Devices specification
---------------------
   SoC:          MediaTek MT7620A, MIPS
   RAM:          64 MB
   Flash:        16 MB SPI NOR
   Wireless 2.4: MT7620 (b/g/n, 2x2)
   Wireless 5:   MT7612EN (a/n/ac, 2x2)
   Ethernet:     5xFE (WAN, LAN1-4)
   BootLoader:   U-Boot
   Buttons:      2 (wps, reset)
   LEDs:         1 amber and 1 green status GPIO leds
                 5 green ethernet GPIO leds
                 1 green GPIO 2.4 GHz WLAN led
                 1 green PHY 5 GHz WLAN led
                 1 green unmanaged power led
   USB ports:    No
   Power:        12 VDC, 1 A
   Connector:    Barrel

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. Wait until green status led stops blinking (can take several minutes)
4. Login to OpenWrt initramsfs. It's recommended to make a backup of the
   mtd partitions at this point.
4. Perform sysupgrade using the following command (or use Luci):
   sysupgrade -n sysupgrade.bin
5. Wait until green status les stops blinking (can take several minutes)
6. Mission acomplished

Return to Stock
---------------
Option 1. Restore firmware Slot1 from a backup (firmware2.bin):
   cd /tmp
   mtd -e Firmware2 write firmware2.bin Firmware2
   printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2
   reboot

Option 2. Decrypt, ungzip and split stock firmware image into the parts,
take Slot1 parts (kernel2.bin, rootfs2.bin) and write them:
   cd /tmp
   mtd -e Kernel2 write kernel2.bin Kernel2
   mtd -e RootFS2 write rootfs2.bin RootFS2
   printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2
   reboot
More about stock firmware decryption:
Link: https://github.com/Psychotropos/sercomm_fwutils/

Debricking
----------
Use sercomm-recovery tool. You can use "ALL" mtd partition backup as a
recovery image.
Link: https://github.com/danitool/sercomm-recovery

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| label   | 48:3e:xx:xx:xx:1e | label     |
| LAN     | 48:3e:xx:xx:xx:1e | label     |
| WAN     | 48:3e:xx:xx:xx:28 | label+10  |
| WLAN 2g | 48:3e:xx:xx:xx:20 | label+2   |
| WLAN 5g | 48:3e:xx:xx:xx:24 | label+6   |
+---------+-------------------+-----------+

Co-authored-by: Vadzim Vabishchevich <bestmc2009@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-11-25 01:11:18 +01:00
Mikhail Zhilkin
25bab2b8bc ramips: mt7620: drop unnecessary trailing tabs
Let's tidy up a bit (drop unnecessary trailing tabs).

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-11-25 01:11:18 +01:00
Mikhail Zhilkin
e900c45211 ramips: sercomm.mk: make common recipe to set a bit in pid
This commit makes a common recipe to set bit in Sercomm factory pid since
this is necessary for several devices (WiFire S1500.nbn, Rostelecom
RT-FL-1) at different offsets.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-11-25 01:11:18 +01:00
Robert Marko
5dae4a6aba ipq40xx: refresh patches
CI reported that ipq40xx needed a refresh, so lets refresh it.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-11-25 00:12:01 +01:00
Daniel Golle
c8c2f52262 mediatek: add support for Zbtlink ZBT-Z8102AX
Specifications:
SoC: MediaTek MT7981B
RAM: 1024MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit)
USB: two M.2 slots for 5G modems via USB 3.0 hub, external USB 3.0 port
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND

Installation:
A. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by the seller),
you can easily upgrade by going to the dashboard (192.168.1.1) and then
navigate to System -> Backup/Flash firmware, then flash the firmware

B. Through TFTP
Standard installation via UART:

1. Connect USB Serial Adapter to the UART, (NOTE: Don't connect the VCC pin).
2. Power on the router. Make sure that you can access your router via UART.
3. Restart the router then repeatedly press ctrl + c to skip default boot.
4. Type > bootmenu
5. Press '2' to select upgrade firmware
6. Press 'Y' on 'Run image after upgrading?'
7. Press '0' and hit 'enter' to select TFTP client (default)
8. Fill the U-Boot's IP address and TFTP server's IP address.
9. Finally, enter the 'firmware' filename.

Based on patch adding support for similar Zbtlink ZBT-Z8103AX device by
Ian Ishmael C. Oderon.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-24 21:28:35 +00:00
Christian Marangi
6f5c301eab
generic: 6.1: backport upstream Aquantia PHY firmware loader patches
Backport merged upstream patch that adds support for firmware loader
from NVMEM or attached filesystem for Aquantia PHYs.

Refresh all kernel patches affected by this change.

Also update the path for aquantia .ko that got moved to dedicated
directory upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-24 16:46:50 +01:00
Rosen Penev
d1b5981038
realtek: convert to nvmem-layout
nvmem-cells is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-24 16:37:02 +01:00
John Audia
df167450a5 kernel: bump 5.15 to 5.15.139
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.139

Removed upstreamed:
	backport-5.15/830-v6.6-2-leds-turris-omnia-Drop-unnecessary-mutex-locking.patch[1]
	backport-5.15/830-v6.7-1-leds-turris-omnia-Do-not-use-SMBUS-calls.patch[2]
	x86/patches-5.15/120-hwrng-geode-fix-accessing-registers.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=aec3706971b332af8321b2beccba981b8061489a
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=893eedf596dd81c7a7f0cd80b345956ae000eab9
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=a5c83c8043d70b9a28d1bd78a2dbbab340f43889

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-11-23 22:55:55 +01:00
John Audia
2b75f108fb kernel: bump 6.1 to 6.1.63
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.63

Removed upstreamed:
	generic/backport-6.1/815-v6.6-2-leds-turris-omnia-Drop-unnecessary-mutex-locking.patch
	generic/backport-6.1/815-v6.7-1-leds-turris-omnia-Do-not-use-SMBUS-calls.patch
	ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch

Manually rebased:
	bcm27xx/patches-6.1/950-0606-hwrng-bcm2835-sleep-more-intelligently.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=7d0e60e4ff840e97fb18afb2a7344442c10a6fdf
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=63cdeb20ee3bfef820b045b8d3b8395f9f815a74
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=8803da01fe1b4ca3d37745283f7e73c6c2558c0c

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-11-23 22:51:52 +01:00
Daniel Linjama
a39a49e323 ath79: add support for D-Link COVR-P2500 A1
Specifications:
* QCA9563, 16 MiB flash, 128 MiB RAM, 2T2R 802.11n
* QCA9886 2T2R 801.11ac Wave 2
* QCA7550 Homeplug AV2 1300
* AR8337, 3 Gigabit ports (1, 2: LAN; 3: WAN)

To make use of PLC functionality, firmware needs to be
provided via plchost (QCA7550 comes without SPI NOR),
patched with the Network Password and MAC.

Flashing via OEM Web Interface
* Flash 'factory.bin' using web-interface
* Wait until firmware succesfully installed and device booted
* Hold down reset button to reset factory defaults (~10 seconds)

Flashing via Recovery Web Interface:
* Hold down reset button during power-on (~10 seconds)
* Recovery Web UI is at 192.168.0.50, no DHCP.
* Flash 'recovery.bin' with
  scripts/flashing/dlink_recovery_upload.py
  (Recovery Web UI does not work with modern OSes)

Return to stock
* Hold down reset button during power-on (~10 seconds)
* Recovery Web UI is at 192.168.0.50, no DHCP.
* Flash unencrypted stock firmware with
  scripts/flashing/dlink_recovery_upload.py
  (Recovery Web UI does not work with modern OSes)

Co-developed-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Daniel Linjama <daniel@dev.linjama.com>
2023-11-23 00:26:28 +01:00
Rosen Penev
944d3526a3
mvebu: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 19:58:22 +01:00
Rani Hod
aaeb379023 mediatek: fiilogic: device tree switch@1f fix
Quite a few `fiilogic` devices use the `mt7531` switch.
Some of them have a DT node that looks like:
```
switch: switch@0 {
	compatible = "mediatek,mt7531";
	reg = <31>;
...
};
```
This commit changes the DT node name to `switch@1f`.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-11-22 19:42:23 +02:00
Rosen Penev
d44c037a59
ipq806x: add missing interrupt-controller
Fixes dtc warnings

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 00:10:31 +01:00
Rosen Penev
d264d3a60e
ipq806x: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 00:10:30 +01:00
Rosen Penev
659f2d77ce
lantiq: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 00:05:34 +01:00
Rosen Penev
28a3dab2ab
bmips: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 00:02:01 +01:00
Christian Marangi
7993a288f1
Revert "mpc85xx: replace user space MAC with nvmem"
This reverts commit 931fcf6189.

The definition is wrong and require mac-base compatible. Also it's not
clear if it's correct to use 0xc for mac size.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-21 23:57:44 +01:00
Rosen Penev
931fcf6189
mpc85xx: replace user space MAC with nvmem
Possible now that NVMEM supports ASCII.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-21 23:10:18 +01:00
Rosen Penev
ddbe732357
mpc85xx: remove mac-address-increment
It's deprecated

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-21 23:10:17 +01:00
Rosen Penev
2ed2b8b16c
mpc85xx: fix dtc warning
States to remove the linux prefix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-21 23:10:17 +01:00
Rosen Penev
733a99d824
octeon: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-21 23:07:18 +01:00
Rafał Miłecki
011e35e5d9 kernel: drop "mac-address-increment-byte" DT property support
This downstream DT property is not used by any DTS file anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-21 16:34:00 +01:00
Daniel Golle
3f7637b050 mvebu: add support for Synology DS213j
The Synology DS213j is a rather dated dual-bay SATA NAS based on on the
Marvell Armada-370 SoC. It has long been supported in vanilla Linux,
however, flash partitioning there didn't match with reality (ie. the
bootloaders expectations) and nobody cared to wrap up OpenWrt support
for the device.

CPU: Marvell Armada-370 ARMv7 SoC @ 1200 MHz
RAM: 512 MB DDR3
Flash: 8 MB (Micron Technology N25Q064)
Network: 1x 1000M/100M/10M Ethernet (Marvell 88E1510)
SATA: 2x 3.0Gbps
USB: 2x USB 2.0

As OS options are becoming limited on that still quite useful hardware,
patch the flash partitions to be able to get the most out of it when
using OpenWrt.

The vendor firmware loads kernel and initrd from fixed addresses in
the flash, not making use of a modifyable environment stored in flash
which is stored at a location right in the middle of the vendor's
zImage partition (at 0x100000).

Stock firmware flash layout:

0x000000 ~ 0x0c0000 : "RedBoot" (actually U-Boot)
0x0c0000 ~ 0x390000 : "zImage"
0x390000 ~ 0x7d0000 : "rd.gz"
0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no)
0x7e0000 ~ 0x7f0000 : "RedBoot Config" (unused? legacy left-over)
0x7f0000 ~ 0x800000 : "FIS directory" (unused? legacy left-over)

OpenWrt flash layout:

0x000000 ~ 0x0c0000 : "u-boot"
0x0c0000 ~ 0x100000 : "gap"
0x100000 ~ 0x110000 : "u-boot-env"
0x110000 ~ 0x7d0000 : "kernel"
0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no)
0x7e0000 ~ 0x800000 : "gap2"

"kernel", "gap" and "gap2" are concatenated using the mtd-concat
virtual MTD driver, resulting in a partition "firmware" used by
OpenWrt for kernel, rootfs and rootfs-overlay, 0x720000 (7296kiB) in
total.

Installation:
1. Connect to internal serial console port and Ethernet port,
   providing a TFTP server at a static IPv4 address, e.g.
   192.168.1.254/24.
2. Interrupt bootloader using CTRL+C
3. Configure bootloader to load OpenWrt on future boot:
   setenv bootcmd "bootm f4110000"
   saveenv
4. Load and boot initramfs image via TFTP:
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.254
   tftpboot openwrt-mvebu-cortexa9-synology_ds213j-initramfs-kernel.bin
   bootm
5. Use sysupgrade to load final image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-20 13:24:06 +00:00
Rani Hod
c4fe1bfc65 ramips: D-Link Dxx-1xx0 image fixes
Three fixes for D-Link DAP-1620 rev B and its twin D-Link DRA-1360:

1. `uboot-envtools` is removed from default package list.
2. Makefile variable is doubly escaped, i.e. `$$$$(DLINK_HWID)`.
3. Previously the size of `factory.bin` was always 10.5 MiB, same as
D-Link firmwares. This commit makes it possible to use smaller images
(with no lost space due to padding) as well as larger images. Tested
successfully flashing a 6.5 MiB image and a 14.5 MiB image.

Recall that factory images need to be installed via D-Link Web Recovery
(at http://192.168.0.50/, server ignores pings and DHCP requests).

P.S.
I implemented the OEM firmware encryption algorithm, so firmware can be
flashed via OEM firmware, but after successful flashing the device
reboots to web recovery, so further debugging is required.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-11-20 00:24:54 +01:00
Renaud Gaspard
e9ac1b19e0 ramips: Add support for TP-Link Archer C50 v6 (CA/EU/RU)
This adds support for the TP-Link Archer C50 v6 (CA/EU/RU).
(The ES variant is a rebranded Archer C54 and NOT supported.)

CPU:   MediaTek MT7628 (580MHz)
RAM:   64M DDR2
FLASH: 8M SPI
WiFi:  2.4GHz 2x2 MT7628 b/g/n integrated
WiFi:  5GHz 2x2 MT7613 a/n/ac
ETH:   1x WAN 4x LAN
LED:   Power, WiFi2, WiFi5, LAN, WAN, WPS
BTN:   WPS/WiFi, RESET
UART:  Near ETH ports, 115200 8n1, TP-Link pinout

Create Factory image
--------------------
As all installation methods require a U-Boot to be integrated into the
image (and we do not ship one with the image). We are not able to create
an image in the OpenWRT build-process.

Download a TP-Link image for your device variant (CA/EU or RU) from their
website and a OpenWRT sysupgrade image for the device
and build yourself a factory image like following:

TP-Link image:             tpl.bin
OpenWRT sysupgrade image:  owrt.bin

 > dd if=tpl.bin of=boot.bin bs=131584 count=1
 > cat owrt.bin >> boot.bin

Installing via Web-UI
---------------------
Upload the boot.bin via TP-Links firmware upgrade tool in the
web-interface.

Installing via Recovery
-----------------------
Activate Web-Recovery by beginning the upgrade Process with a
Firmware-Image from TP-Link. After starting the Firmware Upgrade,
wait ~3 seconds (When update status is switching to 0%), then
disconnect the power supply from the device. Upgrade flag (which
activates Web-Recovery) is written before the OS-image is touched and
removed after write is succesfull, so this procedure should be safe.

Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1.
When active, all LEDs but the WPS LED are off.
Remeber to assign yourself a static IP-address as DHCP is not active in
this mode.

The boot.bin can now be uploaded and flashed using the web-recovery.

Installing via TFTP
-------------------
Prepare an image like following (Filenames from factory image steps
apply here)

 > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1
 > dd if=tpl.bin of=tmp.bin bs=131584 count=1
 > dd if=tmp.bin of=boot.bin bs=512 skip=1
 > cat boot.bin >> tp_recovery.bin
 > cat owrt.bin >> tp_recovery.bin

Place tp_recovery.bin in root directory of TFTP server and listen on
192.168.0.66/24.

Connect router LAN ports with your computer and power up the router
while pressing the reset button. The router will download the image via
tftp and after ~1 Minute reboot into OpenWRT.

U-Boot CLI
----------
U-Boot CLI can be activated by holding down '4' on bootup.

Dual U-Boot
-----------
This is the first TP-Link MediaTek device to feature a split-uboot
design. The first (factory-uboot) provides recovery via TFTP and HTTP,
jumping straight into the second (firmware-uboot) if no recovery needs
to be performed. The firmware-uboot unpacks and executed the kernel.

Web-Recovery
------------
TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 /
TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition
before beginning to write and removes it afterwards. If the router boots
with this flag set, bootloader will automatically start Web-recovery and
listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT
factory image can be written.

By doing the same while performing sysupgrade, we can take advantage of
the Web-recovery in OpenWRT.

It is important to note that Web-Recovery is only based on this flag. It
can't detect e.g. a crashing kernel or other means. Once activated it
won't boot the OS before a recovery action (either via TFTP or HTTP) is
performed. This recovery-mode is indicated by an illuminated WPS-LED on
boot.

Co-authored-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
Signed-off-by: Renaud Gaspard <gaspardrenaud@hotmail.com>
Signed-off-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
Tested-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
Tested-by: Jaroslav Mikulík <byczech@gmail.com>
Tested-by: Ashipa Eko <ashipa.eko@gmail.com>
2023-11-19 21:29:39 +01:00
Roland Reinl
0a18259e4a ramips: add support for D-Link COVR-X1860 A1
The COVR-X1860 are MT7621-based AX1800 devices (similar to DAP-X1860, but
with two Ethernet ports and external power supply) that are sold in sets
of two (COVR-X1862) and three (COVR-X1863).

Specification:
 - MT7621
 - MT7915 + MT7975 2x2 802.11ax (DBDC)
 - 256MB RAM
 - 128 MB flash
 - 3 LEDs (red, orange, white), routed to one indicator in the top of the device
 - 2 buttons (WPS in the back and Reset at the bottom of the device)

MAC addresses:
 - LAN MAC (printed on the device) is stored in config2 partition as ASCII (entry factory_mac=xx:xx:xx:xx:xx:xx)
 - WAN MAC: LAN MAC + 3
 - 2.4G MAC: LAN MAC + 1
 - 5G MAC: LAN MAC + 2

The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1

Flashing via OEM Web Interface:
 - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-factory.bin via the OEM web interface firmware update
 - The configuration wizard can be skipped by directly going to http://192.168.0.1/UpdateFirmware_Simple.html

Flashing via Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the status LED blinks red
 - Open a Chromium based browser and goto http://192.168.0.1
 - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-recovery.bin

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the status LED blinks red
 - Open a Chromium based browser and goto http://192.168.0.1
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
 - Download https://github.com/openwrt/firmware-utils/blob/master/src/dlink-sge-image.c and https://raw.githubusercontent.com/openwrt/firmware-utils/master/src/dlink-sge-image.h
 - Compile a binary from the downloaded file, e.g. gcc dlink-sge-image.c -lcrypto -o dlink-sge-image
 - Run ./dlink-sge-image COVR-X1860 <OriginalFirmware> <OutputFile> -d
 - Example for firmware 102b01: ./dlink-sge-image COVR-X1860 COVR-X1860_RevA_Firmware_102b01.bin COVR-X1860_RevA_Firmware_102b01_Decrypted.bin -d

The pull request is based on the discussion in https://forum.openwrt.org/t/add-support-for-d-link-covr-x1860

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2023-11-19 19:35:39 +01:00
Philip Prindeville
b10768476f x86,armsr: interpolate GRUB_SERIAL into /etc/inittab
Some platforms have their console on other ports than ttyS0, so
allow the developer to tailor this on bespoke platform images.

Fixes issue #13401.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-11-19 17:33:37 +01:00
Chukun Pan
626344c992 mediatek: filogic: add JCG Q30 PRO support
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: Winbond 128MB
  RAM: DDR3 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset
  Power: DC 12V 1A

Flash instructions:
  1. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  2. Attach UART, pause at u-boot menu.
  3. Select "Upgrade ATF BL2", then use preloader.bin
  4. Select "Upgrade ATF FIP", then use bl31-uboot.fip
  5. Download the initramfs image, and type "reset",
     waiting for tftp recovery to complete.
  6. After openwrt boots up, perform sysupgrade.

Note:
  1. Since NMBM is disabled, we must back up all partitions.
  2. Although we can upgrade new firmware in the stock firmware,
     we need the special fit image signature of MediaTek and
     dual boot (hack kernel) to make u-boot boot it. So just
     abandon these hacks and flash it via the serial port.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-19 16:52:16 +01:00
Hauke Mehrtens
2cc587d123 kernel: remove CONFIG_DEVTMPFS_SAFE from target config
CONFIG_DEVTMPFS_SAFE is now part of the generic configuration. Remove it
from the target configurations.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-19 16:46:24 +01:00
Marius Dinu
07f90910c6 kernel: 6.1: Add missing config option DEVTMPFS_SAFE
Fixes build error when enabling CONFIG_KERNEL_DEVTMPFS in OpenWrt menuconfig.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
2023-11-19 16:43:07 +01:00
Robert Marko
9062e5faae
qualcommax: add addresses to DP nodes
DP nodes live under the soc node, and since soc is a simple bus it requires
node adresses to be present.

So, simply add the node addreses to avoid the following dtc warning:
Warning (unit_address_vs_reg): /soc/dp1: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp2: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp3: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp4: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp5: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp6: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp5-syn: node has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): /soc/dp6-syn: node has a reg or ranges property, but no unit name

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-18 12:23:54 +01:00
Robert Marko
6647e6d219 qualcommax: fix line endings in ESS dt-bindings
It seems that ESS dt-bindings somehow ended up with Windows line endings,
this is obviously incorrect, so lets convert it to UNIX endings.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-15 17:35:38 +01:00
Christian Marangi
76a981560a
ipq807x: fix typo in WAX630 for switch lan bmp
In fixing ipq8074 WAX630 dts, there was a typo in the switch lan bmp.
Fix it to fix compilarion error.

Fixes: f3cd4bfb7f ("ipq807x: fix multiple error on ESS switch port define")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-15 11:24:52 +01:00
Christian Marangi
f3cd4bfb7f
ipq807x: fix multiple error on ESS switch port define
Fix multiple error on ESS switch port define.
- Fix wrong switch CPU and WAN bmp define. (many times wan port are
  actually set in lan mask and lan port in wan mask)
- Renumber phyinfo port, use port_id instead of phy_address as it
  doesn't make sense using that for port enumeration
- Drop additional port for devices that have them not connected.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-15 11:02:30 +01:00
Rafał Miłecki
c60e9d1839 ath79: use "fixed-layout" for Embedded Wireless devices
Those devices have Ethernet interfaces using base MAC address increased
by 0x40 in the 3rd indexed byte (00:00:00:FF:00:00). To describe that we
were using a custom (downstream) "mac-address-increment-byte" property.

The same result can be achieved by using "mac-base" with a properly
adjusted offset value (0x40 << 16). It may be not pretty but it should
work without custom property or downstream kernel patch to support it.

Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Catrinel Catrinescu <cc@80211.de>
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
2023-11-15 07:14:32 +01:00
Christian Marangi
4d9108e0bf
ipq806x: fix wrong LEDs mode for non-standard qca8k LEDs
There was a typo in the LED definition for the mode of non-standard
qca8k LEDs. Mode for link speed was wrongly set to link-10 link-100
link-1000 while the real mode in sysfs is link_10 link_100 and
link_1000.

Fix the entry to the correct mode.

Fixes: c707cff6c9 ("ipq806x: add LEDs definition for non-standard qca8k LEDs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-15 01:23:03 +01:00
Robert Marko
c885169e02
qualcommax: move switch tick mode setting to ESS DTSI
Every board in qualcommax is using the same BM and TM switch tick modes, so
instead of specifying them in each board lets just set them in the ESS DTSI
directly.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-14 05:21:28 +01:00
Robert Marko
cb1702041f
qualcommax: use defines for MAC mode setting
Now that we have the MAC modes defined in DT bindings, lets replace all of
the raw hex values with defines.

While we are here, we can drop the disabled UNIPHY-s as that is the default
value in the ESS DTSI.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-14 05:21:27 +01:00
Robert Marko
8e162868ab
qualcommax: set default switch MAC modes
Every board that has the switch enabled needs to have MAC modes defined for
all 3 UNIPHY instances.

So, instead of having to at least put the disabled MAC mode for UNIPHY-s
let disable them by default and then boards can override it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-14 05:21:27 +01:00
Robert Marko
878ef51b01
qualcommax: add bindings for MAC modes
Since every board needs to define the correct MAC modes, it makes sense
to document the allowed hex values with a humanly readable name.

So, lets document all of the allowed MAC modes from SSDK 12.4 as bindings,
so later we can replace all of the hex values in DTS-es with these.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-11-14 05:21:24 +01:00