Commit Graph

29094 Commits

Author SHA1 Message Date
Lech Perczak
65f599223d ath79: add Ubiquiti Rocket M XW as alternate name to Bullet M XW
Ubiquiti Rocket M XW is a single-band, 2x2:2 external Wi-Fi AP, with optional
GPS receiver, with two external RP-SMA antenna connections, based on
AR9342 SoC. Two band variants exists, for 2.4GHz and 5GHz band, usable
with the same image.

Specs:
- CPU: Atheros AR9342 MIPS SoC at 535MHz
- RAM: 64MB DDR400
- ROM: 8MB SPI-NOR in SO16W package, MX25L6408E
- Wi-Fi Atheros AR9342 built-in 2x2:2 radio
- Ethernet: Atheros AR8035 PHY, limited to 100Mbps speeds due to
  magnetics
- Power: 24V passive PoE input.

Installation: please refer to Ubiquiti Bullet M2HP for documentation.

The device runs with exactly same image as the Bullet, and after fixes
in preceding commit, is fully functional again. Add the alternative name
to the build system.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:41 +01:00
Lech Perczak
e405b96fe7 ath79: ubnt-bullet-m-xw: fix Ethernet PHY traffic
Since commit 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Ubiquiti XW boards equipped with AR8035 PHY suffered from lack of
outbound traffic on the Ethernet port. This was caused by the fact, the
U-boot has set this during boot and it wasn't reset by the PHY driver,
and the corresponding setting in device tree was wrong.

Set the 'phy-mode = "rgmii-txid"' at the &eth0, and drop this property
from PHY node, as it is not parsed there. This causes the device to
connect using Ethernet once again.

Fixes: db4b6535f8 ("ath79: Add support for Ubiquity Bullet M (XW)")
Fixes: 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:41 +01:00
Lech Perczak
9f4708f76c ath79: ubnt-bullet-m-xw: set PHY max-speed to 100Mbps
Onboard AR8035 PHY supports 1000Base-T operation, but onboard
Ethernet magnetics do not. Reduce advertised link speeds to 100Mbps and
lower.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:37 +01:00
Christian Marangi
7ed1cca8d6
ipq807x: add support for loading Aquantia FW from NVMEM for NBG7815
Add support for loading Aquantia FW from NVMEM for Zyxel NBG7815
restoring correct functionality of the 10g port.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-25 22:20:27 +01:00
Christian Marangi
53f338be43
generic: 6.1: add pending patch for ipq4019 MDIO MDC rate fix
Add pending patch for ipq4019 MDIO MDC rate fix. The divisor was never
actually set resulting in the MDC rate running at a very low speed.

The same MDIO is used on ipq807x where Aquantia PHY are commonly used
where MDIO is used to load the PHY firmware. Running at higher speed is
required to make the firmware load faster as it does reduce load time
from 60+ second to 5-6 seconds.

Add as pending as upstream there seems to be some conflicts with quic
and me and it might take lots of time before this is effectively merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-25 21:46:42 +01:00
Linus Walleij
3cf1fe5508 bmips: bcm6368-enetsw: Bump max MTU
The safe max frame size for this ethernet switch is 1532 bytes,
excluding the DSA TAG and extra VLAN header, so the maximum
outgoing frame is 1542 bytes.

The available overhead is needed when using the DSA switch with
a cascaded Marvell DSA switch, which is something that exist in
real products, in this case the Inteno XG6846.

Use defines at the top of the size for max MTU so it is clear how
we think about this, add comments.

We need to adjust the RX buffer size to fit the new max frame size,
which is 1542 when the DSA tag (6 bytes) and VLAN header (4 extra
bytes) is added.

We also drop this default MTU:

  #define ENETSW_TAG_SIZE (6 + VLAN_HLEN)
  ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;

in favor of just:

  ndev->mtu = ETH_DATA_LEN;

I don't know why the default MTU is trying to second guess the
overhead required by DSA and VLAN but the framework will also
try to bump the MTU for e.g. DSA tags, and the VLAN overhead is
not supposed to be included in the MTU, so this is clearly not
right.

Before this patch (on the lan1 DSA port in this case):
dsa_slave_change_mtu: master->max_mtu = 9724, dev->max_mtu = 10218, DSA overhead = 8
dsa_slave_change_mtu: master = extsw, dev = lan1
dsa_slave_change_mtu: master->max_mtu = 1510, dev->max_mtu = 9724, DSA overhead = 6
dsa_slave_change_mtu: master = eth0, dev = extsw
dsa_slave_change_mtu new_master_mtu 1514 > mtu_limit 1510
mdio_mux-0.1:00: nonfatal error -34 setting MTU to 1500 on port 0

My added debug prints before the nonfatal error: the first switch from the top
is the Marvell switch, the second in the bcm6368-enetsw with its 1510 limit.

After this patch the error is gone.

OpenWrt adds a VLAN to each port so we get VLAN tags on all frames. On this
setup we even have 4 more bytes left after the two DSA tags and VLAN so
we can go all the way up to 1532 as MTU.

