openwrt/openwrt.git
6 hours agobase-files: correctly split install-key function for APK main master
Paul Spooren [Fri, 17 May 2024 20:32:00 +0000 (23:32 +0300)]
base-files: correctly split install-key function for APK

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

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

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

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

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

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

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

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

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

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

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

Those keys should never be added to the git repository.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Add support for AQR114C-B0 PHY.

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

Add support for AQR114C PHY ID.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Without this change wifi does not work for these devices.

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

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

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

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

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

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

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

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

This is required for linux-6.1 compatibility.

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

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

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

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

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

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

This is required for linux-6.1 compatibility.

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

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

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

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

This is required for linux-6.1 compatibility.

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

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

This is required for linux-6.1 compatibility.

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

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

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

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

This is required for linux-6.1 compatibility.

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

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

This is required for linux-6.1 compatibility.

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

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

This adds the missing interrupts to the pcie node.

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

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

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

This backports some patches for the gswip switch driver.

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

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

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

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

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

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

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

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

Add KERNEL_TESTING_PATCHVER for Linux 6.1.

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

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

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

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

This is an automatically generated commit.

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

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

This refreshes the configuration for Linux kernel 5.15.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use the constant RTL_8221B_VB_CG_PHYID instead of a numeric value.

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

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

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

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

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

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

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

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

Also fix a couple of warnings while at it.

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

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

All other patches automatically rebased.

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

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

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

Lets give Linux 6.6 a try.

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

Refresh kernel config for Linux 6.6.

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

Refresh the only remaining downstream patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agokernel/airoha: Restore kernel files for v6.1
Daniel Golle [Tue, 7 May 2024 13:01:34 +0000 (14:01 +0100)]
kernel/airoha: Restore kernel files for v6.1

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

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agokernel/airoha: Create kernel files for v6.6 (from v6.1)
Daniel Golle [Tue, 7 May 2024 13:01:34 +0000 (14:01 +0100)]
kernel/airoha: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15416
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agokernel: bump 5.15 to 5.15.158
Hauke Mehrtens [Sat, 11 May 2024 17:52:13 +0000 (19:52 +0200)]
kernel: bump 5.15 to 5.15.158

Removed because they are upstream:
   generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=506ac5538498717fce699feaddb2ed97ae1c3ca7

   generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2f83d3d2cc3c0df89f833cd8c09989187f0c3ce1

Manually adapted:
   generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agokernel: qca-ssdk: use bash as shell
Robert Marko [Sat, 11 May 2024 15:01:42 +0000 (17:01 +0200)]
kernel: qca-ssdk: use bash as shell

Currently, trying to compile qca-ssdk on macOS will fail in a weird way:
make[6]: *** No rule to make target 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/-n',
needed by 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/qca-ssdk.o'. Stop.

After looking looking at src_list.dep from which KBuild cmd_mod will
generate the list of objects to compile it looked like:
-n /src/adpt/adpt.c
-n
-n

Which was rather suspicous so after comparing to the same file but with
Fedora as host:
/src/adpt/adpt.c src/adpt/hppe/adpt_hppe_fdb.c src/adpt/hppe/adpt_hppe_mib.c

It was clear that echo -n which was used in SSDK-s target.mk was not
working as intented, and it looked like the POSIX only version of echo
was being used which does not honor -n.

So, after failling to reproduce it externally, replacing the call to echo
with a full path to coreutils echo fixed the compilation.

After further debugging, it was determined that SSDK does not honor
CONFIG_SHELL like other kernel modules so it was defaulting to /bin/sh as
the shell make was calling thus calling the /bin/sh built-in echo which on
macOS is the old Bash 3.2 one and it does not respect -n.

So, we have to explicitly pass SHELL=$(BASH) to SSDK to make it use bash
like kernel build or other kernel modules.

This is not an issue since on macOS we always build bash anyway.

Link: https://github.com/openwrt/openwrt/pull/15459
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agomvebu: switch to kernel 6.6
Stefan Kalscheuer [Fri, 10 May 2024 16:18:48 +0000 (18:18 +0200)]
mvebu: switch to kernel 6.6

