aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/filogic/base-files
Commit message (Collapse)AuthorAgeFilesLines
* filogic: add support for Netgear WAX220Flole Systems2023-06-263-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SOC: MediaTek MT7986 RAM: 1024MB DDR3 FLASH: 128MB SPI-NAND (Winbond) WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz ETH: Realtek RTL8221B-VB-CG 2.5 N-Base-T PHY with PoE UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC) Installation ------------ 1. Download the OpenWrt initramfs image. Copy the image to a TFTP server 2. Connect the TFTP server to the WAX220. Conect to the serial console, interrupt the autoboot process by pressing '0' when prompted. 3. Download & Boot the OpenWrt initramfs image. $ setenv ipaddr 192.168.2.1 $ setenv serverip 192.168.2.2 $ tftpboot openwrt.bin $ bootm 4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade. $ sysupgrade -n <path-to-sysupgrade.bin> Signed-off-by: Flole Systems <flole@flole.de> Signed-off-by: Stefan Agner <stefan@agner.ch> (cherry picked from commit 984786a2f7ec622c99e8c9cdada65d0ea0cf4e0b)
* mediatek: set new compat version if booted on R64 and R3Daniel Golle2023-06-091-0/+10
| | | | | | | | | | | | | | | | | | If the board comes up with OpenWrt that means that the bootloader is recent enough and knows about the new device tree overlays. Using /etc/board.d/ is not enough in this case because it doesn't overwrite existing configuration which may exist (and is fine to exist) if the user updated with 'sysupgrade -F *.itb' and has kept configuration. They would still need to manually set compat_version even though the fact that the bootloader env has been updated can be implied by the fact that the system has started. Hence we can always set compat_version=1.1 for those two boards using uci-defaults. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 25e27c4af3f1de872aadbaada434437cba3b0a75)
* mediatek: sync MT7986 device trees with upstreamDaniel Golle2023-06-091-0/+15
| | | | | | | | | Sync device tree files for MT7986 boards with what landed in upstream Linux tree to easy maintainance and also allow for a smooth update to Linux 6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 7a0ec001ff79b12beefb8f3773820bfedebbb340)
* mediatek: filogic: add Qihoo 360T7 supportChukun Pan2023-05-293-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: ESMT F50L1G41LB 128MB RAM: MT5CC128M16JR-EK 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, WPS Power: DC 12V 1A Flash instructions: 1. Attach UART, boot the stock firmware until the message about failsafe mode appears. 2. Enter failsafe mode by pressing "f" and "Enter" 3. Type "mount_root", then run "fw_setenv bootmenu_delay 3" 4. Back up all mtd partitions before flashing. 5. Reboot, U-Boot now presents a menu. 6. Connect to your PC via the Gigabit port of the router, set a static ip on the ethernet interface of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 7. Select "Upgrade ATF BL2", then use this file: openwrt-mediatek-filogic-qihoo_360t7-preloader.bin 8. Select "Upgrade ATF FIP", then use this file: openwrt-mediatek-filogic-qihoo_360t7-bl31-uboot.fip 9. Download the initramfs image, and type "reset", waiting for tftp recovery to complete. a. After openwrt boots up, perform sysupgrade. Note: 1. Since NMBM is disabled, we must back up all partitions. 2. Flash instructions is based on commit 28df7f7. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> (cherry picked from commit dc2d4d73939c3d86a8e9d968c5c3462f92771bc6) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add basic mt7988 device tree supportSam Shih2023-05-241-0/+3
| | | | | | | | This add basic device tree support for mediatek MT7988 SoC Signed-off-by: Sam Shih <sam.shih@mediatek.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit e3a681bab4b2c193704e76b8a6091e57f0fab14e)
* mediatek: add support for Zyxel EX5601-T0 routerPietro Ameruoso2023-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zyxel EX5601-T0 specifics -------------- The operator specific firmware running on the Zyxel branded EX5601-T0 includes U-Boot modifications affecting the OpenWrt installation. Partition Table | dev | size | erasesize | name | | ---- | -------- | --------- | ------------- | | mtd0 | 20000000 | 00040000 | "spi0.1" | | mtd1 | 00100000 | 00040000 | "BL2" | | mtd2 | 00080000 | 00040000 | "u-boot-env" | | mtd3 | 00200000 | 00040000 | "Factory" | | mtd4 | 001c0000 | 00040000 | "FIP" | | mtd5 | 00040000 | 00040000 | "zloader" | | mtd6 | 04000000 | 00040000 | "ubi" | | mtd7 | 04000000 | 00040000 | "ubi2" | | mtd8 | 15a80000 | 00040000 | "zyubi" | The router boots BL2 which than loads FIP (u-boot). U-boot has hardcoded a command to always launch Zloader "mtd read zloader 0x46000000" and than "bootm". Bootargs are deactivated. Zloader is the zyxel booloader which allow to dual-boot ubi or ubi2, by default access to zloader is blocked. Too zloader checks that the firmware contains a particolar file called zyfwinfo. Additional details regarding Zloader can be found here: https://hack-gpon.github.io/zyxel/ https://forum.openwrt.org/t/adding-openwrt-support-for-zyxel-ex5601-t0/155914 Hardware -------- SOC: MediaTek MT7986a CPU: 4 core cortex-a53 (2000MHz) RAM: 1GB DDR4 FLASH: 512MB SPI-NAND (Micron xxx) WIFI: Wifi6 Mediatek MT7976 802.11ax 5 GHz 4x4 + 2.4GHZ 4x4 ETH: MediaTek MT7531 Switch + SoC 3 x builtin 1G phy (lan1, lan2, lan3) 1 x MaxLinear GPY211B 2.5 N-Base-T phy5 (lan4) 1 x MaxLinear GPY211B 2.5Gbit xor SFP/N-Base-T phy6 (wan) USB: 1 x USB 3.2 Enhanced SuperSpeed port UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC) VOIP: 2 FXS ports for analog phones MAC Address Table ----------------- eth0/lan Factory 0x002a eth1/wan Factory 0x0024 wifi 2.4Ghz Factory 0x0004 wifi 5Ghz Factory 0x0004 + 1 Serial console (UART) --------------------- +-------+-------+-------+-------+-------+ | +3.3V | RX | TX | KEY | GND | +---+---+-------+-------+-------+-------+ | +--- Don't connect Installation ------------ Keep in mind that openwrt can only run on the UBI partition, the openwrt firmware is not able to understand the zloader bootargs. The procedure allows restoring the UBI partition with the Zyxel firmware and retains all the OEM functionalities. 1. Unlock Zloader (this will allow to swap manually between partitions UBI and UBI2): - Attach a usb-ttl adapter to your computer and boot the router. - While the router is booting at some point you will read the following: `Please press Enter to activate this console.` - As soon as you read that press enter, type root and than press enter again (just do it, don't care about the logs scrolling). - Most likely the router is still printing the boot log, leave it boot until it stops. - If everything went ok you should have full root access "root@EX5601-T0:/#". - Type the following command and press enter: "fw_setenv EngDebugFlag 0x1". - Reboot the router. - As soon as you read `Hit any key to stop autoboot:` press Enter. - If everything went ok you should have the following prompt: "ZHAL>". - You have successfully unlocked zloader access, this procedure must be done only once. 2. Check the current active partition: - Boot the router and repeat the steps above to gain root access. - Type the following command to check the current active image: "cat /proc/cmdline". - If `rootubi=ubi` it means that the active partition is `mtd6` - If `rootubi=ubi2` it means that the active partition is `mtd7` - As mentioned earlier we need to flash openwrt into ubi/mtd6 and never overwrite ubi2/mtd7 to be able to fully roll-back. - To activate and boot from mtd7 (ubi2) enter into ZHAL> command prompt and type the following commands: atbt 1 # unlock write atsw # swap boot partition atsr # reboot the router - After rebooting check again with "cat /proc/cmdline" that you are correctly booting from mtd7/ubi2 - If yes proceed with the installation guide. If not probably you don't have a firmware into ubi2 or you did something wrong. 3. Flashing: - Download the sysupgrade file for the router from openwrt, than we need to add the zyfwinfo file into the sysupgrade tar. Zloader only checks for the magic (which is a fixed value 'EXYZ') and the crc of the file itself (256bytes). I created a script to create a valid zyfwinfo file but you can use anything that does exactly the same: https://raw.githubusercontent.com/pameruoso/OpenWRT-Zyxel-EX5601-T0/main/gen_zyfwinfo.sh - Add the zyfwinfo file into the sysupgrade tar. - Enter via telnet or ssh into the router with admin credentials - Enter the following commands to disable the firmware and model checks "zycli fwidcheck off" and "zycli modelcheck off" - Open the router web interface and in the update firmware page select the "restore default settings option" - Select the sysupgrade file and click on upload. - The router will flash and reboot itself into openwrt from UBI 4. Restoring and going back to Zyxel firmware. - Use the ZHAL> command line to manually swap the boot parition to UBI2 with the following: atbt 1 # unlock write atsw # swap boot partition atsr # reboot the router - You will boot again the Zyxel firmware you have into UBI2 and you can flash the zyxel firmware to overwrite the UBI partition and openwrt. Working features ---------------- 3 gbit lan ports Wifi Zyxel partitioning for coexistance with Zloader and dual boot. WAN SFP port (only after exporting pins 57 and 10. gpiobase411) leds reset button serial interface usb port lan ethernet 2.5 gbit port (autosense) wan ethernet 2.5 gbit port (autosense) Not working ---------------- voip (missing drivers or proper zyxel platform software) Swapping the wan ethernet/sfp xor port ---------------- The way to swap the wan port between sfp and ethernet is the following: export the pins 57 and 10. Pin 57 is used to probe if an sfp is present. If pin 57 value is 0 it means that an sfp is present into the cage (cat /sys/class/gpio/gpio468/value). If pin 57 value is 1 it means that no sfp is inserted into the cage. In conclusion by default both 57 an 10 pins are by default 1, which means that the active port is the ethernet one. After inserting an SFP pin 57 will become 0 and you have to manually change the value of pin 10 to 0 too. This is totally scriptable of course. Leds description ------------ All the leds are working out of the box but the leds managed by the 2 maxlinear phy (phy 5 lan, phy6 wan). To activate the phy5 led (rj45 ethernet port led on the back of the router) you have to use mdio-tools. To activate the phy6 led (led on the front of the router for 2.5gbit link) you have to use mdio-tools. Example: Set lan5 led to fast blink on 2500/1000, slow blink on 10/100: mdio mdio-bus mmd 5:30 raw 0x0001 0x33FC Set wan 2.5gbit led to constant on when wan is 2.5gbit: mdio mdio-bus mmd 6:30 raw 0x0001 0x0080 Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it> (cherry picked from commit 1c05388ab04c934ec240e8362321908f91381a90) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for the GL.iNet GL-MT3000Daniel Golle2023-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | The MT-3000 is a pocket-sized Wi-Fi 6 router based on MediaTek MT7981. Specification: - SoC: MediaTek MT7981B - CPU: 2x 1.3 GHz Cortex-A53 - Flash: 256 MiB Macronix SPI NAND - RAM: 512 MiB Nanya DDR4 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN) - Ethernet: - 1x 10/100/1000 Mbps built-in PHY (LAN) - 1x 10/100/1000/2500 Mbps MaxLinear GPY211 PHY (WAN) - USB 3.0 port - Buttons: 1 button, 1 switch - LEDs: 1x light-blue, 1x warm-white - Serial console: internal 4-pin header, 115200 8n1 - PWM controlled fan with tacho - Power: 5 VDC, 3 A (USB Type-C) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for Cudy WR3000 v1David Bauer2023-05-184-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- MediaTek MT7981 WiSoC 256MB DDR3 RAM 16MB SPI-NOR (XMC XM25QH128C) MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4 / 5) UART: 115200 8N1 3.3V [LEDS] VCC-GND-RX-TX [ETH] Header is located below the heatsink Case ---- Unscrew the 4 bottom screws. Remove the top of the case by inserting a small screwdriver into the ventilation holes and lift the top cover. This works best by beginning near the ETH-ports. The top is clipped on the front near the LEDs with two plastic clips. The back has a single clip in the middle. Start at one of the back edges. MAC-Addresses ------------- 80:AF:CA:00:F9:C6 LAN 80:AF:CA:00:F9:C7 WAN 80:AF:CA:00:F9:C6 W2 82:AF:CA:30:F9:C6 W5 Installation ------------ 1. Connect to the serial port as described in the "Hardware" section. 2. Power on the device. Keep pressing the "0" key to enter the U-Boot shell. 3. Download the OpenWrt initramfs image. Place it on an TFTP server connected to the Cudy LAN ports. Make sure the server is reachable at 192.168.1.2. Rename the image to "cudy3000.bin" 4. Download and boot the OpenWrt initramfs image. $ tftpboot 0x46000000 cudy3000.bin; bootm 0x46000000 5. Transfer the OpenWrt sysupgrade image to the device using scp. Install with sysupgrade. Note: Cudy does not yet provide a image for disabling their signature-protection. This has happened in the past. Make sure to check the wiki for a possible easier installation method. Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: fix typoDavid Bauer2023-05-181-1/+1
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: add support for TP-Link TL-XDR4288/608xChukun Pan2023-04-223-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: ESMT F50L1G41LB 128MB RAM: ESMT M15T4G16256A 512MB Ethernet (Max Speed): XDR4288: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan XDR6086: 1x 2.5G Wan, 1x 2.5G Lan, 1x 1G Lan XDR6088: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan WiFi: XDR4288: MT7976DAN (2.4G 2T2R, 5G 3T3R) XDR6086/XDR6088: WiFi1: MT7976GN 2.4GHz 4T4R WiFi2: MT7976AN 5GHz 4T4R Button: Reset, WPS, Turbo USB: 1 x USB 3.0 Power: DC 12V 4A Flash instructions: 1. Execute the following operation to open nc shell: https://openwrt.org/inbox/toh/tp-link/xdr-6086#rooting 2. Replace the stock bootloader to OpenWrt's: dd bs=131072 conv=sync of=/dev/mtdblock9 if=/tmp/xxx-preloader.bin dd bs=131072 conv=sync of=/dev/mtdblock9 seek=28 if=/tmp/xxx-bl31-uboot.fip 3. Connect to your PC via the Gigabit port of the router, set a static ip on the ethernet interface of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 4. Download the initramfs image, and restart the router, waiting for tftp recovery to complete. 5. After openwrt boots up, perform sysupgrade. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> [Add uboot build, fit and sysupgrade support, fix RealTek PHYs] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: remove redundant code for tuf-ax4200Chukun Pan2023-04-211-2/+1
| | | | | | Remove redundant code in 02_network. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: filogic: move mac address setting togetherChukun Pan2023-04-211-4/+6
| | | | | | Simultaneously sort in the order of letters. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: filogic: fix network config for mt7986a-rfbChukun Pan2023-04-211-1/+3
| | | | | | | Fix the network configuration according to the device tree. Fixes: 5faff99 ("mediatek: filogic: fix mt7986a ethernet devicetree entries") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* filogic: add support for ASUS TUF-AX4200David Bauer2023-03-245-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SOC: MediaTek MT7986 RAM: 512MB DDR3 FLASH: 256MB SPI-NAND (Winbond W25N02KV) WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz ETH: MediaTek MT7531 Switch MaxLinear GPY211C 2.5 N-Base-T PHY UART: 3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC) Installation ------------ 1. Download the OpenWrt initramfs image. Copy the image to a TFTP server reachable at 192.168.1.66/24. Rename the image to tufax4200.bin. 2. Connect the TFTP server to the AX4200. Conect to the serial console, interrupt the autoboot process by pressing '4' when prompted. 3. Download & Boot the OpenWrt initramfs image. $ setenv ipaddr 192.168.1.1 $ setenv serverip 192.168.1.66 $ tftpboot 0x46000000 tufax4200.bin $ bootm 0x46000000 4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade. $ sysupgrade -n <path-to-sysupgrade.bin> Missing features ---------------- - The LAN port LEDs are driven by the switch but OpenWrt does not correctly configure the output. Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: fix wrong return code in platform_check_image()Chen Minqiang2023-01-291-1/+1
| | | | | | Ensure that the platform_check_image() function returns an error code. Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* mediatek: filogic: fix sysupgrade on MMC on the BPi-R3Daniel Golle2023-01-161-4/+7
| | | | | | | | A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: drop redmi-ax6000 variant with modified envChuanhong Guo2022-12-302-3/+0
| | | | | | | | | | | | | | | | | | | This variant uses xiaomi factory u-boot and modified u-boot-env & bootcmd. By modifying uboot-env, the xiaomi firmware recovery provided in the vendor u-boot doesn't work anymore. It's possible to put u-boot into a state where it refuese to take any serial input. If the u-boot is in this state, users can't restore their firmware without taking the flash off the board. We now have a -stock variant where the vendor u-boot is used in a way that xiaomi firmware recovery still works, and a -ubootmod variant where we get rid of all xiaomi components, have more usable space and no uart console lock. These two should cover all use cases and we don't need this variant anymore. Drop this redmi-ax6000 variant. Existing users of this variant should perform a u-boot mod or restore to the -stock layout. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add new layout for Xiaomi Redmi Router AX6000 for OpenWrt U-BootFurong Xu2022-12-293-3/+10
| | | | | | | | | This new layout is only bootable with OpenWrt U-Boot. It reuses the two crash partions and expands the ubi partion to the end of whole flash. Do not use this layout with stock U-Boot! Signed-off-by: Furong Xu <xfr@outlook.com>
* mediatek: add alternative stock layout for Xiaomi Redmi Router AX6000Chen Minqiang2022-12-173-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this implementation, the flash partition layout is adjusted to avoid modifying the uboot environment of mtdparts. This ensures that the 30M ubi_kernel partition remains aligned with the stock ubi partition, and the kernel volume is placed in it. This allows the stock uboot to boot from it without changing the mtdparts, which is useful for reverting back to the stock firmware using Xiaomi Firmware Tools. In actual testing, modifying mtdparts has been found to break Xiaomi Firmware Tools. 1. use ARTIFACTS to generate initramfs-factory.ubi for easy installation. 2. The NAND flash layout is changed to allow for reverting back to the stock firmware. 3. Before performing sysupgrade, do some cleanup in platform_pre_upgrade to ensure a clean installation of OpenWRT. 4. Setup the uboot env to ensure that the system always boot, which can be helpful for users who may forget to do this before sysupgrade in the initramfs. New flash instructions: 1. Gain ssh access. Please refer to: https://openwrt.org/toh/xiaomi/redmi_ax6000#installation) 2. Check which system current u-boot is loading from: COMMAND: `cat /proc/cmdline` sample OUTPUT: `console=ttyS0,115200n1 loglevel=8 firmware=1 uart_en=1` if firmware=1, current system is ubi1 if firmware=0, current system is ubi0 3. Setup nvram and write the firmware: If the current system is ubi1, please set it up so that the next time it will boot from ubi, and write the firmware to 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 ubiformat /dev/mtd8 -y -f /tmp/initramfs-factory.ubi ``` If the current system is ubi, please set it up so that the next time it will boot from ubi1, and write the firmware to ubi1: ``` 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 ubiformat /dev/mtd9 -y -f /tmp/initramfs-factory.ubi ``` 4. After rebooting, the system should now boot into the openwrt initramfs. Flash the squashfs-sysupgrade.bin via using ssh or luci. ``` sysupgrade -n /tmp/squashfs-sysupgrade.bin ``` Done. For existing users of the Redmi AX6000 running OpenWrt, here are the steps to switch to this new layout: 1. Flash initramfs-factory.ubi ``` mtd -r -e ubi write /tmp/initramfs-factory.ubi ubi ``` 2. After rebooting, the system will boot into the new openwrt-initramfs. Log in and perform a sysupgrade to complete the process. ``` sysupgrade -n /tmp/squashfs-sysupgrade.bin ``` Signed-off-by: Chen Minqiang <ptpt52@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add LED support for Xiaomi Redmi AX6000Furong Xu2022-12-161-0/+16
| | | | | | | add DT nodes and default package for the LEDs on Redmi AX6000 Signed-off-by: Furong Xu <xfr@outlook.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: set persistent wifi mac for bpi-r64 and bpi-r3Daniel Golle2022-11-241-0/+18
| | | | | | | Use persistent MAC address for the built-in wireless interfaces of the BPi-R64 and BPi-R3 development boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add Xiaomi Redmi Router AX6000 supportChukun Pan2022-10-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: ESMT F50L1G41LB 128 MB RAM: K4A4G165WF-BCWE 512 MB Ethernet: 4x 10/100/1000 Mbps WiFi1: MT7976GN 2.4GHz ax 4x4 WiFi2: MT7976AN 5GHz ax 4x4 Button: Mesh, Reset Flash instructions: 1. Gain ssh and serial port access, see the link below: https://openwrt.org/toh/xiaomi/redmi_ax6000#installation 2. Use ssh or serial port to log in to the router, and execute the following command: nvram set boot_wait=on nvram set flag_boot_rootfs=0 nvram set flag_boot_success=1 nvram set flag_last_success=1 nvram set flag_try_sys1_failed=8 nvram set flag_try_sys2_failed=8 nvram commit 3. Set a static ip on the ethernet interface of your computer (e.g. default: ip 192.168.31.100, gateway 192.168.31.1) 4. Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server. 5. Interrupt U-Boot and run these commands: setenv mtdparts nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),112640k(ubi) saveenv tftpboot initramfs.bin bootm 6. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Revert to stock firmware: Restore mtdparts back to default, then use the vendor's recovery tool (Windows only). Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: filogic: don't rely on image preset in flash or sysupgradeDaniel Golle2022-10-181-11/+6
| | | | | | | | Instead of trying to figure out the actual root device, just use the kernel 'root' cmdline parameter as a hint to decide which device to flash to. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7986a/b-rfb: fix 02_network setupChukun Pan2022-09-091-1/+1
| | | | | | | | According to the device tree, the lan ports are lan0 to lan3, and the wan port is eth1. Fixes: cffc77a ("mediatek: add filogic subtarget") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: fix sysupgrade on MTK7986 rfba APDaniel Golle2022-09-061-0/+1
| | | | | | | | | A line in platform.sh was accidentally removed when adding support for the Bananapi BPi-R3. Re-add it to fix sysupgrade on the MTK7986 rfba AP. Fixes: a96382c1bb ("mediatek: add support for Bananapi BPi-R3") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for Bananapi BPi-R3Daniel Golle2022-08-302-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Bananapi BPi-R3 is a development router board built around the MediaTek Filogic 830 (MT7986A) SoC. The board can boot either from microSD, SPI-NAND, SPI-NOR or eMMC. Only either SPI-NAND or SPI-NOR can be used at the same time, also only either microSD or eMMC can be used. The various storage options can be selected using small SMD switches on the board. Specs: * MediaTek MT7986A (Filogic 830) 4x ARM Cortex A53 * 4T4R 2.4G 802.11bgnax (MT7975N) * 4T4R 5G 802.11anac/ax (MT7975P) * 2 GB DDR4 RAM * 8 GB eMMC * 128 MB SPI-NAND flash * 32 MB SPI-NOR flash * on-board MT7531 GbE switch * 2x SFP+ (1 GbE / 2.5 GbE) * 5x GbE network port * miniPCIe slot (only USB 2.0 connected) * uSIM slot (connected to miniPCIe interface) * M.2 KEY-E PCIe interface (PCIe x2) * microSD card interface * 26 PIN GPIO Hardware details: https://wiki.banana-pi.org/Banana_Pi_BPI-R3 Working: * all 4 boot methods incl. installation via U-Boot, sysupgrade, ... * copper LAN and WAN ports * SFP1 (connected to gmac1, eth1 in Linux) * WiFi * LEDs * Buttons * PSTORE/ramoops based dual-boot Not Working (missing driver features): * SFP2 (connected to MT7531 switch) Untested: * M.2/NGFF slot (PCIe x2) * mPCIe slot (USB 2.0 + SIM) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add filogic subtargetFelix Fietkau2022-08-282-0/+56
Initially this covers MT7986 only, but it will later be expanded to cover other Filogic branded platforms by MediaTek Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Daniel Golle <daniel@makrotopia.org>