Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-07-26 Thread Drasko DRASKOVIC
Hi Karl,

On Sun, Jul 26, 2015 at 4:41 AM, Karl Palsson ka...@tweak.net.au wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Let me just preface this with...

 I am _not_ any sort of authority on code style, or any sort of
 approved openwrt commit police.  I'm just some person subscribed to the 
 mailing list.  You are _absolutely_ entitled to ignore anything I say.

 ... Apparently that makes people happier

 Anyway...

I'd like to thank you for your reviews - I tried to correct all errors
that you spotted.

Anyway, new patch related to 4.1 kernel was sent yesterday evening, so
this one is not relevant anymore


 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Hi Karl,

  +
  +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC 
  and Uros PETREVSKI,
 
  Really?  That's your model name?  Really?  Are you _sure_ that's what
  you want?

 Yes, the name of the board is WeIO.


 #define MIPS_MACHINE(_type, _id, _name, _setup)

 The ID might be WEIO, I personally was checking whether you really
 wanted your board to be called WeIO board from Drasko DRASKOVIC and
 Uros PETREVSKI  You want this

 root@blah:~# grep machine /proc/cpuinfo
 machine : WeIO board from Drasko DRASKOVIC and Uros PETREVSKI
 root@blah:~#

 Maybe you do, that's fine, it seems a little unusual to me, and I was
 just asking if you'd really thought about this all the way.


I know this is strange, but this is what is written on the back of the
board and looks OK for this particular product.

  diff --git
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  index f8a561c..e8c8d5a 100644
  --- 
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  +++ 
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  @@ -1,6 +1,6 @@
   --- a/arch/mips/ath79/machtypes.h
   +++ b/arch/mips/ath79/machtypes.h
  -@@ -16,22 +16,191 @@
  +@@ -16,22 +16,192 @@
 
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
  @@ -25,6 +25,7 @@
   +ATH79_MACH_BHU_BXU2000N2_A1,/* BHU BXU2000n-2 A1 */
   +ATH79_MACH_CAP4200AG,   /* Senao CAP4200AG */
   +ATH79_MACH_CARAMBOLA2,  /* 8devices Carambola2 */
  ++ATH79_MACH_WEIO,/* WeIO board */
 
 
  Cmon man, are you sure you attached the right patch here?

 Yes, why? I can see nothing wrong with this patch.


 The reason I asked is that already in the earlier version it had been
 raised (by me) that this was not in alphabetical order.  Yes, there are
 out of place entried in that file, but that enum is mostly well ordered.
  It's a good idea to keep it well ordered.   The fact that the WEIO board has 
 a carambola2 module soldered down is irrelevant.  It can't be changed, it's 
 not a user serviceable part, they're different boards that happen to be 
 ar71xx.

Yes, I agree. And I tried to respect this everywhere it made sense.

BR,
Drasko
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-07-25 Thread Drasko DRASKOVIC
Hi Karl,

On Thu, Jun 18, 2015 at 2:35 AM, Karl Palsson ka...@tweak.net.au wrote:

 You said you're removed the commented out code?

 Also, somehow your description ended up in the subject...

 (More comments inline, but this looks like an older version of the patch)


 Sincerely,
 Karl Palsson


 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
 ---
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 
 +
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 +
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  7 files changed, 209 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk


 +
 +#define WEIO_GPIO_LED_STA1
 +#define WEIO_GPIO_LED_AP 16
 +//#define WEIO_GPIO_LED_ETH0 13

 Is there or not? Kill it if it doesn't exist.

 +
 +#define WEIO_GPIO_BTN_AP 20
 +#define WEIO_GPIO_BTN_RESET  23
 +
 +#define WEIO_KEYS_POLL_INTERVAL  20  /* msecs */
 +#define WEIO_KEYS_DEBOUNCE_INTERVAL  (3 * WEIO_KEYS_POLL_INTERVAL)
 +
 +#define WEIO_MAC0_OFFSET 0x
 +#define WEIO_MAC1_OFFSET 0x0006
 +#define WEIO_CALDATA_OFFSET  0x1000


 +static void __init weio_common_setup(void)
 +{
 + u8 *art = (u8 *) KSEG1ADDR(0x1fff);
 +
 + ath79_register_m25p80(NULL);
 + ath79_register_wmac(art + WEIO_CALDATA_OFFSET,
 + art + WEIO_WMAC_MAC_OFFSET);
 +
 +/** WeIO does not use ETH - only WiFi by default */
 +#if 0
 + ath79_setup_ar933x_phy4_switch(true, true);
 +
 + ath79_init_mac(ath79_eth0_data.mac_addr, art + WEIO_MAC0_OFFSET, 0);
 + ath79_init_mac(ath79_eth1_data.mac_addr, art + WEIO_MAC1_OFFSET, 0);
 +
 + ath79_register_mdio(0, 0x0);
 +
 + /* LAN ports */
 + ath79_register_eth(1);
 +
 + /* WAN port */
 + ath79_register_eth(0);
 +#endif /** commented out ETH */
 +}
 +

 This was already raised earlier?

 +static void __init weio_setup(void)
 +{
 + weio_common_setup();
 +
 +
 + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
 +AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 +
 +platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices));
 +
 + ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),
 +  weio_leds_gpio);
 +
 + ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL,
 + ARRAY_SIZE(weio_gpio_keys),
 + weio_gpio_keys);
 + ath79_register_usb();
 +}
 +
 +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC and 
 Uros PETREVSKI,

 Really?  That's your model name?  Really?  Are you _sure_ that's what
 you want?