Update default kernel version to 6.6 and drop configs and patches for
kernel 6.1. We can also omit the conditional to include DTS dir.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/15449
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoipq40xx: fixup remaining devices that dont use QCA807x PHY
Robert Marko [Fri, 10 May 2024 13:25:18 +0000 (15:25 +0200)]
ipq40xx: fixup remaining devices that dont use QCA807x PHY

Like AVM 1200 these devices also do not use QCA807x PHY at all and thus
they disables all of the individual PHY nodes, however this is not enough
anymore since the conversion to PHY package.

Now its now enough to disable the PHY-s in the package alone, but the PHY
package node itself must also be disabled.

Fixes: 1b931c33a28e ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
Link: https://github.com/openwrt/openwrt/pull/15444
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agoramips: add support for ELECOM WMC-S1267GS2
INAGAKI Hiroshi [Mon, 25 Mar 2024 12:39:30 +0000 (21:39 +0900)]
ramips: add support for ELECOM WMC-S1267GS2

ELECOM WMC-S1267GS2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) mesh extender,
based on MT7621A.

This device has almost the same hardware as WMC-M1267GST2.

Specification:

- SoC          : MediaTek MT7621A
- RAM          : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
- Flash        : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
- WLAN         : 2.4/5 GHz 2T2R (MediaTek MT7615D)
- Ethernet     : 10/100/1000 Mbps x4
  - switch     : MediaTek MT7530 (SoC)
- LEDs/Keys    : 6x/6x
- UART         : through-hole on PCB ("J4")
  - arrangement: 3.3V, GND, TX, RX from tri-angle marking
  - settings   : 57600n8
- Power        : 12 VDC, 1 A

Flash instruction using factory image:

1. Boot WMC-S1267GS2 normally
2. Set IP address of the computer to 192.168.2.x
3. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
4. Select the OpenWrt factory image and click apply ("適用") button
5. Wait ~120 seconds to complete flashing

MAC addresses:

LAN    : 04:AB:18:xx:xx:9E (Factory, 0xFFF4 (hex))
2.4 GHz: 04:AB:18:xx:xx:9F
5 GHz  : 04:AB:18:xx:xx:A0 (Factory, 0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agoramips: add support for ELECOM WMC-M1267GST2
INAGAKI Hiroshi [Mon, 25 Mar 2024 12:39:30 +0000 (21:39 +0900)]
ramips: add support for ELECOM WMC-M1267GST2

ELECOM WMC-M1267GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) mesh router,
based on MT7621A.

Specification:

- SoC          : MediaTek MT7621A
- RAM          : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
- Flash        : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
- WLAN         : 2.4/5 GHz 2T2R (MediaTek MT7615D)
- Ethernet     : 10/100/1000 Mbps x5
  - switch     : MediaTek MT7530 (SoC)
- LEDs/Keys    : 6x/6x
- UART         : through-hole on PCB ("J4")
  - arrangement: 3.3V, GND, TX, RX from tri-angle marking
  - settings   : 57600n8
- Power        : 12 VDC, 1 A

Flash instruction using factory image:

1. Boot WMC-M1267GST2 normally with "Router" mode
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing

MAC addresses:

