Commit Graph

28439 Commits

Author SHA1 Message Date
Kyle Hendry
515ffb40cb bmips: dts: fix pinctrl error
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
The kernel logs the error "bcm6368_nand 10000200.nand: there is not valid
maps for state default" on boot and all nand pins show as UNCLAIMED in
sysfs pinmux-pins.

bcm6362.dtsi, bcm6368.dtsi and bcm63268.dtsi use the undocumented property
group which the driver doesn't understand. This has been documented upstream
in commit caf963efd4b0b9ff42ca12e52b8efe277264d35b.

Replacing group with pins allows the nand pins to be properly configured.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[add bcm636/bcm6368 and fix commit title]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit d1e9c50d06)
2024-12-24 11:26:42 +01:00
Chris Jones
b551214c9d ipq40xx: make GL.iNet A1300 switch functional
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Set the physical switch to KEY_RFKILL, since its previous value
(KEY_SETUP) is unsupported. This should also make the KEY_RESET button
functional, by allowing the gpio-button-hotplug kmod to load.

Signed-off-by: Chris Jones <cmsj@tenshu.net>
Link: https://github.com/openwrt/openwrt/pull/16564
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
(cherry picked from commit 83a04cd2b8)
Link: https://github.com/openwrt/openwrt/pull/17228
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-11 17:03:26 +01:00
Shiji Yang
d557e23932 ath79: lzma-loader: fix syntax error
C compiler can't parse '#else if'.

Fixes: f84a9f7dc0 ("ath79: add support for Huawei AP6010DN")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16989
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 98f26346cb)
2024-11-23 23:23:23 +01:00
Marco von Rosenberg
769253775c ath79: add support for Huawei AP6010DN
Huawei AP6010DN is a dual-band, dual-radio 802.11a/b/g/n 2x2 MIMO
enterprise access point with one Gigabit Ethernet port and PoE
support.

Hardware highlights:
- CPU: AR9344 SoC at 480MHz
- RAM: 128MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: AR9344-internal radio
- Wi-Fi 5GHz: AR9580 PCIe WLAN SoC
- Ethernet: 10/100/1000 Mbps Ethernet through Atheros AR8035 PHY
- PoE: yes
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: CAT706SVI (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - radio0 (Wi-Fi 2.4GHz) = label MAC + 1
    - radio1 (Wi-Fi 5GHz) = label MAC + 2

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script "run ramboot".
   Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile openwrt-ath79-generic-huawei_ap6010dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap6010dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP6X10XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap6010dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues:
- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.
- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the AHB_CLK/2 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
(cherry picked from commit f84a9f7dc0)
Link: https://github.com/openwrt/openwrt/pull/16978
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:22:27 +01:00
Hauke Mehrtens
cafbecf853 kernel: bump 5.15 to 5.15.173
Removed because they are upstream:
   generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=5ea4b73e268bf9e1d26271943f2f7c4517253395

   generic/backport-5.15/431-v6.3-udf-Avoid-directory-type-conversion-failure-due-to-E.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=8b1d55e43cee631e142d46ee94c91ccd894341e9

Link: https://github.com/openwrt/openwrt/pull/16999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:20:16 +01:00
Hauke Mehrtens
265d9112b3 kernel: bump 5.15 to 5.15.172
No manual changes needed.

Link: https://github.com/openwrt/openwrt/pull/16999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:20:16 +01:00
Hauke Mehrtens
cd9998ef1b kernel: bump 5.15 to 5.15.171
No manual changes needed.

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
25f85d4293 kernel: bump 5.15 to 5.15.170
Removed because they are upstream:
   generic/backport-5.15/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=90baa455aa7e099152898cfa5eb3928d6152da12

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
e3b120f682 kernel: bump 5.15 to 5.15.169
Added patch:
   generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch
   This patch fixes the following compile warning:
```
  CC [M]  fs/udf/namei.o
fs/udf/namei.c: In function 'udf_rename':
fs/udf/namei.c:878:1: error: the frame size of 1144 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  878 | }
      | ^
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:289: fs/udf/namei.o] Error 1
```

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
b389c3d66f kernel: bump 5.15 to 5.15.168
Manually adapted:
   bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch
     I replaced it with the version from main branch which applies more easily
   bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
   bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch
   bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
   bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
   bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
   generic/hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch

Added patch:
   generic/backport-5.15/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch
      This fixes a bug intoduced in this version.

Adapt kernel configuration for newly added option
CONFIG_PROC_MEM_ALWAYS_FORCE.

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Rafal Boni
cb8b632f1a ipq806x: Fix default MAC addresses on MR42 by moving to nvmem-layout
Partial, single-target update extracted from https://github.com/openwrt/openwrt/commit/d264d3a6

The previous `mac-address-increment` is deprecated, and in particular on
this target means that the kernel is unable to read the MAC address,
causing the system to boot with a new random MAC address each time.

Fixes: https://github.com/openwrt/openwrt/issues/13992

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rafal.boni@gmail.com: single-target-specific backport from larger change]
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16858
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-04 17:27:52 +01:00
Leon M. Busch-George
0d428857d5 mediatek: YunCore AX835: fix voltage regulator
Specifying GPIO_ACTIVE_HIGH on the GPIO for the voltage regulator doesn't
suffice. The regulator itself requires enable-active-high to be set.

