1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 20:23:53 +02:00
Commit Graph

28393 Commits

Author SHA1 Message Date
Robert Marko
4fa8fec6c0
ipq807x: 6.1: refresh patches
Manually refresh tsens, PCI and CPR patches to apply and compile.
Then run automatic refresh on rest of the patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-28 08:57:09 +02:00
Robert Marko
8195922526
ipq807x: drop upstreamed patches
Drop all of the patches that have been already been included in kernel 6.1.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-28 08:57:09 +02:00
Robert Marko
4eda3e8b9a
ipq807x: 6.1: copy patches and config from 5.15
Copy patches and config from kernel 5.15 to start preparing kernel 6.1
support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-28 08:57:09 +02:00
Robert Marko
bc66c05280
ipq807x: mark merged patches as backports
These 3 patches have been merged upstream, so mark them as backports
along with the kernel version they have been merged into.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-28 08:57:08 +02:00
Zoltan HERPAI
a3469a90c4 sifiveu: add new target for SiFive U-based boards
RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 5.15.

Supports running on:
 - HiFive Unleashed - FU540, first generation
 - HiFive Unmatched - FU740, current latest generation, PCIe

SD-card images are generated, where the partitions are required to have
specific type codes. As it is commonplace nowadays, OpenSBI is used as the
first stage, with U-boot following as the proper bootloader.

Specifications:

HiFive Unleashed:
 - CPU: SiFive FU540 quad-core RISC-V (U54, RV64IMAFDC or RV64GC)
 - Memory: 8Gb
 - Ethernet: 1x 10/100/1000
 - Console: via microUSB

HiFive Unmatched:
 - CPU: SiFive FU740 quad-core RISC-V (U74, RV64IMAFDCB or RV64GCB)
 - Memory: 16Gb
 - Ethernet: 1x 10/100/1000
 - USB: 4x USB 3.2
 - PCIe:  - 1x PCIe Gen3 x8
          - 1x M.2 key M (PCIe x4)
          - 1x M.2 Key E (PCIe x1 / USB2.0)
 - Console: via microUSB

Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-05-28 13:19:11 +02:00
Zoltan HERPAI
50c05f6cd7 generic: groundwork for RISC-V
Add build infrastructure for RISC-V.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-05-28 13:19:10 +02:00
Tony Ambardar
a15730a4eb armvirt: 6.1: enable kernel for testing
Build and run-tested on QEMU/armvirt32 and QEMU/armvirt64.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
398226fcdf armvirt: 6.1: update kernel configs
The following new common symbols are defined:

  CONFIG_ARCH_FORCE_MAX_ORDER=11
  # CONFIG_NET_9P_FD is not set

Removed symbols for armvirt/32 include:

  CONFIG_ARM_CRYPTO=y

New symbols for armvirt/64 include:

  CONFIG_ARM64_SME=y
  CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
  # CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
  # CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
fcf741a6f6 armvirt: 6.1: copy config from kernel 5.15
Copy config files for kernel 5.15 to kernel 6.1.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
99b9354c36 malta: 6.1: enable kernel for testing
Build and run-tested on QEMU/malta-be32 and QEMU/malta-le64.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
517bc68a94 malta: 6.1: update kernel config
The following new symbols are defined:

  CONFIG_ARCH_FORCE_MAX_ORDER=11
  CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
  CONFIG_ZBOOT_LOAD_ADDRESS=0x0

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
a588399f78 malta: 6.1: copy config from kernel 5.15
Copy config files for kernel 5.15 to kernel 6.1.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Tony Ambardar
1a40350e4d kernel: 6.1: add missing config symbols
Add generic config symbols found updating the malta and armvirt targets.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-28 07:45:50 +02:00
Daniel Golle
ba58245e83 mediatek: sync MT7988 USXGMII with SDK driver
The USXGMII driver in SDK was heavily refactored, some bugs have been
fixed and it has switched to use phylink_pcs. Follow up with changes
in SDK driver and sync our on-top-of-mainline driver with the SDK
driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-27 21:57:01 +01:00
Daniel Golle
037ce27244 mediatek: follow-up with renamed Build/bl2 and Build/bl31-uboot
Use renamed build step names for all boards which were not handled by
commit c620409d58 ("mediatek: filogic: add uboot build for mt7981")
and now breaking the build.

Fixes: c620409d58 ("mediatek: filogic: add uboot build for mt7981")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-27 21:57:01 +01:00
Chukun Pan
dc2d4d7393 mediatek: filogic: add Qihoo 360T7 support
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: MT5CC128M16JR-EK 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Flash instructions:
  1. Attach UART, boot the stock firmware until
     the message about failsafe mode appears.
  2. Enter failsafe mode by pressing "f" and "Enter"
  3. Type "mount_root", then run
     "fw_setenv bootmenu_delay 3"
  4. Back up all mtd partitions before flashing.
  5. Reboot, U-Boot now presents a menu.
  6. 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)
  7. Select "Upgrade ATF BL2", then use this file:
     openwrt-mediatek-filogic-qihoo_360t7-preloader.bin
  8. Select "Upgrade ATF FIP", then use this file:
     openwrt-mediatek-filogic-qihoo_360t7-bl31-uboot.fip
  9. Download the initramfs image, and type "reset",
     waiting for tftp recovery to complete.
  a. After openwrt boots up, perform sysupgrade.

Note:
  1. Since NMBM is disabled, we must back up all partitions.
  2. Flash instructions is based on commit 28df7f7.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-05-27 11:17:08 +01:00
Chukun Pan
c620409d58 mediatek: filogic: add uboot build for mt7981
Rename previous uboot build to mt7986-*.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-05-27 11:01:45 +01:00
Alexander Couzens
3eb354f999 mediatek: mt7981: add reserved memory to support pstore
Add reserved memory for pstore/ramoops to device tree used by Linux
as well as U-Boot.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-27 11:01:36 +01:00
Daniel Golle
213b728276 mediatek: cleanly backport and add fix for I2C driver
Pick accepted patches from upstream Linux tree instead of having to
maintain our slightly different downstream patches.
Import pending patch fixing I2C on MT7981 by making sure all clocks
are enabled before accessing I2C registers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-27 02:06:57 +01:00
Nick Hainke
ef98dc3b3e generic: add kernel tag to backport patch
In the previous commit, the kernel tag was not added when adding the
backport.

Fixes: 537624db39 ("generic: backport missing helper for phy interfaces")
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-26 23:04:48 +02:00
Nick Hainke
537624db39 generic: backport missing helper for phy interfaces
The function was defined before in the patch
"hack-5.15/795-backport-phylink_pcs-helpers.patch". However, the hack
did not move to 6.1. Instead of using the hack do the backport of
upstream accepted version.

Fixes errors in the form of:
  make[8]: Entering directory '/home/nick/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-6.1.29'
    CC      drivers/net/pcs/pcs-mtk-lynxi.o
  drivers/net/pcs/pcs-mtk-lynxi.c: In function 'mtk_pcs_lynxi_config':
  drivers/net/pcs/pcs-mtk-lynxi.c:160:30: error: implicit declaration of function 'phylink_get_link_timer_ns' [-Werror=implicit-function-declaration]
    160 |                 link_timer = phylink_get_link_timer_ns(interface);
        |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Fixes: fa79baf4a6 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-26 22:56:15 +02:00
Nick Hainke
2388b119de ramips: mark patches accepted upstream
Add kernel tags to the patches that got accepted upstream.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-26 16:22:11 +02:00
Daniel Golle
43d27b0252 mediatek: fix, clean and unify SD card image generation
Make sure sub-images on the SD card are size-checked, allow
generating SD card without squashfs and/or initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-26 14:31:36 +01:00
Felix Fietkau
911742989a kernel: disable wireless extension support for 6.1
It is unused

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-26 13:38:53 +02:00
Antti Nykänen
07c45c0859 ipq807x: add support for Compex WPQ873
The Compex WPQ873 is a development board with two M.2 B-key
 slots for cellular modems.

Device info:
 - IPQ8072A SoC
 - 512MiB RAM
 - 256MiB NAND flash
 - 8MiB SPI NOR
 - 3x 1GigE ports
 - 1x 2.5GigE port
 - 2.4GHz/5GHz AX WLAN
 - 1x USB 3.0 port
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x M.2 B-key socket with PCIe 2.0 and USB 3.0
 - 4x SIM card slots
 - Bluetooth LE 5.0 (QCA4024)