LAN    : 04:AB:18:xx:xx:61 (Factory, 0xFFF4 (hex))
WAN    : 04:AB:18:xx:xx:62 (Factory, 0xFFFA (hex))
2.4 GHz: 04:AB:18:xx:xx:63
5 GHz  : 04:AB:18:xx:xx:64 (Factory, 0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agokernel: bump 5.15 to 5.15.157
Hauke Mehrtens [Sun, 28 Apr 2024 19:35:55 +0000 (21:35 +0200)]
kernel: bump 5.15 to 5.15.157

Removed because they are upstream:
   generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433

Removed because they are upstream:
   generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56

Manual adapted the following patches:
   generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
   generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agokernel: bump 5.15 to 5.15.156
Hauke Mehrtens [Sun, 28 Apr 2024 10:58:23 +0000 (12:58 +0200)]
kernel: bump 5.15 to 5.15.156

No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agoramips: add support for JDCloud RE-CP-02
Sheng Huang [Mon, 6 May 2024 05:51:27 +0000 (13:51 +0800)]
ramips: add support for JDCloud RE-CP-02

- Soc: MediaTek MT7621AT
- RAM: 512 MB (DDR3)
- Flash: 16 MB (SPI NOR)
- WiFi: MediaTek MT7905DAN, MediaTek MT7975DN
- Ethernet: 1 WAN, 3 LAN (Gigabit)
- Buttons: Reset, Joylink
- LEDs: (red, blue, green), routed to one indicator in the top of the
  device
- Power: DC 12V 1A tip positive
- 1 TF Card Slot

The pins for the serial console are already labeled on the board
J4(V, R, T, G). Serial settings: 3.3V, 115200

MAC addresses:

|         | MAC               | Algorithm |
| ------- | ----------------- | --------- |
| label   | dc:d8:xx:xx:xx:01 | label     |
| LAN     | dc:d8:xx:xx:xx:01 | label     |
| WAN     | dc:d8:xx:xx:xx:02 | label+1   |
| WLAN 2g | dc:d8:xx:xx:xx:03 | label+2   |
| WLAN 5g | de:d8:xx:xx:xx:04 | label+3   |

1. rename the
   openwrt-ramips-mt7621-jdcloud_re-cp-02-squashfs-sysupgrade.bin
   to JDCOS.bin

2. start a TFTP server from IP address 192.168.68.10 and serve the
   image named JDCOS.bin

3. connect your device to the LAN port

4. power up the router and press any key on the console to interrupt
   the boot process.

5. enter the following commands on the router console

   1. setenv bootcount 6

   2. saveenv

   3. reset

      > NOTE: wait for the restart, it will automatically fetch the
      > image named JDCOS.bin from the TFTP server and write it into
      > the flash. After the writing is completed, the router will be
      > automatically restarted.

Unable to recognize large-capacity TF card, see #14042. But the patch
https://github.com/openwrt/openwrt/issues/14042#issuecomment-1910769942
works

Co-Authored-By: Jianti Chen <clbcjt@outlook.com>
Signed-off-by: Sheng Huang <shenghuang147@gmail.com>
6 days agomediatek: filogic: add support for Cudy M3000 v1
Leon M. Busch-George [Fri, 12 Jan 2024 15:10:40 +0000 (16:10 +0100)]
mediatek: filogic: add support for Cudy M3000 v1

Hardware:
  SoC:     MT7981b
  RAM:     256 MB
  Flash:   128 MB SPI NAND
  Ethernet:
    1x 2.5Gbps (rtl8221b)
    1x 1Gbps (integrated phy)
  WiFi:    2x2 MT7981
  Buttons: Reset, WPS
  LED:     1x multicolor

Solder on UART:
  - remove rubber ring on the bottom
  - remove screws
  - pull up the cylinder, maybe help by push on an ethernet socket with a screwdriver
  - remove the (3) screws holding the board in the frame
  - remove the board from the frame to get to the screws for the silver, flat heat shield
  - remove the (3) screws holding the heat shield
  - solder UART pins to the back of the board
    - make sure to have the pins point out on side with the black, finned heat spread
    - the markings for the pins are going to be below the silver heat shield
    - Vcc is not needed

If you don't intend on using the UART outside of the installation process, you might not
want to solder:

  - carefully scrape off the thin layer of epoxy on the holes (not the copper)
  - place your pin header with the UART attached in the holes
  - the pins, starting with the one closest to the socket:
    - Vcc (not required)
    - GND
    - RX
    - TX
  - either wedge the header or hold it with your fingers so that the pins stay in contact with the board

Installation (UART):
  - attach an Ethernet cable to the 1Gbps port (black) on the router
  - hold the reset button while powering the router
  - press CTRL-C or wait for the timeout to get to the U-Boot prompt
  - prepare a TFTP server on the network to supply ..-initramfs-kernel.bin
  - use 'tftpboot' in the U-Boot shell to pull the image
  - boot the image using 'bootm'
  - push the ..-sysupgrade to the router using your preferred method
  - perform the upgrade with 'sysupgrade -n'

There is a recovery mechanism that involves fetching a file called 'recovery.bin' but that is not understood yet.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
6 days agouboot-envtools: ath79: remove env config for Senao Loader devices
Kevin Abraham [Sat, 27 Apr 2024 17:44:58 +0000 (13:44 -0400)]
uboot-envtools: ath79: remove env config for Senao Loader devices

uboot-envtools can automatically parse the 'u-boot,env' compatible string from the dts.

Signed-off-by: Kevin Abraham <kevin@westhousefarm.com>
6 days agoath79: add support for Senao Engenius ENS1750
Kevin Abraham [Sat, 27 Apr 2024 05:56:21 +0000 (01:56 -0400)]
ath79: add support for Senao Engenius ENS1750

FCC ID: A8J-EWS660AP

Engenius ENS1750 is an outdoor wireless access point with
2 gigabit ethernet ports, dual-band wireless,
internal antenna plates, and 802.3at PoE+

Engenius EWS660AP, ENS1750, and ENS1200 are "electrically identical,
different model names are for marketing purpose" according to docs
provided by Engenius to the FCC.

**Specification:**

  - QCA9558 SOC 2.4 GHz, 3x3
  - QCA9880 WLAN mini PCIe card, 5 GHz, 3x3, 26dBm
  - AR8035-A PHY RGMII GbE with PoE+ IN
  - AR8033 PHY SGMII GbE with PoE+ OUT
  - 40 MHz clock
  - 16 MB FLASH MX25L12845EMI-10G
  - 2x 64 MB RAM
  - UART at J1 populated, RX grounded
  - 6 internal antenna plates (5 dbi, omni-directional)
  - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset)

