Commit Graph

3954 Commits

Author SHA1 Message Date
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
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
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
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
Goetz Goerisch
cffc52bb9a ramips: ER605v2 fix LED function definition
commit 665c2154ef
added support for ER605v2

All three LEDs where configured with LED_FUNCTION_STATUS
which worked for 23.05 and kernel 5.15.

With the upgrade to kernel 6.6 this leads to a name collision.

Therefore the USB and Power LED now use the common.h function
LED_FUNCTION_USB and LED_FUNCTION_POWER respectivly.

* fixes https://github.com/openwrt/openwrt/issues/16596

Link: https://github.com/openwrt/openwrt/pull/16606
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16606
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-06 18:58:47 +02:00
Shiji Yang
b62e6f5beb 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>
2024-10-06 14:07:37 +02:00
Shiji Yang
08eecec355 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>
2024-10-06 14:07:37 +02:00
Mauri Sandberg
c1c2b61254 ramips: dts: DNA EX400 has redundant type u-boot environment
Set compatible string and specify redundant type U-boot environment.

Fixes: fea2264d9f ("ramips: mt7621: Add DNA Valokuitu Plus EX400")
Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16573
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 00:54:44 +02:00
Mauri Sandberg
758f320ebe mt7621: enable CONFIG_MTD_UBI_NVMEM, CONFIG_NVMEM_LAYOUT_U_BOOT_ENV
Enable above drivers for mt7621 targets. They are needed for retrieving a MAC
address stored in a U-boot environment residing on an UBI volume.

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16573
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 00:54:44 +02:00
Rosen Penev
d1157090ff ramips: modernize ralink i2c driver
Use more devm and remove _remove function.

Remove owner as the kernel sets it automatically.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16546
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:48:29 +02:00
Nikolay Martynov
4705398bbf ramips: rename interfaces for tplink er605v2
Currently eth1 (which is the first "lan" interface) doesn't work on this device.
During boot the following can be seen in logs:

```
[    2.252804] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.266060] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    2.277889] mtk_soc_eth 1e100000.ethernet eth1: mediatek frame engine at 0xbe100000, irq 19
...
[    2.355157] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.390312] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    2.398597] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    2.403872] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=21)
[    2.416988] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth1
[    2.426973] mt7530-mdio mdio-bus:1f eth2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=22)
[    2.440996] mt7530-mdio mdio-bus:1f eth3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=23)
[    2.454405] mt7530-mdio mdio-bus:1f eth4 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7530 PHY] (irq=24)
[    2.467198] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.474117] DSA: tree 0 setup
...
[    6.820998] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
[    6.919904] mtk_soc_eth 1e100000.ethernet wan: renamed from eth1
```

So the problem seems to be the fact that built-in gmacs get default
names (eth0/eth1) and are renamed after switch ports are initialized. This means
that when switch port with name `eth1` is brought up this name is still used by
gmac1 causing switch port's init to fail.

This patch just renames the ports to avoid name collision.
Note: this will break existing configs for this device because it renames all
the ports. This should not be major problem because this device doesn't have a
proper OEM image and is only flashable with serial access, meaning there should
not be many users.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15865
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:36:05 +02:00
Rosen Penev
fb3d681783 ramips: mtk_eth_soc: don't allocate 4 queues
This driver does not support more than 1 queue.

Fixes: ba24b94e0b ("ramips: use more devm in mtk_eth_soc")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-09-29 07:46:33 +08:00
Rosen Penev
ba24b94e0b ramips: use more devm in mtk_eth_soc
These got added to the kernel after this driver was written.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-25 23:16:50 +02:00
Alan Luck
a1a8cd8282 ramips: Add support for D-Link DIR-2150-R1
Hardware Specification:
SoC: Mediatek MT7621DAT (MIPS1004Kc 880 MHz, dual core)
RAM: 128 MB
Storage: 128 MB NAND flash
Ethernet: 5x 10/100/1000 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
Wireless: 2.4GHz: Mediatek MT7603EN up to 300Mbps (802.11b/g/n MIMO 2x2)
Wireless: 5GHz: Mediatek MT7615N up to 1733Mbps (802.11n/ac MU-MIMO 4x4)
LEDs: Power (white & amber), Internet (white & amber)
LEDs: 2.4G (White), 5Ghz (White)
Buttons: WPS, Reset
USB: Front V3.0 & Rear V2.0

