openwrt/staging/lynxis.git
3 years agomalta: remove obsolete Kernel 5.4
Paul Spooren [Fri, 1 Oct 2021 21:17:01 +0000 (11:17 -1000)]
malta: remove obsolete Kernel 5.4

With the upgrade to Kernel 5.10 per default the old version is no longer
required to be in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoarmvirt: remove obsolete Kernel 5.4
Paul Spooren [Fri, 1 Oct 2021 21:15:41 +0000 (11:15 -1000)]
armvirt: remove obsolete Kernel 5.4

With the upgrade to Kernel 5.10 per default the old version is no longer
required to be in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agox86: remove obsolete Kernel 5.4
Paul Spooren [Fri, 1 Oct 2021 21:13:07 +0000 (11:13 -1000)]
x86: remove obsolete Kernel 5.4

With the upgrade to Kernel 5.10 per default the old version is no longer
required to be in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agokernel: bump 5.4 to 5.4.150
Hauke Mehrtens [Sat, 2 Oct 2021 13:28:55 +0000 (15:28 +0200)]
kernel: bump 5.4 to 5.4.150

Manually rebased:
  generic/pending-5.4/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
  mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch

Removed upstreamed:
  layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomvebu: add Globalscale MOCHAbin
Robert Marko [Mon, 27 Sep 2021 21:14:51 +0000 (23:14 +0200)]
mvebu: add Globalscale MOCHAbin

Globalscale MOCHAbin is a Armada 7040 based development board.

