aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: simplify palmbus/{i2c,spi} in device DTS filesSungbo Eo2020-05-087-89/+76
| | | | | | | | | As the node is already defined and labeled in SoC DTSI file, we can refer to it outside of root node and reduce redundancy. While at it, remove unused pcf8563 label. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: use hex notation for *-mtd-eeprom propertySungbo Eo2020-05-08160-160/+160
| | | | | | | Change "0" to "0x0" for consistency. This is an extension of commit 34abfb6e91d1 ("ramips: convert mediatek,mtd-eeprom from decimal to hex notation"). Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips/mt7621: mikrotik: don't use mtd-mac-address in DTSThibaut VARÈNE2020-05-084-25/+4
| | | | | | | | | | | | | As evidenced here[1] the device MAC address can be stored at a random offset in the hard_config partition. Rely on sysfs to update the MAC address correctly. Adjust config so that WAN is base MAC and LAN is base MAC +1 to better match label and vendor OS. [1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021 Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips/mt7621: enable mikrotik platform driverThibaut VARÈNE2020-05-081-0/+2
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips: mikrotik: use routerbootpart partitionsThibaut VARÈNE2020-05-083-24/+12
| | | | | | | Enable routerbootpart partitions on MikroTik devices. Tested-by: Tobias Schramm <t.schramm@manjaro.org> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips/mt7621: enable CONFIG_MTD_ROUTERBOOT_PARTSThibaut VARÈNE2020-05-081-0/+1
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: bump 5.4 to 5.4.36Petr Štetiar2020-04-301-10/+8
| | | | | | | | | | | | | | | Refreshed patches, removed upstreamed patch: generic/hack: 551-loop-Better-discard-support-for-block-devices.patch Added generic config symbol `ARM64_ERRATUM_1542419` due to Fixes: f2791551cedb ("arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419"). Run tested: qemu-x86-64, apalis, nbg6617 Build tested: x86/64, imx6, ipq40xx, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* Revert "ramips: explicitly disable built-in switch for lan-only devices"Adrian Schmutzler2020-04-282-4/+0
| | | | | | | | | This reverts commit a1693bf626f8cd00363b0b98642b682522dfcf75. The rt288x and rt3883 devices in question don't have switches. Only keep the merged case for rt305x. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix MikroTik 750Gr3 ports MAC addressesDENG Qingfang2020-04-282-4/+9
| | | | | | | | | | | | | | | According to a user in OpenWrt forum, on RouterOS the MAC addresses are ether1(WAN) = MAC ether2(LAN2) = MAC+1 ether3(LAN3) = MAC+2 etc. Fix the MAC addresses in OpenWrt. Ref: https://forum.openwrt.org/t/few-dumb-question-about-mt7530-rb750gr3-dsa/61608 Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> [remove label_mac in 02_network] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: rt3883: remove swconfig from individual DEVICE_PACKAGESAdrian Schmutzler2020-04-272-9/+6
| | | | | | | | | In rt3883 subtarget, several devices add swconfig to their DEVICE_PACKAGES. This is redundant as the package is already provided via DEFAULT_PACKAGES. Remove the redundant inclusions. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove (kmod-)swconfig DEVICE_PACKAGES for Sitecom WL-351Adrian Schmutzler2020-04-271-1/+1
| | | | | | | | These definitions are not required since swconfig is selected for the target anyway and kmod-swconfig is pulled as dependency by kmod-switch-rtl8366rb. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: explicitly disable built-in switch for lan-only devicesSungbo Eo2020-04-273-5/+5
| | | | | | | | | Commit 8f6334eb947a ("ramips: explicitly disable built-in switch when needed") did not fix rt288x and rt3883 devices. This patch deals with them. While at it, consolidate duplicate cases in interface setup. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: create common definition for I-O DATA NAND devicesAdrian Schmutzler2020-04-271-23/+11
| | | | | | | | Three of the I-O DATA devices with NAND flash share a lot of variables. Create a common definition for them to reduce duplicate code. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use lzma-loader for I-O DATA mt7621 devicesINAGAKI Hiroshi2020-04-271-0/+6
| | | | | | | | | | | | | | | | | | The official sysupgrade images for I-O DATA devices manufactured by MSTC (MitraStar Technology Corp.) cannot be booted normally and the kernel panics after switching to kernel 5.4. This commit fixes the issue by using lzma-loader. Note: These devices use Z-LOADER to read the kernel from NAND flash and boot it. Z-LOADER cannot load and start plain lzma-loader, so additional lzma-compression is needed. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Co-developed-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Tested-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [wn-ax2033gr]
* ramips: use lzma-loader for Japanese mt7621 devicesINAGAKI Hiroshi2020-04-271-0/+8
| | | | | | | | | In several Japanese routers with MT7621 SoC, the official sysupgrade image cannot be booted properly after switching to kernel 5.4. This commit fixes the issue by using lzma-loader. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: mt7621: use lzma-loader for D-Link DIR-860L B1Szabolcs Hubai2020-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has trouble extracting big kernel from flash, and supports LZMA compressed kernels only. Using OpenWrt kernel loader saves us 64 KB compared to the dictionary size limiting workaround. Factory image sizes (commit: 5f126c541a74) with "CONFIG_ALL_KMODS=y": - original ("-d23", default): 4784188 bytes, LZMA ERROR 1 - with "-d19": 4915260, LZMA ERROR 1 - with "-d18": 4915260, diff to original: +128 KB - with "-d17": 4980796, diff to original: +192 KB - with this patch: 4849724, diff to original: +64 KB To save some CPU cycle, use minimal compression ("-a0") for the LZMA compressed uImage. The most robust solution would use a different loader, which reads the compressed kernel directly from the flash. See the thread at [0] for more details! [0] http://lists.infradead.org/pipermail/openwrt-devel/2020-April/022926.html Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com> Tested-by: Stijn Segers <foss@volatilesystems.org> [fixed identation] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: remove unnecessary DEVICE_PACKAGES for Belkin F7C027Sungbo Eo2020-04-261-1/+0
| | | | | | | kmod-usb-dwc2 and kmod-usb-ledtrig-usbport are not target default packages, and Belkin F7C027 does not have a USB port anyway. Just drop it. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: fix SUPPORTED_DEVICES for Mercury MAC1200R v2Sungbo Eo2020-04-261-1/+0
| | | | | | | | Currently SUPPORTED_DEVICES only contains the old device string. Fix it by removing the first assignment. Fixes: c2334ad60dc8 ("ramips/mt76x8: Synchronize Makefiles with DTS compatible") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: enable SFP port for Ubiquiti ER-X-SFPRené van Dorst2020-04-253-3/+64
| | | | | | | | | | | | | | | SFP cage of this device is connected via a AT8031 phy to port 5 of the switch. This phy act as a RGMII-to-SerDes converter. Also a I2C clock gate needs to be enabled in order to access the SFP module via I2C bus. SFP cage also has module detect pin which is connected to I2C gpio expander. With this patch the kernel/PHYLINK now can detect, readout and use the SFP module/port. NOTE: SFP cage / AT8033 PHY only support 1000base-X encoding! This means that some SGMII modules can work and only at forced 1GBit/full-duplex! Signed-off-by: René van Dorst <opensource@vdorst.com>
* kernel: add module to support SFP cagesRené van Dorst2020-04-251-1/+1
| | | | | | Enables kernel SFP case support. Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: phy: at803x: support RGMII-to-SerDes and SFP supportDENG Qingfang2020-04-251-0/+141
| | | | | Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: remove config-4.14 for mt7621/mt76x8Adrian Schmutzler2020-04-232-547/+0
| | | | | | | | | | | mt7621 and mt76x8 subtargets have been moved to kernel 5.4 and their DTS(I) files are incompatible to kernel 4.14. Remove the corresponding kernel config files to signal that more boldly and to prevent accidentally patching the wrong kernel when pulling in older config patches. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.34Petr Štetiar2020-04-212-3/+3
| | | | | | | | | Refreshed patches. Run tested: qemu-x86-64, apalis, a64-olinuxino Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: mt7621: add NETGEAR R7200 as DEVICE_ALT1Pawel Dembicki2020-04-201-0/+4
| | | | | | | | Netgear R7200 is another clone of Netgear R6700v2, introduced in: 6e80df5 ("ramips: add support for NETGEAR R6700v2/AC2400") Reported-by: Joel Pinsker, github user @joelp64 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: replace pinctrl property names for ipTIME A1004nsSungbo Eo2020-04-191-2/+2
| | | | | | | | | | The pinctrl driver had been replaced with the upstream one in b756ea2a909a ("ramips: replace pinctrl property names"), but the initial A1004ns support patch did not reflect the changes. This commit updates its pinctrl property names. Fixes: 9169482f640c ("ramips: add support for ipTIME A1004ns") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7621: use lzma-loader for newifi d1/d2/thunder timecloudChuanhong Guo2020-04-181-0/+3
| | | | | | | These devices failed to properly extract kernel. enable lzma loader for them. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: don't reuse KERNEL_DTB for lzma-loaderChuanhong Guo2020-04-181-1/+1
| | | | | | | | mt7621 overrides KERNEL_DTB to limit dictionary size, which isn't needed for our lzma loader. This saves 15KB on mt7621 devices using uimage-lzma-loader. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: backport more pcie driver fixesChuanhong Guo2020-04-183-5/+226
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: increase spi-max-frequency for ipTIME mt7620 devicesSungbo Eo2020-04-181-1/+1
| | | | | | | | | | | | This commit increases the hardware SPI frequency from 24.2MHz to 48.3MHz. [ 5.314163] m25p80 spi0.0: speed: 24166666/40000000, rate: 8, prescal: 2, loops: 226 [ 5.076323] m25p80 spi0.0: speed: 48333333/50000000, rate: 4, prescal: 1, loops: 162 `time cat /dev/mtd2 >/dev/null` is reduced from 5.64s to 4.36s on A104ns, and from 11.39s to 8.81s on A1004ns. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME A1004nsSungbo Eo2020-04-183-1/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A1004ns is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 128MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610EN - Ethernet: 5x 10/100/1000Mbps - Switch: MT7530BU - USB: 1x 2.0 - UART: - J2: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1 Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Revert to stock firmware: 1. Perform sysupgrade with stock image. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7621: Ubiquiti ER-X-SFP: fix gpio numbers for POE enable gpiosRené van Dorst2020-04-181-5/+5
| | | | | | | With v5.4 kernel a new gpio driver is used. GPIO numbering has changed so update 03_gpio_switches too. Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: mt7621: Ubiquiti ER-X: fix gpio number for POE enable gpioRené van Dorst2020-04-181-1/+1
| | | | | | | With v5.4 kernel a new gpio driver is used. GPIO numbering has changed so update 03_gpio_switches too. Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: use all reserved space for HiWiFi HC5962DENG Qingfang2020-04-182-33/+23
| | | | | | | | These stock partitons: "backup", "hw_panic", "overly", firmware_backup", "opt" do not contain any device-specific data and can be used for /overlay, resulting in 121M space Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: increase HiWiFi HC5962 kernel partition to 4MDENG Qingfang2020-04-182-7/+4
| | | | | | | | | | | | | | | | | | Increase kernel partition because 2M is insufficient for 5.4 Because the partition changes, previous version of OpenWrt cannot upgrade to this version, and requires a new installation Recovery to stock instruction: 1. Download stock firmware at http://ur.ikcd.net/HC5962-sysupgrade-20171221-b00a04d1.bin 2. Power off the router 3. Press and hold the reset button for 4~6 sec while power it back on 4. Connect a PC to router's LAN 5. Visit http://192.168.2.1 and upload the firmware Then repeat the instruction in edae3479e64e to install OpenWrt Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* kernel: bump 5.4 to 5.4.33Petr Štetiar2020-04-171-1/+1
| | | | | | | | | | | | Refreshed patches, removed upstreamed patches: oxnas: 001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch oxnas: 002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch Run tested: qemu-x86-64, apalis Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* kernel: bump 4.14 to 4.14.176Koen Vandeputte2020-04-161-2/+2
| | | | | | | | | | | | | | | | | | | Refreshed all patches. Remove upstreamed: - 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch - 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch - 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch Fixes: - CVE-2020-8648 (potentially) - CVE-2020-8647 - CVE-2020-8649 Compile-tested on: cns3xxx, octeontx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: mt7621: enable lzma-loader for some devicesChuanhong Guo2020-04-151-0/+6
| | | | | | | | | | ubnt er-x/xiaomi/netgear sercomm devices are known to have troble extracting a big kernel from flash and has support for uncompressed uimage This commit uses uncompressed uimage with lzma-loader for these devices to fix boot issue. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: define image recipe for uncompressed uimage with loaderChuanhong Guo2020-04-141-0/+5
| | | | | | | | | Some devices have bootloaders with broken lzma code resulting in failed decompression or corrupted kernel code. This image recipe allows to sacrifice 5KB for OpenWrt LZMA loader and take over the task of decompress kernel. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: define lzma loader platform in targetChuanhong Guo2020-04-142-2/+5
| | | | | | | | Loader platform is a per-soc variable instead of a per-device one. Determine corresponding loader platform at the beginning of image Makefile. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add missing DEVICE_VARS for lzma-loaderChuanhong Guo2020-04-141-0/+1
| | | | | | | LOADER_TYPE is a per-device variable which should be included in DEVICE_VARS. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* kernel: remove non-existant symbolsAleksander Jan Bajkowski2020-04-131-2/+0
| | | | | | These symbols exist only in older kernels and can be removed. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* ramips: fix whitespace in 990_NET-no-auto-carrier-support.patchChuanhong Guo2020-04-131-4/+4
| | | | | Fixes: 6fcba5eec3 ("ramips: port 0034-NET-multi-phy-support.patch to 5.4") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: ralink-eth: fix leftover dma dev argumentChuanhong Guo2020-04-131-1/+1
| | | | | Fixes: 05dee5833a ("ramips: ralink-eth: fix device struct passed to dma functions") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: replace pinctrl property namesChuanhong Guo2020-04-12261-730/+730
| | | | | | | | | | | | | | Upstream pinctrl driver in drivers/staging uses groups/function/ralink,num-gpios instead of ralink,group/ralink,function/ralink,nr-gpio Replace these properties in dts as well as the pinctrl driver in patches-4.14. This commit is created using: sed -i 's/ralink,group/groups/g' sed -i 's/ralink,function/function/g' sed -i 's/ralink,nr-gpio/ralink,num-gpios/g' Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: explicitly disable built-in switch when neededChuanhong Guo2020-04-123-29/+29
| | | | | | | | | | previously we rely on the failsafe setup in preinit scripts to disable built-in switch implicitly for single-port devices. This doesn't work anymore due to preinit script removal. this patch explicitly disable built-in switch for needed devices. Fixes: a8d62a4eb1 ("ramips: remove set_preinit_iface script") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add 5.4 as testing kernelChuanhong Guo2020-04-121-0/+1
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt76x8: switch to kernel 5.4Chuanhong Guo2020-04-121-0/+1
| | | | | | | 4.14 doesn't work anymore due to gpio dt binding changes. Switch mt76x8 to 5.4 directly. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: disable images for 4M devicesChuanhong Guo2020-04-124-0/+59
| | | | | | | | | default initramfs for 5.4 kernel is larger than 4M, causing build error for oversized initramfs image. disable these images because we have no mechanism for ignoring initramfs errors and the squashfs image will be larger than initramfs anyway. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: ralink-eth: add support for 5.4 kernelChuanhong Guo2020-04-122-0/+34
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7628: update dts for upstream gpio-mt7621 driverChuanhong Guo2020-04-1256-320/+278
| | | | | | | | | | upstream driver merged 3 separated gpio banks into one gpio node. and gpioX Y in our local driver should be replaced with gpio X*32+Y. This patch is created using the following sed command: sed -i -r 's/(.*)gpio([0-9]) ([0-9]+)(.*)/echo "\1gpio $((\2*32+\3))\4"/ge' Signed-off-by: Chuanhong Guo <gch981213@gmail.com>