Testing the new 1532 MTU:

    eth0             ext1              enp7s0
 .--------.     .-----------.  cable  .------.
 | enetsw | <-> | mv88e6152 | <-----> | host |
 `--------´     `-----------´         `------´

On the router we set the max MTU for test:
ifconfig eth0 mtu 1520
ifconfig br-wan mtu 1520
ifconfig ext1 mtu 1506

An MTU of 1506 on ext1 is a logic consequence of the above setup:
this is the max bytes actually transferred. The framing added will be:

- 18 bytes standard ethernet header
- 4 bytes VLAN header
- 6 bytes DSA tag for enetsw
- 8 bytes DSA tag for mv88e6152

Sum: 1506 + 18 + 4 + 6 + 8 = 1542 which is out max frame size.

Test pinging from host:
ping -s 1478 -M do 192.168.1.220
PING 192.168.1.220 (192.168.1.220) 1478(1506) bytes of data.
1486 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=0.696 ms
1486 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=0.615 ms

Test pinging from router:
PING 192.168.1.2 (192.168.1.2): 1478 data bytes
1486 bytes from 192.168.1.2: seq=0 ttl=64 time=0.931 ms
1486 bytes from 192.168.1.2: seq=1 ttl=64 time=0.810 ms

The max IP packet without headers is 1478, the outgoing ICMP packet is
1506 bytes. Then the DSA, VLAN and ethernet overhead is added.

Let us verify the contents of the resulting ethernet frame of 1542 bytes.

Ping packet on router side as viewed with tcpdump:

00:54:51.900869 AF Unknown (1429722180), length 1538:
        0x0000:  3d93 bcae c56b a83d 8874 0300 0004 8100  =....k.=.t......
        0x0010:  0000 dada 0000 c020 0fff 0800 4500 05e2  ............E...
        0x0020:  0000 4000 4001 b0ec c0a8 0102 c0a8 01dc  ..@.@...........
        0x0030:  0800 7628 00c3 0001 f5da 1d65 0000 0000  ..v(.......e....
        0x0040:  ce65 0a00 0000 0000 1011 1213 1415 1617  .e..............
        0x0050:  1819 1a1b 1c1d 1e1f 2021 2223 2425 2627  .........!"#$%&'
        0x0060:  2829 2a2b 2c2d 2e2f 3031 3233 3435 3637  ()*+,-./0123456
(...)

- 3d93 = First four bytes are the last two bytes of the destination
  ethernet address I don't know why the first four are missing,
  but it sure explains why the paket is 1538 bytes and not 1542
  which is the actual max frame size.
- bcae c56b a83b = source ethernet address
- 8874 0300 0004 = Broadcom enetsw DSA tag
- 8100 0000 = VLAN 802.1Q header
- dada 0000 c020 0fff = EDSA tag for the Marvell (outer) switch,
- 0800 is the ethertype (part of the EDSA tag technically)
- Next follows the contents of the ping packet as it appears if
  we dump it on the DSA interface such as tcpdump -i lan1
  etc, there we get the stripped out packet, 1506 bytes.
- At the end 4 bytes of FCS.

This clearly illustrates that the DSA tag is included in the MTU
which we set up in Linux, but the VLAN tag and ethernet headers and
checksum is not.

Tested-by: Paul Donald <newtwen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-24 19:54:33 +01:00
Chuanhong Guo
1b7e62b20b mediatek: drop NMBM layout for Xiaomi WR30U
This reverts commit dcdcfc1511.

This is a firmware for third-party u-boot mod, which should not
be carried here by us.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-01-23 19:24:32 +08:00
Michel Thill
135e107620 realtek: d-link dgs-1210-10p improve sfp support
The current dts file of dgs-1210-10p doesn't support link states
for the sfp ports (they are always up).
This patch tries to give better support for this and was run tested
on dgs-1210-10p.

It was heavily inspired from Paul Fertser, RaylynnKnight
and the author of dgs-1210-10mp-f.dts

https://forum.openwrt.org/t/dlink-dgs-1210-10p-with-glc-t-co-sfp/170928

Signed-off-by: Michel Thill <jmthill@gmail.com>
2024-01-23 10:57:06 +01:00
Nikolay Martynov
c527073b38 ath79: fix mac address on eap2x5-1port devices
Commit e816591e22 ("ath79: qca: convert to nvmem-layout") mistakenly
switched the source of the mac address from the 'info' to 'art'
partition.

This patch updates all devices that share same 'parent' device tree file
and was tested to fix the problem for eap225-outdoor-v3 - device that I
actually own.

Fixes: e816591e22 ("ath79: qca: convert to nvmem-layout")
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-01-23 10:41:20 +01:00
Aleksander Jan Bajkowski
65fb97b450
lantiq: fix boot isues on danube boards
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: #13934
Fixes: #14283
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2024-01-22 15:40:51 +01:00
Robert Marko
ad25cfb6b8
qualcommax: add SMP affinity script
By default Linux will default to most IRQ-s being mapped to core 0 which
during high loads will completely swamp the core 0, so lets add the widely
used script that has been floating around forums for a long time to try and
optimize the IRQ mapping a bit.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-01-22 15:37:11 +01:00
Tomasz Maciej Nowak
fd46680966 ramips: mt76x8: enable small_flash feature
Some of devices in this target have only 8 MiB space and are closing to
borders of usable space. Particularly, TP-Link RE305 v1 already suffers
from this issue[1], where with current partition layout, on release
images, there's not enough space for overlay. So activate small_flash
feature, which will remove some userspace hardening but will gain almost
1 MiB additional flash memory space. Here is small size comparison of
similar device (RE365 v1) with default config + LuCI:

		kernel		rootfs		sysupgrade
current:	2305728		3635044		5964584
small_flash:	1713571		3320132		5047080

1. https://github.com/openwrt/openwrt/issues/14215

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-01-22 12:32:23 +01:00
Christian Marangi
dac2f07c23
ipq806x: replace tsens patch with upstream version
Replace tsens patch with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-21 22:45:40 +01:00
Christian Marangi
cf43e523c2
ipq806x: renumber backport patches starting from 000
Renumber backport patches starting from 000 to tidy things up.
Also fix patch name format for the mmc backport patch.

Refresh patches affected by this renumber change.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-21 22:42:24 +01:00
Christian Marangi
797d46c34d
generic: 6.1: move stmmac backport fix patches to generic
Move stmmac backport fix patches from ipq806x to generic backport
directory as they got merged upstream and they fix wide performance
regression.

This will eventually cause performance increase on any user of the
stmmac driver.

Generic patch automatically refreshed with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-21 22:17:25 +01:00
Álvaro Fernández Rojas
09bc806229 bcm27xx: drop unneeded github workflow and readme patches
These patches can be dropped since we don't care about RPi's Github CI and
READMEs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-21 13:39:33 +01:00
Samuele Longhi
7b5aeef6db ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam M5 (XW), Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW)
Add support for Ubiquiti LiteBeam M5 (XW).
The device was previously supported in ar71xx.
See commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0988235dd277b9a832bbc4b2a100ac6e821f577

Add ALTX_MODEL for Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) in generic-ubnt.mk
This models are identical (firmware-wise) to the already supported Ubiquiti Nanostation Loco M (XW)

Add also Ubiquiti NanoBeam M5 to ALTX_MODEL of Ubiquiti Nanostation Loco M (XW) since it's another clone.

Tested on:
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti PowerBeam M5 (XW)

This also modify target/ath79/dts/ar9342_ubnt_xw.dtsi to use nvmem for calibration data
Checked that the caldata size in the eeprom partition are actually 0x440 on:
- Ubiquiti PowerBeam M5 (XW)
- Ubiquiti Nanostation M5 (XW)
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti AirGrid M5 HP (XW)

Signed-off-by: Samuele Longhi <agave@dracaena.it>
2024-01-20 19:57:57 +01:00
Tianling Shen
c0c3234e17 mediatek: add support for JDCloud RE-CP-03
Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: 128GB eMMC
  RAM: 1GB DDR4
  Ethernet: 4x 1GbE, 1x 2.5GbE (RTL8221B)
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Joylink
  Power: DC 12V 2A

Flash instructions:
1. Download and flash the vendor migration firmware via webUI:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7986-jdcloud_re-cp-03-vendor-migration.bin
   (Default address is 192.168.68.1, user root, no password)
2. After device has booted up, write new GPT table:
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
3. Erase and write new BL2:
   echo 0 > /sys/block/mmcblk0boot0/force_ro
   dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync
4. Erase and write new FIP:
   dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.
9. Additionally, if you want to have eMMC recovery boot feature:
     (Don't worry! You will always have TFTP recovery boot feature.)
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-19 21:43:32 +01:00
Justin Klaassen
4d49ce1bde rockchip: fix boot from non-MMC devices
Booting from non-MMC devices on Rockchip targets without this
change results in a boot failure:

Model: FriendlyElec NanoPi R5S
Net:   eth0: ethernet@fe2a0000
Hit any key to stop autoboot:  0
** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script
** No partition table - mmc 0 **
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Can't set block device
Wrong Image Type for bootm command
ERROR -91: Protocol wrong type for socket: can't get kernel image!
Boot failed (err=1)

This change fixes the default boot script for Rockchip targets to
support booting from non-MMC devices such as NVMe or USB drives.

Some targets with only a boot rom (e.g. NanoPi R5S) may require u-boot
to be installed on the eMMC or a MicroSD card in order to boot from
non-MMC devices.

Fixes: #14420
Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Justin Klaassen <justin@tidylabs.app>
2024-01-19 21:31:39 +01:00
John Audia
cc022082e9 kernel: bump 6.1 to 6.1.73
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.73

Patch automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-19 21:24:44 +01:00
John Audia
ff413129f9 kernel: bump 6.1 to 6.1.72
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.72

Manually rebased:
	generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-19 21:24:44 +01:00
Felix Fietkau
2c5b3bee38 mediatek: fix WED + wifi reset
The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-19 14:48:22 +01:00
Álvaro Fernández Rojas
189838517e bcm27xx: config: update documentation links
The documentation links have changed and are no longer valid.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-18 09:24:52 +01:00
Álvaro Fernández Rojas
f75de11de0 bmips: dts: remove unneeded cferom alias
This is no longer needed after nvmem-layout changes.
Same as 6f328dfe19 for NAND devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-18 08:57:43 +01:00
John Audia
3891355015 kernel: bump 5.15 to 5.15.147
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.147

Manually rebased:
	generic/backport-5.15/005-v5.17-01-Kbuild-use-Wdeclaration-after-statement.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-17 21:56:35 +01:00
Chen Minqiang
038b0cb4f1 kernel: ksmbd: only v2 leases handle the directory
This backport a fix for ksmbd.

Refer: https://github.com/namjaejeon/ksmbd/issues/469

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2024-01-17 21:42:31 +01:00
Daniel Golle
e1a6c7213f mediatek: refresh patches-6.1
Refresh patches for Linux 6.1 which no longer apply cleanly after
adding patches to fix ethernet rx hang issue on MT7981/MT7986.

Fixes: ede34465de ("mediatek: fix ethernet rx hang issue on MT7981/MT7986")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-01-17 01:49:56 +00:00
Shiji Yang
3f8ed239a6
ramips: mt7621: convert Linksys devices EEPROM to NVMEM format
-+-----------------------------+-
 |    Model   |       NIC      |
-+-----------------------------+-
 | EA6350 v4 | MT7603 + MT7613 |
-+-----------------------------+-
 | EA7300 v2 | MT7603 + MT7615 |
-+-----------------------------+-
 |  Others   |    MT7615 *2    |
-+-----------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:50 +01:00
Shiji Yang
a6724ba702
ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | chj series | MT7603 + MT7615 |
-+------------------------------+-
 | bzv series |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:50 +01:00
Shiji Yang
52c3f951f0
ramips: mt7621: convert Wavlink devices EEPROM to NVMEM format
-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | WL-WN531A6 | MT7603 + MT7615 |
-+------------------------------+-
 | WL-WN533A8 |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:50 +01:00
Shiji Yang
3158a09bef
ramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format
-+-------------------------+-
 | Model |       NIC       |
-+-------------------------+-
 | All   | MT7603 + MT7615 |
-+-------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:50 +01:00
Shiji Yang
cd9088c6f9
ramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format
-+-------------------------------------------+-
 |          Model          |       NIC       |
-+-------------------------------------------+-
 | WN-DX1167R/WN-AX1167GR2 |     MT7615D     |
-+-------------------------------------------+-
 | WN-AX2033GR/WN-DX2033GR | MT7603 + MT7615 |
-+-------------------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:49 +01:00
Shiji Yang
afc390a69f
ramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format
-+---------------------------+-
 |  Model  |       NIC       |
-+---------------------------+-
 | AC2100  | MT7603 + MT7615 |
-+---------------------------+-
 | MI4A V2 | MT7603 + MT7613 |
-+---------------------------+-
 | Others  | MT7603 + MT7612 |
-+---------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:49 +01:00
Shiji Yang
0e6179e50e
ramips: mt7621: convert MT7915 EEPROM to NVMEM format
Some MT7915 calibration data consists of two parts. The first part
"eeprom" size is 0xe00. The second part "precal" size is 0x19c10.

Though some devices may not have precal data, it's better to assume
that precal data exists as no users/developers confirm it. On the
other hand, some devices definitely do not contain precal data
because the EEPROM partition size is smaller than the precal NVMEM
cell size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-17 01:14:46 +01:00
Felix Fietkau
ede34465de mediatek: fix ethernet rx hang issue on MT7981/MT7986
Add patches by Lorenzo/Daniel to use QDMA instead of ADMAv2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-16 19:33:08 +01:00
Christian Marangi
acf40c022e
ipq806x: DTS format fixup for Fortinet FAP-421E
Small clanup and fixup for DTS format for Fortinet FAP-421E.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-16 15:55:02 +01:00
Daniel Golle
39ce933842 layerscape: refresh patches-6.1
Patches no longer cleanly apply after commit c2c741ccce ("generic:
6.1: initial backport of at803x PHY driver cleanup"). Refresh patches
to address that.

Fixes: c2c741ccce ("generic: 6.1: initial backport of at803x PHY driver cleanup")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-01-16 13:42:02 +00:00
Álvaro Fernández Rojas
81b4160a6f bmips: drop patches/config for kernel 5.15
Drop patches/config for kernel 5.15 now that they are not used anymore.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 11:04:29 +01:00
Álvaro Fernández Rojas
5cfb416b85 bmips: move to kernel 6.1 by default
Move bmips to kernel 6.1 by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 11:02:01 +01:00
Álvaro Fernández Rojas
6f328dfe19 bmips: dts: remove unneeded cfe alias
This is no longer needed after nvmem-layout changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 10:59:47 +01:00
Sieng-Piaw Liew
6bc26c7d49 bmips: bcm6328: add Innacomm W3400V6
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom
BCM6328 SoC.

SoC: Broadcom BCM6328
CPU: BMIPS4350 V8.0, 320 MHz, 1 core
Flash: SPI-NOR 8MB, MX25L6406E
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Switch: Integrated
Wireless: 802.11b/g, BCM4312
LEDs/Buttons: 9x / 2x

Flash instruction, web UI:
1. Set a static IP on your computer compatible with 192.168.1.1, i.e
192.168.1.100.
2. Connect the ethernet cable from your computer to the router.
3. Make sure the router is powered off.
4. Press the reset button, don't release it yet!
5. While pressing reset, power on the router.
6. Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid green when
ready.
7. Release the reset button.
8. Browse to 192.168.1.1
9. Select .bin file.
10. Upgrade the image.
11. Wait for it to reboot.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[Fix cfe nvmem-layout and pinctrl_leds indentation]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 10:49:27 +01:00
Yangyu Chen
d549809c05 bcm27xx: 6.1: turn on cpu erratum for A72 and disable A53
The original configuration might be copied from bcm2710 which uses
cortex A53 rather than A72 in BCM2711, without errata might be harmful
to system stability and security.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
2024-01-16 09:42:32 +01:00
Hauke Mehrtens
cb7068d5c5 bcm27xx: Remove unneeded kernel patch
This problem was fixed upstream in a different way, see:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.1.y&id=f434703fb893ddffcdbc1eec7646ce321e1190a8

Remove this now obsolete patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-01-16 09:18:09 +01:00
Christian Marangi
d6beb56576
ipq40xx: drop PSGMII PHY patch
Drop PSGMII PHY patch as it has been moved to generic in preparation for
the PHY driver to be also used for ipq807x SoC as the same PHY is also
used there.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-16 01:00:31 +01:00
Christian Marangi
ef94541c07
generic: 6.1: backport FIELD_PREP_CONST patch
Backport FIELD_PREP_CONST patch needed for at803x backport patches to
correctly compile and work.

This MACRO is needed to treat values derived from FIELD_PREP usage as
const to be used by switch case or other needed usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-15 22:47:20 +01:00
Bryan Berg
84a489b7cf
ipq806x: Stabilize LAN 2 MAC address, interface ordering
Part 1 of #13629 split.

* Sets the LAN 2 MAC address in the DTS by deriving it from LAN 1's
address. The factory OS derives this from the `eth1addr` u-boot env
variable, but the nvmem_u-boot-env driver doesn't support parsing MAC
addresses from fields other than `ethaddr`. But for all of the device
samples I've checked (~10) it derives the correct MAC.

* Updates 02_network to ensure that interfaces are assigned to roles
correctly and consistently.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
2024-01-15 22:25:57 +01:00
Christian Marangi
c2c741ccce
generic: 6.1: initial backport of at803x PHY driver cleanup
Initial backport of at803x PHY driver cleanup. This is in preparation
for split and addition of new PHY Family based on at803x needed for
ipq807x and other IPQ Series SoC.

Other affected patch are automatically refreshed with
make target/linux/refresh

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-15 20:01:42 +01:00
Christian Marangi
dfc29816c8
generic: 6.1: renumber MediaTek SGMII PCS patch
Renumber MediaTek SGMII PCS patch to make space for upcoming at803x
backport patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-15 19:53:06 +01:00
Peter Körner
5798e12e4a
rtl838x: debugfs use constants from mach-rtl83xx.h
The register constants were duplicated in net/dsa/rtl83xx/debugfs.c and asm
mach-rtl838x/mach-rtl83xx.h. This commit removes this duplication.

Signed-off-by: Peter Körner <git@mazdermind.de>
2024-01-15 18:09:22 +01:00
Peter Körner
668a049171
rtl838x: fix RTL838X_LED_SW_CTRL definition
According to https://svanheule.net/realtek/maple/register/led_sw_ctrl and also
drivers/net/dsa/rtl83xx/debugfs.c LED_SW_CTRL on the RTL838X should be 0xa00c
not 0x0128. Please note, that is is 0x0128 on the RTL8390/cypress SOC family.

Signed-off-by: Peter Körner <git@mazdermind.de>
2024-01-15 18:09:22 +01:00
Peter Körner
b49a0feb20
rtl931x: reformat broken indentation
the given code-format did not correctly express the condition and made the code
harder to read then necessary.

Signed-off-by: Peter Körner <git@mazdermind.de>
2024-01-15 18:09:19 +01:00
Thomas Schröder
4d7bac1dca
mediatek: GL-MT6000: Change LED colors
Fine tuning PR: openwrt/openwrt#14355 Ref: 5a82bb909b
("mediatek: GL-MT6000: Add missing LED state definitions")

As the only LED is using white in the stock firmware when the device is
running and blue for the bootloader I suggest following changes:
 - Using blue for the BL and preinit+failsafe
 - White for normal operation (like the original FW) and sysupgrade

With this changes it's clear by looking to the LED in which operation
mode the device is and a possible BL stuck can be seen easily.

Tested with [GL-MT6000](https://openwrt.org/toh/gl.inet/gl-mt6000).

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-01-15 17:21:29 +01:00
CheWei Chien
fb45194305
ipq807x: prpl-haze: enable LED driver on device tree
Enable LED driver LP5562 on HAZE device tree and include its kernel
module package on default package for HAZE.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
2024-01-15 16:59:57 +01:00
JinGen Lim
b38d446ecd
ipq806x: add support for Fortinet FAP-421E
Hardware
--------

SoC:    Qualcomm IPQ8064
RAM:    235MB
Flash:  128MB NAND (Micron MT29F1G08ABBDAH4)
        32MB SPI-NOR (Spansion FL256SAIFRO)
WLAN2:  Qualcomm Atheros QCA9980
WLAN5:  Qualcomm Atheros QCA9980
ETH:    LAN1 - Atheros AR8035
        LAN2 - Atheros AR8033
USB:    USB-A, 2.0
LED:    Power (yellow/amber)
        LAN1 (yellow/amber)
        LAN2 (yellow/amber)
        WLAN2G (yellow)
        WLAN5G (yellow)
BTN:    Reset
Serial: RJ45 Port (9600 8n1) Cisco console cable, TTL voltage

MAC Address:    LAN1 (label) at APPSBL partition
                LAN2: label + 1
                WLAN2: label + 8
                WLAN5: label + 16

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

Connect to the RJ45 console (TTL)
Connect LAN1 to host, set host ip as 192.168.1.10
Start a tftp server to serve the initramfs image
Open console connection (9600n8)
Connect power through the DC jack

`Hit any key to stop autoboot:  5`: press any key
`Enter G,Q,or H:`: press `K` to access the hidden option
`Enter password:`: `fap22b1!$` to access a limited u-boot console
`(FAP) #`: `tftpboot your_initramfs_image_name.itb`
`(FAP) #`: `bootm`