Yes, the name of the board is WeIO.



 + weio_setup);
 diff --git a/target/linux/ar71xx/generic/profiles/weio.mk
 b/target/linux/ar71xx/generic/profiles/weio.mk
 new file mode 100644
 index 000..227cec9
 --- /dev/null
 +++ b/target/linux/ar71xx/generic/profiles/weio.mk
 @@ -0,0 +1,17 @@
 +#
 +# Copyright (C) 2013 OpenWrt.org
 +#
 +# This is free software, licensed under the GNU General Public License v2.
 +# See /LICENSE for more information.
 +#
 +
 +define Profile/WEIO
 +NAME:=WeIO
 +PACKAGES:=kmod-usb-core kmod-usb2
 +endef
 +
 +define Profile/WEIO/Description
 +Package set optimized for the WeIO board.
 +endef
 +
 +$(eval $(call Profile,WEIO))
 diff --git a/target/linux/ar71xx/image/Makefile
 b/target/linux/ar71xx/image/Makefile
 index 21d0d66..1f08ca0 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -179,6 +179,14 @@ define Device/carambola2
  endef
  TARGET_DEVICES += carambola2

 +define Device/weio
 +  BOARDNAME = WEIO
 +  IMAGE_SIZE = 16000k
 +  CONSOLE = ttyATH0,115200
 +  MTDPARTS = 
 spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
 +endef
 +TARGET_DEVICES += weio
 +
  define Device/wndr3700
BOARDNAME = WNDR3700
NETGEAR_KERNEL_MAGIC = 0x33373030
 diff --git
 a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 index f8a561c..e8c8d5a 100644
 --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 +++ 

Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-07-25 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Let me just preface this with...

I am _not_ any sort of authority on code style, or any sort of
approved openwrt commit police.  I'm just some person subscribed to the 
mailing list.  You are _absolutely_ entitled to ignore anything I say. 

... Apparently that makes people happier

Anyway...


Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Hi Karl,
 
  +
  +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC 
  and Uros PETREVSKI,
 
  Really?  That's your model name?  Really?  Are you _sure_ that's what
  you want?
 
 Yes, the name of the board is WeIO.
 

#define MIPS_MACHINE(_type, _id, _name, _setup)

The ID might be WEIO, I personally was checking whether you really
wanted your board to be called WeIO board from Drasko DRASKOVIC and
Uros PETREVSKI  You want this

root@blah:~# grep machine /proc/cpuinfo 
machine : WeIO board from Drasko DRASKOVIC and Uros PETREVSKI
root@blah:~#

Maybe you do, that's fine, it seems a little unusual to me, and I was
just asking if you'd really thought about this all the way. 

  diff --git
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  index f8a561c..e8c8d5a 100644
  --- 
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  +++ 
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  @@ -1,6 +1,6 @@
   --- a/arch/mips/ath79/machtypes.h
   +++ b/arch/mips/ath79/machtypes.h
  -@@ -16,22 +16,191 @@
  +@@ -16,22 +16,192 @@
 
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
  @@ -25,6 +25,7 @@
   +ATH79_MACH_BHU_BXU2000N2_A1,/* BHU BXU2000n-2 A1 */
   +ATH79_MACH_CAP4200AG,   /* Senao CAP4200AG */
   +ATH79_MACH_CARAMBOLA2,  /* 8devices Carambola2 */
  ++ATH79_MACH_WEIO,/* WeIO board */
 
 
  Cmon man, are you sure you attached the right patch here?
 
 Yes, why? I can see nothing wrong with this patch.
 

