Commit Graph

30252 Commits

Author SHA1 Message Date
Robert Marko f12179fa15 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>
2024-05-16 15:12:53 +02:00
Hauke Mehrtens 9c84d619fc 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>
2024-05-16 13:11:08 +03:00
Hauke Mehrtens ff3d0de095 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 e93f41adee
("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 0a1d15642f ("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: e93f41adee ("ramips: convert MT7628 EEPROM to NVMEM format")
Fixes: 0a1d15642f ("ramips: mt7628: use nvmem-layout")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-16 13:11:08 +03:00
Martin Schiller cffd3ad8d7 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>
2024-05-15 08:54:58 +02:00
Martin Schiller faaa54161e 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>
2024-05-15 08:54:58 +02:00
Martin Schiller ece380cf28 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>
2024-05-15 08:54:58 +02:00
Martin Schiller 83fccc42df 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>
2024-05-15 08:54:58 +02:00
Martin Schiller db4bb19679 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>
2024-05-15 08:54:58 +02:00
Martin Schiller 1825ea9098 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>
2024-05-15 08:54:58 +02:00
Martin Schiller 284f12bfa6 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>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens 783c3aace2 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>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens e79dacd962 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>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens a3659b158b 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>
2024-05-15 08:54:58 +02:00
Martin Schiller e692742be7 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>
2024-05-15 08:54:58 +02:00
Martin Schiller b704c537cf 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>
2024-05-15 08:54:58 +02:00
Martin Schiller 2196815961 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>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens 494a10964c 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>
2024-05-15 08:54:58 +02:00
Rodrigo Balerdi 0868268c9f
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>
2024-05-14 12:22:59 +02:00
Christophe JAILLET 5ac8cf1eab
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>
2024-05-14 12:21:02 +02:00
Mieczyslaw Nalewaj 1a544dc5ce
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>
2024-05-13 20:27:25 +02:00
Mieczyslaw Nalewaj 76584c798a
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>
2024-05-13 20:27:17 +02:00
Daniel Golle fbf6f9da02 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>
2024-05-12 12:52:16 +02:00
Daniel Golle 6961d5e9c1 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>
2024-05-12 12:52:16 +02:00
Daniel Golle 22efab92f5 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>
2024-05-12 12:52:16 +02:00
Daniel Golle 577eaa58da 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>
2024-05-12 12:52:16 +02:00
Daniel Golle 8ca67645ce 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>
2024-05-12 12:52:16 +02:00
Hauke Mehrtens 1fae75ebd9 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>
2024-05-12 12:16:18 +02:00
Stefan Kalscheuer 4b30c2ff0f 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>
2024-05-12 11:29:23 +02:00
Robert Marko dc9220f748 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: 1b931c33a2 ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
Link: https://github.com/openwrt/openwrt/pull/15444
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-12 10:56:16 +02:00
INAGAKI Hiroshi 61e8728d86 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>
2024-05-11 19:33:28 +02:00
INAGAKI Hiroshi 927a77ecff 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>
2024-05-11 19:33:28 +02:00
Hauke Mehrtens 84d0b0b925 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>
2024-05-11 18:30:30 +02:00
Hauke Mehrtens 1fbe41f489 kernel: bump 5.15 to 5.15.156
No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-11 18:30:30 +02:00
Sheng Huang 985af21123 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>
2024-05-11 17:24:10 +02:00
Leon M. Busch-George 20e4a18feb 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>
2024-05-11 17:18:51 +02:00
Kevin Abraham 1045bd4a04 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>
2024-05-11 16:57:28 +02:00
Kevin Abraham 1dd036a659 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>
2024-05-11 16:57:28 +02:00
Daniel Golle 8113169cad 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>
2024-05-11 00:52:34 +01:00
Álvaro Fernández Rojas 72cdba7b1a 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>
2024-05-10 21:02:24 +02:00
Kevin Jilissen 5a5c52085a 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>
2024-05-10 16:03:51 +02:00
Kevin Jilissen 81ab9ef2d1 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>
2024-05-10 16:03:51 +02:00
Eros Brigmann 803c00e9b8 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>
2024-05-10 00:05:25 +02:00
Shiji Yang eb48dae81e 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>
2024-05-09 23:53:02 +02:00
Shiji Yang 26390b5361 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>
2024-05-09 23:53:02 +02:00
Shiji Yang e938d68074 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>
2024-05-09 23:53:02 +02:00
Shiji Yang 872fe7e9f9 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>
2024-05-09 23:53:02 +02:00
Shiji Yang d123330aa9 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>
2024-05-09 23:53:02 +02:00
Shiji Yang 7d01a0b436 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>
2024-05-09 23:53:01 +02:00
Shiji Yang e155e3bd09 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>
2024-05-09 23:51:14 +02:00
Shiji Yang 24693ac7e5 ath79: fix build error for downstream gpio drivers
Initialize fwnode instead of the deprecated of_node.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-05-09 23:51:14 +02:00
Luis Mita 63b8d98dd0 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>
2024-05-09 23:32:32 +02:00
Alan Luck 30e8fd73ec 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>
2024-05-09 22:28:23 +02:00
Mieczyslaw Nalewaj 474b108dfe 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>
2024-05-09 22:24:48 +02:00
Mieczyslaw Nalewaj d646ea8a00 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>
2024-05-09 22:24:31 +02:00
Mieczyslaw Nalewaj 8d7fa09181 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>
2024-05-09 22:21:39 +02:00
Mieczyslaw Nalewaj 9dae0ac0bc 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>
2024-05-09 19:43:54 +02:00
Christian Marangi 9001014a24
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>
2024-05-09 16:48:34 +02:00
Tianling Shen 0341a06f1f rockchip: switch to kernel 6.6
Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-09 10:43:37 +02:00
Robert Marko 592b6aabca ipq40xx: wpj419: use existing label for SPI node
WPJ419 is still manually defining SPI node, so lets
convert it to use the existing upstream labels for SPI node.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:44 +02:00
Robert Marko c9743030e3 ipq40xx: wpj419: use existing label for pinctrl node
WPJ419 is still manually defining pinctrl node, so lets
convert it to use the existing upstream labels for pinctrl node.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:44 +02:00
Robert Marko 1f3fe4662e ipq40xx: wpj419: use existing label for PCIe node
WPJ419 is still manually defining PCIe node, so lets
convert it to use the existing upstream labels for PCIe node and while we
are here use the -gpios suffix instead.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:44 +02:00
Robert Marko 63c5d8bd72 ipq40xx: use existing labels for MDIO node
Some boards are still defining MDIO nodes under soc instead of using the
existing upstream labels to reference them so convert them.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:44 +02:00
Robert Marko 90f9bc799f ipq40xx: use existing labels for I2C nodes
Some boards are still defininig I2C nodes under soc instead of using the
existing upstream labels to reference them so convert them.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:44 +02:00
Robert Marko 625e912d75 ipq40xx: use existing labels for UART nodes
Some boards are still defininig UART nodes under soc instead of using the
existing upstream labels to reference them so convert them.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Robert Marko 7359362a2e ipq40xx: ncp-hg100-cellular: drop QPIC BAM node
This device does not have NAND enabled at all and NAND is the only consumer
of QPIC BAM DMA, so drop the node.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Robert Marko b475e8f717 ipq40xx: wpj419: use existing labels for DMA nodes
WPJ419 is still manually defining dma nodes(And even some labels), so lets
convert it to use the existing upstream labels for DMA nodes.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Robert Marko e54c9c156b ipq40xx: use existing labels for crypto node
Currently, a lot of boards are still not using the existing label to
reference the crypto node, so lets rectify this.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Robert Marko 22e96cc3ff ipq40xx: use existing labels for prng node
Currently, a lot of boards are still not using the existing label to
reference the prng node, so lets rectify this.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Robert Marko 2e94536fc8 ipq40xx: use existing labels for watchdog node
Currently, a lot of boards are still not using the existing label to
reference the watchdog node, so lets rectify this.

Link: https://github.com/openwrt/openwrt/pull/15415
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-09 10:11:43 +02:00
Daniel Golle 3f4347fce0 mediatek: mt7988a.dtsi: add interrupts to GE switch PHYs
The way to register the switch MDIO bus and PHYs on the bus in upstream
Linux is more strict and requires each PHY to explicitely state the
interrupt instead of assuming it in case the 'interrupts' property in DT
is missing.

Add missing interrupts for the PHYs of the build-in 4x1GE switch of the
MT7988 SoC.

Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-08 22:19:26 +01:00
Magnus Lindström 54abf1cfc7 mediatek: ASUS TUF-AX6000: fix phy-handle numbering
To fix issue #15304
Correct br-lan ports 1-4 so that phy-handle matches reg nr not port label.

Fixes: eb13076e77 ("mediatek: fix DTS defining mt7530 switch phys but not referencing them")
Signed-off-by: Magnus Lindström <magnus1089@hotmail.com>
2024-05-08 22:19:09 +01:00
Linus Walleij 51e9aa6ace gemini: Bump to kernel v6.6
The Gemini works fine with kernel v6.6.

As per the example for ipq806x, drop support for anything
older than v6.6, there is no point in supporting it,
and the new DTS SoC directory just makes it hard to
maintain.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-08 16:57:32 +02:00
Daniel Golle 0d74b2a1e5 generic: 6.1, 6.6: replace Airoha EN8811H PHY driver with upstream
Backport driver from upcoming Linux 6.10 and put a pending fix on top
to make sure the netdev trigger offloading behaves as expected.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-08 01:54:32 +01:00
Mathew McBride 683355d0a6 armsr: armv8: enable serial console for Renesas platforms
Support for Renesas Arm families was added in commit 1ff4f4df23
("armsr: armv8: enable CONFIG_ARCH_RENESAS"), but this did not
enable the console/tty hardware for these SoCs, which is derived
from the SuperH family (CONFIG_SERIAL_SH_SCI).

Link: https://github.com/openwrt/openwrt/issues/15284
Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:20 +01:00
Mathew McBride ffbc4c897f base-files: armsr: add script to migrate GPIO switches on Ten64 board
Due to a change in kernel 6.2, the GPIO numbers on certain
architectures (including arm64) have changed. This script
will update any defined GPIO switches to the new numbering.

See https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042448.html
for more information.

In the future, the GPIO switch mechanism will likely be
replaced with something using libgpiod.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:20 +01:00
Mathew McBride 5f609d8960 base-files: armsr: number Ten64 GPIOs according to kernel version
A change in kernel 6.2[1] caused the base numbers of GPIOs to
change significantly on some architectures like aarch64.

We have to number our GPIOs accordingly.
Ideally the board.d scripts should look through sysfs
to find the basenum (like cat "/sys/devices/platform/soc/2000000.i2c/
i2c-0/0-0076/gpio/gpiochip640/base"), but the problem is
that this occurs before modules are loaded, meaning I2C and other
runtime devices may be missing.

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] https://lore.kernel.org/lkml/cover.1662116601.git.christophe.leroy@csgroup.eu/T/
2024-05-07 13:01:19 +01:00
Mathew McBride c8927d7c01 armsr: armv8: add new fsl-enetc-core module for kernel 6.6
From kernel 6.3 onwards, the fsl-enetc driver has restructured
it's common code into a 'core' module[1].

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] https://patchwork.kernel.org/project/netdevbpf/patch/20230119160431.295833-2-vladimir.oltean@nxp.com/
2024-05-07 13:01:19 +01:00
Mathew McBride 5744205eb6 armsr: add kernel 6.6 as a testing target
Add kernel 6.6 for testing.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:19 +01:00
Mathew McBride fb29f702af kernel/armsr: add config stubs and changes needed for 6.6
Introduce new configuration options prompted by 6.6 (relative to 6.1).
The kernel arm64 defconfig is used as guide for 'core' options, while
video/camera/other media drivers are turned off by default.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:19 +01:00
Mathew McBride 587b8b8e32 kernel/armsr: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

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

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:19 +01:00
Mathew McBride f125e38ced kernel/armsr: Add configuration files and patches for v6.6
Based on the 6.1 files, but without any 6.6 additions.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2024-05-07 13:01:19 +01:00
Mieczyslaw Nalewaj bd6852185b
ipq806x: swap lan leds for Meraki MR52
LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually
reflect real ports (lan1<->lan2).