**MAC addresses:**

  Base MAC addressed labeled as "MAC"
  Only one Vendor MAC address in flash

  eth0 *:d4 MAC art 0x0
  eth1 *:d5 --- art 0x0 +1
  phy1 *:d6 --- art 0x0 +2
  phy0 *:d7 --- art 0x0 +3

**Serial Access:**

  the RX line on the board for UART is shorted to ground by resistor R176
  therefore it must be removed to use the console
  but it is not necessary to remove to view boot log

  optionally, R175 can be replaced with a solder bridge short

  the resistors R175 and R176 are next to the UART RX pin

**Installation:**

  2 ways to flash factory.bin from OEM:

  Method 1: Firmware upgrade page:

    OEM webpage at 192.168.1.1
    username and password "admin"
    Navigate to "Firmware Upgrade" page from left pane
    Click Browse and select the factory.bin image
    Upload and verify checksum
    Click Continue to confirm and wait 3 minutes

  Method 2: Serial to load Failsafe webpage:

    After connecting to serial console and rebooting...
    Interrupt uboot with any key pressed rapidly
    execute `run failsafe_boot` OR `bootm 0x9fd70000`
    wait a minute
    connect to ethernet and navigate to
    "192.168.1.1/index.htm"
    Select the factory.bin image and upload
    wait about 3 minutes

**Return to OEM:**

  If you have a serial cable, see Serial Failsafe instructions
  otherwise, uboot-env can be used to make uboot load the failsafe image

  ssh into openwrt and run
  `fw_setenv rootfs_checksum 0`
  reboot, wait 3 minutes
  connect to ethernet and navigate to 192.168.1.1/index.htm
  select OEM firmware image from Engenius and click upgrade

**TFTP recovery:**

  Requires serial console, reset button does nothing

  rename initramfs.bin to '0101A8C0.img'
  make available on TFTP server at 192.168.1.101
  power board, interrupt boot
  execute tftpboot and bootm 0x81000000

