aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* mediatek: mt7623: simplify partition generationDaniel Golle2022-01-311-6/+1
| | | | | | | | | The two options 'emmc' and 'sdmmc' now became identical lines after introducing CONFIG_TARGET_ROOTFS_PARTSIZE. Remove the now useless if-clauses. Fixes: a40b4d335a ("mediatek: use CONFIG_TARGET_ROOTFS_PARTSIZE") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: u7623-02: enable early console also in legacy imageDaniel Golle2022-01-311-1/+1
| | | | | | | | Append 'earlycon=uart8250,mmio32,0x11004000' to the boot arguments embedded in device-tree in order to enable early console on the UniElec U7623 board when using the vendor/stock bootloader. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: include regular AHCI PCI driverDaniel Golle2022-01-251-1/+1
| | | | | | | | | The legacy image for the UniElec U7623-02 until now included kmod-ata-ahci-mtk. The MT7623 chip doesn't have that IP and that board uses a PCIe-connected AHCI controller for the SATA port and mSATA-pins of the mPCIe socket. Hence include kmod-ata-ahci instead. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: store random MAC address in U-Boot env on first bootDaniel Golle2022-01-231-0/+14
| | | | | | | For devboards without a MAC address assigned from factory, store the random MAC in U-Boot env on first boot to make it persistent. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-envtools: add configuration for UniElec U7623 boardDaniel Golle2022-01-231-5/+5
| | | | | | | Add U-Boot env settings to allow accessing the environment using fw_printenv and fw_setenv tools on the UniElec U7623 board. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: rework images for U7623-02 boardDaniel Golle2022-01-2313-313/+95
| | | | | | | | | | | | | | | | | | | | | | 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: add common DTS aliases for UniElec U7623 boardDaniel Golle2022-01-231-2/+8
| | | | | | | | * Use serial0 instead of serial2 for the only serial port * Add LED aliases * Add ethernet0 alias to inherit ethaddr from U-Boot env Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: use CONFIG_TARGET_ROOTFS_PARTSIZEDaniel Golle2022-01-233-5/+5
| | | | | | | Enable 'rootfs-part' feature to make the size of the partition of the production image configurable instead of hard-coding it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: Enable PCIe bus 0 (and thus SATA) on U7623David Woodhouse2022-01-141-0/+8
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: rework and fix mt7622-rfb1-ubi supportFelix Fietkau2022-01-134-12/+15
| | | | | | | | Limit bmt remapping range to cover everything up to and including the kernel image, use the rest of the flash area for ubi. Fix partition table and sysupgrade support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: move mediatek BMT support patch to generic patchesFelix Fietkau2022-01-132-871/+36
| | | | | | | Preparation for supporting BMT on MT7621. Move source files to the files/ subdirectory in order to simplify maintenance Signed-off-by: Felix Fietkau <nbd@nbd.name>
* 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")
* mediatek: mt7623: Disable power button reset for U7623-02 boardDavid Woodhouse2022-01-101-0/+4
| | | | | | | | | | | | The Unielec U7623 doesn't have a physical power button; I think it's hard wired so that it turns on automatically when power is applied (unlike the Banana Pi R2 which is a pain). So the 'reset on long press of power button' behaviour that we get when we enable the PMIC keyboard driver is kind of unhelpful. Disable it. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Fixes: 0d3f3323a2 ("mediatek: mt7623: enable more hardware features")
* mediatek mt7622: fix 300mhz typo in dtsFritz D. Ansel2022-01-091-0/+27
| | | | | | | | | | | | | | The lowest frequency should be 300MHz, since that is the label assigned to the OPP in the mt7622.dtsi device tree, while there is one missing zero in the actual value. To be clear, the lowest frequency should be 300MHz instead of 30MHz. As mentioned @dangowrt on the OpenWrt forum there is no benefit in leaving 30MHz as the lowest frequency. Signed-off-by: Jip de Beer <gpk6x3591g0l@opayq.com> Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
* mediatek: Clause-45 MDIO patch accepted upstreamDaniel Golle2022-01-056-255/+310
| | | | | | | To easy future maintainance, replace the local patch with what has been accepted into net-next and is likely to end up in Linux 5.17. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: let mtk_eth_soc MAC announce 2500Base-T modeDaniel Golle2022-01-051-0/+10
| | | | | | | | To allows Ethernet phys supporting 2500Base-T mode to announce that speed, enable the corresponding bit in mtk_eth_soc driver. This should hopefully unlock 2500Base-T speed on the UniFi 6 LR. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: yet again, replace patch with updated pending patchDaniel Golle2021-12-272-37/+125
| | | | | | | | | Upon comment of Russell King ('Oh no, not this "-1 disease" again.') clean up mdio read and write return type and value in mtk_eth_soc driver and also use appropriate return values for bus-busy-timeout- errors in newly added Clause 45 access code. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: replace patch with version sent upstreamDaniel Golle2021-12-272-94/+166
| | | | | | | | | Replace recently added patch 701-net-ethernet-mtk_eth_soc-add-support-for-clause-45-mdio.patch with version sent upstream 701-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-access.patch Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: unifi6lr: properly register Ethernet PHYDaniel Golle2021-12-261-8/+4
| | | | | | | | | | | This change enables proper Ethernet link status and speed reporting on the Ubiquiti UniFi 6 LR access point: mtk_soc_eth 1b100000.ethernet eth0: PHY [mdio-bus:08] driver [Aquantia AQR112C] (irq=POLL) mtk_soc_eth 1b100000.ethernet eth0: configuring for phy/2500base-x link mode mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: enable driver for Aquantia PHYsDaniel Golle2021-12-261-0/+1
| | | | | | | Enable Aquantia Ethernet PHY driver as there is an AQR112C 2500Base-T PHY in the Ubiquiti UniFi 6 LR access point. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for Clause 45 MDIO accessDaniel Golle2021-12-261-0/+94
| | | | | | | Add support for Clause 45 MDIO PHY register read and write operations to mtk_eth_soc driver. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: bpi-r2: add ethernet alias to device treeDaniel Golle2021-12-181-0/+10
| | | | | | | Add ethernet0 alias in device tree to make U-Boot inherit the Ethernet mac address (set via environment variable 'ethaddr') down to Linux. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: 5.10: consolidate mac80211 crypto optionsSergey Ryazanov2021-12-173-11/+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-173-3/+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>
* kernel: bump 5.10 to 5.10.84John Audia2021-12-172-2/+2
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia <graysky@archlinux.us>
* mediatek: enable bmt on mt7622-rfb1Felix Fietkau2021-12-041-0/+11
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: bmt: use generic mtd apiChuanhong Guo2021-12-041-50/+57
| | | | | | | | | | | BMT replaces nand-specific ops for erasing and writing, but the mtk-snand driver only implements generic mtd api. Replace erase, block_isbad, block_markbad in mtd_info for generic mtd drivers. Fixes: b600aee3ed ("mediatek: attach bmt to the new snand driver") Signed-off-by: Chuanhong Guo <gch981213@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: mt7622: switch to generic eMMC sysupgradeDaniel Golle2021-12-022-18/+5
| | | | | | | Use functions in newly introduced emmc.sh for sysupgrade of the BananaPi BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek/mt7622: unifi-6-lr: fix ucidef network configuration typoMark Mentovai2021-11-191-1/+1
| | | | | | | | There's no such thing as ucidef_set_interfaces_lan. It's ucidef_set_interface_lan. Cc: David Bauer <mail@david-bauer.net> Signed-off-by: Mark Mentovai <mark@moxienet.com>
* kernel: bump 5.10 to 5.10.80Rui Salvaterra2021-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Deleted (upstreamed): ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch [1] bcm53xx/patches-5.10/033-v5.15-0012-ARM-dts-BCM5301X-Fix-memory-nodes-names.patch [2] lantiq/patches-5.10/0016-mtd-rawnand-xway-Keep-the-driver-compatible-with-on-.patch [3] lantiq/patches-5.10/0110-MIPS-lantiq-dma-add-small-delay-after-reset.patch [4] lantiq/patches-5.10/0111-MIPS-lantiq-dma-reset-correct-number-of-channel.patch [5] lantiq/patches-5.10/0112-MIPS-lantiq-dma-fix-burst-length-for-DEU.patch [6] Manually rebased: ipq806x/patches-5.10/0065-arm-override-compiler-flags.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=47462c5e600fbaffd755cd13dedd80d04e41ff83 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=2fde76df1885a6bec04317e457121326070450eb [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=9b366f5221d8aa64b22f35be137a5749326444ce [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=5af57ce8a6155fe3e4270d28d171abf8903bebc0 [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=b92a5df2c7adc79a57481445f67de0c1c716581f [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=6b72caabc47011d03f44064452b2c65e8ed18326 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: mt7622: bpi-r64: rewrite MMC uImage.FIT sysupgradeDaniel Golle2021-11-122-17/+14
| | | | | | | | | | Similar to mt7623, also no longer use 'blockdev' and stop relying on in-kernel partition parsers. Instead, strip off all metadata using 'fwtool' while writing the firmware image and scrape the number of blocks written from 'dd', then use that block offset to stash the configuration backup. 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: mt7622: make use of find_mmc_partDaniel Golle2021-11-011-6/+6
| | | | | | | 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>
* kernel: bump 5.10 to 5.10.76Rui Salvaterra2021-10-301-1/+1
| | | | | | | | | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1] Manually rebased: bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch Note: although automatically rebaseable, the last patch has been edited to avoid conflicting bit definitions. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: make sure MMC is not busy before commencing sysupgradeDaniel Golle2021-10-282-0/+2
| | | | | | | | | 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>
* kernel: bump 5.10 to 5.10.74Rui Salvaterra2021-10-211-1/+1
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mediatek: add EEPROM data for BPi-R64 2.4GHz wmacDaniel Golle2021-10-151-0/+31
| | | | | | | | | | | EEPROM data extracted from vendor image found at http://forum.banana-pi.org/t/bpi-r64-mt7622-mac80211-wifi-driver/10246/77 http://forum.banana-pi.org/uploads/short-url/jworbyBYpvrw9VQ2sx92B9z6DWS.bin MAC address in the EEPROM has been zero'd which results in random address on boot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: enable configfs for DT overlay on mt7622 and mt7623Daniel Golle2021-10-092-0/+5
| | | | | | | | | 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>