Files
openwrt/target/linux/mediatek
Filip Milivojevic 4858ed9dbd mediatek: filogic: add support for Cudy P2 v1
This commit adds support for the Cudy P2 v1, a router with integrated 5G modem.

The device is similar to Cudy WR3000E v1.

SoC: MediaTek MT7981 WiSoC
RAM: 256MB DDR3
Flash: 128MB SPI-NAND
Wireless: Mediatek MT7981 2x2 DBDC 802.11ax (2.4 / 5)
5G Modem: Quectel RG500U-EB
Ethernet: 1 WAN/LAN GbE, 1 LAN GbE

MAC Addresses in OpenWrt:
Interface lan: factory mac address
Interface wan: factory mac address +1
Wifi 2.4GHz: factory mac address
Wifi 5GHz: factory mac address with local bit set

GPIO:
- 1 Button:
  - Reset on GPIO 1
- 5 Software switches:
  - voippwr on GPIO 4 active low
  - voip_volte on GPIO 5 active low
  - 5gpwr on GPIO 6 active low
  - ant on GPIO 7 active high
  - usb5g on GPIO 8 active high
- 8 LEDs:
  - Power: white on GPIO 2 active high
  - Internet: white on GPIO 14 active high
  - Internet: yellow on GPIO 15 active high
  - Internet: red on GPIO 26 active high
  - WLAN: white on GPIO 13 active high
  - Mobile: white on GPIO 30 active low
  - Mobile: yellow on GPIO 28 active high
  - Mobile: red on GPIO 27 active high

Disassembly:
- Remove two screws hidden behind the rubber stand.
- Remove center solid plastic circle with a spudger and remove four screws.
- Slide the interior with the board up.

UART:
- UART pads are accessible on the bottom of the board and labeled
- Solder three pins: GND, RX, TX, do not connect 3V3 pin
- Settings: 115200 8N1 3.3V

5G Modem:

Quectel RG500U-EB is soldered on board and connected via
USB 2.0 High Speed at 480Mb/s and PCIe v2 x1 at 5GT/s.

The modem is usable with upstream drivers only via PPP mode using the ttyUSB2 AT port.

The modem doesn't provide access via USB rndis_host or cdc_ncm - it should work by sending the following commands:
- AT+QCFG="ethernet",0
- AT+QCFG="usbnet",5 (for NCM or 3 for RNDIS or 1 for ECM)
- AT+QCFG="nat",0
- rebooting the modem via AT+CFUN=1,1 and rebooting the device.

It appears that the firmware is locked down and doesn't want to change the configuration and enable usb networking.

It is possible to use vendor sprd_pcie driver and use virtual PCIe network interface by sending the commands:
- AT+QCFG="ethernet",1
- AT+QCFG="nat",0
- rebooting the modem via AT+CFUN=1,1 and rebooting the device.

Connection via USB and PCIe network interface should work (but doesn't work via USB) using:
- AT+QICSGP=1,3,"apnname","username","password",3
- AT+QNETDEVCTL=1,1,1

Migration to OpenWrt using TFTP:
- Connect UART as described above
- Press the reset button while powering on the device
- U-Boot will now try to load a recovery.bin via TFTP, this must be ignored
- After detecting a timeout, the U-Boot console is available via UART
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the initramfs image via TFTP as cudyp2.bin
- Run the following command in U-Boot: tftpboot 0x46000000 cudyp2.bin; bootm 0x46000000
- OpenWrt initramfs image is now booting and accessible via 192.168.1.1
- Flash the sysupgrade image

Revert back to OEM:
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the Cudy firmware via TFTP as recovery.bin
- Press the reset button while powering on the device
- Recovery process will start now
- After recovery is done, the OEM firmware is available at 192.168.10.1 again

Migration to OpenWrt via OEM firmware:
- There should be a migration image available from Cudy as soon as there is official OpenWrt support
- Download the migration image via OEM web interface
- After flashing, OpenWrt is accessible via 192.168.1.1
- Flash the official OpenWrt image

Signed-off-by: Filip Milivojevic <zekica@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23721
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-18 09:17:19 +02:00
..
2026-09-16 11:43:34 +02:00