Fixes: #16292
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/16839
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-04 10:36:50 +01:00
Lech Perczak
4f0e281775 ath79: Really fix 5GHz on QCA9886 variant of ZTE MF286
Fix in commit 25eead21c5 ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
was incomplete. A user of such variant popped up, and in the boot log
after installation, we discovered that QCA9886 expects different
pre-calibration data size, than the older QCA9880 variant:

ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 59e741e7
ath10k_pci 0000:00:00.0: invalid calibration data length in nvmem-cell 'pre-calibration': 2116 != 12064
ath10k_pci 0000:00:00.0: Loading BDF type 0
ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0056,subsystem-vendor=0000,subsystem-device=0000 from ath10k/QCA9888/hw2.0/board-2.bin
ath10k_pci 0000:00:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9888/hw2.0
ath10k_pci 0000:00:00.0: failed to fetch board file: -12
ath10k_pci 0000:00:00.0: could not probe fw (-12)

Explicitly define a pre-calibration nvmem-cell for this variant, and use
it instead of the calibration one, which is shorter.

Fixes: 25eead21c5 ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit fc236f3b3c)
Link: https://github.com/openwrt/openwrt/pull/16810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-31 19:02:30 +01:00
Rafal Boni
607091d4fe ipq806x: Fix default MAC addresses on MR52 by moving to nvmem-layout
Partial, single-target update extracted from https://github.com/openwrt/openwrt/commit/d264d3a6

The previous `mac-address-increment` is deprecated, and in particular on
this target means that the kernel is unable to read the MAC address,
causing the system to boot with a new random MAC address each time.

Fixes: https://github.com/openwrt/openwrt/issues/15238

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rafal.boni@gmail.com: single-target-specific backport from larger change]
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16774
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:59:34 +01:00
Rafal Boni
92c2a4cf93 ipq806x: Revert "ipq806x: swap lan leds for Meraki MR52"
This reverts commit ec8f647d16, as with the
current kernel version, the change actually causes the same bug it once
may have fixed -- that is, the leds are now again reversed.

I suspect this was due to a switch to a newer kernel version between when
the patch was submitted and now reversing the order of the interfaces, so
that eth0 / the LAN interface is also the interface used for PoE, and eth1
/ the WAN interface is the non-PoE interface.

Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16779
(cherry picked from commit b5e1544f4d)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16822
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:49:16 +01:00
Rosen Penev
9bc6a18ede ramips: m4r v4: fix typo
It should be debounce-interval, as with the others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16802
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:45:52 +01:00
Roger Pueyo Centelles
c46b689149 ath79: add support for MikroTik RouterBOARD 750 r2 (hEX lite)
This patch adds support for the MikroTik RouterBOARD 750 r2, marketed as
hEX lite, a small indoor router with 5x 10/100 Mbps Ethernet ports, one
with PoE in. The device was already supported by the ar71xx target.

