Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for The QCA AP147-010 reference board

2015-07-20 Thread Sven Eckelmann
On Tuesday 07 July 2015 13:41:40 John Crispin wrote:
 Hi,
 
 please split this into 1 patch for each QCA953x fix
 and then a final patch for the ap147 support

Thanks for the feedback. Looks like the QCA953x fixes were merged in r46207.
I will submit a version of the patch without the QCA953x fixes after I
tested it with the current trunk.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for The QCA AP147-010 reference board

2015-07-07 Thread John Crispin
Hi,

please split this into 1 patch for each QCA953x fix
and then a final patch for the ap147 support

John

On 29/06/2015 17:25, Sven Eckelmann wrote:
 Signed-off-by: Sven Eckelmann s...@open-mesh.com
 ---
 I got the chance to test the AP147-010 but got no software/SDK or 
 documentation.
 Still wanted to post my results because the device worked well enough for me.
 I am not sure if it originally comes with a PCIe card (I've used at QCA9880
 based one for my tests).
 
 Most of the SoC relevant code is based on the QCA955x implementation.
 
 
  target/linux/ar71xx/base-files/etc/diag.sh |   3 +
  .../ar71xx/base-files/etc/uci-defaults/01_leds |   9 ++
  .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../lib/preinit/05_set_preinit_iface_ar71xx|   1 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
  target/linux/ar71xx/config-3.18|   1 +
  .../ar71xx/files/arch/mips/ath79/mach-ap147.c  | 119 
  target/linux/ar71xx/generic/profiles/atheros.mk|  11 ++
  target/linux/ar71xx/image/Makefile |   3 +
  target/linux/ar71xx/mikrotik/config-default|   1 +
  target/linux/ar71xx/nand/config-default|   1 +
  .../740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch   | 158 
 +
  .../741-MIPS-ath79-add-USB-for-QCA953x-SoC.patch   |  56 
  .../742-MIPS-ath79-add-ap147-support.patch |  42 ++
  15 files changed, 416 insertions(+)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ap147.c
  create mode 100644 
 target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch
  create mode 100644 
 target/linux/ar71xx/patches-3.18/741-MIPS-ath79-add-USB-for-QCA953x-SoC.patch
  create mode 100644 
 target/linux/ar71xx/patches-3.18/742-MIPS-ath79-add-ap147-support.patch
 
 diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
 b/target/linux/ar71xx/base-files/etc/diag.sh
 index 4313f2f..169d192 100644
 --- a/target/linux/ar71xx/base-files/etc/diag.sh
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh
 @@ -22,6 +22,9 @@ get_status_led() {
   ap136-020)
   status_led=ap136:green:status
   ;;
 + ap147-010)
 + status_led=ap147:green:status
 + ;;
   ap135-020)
   status_led=ap135:green:status
   ;;
 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 3cd17b1..1d4f88d 100644
 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 @@ -40,6 +40,15 @@ ap113)
   ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
   ;;
  
 +ap147-010)
 + ucidef_set_led_netdev wan WAN ap147:green:wan eth1
 + ucidef_set_led_switch lan1 LAN1 ap147:green:lan1 switch0 0x10
 + ucidef_set_led_switch lan2 LAN2 ap147:green:lan2 switch0 0x08
 + ucidef_set_led_switch lan3 LAN3 ap147:green:lan3 switch0 0x04
 + ucidef_set_led_switch lan4 LAN4 ap147:green:lan4 switch0 0x02
 + ucidef_set_led_wlan wlan2g WLAN 2.4 GHz ap147:green:wlan-2g 
 phy0tpt
 + ;;
 +
  bullet-m | \
  nanostation-m | \
  rocket-m | \
 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 2fab4c2..1b39d2a 100644
 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 @@ -45,6 +45,13 @@ ap136-010)
   ucidef_add_switch_vlan switch0 2 5 6
   ;;
  
 +ap147-010)
 + ucidef_set_interfaces_lan_wan eth0 eth1
 + ucidef_add_switch switch0 1 1
 + ucidef_add_switch_vlan switch0 1 0 1 2 3 4
 + ucidef_add_switch_vlan switch0 2 5 6
 + ;;
 +
  ap136-020 |\
  ap135-020 |\
  tl-wr1043nd-v2 |\
 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index 09c06d7..85aeda0 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -359,6 +359,9 @@ ar71xx_board_detect() {
   *AP135-020 reference board)
   name=ap135-020
   ;;
 + *AP147-010 reference board)
 + name=ap147-010
 + ;;
   *AP81)
   name=ap81
   ;;
 diff --git 
 a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx 
 b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
 index f11ea8c..d214e9b 100644
 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
 +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
 @@ -12,6 +12,7 @@ set_preinit_iface() {
   alfa-nx |\
   ap135-020 |\
   ap136-020 |\
 + ap147-010 |\
   ap83 |\
   archer-c5 |\
   archer-c7 |\

[OpenWrt-Devel] [PATCH] ar71xx: Add support for The QCA AP147-010 reference board

2015-06-29 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@open-mesh.com
---
I got the chance to test the AP147-010 but got no software/SDK or documentation.
Still wanted to post my results because the device worked well enough for me.
I am not sure if it originally comes with a PCIe card (I've used at QCA9880
based one for my tests).

Most of the SoC relevant code is based on the QCA955x implementation.


 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   9 ++
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../lib/preinit/05_set_preinit_iface_ar71xx|   1 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ap147.c  | 119 
 target/linux/ar71xx/generic/profiles/atheros.mk|  11 ++
 target/linux/ar71xx/image/Makefile |   3 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 .../740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch   | 158 +
 .../741-MIPS-ath79-add-USB-for-QCA953x-SoC.patch   |  56 
 .../742-MIPS-ath79-add-ap147-support.patch |  42 ++
 15 files changed, 416 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ap147.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch
 create mode 100644 
target/linux/ar71xx/patches-3.18/741-MIPS-ath79-add-USB-for-QCA953x-SoC.patch
 create mode 100644 
target/linux/ar71xx/patches-3.18/742-MIPS-ath79-add-ap147-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4313f2f..169d192 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -22,6 +22,9 @@ get_status_led() {
ap136-020)
status_led=ap136:green:status
;;
+   ap147-010)
+   status_led=ap147:green:status
+   ;;
ap135-020)
status_led=ap135:green:status
;;
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 3cd17b1..1d4f88d 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -40,6 +40,15 @@ ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
 
