aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
Commit message (Collapse)AuthorAgeFilesLines
* realtek: Create rtl838x sub-target specific makefilesBirger Koblitz2022-02-173-128/+129
| | | | | | | | Create the RTL838x specific Makefiles. Move CPU-type into rtl838x.mk as this is specifc to that platform. Add rtl838x subtarget into main Makefile. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add initial kernel config for RTL838x sub-targetBirger Koblitz2022-02-171-0/+0
| | | | | | Move the generic kernel configs to the rtl838x sub-target. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add Makefile for RTL839x sub-architectureBirger Koblitz2022-02-171-0/+13
| | | | | | Adds the initial Makefile for the RTL839x sub-architecture. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Set RTL838X sub-target specific propertiesBirger Koblitz2022-02-171-1/+15
| | | | | | | This defines the sub-target specific properties for the RTL838X sub-target. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Create rtl838x subtargetBirger Koblitz2022-02-171-0/+0
| | | | | | | mv generic/target.mk to rtl838x/target.mk in order to create an initial makefile for the rtl838x sub-architecture Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add support for SFP EEPROM-access over SMBusBirger Koblitz2022-02-174-0/+294
| | | | | | | | | | | | | | | | | The EEPROMs on SFP modules are compatible both to I2C as well as SMBus. However, the kernel so far only supports I2C access. We add SMBus access routines, because the I2C driver for the RTL9300 HW only supports that protocol. At the same time we disable I2C access to PHYs on SFP modules as otherwise detection of any SFP module would fail. This is not in any way problematic at this point in time since the RTL93XX platform so far does not support PHYs on SFP modules. The patches are copied and rebased version of: https://bootlin.com/blog/sfp-modules-on-a-board-running-linux/ Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add support for RTL9300/RTL9310 I2C multiplexingBirger Koblitz2022-02-174-37/+359
| | | | | | | | | | | | The RTL9300/RTL9310 I2C controllers have support for 2 independent I2C masters, each with a fixed SCL pin, that cannot be changed. Each of these masters can use 8 (RTL9300) or 16 (RTL9310) different pins for SDA. This multiplexer directly controls the two masters and their shared IO configuration registers to allow multiplexing between any of these busses. The two masters cannot be used in parallel as the multiplex is protected by a standard multiplex lock. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add support for RTL9300/RTL9310 I2C controllerBirger Koblitz2022-02-174-0/+581
| | | | | | | | | | This adds support for the RTL9300 and RTL9310 I2C controller. The controller implements the SMBus protocol for SMBus transfers over an I2C bus. The driver supports selecting one of the 2 possible SCL pins and any of the 8 possible SDA pins. Bus speeds of 100kHz (standard speed) and 400kHz (high speed I2C) are supported. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: remove legacy GPIO driver supportBirger Koblitz2022-02-173-500/+0
| | | | | | | This patch removes support for the legacy GPIO driver, since now the gpio-otto driver can be used on all platforms Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add GPIO support for RTL930X and RTL931XBirger Koblitz2022-02-171-0/+165
| | | | | | | | We add support for the RTL930X and RTL931X architectures in the gpio-realtek-otto.c driver. Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: drop support for Linux 5.4Daniel Golle2022-02-1763-16843/+0
| | | | | | | Drop patches and files for Linux 5.4 now that we've been using 5.10 for a while and support for Linux 5.4 has gone out-of-sync. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath25: drop Linux 5.4 supportRui Salvaterra2022-02-1713-3843/+0
| | | | | | We've been bumped to 5.10, no need to carry this stuff anymore. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: fix NAND flash driver ECC bit position maskFelix Fietkau2022-02-161-1/+1
| | | | | | | | The bit position mask was accidentally made too wide, overlapping with the LSB from the byte position mask. This caused ECC calculation to fail for odd bytes Signed-off-by: Chad Monroe <chad.monroe@smartrg.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: backport fix for initializing skb->cb in the bridge code to 5.4Felix Fietkau2022-02-162-2/+30
| | | | | | Fixes issues with proxyarp Signed-off-by: Felix Fietkau <nbd@nbd.name>
* bcm4908: backport watchdog and I2C changesRafał Miłecki2022-02-1616-26/+282
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: fix a race condition leading to a crash in hw flow offloadingFelix Fietkau2022-02-141-5/+6
| | | | | | | flowtable->net was initialized too late, and this could be triggered even without hardware offload support on the device Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: fix copy&paste mistake in bridge offload codeFelix Fietkau2022-02-141-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: mt7621: do memory detection on KSEG1Chuanhong Guo2022-02-141-0/+58
| | | | | | | | | | | | | | | | | | | | It's reported that current memory detection code occasionally detects larger memory under some bootloaders. Current memory detection code tests whether address space wraps around on KSEG0, which is unreliable because it's cached. Rewrite memory size detection to perform the same test on KSEG1 instead. While at it, this patch also does the following two things: 1. use a fixed pattern instead of a random function pointer as the magic value. 2. add an additional memory write and a second comparison as part of the test to prevent possible smaller memory detection result due to leftover values in memory. Fixes: 6d91ddf517 ("ramips: mt7621: add support for memory detection") Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Tested-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* kernel: remove 640-bridge-only-accept-EAP-locally.patchFelix Fietkau2022-02-122-164/+0
| | | | | | | The issue of EAP frames sent to group address (or the wrong address) has been addressed in mac80211, so this hack is no longer needed Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: add a fast path for the bridge codeFelix Fietkau2022-02-122-4/+821
| | | | | | | | | This caches flows between MAC addresses on separate ports, including their VLAN in order to bypass the normal bridge forwarding code. In my test on MT7622, this reduces LAN->WLAN bridging CPU usage by 6-10%, potentially even more on weaker platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 5.10 to 5.10.100John Audia2022-02-116-9/+9
| | | | | | | | | | 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.99John Audia2022-02-115-56/+5
| | | | | | | | | | | | | | | | | | | | Had to update generic defconfig (make kernel_menuconfig CONFIG_TARGET=generic) for this bump, but since that only modifies the target defined in .config, and since that target also needed to be updated for unrelated reasons, manually propagated the newly added symbol to the generic config. Removed upstreamed: pending-5.10/860-Revert-ASoC-mediatek-Check-for-error-clk-pointer.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.99&id=080f371d984e8039c66db87f3c54804b0d172329 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-1125-90/+66
| | | | | | | | | | | | | 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>
* ramips: add support for ELECOM WRC-2533GS2INAGAKI Hiroshi2022-02-112-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-2533GS2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB (NT5CC64M16GP-DI) - Flash : SPI-NOR 16 MiB (MX25L12835FM2I-10G) - WLAN : 2.4/5GHz 4T4R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LEDs/Keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from ethernet port side - 57600n8 - Power : 12 VDC, 1.5 A Flash instruction using factory image: 1. Boot WRC-2533GS2 normally with "Router" mode 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~120 seconds to complete flashing MAC Addresses: LAN : 04:AB:18:xx:xx:FB (Factory, 0xFFF4 (hex)) WAN : 04:AB:18:xx:xx:FC (Factory, 0xFFFA (hex)) 2.4 GHz : 04:AB:18:xx:xx:FD (Factory, 0x4 (hex)) 5 GHz : 04:AB:18:xx:xx:FE (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: move MAC configs to device dts from wrc-gs-2pci.dtsiINAGAKI Hiroshi2022-02-117-24/+144
| | | | | | | | | | | | | | | | | | | | | | The locations of MAC addresses in mtd for LAN/WAN on ELECOM WRC-2533GS2 are changed from the other WRC-GS/GST devices with 2x PCIe. So move the related configurations in mt7621_elecom_wrc-gs-2pci.dtsi to dts of each model. - WRC-1750GS - WRC-1750GSV - WRC-1750GST2 - WRC-1900GST - WRC-2533GST - WRC-2533GST2 -> LAN: 0xE000, WAN: 0xE006 - WRC-2533GS2 -> LAN: 0xFFF4, WAN: 0xFFFA Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: update WLAN MAC address of ipTIME A3004TSungbo Eo2022-02-111-0/+6
| | | | | | | | | | | | | | | | Reported MAC addresses: | interface | MAC address | source | comment |-----------|-------------------|----------------|--------- | LAN | 90:xx:xx:18:xx:1F | | [1] | WAN | 90:xx:xx:18:xx:1D | | | WLAN 2G | 92:xx:xx:48:xx:1C | | | WLAN 5G | 90:xx:xx:18:xx:1C | factory 0x4 | | | 90:xx:xx:18:xx:1C | config ethaddr | [1] Used in this patch as WLAN 2G MAC address with the local bit set Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME AX2004MSungbo Eo2022-02-114-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME AX2004M is an 802.11ax (Wi-Fi 6) router, based on MediaTek MT7621A. Specifications: * SoC: MT7621A * RAM: 256 MiB * Flash: NAND 128 MiB * Wi-Fi: * MT7915D: 2.4/5 GHz (DBDC) * Ethernet: 5x 1GbE * Switch: SoC built-in * USB: 1x 3.0 * UART: J4 (115200 baud) * Pinout: [3V3] (TXD) (RXD) (GND) MAC addresses: | interface | MAC address | source | comment |-----------|-------------------|----------------|--------- | LAN | 58:xx:xx:00:xx:9B | | [1] | WAN | 58:xx:xx:00:xx:99 | | | WLAN 2G | 58:xx:xx:00:xx:98 | factory 0x4 | | WLAN 5G | 5A:xx:xx:40:xx:98 | | | | 58:xx:xx:00:xx:98 | config ethaddr | [1] Used in this patch as WLAN 5G MAC address with the local bit set Load addresses: * stock * 0x80010000: FIT image * 0x81001000: kernel image -> entry * OpenWrt * 0x80010000: FIT image * 0x82000000: uncompressed kernel+relocate image * 0x80001000: relocated kernel image -> entry Notes: * This device has a dual-boot partition scheme, but this firmware works only on boot partition 1. The stock web interface will flash only on the inactive boot partition, but the recovery web page will always flash on boot partition 1. Installation via recovery mode: 1. Press reset button, power up the device, wait >10s for CPU LED to stop blinking. 2. Upload recovery image through the recovery web page at 192.168.0.1. Revert to stock firmware: 1. Install stock image via recovery mode. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* octeon: switch to Kernel 5.10Paul Spooren2022-02-111-2/+1
| | | | | Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Paul Spooren <mail@aparcar.org>
* target/linux: add missing symbolRosen Penev2022-02-111-0/+1
| | | | | | Found when building the qoriq target. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* 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 MT7530 IRQ supportDENG Qingfang2022-02-102-0/+428
| | | | | | | | | | | Support MT7530 PHY link change interrupts, and enable for MT7621. For external MT7530, a GPIO IRQ line is required, which is board-specific, so it should be added to each DTS. In case the interrupt-controller property is missing, it will fall back to polling mode. Signed-off-by: DENG Qingfang <dqfext@gmail.com>
* ath25: switch to 5.10 KernelPaul Spooren2022-02-101-1/+1
| | | | | Tested-by: Chuanhong Guo <gch981213@gmail.com> Signed-off-by: Paul Spooren <mail@aparcar.org>
* kernel: backport MediaTek Ethernet PHY driverDENG Qingfang2022-02-095-0/+163
| | | | | | | | | | | | | | 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>
* kernel: generic: select the fq_codel qdisc by defaultRui Salvaterra2022-02-092-101/+4
| | | | | | | | | The kernel configuration allows us to select a default qdisc. Let's do this for 5.10 (as 5.4 is on its way out) and get rid of the hacky patch we've been carrying. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: move KERNEL_LOADADDR into Device/DefaultSungbo Eo2022-02-081-1/+1
| | | | | | | | | | | | Commit f4a79148f8cb ("ramips: add support for ipTIME AX2004M") was reverted due to KERNEL_LOADADDR leakage, and it seems the problem can be mitigated by moving the variable definition into Device/Default. By this, KERNEL_LOADADDR redefined in a device recipe will not be leaked into the subsequent device recipes anymore and thus will remain as a per-device variable. Ref: cd6a6e3030ff ("Revert "ramips: add support for ipTIME AX2004M"") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq806x: Enlarge D7800 flash - use netgear partitionMike Lothian2022-02-082-7/+4
| | | | | | | | | | | | | | | | | | | | | | Increase the available flash memory size in Netgear R7800 by repurposing the unused "netgear" partition that is located after the firmware partition. Available flash space for kernel+rootfs+overlay increases by 68 MB from 32 MB to 100 MB. In a typical build, overlay space increases from 15 to 85, increasing the package installation possibilities greatly. Reverting to the OEM firmware is still possible, as the OEM firmware contains logic to initialise the "netgear" partition if its contents do not match expectations. In OEM firmware, "netgear" contains 6 UBI sub-partitions that are defined in /etc/netgear.cfg and initialisation is done by /etc/preinit This is based on https://github.com/openwrt/openwrt/commit/fb8a578aa70572b3e56b64d296e22c2931e77b69 Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
* ramips: add support for Xiaomi Mi Router CR660x seriesRaymond Wang2022-02-078-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xiaomi Mi Router CR6606 is a Wi-Fi6 AX1800 Router with 4 GbE Ports. Alongside the general model, it has three carrier customized models: CR6606 (China Unicom), CR6608 (China Mobile), CR6609 (China Telecom) Specifications: - SoC: MediaTek MT7621AT - RAM: 256MB DDR3 (ESMT M15T2G16128A) - Flash: 128MB NAND (ESMT F59L1G81MB) - Ethernet: 1000Base-T x4 (MT7530 SoC) - WLAN: 2x2 2.4GHz 574Mbps + 2x2 5GHz 1201Mbps (MT7905DAN + MT7975DN) - LEDs: System (Blue, Yellow), Internet (Blue, Yellow) - Buttons: Reset, WPS - UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1) - Power: 12VDC, 1A Jailbreak Notes: 1. Get shell access. 1.1. Get yourself a wireless router that runs OpenWrt already. 1.2. On the OpenWrt router: 1.2.1. Access its console. 1.2.2. Create and edit /usr/lib/lua/luci/controller/admin/xqsystem.lua with the following code (exclude backquotes and line no.): ``` 1 module("luci.controller.admin.xqsystem", package.seeall) 2 3 function index() 4 local page = node("api") 5 page.target = firstchild() 6 page.title = ("") 7 page.order = 100 8 page.index = true 9 page = node("api","xqsystem") 10 page.target = firstchild() 11 page.title = ("") 12 page.order = 100 13 page.index = true 14 entry({"api", "xqsystem", "token"}, call("getToken"), (""), 103, 0x08) 15 end 16 17 local LuciHttp = require("luci.http") 18 19 function getToken() 20 local result = {} 21 result["code"] = 0 22 result["token"] = "; nvram set ssh_en=1; nvram commit; sed -i 's/channel=.*/channel=\"debug\"/g' /etc/init.d/dropbear; /etc/init.d/drop bear start;" 23 LuciHttp.write_json(result) 24 end ``` 1.2.3. Browse http://{OWRT_ADDR}/cgi-bin/luci/api/xqsystem/token It should give you a respond like this: {"code":0,"token":"; nvram set ssh_en=1; nvram commit; ..."} If so, continue; Otherwise, check the file, reboot the rout- er, try again. 1.2.4. Set wireless network interface's IP to 169.254.31.1, turn off DHCP of wireless interface's zone. 1.2.5. Connect to the router wirelessly, manually set your access device's IP to 169.254.31.3, make sure http://169.254.31.1/cgi-bin/luci/api/xqsystem/token still have a similar result as 1.2.3 shows. 1.3. On the Xiaomi CR660x: 1.3.1. Login to the web interface. Your would be directed to a page with URL like this: http://{ROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/web/home#r- outer 1.3.2. Browse this URL with {STOK} from 1.3.1, {WIFI_NAME} {PASSWORD} be your OpenWrt router's SSID and password: http://{MIROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/api/misy- stem/extendwifi_connect?ssid={WIFI_NAME}&password={PASSWO- RD} It should return 0. 1.3.3. Browse this URL with {STOK} from 1.3.1: http://{MIROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/api/xqsy- stem/oneclick_get_remote_token?username=xxx&password=xxx&- nonce=xxx 1.4. Before rebooting, you can now access your CR660x via SSH. For CR6606, you can calculate your root password by this project: https://github.com/wfjsw/xiaoqiang-root-password, or at https://www.oxygen7.cn/miwifi. The root password for carrier-specific models should be the admi- nistration password or the default login password on the label. It is also feasible to change the root password at the same time by modifying the script from step 1.2.2. You can treat OpenWrt Router however you like from this point as long as you don't mind go through this again if you have to expl- oit it again. If you do have to and left your OpenWrt router unt- ouched, start from 1.3. 2. There's no official binary firmware available, and if you lose the content of your flash, no one except Xiaomi can help you. Dump these partitions in case you need them: "Bootloader" "Nvram" "Bdata" "crash" "crash_log" "firmware" "firmware1" "overlay" "obr" Find the corespond block device from /proc/mtd Read from read-only block device to avoid misoperation. It's recommended to use /tmp/syslogbackup/ as destination, since files would be available at http://{ROUTER_ADDR}/backup/log/YOUR_DUMP Keep an eye on memory usage though. 3. Since UART access is locked ootb, you should get UART access by modify uboot env. Otherwise, your router may become bricked. Excute these in stock firmware shell: a. nvram set boot_wait=on b. nvram set bootdelay=3 c. nvram commit Or in OpenWrt: a. opkg update && opkg install kmod-mtd-rw b. insmod mtd-rw i_want_a_brick=1 c. fw_setenv boot_wait on d. fw_setenv bootdelay 3 e. rmmod mtd-rw Migrate to OpenWrt: 1. Transfer squashfs-firmware.bin to the router. 2. nvram set flag_try_sys1_failed=0 3. nvram set flag_try_sys2_failed=1 4. nvram commit 5. mtd -r write /path/to/image/squashfs-firmware.bin firmware Additional Info: 1. CR660x series routers has a different nand layout compared to other Xiaomi nand devices. 2. This router has a relatively fresh uboot (2018.09) compared to other Xiaomi devices, and it is capable of booting fit image firmware. Unfortunately, no successful attempt of booting OpenWrt fit image were made so far. The cause is still yet to be known. For now, we use legacy image instead. Signed-off-by: Raymond Wang <infiwang@pm.me>
* ath79: add support for Mikrotik LHG 5Jakob Riepler2022-02-076-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik LHG 5 series (product codes RBLHG-5nD, RBLHG-5HPnD and RBLHG-5HPnD-XL) devices are an outdoor 5GHz CPE with a 24.5dBi or 27dBi integrated antenna built around the Atheros AR9344 SoC. It is very similar to the SXT Lite5 series which this patch is based upon. Specifications: - SoC: Atheros AR9344 - RAM: 64 MB - Storage: 16 MB SPI NOR - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port, 8-32 Vdc PoE in - 8 user-controllable LEDs: - 1x power (blue) - 1x user (white) - 1x ethernet (green) - 5x rssi (green) See https://mikrotik.com/product/RBLHG-5nD for more details. Notes: The device was already supported in the ar71xx target. Flashing: TFTP boot initramfs image and then perform a sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Jakob Riepler <jakob+openwrt@chaosfield.at>
* ath79: add partial support for Netgear EX7300v2Wenli Looi2022-02-074-0/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: QCN5502 Flash: 16 MiB RAM: 128 MiB Ethernet: 1 gigabit port Wireless No1: QCN5502 on-chip 2.4GHz 4x4 Wireless No2: QCA9984 pcie 5GHz 4x4 USB: none Installation ------------ Flash the factory image using the stock web interface or TFTP the factory image to the bootloader. What works ---------- - LEDs - Ethernet port - 5GHz wifi (QCA9984 pcie) What doesn't work ----------------- - 2.4GHz wifi (QCN5502 on-chip) (I was not able to make this work, probably because ath9k requires some changes to support QCN5502.) Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* ath79: add support for booting QCN5502 SoCWenli Looi2022-02-071-0/+48
| | | | | | | Based on wikidevi, QCN5502 is a "Dragonfly" like QCA9561 and QCA9563. Treating it as QCA956x seems to work. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* ath79: add support for TP-Link TL-WR841HP v2Saiful Islam2022-02-074-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - AR9344 SoC, 8 MB nor flash, 64 MB DDR2 RAM - 2x2 9dBi antenna, wifi 2.4Ghz 300Mbps - 4x Ethernet LAN 10/100, 1x Ethernet WAN 10/100 - 1x WAN, 4x LAN, Wifi, PWR, WPS, SYSTEM Leds - Reset/WPS button - Serial UART at J4 onboard: 3.3v GND RX TX, 1152008N1 MAC addresses as verified by OEM firmware: vendor OpenWrt address LAN eth0 label WAN eth1 label + 1 WLAN phy0 label The label MAC address was found in u-boot 0x1fc00. Installation: To install openwrt, - set the device's SSID to each of the following lines, making sure to include the backticks. - set the ssid and click save between each line. `echo "httpd -k"> /tmp/s` `echo "sleep 10">> /tmp/s` `echo "httpd -r&">> /tmp/s` `echo "sleep 10">> /tmp/s` `echo "httpd -k">> /tmp/s` `echo "sleep 10">> /tmp/s` `echo "httpd -f">> /tmp/s` `sh /tmp/s` - Now, wait 60 sec. - After the reboot sequence, the router may have fallen back to its default IP address with the default credentials (admin:admin). - Log in to the web interface and go the the firmware upload page. Select "openwrt-ath79-generic-tplink_tl-wr841hp-v2-squashfs-factory.bin" and you're done : the system now accepts the openwrt. Forum support topic: https://forum.openwrt.org/t/support-for-tplink-tl-wr841hp-v2/69445/ Signed-off-by: Saiful Islam <si87868@gmail.com>
* target/linux: replace egrep with grep -ERosen Penev2022-02-074-7/+7
| | | | | | | egrep is deprecated and replaced by grep -E. The latter is used throughout the tree. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq806x: convert TP-Link Archer VR2600v to denx,uimageChristian Lamparter2022-02-063-11/+7
| | | | | | | | | | | | | | | | | | | | | The recent device-tree modification that added pre-cal nvmem-cells pushed the device's kernel+dtb over the allotted 3072k KERNEL_SIZE. > WARNING: Image file tplink_vr2600v-uImage is too big: 3147214 > 3145728 There was a previous kernel partition size upgrade: commit 0c967d92b3d9 ("ipq806x: increase kernel partition size for the TP-Link Archer VR2600v") It has been seemingly upgraded from a 2048k KERNEL_SIZE in the past. The commit talks about using the MTD_SPLIT_TPLINK_FW. But looking at the image make recipe, there is no code that adds a TPLINK header. So instead the board will use "denx,umimage". This requires MTD_SPLIT_UIMAGE_FW, but this is present thanks to some NEC devices. (Maybe the MTD_CONFIG_ARGS can be removed as well? But it could be there because of the padding at the beginning. This needs testing.) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* Revert "kernel: backport MediaTek Ethernet PHY driver"Hauke Mehrtens2022-02-055-166/+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>
* Revert "kernel: backport MT7530 IRQ support"Hauke Mehrtens2022-02-052-431/+0
| | | | | | | | | This reverts commit 3f4301e123f29348b4ad87578d62b7d1f5f210c6. This broke the mt7530 on Linksys e8450 (mt7622) for me. [ 1.300554] mt7530 mdio-bus:00: no interrupt support Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: backport MT7530 IRQ supportDENG Qingfang2022-02-052-0/+431
| | | | | | | | Support MT7530 PHY link change interrupts, and enable for MT7621. 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>
* kernel: backport MediaTek Ethernet PHY driverDENG Qingfang2022-02-055-0/+166
| | | | | | | | | 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>
* kernel: backport MT7530 MDB operationsDENG Qingfang2022-02-051-0/+171
| | | | | | | | | Use hardware to forward multicast traffic instead of trapping to the host. 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>
* kernel: backport MT7530 VLAN fixDENG Qingfang2022-02-055-0/+523
| | | | | | | | Fix FDB learning bugs when VLAN filtering is enabled. 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>