openwrt/staging/wigyori.git
6 months agoshmin: refresh kernel config kitchensink-202311
Zoltan HERPAI [Mon, 30 Oct 2023 15:13:40 +0000 (16:13 +0100)]
shmin: refresh kernel config

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosunxi: include the OV5640 dtsi in the BananaPi P2 Zero board
Zoltan HERPAI [Sun, 29 Oct 2023 17:56:14 +0000 (18:56 +0100)]
sunxi: include the OV5640 dtsi in the BananaPi P2 Zero board

root@OpenWrt:/# v4l2-ctl -D
Driver Info:
        Driver name      : sun6i-csi
        Card type        : sun6i-csi
        Bus info         : platform:1cb0000.camera
        Driver version   : 6.1.55
        Capabilities     : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : sun6i-csi
        Model            : Allwinner A31 CSI Device
        Serial           :
        Bus info         : platform:1cb0000.camera
        Media version    : 6.1.55
        Hardware revision: 0x00000000 (0)
        Driver version   : 6.1.55
Interface Info:
        ID               : 0x03000003
        Type             : V4L Video
Entity Info:
        ID               : 0x00000001 (1)
        Name             : sun6i-csi
        Function         : V4L2 I/O
        Pad 0x01000002   : 0: Sink, Must Connect
          Link 0x02000007: from remote pad 0x1000006 of entity 'ov5640 2-003c' (Camera Sensor): Data, Enabled, Immutable

-------------

root@OpenWrt:/# media-ctl /dev/video0 --print-topology
Media controller API version 6.1.55

Media device information
------------------------
driver          sun6i-csi
model           Allwinner A31 CSI Device
serial
bus info        platform:1cb0000.camera
hw revision     0x0
driver version  6.1.55

Device topology
- entity 1: sun6i-csi (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "ov5640 2-003c":0 [ENABLED,IMMUTABLE]

- entity 5: ov5640 2-003c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:UYVY8_2X8/640x480@1/30 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                 crop.bounds:(0,0)/2624x1964
                 crop:(0,4)/2624x1944]
                -> "sun6i-csi":0 [ENABLED,IMMUTABLE]

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosunxi: add OV5640 dtsi camera module for H2/H3 SoCs
Zoltan HERPAI [Sun, 29 Oct 2023 17:55:22 +0000 (18:55 +0100)]
sunxi: add OV5640 dtsi camera module for H2/H3 SoCs

Create a dtsi with an OV5640 camera definition that can be used
as an include in H2/H3 boards.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomodules: video: extend with CSI plaform and sensor modules
Zoltan HERPAI [Sat, 28 Oct 2023 18:35:57 +0000 (20:35 +0200)]
modules: video: extend with CSI plaform and sensor modules

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosunxi: add missing symbol as prep for camera/CSI support
Zoltan HERPAI [Sat, 28 Oct 2023 16:52:30 +0000 (18:52 +0200)]
sunxi: add missing symbol as prep for camera/CSI support

Disable VIDEO_SUN8I_A83T_MIPI_CSI2.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosunxi: add support for Lichee Pi Zero (V3s) board
Zoltan HERPAI [Fri, 27 Oct 2023 16:23:57 +0000 (18:23 +0200)]
sunxi: add support for Lichee Pi Zero (V3s) board

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoath79: image: use sysupgrade-tar for SR71 / PB42
Zoltan HERPAI [Wed, 25 Oct 2023 10:15:12 +0000 (12:15 +0200)]
ath79: image: use sysupgrade-tar for SR71 / PB42

As the combined-image stanza is now retired, use sysupgrade-tar
for the sysupgrade images.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoath79: add support for Ubiquiti LiteStation SR71
Zoltan HERPAI [Mon, 21 Dec 2020 22:39:51 +0000 (23:39 +0100)]
ath79: add support for Ubiquiti LiteStation SR71

Specifications:

SoC: AR7130
DRAM: 32Mb DDR1
Flash: 16Mb SPI-NOR
LAN: 2x 10/100Mbps via ADM6996 switch on MII
     (1 with PoE)
PCI: 1x mini-PCI
UART: standard UART header
JTAG: yes
LEDs: 8x LEDs

Installation instructions:

The original FIS partitioning does not provide enough
space for the kernel, so the installation must start
with re-partitioning the flash from RedBoot.

The MAC address is stored in the "boardconfig" partition, which is
automatically created.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agocv18x0: add new target for Sophgo CV18x0 RISC-V SoCs
Zoltan HERPAI [Wed, 4 Oct 2023 15:28:54 +0000 (17:28 +0200)]
cv18x0: add new target for Sophgo CV18x0 RISC-V SoCs

Initially targeting the Milk-V Duo+dock board.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosh775x: add new target to support SH7751R-based (SH4) boards
Zoltan HERPAI [Mon, 26 Aug 2019 14:37:31 +0000 (16:37 +0200)]
sh775x: add new target to support SH7751R-based (SH4) boards

If SH4 hardware is not available for testing, the generated kernel and
rootfs can happily start up in qemu:

qemu-system-sh4 -M r2d -nographic -no-reboot -kernel openwrt-sh775x-zImage \
-append "console=ttySC1 noiotrap root=/dev/sda" -monitor null -serial null \
-serial stdio -drive file=openwrt-sh775x-rootfs-ext4.img,format=raw

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomusl: sh4: add missing bits/reg.h
Zoltan HERPAI [Tue, 24 Oct 2023 20:49:58 +0000 (22:49 +0200)]
musl: sh4: add missing bits/reg.h

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agogeneric: add missing symbols for SH4
Zoltan HERPAI [Fri, 1 Apr 2022 08:35:56 +0000 (10:35 +0200)]
generic: add missing symbols for SH4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agogcc: add multilib m4/m4-nofpu config for sh4
Zoltan HERPAI [Sun, 30 Jan 2022 12:47:12 +0000 (13:47 +0100)]
gcc: add multilib m4/m4-nofpu config for sh4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoutil-linux: test_enosys: add support for SH
Zoltan HERPAI [Wed, 9 Aug 2023 11:06:17 +0000 (13:06 +0200)]
util-linux: test_enosys: add support for SH

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomodules: block: add mpt3sas support
Zoltan HERPAI [Tue, 24 Oct 2023 16:41:39 +0000 (18:41 +0200)]
modules: block: add mpt3sas support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomodules: block: libraid/libsas can build on non-x86 targets
Zoltan HERPAI [Tue, 24 Oct 2023 16:41:02 +0000 (18:41 +0200)]
modules: block: libraid/libsas can build on non-x86 targets

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomodules: block: add libraid module
Zoltan HERPAI [Tue, 24 Oct 2023 16:40:24 +0000 (18:40 +0200)]
modules: block: add libraid module

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoleon: refresh patches to apply/compile on 5.15
Zoltan HERPAI [Fri, 18 Aug 2023 07:27:03 +0000 (09:27 +0200)]
leon: refresh patches to apply/compile on 5.15

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoleon: drop sparc32 fixups for now
Zoltan HERPAI [Fri, 18 Aug 2023 07:23:25 +0000 (09:23 +0200)]
leon: drop sparc32 fixups for now

