aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* kernel: bump 5.15 to 5.15.133John Audia2023-10-081-1/+1
| | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.133 Removed upstreamed: bcm47xx/patches-5.15/101-v5.18-mtd-rawnand-brcmnand-Allow-SoC-to-provide-I-O-operations.patch[1] Cherry picked build fix.[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.133&id=56cf9f446b331414a15ef0e8dedf23583ec2c427 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.15/fix-up-backport-of-136191703038-interconnect-teach-l.patch 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> (cherry picked from commit 89895937dd4a24446b7bfd067398b4f7e73dc7b5)
* kernel: bump 5.15 to 5.15.132John Audia2023-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.132 Removed upstreamed: bcm53xx/patches-5.15/037-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[1] bcm53xx/patches-5.15/037-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[2] bcm53xx/patches-5.15/037-v6.6-0008-ARM-dts-BCM5301X-Extend-RAM-to-full-256MB-for-Linksy.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=b35f3ca1877e024887df205ede952863d65dad36 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=2840d9b9c8750be270fb1153ccd5b983cbb5d592 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=f086e859ddc252c32f0438edff241859c0f022ce 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> (cherry picked from commit ac422c9788fbb3510b1fddaefc8816bea6601479) [Refresh on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7622: set DEVICE_DTC_ADDR for BPi-R64Daniel Golle2023-09-041-0/+1
| | | | | | | | | Relocating the device tree is required for being apply to apply device tree overylay at boot. Fixes: 34bb33094a ("mediatek: use updated device tree overlay mechanism for BPi-R64") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit a8cbee8e2d11dd139c1dea1f7289bdf28b1e2b52)
* mediatek: filogic: remove stray quoteDaniel Golle2023-09-041-1/+1
| | | | | | | | | When adapting the network configuration for MT7988 RFB a stray quote was left in a script. Remove it to fix generating the default network configuration. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 8f5986355cdc5df921ef8232f559ca7bfb18f1ed)
* generic: sync MediaTek Ethernet driver with upstreamDaniel Golle2023-09-042-4/+4
| | | | | | | | Import commits from upstream Linux replacing some downstream patches. Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f631c7bbb16f1d39d59c4cdf3f7189abab4fd9c6)
* mediatek: add support for Ubiquiti UniFi 6 LR v3Daniel Golle2023-09-047-27/+316
| | | | | | | | | | Some recent models of the Ubiquiti Networks UniFi 6 LR access point come with a RealTek RTL8211FS 1000M/100M/10M PHY instead of the Aquantia AQR112 2500M/1000M/100M/10M PHY used in both v1 and v2. Add build for this variant so we can support Ethernet with the PHY. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit a0f4eadf6a25fb54c189bde91425673e11125d35)
* mediatek: generate bootloader artifacts for mt7988_rfbDaniel Golle2023-09-0418-284/+995
| | | | | | | | Switch to OpenWrt uImage.FIT bootmethod and include various bootloader artifacts with the generated binaries. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 035a88ae5564ac680c64ed7219b8b66733ac84c6)
* mediatek: improve mt7981.dtsiDaniel Golle2023-09-041-19/+52
| | | | | | | | * re-factor WED components to boot fine also on limited loaders * add LEDs of integrated GE PHY Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 3ef8760e876e09fa91b54a09b2a5003c175829d3)
* mediatek: filogic: improve pinctrl driversDaniel Golle2023-09-042-31/+32
| | | | | | | | Set correct pull-type data and add additional uart groups for MT7981. Assign functions to configure pin bias for MT7986. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 9f8fde216d994ce47b1eca15de190aa9b8f67b9a)
* mediatek: i2c: mt65xx: allow optional pmic clockDaniel Golle2023-09-041-0/+45
| | | | | | | | | | | | | | Using the I2C host controller on the MT7981 SoC requires 4 clocks to be enabled. One of them, the pmic clk, is only enabled in case 'mediatek,have-pmic' is also set which has other consequences which are not desired in this case. Allow defining a pmic clk even in case the 'mediatek,have-pmic' propterty is not present and the bus is not used to connect to a pmic, but may still require to enable the pmic clock. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 2544dc34f2a6e5721096ee62efa66d36d45b2dd1)
* mediatek: re-add dropped properties on BPi-R3Daniel Golle2023-09-043-11/+25
| | | | | | | | | | | | Unfortunately some device tree properties have slipped under the table when switching from our downstream device tree. Bring back 3W power for SFP cages and restore thermal trip points to make sense again. Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 06a150aed795066ce79a623011884cc0abf290f1)
* generic: backport initial LEDs hw control supportChristian Marangi2023-09-043-3/+3
| | | | | | | | | | | | | | Backport initial LEDs hw control support. Currently this is limited to only rx/tx and link events for the netdev trigger but the API got accepted and the additional modes are working on and will be backported later. Refresh every patch and add the additional config flag for QCA8K new LEDs support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 0a4b309f41062ef40706162ae53b6428982a0685)
* mediatek: enable NMBM remapping for NWA50AX Pro UBIDavid Bauer2023-08-251-4/+0
| | | | | | | | | | Don't skip remapping of the UBI area for the ZyXEL NWA50AX Pro. This is due to the kernel being loaded from the UBI partition by U-Boot. Link: https://github.com/openwrt/openwrt/pull/13335 Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 6dc0675e5b9d59a882972b8d478ee9fa8496ae51)
* mediatek: filogic: wax220: cleanup device treeStefan Agner2023-08-221-51/+46
| | | | | | | | Fix compatible string to match what is supported upstream, fix alignment and order MTD partitions according to offset. Signed-off-by: Stefan Agner <stefan@agner.ch> (cherry picked from commit 4af06aaf33c9256a5d3e960fa5f6bddab2674c5a)
* mediatek: filogic: wax220: support factory imageStefan Agner2023-08-222-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable building a factory image which can be flashed through the OEM firmware's web interface. It seems that the web interface requires a minimum file size of 10MiB, otherwise it will not accept the image. The update image is a regular sysupgrade tarball packed in a Netgear encrypted image. The Netgear encrypted image is the same as used in WAX202 or WAX206, including the encryption keys and IV. This adds a script which creates the rootfs_data volume on first startup. This is required since the OEM firmware's sysupgrade scripts do not create such a paritition. Note that any script ordered after 70_initramfs_test will not get executed on initramfs. Hence this new script 75_rootfs_prepare won't create the rootfs_data volume when using the recovery initramfs. Also, this deletes the kernel_backup and rootfs_backup volumes in case we have to create the rootfs_data volumes. This makes sure that OpenWrt is the actual backup firmware instead of the stock firmware. References in WAX220 GPL source: https://www.downloads.netgear.com/files/GPL/WAX220-V1.0.2.8-gpl-src.tar.gz * package/base-files/files/lib/upgrade/nand.sh:186 Creation of rootfs_data is disabled * Uboot-upstream/board/mediatek/common/ubi_helper.c Automatic creation of UBI backup volumes Signed-off-by: Stefan Agner <stefan@agner.ch> (cherry picked from commit fa9d977f979461628161085dcd0e9dd8b9e2c66b)
* mediatek: enable NWA50AX Pro eth LEDsDavid Bauer2023-08-221-0/+3
| | | | | | | | | | | | | | Enable the ethernet LED's on the ZyXEL NWA50AX Pro to show link-state as well as activity. Both LED's are configured pulsing. AMBER | 10/100 GREEN | 1000 A+G | 2500 Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 4c0fdad7eabe7a5b81a7a1bd7f38dcadbe4f471a)
* mediatek: add missing packages for Acer Predator W6David Bauer2023-08-221-1/+1
| | | | | | | Add missing packages for creating the overlay filesystem. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit c35ff41ccc31f2ecaea7406830de04bd77940d48)
* kernel: bump 5.15 to 5.15.126John Audia2023-08-151-1/+1
| | | | | | | | | | | | | | | | 1. Disable unneeded errata Kconfig symbols 2. Update kernel Changelog: https://lore.kernel.org/stable/2023081111-unlocking-synopsis-d7d5@gregkh/ All patches automatically rebased. 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> (cherry picked from commit 64782497dbdf124d9f7979ae1aa48f20c9b9dec8)
* mediatek: filogic: mt7988: mark RTC clock as criticalDaniel Golle2023-08-131-1/+8
| | | | | | | | | A dependency of the MT7988 MMC host controller on the SoC's RTC clock being running has been discovered. Mark RTC clock as critical to fix MMC host on MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 0454691960e16bb93ed01f89352cbb375008aaf5)
* kernel: bump 5.15 to 5.15.125John Audia2023-08-101-1/+1
| | | | | | | | | | | | | 1. Add new symbols to generic config 2. Bump kernel Changelog: https://lore.kernel.org/stable/2023080818-groin-gradient-a031@gregkh/ All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me> [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit daed3322d347cae5fa538907b5f1fa5d5cfc08c6)
* kernel: bump 5.15 to 5.15.124John Audia2023-08-102-2/+2
| | | | | | | | | | | | | | | | Changelog: https://lore.kernel.org/stable/2023080341-curliness-salary-4158@gregkh/ 1. Needed to make a change to to package/kernel/linux/modules/netsupport.mk due to upstream moving vxlan to its own directory[1]. @john-tho suggested using the the 6.1 xvlan FILES to circumvent. 2. All patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.124&id=77396fa9096abdbfbb87d63e73ad44d5621cf103 Signed-off-by: John Audia <therealgraysky@proton.me> [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 81c1172c3626157ff9a146430cd14e32c9c80a5a)
* mediatek: filogic: restore non-const type in pinctrl-mt7988 driverDaniel Golle2023-08-071-17/+17
| | | | | | | | | When building with Linux 5.15 the 'const' type results in warnings. Restore the original non-const type in those cases. Fixes: 36d0aa9c2d ("mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDK") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1eb67cb0704a61f49d9be9f88aecbce1d881f8c9)
* mediatek: filogic: update MT7988 device treeDaniel Golle2023-08-072-166/+394
| | | | | | | | | * move ethernet to mt7988a.dtsi * move switch definition to mt7988a.dtsi * add PHY LEDs Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 64b99802a61a477ed23fc1f3426fb19d1bc0c6f3)
* mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDKDaniel Golle2023-08-071-115/+300
| | | | | | | Update pinctrl driver for the MT7988 with driver from mtk-openwrt-feeds. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 36d0aa9c2db0f74614b04a152fb092bcc74afb8e)
* mediatek: filogic: enable driver for MediaTek XS-PHYDaniel Golle2023-08-071-1/+1
| | | | | | | | Enable driver for MediaTek SuperSpeedPlus XS-PHY transceiver for the USB3.1 GEN2 controllers found in the MT7988 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit dc4aafb30939316a163c2eaede6811d871cace2f)
* mediatek: filogic: fix broken sysupgrade scriptPetr Štetiar2023-08-071-0/+1
| | | | | | | | | Changes introduced in commit 54dc1cde48a4 ("mediatek: filogic: add support for Xiaomi WR30U") missed to end the case item with mandatory `;;` which lead to a broken sysupgrade. Fixes: 54dc1cde48a4 ("mediatek: filogic: add support for Xiaomi WR30U") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: filogic: add specific layout for WR30UHank Moretti2023-08-075-0/+43
| | | | | | | | | Because this device enable NMBM by default, most users use custom U-Boot with NMBM-Enabled in Chinese forums. This layout is the same as the ubootmod layout but enabling NMBM. Signed-off-by: Hank Moretti <mchank9999@gmail.com>
* mediatek: filogic: add support for Xiaomi WR30UHank Moretti2023-08-077-3/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: 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 Button: Reset, Mesh Power: DC 12V 1A Flash instructions: 1. Get ssh access Check this link: https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax3000ne/153769/22 2. Backup import partitions ``` dev: size erasesize name mtd1: 00100000 00020000 "BL2" mtd2: 00040000 00020000 "Nvram" mtd3: 00040000 00020000 "Bdata" mtd4: 00200000 00020000 "Factory" mtd5: 00200000 00020000 "FIP" mtd8: 02200000 00020000 "ubi" mtd9: 02200000 00020000 "ubi1" mtd12: 00040000 00020000 "KF" ``` Use these commands blow to backup your 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 via scp, netcat, tftp or others and keep them in a safe place. 3. Setup Nvram Get the current stock: `cat /proc/cmdline` If you find `firmware=0` or `mtd=ubi`, use these commands: ``` 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 ``` If you find `firmware=1` or `mtd=ubi1`, use these commands: ``` 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 ``` 4. Flash stock-initramfs-factory.ubi If you find `firmware=0` or `mtd=ubi`: `ubiformat /dev/mtd9 -y -f /tmp/stock-initramfs-factory.ubi` If you find `firmware=1` or `mtd=ubi1`: `ubiformat /dev/mtd8 -y -f /tmp/stock-initramfs-factory.ubi` Then reboot your router, it should boot to the openwrt initramfs system now. 5. Setup uboot-env Now it will be setup automatically in upgrade process, you can skip this step. If your `fw_setenv` did not work, you need run this command: `echo "/dev/mtd1 0x0 0x10000 0x20000" > /etc/fw_env.config` Then setup uboot-env: ``` fw_setenv boot_wait on fw_setenv uart_en 1 fw_setenv flag_boot_rootfs 0 fw_setenv flag_last_success 1 fw_setenv flag_boot_success 1 fw_setenv flag_try_sys1_failed 8 fw_setenv flag_try_sys2_failed 8 fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata), 2048k(factory),2048k(fip),256k(crash),256k(crash_log), 34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)" ``` 6. Flash stock-squashfs-sysupgrade.bin Use shell command: `sysupgrade -n /tmp/stock-squashfs-sysupgrade.bin` Or go to luci web. If you need to change to Openwrt U-Boot layout, do next. If you do not need, please ignore it. Change to OpenWrt U-Boot: 1. Flash ubootmod-initramfs-factory.ubi Check mtd partitions: `cat /proc/mtd` ``` mtd7: 00040000 00020000 "KF" mtd8: 02200000 00020000 "ubi_kernel" mtd9: 04e00000 00020000 "ubi" ``` Run following command: `ubiformat /dev/mtd8 -y -f /tmp/ubootmod-initramfs-factory.ubi` Then reboot your router, it should boot to the openwrt initramfs system now. 2. Check mtd again ``` mtd7: 00040000 00020000 "KF" mtd8: 07000000 00020000 "ubi" ``` Make sure mtd8 is ubi. 3. Install kmod-mtd-rw Run command: `opkg update && opkg install kmod-mtd-rw` Or get it in openwrt server, or build it yourself, then install it manually Then run this command: `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1` 4. Clean up pstore Run Command: `rm -f /sys/fs/pstore/*` 5. 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 ``` 6. (Optional) Add recovery boot feature. ``` ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB ubiupdatevol /dev/ubi0_2 /tmp/ubootmod-initramfs-recovery.itb ``` 7. Flash Openwrt U-Boot ``` mtd write /tmp/ubootmod-preloader.bin BL2 mtd write /tmp/ubootmod-bl31-uboot.fip FIP ``` 6. Flash ubootmod-squashfs-sysupgrade.itb Use shell command: `sysupgrade -n /tmp/ubootmod-squashfs-sysupgrade.itb` Or go to luci web. Now everything is done, Enjoy! Go Back to stock from Openwrt U-Boot: 1. Force flash ubootmod-initramfs-recovery.itb Use shell command: `sysupgrade -F -n /tmp/ubootmod-initramfs-recovery.itb` Or go to luci web. Then it should boot to the openwrt initramfs system now. 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 Run command: `opkg update && opkg install kmod-mtd-rw` Or get it in openwrt server, or build it yourself, then install it manually Then run this command: `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1` 4. Flash stock U-Boot and ubi ``` 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. Go Back to stock from stock layout Openwrt: Just run command: `ubiformat /dev/mtd8 -y -f /tmp/ubi.bin` Then reboot your router, waiting it finished rollback in minutes. Notes: 1. Openwrt U-Boot and ubootmod openwrt did not enable NMBM. Please make your backup safe. Signed-off-by: Hank Moretti <mchank9999@gmail.com>
* mediatek: add support for Acer Predator W6David Bauer2023-08-058-0/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SOC: MediaTek MT7986A RAM: 1GB DDR4 FLASH: 4GB eMMC WiFi: 2x2 2.4 GHz 802.11 b/g/n/ax MT7916 DBDC 4x4 5 GHz 802.11 a/n/ac/ax MT7986 2x2 6 GHz 802.11ax MT7916 DBDC ETH: 4x LAN 1Gbit/s (MT7531) 1x WAN 2.5Gbit/s (GPY211) BTN: RESET, WPS LED: Antenna LEDs (GPIO) Mood-LED (Kinetic KTD2601) - unsupported UART: Header nest to USB port - 3V3 115200 8N1 [BUTTON] GND - RX - TX [USB] Installation ------------ 1. Connect to the device using serial console. 2. Interrupt the Autoboot process when promted by sending '0' twice. 3. Serve the OpenWrt initramfs image using TFTP at 192.168.1.66. Name the image "predator.bin" and conenct the TFTP server to the routers LAN port. 4. Configure U-Boot to allow loading unsigned images from MMC $ setenv bootcmd 'mmc read 0x40000000 0x00004400 0x0010000; fdt addr $(fdtcontroladdr); fdt rm /signature; bootm 0x40000000'; saveenv 5. Transfer the image from U-Boot $ setenv serverip 192.168.1.66; setenv ipaddr 192.168.1.1; tftpboot 0x46000000 predator.bin; fdt addr $(fdtcontroladdr); fdt rm /signature; bootm 6. Wait for OpenWrt to boot 7. Transfer the OpenWrt sysupgrade image to the router using scp. 8. Install OpenWrt using sysupgrade. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 7e7eb5312d7810084547bb54a4b6867c2da08182)
* kernel: bump 5.15 to 5.15.123John Audia2023-07-313-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch[*] bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch Removed upstreamed: backport-5.15/735-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch[1] backport-5.15/817-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch[2] pending-5.15/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch[3] pending-5.15/160-workqueue-fix-enum-type-for-gcc-13.patch[4] bcm53xx/patches-5.15/036-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch[5] bcm53xx/patches-5.15/036-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch[6] ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch[7] ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch[8] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=02474292a44205c1eb5a03634ead155a3c9134f4 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=86b93cbfe104e99fd3d25a49748b99fb88101573 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=79b9ab357b6f5675007f4c02ff8765cbd8dc06a2 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=d528faa9e828b9fc46dfb684a2a9fd8c2e860ed8 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=5899bc4058e89d5110a23797ff94439c53b77c25 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=95afd2c7c7d26087730dc938709e025a303e5499 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=40844343a8853a08b049d50c967e2a1e28f0ece6 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=6ad5ded420f5d96f7c65b68135f5787a1c7e58d7 Build system: x86/64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John Audia <therealgraysky@proton.me> [rebased ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch ] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 8590531048f138ff719c8b317c443a6a7538a762) [Refreshed on top of openwrt-23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: update patches for mediatek filogicFelix Baumann2023-07-261-1/+1
| | | | | | | | Fix complaint from actions Check Kernel patches (mediatek, filogic) https://github.com/openwrt/openwrt/actions/runs/5569719763/job/15081672586?pr=13072 Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* mediatek: add support for ZyXEL NWA50AX ProDavid Bauer2023-07-234-1/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- CPU: Mediatek MT7981 RAM: 512M DDR4 FLASH: 256M NAND ETH: MaxLinear GPY211 (2.5GbE N Base-T) WiFi: Mediatek MT7981 (2.4GHz 2T2R:2 5GHz 3T3R:2 802.11ax) BTN: 1x Reset LED: 1x Multi-Color UART Console ------------ Available below the rubber cover next to the ethernet port. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. In case this is not the case, OpenWrt will boot only one time, returning to the ZyXEL firmware the second boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP / Recovery ---------------------------- This installation routine is especially useful in case of a bricked device. Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to nwa50axpro-openwrt-initramfs.bin. $ atnf nwa50axpro-openwrt-initramfs.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; setenv fdt_high 0xffffffffffffffff; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd9 get-status $ zyxel-bootconfig /dev/mtd9 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd9 set-active-image 0 Copy the OpenWrt sysupgrade image to the device using scp. Write the sysupgrade image to NAND using sysupgrade. $ sysupgrade -n image.bin Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f0445746f6fd96fc7c5394b238153bd2ff22bc5b)
* mediatek: filogic: set DEVICE_DTS_LOADADDR for BPi-R3Daniel Golle2023-07-221-0/+1
| | | | | | | | U-Boot complains that the overlayed DT needs relocation, so set DEVICE_DTS_LOADADDR to have it relocated. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit b1d10e0174f71099016a7e6dcd27b65a77fd51b4)
* mediatek: replace hack for MaxLinear 2.5G PHYDaniel Golle2023-07-133-166/+63
| | | | | | | Replace hack with proper patch also for Linux 5.15. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 712fa3eff82086da8a13e7e5bc577df17892a581)
* mediatek: dts: mt7988a: remove boottrap hackDaniel Golle2023-07-131-5/+0
| | | | | | | | The PHY driver now uses regmap created from pio syscon, we no longer need the boottrap device. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f321a49fd523a8d393be8e3cd2de41d67855da91)
* mediatek: use backported Ethernet PHY driver also for 5.15Daniel Golle2023-07-134-1345/+1417
| | | | | | | | Backport in-SoC Gigabit Ethernet PHY driver instead of carrying the driver in files-5.15. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 9fac59009657068d5a58b3d0255d4ca1507dd457)
* mediatek: dts: mt7988a: wire-up mediatek,pio for PHY LEDsDaniel Golle2023-07-132-1/+2
| | | | | | | | | | | The PHY driver needs to read a register containing the values of the bootstrap pins (which happen to be the PHY LEDs) to determine the LED polarities. Allow regmap access to first pinctrl bank by adding the 'syscon' compatible, and reference the pinctrl in the MDIO bus where the PHY driver will look for it. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1f1e0b1144ebaa4ba8b948a12d989a0a6fc9b76f)
* mediatek: filogic: add H3C Magic NX30 Pro supportChukun Pan2023-07-135-0/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: W25N01GVZEIG 128MB RAM: NT5CB128M16JR-FL 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, WPS Power: DC 12V 1A Flash instructions: 1. PC run command: "telnet 192.168.124.1 99" Username: H3C, password is the web login password of the router. 2. Download preloader.bin and bl31-uboot.fip 3. PC run command: "python3 -m http.server 80" 4. Download files in the telnet window: "wget http://192.168.124.xx/xxx.bin" Replace xx with your PC's IP and the preloader.bin and bl31-uboot.fip. 5. Flushing openwrt's uboot: "mtd write xxx-preloader.bin BL2" "mtd write xxx-bl31-uboot.fip FIP" 6. Connect to the router via the Lan port, set a static ip of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 7. Download initramfs image, reboot router, waiting for tftp recovery to complete. 8. After openwrt boots up, perform sysupgrade. Note: 1. The u-boot-env partition on mtd is empty, OEM stores their env on ubi:u-boot-env. 2. Back up all mtd partitions before flashing. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> (cherry picked from commit e78d1a06c8a47be9ea5a306bfb43f3d7ceb89646)
* mediatek: add support for Netgear EX6250v2 seriesWenli Looi2023-07-134-0/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear EX6250v2, EX6400v3, EX6410v2, EX6470 are wall-plug 802.11ac (Wi-Fi 5) extenders. Like other MT7629 devices, Wi-Fi does not work currently as there is no driver. Related: https://github.com/openwrt/openwrt/pull/5084 For future reference, 2.4GHz MAC = LAN+1, 5GHz MAC = LAN+2. Specifications: * MT7629, 256 MiB RAM, 16 MiB SPI NOR * MT7761N (2.4GHz) / MT7762N (5GHz) - no driver * Ethernet: 1 port 10/100/1000 * UART: 115200 baud (labeled on board) Installation: * Flash the factory image through the stock web interface, or TFTP to the bootloader. NMRP can be used to TFTP without opening the case. * After installation, perform a factory reset. Wait for the device to boot, then hold the reset button for 10 seconds. This is needed because sysupgrade in the stock firmware will attempt to preserve its configuration using sysupgrade.tgz. See https://github.com/openwrt/openwrt/pull/4182 Revert to stock firmware: * Flash the stock firmware to the bootloader using TFTP/NMRP. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca> (cherry picked from commit 73de41898fcd06d837b013449c370c493bcdc595)
* image: add additional fields to Netgear encrypted imageWenli Looi2023-07-131-0/+6
| | | | | | | | | | | | | | | | | These fields are used for EAX12 and EX6250v2 series, and perhaps other devices. Compatibility is preserved with the WAX202 and WAX206. In addition, adds the related vars to DEVICE_VARS so that the variables work correctly with multiple devices. References in GPL source: https://www.downloads.netgear.com/files/GPL/EAX12_EAX11v2_EAX15v2_GPL_V1.0.3.34_src.tar.gz * tools/imgencoder/src/gj_enc.c Contains code that generates the encrypted image. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca> (cherry picked from commit 0a1ebccc8702cadc50bc096f1e185472f3927786)
* kernel: bump 5.15 to 5.15.120John Audia2023-07-082-2/+2
| | | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 0dc0504fc8e5f0c3cafe6c1da7192f51a09c5bc3)
* mediatek: define NMBM management region for WAX220David Bauer2023-07-021-0/+5
| | | | | | | | | The NETGEAR WAX220 employs NMBM on SPI-NAND. In order to avoid dealing with invalid factory data, enable NMBM in the area preceding the UBI volume. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 92eec257dd562547bc08ee76c1901eb22b66937c)
* mediatek: add support for Mercusys MR90X v1Mikhail Zhilkin2023-07-019-0/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Mercusys MR90X(EU) v1 router. Device specification -------------------- SoC Type: MediaTek MT7986BLA, Cortex-A53, 64-bit RAM: MediaTek MT7986BLA (512MB) Flash: SPI NAND GigaDevice GD5F1GQ5UEYIGY (128 MB) Ethernet: MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8) Ethernet: 1x2.5Gbe (WAN/LAN 2.5Gbps), 3xGbE (WAN/LAN 1Gbps, LAN1, LAN2) WLAN 2g: MediaTek MT7975N, b/g/n/ax, MIMO 4x4 WLAN 5g: MediaTek MT7975P(N), a/n/ac/ax, MIMO 4x4 LEDs: 1 orange and 1 green status LEDs, 4 green gpio-controlled LEDs on ethernet ports Button: 1 (Reset) USB ports: No Power: 12 VDC, 2 A Connector: Barrel Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI slots contain "seconduboot" (also U-Boot 2022.01-rc4) Serial console (UART) --------------------- V +-------+-------+-------+-------+ | +3.3V | GND | TX | RX | +---+---+-------+-------+-------+ | +--- Don't connect The R3 (TX line) and R6 (RX line) are absent on the PCB. You should solder them or solder the jumpers. Installation (UART) ------------------- 1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2 2. Attach UART, switch on the router and interrupt the boot process by pressing 'Ctrl-C' 3. Load and run OpenWrt initramfs image: tftpboot initramfs-kernel.bin bootm 4. Once inside OpenWrt, set / update env variables: fw_setenv baudrate 115200 fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit" fw_setenv fdtcontroladdr 5ffc0e70 fw_setenv ipaddr 192.168.1.1 fw_setenv loadaddr 0x46000000 fw_setenv mtdids "spi-nand0=spi-nand0" fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data)" fw_setenv netmask 255.255.255.0 fw_setenv serverip 192.168.1.2 fw_setenv stderr serial@11002000 fw_setenv stdin serial@11002000 fw_setenv stdout serial@11002000 fw_setenv tp_boot_idx 0 5. Run 'sysupgrade -n' with the sysupgrade OpenWrt image Installation (without UART) --------------------------- 1. Login as root via SSH (router IP, port 20001, password - your web interface password) 2. Open for editing /etc/hotplug.d/iface/65-iptv (e.g., using WinSCP and SSH settings from the p.1) 3. Add a newline after "#!/bin/sh": telnetd -l /bin/login.sh 4. Save "65-iptv" file 5. Toggle "IPTV/VLAN Enable" checkbox in the router web interface and save 6. Make sure that telnetd is running: netstat -ltunp | grep 23 7. Login via telnet to router IP, port 23 (no username and password are required) 8 Upload OpenWrt "initramfs-kernel.bin" to the "/tmp" folder of the router (e.g., using WinSCP and SSH settings from the p.1) 9. Stock busybox doesn't contain ubiupdatevol command. Hence, we need to download and upload the full version of busybox to the router. For example, from here: https://github.com/xerta555/Busybox-Binaries/raw/master/busybox-arm64 Upload busybox-arm64 to the /tmp dir of the router and run: in the telnet shell: cd /tmp chmod a+x busybox-arm64 10. Check "initramfs-kernel.bin" size: du -h initramfs-kernel.bin 11. Delete old and create new "kernel" volume with appropriate size (greater than "initramfs-kernel.bin" size): ubirmvol /dev/ubi0 -N kernel ubimkvol /dev/ubi0 -n 1 -N kernel -s 9MiB 12. Write OpenWrt "initramfs-kernel.bin" to the flash: ./busybox-arm64 ubiupdatevol /dev/ubi0_1 /tmp/initramfs-kernel.bin 13. u-boot-env can be empty so lets create it (or overwrite it if it already exists) with the necessary values: fw_setenv baudrate 115200 fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit" fw_setenv fdtcontroladdr 5ffc0e70 fw_setenv ipaddr 192.168.1.1 fw_setenv loadaddr 0x46000000 fw_setenv mtdids "spi-nand0=spi-nand0" fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data)" fw_setenv netmask 255.255.255.0 fw_setenv serverip 192.168.1.2 fw_setenv stderr serial@11002000 fw_setenv stdin serial@11002000 fw_setenv stdout serial@11002000 fw_setenv tp_boot_idx 0 14. Reboot to OpenWrt initramfs: reboot 15. Login as root via SSH (IP 192.168.1.1, port 22) 16. Upload OpenWrt sysupgrade.bin image to the /tmp dir of the router 17. Run sysupgrade: sysupgrade -n /tmp/sysupgrade.bin Recovery -------- 1. Press Reset button and power on the router 2. Navigate to U-Boot recovery web server (http://192.168.1.1/) and upload the OEM firmware Recovery (UART) --------------- 1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2 2. Attach UART, switch on the router and interrupt the boot process by pressing 'Ctrl-C' 3. Load and run OpenWrt initramfs image: tftpboot initramfs-kernel.bin bootm 4. Do what you need (restore partitions from a backup, install OpenWrt etc.) Stock layout ------------ 0x000000000000-0x000000200000 : "boot" 0x000000200000-0x000000300000 : "u-boot-env" 0x000000300000-0x000003500000 : "ubi0" 0x000003500000-0x000006700000 : "ubi1" 0x000006700000-0x000006f00000 : "userconfig" 0x000006f00000-0x000007300000 : "tp_data" ubi0/ubi1 format ---------------- U-Boot at boot checks that all volumes are in place: +-------------------------------+ | Volume Name: uboot Vol ID: 0| | Volume Name: kernel Vol ID: 1| | Volume Name: rootfs Vol ID: 2| +-------------------------------+ MAC addresses ------------- +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | label | 00:eb:xx:xx:xx:be | label | | LAN | 00:eb:xx:xx:xx:be | label | | WAN | 00:eb:xx:xx:xx:bf | label+1 | | WLAN 2g | 00:eb:xx:xx:xx:be | label | | WLAN 5g | 00:eb:xx:xx:xx:bd | label-1 | +---------+-------------------+-----------+ label MAC address was found in UBI partition "tp_data", file "default-mac". OEM wireless eeprom is also there (file "MT7986_EEPROM.bin"). Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> (cherry picked from commit e4fe3097ef6a961874b66932a0ac4be18070630a) [Fix merging conflict] Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* filogic: add support for Netgear WAX220Flole Systems2023-06-265-0/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* kernel: bump 5.15 to 5.15.118John Audia2023-06-251-1/+1
| | | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 1f5fce27c195373fedcf233a48470de97752058f)
* kernel: bump 5.15 to 5.15.117John Audia2023-06-171-1/+1
| | | | | | | | | | | | | | | | | Manually rebased: generic/backport-5.15/346-v5.18-01-Revert-ata-ahci-mvebu-Make-SATA-PHY-optional-for-Arm.patch Removed upstreamed: generic/backport-5.15/830-v6.2-ata-ahci-fix-enum-constants-for-gcc-13.patch All other patches automatically rebased. 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> (cherry picked from commit 0e89ba8430a5d9a638f71d9534ea4152fc26e278)
* mediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not neededDaniel Golle2023-06-091-3/+1
| | | | | | | | | | | | | The MT7986 RFB was intended to use device tree overlays and for that reason modified DTC_FLAGS. zyxel_ex5601-t0-stock later on probably copied it from there. Both boards do not actually use device tree overlays, so remove setting DTC_FLAGS from both. The BPi-R3 does use device tree overlays, use DEVICE_DTC_FLAGS to give it an extra 4kb of padding for overlays to be applied. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 98e6ea32a400b10b425e0efdf5a8109a0dfd48fe)
* mediatek: use DEVICE_DTC_FLAGS for BPi-R64Daniel Golle2023-06-091-0/+1
| | | | | | | | Make sure there is an extra 4kb of padding to apply device tree overlays on the BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 7b536c4ec9f1a56a92dc5d96b7579cb514341dbf)
* mediatek: set new compat version if booted on R64 and R3Daniel Golle2023-06-092-0/+20
| | | | | | | | | | | | | | | | | | 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-0931-1002/+994
| | | | | | | | | 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)