Commit Graph

362 Commits

Author SHA1 Message Date
LGA1150
8ccd2aa81f
Revert "ramips: mt7621: disable CPU port flow control"
This reverts commit c06af7c5c3.
2020-10-10 18:13:19 +08:00
LGA1150
9b48f42718
Revert "ramips: enable packet steering by default on mt7621"
This reverts commit dfd62e575c.
2020-10-07 17:15:24 +08:00
AmadeusGhost
3fdc484aba
ramips: XiaoYu-C5: reuse ralink-eth driver 2020-10-07 17:15:04 +08:00
Chen Minqiang
82cc584e7a
ramips: net/mediatek disable eee
This disable eee for mt7530 ports, it causes the link down/up
issue, which happens when connecting to 100Mbit switch

Fixes: FS#1449

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-10-07 17:12:53 +08:00
Chen Minqiang
8f1f2afc00
ramips: net/mediatek fix logical error
fe_empty_txd() should return `tx_ring_size - 1` on ring empty, and
return 0 on ring full.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-10-07 17:12:41 +08:00
Chen Minqiang
5d932412b0
Revert "ramips: disable PORT 5 MAC RX/TX flow control by default"
The TX/RX flow control is not the cause of the TX timeouts issue

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-10-07 17:12:15 +08:00
LGA1150
c06af7c5c3
ramips: mt7621: disable CPU port flow control 2020-10-05 23:43:59 +08:00
David Bauer
a9e18b5e8f
ramips: fix logic level for DIR-645 buttons
The D-Link DIR-645 currently uses an incorrect logic level for its
buttons.

Correct them in order to prevent unintentional activation of failsafe
mode.

Reported-by: Perry Melange <isprotejesvalkata@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-10-04 21:49:41 +08:00
CN_SZTL
7f53d5e36d
Merge Mainline 2020-10-01 21:55:59 +08:00
CN_SZTL
8fe562e7e3
kernel: bump 4.14 to 4.14.200
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-10-01 21:53:20 +08:00
AmadeusGhost
7da6811557 Merge Mainline 2020-09-28 16:05:06 +08:00
CN_SZTL
6b1eb31f16
Merge Mainline 2020-09-28 13:14:47 +08:00
Chen Minqiang
a66bea8539 ramips: thunder_timecloud support sdcard 2020-09-28 11:35:13 +08:00
Adrian Schmutzler
15589828ab ramips: merge ethernet setup for RT-AC51U/RT-AC54U
The ethernet setup/label MAC address for RT-AC51U and RT-AC54U are
the same, so move them into the shared DTSI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-28 11:09:41 +08:00
Adrian Schmutzler
cfa398710a
target: update SPDX license names
SPDX moved from GPL-2.0 to GPL-2.0-only and from GPL-2.0+ to
GPL-2.0-or-later. Reflect that in the SPDX license headers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-27 13:21:38 +08:00
Jo-Philipp Wich
759b1497ca
Revert "ramips: ethernet: fix to interrupt handling"
This reverts commit 7ac454014a.

The change reportedly causes regressions in ethernet performance.

Fixes: FS#3332
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-09-24 23:23:41 +08:00
Sungbo Eo
50a054a3a1 build: image: move IMAGE_SIZE to image.mk
IMAGE_SIZE is widely used in many targets. Declare it in the default template to
clean up redundant code. This also prevents deriving IMAGE_SIZE unintentionally
from the previously defined device.

While at it, remove duplicate KERNEL_SIZE declaration.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-09-21 20:00:35 +08:00
CN_SZTL
6fab602888
Merge Mainline 2020-09-19 22:24:34 +08:00
Deng Qingfang
7a74dab129
ramips: add support for TP-Link Archer C5 v4
TP-Link Archer C5 v4 is a dual band router with 5 GbE ports
Advertised as AC1200 for its 867Mbps (2×2) 5GHz band
and 300 Mbps (2×2) 2.4GHz band.

Specs:
- SoC: MediaTek MT7620A
- Ethernet: 5 GbE ports (Realtek RTL8367S)
- Wireless 2.4GHz: MediaTek MT7620A
- Wireless 5GHz: MediaTek MT7612E
- RAM: 64MiB
- ROM: 8MiB (GD25Q64CSIG)
- 1 USB 2.0 port
- 2 Buttons (WPS and reset)
- 8 LEDs

Flash instructions:
Currently one has to install OpenWrt only via the serial console

1. Rename the factory.bin to to test.bin
2. start a TFTP server from IP address 192.168.0.225 and serve the image named test.bin
3. connect your device to the LAN port
4. power up the router and press 4 on the console to stop the boot process.
5. enter the following commands on the router console
	tftp 0x80060000 test.bin
	erase tplink 0x20000 0x7a0000
	cp.b 0x80060000 0x20000 0x7a0000
	reset

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-09-19 19:27:59 +08:00
Chen Minqiang
46c05bf04b
ramips: youku_yk-l2 add support sdcard 2020-09-19 19:15:19 +08:00
John Audia
41e246a2ca
kernel: bump 5.4 to 5.4.66
All modifications made by update_kernel.sh/no manual intervention needed

Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64