Specifications:
 - SoC: Qualcomm Atheros QCA9533
 - Flash: 16 MB SPI NOR
 - RAM: 64 MB
 - Ethernet: 4x 10/100 Mbps LAN, 1x 10/100 Mbps WAN (PoE in)
 - LEDs: 5x Ethernet port activity (green), 1x user (green)
 - Buttons: 1x reset

 See https://mikrotik.com/product/RB750r2 for more details.

Not working:
 - Serial port (already not working in ar71xx)

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Only the
 "Internet" port will ask for an initramfs image. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

(cherry picked from commit 8486c677b8)
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Link: https://github.com/openwrt/openwrt/pull/13477
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-29 21:36:11 +01:00
Robert Marko
e0e022e612 generic: 5.15: add Winbond W25N01KV support
It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV
SPI-NAND which is not supported in OpenWrt 23.05 but only in main.

So, backport the support for Winbond W25N01KV from Linux 6.12 to 23.05
as well.

Link: https://github.com/openwrt/openwrt/pull/16669
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-20 18:29:15 +02:00
Rosen Penev
0f30b8d2d2 mpc85xx: p1010: fix NAND devices
Upstream commit 9ba0cae3cac07c21c583f9ff194f74043f90d29c made FSL_IFC
visible and selectable, which means that in order for MTD_NAND_FSL_IFC
to work, it needs these two extra CONFIG options.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16717
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-17 11:00:40 +02:00
Shiji Yang
1efcdb2446 ramips: use OKLI loader for TP-Link RE200 v1 and RE210 v1
Using OKLI image to fix the booting stuck issue.

Tested with u-boot extracted from TP-Link stock images
"RE200(EU)_V1_171206.zip" and "RE210(US_CA)_V1_171205.zip".

Fixes: https://github.com/openwrt/openwrt/issues/16296
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b62e6f5beb)
2024-10-08 22:20:23 +02:00
Shiji Yang
fb44dd7314 ramips: introduce TP-Link v1 header OKLI image recipe
It can be used to workaround the booting stuck issue caused by the
u-boot LZMA decompression error.

The new kernel image structure:
+------+------------------+------------------+---------------+-----------------+
| name | tplink-v1 header | OKLI lzma-loader | uImage header | lzma kernel+dtb |
+------+------------------+------------------+---------------+-----------------+
| size |      0x200       |       0xe00      |     0x40      |     dynamic     |
+------+------------------+------------------+---------------+-----------------+

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 08eecec355)
2024-10-08 22:20:20 +02:00
Mikhail Zhilkin
1ec1aa9cc7 ramips: add support for netis N6
This commit adds support for netis N6 WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (ESMT PSU1GA30DT)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x5 (1x WAN, 4x LAN)
- USB       : 1x 3.0
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x System (green)
              1x WAN (green)
              1x WiFi 2.4 GHz (green), controlled by phy
              1x WiFi 5 GHz (green), controlled by phy
              1x WPS (green)
              1x USB (green)
              5x ethernet leds (green), controlled by switch
- Power     : 12 VDC, 1.5 A

Installation
------------
1. Update the router using stock firmware web interface and OpenWrt
   factory.bin image.

Recovery and return to stock
----------------------------
1. Assign your PC a static IP 192.168.1.2 and connect to the router using
   the ethernet cable;
2. Power off the router;
3. Press Reset button, power on the router and wait until ethernet led
   start blinking;
4. Release the button;
5. Open http://192.168.1.1/ (N6 System Recovery Mode) in your browser;
6. Upload OpenWrt factory.bin (or stock firmware *.bin) image and proceed
   with upgrade.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | dc:xx:xx:49:xx:04 |
