mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600 (#5035)
* ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600 * ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600 * ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600 Co-authored-by: hyy-666 <hyiy666@gmail.com>
This commit is contained in:
parent
e3aad86a01
commit
345a201394
42
target/linux/ramips/dts/mt7621_dlink_dir878_a1.dts
Normal file
42
target/linux/ramips/dts/mt7621_dlink_dir878_a1.dts
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7621_dlink_dir878_a1.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "dlink,dlink-dir878-a1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR878 A1";
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_orange: power_orange {
|
||||
label = "dir-878-a1:orange:power";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "dir-878-a1:green:power";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_net_orange: net_orange {
|
||||
label = "dir-878-a1:orange:net";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
net_green {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
153
target/linux/ramips/dts/mt7621_dlink_dir878_a1.dtsi
Normal file
153
target/linux/ramips/dts/mt7621_dlink_dir878_a1.dtsi
Normal file
@ -0,0 +1,153 @@
|
||||
// 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>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_power_orange;
|
||||
led-failsafe = &led_power_orange;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,57600";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0000>;
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
|
||||
led {
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
led {
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0xe006>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "uart3", "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
42
target/linux/ramips/dts/mt7621_dlink_dir882_a1.dts
Normal file
42
target/linux/ramips/dts/mt7621_dlink_dir882_a1.dts
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7621_dlink_dir878_a1.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "dlink,dlink-dir882-a1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR882 A1";
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_orange: power_orange {
|
||||
label = "dir-882-a1:orange:power";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "dir-882-a1:green:power";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_net_orange: net_orange {
|
||||
label = "dir-882-a1:orange:net";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
net_green {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
42
target/linux/ramips/dts/mt7621_motorola_mr2600.dts
Normal file
42
target/linux/ramips/dts/mt7621_motorola_mr2600.dts
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7621_dlink_dir878_a1.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "motorola,motorola-mr2600", "mediatek,mt7621-soc";
|
||||
model = "Motorola MR2600";
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_orange: power_orange {
|
||||
label = "mr2600:orange:power";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "mr2600:green:power";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_net_orange: net_orange {
|
||||
label = "mr2600:orange:net";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
net_green {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
@ -226,6 +226,23 @@ define Device/dlink_dir-860l-b1
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
|
||||
SUPPORTED_DEVICES += dir-860l-b1
|
||||
endef
|
||||
|
||||
define Device/dlink_dir-878-a1
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DIR-878
|
||||
DEVICE_VARIANT := A1
|
||||
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi uboot-envtools
|
||||
endef
|
||||
|
||||
define Device/dlink_dir-882-a1
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DIR-882
|
||||
DEVICE_VARIANT := A1
|
||||
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi uboot-envtools
|
||||
endef
|
||||
|
||||
TARGET_DEVICES += dlink_dir-860l-b1
|
||||
|
||||
define Device/d-team_newifi-d2
|
||||
@ -570,6 +587,14 @@ define Device/mikrotik_routerboard-m33g
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-m33g
|
||||
|
||||
define Device/motorola_mr2600
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := Motorola
|
||||
DEVICE_MODEL := MR2600
|
||||
DEVICE_PACKAGES := kmod-mt7615d luci-app-mtwifi uboot-envtools
|
||||
endef
|
||||
|
||||
TARGET_DEVICES += motorola_mr2600
|
||||
define Device/mqmaker_witi
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := MQmaker
|
||||
|
@ -26,7 +26,10 @@ d-team,pbr-m1|\
|
||||
gehua,ghl-r-001)
|
||||
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "wan"
|
||||
;;
|
||||
dlink,dir-860l-b1)
|
||||
dlink,dir-860l-b1|\
|
||||
dlink,dir-882-a1|\
|
||||
dlink,dir-878-a1|\
|
||||
motorola,mr2600)
|
||||
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "wan"
|
||||
;;
|
||||
gnubee,gb-pc1|\
|
||||
|
@ -49,7 +49,10 @@ ramips_setup_interfaces()
|
||||
mikrotik,routerboard-750gr3)
|
||||
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
|
||||
;;
|
||||
netgear,r6850)
|
||||
netgear,r6850|\
|
||||
dlink,dir-882-a1|\
|
||||
dlink,dir-878-a1|\
|
||||
motorola,mr2600)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 ra0 rai0" "wan"
|
||||
;;
|
||||
phicomm,k2p)
|
||||
|
Loading…
Reference in New Issue
Block a user