openwrt/staging/xback.git
6 months agogeneric: 6.6: backports and add LED support for Aquantia PHYs
Daniel Golle [Fri, 10 May 2024 23:48:57 +0000 (00:48 +0100)]
generic: 6.6: backports and add LED support for Aquantia PHYs

Backport patch adding support for the AQR114C PHY and add support for
PHY LEDs and polarity setting of Aquantia 3rd and 4th generation PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 months agoath79: add support for 8Devices Carambola3 board
Andrey Bondar [Fri, 10 May 2024 13:22:14 +0000 (16:22 +0300)]
ath79: add support for 8Devices Carambola3 board

Carambola3 is a WiFi module based on Qualcomm/Atheros QCA4531
http://wiki.8devices.com/carambola3

Specification:

    - 650/600/216 MHz (CPU/DDR/AHB)
    - 128 MB of RAM (DDR2)
    - 32 MB of FLASH
    - 2T2R 2.4 GHz
    - 2x 10/100 Mbps Ethernet
    - 1x USB 2.0 Host socket
    - UART for serial console
    - 12x GPIO

Flash instructions:

    Upgrading from ar71xx target:
    - Upload image into the board:
        scp openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin \
          root@192.168.1.1/tmp/
    - Run sysupgrade
        sysupgrade -F /tmp/openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin

Upgrading from u-boot:
    - Set up tftp server with openwrt-ath79-generic-8dev_carambola3-initramfs-kernel.bin
    - Go to u-boot (reboot and press ESC when prompted)
    - Set TFTP server IP
        setenv serverip 192.168.1.254
    - Set device ip from the same subnet
        setenv ipaddr 192.168.1.1
    - Copy new firmware to board
        tftpboot 0x82000000 initramfs.bin
    - Boot OpenWRT
        bootm 0x82000000
    - Upload image openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin into the board
    - Run sysupgrade.

Signed-off-by: Andrey Bondar <a.bondar@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/15514
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agolinux-atm: fix build with GCC 14
Rany Hany [Mon, 13 May 2024 13:34:22 +0000 (16:34 +0300)]
linux-atm: fix build with GCC 14

Basic changes to make linux-atm build without any issues with GCC 14.

Besides some errors caused by -Wpointer-sign, there was also an issue
with socklen_t not being used for getsockopt() and accept()
sometimes.

I also updated the Debian patch to include the latest changes from
version "1:2.5.1-5.1" in Debian Sid. This allowed me to drop
"600-fix-format-errors.patch" and "700-include_sockios.patch".

Signed-off-by: Rany Hany <rany_hany@riseup.net>
6 months agousbmode: add Huawei E5785
Didier 'OdyX' Raboud [Wed, 15 May 2024 07:49:05 +0000 (09:49 +0200)]
usbmode: add Huawei E5785

This 4G/LTE modem is a WiFi hotspot, and also works as cdc_ether modem
when plugged over USB. It needs usb-modeswitching. With HuaweiNewMode,
it will modeswitch from 3426:1f01 (mass-storage) to 3426:14db
(cdc_ether).

Signed-off-by: Didier 'OdyX' Raboud <odyx@raksha.ch>
Link: https://github.com/openwrt/openwrt/pull/15497
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoramips: add support for TP-Link Archer MR200v5
Lea Teuberth [Tue, 2 Apr 2024 09:30:32 +0000 (11:30 +0200)]
ramips: add support for TP-Link Archer MR200v5

Specifications:
CPU:     MT7628AN 580MHz
RAM:     64MB DDR2
FLASH:   8MB EN25QH64 NOR SPI
WIFI:    2.4GHz 2x2 MT7628 b/g/n internal
WIFI:    5GHz 1x1 MT7610E ac/n PCI
LTE:     Qualcomm MDM9207
ETH:     4xLAN 100base-T integrated
SWITCH:  RT3050-ESW Port 0,1,2,3: LAN, Port 6: CPU
LEDS:    LAN, WAN, Power, 3x signal strength, WiFi
BTNS:    Reset, WiFi toggle
UART:    Near ETH ports, Vcc-GND-RX-TX, 115200, 8N1

Installation:
1. Update using recovery mode
        - set your IP to 192.168.0.225, subnet mask: 255.255.255.0
        - start tftp server, rename tftp-recovery.bin to
          tp_recovery.bin and place it into the server's directory
        - while holdig the "reset" button, power on the device
        - keep holding "reset" until the file is being transferred

Notes:
This board has only one MAC address programmed
        in the "romfile" partition:
        - MAC for phy0 (2.4GHz) at romfile 0xf100 (0)
        - MAC for phy1 (5GHz) at romfile 0xf100 (-1)
        - stock firmware re-uses phy0 MAC for ethernet
        - stock firmware uses romfile 0xf100 (1) for WWAN;
          not used since QMI interface is raw IP

Signed-off-by: Lea Teuberth <lea.teuberth@outlook.com>
6 months agomediatek: include "kmod-mt7915e" package per device
Rafał Miłecki [Mon, 22 Apr 2024 21:13:11 +0000 (23:13 +0200)]
mediatek: include "kmod-mt7915e" package per device

mt7915e driver supports MT7915 & MT7916 devices and MT7981 & MT7986
on-SoC wireless controllers. Devices based on MT7988 and possibly other
next chipsets are quite unlikely to need it (MT7988 was designed to be
used with MT7996).

Move kmod-mt7915e to DEVICE_PACKAGES of relevant devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 months agotools: refresh all patches
Rosen Penev [Sat, 18 May 2024 19:14:20 +0000 (12:14 -0700)]
tools: refresh all patches

Refresh all tools patches now that tools/refresh correctly works.

CI now checks for them and actively complain if tools have unrefreshed
patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[ reword commit message ]
Link: https://github.com/openwrt/openwrt/pull/15524
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agotools/lz4: remove patches
Rosen Penev [Wed, 22 May 2024 21:14:23 +0000 (14:14 -0700)]
tools/lz4: remove patches

