Commit Graph

29911 Commits

Author SHA1 Message Date
Christian Marangi
a0cbf7f5d5
ipq806x: 6.6: rework kernel patches for new kernel
Rework kernel patches for new kernel. Mainly adaptation for patch
related to DTS and changes for the downstream div generalize patch that
now use determine_rate.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:01 +02:00
Christian Marangi
a705c8c681
ipq806x: 6.6: drop upstream kernel patches
Drop upstream kernel patches that were straight backport.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
d840d1fdf9
ipq806x: split files in 6.1 and 6.6 dedicated directory
Since with recent kernel version DTS moved to a dedicated directory,
it's required to split files to per kernel version to follow kernel
version directory structure.

Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
based on the kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
3bf06ea9b3
kernel/ipq806x: Restore kernel files for v6.1
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.

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

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
a2bd0a7ef0
kernel/ipq806x: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

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

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:59 +02:00
Christian Marangi
032dad8818
ipq40xx: add kernel 6.6 as a testing kernel version
Add and enable kernel 6.6 as a testing kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
dbd0bc7cf9
generic: 6.6: add missing config symbol
Add missing config symbol while adding support for kernel 6.6 for target
ipq806x.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
f632e92951
ipq40xx: 6.6: update config file with missing symbol
Update config file with missing symbol added with kernel 6.6.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
61d1eedc2d
ipq40xx: 6.6: refresh kernel patches
Refresh kernel patches using make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
8ec76705d4
ipq806x: 6.6: add pending patch fixing mtdcore with MTD OTP
Add pending patch fixing mtdcore with MTD OTP with a fragile detection
if Nand supports OTP. Patch has been sent upstream and will be backported
to stable kernel if accepted.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
82531764fe
ipq40xx: 6.6: rework kernel patches for new kernel
Rework kernel patches for new kernel. Mainly adaptation for patch
related to DTS, OOB Tagger and SDHCI patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
5323c45d78
ipq40xx: 6.6: drop upstream kernel patches
Drop upstream kernel patches that were straight backport.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
6136ebabc5
ipq40xx: 6.6: fix DTS to use reference for usb node
Fix DTS to use reference for usb node instead of redefining
them since upstream usb node names changed from usb2/3 to usb.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
68c4678871
ipq40xx: split files in 6.1 and 6.6 dedicated directory
Since with recent kernel version DTS moved to a dedicated directory,
it's required to split files to per kernel version to follow kernel
version directory structure.

Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
based on the kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
2265413bbf
kernel/ipq40xx: Restore kernel files for v6.1
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.

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

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
9309cfe37a
kernel/ipq40xx: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

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

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:18 +02:00
Mieczyslaw Nalewaj
5aa63c2b85 generic: 6.1: refresh backport patches
Refresh backport patches for kernel 6.1.82 with make target/linux/refresh.

Fixes: 06cdc07f8c ("ath79: add support for Huawei AP5030DN")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-01 13:37:52 +02:00
Tianling Shen
cc6c3a6ee8 mediatek: add support for OpenEmbed SOM7981
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 256 MiB SPI-NAND, 32 GB eMMC optional
  RAM: 0.5/1 GB DDR4
  Ethernet: 1x 1GbE, 1x 2.5GbE (RTL8221B)
  WiFi: MediaTek MT7976C
  USB: 1x USB 3.0
  GPIO: 26-Pin header
  UART: 6 GND, 8 TX, 10 RX (in Pin header)
  Button: Reset, WPS
  Power: Type-C PD

Installation:
The board comes with a third-party custom OpenWrt image, you can upload
sysupgrade image via LuCI directly WITHOUT keeping configurations.

Or power on the board with pressing reset button for 5 second, then visit
http://192.168.1.1 and upload -factory.bin firmware.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-31 20:20:59 +02:00
Radito Wahyu
5aca47bca1 ramips: add support for BOLT BL100
BL100 is a router made by Bolt by a provider in Indonesia
The original firmware created using Mediatek SDK and kernel 2.6.36

- Chipset: MediaTek MT7620A ver 2, eco 6
- RAM: 64 MB
- Bootloader: U Boot
- Flash: Winbond W25Q128BV (16 MB)
- Ports: 2x 10/100 Ethernet, 1x RJ-11 VoIP
- Modem: Qualcomm LTE B40 (2300 Mhz) VID:05c6 PID:9026
- Wireless: Internal MT7620A (2.4 Ghz) & Mediatek MT76x2E (5.8 Ghz)
- Switch: MediaTek MT7620A built-in 5-port 10/100M switch
- Voltage: DC 12V 1A
- Antenna Port: 2x External Antenna, 2 LTE U.FL, 2 WiFi U.FL
- Serial Port: Yes, 3.3 V TTL, Baud 57600 8N1
- Buttons: Reset and WPS
- LED: 15 Total
  - 4 blue lte, 2 red lte, 1 reset, 1 power.
  - 1 wps, 1 voip, 1 wlan2, 1 wlan5, 1 lan, 1 wan, 1 wlan.

Installation via stock firmware
1. Unlock Telnet access by downloading the backup .tar.gz file
2. Change the Telnet configuration to LAN_Telnet=1
3. Import backup configuration
4. Restart the router
5. Login to telnet with username and password = admin : db40
6. Download sysupgrade binary and mtd_write to the kernel partition
`mtd_write write openwrt-bolt_bl100-squashfs-sysupgrade.bin Kernel`

Signed-off-by: Radito Wahyu <arditogits@gmail.com>
2024-03-31 20:07:45 +02:00
Roland Reinl
29cca6cfee filogic: Add support for D-Link AQUILA PRO AI M30
Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - MT7531 switch
 - 512MB RAM
 - 128MB NAND flash with two UBI partitions with identical size
 - 1 multi color LED (red, green, blue, white) connected via GCA230718
 - 3 buttons (WPS, reset, LED on/off)
 - 1 1Gbit WAN port
 - 4 1Gbit LAN ports

Disassembly:
 - There are four screws at the bottom: 2 under the rubber feets, 2 under the label.
 - After removing the screws, the white plastic part can be shifted out of the blue part.
 - Be careful because the antennas are mounted on the side and the top of the white part.

Serial Interface
 - The serial interface can be connected to the 4 pin holes on the side of the board.
 - Pins (from front to rear):
   - 3.3V
   - RX
   - TX
   - GND
 - Settings: 115200, 8N1

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

Flashing via Recovery Web Interface:
 - The recovery web interface always flashes to the currently active partition.
 - If OpenWrt is flahsed to the second partition, it will not boot.
 - Ensure that you have an OEM image available (encrypted and decrypted version). Decryption is described in the end.
 - Set your IP address to 192.168.200.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the device
 - Keep the reset button pressed until the LED blinks red
 - Open a Chromium based and goto http://192.168.200.1 (recovery web interface)
 - Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-recovery.bin
 - The recovery web interface always reports successful flashing, even if it fails
 - After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored)
 - If OpenWrt was flashed to the first partition, OpenWrt will boot (The status LED will start blinking white and stay white in the end). In this case you're done and can use OpenWrt.
 - If OpenWrt was flashed to the second partition, OpenWrt won't boot (The status LED will stay red forever). In this case, the following steps are reuqired:
   - Start the web recovery interface again and flash the **decrypted OEM image**. This will be flashed to the second partition as well. The OEM firmware web interface is afterwards accessible via http://192.168.200.1.
   - Now flash the **encrypted OEM image** via OEM firmware web interface. In this case, the new firmware is flashed to the first partition. After flashing and the following reboot, the OEM firmware web interface should still be accessible via http://192.168.200.1.
   - Start the web recovery interface again and flash the OpenWrt recovery image. Now it will be flashed to the first partition, OpenWrt will boot correctly afterwards and is accessible via 192.168.1.1.