Once OpenWrt has booted, install the firmware through sysupgrade

Signed-off-by: JinGen Lim <openwrt@sn.sg>
2024-01-15 16:57:50 +01:00
Paweł Owoc
7173a52f6a
ipq807x: use devinfo MAC for Linksys MX4200
Some devices (MX42CF) have a wrong MAC address configuration. The correct one is located only on the devinfo partition.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2024-01-15 16:52:08 +01:00
Paweł Owoc
45f86a1278
ipq807x: fix whitespace usage
Replace with tab and remove unused whitespaces

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2024-01-15 16:52:08 +01:00
Chukun Pan
622340f6c1 mediatek: TOTOLINK A8000RU: add missing usb3 package
This device has a usb 3.0 port, so add it.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
8632f6184b mediatek: fixes typo for spi properties
Same as commit 3674689, correct 'buswidth' to 'bus-width'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
cfee7fa366 mediatek: YunCore AX835: convert to nvmem-layout
The nvmem-cells is deprecated. Also simplify mac address settings.

Fixes: b4086f4 ("mediatek: add support for YunCore AX835")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
99bc8a9770 mediatek: Cudy WR3000: simplify mac address setup
The mac address of the network port under the switch is
the same as the corresponding gmac by default, so there
is no need to repeat the setting. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
d555177960 mediatek: Cetron CT3003: move mac address setup to dts
It looks like we can put the mac address setting
into the device tree. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
3a3a4d3bd3 mediatek: filogic: refresh kernel config
Refresh kernel config with 'make kernel_oldconfig'.
Also disable the useless rtl8367s gsw driver.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Chukun Pan
7c9010fd3e mediatek: mt7622: refresh kernel config
Refresh kernel config with 'make kernel_oldconfig'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-01-14 23:11:57 +00:00
Jacob Potter
735efbfb7c realtek: rtl838x: add Netgear GS110TUP v1 support
The GS110TUP v1 is a managed switch similar to the GS110TPP v1, but with
port 10 as SFP instead of RJ-45 and a total budget of 240 watts. Ports
1-4 support 60-watt 802.3bt PoE and ports 5-8 support 30-watt 802.3at.

The flash layout of the two switches are identical, and the U-Boot
configurations are the same except for having a different magic number,
so installation can be done via the same U-Boot method.

The following command will be needed to enable the port LEDs as per
https://forum.openwrt.org/t/72510/51 :
    fw_setenv bootcmd "rtk network on; boota"

Additionally, port 9 (1000base-T from a separate QSGMII PHY) does not
function without this. Port 10 was not tested as no SFP module was
available.

Signed-off-by: Jacob Potter <jacob@j4cbo.com>
[rebase on merged flash layout]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-01-13 16:45:05 +01:00
Sander Vanheule
92e0baba42 realtek: rtl838x: join Netgear GSxxx flash layouts
Flash layouts for GS108Tv3, GS110TPPv1, GS308Tv1 and GS310TPv1 are
almost identical, except for the uimage header magic.

Move the flash layout to the common dtsi, and only place the magic value
in the device dts files.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-01-13 16:45:05 +01:00
David Bauer
2fe8ecd880 ath79: read back reset register
Read back the reset register in order to flush the cache. This fixes
spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
DRAM chips.

This issue was fixed in the past, but switching to the reset-driver
specific implementation removed the cache barrier which was previously
implicitly added by reading back the register in question.

Link: https://github.com/freifunk-gluon/gluon/issues/2904
Link: https://github.com/openwrt/openwrt/issues/13043
Link: https://dev.archive.openwrt.org/ticket/17839
Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-11 01:40:50 +01:00
Tomasz Maciej Nowak
0709bd87ba ramips: mt76x8: add support for TP-Link RE365 v1
TP-Link RE365 is a wireless range extender, hardware-wise resembles
RE305 with slight changes regarding buttons and LEDs.

Specification
SoC: MediaTek MT7628AN
RAM: 64 MiB DDR2
Flash: 8 MiB SPI NOR
WiFi: 2.4 GHz 2T2R integrated
      5 GHz 2T2R MediaTek MT7612EN conncted to PCIe lanes
Ethernet: 1x 10/100 Mbps integrated
LEDs: 6x GPIO controlled
Buttons: 4x GPIO controlled
UART: row of 4 holes marked on PCB as J1, starting count from white
      triangle
      1. VCC (3.3V), 2. GND, 3. RX, 4. TX
      baud: 57600, parity: none, flow control: none

Installation
1. Open web management interface.
2. Go to Settings > System Tools > Firmware upgrade.
3. Select "Browse" and select the OpenWrt image with factory.bin suffix.
4. After selecting "Upgrade" firmware writing process will start.
5. Wait till device reboots, power LED should stay solid when it's fully
   booted, then it's ready for configuration through LAN port.

Additional information
With how device manufacturer patrtitioned the flash memory, it's possible
that with default packages set, initial factory.bin image won't be
created. In such case, try to reduce packages amount or use older release
for initial conversion to OpenWrt. Later You can use sysupgrade.bin
image with full set of packages because OpenWrt uses unpartitioned flash
memory space unused by vendor firmware.

Reverting to vendor firmware involves converting firmware using
tplink-safeloader with -z option (can be found in ImageBuilder or SDK)
and forcibly applying converted firmware as sysupgrade.

Known issues
WARNING: after removing casing of the device one is exposed to high
voltage and is in a risk of being electrocuted.

Caution when interfacing whith bootloader, saving its environment either
by issuing "saveenv" or selecting option "1: Load system code to SDRAM
via TFTP." in boot menu, any of those will lead to overwriting part of
kernel. This will lead to need of firmware recovery. The cause of this
issue is bootloader having environment offset on flash at 0x40000,
while kernel starts from 0x20000.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[Wrap long line in DTS]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-01-10 20:56:06 +01:00
Harshal Gohel
e691e2b302 rtl83xx: dsa: reset PVID to 1 instead of 0
Before, PVID is reset for all ports and goes out of bounds. Also, PVID
is later changed by dsa configuration by `ip link` and `bridge vlan`
commands, this does not change the CPU port PVID and CPU PVID stays 0.
It does not allow sending packets from OpenWrt to any connected devices
unless default configuration is changed

This change iterates up to and including cpu_port and sets default PVID
to 1. For lan* ports PVID can be configured with `ip link` and `bridge
vlan` commands

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:20:37 +01:00
Harshal Gohel
da495c477d rtl93xx: dsa: Fix 802.1QinQ for trunk ports
Fix incorrect register value being set for VLAN_PORT_FWD

Before, the 0b1111 would be set for the register which means outgoing
packets would receive an extra tag, corresponding to the PVID of the
port.

On untagged ports, this meant outgoing packets with a single tag.

On tagged ports, this meant outgoing QinQ packets, where the inner tag
was either the PVID of the untagged ingress port, or the already
assigned original (single) tag.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:19:41 +01:00
Harshal Gohel
fe01435b69 rtl83xx: dsa: Clear duplex bit correctly
Without this, luci shows 10M full duplex when there is no link. So
explicitly set half duplex and unknown speed.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:19:21 +01:00
Harshal Gohel
2cfb1ecf10 rtl930x: Rework per port LED configuration
Use led_setX to determine number of LEDs per port. Introduce macros to
calculate register value and shift for particular LED in a particular
set.

Problem with previous implementation is that it uses is10G status to
determine leds per port. However with usxgmii, driver sets 10g, 5g and
2.5g so even though there are only 2 leds per port it selects 4 leds per
port

This implementation relies on configured led_set node.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:18:50 +01:00
Harshal Gohel
a376508216 rtl83xx: dsa: Do nothing when vid 0
Following other dsa drivers, vid 0 is no-op

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:18:46 +01:00
Harshal Gohel
e0c0137eed rtl83xx: dsa: disable VLAN filtering on CPU port
Before driver code
 - enabled egress filter for cpu and non-cpu ports
 - enabled ingress filter for non-cpu ports

This patch explicitly enables ingress and egress filtering for non-cpu
ports and disables ingress and egress filtering for cpu port.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:15:37 +01:00
Harshal Gohel
3e753c45cd rtl838x: Enable jumbo frames by default
Increase DEFAULT_MTU and max-mtu size
Increase truncate length on rx of jumbo frame

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
2024-01-09 21:15:23 +01:00
Felix Fietkau
38bec08e87 mediatek: fix BPI-R3 wifi mac address
Setting/clearing bits on the first byte of the mac address causes collisions
when using multiple SSIDs on both PHYs. Change the allocation to alter the
last byte instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-09 15:16:35 +01:00
Felix Fietkau
50416c18dd mediatek: disable btif for mt7622 devices
It breaks built-in SoC WLAN. Can be re-enabled after we've figured out the cause

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-09 11:06:24 +01:00
Leon M. Busch-George
b4086f44cd mediatek: add support for YunCore AX835
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 16MB NOR
  RAM: 256MB
  Ethernet: 2x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset
  Power: DC 12V 1A, PoE 802.3af 48V

Flash instructions:

Option #1 - SSH

  I was able to SSH into the stock firmware of my device.

  1. Attach the router to the network
  2. Use scp (-O) to copy the sysupgrade image
  3. Connect using SSH and run `sysupgrade -n`

Option #2 - U-Boot

  One way to use the bootloader for flashing is using TFTP:

  1. Connect to the router using an ethernet cable
  2  Spin up a TFTP server serving the sysupgrade file
  3. Open the case and attach a UART
  4. Attach power to the router and interrupt the countdown by pressing
     any key
  5. Select option #2 (Upgrade firmware)
  6. Enter IP address information and image name
  7. Wait patiently