meson is used to build it since 291b137. No need to patch Makefiles.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15524
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agobuild: generate private key for APK early
Daniel Golle [Wed, 22 May 2024 14:19:45 +0000 (16:19 +0200)]
build: generate private key for APK early

Other than OPKG which only uses signed package list, APK uses
individually signed packages in addition to signed package lists. Hence,
in order to be able to generate package, the private key needs to be
generated before compiling packages. Express that dependency and
generate the private key before building any packages instead of doing
so as part of the base-files package build.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 months agoipq40xx: dont panic on PSGMII calibration fail
Robert Marko [Wed, 22 May 2024 14:55:51 +0000 (16:55 +0200)]
ipq40xx: dont panic on PSGMII calibration fail

Currently, in case that PSGMII calibration fails it will panic the kernel
which is not ideal and is preventing any debugging to be done.

So, since PGMII calibration failing only means that wired networking wont
work lets convet the panic() call to dev_error.

Link: https://github.com/openwrt/openwrt/pull/15542
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoqualcommax: ipq807x support Netgear Orbi Pro SXK80
Andrew Smith [Mon, 21 Aug 2023 08:48:45 +0000 (09:48 +0100)]
qualcommax: ipq807x support Netgear Orbi Pro SXK80

This commit adds support for Netgear Orbi Pro SXR80 and SXS80 (collectively known as SXK80)

Specifications:
---------------
* CPU: Qualcomm IPQ8074A Quad core Cortex-A53
* RAM: 1024MB
* Storage: SPI-NAND 512 MiB (Winbond W29N04GZ)
* Ethernet: 4x 1G RJ45 ports (QCA8075) 1x 2.5G RJ45 LAN/WAN (QCA8081)
* WLAN:
    - 2.4 GHz: Qualcomm QCN5024 4x4
    - 2x 5 GHz: Qualcomm QCN5054 4x4 (second radio high channels only)
* LEDs:
    - Power: (Green and red)
    - Front: (Blue, green, red and white)
* Buttons:
    - 1x Soft reset
    - 1x Sync/WPS
* Power: 12V DC Jack

Installation instructions (Telnet):
-----------------------------------

*Note, this guide assumes SXR80, for SXS80 change the firmware file name as appropriate

1. Put firmware file openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb in root of TFTP server available at 192.168.1.10.
2. Enable telnet by going to http://[ip of device]/debug.htm and clicking on the tickbox 'Enable telnet'
3. Telnet into the device and login using the same username and password as the web interface:
4. Run the following command:

`fw_setenv bootcmd 'env default -a; saveenv; reset'`

5. Reboot the router, once the web interface is available again re-enable telnet via http://[ip of device]/debug.htm and telnet into the device.

6. Run the following command:

`fw_printenv`

It should look similar to the below:

```
baudrate=115200
bootargs=console=ttyMSM0,115200n8
bootcmd=mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot
bootdelay=2
ipaddr=192.168.1.1
netmask=255.255.255.0
serverip=192.168.1.10
soc_version_major=2
soc_version_minor=0
```

**If you see the message:**
`Warning: Bad CRC, using default environment`
**DO NOT CONTINUE, YOU WILL BRICK YOUR DEVICE**

7. Run the following command:

`fw_setenv originalboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot'`