No dmesg regressions, everything appears functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add run test from PR]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-19 18:51:53 +08:00
Chuanhong Guo
cbd9698e7d ramips: mt7621: pbr-m1: fix firmware size
This board is equipped with Winbond W25Q256FV 32M SPI-NOR.
Fix partition size for that.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-09-14 10:36:30 +08:00
Chuanhong Guo
7d81d223ac ramips: mt7621: pbr-m1: increase SPI clock to 50MHz
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-09-14 10:34:26 +08:00
Chuanhong Guo
222d2fee59 ramips: mt7621: pbr-m1: add pcie reset for asm1061
this board has a pcie to sata bridge connected to pcie2 with a
separated pcie reset on gpio7.
add reset-gpios and corresponding pinctrl nodes into dts.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-09-14 10:34:02 +08:00
John Audia
aa7a0c85cc
kernel: bump 5.4 to 5.4.64
Remove upstreamed patches:
 generic-backport
  701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch

Manually merged:
 mediatek/patches-5.4
  0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch

All other modifications made by update_kernel.sh

Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64
Run-tested: ipq806x (R7800), mvebu (mamba, rango),
  lantiq/xrx200 (Easybox 904 xDSL), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add community build/run tests to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-12 18:00:59 +08:00
AmadeusGhost
a061a24d75 ramips: sync official source code 2020-09-12 15:01:12 +08:00
Chen Minqiang
bbed7ed187 ramips: add mt7620-nand driver for NAND flash
This add the mt7620-nand driver
and enable nand ubifs for subtarget mt7620

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-09-12 11:58:02 +08:00
CN_SZTL
c75f41d557
Merge Mainline 2020-09-11 18:08:47 +08:00
DoveKi
b551a0006b Update Xiaomi R4 get lan_mac 2020-09-11 17:20:54 +08:00
NeilBrown
e2fe53f6e7 ramips: ethernet: fix to interrupt handling
The current code acknowledged interrupts *after* polling.
This is the wrong way around, and could cause an interrupt to
be missed.
This is not likely to be fatal as another packet, and so another
interrupt, should come along soon.  But maybe it is causing
problems, so let's fix it anyway.