MAC Table
Label xx:xx:xx:xx:xx:38
LAN xx:xx:xx:xx:xx:39
2.4Ghz xx:xx:xx:xx:xx:3A
5Ghz xx:xx:xx:xx:xx:3C
WAN xx:xx:xx:xx:xx:38

Flash Instructions:
D-Link normal OEM firmware update page
1. upload OpenWRT factory.bin like any D-Link upgrade image

D-Link Fail Safe GUI:
1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
2. Give it ~30 seconds, to boot the fail safe GUI
3. Connect your client computer to LAN1 of the device
4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0
5. Call the fail safe page for the device at http://192.168.0.1/
6. Use the provided fail safe web GUI to upload the factory.bin to the device

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16269
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:38:21 +02:00
Shiji Yang
656c9847d5 ramips: add back the missing periph clock for Ralink RT3883
periph clock is the parent clock of some other clocks.

Link: https://lore.kernel.org/all/CAMhs-H_NS-n2tx5SZpCMiVZtBFzX_nTa_vnS8We0UevkwFq93Q@mail.gmail.com/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Shiji Yang
285f87d2c7 ramips: merge dtsi included file for Belkin F9K1109
Only one device uses the dtsi file "rt3883_belkin_f9k110x.dtsi".
So there is no need to split the device tree.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Shiji Yang
4069233936 ramips: disable 2 GHz band for Belkin F9K1109 V1
2 GHz WiFi doesn't work on the wmac of this device.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Yahor Leonenka
0f0aadcff4 ramips: Add support for Ruijie RG-EW1200G PRO v1.1
SoC: MediaTek MT7621
    Flash: 16MB (Macronix MX25L12805D)
    RAM: 128MB
    Serial: As marked on PCB, baudrate is 57600, DO NOT CONNECT 3.3V!!!
    Ethernet: 4x 10/100/1000 Mbps (3x LAN + WAN)
    WIFI0: MT7615 2.4GHz 802.11b/g/n
    WIFI1: MT7615 5GHz 802.11ac
    Antennas: 6x external (3 per radio), non-detachable
    LEDs: Programmable power-LED (blue-colored)
    Buttons: Reset

INSTALLATION:

    Get rootshell using insructions from https://gist.github.com/ZIKH26/18693c67ee7d2f8d2c60231b19194c37

    Download and flash image
    On computer:
    python -m http.server
    On router:
    cd /tmp
    wget http://:8000/factory.bin
    mtd -r write factory.bin firmware

Device should reboot at this point.

Reverting to stock:
Download archive with firmware from Ruijie's site and
get .bin file from it. Then write that binary to firmware
partition. After reboot, factory-reset the router using
reset button.