**Format of OEM firmware image:**

  The OEM software of ENS1750 is a heavily modified version
  of Openwrt Kamikaze. One of the many modifications
  is to the sysupgrade program. Image verification is performed
  simply by the successful ungzip and untar of the supplied file
  and name check and header verification of the resulting contents.
  To form a factory.bin that is accepted by OEM Openwrt build,
  the kernel and rootfs must have specific names...

    openwrt-ar71xx-generic-ens1750-uImage-lzma.bin
    openwrt-ar71xx-generic-ens1750-root.squashfs

  and begin with the respective headers (uImage, squashfs).
  Then the files must be tarballed and gzipped.
  The resulting binary is actually a tar.gz file in disguise.
  This can be verified by using binwalk on the OEM firmware images,
  ungzipping then untaring.

  Newer EnGenius software requires more checks but their script
  includes a way to skip them, otherwise the tar must include
  a text file with the version and md5sums in a deprecated format.

  The OEM upgrade script is at /etc/fwupgrade.sh.

  OKLI kernel loader is required because the OEM software
  expects the kernel to be no greater than 1536k
  and the factory.bin upgrade procedure would otherwise
  overwrite part of the kernel when writing rootfs.

Note on PLL-data cells:

  The default PLL register values will not work
  because of the external AR8035 switch between
  the SOC and the ethernet port.

  For QCA955x series, the PLL registers for eth0 and eth1
  can be see in the DTSI as 0x28 and 0x48 respectively.
  Therefore the PLL registers can be read from uboot
  for each link speed after attempting tftpboot
  or another network action using that link speed
  with `md 0x18050028 1` and `md 0x18050048 1`.

  The clock delay required for RGMII can be applied
  at the PHY side, using the at803x driver `phy-mode`.
  Therefore the PLL registers for GMAC0
  do not need the bits for delay on the MAC side.
  This is possible due to fixes in at803x driver
  since Linux 5.1 and 5.3

Tested-by: Kevin Abraham <kevin@westhousefarm.com>
Signed-off-by: Kevin Abraham <kevin@westhousefarm.com>
6 days agoubnt-ledbar: adapt for kernel v6.6
Sven Wegener [Fri, 10 May 2024 11:52:00 +0000 (13:52 +0200)]
ubnt-ledbar: adapt for kernel v6.6

Linux kernel commit torvalds/linux@b8a1a4cd5a98a2adf8dfd6902cd98e57d910ee12
added a temporary probe_new member to struct i2c_driver, to drop the
rarely used second parameter of the probe function and not break API for
out of tree drivers. With torvalds/linux@5eb1e6e459cfa025f79c43014f66ff62a55542f1,
which is part of v6.6, this probe_new member is dropped and the
signature of the probe function is updated.

ubnt-ledbar is used by the mediatek and ramips targets and both have
been updated to v6.6, so adapt the probe function signature and remove
other compat code for versions before v6.6.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Link: https://github.com/openwrt/openwrt/pull/15443
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agomediatek: fix PWM fan on BPi-R4
Daniel Golle [Thu, 9 May 2024 21:35:47 +0000 (22:35 +0100)]
mediatek: fix PWM fan on BPi-R4

Add additional PWM fan cooling step and enable fan on BPi-R4.

Suggested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 days agobase-files: fix uid/gid auto-enumeration to avoid 16-bit limit
Thomas Winkler [Fri, 10 Nov 2023 21:48:59 +0000 (22:48 +0100)]
base-files: fix uid/gid auto-enumeration to avoid 16-bit limit

uid/gid range should be limited to 16bit unsigned integer range to
avoid "wraparound" issues with permissions where jffs2
is employed for storage and chown 65536 (first auto-created user)
becomes equivalent to chown 0

Fixes: #13927
Signed-off-by: Thomas Winkler <tewinkler86@gmail.com>
7 days agokernel: add missing kernel 6.6 symbols
Álvaro Fernández Rojas [Fri, 10 May 2024 17:49:21 +0000 (19:49 +0200)]
kernel: add missing kernel 6.6 symbols