Co-Authored-By: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
Co-Authored-By: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
2024-01-09 00:27:23 +01:00
Hannu Nyman
5a82bb909b mediatek: GL-MT6000: Add missing LED state definitions
Adjust LED names and provide the OpenWrt status indicator aliases
to actually use LEDs by the OpenWrt boot & sysupgrade processes.

* Name both LEDs clearly by the color
* Add the missing OpenWrt LED status indicator aliases and
  remove the now unnecessary default status from blue LED

After this commit, the LEDs are used as:

* bootloader, really early Linux boot: blue LED is on
* preinit/failsafe: white LED blinks rapidly
* late boot: white LED blinks slowly
* boot completed, running normally: blue LED is on

* sysupgrade: white LED blinks

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-01-09 00:03:07 +01:00
Rafał Miłecki
04ed95d1f9 kernel: backport more NVMEM changes queued for v6.8
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-08 08:30:09 +01:00
David Bauer
bf94e0a383 ath79: add support for UniFi UK-Ultra
Hardware
--------
CPU:   Qualcomm Atheros QCA9563
RAM:   128M DDR2
FLASH: 16MB SPI-NOR
WiFi:  Qualcomm Atheros QCA9563 2x2:2 802.11n 2.4GHz
       Qualcomm Atheros QCA9880 2x2:2 802.11ac 5GHz

Antennas
--------
The device features internal antennas as well as external antenna
connectors. By default, the internal antennas are used.

Two GPIOs are exported by name, which can be used to control the
antenna-path mux. Writing a logical 0 enables the external antenna
connectors.

Installation
------------
1. Download the OpenWrt sysupgrade image to the device. You can use scp
   for this task. The default username and password are "ubnt" and the
   device is reachable at 192.168.1.20.

   $ scp -O openwrt-sysupgrade.bin ubnt@192.168.1.20:/tmp/firmware.bin

2. Connect to the device using SSH.

   $ ssh ubnt@192.168.1.20

3. Disable the write-protect

   $ echo "5edfacbf" > /proc/ubnthal/.uf

4. Verify kernel0 and kernel1 match mtd2 and mtd3

   $ cat /proc/mtd

5. Write the sysupgrade image to kernel0 and kernel1

   $ dd if=/tmp/firmware.bin of=/dev/mtdblock2
   $ dd if=/tmp/firmware.bin of=/dev/mtdblock3

6. Write the bootselect flag to boot from kernel0

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

7. Reboot the device

   $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-07 23:06:17 +01:00
David Bauer
c9e58f85f6 ath79: move UniFi AC template into common
This allows us to embrace alphabetical sorting for the UK-Ultra.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-07 23:06:17 +01:00
Mikhail Zhilkin
96580500d2 ramips: add alternative name to Etisalat (Sercomm) S3
This commit adds alternative name to Etisalat (Sercomm) S3 router.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-01-07 01:41:23 +01:00
Mikhail Zhilkin
5457996a9e ramips: sercomm s1500: enable wlan LEDs activity blinking
This commit enables wireless LEDs activity blinking for Sercomm S1500
devices (Beeline Smartbox PRO, WiFire s1500.nbn).

Run-tested: WiFire s1500.nbn

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-01-07 01:41:23 +01:00
Mikhail Zhilkin
8226c8d306 ramips: update leds & buttons dts description
This commit:
1. Removes deprecated "label" property from the dts leds subnnodes;
2. Updates buttons and leds dts description according to kernel docs
   examples.

Scope: devices well known to me.

Run-tested: TP-Link ec330-g5u, WiFire S1500.nbn

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-01-07 01:41:22 +01:00
Lech Perczak
c2ab56a754 ath79: support MikroTik RouterBOARD 911G-5HPacD
The MikroTik RouterBOARD 911G-5HPacD is a stripped-down version of
RB921GS-5HPacD, removing the SFP cage.
This ports the board from ar71xx, and is based on support for
RB921GS-5HPacD.

Disable mdio1 and eth1 nodes in routerboard-92x.dtsi, then re-enable
them in devices using that, so the newly-added device has the port
disabled properly.

See https://mikrotik.com/product/RB911G-5HPacD for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9558 (720 MHz)
 - RAM: 128 MB
 - Storage: 128 MB NAND
 - Wireless: external QCA9892 802.11a/ac 2x2:2
 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in

Working:
 - NAND storage detection
 - Ethernet
 - Wireless
 - 1x user LED (blinks during boot, sysupgrade)
 - Reset button
 - Sysupgrade

Installation:
 - Boot initramfs image via TFTP and then flash sysupgrade image

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:56 +01:00
Lech Perczak
95b6d76c5a ath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAG
LEDs 1 through 5 are used for RSSI monitoring on factory firmware.
Reflect that by creating appropriate rssileds configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:56 +01:00
Lech Perczak
bcc44b1212 ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD
This is a stripped-down version of RB912UAG-(2,5)HPnD, without USB,
miniPCIe and SIM sockets.
This board has been supported in the ar71xx.

Add support based on RB912UAG board, by splitting out the common part to
.dtsi, and creating separate device tree for the stripped-down version.

Links:
* https://mikrotik.com/product/RB911G-2HPnD
* https://mikrotik.com/product/RB911G-5HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb911g-5hpnd

Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 a/b/g/n (depending on band variant)
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
  Ethernet phy LED,
* Button,
* Beeper.

Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
  $ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:54 +01:00
Lech Perczak
d13d513b9f ath79: mikrotik: add RB912UAG-5HPnD as alternative name
Image for RB912UAG-2HPnD supports the 5GHz variant without
modifications. Add it as alternative name, so it can be found easier.
While at that, adjust board display name in device tree, to reflect
that.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:18:18 +01:00
Shiji Yang
c0d7842bf2 ramips: add missing syscon compatible strings for MT7688 and RT3052
MT7688 devices use the "mt7628an.dtsi" as the template. And RT3052
devices use the "rt3050.dtsi" as template. Therefore, we need to add
the corresponding system controller compatible strings to make them
work properly.

Fixes: 1f818b09f8 ("ramips: add proper system clock and reset driver support for legacy SoCs")
Fixes: #14305

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-06 21:23:23 +01:00
Samir Ibradžić
ebed3f65ea qualcommax: Fix Buffalo WXR-5950AX12 wifi MAC
Currently, WiFi interfaces on WXR-5950AX12 / WXR-6000AX12 devices
come up with some MAC addresses inconsistent with vendor and Ethernet
addresses. This adds a hotplug override in order to make it consistent
with what is in u-boot env as well as OAM firmware where 1st radio MAC
is set at Ethernet MAC + 8, and 2nd radio mac at Ethernet MAC + 16.

    fw_printenv | grep addr
    ethaddr=68:e1:dc:xx:xx:d8
    ipaddr=192.168.11.1
    wlan0addr=68:e1:dc:xx:xx:e0
    wlan1addr=68:e1:dc:xx:xx:e8
    wlan2addr=00:00:00:00:00:00

For OEM bootlog and MAC assagnment check
https://openwrt.org/toh/buffalo/wxr-5950ax12#openwrt_uimage_tftp_bootlog

Tested-by: Samir Ibradžić <sibradzic@gmail.com> # Buffalo WXR-6000AX12P
Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
2024-01-06 18:16:48 +01:00
Dim Fish
7dbcc1215a mediatek: filogic: add support for Xiaomi AX3000T
**SoC**: MediaTek MT7981B 2x A53
  **Flash**: ESMT F50L1G41LB 128MB
  **RAM**: NT52B128M16JR-FL 256MB
  **Ethernet**: 4x 10/100/1000 Mbps
  **Switch**: MediaTek MT7531AE
  **WiFi**: MediaTek MT7976C
  **Buttons**: Reset, Mesh
  **Power**: DC 12V 1A

1. Get ssh access. Supported stock firmware **1.0.47**
   ```
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20set%20ssh_en%3D1%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20commit%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Ased%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%22debug%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=********/api/misystem/arn_switch" -d "open=1&model=1&level=%0Apasswd%20-d%20root%0A
   ```

2. Backup stock partitions
   ```
   nanddump -f /tmp/BL2.bin /dev/mtd1
   nanddump -f /tmp/Nvram.bin /dev/mtd2
   nanddump -f /tmp/Bdata.bin /dev/mtd3
   nanddump -f /tmp/Factory.bin /dev/mtd4
   nanddump -f /tmp/FIP.bin /dev/mtd5
   nanddump -f /tmp/ubi.bin /dev/mtd8
   nanddump -f /tmp/KF.bin /dev/mtd12
   ```
   Then transfer them to your computer in a safe place.

3. Get firmware information `cat /proc/cmdline`

4. Copy openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi to **/tmp** and flash
   If **firmware=0**
   ```
   ubiformat /dev/mtd9 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
   nvram set boot_wait=on
   nvram set uart_en=1
   nvram set flag_boot_rootfs=1
   nvram set flag_last_success=1
   nvram set flag_boot_success=1
   nvram set flag_try_sys1_failed=0
   nvram set flag_try_sys2_failed=0
   nvram commit
   reboot
   ```
   If **firmware=1**
   ```
   ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
   nvram set boot_wait=on
   nvram set uart_en=1
   nvram set flag_boot_rootfs=0
   nvram set flag_last_success=0
   nvram set flag_boot_success=1
   nvram set flag_try_sys1_failed=0
   nvram set flag_try_sys2_failed=0
   nvram commit
   reboot
   ```

   Then reboot your router, it should boot to the OpenWrt initramfs system now.

5. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin
   `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin`

1. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   `ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`

   `reboot`

2. Install kmod-mtd-rw
   `opkg update && opkg install kmod-mtd-rw`

   `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`

3. Format ubi and create new ubootenv volume
   ```
   ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
   ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
   ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
   ```

4. *(Optional **-10Mb** free space) Add recovery boot feature.*
   ```
   ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
   ubiupdatevol /dev/ubi0_2 /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   ```

5. Flash Openwrt U-Boot
   ```
   mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-preloader.bin BL2
   mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-bl31-uboot.fip FIP
   ```

6. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb
   `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb`

1. Force flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   `sysupgrade -F -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`

2. Format ubi and Nvram
   ```
   ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
   mtd erase Nvram
   ```

3. Install kmod-mtd-rw
   `opkg update && opkg install kmod-mtd-rw`

   `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`

4. Flash stock images from backup
   ```
   mtd write /tmp/BL2.bin BL2
   mtd write /tmp/FIP.bin FIP
   mtd write /tmp/ubi.bin ubi
   ```
   Then reboot your router, waiting it finished rollback in minutes.

   `ubiformat /dev/mtd7 -y -f /tmp/ubi.bin`
   Then reboot your router, waiting it finished rollback in minutes.

Signed-off-by: Dim Fish <dimfish@gmail.com>
2024-01-06 17:51:11 +01:00
Mohammad Sayful Islam
46a2490e8f ipq807x: add support for Linksys MX4200 V1 and V2
Linksys MX4200 is a 802.11ax Tri-band router/AP.
Specifications:
* CPU: Qualcomm IPQ8174 Quad core Cortex-A53 1.4GHz
* RAM: 512MB of DDR3
* Storage: 512Mb NAND
* Ethernet: 4x1G RJ45 ports (QCA8075)
* WLAN:
	* 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate
	* 5GHz: Qualcomm QCN5054 2x2@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate
	* 5GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate
* LED-s:
	* RGB system led

* Buttons: 1x Soft reset 1x WPS
* Power: 12V DC Jack

Installation instructions:
Open Linksys Web UI - http://192.168.1.1/ca or http://10.65.1.1/ca depending on your setup.
Login with your admin password. The default password can be found on a sticker under the device.
To enter into the support mode, click on the “CA” link and the bottom of the page.
Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button.
Click start. Ignore all the prompts and warnings by click “yes” in all the popups.
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.
Then you would need to write openwrt to the other partition for it to work
- First Check booted partition
fw_printenv -n boot_part

