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 e47a43eca0..947b0dd8ae 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -313,6 +313,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; + vonets,var11n-300) + ucidef_add_switch "switch0" \ + "0:lan" "4:wan" "6@eth0" + ;; vocore2|\ vocore2lite) ucidef_add_switch "switch0" \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 570fba2901..1d4b0eff3f 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -160,7 +160,8 @@ get_status_led() { jhr-n805r|\ jhr-n926r|\ mlw221|\ - mlwg2) + mlwg2|\ + vonets,var11n-300) status_led="$boardname:blue:system" ;; hc5962) diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 5f2c4a043a..d95dcfe17a 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -150,6 +150,7 @@ platform_check_image() { ur-326n4g|\ ur-336un|\ v22rw-2x2|\ + vonets,var11n-300|\ vocore-8M|\ vocore-16M|\ vocore2|\ diff --git a/target/linux/ramips/dts/VAR11N-300.dts b/target/linux/ramips/dts/VAR11N-300.dts new file mode 100644 index 0000000000..54bcb3df02 --- /dev/null +++ b/target/linux/ramips/dts/VAR11N-300.dts @@ -0,0 +1,90 @@ +/dts-v1/; + +#include "mt7620n.dtsi" + +#include +#include + +/ { + compatible = "vonets,var11n-300", "ralink,mt7620n-soc"; + model = "Vonets VAR11N-300"; + + gpio-leds { + compatible = "gpio-leds"; + + system { + label = "var11n-300:blue:system"; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + 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 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 229ccf845c..902677f3a9 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -424,6 +424,14 @@ define Device/tiny-ac endef TARGET_DEVICES += tiny-ac +define Device/vonets_var11n-300 + DTS := VAR11N-300 + IMAGE_SIZE := $(ralink_default_fw_size_4M) + BLOCKSIZE := 4k + DEVICE_TITLE := Vonets VAR11N-300 +endef +TARGET_DEVICES += vonets_var11n-300 + define Device/whr-1166d DTS := WHR-1166D IMAGE_SIZE := 15040k