aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* mediatek: add missing DTS entries for WED on MT7986Felix Fietkau2023-03-051-0/+65
| | | | | | Needed to support WLAN offloading Signed-off-by: Felix Fietkau <nbd@nbd.name>
* linux-firmware: add mt7986 offload firmwareFelix Fietkau2023-03-021-1/+1
| | | | | | | This is needed for WED support on MT7986. Enable it by default for the filogic subtarget. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: remove label = "cpu" from DSA dt-bindingArınç ÜNAL2023-02-2611-11/+0
| | | | | | | This is not used by the DSA dt-binding, so remove it from all devicetrees. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9cc115d8d6f73dd260de1609182f3645844d6907 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* mediatek: add support for Netgear WAX206Marcel Ziswiler2023-02-185-1/+591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MediaTek MT7622BV * RAM: DDR3 512 MiB (Nanya NT5CC256M16ER-EK) * Flash: SPI-NAND 256 MiB (Toshiba TC58CVG1S3HRAIJ) * Wi-Fi 2.4/5 GHz 4T4R: * 2.4 GHz: MediaTek MT7622BV * 5 GHz: MediaTek MT7915AN/MT7975AN * Ethernet: 4x 10/100/1000 Mbps LAN, 1x 10/100/1000/2500 Mbps WAN (Realtek RTL8221B PHY) * Switch: MediaTek MT7531AE * LEDs/Keys: 8/1 (Power, Internet, LAN1, LAN2, LAN3, LAN4, Wifin and Wifia dual-colour LEDs + Reset pin) * UART: Marked J19 on board VCC GND TX RX, beginning from "1". 3.3v, 115200n8 * Power: 12 VDC, 2.5 A 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. * U-Boot allows booting an initramfs image via TFTP as follows: setenv ipaddr 192.168.1.1 setenv serverip 192.168.1.100 tftpboot openwrt-mediatek-mt7622-netgear_wax206-initramfs-recovery.itb bootm Known Limitations: * The 2.5G WAN port labeled 'wan' only works for speeds up to 1G at the moment. If connected to a multi-gig port the speed has to be manually set to 1G/full either for the switch port or in OpenWrt. For example add the following to /etc/rc.local to set it on boot: /usr/sbin/ethtool -s wan speed 1000 duplex full Revert to stock firmware: * Flash the stock firmware to the bootloader using TFTP/NMRP. References to WAX206 GPL source: https://www.downloads.netgear.com/files/GPL/WAX206_V1.0.4.0_Source.rar * openwrt/target/linux/mediatek/dts/mt7622-netgear-wax206.dts DTS file for this device. * openwrt/target/linux/mediatek/image/mt7622.mk Image creation code for this device Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> [fix WAN port (1G only), adjust partition layout, adjust image creation] Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
* mediatek: mtk_thermal: replace with upstream patchDaniel Golle2023-02-152-41/+114
| | | | | | | Replace local patch adding thermal support for MT7986 with version accepted upstream. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: fix rootfs/ubi detection for Xiaomi AX6SOleg S2023-02-111-1/+0
| | | | | | | | | | | | | | | | | By specifying the flag "denx,fit" for partition "kernel", the kernel try to find rootfs in the same partition during boot. Reality is that the placement of rootfs is precisely determined by the name of another partition -"ubi". It was also found that on some device (for example devices with NAND chips), the "Denx search engine" manages to find roots at the end of partition "kernel", but such partition doesn't exist and is empty there. Fix this by removing the "denx,fit" flag from partition "kernel". With this change the original behavior of searchif rootfs in partition "ubi" is restored. Signed-off-by: Oleg S <remittor@gmail.com>
* mediatek: fix dts whitespaceFelix Baumann2023-02-091-1/+1
| | | | | | Replace blanks with tabs Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* treewide: replace wpad-basic-wolfssl defaultRosen Penev2023-02-042-2/+2
| | | | | | | The newly merged mbedtls backend is smaller and has fewer ABI related issues than the wolfSSL one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mt76: update to the latest version, import WED related mtk_eth_soc patchesFelix Fietkau2023-02-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c256218e59e wifi: mt76: dma: use napi_build_skb 679254c50f27 mt7915: add CONFIG_MT76_LEDS to cflags 15b9dd6b1b6a wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work 8e5c21fe7c5c wifi: mt76: mt7915: rework mt7915_mcu_set_thermal_throttling 87cb74fe42d9 wifi: mt76: mt7915: rework mt7915_thermal_temp_store() c6f24b83eba5 wifi: mt76: mt7915: add error message in mt7915_thermal_set_cur_throttle_state() 99e96b89ee4d wifi: mt76: mt7915: add chip id condition in mt7915_check_eeprom() 833cd420480f wifi: mt76: mt7921: fix channel switch fail in monitor mode f1f8bae6092d wifi: mt76: mt7921: add ack signal support f47087a6dd62 wifi: mt76: mt7996: fix chainmask calculation in mt7996_set_antenna() 2f3b0acc1588 wifi: mt76: mt7996: update register for CFEND_RATE 7e9540dcbd70 wifi: mt76: mt7996: do not hardcode vht beamform cap a37e427d0959 wifi: mt76: connac: fix POWER_CTRL command name typo 98aa346042bd wifi: mt76: mt7915: remove BW160 and BW80+80 support 94fed6a43541 wifi: mt76: mt7921: fix invalid remain_on_channel duration 3c162384d80a wifi: mt76: introduce mt76_queue_is_wed_rx utility routine a409a9454587 wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit 8b27ecd3a684 wifi: mt76: mt7996: fix memory leak in mt7996_mcu_exit 683760461dd0 wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup 0c750cf08f85 wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup 5de9ae29bea2 wifi: mt76: mt7915: avoid mcu_restart function pointer dad96dd3e62d wifi: mt76: mt7603: avoid mcu_restart function pointer 19d36dd9c8ea wifi: mt76: mt7615: avoid mcu_restart function pointer 6fe2c2383d3d wifi: mt76: mt7921: avoid mcu_restart function pointer 9df89143bf71 wifi: mt76: mt7915: get rid of wed rx_buf_ring page_frag_cache 8d51d11760cb wifi: mt76: fix switch default case in mt7996_reverse_frag0_hdr_trans 0d8057dbd51c wifi: mt76: mt7921u: add support for Comfast CF-952AX ddbf4e933d54 wifi: mt76: mt7915: set sku initial value to zero 06a8904e954e wifi: mt76: mt7915: wed: enable red per-band token drop 724a337caef9 wifi: mt76: mt7915: fix WED TxS reporting 747ca943a5bb wifi: mt76: add flexible polling wait-interval support 133d7859977a wifi: mt76: mt7921: reduce polling time in pmctrl 5fe319a0550e wifi: mt76: add memory barrier to SDIO queue kick 822f060b9d19 wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent c6794954a723 wifi: mt76: mt7915: fix memory leak in mt7915_mmio_wed_init_rx_buf 9686cd7cc65c wifi: mt76: switch to page_pool allocator 04da4eaa8235 wifi: mt76: enable page_pool stats 1af4a911ebcb wifi: mt76: mt7915: release rxwi in mt7915_wed_release_rx_buf e8c10835cf06 wifi: mt76: fix compile error without CONFIG_PAGE_POOL_STATS 0cf0ede7cc42 net: ethernet: mtk_wed: add reset to rx_ring_setup callback 715b3ed9708a net: ethernet: mtk_wed: add reset to tx_ring_setup callback 9107381d0ff3 wifi: mt76: mt7921: fix error code of return in mt7921_acpi_read 36d2a5bf7802 wifi: mt76: mt7996: rely on mt76_connac2_mac_tx_rate_val c67f57d2cda2 wifi: mt76: dma: add reset to mt76_dma_wed_setup signature 3dace36e2941 wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset 4b229d2da562 wifi: mt76: mt7915: add mt7915 wed reset callbacks f83958376085 wifi: mt76: mt7915: complete wed reset support 321edbb414dc wifi: mt76: mt7996: rely on mt76_connac_txp_common structure bdb7dc38a6d1 wifi: mt76: mt7996: rely on mt76_connac_txp_skb_unmap 8688756305c6 wifi: mt76: mt7996: rely on mt76_connac_tx_complete_skb fbf986dbd4c0 wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap adc556cbce37 wifi: mt76: mt7996: avoid mcu_restart function pointer 5eb4e2303be4 wifi: mt76: remove __mt76_mcu_restart macro e7a61c5f70f5 wifi: mt76: add EHT phy type b375845abc10 wifi: mt76: connac: add CMD_CBW_320MHZ 68b17a243332 wifi: mt76: connac: add helpers for EHT capability 02ec1f61b3a2 wifi: mt76: connac: add cmd id related to EHT support 9209294cd81b wifi: mt76: increase wcid size to 1088 5e85136c9b2f wifi: mt76: add EHT rate stats for ethtool a171f672fdeb wifi: mt76: mt7996: add variants support eda8fd62c105 wifi: mt76: mt7996: add helpers for wtbl and interface limit 4a5a9f4cdc3b wifi: mt76: mt7996: rework capability init 06b73c155680 wifi: mt76: mt7996: add EHT capability init ae71a1b8294f wifi: mt76: mt7996: add support for EHT rate report 65bdfae2991d wifi: mt76: mt7996: enable EHT support in firmware b2360d59747c wifi: mt76: mt7996: add EHT beamforming support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: fix wrong return code in platform_check_image()Chen Minqiang2023-01-292-1/+2
| | | | | | Ensure that the platform_check_image() function returns an error code. Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* mediatek: filogic: fix sysupgrade on MMC on the BPi-R3Daniel Golle2023-01-161-4/+7
| | | | | | | | A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: fix sysupgrade on MMC on BPi-R64Daniel Golle2023-01-161-0/+1
| | | | | | | | A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: d640cbac0e ("mediatek: mt7622: don't rely on existing image for sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mt76: add stand-alone MT7622 firmware packageShiji Yang2023-01-072-4/+4
| | | | | | | | | Add a separate firmware package to avoid installing the MT7615 firmware on all MT7622 target devices by default. Now we only add MT7615 firmware packages for devices that use MT7615E. This commit also removes the explicit dependency on kmod-mt7615e to refine the package dependency. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* mt76: add stand-alone MT7915 firmware packageShiji Yang2023-01-071-10/+10
| | | | | | | | | The mt7915e driver supports MT7915, MT7916 and MT7986 chips. And Only MT7915 series chips need the MT7915 firmware. To save storage, extract them from the common code package and create a new package to provide the firmware. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* treewide: update NVMEM symbolsRafał Miłecki2023-01-074-4/+4
| | | | | Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: update nvmem subsystem to the latest upstreamRafał Miłecki2023-01-061-47/+0
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: drop redmi-ax6000 variant with modified envChuanhong Guo2022-12-304-60/+0
| | | | | | | | | | | | | | | | | | | This variant uses xiaomi factory u-boot and modified u-boot-env & bootcmd. By modifying uboot-env, the xiaomi firmware recovery provided in the vendor u-boot doesn't work anymore. It's possible to put u-boot into a state where it refuese to take any serial input. If the u-boot is in this state, users can't restore their firmware without taking the flash off the board. We now have a -stock variant where the vendor u-boot is used in a way that xiaomi firmware recovery still works, and a -ubootmod variant where we get rid of all xiaomi components, have more usable space and no uart console lock. These two should cover all use cases and we don't need this variant anymore. Drop this redmi-ax6000 variant. Existing users of this variant should perform a u-boot mod or restore to the -stock layout. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add new layout for Xiaomi Redmi Router AX6000 for OpenWrt U-BootFurong Xu2022-12-298-20/+92
| | | | | | | | | This new layout is only bootable with OpenWrt U-Boot. It reuses the two crash partions and expands the ubi partion to the end of whole flash. Do not use this layout with stock U-Boot! Signed-off-by: Furong Xu <xfr@outlook.com>
* mediatek: redmi-ax6000: drop cs-gpiosChuanhong Guo2022-12-171-1/+0
| | | | | | | | 'cs-gpios = <0>, <0>' is a hack in ath79 to override the incorrectly specified maximum number of chipselects available in spi-ath79.c. It's not needed here and must have been copied here by mistake. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add alternative stock layout for Xiaomi Redmi Router AX6000Chen Minqiang2022-12-177-284/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this implementation, the flash partition layout is adjusted to avoid modifying the uboot environment of mtdparts. This ensures that the 30M ubi_kernel partition remains aligned with the stock ubi partition, and the kernel volume is placed in it. This allows the stock uboot to boot from it without changing the mtdparts, which is useful for reverting back to the stock firmware using Xiaomi Firmware Tools. In actual testing, modifying mtdparts has been found to break Xiaomi Firmware Tools. 1. use ARTIFACTS to generate initramfs-factory.ubi for easy installation. 2. The NAND flash layout is changed to allow for reverting back to the stock firmware. 3. Before performing sysupgrade, do some cleanup in platform_pre_upgrade to ensure a clean installation of OpenWRT. 4. Setup the uboot env to ensure that the system always boot, which can be helpful for users who may forget to do this before sysupgrade in the initramfs. New flash instructions: 1. Gain ssh access. Please refer to: https://openwrt.org/toh/xiaomi/redmi_ax6000#installation) 2. Check which system current u-boot is loading from: COMMAND: `cat /proc/cmdline` sample OUTPUT: `console=ttyS0,115200n1 loglevel=8 firmware=1 uart_en=1` if firmware=1, current system is ubi1 if firmware=0, current system is ubi0 3. Setup nvram and write the firmware: If the current system is ubi1, please set it up so that the next time it will boot from ubi, and write the firmware to ubi: ``` 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 ubiformat /dev/mtd8 -y -f /tmp/initramfs-factory.ubi ``` If the current system is ubi, please set it up so that the next time it will boot from ubi1, and write the firmware to ubi1: ``` 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 ubiformat /dev/mtd9 -y -f /tmp/initramfs-factory.ubi ``` 4. After rebooting, the system should now boot into the openwrt initramfs. Flash the squashfs-sysupgrade.bin via using ssh or luci. ``` sysupgrade -n /tmp/squashfs-sysupgrade.bin ``` Done. For existing users of the Redmi AX6000 running OpenWrt, here are the steps to switch to this new layout: 1. Flash initramfs-factory.ubi ``` mtd -r -e ubi write /tmp/initramfs-factory.ubi ubi ``` 2. After rebooting, the system will boot into the new openwrt-initramfs. Log in and perform a sysupgrade to complete the process. ``` sysupgrade -n /tmp/squashfs-sysupgrade.bin ``` Signed-off-by: Chen Minqiang <ptpt52@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add LED support for Xiaomi Redmi AX6000Furong Xu2022-12-163-0/+55
| | | | | | | add DT nodes and default package for the LEDs on Redmi AX6000 Signed-off-by: Furong Xu <xfr@outlook.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: enable sel_clk for spi-mt65xxFurong Xu2022-12-161-0/+29
| | | | | | | | | Without explicitly enabling sel_clk, clk_disable_unused() will disable it when boot is done, causing CPU hang on SPI1 register access on MT7986. Explicitly enable sel_clk to make SPI1 functional. Signed-off-by: Furong Xu <xfr@outlook.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* kernel: bump 5.15 to 5.15.83John Audia2022-12-141-7/+7
| | | | | | | | | | | | | | | Removed upstreamed: backport-5.15/883-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1] All patches automatically rebased 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.83&id=246bcd05ba6cc43b34ac0bb4bac3ea94a4efa07c Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: also move &slot0 from dtsi down to board dtsDaniel Golle2022-12-073-10/+20
| | | | | | | | | As the referenced MTD partition is only present in the dts, also move &slot0 down to the dts files. Fixes: 64e9b62829 ("mediatek: remove redundant flash entry from dtsi") Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: remove redundant flash entry from dtsiDaniel Golle2022-12-073-74/+16
| | | | | | | | | | Splitting-off the common parts of Ruijie RG-EW3200GX PRO and reyee AX3200-E5 went wrong because the flash descriptiom was kept also in the dtsi. Remove it there, as flash definition is added by both board dts files. Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for reyee AX3200-E5Alex Hansen2022-12-066-255/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is yet another model of the Ruijie RG-EW3200GX PRO with a slightly different flash layout, install process is the same. 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 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: Alex Hansen <mralexh123@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: build mt6577_auxadc driver into kernelDaniel Golle2022-12-052-1/+3
| | | | | | | | | Set CONFIG_MT6577_AUXADC=y as otherwise reading temperature of the thermal-zone doesn't work on MT7623 (it does work fine without this driver on MT7622 and MT7986). Fixes: f2ae4e2f8c ("mediatek: clean up platform kernel modules") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.15 to 5.15.80John Audia2022-11-271-1/+1
| | | | | | | | | | | | | | Manually rebase: pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch ath79/patches-5.15/910-unaligned_access_hacks.patch All other patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: set persistent wifi mac for bpi-r64 and bpi-r3Daniel Golle2022-11-242-0/+21
| | | | | | | Use persistent MAC address for the built-in wireless interfaces of the BPi-R64 and BPi-R3 development boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: add more fixes for mtk_eth_socFelix Fietkau2022-11-211-1/+1
| | | | | | | | Fix corner cases in DSA offload Add refcounting fix for flow offload Fix VLAN untagging issue on MT7986 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: mt7623: disable swconfigAleksander Jan Bajkowski2022-11-181-1/+0
| | | | | | | | | | | | | | | | The mt7623 subtarget supports 2 devices: * Bananapi BPi-R2 (added in 1f068588efddf0175e954ffc07ec8478bddd52c7, 7762c07c88980cff85ec20c12f18cd172260e9d9), * UniElec U7623-02 (added in 4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9). Both devices support DSA from the beginning, thus swconfig can be safely disabled. In the past, the subtarget mt7623 also supported the mt7623 reference board. This board originally supported swconfig, and was later converted to DSA (64175ffb7911f5fcd3907df09fdb9bfab53ee641) and then dropped (1ab81bf02d750c9a2a447dbf4fdb323921f291d7). Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* mediatek: mt7623: refresh configAleksander Jan Bajkowski2022-11-181-4/+3
| | | | | | | This was done by executing these command: $ time make kernel_oldconfig CONFIG_TARGET=subtarget Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* mediatek: filogic: enable maxlinear PHY support, refresh configFelix Fietkau2022-11-091-0/+1
| | | | | | Needed for the 7986 RFB1 board Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: filogic: fix mt7986a ethernet devicetree entriesFelix Fietkau2022-11-091-12/+24
| | | | | | Add all ports, rename DSA ports to start at lan1 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: drop the use of device tree overlays on mt7986a-rfb boardFelix Fietkau2022-11-094-91/+92
| | | | | | | The boot loader does not support it. Instead make NAND the default image for this board Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: add mediatek soc ethernet performance improvementsFelix Fietkau2022-11-091-4/+4
| | | | | | | | - implement multiqueue via qdma hardware shaper to deal with ports with different speeds - implement hardware DSA untagging - add NETIF_F_ALL_TSO to reduce unnecessary segmentation Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 5.15 to 5.15.77John Audia2022-11-051-1/+1
| | | | | | | | | | | | | | | | | Manually rebased: 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 bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.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 <therealgraysky@proton.me>
* mediatek: replace mt7986 watchdog assert patch with upstreamNick Hainke2022-11-053-57/+99
| | | | | | | | Replace "920-watchdog-add-mt7986-assert.patch" with upstreamed - 920-v5.16-watchdog-mtk-add-disable_wdt_extrst-support.patch - 921-v5.19-watchdog-mtk_wdt-mt7986-Add-toprgu-reset-controller.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* mediatek: mt7629: add tag to upstreamed patchesNick Hainke2022-11-051-0/+0
| | | | | | The patches were upstreamed. Signed-off-by: Nick Hainke <vincent@systemli.org>
* mediatek: add tag for upstreamed patchesNick Hainke2022-11-053-0/+0
| | | | | | The patches were upstreamed. Signed-off-by: Nick Hainke <vincent@systemli.org>
* mediatek: mt7986: add tag to upstreamed patchesNick Hainke2022-11-052-0/+0
| | | | | | | The patch "210-pinctrl-mediatek-add-support-for-MT7986-SoC.patch" and "212-clk-mediatek-add-mt7986-clock-support.patch" are upstreamed. Signed-off-by: Nick Hainke <vincent@systemli.org>
* mediatek: mt7622: add tag to upstreamed patchesNick Hainke2022-11-052-0/+0
| | | | | | | | The patches "191-arm64-dts-mt7622-specify-the-L2-cache-topology.patch" and "192-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch" are upstreamed to 5.19. Signed-off-by: Nick Hainke <vincent@systemli.org>
* mediatek: filogic: disable swconfigAleksander Jan Bajkowski2022-11-051-1/+0
| | | | | | | | | | | | This subtarget supports 3 devices: * Bananapi BPi-R3 (added in a96382c1bb204698cd43e82193877c10e4b63027), * MediaTek MTK7986 rfba AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf), * MediaTek MTK7986 rfbb AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf). This subtarget supports DSA from the beginning. It looks like CONFIG_SWCONFIG was copied from another config when the subtarget was created. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* mediatek: filogic: refresh configAleksander Jan Bajkowski2022-11-051-4/+4
| | | | | | | This was done by executing these command: $ time make kernel_oldconfig CONFIG_TARGET=subtarget Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* mediatek: remove obsolete patchDaniel Golle2022-11-021-24/+0
| | | | | | | | | The patch enabling hardware flow offloading support on the MT7623 SoC has been merged upstream as of Linux 5.13. Remove our local patch which wrongly got forward-ported and now actually enables hardware flow offloading for the MT2701 SoC family (unsupported in OpenWrt). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: consider adc_oe thermal calibration value in efuseDaniel Golle2022-10-311-1/+1
| | | | | | | | | The use of the adc_oe value stored in the efuse has been dropped in MediaTek's SDK during a recent refactorization of the temperature calculation formula. Don't ignore this offset value and again include it in raw-to-deg-celsius calculation. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 5.15 to 5.15.75John Audia2022-10-304-16/+16
| | | | | | | | | | | | | | | | | | | | | Removed upstreamed: bcm27xx/patches-5.15/950-0446-drm-vc4-Fix-timings-for-VEC-modes.patch[1] Manually rebased: 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 bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All other patches automatically rebased 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.75&id=2810061452f9b748b096ad023d318690ca519aa3 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: add Xiaomi Redmi Router AX6000 supportChukun Pan2022-10-303-0/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: ESMT F50L1G41LB 128 MB RAM: K4A4G165WF-BCWE 512 MB Ethernet: 4x 10/100/1000 Mbps WiFi1: MT7976GN 2.4GHz ax 4x4 WiFi2: MT7976AN 5GHz ax 4x4 Button: Mesh, Reset Flash instructions: 1. Gain ssh and serial port access, see the link below: https://openwrt.org/toh/xiaomi/redmi_ax6000#installation 2. Use ssh or serial port to log in to the router, and execute the following command: nvram set boot_wait=on nvram set flag_boot_rootfs=0 nvram set flag_boot_success=1 nvram set flag_last_success=1 nvram set flag_try_sys1_failed=8 nvram set flag_try_sys2_failed=8 nvram commit 3. Set a static ip on the ethernet interface of your computer (e.g. default: ip 192.168.31.100, gateway 192.168.31.1) 4. Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server. 5. Interrupt U-Boot and run these commands: setenv mtdparts nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),112640k(ubi) saveenv tftpboot initramfs.bin bootm 6. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Revert to stock firmware: Restore mtdparts back to default, then use the vendor's recovery tool (Windows only). Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic configAleksander Jan Bajkowski2022-10-212-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Endianness depends on CPU architecture. CONFIG_CPU_(BIG/LITTLE)_ENDIAN should be enabled on target or subtarget based on SoC architecture. Fixes warning: $ make kernel_oldconfig CONFIG_TARGET=subtarget ... .config:1008:warning: override: CPU_LITTLE_ENDIAN changes choice state .... Summary: - ARC - only the CONFIG_CPU_BIG_ENDIAN symbol is defined for this architeture. If it is disabled then the processor operates in LITTLE_ENDIAN mode (default), - ARM32 - CONFIG_CPU_LITTLE_ENDIAN symbol available since kernel 5.19. This option should be enabled after OpenWRT moves to kernel 6.x. After refreshing the kernel, the symbol disappears, - ARM64 - enabled CONFIG_CPU_LITTLE_ENDIAN, - MIPS - enabled relevant symbols, - POWERPC - enabled CONFIG_CPU_BIG_ENDIAN, - UML - Symbols are not defined for this architecture, - X86 - always little endian. Symbols are not defined for this architecture. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* mediatek: filogic: consolidate adc '32k' clockDaniel Golle2022-10-204-180/+14
| | | | | | | | | | Add dependency to '32k' ADC clock so it is always enabled for thermal and raw access to ADC values. This allows to remove the patch for the ADC driver and reduce the patch adding thermal support for MT7986 to only add the new efuse layout and temperature decoding for V3. Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>