- Then install Openwrt to the other partition if booted in slot 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin alt_kernel

- If in slot 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin kernel

Replace (X) with your model version either 1 or 2

Signed-off-by: Mohammad Sayful Islam <sayf.mohammad01@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-01-06 16:13:23 +01:00
Shiji Yang
f547fc9d57 ramips: reset mt7620 ethernet phy via reset controller
Use reset controller to reset mt7620 ethernet phy instead of directly
writing system control registers. The reset line of "ephy" is 24, so
the DTS resets properties have been updated to get the correct reset
signal.

Tested on HiWiFi HC5861.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-06 14:24:13 +01:00
Shiji Yang
ee82d9606f ramips: reset mt7620 frame engine via reset controller
Use reset controller to reset mt7620 frame engine instead of directly
writing system control registers.

Tested on HiWiFi HC5861.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-01-06 14:24:13 +01:00
John Audia
f45fa6b45a kernel: bump 6.1 to 6.1.71
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.71

Manually rebased:
	gemini/patches-6.1/0002-usb-fotg210-Collect-pieces-of-dual-mode-controller.patch

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-06 12:52:49 +01:00
John Audia
37bb389392 kernel: bump 5.15 to 5.15.146
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.146

Removed upstreamed:
	generic/hack-5.15/940-ksmbd-have-a-dependency-on-cifs-arc4.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.146&id=ac385518598f50dd1b9b41bd05f50ce9795481d5

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-06 10:53:39 +01:00
Mikhail Zhilkin
bcdab30467 mediatek: MERCUSYS MR90X v1: remove deprecated led "label" properties
This commit:
1. Removes deprecated "label" property from the dts leds subnnodes;
2. Updates "01_leds" script.

Link: https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/common.yaml
Link: https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.yaml

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-01-06 00:46:15 +01:00
Michael 'ASAP' Weinrich
f1de1a090f realtek: correct typo in port numbering
Port 10 was incorrectly labelled as nonexistent port 0.

Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
2024-01-05 20:21:45 +01:00
Michael 'ASAP' Weinrich
3acd584361 realtek: fix network connectivity on GS750E
Currently OpenWRT does not know how to properly reset the network switch. This would result in
a switch that seemed to come up properly but was unable to handle any traffic. Presumably something
earlier in the boot chain is configuring a part of the switch that gets wiped out when its reset.

For now comment out the reset GPIO entry in the device tree until the driver better supports
bringing up the switch after a reset.

Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
2024-01-05 20:21:45 +01:00
Rosen Penev
ce4ee14a46
ag71xx: fix wrong register definition issue
Documentation fix from QCA SDK.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:44:29 +01:00
Rosen Penev
2e6ec200df
ath79: move kernel and ubi into subnodes
Avoids dtc warnings regarding two sections having the same numbers.

X: duplicate unit-address (also used in node Y)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
506b4d563e
ath79: gpio to gpios
Fixes deprecated_gpio_property dtc warning

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
991c8cabed
ath79: fix pci_device_reg errors
Found by dtc. Wrong numbers and wrong ordering.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
6dbc300baf
ath79: fix unit_address_format warning
Raised by dtc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
2607e3fe24
ath79: fix avoid_unnecessary_addr_size warnings
Raised to dtc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
b07b8aade7
ath79: rename pcie-controller to pcie
pcie-controller was renamed to pcie since at least kernel 4.14. Match it
here to get rid of dtc warnings.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
14362f22af
ramips: fix dtc warnings
Mostly leading 0 removals and wrong addresses.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:26 +01:00
Rosen Penev
89ff407d68
treewide: use ethtool_puts instead of memcpy
The former is a safer and more readable version.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:12:49 +01:00
Rosen Penev
511c7ff032
kernel: backport ethtool_puts
Will be used for conversions in the following commit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:12:46 +01:00
Felix Fietkau
c1ad78318c kernel: fix bridge proxyarp issue with some broken DHCP clients
There are broken devices in the wild that handle duplicate IP address
detection by sending out ARP requests for the IP that they received from a
DHCP server and refuse the address if they get a reply.
When proxyarp is enabled, they would go into a loop of requesting an address
and then NAKing it again.

Fixes: https://github.com/openwrt/openwrt/issues/14309
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-05 12:00:23 +01:00
John Audia
500931c0ce kernel/ksmbd: fix build for 5.15.145
Include a patch[1] under review to fix the modpost error due to
upstream changes:
...
ERROR: modpost: "cifs_arc4_crypt" [fs/ksmbd/ksmbd.ko] undefined!
ERROR: modpost: "cifs_arc4_setkey" [fs/ksmbd/ksmbd.ko] undefined!
scripts/Makefile.modpost:133: recipe for target 'modules-only.symvers' failed

1. https://lore.kernel.org/all/20231227102605.4766-2-linkinjeon@kernel.org/

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-04 22:25:17 +01:00
Tianling Shen
3645ac8a10 rockchip: configure eth pad driver strength for orangepi r1 plus lts
The default strength is not enough to provide stable connection
under 3.3v LDO voltage.

Fixes: 32d5921b8b ("rockchip: add Orange Pi R1 Plus LTS support")
Fixes: #13117
Fixes: #13759

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-04 22:07:01 +01:00
Petr Štetiar
7ddd3abd27
ipq807x: cax1800: fix blsp1_spi1 status with okay
`ok` status is obsolete and thus `okay` should be used instead:

 spi@78b9000: status:0: 'ok' is not one of ['okay', 'disabled', 'reserved']

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2024-01-03 08:04:53 +00:00
David Bentham
443e3bd1c6 ramips: unielec-u7621-01: Increase SPI frequency to 50MHz
Flash: 16MB SPI NOR flash (Macronix MX25L12805D)

Based on the manufactured datasheet this chip is capable of 50MHz.

We dont enable fast-read as mt7621 are only capable of 44mhz in a read state.

Tested on this unit without any issues.

Signed-off-by: David Bentham <db260179@gmail.com>
2024-01-03 00:21:09 +01:00
Michael Pratt
bc00c78b43 ramips: lzma-loader: use default uart for rt305x
The rt305x series SOC have two UART devices,
and the one at bus address 0x500 is disabled by default.
Some boards do not even have a pinout for the first one,
so use the same one that the kernel uses at 0xc00 instead.

This allows the lzma-loader printing to be visible
alongside the kernel log in the same console.

Tested-by: Lech Perczak <lech.perczak@gmail.com> # zte,mf283plus
Signed-off-by: Michael Pratt <mcpratt@pm.me>
2024-01-02 22:10:34 +01:00
Michael Pratt
2e47913c64 ramips: lzma-loader: use proper register names
Before this was reworked, in the file for mt7621 subtarget
(target/linux/ramips/image/lzma-loader/src/board-mt7621.c)
the "Transmitter shift register empty" bit TEMT was used instead of
the "Transmitter holding register empty" bit THRE,
but after the rework, this value was labeled as the THRE bit instead.

Functionally there is no difference, but this is confusing to read,
as it suggests that the subtargets have different bits for the same
register in UART when in reality they are exactly the same.

One can use either bit, or both, at user's descretion
in order to determine whether the UART TX buffer is ready.
The generic kernel early-printk uses both,
(arch/mips/kernel/early_printk_8250.c)
while the ralink-specific early-printk uses only THRE,
(arch/mips/ralink/early_printk.c).

Define both bits and rewrite macros for readability,
keep the same values, as changing which to use should be tested first.

Ref: c31319b66 ("ramips: lzma-loader: Refactor loader")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
2024-01-02 22:10:34 +01:00
Michael Pratt
4c1e9bd858 ramips: lzma-loader: use virtual memory segments for uart base address
The native bus address for UART was entered for rt305x UART_BASE,
but the bootloaders have memory space remapped with the same
virtual memory map the kernel uses for program addressing at boot time.

In UBoot, the remapped address is often defined as TEXT_BASE.
In the kernel, for rt305x this remapped address is RT305X_SYSC_BASE.
(arch/mips/include/asm/mach-ralink/rt305x.h)

Because the ralink I/O busses begin at a low address of 0x10000000,
they are remapped using KSEG0 or KSEG1, which for all 32-bit MIPS SOCs
(arch/mips/include/asm/addrspace.h)
are offsets of 0x80000000 and 0xa0000000 respectively.
This is consistent with the other UART_BASE macros here
and with MIPS memory map documentation.

Before the recent rework of the lzma-loader for ramips,
the original board-$(PLATFORM).c files also did not
use KSEG1ADDR for UART_BASE despite being defined,
which made this mistake easier to occur.

Fix this by defining KSEG1ADDR again and actually use it.
Copy and paste from the kernel's macros for consistency.

Link: https://training.mips.com/basic_mips/PDF/Memory_Map.pdf
Fixes: c31319b66 ("ramips: lzma-loader: Refactor loader")
Reported-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
2024-01-02 22:10:34 +01:00
Lech Perczak
f393ffcac1 raimps: mtk_eth_soc: drop rst_esw from ESW driver
The ESW core needs to be reset together with FE core, so after the
relevant reset controller lines are moved under FE, drop rst_esw and all
related code, which would not execute anyway, because rst_esw would be
NULL. While at that, ensure that if reset line for EPHY cannot be
claimed, a proper error message is reported.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")

Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 22:00:20 +01:00
Maxim Anisimov
f87b66507e ramips: dts: mt7628an: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 22:00:19 +01:00
Lech Perczak
fc92fecfc7 ramips: dts: rt5350: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.

Fixes: #9284
Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 22:00:09 +01:00
Lech Perczak
c5a399f372 ramips: dts: rt3050: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Maxim Anisimov
8d75b1de0f ramips: dts: rt3352: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Maxim Anisimov
7eb0458c1f ramips: mtk_eth_soc: wait longer after FE core reset to settle
Enabling the FE core too early causes the system to hang during boot
uncondtionally, after the reset is released. Increate it to 1-1.2ms
range.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split previous commit, provide rationale]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Lech Perczak
3f1be8edee ramips: mtk_eth_soc: allow multiple resets
Use devm_reset_control_array_get_exclusive to register multiple
reset lines in FE driver. This is required to reattach ESW reset to FE
driver again, based on device tree bindings.

While at that, remove unused fe_priv.rst_ppe field, and add error
message if getting the reset fails.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")

Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-02 21:56:52 +01:00
Roland Reinl
fdb87a91b4 mediatek: Add support for D-Link EAGLE PRO AI R32
R32 is like the M32 part of the EAGLE PRO AI series from D-Link.

Specification:
 - MT7622BV SoC with 2.4GHz wifi
 - MT7975AN + MT7915AN for 5GHz
 - MT7531BE Switch
 - 512MB RAM
 - 128 MB flash
 - 2 LEDs (Status and Internet, both can be either orange or white)
 - 2 buttons (WPS and Reset)

Compared to M32, the R32 has the following differences:
 - 4 LAN ports instead of 2
 - The recory image starts with DLK6E6015001 instaed of DLK6E6010001
 - Individual LEDs for power and internet
 - MAC address is stored at another offset in the ODM partition

MAC addresses:
 - WAN MAC is stored in partition "Odm" at offset 0x81
 - LAN (as printed on the device) is WAN MAC + 1
 - WLAN MAC (2.4 GHz) is WAN MAC + 2
 - WLAN MAC (5GHz) is WAN MAC + 3

Flashing via Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-recovery.bin

Flashing via uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-initramfs-kernel.bin.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
 - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
 - Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later
 - Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-squashfs-sysupgrade.bin
 - Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
 - Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
 - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
 - Run ./m32-firmware-util R32 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
 - Example for firmware R32A1_FW103B01: ./m32-firmware-util R32 --DecryptFactoryImage R32A1_FW103B01.bin R32A1_FW103B01.decrypted.bin

Revert back to stock using uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides the previously created backup of the Kernel1 partition.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to FLASH will start. After a few seconds the stock firmware should start again

There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP.
It can be used if no backup of the Kernel1 partition is reuqired.