The reason I asked is that already in the earlier version it had been
raised (by me) that this was not in alphabetical order.  Yes, there are
out of place entried in that file, but that enum is mostly well ordered.
 It's a good idea to keep it well ordered.   The fact that the WEIO board has a 
carambola2 module soldered down is irrelevant.  It can't be changed, it's not a 
user serviceable part, they're different boards that happen to be ar71xx.

Cheers,
Karl P

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJVtEjlAAoJEBmotQ/U1cr2ZooP/0BjivyIBGXVDAhdGXdCCvt8
RZLqsnuZyAzRZoBaZBYpA/X885FIJhs1FdlrKu6QwdkRxZ/dvalYXtGneMpnEIi1
FCt3HDuabcwDdRHZzVcSX+c5E5UpvptzHLc0PjdQ7WMZreTAuGKOTCaFthuDIuSp
wKO5X+UVxYH04ExYoGEvwd+xytqeTQend/xatF4XOBkkt+fcbK19Mv8SjbVvZOZn
5zPf/KRGnMxE52p2NT+HPu0EPTz3cbyNRTGGKYyRe1iTmJq04cFoDRHMz2g13BtA
KEhSig4DT/DIIMi3umoqmWpxSmL26me6WzIEvz6b6W63+vwcNEUuSgGQiugQ5VbT
LIj17kff0iwZk+CK1mRvyjVeMVEOXSdRzkJNpZq9/Gmn5DDo6Oa0BoRB47CYkQAh
mAECv0R0EOmAe2QtTj/7kWEi3I+wbFrufgBNT+AzzekYRrnzwHl2DFwRh7dboTlQ
qb+ZCjDQ6LolyOn6A1pchI0pLHnu3uiwoWdK1C8n/KqQpgC8wqfoqcETeGU0Zspb
G50rBBpDsjTIAG1jFwOjoGW8Q4nN2CIFjAhtCCm57Ei5YNC2/u4nmZG9iuF6ON67
C6yLgDkeICgIYPbuyUX1fp0w3vwe8EbhFGzYA7gUxHdoZ0uRbk3a1MHVsWylJo0h
UFQHx8V7m0SU5PFKNX+7
=8XxQ
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-06-17 Thread Drasko DRASKOVIC
Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..6a12533 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -793,6 +793,9 @@ ar71xx_board_detect() {
*UniFi AP Pro)
name=uap-pro
;;
+   *WeIO)
+   name=weio
+   ;;   
*WHR-G301N)
name=whr-g301n
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..e81ba51 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..2ac4f92
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,162 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-spi.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON,
+   }, {
+   

Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board

2015-06-17 Thread Drasko DRASKOVIC
Thanks for revision,
I have resent corrected patch:
- Added description
- Added signed-of
- Corrected alphabetical order of `target/linux/ar71xx/base-files/lib/ar71xx.sh`

BR,
Drasko


On Wed, Jun 17, 2015 at 2:17 PM, Karl Palsson ka...@tweak.net.au wrote:

 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 ---
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 
 +
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 +
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  7 files changed, 209 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index b13be1e..fe7478c 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -892,6 +892,9 @@ ar71xx_board_detect() {
   8devices Carambola2*)
   name=carambola2
   ;;
 + *WeIO)
 + name=weio
 + ;;
   *Sitecom WLR-8100)
   name=wlr8100
   ;;

 This one is in the wrong place too.  Those last few entries, from EmbWir
 Dorin down to HiWiFi are out of order, but the rest of the ENTIRE list
 is well sorted.  Your WeIO should be up around line 790, after the
 Unifi, and before the WHR

 Sincerely,
 Karl Palsson
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-06-17 Thread Karl Palsson

You said you're removed the commented out code?

Also, somehow your description ended up in the subject...

(More comments inline, but this looks like an older version of the patch)


Sincerely,
Karl Palsson


Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
 ---
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 
 +
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 +
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  7 files changed, 209 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
 

 +
 +#define WEIO_GPIO_LED_STA1
 +#define WEIO_GPIO_LED_AP 16
 +//#define WEIO_GPIO_LED_ETH0 13

