diff --git a/target/linux/ramips/dts/mt7621_edup_ep-rt2960s.dts b/target/linux/ramips/dts/mt7621_edup_ep-rt2960s.dts new file mode 100644 index 0000000000..6bdf44d491 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_edup_ep-rt2960s.dts @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_haier-sim_wr1800k.dtsi" + +/ { + compatible = "edup,ep-rt2960s", "mediatek,mt7621-soc"; + model = "EDUP EP-RT2960S"; + + keys { + reset { + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + wps { + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + led_status_blue: led-0 { + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_status_green: led-1 { + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_status_red: led-2 { + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ðphy4 { + /delete-property/ interrupts; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_3fff4 0>; +}; + +&gmac1 { + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_3fff4 (-3)>; +}; + +&nvmem_layout { + macaddr_factory_3fff4: macaddr@3fff4 { + compatible = "mac-base"; + reg = <0x3fff4 0x6>; + #nvmem-cell-cells = <1>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi index 8bd63967c0..cb050c90d4 100644 --- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi +++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi @@ -95,7 +95,7 @@ reg = <0x0100000 0x0080000>; read-only; - nvmem-layout { + nvmem_layout: nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ea78c92e40..a5131f901a 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1227,6 +1227,13 @@ define Device/edimax_rg21s endef TARGET_DEVICES += edimax_rg21s +define Device/edup_ep-rt2960s + $(Device/haier-sim_wr1800k) + DEVICE_VENDOR := EDUP + DEVICE_MODEL := EP-RT2960S +endef +TARGET_DEVICES += edup_ep-rt2960s + define Device/elecom_wrc-gs $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index a4ae58ed94..eb5a64ab34 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -14,6 +14,7 @@ ramips_setup_interfaces() buffalo,wsr-2533dhpls|\ confiabits,mt7621-v1|\ dlink,dir-x1860-b1|\ + edup,ep-rt2960s|\ gehua,ghl-r-001|\ h3c,tx1800-plus|\ h3c,tx1801-plus|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index bbd1c7f630..175dcf20f8 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -71,13 +71,7 @@ case "$board" in macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress fi ;; - h3c,tx1800-plus|\ - h3c,tx1801-plus|\ - h3c,tx1806) - addr=$(macaddr_setbit $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 7) - [ "$PHYNBR" = "0" ] && echo -n ${addr:0:9}'1'${addr:10:7} > /sys${DEVPATH}/macaddress - [ "$PHYNBR" = "1" ] && echo -n ${addr:0:9}'7'${addr:10:7} > /sys${DEVPATH}/macaddress - ;; + edup,ep-rt2960s|\ haier,har-20s2u1|\ jcg,y2|\ sim,simax1800t|\ @@ -85,6 +79,13 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress ;; + h3c,tx1800-plus|\ + h3c,tx1801-plus|\ + h3c,tx1806) + addr=$(macaddr_setbit $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 7) + [ "$PHYNBR" = "0" ] && echo -n ${addr:0:9}'1'${addr:10:7} > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && echo -n ${addr:0:9}'7'${addr:10:7} > /sys${DEVPATH}/macaddress + ;; hiwifi,hc5962) [ "$PHYNBR" = "1" ] && \ macaddr_unsetbit "$(cat /sys${DEVPATH}/macaddress)" 6 > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh old mode 100755 new mode 100644 index a68120caab..cc33885423 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -93,6 +93,7 @@ platform_do_upgrade() { dlink,dir-3060-a1|\ dlink,dir-853-a3|\ dlink,dir-x1860-b1|\ + edup,ep-rt2960s|\ elecom,wmc-x1800gst|\ elecom,wsc-x1800gs|\ etisalat,s3|\