(This should match what's in the bootcmd variable displayed in step 6)

8. Run the following commands:
```
fw_setenv wrttftp 'mii write 0x0 0x0 0x800; sleep 1; nmrp; if tftpboot openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb; then bootm; fi; bootdni; boot_DNI_secureboot'
fw_setenv wrtboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; nand read 0x40000000 0x1980000 0x06d00000; bootm 0x40000000'
fw_setenv bootcmd 'run wrttftp'
```

9. Ensure SXR/S device is attached via ethernet (LAN port) to the same ethernet segment as the TFTP server.

10. Reboot the device, it should reboot into OpenWrt and be available on 192.168.1.1

11. Once OpenWrt has booted, update the bootcmd using the following command:

`fw_setenv bootcmd 'run wrtboot'`

12. Flash the sysupgrade image

13. It should boot into OpenWrt

References to SXK80 GPL source:
https://www.downloads.netgear.com/files/GPL/SXK80-V3.2.0.108_gpl_src.tar.bz2.zip

Signed-off-by: Flole Systems <flole@flole.de>
Signed-off-by: Andrew Smith <gul.code@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/14939
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agotools/padjffs2: use Host/Prepare/Default instead of raw commands
Christian Marangi [Wed, 22 May 2024 09:56:45 +0000 (11:56 +0200)]
tools/padjffs2: use Host/Prepare/Default instead of raw commands

Now that Host/Prepare/Default is always defined, we can use that instead
of using raw commands to move files from the src directory to
HOST_BUILD_DIR.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agotools/missing-macros: install files from HOST_BUILD_DIR instead of src
Christian Marangi [Wed, 22 May 2024 09:53:52 +0000 (11:53 +0200)]
tools/missing-macros: install files from HOST_BUILD_DIR instead of src

Install files from HOST_BUILD_DIR instead of src. These files are now
correctly copied to HOST_BUILD_DIR and can be referenced from there.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agohost-build: always define Host/Prepare/Default
Christian Marangi [Wed, 22 May 2024 09:38:49 +0000 (11:38 +0200)]
host-build: always define Host/Prepare/Default

We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
defined.

This is mostly the case for Host packages that just provide files with
the src directory and don't need to be downloaded/extracted.

This was probably done lots of times ago due to quilt causing error as
the patches directory wasn't present.
This has changed now and quilt can correctly detect if no patches needs
to be applied (instead of terminating with error)

Always define Host/Prepare/Default to make tools/refresh correctly works
as HOST_QUILT is hardcoded enabled for this make target and will
complain for tool not prepared for quilt patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoscripts: fix revision calculation using new "main" branch
Marius Dinu [Tue, 21 May 2024 15:08:33 +0000 (18:08 +0300)]
scripts: fix revision calculation using new "main" branch

Fix revision calculation when local branch is rebased on new "main" branch
instead of "master".

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Link: https://github.com/openwrt/openwrt/pull/15538
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoqualcommax: ipq807x: sax1v1k: fix QCA8081 reset
Robert Marko [Tue, 21 May 2024 17:24:06 +0000 (19:24 +0200)]
qualcommax: ipq807x: sax1v1k: fix QCA8081 reset

It seems that on Spectrum SAX1V1K QCA8081 is being brought out of reset
too quickly and thus causing it to get stuck in an invalid autoneg
register configuration mode.

Setting an deasset delay seems to fix this, so lets set it.

Fixes: #15493
Link: https://github.com/openwrt/openwrt/pull/15541
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agokernel: qca-nss-dp: add back printing attached PHY-s
Robert Marko [Tue, 21 May 2024 09:28:07 +0000 (11:28 +0200)]
kernel: qca-nss-dp: add back printing attached PHY-s

During the last update to 12.5.r2 printing of the attached PHY-s was
removed, so lets bring it back as it is very helpfull for debugging
OpenWrt issues without users having to modify NSS-DP to know if a PHY
was attached.

Refresh patches since nss_dp_main.c was edited.

Link: https://github.com/openwrt/openwrt/pull/15537
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomediatek/filogic: add OpenWrt One support
John Crispin [Thu, 4 Apr 2024 20:38:50 +0000 (22:38 +0200)]
mediatek/filogic: add OpenWrt One support

Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 1GB RAM
 - 16MB NOR
 - 128MB NAND
 - 3 LEDs (red, green, blue, white)
 - 2 buttons (reset, user defined)
 - 1 2.5Gbit WAN port (Airoha EN8811h)
 - 1 1Gbit LAN ports
 - 1 single lane M.2 SSD slot
 - 1 mikroBus socket
 - externel HW WDT (25s refresh time)
 - i2c RTC (with battery backup)

Serial Interface
 - UBS-C CDC-ACM
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

MAC addresses are not populated on the early samples.

Signed-off-by: John Crispin <john@phrozen.org>
6 months agoRevert "mediatek/filogic: add OpenWrt One support"
John Crispin [Tue, 21 May 2024 09:35:05 +0000 (11:35 +0200)]
Revert "mediatek/filogic: add OpenWrt One support"

This reverts commit 797904b3cb4a5c575641c19e7f3989926e4c7902.

There is a stray line in the commit description

Signed-off-by: John Crispin <john@phrozen.org>
6 months agomediatek/filogic: add OpenWrt One support
John Crispin [Thu, 4 Apr 2024 20:38:50 +0000 (22:38 +0200)]
mediatek/filogic: add OpenWrt One support

filogic: Add support for D-Link AQUILA PRO AI M30

Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 1GB RAM
 - 16MB NOR
 - 128MB NAND
 - 3 LEDs (red, green, blue, white)
 - 2 buttons (reset, user defined)
 - 1 2.5Gbit WAN port (Airoha EN8811h)
 - 1 1Gbit LAN ports
 - 1 single lane M.2 SSD slot
 - 1 mikroBus socket
 - externel HW WDT (25s refresh time)
 - i2c RTC (with battery backup)

Serial Interface
 - UBS-C CDC-ACM
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

MAC addresses are not populated on the early samples.

Signed-off-by: John Crispin <john@phrozen.org>
6 months agouboot-mediatek: add support for OpenWrt One
John Crispin [Sat, 6 Apr 2024 10:14:47 +0000 (12:14 +0200)]
uboot-mediatek: add support for OpenWrt One

Signed-off-by: John Crispin <john@phrozen.org>
6 months agouboot-mediatek: add USB support to mt7981.dtsi
John Crispin [Sat, 6 Apr 2024 17:17:05 +0000 (19:17 +0200)]
uboot-mediatek: add USB support to mt7981.dtsi

Signed-off-by: John Crispin <john@phrozen.org>
6 months agomediatek/filogic: enable led PWM driver by default
John Crispin [Thu, 4 Apr 2024 20:37:25 +0000 (22:37 +0200)]
mediatek/filogic: enable led PWM driver by default

Signed-off-by: John Crispin <john@phrozen.org>
6 months agomediatek/filogic: fix mt7981.dtsi PCIe support
John Crispin [Thu, 4 Apr 2024 18:11:54 +0000 (20:11 +0200)]
mediatek/filogic: fix mt7981.dtsi PCIe support

* the compatible string was wrong
* the pinmux was missing

Signed-off-by: John Crispin <john@phrozen.org>
6 months agoarm-trusted-firmware-mediatek: add mt7981-nor-ddr4 and mt7981-spim-nand-ubi-ddr4...
John Crispin [Mon, 13 May 2024 05:36:24 +0000 (07:36 +0200)]
arm-trusted-firmware-mediatek: add mt7981-nor-ddr4 and mt7981-spim-nand-ubi-ddr4 builds

Signed-off-by: John Crispin <john@phrozen.org>
6 months agomt76: install mt7981_eeprom_mt7976_dbdc.bin to STAGING_DIR_IMAGE
Felix Fietkau [Tue, 21 May 2024 08:10:00 +0000 (10:10 +0200)]
mt76: install mt7981_eeprom_mt7976_dbdc.bin to STAGING_DIR_IMAGE

It will be used in the image building code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agomt76: update to Git HEAD (2024-05-17)
Felix Fietkau [Tue, 21 May 2024 08:09:12 +0000 (10:09 +0200)]
mt76: update to Git HEAD (2024-05-17)

8f301a5c5fe3 firmware: add mt7981 default eeprom
2d264aecbf5a mt76: mt7915: make pre-cal freq lists static const
d9c62742bed6 wifi: mt76: make const arrays in functions static
8986ba5492a8 wifi: mt76: mt7921: cqm rssi low/high event notify
3afbb8ed8015 wifi: mt76: mt7996: let upper layer handle MGMT frame protection
1d0bd57e5889 wifi: mt76: mt7921e: add LED control support
1d6e4f7de8a6 wifi: mt76: mt7925: add EHT radiotap support in monitor mode
c40e648b8929 wifi: mt76: enable spectrum management
14d5ee9f3369 mt76: shrink mt76_queue_buf
513c131c6309 mt76: mt7603: fix mixed declarations and code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agofirewall4: update to Git HEAD (2024-05-21)
Jo-Philipp Wich [Tue, 21 May 2024 06:59:13 +0000 (08:59 +0200)]
firewall4: update to Git HEAD (2024-05-21)

4c01d1ebf99e fw4: substitute double quotes in strings

Fixes: https://github.com/openwrt/luci/issues/7091
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 months agolibbpf: Update to v1.4.2
Tony Ambardar [Thu, 16 May 2024 21:14:05 +0000 (14:14 -0700)]
libbpf: Update to v1.4.2

Update to the latest upstream release to include recent improvements and
bugfixes.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.2
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
6 months agoixp4xx: Bump to kernel v6.6
Linus Walleij [Wed, 15 May 2024 21:16:54 +0000 (23:16 +0200)]
ixp4xx: Bump to kernel v6.6

The IXP4xx is well supported upstream and can readily be
supported with kernel v6.6. To simplify things after the
DTS directory was renamed, switch to v6.6 only.

Bring in some outstanding patches.

Tested on the Gateworks GW2348-4.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 months agoapk: update to latest HEAD 2024-05-19
Paul Spooren [Mon, 20 May 2024 15:10:42 +0000 (18:10 +0300)]
apk: update to latest HEAD 2024-05-19

Upstream refactoring caused some mbedtls issues, now fixed again.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agoapk: disable rootfs repositories during build
Paul Spooren [Mon, 20 May 2024 15:08:28 +0000 (18:08 +0300)]
apk: disable rootfs repositories during build

Since we set the root for APK it tries to use those during the build,
which shouldn't happen since local package are used instead.

Disable the repositories by manually setting an empty repository.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agolinux-firmware: realtek: update rtl8821ae firmware
Rui Salvaterra [Wed, 8 May 2024 21:04:55 +0000 (22:04 +0100)]
linux-firmware: realtek: update rtl8821ae firmware

A newer version, rtl8821aefw_29.bin, has been available for over 7 years [1].
Let's use it.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=f70e4df2b384d21e36a7c30a591639592692e0ec

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
6 months agogemini: In-flight ethernet patches
Linus Walleij [Wed, 15 May 2024 08:21:47 +0000 (10:21 +0200)]
gemini: In-flight ethernet patches

These patches have partial acceptance upstream and are still
a WIP, now there is merge window for kernel v6.10 so these
will not be reposted until that is over. In the meantime,
let's add the current state to OpenWrt so the ethernet on
Gemini is up and working (tested on several devices).

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 months agoinclude/rootfs: skip removal of APK cache now deprecated
Christian Marangi [Sun, 19 May 2024 13:03:27 +0000 (15:03 +0200)]
include/rootfs: skip removal of APK cache now deprecated

Skip removal of APK cache since now deprecated as APK doesn't make use
of cache anymore in our configuration.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoimagebuilder: fix multiple issue with manifest and sign keys handling
Christian Marangi [Sun, 19 May 2024 12:58:11 +0000 (14:58 +0200)]
imagebuilder: fix multiple issue with manifest and sign keys handling

Fix multiple issue with manifest handling where APK was hardcoded
and fix a logic error where (TODO) APK _check_keys was called for the
OPKG codepath instead of correctly calling for the APK codepath.

Fixes: d788ab376f85 ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agowireless-regdb: update to 2024.05.08
Yuu Toriyama [Sat, 18 May 2024 22:08:37 +0000 (07:08 +0900)]
wireless-regdb: update to 2024.05.08

Changes:
  73529a8 Revert "wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)"
  87941e4 wireless-regdb: Update regulatory rules for Taiwan (TW) on 6GHz
  33797ae wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Yuu Toriyama <PascalCoffeeLake@gmail.com>
6 months agomediatek: add firmware name for AQR PHYs on mt7988a-rfb
Felix Fietkau [Fri, 10 May 2024 15:39:56 +0000 (17:39 +0200)]
mediatek: add firmware name for AQR PHYs on mt7988a-rfb

Fixes PHY probe in case there is no firmware in a connected EEPROM

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agomediatek: convert mt7988a-rfb to keep bl31/uboot in UBI
Felix Fietkau [Wed, 8 May 2024 11:40:14 +0000 (13:40 +0200)]
mediatek: convert mt7988a-rfb to keep bl31/uboot in UBI

Add ubi volumes for mt7988a-rfb and support for using factory data
for Ethernet MAC addresses and MT7996 WLAN calibration data.
Also add rootdisk handle. Removes the need to keep using nmbm

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agouboot-mediatek: add missing options for mt7988-rfb
Felix Fietkau [Mon, 13 May 2024 18:17:33 +0000 (20:17 +0200)]
uboot-mediatek: add missing options for mt7988-rfb

Fixes autoboot and storing env in UBI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agorootfs: fix USE_APK detection
Paul Spooren [Sat, 18 May 2024 20:10:49 +0000 (23:10 +0300)]
rootfs: fix USE_APK detection

Due to missing quotes the script would wrongly assume APK to be enabled
and don't run post install scripts, breaking pretty much everything.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agoapk: update to latest HEAD 2024-05-18
Paul Spooren [Sat, 18 May 2024 13:29:07 +0000 (16:29 +0300)]
apk: update to latest HEAD 2024-05-18

Drop downstream mbedtls patch since it went upstream.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15522
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agobase-files: correctly split install-key function for APK
Paul Spooren [Fri, 17 May 2024 20:32:00 +0000 (23:32 +0300)]
base-files: correctly split install-key function for APK

The function incorrectly tried to APK keys even if there were none.
Correctly separate it into its own `ifdef` section.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15519
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoapk: disable helptext for host build
Paul Spooren [Fri, 17 May 2024 20:19:52 +0000 (23:19 +0300)]
apk: disable helptext for host build

The host build would need Lua to compile which currently adds a race
condition. Instead of tracking that down just disable helptext for the
host build.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agobase-files: add compatibility for APK and OPKG
Paul Spooren [Fri, 3 May 2024 16:24:17 +0000 (18:24 +0200)]
base-files: add compatibility for APK and OPKG

Both package managers work slightly different, i.e. stores files at
different places. Modify the `functions.sh` file to cover those.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agobase-files: add update_alternatives function
Paul Spooren [Fri, 3 May 2024 15:53:52 +0000 (17:53 +0200)]
base-files: add update_alternatives function

The APK package manager does not support handling of package
alternatives itself, so implement it via a simple shell script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agobuild: add APK package build capabilities
Paul Spooren [Tue, 14 May 2024 10:36:59 +0000 (12:36 +0200)]
build: add APK package build capabilities

A new option called `USE_APK` is added which generated APK packages
(.apk) instead of OPKG packages (.ipk).

Some features like fstools `snapshot` command are not yet ported

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agogitignore: ignore local APK keys
Paul Spooren [Fri, 3 May 2024 15:26:35 +0000 (17:26 +0200)]
gitignore: ignore local APK keys

Those keys should never be added to the git repository.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agoapk: add missing PROVIDES
Paul Spooren [Fri, 17 May 2024 18:47:46 +0000 (21:47 +0300)]
apk: add missing PROVIDES

Add PROVIDES:=apk to the Makefile so we can default to install `apk` by
default as a dependency.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agorpcd: fix package dependency for APK
Paul Spooren [Fri, 3 May 2024 15:43:08 +0000 (17:43 +0200)]
rpcd: fix package dependency for APK

Version dependencies must not contain spaces to be compatible with both
OPKG and APK.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 months agouboot-tegra: bump version to 2024.04
Tomasz Maciej Nowak [Wed, 15 May 2024 17:11:53 +0000 (19:11 +0200)]
uboot-tegra: bump version to 2024.04

Since swig is mentioned as build dependency and buildbots have it
installed we can safely bump version.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 months agotegra: trimslice: enable USB HID driver
Tomasz Maciej Nowak [Wed, 15 May 2024 17:02:09 +0000 (19:02 +0200)]
tegra: trimslice: enable USB HID driver

Without serial or network access the only option for initial
configuration, is a attached display with USB keyboard, but the keyboard
driver needs to be installed first. So enable keyboard driver by default
to avoid this issue.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 months agotegra: trimslice: enable GPIO LEDs driver
Tomasz Maciej Nowak [Wed, 15 May 2024 17:02:08 +0000 (19:02 +0200)]
tegra: trimslice: enable GPIO LEDs driver

LEDs are on all the time since boot, until there's driver to claim them.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 months agotegra: drop console specifiers from kernel commad line
Tomasz Maciej Nowak [Wed, 15 May 2024 17:02:07 +0000 (19:02 +0200)]
tegra: drop console specifiers from kernel commad line

Because recent changes to procd, last "console" argument was used as
primary argument and causing no terminal to be spawned on serial
interface. So drop the hardcoded consoles in boot script, since dts has
already an alias specified, which lets procd decide where to spawn the
terminal.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 months agotegra: pad rootfs to recreate overlay after upgrade
Tomasz Maciej Nowak [Wed, 15 May 2024 17:02:06 +0000 (19:02 +0200)]
tegra: pad rootfs to recreate overlay after upgrade

The old overlay remained after upgrades and would cause failure on first
boot after upgrade, in which no new overlay could be created while old
one was unusable.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 months agoqualcommax: ipq807x: add support for Linksys MX8500
Paweł Owoc [Mon, 26 Feb 2024 10:38:02 +0000 (11:38 +0100)]
qualcommax: ipq807x: add support for Linksys MX8500

Hardware specification:
========
SoC: Qualcomm IPQ8072A
Flash: 512MB (Fidelix FMND4G08S3J-ID)
RAM: 1GB (2x Kingston DDR3L D2516ECMDXGJD)
Ethernet: 1x 10/100/1000/2500/5000Mbps (Marvell AQR114C)
Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 6GHz ax 4x4 (Qualcomm QCN9024 + Skyworks SKY85784-11) - channels 33-229
WiFi2: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-177
WiFi3: 2.4GHz ax 4x4 (Qualcomm QCN5024 + Skyworks SKY8340-11)
IoT: Bluetooth 5, Zigbee and Thread (NXP K32W041)
LED: 1x RGB status (NXP PCA9633)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions:
========
1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin image.
More details can be found here: https://www.linksys.com/support-article?articleNum=47547
After first boot check actual partition:
- fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel

2. Installation using serial connection from OEM firmware (default login: root, password: admin):
- fw_printenv -n boot_part
In case of 2:
- flash_erase /dev/mtd21 0 0
- nandwrite -p /dev/mtd21 openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd23 0 0
- nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel

3. Installation from initramfs image using USB drive:
Put the initramfs image on the USB drive:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx8500-initramfs-uImage.itb of=/dev/sda
Stop u-boot and run:
- usb start && usbboot $loadaddr 0 && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel

4. Back to the OEM firmware:
- mtd -e kernel -n write FW_MX8500_1.0.11.208937_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MX8500_1.0.11.208937_prod.img alt_kernel

5. USB recovery:
Put the initramfs image on the USB:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx8500-initramfs-uImage.itb of=/dev/sda
Set u-boot env:
- fw_setenv bootusb 'usb start && usbboot $loadaddr 0 && bootm $loadaddr'
- fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

AQR firmware:
========
1. Firmware loading:
To properly load the firmware and initialize AQR PHY, we must use the u-boot aq_load_fw function.
To do this, you need to modify u-boot env:
With USB recovery:
- fw_setenv bootcmd 'aq_load_fw; run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
and without:
- fw_setenv bootcmd 'aq_load_fw; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

2. Firmware updating:
Newer firmware (AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld) is available in the latest OEM firmware.
To load this firmware via u-boot, we need to add the MBN header and update 0:ethphyfw partition.
For MBN header we can use script from this repository: https://github.com/testuser7/aqr_mbn_tool
- python aqr_mbn_tool.py AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld
To update partition we need to install kmod-mtd-rw package first:
- insmod mtd-rw.ko i_want_a_brick=1
- mtd -e /dev/mtd26 -n write aqr_fw.mbn /dev/mtd26

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoqualcommax: ipq807x: define common Linksys MX device
Paweł Owoc [Wed, 13 Mar 2024 11:36:39 +0000 (12:36 +0100)]
qualcommax: ipq807x: define common Linksys MX device

Define common Linksys MX device for MX4200v1/v2 and MX5300.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoqca-ssdk: add patch to support AQR114C-B0 PHY
Paweł Owoc [Wed, 13 Mar 2024 12:01:01 +0000 (13:01 +0100)]
qca-ssdk: add patch to support AQR114C-B0 PHY

Add support for AQR114C-B0 PHY.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agogeneric: 6.6: add patch to support AQR114C PHY ID
Paweł Owoc [Wed, 13 Mar 2024 11:57:04 +0000 (12:57 +0100)]
generic: 6.6: add patch to support AQR114C PHY ID

Add support for AQR114C PHY ID.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoqualcommax: ipq807x: Remove unused gpio from QPIC pins
Paweł Owoc [Wed, 13 Mar 2024 11:22:30 +0000 (12:22 +0100)]
qualcommax: ipq807x: Remove unused gpio from QPIC pins

Remove gpio16 from the default NAND pinctrl configuration
as its unused and only needed for LCD.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoipq806x: mr42/mr52: fix PCIe ports
Robert Marko [Thu, 16 May 2024 10:03:19 +0000 (12:03 +0200)]
ipq806x: mr42/mr52: fix PCIe ports

All three PCIe ports are reported non working on Meraki MR42/MR52 boards
since kernel 6.1 with the issue of PCIe PHY link never coming up thus
no WLAN cards are available on the boards.

After debugging it seems that PCIe worked on 5.15 and older purely by
accident as device DTS was using /delete-property/ perst-gpios; in each
of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI
as it was still using the older "perst-gpio" property so it was not getting
removed from the device DTS.

However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated
perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer
"perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as
now that property was being dropped from the device DTS.

So, since the removal of PERST pins seems to have been wrong from the start
lets drop the property removal from MR42/MR52.

Fixes: #15408
Link: https://github.com/openwrt/openwrt/pull/15509
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agogeneric: 6.6: remove kernel export stripping patch
Robert Marko [Wed, 15 May 2024 08:57:06 +0000 (10:57 +0200)]
generic: 6.6: remove kernel export stripping patch

Our kernel export stripping has been broken on 6.6 from the start since
upstream kernel really reworked stuff in ("kbuild: generate KSYMTAB entries
by modpost") and other commits as well.

So, until this is either fixed or reworked lets drop the patch as it doesnt
make sense to carry it knowing its broken and it can always be easily
restored.

Link: https://github.com/openwrt/openwrt/pull/15498
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoconfig: build: dont allow STRIP_KERNEL_EXPORTS on kernel 6.6
Robert Marko [Wed, 15 May 2024 08:43:52 +0000 (10:43 +0200)]
config: build: dont allow STRIP_KERNEL_EXPORTS on kernel 6.6

STRIP_KERNEL_EXPORTS is currently not working on kernel 6.6 as there
have been major changes in the upstream kernel.

I have looked at it, and I dont think we can adapt the current patch to
work so until this is fixed lets prevent STRIP_KERNEL_EXPORTS from
being selected on 6.6.

Link: https://github.com/openwrt/openwrt/pull/15498
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoramips: Fix use mac-base for TP-Link TL-MR6400 v4 and v5
Hauke Mehrtens [Thu, 9 May 2024 20:10:52 +0000 (22:10 +0200)]
ramips: Fix use mac-base for TP-Link TL-MR6400 v4 and v5

Use mac-base for mac-base TP-Link TL-MR6400 v4 and v5

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 months agoramips: Fix wmac dts definition for TP-Link TL-MR6400 v4 and v5
Hauke Mehrtens [Thu, 9 May 2024 10:28:35 +0000 (12:28 +0200)]
ramips: Fix wmac dts definition for TP-Link TL-MR6400 v4 and v5

This code assumed that the mt7628an_tplink_8m.dtsi file defines
mediatek,mtd-eeprom for the wmac and sets status to okay.

The mediatek,mtd-eeprom definition was removed in commit e93f41adee3e
("ramips: convert MT7628 EEPROM to NVMEM format") but the dts for these
two devices was not adapted to include the eeprom position on its own.

The status = "okay" property was removed in 0a1d15642fa6 ("ramips:
mt7628: use nvmem-layout"), but the property was not added to these dts
files.

Without this change wifi does not work for these devices.

Fixes: e93f41adee3e ("ramips: convert MT7628 EEPROM to NVMEM format")
Fixes: 0a1d15642fa6 ("ramips: mt7628: use nvmem-layout")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 months agomac80211: Add support for RTL8723BE
David Adriao [Fri, 10 May 2024 20:10:48 +0000 (21:10 +0100)]
mac80211: Add support for RTL8723BE

This adds support for the RTL8723BE PCIe Wi-Fi Adapter by adding backports drivers

Signed-off-by: David Adriao <davidadriao@dglitch.com>
[Do not remove rtl8xxxu and add dependency to rtl8723be-firmware]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 months agolantiq: add patch to fix the reset gpio handling in the pci driver
Martin Schiller [Mon, 6 May 2024 09:01:15 +0000 (11:01 +0200)]
lantiq: add patch to fix the reset gpio handling in the pci driver

Linux kernel commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using
gpiod API") not only switched to the gpiod API, but also inverted /
changed the polarity of the GPIO.

According to the PCI specification, the RST# pin is an active-low
signal. However, most of the device trees that have been widely used for
a long time (mainly in the openWrt project) define this GPIO as
active-high and the old driver code inverted the signal internally.

Apparently there are actually boards where the reset gpio must be
operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH
flag for initialization. Instead, we must explicitly set the gpio to
value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
may have been set.

In order to remain compatible with all these existing device trees, we
should therefore keep the logic as it was before the commit.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ltq-adsl-mei: use platform_get_irq to get irqs
Martin Schiller [Tue, 16 Apr 2024 06:45:17 +0000 (08:45 +0200)]
lantiq: ltq-adsl-mei: use platform_get_irq to get irqs

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: dts: add missing irqs to mei node on AmazonSE, Danube and AR9
Martin Schiller [Tue, 16 Apr 2024 06:43:30 +0000 (08:43 +0200)]
lantiq: dts: add missing irqs to mei node on AmazonSE, Danube and AR9

This adds to missing DyingGasp and USB OC interrupts to the mei node.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ltq-vmmc: get irqs from kernel-in-tree vmmc driver
Martin Schiller [Mon, 15 Apr 2024 14:54:59 +0000 (16:54 +0200)]
lantiq: ltq-vmmc: get irqs from kernel-in-tree vmmc driver

Let's get the IRQs from the kernel-in-tree vmmc driver like it is
already done for the cp1 base addr.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: vmmc kernel-in-tree driver: use platform_get_irq to get irqs
Martin Schiller [Mon, 15 Apr 2024 14:54:07 +0000 (16:54 +0200)]
lantiq: vmmc kernel-in-tree driver: use platform_get_irq to get irqs

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ltq-vmmc: fix write beyond size of field
Martin Schiller [Fri, 12 Apr 2024 13:14:57 +0000 (15:14 +0200)]
lantiq: ltq-vmmc: fix write beyond size of field

This fixes the write beyond size of field compile warning/error.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ltq-atm: use platform_get_irq to get irqs
Martin Schiller [Fri, 12 Apr 2024 08:37:58 +0000 (10:37 +0200)]
lantiq: ltq-atm: use platform_get_irq to get irqs

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ltq-ptm: use platform_get_irq to get irqs
Martin Schiller [Fri, 12 Apr 2024 06:56:24 +0000 (08:56 +0200)]
lantiq: ltq-ptm: use platform_get_irq to get irqs

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agokernel: ltq-vdsl-vr9-mei: fix warning about field-spanning write
Martin Schiller [Thu, 11 Apr 2024 18:31:01 +0000 (20:31 +0200)]
kernel: ltq-vdsl-vr9-mei: fix warning about field-spanning write

We need to use unsafe_memcpy() here, because the code do the field-
spanning write intentionally.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: old gptu timer driver: use platform_get_irq to get irqs
Martin Schiller [Thu, 11 Apr 2024 10:22:37 +0000 (12:22 +0200)]
lantiq: old gptu timer driver: use platform_get_irq to get irqs

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ifxmips_pcie: use platform_get_irq to get irqs from dts
Martin Schiller [Wed, 10 Apr 2024 11:48:50 +0000 (13:48 +0200)]
lantiq: ifxmips_pcie: use platform_get_irq to get irqs from dts

This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: dts: vr9: add missing interrupts to pcie node
Martin Schiller [Wed, 10 Apr 2024 11:50:33 +0000 (13:50 +0200)]
lantiq: dts: vr9: add missing interrupts to pcie node

This adds the missing interrupts to the pcie node.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: ifxmips_pcie: use dev_err_probe
Martin Schiller [Wed, 10 Apr 2024 11:48:50 +0000 (13:48 +0200)]
lantiq: ifxmips_pcie: use dev_err_probe

Use dev_err_probe() to get rid of the following warning which is
seen when the PCIe PHY has not been probed yet:
pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: Add some gswip patches
Hauke Mehrtens [Fri, 9 Jun 2023 21:27:29 +0000 (23:27 +0200)]
lantiq: Add some gswip patches

This backports some patches for the gswip switch driver.

I copied them from this repository:
https://github.com/xdarklight/linux/commits/lantiq-gswip-integration-20221022

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[drop some patches which may break functionality at the moment]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: Fix bug in error handling of timer driver
Hauke Mehrtens [Sun, 4 Jun 2023 12:05:03 +0000 (14:05 +0200)]
lantiq: Fix bug in error handling of timer driver

If the reverted timer driver fails to allocate interrupts handle the
error better.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[moved printk before the cleanup for-loop]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: Fix compile of lantiq components with kernel 6.1
Hauke Mehrtens [Fri, 2 Jun 2023 20:58:51 +0000 (22:58 +0200)]
lantiq: Fix compile of lantiq components with kernel 6.1

This makes the components used on the lantiq SoCs compile with kernel
6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[also fix ifxmips_ptm_adsl.c]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: Refresh patches and configuration
Hauke Mehrtens [Fri, 2 Jun 2023 20:13:48 +0000 (22:13 +0200)]
lantiq: Refresh patches and configuration

Make all the patches apply and delete the ones already integrated into
upstream Linux kernel. This also refreshes some of the kernel
configurations.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[refreshed for linux 6.1.89]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: set Linux 6.1 as testing kernel
Martin Schiller [Mon, 13 May 2024 06:57:58 +0000 (08:57 +0200)]
lantiq: set Linux 6.1 as testing kernel

Add KERNEL_TESTING_PATCHVER for Linux 6.1.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agokernel/lantiq: Restore kernel files for v5.15
Martin Schiller [Mon, 13 May 2024 06:42:32 +0000 (08:42 +0200)]
kernel/lantiq: Restore kernel files for v5.15

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agokernel/lantiq: Create kernel files for v6.1 (from v5.15)
Martin Schiller [Mon, 13 May 2024 06:42:32 +0000 (08:42 +0200)]
kernel/lantiq: Create kernel files for v6.1 (from v5.15)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agolantiq: Refresh kernel configuration
Hauke Mehrtens [Mon, 3 Jul 2023 22:16:33 +0000 (00:16 +0200)]
lantiq: Refresh kernel configuration

This refreshes the configuration for Linux kernel 5.15.

I first selected the xrx200 subtarget and then refreshed the target
kernel configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=target
Then I selected one subtarget after the other and refreshed their
configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=subtarget

I compared the kernel configuration used to compile the kernel from the
build directory for each subtarget before and after this task and it was
still the same.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[refreshed config for linux 5.15.158]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 months agoconfig: add ARM PMUv3 for kernel 6.6
Robert Marko [Sun, 12 May 2024 19:18:19 +0000 (21:18 +0200)]
config: add ARM PMUv3 for kernel 6.6

Kernel 6.6 has moved the ARM PMUv3 driver to drivers/perf and now once
KERNEL_ARM_PMU is selected trying to build the kernel will stop with:
ARM PMUv3 support (ARM_PMUV3) [N/y/?] (NEW)

So, lets enable ARM_PMUV3 for ARMv7 and ARMv8 architectures if
KERNEL_PERF_EVENTS is selected.

Fixes: #15466
Link: https://github.com/openwrt/openwrt/pull/15469
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoipq806x: rt4230w-rev6: fix status reporting via the LEDs
Rodrigo Balerdi [Fri, 10 May 2024 06:35:43 +0000 (03:35 -0300)]
ipq806x: rt4230w-rev6: fix status reporting via the LEDs

There is a custom LED controller between the 3 SoC GPIO outputs and
the red and blue LEDs of the device. It implements a strange mapping
that includes fixed, flashing, and breathing modes.

The current DTS configuration causes OpenWrt to flash the LEDs over
the controller's own flashing, resulting in chaotic output in boot,
failsafe, and upgrade modes.

This change fixes the LEDs in the best way possible as long as each
OpenWrt running state is limited to be signaled by a single led.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15440
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoag71xx: Slightly simplify 'ag71xx_rx_packets()'
Christophe JAILLET [Wed, 13 Mar 2024 22:39:23 +0000 (15:39 -0700)]
ag71xx: Slightly simplify 'ag71xx_rx_packets()'

There is no need to use 'list_for_each_entry_safe' here, as nothing is
removed from the list in the 'for' loop.
Use 'list_for_each_entry' instead, it is slightly less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://github.com/openwrt/openwrt/pull/15435
Link: https://github.com/openwrt/openwrt/pull/15435
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoopkg: fix stray \ warnings with grep-3.8
Georgi Valkov [Wed, 14 Sep 2022 07:26:03 +0000 (10:26 +0300)]
opkg: fix stray \ warnings with grep-3.8

We simply grep for "src/". So no need for "\/".
Furthermore, since grep-3.8 this creates warnings.

As written in the grep-3.8 announcement:
  Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.

Fixes a warning during the first boot:
  grep: warning: stray \ before /

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
6 months agogeneric: 5.15, 6.1: use RTL_8221B_VB_CG_PHYID in Realtek PHY detection
Mieczyslaw Nalewaj [Sun, 12 May 2024 10:16:37 +0000 (12:16 +0200)]
generic: 5.15, 6.1: use RTL_8221B_VB_CG_PHYID in Realtek PHY detection

Use the constant RTL_8221B_VB_CG_PHYID instead of a numeric value.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
6 months agogeneric: 6.6: fix realtek PHY detection patch
Mieczyslaw Nalewaj [Sun, 12 May 2024 10:12:51 +0000 (12:12 +0200)]
generic: 6.6: fix realtek PHY detection patch

Fixes the issue of RTL8221B-VB-CG not being detected correctly.
Reverts changes from f6c27b2, leaving only the read_c45 test.

Fixed: #15093
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
6 months agogpio-nct5104d: fix compilation with kernel 6.6
Rosen Penev [Sun, 12 May 2024 21:38:59 +0000 (14:38 -0700)]
gpio-nct5104d: fix compilation with kernel 6.6

gpio.h has been deprecated for a while and no longer compiles with 6.6.
Include the proper header.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15471
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agoaudit: fix compile error on some systems
Yanase Yuki [Fri, 10 May 2024 08:55:41 +0000 (17:55 +0900)]
audit: fix compile error on some systems

On Fedora 40, -Wimplictit-function-declaration error
is occur when compiling audit package.

Upstream fixed this problem, so backport the patch.
https://github.com/linux-audit/audit-userspace/pull/371

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/15441
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomtd: fix build with GCC 14
Rui Salvaterra [Tue, 7 May 2024 12:56:05 +0000 (13:56 +0100)]
mtd: fix build with GCC 14

Also fix a couple of warnings while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
6 months agotoolchain: gcc: add support for GCC 14
Rui Salvaterra [Tue, 7 May 2024 11:57:49 +0000 (12:57 +0100)]
toolchain: gcc: add support for GCC 14

Deleted (upstreamed):
- 020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch [1]
- 021-libcc1-fix-vector-include.patch [2]

All other patches automatically rebased.

Note that selecting GCC 14, as of now, *will* result in build failures. The
packages that fail to build will be fixed as they're found. Thus, GCC 13.x is
the default, for the time being.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9970b576b7e4ae337af1268395ff221348c4b34a
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5213047b1d50af63dfabb5e5649821a6cb157e33

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
6 months agoairoha: set KERNEL_TESTING_PATCHVER:=6.6
Daniel Golle [Tue, 7 May 2024 13:10:27 +0000 (14:10 +0100)]
airoha: set KERNEL_TESTING_PATCHVER:=6.6

Lets give Linux 6.6 a try.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agokernel/airoha: refresh config-6.6
Daniel Golle [Tue, 7 May 2024 13:38:14 +0000 (14:38 +0100)]
kernel/airoha: refresh config-6.6

Refresh kernel config for Linux 6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agokernel/airoha: refresh patch on top of Linux 6.6
Daniel Golle [Tue, 7 May 2024 13:09:34 +0000 (14:09 +0100)]
kernel/airoha: refresh patch on top of Linux 6.6

Refresh the only remaining downstream patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>