| WAN     | dc:xx:xx:49:xx:05 |
| WLAN 2g | dc:xx:xx:19:xx:06 |
| WLAN 5g | dc:xx:xx:79:xx:06 |
+---------+-------------------+
The WLAN MAC prototype was found in 'Factory', 0x4
The LAN MAC was found in 'Factory', 0x7ef20
The WAN MAC was found in 'Factory', 0x7ef26

Known issue
-----------
2.4 GHz WLAN doesn't start with mt76 driver.

Probable reason:
   Original Netis N6 EEPROM contains wrong MT_EE_WIFI_CONF value (0xd2).
   Other routers with the same WLAN hardware (e.g., Routerich AX1800)
   have MT_EE_WIFI_CONF = 0x92.

Workaround (already included in this commit):
   Extract EEPROM to a file at the first time boot and change
   MT_EE_WIFI_CONF (offset 0x190) value from 0xd2 to 0x92. See
   /etc/hotplug.d/firmware/11-mt76-caldata for details.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
(cherry picked from commit f368e2d5ec)
[ Fix merging onflicts in mt7621.mk, 10_fix_wifi_mac, platform.sh ]
[ Change &ethphy4 -> &mdio in dts file ]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16436
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-08 22:16:44 +02:00
Lech Perczak
4d89918a98 ipq40xx: fix MAC address on Meraki MR33 and MR74 after nvmem-layout
...conversion.
Commit 20736013e9 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
has caused dthe device to no longer correctly read MAC address from its
onboard 24c64 EEPROM, because "at24" driver doesn't support legacy
nvmem-cell bindings [1] - and there was an explicit config option added
to mandate that behaviour in the following patch:

820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch

But some of the devices, MR33 and MR74 included, weren't converted with
that as well.
Convert the definition to use proper fixed-layout binding to fix it.

The offending change was introduced between v23.05.0 and v23.05.1, and
found by bisection:
git bisect start
# status: waiting for both good and bad commits
# good: [bd4f415efa] OpenWrt v23.05.0: adjust config defaults
git bisect good bd4f415efa
# status: waiting for bad commit, 1 good commit known
# bad: [a58a86693f] OpenWrt v23.05.1: adjust config defaults
git bisect bad a58a86693f
# good: [3d0a78add2] qualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is set
git bisect good 3d0a78add2
# bad: [21e5db97c4] build: add CycloneDX SBOM JSON support
git bisect bad 21e5db97c4
# good: [89184b15cf] mediatek: add build for MT7981 RFB
git bisect good 89184b15cf
# bad: [41f27bbb6d] bcm53xx: add the latest fix version of brcm_nvram
git bisect bad 41f27bbb6d
# good: [b649b0bf71] kernel: nvmem: fix "fixed-layout" & support "mac-base"
git bisect good b649b0bf71
# bad: [20736013e9] kernel: backport nvmem v6.6 fixes and v6.7 changes
git bisect bad 20736013e9
# good: [066971615f] kernel: backport v6.6 nvmem changes
git bisect good 066971615f
# first bad commit: [20736013e9] kernel: backport nvmem v6.6 fixes and v6.7 changes

Link: [1] https://github.com/openwrt/openwrt/issues/15393#issuecomment-2212300849
Fixes: 20736013e9 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
Fixes: https://github.com/openwrt/openwrt/issues/15393
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit ccbffad1ad0ce444bc2497098a1d3d3a086a5f44)
[replace mac-address-increment with #nvmem-cell-cells]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16624
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-07 10:36:12 +02:00
Jakob Haufe
fa0a7e00e8 octeon: ubnt-edgerouter: fix sysupgrade config backup/restore
er is missing from platform_copy_config() and octeon_move_config(), so
config is lost on every sysupgrade.

(cherry-picked from commit 77037b09f3)
Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Link: https://github.com/openwrt/openwrt/pull/16518
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-28 18:33:21 +02:00
David Bauer
5332351821 ipq40xx: fix AP-303H PSE GPIO pin
The GPIO chip is at a different start index compared to OpenWrt master.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-09-27 19:10:40 +02:00
Fabian Bläse
87fbb5085d ipq40xx: re-add label MAC address for FritzBox 4040
The MAC address of the GMAC is contained inside the CWMP-Account
number on the label.

The label MAC address alias was defined previously, but it has been
removed with the switch to IPQESS / DSA.

Restore the label MAC address alias.

Fixes: 27b441cbaf ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes")
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b22d382ae4)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
Link: https://github.com/openwrt/openwrt/pull/16459
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-23 10:25:05 +02:00
Markus Stockhausen
ace013101c realtek: 5.15: backport VLAN fix
With commit a22d359fa5 VLAN handling was fixed for kernel 6.6.
This restored network connectivity of the devices. For easy testing
backport the fix for 5.15 too.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 35e13244aa)
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
2024-09-22 16:26:25 +02:00
Ryan Salsbury
8e75eed617 ath79: fix I2C pins on GL-AR750
Change I2C pin flags to GPIO_ACTIVE_HIGH and change SDA to GPIO1.

