Commit Graph

30624 Commits

Author SHA1 Message Date
Roger Pueyo Centelles
f4858a490e ath79: Upstream b53 DSA driver for Ubiquiti EdgeSwitch 8XP
The swconfig-based b53 driver for the BCM53128 switch stopped working
after commits b2cfed48f6 (Revert "swconfig: fix Broadcom b53 support")
and e4e410733f (kernel: export switch_generic_set_link() symbol). This
rendered the 8 LAN ports of the EdgeSwitch 8XP non-functional, so the
image compilation for the device was disabled (5a1d7d8c1b).

This commit adds the kmod-dsa-b53-mdio and kmod-dsa-b53 packages
with the upstream B53 DSA driver, replacing the swconfig-based
kmod and kmod-switch-bcm53xx-mdio downstream ones that are not used by
any other device.

The 8 LAN ports of the EdgeSwitch 8XP are usable again. The 02_network
init script has been updated with the new DSA interfaces lan1 .. lan8.

Image building has been reenabled for the device, adding the usual DSA
incompatibility notice.

Tested on a Ubiquiti EdgeSwitch 8XP.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Link: https://github.com/openwrt/openwrt/pull/11680
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-19 14:10:34 +02:00
Daniel Golle
dbc2923cbe mediatek: filogic: convert Acer Predator W6 to use NVMEM framework
Read WiFi calibration data via NVMEM framework. The MAC addresses are
stored inside a file on a filesystem and hence still have to be
extracted in userspace.