Add missing kernel 6.6 symbols for bcm27xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agoimage: add missing DTC include-prefixes directory
Álvaro Fernández Rojas [Fri, 10 May 2024 11:39:07 +0000 (13:39 +0200)]
image: add missing DTC include-prefixes directory

include-prefixes were moved to a common directory in linux v4.12, see
https://github.com/torvalds/linux/commit/d5d332d3f7e8435e264a71b90178dee69428d630

This is needed for bcm27xx kernel v6.6 support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agorealtek: Trap LLDP packets to the CPU
Kevin Jilissen [Sat, 4 May 2024 14:12:20 +0000 (16:12 +0200)]
realtek: Trap LLDP packets to the CPU

We should setup the registers for trapping LLDP packets to the CPU.
Currently, these packets are forwarded to all ports which is not desired
behaviour.

Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
7 days agorealtek: Change LLTP register to LLDP
Kevin Jilissen [Sat, 4 May 2024 14:11:00 +0000 (16:11 +0200)]
realtek: Change LLTP register to LLDP

These registers control the handling of Link Layer Discovery Protocol
(LLDP) packets. This seems to be a typo in the naming.

Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
7 days agobcm27xx-utils: update to latest version
Álvaro Fernández Rojas [Fri, 10 May 2024 07:17:52 +0000 (09:17 +0200)]
bcm27xx-utils: update to latest version

Full changelog:
https://github.com/raspberrypi/utils/compare/e65f5ec102e74218cda7da9fdc8b1caa0fd1127d...451b9881b72cb994c102724b5a7d9b93f97dc315

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agobcm27xx-gpu-fw: update to v1.20240424
Álvaro Fernández Rojas [Fri, 10 May 2024 07:15:15 +0000 (09:15 +0200)]
bcm27xx-gpu-fw: update to v1.20240424

This includes multiple updates for BCM2711 and BCM2712.

Full changelog:
https://github.com/raspberrypi/firmware/compare/0968de28716a9b1f106b8492646d0ed0a2800152...1.20240424

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 days agogperf: build as C++11
Rosen Penev [Sat, 27 Apr 2024 21:57:50 +0000 (14:57 -0700)]
gperf: build as C++11

Newer compilers default to building with C++17 as default, which has the
register keyword removed and thus errors.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
8 days agoramips: add support for Wavlink WL-WN531G3
Eros Brigmann [Mon, 8 Apr 2024 19:36:57 +0000 (21:36 +0200)]
ramips: add support for Wavlink WL-WN531G3

This device is similiar to the Wavlink WL-WN531A3.
Hardware
--------
SoC:   Mediatek MT7620A
RAM:   64MB
FLASH: 8MB NOR (GigaDevice GD25Q64CS)
ETH:
  - 2x 10/100/1000 Mbps Ethernet (RTL8211F)
  - 3x 10/100 Mbps Ethernet (integrated in SOC)
WIFI:
  - 2.4GHz: 1x (integrated in SOC) (2x2:2)
  - 5GHz:   1x MT7612E (2x2:2)
  - 4 external antennas
BTN:
  - 1x Reset button
  - 1x Touchlink button
  - 1x Turbo button
  - 1x Wps button
  - 1x ON/OFF switch
LEDS:
  - 1x Red led (system status)
  - 1x Blue led (system status)
  - 5x Blue leds (ethernet ports)
  - 1x Power led
  - 1x Wifi led
UART:
  - 57600-8-N-1
Everything works correctly.

Installation
------------
Flash the initramfs image in the OEM firmware interface
When Openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.
In my case the whole device was locked and there was no way
to flash the image, except for flashing directly to the flash
via an spi-flasher. You need to put the sysupgrade image file at
the beginning of 0x60000.

Notes
-----
1) Router mac addresses:
   LAN XX:XX:XX:XX:XX:F0 (factory @ 0x28)
   WAN XX:XX:XX:XX:XX:F1 (factory @ 0x2e)
   WIFI 2G XX:XX:XX:XX:XX:F2 (factory @ 0x04)
   WIFI 5G XX:XX:XX:XX:XX:F3 (factory @ 0x8004)

   LABEL XX:XX:XX:XX:XX:F2