Flashing via U-Boot:
 - Open the case, connect to the UART console
 - Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-initramfs-kernel.bin.
 - Power on the device and select "7. Load image" in the U-Boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
 - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
 - Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-sysupgrade.bin
 - Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.200.2, subnetmask 255.255.255.0
 - Press the reset button while powering on the device
 - Keep the reset button pressed until the LED blinks red
 - Open a Chromium based and goto http://192.168.200.1 (recovery web interface)
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

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

Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition.

Controlling the LEDs:
 - The LEDs are controlled by a chip called "GCA230718" which is connected to the main CPU via I2C (address 0x40)
 - I didn't find any documentation or driver for it, so the information below is purely based on my investigations
 - If there is already I driver for it, please tell me. Maybe I didn't search enough
 - I implemented a kernel module (leds-gca230718) to access the LEDs via DTS
 - The LED controller supports PWM for brightness control and ramp control for smooth blinking. This is not implemented in the driver
 - The LED controller supports toggling (on -> off -> on -> off) where the brightness of the LEDs can be set individually for each on cycle
 - Until now, only simple active/inactive control is implemented (like when the LEDs would have been connected via GPIO)
 - Controlling the LEDs requires three sequences sent to the chip. Each sequence consists of
   - A reset command (0x81 0xE4) written to register 0x00
   - A control command (for example 0x0C 0x02 0x01 0x00 0x00 0x00 0xFF 0x01 0x00 0x00 0x00 0xFF 0x87 written to register 0x03)
 - The reset command is always the same
 - In the control command
   - byte 0 is always the same
   - byte 1 (0x02 in the example above) must be changed in every sequence: 0x02 -> 0x01 -> 0x03)
   - byte 2 is set to 0x01 which disables toggling. 0x02 would be LED toggling without ramp control, 0x03 would be toggling with ramp control
   - byte 3 to 6 define the brightness values for the LEDs (R,G,B,W) for the first on cycle when toggling
   - byte 7 defines the toggling frequency (if toggling enabled)
   - byte 8 to 11 define the brightness values for the LEDs (R,G,B,W) for the second on cycle when toggling
   - byte 12 is constant 0x87

Comparison to M32/R32:
 - The algorithms for decrypting the OEM firmware are the same for M30/M32/R32, only the keys differ
 - The keys are available in the GPL sources for the M32
 - The M32/R32 contained raw data in the firmware images (kernel, rootfs), the R30 uses a sysupgrade tar instead
 - Creation of the recovery image is quite similar, only the header start string changes. So mostly takeover from M32/R32 for that.
 - Turned out that the bytes at offset 0x0E and 0x0F in the recovery image header are the checksum over the data area
 - This checksum was not checked in the recovery web interface of M32/R32 devices, but is now active in R30
 - I adapted the recovery image creation to also calculate the checksum over the data area
 - The recovery image header for M30 contains addresses which don't match the memory layout in the DTS. The same addresses are also present in the OEM images
 - The recovery web interface either calculates the correct addresses from it or has it's own logic to determine where which information must be written

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-03-31 19:01:20 +02:00
Roland Reinl
0e2b7e3bd6 mediatek: Moved recovery image creation to include/image-commands.mk
The recovery image is reqired for D-Link M30 as well. So I moved it to include/image-commands.mk to be able to use it for MT7622 and filogic devices.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-03-31 19:01:20 +02:00
Hauke Mehrtens
fb2c6e9d4d kernel: bump 5.15 to 5.15.153
Removed because they are upstream:
generic/backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=c5c0760adc260d55265c086b9efb350ea6dda38b

generic/pending-5.15/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=448cc8b5f743985f6d1d98aa4efb386fef4c3bf2

generic/pending-5.15/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=9fcadd125044007351905d40c405fadc2d3bb6d6

Add new configuration symbols for tegra target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-31 18:34:04 +02:00
John Audia
b04f245c39 kernel: bump 6.6 to 6.6.23
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23

Removed upstreamed:
  pending-6.6/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch[1]
  pending-6.6/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch[2]
  mediatek/patches-6.6/232-clk-mediatek-mt7981-topckgen-flag-SGM_REG_SEL-as-cri.patch[3]

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

Added:
  generic/backports-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=1f32abb474c1c9bdb21d9eda74c325a0b3a162e5
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=943c14ece95eb1cf98d477462aebcbfdfd714633
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=6ff01b314149d1cf59caebc29384f0beed21cba4
4. See comments in https://github.com/openwrt/openwrt/pull/14992 regarding broken flogic/xiaomi_redmi-router-ax6000-ubootmod

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezannei, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-31 18:19:33 +02:00
Marco von Rosenberg
06cdc07f8c ath79: add support for Huawei AP5030DN
Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
enterprise access point with two Gigabit Ethernet ports and PoE
support.