On my late production GL-AR750 (purchased 2024):
SCL = GPIO16
SDA = GPIO1

Bug report:
I2C bus doesn't work in GL-AR750
https://github.com/openwrt/openwrt/issues/16319

Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16406
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 2e626ae2d2)
Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 16:07:46 +02:00
Hauke Mehrtens
4d4d260f5b ramips: tp-link er605-v2: Remove sysupgrade-tar image
The sysupgrade-tar image build is not defined for this target, do not
add a build instruction for it. The build system will use the definition
from the dna_valokuitu-plus-ex400 board and the build will fail.

This fixes the build of the ramips target.

Fixes: 665c2154ef ("ramips: add basic support for tp-link er605-v2")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 746e894877)
2024-09-22 15:33:11 +02:00
David Bauer
dd4b05ee8a ipq40xx: add PoE passthrough GPIO
Add the GPIO pin of the PoE passthrough switch on the Aruba AP-303H.
Power is activated when the pin is low. It enables a PSE chip, so power
is only supplied to downstream devices when they are 802.3af/at
compliant devices.

Ensure you use a sufficient power supply when chaining a consuming
device after the AP.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit b40cc46cc8)
2024-09-20 19:52:46 +02:00
Andreas Böhler
4d7ad37891 ramips: mt7621: use lzma-loader for Sercomm NA502s
This fixes a well-known "LZMA ERROR 1" error on Sercomm NA502s, reported
on the OpneWrt forum [0].

[0] https://forum.openwrt.org/t/206640

Signed-off-by: Andreas Böhler <dev@aboehler.at>
(cherry picked from commit 6d89aa2987)
Link: https://github.com/openwrt/openwrt/pull/16412
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-18 23:04:37 +02:00
Yan Cangang
912acb6c09 filogic: add missing 2.5G PHY LEDs configuration for Zyxel EX5700
configure 2.5G PHY LEDs to:

2500/1000: green with blink on TX/RX
100/10: green+yellow with blink on TX/RX

which is similar to other 1G PHY LEDs, which are:

1000: green with blink on TX/RX
100/10: green+yellow with blink on TX/RX

Fixes: 6cc14bf66a ("filogic: support Telenor branded ZyXEL EX5700")

Signed-off-by: Yan Cangang <nalanzeyu@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16082
(cherry picked from commit 3de653a0af)
Link: https://github.com/openwrt/openwrt/pull/16390
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-15 02:03:25 +02:00
Hauke Mehrtens
8e5e62416f kernel: bump 5.15 to 5.15.167
Manually adapted:
   generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
   ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch

Link: https://github.com/openwrt/openwrt/pull/16366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-14 16:51:13 +02:00
Hauke Mehrtens
fd6e077ddf kernel: bump 5.15 to 5.15.166
Manually adapted:
   bcm27xx/patches-5.15/950-0030-Revert-Bluetooth-Always-request-for-user-confirmatio.patch