Signed-off-by: Eros Brigmann <erosbrigmann@gmail.com>
8 days agoath79: enable 6.6 testing kernel
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: enable 6.6 testing kernel

The ath79 target now supports the vanilla 6.6 kernel. Enjoy it!

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: skip reset control for syscon devices
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: skip reset control for syscon devices

Fix the issue of exclusive reset controller acquisition failure on
kernel 6.6.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: refresh 6.6 kernel config files
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: refresh 6.6 kernel config files

All kernel config files are refreshed by
`make kernel_oldconfig CONFIG_TARGET={subtarget_target,subtarget}`

"CONFIG_SQUASHFS_DECOMP_SINGLE=y" is manually selected as all ath79
SoCs are single core processors.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: refresh 6.6 kernel patches
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: refresh 6.6 kernel patches

Some APIs have been changed. Porting them to the new kernel 6.6
version to fix the compile error.

Removed upstreamed:
010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch[1]

Manually rebased:
700-phy-add-ath79-usb-phys.patch
721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch. ref:[2]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=b11ce7e48121a02ceedec9f4dfcab4f2bee8f35f
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=002dd3de097c778a74ae9e47e598bea6ad055af0

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: restore kernel 6.1 config files and patches
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: restore kernel 6.1 config files and patches

Copy patches and kernel configs from kernel 6.6 to restore the
default 6.1 kernel support files.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: rename patches directory and kernel config from 6.1 to 6.6
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: rename patches directory and kernel config from 6.1 to 6.6

This is preparation for 6.6 kernel support. Renaming files allows
us to better track their git history.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: add MikroTik suffix to the local GPIO latch driver
Shiji Yang [Sat, 16 Mar 2024 00:39:16 +0000 (08:39 +0800)]
ath79: add MikroTik suffix to the local GPIO latch driver

The upcoming 6.6 kernel will introduce a new upstream generic
"gpio-latch" driver. It will conflict with the downstream MikroTik
GPIO latch driver. Let's rename it to avoid any potential issues.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agoath79: fix build error for downstream gpio drivers
Shiji Yang [Mon, 29 Apr 2024 20:26:17 +0000 (20:26 +0000)]
ath79: fix build error for downstream gpio drivers

Initialize fwnode instead of the deprecated of_node.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 days agomediatek: add support for Cudy TR3000 v1
Luis Mita [Tue, 7 May 2024 15:48:37 +0000 (11:48 -0400)]
mediatek: add support for Cudy TR3000 v1

Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND
 - RAM: 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
 - USB 3.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: internal test points, 115200 8n1
 - Power: 5 VDC, 3 A

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:af:ca:xx:xx:x1 | label+1   |
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 82:af:ca:xx:xx:x0 |           |
+---------+-------------------+-----------+

Installation:
The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below.

To install using TFTP:
1. Connect to UART.
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
5. Run these steps in u-boot using the name of your file.

setenv bootfile initramfs-kernel.bin
tftpboot
bootm

6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off.

Signed-off-by: Luis Mita <luis@luismita.com>
8 days agoramips: Add support for D-Link DIR-2150-A1
Alan Luck [Sat, 27 Apr 2024 09:25:49 +0000 (19:25 +1000)]
ramips: Add support for D-Link DIR-2150-A1

Hardware Specification:
SoC: Mediatek MT7621DAT (MIPS1004Kc 880 MHz, dual core)
RAM: 128 MB
Storage: 128 MB NAND flash
Ethernet: 5x 10/100/1000 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
Wireless: 2.4GHz: Mediatek MT7603EN up to 300Mbps (802.11b/g/n MIMO 2x2)
Wireless: 5GHz: Mediatek MT7615N up to 1733Mbps (802.11n/ac MU-MIMO 4x4)
LEDs: Power (white & amber), Internet (white & amber)
LEDs: 2.4G (White), 5Ghz (White)
Buttons: WPS, Reset

