openwrt/target/linux
Yaoguang Bai 6b32a5d768 mediatek: filogic: add support for NRadio C8-668GL
NRadio C8-668GL is a Wi-Fi 6 5G cellular router based on MediaTek MT7981B SoC.

- **SoC**: MediaTek MT7981B (2x Cortex-A53, 1.3GHz)
- **RAM**: Nanya NT5AD512M16C4-JR 1GB DDR4
- **Flash**: ESMT FC51L08SFY3A 8GB eMMC
- **Ethernet**:
  - 1x 2.5GbE (via GMAC0 and GPY211 PHY, shared with MT7531AE)
  - 3x 10/100/1000 Mbps (via MT7531AE, connected to GMAC0)
  - 5G Modem: GMAC1 (via GPY211 PHY - RTL8125BG - RM520N-GL)
- **Wi-Fi**: MediaTek MT7976CN (2.4GHz/5GHz, 802.11ax, 2x2 MIMO, AX3000)
- **Buttons**: Reset, WPS
- **LEDs**: Power, 5G, 4G, WiFi
- **SIM Slot**: 1x Nano SIM
- **5G Modem**: Quectel RM520N-GL (Snapdragon™ X62)
- **Power**: 12V/2A DC, 5.5×2.1 connector

The MAC addresses are derived from the `fac_mac` field in the `bdinfo` partition, formatted as `fac_mac = HWMAC`. The allocation is as follows:

| Vendor  | OpenWrt Interface | Address       | Notes                                          |
|---------|-------------------|---------------|------------------------------------------------|
| LAN     | br-lan            | Label MAC     | Default                                        |
| WAN     | lan4              | Label MAC+1   | Only when lan4 is switched to WAN             |
| 2.4GHz  | phy0-ap0          | Label MAC     |                                                |
| 5GHz    | phy1-ap0          | Label MAC     | (Local Admin bit set)                         |
| Modem   | eth1              | Label MAC+2   |                                                |

1. Log in to the router via `http://192.168.66.1`/.
2. Upgrade the official firmware to dual-system mode.
3. Select **Burn second system** and upload the `sysupgrade.bin` image.
   - Download the image from the OpenWrt build system or build it yourself using the OpenWrt buildroot.
4. Wait for 30 seconds and click **Switch system**.
5. The device will reboot and switch to OpenWrt.

Set the U-Boot environment variable `boot_system=0` and reboot:
```bash
fw_setenv boot_system 0
```

Power off the router, hold the **WPS button**, and power it back on.

1. Rename the stock firmware file to **`recovery.bin`**.
2. Set your PC's Ethernet IP to **192.168.1.88** and connect it to the lan1 port on the router.
3. Run a TFTP server and place the `recovery.bin` file in its root directory.
4. Power off the router, press and hold the **Reset button**, and power it back on.
5. Release the Reset button when the TFTP server shows activity.
6. Wait for the router to flash the firmware and reboot automatically.

- By default, `lan4` is part of `br-lan` and uses the label MAC address.
- To query the RM520N-GL module, use the following command:
  ```bash
  cat /dev/ttyUSB2 & printf 'ATI\r\n' > /dev/ttyUSB2
  ```

Signed-off-by: Yaoguang Bai <0xdeadc0de@badguys.club>
Link: https://github.com/openwrt/openwrt/pull/17093
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-13 15:29:04 +01:00
..
airoha airoha: an7581: sync patch with upstream version and tag them 2024-11-18 15:01:07 +01:00
apm821xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
armsr armsr: don't limit kmods to armsr armv8 subtarget 2024-10-29 00:07:55 +01:00
at91 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ath79 ath79: usb: remove reset names 2024-12-13 15:29:04 +01:00
bcm27xx kernel: bump 6.6 to 6.6.63 2024-11-23 14:06:17 +01:00
bcm47xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm53xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm4908 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bmips kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
d1 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
gemini kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
generic kernel: packages: fix building package/devel/perf with -O3 2024-12-08 19:02:48 +01:00
imx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ipq40xx ipq40xx: use PHY to control USB GPIO 2024-12-12 19:54:09 +01:00
ipq806x ipq806x: tr4400v2: fix dtc warnings by deleting stock partitions 2024-11-19 13:44:27 +01:00
ixp4xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
kirkwood kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
lantiq lantiq: use regulator for USB GPIO 2024-12-13 15:29:03 +01:00
layerscape kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
loongarch64 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
malta kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
mediatek mediatek: filogic: add support for NRadio C8-668GL 2024-12-13 15:29:04 +01:00
mpc85xx mpc85xx: p2020: add missing symbols 2024-11-19 19:52:45 +01:00
mvebu mvebu: devm for mutex_init 2024-11-23 17:19:56 +01:00
mxs mxs: run kernel_oldconfig 2024-11-23 16:47:53 +01:00
octeon kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
omap kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
pistachio kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qoriq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qualcommax qualcommax: use ath11k_patch_mac for MR7350 2024-12-11 17:02:14 +01:00
ramips ramips: mt76x8: add support for Keenetic KN-3211 2024-12-05 23:09:43 +01:00
realtek realtek: align kernel config with upstream 2024-11-16 18:02:18 +01:00
rockchip kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
sifiveu kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
siflower kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
starfive kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
stm32 stm32: Remove unnecessary kernel options 2024-11-24 22:51:14 +01:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-16 00:25:14 +01:00
tegra kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 x86: Deactivate kernel options with extra overhead 2024-11-24 20:03:59 +01:00
zynq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00