[OpenWrt-Devel] [PATCH] ar71xx: add support for compex wpj531

2015-06-01 Thread Christian Mehlis
tftpboot 0x8050 openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
erase 0x9f68 +1
cp.b $fileaddr 0x9f03 $filesize

---
v2:
  fix indentation with spaces
  refresh patch

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   4 +
 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-wpj531.c | 136 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  24 +++-
 9 files changed, 179 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 0553251..d64a5be 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -308,6 +308,9 @@ get_status_led() {
wpj344)
status_led=wpj344:green:status
;;
+   wpj531)
+   status_led=wpj531:green:sig3
+   ;;
wpj558)
status_led=wpj558:green:sig3
;;
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 f5c6865..5f0d302 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -368,6 +368,10 @@ wpj344)
ucidef_add_switch_vlan switch0 2 0t 2
;;
 
+wpj531)
+   ucidef_set_interfaces_lan_wan eth0 eth1
+   ;;
+
 wpj558)
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 d5dd561..bf18bb7 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -813,6 +813,9 @@ ar71xx_board_detect() {
*WPJ344)
name=wpj344
;;
+   *WPJ531)
+   name=wpj531
+   ;;
*WPJ558)
name=wpj558
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..ade47fb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -229,6 +229,7 @@ platform_check_image() {
rocket-m-xw | \
nanostation-m-xw | \
rw2458n | \
+   wpj531 | \
wndap360 | \
wpj344 | \
wzr-hp-g300nh2 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..9a7ed7f 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
 CONFIG_ATH79_MACH_WPJ344=y
+CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
new file mode 100644
index 000..bc13d70
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -0,0 +1,136 @@
+/*
+ * Compex WPJ531 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include linux/irq.h
+#include linux/platform_device.h
+#include linux/ar8216_platform.h
+
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include pci.h
+#include common.h
+#include dev-ap9x-pci.h
+#include dev-gpio-buttons.h
+#include dev-eth.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define WPJ531_GPIO_LED_SIG114
+#define WPJ531_GPIO_LED_SIG215

Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for compex wpj531

2015-05-10 Thread Christian Mehlis

Am 27.04.2015 um 16:48 schrieb Christian Mehlis:

OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050
openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis christ...@m3hlis.de


@nbd

are there any comments on the board support?
Any reasons for not merging it?

Best
Christian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for compex wpj531

2015-04-27 Thread Christian Mehlis
OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050
openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   4 +
 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-wpj531.c | 136 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  24 +++-
 9 files changed, 179 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index d702d45..b8bd2ec 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -299,6 +299,9 @@ get_status_led() {
wpj344)
status_led=wpj344:green:status
;;
+   wpj531)
+   status_led=wpj531:green:sig3
+   ;;
wpj558)
status_led=wpj558:green:sig3
;;
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 f5c6865..5f0d302 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -368,6 +368,10 @@ wpj344)
ucidef_add_switch_vlan switch0 2 0t 2
;;
 
+wpj531)
+   ucidef_set_interfaces_lan_wan eth0 eth1
+   ;;
+
 wpj558)
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 645c5d9..aff5548 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -807,6 +807,9 @@ ar71xx_board_detect() {
*WPJ344)
name=wpj344
;;
+   *WPJ531)
+   name=wpj531
+   ;;
*WPJ558)
name=wpj558
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a8cec91..466d818 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -228,6 +228,7 @@ platform_check_image() {
rocket-m-xw | \
nanostation-m-xw | \
rw2458n | \
+   wpj531 | \
wndap360 | \
wzr-hp-g300nh2 | \
wzr-hp-g300nh | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 36b8bb6..2bed421 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
 CONFIG_ATH79_MACH_WPJ344=y
+CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
new file mode 100644
index 000..bc13d70
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -0,0 +1,136 @@
+/*
+ * Compex WPJ531 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include linux/irq.h
+#include linux/platform_device.h
+#include linux/ar8216_platform.h
+
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include pci.h
+#include common.h
+#include dev-ap9x-pci.h
+#include dev-gpio-buttons.h
+#include dev-eth.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define WPJ531_GPIO_LED_SIG114
+#define WPJ531_GPIO_LED_SIG215
+#define