forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump the target to v4.19. Add a patch with additional eth driver fixes/features that MTK provided aswell as the driver for the new mt7530 switch. Signed-off-by: John Crispin <[email protected]>
- Loading branch information
Showing
35 changed files
with
13,220 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ ifup = "$ACTION" ] && { | ||
[ -n "$DEVICE" ] && { | ||
if [ "$INTERFACE" == "lan" ]; then | ||
if [ -f /usr/sbin/ethtool ]; then | ||
ifname=eth0 | ||
lan_ip=`uci -q get network.lan.ipaddr` | ||
ethdrv=`ethtool -i $ifname | grep mtk_soc_eth` | ||
[ -n "$ethdrv" ] && { | ||
ethtool -N $ifname flow-type tcp4 dst-ip $lan_ip loc 0 | ||
} | ||
fi | ||
fi | ||
} | ||
} |
314 changes: 314 additions & 0 deletions
314
target/linux/mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,314 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Copyright (c) 2019 MediaTek Inc. | ||
* Author: Ryder Lee <[email protected]> | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <dt-bindings/input/input.h> | ||
#include "mt7629.dtsi" | ||
|
||
/ { | ||
model = "MediaTek MT7629 reference board"; | ||
compatible = "mediatek,mt7629-rfb", "mediatek,mt7629"; | ||
|
||
aliases { | ||
serial0 = &uart0; | ||
}; | ||
|
||
chosen { | ||
stdout-path = "serial0:115200n8"; | ||
}; | ||
|
||
gpio-keys { | ||
compatible = "gpio-keys"; | ||
|
||
reset { | ||
label = "factory"; | ||
linux,code = <KEY_RESTART>; | ||
gpios = <&pio 60 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
wps { | ||
label = "wps"; | ||
linux,code = <KEY_WPS_BUTTON>; | ||
gpios = <&pio 58 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
gsw: gsw@0 { | ||
compatible = "mediatek,mt753x"; | ||
mediatek,ethsys = <ðsys>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; | ||
|
||
memory@40000000 { | ||
device_type = "memory"; | ||
reg = <0 0x40000000 0 0x10000000>; | ||
}; | ||
|
||
reg_3p3v: regulator-3p3v { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-3.3V"; | ||
regulator-min-microvolt = <3300000>; | ||
regulator-max-microvolt = <3300000>; | ||
regulator-boot-on; | ||
regulator-always-on; | ||
}; | ||
|
||
reg_5v: regulator-5v { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-5V"; | ||
regulator-min-microvolt = <5000000>; | ||
regulator-max-microvolt = <5000000>; | ||
regulator-boot-on; | ||
regulator-always-on; | ||
}; | ||
}; | ||
|
||
ð { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&ephy_leds_pins>; | ||
status = "okay"; | ||
|
||
gmac0: mac@0 { | ||
compatible = "mediatek,eth-mac"; | ||
reg = <0>; | ||
phy-mode = "sgmii"; | ||
fixed-link { | ||
speed = <1000>; | ||
full-duplex; | ||
pause; | ||
}; | ||
}; | ||
|
||
gmac1: mac@1 { | ||
compatible = "mediatek,eth-mac"; | ||
reg = <1>; | ||
phy-handle = <&phy0>; | ||
}; | ||
|
||
mdio: mdio-bus { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
phy0: ethernet-phy@0 { | ||
reg = <0>; | ||
phy-mode = "gmii"; | ||
}; | ||
}; | ||
}; | ||
|
||
&gsw { | ||
mediatek,mdio = <&mdio>; | ||
mediatek,portmap = "llllw"; | ||
mediatek,mdio_master_pinmux = <0>; | ||
reset-gpios = <&pio 28 0>; | ||
interrupt-parent = <&pio>; | ||
interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; | ||
status = "okay"; | ||
|
||
port6: port@6 { | ||
compatible = "mediatek,mt753x-port"; | ||
reg = <6>; | ||
phy-mode = "sgmii"; | ||
fixed-link { | ||
speed = <2500>; | ||
full-duplex; | ||
}; | ||
}; | ||
}; | ||
|
||
&i2c { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&i2c_pins>; | ||
status = "okay"; | ||
}; | ||
|
||
&qspi { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&qspi_pins>; | ||
status = "okay"; | ||
|
||
flash@0 { | ||
compatible = "jedec,spi-nor"; | ||
reg = <0>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
label = "u-boot"; | ||
reg = <0x00000 0x60000>; | ||
read-only; | ||
}; | ||
|
||
partition@60000 { | ||
label = "u-boot-env"; | ||
reg = <0x60000 0x10000>; | ||
read-only; | ||
}; | ||
|
||
factory: partition@70000 { | ||
label = "Factory"; | ||
reg = <0x70000 0x40000>; | ||
read-only; | ||
}; | ||
|
||
partition@b0000 { | ||
label = "Kernel"; | ||
reg = <0xb0000 0xb50000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&pio { | ||
eth_pins: eth-pins { | ||
mux { | ||
function = "eth"; | ||
groups = "mdc_mdio"; | ||
}; | ||
}; | ||
|
||
ephy_leds_pins: ephy-leds-pins { | ||
mux { | ||
function = "led"; | ||
groups = "gphy_leds_0", "ephy_leds"; | ||
}; | ||
}; | ||
|
||
i2c_pins: i2c-pins { | ||
mux { | ||
function = "i2c"; | ||
groups = "i2c_0"; | ||
}; | ||
|
||
conf { | ||
pins = "I2C_SDA", "I2C_SCL"; | ||
drive-strength = <4>; | ||
bias-disable; | ||
}; | ||
}; | ||
|
||
pcie_pins: pcie-pins { | ||
mux { | ||
function = "pcie"; | ||
groups = "pcie_clkreq", | ||
"pcie_pereset", | ||
"pcie_wake"; | ||
}; | ||
}; | ||
|
||
pwm_pins: pwm-pins { | ||
mux { | ||
function = "pwm"; | ||
groups = "pwm_0"; | ||
}; | ||
}; | ||
|
||
/* Serial NAND is shared pin with SPI-NOR */ | ||
serial_nand_pins: serial-nand-pins { | ||
mux { | ||
function = "flash"; | ||
groups = "snfi"; | ||
}; | ||
}; | ||
|
||
spi_pins: spi-pins { | ||
mux { | ||
function = "spi"; | ||
groups = "spi_0"; | ||
}; | ||
}; | ||
|
||
/* SPI-NOR is shared pin with serial NAND */ | ||
qspi_pins: qspi-pins { | ||
mux { | ||
function = "flash"; | ||
groups = "spi_nor"; | ||
}; | ||
}; | ||
|
||
uart0_pins: uart0-pins { | ||
mux { | ||
function = "uart"; | ||
groups = "uart0_txd_rxd" ; | ||
}; | ||
}; | ||
|
||
uart1_pins: uart1-pins { | ||
mux { | ||
function = "uart"; | ||
groups = "uart1_0_tx_rx" ; | ||
}; | ||
}; | ||
|
||
uart2_pins: uart2-pins { | ||
mux { | ||
function = "uart"; | ||
groups = "uart2_0_txd_rxd" ; | ||
}; | ||
}; | ||
|
||
watchdog_pins: watchdog-pins { | ||
mux { | ||
function = "watchdog"; | ||
groups = "watchdog"; | ||
}; | ||
}; | ||
|
||
wmac0_pins: wmac0-pins { | ||
mux { | ||
function = "wifi"; | ||
groups = "wf0_5g"; | ||
drive-strength = <4>; | ||
}; | ||
}; | ||
|
||
wmac1_pins: wmac0-pins { | ||
mux { | ||
function = "wifi"; | ||
groups = "wf0_2g"; | ||
drive-strength = <4>; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&spi_pins>; | ||
status = "okay"; | ||
}; | ||
|
||
&uart0 { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&uart0_pins>; | ||
status = "okay"; | ||
}; | ||
|
||
&ssusb { | ||
vusb33-supply = <®_3p3v>; | ||
vbus-supply = <®_5v>; | ||
status = "okay"; | ||
}; | ||
|
||
&u3phy1 { | ||
status = "okay"; | ||
}; | ||
|
||
&watchdog { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&watchdog_pins>; | ||
status = "okay"; | ||
}; | ||
|
||
&wmac { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&wmac0_pins>; | ||
pinctrl-1 = <&wmac1_pins>; | ||
status = "okay"; | ||
}; |
Oops, something went wrong.