Signed-off-by: Yahor Leonenka <staryjakau@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16202
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:59:54 +02:00
INAGAKI Hiroshi
9415d7861e ramips: add support for ELECOM WSC-X1800GS
ELECOM WSC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh extender,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 2x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/2x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 10.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:6E (Factory, 0x3fff4 (hex))
2.4 GHz: 04:AB:18:xx:xx:6F (Factory, 0x3fffa (hex))
5 GHz  : 04:AB:18:xx:xx:70 (Factory,     0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:52:07 +02:00
INAGAKI Hiroshi
9e906c875b ramips: add support for ELECOM WMC-X1800GST
ELECOM WMC-X1800GST is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh router,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 3x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/5x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 11.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally with "Router" mode
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:BF (Factory, 0x3fff4 (hex))
WAN    : 04:AB:18:xx:xx:C0 (Factory, 0x3fffa (hex))
2.4 GHz: 04:AB:18:xx:xx:C1 (Factory,     0x4 (hex))
5 GHz  : 04:AB:18:xx:xx:C2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:52:07 +02:00
Mieczyslaw Nalewaj
6e1507e720 ramips: TP-Link EC220-G5 v2: swap WLAN leds assignment
Swap incorrect WLAN leds assignment between WLAN 2.4 and 5 GHz for TP-Link EC220-G5 v2

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16331
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 15:31:11 +02:00
Hauke Mehrtens
b638a5f10f ramips: dna_valokuitu-plus-ex400: build sysupgrade.bin
Rename the sysupgrade.tar step to sysupgrade.bin. The sysupgrade.tar is
used in other places and we prefer a sysupgrade.bin instead.

Fixes: fea2264d9f ("ramips: mt7621: Add DNA Valokuitu Plus EX400")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 14:07:26 +02:00
Hauke Mehrtens
746e894877 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>
2024-09-22 14:05:33 +02:00
Mikhail Zhilkin
f368e2d5ec 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-19 23:11:58 +02:00
Mikhail Zhilkin
767e8a0d50 ramips: fix wrong dts files permissions
This files are executable:
   target/linux/ramips/dts/mt7621_openfi_5pro.dts
   target/linux/ramips/dts/mt7621_winstars_ws-wn536p3.dts
Has to be fixed.

Fixes: 5560791 ("ramips: add support for OpenFi 5Pro Travel Router")
Fixes: 2da2705 ("ramips: add support for WINSTARS WS-WN536P3")

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-19 23:11:58 +02:00
Andreas Böhler
6d89aa2987 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>
2024-09-17 21:45:53 +08:00
Rosen Penev
a670cc2864 ramips: mtd_eth_soc: use dev_err_probe
Simplifies the code by avoiding having to manually handle -EPROBE_DEFER.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-09-17 21:45:17 +08:00
Mauri Sandberg
fea2264d9f ramips: mt7621: Add DNA Valokuitu Plus EX400
Specifications:
- Device: DNA Valokuitu Plus EX400
- SoC: MT7621A
- Flash: 256MB NAND
- RAM: 256MB
- Ethernet: Built-in, 2 x 1GbE
- Wifi: MT7603 2.4 GHz, MT7615 5 GHz (4x internal antennas)
- USB: 1x 3.0
- LED: 1x green/red, 1x green
- Buttons: Reset

MAC addresses:
- LAN:     u-boot 'ethaddr' (label)
- WAN:     label + 1
- 2.4 GHz: label + 6
- 5 GHz:   label + 7

Serial:
 There is a black block connector next to the red ethernet connector. It
 is accessible also through holes in the casing.

Pinout (TTL 3.3V)
 +---+---+
 |Tx |Rx |
 +---+---+
 |Vcc|Gnd|
 +---+---+

Firmware:
 The vendor firmware is a fork of OpenWrt (Reboot) with a kernel version
 4.4.93. The flash is arranged as below and there is a dual boot
 mechanism alternating between rootfs_0 and rootfs_1.

 +-------+------+------+-----------+-----------+
 |       | env1 | env2 | rootfs_0  |  rootfs_1 |
 |       +------+------+-----------+-----------+
 |       |         UBI volumes                 |
 +-------+-------------------------------------+
 |U-Boot |             UBI                     |
 +-------+-------------------------------------+
 |mtd0   |             mtd1                    |
 +-------+-------------------------------------+
 |                     NAND                    |
 +---------------------------------------------+

 In OpenWrt rootfs_0 will be used as a boot partition that will contain the
 kernel and the dtb. The squashfs rootfs and overlay are standard OpenWrt
 behaviour.

 +-------+------+------+-----------+--------+------------+
 |       | env1 | env2 | rootfs_0  | rootfs | rootfs_data|
 |       +------+------+-----------+--------+------------+
 |       |         UBI volumes                           |
 +-------+-----------------------------------------------+
 |U-Boot |             UBI                               |
 +-------+-----------------------------------------------+
 |mtd0   |             mtd1                              |
 +-------+-----------------------------------------------+
 |                     NAND                              |
 +-------------------------------------------------------+

U-boot:
 With proper serial access booting can be halted to U-boot by pressing any
 key. TFTP and flash writes are available, but only the first one has been
 tested.

 NOTE: Recovery mode can be accessed by holding down the reset button while
 powering on the device. The led 'Update' will show a solid green light
 once ready. A web server will be running at 192.168.1.1:80 and it will
 allow flashing a firmware package. You can cycle between rootfs_0 and
 rootfs_1 by pressing the reset button once.

Root password:
 With the vendor web UI create a backup of your settings and download the
 archive to your computer. Within the archive in the file
 /etc/shadow replace the password hash for root with that of a password you
 know. Restore the configuration with the vendor web UI and you will have
 changed the root password.

SSH access:
 You might need to enable the SSH service for LAN interface as by default
 it's enabled for WAN only.

Installing OpenWrt:
 With the vendor web UI install the OpenWrt factory image. Alternatively,
 ssh to the device and use sysupgrade -n from cli.

 Finalize by installing the OpenWrt sysupgrade image to get a fully
 functioning system.

Reverting to the vendor firmware:

 Boot with OpenWrt initramfs image
  - Remove volumes rootfs_0, rootfs and rootfs_data and create vendor
    volumes.

    ubirmvol /dev/ubi0 -n 2
    ubirmvol /dev/ubi0 -n 3
    ubirmvol /dev/ubi0 -n 4
    ubimkvol /dev/ubi0 -N rootfs_0 -S 990
    ubimkvol /dev/ubi0 -N rootfs_1 -S 990

 Power off and enter to the U-boot recovery to install the vendor
 firmware.

Known issues:
 - MACs for wifi are stored in currently unknown place but it seems
   to persist over power-off. They might be stored on the chip.

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
[rmilecki: try NVMEM for MACs]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-09-16 08:52:55 +02:00
John Audia
01d8e41c16 kernel: bump 6.6 to 6.6.51
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.51

Removed upstreamed:
	generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch
	generic/backport-6.6/822-v6.11-0012-nvmem-Fix-return-type-of-devm_nvmem_device_get-in-ke.patch
	bcm27xx/patches-6.6/950-1018-drivers-mmc-apply-SD-quirks-earlier-during-probe.patch

Manually rebased:
	bcm27xx/patches-6.6/950-0993-drivers-mmc-cqhci-clear-CQHCI_CTL-if-halt-fails.patch
	ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=e42ea96d6d36a16526cb82b8aa2e5422814c3250
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=3d1baf322a3a69b38b6b2d511cfe0d611d1b5462
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=115a755bb38db5a1175be44e6a9a93a0a8233885
4. Adapted the changes from Hauke Mehrtens' modification in PR#16366 to 5.15.167

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/16370
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-15 16:32:48 +02:00
Daniel Golle
ab25600c65 ramips: mt76x8: add missing model string to Yuncore M300
Add missing 'model' string to DT, so /tmp/sysinfo/model gets populated.

Fixes: e497c975d3 ("ramips: mt76x8: add support for Yuncore M300")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-09-11 00:17:05 +02:00
Daniel Golle
f625d9b31c ramips: mt76x8: add missing model string to Yuncore CPE200
Add missing 'model' string to DT, so /tmp/sysinfo/model gets populated.

Fixes: 64dae1052b ("ramips: mt76x8: add support for Yuncore CPE200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-09-11 00:17:05 +02:00
John Audia
15280316fa kernel: bump 6.6 to 6.6.50
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.50

All patch automatically rebased.

Test version: r27317-8e6543fae5
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/16351
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-09-08 21:29:13 +02:00
Rosen Penev
8e6543fae5 ramips: pinctrl-aw9523: update to current upstream
Various cleanups and bugfixes were applied.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16215
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-07 22:27:01 +02:00
Daniel Golle
64dae1052b ramips: mt76x8: add support for Yuncore CPE200
Yuncore CPE200 is an outdoor unit with IEEE 802.11ac radio.

Hardware:
 - SoC: MediaTek MT7628DAN (MIPS 580MHz)
 - Flash: 8 MiB Spansion S25FL064K
 - RAM: 64 MiB (built-into SoC)
 - WLAN: 5 GHz (MT7613AE)
 - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628)
 - Buttons: 1 Reset button, 2 buttons for display UI (unsupported)
 - LEDs: 4x Green (Power, LAN, WAN, WiFi)
 - Display: 4 digit 7-segment display driven by an additional
            microcontroller (unsupported)
 - Serial console: unpopulated header, 57600 8n1 (RX only)
 - Power: 12 VDC, 1 A

Installation:
The installation can be done via the recovery HTTP server which is built
into the bootloader. Hold down the reset button while connecting the
device to power and keep holding a bit more than 3 seconds. Connect to
http://192.168.0.100/ and upload sysupgrade.bin file.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-09-02 13:27:47 +02:00
Goetz Goerisch
3774f3272e treewide: rename ZyXEL to Zyxel
The company Zyxel rebranded some years ago.
Currently the casing is according to the old branding even
for newer devices which already use the new branding.

This commit aligns the casing of Zyxel everywhere.

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15652
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-25 15:08:25 +02:00
Rosen Penev
4f2dadcf95 ramips: mt7621_nand: don't set owner
Found with coccinelle:

No need to set .owner here. The core will do it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16217
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-25 13:14:07 +02:00
John Audia
3eb08538c4 kernel: bump 6.6 to 6.6.46
This commit makes three changes all needed for the update of the 6.6 kernel.

1. Upstream kernel bump to 6.6.46

	Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.46
	Manually rebased:
        	bcm27xx/patches-6.6/950-0320-spi-spidev-Restore-loading-from-Device-Tree.patch
	All other patches automatically rebased.

2. Adjusted the following for new ksym[1] enabling it:

        armsr/config-6.6
        bcm27xx/bcm2712/config-6.6

3. Added a fix to receiving fraglist GSO packets:

	generic/pending-6.6/601-udp-fix-receiving-fraglist-GSO_packets.patch[2]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v6.6.46&id2=v6.6.45
2. https://marc.info/?l=linux-netdev&m=172407994500599&w=2

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16173
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-20 23:41:08 +02:00
Rosen Penev
40452223d6 ramips: ethernet: use devm for request_irq
Allows removing free_irq. Simpler.

Oddly enough the other switch code already does this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16050
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-19 10:45:06 +02:00
Daniel Golle
e497c975d3 ramips: mt76x8: add support for Yuncore M300
Hardware:
 - SoC: MediaTek MT7628DAN (MIPS 580MHz)
 - Flash: 8 MiB Spansion S25FL064K
 - RAM: 64 MiB (built-into SoC)
 - WLAN: 2.4 GHz (MT7628)
 - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628)
 - Buttons: 1 Reset button
 - LEDs: 1x Red, 1x Green
 - Serial console: unpopulated header, 57600 8n1 (RX only)
 - Power: 12 VDC, 1 A