Specifications:
* Armada 7040 Quad core ARMv8 Cortex A-72 @ 1.4GHz
* 2 / 4 / 8 GB of DDR4 DRAM
* 16 GB eMMC
* 4MB SPI-NOR (Bootloader)
* 1x M.2-2280 B-key socket (for SSD expansion, SATA3 only)
* 1x M.2-2250 B-key socket (for modems, USB2.0 and I2C only)
* 1x Mini-PCIe 3.0 (x1, USB2.0 and I2C)
* 1x SATA 7+15 socket (SATA3)
* 1x 16-pin (2×8) MikroBus Connector
* 1x SIM card slot (Connected to the mini-PCIe and both M.2 slots)
* 2x USB3.0 Type-A ports via SMSC USB5434B hub
* Cortex 2x5 JTAG
* microUSB port for UART (PL2303GL/PL2303SA onboard)
* 1x 10G SFP+
* 1x 1G SFP (Connected to 88E1512 PHY)
* 1x 1G RJ45 with PoE PD (Connected to 88E1512 PHY)
* 4x 1G RJ45 ports via Topaz 88E6141 switch
* RTC with battery holder (SoC provided, requires CR2032 battery)
* 1x 12V DC IN
* 1x Power switch
* 1x 12V fan header (3-pin, power only)
* 1x mini-PCIe LED header (2x0.1" pins)
* 1x M.2-2280 LED header (2x0.1" pins)
* 6x Bootstrap jumpers
* 1x Power LED (Green)
* 3x Tri-color RGB LEDs (Controllable)
* 1x Microchip ATECC608B secure element

Note that 1G SFP and 1G WAN cannot be used at the same time as they are in
parallel connected to the same PHY.

Installation:

Copy dtb from build_dir to bin/ and run tftpserver there:
$ cp ./build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/image-armada-7040-mochabin.dtb bin/targets/mvebu/cortexa72/
$ in.tftpd -L -s bin/targets/mvebu/cortexa72/

Connect to the device UART via microUSB port and power on the device.

Power on the device and hit any key to stop the autoboot.

Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g:
$ setenv serverip 192.168.1.10 # Host
$ setenv ipaddr 192.168.1.15 # Device

Set the ethernet device (Example for the 1G WAN):
$ setenv ethact mvpp2-2

Ping server to confirm network is working:
$ ping $serverip
Using mvpp2-2 device
host 192.168.1.15 is alive

Tftpboot the firmware:
$ tftpboot $kernel_addr_r openwrt-mvebu-cortexa72-globalscale_mochabin-initramfs-kernel.bin
$ tftpboot $fdt_addr_r image-armada-7040-mochabin.dtb

Boot the image:
$ booti $kernel_addr_r - $fdt_addr_r

Once the initramfs is booted, transfer openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz
to /tmp dir on the device.

Gunzip and dd the image:
$ gunzip /tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz
$ dd if=/tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img of=/dev/mmcblk0 && sync

Reboot the device.

Hit any key to stop the autoboot.

Reset U-boot env and set the bootcmd:
$ env default -a
$ setenv bootcmd 'load mmc 0 ${loadaddr} boot.scr && source ${loadaddr}'

Optionally I would advise to edit the console env variable to remove earlycon as that
causes the kernel to never use the driver for the serial console.
Earlycon should be used only for debugging before the kernel can configure the console
and will otherwise cause various issues with the console.

$ setenv console 'console=ttyS0,115200'

Save and reset
$ saveenv
$ reset

OpenWrt should boot from eMMC now.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agolantiq: kernel: xway-nand: Move ECC engine setting to new DT binding
Daniel Kestrel [Sat, 7 Aug 2021 07:28:24 +0000 (09:28 +0200)]
lantiq: kernel: xway-nand: Move ECC engine setting to new DT binding

When trying to add support for another device with Micron NAND chips,
it was discovered that the default setting in the kernel source does
not work with Micron Chips, since the device trees setting is
overwritten and hard coded by the kernel xway_nand driver. This was
the original reason for this PR.
A kernel patch sets the default ECC mode to soft without overwriting
the device tree settings and the device tree for devices using it
are updated with new parameters because the old ones are deprecated
by torvalds/linux@533af69.
A patch for kernel 5.4 is provided to support the new settings
because kernel 5.4 does not support it.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
3 years agolantiq: kernel: xway-nand: Fix setting on-die ECC engines in dts
Hauke Mehrtens [Sat, 2 Oct 2021 12:03:17 +0000 (14:03 +0200)]
lantiq: kernel: xway-nand: Fix setting on-die ECC engines in dts

This backports a fix proposed for upstream kernel to fix overwriting
the NAND ECC engine in device tree.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agouboot-lantiq: fix sha1.h header clash when system libmd installed
Alan Swanson [Fri, 1 Oct 2021 15:46:32 +0000 (16:46 +0100)]
uboot-lantiq: fix sha1.h header clash when system libmd installed

Backport of u-boot commit "includes: move openssl headers to include/u-boot"
https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167

Fixes: FS#3955
Signed-off-by: Alan Swanson <reiver@improbability.net>
3 years agomediatek: mt7623: bpi-r2: add LED aliases
Daniel Golle [Fri, 1 Oct 2021 22:25:48 +0000 (23:25 +0100)]
mediatek: mt7623: bpi-r2: add LED aliases

Add aliases for LEDs in device tree of the BPi-R2.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomediatek: remove files and patches for Linux 5.4
Daniel Golle [Fri, 1 Oct 2021 22:24:06 +0000 (23:24 +0100)]
mediatek: remove files and patches for Linux 5.4

All subtargets only provide files and patches for Linux 5.10 by now
so there is little use for the old Linux 5.4 stuff. Remove it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoarmvirt: switch to Kernel 5.10
Paul Spooren [Thu, 30 Sep 2021 05:15:05 +0000 (19:15 -1000)]
armvirt: switch to Kernel 5.10

Armvirt is a development and testing platform and should therefore use
the latest OpenWrt Kernel by default.

Tested via qemu.

Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agomalta: switch to Kernel 5.10
Paul Spooren [Thu, 30 Sep 2021 05:19:51 +0000 (19:19 -1000)]
malta: switch to Kernel 5.10

Malta is a development and testing platform and should therefore use the
latest OpenWrt Kernel by default.

Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoprereq-build: revert "fix `which` detection on Fedora"
Paul Spooren [Fri, 1 Oct 2021 04:26:14 +0000 (18:26 -1000)]
prereq-build: revert "fix `which` detection on Fedora"

This reverts commit fca5ad55d292f8e481406123d0e95b3c85d39733.

Causes problems on MacOS host systems.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoprereq-build: fix `which` detection on Fedora
Jani Partanen [Thu, 30 Sep 2021 20:51:37 +0000 (23:51 +0300)]
prereq-build: fix `which` detection on Fedora

Fix Fedora 34/35 issue where 'which' detection of 'which' wasn't working
because Fedora use alias and proc

Signed-off-by: Jani Partanen <rtfm@iki.fi>
[fix commit subject and message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agomediatek: add FEATURES and order them alphabetically
Daniel Golle [Wed, 15 Sep 2021 18:10:46 +0000 (19:10 +0100)]
mediatek: add FEATURES and order them alphabetically

Add common features 'gpio', 'nand', 'pci', 'pcie', 'squashfs' and 'usb'
for all mediatek targets, add 'display' and 'usbgadget' for MT7623.
Sort features alphabetically while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-mediatek: fix and make use of LEDs on BPi-R2
Daniel Golle [Sat, 18 Sep 2021 00:16:48 +0000 (01:16 +0100)]
uboot-mediatek: fix and make use of LEDs on BPi-R2

Fix BPi-R2 GPIO LEDs to indicate boot into production or recovery
firmware in DTS and define them in default environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomediatek: mt7622: provide power on mPCIe in SATA mode
Daniel Golle [Thu, 16 Sep 2021 20:04:14 +0000 (21:04 +0100)]
mediatek: mt7622: provide power on mPCIe in SATA mode

User reported that R64 doesn't provide power to the mPCIe slot in case
the PCIe port is disabled as it is when selecting the SATA
configuration. As users may still want to use USB-connected mPCIe
modules in CN8 slot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: bump 5.10 to 5.10.70
Rui Salvaterra [Thu, 30 Sep 2021 13:21:41 +0000 (14:21 +0100)]
kernel: bump 5.10 to 5.10.70

Deleted (upstreamed):
bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.69
Rui Salvaterra [Mon, 27 Sep 2021 08:20:47 +0000 (09:20 +0100)]
kernel: bump 5.10 to 5.10.69

Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.68
Rui Salvaterra [Wed, 22 Sep 2021 20:31:09 +0000 (21:31 +0100)]
kernel: bump 5.10 to 5.10.68

Deleted (upstreamed):
generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch
generic/backport-5.10/792-v5.15-0001-net-dsa-b53-Fix-calculating-number-of-switch-ports.patch
generic/backport-5.10/792-v5.15-0002-net-dsa-b53-Set-correct-number-of-ports-in-the-DSA-s.patch
generic/backport-5.10/792-v5.15-0003-net-dsa-b53-Fix-IMP-port-setup-on-BCM5301x.patch
generic/backport-5.10/840-0001-PCI-of-Don-t-fail-devm_pci_alloc_host_bridge-on-miss.patch
generic/backport-5.10/840-0002-PCI-iproc-Fix-BCMA-probe-resource-handling.patch
generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.67
Rui Salvaterra [Sat, 18 Sep 2021 20:55:58 +0000 (21:55 +0100)]
kernel: bump 5.10 to 5.10.67

Deleted (upstreamed):
bcm27xx/patches-5.10/950-0312-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.66
Rui Salvaterra [Thu, 16 Sep 2021 12:55:00 +0000 (13:55 +0100)]
kernel: bump 5.10 to 5.10.66

No patches refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.65
Rui Salvaterra [Wed, 15 Sep 2021 09:31:37 +0000 (10:31 +0100)]
kernel: bump 5.10 to 5.10.65

Manually refreshed:
generic/pending-5.10/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
bcm27xx/patches-5.10/950-0087-firmware-raspberrypi-Add-backward-compatible-get_thr.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agonetifd: update to the latest version
Felix Fietkau [Thu, 30 Sep 2021 09:33:11 +0000 (11:33 +0200)]
netifd: update to the latest version

186f6eaeba70 wireless: display log messages for setup/teardown/retry
fac471c4934a wireless: process and close script file descriptor when rerunning setup
62e2bb56f48e main: poll process log stream even if processes are killed
0e311d3f2d1a wireless: reset number of retries on config change
e467e0ff44c0 wireless: reset retry counter when setup succeeds
448ffc154fe7 wireless: fix index for stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: allow retry of wifi setup if an iw interface add command fails
Felix Fietkau [Thu, 30 Sep 2021 09:31:19 +0000 (11:31 +0200)]
mac80211: allow retry of wifi setup if an iw interface add command fails

In some cases, spurious failures might be cleared by teardown and retry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agocryptodev-linux: update to 1.12
Rosen Penev [Thu, 23 Sep 2021 19:57:52 +0000 (12:57 -0700)]
cryptodev-linux: update to 1.12

Remove upstream backport.

Use AUTORELEASE for simplicity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agokernel: add missing symbol to kmod-kvm
Stijn Tintel [Tue, 28 Sep 2021 22:28:06 +0000 (01:28 +0300)]
kernel: add missing symbol to kmod-kvm

Even though TRACEPOINTS is not enabled in my kernel config, my build
fails due to KVM_MMU_AUDIT being missing. Add this symbol to kmod-kvm to
fix this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agokernel: order kmod-kvm symbols alphabetically
Stijn Tintel [Tue, 28 Sep 2021 22:26:10 +0000 (01:26 +0300)]
kernel: order kmod-kvm symbols alphabetically

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoprereq-build: recognize Python 3.10
Marcin Juszkiewicz [Tue, 28 Sep 2021 13:03:24 +0000 (15:03 +0200)]
prereq-build: recognize Python 3.10

Fedora 35 contains Python 3.10 as default version. Make use of it.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
[fix commit subject]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agonetifd: update to the latest version
Felix Fietkau [Tue, 28 Sep 2021 12:27:20 +0000 (14:27 +0200)]
netifd: update to the latest version

4d0c2ad3fd26 wireless: fix applying wireless devices attributes on hotplug events

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agonetifd: update to the latest version
Felix Fietkau [Mon, 27 Sep 2021 16:59:53 +0000 (18:59 +0200)]
netifd: update to the latest version

5a4ac30c7a15 netifd: rework/fix device free handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoramips: add support for Netgear R7450
Dale Hui [Sun, 26 Sep 2021 04:08:06 +0000 (21:08 -0700)]
ramips: add support for Netgear R7450

Netgear R7450 is a clone of Netgear R6700v2

Specifications
==============
SoC: MediaTek MT7621AT
RAM: 256M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7615N an+ac
MediaTek MT7615N bgn
ETH: MediaTek MT7621AT
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
WPS Button(white)

Flash Instructions
==================
Login to netgear webinterface and flash factory.img

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[fix model/compatible in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for Netgear R6900v2
Dale Hui [Sun, 26 Sep 2021 04:07:58 +0000 (21:07 -0700)]
ramips: add support for Netgear R6900v2

Netgear R6900v2 is a clone of Netgear R6700v2

Specifications
==============
SoC: MediaTek MT7621AT
RAM: 256M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7615N an+ac
MediaTek MT7615N bgn
ETH: MediaTek MT7621AT
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
WPS Button(white)

Flash Instructions
==================
Login to netgear webinterface and flash factory.img

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
3 years agoramips: add Nighthawk AC2100 as name for Netgear R6700v2
Dale Hui [Sat, 21 Aug 2021 07:10:22 +0000 (00:10 -0700)]
ramips: add Nighthawk AC2100 as name for Netgear R6700v2

Netgear Nighthawk AC2100 is another name of the Netgear R6700v2.

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: make Netgear R7200 a separate device from R6700v2
Dale Hui [Sat, 21 Aug 2021 05:36:50 +0000 (22:36 -0700)]
ramips: make Netgear R7200 a separate device from R6700v2

With the various variants of Netgear R**** devices, make it more
obvious which image should be used for the R7200.

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[provide proper commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: add Kernel 5.10 as testing version
INAGAKI Hiroshi [Wed, 5 May 2021 00:31:53 +0000 (09:31 +0900)]
realtek: add Kernel 5.10 as testing version

This patch adds "KERNEL_TESTING_PATCHVER:=5.10" to the Makefile in
realtek target to allow using Kernel 5.10 for testing.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: enable uart1 on the devices with PoE support in 5.10
INAGAKI Hiroshi [Mon, 23 Aug 2021 09:07:05 +0000 (18:07 +0900)]
realtek: enable uart1 on the devices with PoE support in 5.10

On the devices with PoE support, the secondary UART (uart1) on the SoC
is used to communicate between the SoC and controller.

Enable the secondary UART on the following devices:

- D-Link DGS-1210-10P
- Netgear GS110TPP v1
- Netgear GS310TP v1
- ZyXEL GS1900-8HP v1/v2
- ZyXEL GS1900-10HP
- ZyXEL GS1900-24HP v2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: use physical addresses in soc dtsi in 5.10
INAGAKI Hiroshi [Wed, 11 Aug 2021 10:06:09 +0000 (19:06 +0900)]
realtek: use physical addresses in soc dtsi in 5.10

Use physical addresses instead of virtual address in dts files.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: use gpio-keys instead of "-polled" if SoC GPIO is used in 5.10
INAGAKI Hiroshi [Sat, 26 Jun 2021 03:29:24 +0000 (12:29 +0900)]
realtek: use gpio-keys instead of "-polled" if SoC GPIO is used in 5.10

The new backported GPIO driver supports interrupt, so use gpio-keys
instead of gpio-keys-polled for keys connected to the internal GPIO
controller.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: update GPIO bindings in the dts files in dts-5.10
INAGAKI Hiroshi [Sat, 8 May 2021 08:51:29 +0000 (17:51 +0900)]
realtek: update GPIO bindings in the dts files in dts-5.10

this patch includes the following changes:

- adjust mapping for the new driver
  - GPIO 24 -> GPIO 0
  - GPIO 47 -> GPIO 0 (+ disabling system LED)

- disable pins in the invalid range
  (out of the range 0-31 of the new driver)
  - are these pins on the external RTL8231 (&gpio1)?
    - GPIO 67 (-> GPIO 3 on &gpio1?)
    - GPIO 94 (-> GPIO 30 on &gpio1?)

- drop "indirect-access-bus-id" property from gpio0 node in device dts
  files

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix kernel panic in DSA driver for 5.10
INAGAKI Hiroshi [Sat, 8 May 2021 08:28:58 +0000 (17:28 +0900)]
realtek: fix kernel panic in DSA driver for 5.10

dsa_to_port function in 5.10 returns dsa_port from the port list in
dsa_switch_tree, but the tree is built when the switch is registered
by dsa_register_switch and it's null in rtl83xx_mdio_probe.

So, we need to use dsa_to_port after the registration of the switch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: add pinmux node of LED_GLB_CTRL to rtl838x.dtsi in dts-5.10
INAGAKI Hiroshi [Fri, 7 May 2021 03:10:10 +0000 (12:10 +0900)]
realtek: add pinmux node of LED_GLB_CTRL to rtl838x.dtsi in dts-5.10

This patch adds a pinctrl-single pinmux node to allow disabling system
LED and enabling GPIO 0 (old driver: GPIO 24).

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix compile errors in dsa driver for 5.10
INAGAKI Hiroshi [Thu, 6 May 2021 15:38:22 +0000 (00:38 +0900)]
realtek: fix compile errors in dsa driver for 5.10

this patch fixes the following errors when compiling:

- dsa_switch_alloc is removed[1]

- a parameter "enum dsa_tag_protocol mprot" is added to dsa_tag_protocol
  in dsa_switch_ops (include/net/dsa.h)

- several paramters are added to "phylink_mac_link_up" in dsa_switch_ops
  (include/net/dsa.h)

  added:
    - int speed
    - int duplex
    - bool tx_pause
    - bool rx_pause

- a parameter "struct switchdev_trans *trans" is added to
  port_vlan_filtering in dsa_switch_ops (include/net/dsa.h)

[1]: https://lore.kernel.org/lkml/20191020031941.3805884-17-vivien.didelot@gmail.com/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix compile errors in rtl838x_eth.c for 5.10
INAGAKI Hiroshi [Thu, 6 May 2021 14:22:19 +0000 (23:22 +0900)]
realtek: fix compile errors in rtl838x_eth.c for 5.10

this patch fixes the following errors when compiling:

- "unsigned int txqueue" is added as an additional parameter of
  ndo_tx_timeout in net_device_ops (include/linux/netdevice.h)

- "mac_link_state" in phylink_mac_ops (include/linux/phylink.h)
  is renamed to "mac_pcs_get_state" and changed the return value
  to void from int

- several parameters are added to "mac_link_up" in phylink_mac_ops
  (include/linux/phylink.h) and the order of the parameters is
  changed

  added:
    - int speed
    - int duplex
    - bool tx_pause
    - bool rx_pause

- a parameter "phy_interface_t *interface" is added to of_get_phy_mode
  (drivers/of/of_net.c) and returns the state instead of phy mode

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: add "soc" node to soc dtsi in dts-5.10
INAGAKI Hiroshi [Thu, 6 May 2021 11:46:42 +0000 (20:46 +0900)]
realtek: add "soc" node to soc dtsi in dts-5.10

Add a "soc" node as a simple-bus to rtl838x.dtsi and rtl930x.dtsi.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: update soc dtsi in 5.10 for backported drivers
INAGAKI Hiroshi [Thu, 6 May 2021 10:40:04 +0000 (19:40 +0900)]
realtek: update soc dtsi in 5.10 for backported drivers

this patch updates SoC dtsi (rtl838x.dtsi, rtl930x.dtsi) for the
following backported drivers:

- gpio-realtek-otto (5.13)
- spi-realtek-rtl (5.12)
- irq-realtek-rtl (5.12)

And, disable SoC GPIO node (gpio0) in rtl930x.dtsi in dts-5.10.
Currently, the upstreamed driver doesn't support the GPIO controller on
RTL930x SoC.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: cleanup and update soc dtsi in 5.10
INAGAKI Hiroshi [Wed, 11 Aug 2021 11:27:38 +0000 (20:27 +0900)]
realtek: cleanup and update soc dtsi in 5.10

the following changes are included in this patch:

- node is enabled by default, drop 'status = "okay"'
- adjust order of "compatible" lines and "reg" lines
- add a new blank line before fixed-link node in rtl830x.dtsi

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: copy dts directory for Kernel 5.10
INAGAKI Hiroshi [Wed, 11 Aug 2021 11:23:06 +0000 (20:23 +0900)]
realtek: copy dts directory for Kernel 5.10

This patch adds "dts-5.10" directory to use backported drivers.
There are several specification changes in the new drivers, so there
are some compatibility issues in using dts/dtsi files for 5.4.

The old DTS files are moved to "dts-5.4", so their corresponding
kernel version is obvious as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[change "dts" to "dts-5.4", adjust Makefile]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: refresh and update config-5.10
INAGAKI Hiroshi [Wed, 5 May 2021 13:47:19 +0000 (22:47 +0900)]
realtek: refresh and update config-5.10

This patch adjusts config-5.10 by running kernel_menuconfig.

Note:

- disable psb6970 phy driver (unused in realtek target?)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: refresh patches for Kernel 5.10
INAGAKI Hiroshi [Wed, 5 May 2021 05:02:49 +0000 (14:02 +0900)]
realtek: refresh patches for Kernel 5.10

This patch refresh all patches in patches-5.10/ to adjust for Kernel
5.10.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: remove unnecessary line from rtl838x/Platform in 5.10
INAGAKI Hiroshi [Thu, 6 May 2021 09:17:54 +0000 (18:17 +0900)]
realtek: remove unnecessary line from rtl838x/Platform in 5.10

The following line is already defined in arch/mips/Kbuild.platforms by
300-mips-add-rtl838x-platform.patch.

platform-$(CONFIG_RTL838X) += rtl838x/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: drop fixup_bigphys_addr from ioremap.h in 5.10
INAGAKI Hiroshi [Wed, 5 May 2021 06:20:03 +0000 (15:20 +0900)]
realtek: drop fixup_bigphys_addr from ioremap.h in 5.10

A macro with the same name is provided in asm/pgtable.h in Kernel 5.10,
use it and drop from ioremap.h.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix "help" line in Kconfig in files/patches for 5.10
INAGAKI Hiroshi [Wed, 5 May 2021 05:18:43 +0000 (14:18 +0900)]
realtek: fix "help" line in Kconfig in files/patches for 5.10

In Kernel 5.10, "help" must be used instead of "---help---".

this patch fixes the following errors:

drivers/net/dsa/rtl83xx/Kconfig:7: syntax errorgit
drivers/net/dsa/rtl83xx/Kconfig:6: unknown statement "---help---"
drivers/net/dsa/rtl83xx/Kconfig:7:warning: ignoring unsupported character '.'
drivers/net/dsa/rtl83xx/Kconfig:7: unknown statement "This"
drivers/net/ethernet/Kconfig:170: syntax error
drivers/net/ethernet/Kconfig:169: unknown statement "---help---"
drivers/net/ethernet/Kconfig:170:warning: ignoring unsupported character '.'
drivers/net/ethernet/Kconfig:170: unknown statement "Say"
drivers/net/phy/Kconfig:331: syntax error
drivers/net/phy/Kconfig:330: unknown statement "---help---"
drivers/net/phy/Kconfig:331: unknown statement "Supports"

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: backport irq-realtek-rtl driver from 5.12 to 5.10
INAGAKI Hiroshi [Fri, 21 May 2021 14:16:37 +0000 (23:16 +0900)]
realtek: backport irq-realtek-rtl driver from 5.12 to 5.10

This patch backports "irq-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: drop platform irq driver from 5.10
INAGAKI Hiroshi [Fri, 21 May 2021 14:20:43 +0000 (23:20 +0900)]
realtek: drop platform irq driver from 5.10

To use backported irq driver, drop old irq driver from realtek target
and call irqchip_init() in setup.c.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: backport gpio-realtek-otto driver from 5.13 to 5.10
INAGAKI Hiroshi [Wed, 5 May 2021 13:05:39 +0000 (22:05 +0900)]
realtek: backport gpio-realtek-otto driver from 5.13 to 5.10

This patch backports "gpio-realtek-otto" driver to Kernel 5.10.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Note: GPIO mapping is changed in the upstreamed driver.

  old - new

   24 -  0
   25 -  1
   26 -  2
   27 -  3
   28 -  4
   29 -  5
   30 -  6
   31 -  7
   16 -  8
   17 -  9
   18 - 10
   19 - 11
   20 - 12
   21 - 13
   22 - 14
   23 - 15
    8 - 16
    9 - 17
   10 - 18
   11 - 19
   12 - 20
   13 - 21
   14 - 22
   15 - 23

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: drop rtl838x gpio driver from 5.10
INAGAKI Hiroshi [Thu, 24 Jun 2021 11:32:31 +0000 (20:32 +0900)]
realtek: drop rtl838x gpio driver from 5.10

To backport the upstreamed driver (gpio-realtek-otto) from 5.13, drop the
old driver from realtek target.

And, modify 301-gpio-add-rtl838x-driver.patch to remove rtl838x GPIO
support and rename it only for rtl8231 GPIO support.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: backport spi-realtek-rtl driver from 5.12 to 5.10
INAGAKI Hiroshi [Thu, 6 May 2021 10:30:58 +0000 (19:30 +0900)]
realtek: backport spi-realtek-rtl driver from 5.12 to 5.10

This patch backports "spi-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: drop rtl838x spi-nor driver from 5.10
INAGAKI Hiroshi [Thu, 24 Jun 2021 11:22:51 +0000 (20:22 +0900)]
realtek: drop rtl838x spi-nor driver from 5.10

To backport the upstreamed driver (spi-realtek-rtl) from 5.12, drop the
old driver from realtek target.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: copy config/files/patches to 5.10
INAGAKI Hiroshi [Wed, 5 May 2021 00:32:27 +0000 (09:32 +0900)]
realtek: copy config/files/patches to 5.10

this patch copies the following files from 5.4 to 5.10:

- config-5.4   -> config-5.10
- files-5.4/   -> files-5.10/
- patches-5.4/ -> patches-5.10/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[rebase on change in files-5.4]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: enable I2C_CHARDEV
David Bauer [Fri, 20 Aug 2021 13:52:51 +0000 (15:52 +0200)]
ramips: enable I2C_CHARDEV

Expose I2C busses with a chardev device. This is required to control the
PSE controller on the Ubiquiti UniFi Flex Switch.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoramips: add support for Ubiquiti USW-Flex
David Bauer [Fri, 20 Aug 2021 11:23:42 +0000 (13:23 +0200)]
ramips: add support for Ubiquiti USW-Flex

Hardware
--------
MediaTek MT7621AT
16M SPI-NOR Macronix MX25L12835FMI
Microchip PD69104B1 4-Channel PoE-PSE controller
TI TPS2373 PoE-PD controller

PoE-Controller
--------------

By default, the PoE outputs do not work with OpenWrt. To make them output
power, install the "poemgr" package from the packages feed.
This package can control the PD69104B1 PSE controller.

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

1. Connect to the booted device at 192.168.1.20 using username/password
   "ubnt" via SSH.

2. Add the uboot-envtools configuration file /etc/fw_env.config with the
   following content

   $ echo "/dev/mtd1 0x0 0x1000 0x10000 1" > /etc/fw_env.config

3. Update the bootloader environment.

   $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr);
     fdt rm /signature; bootubnt"
   $ fw_setenv bootcmd "run boot_openwrt"

4. Transfer the OpenWrt sysupgrade image to the device using SCP.

5. Check the mtd partition number for bs / kernel0 / kernel1

   $ cat /proc/mtd

6. Set the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4

7. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1

   $ dd if=openwrt.bin of=/dev/mtdblock6
   $ dd if=openwrt.bin of=/dev/mtdblock7

8. Reboot the device. It should boot into OpenWrt.

Restore to UniFi
----------------

To restore the vendor firmware, follow the Ubiquiti UniFi TFTP
recovery guide for access points. The process is the same for
the Flex switch.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: add support for TP-Link CPE710-v1
Andrew Cameron [Mon, 12 Apr 2021 18:24:33 +0000 (13:24 -0500)]
ath79: add support for TP-Link CPE710-v1

TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board

Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless
  data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal
  reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs

Flashing instructions:
Flash factory image through stock firmware WEB UI or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP address:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[convert to nvmem, fix MAC assignment in 11-ath10k-caldata]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: 5.10: backport fix for lp55xx LED driver
Robert Marko [Fri, 17 Sep 2021 10:27:44 +0000 (12:27 +0200)]
kernel: 5.10: backport fix for lp55xx LED driver

This backports the upstream commit:
leds: lp55xx: Initialize enable GPIO direction to output

Without it under kernel 5.10 on Asus MAP-AC2200
the LED driver will fail probing:
[    1.947521] lp5523x: probe of 0-0032 failed with error -22

After the backported fix:
[    1.873236] lp5523x 0-0032: lp5523 Programmable led chip found

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300]
Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530
                                               ipq4019/fritzbox-4040
                                               ipq4019/sxtsq-5ac]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200]
3 years agoipq40xx: add testing support for kernel 5.10
Robert Marko [Sun, 12 Sep 2021 20:41:43 +0000 (22:41 +0200)]
ipq40xx: add testing support for kernel 5.10

Add kernel 5.10 as the testing kernel to ipq40xx to
get wider testing.

The following devices failed to build with buildbot settings and all
feeds installed (apparently due to kernel size):

 * cell-c rtl30vw
 * compex wpj428
 * devolo magic 2 next
 * engenius emr3500
 * glinet gl-b1300
 * glinet gl-s1300
 * qcom ap-dk01.1-c1
 * qcom ap-dk04.1-c1

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530
                                               ipq4019/fritzbox-4040
                                               ipq4019/sxtsq-5ac]
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200]
[add tested-by and note about failed devices]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: 5.10: move AR40xx to MDIO drivers
Robert Marko [Sun, 12 Sep 2021 21:50:20 +0000 (23:50 +0200)]
ipq40xx: 5.10: move AR40xx to MDIO drivers