Prerequisites
1) TFTP server
2) 3.3V USB to TTL cable for UART console
   2.54mm pitch 4-pin header for UART is readily provided on board, no modifications are necessary to access it
   TTL connector pinout: 2=TX, 3=RX, 4=GND
   Arrow marks pin 1 which is 3.3V
   Serial port settings: 115200 8N1 no flow control

The device will most likely ship with a QSDK-based firmware.

1. Power on device and interrupt u-boot to obtain u-boot CLI

2. set serverip to IP address of the TFTP server, for example:

        `setenv serverip 192.168.1.10`

3. Download image from TFTP server:

        `tftpboot 0x44000000 openwrt-ipq807x-generic-compex_wpq873-squashfs-factory.ubi`

4. Flash ubi image to both partitions and reset:

        `sf probe
         imxtract 0x44000000 ubi
         nand device 0
         nand erase 0x0 0x3400000
         nand erase 0x3c00000 0x3400000
         nand write $fileaddr 0x0 $filesize
         nand write $fileaddr 0x3c00000 $filesize
         reset`

Afterwards, you can use sysupgrade to flash new OpenWRT images.

Signed-off-by: Antti Nykänen <antti.nykanen@nokia.com>
2023-05-26 13:05:02 +03:00
John Audia
c815ecdebd kernel: bump 5.15 to 5.15.113
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-05-26 11:50:37 +02:00
John Audia
3664c57e34 x86: disable CONFIG_X86_PLATFORM_DRIVERS_HP
New config option defaulted to N for this bump.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-05-26 11:50:37 +02:00
Andrzej Mialkowski
f2e1d37381
ipq806x: Add support for Netgear Nighthawk Pro Gaming XR450
Motivation:
 Firmware with platform ID "XR450" required for easy installation.

Manufacturer pages:
 Product page: https://www.netgear.com/support/product/xr450
 Product Data Sheet: https://www.netgear.com/images/datasheet/networking/wifirouter/XR450.pdf
 Current firmware: https://www.downloads.netgear.com/files/GDC/XR450/XR450-V2.3.2.134.zip