Signed-off-by: NeilBrown <neil@brown.name>
(Note that this matches the upstream driver.)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-08 17:36:35 +08:00
John Audia
36833db556
kernel: bump 5.4 to 5.4.63
Manual merged:
 hack-5.4
  230-openwrt_lzma_options.patch (with Adrian Schmutzler's help)
 bcm27xx
  950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 x86
  patches-5.4
	 011-tune_lzma_options.patch (with Adrian Schmutzler's help)

Remove upstreamed patches in collaboration with Ansuel Smith:
 ipq806x
  093-1-v5.8-ipq806x-PCI-qcom-Add-missing-ipq806x-clocks-in-PCIe-driver.patch
  093-2-v5.8-ipq806x-PCI-qcom-Change-duplicate-PCI-reset-to-phy-reset.patch
  093-3-v5.8-ipq806x-PCI-qcom-Add-missing-reset-for-ipq806x.patch

All other modifications made by update_kernel.sh

Build system: x86_64
Run-tested: ipq806x (R7800)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-09-06 19:56:39 +08:00
Felix Fietkau
ce1558cff6 mediatek/ramips: unify ethernet driver fixes and add performance optimizations
Increase DMA burst size and tx ring size and optimize tx processing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-02 11:36:26 +08:00
AmadeusGhost
b503ba85d0 ramips: ac2100: fix led config 2020-09-01 18:56:42 +08:00
Perry Melange
0ffddff986 ramips: rt3883: use lzma-loader for DIR-645
The DIR-645 fails to boot if the kernel is large.
Enabling lzma-loader resolves the issue.

Run-tested on D-Link DIR-645.

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
2020-08-28 09:29:05 +08:00
Rustam Gaptulin
1b318db41c ramips: mt7621: use lzma-loader for ZBT-WG3526
The wg3526 fails to boot if the kernel is large.
Enabling lzma-loader resolves the issue on both the wg3526-16m
and wg3526-32m.

Fixes: FS#3143

Signed-off-by: Rustam Gaptulin <rascal6@gmail.com>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-25 12:24:21 +08:00
John Thomson
621f30046a ramips: use gpio-export for Mikrotik RouterBOARD 750Gr3 beeper
This beeper hardware requires a PWM driver for frequency selection.
Since the GPIO driver does not provide that, revert the beeper
support to a simple gpio-export.

This effectively reverts the corresponding changes from
6ba58b7b02 ("ramips: cleanup the RB750Gr3 support")

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-13 12:01:47 +08:00
CN_SZTL
76c217e8df
Merge Mainline 2020-08-12 14:49:43 +08:00
AmadeusGhost
0ca6b90875 ramips/dir878: remove the original factory partition definition 2020-08-12 11:01:24 +08:00
CN_SZTL
b1da07102b
kernel: bump 5.4 to 5.4.58
Resolve conflicted:
- 950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch

Remove upstreamed:
- 0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch

Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-08-12 00:21:47 +08:00
AmadeusGhost
b8874d9057 ramips: improve ramoops support 2020-08-10 22:09:18 +08:00
Sungbo Eo
29167d5ea4
ramips: adjust LZMA_TEXT_START for 32MB RAM devices
Currently the lzma-loader is placed in RAM at 32MB offset, which does not
make sense for devices with only 32MB RAM. If we adjust LZMA_TEXT_START to
24MB offset, then the lzma-loader can be used on those devices and still
about 24MB memory will be available for uncompressed image, which should be
enough for most use cases.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-08-09 23:55:24 +08:00
Sungbo Eo
69e962bd06
ramips: use lzma-loader for RT5350F-OLinuXino devices
The bootloader fails to extract a big kernel, e.g. v5.4 kernel image
with ALL_KMODS enabled. This can be fixed by using lzma-loader.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-08-09 23:55:08 +08:00
Adrian Schmutzler
dc655c9fba
ramips/mt7620: fix portmap based on board.d port assignment
When comparing to the port assignment in board.d/02_network, many
devices seem to use the wrong setup of mediatek,portmap.

The corrects the values for mt7620 subtarget based on the location
of the wan port.

A previous cleanup of obviously wrong values has already been done in
d3c0a94405 ("ramips: mt7620/mt7621: remove invalid mediatek,portmap")

Cc: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-09 23:54:51 +08:00
CN_SZTL
b0e9557632
Merge Mainline 2020-08-07 19:44:17 +08:00
Adrian Schmutzler
80a27d90cd
ramips: switch rt3883 subtarget to kernel 5.4
The target has testing support for kernel 5.4 for quite a while,
compiles fine for all devices, and has been run-tested on Asus
RT-N56U successfully.

Let's set it to kernel 5.4 by default to increase the audience
before an 20.xx stable branch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com> [Asus RT-N56U]
2020-08-07 18:25:39 +08:00
Adrian Schmutzler
282b079aea
ramips: tidy up MAC address setup for Linkit Smart and Omega2
Linkit Smart 7688 and Onion Omega 2(+) are one-port devices, and
have their port set to LAN by default. Setting up a WAN MAC address
for them doesn't make any sense, as no wan interface will be created
in uci config. Despite, these devices also set lan_mac in 02_network,
although mtd-mac-address sets a different address for the ethernet
interface in DTS.

Clean this up by moving the lan_mac value into DTS and dropping the
entries in 02_network completely. That way, the effective address
on the LAN interface should stay the same, but we get rid of the
extra (re)assignments.

As I don't have access to the devices, this does not tell anything
about whether 0x2e is actually a good choice, it just preserves
the existing assignment.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-07 18:15:18 +08:00
Tobias Welz
37fbf982af
ramips: WizFi630S use macs from factory partion
WIZnet WizFi630s has three mac addresses in the factory partition:
0x04 (also on the label), 0x28 for wan mac and 0x2e as lan mac.
All three macadresses are sequential series of addresses.
This is making use of them.

While at it, also add the label MAC address to 02_network.

MAC addresses as verified by OEM firmware:

use      interface   source
WLAN     ra0         factory 0x04 (label)
WAN      eth0.2      factory 0x28 (label + 1)
LAN      eth0.1      factory 0x2e (label + 2)

Signed-off-by: Tobias Welz <tw@wiznet.eu>
[fix sorting in 02_network, commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-07 18:12:47 +08:00
Tobias Welz
394f34abd6
ramips: correct WizFi630S pin mappings
WizFi630S had some pins changed in the release version of the board.
The run led, wps button and a slide switch where affected.
This patch is correcting this.
i2c is removed as it is sharing a pin with the run (system) led.
uart2 is enabled as it is also enabled in the OEM firmware.

Signed-off-by: Tobias Welz <tw@wiznet.eu>
2020-08-07 18:12:33 +08:00
Felix Fietkau
2675e744f4
kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-07 18:08:33 +08:00
Alexey Dobrovolsky
fcea5b24a6
ramips: switch rt305x subtarget to kernel 5.4
RT3x5x seems to work fine with kernel 5.4. Set the default kernel
version to 5.4 to bring this to a broader audience.

Since 4 of 6 targets are on kernel 5.4 now, invert the kernel
version setup logic in Makefile/target.mk files.

Tested on ZyXEL Keenetic.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[invert version setup logic]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-07 18:03:27 +08:00