[OpenWrt-Devel] [PATCH 1/1] GL AR150 AR300 Domino patches

2015-11-05 Thread alzhao
From: alzhao 

---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  12 ++
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   8 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   9 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +
 target/linux/ar71xx/config-3.18|   3 +
 .../ar71xx/files/arch/mips/ath79/mach-domino.c | 137 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 111 +
 .../ar71xx/files/arch/mips/ath79/mach-gl_ar150.c   | 122 ++
 target/linux/ar71xx/generic/profiles/domino.mk |  16 +++
 target/linux/ar71xx/generic/profiles/gl-ar300.mk   |  16 +++
 target/linux/ar71xx/generic/profiles/gl_ar150.mk   |  16 +++
 target/linux/ar71xx/image/Makefile |  25 
 .../patches-3.18/911-MIPS-ath79-add-gl_ar150.patch |  39 ++
 .../patches-3.18/912-MIPS-ath79-add-gl_ar300.patch |  39 ++
 .../913-MIPS-ath79-add-domino-support.patch|  39 ++
 15 files changed, 595 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-domino.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl_ar150.c
 create mode 100644 target/linux/ar71xx/generic/profiles/domino.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gl-ar300.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gl_ar150.mk
 create mode 100644 
target/linux/ar71xx/patches-3.18/911-MIPS-ath79-add-gl_ar150.patch
 create mode 100644 
target/linux/ar71xx/patches-3.18/912-MIPS-ath79-add-gl_ar300.patch
 create mode 100644 
target/linux/ar71xx/patches-3.18/913-MIPS-ath79-add-domino-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5241db2..5b8831d 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -181,6 +181,18 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl_ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
+gl_ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
+domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:blue:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 5c38c54..17f6b89 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -376,6 +376,8 @@ alfa-ap96 |\
 alfa-nx |\
 ap83 |\
 gl-inet |\
+gl_ar150 |\
+domino |\
 jwap003 |\
 pb42 |\
 pb44 |\
@@ -386,6 +388,12 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
 wpj344)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 839abc7..94f7214 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -438,6 +438,15 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"GL_ar150 board")
+   name="gl_ar150"
+   ;;
+   *"GL AR300")
+   name="gl-ar300"
+   ;;
+   *"Domino board")
+   name="domino"
+   ;;
*"EAP300 v2")
name="eap300v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ab69e4f..c050e7e 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -211,6 +211,9 @@ platform_check_image() {
dlan-pro-500-wp | \
dlan-pro-1200-ac | \
dragino2 | \
+   gl_ar150 | \
+   gl-ar300 | \
+   domino | \

Re: [OpenWrt-Devel] [PATCH 1/1] GL AR150 AR300 Domino patches

2015-11-06 Thread alzhao
I can make the patch for trunk separately. But I observed that for CC1505,
patches are still updated after release. Can we merge the patches to CC1505
as well. As a lot of people prefer a stable release rather than trunk.

On Fri, Nov 6, 2015 at 4:54 PM, Felix Fietkau  wrote:

> On 2015-11-06 08:01, alz...@gmail.com wrote:
> > From: alzhao 
> >
> > ---
> >  .../ar71xx/base-files/etc/uci-defaults/01_leds |  12 ++
> >  .../ar71xx/base-files/etc/uci-defaults/02_network  |   8 ++
> >  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   9 ++
> >  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +
> >  target/linux/ar71xx/config-3.18|   3 +
> >  .../ar71xx/files/arch/mips/ath79/mach-domino.c | 137
> +
> >  .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 111
> +
> >  .../ar71xx/files/arch/mips/ath79/mach-gl_ar150.c   | 122
> ++
> >  target/linux/ar71xx/generic/profiles/domino.mk |  16 +++
> >  target/linux/ar71xx/generic/profiles/gl-ar300.mk   |  16 +++
> >  target/linux/ar71xx/generic/profiles/gl_ar150.mk   |  16 +++
> >  target/linux/ar71xx/image/Makefile |  25 
> >  .../patches-3.18/911-MIPS-ath79-add-gl_ar150.patch |  39 ++
> >  .../patches-3.18/912-MIPS-ath79-add-gl_ar300.patch |  39 ++
> >  .../913-MIPS-ath79-add-domino-support.patch|  39 ++
> >  15 files changed, 595 insertions(+)
> >  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-domino.c
> >  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
> >  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-gl_ar150.c
> >  create mode 100644 target/linux/ar71xx/generic/profiles/domino.mk
> >  create mode 100644 target/linux/ar71xx/generic/profiles/gl-ar300.mk
> >  create mode 100644 target/linux/ar71xx/generic/profiles/gl_ar150.mk
> >  create mode 100644
> target/linux/ar71xx/patches-3.18/911-MIPS-ath79-add-gl_ar150.patch
> >  create mode 100644
> target/linux/ar71xx/patches-3.18/912-MIPS-ath79-add-gl_ar300.patch
> >  create mode 100644
> target/linux/ar71xx/patches-3.18/913-MIPS-ath79-add-domino-support.patch
> This needs to be rebased to OpenWrt trunk, which uses Linux 4.1.
>
> - Felix
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] Added patch for GL-AR150 support

2015-11-12 Thread alzhao
This is the patches for GL-AR150 router support. Tested on Trunk and it works.
Also grouped profiles of GL products to gli.mk

---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar150.c   | 125 +
 target/linux/ar71xx/generic/profiles/gl-connect.mk |  17 ---
 target/linux/ar71xx/generic/profiles/gli.mk|  27 +
 target/linux/ar71xx/image/Makefile |   8 ++
 .../patches-4.1/911-MIPS-ath79-add-gl_ar150.patch  |  39 +++
 10 files changed, 209 insertions(+), 17 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
 delete mode 100644 target/linux/ar71xx/generic/profiles/gl-connect.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gli.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 39f472a..25f9d13 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -211,6 +211,10 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl-ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2765adb..2ba1fbd 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -396,6 +396,7 @@ dir-505-a1)
 alfa-ap96 |\
 alfa-nx |\
 ap83 |\
