aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7623
Commit message (Collapse)AuthorAgeFilesLines
* mediatek: build ubnt-ledbar as a moduleChuanhong Guo2022-07-041-1/+0
| | | | | | | | | 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> (cherry picked from commit d9ea9c06e98b597174e0e94e0a13934637c0c03e)
* 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>
* kernel: backport MediaTek Ethernet PHY driverDENG Qingfang2022-02-091-0/+1
| | | | | | | | | | | | | | 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-051-1/+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-051-0/+1
| | | | | | | | | 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>
* mediatek: mt7623: rework images for U7623-02 boardDaniel Golle2022-01-234-37/+21
| | | | | | | | | | | | | | | | | | | | | | Users of older OpenWrt versions need sysupgrade using the *emmc.img.gz file once which will upgrade U-Boot and switch to the new image layout. Users of the vendor firmware need to first flash the legacy image to then sunsequently carry out a full-flash upgrade. Alternatively the board can also be flashed using MediaTek's proprietary SP Flash Tool. Configuration as well as persistent MAC address will be lost once at this point and you will have to redo (or restore) all configuration manually. To restore the previous persistent MAC address users may set it manually using fw_setenv ethaddr 00:11:22:33:44:55 For future upgrades once running OpenWrt past this commit, the usual *sysupgrade.itb file can be used. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: Re-enable ARM arch timerDavid Woodhouse2022-01-101-0/+1
| | | | | | | | | CONFIG_ARM_ARCH_TIMER cannot be enabled in the config directly; it is only selected by CONFIG_HAVE_ARM_ARCH_TIMER. We need to enable the latter in our config. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Fixes: 4f1c5b01c1 ("mediatek: mt7623: backport musb, improve HDMI console")
* kernel: 5.10: consolidate mac80211 crypto optionsSergey Ryazanov2021-12-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | Each of - CRYPTO_AEAD2 - CRYPTO_AEAD - CRYPTO_GF128MUL - CRYPTO_GHASH - CRYPTO_HASH2 - CRYPTO_HASH - CRYPTO_MANAGER2 - CRYPTO_MANAGER - CRYPTO_NULL2 either directly required for mac80211 crypto support, or directly selected by such options. Support for the mac80211 crypto was enabled in the generic config since c7182123b9 ("kernel: make cryptoapi support needed by mac80211 built-in"). So move the above options from the target configs to the generic config to make it clear why do we need them. CC: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* kernel: filter out both Clang and LLD versionsSergey Ryazanov2021-12-171-1/+0
| | | | | | | | Both CLANG_VERSION and LLD_VERISON are autogenerated runtime configuration options, so add them to the kernel configuration filter and remove from generic and per-target configs to keep configs clean. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* mediatek: mt7623: switch to BPi-R2 to generic eMMC sysugpradeDaniel Golle2021-12-021-16/+3
| | | | | | | Make use of new functions in emmc.sh to implement sysupgrade on the BananaPi BPi-R2. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: re-write sysupgrade uImage.FIT on MMCDaniel Golle2021-11-122-16/+13
| | | | | | | | | | | | | | Re-reading the partition table doesn't work reliably, it fails if anything on the device is still in use and it's not trivial to prevent every possible case of a block device still being in use somehow. Therefore, instead of relying on the in-kernel partition parser to know where to write the configuration backup, use OpenWrt's format-agnostic fwtool to strip off all metadata from the image and count its blocks while writing. In that way we can know where to write the config backup without needing the kernel to parse the MBR and FIT structures. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: Set some options in generic configurationHauke Mehrtens2021-11-021-1/+0
| | | | | | | Add CONFIG_USB_ETH and CONFIG_PWM_JZ4740 to generic kernel configuration. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7623: make use of find_mmc_partDaniel Golle2021-11-011-5/+5
| | | | | | | Use find_mmc_part instead of previously introduced get_partition_by_name which requires a custom kernel patch. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: make sure MMC is not busy before commencing sysupgradeDaniel Golle2021-10-281-0/+1
| | | | | | | | | In case of the block device still being in use, re-reading the partition table fails. In that case, abort sysupgrade to avoid corrupting the just-written image because of wrong offsets caused by failure to re-read the partition table. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: enable configfs for DT overlay on mt7622 and mt7623Daniel Golle2021-10-091-0/+2
| | | | | | | | | Enable kernel options to allow loading device tree overlay via configfs at runtime. This is useful for devboards like the BPi-R2 and BPi-R64 which got RasbPi-compatible 40-pin GPIO header which allow all sorts of extensions. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add FEATURES and order them alphabeticallyDaniel Golle2021-09-301-1/+1
| | | | | | | | Add common features 'gpio', 'nand', 'pci', 'pcie', 'squashfs' and 'usb' for all mediatek targets, add 'display' and 'usbgadget' for MT7623. Sort features alphabetically while at it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21Hauke Mehrtens2021-09-091-1/+0
| | | | | | | | | | | | The default value for CONFIG_RCU_CPU_STALL_TIMEOUT was changed from 60 seconds to 21 seconds in 2012 in the upstream kernel. Some targets already use 21 seconds. This patch changes the default value in the generic configuration to 21 seconds and removes the target specific configuration options. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: move two symbols to the generic kconfigsRui Salvaterra2021-08-291-2/+0
| | | | | | | CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them to the generic kconfigs. And resort the generic kconfigs while at it. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: disable CONFIG_RCU_EXPERT and friendsRui Salvaterra2021-08-291-1/+0
| | | | | | | | | | | | | | Based on the existing documentation [1][2], I dare anyone to demonstrate that we need to fine-tune these RCU parameters. The (performance) breakage potential for doing so is immense, so let's just please put down this loaded footgun. Disable CONFIG_RCU_EXPERT and its dependent symbols. Additionally, remove the CONFIG_RCU_EXPERT symbol from the target kconfigs which contain it. [1] https://www.kernel.org/doc/Documentation/RCU/Design/Data-Structures/Data-Structures.html [2] https://lwn.net/Articles/777214/ Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: mt7623: replace kconfig symbol for snand driverChuanhong Guo2021-08-271-1/+1
| | | | | | | this change was missing during the spi-nand driver replacement, causing build failure. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7629: build with linux 5.10Chuanhong Guo2021-08-271-1/+0
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7623: enable clock drivers for Mali-450 and audioDaniel Golle2021-08-221-2/+2
| | | | | | | Built clock drivers for G3DSYS and AUDSYS into the kernel to allow multimedia features (GPU and audio) to work if they exist. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: backport musb, improve HDMI consoleDaniel Golle2021-08-212-5/+31
| | | | | | | | | Backport support for dual-role USB 2.0 as that's what is actually built-into MT7623. Improve HDMI console by enabling VT and setting up tty1..tty6. Re-add accidentally removed CONFIG_ARM_ARCH_TIMER. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: enable more hardware featuresDaniel Golle2021-08-212-12/+115
| | | | | | | In order to make HDMI console available on the BananaPi BPi-R2 select various Kconfig symbols which are useful for systems with graphics. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add missing config symbolsDavid Bauer2021-08-131-0/+12
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: add missing config symbolDavid Bauer2021-08-111-0/+1
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* treewide: add various missing config symbolsDavid Bauer2021-08-101-0/+1
| | | | | | Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices") Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: remove ext4 images from mt7623 buildDaniel Golle2021-07-201-1/+1
| | | | | | | | A full read-write rootfs cannot work inside uImage.FIT as the hash will obviously change once writing to it. Disable generating ext4 rootfs images. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: fix typo in kernel mt7623/config-5.10Daniel Golle2021-07-201-1/+1
| | | | | | Fix typo reported by github user @mans0n. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: rework Bananapi BPi-R2Daniel Golle2021-07-203-28/+26
| | | | | | | | | | | | | * introduce recovery (=initramfs) vs. production dual boot scheme * make use of uImage.FIT (instead of FAT partition) * generate images using build steps (instead of external scripts) * simplify sysupgrade and config restore (thanks to uImage.FIT) * make sure mmc devices are ordered persistently (set DT aliases) This commit breaks sysupgrade from existing installations, you will have to re-install using the sdcard.img.gz image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: build with Linux 5.10Daniel Golle2021-07-202-90/+76
| | | | | | | | Update Kernel config and set Linux 5.10 for mediatek/mt7623. (patches have already been updated to 5.10 when mt7622 was bumped) Tested on Bananapi BPi-R2. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: Add missing config optionsHauke Mehrtens2021-05-011-0/+1
| | | | | | | | It is possible to select CONFIG_MTD_PARSER_TRX on the mediatek now. Add this option to the kernel configuration file. Fixes: 58c5e2566482 ("mediatek: support non standard trx magic values") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: switch the timer frequency to 100 HzRui Salvaterra2021-04-211-2/+0
| | | | | | | | Some targets select HZ=100, others HZ=250. There's no reason to select a higher timer frequency (and 100 Hz are available in every architecture), so change all targets to 100 Hz. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* treewide: remove redundant ubifs kconfig symbolsRui Salvaterra2021-04-211-4/+0
| | | | | | | For the targets which enable ubifs, these symbols are already part of the generic kconfigs. Drop them from the target kconfigs. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2021-03-191-1/+0
| | | | | | Move some disabled symbols found in armvirt target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-061-1/+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: implement bad-block management table supportFelix Fietkau2021-02-281-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: add Ubiquiti LED driverDavid Bauer2021-02-181-0/+1
| | | | | | | | | | | Add a driver for controlling the RGB LED via Ubiquitis own "LEDBAR" LED controller based on the Holtek HT32F52241 MCU. This driver is initially used by the Ubiquiti UniFi 6 LR, however judging from FCC pictures the MCU is also found on the U6-Mesh as well as the U6-Extender. Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: remove generic profilesAdrian Schmutzler2021-01-271-15/+0
| | | | | | | | | | We have support for reference boards available on this target, so support for an additional generic profile does not make much sense. Remove it to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2020-12-221-2/+0
| | | | | | Move some disabled config options found in lantiq target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* kernel: remove support for kernel 4.19Adrian Schmutzler2020-10-301-509/+0
| | | | | | | We use 5.4 on all targets by default, and 4.19 has never been released in a stable version. There is no reason to keep it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: move CONFIG_F2FS_CHECK_FS to generic kernel configHauke Mehrtens2020-10-111-1/+0
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Move CONFIG_F2FS_FS_SECURITY to generic kernel configHauke Mehrtens2020-10-111-1/+0
| | | | | | | Move the CONFIG_F2FS_FS_SECURITY kernel configuration option to the generic kernel configuration. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Remove 2FS_FS_XATTR and F2FS_STAT_FS symbols from target configsHauke Mehrtens2020-10-112-3/+0
| | | | | | | This config option was moved to the generic kernel configuration. Fixes: ab1bd576562b ("kernel: move F2FS_FS_XATTR and F2FS_STAT_FS symbols to generic") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: clean up XATTR config symbolsPaul Spooren2020-10-091-1/+0
| | | | | | | | | | | | | Extended attributes are required for overlayfs and have hence been long ago enabled for jffs2, but should be enabled unconditionally for all other filesystems which may potentially serve as overlayfs' upper directory. Previously it was inconsistently added in multiple targets. Add symbols to generic kernel config and remove all *_XATTR symbols from target configs. Signed-off-by: Paul Spooren <mail@aparcar.org> [keep things as they are for squashfs, improve commit message] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: unify CONFIG_GPIO_SYSFS in kernel configsFelix Fietkau2020-08-062-2/+0
| | | | | | Enable it for all platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: mt7623: prepare for full sysupgrade support on UniElec U7623David Woodhouse2020-07-262-88/+117
| | | | | | | | | | | | | | | | | An upcoming commit will add a full system image for U7623 which will contain the MBR partition table and U-Boot too. That contrasts with the current image which only owns the eMMC from sector 0xa00 onwards, and must start with a legacy uImage. Prepare for sysupgrade to the new images, and cope with the fact that the recovery partition will be /dev/mmcblk0p2 instead of /dev/mmcblk0p1 after the upgrade. This commit could potentially be backported to 19.07 to allow for direct sysupgrade to the new image layout. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: increase flexibility of finding recovery partitionDavid Woodhouse2020-07-261-8/+14
| | | | | | | I'm about to change the layout of the images for UniElec U7623 so make it find the recovery partition based on which the root partition is too. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623David Woodhouse2020-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board ships with an ancient 14.07-based OpenWrt using block2mtd, and the MBR partition table contains nonsense. It is possible to sysupgrade to an upstream OpenWrt image, but the legacy layout of the OpenWrt images start at 0xA00 in the eMMC, with a raw uImage. The legacy OpenWrt image doesn't "own" the beginning of the device, including the MBR and U-Boot. This means that when a user upgrades to upstream OpenWrt, it doesn't boot because it can't find the right partitions. So hard-code them on the kernel's command line using CONFIG_CMDLINE_PARTITION (for block). Additionally, the vendor firmware doesn't cope with images larger than about 36MiB, because it only overwrites the contents of its "firmware" MTD partition. The current layout of the legacy image wastes a lot of space, allowing over 32MiB for the kernel and another 10MiB for the FAT recovery file system which is only created as 3MiB. So pull those in to allow 4¾ MiB for the kernel, 3MiB for recovery, and then we have over 20MiB for the root file system. This doesn't affect the new images which ship with a full eMMC image including a different MBR layout and a partition for U-Boot, because our modern U-Boot can actually pass the command line to the kernel, and the built-in one doesn't get used anyway. Tested by upgrading from vendor OpenWrt to the current legacy image, from legacy to itself, to the previous legacy layout, and then to finally the full-system image. This commit probably wants backporting to 19.07, which also doesn't install over the vendor OpenWrt and doesn't even have a full-system installation option. Signed-off-by: David Woodhouse <dwmw2@infradead.org>