+ap147-010)
+   ucidef_set_led_netdev wan WAN ap147:green:wan eth1
+   ucidef_set_led_switch lan1 LAN1 ap147:green:lan1 switch0 0x10
+   ucidef_set_led_switch lan2 LAN2 ap147:green:lan2 switch0 0x08
+   ucidef_set_led_switch lan3 LAN3 ap147:green:lan3 switch0 0x04
+   ucidef_set_led_switch lan4 LAN4 ap147:green:lan4 switch0 0x02
+   ucidef_set_led_wlan wlan2g WLAN 2.4 GHz ap147:green:wlan-2g 
phy0tpt
+   ;;
+
 bullet-m | \
 nanostation-m | \
 rocket-m | \
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 2fab4c2..1b39d2a 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -45,6 +45,13 @@ ap136-010)
ucidef_add_switch_vlan switch0 2 5 6
;;
 
+ap147-010)
+   ucidef_set_interfaces_lan_wan eth0 eth1
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 0 1 2 3 4
+   ucidef_add_switch_vlan switch0 2 5 6
+   ;;
+
 ap136-020 |\
 ap135-020 |\
 tl-wr1043nd-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 09c06d7..85aeda0 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -359,6 +359,9 @@ ar71xx_board_detect() {
*AP135-020 reference board)
name=ap135-020
;;
+   *AP147-010 reference board)
+   name=ap147-010
+   ;;
*AP81)
name=ap81
;;
diff --git 
a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx 
b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
index f11ea8c..d214e9b 100644
--- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
+++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
@@ -12,6 +12,7 @@ set_preinit_iface() {
alfa-nx |\
ap135-020 |\
ap136-020 |\
+   ap147-010 |\
ap83 |\
archer-c5 |\
archer-c7 |\
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 370605d..7b21715 100755
---