WiFI EEPROM extraction has already accidentally been partially removed
by commit 3e6de5d77a ("mediatek: use NVMEM framework on all Adtran
devices").

Fixes: 3e6de5d77a ("mediatek: use NVMEM framework on all Adtran devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-18 12:38:21 +01:00
Robert Marko
caf5caae44 lantiq: refresh patches
CI says that they need to be refreshed, so do so.

Link: https://github.com/openwrt/openwrt/pull/16722
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-17 19:31:38 +02:00
Robert Marko
1d98363bd2 realtek: refresh patches
CI says that they need to be refreshed, so do so.

Link: https://github.com/openwrt/openwrt/pull/16722
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-17 19:31:38 +02:00
Daniel Golle
abda39d86d generic: import and move accepted RealTek PHY patches
Import commits from upstream Linux and move/rename existing patches
which have been acceped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-17 13:33:18 +01:00
David Bauer
e2f64ce592 mpc85xx: convert Watchguard T10 mac-assignment to NVMEM
MAC-addresses are stored with colons, thus they can now be referenced
using NVMEM.

Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16310
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-17 11:23:23 +02:00
Rosen Penev
0506dd393c 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 10:59:52 +02:00
Felix Fietkau
74238413b1 ramips: disable CONFIG_LIST_HARDENED on MT7620
In #16396, crashes were reported on MT7620, which were introduced by enabling
CONFIG_LIST_HARDENED. The cause seems to be random memory corruption somewhere
in the kernel. Unfortunately the crash traces do not point to the real cause
of the crash in any way.
Since MT7620 is really ancient hardware that likely only has few users left,
I don't expect that anybody will invest a significant amount of time to track
down the real cause. Because of that, let's disable CONFIG_LIST_HARDENED on
this target only, and leave it enabled on all other platforms.

Fixes: #16396
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-16 10:18:16 +02:00
Daniel Golle
7e51d6a4c8 mediatek: mt7622: add netdev rename preinit script
Add preinit script to rename network interfaces according to the
label provided in Device Tree.

Fixes: b6d8297510 ("mediatek: mt7622: add Adtran SmartRG SDG-841t6 device")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-16 00:10:28 +01:00
Chukun Pan
e98987048a mediatek: filogic: reorder alphabetically
Reorder scripts to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-10-15 21:36:16 +01:00
Chukun Pan
5fd4743d4c mediatek: filogic: fix network config for mt7986b-rfb
Fix the network configuration according to the device tree.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-10-15 21:36:16 +01:00
Daniel Golle
4d81f40d63 generic: fix kernel version and ordering of Aquantia backports
Two patches declared as accepted in v6.13 were already accepted for
v6.12. Fix filenames and order of patches applied.

Reported-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Fixes: 8cc049cec2 ("generic: phy: aquantia: move accepted patches to backport-6.6")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 21:20:19 +01:00
Daniel Golle
3e6de5d77a mediatek: use NVMEM framework on all Adtran devices
Use NVMEM framework to assign MAC addresses and WiFi EEPROM data on
all Adtran SmartRG devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:56:06 +01:00
Daniel Golle
b6d8297510 mediatek: mt7622: add Adtran SmartRG SDG-841t6 device
Specification
 SoC:   MediaTek MT7622A (2x Cortex-A53)
 RAM:   NANYA NT5CC256M16ER-EK (512 MiB)
 MMC:   Kioxia THGBMNG5D1LBAIT (4 GiB)
 ETH0:  Intel/MaxLinear GPY211 (2500M/1000M/100M/10M)
 ETH1:  Lantiq/Intel/MaxLinear PEF7071/GPY111 (1000M/100M/10M)
 WLAN0: MediaTek MT7915E + MT7975D 2T2R 802.11bgn/ax (2.4G)
                                   2T2R 802.11an/ac/ax (5G L)
 WLAN1: MediaTek MT7915E + MT7975A 4T4R 802.11an/ac/ax (5G H)
 BT:    BT5 provided by MT7915E+MT7975D (missing firmware)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:55:05 +01:00
Daniel Golle
175bd80349 mediatek: add driver for Adtran MFGINFO NVMEM layout
This driver allows retrieving MAC addresses and other factory information
via the NVMEM framework on Adtran devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:55:05 +01:00
Daniel Golle
330321421a mediatek: mt7622: enable HWMON in kernel config
Building HWMON as module prevents some other drivers from getting built
into the kernel, e.g. mxl-gpy. Always enable HWMON and also set
THERMAL_HWMON.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:55:05 +01:00
Daniel Golle
3f3c27e22c generic: net: phy: intel-way: add support for PHY LEDs
Add driver support for PHY LEDs for MaxLinear/Intel/Lantiq XWAY
Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:54:30 +01:00
Daniel Golle
5fd518b6e3 generic: net: phy: mxl-gpy: add support for PHY LEDs
Add driver support for PHY LEDs for MaxLinear/Intel GPY Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:47:31 +01:00
Daniel Golle
45bad8ba98 generic: phy: aquantia: correctly describe LED polarity
Backport newly introduced support for 'active-high' property and use
it to correctly implement polarity assignment for Aquantia PHY LEDs.
Previously the 'active-low' property was used to switch a LED PIN to
active-high ("drive VDD" in Aquantia-speak) mode.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:46:14 +01:00
Daniel Golle
8cc049cec2 generic: phy: aquantia: move accepted patches to backport-6.6
Move patches accepted upstream from pending-6.6 to backport-6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 17:45:18 +01:00
Daniel Golle
ee03a2742b generic: net: phy: be more conservative about MAC interface selection
Only add SerDes interface modes at lower speeds to host_interfaces.

Fixes: 5281033831 ("generic: net: phy: use all SerDes MAC interface modes")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-15 14:21:37 +01:00
Stijn Tintel
0a2ed285e4 qoriq: add squashfs to FEATURES
The snapshot builds for qoriq only contain ext4 images. Add squashfs to
FEATURES to also have the buildbots build squashfs images.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-10-15 12:15:10 +03:00
Felix Fietkau
506d0c421b kernel: fix mtk_eth_soc memory corruption issue on fq dma init
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-15 10:22:02 +02:00
Stijn Tintel
1bd6dda198 qoriq: add missing kernel config symbol
Dropping the source-only flag from qoriq and adding it to the buildbots
exposed a missing kernel config symbol: CONFIG_DRM_OFDRM. Addd it as
disabled to the qoriq kernel config, as the only device currently
supported in the qoriq target does not have any display hardware.

Reported-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-10-15 00:27:34 +03:00
Robert Marko
5338c8da6c mvebu: cortex-a9: add upgrade methode to nas1dual
The blamed commit adds a upgrade recipe for nas1dual to specify the
firmware partition name, but does not actually include the recipe that
will be called.

Since it previously relied on the default one, add that one.

Fixes: d21720fa90 ("mvebu: fix default partition name")
Link: https://github.com/openwrt/openwrt/pull/16704
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-14 13:17:01 +02:00
Stijn Tintel
61175a0506 qoriq: drop source-only flag
While the qoriq target currently supports only one device, the
WatchGuard Firebox M300, the feedback from people using it is that it's
a great bang for the buck. Additionally, people suggest having no
snapshots available hurts adoption.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-10-13 22:27:44 +03:00
Rosen Penev
553e8da067 qoriq: use nvmem for MAC addresses
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16308
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-10-13 21:51:19 +03:00
Peter Körner
0ba2e0868e rtl83xx: fix typo
Removes an unwanted special character in a debug-message.

Signed-off-by: Peter Körner <peter@mazdermind.de>
2024-10-13 20:48:51 +03:00
Boris Krasnovskiy
d21720fa90 mvebu: fix default partition name
The firmware partition name is specifc to ipTIME NAS1dual and should not be
set globally.

Fixes: #16148
Fixes: 6ff970bb51 ("mvebu: add support for ipTIME NAS1dual")
Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16690
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-13 14:18:21 +02:00
Rosen Penev
4f4cb52e24 ramips: use nvmem to get mikrotik mac
73a9f9f857 added support. Let's use it.
Calibration data is not yet supported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16256
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 22:26:56 +02:00
Magnus Sandin
c5287069ea mediatek: ASUS TUF-AX6000: Add Green & Red LEDs
Beside the already existing control of the
Blue cover LED, this will also add the
Green and the Red cover LEDS available in the
Asus TUF-AX6000.

Signed-off-by: Magnus Sandin <magnus.sandin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 22:16:28 +02:00
Linus Walleij
14f79ad139 linux: generic: dsa: mv88e6xx: Drop obsolete patch
As described by Tobias Waldekranz this patch is obsolete
and the issue is already fixed in the upstream kernels we
are using.

Link: http://lists.openwrt.org/pipermail/openwrt-devel/2024-October/043238.html
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-10-12 22:07:46 +02:00
Linus Walleij
c990f6e156 linux: generic: net: dsa: mv88e6xxx LED support
This solution that is needed for some routers to provide proper
LED activity when controlled directly by the MV88E6xxx switch,
has just been merged in upstream Linux.

Make this patch 901 as other backports from earlier kernels
are in patch 896 and this is the first free number after
that.

Patch offsets in pending patches are augmented as part of
the refresh.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-10-12 22:07:35 +02:00
Shiji Yang
09a6e4747f ramips: remove useless cs gpio code for rt2800 SPI driver
The SPI driver framework can handle it automatically in
spi.c:spi_setup():spi_set_cs():gpiod_set_value_cansleep().

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16636
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 22:04:03 +02:00
Aleksander Jan Bajkowski
622be8e3d9 lantiq: ase: disable adm6996 and swconfig
The ase subtarget supports two devices. ALLNET ALL0333CJ has one
Ethernet port and uses only the built-in MAC and PHY. The second
device is the Netgear DGN1000, which uses an AR8216 switch.

The driver for the adm6996 switch was probably accidentally
enabled instead of the ar8216 in commit that restores ase support
9b321bc60d ("lantiq: add Amazon-SE subtarget").

Before removing the ase subtarget, only ar8216 was enabled
c821836395 ("lantiq: remove unmaintained code").

Reduce uncompressed kernel size by 15.6 kB.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/15332
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 21:38:26 +02:00
Aleksander Jan Bajkowski
bb71abb689 lantiq: ase: refresh config
This was done by executing these command:
$ make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/15332
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 21:38:26 +02:00
John Audia
12f12df569 kernel: bump 6.6 to 6.6.55
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.55

Added the following default ksym to target/linux/generic/config-6.6:
	CONFIG_PROC_MEM_ALWAYS_FORCE=y
	# CONFIG_PROC_MEM_FORCE_PTRACE is not set
	# CONFIG_PROC_MEM_NO_FORCE is not set

Removed upstreamed:
	generic/backport-6.6/780-23-v6.12-r8169-Fix-spelling-mistake-tx_underun-tx_underrun.patch[1]
	generic/backport-6.6/780-25-v6.12-r8169-add-tally-counter-fields-added-with-RTL8125.patch[2]
	generic/pending-6.6/684-gso-fix-gso-fraglist-segmentation-after-pull-from-fr.patch[3]
	lantiq/patches-6.6/0025-v6.12-net-ethernet-lantiq_etop-fix-memory-disclosure.patch[4]

Manually rebased:
	bcm27xx/patches-6.6/950-0086-Main-bcm2708-bcm2709-linux-port.patch
	bcm27xx/patches-6.6/950-0998-i2c-designware-Add-support-for-bus-clear-feature.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=f02fcb7283b1c25f7e3ae07d7a2c830e06eb1a62
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=1c723d785adb711496bc64c24240f952f4faaabf
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=af3122f5fdc0d00581d6e598a668df6bf54c9daa
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=e66e38d07b31e177ca430758ed97fbc79f27d966

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16655
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-10-11 19:21:41 +02:00
Christian Marangi
f9a70a20c5
generic: backport BLOCK OF support patch
Backport BLOCK OF support patch merged upstream and refresh pending
BLOCK patches.

This is a new way to declare partition table for BLOCK device (eMMC
currently supported) with the use of DTS.

Current pending patch are adapted to not cause regression with current
downstream implementation of a similar functionality.

Also enable the new OF_PARTITION config by default.

Link: https://github.com/openwrt/openwrt/pull/16663
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-11 17:18:40 +02:00
Shiji Yang
48b8c602d0 ipq40xx: switch to zImage kernel for SKSpruce WIA3300-20
The bootloader can support zImage linux kernel which can decrease
the firmware image size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16662
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-11 16:32:57 +02:00
Robert Marko
9b66c7dfa5 realtek: refresh patches
CI is saying that patches need to be refreshed, so refresh them.

Link: https://github.com/openwrt/openwrt/pull/16653
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-10 12:35:33 +02:00
Rosen Penev
f8ca351936 mpc85xx: handle MSM460 wifi mac in dts
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-10-10 04:41:04 +02:00
Felix Fietkau
fa6bd065dd kernel: backport upstream commit that allows leaving out .ndo_get_stats64
Fixes mac80211 backport device statistics.

Fixes: #16642
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-09 10:44:44 +02:00
Daniel Golle
5281033831 generic: net: phy: use all SerDes MAC interface modes
Instead of forcing 2.5G PHYs into rate-adapter mode which results higher
energy consumption, lack of support for half-duplex modes and typically
worse performance when linked at speeds less than 2.5G, use SGMII mode
which allows the MAC to follow the PHY speed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-09 02:38:25 +01:00
Daniel Golle
69906789e0 generic: net: phy: realtek: various improvements
Follow the advise of Russell King allows to greatly improve the driver
for RealTek's 1G and 2.5G Ethernet PHYs. The results are full/half
duplex as well as Gbit master/slave property being read from PHY
Specific Status Register (PHYSR), and fixes regarding link-partner
advertisement.

Fixes: #14504
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-09 02:36:22 +01:00
Daniel Golle
7d256aff7b mediatek: update MediaTek PHY patchset
The previous iteration of MediaTek's PHY patches caused various weird bugs.
Drop culprit patch 733-10-net-phy-mediatek-Extend-1G-TX-RX-link-pulse-time.patch
and use the most recent iteration of the patchset which has been posted to the
netdev mailing list.

Link: https://patchwork.kernel.org/project/netdevbpf/list/?series=895513&state=*
Fixes: #16448
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-09 01:37:02 +01:00
Rosen Penev
084665698b ath79: gpio-rb91x-key: use devm for mutex_init
mutex_destroy is not called in any error paths or in _remove. Just use
devm to do so.

Removed a pointless platform_set_devdata call. Not needed with all of
the devm conversions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16630
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 19:35:56 +02:00
Rosen Penev
a35bfa68d3 ath79: gpio-rb4xx: use devm_mutex_init
Also use devm for gpiochip_add_data.

Allows completely removing the _remove function.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16622
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 19:34:38 +02:00
Shiji Yang
b37f3def86 ipq40xx: add support for SKSpruce WIA3300-20
Specification
-------------
- SoC       : Qualcomm IPQ4019
- RAM       : 256 MiB DDR3 (NT5CC128M16JR-EK)
- Flash     : 64 MiB SPI NOR (Winbond W25Q512JVFQ)
- WLAN      : IPQ4019 built-in
  - 2.4 GHz : 2x2 MIMO WiFi4
  - 5 GHz   : 2x2 MIMO WiFi5
- Ethernet  : QCA8075 10/100/1000 Mbps 1x WAN (ETH1, PoE); 1x LAN (ETH2)
- USB       : 1x 2.0 Type-A
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
- LEDs      : 1x RUN (lime & red)
              1x WiFi 2.4 GHz (lime)
              1x WiFi 5 GHz (lime)
              2x ETH (lime), controlled by the QCA8075 phy
- Power     : DC 12V & 802.3at PoE
- FCC ID    : 2AHKT-WIA3300-20
- TFTP IP   :
  - client  : 192.168.18.254
  - router  : 192.168.18.1

Installation
------------
1. Open uart console and start TFTP server. Copy initramfs image to
   the TFTP root directory and rename it to 'ipqinitramfs.bin'.
2. Power on and press 'Enter' to exit to the u-boot console according
   to the TTL log prompt.
3. Execute commands to load the initramfs image:
   tftpboot && bootm
4. Enter into OpenWrt to backup the partitions if you want to restore
   the stock firmware one day.
5. Override default 'bootcmd' environment variable in u-boot console:
   env set bootcmd 'sf probe && sf read $loadaddr 0x980000 0x800000 && bootm $loadaddr'
   env save
6. Repeat step 3 and flash 'sysupgrade' image in OpenWrt.

Recovery and return to stock
----------------------------
1. Restore the backup firmware partitions in the installation step 4.
2. Restore `bootcmd` environment variable via commands:
   env set bootcmd bootipq && env save

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LABEL   | xx:xx:xx:xx:xx:25 |
| LAN     | xx:xx:xx:xx:xx:26 |
| WAN     | xx:xx:xx:xx:xx:25 |
| WLAN 2g | xx:xx:xx:xx:xx:28 |
| WLAN 5g | xx:xx:xx:xx:xx:29 |
+---------+-------------------+

Notice
-----------
1. Some CH340 USB-TTL module doesn't work on this device.
2. The 'firmware' partition consists of four parts in the vendor
   layout:
     * Name            Start           Size
     * rootfs          0x980000        0x1680000
     * 0:HLOS1         0x2000000       0x800000
     * rootfs_1        0x2800000       0x1400000
     * rootfs_data     0x3c00000       0x350000
3. User can control the USB power supply via commands:
   echo enabled > /sys/devices/platform/output-usb-power/state
   echo disabled > /sys/devices/platform/output-usb-power/state

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16476
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 19:33:33 +02:00
Shiji Yang
a48ba7efcc ipq40xx: generic: enable userspace regulator consumer driver
It can be used to control the power on/off status for the fixed
voltage regulator via sysfs.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16476
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 19:33:33 +02:00
John Thomson
7d33aedd10 generic: platform/mikrotik: add wlan lz77 decompress
A number of new (or with recently updated caldata)
Mikrotik devices are using LZ77 magic for wlan tag hard_config data.
New devices include the Chateau LTE12 [1], and ax devices [2]
Newly factory flashed devices may include the hap ac3 [3]

This can be seen in decoded OEM supout [4] dmesg:
"radio data lz77 decompressed from"…

Investigating an arm RouterOS flash.ko module, and supplied example
hard_config dumps, the format was guessed via decompilation and live
debugging [5]. This decoder was then built from the guessed format
specification.

debug prints can be enabled in a DYNAMIC_DEBUG kernel build via the
kernel cmdline:

        chosen {
-               bootargs = "console=ttyS0,115200";
+               bootargs = "console=ttyS0,115200 dyndbg=\"file drivers/platform/mikrotik/* +p\"";
        };

[1]: https://forum.openwrt.org/t/no-wireless-mikrotik-rbd53ig-5hacd2hnd/157763/4
[2]: https://forum.openwrt.org/t/mikrotik-routeros-v7-x-and-openwrt-sysupgrade/148072/17
[3]: https://forum.openwrt.org/t/adding-support-for-mikrotik-hap-ax2/133715/47
[4]: https://github.com/farseeker/go-mikrotik-rif
[5]: https://github.com/john-tho/routeros-wlan-lz77-decode

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Link: https://github.com/openwrt/openwrt/pull/15774
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 10:45:58 +02:00