aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds4
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/ramips/dts/mt7620a_engenius_esr600.dts204
-rw-r--r--target/linux/ramips/image/mt7620.mk13
4 files changed, 227 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index fa36aee9e3..46202b4117 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -186,6 +186,10 @@ elecom,wrh-300cr)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
;;
+engenius,esr600)
+ ucidef_set_led_netdev "wlan5g" "5.0GHz" "$boardname:blue:wlan5g" "wlan0"
+ ucidef_set_led_netdev "wlan2g" "2.4GHz" "$boardname:blue:wlan2g" "wlan1"
+ ;;
glinet,gl-mt300a|\
glinet,gl-mt300n|\
glinet,gl-mt750)
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 7ab5653d09..7ecc11b37b 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -333,6 +333,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch1" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;;
+ engenius,esr600)
+ ucidef_add_switch "switch0" \
+ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0"
+ ;;
fon,fon2601)
ucidef_add_switch "switch0" \
"0:lan" "4:wan" "6@eth0"
@@ -635,7 +639,8 @@ ramips_setup_macs()
netgear,r6850)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
- edimax,rg21s)
+ edimax,rg21s|\
+ engenius,esr600)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
new file mode 100644
index 0000000000..4636a54736
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
@@ -0,0 +1,204 @@
+// 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 = "engenius,esr600", "ralink,mt7620a-soc";
+ model = "EnGenius ESR600";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "esr600:amber:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps2g {
+ label = "esr600:amber:wps2g";
+ gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "esr600:blue:wlan5g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "esr600:blue:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+
+ };
+
+ };
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&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;
+ };
+
+ iNIC_rf: partition@50000 {
+ label = "iNIC_rf";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "firmware";
+ reg = <0x60000 0xf40000>;
+ compatible = "denx,uimage";
+ };
+
+ partition@fa0000 {
+ label = "backup";
+ reg = <0xfa0000 0x10000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "storage";
+ reg = <0xfb0000 0x50000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ethernet {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+ mtd-mac-address = <&iNIC_rf 0x4>;
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii";
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+ mediatek,mdio-mode;
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ qca,ar8327-initvals = <
+ 0x10 0x40000000 /* POWER-ON STRAPPING */
+ 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
+ 0x7c 0x0000007e /* PORT0 STATUS */
+ 0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
+ 0x94 0x0000007e /* PORT6 STATUS */
+ >;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", /* gpio0: 1-2 */
+ "uartf", /* gpio0: 7-14 */
+ "nd_sd", /* gpio2: 45-59 */
+ "wled"; /* gpio3: 72 */
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci1814,5592";
+ reg = <0x0 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&iNIC_rf 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index e8f5db7d0a..320d4abd1f 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -372,6 +372,19 @@ define Device/elecom_wrh-300cr
endef
TARGET_DEVICES += elecom_wrh-300cr
+define Device/engenius_esr600
+ MTK_SOC := mt7620a
+ BLOCKSIZE := 64k
+ IMAGE_SIZE := 15616k
+ IMAGES += factory.dlf
+ IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+ senao-header -r 0x101 -p 0x57 -t 2
+ DEVICE_VENDOR := EnGenius
+ DEVICE_MODEL := ESR600
+ DEVICE_PACKAGES += kmod-rt2800-pci kmod-usb-core kmod-usb-storage kmod-usb-ohci kmod-usb-ehci
+endef
+TARGET_DEVICES += engenius_esr600
+
define Device/fon_fon2601
MTK_SOC := mt7620a
IMAGE_SIZE := 15936k