Is there or not? Kill it if it doesn't exist.

 +
 +#define WEIO_GPIO_BTN_AP 20
 +#define WEIO_GPIO_BTN_RESET  23
 +
 +#define WEIO_KEYS_POLL_INTERVAL  20  /* msecs */
 +#define WEIO_KEYS_DEBOUNCE_INTERVAL  (3 * WEIO_KEYS_POLL_INTERVAL)
 +
 +#define WEIO_MAC0_OFFSET 0x
 +#define WEIO_MAC1_OFFSET 0x0006
 +#define WEIO_CALDATA_OFFSET  0x1000


 +static void __init weio_common_setup(void)
 +{
 + u8 *art = (u8 *) KSEG1ADDR(0x1fff);
 +
 + ath79_register_m25p80(NULL);
 + ath79_register_wmac(art + WEIO_CALDATA_OFFSET,
 + art + WEIO_WMAC_MAC_OFFSET);
 +
 +/** WeIO does not use ETH - only WiFi by default */
 +#if 0
 + ath79_setup_ar933x_phy4_switch(true, true);
 +
 + ath79_init_mac(ath79_eth0_data.mac_addr, art + WEIO_MAC0_OFFSET, 0);
 + ath79_init_mac(ath79_eth1_data.mac_addr, art + WEIO_MAC1_OFFSET, 0);
 +
 + ath79_register_mdio(0, 0x0);
 +
 + /* LAN ports */
 + ath79_register_eth(1);
 +
 + /* WAN port */
 + ath79_register_eth(0);
 +#endif /** commented out ETH */
 +}
 +

This was already raised earlier?

 +static void __init weio_setup(void)
 +{
 + weio_common_setup();
 +
 +
 + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
 +AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 +
 +platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices));
 +
 + ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),
 +  weio_leds_gpio);
 +
 + ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL,
 + ARRAY_SIZE(weio_gpio_keys),
 + weio_gpio_keys);
 + ath79_register_usb();
 +}
 +
 +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC and 
 Uros PETREVSKI,

Really?  That's your model name?  Really?  Are you _sure_ that's what
you want?


 + weio_setup);
 diff --git a/target/linux/ar71xx/generic/profiles/weio.mk
 b/target/linux/ar71xx/generic/profiles/weio.mk
 new file mode 100644
 index 000..227cec9
 --- /dev/null
 +++ b/target/linux/ar71xx/generic/profiles/weio.mk
 @@ -0,0 +1,17 @@
 +#
 +# Copyright (C) 2013 OpenWrt.org
 +#
 +# This is free software, licensed under the GNU General Public License v2.
 +# See /LICENSE for more information.
 +#
 +
 +define Profile/WEIO
 +NAME:=WeIO
 +PACKAGES:=kmod-usb-core kmod-usb2
 +endef
 +
 +define Profile/WEIO/Description
 +Package set optimized for the WeIO board.
 +endef
 +
 +$(eval $(call Profile,WEIO))
 diff --git a/target/linux/ar71xx/image/Makefile
 b/target/linux/ar71xx/image/Makefile
 index 21d0d66..1f08ca0 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -179,6 +179,14 @@ define Device/carambola2
  endef
  TARGET_DEVICES += carambola2
  
 +define Device/weio
 +  BOARDNAME = WEIO
 +  IMAGE_SIZE = 16000k
 +  CONSOLE = ttyATH0,115200
 +  MTDPARTS = 
 spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
 +endef
 +TARGET_DEVICES += weio
 +
  define Device/wndr3700
BOARDNAME = WNDR3700
NETGEAR_KERNEL_MAGIC = 0x33373030
 diff --git
 a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 index f8a561c..e8c8d5a 100644
 --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 @@ -1,6 +1,6 @@
  --- a/arch/mips/ath79/machtypes.h
  +++ b/arch/mips/ath79/machtypes.h
 -@@ -16,22 +16,191 @@
 

Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-16 Thread Drasko DRASKOVIC
HI all,
I have just re-sent patch through `git send-email`.

I have corrected following:
- Added GPLv2 header
- Corrected alphabetical order everywhere where I saw it was respected
- removed eth0 and other carambola2 LED related stuff

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


[OpenWrt-Devel] [PATCH] Add support for WeIO board