Hardware highlights:
- CPU: QCA9550 SoC at 720MHz
- RAM: 256MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: QCA9550-internal radio
- Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
- Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
- Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
- PoE: input through Ethernet 1 port
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: SGM706 (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - eth1 = label MAC + 1
    - radio0 (Wi-Fi 5GHz) = label MAC + 2
    - radio1 (Wi-Fi 2.4GHz) = label MAC + 3

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script
   "run ramboot". Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile
     openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot
   be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from
non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP5X30XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap5030dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues
-----------------------

- On initial power-up, the Huawei-modified bootloader suspends both
ethernet PHYs (it sets the "Power Down" bit in the MII control
register). Unfortunately, at the time of the initial port, the kernel
driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
callback defined which would clear this bit. This makes the PHY unusable
since it remains suspended forever. This is why the backported kernel
patches in this commit are required which add this callback and for
completeness also a suspend callback.

- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.

- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the CPU_CLK/4 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
[fixed 6.6 backport patch naming]
Signed-off-by: David Bauer <mail@david-bauer.net>
2024-03-31 18:09:43 +02:00
Felix Fietkau
0cb3e86557 kernel: fix build issue on macOS
On x86, the build failed while trying to compile tools/lib/string.c because
of a clash with the system provided implementation for strlcpy
Add ifdefs to prevent the conflict.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-03-30 21:59:24 +01:00
Shiji Yang
085feb60ad ath79: move D-Link DAP-1720 A1 to tiny sub-target
This device only has 64 MiB RAM and ath10k wireless driver will
consume a lot of memory. Let's move it to the tiny sub-target to
get extra 7 MiB of free space. In this way, we can extend their
lifetime to receive support for the next OpenWrt LTS version. This
patch also trims the duplicate "recovery.bin" image as it's the
same as the "factory.bin".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
8201e402c5 ath79: move D-Link DIR-859 and DIR-869 series to tiny sub-target
These devices only have 64 MiB RAM and ath10k wireless driver will
consume a lot of memory. Let's move them to the tiny sub-target to
get extra 7 MiB of free space. In this way, we can extend their
lifetime to receive support for the next OpenWrt LTS version. This
patch also trims the USB package for the non-existent USB port.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
9a6c1846bb ath79: tiny: enable NVMEM u-boot-env driver
The upcoming D-Link devices to the tiny sub-target require it to
parse the u-env MAC address. The kernel size will increase by
about 1 KiB.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
82208eb527 ath79: move seama image recipe to the common Makefile
Move seama image recipe to the common Makefile in order for some
tiny sub-target D-Link devices can share it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
60061b5c26 ath79: disable building small Flash EnGenius devices
The buildbot has not successfully built them for a long time due
to small Flash size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Chukun Pan
4ae474afbd mediatek: filogic: add Netcore N60 support
Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: W632GU6NB DDR3 256MB
  Ethernet: 1x 2.5G + 4x 1G
  WiFi1: MT7975N 2.4GHz 4T4R
  WiFi2: MT7975PN 5GHz 4T4R
  Button: Reset, WPS
  Power: DC 12V 2A

Flash instructions:
  1. Connect to the router using ssh or telnet,
     username: useradmin, password is the web
     login password of the router.
  2. Use scp to upload bl31-uboot.fip and flash:
     "mtd write xxx-preloader.bin spi0.0"
     "mtd write xxx-bl31-uboot.fip FIP"
     "mtd erase ubi"
  3. Connect to the router via the Lan port,
     set a static ip of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  4. Download initramfs image, reboot router,
     waiting for tftp recovery to complete.
  5. After openwrt boots up, perform sysupgrade.

Note:
  1. Back up all mtd partitions before flashing.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-29 22:54:28 +01:00
Mieczyslaw Nalewaj
362e7103c6 ramips: mt7620a_tplink_archer-c5-v4: use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ
Use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ instead function-enumerator

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-03-29 20:10:42 +01:00
Florian Eckert
a998a12a2f imagebuilder: add check if target is sourced from feed
The image generation would fail, if the target is included from a feed.
To fix this, check if targets is found in the feed directory.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-03-29 20:00:27 +01:00
Florian Eckert
27d227b682 imagebuilder: check if BOARD is located in the feeds sub directory
Fixes the regression so that targets that were installed via a feed can
also be build again with the Image Builder.

Fixes: 84ec8c4 ("imagebuilder: copy from buildroot only target/linux")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-03-29 20:00:27 +01:00
Tianling Shen
163c3d0bde rockchip: remove redundant 'console' parameter from boot script
ttyS2 is the default console used for all rockchip boards.
The redundant 'console=tty1' parameter now breaks the console due to
recent procd update.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Tianling Shen
50e6c8ae8d rockchip: remove 'swiotlb' parameter from boot script
We have hardware IOMMU support and this is totally unnecessary.
The given value is also unreasonable, it's too small and causes
kernel panic in some cases:

[ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots)
[ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots)

This parameter seems to be added by mistake, so remove it.

Fixes: e35c7ab51f ("rockchip: merge bootscript")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Robert Marko
5876b4afb9 qualcommax: default to kernel 6.6
6.6 has been in testing on qualcommax for a while so it should be in a
good shape, but lets default to it to get a wider audience.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 18:56:31 +01:00
Hauke Mehrtens
2ec025d554 kernel: bump 5.15 to 5.15.152
Removed because it is upstream:
generic/backport-5.15/081-v5.17-regmap-allow-to-define-reg_update_bits-for-no-bus.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=fbddd48f1456db32b675fad95a902de38345902a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-29 13:44:41 +01:00
Hauke Mehrtens
0307571124 kernel: bump 5.15 to 5.15.151
No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-29 13:44:41 +01:00
Robert Marko
b1d579f174 archs38: remove 5.15 support
Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 09:58:45 +01:00
Robert Marko
00c26f4728 archs38: default to kernel 6.1
Default to kernel 6.1 on archs38.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 09:58:45 +01:00
Mieczyslaw Nalewaj
de8a6ce5ea generic: 6.6: add kernel missing symbol
Add missing symbol CONFIG_SSIF_IPMI_BMC causing bcm53xx compilation errors.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-03-29 09:58:18 +01:00
Rafał Miłecki
eb370ebc5f bcm47xx: refresh kernel 6.1 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-29 00:12:50 +01:00
Rafał Miłecki
8583a97c06 bcm47xx: add testing support for kernel 6.1
Tested on Luxul XWR-1750 (BCM4706). Working: switch (LAN, WAN), LEDs,
sysupgrade.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-29 00:11:04 +01:00
Rafał Miłecki
d4a40827ba bcm4908: refresh kernel 6.6 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 13:29:52 +01:00
Rafał Miłecki
c3dc52fb3c bcm4008: prepare to work on kernel 6.6
Don't add KERNEL_TESTING_PATCHVER yet as there are some issues with it.

On TP-Link Archer C2300 serial console seems to stop working after
preinit:
> Press the [f] key and hit [enter] to enter failsafe mode
> Press the [1], [2], [3] or [4] key and hit [enter] to select the de�

On Netgear R8000P XHCI causes external abort:
[    2.139586] Internal error: synchronous external abort: 0000000096000210 [#1] SMP
[    2.147212] Modules linked in: xhci_plat_hcd(+) xhci_hcd ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug(O) usbcore nls_base usb_common crc32c_generic
[    2.164774] CPU: 0 PID: 358 Comm: kmodloader Tainted: G           O       6.6.22 #0
[    2.172658] Hardware name: Netgear R8000P (DT)
[    2.177229] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    2.184395] pc : xhci_gen_setup+0x80/0x34c [xhci_hcd]
[    2.189591] lr : xhci_gen_setup+0x74/0x34c [xhci_hcd]
[    2.194788] sp : ffffffc0815d37b0
[    2.198194] x29: ffffffc0815d37b0 x28: ffffff8002000000 x27: ffffff8001172d88
[    2.205540] x26: ffffff8002000000 x25: 0000000000000000 x24: ffffffc078b603c0
[    2.212888] x23: ffffffc078b2a008 x22: ffffff8001172c10 x21: ffffff8002000000
[    2.220235] x20: ffffff8002000000 x19: ffffff8002000250 x18: 0000000000000000
[    2.227582] x17: 626d756e20737562 x16: 2064656e67697373 x15: ffffffffffffffff
[    2.234929] x14: ffffff80019e9915 x13: ffffff80019e9913 x12: 00000000ffffffea
[    2.242276] x11: 00000000ffffefff x10: 0000000000000062 x9 : 00000000ffffffd0
[    2.246760] bcm63138_nand ff801800.nand-controller: timeout waiting for command 0x4
[    2.249623] x8 : 0000000000000073 x7 : ffffffc0815d37c0 x6 : 0000000000000075
[    2.257513] bcm63138_nand ff801800.nand-controller: intfc status c00000e0
[    2.264855] x5 : 0000000000000081 x4 : 0000000000000000 x3 : ffffff8001b61800
[    2.279193] x2 : ffffffc080b5d000 x1 : ffffff80020003a8 x0 : ffffff8002000398
[    2.286540] Call trace:
[    2.289048]  xhci_gen_setup+0x80/0x34c [xhci_hcd]

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 13:29:52 +01:00
Rafał Miłecki
4aff8d0d52 bcm4908: switch to the kernel 6.1
Tested on Netgear R8000P and TP-Link Archer C2300.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 13:29:52 +01:00
Rafał Miłecki
359be94f5e bcm4908: use DT to mark NAND controller WP pin as not connected
Use cleaner and more upstream-fit solution.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 13:29:52 +01:00
Robert Marko
fd58b1a8bc airoha: remove 5.15 support
Now that 6.1 is default, remove 5.15 support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-28 13:06:43 +01:00
Robert Marko
cbc2664d1d airoha: default to kernel 6.1
6.1 has been present as testing for a while now, so default to it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-28 13:06:43 +01:00
Rafał Miłecki
6ddc9fc4b5 kernel: backport brcmnand support for "brcm,wp-not-connected"
It's required to support NAND controllers with WP pin on boards that
don't have it connected to NAND chip.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 08:52:23 +01:00
Rafał Miłecki
2feedab805 bcm53xx: refresh kernel 6.6 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 00:11:37 +01:00
Rafał Miłecki
f0d8ce4f48 bcm53xx: add testing support for kernel 6.6
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 00:06:26 +01:00
Rafał Miłecki
67b8ddbe34 bcm53xx: switch to the kernel 6.1
Successfully verified on Luxul XWR-3150 (BCM47094). Tested LAN, WAN,
Wi-Fi, USB, sysupgrade.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 00:05:50 +01:00
Rafał Miłecki
2481aa4a46 bcm53xx: refresh kernel 6.1 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 00:05:50 +01:00
Rafał Miłecki
dd78a59cd7 kernel: fix NVMEM looking for OTP NVMEM cells in wrong DT node
It was breaking NAND controllers drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 00:05:50 +01:00
Chukun Pan
29515862ac sunxi: backport h616 thermal sensor support
Backport H616 thermal sensor support from linux-next.
Tested on the Orange Pi Zero 3 (H618 SoC).

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-26 21:56:57 +01:00
Chukun Pan
29b8ba75fa sunxi: add support for Orange Pi Zero 3
Key features:
  Allwinner H618 SoC (Quad core Cortex-A53)
  1/1.5/2/4 GiB LPDDR4 DRAM
  1 USB 2.0 type C port (Power + OTG)
  1 USB 2.0 host port
  1Gbps Ethernet port
  Micro-HDMI port
  MicroSD slot

Installation:
  Write the image to SD Card with dd.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-26 21:56:57 +01:00
Chukun Pan
85b156c113 generic: 6.1: backport AXP PMIC support
Backport AXP15060, AXP313a and AXP192 support.
The AXP15060 PMIC is used for starfive boards,
and the AXP313a PMIC is used for sunxi boards.
Remove conflicting patches from starfive target.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-26 21:56:57 +01:00
Daniel Golle
79e9ce354e generic: phy-mediatek-xfi-tphy: fix SGMII issue
Fix issue of transmitting abnormal data which leads to link problems
in 1G and 2.5G SerDes modes (SGMII, 1000Base-X, 2500Base-X) on the
MediaTek MT7988 SoC.

Link: b72d6cba92
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-25 22:00:37 +00:00
Goetz Goerisch
71ccb35017 realtek: add Zyxel GS1900-8 v2
The Zyxel GS1900-8 v2 or Rev.B1 is a newer variant of the GS1900-8, but
otherwise similar to the other GS1900 switches.

Differences
------------
* Front Button labeled RESTORE
* NO Power Switch on rear
* Serial Header next to the barrel power connector
* Part Number ends 0102F

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
2024-03-25 21:28:44 +01:00
Allen Zhao
640b0b79ff mediatek: filogic: add Unielec U7981-01 support
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 8GB eMMC or 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 5x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset
  USB: M.2(B-key) for 4G/5G Module
  Power: DC 12V 1A
  UART: 3.3v, 115200n8
  --------------------------
  |         Layout         |
  |   -----------------    |
  | 4 | VCC RX TX GND | <= |
  |   -----------------    |
  --------------------------

The U-boot menu will automatically appear at startup, and then select
the required options through UP/DOWN Key.

NAND Flash and eMMC Flash instructions:
1. Set your computers IP adress to 192.168.1.2.
2. Run a TFTP server providing the sysupgrade.bin image.
3. Power on the router, into the U-Boot menu.
4. Select "2. Upgrade firmware"
5. Update sysupgrade.bin file name, input server IP and input device
   IP (if they deviate from the defaults)
6. Wait for automatic startup after burning

Signed-off-by: Allen Zhao <allenzhao@unielecinc.com>
2024-03-25 18:14:19 +00:00
Pawel Dembicki
004eac14ab mpc85xx: add 6.6 testing kernel
This commit adds 6.6 kernel as testing verion.

Run tested:
p2020/p2020-rdb
p1010/TL-WDR4900-V1
p1010/BR200-WP

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
7a43f185c9 mpc85xx: kernel: 6.6: refresh config
config-6.6 refreshed by 'make kernel_oldconfig'
p2020 config-default refreshed manually

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
affdd9eee8 mpc85xx: kernel: 6.6: refresh patches
Manualy refreshed:
101-powerpc-85xx-hiveap-330-support.patch
105-powerpc-85xx-panda-support.patch

Rest done by 'make target/linux/refresh'

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
3146fdfd71 kernel/mpc85xx: Restore kernel files for v6.1
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.

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

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
25abc8f4ad kernel/mpc85xx: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
40abd9555b mpc85xx: refresh kernel config
Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
ceee14ea3a kernel: generic: add missing symbol
Found durring 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
2cda7e0e2d mpc85xx: remove 5.15 support
Kernel is switched to 6.1. Lets remove 5.15 support.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
2733831e1c mpc85xx: switch to 6.1 kernel
We need to prepare for 6.6. Switch to 6.1 for wider testing.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Pawel Dembicki
7dbe27e3f7 mpc85xx: copy missing patch from 5.15 to 6.1
patch 150-arch-powerpc-simpleboot-prevent-overwrite-of-CPU1-sp.patch
was missed durring copy from 5.15 to 6.1.

This patch restore it.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:20:46 +01:00
Tim Harvey
041fd1c835 imx: kernel: add imx8mp PCI support
IMX8MP PCI support requires a few patches backported from Linux 6.2.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-03-24 21:19:10 +01:00
Tim Harvey
bd512e368f imx: add Gateworks Venice support
Add support for Gateworks Venice imx8m family of boards:
 - required kernel modules for on-board devices
 - image generation
 - initial network config
 - sysupgrade support

The resulting compressed disk image
(bin/targets/imx/cortexa53/openwrt-imx-cortexa53-gateworks_venice-squashfs-img.gz)
can be installed on a Gateworks venice board via U-Boot:

u-boot=> tftpboot $loadaddr openwrt-imx-cortexa53-gateworks_venice-squashfs-img.gz && \
         gzwrite mmc $dev $loadaddr $filesize

WARNING: this will overwrite any boot firmware on the eMMC user hardware
partition which if being used will brick your board requiring JTAG to
re-program boot firmware and recover

The compressed disk image contains the partition table and filesystems only
and that it is expected that boot firmware is installed properly on the
eMMC boot0 hardware partition. The easiest way to ensure this is to
use the Gateworks JTAG adapter/process to install the latest boot firmware
as follows from a Linux host:
  wget http://dev.gateworks.com/jtag/jtag_usbv4
  chmod +x jtag_usbv4
  wget http://dev.gateworks.com/venice/images/firmware-venice-imx8mm.bin
  sudo ./jtag_usbv4 -p firmware-venice-imx8mm.bin

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-03-24 21:19:10 +01:00
Tim Harvey
ae8bf1a26e imx: add imx8m support
Add imx8m support:
 - add a cortexa53 subtarget to imx
 - move ARCH and KERNELNAME to subtargets
 - account for kernel modules that are not used for cortexa53

No device-specific targets or firmware images are created yet but all
imx8m* dtbs will be built.

enabling CONFIG_TARGET_ROOTFS_INITRAMFS results in
openwrt-imx-cortexa53-imx8m-initramfs-kernel.bin which has been
successfully booted on an imx8mm-evk using the following:

u-boot=> tftpboot $fdt_addr_r image-imx8mm-evk.dtb && \
tftpboot $kernel_addr_r openwrt-imx-cortexa53-imx8m-initramfs-kernel.bin && \
booti $kernel_addr_r - $fdt_addr_r

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-03-24 21:19:10 +01:00
INAGAKI Hiroshi
a5259c237e ath79: register ttyATH1 as OpenWrt console for ELECOM WAB-I1750-PS
Add a hotplug script and add ttyATH1 on ELECOM WAB-I1750-PS to
/etc/inittab while booting for using that console as an OpenWrt console.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-24 21:10:59 +01:00
INAGAKI Hiroshi
342f55eeb3 ath79: register all ttys as Linux console for ELECOM WAB-I1750-PS
Register ttyS0 and ttyATH1 as Linux console on ELECOM WAB-I1750-PS.
ttyS0 provides "SERVICE" port and internal pin header for debugging and
recoverying by maker, ttyATH1 provides "SERIAL" port for configuration
by users.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-24 21:10:59 +01:00
Pawel Dembicki
f89bdab832 kirkwood: resize kernel partition for kirkwood devices
The 6.1 kernel has caused another increase in kernel size, and now
it's more than 3MB:

WARNING: Image file iom_ix4-200d-uImage is too big: 3170394 > 3145728
WARNING: Image file iom_ix2-200-uImage is too big: 3171494 > 3145728
WARNING: Image file linksys_e4200-v2-uImage is too big: 3171879 > 3145728
WARNING: Image file linksys_ea4500-uImage is too big: 3171871 > 3145728
WARNING: Image file linksys_ea3500-uImage is too big: 3171651 > 3145728

This causes problems for 5 devices:
  - Iomega StorCenter ix2/ix4
  - Linksys EA3500/EA4200/EA4500

They have enough resources for proper operation with 6.1, but all of
them had a 3MB kernel size limit. Let's keep them alive and
resize kernel partitions to 4MB.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Pawel Dembicki
93b3334a35 kirkwood: remove 5.15 kernel support
Kernel was switched to 6.1. Lets drop 5.15 support.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Pawel Dembicki
48f108d46b kirkwood: switch kernel version to 6.1
6.1 testing version was introduced some time ago. Kernel size issues
are resolved now. Time to bump kernel version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Pawel Dembicki
ccbdb212f3 kirkwood: Add missing package dependency
When build images with the 6.1 kernel for all devices and all kmods,
there is one dependancy error:

  pkg_hash_check_unresolved: cannot find dependency kmod-thermal
  for kmod-hwmon-gpiofan

This commit fix that issue.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Pawel Dembicki
03ffebb6dd kirkwood: 6.1: backport Marvell 88E6171 init fix patch
After commit de5c9bf40c45 ("net: phylink: require supported_interfaces to
be filled") Marvell 88e6171 switches fail to be probed:

[    1.263852] mv88e6085 f1072004.mdio-bus-mii:10: switch 0x1710 detected: Marvell 88E6171, revision 2
[    2.177654] mv88e6085 f1072004.mdio-bus-mii:10: OF node /ocp@f1000000/mdio-bus@72004/switch@10/ports/port@5 of CPU port 5 lacks the required "phy-mode" property
[    2.194230] mv88e6085 f1072004.mdio-bus-mii:10: phylink: error: empty supported_interfaces
[    2.202554] error creating PHYLINK: -22
[    2.214109] mv88e6085: probe of f1072004.mdio-bus-mii:10 failed with error -22

Upstream handled it. Lets backport patch.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Pawel Dembicki
fff9316268 kirkwood: Add missing phy-mode and fixed links
Copied from original Andrew's Lunn commit message:

    The DSA framework has got more picky about always having a phy-mode
    for the CPU port. The Kirkwood Ethernet is an RGMII port. Set the
    switch to impose the RGMII delays.

    Additionally, the cpu label has never actually been used in the
    binding, so remove it.

This commit backport change from upstream and fix downstream EA3500 dts.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-24 21:07:17 +01:00
Steffen Loley
6e7bc0c243 ramips: add support for TP-Link RE205 v3
TP-Link RE205 v3 is a wireless range extender with Ethernet and 2.4G and 5G
WiFi with external antennas.
It's based on MediaTek MT7628AN+MT7610EN like the RE200 v3/v4 but with
external antennas.

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

- MediaTek MT7628AN (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet
- 5x LED (GPIO-controlled), 2x button
- UART connection holes on PCB (57600 8n1)

There are 2.4G and 5G LEDs in blue which are controlled separately.

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

Installation is identical to RE200 v3 devices as described at
https://openwrt.org/toh/tp-link/re200#installation

Web Interface
-------------

It is possible to upgrade to OpenWrt via the web interface. Simply flash
the -factory.bin from OEM. In contrast to a stock firmware, this will not
overwrite U-Boot.

Recovery
--------

U-Boot seems to be locked on newer versions, if not it can be accessed over
the UART as described in the link above.

Signed-off-by: Steffen Loley <slo-src@web.de>
2024-03-23 23:38:33 +01:00
Christian Lamparter
2597dce5f7 uml: restore 6.1 config + patches
keep the main 6.1 files around until they too will be deleted.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-03-23 21:38:00 +01:00
Christian Lamparter
bfd1fd5da3 uml: add 6.6 testing kernel config + patches
apart from refreshes to both config and patches, nothing has changed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-03-23 21:37:28 +01:00
Christian Lamparter
7656be978a uml: remove 5.15 config + patches
no longer in use as we migrate to 6.6 shortly.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-03-23 21:36:40 +01:00
Christian Lamparter
bbaf6b764e uml: promote to 6.1 kernel
there have been no reports of any problems with 6.1.
let's make it the default kernel.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-03-23 21:22:47 +01:00
Christian Lamparter
cf6849a6bf apm821xx: WNDR4700: fix fan-control
This service was unfunctional due to not having its executable bit set.
Furthermore, sysupgrade complains about the file being present in images.

Also, the tc654 driver doesn't provide pwm1_enable sysfs file, instead its
now called pwm1_mode.

Please note that the fan was always spinning. It should now turn off, when
there's enough the thermal headroom.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-03-23 21:22:47 +01:00
Qingfang Deng
6b007d2512 treewide: disable spectre mitigation on unaffected Arm64 targets
Cortex-A53 is not vulnerable to any Spectre variants.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 20:00:49 +01:00
Qingfang Deng
54f9744c82 treewide: disable spectre mitigation on unaffected Arm32 targets
Cortex-A5 and Cortex-A7 are not vulnerable to any Spectre variants.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 20:00:49 +01:00
Richard Kunze
92c21b2e18 realtek: support common GPIOs on D-Link DGS-1210-16
D-Link DGS-1210-16 hangs when rebooting and has no support for the reset
button.

Fix both by enabling the same GPIOs for reboot and the reset button as
already used for D-Link DGS-1210-20 and D-Link DGS-1210-28.

Signed-off-by: Richard Kunze <kunze@tivano.de>
2024-03-23 18:36:51 +01:00
Qingfang Deng
27ce04a948 kernel: fix iptables offload build without nftables
When rebasing patches on top of 6.1, a change that removed NF_TABLES
from NF_FLOW_TABLE's dependency was dropped accidentally, and iptables
flow offload module can only be built when nftables is selected.
Restore the change to fix it.

Fixes: 19a246bb65 ("generic: 6.1: manually refresh hack patches")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 17:33:24 +01:00
Qingfang Deng
686cc58c10 kernel: support RISC-V PMU
Add RISC-V PMU config symbols and enable them for riscv64.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 17:28:55 +01:00
Marius Durbaca
f7c732bf9e rockchip: add Radxa E25 board support
Radxa E25 is a network application carrier board for the Radxa CM3
Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC.

It has the following features:

- MicroSD card socket, on board eMMC flash
- 2x 2.5GbE Realtek RTL8125B Ethernet transceiver
- 1x USB Type-C port (Power and Serial console)
- 1x USB 3.0 OTG port
- mini PCIe socket (USB or PCIe)
- ngff PCIe socket (USB or SATA)
- 1x User LED and 16x RGB LEDs
- 26-pin expansion header

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

Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
2024-03-23 07:55:43 +01:00
Robert Marko
36acf88fe0 qualcommax: add 6.6 as testing kernel
Provide kernel 6.6 as the testing kernel for qualcommax.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
4989556a53 qualcommax: ipq807x: add WLAN device path migration
Kernel 6.6 has changed the path of WLAN devices as the soc node was updated
to include an adress as well because according to spec it needed one:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v6.6.21&id=da6aa1111a17db11367817ddc10c5a6c188cdc44

So, this will break existing configuration as device path was changed for
example:
"platform/soc/c000000.wifi" to "platform/soc@0/c000000.wifi"
"platform/soc/c000000.wifi+1" to "platform/soc@0/c000000.wifi+1"

PCIe attached devices also have their path changed, so lets add a script
that will migrate the paths based on the detected running kernel version
so returning to kernel 6.1 will work as well.

Co-developed-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
cab45db187 qualcommax: 6.6: fix SCM header include path for WCSS
SCM header was moved to <linux/firmware/qcom/qcom_scm.h> so adjust the
WCSS patch accordingly.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
9b650e1319 qualcommax: 6.6: refresh config
Refresh 6.6 qualcommax kernel config via kernel_menuconfig.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
d9386dc8e9 qualcommax: 6.6: make patches apply
Drop backported patches already included in 6.6 and refresh the rest to
apply.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
e8e7b3c106 kernel/qualcommax: Restore kernel files for v6.1
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.

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

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
e28492c81a kernel/qualcommax: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

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

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 21:19:21 +01:00
Robert Marko
6bdea8c7bd mediatek: mt7629: 6.6: disable LEDS_SMARTRG_LED by default
When building MT7629 with ALL_KMODS then we get prompted for
LEDS_SMARTRG_LED and this will break CI and in future buildbot compilation.

It depends on I2C so the symbol is hidden until ALL_KMODS is used and I2C
support is available, so disable the LEDS_SMARTRG_LED symbol in 6.6 config
intentionally as is done in the 6.1 mt7629 config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 14:17:50 +01:00
Robert Marko
494c5691c6 kernel: config: 6.6: add missing ARM64 SM4 CE symbols
Disable CONFIG_CRYPTO_SM4_ARM64_CE_CCM and CONFIG_CRYPTO_SM4_ARM64_CE_GCM
in the generic config like we do with similar CE symbols.

This avoids the need to disable them in individual targets.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-22 11:37:01 +01:00
Daniel Golle
1a47ce5ff2 mvebu: puzzle-m90x: optimize thermal zone
* have more defined PWM steps similar to the vendor's shell script doing
   the same thing
 * replace PWM values with experiencal values provided by forum users
 * increase hyteresis to prevent changing fan speed every second
   (just because it's annoying to listen to)
 * add 'hot' trip point at 75 deg. to warn users that shutdown is imminent

Tested on Puzzle M902 only for now, PWM values for Puzzle M901 might be
slightly different but should quite certainly also be rised.

Suggested-by: Martin Gierschner <martin_gierschner@gmx.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-21 21:25:38 +00:00
Chuanhong Guo
a6991fc7d2 mediatek: mt7622: add a second u-boot for redmi-ax6s
The vendor u-boot knows nothing about UBI, and we used to have a
fixed-size kernel partition for vendor u-boot and UBI for rootfs.
However, that fixed partition becomes too small eventually, and
expanding it requires complicated procedure.

This commit changed the flash layout and added a second u-boot
where the kernel supposed to be.
Now the vendor u-boot chainloads our mainline u-boot, and our
u-boot reads kernel+rootfs from UBI, verifies it, and boot
into OpenWrt.

There are two possible ways to convert from the old fw:
Flash the factory image using mtd (provided by @rany2):

mount -o remount,ro /
mount -o remount,ro /overlay
cd /tmp
dd if=factory.bin bs=1M count=4 | mtd write - kernel
dd if=factory.bin bs=1M skip=4 | mtd -r write - ubi

Or, flash the 2nd u-boot via mtd and upload the firmware
to the 2nd u-boot using tftp:

1. prepare a tftp server at 192.168.1.254 to serve the
   sysupgrade image:
   openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb
2. upload the ubi-loader.itb to OpenWrt /tmp, and flash it to
   the old kernel partition:
   mtd -r write openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-ubi-loader.itb
3. The router should reboot and flash the sysupgrade image via TFTP.

Procedure for flashing from vendor firmware shouldn't change.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-03-21 16:55:13 +08:00
Robert Marko
362f9c41a4 ramips: mt7621: disable Edgerouter X image generation
With kernel 6.1 image size is too large for Edgerouter X current size
limit and is causing the buildbots to fail building so images for other
devices are not updated as well.

So, disable building Edgerouter X images until a workaround is found.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-20 12:06:35 +01:00
John Audia
3cd3afd92e kernel: bump 6.1 to 6.1.82
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.82

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-19 00:33:51 +01:00
John Audia
1366378dfe kernel: config: add symbol introduced with 6.1.82
Add CONFIG_MITIGATION_RFDS=y to the default config[1]

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-19 00:33:51 +01:00
Pawel Dembicki
b81f2ab9da generic: kernel: fix libata ledtrig support in 6.6
Upstream commit e298d8a38b23 [0] changed method how to blink delays are pased
to function. Downstream commit must follow it.

[0] https://lore.kernel.org/r/20230510162234.291439-2-hdegoede@redhat.com

Reported-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-03-18 22:24:17 +01:00
Paweł Owoc
879af72b48 qualcommax: ipq807x: Fix MAC addresses usage for RAX120v2
Currently, 6 MAC addresses are read from the "boarddata1" partition and set for network interfaces in sequence.
This partition only contains 3 MAC addresses:
1. lan mac
2. wan mac
3. wlan5g mac
As result only lan2, lan3 and lan4 have correct (OUI) MAC addresses.
lan1, lan5 and wan interfaces get MAC addresses with incorrect OUI from random data on "boarddata1" partition.

This commit fix this and use first MAC for lan and second MAC for wan interfaces.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2024-03-18 22:19:42 +01:00
Chukun Pan
1388444f9b qualcommax: ipq60xx: set PHY mode to psgmii for port 5
The port 5 of most ipq60xx devices is connected to qca8075,
a few are connected to qca8081. So assume that the default
connection is qca8075 and set the phy mode to psgmii.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
Chukun Pan
3075d56c4c qualcommax: set phy-mode to sgmii for QCA8081
The dp5 node uses psgmii by default, corrected
the phy-mode to sgmii for the qca8081 phy.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
Chukun Pan
a75102bbbc qualcommax: dts: cleanup whitespace
Replace blanks with tabs, remove extra blank lines.
Also add new lines as appropriate.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
Rafał Miłecki
081cd769fc kernel: backport some useful LED_FUNCTION_* defines for DT
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-17 22:55:32 +01:00
John Audia
34b8c70a81 kernel: bump 6.6 to 6.6.22
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.22

Affected Patch automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-17 21:16:52 +01:00
John Audia
6642d6c24e kernel: bump 6.6 to 6.6.21
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.21

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-17 21:16:52 +01:00
Daniel Golle
fc177695e0 mvebu: enable thermal zone polling for IEI Puzzle devices
Marvell's thermal sensors do not support interrupts, so we need to
poll them. Reading temperature every second should be enough to
control the fan.
While at it, also make sure fan speed is reduced again if temperature
goes down.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-17 19:37:14 +00:00
INAGAKI Hiroshi
f7275dedd4 qualcommax: ipq807x: fix LEDs on Buffalo WXR-5950AX12
On Buffalo WXR-5590AX12, some LEDs don't have "function" property and
only "color" property is available for the newer binding of LED on
Linux Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "white:"/"red:") will be appeared as LED names
and renamed to "<color>:_<num>" ("ex.: "white:_1", "green:_2", ...) by
kernel.

logs:

[    5.372863] leds-gpio leds: Led white: renamed to white:_1 due to name collision
[    5.375796] leds-gpio leds: Led red: renamed to red:_1 due to name collision

/sys/class/leds:

root@OpenWrt:/# ls /sys/class/leds/
red:         red:power    white:       white:power
red:_1       red:wlan     white:_1     white:wlan

Fix this issue by adding missing "function" property to LEDs on Buffalo
WXR-5950AX12.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.

Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-17 17:31:02 +01:00
INAGAKI Hiroshi
5c1c823c4a qualcommax: ipq807x: fix LEDs on QNAP QHora-301W
On QNAP QHora-301W, all LEDs don't have "function" property and only
"color" property is available for the newer binding of LED on Linux
Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "amber:"/"green:"/"red:") will be appeared as
LED names and renamed to "<color>:_<num>" ("ex.: "green:_1", "green:_2",
...) by kernel.

logs:

[    4.246494] leds-gpio leds: Led green: renamed to green:_1 due to name collision
[    4.248978] leds-gpio leds: Led green: renamed to green:_2 due to name collision
[    4.256345] leds-gpio leds: Led green: renamed to green:_3 due to name collision
[    4.263770] leds-gpio leds: Led green: renamed to green:_4 due to name collision
[    4.271105] leds-gpio leds: Led amber: renamed to amber:_1 due to name collision
[    4.278487] leds-gpio leds: Led green: renamed to green:_5 due to name collision
[    4.285856] leds-gpio leds: Led amber: renamed to amber:_2 due to name collision
[    4.293257] leds-gpio leds: Led green: renamed to green:_6 due to name collision
[    4.300616] leds-gpio leds: Led amber: renamed to amber:_3 due to name collision
[    4.308002] leds-gpio leds: Led green: renamed to green:_7 due to name collision
[    4.315384] leds-gpio leds: Led amber: renamed to amber:_4 due to name collision
[    4.322760] leds-gpio leds: Led green: renamed to green:_8 due to name collision
[    4.330135] leds-gpio leds: Led amber: renamed to amber:_5 due to name collision

/sys/class/leds:

amber:          amber:_4        green:_2        green:_6
amber:_1        green:_5        green:_3        green:_7
amber:_2        green:          green:_4        green:_8
amber:_3        green:_1        green:_5        red:

Fix this issue by adding missing "function" (and "function-enumerator")
property to LEDs on QNAP QHora-301W.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.

Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-17 17:31:02 +01:00
Robert Marko
e0638cfe70 archs38: add 6.1 as testing kernel
Allow selecting 6.1 as testing kernel on archs38.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-17 17:28:44 +01:00
Robert Marko
d314b239ef archs38: 6.1: refresh kernel config
Refresh kernel config by running kernel_menuconfig.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-17 17:28:44 +01:00
Robert Marko
6ee7ae6895 kernel/archs38: Restore kernel files for v5.15
This is an automatically generated commit and is needed to outsmart git.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-17 17:28:44 +01:00
Robert Marko
16edee94e8 kernel/archs38: Create kernel files for v6.1 (from v5.15)
This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is needed recommended.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-17 17:28:44 +01:00
Zoltan HERPAI
0dfc0495fc kirkwood: add support for Netgear Stora (MS2000/2110) NAS
Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6281 @1GHz
 - 128Mb RAM
 - 256Mb NAND
 - 1x GbE LAN (Marvell 88E1116)
 - 1x USB 2.0
 - 2x SATA
 - PCF8563 RTC
 - LM75 sensor
 - TC654 PWM fan controller
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Installation:

1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b ./u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 netgear_stora-u-boot.kwb
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-netgear_stora-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

The fan is controlled in 3 stages by a script running every minute
from cron, measuring the CPU temperature.

Snippets taken from bodhi <mibodhi@gmail.com>

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-03-17 00:19:22 +01:00
Qingfang Deng
503d26fb24 kernel: xt_FLOWOFFLOAD: fix use of uninitialized dir variable
The dir variable has been used uninitialized since the port to 5.10, and
somehow this remains undetected by GCC.

Fixes: b10d604459 ("kernel: add linux 5.10 support")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
2024-03-16 15:30:03 +08:00
Chukun Pan
fc9bde82f3 mediatek: mt7622: simplify 02_network
Most mt7622 devices use the mt7531 switch, which have been
switched to dsa driver for a long time. So use dsa as the
default configuration and configure these rtl8367s devices
separately. This reduces the amount of code.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-16 15:27:17 +08:00
Weijie Gao
7d1145ecb9 mediatek: fix build failure of mt7623/mt7629 using kernel 6.6
In kernel 6.6, dts files for mediatek arm target are moved into
arch/arm/boot/dts/mediatek instead of legacy path arch/arm/boot/dts.

To avoid dts compile failure, change DTS_DIR to the mediatek subfolder
for kernel 6.6.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2024-03-16 15:25:05 +08:00
Daniel Golle
6da3c9ddbc generic: 6.6: backport support for SDX75-based MHI 5G modems
Also backport most recent MHI modem additions to Linux 6.6.
Adds support for generic SDX75-based modems.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-15 18:30:31 +00:00
Daniel Golle
e4a4c91d8b generic: 6.1: backport support for various MHI 5G modems
* Dell DW5932e
  * Foxconn T99W175 (HP variant)
  * Foxconn T99W510
  * Generic SDX75-based
  * Quectel EM160R-GL (newer variants)
  * Quectel RM520
  * Quectel RM520N-GL (Lenovo variant)
  * SC8280XP Compute Reference Design
  * Telit FE990

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-15 17:48:02 +00:00
Daniel Golle
2b25f66d0a mediatek: mt7988: add missing clock for PCIe ports
Add missing CLK_TOP_PEXTP_Px_SEL clock for each of the 4 PCIe interfaces
of the MT7988 SoC. Without that clock PCIe doesn't work reliable.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-15 14:09:11 +00:00
Mantas Pucka
904aa43865 qualcommax: ipq60xx: mango-dvk: fix QCA8081 reset timings
Add missing reset delay properties for QCA8081 PHY.
Without delays PHY operation is unreliable.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
2024-03-15 09:13:46 +02:00
Hauke Mehrtens
e40471e923 kernel: Activate CONFIG_NET_VENDOR_DAVICOM
CONFIG_NET_VENDOR_DAVICOM is needed to activate the CONFIG_DM9000 option
which builds the kmod-dm9000. This fixes the following warning:
logs/package/kernel/linux/compile.txt:WARNING: kmod-dm9000 is not available in the kernel config - generating empty package

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-14 20:56:18 +01:00
Hauke Mehrtens
fcf0453549 kernel: kmod-can: Fix build of can drivers
Many can kernel modules are now gated by the newly introduced
CONFIG_CAN_NETLINK configuration option. Activate it to build the can
drivers again.
This was changed in this upstream Linux commit:
https://git.kernel.org/linus/df6ad5dd838e0fa543ca28ca6154901fa65a9443

This should fix these warnings with kernel 6.1 and 6.6:
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-c-can is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-c-can-pci is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-c-can-platform is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-mcp251x is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-slcan is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-usb-8dev is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-usb-ems is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-usb-kvaser is not available in the kernel config - generating empty package
logs/package/kernel/linux/compile.txt:WARNING: kmod-can-usb-peak is not available in the kernel config - generating empty package

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-14 20:56:11 +01:00
Zoltan HERPAI
af860c4dbf mxs: switch default kernel to 6.1
The testing kernel has been available since Jul/2023, let's switch
to it by default.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-03-14 14:24:16 +01:00
Nick Hainke
7b89388674 ramips: 5.15: delete remaining files
Remove the remaining configuration entries that were omitted in the
previous commit.

Fixes: 1576474f55 ("ramips: switch to 6.1 kernel")
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-03-13 23:51:23 +01:00
Jean Thomas
d1016446da mediatek: Add support for GL.iNet X3000 (Spitz AX) and XE3000 (Puli AX)
The GL.iNet X3000 and XE3000 are Wi-Fi 6 5G cellular routers, based on
MediaTek MT7981A SoC. The XE3000 is the same device as the X3000,
except for an additional battery.

Specifications:
 - SoC: Filogic 820 MT7981A (1.3GHz)
 - RAM: DDR4 512M
 - Flash: eMMC 8G, MicroSD card slot
 - WiFi: 2.4GHz and 5GHz with 6 antennas
 - Ethernet:
   - 1x LAN (10/100/1000M)
   - 1x WAN (10/100/1000/2500M)
 - 5G: Quectel RM520N-GL with two nano-SIM card slots
 - USB: 1x USB 2.0 port
 - UART:
   - 3.3V, TX, RX, GND / 115200 8N1

MAC addresses as verified by OEM firmware:
vendor   OpenWrt    address     source
WAN      eth0       label       factory 0x0a (label)
LAN      eth1       label + 1
2g       phy0-ap0   label + 2   factory 0x04
5g       phy1-ap0   label + 3

Installation via U-Boot rescue:
1. Press and hold reset button while booting the device
2. Wait for the Internet led to blink 5 times
3. Release reset button
4. The rescue page is accessible via http://192.168.1.1
5. Select the OpenWrt sysupgrade image and start upgrade
6. Wait for the router to flash new firmware and reboot

Revert to stock firmware:
1. Download the stock firmware from GL.iNet website
2. Use the method explained above to flash the stock firmware

Switch the modem network port between PCIe and USB interfaces:
1. Connect to the AT commands (/dev/ttyUSB2) port using
e.g. minicom: minicom -D /dev/ttyUSB2
2. Check the current modem mode with 'AT+QCFG="data_interface"':
  - 0,0 indicates that the network port uses the USB interface
  - 1,0 indicates that the network port uses the PCIe interface
3. Switch the active interface with:
  - 'AT+QCFG="data_interface",0,0' to use the USB interface
  - 'AT+QCFG="data_interface",1,0' to use the PCIe interface
4. Reboot

Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
2024-03-13 20:47:23 +00:00
Jean Thomas
e1831321de mediatek: mt7981: pinctrl: add additional emmc groups
Add new emmc groups in the pinctrl driver for the
MediaTek MT7981 SoC:
* emmc reset, with pin 15.
* emmc 4-bit bus-width, with pins 16 to 19, and 24 to 25.
* emmc 8-bit bus-width, with pins 16 to 25.

The existing emmc_45 group is kept for legacy reasons, even
if this is the union of emmc_reset and emmc_8 groups.

Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
2024-03-13 20:47:23 +00:00
Jean Thomas
80e6e52026 mediatek: mt7981: pinctrl: add additional uart group
Add uart1_3 (pins 26, 27) group to the pinctrl driver for the
MediaTek MT7981 SoC.

Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
2024-03-13 20:47:23 +00:00
Daniel Golle
003b9ff61c generic: mtk_eth_soc: fix PPE hanging issue
A patch to resolve an issue was found in MediaTek's GPL-licensed SDK:
In the mtk_ppe_stop() function, the PPE scan mode is not disabled before
disabling the PPE. This can potentially lead to a hang during the process
of disabling the PPE.

Without this patch, the PPE may experience a hang during the reboot test.

Reference: b40da332df

Suggested-by: Bc-bocun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-13 19:18:43 +00:00
Daniel Golle
33d6ba5045 generic: 5.15: mtk_eth_soc: backport fix for hang on link up
Backport commit faa5f17fe2 ("kernel: mtk_eth_soc: release
MAC_MCR_FORCE_LINK only when MAC is up") to Linux 5.15 as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-13 19:18:43 +00:00
Shiji Yang
33c812b639 ath79: add missing kernel config symbols
Refresh kernel configs to add the missing symbols.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-13 13:48:42 +01:00
Shiji Yang
0efa91d6ea ath79: remove obsolete 5.15 kernel support
The 5.15 kenel config file, patches and version switches will be
removed in this patch. We will introduce kernel 6.6 support soon.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-13 13:48:42 +01:00
Shiji Yang
a437950770 ath79: switch default kernel to 6.1
The 6.1 kernel has been tested for over half a year.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-13 13:48:42 +01:00
Mikhail Zhilkin
1d3d6ef826 ramips: add support for Z-ROUTER ZR-2660
This commit adds support for Z-ROUTER ZR-2660 (also known as Routerich
AX1800) wireless WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (AMD/Spansion S34ML01G2)
- WLAN      :
  - 2.4 GHz : MediaTek MT7905D/MT7975 (14c3:7916), b/g/n/ax, MIMO 2x2
  - 5 GHz   : MediaTek MT7915E (14c3:7915), a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- USB       : 1x 2.0
- UART      : 3.3V, 115200n8, pins are silkscreened on the pcb
- Buttons   : 1x Reset
- LEDs      : 1x WiFi 2.4 GHz (green)
              1x WiFi 5 GHz (green)
              1x LAN (green)
              1x WAN (green)
              1x WAN no-internet (red)
- Power     : 12 VDC, 1 A

Installation
------------
1. Run tftp server on your PC (IP: 192.168.2.2) and put OpenWrt initramfs
   image (initramfs.bin) to the tftp root dir
2. Open the following link in the browser to enable telnet:
	http://192.168.2.1/cgi-bin/telnet_ssh
3. Connect to the router (default IP: 192.168.2.1) using telnet shell
   (credentials - user:admin)
4. Run the following commands in the telnet shell (this will install
   OpenWrt initramfs image on nand flash):
	cd /tmp
	tftp -g -r initramfs.bin 192.168.2.2
	mtd write initramfs.bin firmware
	mtd erase firmware_backup
	reboot
5. Copy OpenWrt sysupgrade image (sysupgrade.bin) to the /tmp dir of the
   router
6. Connect to the router (IP: 192.168.1.1) using ssh shell and run
   sysupgrade command:
	sysupgrade -n /tmp/sysupgrade.bin

Return to stock
---------------
1. Copy stock firmware (stock.bin) to the /tmp dir of the router using scp
2. Run following command in the router shell:
	cd /tmp
	mtd write stock.bin firmware
	reboot

Recovery
--------
Connect uart (pins are silkscreened on the pcb), interrupt boot process by
pressing any key, use u-boot menu to flash stock firmware image or OpenWrt
initramfs image.

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 24:0f:5e:xx:xx:4c | label     |
| WAN     | 24:0f:5e:xx:xx:4d | label+1   |
| WLAN 2g | 24:0f:5e:xx:xx:4e | label+2   |
| WLAN 5g | 24:0f:5e:xx:xx:4f | label+3   |
+---------+-------------------+-----------+
The WLAN 2.4 MAC was found in 'factory', 0x4
The LAN MAC was found in 'factory', 0xfff4
The WAN MAC was found in 'factory', 0xfffa

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-03-12 23:57:41 +01:00
Robert Marko
532de62e4c kernel: config: 6.6: disable ZSTD debug info compression by default
When kernel 6.6 is being compiled with GCC13 it will prompt for:
Compressed Debug information
> 1. Don't compress debug information (DEBUG_INFO_COMPRESSED_NONE)
  2. Compress debugging information with zlib (DEBUG_INFO_COMPRESSED_ZLIB)
  3. Compress debugging information with zstd (DEBUG_INFO_COMPRESSED_ZSTD) (NEW)

This is because kernel now also has support for compressing debug info
with ZSTD, so add the missing symbol and disable it by default.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-12 19:49:56 +01:00
Daniel Golle
65df33fc76 ramips: add support for YunCore G720
The YunCore G720 is a dual band 802.11ax router with 5 GbE ports.

Specs:
- SoC: MediaTek MT7621
- Ethernet: 5x GbE ports (built-in MT7530)
- Wireless 2.4GHz / 5GHz: MediaTek MT7915E
- RAM: 256MiB
- ROM: 16MiB (W25Q128)
- 1 Button (reset)
- 8 LEDs (1x system, 2x wifi, 5x switch ports)

Flash instructions:
The vendor firmware is based on OpenWrt, the sysupgrade image can be
flashed using the '-F' (force) option on the CLI.
Make sure not to keep settings when doing so.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-12 16:48:42 +00:00
Nick Hainke
1576474f55 ramips: switch to 6.1 kernel
We have had the testing kernel for several weeks now. Let's switch to 6.1
to have more testers. Additionally, 6.6 is already in the pipeline.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-03-12 17:28:52 +01:00
Weijie Gao
4468cae502 kernel: config: add missing symbol for kenrel 6.6
CONFIG_HID_SUPPORT:
Set default value for kmod-hid

CONFIG_USB_CDNS3_IMX:
CONFIG_USB_CDNS3_PCI_WRAP:
CONFIG_USB_CDNSP_PCI:
Introduced by db0d7cf6a1 (usb: add cdns3 support)

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2024-03-12 22:52:28 +08:00
Robert Marko
645b44d8ff Revert "kernel: config: add symbol introduced with 6.2"
This reverts commit 7ea82bc17d.

This commit does not meet formal requirments, and has been merged due to
my error.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-12 13:01:59 +01:00