With the change to ARCH_ATOMIC in sparc as well, some of these patches don't
apply or compile correctly. Drop them for now, unsure if the CASA extension
is supported by the leon3_generic target.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoleon: add SDK patches from buildroot-2022.02-1.2/5.10.175
Zoltan HERPAI [Fri, 18 Aug 2023 07:22:18 +0000 (09:22 +0200)]
leon: add SDK patches from buildroot-2022.02-1.2/5.10.175

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoleon: bring back / add new target for LEON3 SPARC support
Zoltan HERPAI [Fri, 18 Aug 2023 07:15:50 +0000 (09:15 +0200)]
leon: bring back / add new target for LEON3 SPARC support

This target has been removed in 2014, re-add target with renewed
interest. It will support LEON3/4-based SPARC CPUs, as well as running
images via QEMU/leon3.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoincludes: add LEON3 CFLAGS
Zoltan HERPAI [Fri, 18 Aug 2023 07:14:47 +0000 (09:14 +0200)]
includes: add LEON3 CFLAGS

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agotoolchain: gcc: add compile opts for upcoming LEON support
Zoltan HERPAI [Fri, 18 Aug 2023 07:13:49 +0000 (09:13 +0200)]
toolchain: gcc: add compile opts for upcoming LEON support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agod1: add new target
Zoltan HERPAI [Wed, 24 May 2023 21:51:14 +0000 (23:51 +0200)]
d1: add new target

This target adds support for the Allwinner D1 RISC-V based SoCs.

 - RISC-V single-core T-Head C906 (RV64GCV)
 - Tensilica HiFi4 DSP
 - DDR2/DDR3 support
 - 10/100/1000M ethernet
 - usual peripherals like USB2, SPI, I2C, PWM, etc.

Four boards are supported:
 - Dongshan Nezha STU
    - 512Mb RAM
    - ethernet

 - LicheePi RV Dock
    - 512Mb RAM
    - wireless-only (RTL8723DS)

 - MangoPi MQ-Pro
    - 512Mb RAM
    - there are pads available for an SPI flash
    - wireless-only (RTL8723DS)

 - Nezha D1
    - 512Mb/1Gb/2Gb RAM
    - 256Mb NAND flash
    - ethernet, wireless

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

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agouboot-d1: add bootloader for upcoming d1 target
Zoltan HERPAI [Wed, 7 Jun 2023 12:34:06 +0000 (14:34 +0200)]
uboot-d1: add bootloader for upcoming d1 target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoopensbi: allow building on upcoming d1 target
Zoltan HERPAI [Wed, 7 Jun 2023 09:54:34 +0000 (11:54 +0200)]
opensbi: allow building on upcoming d1 target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agomac80211: select BRCMFMAC_SDIO on jh71x0
Zoltan HERPAI [Tue, 22 Aug 2023 21:39:14 +0000 (23:39 +0200)]
mac80211: select BRCMFMAC_SDIO on jh71x0

As the Visionfive V1 board has an Ampak module connected via SDIO, enable
support for SDIO in the brcmfmac module.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agojh71x0: add new target for StarFive JH7100/7110 SoC
Zoltan HERPAI [Sun, 28 May 2023 13:14:02 +0000 (15:14 +0200)]
jh71x0: add new target for StarFive JH7100/7110 SoC

This target adds support for the StarFive JH7100 and JH7110 SoCs, based on
6.1, as well as a couple boards equipped with these.

Specifications:

SoCs:

JH7100:
 - StarFive JH7100 dual-core RISC-V (U74, RC64GC)
 - additional monitoring (S7) and control (E24) cores
 - 2Mb L2 cache

JH7110:
 - StarFive JH7110 quad-core RISC-V (U74, RV64GC)
 - additional monitoring (S7) and control (E24) cores
 - 2Mb L2 cache

Boards:

VisionFive1:
 - JH7100 @ 1GHz
 - Memory: 8Gb LPDDR4
 - 4x USB3.0
 - 1x GBit ethernet
 - AMPak 6236 wifi / bluetooth
 - audio
 - powered via USB-C

VisionFive2:
 - JH7110 @ 1.5GHz
 - Memory: 2/4/8Gb DDR4
 - 2x Gbit ethernet
 - 2x USB3.0 / 2x USB2.0
 - eMMC / SDIO
 - various multimedia input/outputs (MIPI CSI, HDMI, audio)
 - M.2 key M slot
 - PoE support
 - powered via USB-C

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

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosunxi: add support for Merrii A80 (Optimus) devboard
Zoltan HERPAI [Mon, 26 Aug 2019 08:18:39 +0000 (10:18 +0200)]
sunxi: add support for Merrii A80 (Optimus) devboard

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agosuniv: add new target
Zoltan HERPAI [Wed, 13 Mar 2019 23:24:50 +0000 (00:24 +0100)]
suniv: add new target

This is Allwinner's ARM926EJ-S core, which is one of its early
products, reappearing in recent compact designs. The SoC includes
32/64Mb memory in the same package, and has display and USB interfaces,
allowing for small footprint boards.