Flahsing via OEM web interface is currently not possible, the OEM images are encrypted. Creating images is only possible manually at the moment.
The support for the M32/R32 already includes support for flashing from the OEM web interface:
 - The device tree contains both partitions (Kernel1 and Kernel2) with conditions to select the correct one based on the kernel command line
 - The U-Boot variable "boot_part" is set accordingly during startup to finish the partition swap after flashing from the OEM web interface
 - OpenWrt sysupgrade flashing always uses the partition where it was initially flashed to (no partition swap)

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-01-02 21:22:46 +01:00
Patryk Kowalczyk
b22539b5fe mediatek: filogic: Asus TUF AX6000 fix inverted LED for 2.5Gb LAN port
Router Asus TUF AX6000 have second MaxLinear GPY211 PHY controller for 2.5Gb LAN port.
The 5'th LAN port have inverted status of the LED.
Based on the commit from main branch 90fbec8 we could set proper status of the LED.

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
2024-01-02 19:14:54 +01:00
John Audia
131403d8aa kernel: bump 6.1 to 6.1.70
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.70

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-02 18:28:58 +01:00
Rosen Penev
4693514ca8 oxnas: do not use pcie-controller
This was deprecated in kernel 4.14

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-01 02:34:48 +01:00
Pascal Ernster
4e8c9cebe5 realtek: Use hex for "soc" identifier in debugfs
The upper 16 bits of the 32 bit value encode the SoC model in BCD
notation (for example 0x83806800 on a Netgear GS108Tv3 with an
RTL8380M), so it makes more sense to output the value in hex notation
than in decimal notation.

Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2023-12-31 14:13:43 +01:00
Xavier Franquet
782eb05008 mediatek: filogic: add support ASUS RT-AX59U
(based on support for ASUS RT-AX59U by liushiyou006)

SOC: MediaTek MT7986
RAM: 512MB DDR4
FLASH: 128MB SPI-NAND (Winbond W25N01GV)
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH: MediaTek MT7531 Switch
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Upgrade from AsusWRT to OpenWRT using UART

    Download the OpenWrt initramfs image.
    Copy the image to a TFTP server reachable at 192.168.1.70/24. Rename the image to rtax59u.bin.

    Connect the PC with TFTP server to the RT-AX59U.
    Set a static ip on the ethernet interface of your PC.
    (ip address: 192.168.1.70, subnet mask:255.255.255.0)
    Conect to the serial console, interrupt the autoboot process by pressing '4' when prompted.

    Download & Boot the OpenWrt initramfs image.

    $ setenv ipaddr 192.168.1.1
    $ setenv serverip 192.168.1.70
    $ tftpboot 0x46000000 rtax59u.bin
    $ bootm 0x46000000

    Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade.

    $ sysupgrade -n <path-to-sysupgrade.bin>

Upgrade from AsusWRT to OpenWRT using WebUI

    Download transit TRX file from https://drive.google.com/drive/folders/1A20QdjK7Udagu31FSszpWAk8-cGlCwsq

    Upgrade firmware from WebUI (192.168.50.1) using downloaded TRX file

    Wait for OpenWRT to boot (192.168.1.1).

    Upgrade system with sysupgrade image using luci or uploading it through scp and executing sysupgrade command

MAC Address for WLAN 5g is not following the same algorithm as in AsusWRT.
We have increased by one the WLAN 5g to avoid collisions with other networks from WLAN 2g
when bit 28 is already set.

              : Stock             : OpenWrt
  WLAN 2g (1) : C8:xx:xx:0D:xx:D4 : C8:xx:xx:0D:xx:D4
  WLAN 2g (2) :                   : CA:xx:xx:0D:xx:D4
  WLAN 2g (3) :                   : CE:xx:xx:0D:xx:D4
  WLAN 5g (1) : CA:xx:xx:1D:xx:D4 : CA:xx:xx:1D:xx:D5
  WLAN 5g (2) :                   : CE:xx:xx:1D:xx:D5
  WLAN 5g (3) :                   : C2:xx:xx:1D:xx:D5

  WLAN 2g (1) : 08:xx:xx:76:xx:BE : 08:xx:xx:76:xx:BE
  WLAN 2g (2) :                   : 0A:xx:xx:76:xx:BE
  WLAN 2g (3) :                   : 0E:xx:xx:76:xx:BE
  WLAN 5g (1) : 0A:xx:xx:76:xx:BE : 0A:xx:xx:76:xx:BF
  WLAN 5g (2) :                   : 0E:xx:xx:76:xx:BF
  WLAN 5g (3) :                   : 02:xx:xx:76:xx:BF

Signed-off-by: Xavier Franquet <xavier@franquet.es>
2023-12-31 00:03:24 +01:00
Rosen Penev
1fa705dbec realtek: fix addresses in DT node names
Mostly wrong address format, one missing address, and one spurious
address suffix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2023-12-30 11:53:47 +01:00
Rafał Miłecki
061a70d33c mediatek: filogic: reorder nodes in mt7988a.dtsi
Use order described as preferred in DTS Coding Style:
1. Sort bus nodes by unit address
2. Use alpha-numerical order for the rest

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-29 12:41:48 +01:00
David Bauer
fab15fa57e mpc85xx: fix reserved-memory node name
Make the node name match the actual memory address.

Fixes: 57d7382cb1 ("mpc85xx: increase available RAM on Extreme Networks WS-AP3825i")

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-28 23:37:51 +01:00
David Bauer
47818fbc01 ramips: fix label-mac for Xiaomi RA75
The label-mac of the repeater is the address used on the 2.4 GHz radio,
not the ethernet MAC.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-28 14:14:34 +01:00
Mikhail Zhilkin
485adc9d3c mediatek: add support for Routerich AX3000
This PR is continuation of work under "mediatek: add support for Routerich
AX3000" #13703 by the agreement with PR #13703 original author (Maximilian
Weinmann <x1@disroot.org>). All reviews from the previous PR were taken
into into account.

Routerich AX3000 is a wireless WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM       : DDR3 256 MiB (ESMT M15T2G16128A)
- Flash     : SPI-NAND 128 MiB (ESMT F50L1G41LB)
- WLAN      : MediaTek MT7976CN dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
- USB       : 1x 2.0
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n8)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
              1x WiFi 2.4 GHz (Blue)
              1x WiFi 5 GHz (Red)
              1x Mesh (Blue)
              3x LAN activity (Blue)
              1x WAN activity (Blue)
              2x WAN no-internet (Red)
- Power     : 12 VDC, 1.5 A

Installation
------------
Flash OpenWrt 'sysupgrade.bin' image using stock firmware web-interface
(without keeping settings).

Return to stock
---------------
Install stock firmware image (without keeping settings) using OpenWrt
sysupgrade method.

Recovery
--------
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 24:0f:5e:xx:xx:b4 | label     |
| LAN     | 24:0f:5e:xx:xx:b5 | label+1   |
| WLAN 2g | 24:0f:5e:xx:xx:b6 | label+2   |
| WLAN 5g | 24:0f:5e:xx:xx:b7 | label+3   |
+---------+-------------------+-----------+
The WLAN 2g MAC was found in 'Factory', 0x4

Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-12-26 17:17:23 +01:00
Ian Oderon
4300bc6688 mediatek: add support for Zbtlink ZBT-Z8103AX
Specifications:
SoC: MediaTek MT7981B
RAM: 256MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 3 LAN (Gigabit)
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND

No. of Antennas: 6
Note: Upon opening the router, only 5 antennas were connected
to the mainboard.

Led Layout:
Power-Mesh-5gwifi-WAN-LAN3-LAN2-LAN1-2gWiFi

Buttons:
Reset-Mesh

Installation:
A. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by the seller),
you can easily upgrade by going to the dashboard (192.168.1.1) and then
navigate to System -> Backup/Flash firmware, then flash the firmware

B. Through TFTP
Standard installation via UART:

1. Connect USB Serial Adapter to the UART, (NOTE: Don't connect the VCC pin).
2. Power on the router. Make sure that you can access your router via UART.
3. Restart the router then repeatedly press ctrl + c to skip default boot.
4. Type > bootmenu
5. Press '2' to select upgrade firmware
6. Press 'Y' on 'Run image after upgrading?'
7. Press '0' and hit 'enter' to select TFTP client (default)
8. Fill the U-Boot's IP address and TFTP server's IP address.
9. Finally, enter the 'firmware' filename.

Signed-off-by: Ian Oderon <ianoderon@gmail.com>
2023-12-26 00:02:19 +01:00
Samir Ibradžić
d737ae99cb qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS
* Revert the switch_lan_bmp and switch_wan_bmp to match the values from
  the original device support DTS
* Add specific malibu_first_phy_addr, as it differs from default for
  this device

Fixes: #14234
Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Samir Ibradžić <sibradzic@gmail.com> # Buffalo WXR-6000AX12P
Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
2023-12-25 19:14:26 +01:00
David Bentham
39e55bdbe2 ramips: correct the PCIe port number for Unielec u7621-01
MT7621 gets a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe
port will cause the PCIe NIC to not work properly. This commit fixes
the wrong port numbers on Unielec u7621-01.

According to the bootlog, MT7612E (5 GHz) is connected to pcie2, and
MT7603E (2 GHz) is connected to pcie1:

[    1.294844] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[    1.308635] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.318277] mt7621-pci 1e140000.pcie: PCIE2 enabled

Also correct the led activity for the MT7603e - not used on the MT7612e

Signed-off-by: David Bentham <db260179@gmail.com>
2023-12-25 19:00:36 +01:00
Shiji Yang
b17cc131c6 ramips: remove systick node for mt7621 SoC dtsi
This node is useless because MT7621 uses the generic mips systick
driver instead of the ralink systick driver.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-12-25 18:57:19 +01:00
Shiji Yang
0e4f49a90d ramips: remove useless resets properties from SoC dtsi
These drivers don't request reset control. And most reset properties
even have incorrect reset source definitions.

1. interrupt controller, ref: arch/mips/ralink/irq.c
2. memory controller, ref: arch/mips/ralink/of.c
3. gpio controller, ref: drivers/gpio/gpio-ralink.c (local patch)
4. systic, ref: arch/mips/ralink/cevt-rt3352.c
5. pwm, ref: drivers/pwm/pwm-mediatek-ramips.c (local patch)

Tested on MT7620 && MT7628.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-12-25 18:57:19 +01:00
Robert Senderek
b42eea0c2f mediatek: enable mt7981-wo-firmware package by default
Add support for wireless offload package in default configuration for
-Cudy WR3000
-Confiabits MT7981
For some reason those ware missing. I confirm this work for my Cudy WR3000

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
2023-12-25 18:49:27 +01:00
Lech Perczak
f024f4b1b0 ath79: generic: disable SPI-NOR write protect unconditionally
Kernel 5.15 introduced a significant change to spi-nor subsystem [1],
which would the SPI-NOR core to no longer unprotect the Flash chips if
their protection bits are non-volatile, which is the case for MX25L6405D
and MX25L12805D, used in Ubiquiti XW and WA lines of devices [2].

However, their bootloader forcibly enables this protection before
continuing to boot, making the kernel not unprotect the flash upon boot,
causing JFFS2 to be unable write to the filesystem. Because sysupgrade
seems to unlock the flash explicitly, the upgrade will work, but the
system will be unable to save configrationm showing the following symptom
in the kernel log:

[   86.168016] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   86.192344] jffs2_build_filesystem(): unlocking the mtd device...
[   86.192443] done.
[   86.200669] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   86.220646] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001e0000
[   86.292388] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001d0000
[   86.324867] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001c0000
[   86.355316] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001b0000
[   86.402855] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001a0000

Disable the write protection unconditionally for ath79/generic subtarget,
so the XW and WA devices can function again. However, this is only a
stopgap solution - it probably should be investigated if there is a way
to selectively unlock the area used by rootfs_data - but given the lock
granularity, this seems unlikely.

With this patch in place, rootfs_data partition on my Nanostation Loco
M5 XW is writable again.

