summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* mediatek: mt7622: add spi-nand support for bananapi bpi-r64Oskari Lemmela2021-04-114-12/+142
| | | | | | | | | | Some of bpi-r64 boards have serial NAND attached to SPI bus. Add SD card image support for installing openwrt to it. Default to nand upgrade if root device is not mmc block device. Separate preloader and uboot images for snand are generated. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: bpi-r64: use separate partition for emmc bootloaderOskari Lemmela2021-04-111-6/+7
| | | | | | | eMMC booloader is stored to separate partition. FIP size is increased to 2MB. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: remove duplicate dts-v1 statement for UniFi 6 LRAdrian Schmutzler2021-04-102-2/+0
| | | | | | | | | /dts-v1/; must only be specified once. Fixes: e887049fbb74 ("mediatek: add alternative bootchain variant for UniFi 6 LR") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: add alternative bootchain variant for UniFi 6 LRDaniel Golle2021-04-095-289/+386
| | | | | | | | Builds images for the Ubiquiti Network UniFi 6 LR device running the U-Boot build added by the previous commits. Everything but MTD partitions is moved to dtsi. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.4 to 5.4.109John Audia2021-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | Ran update_kernel.sh in a fresh clone without any existing toolchains. Manually rebased: pending-5.4/611-netfilter_match_bypass_default_table.patch The upstream change affecting this patch is the revert of an earlier kernel commit. Therefore, we just revert our corresponding changes in [1]. Build system: x86_64 Build-tested: ipq806x/R7800 [1] 9b1b89229f0e ("kernel: bump 5.4 to 5.4.86") Signed-off-by: John Audia <graysky@archlinux.us> [adjust manually rebased patch, add explanation] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: mt7622: improve sysupgrade on MMCDaniel Golle2021-03-311-49/+12
| | | | | | | Use generic functions to acquire rootdev. Make sure to wipe rootfs_data in case of '-n'. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: backport 5.13 mtd partitioning changesRafał Miłecki2021-03-292-2/+2
| | | | | | | | 1. Use upstream accepted NVMEM patches 2. Minor fix for BCM4908 partitioning 3. Support for Linksys firmware partitions on Northstar Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: bump 5.4 to 5.4.108John Audia2021-03-271-2/+2
| | | | | | | | | | | | | | | | | All modifications made by by update_kernel.sh. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 [only 5.4.107] No dmesg regressions, everything functional Run-tested by @timocapa: - ramips/mt7621/{Xiaomi R3G, Redmi 2100} - Lantiq/XWAY/Fritz!Box 7320/7330 Signed-off-by: John Audia <graysky@archlinux.us> [squash, edit commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: generate complete sdcard image for BPi-R64Daniel Golle2021-03-241-4/+9
| | | | | | | Populate the recovery and production partitions of the generated sdcard image for the Bananapi BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.4 to 5.4.106John Audia2021-03-214-38/+38
| | | | | | | | | | | | | | | | | | Ran update_kernel.sh in a fresh clone without any existing toolchains. Manually rebased: bcm27xx/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch layerscape/701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> [remove accidental whitespace edit] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: linksys-e8450: remove left-overs from dtsiDaniel Golle2021-03-211-9/+0
| | | | | | | | | | | There is an ASMedia ASM1480 PCIe switch found on mt7622-rfb1 and the BPi-R64, allowing the user to switch between SATA and PCIe1 which share the same pins on the SoC. This chip is not present on the Linksys E8450, it doesn't have SATA. Remove definitions for GPIO90 from DTSI to prevent it from being copy&pasted or otherwise causing confusion. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2021-03-193-5/+0
| | | | | | Move some disabled symbols found in armvirt target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* mediatek: fix broken UniFi 6 LR imageDavid Bauer2021-03-181-0/+1
| | | | | | | | Ubiquiti's own bootloader expects the configuration mode to be present with a "@" instead of a "-" for the sperator character. Otherwise booting of the image fails. Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: Fix writing U-Boot env on Buffalo WSR-2533DHP2Hauke Mehrtens2021-03-171-1/+0
| | | | | | | This fixes writing to the U-Boot environment by making the partition writable and setting the correct flash sector size of 128K. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: bpi-r64: use dt-overlay to select SATA or PCIE1Daniel Golle2021-03-173-1/+82
| | | | | | | | | | The Bananapi BPi-R64 got a SATA interface which cannot be used at the same time as the second mPCIe slot. The decission is made by hogging GPIO 90. Embed two addtional DT overlay blobs into the image to allow bootloader selection of either SATA or PCIE1 feature. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: drop duplicate DEVICE_PACKAGESDaniel Golle2021-03-151-1/+1
| | | | | | | | kmod-mt7615e kmod-mt7615-firmware and uboot-envtools are already part of the target's default package set. No need to add them again for buffalo_wsr-2533dhp2. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for Buffalo WSR-2533DHP2INAGAKI Hiroshi2021-03-157-0/+560
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Buffalo WSR-2533DHP2. The device uses the Broadcom TRX image format with a special magic. To be able to boot the images or load them they have to be wrapped with different headers depending how it is loaded. There are multiple ways to install OpenWrt on this device. Boot ramdisk from U-Boot ---------------------------- This will load the image and not write it into the flash. 1. Stop boot menu with "space" key 2. Select "System Load Linux to SDRAM via TFTP." 3. Load this image: openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-initramfs-kernel.bin 4. The system boots the image Write to flash from U-Boot ----------------------------- This will load the image over tftp and directly write it into the flash. 1. Stop boot menu with "space" key 2. Select "System Load Linux Kernel then write to Flash via TFTP." 3. Load this image: openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-squashfs-factory-uboot.bin 4. The system writes this image into the flash and boots into it. Write to flash from Web UI ----------------------------- This will load the image over over the Web UI and write it into the flash 1. Open the Web UI 2. Go to "管理" -> "ファームウェア更新" 3. Select "ローカルファイル指定" and click "更新実行" 4. Load this image: openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-squashfs-factory.bin 5. The system writes this image into the flash and boots into it. Specifications ------------------- * SoC: MT7622 (4x4 2.4 GHz Wifi) * Wifi: MT7615 (4x4 5 GHz Wifi) * Flash: Winbond W29N01HZ 128MB SLC NAND * RAM 256MB * Ethernet: Realtek RTL8367S (5 x 1GBit/s, SoC via 2.5GBit/s) Co-Developed-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: support non standard trx magic valuesHauke Mehrtens2021-03-154-0/+196
| | | | | | | | | | | Buffalo uses the TRX format with a different magic, add support for this. It is planned to send these patches upstream. Cc: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: fix mtk parallel nand driverHauke Mehrtens2021-03-151-0/+36
| | | | | | | | This fixes some bugs in the mtk parallel nand driver introduced in 5.10. This patch was send upstream. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7622: clean up image buildDaniel Golle2021-03-141-22/+13
| | | | | | | | | | | | | * clean up whitespace to make GPT partitioning more readable * don't select packages already part of the target default selection * don't select U-Boot variants (breaks ImageBuilder) * don't select AHCI on boards without SATA * don't select kmod-usb2 and kmod-ohci, USB 1.x and USB 2.0 devices work fine with the in-SoC XHCI host having just kmod-usb3 installed. * select kmod-btmtkuart for devices with Bluetooth support * sort DEVICE_PACKAGES Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: image: don't use 'M' unit as dd may not support thatDaniel Golle2021-03-131-2/+2
| | | | | | | | | dd on Mac OS X apparently fails when using 'M' unit for bs. dd: bs: illegal numeric value Use 'k' unit instead for 'pad-to' to fix that. Reported-by: Georgi Valkov <gvalkov@abv.bg> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: remove no longer needed sysupgrade hackDaniel Golle2021-03-071-18/+0
| | | | | | | Keeping configuration is now handled in fstools like for other types of flash as well. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: remove execute bit and shebang from 01_ledsAdrian Schmutzler2021-03-061-2/+0
| | | | | | | This was added recently and thus overlooked in 85b1f4d8ca2d ("treewide: remove execute bit and shebang from board.d files"). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: disable RTC on Bananapi R64 and refresh patchesDaniel Golle2021-03-064-5/+26
| | | | | | | | The in-SoC RTC of the Bananapi R64 is more disruptive than useful without a battery connected. Disable it to not have Linux use the RTC provided time 2000-01-01 00:00:00 after power-loss. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-063-3/+0
| | | | | | | | | | | | | | | | So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: mt7622: bpi-r64: allow MAC addresses to be inheritedDaniel Golle2021-03-053-6/+14
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.10 to 5.10.20Rui Salvaterra2021-03-053-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Also add a new kconfig symbol (CONFIG_KCMP) to the generic config, disabling the SYS_kcmp syscall (it was split from CONFIG_CHECKPOINT_RESTORE, which is disabled by default, so the previous behaviour is kept). Removed (upstreamed) patches: 070-net-icmp-pass-zeroed-opts-from-icmp-v6-_ndo_send-bef.patch 081-wireguard-device-do-not-generate-ICMP-for-non-IP-pac.patch 082-wireguard-queueing-get-rid-of-per-peer-ring-buffers.patch 083-wireguard-kconfig-use-arm-chacha-even-with-no-neon.patch 830-v5.12-0002-usb-serial-option-update-interface-mapping-for-ZTE-P685M.patch Manually rebased patches: 313-helios4-dts-status-led-alias.patch 104-powerpc-mpc85xx-change-P2020RDB-dts-file-for-OpenWRT.patch Run tested: ath79 (TL-WDR3600) mvebu (Turris Omnia) Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel-5.4: bump to 5.4.102 and refresh patchesJason A. Donenfeld2021-03-046-11/+11
| | | | | | | | | | | | | | 5.4.102 backported a lot of stuff that our WireGuard backport already did, in addition to other patches we had, so those patches were removed from that part of the series. In the process other patches were refreshed or reworked to account for upstream changes. This commit involved `update_kernel.sh -v -u 5.4`. Cc: John Audia <graysky@archlinux.us> Cc: David Bauer <mail@david-bauer.net> Cc: Petr Štetiar <ynezz@true.cz> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mediatek: mt7622: check firmware metadataDaniel Golle2021-03-042-1/+2
| | | | | | | | | | All mt7622 devices except for the UBI-variant of the mt7622-rfb1 carry metadata appended to the sysupgrade image. Add it for the mt7622-rfb1-ubi as well and check it on sysupgrade to avoid accidentally flashing firmware for the wrong device (or variant or future DEVICE_COMPAT_VERSION). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: change image generationOskari Lemmela2021-03-031-7/+6
| | | | | | | - set only one EFI system partition - use shorter path for DEVICE_DTS file Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: mt7622: use ptgen generated MBR headerOskari Lemmela2021-03-031-2/+2
| | | | | | | mt7622 uses MBR partition for booting from SD card. Add hybrid MBR entry with boot flag after PMBR entry. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: mt7622: make sure image generation can run in parallelDaniel Golle2021-03-021-8/+7
| | | | | | | | The previous approach of referencing artifacts in follow-up artifacts can't work with parallel builds in the current way image.mk is built. Refactor things so this is not needed. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: blue LED should be active high as wellDaniel Golle2021-03-011-1/+1
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: bpi-r64: fix sysupgrade on empty diskDaniel Golle2021-03-011-1/+8
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: bpi-r64: simplify eMMC install procedureDaniel Golle2021-03-011-5/+4
| | | | | | | | Write everything needed for eMMC install into the gaps between partitions on SD card. In that way, installation to eMMC only needs the SD card, no additional files need to be loaded via TFTP any more. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: enable CONFIG_SPI_MTK_NORDaniel Golle2021-03-011-1/+1
| | | | | | Somehow this got disabled in the transition to 5.10. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: rename mt7622-ubi to mt7622-rfb1-ubiDaniel Golle2021-03-011-3/+3
| | | | | | | This profile is meant to be used on MT7622 rfb1 AP, indicate that in the name to make things less confusing. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: fix spelling 'seperate' -> 'separate'Daniel Golle2021-02-281-1/+1
| | | | | | | This popular spelling mistake was also introduced by myself lately. Fix it everywhere. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add missing 5.10 patchesDavid Bauer2021-02-282-0/+57
| | | | | | | | These patches are required for the Ubiquiti UniFi 6 LR to work. They were already present for kernel 5.4 but got lost when adding 5.10 support. Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: rework support for BananaPi BPi-R64Daniel Golle2021-02-2810-72/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **What's new** * Bring support for the Bananapi BPi-R64 to the level desirable for a nice hackable routerboard. * Use ARM Trusted Firmware A from source. (goodbye binary preloader) * Use Das U-Boot from source. (see previous commit) * Assemble SD-card image using OpenWrt image-commands. (no gen_sd_cruz_foo.sh added, this is not Raspbian) * Updated kernel options to support root filesystem. * Updated DTS to match OpenWrt LAN ports, known LEDs, buttons, ... * Detect root device, handle sysupgrade, config restore, ... * Wire up (known) LEDs and buttons in OpenWrt-fashion. * Build one set of images from SD-card and eMMC. * Hopefully provide a good example of how things can be done right from scratch. **Installation and images** * Have an empty SD-card at hand * Write stuff to the card, as root (card device is /dev/mmcblkX) - write header, gpt, bl2, atf, u-boot and recovery kernel: `cat *bpi-r64-boot-sdcard.img *bpi-r64-initramfs-recovery.fit > /dev/mmcblkX` - rescan partitions: `blockdev --rereadpt /dev/mmcblkX` - write main system to production partition: `cat *bpi-r64-squashfs-sysupgrade.fit > /dev/mmcblkXp5` * Installation to eMMC works using SD-card bootloader via TFTP When running OpenWrt of SD-card, issue this to trigger installation to eMMC: `fw_setenv bootcmd run emmc_init` Be prepared to serve the content of bin/targets/mediatek/mt7622 on TFTP server address 192.168.1.254. **What's missing** * The red LED is always on, probably a hardware bug. * AHCI (probably needs DTS changes) * Ship SD-card image ready with every needed for eMMC install. * The eMMC has a second, currently unused boot partition. This would be ideal to store the WiFi EEPROM and Ethernet MAC address(es). @sinovoip ideas? Thanks to Thomas Hühn @thuehn for providing the hardware! Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add alternative UBI NAND layout for Linksys E8450Daniel Golle2021-02-288-455/+576
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vendor flash layout of the Linksys E8450 is problematic as it uses the SPI-NAND chip without any wear-leveling while at the same time wasting a lot of space for padding. Use an all-UBI layout instead, storing the kernel+dtb+squashfs in uImage.FIT standard format in UBI volume 'fit', the read-write overlay in UBI volume 'rootfs_data' as well as reduntant U-Boot environments 'ubootenv' and 'ubootenv2', and a 'recovery' kernel+dtb+initramfs uImage.FIT for dual-boot. ** WARNING ** THIS PROCEDURE CAN EASILY BRICK YOUR DEVICE PERMANENTLY IF NOT CARRIED OUT VERY CAREFULLY AND EXACTLY AS DESCRIBED! Step 0 * Configure your PC to have the static IPv4 address 192.168.1.254/24 * Provide bin/targets/mediatek/mt7622 via TFTP Now continue EITHER with step 1A or 1B, depending on your preference (and on having serial console wired up or not). Step 1A (Using the vendor web interface (or non-UBI OpenWrt install)) In order to update to the new bootloader and UBI-based firmware, use the web browser of your choice to open the routers web-interface accessible on http://192.168.1.1 * Navigate to 'Configuration' -> 'Administration' -> 'Firmware Upgrade' * Upload the file openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb and proceed with the upgrade. * Once OpenWrt comes up, use SCP to upload the new bootloader files to /tmp on the router: *-mt7622-linksys_e8450-ubi-preloader.bin *-mt7622-linksys_e8450-ubi-bl31-uboot.fip * Connect via SSH as you will now need to replace the bootloader in the Flash. ssh root@192.168.1.1 (the usual warnings) * First of all, backup all the flash now: for mtd in /dev/mtdblock*; do dd if=$mtd of=/tmp/$(basename $mtd); done * Then use SCP to copy /tmp/mtdblock* from the router and keep them safe. You will need them should you ever want to return to the factory firmware! * Now flow the uploaded files: mtd -e /dev/mtd0 write /tmp/*linksys_e8450-ubi-preloader.bin /dev/mtd0 mtd -e /dev/mtd1 write /tmp/*linksys_e8450-ubi-bl31-uboot.fip /dev/mtd1 If and only if both writes look like the completed successfully reboot the router. Now continue with step 2. Step 1B (Using the vendor bootloader serial console) * Use the serial to backup all /dev/mtd* devices before using the stock firmware (you got root shell when connected to serial). * Then reboot and select 'U-Boot Console' in the boot menu. * Copy the following lines, one by one: tftpboot 0x40080000 openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin tftpboot 0x40100000 openwrt-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip nand erase 0x0 0x180000 nand write 0x40080000 0x0 0x180000 reset Now continue with step 2 Step 2 Once the new bootchain comes up, the loader will initialize UBI and the ubootenv volumes. It will then of course fail to find any bootable volume and hence resort to load kernel via TFTP from server 192.168.1.254 while giving itself the address 192.168.1.1 The requested file is called openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb and your TFTP server should provide exactly that :) It will be written to UBI as recovery image and booted. You can then continue and flash the production OS image, either by using sysupgrade in the booted initramfs recovery OS, or by using the bootloader menu and TFTP. That's it. Go ahead and mess around with a bootchain built almost completely from source (only DRAM calibration blobs are fitted in bl2, and the irreplacable on-chip ROM loader remains, of course). And enjoy U-Boot built with many great features out-of-the-box. You can access the bootloader environment from within OpenWrt using the 'fw_printenv' and 'fw_setenv' commands. Don't be afraid, once you got the new bootchain installed the device should be fairly unbrickable (holding reset button before and during power-on resets things and allows reflashing recovery image via TFTP) Special thanks to @dvn0 (Devan Carpenter) for providing amazingly fast infra for test-builds, allowing for `make clean ; make -j$(nproc)` in less than two minutes :) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add Linksys E8450 supportJohn Crispin2021-02-287-3/+667
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linksys E8450, also known as Belkin RT3200, is a dual-band IEEE 802.11bgn/ac/ax router based on MediaTek MT7622BV and MediaTek MT7915AN chips. FCC: K7S-03571 and K7S-03572 Hardware highlights: - CPU: MediaTek MT7622BV (2x ARM Cortex-A53 @ 1350 MHz max.) - RAM: 512MB DDR3 - Flash: 128MB SPI-NAND (2k+64) - Ethernet: MT7531BE switch with 5 1000Base-T ports CPU port connected with 2500Base-X - WiFi 2.4 GHz: 802.11bgn 4T4R built-in antennas MT7622VB built-in - WiFi 5 GHz: 802.11ac/ax 4T4R built-in antennas MT7915AN chip on-board via PCIe MT7975AN front-end - Buttons: Reset and WPS - LEDS: 3 user controllable LEDs, 4 wired to switch - USB: USB2.0, single port - no Bluetooth (supported by SoC, not wired on board) - Serial: JST PH 2.0MM 6 Pin connector inside device ----_____________---- [ GND RX - TX - - ] --------------------- - JTAG: unpopulated ARM JTAG 20-pin connector (works) This commit adds support for the device in a way that is compatible with the vendor firmware's bootloader and dual-boot flash layout, the resulting image can directly be flashed using the vendor firmware. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: add support for configuring BMT table size via device treeFelix Fietkau2021-02-282-24/+37
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: mt7622: add Linux 5.10 supportFelix Fietkau2021-02-28169-171/+102212
| | | | | | | Switch mt7622 subtarget to Linux 5.10, it has been tested by many of us on several devices for a couple of weeks already. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: implement bad-block management table supportFelix Fietkau2021-02-285-0/+842
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: switch to use seperate ramdisk for initramfs imagesDaniel Golle2021-02-252-2/+2
| | | | | | | | | | | | | | | | | | MediaTek targets always use U-Boot's modern uImage.FIT format which allows bundling several blobs into a single file including hashes, descriptions and more. In fact, we are already using that to bundle the Flattened Device Tree blob with the kernel on this and many other targets. In the same fashion, we can now make use of the newly introduced support for building seperate ramdisk to uImage.FIT with a dedicated initrd blob checked and loaded by U-Boot instead of embedding the cpio archive into the kernel itself. This allows for having larger ramdisks, choosing ramdisk compression independently of kernel compression (while only kernel is decompressed by the bootloader) and for more easily replacing or modifying the filesystem contained in an initramfs image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.4 to 5.4.100John Audia2021-02-251-2/+2
| | | | | | | | | | | | | | Ran update_kernel.sh in a fresh clone without any existing toolchains. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> [refresh again] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: mt7622-bananapi-bpi-r64-rootdisk rebase to upstream dtsOskari Lemmela2021-02-241-573/+1
| | | | | | | simplify maintaining mt7622-bananapi-bpi-r64-rootdisk.dts by storing only differences between upstream dts Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: mt7622: fix bpi-r64 emmc f2fs overlayOskari Lemmela2021-02-241-1/+2
| | | | | | | | f2fs tools are needed for generating f2fs overlay. vfat modules are used for recovery mounting. Fixes: f72a2b004c3 ("mediatek: add bpi-r64 emmc support") Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: mt7622: enable support for f2fs overlayOskari Lemmela2021-02-241-0/+2
| | | | | | | f2fs filesystem and loop device support are needed for f2fs overlay over squashfs. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>