The target consists of basic 6.1 support, with u-boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agokirkwood: add support for Netgear Stora (MS2000/2110) NAS
Zoltan HERPAI [Thu, 5 May 2022 06:47:27 +0000 (08:47 +0200)]
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>
6 months agokirkwood: add hwmon-tc654
Zoltan HERPAI [Thu, 16 Jul 2020 15:46:44 +0000 (17:46 +0200)]
kirkwood: add hwmon-tc654

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoath79: DO NOT MERGE: add a custom WR741N v1/v2 8Mb variant
Zoltan HERPAI [Sat, 12 Aug 2023 21:57:31 +0000 (23:57 +0200)]
ath79: DO NOT MERGE: add a custom WR741N v1/v2 8Mb variant

Device is a WR741N v2.4 (AR7240) with the flash replaced with
an 8Mb chip. ART partition is moved to the end (0x7f0000). Also,
the commit adds the 741-related code back to the generic board.d
files.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoath79: add label to flash in the TP-Link dtsi
Zoltan HERPAI [Tue, 8 Jun 2021 11:37:34 +0000 (13:37 +0200)]
ath79: add label to flash in the TP-Link dtsi

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoath79: add support for Atheros PB42 reference board
Zoltan HERPAI [Sat, 27 Aug 2022 15:08:32 +0000 (17:08 +0200)]
ath79: add support for Atheros PB42 reference board

Specifications:

SoC: AR7130
DRAM: 32Mb DDR1
Flash: 8Mb SPI-NOR
LAN: 4x 10/100Mbps via ADM6996 switch on MII
WAN: 1x 10/100Mbps via RMII
PCI: 2x mini-PCI
UART: standard QCA UART header
JTAG: yes
Button: 1x WPS, 1x reset
LEDs: 8x LEDs

Installation instructions:

The original FIS partitioning does not provide enough
space for the kernel, so the installation must start
with re-partitioning the flash from RedBoot.

The suggested partition table is the following:

RedBoot           0xBF000000  0xBF000000  0x00040000  0x00000000
kernel            0xBF040000  0x80060000  0x001F0000  0x80060000
rootfs            0xBF230000  0x00000000  0x005B0000  0x00000000
FIS directory     0xBF7E0000  0xBF7E0000  0x0000F000  0x00000000
RedBoot config    0xBF7EF000  0xBF7EF000  0x00001000  0x00000000

Which can be created with:
fis init
fis create -r 0x80060000 -e 0x80060000 -b 0xbf040000 -l 0x220000 kernel
fis create -b 0xbf260000 -l 0x580000 rootfs

The kernel and the rootfs must then be loaded from TFTP:

load -r -v -b 0x80060000 openwrt-ath79-generic-atheros_pb42-squashfs-kernel.bin
fis create kernel
load -r -v -b 0x80100000 openwrt-ath79-generic-atheros_pb42-squashfs-rootfs.bin
fis create rootfs

Once OpenWrt is installed, the normal sysupgrade method will work for
upgrades.

The MAC address is stored in the "boardconfig" partition, which is
automatically created.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agoshmin: add new SH3-target
Zoltan HERPAI [Mon, 26 Aug 2019 15:04:33 +0000 (17:04 +0200)]
shmin: add new SH3-target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 months agobcm53xx: disable unused switch ports in downstream patch
Rafał Miłecki [Fri, 13 Oct 2023 11:25:33 +0000 (13:25 +0200)]
bcm53xx: disable unused switch ports in downstream patch

This makes Linux use correct switch ports again.

Fixes: a4792d79e899 ("bcm53xx: backport DT changes from v6.5")
Fixes: https://github.com/openwrt/openwrt/issues/13548
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 months agobcm53xx: backport DT changes queued for v6.7
Rafał Miłecki [Tue, 24 Oct 2023 05:40:37 +0000 (07:40 +0200)]
bcm53xx: backport DT changes queued for v6.7

Among other changes this commit makes Linux use correct switch ports
again.

Fixes: a4792d79e899 ("bcm53xx: backport DT changes from v6.5")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 months agobcm53xx: simplify patch adding switch ports
Rafał Miłecki [Fri, 13 Oct 2023 10:57:35 +0000 (12:57 +0200)]
bcm53xx: simplify patch adding switch ports

We now have all raw ports defined in bcm-ns.dtsi. Leave only lables in
custom device files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 months agobase-files: functions.sh: Add prepend() homologue to append()
Philip Prindeville [Sun, 24 Sep 2023 17:52:19 +0000 (11:52 -0600)]
base-files: functions.sh: Add prepend() homologue to append()

Sometimes it's useful to be able to prepend to a variable as
well, such as when dealing with domain names, e.g.

    prepend fdqn "$subdomain" "."

will result in:

   fqdn="$subdomain.$fqdn"

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
6 months agokernel: ath79, bmips: refresh 5.15 patches
Marek Behún [Mon, 23 Oct 2023 08:46:59 +0000 (10:46 +0200)]
kernel: ath79, bmips: refresh 5.15 patches

One LED patch for ath79 and one LED patch for bmips need to be
refreshed.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agokernel: 5.15: Backport Turris Omnia LED patches
Marek Behún [Sun, 22 Oct 2023 15:48:03 +0000 (17:48 +0200)]
kernel: 5.15: Backport Turris Omnia LED patches

This backports patches
  leds: turris-omnia: convert to use dev_groups
  leds: turris-omnia: Use sysfs_emit() instead of sprintf()
  leds: turris-omnia: Drop unnecessary mutex locking
  leds: turris-omnia: Do not use SMBUS calls
  leds: turris-omnia: Make set_brightness() more efficient
  leds: turris-omnia: Support HW controlled mode via private trigger
  leds: turris-omnia: Add support for enabling/disabling HW gamma correction
  leds: turris-omnia: Fix brightness setting and trigger activating
into backport-5.15.

The above patches replace:
  leds: turris-omnia: support HW controlled mode via private trigger
  leds: turris-omnia: initialize multi-intensity to full
  leds: turris-omnia: change max brightness from 255 to 1
from mvebu/patches-5.15.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agobcm53xx: update patch fixing NVMEM driver for NVRAM
Rafał Miłecki [Mon, 23 Oct 2023 08:46:56 +0000 (10:46 +0200)]
bcm53xx: update patch fixing NVMEM driver for NVRAM