There are unpopulated areas on the board for 5 GHz WiFi via PCIe as well
as (most likely) Quectel EG25-G 4G module. As both are not populated on
my board support for both is missing for now.

Installation:
The installation can be done via the recovery HTTP server which is built
into the bootloader. Hold down the reset button while connecting the
device to power and keep holding a bit more than 3 seconds. Connect to
http://192.168.188.253/ and upload sysupgrade.bin file.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-08-15 03:19:30 +01:00
Anton Stratonnikov
f51cb74473 ramips: add support for Xiaomi R4AC v2 (intl)
The second edition of international version of Mi Router 4A 100M is
very similar to the non-international one, but has another wireless chip.

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

1. Initialize build-in firmware (use webgui for 192.168.31.1)
  You should install root password

2. Run OpenWRTInvasion for the first time (probably it will fail)
  Version 0.0.10 is working as well as 0.0.1.

3. Run OpenWRTInvasion for the second time
  It will create an access to your router

4. Upload sysupgrade image to router (/tmp/fw.bin)
  pc# nc -l 8080 < …/ramips/mt76x8/…-100m-intl-v2-squashfs-sysupgrade.bin
  router# nc 192.168.31.175 8080 > /tmp/fw.bin

5. Flash new firmware
  router# run mtd -r write /tmp/fw.bin OS1

