aboutsummaryrefslogtreecommitdiff
path: root/target/linux
Commit message (Collapse)AuthorAge
* mediatek: TOTOLINK A8000RU: add missing usb3 packageChukun Pan2024-01-14
| | | | | | This device has a usb 3.0 port, so add it. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: fixes typo for spi propertiesChukun Pan2024-01-14
| | | | | | Same as commit 3674689, correct 'buswidth' to 'bus-width'. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: YunCore AX835: convert to nvmem-layoutChukun Pan2024-01-14
| | | | | | | 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>
* mediatek: Cudy WR3000: simplify mac address setupChukun Pan2024-01-14
| | | | | | | | 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>
* mediatek: Cetron CT3003: move mac address setup to dtsChukun Pan2024-01-14
| | | | | | | 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>
* mediatek: filogic: refresh kernel configChukun Pan2024-01-14
| | | | | | | Refresh kernel config with 'make kernel_oldconfig'. Also disable the useless rtl8367s gsw driver. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: mt7622: refresh kernel configChukun Pan2024-01-14
| | | | | | Refresh kernel config with 'make kernel_oldconfig'. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* realtek: rtl838x: add Netgear GS110TUP v1 supportJacob Potter2024-01-13
| | | | | | | | | | | | | | | | | | | | | | 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>
* realtek: rtl838x: join Netgear GSxxx flash layoutsSander Vanheule2024-01-13
| | | | | | | | | | 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>
* ath79: read back reset registerDavid Bauer2024-01-11
| | | | | | | | | | | | | | | | | 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>
* ramips: mt76x8: add support for TP-Link RE365 v1Tomasz Maciej Nowak2024-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rtl83xx: dsa: reset PVID to 1 instead of 0Harshal Gohel2024-01-09
| | | | | | | | | | | | | | | 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>
* rtl93xx: dsa: Fix 802.1QinQ for trunk portsHarshal Gohel2024-01-09
| | | | | | | | | | | | | | | | | 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>
* rtl83xx: dsa: Clear duplex bit correctlyHarshal Gohel2024-01-09
| | | | | | | | 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>
* rtl930x: Rework per port LED configurationHarshal Gohel2024-01-09
| | | | | | | | | | | | | | | | 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>
* rtl83xx: dsa: Do nothing when vid 0Harshal Gohel2024-01-09
| | | | | | | Following other dsa drivers, vid 0 is no-op Acked-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
* rtl83xx: dsa: disable VLAN filtering on CPU portHarshal Gohel2024-01-09
| | | | | | | | | | | | 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>
* rtl838x: Enable jumbo frames by defaultHarshal Gohel2024-01-09
| | | | | | | | 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>
* mediatek: fix BPI-R3 wifi mac addressFelix Fietkau2024-01-09
| | | | | | | | 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>
* mediatek: disable btif for mt7622 devicesFelix Fietkau2024-01-09
| | | | | | 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>
* mediatek: add support for YunCore AX835Leon M. Busch-George2024-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mediatek: GL-MT6000: Add missing LED state definitionsHannu Nyman2024-01-09
| | | | | | | | | | | | | | | | | | | | 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>
* kernel: backport more NVMEM changes queued for v6.8Rafał Miłecki2024-01-08
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ath79: add support for UniFi UK-UltraDavid Bauer2024-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: move UniFi AC template into commonDavid Bauer2024-01-07
| | | | | | This allows us to embrace alphabetical sorting for the UK-Ultra. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add alternative name to Etisalat (Sercomm) S3Mikhail Zhilkin2024-01-07
| | | | | | This commit adds alternative name to Etisalat (Sercomm) S3 router. Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: sercomm s1500: enable wlan LEDs activity blinkingMikhail Zhilkin2024-01-07
| | | | | | | | | 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>
* ramips: update leds & buttons dts descriptionMikhail Zhilkin2024-01-07
| | | | | | | | | | | | | 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>
* ath79: support MikroTik RouterBOARD 911G-5HPacDLech Perczak2024-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAGLech Perczak2024-01-07
| | | | | | | 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>
* ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnDLech Perczak2024-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: mikrotik: add RB912UAG-5HPnD as alternative nameLech Perczak2024-01-07
| | | | | | | | | 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>
* ramips: add missing syscon compatible strings for MT7688 and RT3052Shiji Yang2024-01-06
| | | | | | | | | | | | 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: 1f818b09f8ae ("ramips: add proper system clock and reset driver support for legacy SoCs") Fixes: #14305 Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* qualcommax: Fix Buffalo WXR-5950AX12 wifi MACSamir Ibradžić2024-01-06
| | | | | | | | | | | | | | | | | | | | | 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>
* mediatek: filogic: add support for Xiaomi AX3000TDim Fish2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **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>
* ipq807x: add support for Linksys MX4200 V1 and V2Mohammad Sayful Islam2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: reset mt7620 ethernet phy via reset controllerShiji Yang2024-01-06
| | | | | | | | | | | 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>
* ramips: reset mt7620 frame engine via reset controllerShiji Yang2024-01-06
| | | | | | | | | 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>
* kernel: bump 6.1 to 6.1.71John Audia2024-01-06
| | | | | | | | | | | | | | | 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>
* kernel: bump 5.15 to 5.15.146John Audia2024-01-06
| | | | | | | | | | | | | | | | | 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>
* mediatek: MERCUSYS MR90X v1: remove deprecated led "label" propertiesMikhail Zhilkin2024-01-06
| | | | | | | | | | | 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>
* realtek: correct typo in port numberingMichael 'ASAP' Weinrich2024-01-05
| | | | | | Port 10 was incorrectly labelled as nonexistent port 0. Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
* realtek: fix network connectivity on GS750EMichael 'ASAP' Weinrich2024-01-05
| | | | | | | | | | | 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>
* ag71xx: fix wrong register definition issueRosen Penev2024-01-05
| | | | | | Documentation fix from QCA SDK. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: move kernel and ubi into subnodesRosen Penev2024-01-05
| | | | | | | | 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>
* ath79: gpio to gpiosRosen Penev2024-01-05
| | | | | | Fixes deprecated_gpio_property dtc warning Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: fix pci_device_reg errorsRosen Penev2024-01-05
| | | | | | Found by dtc. Wrong numbers and wrong ordering. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: fix unit_address_format warningRosen Penev2024-01-05
| | | | | | Raised by dtc. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: fix avoid_unnecessary_addr_size warningsRosen Penev2024-01-05
| | | | | | Raised to dtc. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: rename pcie-controller to pcieRosen Penev2024-01-05
| | | | | | | 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>