1. Avoid corrupting (replacing '=' with '\0') NVRAM content
2. Check actual NVRAM data length to avoid allocating huge buffers

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 months agoRevert "lantiq: xrx200: mark subtarget as source-only"
Hauke Mehrtens [Sun, 8 Oct 2023 22:26:18 +0000 (00:26 +0200)]
Revert "lantiq: xrx200: mark subtarget as source-only"

This reverts commit 0c117e1f6ccbee684ea0589d9024ca9dec4679c9.

Activate the lantiq/xrx200 target again.

There are still some problems with the GSWIP, but it is not leaking
packets to the wrong bridge in normal operations.
It shows some error messages at configuration like these:
[   54.308861] gswip 1e108000.switch: port 5 failed to add ce:9d:84:d1:81:f0 vid 1 to fdb: -22
[   54.325633] gswip 1e108000.switch: port 5 failed to add e8:de:27:95:c1:b4 vid 0 to fdb: -22
[   54.351242] gswip 1e108000.switch: port 5 failed to add e8:de:27:95:c1:b4 vid 1 to fdb: -22
[   54.358311] gswip 1e108000.switch: port 5 failed to delete ce:9d:84:d1:81:f0 vid 1 from fdb: -2

The problems are described in this pull request:
https://github.com/openwrt/openwrt/pull/13200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 months agouboot-mediatek: fix global pll clock override on mtk_spim
Nicolò Veronese [Mon, 2 Oct 2023 20:17:09 +0000 (22:17 +0200)]
uboot-mediatek: fix global pll clock override on mtk_spim

With patch 101-03-spi-mtk_spim-get-spi-clk-rate-only-once.patch
 a new system to calculate the SPI clocks has been added.

Unfortunately, the do_div macro overrides the global
 priv->pll_clk_rate field. This will cause to have a reduced
 clock rate on each subsequent SPI call.

Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
6 months agolibnl: add support for cli
Koen Vandeputte [Wed, 5 Jul 2023 11:56:16 +0000 (13:56 +0200)]
libnl: add support for cli

Some packages (like wavemon >= 0.9.4) depend on libnl-cli. Add support
for this part of the lib. libnl-cli itself depends on libnl-genl and
libnl-nf. On MIPS, this component adds 81kB.

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
(punctuation correction and reorganisation of commit message)
Signed-off-by: Nick Hainke <vincent@systemli.org>
6 months agobcm53xx: Linksys EA9200 nvram and 02_network fixes
Rani Hod [Sat, 30 Sep 2023 23:05:19 +0000 (02:05 +0300)]
bcm53xx: Linksys EA9200 nvram and 02_network fixes

1) clear nvram partialboots upon successful boot
This behavior is already defined for EA9500; enabled for EA9200 too.

2) fix MAC address in board.d/02_network
Use the correct nvram variable to derive lan/wan MAC address.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
6 months agoramips: TP-link archer A6/C6 device tree updates
Rani Hod [Fri, 20 Oct 2023 13:15:38 +0000 (16:15 +0300)]
ramips: TP-link archer A6/C6 device tree updates

Set correct GPIO (10) for the WPS button. This matches GPIO settings in
vendor GPL sources. Note that GPL sources also mention a USB indicator
LED (GPIO 13) but the device has neither an external USB port nor a USB LED.

In addition, prefixes (button-, led-) are added to relevant DT entries,
as well as color and function specifications for LEDs.

Closes: #13736
Reported-by: Waldemar Czabaj <kaball@wp.pl>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
(added led mitigations for wifi leds)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 months agouboot-mvebu: armada 388 clearfog: support additional ddr configurations
Josua Mayer [Sun, 8 Oct 2023 15:21:26 +0000 (17:21 +0200)]
uboot-mvebu: armada 388 clearfog: support additional ddr configurations

Fixes Issue #13632.

Patches as submitted in v1 to u-boot mailinglist:
https://lists.denx.de/pipermail/u-boot/2023-October/533148.html

Signed-off-by: Josua Mayer <josua@solid-run.com>
6 months agotools: mold: update to v2.3.1
Andre Heider [Sat, 21 Oct 2023 09:08:44 +0000 (11:08 +0200)]
tools: mold: update to v2.3.1

Release notes:
https://github.com/rui314/mold/releases/tag/v2.3.0
https://github.com/rui314/mold/releases/tag/v2.3.1

Signed-off-by: Andre Heider <a.heider@gmail.com>
6 months agokernel: bump 6.1 to 6.1.59
John Audia [Fri, 20 Oct 2023 08:15:03 +0000 (04:15 -0400)]
kernel: bump 6.1 to 6.1.59

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.59

Manually rebased:
bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch

Removed upstreamed:
generic/backport-6.1/781-v6.6-02-net-dsa-qca8k-fix-potential-MDIO-bus-conflict-when-a.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.59&id=881050b25b1dda7b0f14d40d1b09bf38cb3b427c

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

Signed-off-by: John Audia <therealgraysky@proton.me>
6 months agokernel: bump 6.1 to 6.1.58
John Audia [Fri, 20 Oct 2023 07:37:22 +0000 (03:37 -0400)]
kernel: bump 6.1 to 6.1.58

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.58

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
6 months agokernel: fix missing regmap-mmio dependency for rtc-r7301
Christian Marangi [Fri, 20 Oct 2023 13:56:34 +0000 (15:56 +0200)]
kernel: fix missing regmap-mmio dependency for rtc-r7301

Add missing regmap-mmio dependency for rtc-r7301 to fix packaging error.

Fixes: f2bc4c1f1588 ("kernel: Add kmod-rtc-r7301")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agokernel: 6.1: Backport Turris Omnia LED patches
Marek Mojík [Mon, 16 Oct 2023 15:14:18 +0000 (17:14 +0200)]
kernel: 6.1: Backport Turris Omnia LED patches

This backports patches
  leds: turris-omnia: Use sysfs_emit() instead of sprintf()
  leds: turris-omnia: Drop unnecessary mutex locking
  leds: turris-omnia: Do not use SMBUS calls
  leds: turris-omnia: Make set_brightness() more efficient
  leds: turris-omnia: Support HW controlled mode via private trigger
  leds: turris-omnia: Add support for enabling/disabling HW gamma correction
  leds: turris-omnia: Fix brightness setting and trigger activating
