Re: [OpenWrt-Devel] [PATCH v2] [ramips] mt7621: add support for netis WF-2881‏

2015-11-21 Thread John Crispin
Hi,

the patch does not apply. is this against trunk or CC ?

John

On 14/11/2015 15:32, YounJaeRho wrote:
> netis WF-2881 is an MT7621AT based router with MT7602EN, MT7612EN.
> It has 128MB DDR3, 128MB SLC NAND FLASH, 5-port Gbps switch and 1x USB 3.0.
> The following patch adds support for this device.
> 
> Tested and working:
> * ethernet
> * both WiFi radios
> * USB 3.0
> * buttons (reset button)
> * ethernet switch and USB diag LEDs
> * UART
> * GPIOs
> 
> 
> Signed-off-by: YounJae Rho 
> ---
> Violation of alphabet ordering, indentation, naming, etc from previous 
> version are resolved.
> Thanks Piotr Dymacz.
> 
> 
>  target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
>  .../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/ramips.sh   |   3 +
>  .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
>  target/linux/ramips/dts/WF-2881.dts| 123 
> +
>  target/linux/ramips/image/Makefile |   6 +-
>  target/linux/ramips/mt7621/config-3.18 |   4 +-
>  target/linux/ramips/mt7621/profiles/netis.mk   |  18 +++
>  9 files changed, 157 insertions(+), 3 deletions(-)
>  create mode 100644 target/linux/ramips/dts/WF-2881.dts
>  create mode 100644 target/linux/ramips/mt7621/profiles/netis.mk
> 
> 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 c75a993..f9f8e3e 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -44,7 +44,8 @@ air3gii)
>  all0239-3g|\
>  hw550-3g|\
>  mofi3500-3gn|\
> -sap-g3200u3)
> +sap-g3200u3|\
> +wf-2881)
>   set_usb_led "$board:green:usb"
>   ;;
>  all0256n)
> 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 0732796..d3f8121 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -78,6 +78,7 @@ ramips_setup_interfaces()
>   oy-0001|\
>   pbr-m1|\
>   sap-g3200u3|\
> + wf-2881|\
>   whr-300hp2|\
>   whr-600d|\
>   wsr-1166|\
> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
> b/target/linux/ramips/base-files/etc/diag.sh
> index 5376759..7d16f2c 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -150,6 +150,7 @@ get_status_led() {
>   tew-692gr|\
>   ur-326n4g|\
>   ur-336un|\
> + wf-2881|\
>   wr512-3gn)
>   status_led="$board:green:wps"
>   ;;
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 340bc4c..5ee494e 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -373,6 +373,9 @@ ramips_board_detect() {
>   *"WCR-150GN")
>   name="wcr-150gn"
>   ;;
> + *"WF-2881")
> + name="wf-2881"
> + ;;
>   *"WHR-1166D")
>   name="whr-1166d"
>   ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index d3d9df3..687642f 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() {
>   w150m|\
>   w306r-v20|\
>   w502u|\
> + wf-2881|\
>   whr-1166d|\
>   whr-300hp2|\
>   whr-600d|\
> diff --git a/target/linux/ramips/dts/WF-2881.dts 
> b/target/linux/ramips/dts/WF-2881.dts
> new file mode 100644
> index 000..ba4a29b
> --- /dev/null
> +++ b/target/linux/ramips/dts/WF-2881.dts
> @@ -0,0 +1,123 @@
> +/dts-v1/;
> +
> +/include/ "mt7621.dtsi"
> +
> +/ {
> + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
> + model = "NETIS WF-2881";
> +
> + memory@0 {
> + device_type = "memory";
> + reg = <0x0 0x800>;
> + };
> +
> + palmbus@1E00 {
> + spi@b00 {
> + status="disabled";
> + };
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,57600";
> + };
> +
> + nand@1e003000 {
> + compatible = "mtk,mt7621-nand";
> + bank-width = <2>;
> + reg = <0x1e003000 0x800
> + 0x1e003800 0x800>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0x3>;
> + read-only;
> + };
> +
> + partition@3 {
> + label = 

[OpenWrt-Devel] [PATCH v2] [ramips] mt7621: add support for netis WF-2881‏

2015-11-14 Thread YounJaeRho
netis WF-2881 is an MT7621AT based router with MT7602EN, MT7612EN.
It has 128MB DDR3, 128MB SLC NAND FLASH, 5-port Gbps switch and 1x USB 3.0.
The following patch adds support for this device.

Tested and working:
* ethernet
* both WiFi radios
* USB 3.0
* buttons (reset button)
* ethernet switch and USB diag LEDs
* UART
* GPIOs


Signed-off-by: YounJae Rho 
---
Violation of alphabet ordering, indentation, naming, etc from previous version 
are resolved.
Thanks Piotr Dymacz.


 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
 .../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/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/WF-2881.dts| 123 +
 target/linux/ramips/image/Makefile |   6 +-
 target/linux/ramips/mt7621/config-3.18 |   4 +-
 target/linux/ramips/mt7621/profiles/netis.mk   |  18 +++
 9 files changed, 157 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/ramips/dts/WF-2881.dts
 create mode 100644 target/linux/ramips/mt7621/profiles/netis.mk

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 c75a993..f9f8e3e 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -44,7 +44,8 @@ air3gii)
 all0239-3g|\
 hw550-3g|\
 mofi3500-3gn|\
-sap-g3200u3)
+sap-g3200u3|\
+wf-2881)
set_usb_led "$board:green:usb"
;;
 all0256n)
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 0732796..d3f8121 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -78,6 +78,7 @@ ramips_setup_interfaces()
oy-0001|\
pbr-m1|\
sap-g3200u3|\
+   wf-2881|\
whr-300hp2|\
whr-600d|\
wsr-1166|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 5376759..7d16f2c 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -150,6 +150,7 @@ get_status_led() {
tew-692gr|\
ur-326n4g|\
ur-336un|\
+   wf-2881|\
wr512-3gn)
status_led="$board:green:wps"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 340bc4c..5ee494e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -373,6 +373,9 @@ ramips_board_detect() {
*"WCR-150GN")
name="wcr-150gn"
;;
+   *"WF-2881")
+   name="wf-2881"
+   ;;
*"WHR-1166D")
name="whr-1166d"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index d3d9df3..687642f 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() {
w150m|\
w306r-v20|\
w502u|\
+   wf-2881|\
whr-1166d|\
whr-300hp2|\
whr-600d|\
diff --git a/target/linux/ramips/dts/WF-2881.dts 
b/target/linux/ramips/dts/WF-2881.dts
new file mode 100644
index 000..ba4a29b
--- /dev/null
+++ b/target/linux/ramips/dts/WF-2881.dts
@@ -0,0 +1,123 @@
+/dts-v1/;
+
+/include/ "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+   model = "NETIS WF-2881";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x800>;
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status="disabled";
+   };
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   nand@1e003000 {
+   compatible = "mtk,mt7621-nand";
+   bank-width = <2>;
+   reg = <0x1e003000 0x800
+   0x1e003800 0x800>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1000>;
+   read-only;
+   };
+
+   partition@8 {
+   label = "config";
+   reg = <0x8 0x2>;
+   read-only;
+   };
+
+