From c0e131b4363dde16a1071131b7e762e36099f780 Mon Sep 17 00:00:00 2001 From: Jackson Ming Hu Date: Fri, 15 Dec 2017 11:51:33 +0800 Subject: ramips: add support for newifi d2 Previously Newifi D2 could only use PandoraBox M1's firmware. It works fine, but LED GPIO is different. As a result, a separated DTS file for this device should be implemented. Hardware spec: * CPU: MTK MT7621A * RAM: 512MB * ROM: 32MB SPI Flash * WiFi: MTK MT7603+MT7612 * Button: 2 buttons (reset, wps) * LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) & 2 dual-color LEDs (Power, Internet) * Ethernet: 5 ports, 4 LAN + 1 WAN Installation method: Same as Newifi D1, users may need to request unlock code from the device manufacturer. Otherwise, a SPI flash programmer may be necessary to get the firmware flashed. After the device is unlocked, press and hold reset button before power cable plugs in. Then go to http://192.168.1.1 to upload and flash the firmware package. Signed-off-by: Jackson Ming Hu --- target/linux/ramips/base-files/etc/board.d/01_leds | 6 ++++++ target/linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 + 4 files changed, 9 insertions(+) (limited to 'target/linux/ramips/base-files') 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 671a578f80..a5c51c7c88 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -305,6 +305,12 @@ pbr-m1) ucidef_set_led_default "power" "power" "$boardname:blue:power" "1" ucidef_set_led_default "sys" "sys" "$boardname:blue:sys" "1" ;; +d-team,newifi-d2) + set_usb_led "$boardname:blue:usb" + ucidef_set_led_switch "internet" "internet" "$boardname:amber:internet" "switch0" "0x10" + ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:blue:wlan2g" "wlan0" + ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1" + ;; psg1208) set_wifi_led "$boardname:white:wlan2g" ;; 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 947b0dd8ae..5a64bb727a 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -92,6 +92,7 @@ ramips_setup_interfaces() mt7628|\ mzk-750dhp|\ mzk-w300nh2|\ + d-team,newifi-d2|\ nixcore-x1-8M|\ nixcore-x1-16M|\ oy-0001|\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 1d4b0eff3f..e7b49a5039 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -125,6 +125,7 @@ get_status_led() { d240|\ dap-1350|\ na930|\ + d-team,newifi-d2|\ pbr-m1|\ re350-v1|\ rt-ac51u|\ diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index d95dcfe17a..68b47eeba0 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -107,6 +107,7 @@ platform_check_image() { nbg-419n|\ nbg-419n2|\ newifi-d1|\ + d-team,newifi-d2|\ nixcore-x1-8M|\ nixcore-x1-16M|\ nw718|\ -- cgit v1.2.3