Link: https://github.com/openwrt/openwrt/pull/16366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-14 16:51:13 +02:00
Hauke Mehrtens
bad01d4806 kernel: bump 5.15 to 5.15.165
Removed because they are upstream:
   generic/pending-5.15/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=bff165a3993683daddf3f00563960e7675966f91

   ipq807x/patches-5.15/0004-v5.16-arm64-dts-qcom-msm8996-Move-clock-cells-to-QMP-PHY-c.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=32f0e52f16d45d743b473659329f93d4a27c68bf

Manually adapted:
   bcm27xx/patches-5.15/950-0040-spi-spidev-Completely-disable-the-spidev-warning.patch
   bcm27xx/patches-5.15/950-0578-spi-spidev-Restore-loading-from-Device-Tree.patch
   generic/pending-5.15/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch

Adapt kernel configuration for newly added option
CONFIG_ARM64_ERRATUM_3194386.

The leddev_list_lock attribute changed from rwlock_t to spinlock_t in:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=590304b798a3b89e716b6b564f8ad14bc9373d93

Link: https://github.com/openwrt/openwrt/pull/16366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-14 16:51:13 +02:00
Rafał Miłecki
ee3efefc5e treewide: fixup models names for UniFi U6 series
Ubiquiti has a set of UniFi 802.11ax (Wi-Fi 6) AP devices. All models
include "U6" in their names and also have code names with no special
characters (including spaces).

Examples:
1. U6 Lite (codename U6-Lite)
2. U6 Long-Range (codename U6-LR)
3. U6+ (codename U6-PLUS)
4. U6 Pro (codename U6-Pro)
5. U6 Mesh (codename U6-Mesh)
6. U6 Mesh Pro (codename U6-Mesh-Pro)
7. U6 Enterprise (codename U6-Enterprise)

Use proper full names for those devices. Names in OpenWrt/DTS code may
need updating too but it can be handled later.

Cc: Elbert Mai <code@elbertmai.com>
Cc: Daniel Golle <daniel@makrotopia.org>
Cc: Henrik Riomar <henrik.riomar@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 74879140a1)
2024-09-12 14:37:59 +02:00
David Bauer
7447eeac91 ipq40xx: define config-names for Aruba boards
Aruba boards now ship with multiple DTS and image-configurations per
image. Newer apboot revs expect a configuration for their hardware to be
present.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit c7ba5574f5)
2024-09-11 17:47:11 +02:00
Jakob Haufe
a07a531329 octeon: ubnt-edgerouter: Disable PCIe
Some devices lock up on PCIe initialization:

[   64.309697] PCIe: Port 0 in endpoint mode, skipping.
[   64.320496] PCIe: Initializing port 1
[   64.325257] PCIe: BIST FAILED for port 1 (0xffffffffffffffff)
(system hangs here)

Given the ER contains no PCIe peripherals, has no way to attach any
and the stock kernel doesn't have PCIe support either, just disable it.

(cherry picked from commit 308630aea6)
Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Link: https://github.com/openwrt/openwrt/pull/16223
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-22 11:41:22 +02:00
Tianling Shen
cce5b49de4 mediatek: fix lan/wan macaddr for cmcc rax3000m
The MAC address assigned to lan/wan was reversed on eMMC boards.

Fixes: d3c193525e ("mediatek: add CMCC RAX3000M support")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15077
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-11 19:18:39 +02:00
Tianling Shen
a591f9cd14 mediatek: enable rootwait for cmcc rax3000m emmc version
Sometimes the mmc deivce may come up later than kernel attempts to
mount rootfs, resulting kernel panic. Enable rootwait to fix it.

Reported-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15077
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-11 19:18:39 +02:00
Tianling Shen
6fadcee50b mediatek: increase phy assert time for jdcloud re-cp-03
According to RTL8221B's datasheet, the PHY requires at least 10ms
for assert and 68ms (recommended) for de-assert. So increase the
assert/de-assert time to 15ms and 68ms respectively.

Fixes: c0c3234e17 ("mediatek: add support for JDCloud RE-CP-03")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16106
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d1954aa535)
2024-08-08 22:07:08 +02:00
Hauke Mehrtens
07cb7cb885 kernel: bump 5.15 to 5.15.164
No manual changes needed.

