ramips: sync upstream source code

Also fix commit b3cf46c550
This commit is contained in:
AmadeusGhost
2020-05-24 15:00:03 +08:00
parent f67d2a9db9
commit 396ebfaa33
93 changed files with 1097 additions and 349 deletions

View File

@@ -33,6 +33,7 @@ xiaomi,miwifi-nano|\
zbtlink,zbt-wg2626)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
linksys,ea7500-v2|\
xiaomi,mir3p|\
xiaomi,mir3g|\
xiaomi,miwifi-r3|\

View File

@@ -11,7 +11,7 @@ obj.brcm = trx.o
obj.bcm47xx = $(obj.brcm)
obj.bcm53xx = $(obj.brcm) $(obj.seama)
obj.bcm63xx = imagetag.o
obj.ramips = $(obj.seama) $(obj.wrg)
obj.ramips = $(obj.seama) $(obj.wrg) linksys_bootcount.o
obj.mvebu = linksys_bootcount.o
obj.kirkwood = linksys_bootcount.o
obj.ipq806x = linksys_bootcount.o

View File

@@ -106,6 +106,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -80,10 +80,12 @@
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};
&gpio1 {

View File

@@ -1,9 +1,6 @@
/dts-v1/;
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "mt7620a_asus_rt-ac5x.dtsi"
/ {
compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
@@ -38,93 +35,10 @@
linux,default-trigger = "phy1tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&gpio0 {
enable-leds {
gpio-hog;
line-name = "enable-leds";
output-low;
gpios = <10 GPIO_ACTIVE_HIGH>;
};
};
&gpio3 {
status = "okay";
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "wllll";
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};
&state_default {
@@ -134,10 +48,6 @@
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;

View File

@@ -0,0 +1,62 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7620a_asus_rt-ac5x.dtsi"
/ {
compatible = "asus,rt-ac54u", "ralink,mt7620a-soc";
model = "Asus RT-AC54U";
aliases {
label-mac-device = &ethernet;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "rt-ac54u:blue:power";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
usb {
label = "rt-ac54u:blue:usb";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
wifi2g {
label = "rt-ac54u:blue:wifi2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
};
&state_default {
gpio {
groups = "i2c", "wled", "uartf";
function = "gpio";
};
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <2>;
};
};
};

View File

@@ -0,0 +1,97 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&gpio0 {
enable-leds {
gpio-hog;
line-name = "enable-leds";
output-low;
gpios = <10 GPIO_ACTIVE_HIGH>;
};
};
&gpio3 {
status = "okay";
};
&ethernet {
mediatek,portmap = "wllll";
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};
&pcie {
status = "okay";
};

View File

@@ -123,6 +123,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -140,7 +140,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -140,7 +140,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -126,6 +126,7 @@
&ethernet {
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -155,7 +155,6 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

View File

@@ -153,11 +153,11 @@
};
&ethernet {
status = "okay";
mediatek,portmap = "wllll";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mediatek,portmap = "wllll";
port@4 {
status = "okay";
phy-handle = <&phy0>;

View File

@@ -91,10 +91,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mediatek,portmap = "wllll";
port@5 {

View File

@@ -112,9 +112,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {

View File

@@ -138,10 +138,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
port@5 {

View File

@@ -123,10 +123,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
port@5 {

View File

@@ -115,13 +115,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,mdio-mode = <1>;
phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;

View File

@@ -136,9 +136,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mtd-mac-address = <&iNIC_rf 0x4>;
port@5 {

View File

@@ -138,6 +138,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4000>;
mediatek,portmap = "wllll";
};

View File

@@ -129,6 +129,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4000>;
mediatek,portmap = "wllll";
};

View File

@@ -133,6 +133,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4000>;
mediatek,portmap = "llllw";
};

View File

@@ -122,12 +122,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
port@4 {
status = "okay";
phy-handle = <&phy4>;

View File

@@ -71,10 +71,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
port@5 {

View File

@@ -111,7 +111,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -139,6 +139,7 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
port@5 {

View File

@@ -147,6 +147,7 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins>;
mtd-mac-address = <&factory 0x4>;
port@5 {

View File

@@ -110,7 +110,6 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

View File

@@ -0,0 +1,172 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc";
model = "LB-Link BL-W1200";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_wps: wps {
label = "bl-w1200:green:wps";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "uartf", "spi refclk";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "wllll";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
mediatek,mtd-eeprom = <&factory 0x8000>;
led {
led-sources = <2>;
led-active-low;
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -54,6 +54,8 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -78,10 +78,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x28>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "wllll";
port@4 {

View File

@@ -105,11 +105,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&factory 0x28>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x28>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;

View File

@@ -89,7 +89,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -0,0 +1,161 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "netis,wf2770", "ralink,mt7620a-soc";
model = "NETIS WF2770";
leds {
compatible = "gpio-leds";
wlan {
label = "wf2770:blue:wlan";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
led-toggle {
label = "led-toggle";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_LIGHTS_TOGGLE>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mtd-mac-address = <&factory 0x4>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};

View File

@@ -103,7 +103,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -103,7 +103,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
port@5 {

View File

@@ -99,7 +99,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -44,7 +44,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -44,6 +44,8 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -130,7 +130,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -90,7 +90,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -110,7 +110,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -130,7 +130,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -135,7 +135,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -74,9 +74,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {

View File

@@ -55,9 +55,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@5 {

View File

@@ -71,9 +71,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mediatek,portmap = "llllw";
};

View File

@@ -68,9 +68,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {

View File

@@ -170,6 +170,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -139,9 +139,9 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {

View File

@@ -129,11 +129,11 @@
};
&ethernet {
status = "okay";
mtd-mac-address = <&rom 0xf100>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mtd-mac-address = <&rom 0xf100>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;

View File

@@ -91,7 +91,9 @@
&ethernet {
pinctrl-names = "default";
mtd-mac-address = <&rom 0xf100>;
mediatek,portmap = "wllll";
};

View File

@@ -130,7 +130,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};

View File

@@ -119,7 +119,9 @@
&ethernet {
pinctrl-names = "default";
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -149,7 +149,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -111,7 +111,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -75,6 +75,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -98,6 +98,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -136,10 +136,10 @@
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mtd-mac-address = <&factory 0x00004>;
mtd-mac-address = <&factory 0x4>;
port@4 {
status = "okay";

View File

@@ -109,6 +109,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -122,6 +122,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -98,6 +98,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -105,7 +105,8 @@
};
&ethernet {
mediatek,portmap = "llllw";
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mediatek,portmap = "llllw";
};

View File

@@ -119,6 +119,7 @@
&ethernet {
mtd-mac-address = <&factory 0x2e>;
mediatek,portmap = "llllw";
};

View File

@@ -114,6 +114,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -114,6 +114,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -44,6 +44,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -82,6 +82,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -87,6 +87,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -110,6 +110,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -114,6 +114,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -95,6 +95,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -107,7 +107,9 @@
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -133,6 +133,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};

View File

@@ -133,6 +133,7 @@
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "llllw";
};

View File

@@ -0,0 +1,207 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "linksys,ea7500-v2", "mediatek,mt7621-soc";
model = "Linksys EA7500 v2";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
wan_green {
label = "ea7500-v2:green:wan";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
lan1_green {
label = "ea7500-v2:green:lan1";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
lan2_green {
label = "ea7500-v2:green:lan2";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
lan3_green {
label = "ea7500-v2:green:lan3";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
lan4_green {
label = "ea7500-v2:green:lan4";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power: power {
label = "ea7500-v2:white:power";
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
};
wps {
label = "ea7500-v2:green:wps";
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&nand {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "boot";
reg = <0x0 0x80000>;
read-only;
};
partition@80000 {
label = "u_env";
reg = <0x80000 0x40000>;
read-only;
};
factory: partition@c0000 {
label = "factory";
reg = <0xc0000 0x40000>;
read-only;
};
partition@100000 {
label = "s_env";
reg = <0x100000 0x40000>;
};
partition@140000 {
label = "devinfo";
reg = <0x140000 0x40000>;
read-only;
};
partition@180000 {
label = "kernel";
reg = <0x180000 0x400000>;
};
partition@580000 {
label = "ubi";
reg = <0x580000 0x2400000>;
};
partition@2980000 {
label = "alt_kernel";
reg = <0x2980000 0x400000>;
read-only;
};
partition@2d80000 {
label = "alt_rootfs";
reg = <0x2d80000 0x2400000>;
read-only;
};
partition@5180000 {
label = "sysdiag";
reg = <0x5180000 0x100000>;
read-only;
};
partition@5280000 {
label = "syscfg";
reg = <0x5280000 0x2d00000>;
read-only;
};
};
};
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "jtag", "wdt";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
};
};
&pcie1 {
mt76@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
};
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};

View File

@@ -26,22 +26,22 @@
compatible = "gpio-leds";
led_status_amber: status_amber {
label = "rm2100:amber:status";
label = "redmi-router-ac2100:amber:status";
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status_white: status_white {
label = "rm2100:white:status";
label = "redmi-router-ac2100:white:status";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
wan_amber {
label = "rm2100:amber:wan";
label = "redmi-router-ac2100:amber:wan";
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
wan_white {
label = "rm2100:white:wan";
label = "redmi-router-ac2100:white:wan";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};

View File

@@ -142,7 +142,7 @@
&ethernet {
status = "okay";
mtd-mac-address = <&devdata 0x0d>;
mtd-mac-address = <&devdata 0xd>;
port@0 {
mediatek,fixed-link = <1000 1 1 1>;

View File

@@ -25,80 +25,10 @@ KERNEL_LOADADDR := $(loadaddr-y)
LOADER_PLATFORM := $(ldrplatform-y)
KERNEL_DTB = kernel-bin | append-dtb | lzma
define Device/Default
PROFILES = Default
KERNEL := $(KERNEL_DTB) | uImage lzma
SOC := $(DEFAULT_SOC)
DEVICE_DTS_DIR := ../dts
DEVICE_DTS = $$(SOC)_$(1)
IMAGES := sysupgrade.bin
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
endef
define Device/uimage-lzma-loader
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
endef
define Device/seama
SEAMA_MTDBLOCK := 2
IMAGES += factory.bin
# 64 bytes offset:
# - 28 bytes seama_header
# - 36 bytes of META data (4-bytes aligned)
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
IMAGE/sysupgrade.bin := \
$$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := \
$$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
SEAMA_SIGNATURE :=
endef
define Build/jcg-header
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
$(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
-u $@ -o $@.new
mv $@.new $@
endef
define Build/trx
$(STAGING_DIR_HOST)/bin/trx $(1) \
-o $@ \
-m $$(($(subst k, * 1024,$(IMAGE_SIZE)))) \
-f $(IMAGE_KERNEL) \
-a 4 -f $(IMAGE_ROOTFS)
endef
define Build/loader-common
rm -rf $@.src
$(MAKE) -C lzma-loader \
PKG_BUILD_DIR="$@.src" \
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \
LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \
$(1) compile loader.$(LOADER_TYPE)
mv "$@.$(LOADER_TYPE)" "$@"
rm -rf $@.src
endef
define Build/loader-kernel
$(call Build/loader-common,LOADER_DATA="$@")
endef
define Build/relocate-kernel
rm -rf $@.relocate
$(CP) ../../generic/image/relocate $@.relocate
$(MAKE) -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
( \
dd if=$@.relocate/loader.bin bs=32 conv=sync && \
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
cat $@ \
) > $@.new
mv $@.new $@
rm -rf $@.relocate
define Build/edimax-header
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
@mv $@.new $@
endef
define Build/elx-header
@@ -121,28 +51,36 @@ define Build/elx-header
rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header
endef
define Build/umedia-header
fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
endef
define Build/edimax-header
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
@mv $@.new $@
endef
define Build/poray-header
$(STAGING_DIR_HOST)/bin/mkporayfw $(1) -f $@ -o $@.new
define Build/fonfxcimage
uimage_padhdr -i $@ -o $@.new
mv $@.new $@
endef
define Build/wrg-header
mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
define Build/jcg-header
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
$(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
-u $@ -o $@.new
mv $@.new $@
endef
define Build/loader-common
rm -rf $@.src
$(MAKE) -C lzma-loader \
PKG_BUILD_DIR="$@.src" \
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \
LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \
$(1) compile loader.$(LOADER_TYPE)
mv "$@.$(LOADER_TYPE)" "$@"
rm -rf $@.src
endef
define Build/loader-kernel
$(call Build/loader-common,LOADER_DATA="$@")
endef
# combine kernel and rootfs into one image
# mkdlinkfw <type> <optional extra arguments to mkdlinkfw binary>
define Build/mkdlinkfw
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
-k $(IMAGE_KERNEL) \
@@ -162,8 +100,32 @@ define Build/mkdlinkfw-factory
mv $@.new $@
endef
define Build/zyimage
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
define Build/netis-tail
echo -n $(1) >> $@
echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \
sed 's/../\\\\x&/g' | xargs echo -ne >> $@
endef
define Build/poray-header
$(STAGING_DIR_HOST)/bin/mkporayfw $(1) -f $@ -o $@.new
mv $@.new $@
endef
define Build/relocate-kernel
rm -rf $@.relocate
$(CP) ../../generic/image/relocate $@.relocate
$(MAKE) -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
( \
dd if=$@.relocate/loader.bin bs=32 conv=sync && \
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
cat $@ \
) > $@.new
mv $@.new $@
rm -rf $@.relocate
endef
define Build/sercom-footer
$(call Build/sercom-seal,-f)
endef
define Build/sercom-seal
@@ -175,37 +137,59 @@ define Build/sercom-seal
$(1)
endef
define Build/sercom-footer
$(call Build/sercom-seal,-f)
define Build/trx
$(STAGING_DIR_HOST)/bin/trx $(1) \
-o $@ \
-m $$(($(subst k, * 1024,$(IMAGE_SIZE)))) \
-f $(IMAGE_KERNEL) \
-a 4 -f $(IMAGE_ROOTFS)
endef
define Build/fonfxcimage
uimage_padhdr -i $@ -o $@.new
define Build/umedia-header
fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
endef
define Build/wrg-header
mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
mv $@.new $@
endef
ifeq ($(SUBTARGET),rt288x)
include rt288x.mk
endif
define Build/zyimage
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
endef
ifeq ($(SUBTARGET),rt305x)
include rt305x.mk
endif
define Device/Default
PROFILES = Default
KERNEL := $(KERNEL_DTB) | uImage lzma
SOC := $(DEFAULT_SOC)
DEVICE_DTS_DIR := ../dts
DEVICE_DTS = $$(SOC)_$(1)
IMAGES := sysupgrade.bin
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
endef
ifeq ($(SUBTARGET),rt3883)
include rt3883.mk
endif
define Device/seama
SEAMA_MTDBLOCK := 2
IMAGES += factory.bin
ifeq ($(SUBTARGET),mt7620)
include mt7620.mk
endif
# 64 bytes offset:
# - 28 bytes seama_header
# - 36 bytes of META data (4-bytes aligned)
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
IMAGE/sysupgrade.bin := \
$$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := \
$$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
SEAMA_SIGNATURE :=
endef
ifeq ($(SUBTARGET),mt7621)
include mt7621.mk
endif
define Device/uimage-lzma-loader
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
endef
ifeq ($(SUBTARGET),mt76x8)
include mt76x8.mk
endif
include $(SUBTARGET).mk
$(eval $(call BuildImage))

View File

@@ -86,6 +86,16 @@ define Device/asus_rt-ac51u
endef
TARGET_DEVICES += asus_rt-ac51u
define Device/asus_rt-ac54u
SOC := mt7620a
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Asus
DEVICE_MODEL := RT-AC54U
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += asus_rt-ac54u
define Device/asus_rt-n12p
SOC := mt7620n
IMAGE_SIZE := 16064k
@@ -580,6 +590,15 @@ define Device/lava_lr-25g001
endef
TARGET_DEVICES += lava_lr-25g001
define Device/lb-link_bl-w1200
SOC := mt7620a
DEVICE_VENDOR := LB-Link
DEVICE_MODEL := BL-W1200
IMAGE_SIZE := 7872k
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76x2
endef
TARGET_DEVICES += lb-link_bl-w1200
define Device/lenovo_newifi-y1
SOC := mt7620a
IMAGE_SIZE := 16064k
@@ -687,6 +706,17 @@ define Device/netgear_wn3000rp-v3
endef
TARGET_DEVICES += netgear_wn3000rp-v3
define Device/netis_wf2770
SOC := mt7620a
IMAGE_SIZE := 16064k
UIMAGE_NAME := WF2770_0.0.00
DEVICE_VENDOR := NETIS
DEVICE_MODEL := WF2770
DEVICE_PACKAGES := kmod-mt76x0e
KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2770 | uImage lzma
endef
TARGET_DEVICES += netis_wf2770
define Device/nexx_wt3020-4m
SOC := mt7620n
BLOCKSIZE := 4k

View File

@@ -24,67 +24,61 @@ define Build/custom-initramfs-uimage
endef
define Build/elecom-gst-factory
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
echo -n "MT7621_ELECOM_$(product)" >> $@
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
echo -n "MT7621_ELECOM_$(product)" >> $@
endef
define Build/elecom-wrc-factory
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
endef
define Build/iodata-factory
$(eval fw_size=$(word 1,$(1)))
$(eval fw_type=$(word 2,$(1)))
$(eval product=$(word 3,$(1)))
$(eval factory_bin=$(word 4,$(1)))
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
$(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
$(STAGING_DIR_HOST)/bin/mksenaofw \
-r 0x30a -p $(product) -t $(fw_type) \
-e $(factory_bin) -o $(factory_bin).new; \
mv $(factory_bin).new $(factory_bin); \
$(CP) $(factory_bin) $(BIN_DIR)/; \
$(eval fw_size=$(word 1,$(1)))
$(eval fw_type=$(word 2,$(1)))
$(eval product=$(word 3,$(1)))
$(eval factory_bin=$(word 4,$(1)))
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
$(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
$(STAGING_DIR_HOST)/bin/mksenaofw \
-r 0x30a -p $(product) -t $(fw_type) \
-e $(factory_bin) -o $(factory_bin).new; \
mv $(factory_bin).new $(factory_bin); \
$(CP) $(factory_bin) $(BIN_DIR)/; \
else \
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
fi
endef
define Build/iodata-mstc-header
( \
data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | \
gzip -c | tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
)
dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
( \
header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | \
gzip -c | tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
)
endef
define Build/netis-tail
echo -n $(1) >> $@
echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \
sed 's/../\\\\x&/g' | xargs echo -ne >> $@
( \
data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \
tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
)
dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
( \
header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | gzip -c | \
tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
)
endef
define Build/ubootpad96
@@ -120,8 +114,8 @@ define Device/afoundry_ew1200
IMAGE_SIZE := 16064k
DEVICE_VENDOR := AFOUNDRY
DEVICE_MODEL := EW1200
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += ew1200
endef
TARGET_DEVICES += afoundry_ew1200
@@ -130,8 +124,7 @@ define Device/alfa-network_quad-e4g
IMAGE_SIZE := 16064k
DEVICE_VENDOR := ALFA Network
DEVICE_MODEL := Quad-E4G
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \
uboot-envtools
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools
endef
TARGET_DEVICES += alfa-network_quad-e4g
@@ -227,8 +220,8 @@ define Device/dlink_dir-860l-b1
BLOCKSIZE := 64k
SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \
relocate-kernel | lzma -a0 | uImage lzma
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \
lzma -a0 | uImage lzma
IMAGE_SIZE := 16064k
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-860L
@@ -268,8 +261,8 @@ define Device/d-team_pbr-m1
IMAGE_SIZE := 16064k
DEVICE_VENDOR := PandoraBox
DEVICE_MODEL := PBR-M1
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 \
kmod-sdhci-mt7620 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += pbr-m1
endef
TARGET_DEVICES += d-team_pbr-m1
@@ -352,7 +345,7 @@ TARGET_DEVICES += gehua_ghl-r-001
define Device/gnubee_gb-pc1
DEVICE_VENDOR := GnuBee
DEVICE_MODEL := Personal Cloud One
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
IMAGE_SIZE := 32448k
endef
TARGET_DEVICES += gnubee_gb-pc1
@@ -360,7 +353,7 @@ TARGET_DEVICES += gnubee_gb-pc1
define Device/gnubee_gb-pc2
DEVICE_VENDOR := GnuBee
DEVICE_MODEL := Personal Cloud Two
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
IMAGE_SIZE := 32448k
endef
TARGET_DEVICES += gnubee_gb-pc2
@@ -504,6 +497,24 @@ define Device/lenovo_newifi-d1
endef
TARGET_DEVICES += lenovo_newifi-d1
define Device/linksys_ea7500-v2
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGE_SIZE := 36864k
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA7500
DEVICE_VARIANT := v2
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-openssl uboot-envtools
UBINIZE_OPTS := -E 5
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
append-ubi | check-size $$$$(IMAGE_SIZE) | linksys-image type=EA7500v2
endef
TARGET_DEVICES += linksys_ea7500-v2
define Device/linksys_re6500
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Linksys
@@ -536,7 +547,6 @@ define Device/MikroTik
IMAGE_SIZE := 16128k
DEVICE_PACKAGES := kmod-usb3
LOADER_TYPE := elf
PLATFORM := mt7621
KERNEL := $(KERNEL_DTB) | loader-kernel
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
@@ -569,8 +579,8 @@ define Device/mqmaker_witi
IMAGE_SIZE := 16064k
DEVICE_VENDOR := MQmaker
DEVICE_MODEL := WiTi
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-mt76x2 \
kmod-sdhci-mt7620 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
endef
TARGET_DEVICES += mqmaker_witi
@@ -635,7 +645,7 @@ define Device/netgear_r6260
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e wpad-openssl
DEVICE_PACKAGES += kmod-mt7615e
endef
TARGET_DEVICES += netgear_r6260
@@ -647,7 +657,7 @@ define Device/netgear_r6350
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e wpad-openssl
DEVICE_PACKAGES += kmod-mt7615e
endef
TARGET_DEVICES += netgear_r6350
@@ -657,12 +667,16 @@ define Device/netgear_r6700-v2
DEVICE_VARIANT := v2
DEVICE_ALT0_VENDOR := NETGEAR
DEVICE_ALT0_MODEL := Nighthawk AC2400
DEVICE_ALT0_VARIANT := v1
DEVICE_ALT1_VENDOR := NETGEAR
DEVICE_ALT1_MODEL := R7200
DEVICE_ALT1_VARIANT := v1
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1032
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e wpad-openssl
DEVICE_PACKAGES += kmod-mt7615e
endef
TARGET_DEVICES += netgear_r6700-v2
@@ -674,7 +688,7 @@ define Device/netgear_r6800
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0062
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e wpad-openssl
DEVICE_PACKAGES += kmod-mt7615e
endef
TARGET_DEVICES += netgear_r6800
@@ -686,7 +700,7 @@ define Device/netgear_r6850
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e wpad-openssl
DEVICE_PACKAGES += kmod-mt7615e
endef
TARGET_DEVICES += netgear_r6850
@@ -866,7 +880,7 @@ define Device/unielec_u7621-06-16m
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7621-06
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
endef
TARGET_DEVICES += unielec_u7621-06-16m
@@ -876,7 +890,7 @@ define Device/unielec_u7621-06-64m
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7621-06
DEVICE_VARIANT := 64M
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
endef
TARGET_DEVICES += unielec_u7621-06-64m
@@ -976,7 +990,7 @@ define Device/xiaoyu_xy-c5
IMAGE_SIZE := 32448k
DEVICE_VENDOR := XiaoYu
DEVICE_MODEL := XY-C5
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3
endef
TARGET_DEVICES += xiaoyu_xy-c5
@@ -984,8 +998,8 @@ define Device/xzwifi_creativebox-v1
IMAGE_SIZE := 32448k
DEVICE_VENDOR := CreativeBox
DEVICE_MODEL := v1
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 \
kmod-sdhci-mt7620 kmod-usb3
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
kmod-usb3
endef
TARGET_DEVICES += xzwifi_creativebox-v1
@@ -1030,8 +1044,8 @@ define Device/zbtlink_zbt-wg2626
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG2626
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 \
kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += zbt-wg2626
endef
TARGET_DEVICES += zbtlink_zbt-wg2626
@@ -1041,8 +1055,8 @@ define Device/zbtlink_zbt-wg3526-16m
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG3526
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-16m
@@ -1052,8 +1066,8 @@ define Device/zbtlink_zbt-wg3526-32m
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG3526
DEVICE_VARIANT := 32M
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-32m

View File

@@ -405,6 +405,7 @@ define Device/tplink_tl-wr840n-v5
TPLINK_HWREVADD := 0x5
IMAGES := sysupgrade.bin
SUPPORTED_DEVICES += tl-wr840n-v5
DEFAULT := n
endef
TARGET_DEVICES += tplink_tl-wr840n-v5
@@ -433,6 +434,7 @@ define Device/tplink_tl-wr841n-v14
TPLINK_HWREVADD := 0x14
IMAGES := sysupgrade.bin tftp-recovery.bin
IMAGE/tftp-recovery.bin := pad-extra 64k | $$(IMAGE/factory.bin)
DEFAULT := n
endef
TARGET_DEVICES += tplink_tl-wr841n-v14

View File

@@ -2,13 +2,13 @@
# RT305X Profiles
#
define Build/buffalo-tftp-header
( \
echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
dd bs=512 count=1 conv=sync; \
dd if=$@; \
) > $@.tmp && \
$(STAGING_DIR_HOST)/bin/buffalo-tftp -i $@.tmp -o $@.new
mv $@.new $@
( \
echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
dd bs=512 count=1 conv=sync; \
dd if=$@; \
) > $@.tmp && \
$(STAGING_DIR_HOST)/bin/buffalo-tftp -i $@.tmp -o $@.new
mv $@.new $@
endef
define Build/dap-header
@@ -755,8 +755,7 @@ define Device/nixcore_x1-16m
DEVICE_VENDOR := Nixcore
DEVICE_MODEL := X1
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += nixcore-x1 nixcore-x1-16M
endef
TARGET_DEVICES += nixcore_x1-16m
@@ -767,8 +766,7 @@ define Device/nixcore_x1-8m
DEVICE_VENDOR := Nixcore
DEVICE_MODEL := X1
DEVICE_VARIANT := 8M
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += nixcore-x1 nixcore-x1-8M
endef
TARGET_DEVICES += nixcore_x1-8m
@@ -778,8 +776,7 @@ define Device/olimex_rt5350f-olinuxino
IMAGE_SIZE := 7872k
DEVICE_VENDOR := OLIMEX
DEVICE_MODEL := RT5350F-OLinuXino
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += rt5350f-olinuxino
endef
TARGET_DEVICES += olimex_rt5350f-olinuxino
@@ -789,8 +786,7 @@ define Device/olimex_rt5350f-olinuxino-evb
IMAGE_SIZE := 7872k
DEVICE_VENDOR := OLIMEX
DEVICE_MODEL := RT5350F-OLinuXino-EVB
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += rt5350f-olinuxino-evb
endef
TARGET_DEVICES += olimex_rt5350f-olinuxino-evb
@@ -1146,8 +1142,7 @@ define Device/vocore_vocore-16m
DEVICE_VENDOR := VoCore
DEVICE_MODEL := VoCore
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += vocore vocore-16M
endef
TARGET_DEVICES += vocore_vocore-16m
@@ -1158,8 +1153,7 @@ define Device/vocore_vocore-8m
DEVICE_VENDOR := VoCore
DEVICE_MODEL := VoCore
DEVICE_VARIANT := 8M
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink \
kmod-spi-dev
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-i2c-ralink kmod-spi-dev
SUPPORTED_DEVICES += vocore vocore-8M
endef
TARGET_DEVICES += vocore_vocore-8m

View File

@@ -75,6 +75,7 @@ ramips_setup_interfaces()
"1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
;;
asus,rt-ac51u|\
asus,rt-ac54u|\
asus,rt-n14u|\
bdcom,wap2100-sk|\
edimax,ew-7478apc|\
@@ -270,7 +271,8 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 0x2e)
label_mac=$(mtd_get_mac_binary factory 0x4)
;;
asus,rt-ac51u)
asus,rt-ac51u|\
asus,rt-ac54u)
lan_mac=$(mtd_get_mac_binary factory 0x22)
;;
dlink,dch-m225)
@@ -323,6 +325,10 @@ ramips_setup_macs()
iptime,a104ns)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary u-boot 0x1fc20)" 2)
;;
lb-link,bl-w1200)
wan_mac=$(mtd_get_mac_binary factory 0x2e)
label_mac=$wan_mac
;;
lenovo,newifi-y1|\
lenovo,newifi-y1s|\
ohyeah,oy-0001|\
@@ -332,6 +338,10 @@ ramips_setup_macs()
linksys,e1700)
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
;;
netis,wf2770)
wan_mac=$(mtd_get_mac_binary factory 0x2e)
label_mac=$wan_mac
;;
tplink,archer-c2-v1|\
tplink,archer-c20-v1|\
tplink,archer-c20i|\

View File

@@ -22,6 +22,9 @@ head-weblink,hdrm200)
ucidef_add_gpio_switch "io4" "I/O 4" "14"
ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "21" "1"
;;
lb-link,bl-w1200)
ucidef_add_gpio_switch "eth_leds_enable" "ETH LEDs enable" "10" "1"
;;
zbtlink,zbt-we826-e)
ucidef_add_gpio_switch "sim_switch" "SIM slot switch" "13"
ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "14" "1"

View File

@@ -34,6 +34,13 @@ gnubee,gb-pc2)
ucidef_set_led_netdev "lan1" "lan1" "$boardname:green:lan1" "lan1"
ucidef_set_led_netdev "lan2" "lan2" "$boardname:green:lan2" "lan2"
;;
linksys,ea7500-v2)
ucidef_set_led_netdev "lan1" "lan1 link" "$boardname:green:lan1" "lan1" "link"
ucidef_set_led_netdev "lan2" "lan2 link" "$boardname:green:lan2" "lan2" "link"
ucidef_set_led_netdev "lan3" "lan3 link" "$boardname:green:lan3" "lan3" "link"
ucidef_set_led_netdev "lan4" "lan4 link" "$boardname:green:lan4" "lan4" "link"
ucidef_set_led_netdev "wan" "wan link" "$boardname:green:wan" "wan" "link"
;;
mikrotik,routerboard-m11g)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"

View File

@@ -92,6 +92,11 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
linksys,ea7500-v2)
lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
wan_mac=$lan_mac
label_mac=$lan_mac
;;
mikrotik,routerboard-750gr3|\
mikrotik,routerboard-m11g|\
mikrotik,routerboard-m33g)

View File

@@ -0,0 +1,18 @@
[ "$ACTION" == "add" ] || exit 0
PHYNBR=${DEVPATH##*/phy}
[ -n $PHYNBR ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case "$board" in
linksys,ea7500-v2)
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
;;
esac

View File

@@ -8,6 +8,9 @@ boot() {
[ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
;;
linksys,ea7500-v2)
mtd resetbc s_env || true
;;
samknows,whitebox-v8)
fw_setenv bootcount 0
;;

View File

@@ -45,6 +45,7 @@ platform_do_upgrade() {
asus,rt-ac65p|\
asus,rt-ac85p|\
hiwifi,hc5962|\
linksys,ea7500-v2|\
netgear,r6220|\
netgear,r6260|\
netgear,r6350|\

View File

@@ -7,7 +7,7 @@ BOARDNAME:=MT7621 based boards
FEATURES+=nand ramdisk rtc usb minor
CPU_TYPE:=24kc
KERNEL_PATCHVER:5.4
KERNEL_PATCHVER:=5.4
define Target/Description
Build firmware images for Ralink MT7621 based boards.

View File

@@ -7,9 +7,8 @@ BOARDNAME:=MT76x8 based boards
FEATURES+=usb ramdisk
CPU_TYPE:=24kc
KERNEL_PATCHVER:=5.4
DEFAULT_PACKAGES += kmod-mt7603 wpad-openssl swconfig
KERNEL_PATCHVER:=5.4
define Target/Description
Build firmware images for Ralink MT76x8 based boards.

View File

@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -980,7 +980,10 @@ void phy_state_machine(struct work_struc
@@ -913,7 +913,10 @@ void phy_state_machine(struct work_struc
/* If the link is down, give up on negotiation for now */
if (!phydev->link) {
phydev->state = PHY_NOLINK;
@@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
break;
}
@@ -1067,7 +1070,10 @@ void phy_state_machine(struct work_struc
@@ -1000,7 +1003,10 @@ void phy_state_machine(struct work_struc
phy_link_up(phydev);
} else {
phydev->state = PHY_NOLINK;
@@ -35,7 +35,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
if (phy_interrupt_is_valid(phydev))
@@ -1077,7 +1083,10 @@ void phy_state_machine(struct work_struc
@@ -1010,7 +1016,10 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;