Specifications:
Almost identical to Netgear XR500(https://openwrt.org/toh/hwdata/netgear/netgear_xr500)

Differences:
	Platform ID: XR450, utilized for firmware validation
	WLAN 2.4GHz: b/g/n Supports QAM64 (XR500 QAM256)

SoC: Qualcomm Atheros IPQ8065
RAM: 512 MB
Storage: 256 MiB
Wireless: Qualcomm Atheros QCA9984
Switch: Qualcomm Atheros AR8337 rev. 2
Ethernet: 5x 1000/100/10
USB: 2x 3.0

Install via WEB GUI (recommended):
1. Navigate within GUI to firmware update section
2. Select openwrt-ipq806x-netgear_xr450-squashfs-factory.img
3. Dismiss downgrade warning

Install via TFTP recovery (same as XR500/R7800):

1. Configure host PC to use static address 192.168.1.10 https://openwrt.org/toh/netgear/r7800#prerequisites_for_tftp_flashing
2. Flash openwrt-ipq806x-netgear_xr450-squashfs-factory.img using procedure https://openwrt.org/toh/netgear/r7800#tftp_flashing_process

Revert to stock firmware
1. Download current manufacturer firmware, decompress zip file to obtain img file
2. Use TFTP recovery method flash img file (currently XR450-V2.3.2.134.img)
ipq806x: add support to netgear_xr450

Signed-off-by: Andrzej Mialkowski <andrzej.mialkowski@gmail.com>
2023-05-25 23:53:00 +02:00
Kazuki Hashimoto
ae8db3941c
kernel: Backport MGLRU patch from 6.4
This fixes a bug where the reclaim path could occasionally have long
tail latency.

Signed-off-by: Kazuki Hashimoto <kazukih0205@gmail.com>
2023-05-25 23:52:24 +02:00
Kazuki Hashimoto
b28b8ed1f4
kernel: 6.1: Synchronize MGLRU patches with upstream
Replace the refreshed 5.15 backports with backports for 6.1.

This fixes FMODE_CAN_ODIRECT having the same value as
FMODE_NOREUSE.

Signed-off-by: Kazuki Hashimoto <kazukih0205@gmail.com>
2023-05-25 23:52:24 +02:00
Robert Marko
3591353f51 generic: filter out CONFIG_PAHOLE_HAS_SPLIT_BTF
CONFIG_PAHOLE_HAS_SPLIT_BTF should be runtime detected as it depends on
pahole being available on the host, so filter it out of configs.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Robert Marko
344540d727 generic: 6.1: disable CONFIG_VMWARE_VMCI by default
There is no reason for VMware VMCI to be disabled in targets, so disable
it in the generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Robert Marko
16799045bf generic: 6.1: disable CONFIG_OCTEON_EP by default
There is no reason for Octeon PCI endpoint driver to be disabled in targets
so disable it in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Robert Marko
62e88d22b9 generic: 6.1: disable CONFIG_HP_WATCHDOG by default
There is no reason for HP ProLiant HW watchdog to be disabled in individual
targets, so disable it in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Robert Marko
bccc6a58ce generic: 6.1: disable CONFIG_ARCH_NXP by default
There is no reason for CONFIG_ARCH_NXP to have to be disabled in individual
targets, so just disable CONFIG_ARCH_NXP in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Robert Marko
bcb094f549 generic: 6.1: disable CONFIG_SURFACE_PLATFORMS by default
There is no need for Surface platform drivers to be enabled by default,
especially on OpenWrt so disable CONFIG_SURFACE_PLATFORMS in the generic
config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-24 21:46:27 +02:00
Sam Shih
e3a681bab4 mediatek: add basic mt7988 device tree support
This add basic device tree support for mediatek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
e4555d69a1 mediatek: backport cpufreq changes to support MT7988
Backport cpufreq changes from upstream so that the MediaTek MT7988 SoC
can be supported.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
a3cf3e2c48 mediatek: filogic: add driver for Richtek RT5190A regulator
The Richtek RT5190A is used on the MT7988 reference board. Backport and
enable the driver on the filogic subtarget, so we can support cpufreq
on the MT7988 reference board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
ef2a831dab mediatek: add driver for built-in 2.5G Ethernet PHY
Add driver for the built-in 2.5G Ethernet PHY found in the MT7988 SoC.
To function the PHY also needs firmware files which have not yet been
published via linux-firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
987a0b2b30 mediatek: update pending SoC Ethernet PHY driver
Update driver for MediaTek's built-in Gigabit Ethernet PHYs which can be
found in the MT7981 and MT7988 SoCs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
958fdf36e3 generic: mt7530: backport support for the MT7988 built-in switch
Backport commits adding support for the MT7988 built-in switch to the
mt7530 driver.

This change results in the Kconfig symbol NET_DSA_MT7530 to be extended
by NET_DSA_MT7530_MDIO (everything formally covered by NET_DSA_MT7530)
and NET_DSA_MT7530_MMIO (a new driver for the MMIO-connected built-in
switch of the MT7988 SoC).

Select NET_DSA_MT7530_MDIO for all targets previously selecting
NET_DSA_MT7530, with the exception of mediatek/filogic which also
selects NET_DSA_MT7530_MMIO.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
6983a215d9 generic: add support for MediaTek NETSYS v3
In order to support Ethernet on the MT7988 SoC add support for NETSYS v3
as well as new paths and USXGMII SerDes to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Sam Shih
9e6a7e808f mediatek: add mt7988 pinctrl driver support
This adds provisional pinctrl driver support for the MediaTek MT7988 SoC.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Sam Shih
b33c185876 mediatek: add mt7988 clock drivers support
This adds clock drivers for the MediaTek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Daniel Golle
a9989b30d0 mediatek: mt7981: setup all clocks needed for eMMC
Setup all necessary clocks to get MMC to work on MT7981, similar to
how it is done also on MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-23 15:53:22 +01:00
Chukun Pan
b2beb4c688 mediatek: mt7981: usb enable 3.0 by default
There is no reason to limit USB to 2.0 mode
by default, delete this limit.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-05-23 15:53:22 +01:00
Tony Ambardar
c2d194a34e kernel: enable (ARM|ARM64)_MODULE_PLTS in generic config
This allows loading modules with large memory requirements, recently needed
while testing on armvirt/32. Past forum discussions [1] and bug reports [2]
also raised this and the ipq806x target already set it in response [3].
Given this increases kernel image size by only ~1KB, is generally useful on
multi-platform kernels, and enabled by default on upstream arm32 Linux, add
it to the generic config.

The setting has similar utility on arm64, is a requirement for KASLR, and
already enabled on most OpenWrt aarch64 targets, so pull this into the
top-level generic config.

[1]: https://forum.openwrt.org/t/vmap-allocation-for-size-442368-failed-use-vmalloc-size-to-increase-size/34545/7
[2]: https://github.com/openwrt/openwrt/issues/8282
[3]: f81e148eb6 ("ipq806x: update 4.19 kernel config").

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-23 05:49:46 -07:00
Aleksander Jan Bajkowski
cec0a38ade
kernel: add disabled symbol CONFIG_CPU_LITTLE_ENDIAN on 6.1
The identical change was previously added to the 5.15 kernel in the commit
9226f1e419 ("kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config").

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-23 14:26:56 +02:00
Aleksander Jan Bajkowski
4f197f9134
kernel: sort generic configuration
This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.15 /dev/null > target/linux/generic/config-5.15-new
$ mv target/linux/generic/config-5.15-new target/linux/generic/config-5.15

$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-23 14:26:07 +02:00
Daniel Golle
d6fef27f2d mediatek: mt7623: build SD card without all filesystems
Allow building SD card images without having both initramfs and squashfs
present on the card, just like it has already been done for the mt7622
and filogic subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-22 23:04:09 +01:00
Christian Marangi
4c4ba37896
ipq806x: enable testing kernel version with 6.1 version
Enable testing kernel version with 6.1 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi
b2d3131edf
ipq806x: 6.1: refresh config and add missing symbols
Refresh config for kernel 6.1 and add missing symbols
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/ipq806x/config-6.1 /dev/null > target/linux/ipq806x/config-6.1-new
$ mv target/linux/ipq806x/config-6.1-new target/linux/ipq806x/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi
33a9bce278
ipq806x: 6.1: refresh dts
Refresh dts for kernel 6.1 support.
Changes:
- nbg6817 drop amba node and reference directly sdcc1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi
64c204c586
ipq806x: 6.1: refresh kernel patches
Refresh ipq806x kernel patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi
eb69d7a4ff
ipq806x: 6.1: manually refresh kernel patches
Refresh kernel patches for version 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi
f92bf3ffbc
ipq806x: 6.1: replace ZRELADDR HACK patch with new version
With 6.1 lots have changed and the platform for Makefile.boot got
dropped. Replace the patch with a new version that is alligned to the
new implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi
d06b859ada
ipq806x: 6.1: drop upstream patch
Drop patch that got merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:21 +02:00
Christian Marangi
dbac8e8819
ipq806x: 6.1: copy patches, files and config from 5.15
Copy patches, files and config from 5.15 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:21 +02:00
Robert Marko
4a02c5954f
kernel: modules: wwan: adapt for kernel 6.1
Update the WWAN kmods for compilation under kernel 6.1:
* Depend on kernel not being 5.10 rather than only 5.15
* Enable CONFIG_WWAN_DEBUGFS as its now optional from 5.17
* Add missing symbols for new WWAN drivers to generic config

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-22 22:28:20 +02:00
Pawel Dembicki
47e43c86e4
generic: kernel: add missing symbol
Add missing symbol while adding layerscape support

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[ add commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:19 +02:00
Robert Marko
178278bcd3
generic: 6.1: add missing symbols
These symbols got exposed once building for ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-22 22:28:19 +02:00
Christian Marangi
6bdc6bb173
generic: 6.1: refresh config and add missing symbols
Refresh generic config for 6.1 and add missing symbols.
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:19 +02:00
Christian Marangi
9273487930
kernel: use eth_random_addr instead of random_ether_addr
random_ether_addr is just a reference to eth_random_addr, that was later
dropped in more recent kernel version.

Drop random_ether_addr and use eth_random_addr directly to fix
compilation error in 6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:18 +02:00
Christian Marangi
0605fa693e
kernek: use struct_group to wipe ar8216 volatile priv data
Instead of reference vlan and do strange subtraction, use the handy
struct_group() to create a virtual struct of the same size of the
members. This permits to have a more secure memset and fix compilation
warning in 6.1 where additional checks are done.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:18 +02:00
Christian Marangi
fb6de77a82
kernel: refresh swconfig_leds to handle new trigger locking
Refresh swconfig_leds source to handle new trigger locking that is now a
spinlock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi
5f987b84ef
kernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1
Kernel 6.1 expanded the priv_flags to long bitmap so update and restore
it to priv_flags.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi
4ed347aaad
generic: 6.1: refresh pending patches
Refresh pending patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi
aa56d00aa6
generic: 6.1: refresh hack patches
Refresh hack patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi
f79af59383
generic: 6.1: refresh backport patches
Refresh backport patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi
ce345dd0df
generic: 6.1: add pending OPP set opp improvement patch
Add pending OPP set opp improvement patch to better handle _set_opp
function in clock scaling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi
7f7ee27d5f
generic: 6.1: add patch to compile ieee8211 headers
With kernel 6.1 ieee2111_ptr is not compiled by default. Add pending
patch to restore this to make backports project compatible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi
e41466edab
generic: 6.1: manually refresh mglru patch with new kernel version
Refresh mglru patch for new kernel version due to very fun backport
changing name from folio to pages.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi
19a246bb65
generic: 6.1: manually refresh hack patches
Refresh hack patches for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi
92a0cc7c61
generic: 6.1: drop pending patch backported as fixes
Drop pending patch backported as fixes in later kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi
fcab78c09f
generic: 6.1: manually refresh pending patches
Refresh pending patches for kernel 6.1.

Changes:
- Refresh mtd patches with new implementation.
- Change 191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source as
  uie_unsupported got dropped and we now set the bit directly.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi
9aee67efbb
generic: 6.1: manually refresh backport patches
Refresh backport patches that still needs to be merged for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi
3be6f3592e
generic: 6.1: drop backport patches
Drop all backport patches that are now included in kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi
fa79baf4a6
generic: copy backport, hack, pending patch and config from 5.15 to 6.1
Copy backport, hack, pending patch and config from 5.15 to 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:13 +02:00
Pietro Ameruoso
1c05388ab0 mediatek: add support for Zyxel EX5601-T0 router
Zyxel EX5601-T0 specifics
--------------
The operator specific firmware running on the Zyxel branded
EX5601-T0 includes  U-Boot modifications affecting the OpenWrt
installation.

Partition Table
| dev  | size     | erasesize | name          |
| ---- | -------- | --------- | ------------- |
| mtd0 | 20000000 | 00040000  | "spi0.1"      |
| mtd1 | 00100000 | 00040000  | "BL2"         |
| mtd2 | 00080000 | 00040000  | "u-boot-env"  |
| mtd3 | 00200000 | 00040000  | "Factory"     |
| mtd4 | 001c0000 | 00040000  | "FIP"         |
| mtd5 | 00040000 | 00040000  | "zloader"     |
| mtd6 | 04000000 | 00040000  | "ubi"         |
| mtd7 | 04000000 | 00040000  | "ubi2"        |
| mtd8 | 15a80000 | 00040000  | "zyubi"       |

The router boots BL2 which than loads FIP (u-boot).
U-boot has hardcoded a command to always launch Zloader "mtd read zloader 0x46000000" and than "bootm". Bootargs are deactivated.
Zloader is the zyxel booloader which allow to dual-boot ubi or ubi2, by default access to zloader is blocked.
Too zloader checks that the firmware contains a particolar file called zyfwinfo.
Additional details regarding Zloader can be found here:
https://hack-gpon.github.io/zyxel/
https://forum.openwrt.org/t/adding-openwrt-support-for-zyxel-ex5601-t0/155914

Hardware
--------
SOC: MediaTek MT7986a
CPU: 4 core cortex-a53 (2000MHz)
RAM: 1GB DDR4
FLASH: 512MB SPI-NAND (Micron xxx)
WIFI: Wifi6 Mediatek MT7976 802.11ax 5 GHz 4x4 + 2.4GHZ 4x4
ETH: MediaTek MT7531 Switch + SoC
3 x builtin 1G phy (lan1, lan2, lan3)
1 x MaxLinear GPY211B 2.5 N-Base-T phy5 (lan4)
1 x MaxLinear GPY211B 2.5Gbit xor SFP/N-Base-T phy6 (wan)
USB: 1 x USB 3.2 Enhanced SuperSpeed port
UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC)
VOIP: 2 FXS ports for analog phones

MAC Address Table
-----------------
eth0/lan    Factory 0x002a
eth1/wan    Factory 0x0024
wifi 2.4Ghz Factory 0x0004
wifi 5Ghz   Factory 0x0004 + 1

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

Installation
------------
Keep in mind that openwrt can only run on the UBI partition, the openwrt firmware is not able to understand the zloader bootargs.
The procedure allows restoring the UBI partition with the Zyxel firmware and retains all the OEM functionalities.

1. Unlock Zloader (this will allow to swap manually between partitions UBI and UBI2):
- Attach a usb-ttl adapter to your computer and boot the router.
- While the router is booting at some point you will read the following: `Please press Enter to activate this console.`
- As soon as you read that press enter, type root and than press enter again (just do it, don't care about the logs scrolling).
- Most likely the router is still printing the boot log, leave it boot until it stops.
- If everything went ok you should have full root access "root@EX5601-T0:/#".
- Type the following command and press enter: "fw_setenv EngDebugFlag 0x1".
- Reboot the router.
- As soon as you read `Hit any key to stop autoboot:` press Enter.
- If everything went ok you should have the following prompt: "ZHAL>".
- You have successfully unlocked zloader access, this procedure must be done only once.

2. Check the current active partition:
- Boot the router and repeat the steps above to gain root access.
- Type the following command to check the current active image: "cat /proc/cmdline".
- If `rootubi=ubi` it means that the active partition is `mtd6`
- If `rootubi=ubi2` it means that the active partition is `mtd7`
- As mentioned earlier we need to flash openwrt into ubi/mtd6 and never overwrite ubi2/mtd7 to be able to fully roll-back.
- To activate and boot from mtd7 (ubi2) enter into ZHAL> command prompt and type the following commands:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- After rebooting check again with "cat /proc/cmdline" that you are correctly booting from mtd7/ubi2
- If yes proceed with the installation guide. If not probably you don't have a firmware into ubi2 or you did something wrong.

3. Flashing:
- Download the sysupgrade file for the router from openwrt, than we need to add the zyfwinfo file into the sysupgrade tar.
Zloader only checks for the magic (which is a fixed value 'EXYZ') and the crc of the file itself (256bytes).
I created a script to create a valid zyfwinfo file but you can use anything that does exactly the same:
https://raw.githubusercontent.com/pameruoso/OpenWRT-Zyxel-EX5601-T0/main/gen_zyfwinfo.sh
- Add the zyfwinfo file into the sysupgrade tar.
- Enter via telnet or ssh into the router with admin credentials
- Enter the following commands to disable the firmware and model checks
"zycli fwidcheck off" and "zycli modelcheck off"
- Open the router web interface and in the update firmware page select the "restore default settings option"
- Select the sysupgrade file and click on upload.
- The router will flash and reboot itself into openwrt from UBI

4. Restoring and going back to Zyxel firmware.
- Use the ZHAL> command line to manually swap the boot parition to UBI2 with the following:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- You will boot again the Zyxel firmware you have into UBI2 and you can flash the zyxel firmware to overwrite the UBI partition and openwrt.

Working features
----------------
3 gbit lan ports
Wifi
Zyxel partitioning for coexistance with Zloader and dual boot.
WAN SFP port (only after exporting pins 57 and 10. gpiobase411)
leds
reset button
serial interface
usb port
lan ethernet 2.5 gbit port (autosense)
wan ethernet 2.5 gbit port (autosense)

Not working
----------------
voip (missing drivers or proper zyxel platform software)

Swapping the wan ethernet/sfp xor port
----------------
The way to swap the wan port between sfp and ethernet is the following:
export the pins 57 and 10.
Pin 57 is used to probe if an sfp is present.
If pin 57 value is 0 it means that an sfp is present into the cage (cat /sys/class/gpio/gpio468/value).
If pin 57 value is 1 it means that no sfp is inserted into the cage.
In conclusion by default both 57 an 10 pins are by default 1, which means that the active port is the ethernet one.
After inserting an SFP pin 57 will become 0 and you have to manually change the value of pin 10 to 0 too.
This is totally scriptable of course.

Leds description
------------
All the leds are working out of the box but the leds managed by the 2 maxlinear phy (phy 5 lan, phy6 wan).
To activate the phy5 led (rj45 ethernet port led on the back of the router) you have to use mdio-tools.
To activate the phy6 led (led on the front of the router for 2.5gbit link) you have to use mdio-tools.
Example:
Set lan5 led to fast blink on 2500/1000, slow blink on 10/100:
mdio mdio-bus mmd 5:30 raw 0x0001 0x33FC

Set wan 2.5gbit led to constant on when wan is 2.5gbit:
mdio mdio-bus mmd 6:30 raw 0x0001 0x0080

Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
2023-05-22 17:58:59 +02:00
Shiji Yang
0ffbef9317 ath79: add support for D-Link DIR-859 A3
Specifications:
  SOC:      QCA9563 775 MHz + QCA9880
  Switch:   QCA8337N-AL3C
  RAM:      Winbond W9751G6KB-25 64 MiB
  Flash:    Winbond W25Q128FVSG 16 MiB
  WLAN:     Wi-Fi4 2.4 GHz 3*3 + 5 GHz 3*3
  LAN:      LAN ports *4
  WAN:      WAN port *1
  Buttons:  reset *1 + wps *1
  LEDs: ethernet *5, power, wlan, wps

MAC Address:
  use      address               source1          source2
  label    40:9b:xx:xx:xx:3c     lan && wlan      u-boot,env@ethaddr
  lan      40:9b:xx:xx:xx:3c     devdata@0x3f     $label
  wan      40:9b:xx:xx:xx:3f     devdata@0x8f     $label + 3
  wlan2g   40:9b:xx:xx:xx:3c     devdata@0x5b     $label
  wlan5g   40:9b:xx:xx:xx:3e     devdata@0x76     $label + 2

Install via Web UI:
  Apply factory image in the stock firmware's Web UI.

Install via Emergency Room Mode:
  DIR-859 A1 will enter recovery mode when the system fails to boot
  or press reset button for about 10 seconds.

  First, set computer IP to 192.168.0.5 and Gateway to 192.168.0.1.
  Then we can open http://192.168.0.1 in the web browser to upload
  OpenWrt factory image or stock firmware. Some modern browsers may
  need to turn on compatibility mode.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
Shiji Yang
e5d8739aa8 ath79: improve support for D-Link DIR-8x9 A1 series
1. Remove unnecessary new lines in the dts.
2. Remove duplicate included file "gpio.h" in the device dts.
3. Add missing button labels "reset" and "wps".
4. Unify the format of the reg properties.
5. Add u-boot environment support.
6. Reduce spi clock frequency since the max value suggested by the
   chip datasheet is only 25 MHz.
7. Add seama header fixup for DIR-859 A1. Without this header fixup,
   u-boot checksum for kernel will fail after the first boot.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
INAGAKI Hiroshi
e8f7957450 ath79: enable NVMEM u-boot-env driver on generic subtarget
This patch enables NVMEM u-boot-env driver (COFNIG_NVMEM_U_BOOT_ENV) on
generic subtarget to use from devices, for MAC address and etc.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-05-22 14:45:03 +02:00
Shiji Yang
2fbb91d73f ramips: correct page read return value of the mt7621 nand driver
read_page() need to return maximum number of bitflips instead of the
accumulated number. Change takes from upstream mt7621 u-boot [1].

 * @read_page:  function to read a page according to the ECC generator
 *              requirements; returns maximum number of bitflips
 *              corrected in any single ECC step, -EIO hw error

[1] https://lore.kernel.org/all/cover.1653015383.git.weijie.gao@mediatek.com/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
Christian Lamparter
aed2569d37 uml: fix build error due to frame size > 1024
the UML build fails during the kernel build:
| arch/um/drivers/net_kern.c: In function 'compute_hash':
| arch/um/drivers/net_kern.c:322:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|  322 | }
|      | ^
|cc1: all warnings being treated as errors

The compute_hash() function is added by our patch:
102-pseudo-random-mac.patch

Instead of allocating a 1024 byte buffer on the stack for the SHA1
digest input, let's allocate the data on the heap. We should be
able to do that since crypto_alloc_ahash and ahash_request_alloc
also need to allocate structures on the heap.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-22 14:45:03 +02:00
Felix Baumann
066441b5e4 treewide: Disable building 8M RAM devices
Following deprecation notice[1] in 21.02, disable target with 8M of RAM

[1] https://openwrt.org/supported_devices/864_warning

Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-05-21 01:08:31 +02:00
Felix Baumann
f5cb556d4f treewide: Disable building 32M RAM devices
Following deprecation notice[1] in 21.02, disable targets with 32M of RAM

[1] https://openwrt.org/supported_devices/864_warning

Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-05-21 01:08:22 +02:00
Felix Baumann
3f297be1ed treewide: Disable building 16M RAM devices
Following deprecation notice[1] in 21.02, disable targets with 16M of RAM

[1] https://openwrt.org/supported_devices/864_warning

Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-05-21 01:07:51 +02:00
DENG Qingfang
09d0643c18 ramips: mt7621: fix Xiaomi Router 3G/Pro LEDs
The PHY name has been changed to "mt7530-0" since IRQ support
was added to MT7530 driver.

Fixes: f9cfe7af1f ("kernel: backport MT7530 IRQ support")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
(node names, added color, function+function-enumerator properties)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-20 23:24:50 +02:00
Stan Grishin
c191c2d46f x86: base-files add support for Sophos 135r3/135r3w
The Sophos SG/XG-135 revision 3 has odd numbering of eth ports
where the WAN port (as marked on the case) is:
`eth6` and `eth0`, `eth1`, `eth2`, `eth3`, `eth5`, `eth7`, `eth8` are LAN ports.
Port `eth4` seems to be the SFP port.

Also add the missing LED definition for supported Sophos devices.

Original discussion at:
https://forum.openwrt.org/t/openwrt-on-revision-3-of-sophos-desktop-appliances/152912

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-05-20 23:24:00 +02:00
Sander van Deijck
4642d8abdc kirkwood: add support for Iomega Storcenter ix4-200d
Iomega Storcenter ix4-200d is a four-bay SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1.2GHz. It has 512MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 2x 1Gbit/s NIC

Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1200Mhz
- Flash size: 32 MiB
- RAM: 512MB
- LAN: 2x 1Gbit/s
- 3x USB 2.0

Notes:
- The blue drive LED is triggered by HDD activity, it can not be controlled
  via GPIO.
- The LCD screen requires proprietary code and does not function at this time.
- Due to a kernel-related issue with the Marvell 88SE6121 SATA controller,
  currently only trays numbered #3 and #4 work, #1 and #2 do not. [1]

Serial pinout:

    CN4
    --------------
    | 10 8 6 4 2 |
    |  9 7 5 3 1 |
    -------------- PIN 1 Mark (fat line)

     1 = RXD
     4 = TXD
     6 = GND
     9 = 3.3V (not necessary to connect)

Installation instructions:
1. download initramfs-uImage and copy into tftp server
2. connect the tftp server to network port #1
3. access uboot environment with serial cable and run

    setenv mainlineLinux yes
    setenv arcNumber 1682
    setenv console 'console=ttyS0,115200n8'
    setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
    setenv bootargs_root 'root='
    setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
    saveenv
    setenv serverip 192.168.1.1
    setenv ipaddr 192.168.1.2
    tftpboot 0x00800000 [initramfs-uImage filename]
    bootm 0x00800000

4. connect to LAN on network port #2, log into openwrt and sysupgrade to install into flash

[1] https://bugzilla.kernel.org/show_bug.cgi?id=216094

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
(aligned FROM from signed-off. LED+key rename, whitespace removal)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-20 15:35:37 +02:00
Aleksander Jan Bajkowski
7365e6b00a kernel: remove obsolete kernel version switches
This removes unneeded kernel version switches from the targets after
kernel 5.10 has been dropped.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-20 15:19:14 +02:00
Tiago Gaspar
3f99b2b3f7 kernel: net: add support for kernel tls
Add ktls (Kernel TLS) kmods to enable TLS support
in kernel (allowing TLS offload when the network
card supports it)

Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
(added disabled symbols)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-20 15:19:14 +02:00
Christian Lamparter
eab9de0c9c ipq40xx: convert EZVIZ CS-W3-WD1200G-EUP to DSA
Convert the repeater to DSA.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-20 15:19:14 +02:00
Lech Perczak
25eead21c5 ath79: fix 5GHz on QCA9886 variant of ZTE MF286
Recently, a strange variant of ZTE MF286 was discovered, having QCA9886
radio instead of QCA9882 - like MF286A, but having MF286 flash layout
and rest of hardware.
To support both variants in one image, bind calibration data at offset
0x5000 both as "calibration" and "pre-calibration" nvmem-cells, so
ath10k can load caldata for both at runtime.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-05-20 15:19:14 +02:00
Jan Forman
8d618a3186 ath79: Add support for D-Link DIR-869-A1
Specifications
	The D-Link EXO AC1750 (DIR-869) router released in 2016.
	It is powered by Qualcomm Atheros QCA9563 @ 750 MHz chipset, 64 MB RAM and 16 MB flash.
	10/100/1000 Gigabit Ethernet WAN port
	Four 10/100/1000 Gigabit Ethernet LAN ports
	Power Button, Reset Button, WPS Button, Mode Switch

Flashing
	1. Upload factory.bin via D-link web interface (Management/Upgrade).

Revert to stock
	Upload original firmware via OpenWrt sysupgrade interface.

Debricking
	D-Link Recovery GUI (192.168.0.1)

Signed-off-by: Jan Forman <forman.jan96@gmail.com>
2023-05-20 13:43:09 +02:00
Jan Forman
2f4b6d0f89 ath79: Convert calibration data to nvmem
For D-link DIR-859 and DIR-869
Replace the mtd-cal-data by an nvmem-cell.
Add the PCIe node for the ath10k radio to the devicetree.
Thanks to DragonBlue for this patch

Signed-off-by: Jan Forman <jforman@tuta.io>
2023-05-20 13:43:09 +02:00
Jan Forman
6ea910ab54 ath79: Create shared dtsi for DIR-859
Create a shared dtsi for the dir-859 and similarly device, it similarly as it done for the dir-842.

Signed-off-by: Jan Forman <jforman@tuta.io>
2023-05-20 13:43:09 +02:00
Jan Forman
7a29230752 ath79: Replace reset-button for DIR-859
gpio-export for the switch reset pin replaced with a reset pin definition for the driver, within the phy node.

Signed-off-by: Jan Forman <forman.jan96@gmail.com>
Tested-By: Sebastian Schaper <openwrt@sebastianschaper.net>
2023-05-20 13:43:09 +02:00
Shiji Yang
ab7e251303 ramips: fix build error on Airlink AR670W
The 'KERNEL' is not referenced by other objects, so double '$$' will
cause shell unable to parse the variable 'BLOCKSIZE':
  dd ... bs=$(BLOCKSIZE) conv=sync
  bash: line 1: BLOCKSIZE: command not found

Fixes: 09a0efbe83(ramips: set default BLOCKSIZE to 64k for nor flash devices)
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-19 23:33:49 +02:00
Hauke Mehrtens
53956dd2f6 ath25: Replace fall through comment with fallthrough;
Replace the fall through comment with fallthrough; in the ar2315 flash
driver.
This fixes a compile warning.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-19 11:59:04 +02:00
Hauke Mehrtens
13656378e9 ath25: Remove virt_to_phys() from Ethernet driver
Instead of defining an own virt_to_phys() use the version from the
generic MIPS arch code which does the same.
This fixes a compile warning.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-19 11:59:04 +02:00
Daniel Golle
a384490b10 mediatek: fix append-gl-metadata when running in buildbot
Use same logic as in append-metadata so build doesn't fail in case of
missing build-key (it was previously failing on the buildbot runners).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-19 09:34:22 +01:00
Robert Marko
cf19fd0cb5 ipq40xx: fix rebooting after 5.15.111
Kernel 5.15.111 includes backport of commit
("firmware: qcom_scm: Clear download bit during reboot") which is causing
reboot on ipq40xx to stop working, more precisely the board will hang after
reboot is called with:
root@OpenWrt:/# reboot
root@OpenWrt:/# [   76.473541] device lan1 left promiscuous mode
[   76.474204] br-lan: port 1(lan1) entered disabled state
[   76.527975] device lan2 left promiscuous mode
[   76.530301] br-lan: port 2(lan2) entered disabled state
[   76.579376] device lan3 left promiscuous mode
[   76.581698] br-lan: port 3(lan3) entered disabled state
[   76.638434] device lan4 left promiscuous mode
[   76.638777] br-lan: port 4(lan4) entered disabled state
[   76.978489] qca8k-ipq4019 c000000.switch wan: Link is Down
[   76.978883] device eth0 left promiscuous mode
[   76.987077] ipqess-edma c080000.ethernet eth0: Link is Down
[
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.1-00123
S - IMAGE_VARIANT_STRING=DAABANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x00000021
S - Reset status Config, 0x00000010
S - Core 0 Frequency, 0 MHz
B -       261 - PBL, Start
B -      1339 - bootable_media_detect_entry, Start
B -      1679 - bootable_media_detect_success, Start
B -      1693 - elf_loader_entry, Start
B -      5076 - auth_hash_seg_entry, Start
B -      7223 - auth_hash_seg_exit, Start
B -    578349 - elf_segs_hash_verify_entry, Start
B -    696356 - PBL, End
B -    696380 - SBL1, Start
B -    787236 - pm_device_init, Start
D -         7 - pm_device_init, Delta
B -    788701 - boot_flash_init, Start
D -     52782 - boot_flash_init, Delta
B -    845625 - boot_config_data_table_init, Start
D -      3836 - boot_config_data_table_init, Delta - (419 Bytes)
B -    852841 - clock_init, Start
D -      7566 - clock_init, Delta
B -    864883 - CDT version:2,Platform ID:9,Major ID:0,Minor ID:0,Subtype:64
B -    868413 - sbl1_ddr_set_params, Start
B -    873402 - cpr_init, Start
D -         2 - cpr_init, Delta
B -    877842 - Pre_DDR_clock_init, Start
D -         4 - Pre_DDR_clock_init, Delta
D -     13234 - sbl1_ddr_set_params, Delta
B -    891155 - pm_driver_init, Start
D -         2 - pm_driver_init, Delta
B -    909105 - Image Load, Start
B -   1030210 - Boot error ocuured!. Error code: 303d

So, until a proper fix is found, lets revert the culprit patch to have
reboot working again.

Fixes: 228e0e1039 ("kernel: bump 5.15 to 5.15.111")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-18 22:24:04 +02:00
John Audia
6605b595ed kernel: bump 5.15 to 5.15.112
Manually adjusted before running quilt due to new location in tree:
	backport-5.15/780-v5.16-bus-mhi-pci_generic-Introduce-Sierra-EM919X-support.patch
	backport-5.15/781-v6.1-bus-mhi-host-always-print-detected-modem-name.patch
	pending-5.15/790-bus-mhi-core-add-SBL-state-callback.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-05-18 18:22:27 +02:00
Tianling Shen
8f578c15b3 rockchip: add NanoPi R2C support
The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC
chip changed from rtl8211e to yt8521s, and otherwise identical to R2S.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 17:42:53 +02:00
Tianling Shen
64afcbad3d kernel: backport Motorcomm YT8521/YT8531 support
It will be used on NanoPi R2C and OrangePi R1 Plus LTS board.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 17:42:53 +02:00
Tianling Shen
afff2feb28 rockchip: move UBOOT_DEVICE_NAME to default
Simplify variable usage.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 17:42:53 +02:00
Tianling Shen
e35c7ab51f rockchip: merge bootscript
The bootscript for nanopi r2s/r4s only changes the serial address, so
make it auto detected in mmc bootscript rather than creating more
(redudant) files.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 17:42:53 +02:00
Christian Lamparter
1465691319 ipq806x: remove dangling ipq-wifi-edgecore_ecw5410
should have been part of the ipq-wifi update.

Fixes: 8217f02a1c ("ipq-wifi: drop upstreamed board-2.bin")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-18 17:11:43 +02:00
Tim Harvey
1f5f17798a imx: image: ventana: add blkdev compressed disk image
Add a ventana-img.gz compressed disk image to support
squashfs+ext4 on a block storage device such as USB/MMC/SATA.

The Ventana bootloader expects the bootscript to be
boot/6x_bootscript-ventana therefore we must create a bootfs
that matches this.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-05-18 17:11:43 +02:00
Tim Harvey
43af3c94be imx: image: ventana: use squashfs rootfs for non NAND devices
In order to support squashfs+ext4 define rootfstype=squashfs and use P2
as P1 is boot filesystem.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-05-18 17:11:43 +02:00
Shiji Yang
b09a83808a ramips: add basic common recipe for nand flash devices
These same codes are repeated for many devices now, it's better to
move them to shared definition. This commit also add the missing
KERNEL_SIZE of the ZyXEL NR7101 and ZyXEL LTE3301-PLUS.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-18 16:46:16 +02:00
Shiji Yang
09a0efbe83 ramips: set default BLOCKSIZE to 64k for nor flash devices
In kernel 5.15, the default erase sector size of the nor flash has
been switched from 4k to 64k. This may cause the configuration not
be preserved across upgrades. To avoid this issue, change the default
BLOCKSIZE to 64k.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-18 16:46:16 +02:00
Shiji Yang
d343a15314 ramips: enable variable sector size erasure for all subtarget
Make use of minor sector size (4k) on supported flash chips to improve
spi read/write performance.

Tested on ramips/mt7628: Motorola MWR03

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-18 16:46:16 +02:00
Christian Lamparter
8217f02a1c ipq-wifi: drop upstreamed board-2.bin
The BDFs for the:
	Aruba AP-365
	Devolo Magic 2 WiFi next
	Edgecore ECW5410
	Edgecore OAP100
	Extreme Networks WS-AP3915i
	GL.iNet GL-A1300
	GL.iNet GL-AP1300
	GL.iNet GL-S1300
	Linksys EA8300
	Linksys WHW03v2
	Nokia Wi4A AC400i
	P&W R619AC
	Pakedge WR-1
	Qxwlan E2600AC C1
	Sony NCP-HG100/Cellular
	Teltonika RUTX10
	ZTE MF18A

were upstreamed to the ath10k-firmware repository
and landed in linux-firmware.git.

Furthermore the BDFs for the:
	8devices Habanero
	8devices Jalapeno
	Qxwlan E2600AC C2

have been updated.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-18 16:17:52 +02:00
INAGAKI Hiroshi
4fffa0f6af mvebu: use PHY LED trigger for speed LEDs on FortiGate 50E
Use <mdio>:<addr>:<speed> trigger instead of netdev(link) trigger for
Fortinet FortiGate 50E, to indicate link speed on the each phys.

1000 Mbps: Green
100 Mbps : Amber
10 Mbps  : (turn off)

Fixes: 102dc5a625 ("mvebu: add support for Fortinet FortiGate 50E")

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-05-18 16:17:52 +02:00
INAGAKI Hiroshi
bf12aac464 mvebu: cortexa9: enable Ethernet PHY LED trigger
To use <mdio>:<addr>:<speed> trigger for LEDs, enable PHY LED trigger
(CONFIG_LED_TRIGGER_PHY).

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-05-18 16:17:52 +02:00
Tim Harvey
39e6039410 octeontx: kernel: add USB storage boot support
Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass
Storage device.

This increases the kernel Image by 66KiB

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-05-18 16:17:52 +02:00
Tim Harvey
6d41da8b7e imx: kernel: add USB storage boot support
Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass
Storage device.

This adds 23KiB to the compressed kernel size

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-05-18 16:17:52 +02:00
Christian Lamparter
ec4d63ffb3 nu801: add kmod-leds-uleds to MR26 + MR18
support for MR18 and MR26 was developped before
the userspace nu801 was integrated with x86's
MX100 into OpenWrt. The initial nu801 + kmod-leds-uleds
caused build-bot errors.

The solution that worked for the MX100 was to include
the kmod-leds-uleds to the device platform module.
Thankfully, the MR26 and MR18 can just add the uleds
package to the DEVICE_PACKAGES variable.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-18 16:17:52 +02:00
Arınç ÜNAL
434dce0729 ramips: rename to D-Team Newifi D2 and Lenovo Newifi D1
Rename Newifi D2 to D-Team Newifi D2, and Newifi D1 to Lenovo Newifi D1.
Let's not make naming exceptions because of marketing whims.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2023-05-18 14:44:07 +02:00
Arınç ÜNAL
ce1f9fa625 ramips: add support for TOZED ZLT S12 PRO
The TOZED ZLT S12 PRO is an AC1200 router featuring 4 Ethernet ports with a
TOZED TL70-C cellular modem which supports the NCM mode.

The stock firmware does SIM locking on the modem by stopping dialing when a
different PLMN is detected. This is not the case on OpenWrt.

Specifications:
- CPU: MediaTek MT7621AT
- RAM: 256MB DDR3
- NOR Flash: MX25L12833FM2I 16MB SPI Flash
- Wi-Fi 2.4Ghz: MT7603E
- Wi-Fi 5Ghz: MT7612E
- Switch: MT7530 4x 1Gbit Ports
- WWAN: Unisoc SL8563 based TOZED TL70-C LTE CAT6 cellular modem
- USB: 1x optional USB2.0 external port
- Switches/Buttons: WPS, Reset, Power Switch
- LEDs: Power, Wi-Fi, Data, Signal 1-5, Phone

Installation and TFTP Recovery:
- Connect to serial console.
- Boot initramfs image by choosing option 1 when U-Boot prompts.
- Install sysupgrade image via OpenWrt.

Serial Pins:
Located at the bottom right when looking from the front, right under the
Reset/WPS buttons. The pinout from the left is:
- RX
- GND
- TX
Baudrate is 115200.

When connecting from a powered off state, disconnect RX as it blocks the
boot process.

Link: http://www.sztozed.com/en/contents/58/84.html
Co-developed-by: Andre Cruz <me@1conan.com>
Signed-off-by: Andre Cruz <me@1conan.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2023-05-18 14:44:07 +02:00
Daniel Golle
fd0118c0a5 mediatek: remove left-over reference to make_gl_metadata.py
When adding support for the GL.iNet GL-MT3000 a reference to the
non-existent make_gl_metadata.py script was accidentally added.
Remove it, flashing from vendor firmware also works fine without that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-18 11:24:07 +01:00
Muhammad AL-Qadhy
97a37288b9 ramips: Fix Wireless Frequencies for HYC-G920
Fix wireless frequencies to show correct wireless interfaces.

Signed-off-by: Muhammad AL-Qadhy <m.ismael@gmail.com>
2023-05-18 12:02:15 +02:00
Daniel Golle
c68c71eaa9 mediatek: update patch add PWM support for MT7981
Update patch with version submitted upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-18 02:50:08 +01:00
Daniel Golle
7cbe34170e mediatek: add support for the GL.iNet GL-MT3000
The MT-3000 is a pocket-sized Wi-Fi 6 router based on MediaTek MT7981.

Specification:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 256 MiB Macronix SPI NAND
 - RAM: 512 MiB Nanya DDR4
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN)
 - Ethernet:
    - 1x 10/100/1000 Mbps built-in PHY (LAN)
    - 1x 10/100/1000/2500 Mbps MaxLinear GPY211 PHY (WAN)
 - USB 3.0 port
 - Buttons: 1 button, 1 switch
 - LEDs: 1x light-blue, 1x warm-white
 - Serial console: internal 4-pin header, 115200 8n1
 - PWM controlled fan with tacho
 - Power: 5 VDC, 3 A (USB Type-C)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-18 02:41:49 +01:00
David Bauer
c9cb6411c1 mediatek: add support for Cudy WR3000 v1
Hardware
--------
MediaTek MT7981 WiSoC
256MB DDR3 RAM
16MB SPI-NOR (XMC XM25QH128C)
MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4 / 5)
UART: 115200 8N1 3.3V
      [LEDS] VCC-GND-RX-TX [ETH]
      Header is located below the heatsink