MDIO drivers were moved into their own sub directory of networking drivers.
This has caused the AR40xx driver to probe before MDIO drivers and that wont
work as it depends on the MDIO bus to be up so it can be fetched.

Lets solve it by moving the AR40xx into MDIO folder so they get probed like
before.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: net: ethernet: edma: reject unsupported coalescing params
Robert Marko [Sun, 12 Sep 2021 21:26:59 +0000 (23:26 +0200)]
ipq40xx: net: ethernet: edma: reject unsupported coalescing params

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver did not previously reject unsupported parameters.

This is a required ethtool op since kernel 5.7.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10
Robert Marko [Sun, 12 Sep 2021 21:00:51 +0000 (23:00 +0200)]
ipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10

In kernel v5.5 of_get_phy_mode had its API changed, so its now returning 0
or errors instead of phymode.

Phymode is now returning by passing a pointer to phy_interface_t where it
will be stored.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: add kernel config
Robert Marko [Sun, 12 Sep 2021 20:40:39 +0000 (22:40 +0200)]
ipq40xx: 5.10: add kernel config

Copy config from 5.4 and run "make kernel_oldconfig".

Select default ("N") for all new symbols.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[make commit message more explicit]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: 5.10: refresh patches to apply
Robert Marko [Sun, 12 Sep 2021 20:36:12 +0000 (22:36 +0200)]
ipq40xx: 5.10: refresh patches to apply