6. Check result
  Wait about 5-10 minutes after flash. Router should reboot itself and
  turn left led from orange to blue.

In case of failure one can use Xiaomi 4a 100m debrick tool
(it uploads special image via tftpd in recovery mode)
After that you can start again from step 1.

Another actions are very similar to original Mi Router 4A 100M

 Original mtd paritions:
-------------------------

```
Creating 9 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000020000 : "Bootloader"
0x000000020000-0x000000030000 : "Config"
0x000000030000-0x000000040000 : "Factory"
0x000000040000-0x000000050000 : "crash"
0x000000050000-0x000000060000 : "cfg_bak"
0x000000060000-0x000000160000 : "overlay"
0x000000160000-0x000000dc0000 : "OS1"
0x000000dc0000-0x000001000000 : "disk"
with special sub-partition
0x0000002c0000-0x000000dc0000 : "rootfs"
```

We will use OS1+disk space:
```
0x000000160000-0x000001000000 : "firmware"
```

Co-authored-by: Nita Vesa <nita.vesa@elektrik.link>
Signed-off-by: Anton Stratonnikov <billic@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/14304
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-13 00:48:06 +02:00
Rosen Penev
11403697c9 ramips: mt7621_nand: use clk_get_optional_enabled
Simplifies the code by removing clk_disable_unprepare.