into backport-6.1.

The above patches replace:
  leds: turris-omnia: support HW controlled mode via private trigger
  leds: turris-omnia: initialize multi-intensity to full
  leds: turris-omnia: change max brightness from 255 to 1
from mvebu/patches-6.1.

Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
6 months agotoolchain: link ldd when using external toolchain
Arien Judge [Fri, 13 Oct 2023 09:58:16 +0000 (20:58 +1100)]
toolchain: link ldd when using external toolchain

When using an external toolchain, ldd is not linked into the rootfs.
This causes subsequent upgrades to fail with 'Failed to exec upgraded'.
This patch adds the symlink when using an external toolchain and musl.

Signed-off-by: Arien Judge <arienjudge@outlook.com>
6 months agouboot-mediatek: fix typo in bootmenu for GL-MT6000
Jianhui Zhao [Tue, 10 Oct 2023 06:09:38 +0000 (14:09 +0800)]
uboot-mediatek: fix typo in bootmenu for GL-MT6000

Fixes: fe10f97 ("filogic: add support for GL.iNet GL-MT6000")
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
6 months agorealtek: add support for TP-Link T1600G-28TS v3
Andreas Böhler [Wed, 5 Apr 2023 19:10:34 +0000 (21:10 +0200)]
realtek: add support for TP-Link T1600G-28TS v3

This is an RTL8382-based switch with 24 copper ports + 4 SFP ports

Specifications:
---------------
 * SoC:       Realtek RTL8382M
 * Flash:     32 MiB SPI flash
 * RAM:       256 MiB
 * Ethernet:  24x 10/100/1000 Mbps
 * Buttons:   1x "Reset" button
 * UART:      1x serial header, unpopulated
 * SFP:       4 SFP ports

Works:
------
  - (24) RJ-45 ethernet ports
  - Switch functions
  - Buttons
  - Sys LED on front panel (no port LEDs)

Not yet enabled:
----------------
  - Port LEDs (no driver for RTL8231 in this mode)
  - SFP cages (no driver for PHY)

Install via web interface:
-------------------------

Not supported at this time.

Install via serial console/tftp:
--------------------------------

The U-Boot firmware drops to a TP-Link specific "BOOTUTIL" shell at
38400 baud. There is no known way to exit out of this shell, and no
way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade
image first. However, if the image exceeds 6MiB in size, it will not
work. To install OpenWRT:

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"

Power on device, and stop boot by pressing any key.
Once the shell is active:
 1. Ground out the CLK (pin 16) of the ROM (U6)
 2. Select option "3. Start"
 3. Bootloader notes that "The kernel has been damaged!"
 4. Release CLK as soon as bootloader thinks image is corrupted.
 5. Bootloader enters automatic recovery -- details printed on console
 6. Watch as the bootloader flashes and boots OpenWRT.

Blind install via tftp:
-----------------------

This method works when it's not feasible to install a serial header.

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"
 3. Watch network traffic (tcpdump or wireshark works)
 4. Power on the device.
 5. Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U6)
 6. When 192.168.0.30 makes tftp requests, release pin 16
 7. Wait 2-3 minutes for device to auto-flash and boot OpenWRT

Signed-off-by: Andreas Böhler <dev@aboehler.at>
6 months agoipq40xx: wpj428: switch to zimage to fit kernel partition
Leon M. Busch-George [Mon, 16 Oct 2023 17:41:21 +0000 (19:41 +0200)]
ipq40xx: wpj428: switch to zimage to fit kernel partition

Like with some other ipq40xx devices, the kernel image size for the WPJ428
is limited in stock u-boot. For that reason, the current release doesn't
include an image for the board.
By switching to the zImage format, the kernel image size is reduced which
re-enables the build process. The image boots and behaved normally through
a few days of testing.

Before the switch to kernel version 6.1, it was possible to reduce the
image size by enough when disabling UBIFS and its otherwise unneeded
dependencies.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
6 months agoapm821xx: WNDR4700: fix broken sysupgrade, factory images
Christian Lamparter [Fri, 20 Oct 2023 14:20:27 +0000 (16:20 +0200)]
apm821xx: WNDR4700: fix broken sysupgrade, factory images

prepend-dtb got extended to handle the Meraki devices too,
the problem here was that the Netgear WNDR4700 expects an
u-boot header in front of the DTB, whereas Meraki devices
don't.

Since the header was dropped, the WNDR4700's uboot started
to complain:
  Bad Magic Number,it is forbidden to be written to flash!!

when flashing the factory.img since it expects an u-boot
header there.

Fixes: 5dece2d9355a ("apm821xx: switch over from DTB_SIZE to DEVICE_DTC_FLAGS")
Reported-by: @kisgezenguz
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 months agoath79: AP105: use fixed layout cell "mac-base"
Christian Lamparter [Fri, 21 Jul 2023 14:44:11 +0000 (16:44 +0200)]
ath79: AP105: use fixed layout cell "mac-base"

This drops a use of the deprecated "mac-address-increment".

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 months agotreewide: make use of new toolchain define
Christian Marangi [Thu, 19 Oct 2023 16:16:25 +0000 (18:16 +0200)]
treewide: make use of new toolchain define

Make use of new toolchain define. TOOLCHAIN_DIR should be used only for
toolchain related packages and for everything else TOOLCHAIN_ROOT_DIR
and other define should be used instead.

Switch to new entry where possible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agorules.mk: make toolchain dirs define more consistent
Christian Marangi [Thu, 19 Oct 2023 15:39:24 +0000 (17:39 +0200)]
rules.mk: make toolchain dirs define more consistent

Make toolchain dirs define more consistent between internal and external
toolchains.

Make use of specific dirs also for intenral toolchain and generilize
include and lib inclusion.

Also set TOOLCHAIN_ROOT_DIR for internal toolchain as this is what
packages should use to reference staging toolchain directory.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoscripts/ext-toolchain: implement external GCC version detection
Christian Marangi [Thu, 19 Oct 2023 12:19:09 +0000 (14:19 +0200)]
scripts/ext-toolchain: implement external GCC version detection

Some package may needs to enable compatibility option based on the GCC
version.