Refresh the kernel patches on top of 5.10 so they apply.
Manually fixup the 705-net-add-qualcomm-ar40xx-phy.patch
to apply.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: replace patches with upstreamed versions
Robert Marko [Sun, 12 Sep 2021 20:34:43 +0000 (22:34 +0200)]
ipq40xx: 5.10: replace patches with upstreamed versions

USB and SDHCI LDO DTS patches have been upstreamed into 5.12, so
replace the local versions with upstreamed ones.

Reorder, and clearly mark the kernel version.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: remove duplicate GPIO export patch
Robert Marko [Sun, 12 Sep 2021 20:33:36 +0000 (22:33 +0200)]
ipq40xx: 5.10: remove duplicate GPIO export patch

Its in the generic target already, so remove the duplicate
as it breaks compilation.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: drop upstreamed patches
Robert Marko [Sun, 12 Sep 2021 20:20:55 +0000 (22:20 +0200)]
ipq40xx: 5.10: drop upstreamed patches

Drop patches that have been upstreamed in before 5.10.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: copy patches
Robert Marko [Mon, 13 Sep 2021 12:08:35 +0000 (14:08 +0200)]
ipq40xx: 5.10: copy patches

Copy over the 5.4 kernel patches to 5.10 folder.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoramips: add support for I-O DATA WN-DX2033GR
INAGAKI Hiroshi [Sat, 18 Sep 2021 12:39:04 +0000 (21:39 +0900)]
ramips: add support for I-O DATA WN-DX2033GR