+gl-ar150 |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 0e92ee7..9848906 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -478,6 +478,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"GL AR150")
+name="gl-ar150"
+;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index b97c076..8ea11b4 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -219,6 +219,7 @@ platform_check_image() {
esr900 | \
ew-dorin | \
ew-dorin-router | \
+   gl-ar150 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 08e252d..72b47eb 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -75,6 +75,7 @@ CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
+CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
new file mode 100644
index 000..310182c
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
@@ -0,0 +1,125 @@
+/*
+ *  GL_ar150 board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL_AR150_GPIO_LED_WLAN0
+#define GL_AR150_GPIO_LED_LAN 13
+#define GL_AR150_GPIO_LED_WAN 15 
+
+#define GL_AR150_GPIO_BIN_USB 6
+#define GL_AR150_GPI

[OpenWrt-Devel] [PATCH 2/3] added patch for GL-AR300 support

2015-11-12 Thread alzhao
This is the patches for GL-AR300 router support. Tested on Trunk and it works.

---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   6 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 106 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 +++
 target/linux/ar71xx/image/Makefile |   9 ++
 .../patches-4.1/912-MIPS-ath79-add-gl_ar300.patch  |  39 
 9 files changed, 180 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 25f9d13..5da1ef4 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -215,6 +215,10 @@ gl-ar150)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
;;
 
+gl-ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2ba1fbd..628d710 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -408,6 +408,12 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
 wpj344)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9848906..a64d005 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -481,6 +481,9 @@ ar71xx_board_detect() {
*"GL AR150")
 name="gl-ar150"
 ;;
+   *"GL AR300")
+   name="gl-ar300"
+   ;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8ea11b4..f06919f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -220,6 +220,7 @@ platform_check_image() {
ew-dorin | \
ew-dorin-router | \
gl-ar150 | \
+   gl-ar300 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 72b47eb..019d6d6 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -76,6 +76,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
+CONFIG_ATH79_MACH_GL_AR300=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
new file mode 100644
index 000..565267e
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
@@ -0,0 +1,106 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL

[OpenWrt-Devel] [PATCH 3/3] Added patch for GL Domino Pi support

2015-11-12 Thread alzhao
This is the patches for GL Domino Core and Pi boards support. Tested on Trunk 
and it works.

---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-domino.c  | 136 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 ++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../913-MIPS-ath79-add-domino-support.patch|  39 ++
 9 files changed, 204 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5da1ef4..e7bab29 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -219,6 +219,10 @@ gl-ar300)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
;;
 
+gl-domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:blue:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 628d710..c3cfdb7 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -397,6 +397,7 @@ alfa-ap96 |\
 alfa-nx |\
 ap83 |\
 gl-ar150 |\
+gl-domino |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a64d005..1c517cf 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -462,6 +462,9 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"Domino Pi")
+   name="gl-domino"
+   ;;
*"EAP300 v2")
name="eap300v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index f06919f..e329299 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -221,6 +221,7 @@ platform_check_image() {
ew-dorin-router | \
gl-ar150 | \
gl-ar300 | \
+   gl-domino | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 019d6d6..29e0f96 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -65,6 +65,7 @@ CONFIG_ATH79_MACH_DIR_825_B1=y
 CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
 CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
new file mode 100644
index 000..a8a42ad
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
@@ -0,0 +1,136 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define DOMINO_GPIO_LED_WLAN   0
+#define DOMINO_GPIO_LED_WAN17
+#define DOMINO_GPIO_LED_USB1
+#define DOMINO_GPIO_LED_LAN1   13
+#define DOMINO_GPIO_LED_LAN2   14
+#define DOMINO_GPIO_LED_LAN3   15
+#define DOMINO_GPIO_LED_LAN4   16
+#define DOMINO_GPIO_LED_SYS27
+#define DOMINO_GPIO_LED_WPS26
+#define DOMINO_GPIO_USB_

[OpenWrt-Devel] [PATCH 1/3] ar71xx: add GL-AR150 support V2

2015-11-16 Thread alzhao
Added GL-AR150 support to latest trunk. Tested and works good.

Signed-off-by: Alzhao
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar150.c   | 125 +
 target/linux/ar71xx/generic/profiles/gl-connect.mk |  17 ---
 target/linux/ar71xx/generic/profiles/gli.mk|  27 +
 target/linux/ar71xx/image/Makefile |   8 ++
 .../patches-4.1/911-MIPS-ath79-add-gl_ar150.patch  |  39 +++
 10 files changed, 209 insertions(+), 17 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
 delete mode 100644 target/linux/ar71xx/generic/profiles/gl-connect.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gli.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 39f472a..25f9d13 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -211,6 +211,10 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl-ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2765adb..2ba1fbd 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -396,6 +396,7 @@ dir-505-a1)
 alfa-ap96 |\
 alfa-nx |\
 ap83 |\
+gl-ar150 |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 0e92ee7..9848906 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -478,6 +478,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"GL AR150")
+name="gl-ar150"
+;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index b97c076..8ea11b4 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -219,6 +219,7 @@ platform_check_image() {
esr900 | \
ew-dorin | \
ew-dorin-router | \
+   gl-ar150 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 08e252d..72b47eb 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -75,6 +75,7 @@ CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
+CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
new file mode 100644
index 000..310182c
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
@@ -0,0 +1,125 @@
+/*
+ *  GL_ar150 board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL_AR150_GPIO_LED_WLAN0
+#define GL_AR150_GPIO_LED_LAN 13
+#define GL_AR150_GPIO_LED_WAN 15 
+
+#define GL_AR150_GPIO_BIN_USB 6
+#define GL_AR150_GPIO_BTN_MANUAL  7
+#define GL_AR150_G

[OpenWrt-Devel] [PATCH 3/3] ar71xx: add GL-Domino Pi support V2

2015-11-16 Thread alzhao
Added support for GL Domino Pi board. Tested in lastest trunk and works well.

Signed-off-by: Alzhao
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-domino.c  | 136 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 ++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../913-MIPS-ath79-add-domino-support.patch|  39 ++
 9 files changed, 204 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5da1ef4..e7bab29 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -219,6 +219,10 @@ gl-ar300)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
;;
 
+gl-domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:blue:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 628d710..c3cfdb7 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -397,6 +397,7 @@ alfa-ap96 |\
 alfa-nx |\
 ap83 |\
 gl-ar150 |\
+gl-domino |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a64d005..1c517cf 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -462,6 +462,9 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"Domino Pi")
+   name="gl-domino"
+   ;;
*"EAP300 v2")
name="eap300v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index f06919f..e329299 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -221,6 +221,7 @@ platform_check_image() {
ew-dorin-router | \
gl-ar150 | \
gl-ar300 | \
+   gl-domino | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 019d6d6..29e0f96 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -65,6 +65,7 @@ CONFIG_ATH79_MACH_DIR_825_B1=y
 CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
 CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
new file mode 100644
index 000..a8a42ad
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
@@ -0,0 +1,136 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define DOMINO_GPIO_LED_WLAN   0
+#define DOMINO_GPIO_LED_WAN17
+#define DOMINO_GPIO_LED_USB1
+#define DOMINO_GPIO_LED_LAN1   13
+#define DOMINO_GPIO_LED_LAN2   14
+#define DOMINO_GPIO_LED_LAN3   15
+#define DOMINO_GPIO_LED_LAN4   16
+#define DOMINO_GPIO_LED_SYS27
+#define DOMINO_GPIO_LED_WPS26
+#define DOMINO_

[OpenWrt-Devel] [PATCH 2/3] ar71xx: add GL-AR300 support V2

2015-11-16 Thread alzhao
Add support for GL-AR300 for latest trunk. Tested and works well.

Signed-off-by: Alzhao
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   6 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 106 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 +++
 target/linux/ar71xx/image/Makefile |   9 ++
 .../patches-4.1/912-MIPS-ath79-add-gl_ar300.patch  |  39 
 9 files changed, 180 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 25f9d13..5da1ef4 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -215,6 +215,10 @@ gl-ar150)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
;;
 
+gl-ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2ba1fbd..628d710 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -408,6 +408,12 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
 wpj344)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9848906..a64d005 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -481,6 +481,9 @@ ar71xx_board_detect() {
*"GL AR150")
 name="gl-ar150"
 ;;
+   *"GL AR300")
+   name="gl-ar300"
+   ;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8ea11b4..f06919f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -220,6 +220,7 @@ platform_check_image() {
ew-dorin | \
ew-dorin-router | \
gl-ar150 | \
+   gl-ar300 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 72b47eb..019d6d6 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -76,6 +76,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
+CONFIG_ATH79_MACH_GL_AR300=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
new file mode 100644
index 000..565267e
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
@@ -0,0 +1,106 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL

Re: [OpenWrt-Devel] [PATCH 1/3] Added patch for GL-AR150 support

2015-11-16 Thread alzhao
Thanks and re-submitted V2

On Mon, Nov 16, 2015 at 4:36 AM, Rafał Miłecki  wrote:

> On 13 November 2015 at 08:14, alzhao  wrote:
> > This is the patches for GL-AR150 router support. Tested on Trunk and it
> works.
> > Also grouped profiles of GL products to gli.mk
>
> Please use target-specific prefix for the commit message. In this case
> it should be:
> ar71xx: foo bar
>
> Make sure you sign off your changes.
>
> I think you could replace "Added patch for GL-AR150 support" with
> something simpler like a "add GL-AR150 support" support, since your
> commit also adds support in other places. It's not only about adding a
> kernel patch.
>
> Please fix above and resend V2.
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ar71xx: add GL-AR150 support V3

2015-11-22 Thread alzhao
This is the 3rd version. Modified against the latest trunk.

Signed-off-by: alzhao
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar150.c   | 125 +
 target/linux/ar71xx/generic/profiles/gl-connect.mk |  17 ---
 target/linux/ar71xx/generic/profiles/gli.mk|  27 +
 target/linux/ar71xx/image/Makefile |   8 ++
 .../patches-4.1/911-MIPS-ath79-add-gl_ar150.patch  |  39 +++
 10 files changed, 209 insertions(+), 17 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
 delete mode 100644 target/linux/ar71xx/generic/profiles/gl-connect.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gli.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index e5683c0..16a8758 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -217,6 +217,10 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl-ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 6045871..de86ba5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -396,6 +396,7 @@ dir-505-a1)
 alfa-ap96 |\
 alfa-nx |\
 ap83 |\
+gl-ar150 |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5b3e76f..75a75a4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -482,6 +482,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"GL AR150")
+   name="gl-ar150"
+   ;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 5b15405..d90f724 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -220,6 +220,7 @@ platform_check_image() {
esr900 | \
ew-dorin | \
ew-dorin-router | \
+   gl-ar150 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 1d790b6..51aadb7 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -76,6 +76,7 @@ CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
+CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
new file mode 100644
index 000..310182c
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
@@ -0,0 +1,125 @@
+/*
+ *  GL_ar150 board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL_AR150_GPIO_LED_WLAN0
+#define GL_AR150_GPIO_LED_LAN 13
+#define GL_AR150_GPIO_LED_WAN 15 
+
+#define GL_AR150_GPIO_BIN_USB 6
+#define GL_AR150_GPIO_BTN_MANUAL  7
+#define GL_AR150_GPIO_BTN_A

[OpenWrt-Devel] [PATCH 3/3] ar71xx: add GL-Domino Pi support V3

2015-11-22 Thread alzhao
This is the patch for GL-Domino Pi V3. Updated against the latest trunk.

Signed-off-by: alzhao
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-domino.c  | 136 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 ++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../913-MIPS-ath79-add-domino-support.patch|  39 ++
 9 files changed, 204 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index da3e561..244700f 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -225,6 +225,10 @@ gl-ar300)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
;;
 
+gl-domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:blue:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index a5a40a1..68e0caa 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -397,6 +397,7 @@ alfa-ap96 |\
 alfa-nx |\
 ap83 |\
 gl-ar150 |\
+gl-domino |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8eb9266..df77040 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -466,6 +466,9 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"Domino Pi")
+   name="gl-domino"
+   ;;
*"EAP300 v2")
name="eap300v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index e68a05b..41886e3 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -222,6 +222,7 @@ platform_check_image() {
ew-dorin-router | \
gl-ar150 | \
gl-ar300 | \
+   gl-domino | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index b217a43..eff197a 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -66,6 +66,7 @@ CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_DLAN_HOTSPOT=y
 CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
 CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
new file mode 100644
index 000..a8a42ad
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
@@ -0,0 +1,136 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define DOMINO_GPIO_LED_WLAN   0
+#define DOMINO_GPIO_LED_WAN17
+#define DOMINO_GPIO_LED_USB1
+#define DOMINO_GPIO_LED_LAN1   13
+#define DOMINO_GPIO_LED_LAN2   14
+#define DOMINO_GPIO_LED_LAN3   15
+#define DOMINO_GPIO_LED_LAN4   16
+#define DOMINO_GPIO_LED_SYS27
+#define DOMINO_GPIO_LED_WPS26
+#define DOMINO_GPIO_USB_POWER  6
+
+#define DOMINO_GPI

[OpenWrt-Devel] [PATCH 2/3] ar71xx: add GL-AR300 support V3

2015-11-22 Thread alzhao
This is the patch for GL-AR300 V3, tested against the latest trunk.

Signed-off-by: alzhao
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 103 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 +++
 target/linux/ar71xx/image/Makefile |   9 ++
 .../patches-4.1/912-MIPS-ath79-add-gl_ar300.patch  |  39 
 9 files changed, 177 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
 create mode 100644 
target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 16a8758..da3e561 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -221,6 +221,10 @@ gl-ar150)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
;;
 
+gl-ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index de86ba5..a5a40a1 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -408,6 +408,12 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
 wpj344)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 75a75a4..8eb9266 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -485,6 +485,9 @@ ar71xx_board_detect() {
*"GL AR150")
name="gl-ar150"
;;
+   *"GL AR300")
+   name="gl-ar300"
+   ;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d90f724..e68a05b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -221,6 +221,7 @@ platform_check_image() {
ew-dorin | \
ew-dorin-router | \
gl-ar150 | \
+   gl-ar300 | \
hiwifi-hc6361 | \
hornet-ub-x2 | \
mzk-w04nu | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 51aadb7..b217a43 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -77,6 +77,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
+CONFIG_ATH79_MACH_GL_AR300=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
new file mode 100644
index 000..47db6de
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
@@ -0,0 +1,103 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL_AR300_GPIO_LED_WLA

Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-11 Thread alzhao
Great job!

May I know if the compile target for GL-AR150, GL-AR300, GL-Domino has been
backported to 15.05.1? They were submitted to trunk after CC1505. Hope they
have been back ported.


On Mon, Jan 11, 2016 at 8:12 PM, John Crispin  wrote:

>
>
> On 11/01/2016 12:56, Hannu Nyman wrote:
> > On 11.1.2016 13:40, John Crispin wrote:
> >> 15.05.1 is almost ready built. i had to do a refresh build to get
> >> felix's fixes from last night included. base builds finished last night
> >> and i started the SDK builder this morning which normally takes 2-3
> >> days. with a bit of luck 15.05.1 is ready early next week.
> >>
> >> I hope that we can do a DD in early spring, there are already plans for
> >> this but nothing definite yet. i have march as a rough date in mind to
> >> start working on it but take that with a large grain of salt please. we
> >> had already decided to do a release based on v4.4 a while back as it
> >> will be a LTS kernel.
> >>
> >> John
> >
> > Sounds great!
> >
> > (I guess that this 15.05.1 build effort also explains why the trunk
> > snapshots at the buildbot farm seem to be paused.)
>
> nope, different server. no idea whats up with the build farm.
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-11 Thread alzhao
Thanks. These patches are not back ported. Can this be done? If not
possible, that is OK. But if this can be back ported to CC15.05.1, that
would be very helpful.

including these patches.

ar71xx: add GL-AR150 support V3
ar71xx: add GL-AR300 support V3
ar71xx: add GL-Domino Pi support V3


On Tue, Jan 12, 2016 at 1:38 PM, Rafał Miłecki  wrote:

> On 12 January 2016 at 03:00, alzhao  wrote:
> > May I know if the compile target for GL-AR150, GL-AR300, GL-Domino has
> been
> > backported to 15.05.1? They were submitted to trunk after CC1505. Hope
> they
> > have been back ported.
>
> OpenWrt is open source with public repo:
> https://git.openwrt.org/?p=15.05/openwrt.git;a=summary
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-19 Thread alzhao
Hi John,

I have experience in fixing a number of these packages, but not all. I hope
I can try to submit the patches. As these are packages from github, should
I submit directly to github?

Also, may I ask if you can backport these patches to CC1505.1, including
target patch for AR71xx: GL-AR150, GL-AR300, GL-Domino.

Best,
Alfie

On Tue, Jan 19, 2016 at 4:57 PM, John Crispin  wrote:

>
>
> On 11/01/2016 12:40, John Crispin wrote:
> >
> >
> > On 11/01/2016 12:28, Hannu Nyman wrote:
> >> Are there any plans for a CC 15.05.1 maintenance release? Or will DD
> >> 16.xx be the next one?
> >>
> >> There have been so many fixes to 15.05 that personally I would like to
> >> see a maintenance release 15.05.1. There have been both security fixes,
> >> but also new/improved features that should be adopted more widely as
> >> early as possible. One good example is r46848 (the backport of r46491),
> >> that will ease any subsequent upgrade thanks to improved opkg behaviour
> >> after sysupgrade with settings preserved.
> >>
> >> There have been some questions about 15.05.1 at the forum every now and
> >> then, so it would be great if devs would publish some roadmap about the
> >> plans.
> >
> > 15.05.1 is almost ready built. i had to do a refresh build to get
> > felix's fixes from last night included. base builds finished last night
> > and i started the SDK builder this morning which normally takes 2-3
> > days. with a bit of luck 15.05.1 is ready early next week.
> >
> > I hope that we can do a DD in early spring, there are already plans for
> > this but nothing definite yet. i have march as a rough date in mind to
> > start working on it but take that with a large grain of salt please. we
> > had already decided to do a release based on v4.4 a while back as it
> > will be a LTS kernel.
> >
> >   John
> >
>
> there will be a delay. as usual 90% of tapi packages do not build aswell
> as the other usual suspects. i wont have time to fix these till early
> next week which will delay the 15.05.1 release by a few days. if anyone
> wants to dig into these before next week then feel free.
>
> John
>
> ERROR: package/feeds/telephony/dahdi-linux failed to build.
>ERROR: package/feeds/packages/krb5 failed to build.
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/redsocks failed to build.
>ERROR: package/feeds/packages/sstp-client failed to build.
>ERROR: package/feeds/packages/tmux failed to build.
>ERROR: package/feeds/packages/umurmur failed to build (build variant:
> polarssl).
>ERROR: package/feeds/packages/tor failed to build.
>ERROR: package/feeds/routing/cjdns failed to build.
>ERROR: package/feeds/telephony/dahdi-tools failed to build.
>ERROR: package/feeds/packages/node failed to build.
>ERROR: package/feeds/packages/node-serialport failed to build.
>ERROR: package/feeds/telephony/libpri failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x failed to build.
>ERROR: package/feeds/telephony/asterisk-13.x failed to build.
>ERROR: package/feeds/telephony/kamailio-4.x failed to build.
>ERROR: package/feeds/telephony/asterisk-1.8.x failed to build.
>ERROR: package/feeds/telephony/yate failed to build.
>ERROR: package/feeds/packages/forked-daapd failed to build.
>ERROR: package/feeds/packages/libmraa failed to build.
>ERROR: package/feeds/packages/libupm failed to build.
>ERROR: package/feeds/telephony/freeswitch failed to build.
>ERROR: package/feeds/packages/seafile-ccnet failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x-chan-dongle failed to
> build.
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk13).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk18).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk13).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk18).
>ERROR: package/feeds/packages/seafile-server failed to build.
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Openwrt AR9344 Factory reset issue

2016-02-18 Thread alzhao
What is the info from uart if you re-power up the device?
On Wed, 17 Feb 2016 at 21:38, John kerry  wrote:

> I have written the mac_address, wifi mac address and Serial number in mtd5
> (ART) successfully as below location :
> Mac Address : offset 0x0
> Wi-Fi Mac Address: offset 4098
> Seral number : offset 4104
>
> and its working fine. Able to read and write.
>
> but after that when i do the factory reset using below command it's not
> happening, it's hanged and showing below messages:
> mtd -r erase rootfs_data
>
> Unlocking rootfs_data ...
> Erasing rootfs_data ...
>
> Rebooting ... [ 723.21] Removing MTD device #3 (rootfs_data) with use
> count 1
> [ 723.24] Restarting system.
>
> Below is the partition
> Creating 6 MTD partitions on "spi0.0":
> 0x-0x0004 : "u-boot"
> 0x0004-0x0005 : "u-boot-env"
> 0x0005-0x0068 : "rootfs"
> mtd: partition "rootfs" set to be root filesystem
> mtd: partition "rootfs_data" created automatically, ofs=5B, len=D
> 0x005b-0x0068 : "rootfs_data"
> 0x0068-0x007f : "kernel"
> 0x007f-0x0080 : "art"
> 0x0005-0x007e : "firmware"
>
> cat /proc/mtd
> dev:size   erasesize  name
> mtd0: 0004 0001 "u-boot"
> mtd1: 0001 0001 "u-boot-env"
> mtd2: 0063 0001 "rootfs"
> mtd3: 000d 0001 "rootfs_data"
> mtd4: 0017 0001 "kernel"
> mtd5: 0001 0001 "art"
> mtd6: 0079 0001 "firmware"
>
> Could anyone help me to solve this issue.
> Regards,
> John
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Where init scripts are linked to rc.d?

2016-02-26 Thread alzhao
Use /etc/init.d/yourscript enable

It should be enabled by default, as I know.
On Sat, 27 Feb 2016 at 03:33, Jakub Jančo  wrote:

> Hello,
>
> Im adding some custom init script in ImageBuilder throught FILES, but
> these are not linked to /etc/rc.d on first boot.
>
> Where to hook them?
>
> If I make package, will it be linked automatically?
>
> Thanks.
>
> --
> S pozdravom Jakub Janco
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] USB Hotplug

2016-03-04 Thread alzhao
Did you develop the board by yourself? Generally this is a hardware
problem, like wrong resistors. After the system boot the USB cannot supply
enough power to the drive.


On Fri, 4 Mar 2016 at 21:57, Baptiste Clenet  wrote:

> Hi,
>
> I run OpenWRT on a mt7688 board, if I plug a pendrive before the boot,
> it is detected and I can store data on it. However, after the board
> has finished booting, if I plug the pendrive, I can't detect it, the
> LED on the pendrive switch on and off after a 1/2 sec.
> Should I include something else to make hotplug work?
> root@OpenWrt:/# lsmod | grep usb
> btintel 1209  1 btusb
> btusb  26816  0
> ledtrig_usbdev  1936  0
> nls_base5008  1 usbcore
> scsi_mod   90601  2 usb_storage
> usb_common  1740  1 usbcore
> usb_storage37407  0
> usbcore   117268  7 btusb
>
>
> --
> Baptiste
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] USB Hotplug

2016-03-04 Thread alzhao
Hi john,
can you specify which patch? I want to check.
On Fri, 4 Mar 2016 at 23:34, John Crispin  wrote:

>
>
> On 04/03/2016 15:07, alzhao wrote:
> > Did you develop the board by yourself? Generally this is a hardware
> > problem, like wrong resistors. After the system boot the USB cannot
> > supply enough power to the drive.
> >
> >
> > On Fri, 4 Mar 2016 at 21:57, Baptiste Clenet  > <mailto:bapcle...@gmail.com>> wrote:
> >
> > Hi,
> >
> > I run OpenWRT on a mt7688 board, if I plug a pendrive before the
> boot,
> > it is detected and I can store data on it. However, after the board
> > has finished booting, if I plug the pendrive, I can't detect it, the
> > LED on the pendrive switch on and off after a 1/2 sec.
> > Should I include something else to make hotplug work?
> > root@OpenWrt:/# lsmod | grep usb
> > btintel 1209  1 btusb
> > btusb  26816  0
> > ledtrig_usbdev  1936  0
> > nls_base5008  1 usbcore
> > scsi_mod   90601  2 usb_storage
> > usb_common  1740  1 usbcore
> > usb_storage37407  0
> > usbcore   117268  7 btusb
> >
> >
> > --
> > Baptiste
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org  openwrt-devel@lists.openwrt.org>
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
>
> what revision of openwrt do you use ? i recently pushed a patch that
> fixes a phy reset problem causing usb2.0 devices to not work properly
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ramips: Add support for GL-MT300A

2016-03-09 Thread alzhao
This patches adds support for GL-MT300A.
GL-MT300A is powered by MT7620A. It has 16MB flash, 128MB RAM,
Two LANs, USB, UART and MMC daughter board.
---
 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/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT300A.dts  | 164 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |  16 ++
 7 files changed, 190 insertions(+)
 create mode 100644 target/linux/ramips/dts/GL-MT300A.dts
 create mode 100644 target/linux/ramips/mt7620/profiles/gli.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 8fd50fe..536a363 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -137,6 +137,9 @@ fonera20n)
set_usb_led "$board:orange:usb"
set_wifi_led "$board:orange:wifi"
;;
+gl-mt300a)
+   set_wifi_led "$board:wlan"
+   ;;
 hc5661)
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" 
"eth0.2"
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 ac5a312..74599ad 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -113,6 +113,7 @@ ramips_setup_interfaces()
dir-860l-b1|\
f5d8235-v1|\
f5d8235-v2|\
+   gl-mt300a|\
hg255d|\
mzk-wdpr|\
jhr-n805r|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 3fdb562..ba27c14 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -175,6 +175,9 @@ ramips_board_detect() {
*"FreeStation5")
name="freestation5"
;;
+   *"GL-MT300A")
+   name="gl-mt300a"
+   ;;
*"HC5661")
name="hc5661"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index e01f9ce..876416e 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_check_image() {
firewrt|\
fonera20n|\
freestation5|\
+   gl-mt300a|\
hc5*61|\
hg255d|\
hlk-rm04|\
diff --git a/target/linux/ramips/dts/GL-MT300A.dts 
b/target/linux/ramips/dts/GL-MT300A.dts
new file mode 100644
index 000..c1eb0a9
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT300A.dts
@@ -0,0 +1,164 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "GL-MT300A", "ralink,mt7620a-soc";
+   model = "GL-MT300A";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xf8>;
+ 

[OpenWrt-Devel] [PATCH 2/3] ramips: Add support for GL-MT300N

2016-03-09 Thread alzhao
This patch adds support for GL-MT300N.
GL-MT300N is powered by MT7620N with 16MB flash, 64MB RAM,
2 LANs, USB, UART, GPIO and PoE support.
---
 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/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT300N.dts  | 153 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |  11 ++
 7 files changed, 173 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/GL-MT300N.dts

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 536a363..132c7ce 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -137,7 +137,8 @@ fonera20n)
set_usb_led "$board:orange:usb"
set_wifi_led "$board:orange:wifi"
;;
-gl-mt300a)
+gl-mt300a|\
+gl-mt300n)
set_wifi_led "$board:wlan"
;;
 hc5661)
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 74599ad..40c24a9 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -114,6 +114,7 @@ ramips_setup_interfaces()
f5d8235-v1|\
f5d8235-v2|\
gl-mt300a|\
+   gl-mt300n|\
hg255d|\
mzk-wdpr|\
jhr-n805r|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index ba27c14..fcc4b9f 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -178,6 +178,9 @@ ramips_board_detect() {
*"GL-MT300A")
name="gl-mt300a"
;;
+   *"GL-MT300N")
+   name="gl-mt300n"
+   ;;
*"HC5661")
name="hc5661"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 876416e..8727831 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -57,6 +57,7 @@ platform_check_image() {
fonera20n|\
freestation5|\
gl-mt300a|\
+   gl-mt300n|\
hc5*61|\
hg255d|\
hlk-rm04|\
diff --git a/target/linux/ramips/dts/GL-MT300N.dts 
b/target/linux/ramips/dts/GL-MT300N.dts
new file mode 100644
index 000..82db37e
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT300N.dts
@@ -0,0 +1,153 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+   compatible = "GL-MT300N", "ralink,mt7620n-soc";
+   model = "GL-MT300N";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xf8>;
+   };
+
+   partition@ff {
+   label = "art";
+   reg = <0xff 0x1

[OpenWrt-Devel] [PATCH 3/3] ramips: Add support for GL-MT750

2016-03-09 Thread alzhao
This patch adds support for GL-MT750.
GL-MT750 is powered by MT7620A and MT7610e, dual band 802.11ac, 2.4G 300Mbps 
and 5G 450Mbps.
It has 5 LANs, MMC interface, USB, a lot of IOs and PoE support.
---
 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/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT750.dts   | 159 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |   9 ++
 7 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/GL-MT750.dts

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 132c7ce..6c25c86 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -138,7 +138,8 @@ fonera20n)
set_wifi_led "$board:orange:wifi"
;;
 gl-mt300a|\
-gl-mt300n)
+gl-mt300n|\
+gl-mt750)
set_wifi_led "$board:wlan"
;;
 hc5661)
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 40c24a9..dc9b5b2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -115,6 +115,7 @@ ramips_setup_interfaces()
f5d8235-v2|\
gl-mt300a|\
gl-mt300n|\
+   gl-mt750|\
hg255d|\
mzk-wdpr|\
jhr-n805r|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index fcc4b9f..815765a 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -181,6 +181,9 @@ ramips_board_detect() {
*"GL-MT300N")
name="gl-mt300n"
;;
+   *"GL-MT750")
+   name="gl-mt750"
+   ;;
*"HC5661")
name="hc5661"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8727831..b1d2347 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -58,6 +58,7 @@ platform_check_image() {
freestation5|\
gl-mt300a|\
gl-mt300n|\
+   gl-mt750|\
hc5*61|\
hg255d|\
hlk-rm04|\
diff --git a/target/linux/ramips/dts/GL-MT750.dts 
b/target/linux/ramips/dts/GL-MT750.dts
new file mode 100644
index 000..a36ae5e
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT750.dts
@@ -0,0 +1,159 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "GL-MT750", "ralink,mt7620a-soc";
+   model = "GL-MT750";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xf8>;
+   };
+
+   partition@ff {
+   label = "art";
+   

Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-05-03 Thread alzhao
Hi David,

Can you share you current patch? I am working on the same chips,
QCA9531+9887 and hope to get some progress. I'm glad to know that scan is
working.

--Alfie

On 26 April 2016 at 06:14, David Hutchison  wrote:

> Scanning appears to work ( iw dev wlan1 scan ) ,
>
> As soon as I try to use hostapd to run as an AP I get:
>
> [20475.14] ath10k_pci :00:00.0: firmware crashed! (uuid
> b826d45e-e51f-4beb-a489-6b7a4d5c6f76)
> [20475.15] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
> 0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
> wmi-op 5 htt-op 2 cal file max-sta 1p
> [20475.17] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
> dfs 0 testmode 1
> [20475.18] ath10k_pci :00:00.0: firmware register dump:
> [20475.18] ath10k_pci :00:00.0: [00]: 0x4100016D 0x
> 0x004146C8 0x004146C8
> [20475.19] ath10k_pci :00:00.0: [04]: 0x004146C8 0x00060530
> 0x001F 0x00955A00
> [20475.20] ath10k_pci :00:00.0: [08]: 0x0040AE04 0x0040
> 0x0007 0x
> [20475.21] ath10k_pci :00:00.0: [12]: 0x0002 0x
> 0x00958360 0x0095836B
> [20475.21] ath10k_pci :00:00.0: [16]: 0x809ACDE0 0x0040AD94
> 0x0040AE04 0x0040
> [20475.22] ath10k_pci :00:00.0: [20]: 0x 0x
> 0x 0x0040E830
> [20475.23] ath10k_pci :00:00.0: [24]: 0x809AC4E2 0x0040ADC4
> 0x0001 0x0040AE04
> [20475.24] ath10k_pci :00:00.0: [28]: 0x004133E0 0x0001
> 0x0040AE08 0x
> [20475.25] ath10k_pci :00:00.0: [32]: 0x0007 0x
> 0x 0x004133C8
> [20475.26] ath10k_pci :00:00.0: [36]: 0x809B9C49 0x0040ADE4
> 0x00411568 0x0041158C
> [20475.26] ath10k_pci :00:00.0: [40]: 0x0001 0x
> 0x00955A00 0x0040E840
> [20475.27] ath10k_pci :00:00.0: [44]: 0x809B944C 0x0040AE04
> 0x0001 0x
> [20475.28] ath10k_pci :00:00.0: [48]: 0x0040AE04 0x0001
> 0x004133C8 0x004117AC
> [20475.29] ath10k_pci :00:00.0: [52]: 0x809B9263 0x0040AEA4
> 0x0041ECF8 0x00411BC8
> [20475.30] ath10k_pci :00:00.0: [56]: 0x004133C8 0x0040AE34
> 0x00411F08 0x00411F08
> [20475.41] ieee80211 phy1: Hardware restart was requested
>
> -- Davey
>
> On Mon, Apr 25, 2016 at 1:01 PM, Christian Lamparter
>  wrote:
> > Hello,
> >
> > On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote:
> >> So with some modifications to pci.c, hw.h and core.c I was able to get
> >> the radio initialized! :)
> >
> > Hey, that's nice! Can you make and post a patch for that?
> > I'm sure if it's just a matter of adding the new pci and chip
> > ids to the tables. You could just go ahead and post it, so it
> > will be picked up.
> >
> >> pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and
> >> ath10k_pci_supp_chips
> >> core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed
> >> 0x4100016d as the ID ( left everything else the same )
> >> hw.h: added definitions for QCA9887
> >>
> >> I found "
> https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1
> "
> >> on your github and replaced
> >> /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board.
> >> hotplug.d then loaded QCA9887 firmware on next boot.
> >>
> >> Of course my approach was very much a hack. If there is anything I can
> >> contribute to creating a patch for ath10k, please let me know. I would
> >> love to help!
> >>
> >> dmesg
> >> [   18.92] ath10k_pci :00:00.0: pci irq legacy interrupts 0
> >> irq_mode 0 reset_mode 0
> >> [   19.03] rev_id  QCA9887
> >> [   19.03] dev_id 0050 QCA9887
> >> [   20.46] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
> >> 0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
> >> wmi-op 5 htt-op 2 cal file max-sta 1p
> >> [   20.48] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
> >> dfs 0 testmode 1
> >>
> > ...
> >
> > Does the device work? Can you scan for networks, connect to networks
> > and create networks? That would be good to know.
> >
> > Regards,
> > Christian
> >
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/6] [CC] [backport] ar71xx: add GL-AR300 support

2016-05-04 Thread alzhao
Backport of changeset 47621
Add support for GL-AR300

Signed-off-by: alzhao 
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   6 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar300.c   | 106 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../patches-3.18/912-MIPS-ath79-add-gl_ar300.patch |  39 
 9 files changed, 179 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/912-MIPS-ath79-add-gl_ar300.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 0bd0b35..7c00947 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -185,6 +185,10 @@ gl-ar150)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
;;
 
+gl-ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c7ba875..3cd97ec 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -391,6 +391,12 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
 wpj344)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 813ff91..bc5dc17 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -442,6 +442,9 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"GL-AR300")
+   name="gl-ar300"
+   ;;
*"EAP300 v2")
name="eap300v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 59ee053..0800642 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -212,6 +212,7 @@ platform_check_image() {
dlan-pro-1200-ac | \
dragino2 | \
gl-ar150 | \
+   gl-ar300 | \
epg5000 | \
esr1750 | \
esr900 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 3598a55..4365232 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -70,6 +70,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
+CONFIG_ATH79_MACH_GL_AR300=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
new file mode 100644
index 000..62fafad
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
@@ -0,0 +1,106 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL

[OpenWrt-Devel] [PATCH 3/6] [CC] [backport] ar71xx: add GL-Domino Pi support

2016-05-04 Thread alzhao
Backport of changeset 47622
Add GL-Domino Pi dev board support

Signed-off-by: alzhao 
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-domino.c  | 136 +
 target/linux/ar71xx/generic/profiles/gli.mk|  11 ++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../913-MIPS-ath79-add-domino-support.patch|  39 ++
 9 files changed, 204 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/913-MIPS-ath79-add-domino-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 7c00947..8f7a6f9 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -189,6 +189,10 @@ gl-ar300)
ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
;;
 
+gl-domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:blue:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 3cd97ec..781172c 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -380,6 +380,7 @@ alfa-ap96 |\
 alfa-nx |\
 ap83 |\
 gl-ar150 |\
+gl-domino |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index bc5dc17..5349009 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -442,6 +442,9 @@ ar71xx_board_detect() {
*"Dragino v2")
name="dragino2"
;;
+   *"Domino Pi")
+   name="gl-domino"
+   ;;
*"GL-AR300")
name="gl-ar300"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0800642..699c27e 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -213,6 +213,7 @@ platform_check_image() {
dragino2 | \
gl-ar150 | \
gl-ar300 | \
+   gl-domino | \
epg5000 | \
esr1750 | \
esr900 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 4365232..3f713df 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -71,6 +71,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_AR300=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
new file mode 100644
index 000..a8a42ad
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-domino.c
@@ -0,0 +1,136 @@
+/*
+ *  Domino board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define DOMINO_GPIO_LED_WLAN   0
+#define DOMINO_GPIO_LED_WAN17
+#define DOMINO_GPIO_LED_USB1
+#define DOMINO_GPIO_LED_LAN1   13
+#define DOMINO_GPIO_LED_LAN2   14
+#define DOMINO_GPIO_LED_LAN3   15
+#define DOMINO_GPIO_LED_LAN4   16
+#define DOMINO_GPIO_LED_SYS27
+#define DOMINO_GPIO_LED_WPS26
+#define DOMINO_GPIO_USB_POWER  6
+
+#define DOMINO_GPI

[OpenWrt-Devel] [PATCH 4/6] [CC] [backport] ramips: Add GL-MT300A support

2016-05-04 Thread alzhao
Backport of changeset 48992
Add GL-MT300A support

Signed-off-by: alzhao 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
 .../linux/ramips/base-files/etc/board.d/02_network |   7 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT300A.dts  | 164 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |  16 ++
 7 files changed, 196 insertions(+)
 create mode 100644 target/linux/ramips/dts/GL-MT300A.dts
 create mode 100644 target/linux/ramips/mt7620/profiles/gli.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 5327d00..a3661e8 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -147,6 +147,9 @@ case $board in
mofi3500-3gn)
set_usb_led "mofi3500-3gn:green:usb"
;;
+gl-mt300a)
+   set_wifi_led "gl-mt300a:wlan"
+   ;;
mpr-a1)
set_wifi_led "hame:blue:system"
;;
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 a78912d..b5c2b81 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -153,6 +153,13 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
ucidef_add_switch_vlan "switch0" "2" "4 6t"
;;
+   
+   gl-mt300a)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "2" "0 6t"
+   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+   ;;
 
whr-1166d)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 8dc05b0..40c26e6 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -169,6 +169,9 @@ ramips_board_detect() {
*"F5D8235 v2")
name="f5d8235-v2"
;;
+   *"GL-MT300A")
+   name="gl-mt300a"
+   ;;
*"Hauppauge Broadway")
name="broadway"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index a3d0175..cfd44d7 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -55,6 +55,7 @@ platform_check_image() {
fonera20n | \
freestation5 | \
firewrt |\
+   gl-mt300a |\
pbr-m1 |\
hg255d | \
hlk-rm04 | \
diff --git a/target/linux/ramips/dts/GL-MT300A.dts 
b/target/linux/ramips/dts/GL-MT300A.dts
new file mode 100644
index 000..c1eb0a9
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT300A.dts
@@ -0,0 +1,164 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "GL-MT300A", "ralink,mt7620a-soc";
+   model = "GL-MT300A";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   

[OpenWrt-Devel] [PATCH 5/6] [CC] [backport] ramips: add GL-MT300N support

2016-05-04 Thread alzhao
Backport changeset 48993
Add GL-MT300N support to CC

Signed-off-by: alzhao 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
 .../linux/ramips/base-files/etc/board.d/02_network |   7 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT300N.dts  | 153 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |  10 ++
 7 files changed, 179 insertions(+)
 create mode 100644 target/linux/ramips/dts/GL-MT300N.dts

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 a3661e8..3886e49 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -150,6 +150,9 @@ case $board in
 gl-mt300a)
set_wifi_led "gl-mt300a:wlan"
;;
+   gl-mt300n)
+   set_wifi_led "gl-mt300n:wlan"
+   ;;
mpr-a1)
set_wifi_led "hame:blue:system"
;;
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 b5c2b81..1e91039 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -160,6 +160,13 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan "switch0" "2" "0 6t"
ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
;;
+   
+   gl-mt300n)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "2" "0 6t"
+   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+   ;;
 
whr-1166d)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 40c26e6..3ebb1b0 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -172,6 +172,9 @@ ramips_board_detect() {
*"GL-MT300A")
name="gl-mt300a"
;;
+   *"GL-MT300N")
+   name="gl-mt300n"
+   ;;
*"Hauppauge Broadway")
name="broadway"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index cfd44d7..7825af8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_check_image() {
freestation5 | \
firewrt |\
gl-mt300a |\
+   gl-mt300n |\
pbr-m1 |\
hg255d | \
hlk-rm04 | \
diff --git a/target/linux/ramips/dts/GL-MT300N.dts 
b/target/linux/ramips/dts/GL-MT300N.dts
new file mode 100644
index 000..82db37e
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT300N.dts
@@ -0,0 +1,153 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+   compatible = "GL-MT300N", "ralink,mt7620n-soc";
+   model = "GL-MT300N";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3

[OpenWrt-Devel] [PATCH 1/6] [CC] [backport] ar71xx: add GL-AR150 support

2016-05-04 Thread alzhao
Backport of changeset 47620, add support of GL-AR150 to cc

Signed-off-by: Alfie Zhao 
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   4 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar150.c   | 125 +
 target/linux/ar71xx/generic/profiles/gl-connect.mk |  17 ---
 target/linux/ar71xx/generic/profiles/gli.mk|  27 +
 target/linux/ar71xx/image/Makefile |   8 ++
 .../patches-3.18/911-MIPS-ath79-add-gl_ar150.patch |  39 +++
 10 files changed, 209 insertions(+), 17 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
 delete mode 100644 target/linux/ar71xx/generic/profiles/gl-connect.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/gli.mk
 create mode 100644 
target/linux/ar71xx/patches-3.18/911-MIPS-ath79-add-gl_ar150.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index a4b355a..0bd0b35 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -181,6 +181,10 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl-ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b2e15bb..c7ba875 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -379,6 +379,7 @@ dir-505-a1)
 alfa-ap96 |\
 alfa-nx |\
 ap83 |\
+gl-ar150 |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index dab4d2c..813ff91 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -458,6 +458,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"GL-AR150")
+name="gl-ar150"
+;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d025632..59ee053 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -211,6 +211,7 @@ platform_check_image() {
dlan-pro-500-wp | \
dlan-pro-1200-ac | \
dragino2 | \
+   gl-ar150 | \
epg5000 | \
esr1750 | \
esr900 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index e2ff826..3598a55 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -69,6 +69,7 @@ CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
+CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
new file mode 100644
index 000..1e5e6ca
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
@@ -0,0 +1,125 @@
+/*
+ *  GL_ar150 board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos 
+ *  Copyright (C) 2013 alzhao 
+ *  Copyright (C) 2014 Michel Stempin 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define GL_AR150_GPIO_LED_WLAN0
+#define GL_AR150_GPIO_LED_LAN 13
+#define GL_AR150_GPIO_LED_WAN 15 
+
+#define GL_AR150_GPIO_BIN_USB 6
+#define GL_AR150_GPIO_BTN_MANUAL  7
+#define GL_AR150_G

[OpenWrt-Devel] [PATCH 6/6] [CC] [backport] ramips: add GL-MT750 support

2016-05-04 Thread alzhao
Backport changeset 48994
Add GT-MT750 support to CC

Signed-off-by: alzhao 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
 .../linux/ramips/base-files/etc/board.d/02_network |   7 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT750.dts   | 159 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/gli.mk |  14 +-
 7 files changed, 187 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ramips/dts/GL-MT750.dts

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 3886e49..643b3cc 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -153,6 +153,9 @@ case $board in
gl-mt300n)
set_wifi_led "gl-mt300n:wlan"
;;
+   gl-mt750)
+   set_wifi_led "gl-mt750:wlan"
+   ;;
mpr-a1)
set_wifi_led "hame:blue:system"
;;
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 1e91039..227aa63 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -167,6 +167,13 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan "switch0" "2" "0 6t"
ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
;;
+   
+   gl-mt750)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "2" "0 6t"
+   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+   ;;
 
whr-1166d)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 3ebb1b0..fb5be8c 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -175,6 +175,9 @@ ramips_board_detect() {
*"GL-MT300N")
name="gl-mt300n"
;;
+   *"GL-MT750")
+   name="gl-mt750"
+   ;;
*"Hauppauge Broadway")
name="broadway"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 7825af8..7a84aab 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -57,6 +57,7 @@ platform_check_image() {
firewrt |\
gl-mt300a |\
gl-mt300n |\
+   gl-mt750 |\
pbr-m1 |\
hg255d | \
hlk-rm04 | \
diff --git a/target/linux/ramips/dts/GL-MT750.dts 
b/target/linux/ramips/dts/GL-MT750.dts
new file mode 100644
index 000..a36ae5e
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT750.dts
@@ -0,0 +1,159 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "GL-MT750", "ralink,mt7620a-soc";
+   model = "GL-MT750";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+   
+   gpio3: gpio@688 {
+ status = "okay";
+};
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3