Since 6.1 is now default, drop 5.15 support.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In my previous attempt to solve the PCI problems for the lantiq targets,
I did not pay attention to the fact that the original accesses to the
GPIO took place in RAW mode. As a result, the polarity defined in the
device trees (apart from the initial value) was irrelevant.
In addition, the expected name of the GPIO in the dts has changed due to
the upstream change and therefore no RESET is currently performed.
As discussed in [1] on the linux-mips mailing list, we will now adapt
the dts files accordingly instead of patching the driver:
- dts property will be renamed to "reset-gpios"
- Polarity is set to "GPIO_ACTIVE_LOW".
I have verified this with a TP-Link TD-W8980. The PCI device is now
recognized by the system.
[1] https://patchwork.kernel.org/project/linux-mips/patch/20240607090400.1816612-1-ms@dev.tdt.de/
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # Tested on AVM 7330 (ar9)
Link: https://github.com/openwrt/openwrt/pull/15731
Signed-off-by: Robert Marko <robimarko@gmail.com>
gpio is deprecated. Found with dtc's -Wdeprecated_gpio_property
Used git grep -E $'\tgpio = <' to make the changes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15681
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
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>
Disable image building for the board, since the kernel of the main branch
is to big to fit into the kernel partition.
Signed-off-by: Nick Hainke <vincent@systemli.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This fixes the following compile problem:
````
CC arch/mips/kernel/vpe-mt.o
arch/mips/kernel/vpe-mt.c: In function 'vpe_run':
arch/mips/kernel/vpe-mt.c:32:23: error: unused variable 'physical_memsize' [-Werror=unused-variable]
32 | unsigned long physical_memsize = 0L;
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:289: arch/mips/kernel/vpe-mt.o] Error 1
````
physical_memsize was removed from upstream kernel, see:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=5b4f6c5ff65c8551018ccea40c569afd759734c0
Fixes: 387fde0da0 ("kernel: bump 5.15 to 5.15.150")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Arcadyan VRV9510KWAC23 (trade name Livebox Next) is a Lantiq router distributed by some spanish ISPs
Hardware:
- SoC: Lantiq VRX200
- CPU: 2x MIPS 34Kc 500 MHz
- RAM: 256 MiB DDR2
- Flash: 128 MiB NAND
- Ethernet: Built-in Gigabit Ethernet switch, 5x 1GbE
- Wifi 2.4GHz: Broadcom BCM43222KFBG 802.11b/g/b MIMO 2T2R
- Wifi 5GHz: Broadcom BCM4360KMLG 802.11ac MIMO 3T3R
- USB: 2x USB 2.0
- DSL: Built-in VDSL/ADSL2+ XWAY VRX208
- LEDs: 8x
- Buttons: 4x
- Phone: Lantiq PEF 42068 V XWAY SLIC120
Install instructions:
Detailed instructions can be found on the wiki https://openwrt.org/toh/arcadyan/vrv9510kwac23
1. Boot into UART mode and upload the the https://raw.githubusercontent.com/danielhuici/arcadyan-vrv9510kwac23-utils/main/u-boot.asc file via serial console to boot into U-Boot.
2. Perform a backup of the NAND
3. Setup a TFTP server and serve the https://github.com/danielhuici/arcadyan-vrv9510kwac23-utils/raw/main/u-boot.ltq.lzo.nandspl. Replace the OEM bootloader with this one. Erase your NAND and write the image into it
4. Reboot the router
5. Serve the OpenWrt ramdisk image on your TFTP server and boot it via U-Boot
6. When OpenWrt boots, flash the SquashFS OpenWrt image using LuCi interface, so OpenWrt gets installed into the NAND
Signed-off-by: Daniel Huici <danielhuici@hotmail.com>
Fix DTS error in LED color/function conversion due to a bug in the
conversion script.
Fixes: 0c3f3eb229 ("lantiq: convert to new LED color/function format where possible")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This adds support for the Fritzbox 3490 device. It contains two
SoCs, one Lantiq with a 5GHz WiFi and one QCA9558 with 2.4GHz
and 5 GHz WiFi. Only the Lantiq has access to the flash memory,
the Atheros runs fully from RAM and is booted by using a remoteproc
kernel module which is not supported with this commit.
The devices were manufactured with varying NAND chips which
requires Micron and non-Micron versions of the images.
Specifications:
- SoC: Lantiq 500 MHz
- RAM: 256 MB
- Storage: 512 MB NAND, 1MB FLASH
- Wireless, separate SOC QCA9558 with 128MB RAM (not supported yet):
· Qualcomm-QCA9558 w/ 3×3 MIMO for 2.4GHz 802.11b/g/n
· Qualcomm-QCA9880 w/ 3×3 MIMO for 5GHz 802.11a/ac
· AG71xx ethernet
- Ethernet: Built-in AR 803x, 7 port 4 phy switch,
4x 1000/100/10 port, Port 5 is fixed and connected to the WASP SOC
- Renesas µPD720202 USB3 PCIe, requires firmware binary on the device
- VDSL2 modem
- Without telephony or ISDN
Installation:
Check which NAND the device has by using the following procedure with
stock firmware:
Go to to http://<fritzbox_ip>/support.lua, download the support data
file and search for string "NAND device" to get the manufacturer kernel
output.
Use Micron image if Micron is displayed otherwise the non-Micron image.
Use the eva_ramboot.py script to boot the initramfs image. Follow the
procedure to interrupt booting by ftp into 192.168.178.1 within
5 seconds after poweron.
Then transfer the sysupgrade image to the device and run sysupgrade to
flash it to the NAND.
For making USB work, an renesas xhci firmware file (e.g. v2026) is
needed and it should be copied to /lib/firmware/ (file name
renesas_usb_fw.mem).
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
This adds support for the Fritzbox 5490/5491 devices. They contain
two SoCs, one Lantiq without WiFi and one QCA9558 with 2.4GHz
and 5 GHz WiFi. Only the Lantiq has access to the flash memory,
the Atheros runs fully from RAM and is booted by using a remoteproc
kernel module which is not supported with this commit.
Both devices have fiber WAN ports.
The devices were manufactured with varying NAND chips which
requires Micron and non-Micron versions of the images.
Specifications:
- SoC: Lantiq 500 MHz
- RAM: 256 MB
- Storage: 512 MB NAND, 1MB FLASH
- Wireless, separate SOC QCA9558 with 128MB RAM (not supported yet):
· Qualcomm-QCA9558 w/ 3×3 MIMO for 2.4GHz 802.11b/g/n
· Qualcomm-QCA9880 w/ 3×3 MIMO for 5GHz 802.11a/ac
· AG71xx ethernet
- Ethernet: Built-in AR 803x, 7 port Lantiq gswip switch,
4x 1000/100/10 port (additional qca8334 switch for 2 ports), Port 5 is
fixed and connected to the Wireless SOC
- Renesas µPD720202 USB3 PCIe, requires firmware binary on the device
- AT 8033 based AON fiber port (5490) or GPON fiber port (5491)
Unsupported:
- DECT and ISDN telephony
- Two ethernet ports (on extra switch) and fiber port not working
Installation:
Check which NAND the device has by using the following procedure with
stock firmware:
Go to to http://<fritzbox_ip>/support.lua, download the support data
file and search for string "NAND device" to get the manufacturer kernel
output.
Use Micron image if Micron is displayed otherwise the non-Micron image.
Use the eva_ramboot.py script to boot the initramfs image. Follow the
procedure to interrupt booting by ftp into 192.168.178.1 within
5 seconds after poweron.
Then transfer the sysupgrade image to the device and run sysupgrade to
flash it to the NAND.
For making USB work, an renesas xhci firmware file (e.g. v2026) is
needed and it should be copied to /lib/firmware/ (file name
renesas_usb_fw.mem).
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
This adds support for the Fritzbox 7490 device. It contains two
SoCs, one Lantiq without WiFi and one QCA9558 with 2.4GHz
and 5 GHz WiFi. Only the Lantiq has access to the flash memory,
the Atheros runs fully from RAM and is booted by using a remoteproc
kernel module and is not supported with this commit.
The devices were manufactured with varying NAND chips which
requires Micron and non-Micron versions of the images.
Specifications:
- SoC: Lantiq 500 MHz
- RAM: 256 MB
- Storage: 512 MB NAND, 1MB FLASH
- Wireless, separate SOC QCA9558 with 128MB RAM (not supported yet):
· Qualcomm-QCA9558 w/ 3×3 MIMO for 2.4GHz 802.11b/g/n
· Qualcomm-QCA9880 w/ 3×3 MIMO for 5GHz 802.11a/ac
· AG71xx ethernet
- Ethernet: Built-in AR 803x, 7 port 4 phy switch,
4x 1000/100/10 port, Port 5 is fixed and connected to the WASP SOC
- Renesas µPD720202 USB3 PCIe, requires firmware binary on the device
- VDSL2 modem
Unsupported:
- DECT and ISDN telephony
Installation:
Check which NAND the device has by using the following procedure with
stock firmware:
Go to to http://<fritzbox_ip>/support.lua, download the support data
file and search for string "NAND device" to get the manufacturer kernel
output.
Use Micron image if Micron is displayed otherwise the non-Micron image.
Use the eva_ramboot.py script to boot the initramfs image. Follow the
procedure to interrupt booting by ftp into 192.168.178.1 within
5 seconds after poweron.
Then transfer the sysupgrade image to the device and run sysupgrade to
flash it to the NAND.
For making USB work, an renesas xhci firmware file (e.g. v2026) is
needed and it should be copied to /lib/firmware/ (file name
renesas_usb_fw.mem).
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
The Fritzbox 3490, 5490 and 7490 devices have a Renesas µPD720202
USB3 PCIe device, which requires an endian switch for PCIe slave
devices. The flag and setting is not implemented in the available
patches. Since adding this setting would break other devices,
a DTB setting lantiq,switch-pcie-endianess is added for selective
enablement.
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
Enabling SMP on Danube[1] is incompatible with a patch that
adds support for interrupt handling on all cores on other
platforms[2]. This patch fixes the mentioned issue.
1. 084c20f6c5 ("lantiq: xway: kernel: enable SMP support ")
2. fbd33d6164 ("lantiq: enable interrupts on second VPEs")
Fixes: #13934Fixes: #14283
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
This reverts commit 0c117e1f6c.
Activate the lantiq/xrx200 target again.
There are still some problems with the GSWIP, but it is not leaking
packets to the wrong bridge in normal operations.
It shows some error messages at configuration like these:
[ 54.308861] gswip 1e108000.switch: port 5 failed to add ce:9d:84:d1:81:f0 vid 1 to fdb: -22
[ 54.325633] gswip 1e108000.switch: port 5 failed to add e8🇩🇪27:95:c1:b4 vid 0 to fdb: -22
[ 54.351242] gswip 1e108000.switch: port 5 failed to add e8🇩🇪27:95:c1:b4 vid 1 to fdb: -22
[ 54.358311] gswip 1e108000.switch: port 5 failed to delete ce:9d:84:d1:81:f0 vid 1 from fdb: -2
The problems are described in this pull request:
https://github.com/openwrt/openwrt/pull/13200
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Binding for ralink EEPROM swap changed from ralink,mtd-eeprom-swap to
ralink,eeprom-swap.
Update every entry.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This option was removed from upstream kernel back in 2022.
See commits:
2d16803c562ecc644803d42ba98a8e0aef9c014e (>=6.0)
3dd33a09f5dc12ccb0902923c4c784eb0f8c7554 (>=5.15.61 backport)
Signed-off-by: Christian Svensson <blue@cmd.nu>
Random_ether_addr() is a helper function which was kept for backward
compatibility. It is available in the kernel from version 3.6 to 5.16.
In newer kernel verions, it has been completely replaced by eth_random_addr().
There should be no functional changes.
Ref: ba530fea8c
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
All targets are bumped to 5.15. Remove the old 5.10 patches, configs
and files using:
find target/linux -iname '*-5.10' -exec rm -r {} \;
Further, remove the 5.10 include.
Signed-off-by: Nick Hainke <vincent@systemli.org>
pcibios_map_irq request a const pci_dev while pci_find_capability
doesn't. Cast dropping the const to fix compilation warning.
Fix compilation warning:
arch/mips/pci/fixup-lantiq.c: In function 'pcibios_map_irq':
arch/mips/pci/fixup-lantiq.c:34:33: error: passing argument 1 of 'pci_find_capability' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
34 | if (pci_find_capability(dev, PCI_CAP_ID_EXP))
| ^~~
In file included from arch/mips/pci/fixup-lantiq.c:9:
./include/linux/pci.h:1129:40: note: expected 'struct pci_dev *' but argument is of type 'const struct pci_dev *'
1129 | u8 pci_find_capability(struct pci_dev *dev, int cap);
| ~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>