MAC Table
Label xx:xx:xx:xx:xx:EB
LAN xx:xx:xx:xx:xx:EB
2.4Ghz xx:xx:xx:xx:xx:EC
5Ghz xx:xx:xx:xx:xx:ED
WAN xx:xx:xx:xx:xx:EE

Flash instructions:
D-Link normal OEM firmware update page
1. upload OpenWRT factory.bin like any D-Link upgrade image

D-Link Recovery GUI:
1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
2. Give it ~30 seconds, to boot the recovery mode GUI
3. Connect your client computer to LAN1 of the device
4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0
5. Call the recovery page for the device at http://192.168.0.1/
6. Use the provided emergency web GUI to upload the recovery.bin to the device

Firefox on Windows in a Private Window (incognito) works me
Internet Explorer mode in Microsoft Edge works for others
seems to not work in Linux or virtual machine on Linux for most
some see success using 'curl -v -i -F "firmware=@file.bin" 192.168.0.1'

Thanks to @frkca and @rodneyrod for testing and pushing for its creation

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
8 days agoramips: use led, function/color syntax for some tp-link archer routers
Mieczyslaw Nalewaj [Mon, 29 Apr 2024 17:10:59 +0000 (19:10 +0200)]
ramips: use led, function/color syntax for some tp-link archer routers

Setting the LED name and abandoning the label and using the
function/color syntax for some TP-Link Archer series routers:
Archer C2 v1, Archer C20 v1, Archer C20i and Archer C50 v1

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
8 days agoramips: use function/color syntax for some dlink dir routers
Mieczyslaw Nalewaj [Wed, 8 May 2024 18:32:03 +0000 (20:32 +0200)]
ramips: use function/color syntax for some dlink dir routers

Abandoning the label and using the function/color syntax for some dlink
dir series routers: dir-1960-a1, dir-2660-a1, dir-2640-a1, dir-3040-a1
and dir-3060-a1

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
8 days agoramips: rename include file to a more suitable name
Mieczyslaw Nalewaj [Sat, 27 Apr 2024 05:41:51 +0000 (07:41 +0200)]
ramips: rename include file to a more suitable name

Rename from mt7621_dlink_dir-xx60-a1.dtsi to mt7621_dlink_dir_nand_128m.dtsi
and associated group name when creating the mt7621.mk image

Co-authored-by: Alan Luck <luckyhome2008@gmail.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
8 days agomediatek: correct address of MT753x switch IC
Mieczyslaw Nalewaj [Thu, 9 May 2024 11:11:16 +0000 (13:11 +0200)]
mediatek: correct address of MT753x switch IC

Continuation of commit 8b66f1a. Set the switch address on the MDIO bus to 31.
This is required for all boards currently working with the mt7530 DSA driver.

Fixes: #15419
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
8 days agodropbear: clarify DROPBEAR_MODERN_ONLY option
Konstantin Demin [Mon, 6 May 2024 13:20:16 +0000 (16:20 +0300)]
dropbear: clarify DROPBEAR_MODERN_ONLY option

don't mention SHA1 in order to not confuse users - SHA1 support is already disabled (except RSA-SHA1 signagures).

ref: https://github.com/openwrt/openwrt/issues/15281

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
8 days agodropbear: bump to 2024.85
Konstantin Demin [Mon, 6 May 2024 13:20:16 +0000 (16:20 +0300)]
dropbear: bump to 2024.85

- update dropbear to latest stable 2024.85;
  for the changes see https://matt.ucc.asn.au/dropbear/CHANGES
- drop cherry-picked patches (merged in release 2024.84)
- refresh remaining patches

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
8 days agogeneric: 6.6: backport patch adding support for rgmii-id in stmmac-ipq806x
Christian Marangi [Thu, 9 May 2024 14:32:03 +0000 (16:32 +0200)]
generic: 6.6: backport patch adding support for rgmii-id in stmmac-ipq806x

Backport patch merged upstream for rgmii-id support in stmmac-ipq806x.

This is needed for some device that directly connets PHY to the gmac
port and require rgmii-id phy-modes.

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