aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* kernel: bump 5.15 to 5.15.38Rui Salvaterra2022-05-091-88/+0
| | | | | | | | | | | Deleted (upstreamed): mediatek/patches-5.15/120-10-v5.18-mtd-nand-fix-ecc-parameters-for-mt7622.patch [1] Other patches automatically rebased. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.38&id=3ec920d755ae69c201b358e8d8e96c32f51145d8 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.15 to 5.15.37Rui Salvaterra2022-05-091-1/+1
| | | | | | Patches automatically rebased. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.15 to 5.15.36Rui Salvaterra2022-05-096-9/+9
| | | | | | Patches automatically rebased. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: build ubnt-ledbar as a moduleChuanhong Guo2022-04-304-4/+18
| | | | | | | | The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because of its I2C dependency. Build it as a module and let buildroot handle this config option instead. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7629: disable auxadc in kconfigChuanhong Guo2022-04-301-0/+1
| | | | | | manually edit kconfig to disable MT6577_AUXADC Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7623: disable various input devicesChuanhong Guo2022-04-301-45/+1
| | | | | | | | Disable support for joysticks, micee and tablets. There's no actual driver selected in kconfig, and including kernel support is just a waste of space. Besides that, I believe nobody wants these on a router. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7622: add irq for spi-nor controllerChuanhong Guo2022-04-301-0/+10
| | | | | | | Save some CPU from unnecessary polling and make SPI flash reading a tiny bit faster. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: remove left-overs from Linux 5.10Daniel Golle2022-04-3049-4508/+0
| | | | | | | | Remove patches and configuration for Linux 5.10 which have been left in the tree despite the target having been switched to Linux 5.15. Fixes: c283defa88 ("mediatek: switch to 5.15") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: enable multi-core schedulingDaniel Golle2022-04-301-0/+1
| | | | | | | | Set CONFIG_SCHED_MC in config-5.15 to have make the scheduler aware of shared caches. Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: refresh patches for Linux 5.15Daniel Golle2022-04-3022-147/+53
| | | | | | Run `make target/linux/refresh` to align patches with OpenWrt style. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: backport recent DTS improvements for MT7622 SoCDaniel Golle2022-04-303-0/+360
| | | | | | | | | | | Daniel Golle: 190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch Rui Salvaterra: 191-arm64-dts-mt7622-specify-the-L2-cache-topology.patch 192-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7629: disable mtk thermalChuanhong Guo2022-04-291-0/+1
| | | | | | Manually edit kconfig to disable CONFIG_MTK_THERMAL Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7623: disable ecc engine supportChuanhong Guo2022-04-291-1/+1
| | | | | | There's no board using nand on this target atm. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7623 enable arch-timer with a patchChuanhong Guo2022-04-292-5/+27
| | | | | | | | | Last attempt on this has a typo and doen't work. It seems that this is a common problem occurring on every kernel bump, so let's enforce arch timer support for mt7623 with a patch instead. Fixes: 9a22943eb2 ("mediatek: 5.15: re-enable arch timer on MT7623 as well") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: switch to 5.15Chuanhong Guo2022-04-281-2/+1
| | | | | | | | the SPI-NAND driver switch breaks dts compatibility. It's too much work to backport all ECC framework support to 5.10 so let's switch the target to 5.15 instead. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: enable snfi for mt7629Chuanhong Guo2022-04-281-9/+15
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: restore support for Fidelix FM35X1GAChuanhong Guo2022-04-281-0/+122
| | | | | | This patch was dropped when the spi-nand driver got replaced last time. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add an upstreamed spi-nand driverChuanhong Guo2022-04-2816-351/+3446
| | | | | | | This patch implements the spi-nand controller driver as an ECC-capable spi-mem controller to use the upstream SPI-NAND driver. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: spi-nand: check for 1 byte BBM onlyChuanhong Guo2022-04-281-0/+20
| | | | | | | | the OOB layout in MTK SNFI uses the 2nd byte, and anything using OOB will make the block a bad-block in spi-nand driver. Hack it for now. We need a proper solution upstream. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: v5.15: backport spi-mem ecc supportChuanhong Guo2022-04-2810-0/+928
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: drop spi-nand driver from mtkChuanhong Guo2022-04-2812-4036/+0
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7622: remove '0x' prefix from pstore address in dtsDaniel Golle2022-04-192-2/+2
| | | | | | | | | | | | | | Adresses of device tree nodes are typically noted without the '0x' prefix. While having the '0x' prefix doesn't hurt when using Linux, more recent versions of U-Boot will add a duplicate ramoops node as a simple string compare is used to check if the node is already present. Remove the '0x' prefix to avoid the kernel warning resulting from U-Boot adding a dupplicate pstore/ramoops node. See also https://lists.denx.de/pipermail/u-boot/2022-April/481810.html Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: remove crypto-hw-mtk packageEneas U de Queiroz2022-04-191-23/+0
| | | | | | | The MediaTek's Crypto Engine module is only available for mt7623, in which case it is built into the kernel. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* mediatek: 5.15: re-enable arch timer on MT7623 as wellDaniel Golle2022-04-141-0/+1
| | | | | | Re-enable arch timer also on MT7623, yet another time. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: 5.15: enable arm arch timer for mt7629Chuanhong Guo2022-04-142-0/+12
| | | | | | otherwise the system delay is completely broken. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek/mt7622: enable accelerated crypto driversEneas U de Queiroz2022-04-112-0/+20
| | | | | | | | | Use ARMv8 Crypto Extensions for AES, ghash and sha256. This results in a 16 times speed gain in speed for aes-128-ctr, 17x in aes-128-gcm, and 9 times in sha256. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* kernel: bump 5.10 to 5.10.110John Audia2022-04-091-1/+1
| | | | | | | | | | | | | | | | Removed upstreamed: generic/backport-5.10/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch generic/pending-5.10/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch ipq40xx/patches-5.10/105-ipq40xx-fix-sleep-clock.patch All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Compile-/run-tested: ath79/generic (Archer C7 v2). Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.15 to 5.15.33Rui Salvaterra2022-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | Deleted (upstreamed): generic/backport-5.15/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch [1] generic/backport-5.15/730-v5.16-hv-utils-add-PTP_1588_CLOCK-to-Kconfig-to-fix-build.patch [2] generic/pending-5.15/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch [3] generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch [4] Manually rebased: generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch ramips/patches-5.15/710-at803x.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d29cda15cab086d82d692de016f7249545d4b6b4 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d5aad7d63b1b5c1f3c4b69e12c05e7c7d196fae8 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=ed750e22e44366e264bcdf7b1cf0713f08f7980a [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=0fe94b84c43cfea867e1721606185e8686d7d32f Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [Refresh patches again] [Remove generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: move some symbols to generic configAleksander Jan Bajkowski2022-04-092-12/+0
| | | | | | | | | | | | | | | | | | | This commit add some enabled symbols to generic config. LTO is only supported by clang compiler and therefore should be disabled in the generic config instead of duplicating this symbol in each target. CONFIG_LTO_NONE do this job. The second group of symbols is enabled by the options available in the generic config and is therefore added here: * CONFIG_AF_UNIX_OOB is selected by CONFIG_NET && CONFIG_UNIX, * CONFIG_BINARY_PRINTF is selected by CONFIG_BPF_SYSCALL, * CONFIG_NET_SOCK_MSG is selected by CONFIG_BPF_SYSCALL && CONFIG_NET. The other symbols are disabled and should be in the generic config. This commit also removes these symbols from subtargets. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* kernel: bump 5.10 to 5.10.109John Audia2022-03-301-1/+1
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* mediatek: add 5.15 config for mt7623 and mt7629Daniel Golle2022-03-272-0/+934
| | | | | | | Compile tested both with all kernel modules. Run-time tested mt7623 on BananaPi-R2. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add patches for 5.15 and kernel config for mt7622Felix Fietkau2022-03-27195-0/+2519
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: add patches for MT7622 WED (wireless ethernet dispatch)Felix Fietkau2022-03-276-105/+8
| | | | | | This series also contains other improvement for hardware flow offload support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* generic: 5.15: refresh configAnsuel Smith2022-03-271-0/+1
| | | | | | | | Refresh kernel 5.15 generic config file Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [added some missing Kconfig symbols] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips/mediatek: enable threaded NAPI in the ethernet driverFelix Fietkau2022-03-211-1/+1
| | | | | | Improves performance, especially under load Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: Add support for Xiaomi Redmi Router AX6SRichard Huynh2022-03-205-2/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also known as the "Xiaomi Router AX3200" in western markets, but only the AX6S is widely installation-capable at this time. SoC: MediaTek MT7622B RAM: DDR3 256 MiB (ESMT M15T2G16128A) Flash: SPI-NAND 128 MiB (ESMT F50L1G41LB or Gigadevice GD5F1GQ5xExxG) WLAN: 2.4/5 GHz 4T4R 2.4 GHz: MediaTek MT7622B 5 GHz: MediaTek MT7915E Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531B LEDs/Keys: 2/2 (Internet + System LED, Mesh button + Reset pin) UART: Marked J1 on board VCC RX GND TX, beginning from "1". 3.3v, 115200n8 Power: 12 VDC, 1.5 A Notes: U-Boot passes through the ethaddr from uboot-env partition, but also has been known to reset it to a generic mac address hardcoded in the bootloader. However, bdata is also populated with the ethernet mac addresses, but is also typically never written to. Thus this is used instead. Installation: 1. Flash stock Xiaomi "closed beta" image labelled 'miwifi_rb03_firmware_stable_1.2.7_closedbeta.bin'. (MD5: 5eedf1632ac97bb5a6bb072c08603ed7) 2. Calculate telnet password from serial number and login 3. Execute commands to prepare device nvram set ssh_en=1 nvram set uart_en=1 nvram set boot_wait=on nvram set flag_boot_success=1 nvram set flag_try_sys1_failed=0 nvram set flag_try_sys2_failed=0 nvram commit 4. Download and flash image On computer: python -m http.server On router: cd /tmp wget http://<IP>:8000/factory.bin mtd -r write factory.bin firmware Device should reboot at this point. Reverting to stock: Stock Xiaomi recovery tftp that accepts their signed images, with default ips of 192.168.31.1 + 192.168.31.100. Stock image should be renamed to tftp server ip in hex (Eg. C0A81F64.img) Triggered by holding reset pin on powerup. A simple implementation of this would be via dnsmasq's dhcp-boot option or using the vendor's (Windows only) recovery tool available on their website. Signed-off-by: Richard Huynh <voxlympha@gmail.com>
* mediatek: Add GD5F1GQ5xExxG to mtk-snandRichard Huynh2022-03-201-0/+4
| | | | | | Some units of the Xiaomi Redmi Router AX6S/Xiaomi Router AX3200 contain this part. Signed-off-by: Richard Huynh <voxlympha@gmail.com>
* kernel: move parser_trx patches of custom magic to genericINAGAKI Hiroshi2022-03-063-107/+0
| | | | | | | | This patch moves the patches of parser_trx in mediatek target to generic/backport-5.10 to use the changes from ramips target and backport the additional patch of the parser. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* mediatek: add support for Ruijie RG-EW3200GX PROLanghua Ye2022-03-054-1/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X32 Pro is another product name for it in the Chinese market. Specifications: - SoC: MT7622B - RAM: 256MB - Flash: XMC XM25QH128C or Winbond WQ25Q128JVSQ 16MB SPI NOR - Ethernet: 5x1GbE - Switch: MT7531BE - WiFi: 2.4G: MT7622 5G: MT7915AN+MT7975AN - 3LEDs: System LED(blue) + Mesh LED(green) + Mesh LED(red) - 2Keys: Mesh button + Reset button - UART: Marked J19 on board. 3.3v, 115200n1 - Power: 12V 2.5A MAC addresses as verified by OEM firmware: use address source WAN *:F4 ethaddr@product_info LAN *:F5 5g *:F6 2g *:F7 Flash instruction: 1. Serve the initramfs.img using a TFTP server with address 10.10.10.3. 2. Interrupt the uboot startup process via UART. 3. Select "System Load Linux to SDRAM via TFTP" item. 4. (important) Back up firmware(mtd7) partitions with: dd if=/dev/mtd7 of=/tmp/firmware.bin and then download the firmware.bin image via SCP. 5. Flash the OpenWrt sysupgrade firmware. Recovery stock firmware: 1. Transfer the firmware.bin image to the device. 2. Flash the image with: mtd write firmware.bin firmware Signed-off-by: Langhua Ye <y1248289414@outlook.com>
* kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigsRui Salvaterra2022-03-011-2/+0
| | | | | | They are required for container support, but are handled in Config-kernel.in. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: 5.10: allocate last level PTEs in high memoryRui Salvaterra2022-03-011-1/+1
| | | | | | | | | | Enable support for allocating user space page table entries in high memory [1], for the targets which support this feature. This saves precious low memory (permanently mapped, the only type of memory directly accessible by the kernel). [1] https://www.kernel.org/doc/html/latest/vm/highmem.html Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: mt7623: drop RAMFS_COPY_BINDaniel Golle2022-02-221-2/+0
| | | | | | | fwtool is now always part of the sysupgrade stage2 ramdisk, so drop the no longer needed RAMFS_COPY_BIN variable. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: drop RAMFS_COPY_BIN and RAMFS_COPY_DATADaniel Golle2022-02-221-2/+0
| | | | | | | | | Now that both, fw_printenv/fw_setenv and fwtool are always present during stage2 sysupgrade, we no longer need to list them in RAMFS_COPY_BIN and RAMFS_COPY_DATA in platform.sh. Drop both variables as they are now unneeded. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.10 to 5.10.100John Audia2022-02-114-5/+5
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.10 to 5.10.98John Audia2022-02-114-5/+5
| | | | | | | | | | | | | Manually rebased: bcm27xx/patches-5.10/950-0675-drm-vc4-hdmi-Drop-devm-interrupt-handler-for-CEC-int.patch All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* mt7622: linksys-e8450: enable using mt7531 switch irqDaniel Golle2022-02-101-0/+4
| | | | | | | | Turns out the MT7531 switch IRQ line is connected to GPIO#53 just like on the BPi-R64, so this seems to be part of the reference design and will probably apply to most MT7622+MT7531 boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mt7622: bpi-r64: enable using mt7531 switch irqDaniel Golle2022-02-101-0/+13
| | | | | | | | | | Now that we support link-state-change interrupts, wire up MT7531 IRQ line which is connected to GPIO#53 according to the schematics [1]. As a result, PHY state no longer needs to be polled on that board. [1]: https://forum.banana-pi.org/t/bpi-r64-mt7622-schematic-diagram-public/10118 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: backport MediaTek Ethernet PHY driverDENG Qingfang2022-02-092-0/+2
| | | | | | | | | | | | | | Add support for MediaTek Gigabit Ethernet PHYs found in MT7530 and MT7531. Fix some link up/down issues. The errornous check for the PHY mode which broke things with MT7531 has been removed as suggested by patch net: phy: mediatek: remove PHY mode check on MT7531 As a result, things are working fine now on MT7622+MT7531 as well. Signed-off-by: DENG Qingfang <dqfext@gmail.com> Tested-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
* Revert "kernel: backport MediaTek Ethernet PHY driver"Hauke Mehrtens2022-02-052-2/+0
| | | | | | | | | | | | | | | | | | This reverts commit 8b4cba53a9402f44da2dced4a78ca065b15dca94. This broke the mt7530 on Linksys e8450 (mt7622) for me. [ 1.312943] mt7530 mdio-bus:00 lan1 (uninitialized): failed to connect to PHY: -EINVAL [ 1.320890] mt7530 mdio-bus:00 lan1 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 0 [ 1.331163] mt7530 mdio-bus:00 lan2 (uninitialized): failed to connect to PHY: -EINVAL [ 1.339085] mt7530 mdio-bus:00 lan2 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 1 [ 1.349321] mt7530 mdio-bus:00 lan3 (uninitialized): failed to connect to PHY: -EINVAL [ 1.357241] mt7530 mdio-bus:00 lan3 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 2 [ 1.367452] mt7530 mdio-bus:00 lan4 (uninitialized): failed to connect to PHY: -EINVAL [ 1.375367] mt7530 mdio-bus:00 lan4 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 3 [ 1.385750] mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY: -EINVAL [ 1.393575] mt7530 mdio-bus:00 wan (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 4 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: backport MediaTek Ethernet PHY driverDENG Qingfang2022-02-052-0/+2
| | | | | | | | | Add support for MediaTek Gigabit Ethernet PHYs found in MT7530. Fix some link up/down issues. Signed-off-by: DENG Qingfang <dqfext@gmail.com> Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>