Link: https://github.com/openwrt/openwrt/pull/16027
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-29 23:11:33 +02:00
Hauke Mehrtens
6edde2b502 ath25: eth: Fix PHY access over ar2313 driver
.ndo_do_ioctl is not called any more. For PHY MII ioctl handling, the
kernel calls .ndo_eth_ioctl now.

See upstream Linux kernel commit:
https://git.kernel.org/linus/a76053707dbf0dc020a73b4d90cd952409ef3691

Link: https://github.com/openwrt/openwrt/pull/16023
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 23:56:36 +02:00
Hauke Mehrtens
2e064182bf ipq40xx: eth: Fix PHY access over ipqess driver
.ndo_do_ioctl is not called any more. For PHY MII ioctl handling, the
kernel calls .ndo_eth_ioctl now.

See upstream Linux kernel commit:
https://git.kernel.org/linus/a76053707dbf0dc020a73b4d90cd952409ef3691

Link: https://github.com/openwrt/openwrt/pull/16005
(cherry picked from commit f0bb25aba2)
Link: https://github.com/openwrt/openwrt/pull/16023
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 23:56:36 +02:00
Hauke Mehrtens
c4dc5dbd33 ramips: eth: Fix PHY access over mtk_eth_soc driver
.ndo_do_ioctl is not called any more. For PHY MII ioctl handling, the
kernel calls .ndo_eth_ioctl now.

See upstream Linux kernel commit:
https://git.kernel.org/linus/a76053707dbf0dc020a73b4d90cd952409ef3691

Link: https://github.com/openwrt/openwrt/pull/16005
(cherry picked from commit dbccc9cf91)
Link: https://github.com/openwrt/openwrt/pull/16023
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 23:56:36 +02:00
Hauke Mehrtens
e5233fa70e ath79: Fix PHY access over ag71xx driver
.ndo_do_ioctl is not called any more. For PHY MII ioctl handling, the
kernel calls .ndo_eth_ioctl now.

The SIOCSIFHWADDR and SIOCGIFHWADDR operation are handled in the generic
code in the same way just with more input validation.

See upstream Linux kernel commit:
https://git.kernel.org/linus/a76053707dbf0dc020a73b4d90cd952409ef3691

Reported-by: Cthulhu88 in https://forum.openwrt.org/t/ethernet-leds-control-for-tp-link-tl-wr1043nd-v2-v3/202378
Link: https://github.com/openwrt/openwrt/pull/16005
(cherry picked from commit f86273e742)
Link: https://github.com/openwrt/openwrt/pull/16023
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 23:56:36 +02:00
Hauke Mehrtens
f791ec1f6d kernel: bump 5.15 to 5.15.163
Manually adapted:
   lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.patch

Link: https://github.com/openwrt/openwrt/pull/15982
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-27 00:40:25 +02:00
Leon M. Busch-George
d3552ccb17 mediatek: filogic: prevent faulty mac address assignment
The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.

This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
(cherry picked from commit a55ab9e134)
2024-07-15 16:13:59 +02:00
Leon M. Busch-George
74df6ce9db mediatek: filogic: add support for Cudy M3000 v1
Hardware:
  SoC:     MT7981b
  RAM:     256 MB
  Flash:   128 MB SPI NAND
  Ethernet:
    1x 2.5Gbps (rtl8221b)
    1x 1Gbps (integrated phy)
  WiFi:    2x2 MT7981
  Buttons: Reset, WPS
  LED:     1x multicolor

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

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

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

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

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

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
(cherry picked from commit 20e4a18feb)
2024-07-15 16:12:33 +02:00
Tianling Shen
84ecd7c939 mediatek: fix lan/wan macaddr for jdcloud re-cp-03
The MAC address assigned to lan/wan was reversed.

Fixes: 6e51ff88b0 ("mediatek: add support for JDCloud RE-CP-03")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-07-15 16:07:15 +02:00