Skip to content

Commit

Permalink
ramips: improve support for dir878/882 (coolsnowwolf#5058)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiamadeus committed Jul 10, 2020
1 parent 74f1dce commit 15b5fbb
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package/lean/mt/drivers/mt7615d/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ config MTK_BAND_STEERING

config MTK_LED_CONTROL_SUPPORT
bool "LED Control Support"
default n
default y

config MTK_WLAN_HOOK
bool "WLAN hook Support"
Expand Down
8 changes: 1 addition & 7 deletions target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "mt7621_dlink_dir-878-a1.dtsi"
#include "mt7621_dlink_dir.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
Expand Down Expand Up @@ -32,11 +32,5 @@
label = "dir-878-a1:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
usb {
label = "dir-878-a1:green:usb";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};
};
11 changes: 6 additions & 5 deletions target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "mt7621_dlink_dir-878-a1.dtsi"
#include "mt7621_dlink_dir.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
Expand Down Expand Up @@ -32,11 +32,12 @@
label = "dir-882-a1:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};

usb {
label = "dir-882-a1:green:usb";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
label = "dir-882-a1:green:usb";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
led-upgrade = &led_power_green;
label-mac-device = &gmac0;
};

chosen {
bootargs = "console=ttyS0,57600";
};
Expand Down Expand Up @@ -147,7 +148,7 @@

&state_default {
gpio {
groups = "uart3", "jtag", "wdt";
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};
11 changes: 6 additions & 5 deletions target/linux/ramips/dts/mt7621_motorola_mr2600.dts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "mt7621_dlink_dir-878-a1.dtsi"
#include "mt7621_dlink_dir.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
Expand Down Expand Up @@ -32,11 +32,12 @@
label = "mr2600:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};

usb {
label = "mr2600:green:usb";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
label = "mr2600:green:usb";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};
};
8 changes: 5 additions & 3 deletions target/linux/ramips/image/mt7621.mk
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ define Device/dlink_dir-882-a1
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-882
DEVICE_VARIANT := A1
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi uboot-envtools
DEVICE_PACKAGES := kmod-mt7615d kmod-usb3 kmod-usb-ledtrig-usbport \
luci-app-mtwifi uboot-envtools
endef
TARGET_DEVICES += dlink_dir-882-a1

Expand Down Expand Up @@ -592,7 +593,8 @@ define Device/motorola_mr2600
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Motorola
DEVICE_MODEL := MR2600
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi uboot-envtools
DEVICE_PACKAGES := kmod-mt7615d kmod-usb3 kmod-usb-ledtrig-usbport
luci-app-mtwifi uboot-envtools
endef
TARGET_DEVICES += motorola_mr2600

Expand Down Expand Up @@ -795,7 +797,7 @@ define Device/phicomm_k2p
DEVICE_VENDOR := Phicomm
DEVICE_MODEL := K2P
SUPPORTED_DEVICES += k2p
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi kmod-mt_wifi
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi
endef
TARGET_DEVICES += phicomm_k2p

Expand Down
8 changes: 6 additions & 2 deletions target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ d-team,pbr-m1|\
gehua,ghl-r-001)
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "wan"
;;
dlink,dir-860l-b1|\
dlink,dir-882-a1|\
dlink,dir-860l-b1)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "wan"
;;
dlink,dir-878-a1|\
dlink,dir-882-a1|\
motorola,mr2600)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "wan"
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "ra0"
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "rai0"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ ramips_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
;;
netgear,r6850|\
dlink,dir-882-a1|\
dlink,dir-878-a1|\
dlink,dir-882-a1|\
motorola,mr2600)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 ra0 rai0" "wan"
;;
Expand Down

0 comments on commit 15b5fbb

Please sign in to comment.