Currently the GCC version is set based on the default value and doesn't
actually reflect the real value provided by the external toolchain if
used.

Fix this by correctly detecting the GCC version in the external
toolchain and set the correct value in CONFIG_GCC_VERSION.

A new option is added in menuconfig to manually set the GCC version if
needed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agotreewide: disable QUILT refresh for unsupported packages
Christian Marangi [Sun, 15 Oct 2023 19:11:17 +0000 (21:11 +0200)]
treewide: disable QUILT refresh for unsupported packages

Some packages won't ever have something to patch as they normally
install files or are meta-packages.

For these special packages, disable QUILT refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agodnsmasq: add support for RA option 31
Rahul Thakur [Fri, 20 Oct 2023 04:27:46 +0000 (09:57 +0530)]
dnsmasq: add support for RA option 31

The option 31 in the RA specifies the DNS search list, the support
to configure this via UCI is missing in case dnsmasq-dhcpv6 is used.

This commit uses the uci option domain (same as is done by odhcpd) to
read and pass the DNS search list to dnsmasq, which is then used by RA.

Hence, with this commit, we are able to configure DNS search list for the
RA messages via the uci config when dnsmsaq-dhcpv6 is used.

Signed-off-by: Rahul Thakur <rahul.thakur@iopsys.eu>
6 months agoipq40xx: switch to performance governor by default
Koen Vandeputte [Tue, 12 Sep 2023 13:38:27 +0000 (15:38 +0200)]
ipq40xx: switch to performance governor by default

Doing a simple ping to my device shows this:

64 bytes from 10.0.253.101: icmp_seq=1 ttl=64 time=2.00 ms
64 bytes from 10.0.253.101: icmp_seq=2 ttl=64 time=2.02 ms
64 bytes from 10.0.253.101: icmp_seq=3 ttl=64 time=1.68 ms
64 bytes from 10.0.253.101: icmp_seq=4 ttl=64 time=1.91 ms
64 bytes from 10.0.253.101: icmp_seq=5 ttl=64 time=1.92 ms
64 bytes from 10.0.253.101: icmp_seq=6 ttl=64 time=2.04 ms

Some users even report higher values on older kernels:

64 bytes from 192.168.1.10: seq=0 ttl=64 time=0.612 ms
64 bytes from 192.168.1.10: seq=1 ttl=64 time=2.852 ms
64 bytes from 192.168.1.10: seq=2 ttl=64 time=2.719 ms
64 bytes from 192.168.1.10: seq=3 ttl=64 time=2.741 ms
64 bytes from 192.168.1.10: seq=4 ttl=64 time=2.808 ms

The problem is that the governor is set to Ondemand, which causes
the CPU to clock all the way down to 48MHz in some cases.

Switching to performance governor:

64 bytes from 10.0.253.101: icmp_seq=1 ttl=64 time=0.528 ms
64 bytes from 10.0.253.101: icmp_seq=2 ttl=64 time=0.561 ms
64 bytes from 10.0.253.101: icmp_seq=3 ttl=64 time=0.633 ms
64 bytes from 10.0.253.101: icmp_seq=4 ttl=64 time=0.526 ms

In theory, using the Performance governor should increase power draw,
but it looks like it really does not matter for this soc.

Using a calibrated precision DC power supply (cpu idle):

Ondemand
24.00V * 0.134A = 3.216 Watts
48.00V * 0.096A = 4.608 Watts

Performance
24.00V * 0.135A = 3.240 Watts
48.00V * 0.096A = 4.608 Watts

Let's simply switch to the Performance governor by default
to fix the general jittery behaviour on devices using this soc.

Tested on: MikroTik wAP ac

Fixes: #13649
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
6 months agonftables: update to 1.0.9
Nick Hainke [Thu, 19 Oct 2023 13:26:44 +0000 (15:26 +0200)]
nftables: update to 1.0.9

ChangeLog:
https://www.netfilter.org/projects/nftables/files/changes-nftables-1.0.9.txt

Signed-off-by: Nick Hainke <vincent@systemli.org>
6 months agokernel: Add kmod-rtc-r7301
Linus Walleij [Thu, 12 Oct 2023 08:42:19 +0000 (10:42 +0200)]
kernel: Add kmod-rtc-r7301

To support the IXP42x platforms we need a kernel module
for the Epson R7301 RTC so we can load it as an optional
module.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Robert Marko <robimarko@gmail.com>
6 months agokernel: Add kmod-rtc-x1205
Linus Walleij [Thu, 12 Oct 2023 08:42:18 +0000 (10:42 +0200)]
kernel: Add kmod-rtc-x1205

To support the IXP42x platforms we need a kernel module
for the X1205 RTC so we can load it as an optional module.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Robert Marko <robimarko@gmail.com>
6 months agokernel: crypto: armeb build rules for lib-chacha20
Linus Walleij [Thu, 12 Oct 2023 08:42:17 +0000 (10:42 +0200)]
kernel: crypto: armeb build rules for lib-chacha20

The lib-chacha20 library is missing build rules for big endian
ARM, and since IXP4xx is big endian ARM we need those rules to
build for IXP4xx.

Suggested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 months agoboot/apex: Restore the APEX boot loader
Linus Walleij [Thu, 12 Oct 2023 08:42:16 +0000 (10:42 +0200)]
boot/apex: Restore the APEX boot loader

This is a partial revert of the deletion of the IXP4xx
target: we restore the APEX boot loader so we can use it
for the NSLU2 and related targets.

The APEX upstream is as dead as it gets so I have applied
OpenWrts old patches on top of the never released
v1.6.10 version and forked it into an OpenWrt variant
on GitHub. If the upstream comes back alive I will
happily switch over to it.

The file refers to the external GitHub, I suppose when
integrating this patch the file should be copied to OpenWrts
file repository and the file link changed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 months agonetifd: update to latest git HEAD
Christian Marangi [Fri, 20 Oct 2023 11:00:00 +0000 (13:00 +0200)]
netifd: update to latest git HEAD

5590a80e2566 config: fix incompatible with jshn network-device entry

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agobase-files: fix wrong ucidef_set_network_device_mac network-device entry
Michael 'ASAP' Weinrich [Fri, 6 Oct 2023 02:39:58 +0000 (19:39 -0700)]
base-files: fix wrong ucidef_set_network_device_mac network-device entry