I-O DATA WN-DX2033GR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on
MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 128 MiB
- Flash : Raw NAND 128 MiB (Macronix MX30LF1G18AC-TI)
- WLAN : 2.4/5 GHz
  - 2.4 GHz : 2T2R, MediaTek MT7603E
  - 5 GHz : 4T4R, MediaTek MT7615
- Ethernet : 5x 10/100/1000 Mbps
  - Switch : MediaTek MT7530 (SoC)
- LEDs/Keys : 2x/3x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J5: 3.3V, TX, RX, NC, GND from triangle mark
  - 57600n8
- Power : 12 VDC, 1 A

Flash instruction using initramfs image:

1. Boot WN-DX2033GR normally
2. Access to "http://192.168.0.1/" and open firmware update page
   ("ファームウェア")
3. Select the OpenWrt initramfs image and click update ("更新") button
   to perform firmware update
4. On the initramfs image, download the sysupgrade.bin image to the
   device and perform sysupgrade with it
5. Wait ~120 seconds to complete flashing

Notes:

- The hardware of WN-DX2033GR and WN-AX2033GR are almost the same, and
  it is certified under the same radio-wave related regulations in Japan

- The last 0x80000 (512 KiB) in NAND flash is not used on stock firmware

- stock firmware requires "customized uImage header" (called as "combo
  image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't

  - uImage magic ( 0x0 - 0x3 ) : 0x434F4D42 ("COMB")
  - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32"
  - image name   (0x20 - 0x37) : model ID and firmware versions
  - data length  (0x38 - 0x3b) : kernel + rootfs
  - data crc32   (0x3c - 0x3f) : kernel + rootfs

- There are 2x important flags in the flash:

  - bootnum   : select os partition for booting (persist, 0x4)

    - 0x01: firmware
    - 0x02: firmware_2

  - debugflag : allow interrupt kernel loader, it's named as "Z-LOADER"
    (Factory, 0xFE75)

    - 0x00: disable debug
    - 0x01: enable debug

MAC addresses:

LAN     : 50:41:B9:xx:xx:90 (Factory, 0xE000 (hex) / Ubootenv, ethaddr (text))
WAN     : 50:41:B9:xx:xx:92 (Factory, 0xE006 (hex))
2.4 GHz : 50:41:B9:xx:xx:90 (Factory, 0x4    (hex))
5 GHz   : 50:41:B9:xx:xx:91 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix RTL8231 gpio expander for high GPIOs
Paul Fertser [Mon, 20 Sep 2021 17:13:35 +0000 (20:13 +0300)]
realtek: fix RTL8231 gpio expander for high GPIOs

GPIOs > 31 require special handling. This patch fixes both the
initialisation and direction get/set operations.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
3 years agokernel: add patch to fix an issue with kernel headers that broke perf
Felix Fietkau [Sat, 25 Sep 2021 11:52:07 +0000 (13:52 +0200)]
kernel: add patch to fix an issue with kernel headers that broke perf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotools/fakeroot: fix build error on macOS
Felix Fietkau [Fri, 24 Sep 2021 16:38:24 +0000 (18:38 +0200)]
tools/fakeroot: fix build error on macOS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: backport support for BSS color changes
Felix Fietkau [Fri, 24 Sep 2021 14:53:33 +0000 (16:53 +0200)]
mac80211: backport support for BSS color changes

This is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoramips: add missing information to dlink headers
Alan Luck [Tue, 20 Apr 2021 09:44:01 +0000 (19:44 +1000)]
ramips: add missing information to dlink headers

Add additional header information required for newer
bootloaders found on DIR-2660-A1 & A2.

Also remove the MTD splitter compatible from the second firmware
partition, as OpenWrt only supports handling of the first one.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[rephrase commit message, remove removal of read-only flags]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agohostapd: fix segfault when deinit mesh ifaces
Jesus Fernandez Manzano [Tue, 21 Sep 2021 10:49:30 +0000 (12:49 +0200)]
hostapd: fix segfault when deinit mesh ifaces

In hostapd_ubus_add_bss(), ubus objects are not registered for mesh
interfaces. This provokes a segfault when accessing the ubus object in
mesh deinit.

This commit adds the same condition to hostapd_ubus_free_bss() for
discarding those mesh interfaces.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
3 years agorockchip: fix broken squashfs sysupgrade
David Bauer [Thu, 23 Sep 2021 19:01:37 +0000 (21:01 +0200)]
rockchip: fix broken squashfs sysupgrade

The rockchip platform supports squashfs SD card images. However, the
resulting image is not padded to completely fill the rootfs partition.

Because of that, the f2fs overlay might not be erased, resulting in
uci-defaults not bing executed or the configuration not being erased,
even though drop config was selected.

Modify the image generation process so the image is padded to cover the
entire root filesystem partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoscripts: package-metadata add pkgmanifestjson call
Paul Spooren [Fri, 17 Sep 2021 22:00:40 +0000 (12:00 -1000)]
scripts: package-metadata add pkgmanifestjson call

The new `pkgmanifestjson` call prints all package manifest of a feed in
JSON format. This function can be used to print an overview of packages
information used for downstream tooling.

The script is entirely based on Petrs work on dependency visualisation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobcm47xx: use device vendor/model variable
Moritz Warning [Wed, 5 May 2021 09:06:22 +0000 (11:06 +0200)]
bcm47xx: use device vendor/model variable

Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
3 years agox86: use device vendor/model variable
Moritz Warning [Tue, 4 May 2021 19:15:13 +0000 (21:15 +0200)]
x86: use device vendor/model variable

Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
3 years agobase-files: reduce number of `mkdir` calls
Paul Spooren [Sun, 12 Sep 2021 08:46:06 +0000 (22:46 -1000)]
base-files: reduce number of `mkdir` calls

The `mkdir` commands supports passing multiple arguments to batch create
multiple folders, instead of calling the tool every single time.

If the creation of one of the folders fails, all other folder are still
created and therefore doesn't change the error handling.

Also stop creating `/etc/` explicitly after subfolders of `/etc/` were
already created.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobase-files: reduce `sed` calls
Paul Spooren [Sun, 12 Sep 2021 08:44:11 +0000 (22:44 -1000)]
base-files: reduce `sed` calls

The `sed`-script shouldn't be called multiple times, especially not with
the same files.

This commit merges all files together in a single `sed`-script call.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: store maintainer in package metadata
Paul Spooren [Fri, 17 Sep 2021 09:51:50 +0000 (23:51 -1000)]
scripts: store maintainer in package metadata

The maintainer could be usable for downstream tooling, so start storing
it in the metadata.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoimagebuilder: show architecture in `make info` output
Paul Spooren [Fri, 24 Sep 2021 04:46:15 +0000 (18:46 -1000)]
imagebuilder: show architecture in `make info` output

Using `make info` show the current target, revision, default packages
and available profiles. This commits adds the used architecture.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agorestool: add back PKG_VERSION
Rosen Penev [Thu, 23 Sep 2021 19:48:37 +0000 (12:48 -0700)]
restool: add back PKG_VERSION

For some reason, the build system chops off the last number from the version,
which is not correct. Add it back.

Update hash.

Fixes: 96c7164acd80 ("restool: update to LSDK-20.12")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq-wifi: Work around Plasma Cloud PA1200 5GHz crash
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Work around Plasma Cloud PA1200 5GHz crash

It was noticed [1] that the ath10k firmware crashes on 5GHz since OpenWrt
21.02.0. The problem seems to be triggered by the the nonLinearTxFir field
in the 5GHz BDF. If baseEepHeader.nonLinearTxFir (offset 0xc2) is 1 then
the firmware just crashes when setting up the 5Ghz radio using `ifconfig
wlan1 up`:

  ath10k_ahb a800000.wifi: firmware crashed! (guid 9e36ee82-4d2c-4c63-b20b-609a1eaca30c)
  ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
  ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
  ath10k_ahb a800000.wifi: firmware ver 10.4-3.6-00140 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 ba79b746
  ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 5f400efc
  ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1
  ath10k_ahb a800000.wifi: firmware register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0000000B 0x000015B3 0x009C3C27 0x00975B31
  ath10k_ahb a800000.wifi: [04]: 0x009C3C27 0x00060530 0x00000018 0x004176B8
  ath10k_ahb a800000.wifi: [08]: 0x00405A50 0x00412A30 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [12]: 0x00000009 0x00000000 0x009B9742 0x009B974F
  ath10k_ahb a800000.wifi: [16]: 0x00971238 0x009B9742 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [20]: 0x409C3C27 0x004053DC 0x00000D2C 0x00405A60
  ath10k_ahb a800000.wifi: [24]: 0x809C3E13 0x0040543C 0x00000000 0xC09C3C27
  ath10k_ahb a800000.wifi: [28]: 0x809B9AC5 0x0040547C 0x00412A30 0x0040549C
  ath10k_ahb a800000.wifi: [32]: 0x809B8ECD 0x0040549C 0x00000001 0x00412A30
  ath10k_ahb a800000.wifi: [36]: 0x809B8FF3 0x004054CC 0x00412838 0x00000014
  ath10k_ahb a800000.wifi: [40]: 0x809BEF98 0x0040551C 0x0041627C 0x00000002
  ath10k_ahb a800000.wifi: [44]: 0x80986D47 0x0040553C 0x0041627C 0x00416A88
  ath10k_ahb a800000.wifi: [48]: 0x809CBB0A 0x0040559C 0x0041ACC0 0x00000000
  ath10k_ahb a800000.wifi: [52]: 0x809864EE 0x0040560C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: [56]: 0x809CA8A4 0x0040564C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: Copy Engine register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0004a000  14  14   3   3
  ath10k_ahb a800000.wifi: [01]: 0x0004a400  16  16  22  23
  ath10k_ahb a800000.wifi: [02]: 0x0004a800   3   3   2   3
  ath10k_ahb a800000.wifi: [03]: 0x0004ac00  15  15  15  15
  ath10k_ahb a800000.wifi: [04]: 0x0004b000   4   4  44   4
  ath10k_ahb a800000.wifi: [05]: 0x0004b400   3   3   2   3
  ath10k_ahb a800000.wifi: [06]: 0x0004b800   1   1   1   1
  ath10k_ahb a800000.wifi: [07]: 0x0004bc00   1   1   1   1
  ath10k_ahb a800000.wifi: [08]: 0x0004c000   0   0 127   0
  ath10k_ahb a800000.wifi: [09]: 0x0004c400   0   0   0   0
  ath10k_ahb a800000.wifi: [10]: 0x0004c800   0   0   0   0
  ath10k_ahb a800000.wifi: [11]: 0x0004cc00   0   0   0   0
  ath10k_ahb a800000.wifi: failed to update channel list: -108
  ath10k_ahb a800000.wifi: failed to set pdev regdomain: -108
  ath10k_ahb a800000.wifi: failed to create WMI vdev 0: -108
  ieee80211 phy1: Hardware restart was requested

Since no actual solution is known (besides downgrading the ath10k firmware)
it seems to be better to disable the nonLinearTxFir for now.

[1] https://lore.kernel.org/ath10k/3423718.UToCqzeSYe@ripper/

Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12

The official Plasma Cloud firmware adjusted the BDFs to contain new
conformance test limits and target power values. These should be imported
to avoid emissions outside the allowed limits.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agobcm53xx: MR32: read mac-address from eeprom
Christian Lamparter [Sat, 18 Sep 2021 14:41:41 +0000 (16:41 +0200)]
bcm53xx: MR32: read mac-address from eeprom

Meraki wrote the ethernet MAC-address of the device
onto the eeprom (AT24C64) at the fixed location 0x66
to 0x6C. Let's fetch it from there.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoscripts: mkits.sh: Allow legacy @ mode for dts creation
Damien Mascord [Mon, 19 Jul 2021 04:21:44 +0000 (14:21 +1000)]
scripts: mkits.sh: Allow legacy @ mode for dts creation

commit 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes")
broke support for Meraki MR32 and this patch makes the replacement
configurable allowing for specifying the @ or - or whatever character
that is desired to retain backwards compatibility with existing devices.

For example, this patch includes the fix for the Meraki MR32 in
target/linux/bcm53xx/image for meraki_mr32:

  DEVICE_DTS_DELIMITER := @
  DEVICE_DTS_CONFIG := config@1

Fixes: 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes")
Signed-off-by: Damien Mascord <tusker@tusker.org>
[Added tags, checkpatch.pl fixes, noted that this is for old stuff]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agolibtool: Revert "libtool: bump to 2.4.6"
Hauke Mehrtens [Thu, 23 Sep 2021 11:36:45 +0000 (13:36 +0200)]
libtool: Revert "libtool: bump to 2.4.6"

This breaks the package builds using the SDK.
The targets all build fine, but the package builder fails on many
packages. The package builder uses the OpenWrt SDK.

This reverts commit c377d874bededfad971530aeb7d7e1b43cd3e61a.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoscripts: handle gcc and linux in dl_cleanup script
Ansuel Smith [Tue, 6 Jul 2021 01:53:58 +0000 (03:53 +0200)]
scripts: handle gcc and linux in dl_cleanup script

Handle gcc and linux with a special regex that set their progname with
their major version. This way every minor version can be cleared. The
build cleanup logic can be tweaked later to clean the entire toolchain
and target dir with a different gcc version.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[reformat commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobcm53xx: backport early DT patches queued for 5.16
Rafał Miłecki [Wed, 22 Sep 2021 20:01:10 +0000 (22:01 +0200)]
bcm53xx: backport early DT patches queued for 5.16

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoscripts: format dl_cleanup to black format python style
Ansuel Smith [Tue, 6 Jul 2021 01:20:40 +0000 (03:20 +0200)]
scripts: format dl_cleanup to black format python style

Forma dl_cleanup python script to black style.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
3 years agoscripts: add missing regex for dl_cleanup script
Ansuel Smith [Mon, 5 Jul 2021 22:56:21 +0000 (00:56 +0200)]
scripts: add missing regex for dl_cleanup script

Regex xxx-YYYY-MM-DD-GIT_SHASUM was missing. Add the new regex to improve
and better find outdated package. This also fix a bug where some bug were
incorrectly detected as packagename-yyyy-mm-dd instead of packagename due
to them be parsed by the wrong parser

Example:

    openwrt-keyring-2021-02-20-49283916.tar.xz

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[added example in commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agotoolchain/binutils: switch to version 2.37 by default
Paul Spooren [Wed, 22 Sep 2021 01:14:40 +0000 (15:14 -1000)]
toolchain/binutils: switch to version 2.37 by default

Compile tests:
* all

Runtime tests:
* ipq806x/generic
* lantiq/mt7621
* lantiq/xrx200
* x86/64

Signed-off-by: Paul Spooren <mail@aparcar.org>
Tested-by: Paul Spooren <mail@aparcar.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>