2015-06-16 Thread Drasko DRASKOVIC
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..fe7478c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -892,6 +892,9 @@ ar71xx_board_detect() {
8devices Carambola2*)
name=carambola2
;;
+   *WeIO)
+   name=weio
+   ;;
*Sitecom WLR-8100)
name=wlr8100
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..e81ba51 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..2ac4f92
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,162 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-spi.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON,
+   }, {
+   .name   = weio:green:ap,
+ 

Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board

2015-06-16 Thread Florian Fainelli
Missing Signed-off-by tag and description of the patch.


Le 06/16/15 14:06, Drasko DRASKOVIC a écrit :
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-15 Thread Drasko DRASKOVIC
Hi Karl,

On Mon, Jun 15, 2015 at 11:48 AM, Karl Palsson ka...@tweak.net.au wrote:

 A lot of this messes up the alphabetical ordering.

Can you point me to exact spots?

I tried to add WeIO support next to Carambola2, as in many cases it is
practically the same. I might be that I did not notice alphabetical
ordering in some files, so please point me to the right places.

BR,
Drasko
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-15 Thread Karl Palsson

Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Hi Karl,
 
 On Mon, Jun 15, 2015 at 11:48 AM, Karl Palsson ka...@tweak.net.au
 wrote:
 
  A lot of this messes up the alphabetical ordering.
 
 Can you point me to exact spots?
 
 I tried to add WeIO support next to Carambola2, as in many cases it is
 practically the same. I might be that I did not notice alphabetical
 ordering in some files, so please point me to the right places.
 


All of them.  I don't believe it's particularly relevant that it's based
on a carambola2 module, it's soldered down, it's for all intents and
purposes just another ar9331.  Until/Unless ar71xx moves to device tree,
then by all means it could include a dtsi for the carambola2 module but
when they have separate board files, it's not relevant.

target/linux/ar71xx/base-files/lib/upgrade/platform.sh changes are
probably ok, that's already a bit of a mess?

Further, if WeIO doens't use eht0, I think it should just be removed,
not #ifdeffed out.

Cheers,
Karl P___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-15 Thread Drasko DRASKOVIC
Hi John,

On Mon, Jun 15, 2015 at 8:56 AM, John Crispin blo...@openwrt.org wrote:


 On 14/06/2015 23:56, Drasko DRASKOVIC wrote:
 +/**
 + * WEIO Web Of Things Platform
 + *
 + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
 + *
 + *  ##  ##    ###
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *   ###  ###     ###
 + *
 + *   Web Of Things Platform
 + *
 + * Authors :
 + * Drasko DRASKOVIC drasko.drasko...@gmail.com
 + * Uros PETREVSKI u...@nodesign.net
 + */
 +

 we expect submitted kernel patches to have a gplv2 license

This is a copyright info, not a licensing information - license is
GPLv2. There is many files in OpenWrt that do not have a license info
in the headers.

Do you want me to change the patch and add licensing information also?

BR,
Drasko
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-14 Thread Drasko DRASKOVIC
Hello,
please find below patch that adds support for WeIO board
(http://we-io.net) to Chaos Calmer master branch.

The board is based on Carambola2 module from 8Devices, and this patch
adds a separate profile for WeIO.

Best regards,
Drasko




From c68e410601b1fe656dad7b08ed41de470d0550c6 Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sun, 14 Jun 2015 22:41:45 +0200
Subject: [PATCH] Add support for WeIO board

Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 148 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 8 files changed, 201 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

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 41b..b0fb36e 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -63,6 +63,12 @@ carambola2)
  ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
  ;;

+weio)
+ ucidef_set_led_netdev lan LAN weio:orange:eth0 eth0
+ ucidef_set_led_netdev wan WAN weio:orange:eth1 eth1
+ ucidef_set_led_wlan wlan WLAN weio:green:wlan phy0tpt
+ ;;
+
 cpe510)
  ucidef_set_led_switch lan0 LAN0 tp-link:green:lan0 switch0 0x20
  ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x10
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..fe7478c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -892,6 +892,9 @@ ar71xx_board_detect() {
  8devices Carambola2*)
  name=carambola2
  ;;
+ *WeIO)
+ name=weio
+ ;;
  *Sitecom WLR-8100)
  name=wlr8100
  ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
  nbg460n_550n_550nh | \
  unifi | \
  unifi-outdoor | \