Fixes: #12882
Fixes: #13750
Fixes: 579703f38c ("ath79: switch to 5.15 as default kernel")
Link: http://www.infradead.org/pipermail/linux-mtd/2020-October/082805.html
Link: https://forum.openwrt.org/t/powerbeam-m5-xw-configuration-loss-after-reboot/141925
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-24 12:42:12 +01:00
Tobias Schramm
8b706d9297 realtek: 5.15: rtl93xx: support 100BASE-T and 10BASE-T MAC modes
The MAC embedded in rtl93xx switch SoCs needs different mac mode bits set
to support 10BaseT and 100BaseT link modes. Set them accordingly.

This change has been tested on a ZyXEL XGS1250-12.

Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
2023-12-24 01:36:39 +01:00
Til Kaiser
713dc12960
Revert "x86: add support for Mellanox Spectrum SN2000 Switches"
This reverts commit 3004c20614.

The commit added the needed packages for the new target
to the generic x86_64 image. This results into unwanted
modules and firmware files for other x86 devices.

Additionally, there is the following error message
while booting the image on other x86 devices:
[    8.531720] kmodloader: 1 module could not be probed
[    8.532613] kmodloader: - leds-mlxcpld - 0

For now, the needed packages will have to be selected
manually while configuring the image.

Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
2023-12-23 07:52:05 +00:00
John Audia
4a2ff73177 kernel: bump 6.1 to 6.1.69
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69

Removed upstreamed:
	generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=893597cbabfbc00ee51fd5f73e2028994f49ded6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=1d82735f4bae954d5ba004994b96baec791f874f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=4c2ad8e39c62c5288ca31ebf5c30e34f3bd9d044
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=325556d46bfd13a2fa0d304d0625be86821fd683
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=cac1218b32d7b56832dd36f7baf82f123f305a2a

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-21 11:26:35 +01:00
John Audia
3866cf6e47 kernel: bump 5.15 to 5.15.144
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.144

Removed upstreamed:
	generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=ca75274b17b890e6f6d2951e364360e25f2846e9
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=07ba21627ebbb2c68c357e8d698166c45078d014
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=aa3cc80e8edaa6098b58eb4a613d765496c2dfca
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=4c117984824b4a852a0e0765e5bdea0f1c7d6309
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=404ce6ee69d384096663e3f6987d915090447835

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-20 15:43:16 -05:00
Tianling Shen
b16928aa96 sunxi: mark upstreamed patches as such
Also sort them to start from 001.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
Tianling Shen
193071fb01 sunxi: remove outdated kernel 5.15 files
We're on 6.1 now, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
John Audia
bcb37c84d2 kernel: bump 5.15 to 5.15.143
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.143

Removed upstreamed:
	generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
        mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.143&id=00beca907a7be61da935bb687f9601420fc5f8a8

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:18:55 +01:00
John Audia
1e6c6a36f5 kernel: bump 6.1 to 6.1.68
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.68

Removed upstreamed:
	generic/backport-6.1/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
	mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.68&id=3759e735562a31e44fee825498f05c06e64b25a8

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:12:25 +01:00
Daniel Golle
6d546b3b4c mvebu: fix RTC of IEI-World Puzzle M90x devices
The Puzzle devices come with an I2C-connected Epson RX8130 RTC.
Disable the (dysfunctional) RTC units of the SoC and add driver
kmod-rtc-ds1307 to support the Epson RX8130 instead.

Tested-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-18 22:17:09 +00:00
Rafał Miłecki
493f7f5eee kernel: backport NVMEM changes queued for v6.8
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-18 08:33:04 +01:00
Rafał Miłecki
facaa13a3f kernel: backport upstream brcm_nvram fix for NAND controller
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-18 08:33:04 +01:00
Christian Marangi
85f59c8e27
generic: 6.1: fix list_count_nodes backport patch
Commit 25746a3fa2da ("drm/i915: fix up merge with usb-next branch") was
internally applied to the 5.15 patch but wasn0t applied to the backport
for kernel 6.1. Apply the same treatement also there to fix compilation
warning.

Fixes: a14240d384 ("kernel: backport list_count_nodes()")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-15 16:13:02 +01:00
Furong Xu
314af7018a rockchip: make SMP affinity of RTL8152 on XHCI more robust
XHCI bus numbers are assigned dynamically, it may varies among boards,
match the device irq name with regexp, drop the hardcoded name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-15 18:02:43 +01:00
Pawel Dembicki
5b14a352d9 kirkwood: backport fix Ctera C200 V1 ubi part name to 6.1
From the original Patch:
|In 749237967a downstream dts was replaced with upstream accepted
|patch. But in upstream version last partition was called "rootfs"
|instead "ubi". OpenWrt require "ubi" label for ubi rootfs.
|This patch restore proper label.
|
|Fixes: 749237967a ("kirkwood: Replace dtses with upstream accepted")
|
|Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(patch  updated to include 6.1, dropped label properties)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-15 17:59:35 +01:00
Rafał Miłecki
a14240d384 kernel: backport list_count_nodes()
It's needed by various stuff we backport. That includes NVMEM changes
queued for v6.8.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-15 11:44:38 +01:00
Chukun Pan
c22aa0be3e ipq807x: add support for ZTE MF269
Hardware specifications:
  SoC: Qualcomm IPQ8071A
  RAM: 512MB of DDR3
  Flash1: Eon EN25S64 8MB
  Flash2: MX30UF2G18AC 256MB
  Ethernet: 2x 2.5G RJ45 port
  Phone: 1x RJ11 port (SPI)
  USB: 1x Type-C 2.0 port
  WiFi1: QCN5024 2.4GHz
  WiFi2: QCN5054 5GHz
  Button: Reset, WPS

Flash instructions:
  1. Connect the router via serial port (115200 8N1 1.8V)
  2. Download the initramfs image, rename it to initramfs.bin,
     and host it with the tftp server.
  3. Interrupt U-Boot and run these commands:
     tftpboot initramfs.bin
     bootm
  4. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-14 10:30:19 +08:00
Raylynn Knight
daba89bca3 realtek: Clean up and standardize realtek-poe support
This patch cleans up and standardizes realtek-poe support for realtek
based switches that have supported PoE ports.

The power output of switches supported by realtek-poe package can be
configured in the 02_network ucidef_set_poe() function.  This was missed
when some PoE capable switches supported by realtek-poe were added.

The realtek-poe package at one point replaced a lua-rs232 based script
and some devices were not updated to use the realtek-poe package.
Consistently add realtek-poe package to DEVICE_PACKAGES for switches
with supported PoE.

