aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAge
* mediatek: filogic: add Unielec U7981-01 supportAllen Zhao2024-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: 8GB eMMC or 128 MB SPI-NAND RAM: 256MB Ethernet: 5x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset USB: M.2(B-key) for 4G/5G Module Power: DC 12V 1A UART: 3.3v, 115200n8 -------------------------- | Layout | | ----------------- | | 4 | VCC RX TX GND | <= | | ----------------- | -------------------------- The U-boot menu will automatically appear at startup, and then select the required options through UP/DOWN Key. NAND Flash and eMMC Flash instructions: 1. Set your computers IP adress to 192.168.1.2. 2. Run a TFTP server providing the sysupgrade.bin image. 3. Power on the router, into the U-Boot menu. 4. Select "2. Upgrade firmware" 5. Update sysupgrade.bin file name, input server IP and input device IP (if they deviate from the defaults) 6. Wait for automatic startup after burning Signed-off-by: Allen Zhao <allenzhao@unielecinc.com>
* treewide: disable spectre mitigation on unaffected Arm64 targetsQingfang Deng2024-03-23
| | | | | | | Cortex-A53 is not vulnerable to any Spectre variants. Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability Signed-off-by: Qingfang Deng <dqfext@gmail.com>
* treewide: disable spectre mitigation on unaffected Arm32 targetsQingfang Deng2024-03-23
| | | | | | | Cortex-A5 and Cortex-A7 are not vulnerable to any Spectre variants. Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability Signed-off-by: Qingfang Deng <dqfext@gmail.com>
* mediatek: mt7629: 6.6: disable LEDS_SMARTRG_LED by defaultRobert Marko2024-03-22
| | | | | | | | | | | When building MT7629 with ALL_KMODS then we get prompted for LEDS_SMARTRG_LED and this will break CI and in future buildbot compilation. It depends on I2C so the symbol is hidden until ALL_KMODS is used and I2C support is available, so disable the LEDS_SMARTRG_LED symbol in 6.6 config intentionally as is done in the 6.1 mt7629 config. Signed-off-by: Robert Marko <robimarko@gmail.com>
* mediatek: mt7622: add a second u-boot for redmi-ax6sChuanhong Guo2024-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vendor u-boot knows nothing about UBI, and we used to have a fixed-size kernel partition for vendor u-boot and UBI for rootfs. However, that fixed partition becomes too small eventually, and expanding it requires complicated procedure. This commit changed the flash layout and added a second u-boot where the kernel supposed to be. Now the vendor u-boot chainloads our mainline u-boot, and our u-boot reads kernel+rootfs from UBI, verifies it, and boot into OpenWrt. There are two possible ways to convert from the old fw: Flash the factory image using mtd (provided by @rany2): mount -o remount,ro / mount -o remount,ro /overlay cd /tmp dd if=factory.bin bs=1M count=4 | mtd write - kernel dd if=factory.bin bs=1M skip=4 | mtd -r write - ubi Or, flash the 2nd u-boot via mtd and upload the firmware to the 2nd u-boot using tftp: 1. prepare a tftp server at 192.168.1.254 to serve the sysupgrade image: openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb 2. upload the ubi-loader.itb to OpenWrt /tmp, and flash it to the old kernel partition: mtd -r write openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-ubi-loader.itb 3. The router should reboot and flash the sysupgrade image via TFTP. Procedure for flashing from vendor firmware shouldn't change. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7622: simplify 02_networkChukun Pan2024-03-16
| | | | | | | | | Most mt7622 devices use the mt7531 switch, which have been switched to dsa driver for a long time. So use dsa as the default configuration and configure these rtl8367s devices separately. This reduces the amount of code. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: fix build failure of mt7623/mt7629 using kernel 6.6Weijie Gao2024-03-16
| | | | | | | | | | In kernel 6.6, dts files for mediatek arm target are moved into arch/arm/boot/dts/mediatek instead of legacy path arch/arm/boot/dts. To avoid dts compile failure, change DTS_DIR to the mediatek subfolder for kernel 6.6. Signed-off-by: Weijie Gao <hackpascal@gmail.com>
* mediatek: mt7988: add missing clock for PCIe portsDaniel Golle2024-03-15
| | | | | | | Add missing CLK_TOP_PEXTP_Px_SEL clock for each of the 4 PCIe interfaces of the MT7988 SoC. Without that clock PCIe doesn't work reliable. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: Add support for GL.iNet X3000 (Spitz AX) and XE3000 (Puli AX)Jean Thomas2024-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL.iNet X3000 and XE3000 are Wi-Fi 6 5G cellular routers, based on MediaTek MT7981A SoC. The XE3000 is the same device as the X3000, except for an additional battery. Specifications: - SoC: Filogic 820 MT7981A (1.3GHz) - RAM: DDR4 512M - Flash: eMMC 8G, MicroSD card slot - WiFi: 2.4GHz and 5GHz with 6 antennas - Ethernet: - 1x LAN (10/100/1000M) - 1x WAN (10/100/1000/2500M) - 5G: Quectel RM520N-GL with two nano-SIM card slots - USB: 1x USB 2.0 port - UART: - 3.3V, TX, RX, GND / 115200 8N1 MAC addresses as verified by OEM firmware: vendor OpenWrt address source WAN eth0 label factory 0x0a (label) LAN eth1 label + 1 2g phy0-ap0 label + 2 factory 0x04 5g phy1-ap0 label + 3 Installation via U-Boot rescue: 1. Press and hold reset button while booting the device 2. Wait for the Internet led to blink 5 times 3. Release reset button 4. The rescue page is accessible via http://192.168.1.1 5. Select the OpenWrt sysupgrade image and start upgrade 6. Wait for the router to flash new firmware and reboot Revert to stock firmware: 1. Download the stock firmware from GL.iNet website 2. Use the method explained above to flash the stock firmware Switch the modem network port between PCIe and USB interfaces: 1. Connect to the AT commands (/dev/ttyUSB2) port using e.g. minicom: minicom -D /dev/ttyUSB2 2. Check the current modem mode with 'AT+QCFG="data_interface"': - 0,0 indicates that the network port uses the USB interface - 1,0 indicates that the network port uses the PCIe interface 3. Switch the active interface with: - 'AT+QCFG="data_interface",0,0' to use the USB interface - 'AT+QCFG="data_interface",1,0' to use the PCIe interface 4. Reboot Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
* mediatek: mt7981: pinctrl: add additional emmc groupsJean Thomas2024-03-13
| | | | | | | | | | | | | Add new emmc groups in the pinctrl driver for the MediaTek MT7981 SoC: * emmc reset, with pin 15. * emmc 4-bit bus-width, with pins 16 to 19, and 24 to 25. * emmc 8-bit bus-width, with pins 16 to 25. The existing emmc_45 group is kept for legacy reasons, even if this is the union of emmc_reset and emmc_8 groups. Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
* mediatek: mt7981: pinctrl: add additional uart groupJean Thomas2024-03-13
| | | | | | | Add uart1_3 (pins 26, 27) group to the pinctrl driver for the MediaTek MT7981 SoC. Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
* mediatek: add Linux 6.6 as testing kernelDaniel Golle2024-03-11
| | | | | | Add KERNEL_TESTING_PATCHVER for Linux 6.6. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add kernel configs for Linux 6.6Daniel Golle2024-03-11
| | | | | | Add config-6.6 for all mediatek subtargets. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: fix build of MT7988 clk drivers on Linux 6.6Daniel Golle2024-03-11
| | | | | | | As shared remove functions now returns void instead of int we need to use .remove_new instead of .remove. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: leds-smartrg-system: fix build on Linux 6.6Daniel Golle2024-03-11
| | | | | | Adapt to changed function pointer prototypes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: 6.6: refresh patchesDaniel Golle2024-03-11
| | | | | | | Refresh patches and fix changed path for 32-bit mediatek boards 'arch/arm/dts' -> 'arch/arm/dts/mediatek' Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: 6.6: drop patches backported as fixesDaniel Golle2024-03-11
| | | | | | Drop patches backported as fixes in later kernel version. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: 6.6: drop backport patchesDaniel Golle2024-03-11
| | | | | | Drop all backport patches that are now included in kernel 6.6. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: copy patches-6.1 to patches-6.6Daniel Golle2024-03-11
| | | | | | Copy patches from patches-6.1 to patches-6.6. No changes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: copy files-6.1 to files-6.6Daniel Golle2024-03-11
| | | | | | Copy files from files-6.1 to files-6.6. No changes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: bump 6.1 to 6.1.81John Audia2024-03-11
| | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.81 All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3, flogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3, flogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: mt7988: fix clk for 2nd PCIe portDaniel Golle2024-03-11
| | | | | | | | | | | | | Due to what seems to be an undocumented oddity in MediaTek's MT7988 SoC design the CLK_INFRA_PCIE_PERI_26M_CK_P2 clock requires CLK_INFRA_PCIE_PERI_26M_CK_P3 to be enabled. This currently leads to PCIe port 2 not working in Linux. Reflect the apparent relationship in the clk driver to make sure PCIe port 2 of the MT7988 SoC works. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: linksys-e8450: set driving strength for SPI-NANDDaniel Golle2024-03-11
| | | | | | | Set 12mA driving strength for SPI-NAND pins like the stock firmware's bootloader does as well. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: linksys-e8450: improve compat warningDaniel Golle2024-03-09
| | | | | | | Include a statement about having to run the installer in the sysupgrade compat warning for the Linksys E8450 (UBI). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: wait for fitblk rootfsDaniel Golle2024-03-09
| | | | | | | | Probing of the fitblk driver in some situations happens after the kernel attempts to mount rootfs, which then fails. Always use 'rootwait' when using fitblk for rootfs. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: clean duplicated #include in Xiaomi Redmi AX6000's dtsFurong Xu2024-03-08
| | | | | | | | Clean duplication of #include <dt-bindings/leds/common.h>. Thanks musashino205 Fixes: 1493e8f8cbe2 ("mediatek: convert LED color/function format for Xiaomi Redmi AX6000") Signed-off-by: Furong Xu <xfr@outlook.com>
* mediatek: filogic: switch to fitblk for Xiaomi Redmi AX6000Furong Xu2024-03-08
| | | | | | | | Use the new fitblk driver. Run-tested: filogic/mt7986a-xiaomi-redmi-router-ax6000-ubootmod Signed-off-by: Furong Xu <xfr@outlook.com>
* mediatek: convert LED color/function format for Xiaomi Redmi AX6000Furong Xu2024-03-08
| | | | | | | | | | | | Commit 2d63d42f5e2f ("mediatek: convert to new LED color/function format where possible") leaves Xiaomi Redmi AX6000 un-converted, the two LEDs become dead. Now, LEDs are alive again. Fixes: 2d63d42f5e2f ("mediatek: convert to new LED color/function format where possible") Signed-off-by: Furong Xu <xfr@outlook.com>
* mediatek: filogic: fix failsafe mode on devices with no lan1Paul Geraedts2024-03-02
| | | | | | | | | | | Default to lan4 port, instead of (missing) lan1 port, to fix failsafe mode on Xiaomi AX3000T, WR30U, AX6000 Build system: x86/64 Build-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod Run-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod Signed-off-by: Paul Geraedts <p.f.j.geraedts@gmail.com>
* mediatek: mt7622: rtl8367c: add casts to fix compiler warningsDaniel Golle2024-03-01
| | | | | | | | | Use type casts to prevent compiler warnings which are going to turn into errors when we switch to Linux 6.6. In the long run we should try to get rid of this downstream driver now that RTL8367S is support by the rtl8365mb DSA driver. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: rename or replace accepted patchesDaniel Golle2024-03-01
| | | | | | | | | | Rename kernel patches accepted upstream to indicate at which version they have been accepted, replacing downstream variants which what was accepted upstream. Note that some of them are fixes which will find their way to older kernel versions as well via linux-stable. No functional changes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: fix version tag in thermal patchesDaniel Golle2024-03-01
| | | | | | | | Some backported thermal patches ended up with the wrong kernel version in their filename. Fix this. Fixes: c36de2e73a ("mediatek: backport a hell of thermal commits") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: add support for Cudy RE3000 v1Robert Senderek2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MT7981B /256MB /16MB SPI (XM25QH128C) AX 2.4Ghz AX 5Ghz 160Mhz wide 1Gbit LAN OEM: root@RE3000:~# ifconfig |grep HWaddr br-lan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 (label) br-wan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 eth0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 ra0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 ra2 Link encap:Ethernet HWaddr 82:XX:XX:28:XX:X0 rax0 Link encap:Ethernet HWaddr 82:XX:XX:38:XX:X0 rax2 Link encap:Ethernet HWaddr 82:XX:XX:58:XX:X0 OpenWrt root@OpenWrt:/# ifconfig |grep HW br-lan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 eth0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 phy0-ap0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 phy1-ap0 Link encap:Ethernet HWaddr 82:XX:XX:08:XX:X1 tftp Installation via u-boot: Connect TTL3.3V converter connector is under the radiator Set speed 115200 8 N 1 Interrupt boot process by holding down-arrow key during boot then >> 6. Load image >> 0 - TFTP client (Default) enter IP adresses and initramfs-kernel.bin write to flash via sysupgrade or gui Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
* mediatek: re-enable mt7622-rfb1-ubi with changed partition layoutFelix Fietkau2024-02-28
| | | | | | | | | The boot loader does not have a fixed size limit for the kernel, so we're free to change the layout. This may break sysupgrade, but a fresh flash from initramfs works. Fixes: 6e2962d4c548 ("mediatek: mt7622: skip build for MT7622 rfb1 (UBI)") Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: filogic: Cudy WR3000 v1 wps button fixRobert Senderek2024-02-26
| | | | | | WPS button activation method is wrong . It should be active low Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
* mediatek: include 'fitblk' package for subtargetsDaniel Golle2024-02-26
| | | | | | | | | | If selected on a per-board base, fitblk doesn't end up in initramfs images which always only come with the subtarget's default packages. Hence fitblk needs to be included as a default package of all subtargets making use of fitblk instead of it being selected for individual boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: drop platform_get_bootdevDaniel Golle2024-02-26
| | | | | | | Now that we got fitblk_get_bootdev in /lib/upgrade/common.sh we don't need platform_get_bootdev in each of the subtargets any longer. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: bpi-r2: bump compat version on bootDaniel Golle2024-02-25
| | | | | | | | | The device booting successfully indicates that bootloader has been updated. Set compat_version to 1.1 on new configs and bump compat_version to 1.1 on first boot after a successful sysupgrade. Fixes: 6368ed1ae5 ("mediatek: mt7623: phase out uImage.FIT partition parser") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: bpi-r2: set root=/dev/fit0 in bootargsDaniel Golle2024-02-24
| | | | | | | | | Set root=/dev/fit0 cmdline parameter as the kernel won't mount rootfs otherwise after the change from the FIT partition parser to the fitblk driver which replaces it. Fixes: 6368ed1ae5 ("mediatek: mt7623: phase out uImage.FIT partition parser") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7623: phase out uImage.FIT partition parserDaniel Golle2024-02-24
| | | | | | | | Use the new fitblk driver on the BananaPi R2 as well as UniElec U7623. Introduce boot device selection for fitblk's /chosen/rootdisk handle, similar to how it is already done on MT7622, MT7986 and MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: no longer select FIT_PARTITIONDaniel Golle2024-02-23
| | | | | | | | | | | | | All mt7622 board previously using the FIT partition parser have been converted to use the fitblk driver: 6aec3c7b5b mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI build 41c053141e mediatek: mt7622: convert unifi6lr-v{1,2,3}-ubootmod to fitblk 208f6c1232 mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblk Remove the now no longer needed FIT partition parser from builds for mt7622. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: asus-tuf-ax6000: use NVMEM-on-UBIDaniel Golle2024-02-23
| | | | | | | Use newly added support for NVMEM-on-UBI instead of extracting MAC address and WiFi EEPROM data in userspace. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: asus-tuf-ax4200: use NVMEM-on-UBIDaniel Golle2024-02-23
| | | | | | | Use newly added support for NVMEM-on-UBI instead of extracting MAC address and WiFi EEPROM data in userspace. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: asus-rt-ax59u: use NVMEM-on-UBIDaniel Golle2024-02-23
| | | | | | | Use newly added support for NVMEM-on-UBI instead of extracting MAC address and WiFi EEPROM data in userspace. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: fix mt7981 DT nodenamesRafał Miłecki2024-02-20
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: filogic: improve mt7981 DT coding styleRafał Miłecki2024-02-20
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: filogic: reorder mt7981 DT propertiesRafał Miłecki2024-02-20
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: filogic: reorder mt7981 DT SoC reg-based nodesRafał Miłecki2024-02-20
| | | | | | | Follow upstream Linux kernel guidelines: https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#order-of-nodes Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: filogic: reorder mt7981 DT name-based nodesRafał Miłecki2024-02-20
| | | | | | | Follow upstream Linux kernel guidelines: https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#order-of-nodes Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: filogic: move mt7981 on-SoC blocks to "soc" node in DTRafał Miłecki2024-02-19
| | | | | | | It's a standard way of grouping on-SoC hardware blocks and this matches upstream DTS. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>