Fixes: #15388
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15410
[ wrap commit to 80 columns and improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-07 13:35:49 +02:00
Daniel Golle 50f7155d57 generic: 6.1, 6.6: move accepted patches to backport folders
Move two accepted patches for the mt7530 DSA driver from pending to
accepted.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-07 12:21:12 +01:00
Felix Fietkau a7ae4ed0a3 kernel: fix tools build breakage on macos with x86
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-07 12:50:27 +02:00
Felix Fietkau 931b2bafa7 mediatek: fix mt7988a pmu interrupt dts property
Fixes profiling using perf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-07 12:50:27 +02:00
Stijn Tintel a9781a04a1 realtek: add RTL821X_CHIP_ID
According to the Realtek SDK code, the RTL8214FC, RTL8218B and RTL8218FB
all have the same chip ID 0x6276. Let's add a constant for it, as we're
using it in more than one location.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-05-07 12:27:33 +03:00
Stijn Tintel 1626b06683 realtek/rtl839x: respect phy-is-integrated property
Respect the phy-is-integrated property on ethernet-phy nodes.

There are RTL8393M switches where the PHYs at address 48 and 49 are
provided by an external RTL8214FC. Hardcoding them to use the internal
SerDes makes it impossible to use the ports connected to such an
external PHY. Respect the phy-is-integrated property on ethernet-phy
nodes as a first step to support such ports.

The potential impact for this should be limited to RTL8393 based
switches, and looking at the commit messages and device tree files of
the supported switches based on this SoC, the SFP and/or combo ports are
either not working (D-Link DGS-1210-52, Netgear GS750E, TP-Link
SG2452P/T1600G-52PS), use PHYs at a different address (Panasonic
SwitchM48EG PN28480K), or already have the phy-is-integrated property
set on the PHYs at address 48 and 49.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Daniel Golle <daniel@makrotopia.org>
2024-05-07 12:27:30 +03:00
Martin Schiller 3dde786163 mediatek: bpi-r4: fix uci-default script for mac storage
There was a typo in commit 5709254690 ("mediatek: bpi-r4: store random
MAC addresses for the BPi-R4"). Let's fix it and also add support for
the bpi-r4-poe variant.

Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-07 09:56:36 +01:00
Martin Schiller 738b427d35 mediatek: bpi-r4: add rootwait to bootargs
In commit cd4de3251c ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.

Fixes: cd4de3251c ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-07 09:56:36 +01:00
Martin Schiller 8c1250cb39 mediatek: bpi-r2: add rootwait to bootargs
In commit cd4de3251c ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.

Fixes: cd4de3251c ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-07 09:56:36 +01:00
Antonio Flores ce4da3cf41 rockchip: add kernel 6.6 as testing kernel
Add kernel 6.6 as testing kernel

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores e18dda0159 kernel: add missing kernel 6.6 symbols
Add missing kernel 6.6 symbols

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores 83edd39db6 rockchip: refresh config 6.6
Refresh config 6.6 (make kernel_oldconfig).

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores 728db5ec05 rockchip: refresh 6.6 patches
Refresh kernel 6.6 patches.
Removed backpored patches.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores dcd2367349 kernel/rockchip: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

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

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores ddfd526140 kernel/rockchip: 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: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Tony Ambardar 708e6b840e kselftests-bpf: update for kernel 6.6
Enable building multiple test programs and related kernel modules, with
initial support for the bpf_testmod.ko module required since kernel 6.4.
Explicitly disable LTO and clean up makefile variables and formatting.

Fix a musl-related build failure by adding a kernel 6.6 patch:

     360-selftests-bpf-portability-of-unprivileged-tests.patch

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2024-05-06 22:39:18 +02:00
Daniel Golle 0b0e3e22f8 mediatek: bpi-r4: add ethernet aliases to DT
Adding the aliases also for Linux 6.6 was forgotten and is required for
U-Boot to hand down persistent MAC addresses to Linux.

Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-06 16:38:44 +01:00
Corey Minyard 226b15f885
ipq40xx: Enable the Engenius EAP1300
Now that DSA is enabled and the MAC addresses are set properly, we can
use it.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 12:45:53 +02:00
Corey Minyard 63b1326575
ipq40xx: Properly set MAC addresses for the EAP1300
The code that was there was just taking whatever was left in the
registers, which was just wrong.  Set the addresses using the value from
the u-boot environment, the same way the OEM firmware does.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 12:45:53 +02:00
Corey Minyard e0567456bf
ipq40xx: convert Engenius EAP1300 to DSA
This commit converts the EAP1300 to DSA setup.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 12:45:52 +02:00
Corey Minyard e51791963e
ipq40xx: Enable NVMEM_U_BOOT_ENV config
It's needed to get the MAC addresses for the Engenius EAP1300.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 12:45:51 +02:00
Christian Marangi f3f3e2c5bb
ipq4019: fix even more wrong reference to USB node
Commit 6136ebabc5 ("ipq40xx: 6.6: fix DTS to use reference for usb
node") fixed only some of the reference to USB node but many others were
still using the old broken usb3/usb2. Fix every reference to those node
and move them on using the tag name.

Fixes: 6136ebabc5 ("ipq40xx: 6.6: fix DTS to use reference for usb node")
Link: https://github.com/openwrt/openwrt/pull/15392
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 12:40:24 +02:00
Rany Hany 8607372b41 mediatek: fix broken PCIe caused by update to 6.6.30
The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
makes use of "syscon_regmap_lookup_by_phandle" which requires that
"syscon" be in the compatible list.

Without this patch, PCIe probe will fail with the following error:

[    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
[    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22

Fixes: 4c6e9a9943 ("kernel: bump 6.6 to 6.6.30")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
2024-05-06 11:05:03 +02:00
Martin Schiller fa804f7d0e mediatek: bpi-r4: add support for 2.5GE PoE variant
This adds support for the bpi-r4 variant with internal 2.5G PHY and
additional ethernet port instead of second sfp.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-06 09:12:05 +02:00
Martin Schiller 14955dcb7e mediatek: bpi-r4: dts: move common parts to dtsi file
Move the common parts of the mt7988a-bananapi-bpi-r4.dts to a dtsi file.
This is done to prepare support for the 2.5G Ethernet Variant.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-06 09:12:05 +02:00
John Audia 485afd4b11 x86: generic: config-6.6: add/remove default syms
Add new default and remove deprecated symbol introduced by 6.6.30[1]

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-05-05 21:22:31 +02:00
John Audia 4c6e9a9943 kernel: bump 6.6 to 6.6.30
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30

Removed upstreamed:
	ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch[1]

Manually rebased:
	generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
	mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.30&id=87fc30db0a2bb300de289dae7c5579cc27a3cbbd

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-05-05 21:22:31 +02:00
Felix Fietkau ccb2390d4f kernel: fix corrupted ethernet header on bridge multicast-to-unicast
Fixes: 45a8e962a5 ("kernel: fix crash with multicast-to-unicast and fraglist GRO")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-05 20:49:27 +02:00
Robert Marko d1504a1e76 ath79: refresh patches
CI is telling us that we need to refresh the patches, so lets do so.

Link: https://github.com/openwrt/openwrt/pull/15382
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-05 11:27:18 +02:00
Rodrigo Balerdi 6dc751815b ipq40xx: merge DTS for Linksys WHW03 V1 and V2
No changes other than the merging itself are intended in this commit.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-05 10:33:13 +02:00
Rodrigo Balerdi 5ac0615b7e ipq40xx: clean up Linksys WHW03 V2 DTS
Apply stylistic changes to facilitate DTS merging with WHW03 V1.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-05 10:33:13 +02:00
Rodrigo Balerdi c904875562 ipq40xx: add support for Linksys WHW03 V1
Hardware:
=========
SOC:             Qualcomm IPQ4019
WiFi 1:          QCA4019 IEEE 802.11b/g/n
WiFi 2:          QCA4019 IEEE 802.11a/n/ac
WiFi 3:          QCA9886 IEEE 802.11a/n/ac
Bluetooth:       Qualcomm CSR8510 (A10)
Zigbee:          Silicon Labs EM3581 NCP + Skyworks SE2432L
Ethernet:        Qualcomm Atheros QCA8072 (2-port)
Flash:           Samsung KLM4G1FEPD (4GB eMMC)
RAM (NAND):      512MB
LED Controller:  NXP PCA9633 (I2C)
Buttons:         Single reset button (GPIO).

Ethernet:
=========
The device has 2 ethernet ports, configured as follows by default:
- left port: WAN
- right port: LAN

Wifi:
=====
The Wifi radios are turned off by default. To configure the router,
you will need to connect your computer to the LAN port of the device.

Bluetooth and Zigbee:
=====================
Configuration included but not tested.

Storage:
========
For compatibility with stock firmware, all of OpenWrt runs in a 136 MiB
eMMC partition (of which there are two copies, see below). You can also
use partition /dev/mmcblk0p19 "syscfg" (3.4 GiB) any way you see fit.
During very limited tests, stock firmware did not mount this partition.
However, backing up its stock content before use is recommended anyway.

Firmware:
=========
The device uses a dual firmware mechanism: it automatically reverts to
the previous firmware after 3 failed boot attempts.

You can switch to the inactive firmware copy by changing the "boot_part"
U-Boot environment variable. You can also do it by turning on the device
for a couple of seconds and then back off, 3 times in a row.

Installation:
=============
OpenWrt's "factory" image can be installed via the stock web UI:
1. Login to the UI. (The default password is printed on the label.)
2. Enter support mode by clicking on the "CA" link at the bottom.
3. Click "Connectivity", "Choose file", "Start", and ignore warnings.

This port is based on work done by flipy (https://github.com/flipy).

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-05 10:33:13 +02:00
Antonio Flores 4ebcc5375a rockchip: add Bananapi-R2 Pro board support
Hardware spec:

- Rockchip RK3568 Quad-core ARM Cortex-A55 CPU 2GHz
- GPU Mali-G52 1-Core-2EE OpenGL ES3.2 Vu1kn 1.1 OpenCL 2.0
- Memory2G DDR3 SDRAM (option 4G)
- Storage Onboard 16GB eMMC Flash, Micro SD-Card slot, SATA 3.0 Port,SPI flash
- Network 5 x 10/100/1000 Mbit/s Ethernet MT7531
- Display 1 HDMI port, 2 DSI interface(1 DSI can change to LVDS by software)
- Camera 1 CSI camera interface
- Audio Output HDMI & I2S & Speaker & Headphone
- USB port USB 3.0 PORT (x2), micro USB OTG (x1)
- PCIE 1 mini pcie interface & 1 M.2 key-e interface
- Remote IR Receiver (x1)
- GPIO 40 Pin Header : GPIO (x28) and Power (+5V, +3.3V and GND).
- Switches Reset button, Power button, U-boot button
- LED Power Status
- Power Source 12 volt 2A via DC Power

Installation:

Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*)
Boot from the SD card
1-hold down the MaskRom button
2-Connect DC power
3-Wait 5 seconds, release the button.

eMMC Installation:

1-Uncompress the OpenWrt sysupgrade image
2-fash to eMMC
dd if=openwrt-rockchip-armv8-sinovoip_bpi-r2-pro-squashfs-sysupgrade.img of=/dev/mmcblk1
sync
3-remove SD card
reboot

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-05 00:46:48 +02:00
Antonio Flores 298e11e43d rockchip: enable MT7531 and RTC drivers
This patch enable MT7531 switch and RTC drivers for BPI-R2 Pro.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-05 00:46:48 +02:00
Daniel Golle d9d7286279 rockchip: add driver for hardware RNG
Rockchip SoCs used to have a random number generator as part of their
crypto device, and support for it has to be added to the corresponding
driver.

Newer Rockchip SoCs like the RK3568 have an independent True Random
Number Generator device. Import pending patchset which adds a driver for
it, include it in Kconfig and enable it in the device tree.

Doing so significantly reduces the time needed to boot devices based on
those SoCs, from about 27 seconds until Ethernet is up and running to
less than 13 seconds with a minimal snapshot image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-04 13:59:48 +01:00
Weijie Gao 7fcb82665e loongarch64: new target
Add target for Loongson LoongArch64-based boards.

LoongArch is a new RISC ISA developed by Loongson. It's a bit like
MIPS or RISC-V. LoongArch includes both 32-bit and 64-bit versions
(LoongArch32/LoongArch64).

Loongson 3A5000 and 3A6000 are the two existing CPUs of LoongArch64
and is used for PC products. It's BIOS supports ACPI and UEFI-only
boot. These CPUs supports SMP and SMT.

At present only LoongArch64 is supported by linux kernel.

Toolchain requirement:
binutils >= 2.40
gcc >= 13.1

For details, please check the following links:
https://lwn.net/Articles/861951/
https://loongson.github.io/LoongArch-Documentation/README-EN.html

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2024-05-04 14:14:16 +08:00
Daniel Golle 6bb2551343 Revert "mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1"
This reverts commit 3fe239fcf8.
Now that we switched to Linux 6.6 this is no longer needed, and resulted
in a left-over file because it's removal was not included in the commit
removing all the other files intended for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-04 00:15:57 +01:00
Zoltan HERPAI 3f7d8e20cd sunxi: add support for Lichee Pi Zero Dock (V3s) board
CPU:     Allwinner V3s single-core Cortex-A7 @ 1.2GHz
Memory:  64Mb DDR2 integrated into SoC package
Storage: 1x SDcard on board, 1x SDcard on dock
Network: 10/100M ethernet
Other:   4x buttons via LRADC, CSI

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-04 00:41:02 +02:00
Mieczyslaw Nalewaj 263fde5ab8 ramips: remove unnecessary macros for previous kernel versions
Remove unnecessary 'if' macros for previous kernel versions.
After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
are unnecessary.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[removed some more and also no longer include version.h]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 23:02:00 +01:00
Daniel Golle 2967e24d02 ramips: switch to Linux 6.6
Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 21:36:42 +01:00
Daniel Golle 2201d55257 mediatek: remove macros for previous kernel versions
Remove unnecessary 'if' macros for previous kernel versions.
After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
are unnecessary.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 21:36:42 +01:00
Daniel Golle 6257ea018a mediatek: switch to Linux 6.6
Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 21:32:30 +01:00
Daniel Golle fb2475e6bd generic: 6.6: fix and simplify blkdevparts= cmdline parsing
Import pending patch to fix the cmdline parsing of the "blkdevparts="
parameter which has been broken somewhen between Linux 6.1 and Linux 6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 21:32:30 +01:00
Felix Fietkau a5a941a997 kernel: add missing check for TCP GRO
Need to check if the skb data buffer is linear up to (and including) the TCP
header.

Fixes: https://github.com/openwrt/openwrt/issues/15359
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-03 18:45:46 +02:00
Felix Fietkau 2f5398588a kernel: backport upstream GRO fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-03 18:45:46 +02:00
Felix Fietkau 3fe239fcf8 mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1
Fixes: ac8bfe316b ("generic: 6.1, 6.6: mt7530: import accepted patches")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-03 18:45:46 +02:00
Zoltan HERPAI af87e5e9c1 sunxi: drop 6.1 support
Now that 6.6 is the default, remove the 6.1 config and the hack that
was required for the arm32 DTS dir change.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-03 14:53:45 +02:00
Zoltan HERPAI e8c7b8a388 sunxi: switch default to 6.6
Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-03 14:53:44 +02:00
Robert Marko ecb3859cc9 ipq40xx: fritzrepeater-1200: fix MDIO and PHY probing
AVM FRITZ!Repeater 1200 does not use QCA807x PHY at all and thus it
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: 1b931c33a2 ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
Fixes: #15355
Link: https://github.com/openwrt/openwrt/pull/15365
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-02 22:09:17 +02:00
Linus Walleij 219018185e bmips: Build U-Boot into the XG6846 target
It appears that the CFE boot loader found in the XG6846
cannot load kernels over a certain size, and the old
relocate hack is not working.

What to do? We can build a small U-Boot into the image,
make CFE boot that, place the kernel immediately after
U-Boot, and use U-Boot to boot the system instead.

The compiled u-boot.bin becomes around ~300KB and with
LZMA compression it will swiftly fit into 128KB, so
we use two 64KB erase blocks right after the CFE to
store an imagetag:ed U-Boot.

Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-01 21:32:23 +02:00
Linus Walleij 212da4dd48 bmips: Add Inteno XG6846 target
This adds a device tree and build options for the XG6846
switch/router to the BMIPS target.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: BMIPS4350 V7.5
 - RAM: 64 MB DDR
 - NOR Flash: 16 MB parallel (CFE and OS)
 - Ethernet LAN: 4x 1Gbit
 - Ethernet WAN: 2x 1Gbit, fiber and TP
 - Buttons: reset
 - LEDs: 7 or 8, power and USB LEDs are GPIO-based, the
   LAN LEDs are controlled by the Marvell DSA Switch.
 - USB: on some versions
 - UART: yes

The device ODM (original device manufacturer) is XAVi
http://www.xavi.com.tw/

It is possible to boot the initramfs version
openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf from
CFE by interrupting the boot on the UART console and downloading
it from a TFTP server e.g.:
CFE> r 192.168.1.2:openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf

Installation to target flash is not possible using CFE because
the image becomes too big for the CFE version found in these
devices. A separate U-Boot two-stage solution exists for
actually booting the device.

This device is called a "managed ethernet switch" by the vendor
and "media converter" or "fiber modem" by some of the ISPs
using it: the main purpose is to convert fiber connections to
ethernet, most devices just act as switches bridging the
fiber SFP to ethernet TP.

The device has a Marvell MV88E6352 DSA switch managed by
a BCM6328 BMIPS SoC.

This port makes it possible to use the XG6846 to grab an IP
number from the fiber connection and use all four LAN
connections out, turning it into a proper router.

This support is based mostly on the observations by the people on
the forum thread "Help with Inteno XG6846" where users NPeca75,
mrhaav, systemcrash and csom helped out to reverse engineer the
device. Then I made it work on the BMIPS target, figured out
the two-level switch hierarchy and settings.

Link: https://forum.openwrt.org/t/help-with-inteno-xg6846/68276/14
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-01 21:30:26 +02:00
Linus Walleij 79a483843c bmips: bcm6328: Compile in uImage splitter
Since we split the Inteno XG6846 "firmware" partition with the
uImage MTD splitter, we need to compile in support for this
splitting method into the BCM6328.

Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-01 21:30:16 +02:00
Elbert Mai 6a05d849e1 bcm27xx: correct cmdline.txt consoles for procd
Commit [ca8c30208d5e][1] updates procd to handle muliple "console=" on the
kernel command line. This affects Raspberry Pi builds because cmdline.txt
specifies a UART console and a virtual console on HDMI, in that order.

When procd finds multiple consoles on the command line, it attempts to
open /dev/console. Linux uses the [last console][2] for /dev/console, so
procd opens the virtual console on Raspberry Pi. This completely disables
the UART console and causes [strange behavior][3] on the virtual console.
Prior to ca8c30208d5e, procd would always open the first console, which is
the UART console.

The simplest fix without reverting ca8c30208d5e is to swap the order of
console options in cmdline.txt. By putting the UART console last, procd
handles the serial console correctly as before.

[1]: https://git.openwrt.org/?p=project/procd.git;a=commit;h=ca8c30208d5e1aaa2c0e3f732c4c9944735e9850
[2]: https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html
[3]: https://forum.openwrt.org/t/rasberry-pi-4-model-b-keyboards-gone-wild/195594

Signed-off-by: Elbert Mai <code@elbertmai.com>
2024-05-01 20:22:42 +02:00
Arınç ÜNAL 3ea6125c50 ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
bus the switch listens on. The PHY muxing feature makes use of this.

This is problematic as the PHY may be attached before the switch is
initialised, in which case, the PHY will fail to be attached.

Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
of switch MDIO bus") on mainline Linux, we can describe the switch PHYs on
the MDIO bus of the switch on the device tree.

When the PHY is described this way, the switch will be initialised first,
then the switch MDIO bus will be registered. Only after these steps, the
PHY will be attached.

Describe the switch PHYs on mt7621.dtsi and remove defining the switch PHY
on the SoC's mdio bus node. When the PHY muxing is in use, the interrupts
for the muxed PHY won't work, therefore delete the "interrupts" property on
the devices where the PHY muxing feature is in use.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2024-05-01 13:50:54 +01:00
Arınç ÜNAL 6221316711 generic: 6.1, 6.6: mt7530: import pending PHY muxing detection patch
net: dsa: mt7530: detect PHY muxing when PHY is defined on switch MDIO bus

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2024-05-01 13:50:54 +01:00
Arınç ÜNAL 7c9cd43ea2 ramips: mt7621-dts: remove incorrect ethphy4 node for WAVLINK WL-WN573HX1
The ethernet-phy@4 node doesn't exist for WAVLINK WL-WN573HX1. Remove it
and the duplicate gmac0 node.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2024-05-01 13:50:54 +01:00
Arınç ÜNAL 007414aa70 ramips: mt7621-dts: do not modify ethernet node for MeiG SLT866
Currently, the pinctrl-0 property on the ethernet node is modified to
exclude the rgmii1 and rgmii2 pin groups to be claimed with rgmii1 and
rgmii2 functions, respectively. Remove the modification of this property as
we need these pin groups to be claimed with the said functions for this
device.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2024-05-01 13:50:54 +01:00
Nick Hainke d06bcbe5bf zynq: 5.15: remove files
Remove files related to the old 5.15 kernel version as they are no
longer required.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-05-01 10:26:41 +02:00
Nick Hainke ea72316426 zynq: set default kernel version to 6.1
Set default kernel version to 6.1, facilitating simpler testing across
a broader user base.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-05-01 10:24:49 +02:00
Shiji Yang 9e86e0b33b kernel: bump 6.1 to 6.1.89
Changelogs:
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.67
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.68
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69

Upstreamed patches:
target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch [1]
target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch [2]
target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch [3]
target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch [4]
target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch [5]
target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch [6]
target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch [7]
target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch [8]
target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch [9]
target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch [10]
target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch [11]

Symbol changes:
MITIGATION_SPECTRE_BHI (new) [12]
SPECTRE_BHI_{ON,OFF} (deprecated) [12]

References:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=8bf7c76a2a207ca2b4cfda0a279192adf27678d7
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=f1c3c61701a0b12f4906152c1626a5de580ea3d2
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=19643bf8c9b5bb5eea5163bf2f6a3eee6fb5b99b
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=e86c9db58eba290e858e2bb80efcde9e3973a5ef
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=013c787d231188a6408e2991150d3c9bf9a2aa0b
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=41a004ffba9b1fd8a5a7128ebd0dfa3ed39c3316
[7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=7d51db455ca03e5270cc585a75a674abd063fa6c
[8] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=082b831488a41257b7ac7ffa1d80a0b60d98394d
[9] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=6f5f72a684a2823f21efbfd20c7e4b528c44a781
[10] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=a4fe8813a7868ba5867e42e60de7a2b8baac30ff
[11] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=c1d87d56af063c87961511ee25f6b07a5676d27d
[12] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=d844df110084ef8bd950a52194865f3f63b561ca
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-04-30 20:18:15 +02:00
Shiji Yang dcdcb9228b generic: MIPS64: fix detect_memory_region() compilation error
1. Enable this feature only for 32-bit CPUs as MIPS64 can not
   access the full range unmapped uncached memory.

2. Backport this fix to the 6.1 old LTS kernel.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-04-30 19:34:02 +02:00
Isaev Ruslan be37ab6e51 qualcommax: ipq807x: uboot-envtools: yuncore ax880
There was no config in the uboot-envtools package, so there is no
generated /etc/fw_env.config for the fw_printenv and fw_setenv utils.
Since uboot-envtools 2024.01, there is a way to make these utils work
without /etc/fw_env.config if the DT has an env partition with the prop.:

compatible = "u-boot,env";

So, this commit adds the prop. above to the appsblenv:0 partition
in the yuncore ax880 DTS file.

Signed-off-by: Isaev Ruslan <legale.legale@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15305
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-30 13:51:15 +02:00
Ryan Salsbury 47da1786e9 ipq40xx: fix I2C pin config on Aruba AP-303H
Turn on SoC pull-ups on I2C pins, since there are no discrete pull-up
resistors on the bus.

Increase clock to 400 kHz. Both chips on the bus support 400 kHz. I
tested the ISL28022 at 4,000 reads/sec and didn't see any garbled output
or bus hangs, even with SoC drive strength reduced to 2 for the test.

Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15334
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-30 12:01:04 +02:00
Zoltan HERPAI 0f5da3977e sifiveu: drop 6.1 support
Now that 6.6 is the default, remove the 6.1 config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-30 11:02:48 +02:00
Zoltan HERPAI 81fafec29d sifiveu: switch default to 6.6
Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-30 11:02:47 +02:00
Tianling Shen 790082098e
mediatek: switch to fitblk for JDCloud RE-CP-03
Use the new fitblk driver.

Tested-By: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-30 03:28:13 +01:00
Christian Marangi 284735246c
qualcommax: ipq60xx: mute warning on bootcount enable compile
ipq60xx bootcount script include /lib/functions that produce warning
when the script is enabled on image compilation. This script is already
included by /etc/rc.common hence it's not needed.

While at it also fix the format of the switch case.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-29 21:54:39 +02:00
Felix Fietkau ed29c31972 mediatek: fix remaining invalid MT7531 switch reg IDs
See commit 8b66f1a06d05afbc1450978f6e20516c8308da25:
"mediatek: correct address of MT753x switch IC"

Fixes: ac8bfe316b ("generic: 6.1, 6.6: mt7530: import accepted patches")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-04-29 12:00:09 +02:00
Mieczyslaw Nalewaj 7d5f7b8b6c generic: 6.6: add kernel missing symbol CONFIG_SPI_BCMBCA_HSSPI
Add missing symbol CONFIG_SPI_BCMBCA_HSSPI causing bcm4908 compilation errors.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15320
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-29 10:20:56 +02:00