Case
----
Unscrew the 4 bottom screws. Remove the top of the case by inserting a
small screwdriver into the ventilation holes and lift the top cover.

This works best by beginning near the ETH-ports. The top is clipped on
the front near the LEDs with two plastic clips. The back has a single
clip in the middle. Start at one of the back edges.

MAC-Addresses
-------------
80:AF:CA:00:F9:C6 LAN
80:AF:CA:00:F9:C7 WAN
80:AF:CA:00:F9:C6 W2
82:AF:CA:30:F9:C6 W5

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

1. Connect to the serial port as described in the "Hardware" section.

2. Power on the device. Keep pressing the "0" key to enter the U-Boot
   shell.

3. Download the OpenWrt initramfs image. Place it on an TFTP server
   connected to the Cudy LAN ports. Make sure the server is reachable at
   192.168.1.2. Rename the image to "cudy3000.bin"

4. Download and boot the OpenWrt initramfs image.

   $ tftpboot 0x46000000 cudy3000.bin; bootm 0x46000000

5. Transfer the OpenWrt sysupgrade image to the device using scp.
   Install with sysupgrade.

Note: Cudy does not yet provide a image for disabling their
signature-protection. This has happened in the past. Make sure to check
the wiki for a possible easier installation method.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-05-18 01:46:13 +02:00
David Bauer
9fa4aa63c5 mediatek: fix typo
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-05-18 01:42:52 +02:00
Álvaro Fernández Rojas
0dd5505a17 bmips: improve kernel patches
Add missing patch headers and regenerate the ones that contain an obsolete
patch header.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-17 18:25:40 +02:00
Michał Kępień
95577e7bd1
ath79: add support for MikroTik RB951Ui-2HnD
MikroTik RB951Ui-2HnD is a wireless SOHO router that was previously
supported by the ar71xx target, see commit d19b868b12 ("ar71xx: Add
support for MikroTik RB951Ui-2HnD").

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

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

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

Flashing
--------

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

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-05-16 14:55:18 +02:00
Daniel Golle
67c1e7ad9b generic: mtk_eth_soc: don't crash if WO firmware is missing
Import patch to prevent crashes in case WO firmware is missing on devices
with only a single frontend (eg. MT7981+MT7976).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-15 20:55:39 +02:00
Daniel Golle
ff5d08799b generic: add support for wireless offloading on MT7981
Load appropriate firmware for wireless offloading on MT7981.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-15 20:55:39 +02:00
Thibaut VARÈNE
d97143fadc ath79: mikrotik: bump compat version for yafut images
Following 5264296, Mirotik NAND devices now use yafut to flash the
kernel on devices. This method is incompatible with the old-style
"kernel2minor" flash mechanism.

Even though NAND images were disabled in default build since 21.02, a
user flashing a new-style image onto an old-style image would result in
in a soft-brick[1]. In order to prevent such accidental mishap,
especially as these device images will be reenabled in the upcoming
release, bump the compat version.

After the new image is flashed, the compat version can be updated:

    uci set system.@system[0].compat_version='1.1'
    uci commit

[1] https://github.com/openwrt/openwrt/pull/12225#issuecomment-1517529262

Cc: Michał Kępień <openwrt@kempniu.pl>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-05-15 15:35:52 +02:00
Hauke Mehrtens
a24612cc06 bcm47xx: Refresh patches
Refresh patches to make them cleanly apply.
This problem  was found by the github CI.

Fixes: ecd9abc8c0 ("kernel: use upstream firmware patch for Broadcom's NVRAM")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-14 16:28:41 +02:00
Rafał Miłecki
4ab27bc6ef kernel: backport NVMEM patch for Broadcom's NVRAM MAC cells
It has just been queued for the v6.5. It allows Ethernet drivers to read
MACs from NVRAM using NVMEM interface.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-05-14 12:46:52 +02:00
Rafał Miłecki
ecd9abc8c0 kernel: use upstream firmware patch for Broadcom's NVRAM
This replaces our 2 downstream patches.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-05-14 12:44:50 +02:00
Pawel Dembicki
95d5a99537 mpc85xx: add support for Aerohive BR200-WP
The following adds the Aerohive BR200-WP router to OpenWrt under
the mpc85xx/p1010 subtarget.

Hardware:
- SoC: Freescale P1011
- NOR: Intel JS28F512M29EWH 64MB
- Memory: 2x Nanya NT5TU64M16GG-AC 128MB (Total of 256MB)
- 2.4GHz WiFi: Atheros AR9390-AL1A
- Eth1: Atheros AR8035-A PoE
- 2x LEDs
- 1x Button
- PoE PSE

Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter a
password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, tftp boot the initramfs image:
   dhcp; setenv serverip 192.168.1.3;
   tftpboot 0x2004000 openwrt-mpc85xx-p1010-aerohive_br200-wp-initramfs-kernel.bin;
   bootm 0x2004000;
3. Once booted, scp over the sysupgrade file and sysupgrade the device
to flash LEDE to the NOR.

Note:

MAC assigns are taken from stock firmware:

Name        MAC addr      Mode       State Chan(Width) VLAN   Radio      Hive       SSID
-------- -------------- --------     ----- ----------- ---- ---------- ---------- ---------
Mgt0     08ea:44XX:XXc0    -           U     -            1     -        hive0        -
Eth0     08ea:44XX:XXc0 wan            U     -            -     -          -          -
Eth1     08ea:44XX:XXc2 access         D     -            -     -        hive0        -
Eth2     08ea:44XX:XXc3 access         D     -            -     -        hive0        -
Eth3     08ea:44XX:XXc4 access         D     -            -     -        hive0        -
Eth4     08ea:44XX:XXc5 access         D     -            -     -        hive0        -
Wifi0    08ea:44XX:XXd0 access         U     1(20MHz)     -  radio_ng0     -          -
Wifi0.1  08ea:44XX:XXd4 access         D     1(20MHz)     -  radio_ng0   hive0        -

Note2:
PoE PSE could be managed with `realtek-poe` package. Example port
config:

config port
        option enable   '1'
        option id       '4'
        option name     'lan2'
        option poe_plus '0'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan1'
        option poe_plus '0'
        option priority '1'

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(switch@0 -> switch@10, Device's quickstart says LEDs are
amber and white => add function+color properties but keep
labels around, use pr_info)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-14 00:08:35 +02:00
Pawel Dembicki
749237967a kirkwood: Replace dtses with upstream accepted
DTSes from of three boards was sent and accpeted upstream. Let's use
backport patches with small OpenWrt tweak like other upstream stuff.

List of boards:
  - Zyxel NSA310S
  - Endian 4i Edge 200
  - Ctera C-200 V1

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-05-14 00:08:35 +02:00
Christian Lamparter
1d49310fdb ath79: add Cisco Meraki MR18
Specifications:

SOC:    Atheros/Qualcomm QCA9557-AT4A @ 720MHz
RAM:    2x Winbond W9751G6KB-25 (128 MiB)
FLASH:  Hynix H27U1G8F2BTR-BC TSOP48 ONFI NAND (128 MiB)
WIFI1:  Atheros AR9550 5.0GHz (SoC)
WIFI2:  Atheros AR9582-AR1A 2.4GHz
WIFI2:  Atheros AR9582-AR1A 2.4GHz + 5GHz
PHYETH: Atheros AR8035-A, 802.3af PoE capable Atheros (1x Gigabit LAN)
LED:    1x Power-LED, 1 x RGB Tricolor-LED
INPUT:  One Reset Button
UART:   JP1 on PCB (Labeled UART), 3.3v-Level, 115200n8
        (VCC, RX, TX, GND - VCC is closest to the boot set jumper
	 under the console pins.)

Flashing instructions:

Depending on the installed firmware, there are vastly different
methods to flash a MR18. These have been documented on:
<https://openwrt.org/toh/meraki/mr18>

Tip:
Use an initramfs from a previous release and then use sysupgrade
to get to the later releases. This is because the initramfs can
no longer be built by the build-bots due to its size (>8 MiB).

Note on that:
Upgrades from AR71XX releases are possible, but they will
require the force sysupgrade option ( -F ).

Please backup your MR18's configuration before starting the
update. The reason here is that a lot of development happend
since AR71XX got removed, so I do advise to use the ( -n )
option for sysupgrade as well. This will cause the device
to drop the old AR71xx configuration and make a new
configurations from scratch.

Note on LEDs:
The LEDs has changed since AR71XX. The white LED is now used during
the boot and when upgrading instead of the green tricolor LED. The
technical reason is that currently the RGB-LED is brought up later
by a userspace daemon.

(added warning note about odm-caldata partition. remove initramfs -
it's too big to be built by the bots. MerakiNAND -> meraki-header.
sort nu801's targets)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-14 00:08:35 +02:00
Christian Lamparter
cb9ccd644b ath79: ar934x: still advertise subpage on soft ecc
This sort of reverts Koen Vandeputte's commit
6561ca1fa5 ("ath79: ar934x: fix mounting issues if subpage is not supported")

since it does not work on the MR18 as the UBI is coming from
Meraki in that way and it used to work with AR71XX before.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-14 00:08:35 +02:00
Christian Lamparter
32b6f1a5c8 ath79: nand: enable software BCH support
This is necessary to support the Meraki MR18 and likely Z1
as well.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-14 00:08:35 +02:00
Lech Perczak
4f1b2cee3e ath79: set 2048B ECC size for Mikrotik boards using soft ECC
Two Mikrotik board families (SXT 5nD R2 and Routerboard 92x are using
software ECC on NAND. Some of them use chips capable of subpage write,
others do not - within the same family, and a common block size is
required for UBI, to avoid mounting errors. Set the ECC step size
explicitly for them to 2048B, so UBI can mount existing volumes without
problems, at the same time allowing to unlocking subpage write functionality,
reuqired for Meraki MR18.

Fixes: 6561ca1fa5 ("ath79: ar934x: fix mounting issues if subpage is not supported")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-05-14 00:08:35 +02:00
Christian Lamparter
8125729c7c apm821xx: rename MerakiNAND -> meraki-header
specify that this functions adds a Cisco Meraki
special-sauce header for their custom loader/uboot.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-14 00:08:35 +02:00
John Audia
228e0e1039 kernel: bump 5.15 to 5.15.111
Removed upstreamed:
	01. backport-5.15/424-v6.4-0001-mtd-core-provide-unique-name-for-nvmem-device-take-t.patch
	02. backport-5.15/424-v6.4-0002-mtd-core-fix-nvmem-error-reporting.patch
	03. generic-backport/424-v6.4-0003-mtd-core-fix-error-path-for-nvmem-provider.patch
	04. generic-backport/828-v6.4-0001-of-Fix-modalias-string-generation.patch
	05. bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch
	06. bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit
	07. bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgita
	08. bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit
	09. bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch
	10. bcm4908/patches-5.15/036-v6.4-0002-arm64-dts-broadcom-bcmbca-bcm4908-fix-NAND-interrupt.patch
	11. bcm4908/patches-5.15/036-v6.4-0004-arm64-dts-broadcom-bcmbca-bcm4908-fix-procmon-nodena.patch
	12. ipq806x/patches-5.15/104-v6.0-06-ARM-dts-qcom-ipq8064-reduce-pci-IO-size-to-64K.patch

Manually rebased:
	bcm27xx/patches-5.15/950-0078-BCM2708-Add-core-Device-Tree-support.patch
	bcm27xx/patches-5.15/950-0547-ARM-dts-Add-Pi-Zero-2-support.patch
	bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit
	bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit
	bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch
	bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch
	bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch
	bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch
	bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit
	bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit
	bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
	bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
	bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
	bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch

All other patches automatically rebased.

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

01. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=77112d23a671697f0f70695ab901f807e15d2093
02. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=fe07b3b5af01f42b291f5da0da09d047f50b33a6
03. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=273be36e420924237f6c9d43cdad96718c13dd52
04. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=fe8ab85ed4958e58e991bba0aa0a655b552b0273
05. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=6ae67829fa5e9e71f458f69db42f0e216225616a
06. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=1994284cb9226b65ca3a6744ce3320218b584f26
07. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=a46878476c5549a4fde15a31922ce80a50b23492
08. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=112ff0f2530549d50510f116474924f9c4fad590
09. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=7c253e98685e6d884d12e2618ef4d2ad90b4fbd7
10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=8444b46e163aa9559a0af0381a1d230ec4146eb2
11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=6d1af517817a760d7af3dee0fc4603645485495c
12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.111&id=cc4f0e168a5630ad0491ac5328f1a89f3cf3d04e

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-05-13 22:38:35 +02:00
Nick Hainke
1fda304d8e
ramips: remove device tree legacy compatibility
We switched to 5.15 kernel, so we don't need to maintain 5.10
compatibility anymore.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:44 +02:00
Nick Hainke
047361dee4
treewide: cleanup kernel symbol references
We only use 5.15 kernel. So remove all those unnecessary symbols
referencing 5.10 or 5.15 kernel.

Can be found with:
  git grep -E 'LINUX_5_1(0|5)'

Note that we remove the dependency from "sound-soc-chipdip-dac" instead
of removing the complete kernel package. The 5.15 version bump forgot to
delete the "@LINUX_5_10" dependency. The kernel package is still needed
in 5.15 kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:44 +02:00
Nick Hainke
d798617d4a
treewide: remove all @{lt,gt,ge,le} appearances affecting 5.10 kernel
We only use 5.15 kernel. So remove all those unnecessary appearances.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:43 +02:00
Nick Hainke
1d3e71bd97
treewide: remove files for building 5.10 kernel
All targets are bumped to 5.15. Remove the old 5.10 patches, configs
and files using:

  find target/linux -iname '*-5.10' -exec rm -r {} \;

Further, remove the 5.10 include.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:43 +02:00
Nick Hainke
397ba0b54b
ath25: switch default kernel to 5.15
Switch to kernel 5.15 although it is marked as source only. It is marked
as source only because nobody was able to test this device.

Merging this is important to finally branch a new release. We want to
get rid completely of 5.10 kernel. Without this commit we get following
error: "Missing kernel version/hash file for 5.10." Hopfully someone
will fix the board in the rc phase or it will be removed completly.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:42 +02:00