Signed-off-by: Raylynn Knight <rayknight@me.com>
2023-12-13 20:10:23 +01:00
Dirk Buchwalder
9b598ec8d5
ipq807x: fix edgecore EAP102 lan/wan
We have a report in the forum, that lan/wan is non-functional
on the EAP102 (https://forum.openwrt.org/t/edgecore-eap102/178449)

Fixing that by swapping label and phy-handle of the dp-nodes and
updating the lan/wan bmp.

Note: the original commiter of the device support seems absent for a
long time in the forum and on the OpenWrt github group.

Tested-by: Antonio Della Selva <antonio.dellaselva@uniurb.it>
Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:32:36 +01:00
Chukun Pan
fbcda3616e
ipq807x: add Arcadyan AW1000 support
Hardware specification:
  SoC: Qualcomm IPQ8072A
  Flash: Toshiba NAND 1GiB
  RAM: 1 GiB of DDR3 466 MHz
  Ethernet: 4x 1Gbps + 1x 2.5Gbps
  WiFi1: QCN5024 2.4GHz ax 4x4
  WiFi2: QCN5054 5GHz ax 4x4
  Button: WiFi, WPS, Reset
  Modem: RG500Q-EA
  USB: 1 x USB 3.0
  Power: DC 12V 4A

Flash instructions:
  1. Download the initramfs image, rename it to
     initramfs.bin, and host it with tftp server.
  2. Interrupt U-Boot and run these commands:
     tftpboot initramfs.bin
     bootm
  3. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Chukun Pan
ab6a029573
qualcommax: cleanup whitespace and sort-order
Replace blanks with tabs, also sort base-files alphabetically.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Chukun Pan
9920eebedc
kernel: add support for Toshiba TH58NYG3S0HBAI4
Correct oob size from 128 to 256 for Toshiba TH58NYG3S0HBAI4 flash.
Since it is not ONFI compliant NAND, the model name cannot be read
from anywhere, add a static NAND ID entry to correct this.

However, the NAND ID of this flash is inconsistent with the datasheet.
The actual NAND ID is only 4 ID bytes, the last ID byte is missing.[1]

Maybe this flash is counterfeit, or maybe it's another problem.
Another Toshiba flash had the same problem before. Refer to commit
a83dc6b ("kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx"), put
the patch into qualcommax target to avoid affecting other devices.

The patch is verified on Arcadyan AW1000.

[1] Datasheet available at (the ID table is on page 50):
https://europe.kioxia.com/content/dam/kioxia/newidr/productinfo/datasheet/201910/DST_TH58NYG3S0HBAI4-TDE_EN_31565.pdf

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-12-13 17:29:15 +01:00
Christian Marangi
8fc954aeb7
package: kernel: detach of-mdio dependency from stmmac-core
Detach of-mdio dependency from stmmac-core kmod to fix support for
x86_64 target. This target doesn't use OpenFirmware infrastructure and
stmmac-core for the dwmac-intel driver doesn't depends on it.

Add kmod-of-mdio to any other user of stmmac-core as it's not inherit
from stmmac-core anymore.

Fixes: #14209
Fixes: 4b4c940fbc ("x86: Add kmod-dwmac-intel")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-13 17:07:24 +01:00
Christian Marangi
b09e060e2c
package: kernel: move pcs-xpcs from armsr to generic
Move pcs-xpcs kmod from armsr modules.mk to generic modules package.

Also add additional dependency to x86_64 as stmmac-core it's now used
by x86_64 target and depends on this package.

Fixes: 4b4c940fbc ("x86: Add kmod-dwmac-intel")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-13 17:07:24 +01:00
Furong Xu
1438bc583c rockchip: fix eth1 irq affinity
NanoPi R2S and some other RK3328 boards use RTL8152 as eth1,
which is connected to xhci-hcd:usb1 but not xhci-hcd:usb3

|:~# cat /proc/interrupts
|           CPU0       CPU1       CPU2       CPU3
| 11:      53449     171813     129595      87823     GICv2  30 Level     arch_timer
| 18:          0          0          0          0     GICv2  94 Level     rockchip_usb2phy
| 19:          0          0          0          0     GICv2  32 Level     ff1f0000.dma-controller
| 20:          0          0          0          0     GICv2  33 Level     ff1f0000.dma-controller
| 21:          4          0          0          0     GICv2  89 Level     ttyS2
| 22:          0          0          0          0     GICv2  43 Level     ff350800.iommu
| 23:          0          0          0          0     GICv2 106 Level     ff360480.iommu
| 24:          0    1417932          0          0     GICv2  56 Level     eth0
| 25:        334          0          0    4422194     GICv2  99 Level     xhci-hcd:usb1
| 26:          0          0          0          0     GICv2  48 Level     ehci_hcd:usb3
| 27:          0          0          0          0     GICv2  49 Level     ohci_hcd:usb2
| 28:       3285          0          0          0     GICv2  69 Level     ff160000.i2c
| 29:          0          0          0          0  rockchip_gpio_irq  24 Level     rk805
| 30:          0          0          0          0     rk805   0 Edge      rk805_pwrkey_fall
| 35:          0          0          0          0     rk805   5 Edge      RTC alarm
| 37:          0          0          0          0     rk805   7 Edge      rk805_pwrkey_rise
| 38:          0          0          0          0     GICv2  90 Level     rockchip_thermal
| 39:          0          0          0          0     GICv2  72 Edge      ff1a0000.watchdog
| 40:       2601          0          0          0     GICv2  44 Level     dw-mci
| 41:          0          0          0          0  rockchip_gpio_irq   0 Edge      keys
|IPI0:      1559       1208        893       1131       Rescheduling interrupts
|[...]

Fix 40-net-smp-affinity to match the correct device irq name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-12 19:50:43 +01:00
Eric J. Anderson
807acbce66 ath79: make boot-leds service executable
This service was unfunctional due to not having its executable bit
set.

Fixes #13500.

Signed-off-by: Eric J. Anderson <eric.j.ason256@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
f6d739e0e0 imx: enable CONFIG_CPU_FREQ_THERMAL
Without that, imx_thermal fails to initialize on deferred probe, because
it fails to register cpufreq cooling device.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
51a50c73dd imx: imx7d-pico-pi: add CPU supply nodes to device tree
Attach sw1a as "cpu-supply" to both CPUs in order to cpufreq driver to
prove successfully.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
1b2d625cfb imx: enable CONFIG_REGULATOR_PFUZE100 globally
PFUZE100 series of PMICs are used on boards supported by both
subtargets. Enable this for whole i.MX target.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
8613353b5e kirkwood: add 6.1 kernel as testing
It allow to test 6.1 kernel in Kirkwood.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
9c673d34a0 kirkwood: 6.1: refresh kernel config
Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
c8550de016 kirkwood: kernel: refresh 6.1 patches
Kernel patches copied from 5.15 need to be refreshed.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
bcbb21bb6b kirkwood: copy config 5.15 to 6.1
Config was just copied.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 19:35:03 +01:00
Pawel Dembicki
36aff2a86e kirkwood: copy patches 5.15 to 6.1
Simple copy 5.15 patches.

Upstreamed patch dropped:
001-5.18-Add-Ctera-C-200-V1-board.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(kirkwoor -> kirkwood in subject)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-12-12 19:34:25 +01:00
Pawel Dembicki
9075cfd609 kirkwood: fix Ctera C200 V1 ubi part name
In 749237967a downstream dts was replaced with upstream accepted
patch. But in upstream version last partition was called "rootfs"
instead "ubi". OpenWrt require "ubi" label for ubi rootfs.
This patch restore proper label.

Fixes: 749237967a ("kirkwood: Replace dtses with upstream accepted")

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2023-12-12 18:52:27 +01:00
Christian Svensson
9a323b50e6 octeon: upgrade to 6.1 kernel
The kernel patches apply with only minor changes. The only other notable
change is that octeon-usb has moved from staging and had its config
macro renamed from CONFIG_OCTEON_USB to CONFIG_USB_OCTEON_HCD.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-12-12 18:42:58 +01:00
John Audia
9380d9efa4 kernel: bump 6.1 to 6.1.66
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.66

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-12 14:24:48 +01:00
Rafał Miłecki
1d364cc9ff kernel: backport upstream nvmem fix for "fixed-layout"
It replaces a pretty much identical downstream patch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-12-12 12:46:58 +01:00
Christian Marangi
3eca9ba53f
ipq806x: drop useless uci-defaults compat version script
Drop useless uci-defaults compat version script as it's not needed
anymore and should have been dropped on DSA conversion.

The script was needed for Linksys EA7500 and EA8500 for the kernel space
migration. We now handle compat version setting in board.d scripts.

Having this script with actually the wrong value (2.0) cause upgrade
problem and conflicts with board.d script.

Fixes: 337e36e0ef ("ipq806x: convert each device to DSA implementation")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-12 01:28:22 +01:00
Daniel Golle
957a0921e2 mediatek: bananapi-r3: add overlay for ReSpeaker 2-mic hat
Add DT overlay to allow using the ReSpeaker 2-mic hat connected to
the 26-pin header of the BananaPi BPi-R3.

Supported sample formats: S16_LE, S24_LE, S32_LE
Supported sample rates: 8/12/16/24/32/48/96/192 kHz

          |  BPi-R3  |  ReSpeaker 2-mic
  Signal  |  26-pin  |  40-pin
----------+----------+-------------------
 VCC 5V   |    2     |    2
 I2C SDA  |    3     |    3
 I2C SCL  |    5     |    5
 GND      |    6     |    6
 PCM CLK  |   12     |   12
 PCM FS   |   15     |   35
 PCM DIN  |   26     |   38
 GND      |   25     |   39
 PCM DOUT |   22     |   40

Once connected, install the driver and tell U-Boot to apply the DT
overlay:

opkg kmod-sound-soc-mt7986-wm8960
fw_setenv bootconf_base "config-mt7986a-bananapi-bpi-r3#mt7986a-bananapi-bpi-r3-respeaker-2mics"
reboot

To setup the ReSpeaker for Stereo out on the Headphone plug:

amixer sset 'Right Output Mixer PCM' on
amixer sset 'Left Output Mixer PCM' on
amixer sset 'PCM Playback -6dB' off
amixer sset 'O018 I150_Switch' on
amixer sset 'O019 I151_Switch' on
amixer sset 'O124 I032_Switch' on
amixer sset 'O125 I033_Switch' on
amixer sset 'Headphone' 121
amixer sset 'Playback' 255

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
Daniel Golle
25ddc6e437 kernel: modules: break-out WM8960 codec module
Package codec module for WM8960 in its own package to be used by more
than one target.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
Maso Huang
4b82a20e77 mediatek: backport MT7986 audio driver
Pick commits adding drivers for audio engine found in MT7986 from
Linux 6.6 as well as follow-up fixes from Linux 6.7.

Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-11 18:01:43 +00:00
John Audia
303ff26dc7 kernel: bump 5.15 to 5.15.142
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.142

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-11 17:39:57 +01:00
Daniel Golle
3aa686f8d4 mediatek: add support for Adtran SmartRG Bonanza Peak series
The Bonanza Peak series are a couple of MT7986-powered 2.5 GBit/s
Wi-Fi 6 residential gateway, access point and mesh router products.

All of them come with an eMMC to boot from, are powered via USB-C and
got a USB 3.0 type-A port. All of them got a Dialog (Renesas) DA14531
Bluetooth module connected via UART. If the device was previously
running stock firmware, the BT chip's internal flash has been loaded
with firmware and it can be attached using hciattach when using
OpenWrt.

SOC: MediaTek MT7986A
RAM: 2 GiB DDR4
eMMC: 8 GiB
Bluetooth: BLE5 (DA14531)
Serial: 3.3V level, 115200 8n1 on 4-pin connector

 * SDG-8612 - Dual-band RJ-45 gateway
   2x 2.5G MaxLinear PHY for WAN port
   3x 1GE LAN ports via MT7531 switch

 * SDG-8614 - Dual-band SFP gateway
   1x SFP cage with up to 2.5G speed
   1x 2.5G MaxLinear PHY for LAN port
   3x 1GE LAN ports via MT7531 switch

 * SDG-8622 - Tri-band mesh router
   2x 2.5G MaxLinear PHY
   The MT7986 2G and 5G are used as 2G and 5G high band.
   There’s a MT7915 PCIe card for 5G low band.

 * SDG-8632 - Tri-band mesh router with 6 GHz
   2x 2.5G MaxLinear PHY
   The MT7986 serves the 2G and 6G bands.
   There’s a MT7915 PCIe card for 5G.

Installation via U-Boot serial console:
0. setup TFTP server with IP 192.168.1.10/24, place initramfs image
renamed to openwrt.XXX where XXX is the internal product number:
 SDG-8612: XXX = 412
 SDG-8614: XXX = 414
 SDG-8622: XXX = 422
 SDG-8632: XXX = 432

1. connect to the serial console and power on the device.
   Interrupt the bootloader by pressing 'st'
2. setenv boot_mode openwrt ; saveenv
3. run boot1
   Load firmware via TFTP and write to flash
4. run boot2
   Now OpenWrt initramfs should boot
5. upload sysupgrade.bin via scp to /tmp
6. sysupgrade

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 06:22:51 +00:00
Daniel Golle
a270f61c00 mediatek: import driver for Adtran SmartRG RGBW LED
Import driver for I2C-connected HolTek MCU controlling the RGBW LED
found in Adtran SmartRG devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 06:22:51 +00:00
Daniel Golle
90fbec89be kernel: hack: support inverted LEDs on MaxLinear GPY211 PHY
Add downstream DT property to setup the PHY LEDs of the MaxLinear
GPY211 PHY in such way that the VDD of the LED is driven by the SoC
pin rather than the GND (which is the default).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-10 01:21:27 +00:00
Andrey VOLKOV
0a51f13145
generic: 6.1: fix patch 814 Add Qualcomm secure QFPROM support
The backported patch is broken, since kernel 6.1 has not
'include/linux/firmware' directory yet.

Fix the include to the correct path.

Fixes: #14115
Fixes: 52c365f055 ("kernel: backport v6.6 nvmem changes")
Signed-off-by: Andrey VOLKOV <andrey@volkov.fr>
[ improve commit description and title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-09 19:26:32 +01:00
Rosen Penev
bd413fa78d
kernel: remove mac-address-ascii dts support
Deprecated and replaced treewide with mac-base. Remove to avoid modern
usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 17:02:35 +01:00
Rosen Penev
5717c29e6b
kernel: of: remove mac-address-increment support hack
The MAC address increment has been replaced by the new "mac-base"
NVMEM fixed layout. This old implementation can be removed now.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 17:02:35 +01:00
Pascal Coudurier
b8ec063b38
x86: remove unused 5.15 kernel configs and patches
As we move to 6.1 by default, remove unused 5.15 kernel configs and patches

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
2023-12-09 16:52:07 +01:00
Pascal Coudurier
fdf8041107
x86: move to 6.1 kernel by default
6.1 kernel has been in testing for a few month without issues

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
2023-12-09 16:52:07 +01:00
Rosen Penev
8825f0fcd9
ipq806x: fix leading 0 warnings
dtc warns about leading 0s.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:53 +01:00
Rosen Penev
e1043a746a
ipq806x: avoid duplicate partition nodes
Avoids dtc warnings by moving it in a subnode.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:52 +01:00
Rosen Penev
81116ddb9b
ipq806x: reset-gpio to reset-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-09 16:50:49 +01:00
Christian Marangi
682f8fe7e7
ixp4xx: add Generic subtarget definition
Add Generic subtarget definition. This is needed to keep consistent name
on every other target/subtarget and also to permit correct work of CI
workflows that expect a target/subtarget pattern.

Fixes: c16b2293fe ("ixp4xx: Resurrect IXP4xx support using device tree")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-12-09 14:45:50 +01:00
Daniel Golle
9291f6025f ramips: refresh patches
Refresh ramips patches which got out of sync due to backported changes
of the MediaTek Ethernet driver.

Fixes: 6407ef8d2b ("kernel: backport upstream mediatek WED changes")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-08 23:34:42 +00:00
Felix Fietkau
9ab259ab34 kernel: remove already backported patch, fix build
Fixes: 6407ef8d2b ("kernel: backport upstream mediatek WED changes")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-12-08 15:52:53 +01:00
Felix Fietkau
6407ef8d2b kernel: backport upstream mediatek WED changes
Reorder and update existing patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-12-08 14:29:54 +01:00
Kamil Jońca
ffa40fcc7f ramips: add TP-LINK TL-WR902AC v4
Seems to be very similar to: https://openwrt.org/toh/tp-link/tl-wr902ac_v3
1 x usb
1 x eth
Powered by mini usb port.

Installation:

Can use TFTP method to install:
1. establish TFTP server at 192.168.0.66
2. provide tp_recover.bin file to the TFTP server
3. turn on router with reset button pressed
4. wait for led blinking, then release reset

Specification based on dmesg from already flashed device:

SoC Type: MediaTek MT7628AN ver:1 eco:2
CPU0 revision is: 00019655 (MIPS 24KEc)
Memory: 56028K/65536K available
CPU Clock: 580MHz
WiFi: MT7613BE

MAC addresses are all the same, except wifi5g which last part is decrement by one, ie.:

eth0		40:ed:00:cf:b9:9b
br-lan		40:ed:00:cf:b9:9b
phy0-ap0	40:ed:00:cf:b9:9b
phy1-ap0	40:ed:00:cf:b9:9a

Signed-off-by: Kamil Jońca <kjonca@onet.pl>
2023-12-06 22:59:22 +01:00