The ucidef_set_network_device_* functions in uci-defaults.sh disagree
on whether to use "network-device" or "network_device" in board.json.
With the additional caveat that jshn will translate hyphens (-) into
underscores (_). This casues problems in netifd which expected
"network_device" causing boards which depend on assigning MACs in
board.json via uci-defaults.sh (or jshn in general) to fail.

This commit addresses the issue by using network_device in
uci-defaults.sh.

The bug was uncovered in the forums here:
https://forum.openwrt.org/t/support-for-rtl838x-based-managed-switches/57875/2596

This was exposed by commit 4ebba8a05d09 ("realtek: add support for HPE
1920-8g-poe+") where the board_config_load call from 03_gpio introduced
the key normalization by jshn.

Fixes: 9290539ca9c7 ("base-files: allow setting device and bridge macs")
Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
[ improve commit title, description and fix wrong Tested-by tag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agoarmsr: preserve configuration during sysupgrade
Christian Buschau [Tue, 17 Oct 2023 12:51:53 +0000 (14:51 +0200)]
armsr: preserve configuration during sysupgrade

Copy configuration to boot partition (partition 1) instead of root
partition (partition 2) because the root partition is not writable if
it's a suqashfs image.
Move configuration back to root during preinit.

Fixes: https://github.com/openwrt/openwrt/issues/13695
Signed-off-by: Christian Buschau <cbuschau@d00t.de>
6 months agoumdns: update to the latest version
Felix Fietkau [Thu, 19 Oct 2023 17:15:11 +0000 (19:15 +0200)]
umdns: update to the latest version

479c7f8676d9 cache: make record/hostname lookup case-insensitive
26c97a5a50bf ubus: add a browse flag for suppressing cached ip addresses
c286c51a9bd9 Fix AVL tree traversal in cache_record_find and cache_host_is_known
4035fe42df58 interface: use a global socket instead of per-interface ones
c63d465698c7 cache: dump hostname target from srv records
b42b22152d73 use hostname from SRV record to look up IP addresses
d45c443aa1e6 ubus: add array flag support for the hosts method

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 months agolayerscape: kernel: refresh 6.1 patches
Pawel Dembicki [Fri, 13 Oct 2023 13:20:43 +0000 (15:20 +0200)]
layerscape: kernel: refresh 6.1 patches

Kernel patches copied from 5.15 need to be refreshed.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agogeneric: kernel: add missing symbol
Pawel Dembicki [Thu, 12 Oct 2023 12:52:22 +0000 (14:52 +0200)]
generic: kernel: add missing symbol

It was found during work on layerscape target.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: port "-Werror" fix from NXP tree
Pawel Dembicki [Thu, 19 Oct 2023 10:07:03 +0000 (12:07 +0200)]
layerscape: port "-Werror" fix from NXP tree

At this moment, 702-phy-Add-2.5G-SGMII-interface-mode.patch cause error
durring kernel compilation:

  CC      drivers/net/phy/phylink.o
drivers/net/phy/phylink.c: In function 'phylink_get_capabilities':
drivers/net/phy/phylink.c:443:9: error: enumeration value 'PHY_INTERFACE_MODE_2500SGMII' not handled in switch [-Werror=switch]
  443 |         switch (interface) {
      |         ^~~~~~
cc1: all warnings being treated as errors

NXP take care of it. Let's port their patch.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: add 6.1 kernel as testing
Pawel Dembicki [Tue, 18 Apr 2023 08:30:47 +0000 (10:30 +0200)]
layerscape: add 6.1 kernel as testing

It allow to test 6.1 kernel in Layerscape.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: 6.1: refresh kernel config
Pawel Dembicki [Mon, 17 Apr 2023 15:55:59 +0000 (17:55 +0200)]
layerscape: 6.1: refresh kernel config

Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: copy config 5.15 to 6.1
Pawel Dembicki [Mon, 17 Apr 2023 15:26:38 +0000 (17:26 +0200)]
layerscape: copy config 5.15 to 6.1

Configs was just copied.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: refresh kernel config
Pawel Dembicki [Mon, 17 Apr 2023 15:15:49 +0000 (17:15 +0200)]
layerscape: refresh kernel config

Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agolayerscape: copy patches 5.15 to 6.1
Pawel Dembicki [Mon, 17 Apr 2023 14:55:36 +0000 (16:55 +0200)]
layerscape: copy patches 5.15 to 6.1

Patches recreated from NXP 6.1 tree:
400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
701-staging-add-fsl_ppfe-driver.patch
702-phy-Add-2.5G-SGMII-interface-mode.patch

Patch 703 includes changes made by Christian Marangi, extracted from commit
0d4a547905d4.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 months agoRevert "ramips: convert MT7915 EEPROM to NVMEM format"
Shiji Yang [Tue, 17 Oct 2023 12:57:07 +0000 (20:57 +0800)]
Revert "ramips: convert MT7915 EEPROM to NVMEM format"

Some MT7915 devices need to load the second part of the eeprom to
work properly. The mt76 driver is not yet ready to read the pre-cal
data via the NVMEM cell. Therefore, partially revert commit to fix
the device probe issue on some devices.

P.S.
Except for D-Link and Ubnt devices, It is still uncertain whether
pre-cal data is required for other devices in the patch.

This partially reverts commit 9ac891f8c44124e931c15f1257347cd8ba311a19.

Fixes: https://github.com/openwrt/openwrt/issues/13700
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: add missing mt76 packages for Telco Electronics X1
Shiji Yang [Mon, 2 Oct 2023 03:42:23 +0000 (11:42 +0800)]
ramips: add missing mt76 packages for Telco Electronics X1

Telco Electronics X1 has MT7603E and MT7612E PCIe NICs. They are
driven by kmod-mt7603 and kmod-mt76x2.

Ref: 73e0f52b6e4e ("ramips: add support for Telco Electronics X1")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: fix factory partition size for SNR-CPE-W4N
Shiji Yang [Sun, 15 Oct 2023 03:04:46 +0000 (11:04 +0800)]
ramips: fix factory partition size for SNR-CPE-W4N

The starting address of 'factory' partition is 0x40000, and the
starting address of the next partition is 0x50000. It's obvious
that the correct size for the 'factory' is 0x10000, just like
other MT7620 devices.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: fix frequency limit property for some Edimax devices
Shiji Yang [Sun, 15 Oct 2023 02:57:44 +0000 (10:57 +0800)]
ramips: fix frequency limit property for some Edimax devices

These three devices uses MT7612E PCIe NIC and supported by the
'mt76' driver. So the right frequency limit property should be
`ieee80211-freq-limit`.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: remove useless status property from wmac dts node
Shiji Yang [Sun, 15 Oct 2023 01:40:06 +0000 (09:40 +0800)]
ramips: remove useless status property from wmac dts node

On the ramips target, all 'wmac' nodes in SoC dtsi are enabled by
default except mt7628. There is no need to mark them as 'okay'
again. So these useless properties can be removed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs
Shiji Yang [Mon, 2 Oct 2023 02:12:02 +0000 (10:12 +0800)]
ramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs

This patch converts MT761{0,2,3} PCIe WiFi calibration data to NVMEM
format for legacy Ralink SoCs (MT7620 and Mt7628). The EEPROM size of
the MT7610 and MT7612 is 0x200. there are only three devices uses
MT7613 NIC, ASUS RT-AC1200 V2, COMFAST CF-WR758AC V2 and Keenetic
KN-1613. The EEPROM size of them is 0x4da8.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: convert MT7628 EEPROM to NVMEM format
Shiji Yang [Mon, 2 Oct 2023 02:12:02 +0000 (10:12 +0800)]
ramips: convert MT7628 EEPROM to NVMEM format

This patch converts MT7628 WiFi calibration data to NVMEM format. The
EEPROM size is 0x400.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: convert rt2x00 EEPROM to NVMEM format
Shiji Yang [Mon, 2 Oct 2023 02:12:02 +0000 (10:12 +0800)]
ramips: convert rt2x00 EEPROM to NVMEM format

This patch converts legacy Ralink SoCs and MT7620 WiFi calibration
data to NVMEM format. The EEPROM size is 0x200.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: fix mtd partition node names for Phicomm PSG1208
Shiji Yang [Mon, 2 Oct 2023 03:54:59 +0000 (11:54 +0800)]
ramips: fix mtd partition node names for Phicomm PSG1208

The mtd partition node name should be "partition@${offset}".
However, the offsets of the PSG1208 don't match the partition
'reg' properties. This patch correct the wrong offsets.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: fix DTS EEPROM property for some MT7628 devices
Shiji Yang [Mon, 2 Oct 2023 03:41:49 +0000 (11:41 +0800)]
ramips: fix DTS EEPROM property for some MT7628 devices

The MT7628 integrated wireless is driven by `mt76`, so the right
EEPROM property name is `mediatek,mtd-eeprom`.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agoramips: convert the remaining mtd-mac-address to NVMEM format
Shiji Yang [Mon, 2 Oct 2023 03:42:08 +0000 (11:42 +0800)]
ramips: convert the remaining mtd-mac-address to NVMEM format

`mtd-mac-address` has been abandoned. Therefore, convert them to
NVMEM format. This patch also removes some useless mtd-mac-address
properties.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
6 months agogmp: update to 6.3
Nick Hainke [Sat, 14 Oct 2023 06:49:29 +0000 (08:49 +0200)]
gmp: update to 6.3

Release Notes:
https://gmplib.org/gmp6.3

Signed-off-by: Nick Hainke <vincent@systemli.org>
6 months agozlib: update to 1.3
Nick Hainke [Sat, 14 Oct 2023 06:44:53 +0000 (08:44 +0200)]
zlib: update to 1.3

Changes in 1.3 (18 Aug 2023)
- Remove K&R function definitions and zlib2ansi
- Fix bug in deflateBound() for level 0 and memLevel 9
- Fix bug when gzungetc() is used immediately after gzopen()
- Fix bug when using gzflush() with a very small buffer
- Fix crash when gzsetparams() attempted for transparent write
- Fix test/example.c to work with FORCE_STORED
- Rewrite of zran in examples (see zran.c version history)
- Fix minizip to allow it to open an empty zip file
- Fix reading disk number start on zip64 files in minizip
- Fix logic error in minizip argument processing
- Add minizip testing to Makefile
- Read multiple bytes instead of byte-by-byte in minizip unzip.c
- Add memory sanitizer to configure (--memory)
- Various portability improvements
- Various documentation improvements
- Various spelling and typo corrections

Signed-off-by: Nick Hainke <vincent@systemli.org>
6 months agobinutils: update to 2.41
Nick Hainke [Sat, 14 Oct 2023 06:37:11 +0000 (08:37 +0200)]
binutils: update to 2.41

Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00009.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
6 months agoqualcommax: ipq8074: use upstreamed CPUFreq NVMEM support
Robert Marko [Mon, 16 Oct 2023 17:20:17 +0000 (19:20 +0200)]
qualcommax: ipq8074: use upstreamed CPUFreq NVMEM support

IPQ8074 CPUFreq NVMEM support has finally landed upstream, so lets use the
upstreamed version.

This has a benefit of also supporting IPQ8174 (Oak) family for which SMEM
SoC ID-s were also upstreamed.

Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agolantiq: update binding for ralink EEPROM swap
Christian Marangi [Sun, 15 Oct 2023 14:10:58 +0000 (16:10 +0200)]
lantiq: update binding for ralink EEPROM swap

Binding for ralink EEPROM swap changed from ralink,mtd-eeprom-swap to
ralink,eeprom-swap.

Update every entry.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 months agomac80211: rt2x00: improve EEPROM load patches
Christian Marangi [Sun, 15 Oct 2023 14:07:22 +0000 (16:07 +0200)]
mac80211: rt2x00: improve EEPROM load patches

Improve EEPROME load patches. Reorganize and rework them.

The current patch are bugged and with the case of MTD loading, leaks and
never free the EEPROM read values.

Also add support for loading EEPROM using NVMEM cells.

As a cleanup, change the binding to swap EEPROM read from mtd to
ralink,eeprom-swap and generilize it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>