Also removed gotos and used dev_err_probe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16133
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-12 19:40:48 +02:00
John Audia
b733b6acb5 kernel: bump 6.6 to 6.6.44
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.44

Removed upstreamed:
	rockchip/patches-6.6/044-v6.11-arm64-dts-rockchip-Add-sdmmc-related-properties-on-r.patch[1]
	rockchip/patches-6.6/045-v6.11-arm64-dts-rockchip-Add-pinctrl-for-UART0-to-rk3308-r.patch[2]
	rockchip/patches-6.6/046-v6.11-arm64-dts-rockchip-Add-mdio-and-ethernet-phy-nodes-t.patch[3]
	rockchip/patches-6.6/048-v6.11-arm64-dts-rockchip-Update-WIFi-BT-related-nodes-on-r.patch[4]
	rockchip/patches-6.6/310-PCI-dw-rockchip-Fix-initial-PERST-GPIO-value.patch[5]

Manually rebased:
	bcm27xx/patches-6.6/950-0526-mfd-Add-rp1-driver.patch
	ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.44&id=96155dc8c99e76a0e58932ca5f88148a37af3617
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.44&id=30ee9e5ecc5fd6854a1690ab11e6e6b4851ac9ab
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.44&id=0c4c1b7daf23bccf0da5b65b3cd5b32bfa5a5af4
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.44&id=a86a5685675834732789df202e73153db59d8dcc
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.44&id=a30211c6704899de0616ac0f97601122d899c86d

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16061
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-06 00:40:42 +02:00
Mieczyslaw Nalewaj
c0e50ebaf7 kernel: rtl8367b: use realtek,extif property
Use realtek,extif property instead of realtek,extif0 to extif2
by extending it with the cpu_port parameter.
The extif number is automatically calculated based on cpu_port.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-06 00:34:14 +02:00
Mieczyslaw Nalewaj
343f4f3c54 kernel: rtl8367: use realtek,extif property
Use realtek,extif property instead of realtek,extif0 and realtek,extif1
by extending it with the cpu_port parameter.
The extif number is automatically calculated based on cpu_port.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-06 00:34:14 +02:00
Shiji Yang
901adc3f2f ramips: fix PCIe reset pins for MTC WR1201
This router has two reset pins, GPIO 8 and GPIO 19. We have to
configure them correctly to ensure that the wireless NICs work
properly.

Fixes: https://github.com/openwrt/openwrt/issues/11736
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-29 01:09:24 +02:00
Shiji Yang
27510dc01b ramips: create shared dtsi for ZBT WE1326 and WE3526
The hardware of these two models looks the same. This patch also
disabled unused i2c bus for WE3526.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-29 01:09:24 +02:00
Shiji Yang
0c2a522960 ramips: fix WiFi LED for ZBT WE3526
All WiFi LEDs should be triggered by low level voltage.

Fixes: https://github.com/openwrt/openwrt/issues/7485
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-29 01:09:24 +02:00
Shiji Yang
ddb322a7c8 ramips: fix PCIe port number for ZBT WE3526
From the kernel log, we are using PCIe port 1 and 2.

