summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorVitaly Chekryzhev <13hakta@gmail.com>2016-11-28 23:41:51 +0500
committerJohn Crispin <john@phrozen.org>2016-12-22 15:03:13 +0100
commit190ee7d86b450083fea4236d588d0d88a50e1311 (patch)
treee333f43f6924521ca4bbc9dd83918264a360abf1 /target
parent83eca5d8b7a316cad264e46b53aca591d6f8ea40 (diff)
downloadmtk-20170518-190ee7d86b450083fea4236d588d0d88a50e1311.zip
mtk-20170518-190ee7d86b450083fea4236d588d0d88a50e1311.tar.gz
mtk-20170518-190ee7d86b450083fea4236d588d0d88a50e1311.tar.bz2
ramips: add support for ZyXEL Keenetic Omni / Omni II
Factory image can be installed via Zyxel WebUI. Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds2
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network5
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh2
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh6
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh2
-rw-r--r--target/linux/ramips/dts/kn_rc.dts120
-rw-r--r--target/linux/ramips/dts/kn_rf.dts120
-rw-r--r--target/linux/ramips/image/mt7620.mk20
8 files changed, 277 insertions, 0 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 9972039..4a7b9f6 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -207,6 +207,8 @@ ht-tm02)
ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0"
set_wifi_led "$board:blue:wlan"
;;
+kn_rc|\
+kn_rf|\
kng_rc)
set_usb_led "$board:green:usb"
set_wifi_led "$board:green:wifi"
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 2af5c45..63bf123 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -203,6 +203,11 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
;;
+ kn_rc|\
+ kn_rf)
+ ucidef_add_switch "switch" \
+ "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
+ ;;
kng_rc)
ucidef_add_switch "switch1" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0"
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index abbe147..0b0b8d9 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -24,6 +24,8 @@ get_status_led() {
dir-860l-b1|\
e1700|\
fonera20n|\
+ kn_rc|\
+ kn_rf|\
kng_rc|\
mzk-750dhp|\
mzk-dp150n|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 3793e58..cc6f00f 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -595,6 +595,12 @@ ramips_board_detect() {
*"ZBT-WR8305RT")
name="zbt-wr8305rt"
;;
+ *"ZyXEL Keenetic Omni")
+ name="kn_rc"
+ ;;
+ *"ZyXEL Keenetic Omni II")
+ name="kn_rf"
+ ;;
*"ZyXEL Keenetic Viva")
name="kng_rc"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 3c1fb41..2151cf9 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -71,6 +71,8 @@ platform_check_image() {
jhr-n805r|\
jhr-n825r|\
jhr-n926r|\
+ kn_rc|\
+ kn_rf|\
kng_rc|\
linkits7688|\
linkits7688d|\
diff --git a/target/linux/ramips/dts/kn_rc.dts b/target/linux/ramips/dts/kn_rc.dts
new file mode 100644
index 0000000..c63c1a3
--- /dev/null
+++ b/target/linux/ramips/dts/kn_rc.dts
@@ -0,0 +1,120 @@
+/dts-v1/;
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "ZyXEL Keenetic Omni";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "kn_rc:green:wan";
+ gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "kn_rc:green:usb";
+ gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "kn_rc:green:wifi";
+ gpios = <&gpio0 72 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "kn_rc:green:power";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&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 0x7b0000>;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+ ralink,port-map = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/kn_rf.dts b/target/linux/ramips/dts/kn_rf.dts
new file mode 100644
index 0000000..22b16b0
--- /dev/null
+++ b/target/linux/ramips/dts/kn_rf.dts
@@ -0,0 +1,120 @@
+/dts-v1/;
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "ZyXEL Keenetic Omni II";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "kn_rc:green:wan";
+ gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "kn_rc:green:usb";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "kn_rc:green:wifi";
+ gpios = <&gpio0 72 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "kn_rc:green:power";
+ gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&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 0x7b0000>;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+ ralink,port-map = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 3f81d77..0bd6c9d 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -430,6 +430,26 @@ define Device/dch-m225
endef
TARGET_DEVICES += dch-m225
+define Device/kn_rc
+ DTS := kn_rc
+ DEVICE_TITLE := ZyXEL Keenetic Omni
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
+ IMAGES += factory.bin
+ IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | check-size $$$$(IMAGE_SIZE) | \
+ zyimage -d 4882 -v "ZyXEL Keenetic Omni"
+endef
+TARGET_DEVICES += kn_rc
+
+define Device/kn_rf
+ DTS := kn_rf
+ DEVICE_TITLE := ZyXEL Keenetic Omni II
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
+ IMAGES += factory.bin
+ IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | check-size $$$$(IMAGE_SIZE) | \
+ zyimage -d 2102034 -v "ZyXEL Keenetic Omni II"
+endef
+TARGET_DEVICES += kn_rf
+
define Device/kng_rc
DTS := kng_rc
IMAGE_SIZE := $(ralink_default_fw_size_16M)