- carambola2 )
+ carambola2 | \
+ weio )
  [ $magic != 2705 ]  {
  echo Invalid image type.
  return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..ae68a18 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -43,6 +43,7 @@ CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_CPE510=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DGL_5500_A1=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..70ed543
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,148 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * Authors :
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-spi.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA 1
+#define WEIO_GPIO_LED_AP 16
+//#define WEIO_GPIO_LED_ETH0 13
+
+#define WEIO_GPIO_BTN_AP20
+#define WEIO_GPIO_BTN_RESET 23
+
+#define WEIO_KEYS_POLL_INTERVAL 20 /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL (3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET 0x
+#define WEIO_MAC1_OFFSET 0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET 0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+ {
+ .name = weio:green:sta,
+ .gpio = WEIO_GPIO_LED_STA,
+ 

Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-14 Thread Florian Fainelli
On Jun 14, 2015 2:56 PM, Drasko DRASKOVIC drasko.drasko...@gmail.com
wrote:

 Hello,
 please find below patch that adds support for WeIO board
 (http://we-io.net) to Chaos Calmer master branch.

 The board is based on Carambola2 module from 8Devices, and this patch
 adds a separate profile for WeIO.

Your patch has been mangled by your mailer, you might want to use
git-send-email instead. Since this is a new target, trunk is more
appropriate, once it gets there, backports to CC can be made.


 Best regards,
 Drasko




 From c68e410601b1fe656dad7b08ed41de470d0550c6 Mon Sep 17 00:00:00 2001
 From: Drasko DRASKOVIC drasko.drasko...@gmail.com
 Date: Sun, 14 Jun 2015 22:41:45 +0200
 Subject: [PATCH] Add support for WeIO board

 Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
 ---
  .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 148
+
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 ++
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  8 files changed, 201 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

 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 41b..b0fb36e 100644
 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 @@ -63,6 +63,12 @@ carambola2)
   ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
   ;;

 +weio)
 + ucidef_set_led_netdev lan LAN weio:orange:eth0 eth0
 + ucidef_set_led_netdev wan WAN weio:orange:eth1 eth1
 + ucidef_set_led_wlan wlan WLAN weio:green:wlan phy0tpt
 + ;;
 +
  cpe510)
   ucidef_set_led_switch lan0 LAN0 tp-link:green:lan0 switch0
0x20
   ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0
0x10
 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index b13be1e..fe7478c 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -892,6 +892,9 @@ ar71xx_board_detect() {
   8devices Carambola2*)
   name=carambola2
   ;;
 + *WeIO)
 + name=weio
 + ;;
   *Sitecom WLR-8100)
   name=wlr8100
   ;;
 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 index 3dbd91c..0f2920b 100755
 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 @@ -243,7 +243,8 @@ platform_check_image() {
   nbg460n_550n_550nh | \
   unifi | \
   unifi-outdoor | \
 - carambola2 )
 + carambola2 | \
 + weio )
   [ $magic != 2705 ]  {
   echo Invalid image type.
   return 1
 diff --git a/target/linux/ar71xx/config-3.18
b/target/linux/ar71xx/config-3.18
 index 543b77e..ae68a18 100644
 --- a/target/linux/ar71xx/config-3.18
 +++ b/target/linux/ar71xx/config-3.18
 @@ -43,6 +43,7 @@ CONFIG_ATH79_MACH_AW_NR580=y
  CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
  CONFIG_ATH79_MACH_CAP4200AG=y
  CONFIG_ATH79_MACH_CARAMBOLA2=y
 +CONFIG_ATH79_MACH_WEIO=y
  CONFIG_ATH79_MACH_CPE510=y
  CONFIG_ATH79_MACH_DB120=y
  CONFIG_ATH79_MACH_DGL_5500_A1=y
 diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 new file mode 100644
 index 000..70ed543
 --- /dev/null
 +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 @@ -0,0 +1,148 @@
 +/**
 + * WEIO Web Of Things Platform
 + *
 + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
 + *
 + *  ##  ##    ###
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *   ###  ###     ###
 + *
 + *   Web Of Things Platform
 + *
 + * Authors :
 + * Drasko DRASKOVIC drasko.drasko...@gmail.com
 + * Uros PETREVSKI u...@nodesign.net
 + */
 +
 +#include asm/mach-ath79/ath79.h
 +#include asm/mach-ath79/ar71xx_regs.h
 +#include common.h
 +#include dev-eth.h
 +#include dev-gpio-buttons.h
 +#include dev-leds-gpio.h
 +#include dev-m25p80.h
 +#include dev-spi.h
 +#include dev-usb.h
 +#include dev-wmac.h
 +#include machtypes.h
 +#include linux/i2c-gpio.h
 +#include linux/platform_device.h
 +
 +#define WEIO_GPIO_LED_STA 1
 +#define WEIO_GPIO_LED_AP 16
 +//#define WEIO_GPIO_LED_ETH0 13
 +
 +#define WEIO_GPIO_BTN_AP20
 +#define