dmesg:
```
[ 0.963526] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[ 0.970432] mt7621-pci 1e140000.pcie: PCIE1 enabled
[ 0.975312] mt7621-pci 1e140000.pcie: PCIE2 enabled
[ 1.071442] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[ 1.130382] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000
```

Fixes: https://github.com/openwrt/openwrt/issues/16000
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-29 01:09:24 +02:00
Rani Hod
5d0ccaf67c ramips: mt7621: add support for Wodesys WD-R1802U
This commit adds support for a dual-band AX1800 wall plug manufactured
by Shenzhen Century Xinyang Tech Co., Ltd.

CPU:	Mediatek MT7621A (2 cores, 4 threads)
RAM:	256i MiB DDR3 (Samsung K4B2G1646F-BCNB)
ROM:	16 MiB SPI NOR (Winbond W25Q128JVPQ)
Wired:	one gigabit RJ45 port (with green/yellow non-GPIO LEDs)
WiFi:	Mediatek MT7905DAN + MT7975DN (DBDC 2x 2T2R)
Ant.:	four 2 dBi external antennas (two 2.4GHz, two 5 GHz)
GPIO:	tri-color status LED (GPIO 13, 14, 16);
	reset button (GPIO 18)
Power:	12V 2-pin JST-XH on main PCB
	110/220V AC to 12V1A DC on auxiliary PCB
UART:	115200 8n1, SMD pads available on the PCB as J4
	pinout is [3v3] (Rx) (Tx) (Gnd)
MAC:	1C:BF:CE:xx:xx:xx	(2.4 GHz, label)
	1C:BF:CE:xx:xx:xx + 1	(ethernet [1])
	1C:BF:CE:xx:xx:xx + 2	(5 GHz)

Original firmware is LEDE Reboot 17.01-SNAPSHOT (kernel 4.4.198)
with a few custom packages and a non-LuCI web interface.
Telnet and SSH are enabled, requiring an unknown root password [2].
Root password is also needed to access the router via UART console,
but passwordless telnet can be enabled via a trivial web exploit [3]
and then the root password can be removed by editing `/etc/shadow`.

Installation: First upload `sysupgrade` binary via web interface at
  `http://192.168.188.1/settings.shtml` and wait until getting back to
  the home screen (select network to extend). The installation fails
  since the original firmware uses `swconfig` and recent versions of
  OpenWrt use DSA. However, the sysupgrade file is uploaded correctly
  and stored at `/tmp/upgrade.bin`, so it can be written to flash via
  the web exploit [4] (both `mtd -r write` and `sysupgrade -Fn` work
  fine). Passwordless telnet/ssh is not needed for installation.
  Alternatively, use u-boot menu to load image via TFTP.

Notes:
- Device model in LEDE is "MediaTek MT7621 RFB (802.11ax,SNOR)".
- It is sold under several names, among them are Wodesys WD-R1802U,
  Fenvi F-AX1802U, and EDUP EP-2971; the Wodesys brand was selected
  since it is referenced in `/etc/banner` and `/etc/hosts`, and the
  PCB is marked "WD518A V1.0".
- Instead of a standard ethernet transformer, the PCB has a few tiny
  SMD coils.

[1] Original firmware sets ethernet MAC to 1C:BF:CE:E7:62:1D based on
    offset `0x3fff4` in the Factory partition; since this is the same
    MAC for all units, whereas WiFi MACs stored at offsets 0x6 and 0xc
    are unique, it was decided to use <label MAC + 1> for ethernet.
[2] root:$1$7rmMiPJj$91iv9LWhfkZE/t7aCBdo.0:18388:0:99999:7:::
[3] curl -X POST http://192.168.188.1/cgi-bin/adm.cgi \
    -d page=Lang -d langType="en;killall telnetd;telnetd -l /bin/sh"
[4] curl -X POST http://192.168.188.1/cgi-bin/adm.cgi \
    -d page=Lang -d langType="en;mtd -r write /tmp/upgrade.bin firmware"

Signed-off-by: Rani Hod <rani.hod@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15777
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 20:21:08 +02:00
Hauke Mehrtens
dbccc9cf91 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-28 16:12:51 +02:00