[OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
This patch adds WeIO board profile.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/
From 82e77431e2b860f21da5540a84e7440764a49b39 Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sun, 9 Feb 2014 03:46:43 +0100
Subject: [PATCH 1/5] weio: adding WeIO profile for OpenWrt

More changes on WeIO profile

Corrected board name detection in /tmp/sysinfo/board_name
---
 .../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.10|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 142 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   2 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  81 +++-
 8 files changed, 219 insertions(+), 36 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 fe5ff93..f0c2178 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -57,6 +57,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
+	;;
+
 db120)
 	ucidef_set_led_usbdev usb USB db120:green:usb 1-1
 	;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 4656ac2..a9c0c99 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -679,6 +679,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 8af9580..5308cf6 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -178,7 +178,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.10 b/target/linux/ar71xx/config-3.10
index 1346c3f..feac512 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -39,6 +39,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_DB120=y
 CONFIG_ATH79_MACH_DIR_505_A1=y
 CONFIG_ATH79_MACH_DIR_600_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..6a18ae9
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,142 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ * All rights reserved
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform 
+ *
+ * This file is part of WEIO
+ * WEIO 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WEIO 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, see http://www.gnu.org/licenses/.
+ *
+ * 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
+
+#define 

Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread John Crispin
Hi,

please resend with the patches inline, it is not possible to comment
when they are attached.

also, my first impression is that the patches are really messy and the
commit text only partially matches what is inside the patches.

1/4 seems to have a pile of unrelated white space fixes.

1/4 adds a file only for 2/4 and 3/4 to fix it

4/4 adds code with incorrect indenting

this is all not bad and we can fix it, however for that to be possible
you need to send the patches inline.

using git send-email is the best way to do so.

last but not least, this is a carambola2 carrier board, with a lpc uC on
it ? is this the uC that had a usb device stack in firmware ?

John

On 30/06/2014 13:59, Drasko DRASKOVIC wrote:
 This patch adds WeIO board profile.
 
 WeIO is the new AR9331 MIPS based board for Internet of Things.
 Project web-site is: http://we-io.net/
 
 
 
 ___
 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] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
On Mon, Jun 30, 2014 at 2:09 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 please resend with the patches inline, it is not possible to comment
 when they are attached.

No problem, I will be re-sending the patches inline.


 also, my first impression is that the patches are really messy and the
 commit text only partially matches what is inside the patches.

 1/4 seems to have a pile of unrelated white space fixes.

 1/4 adds a file only for 2/4 and 3/4 to fix it

Yes, this might be true, as this was my development process. Should
these be squashed then?


 4/4 adds code with incorrect indenting

Yes, this should be fixed


 this is all not bad and we can fix it, however for that to be possible
 you need to send the patches inline.

 using git send-email is the best way to do so.

Will do this.


 last but not least, this is a carambola2 carrier board, with a lpc uC on
 it ? is this the uC that had a usb device stack in firmware ?

WeIO is based on Carambola2 module, but has some changes - like
different GPIOs for buttons and leds, some other peripherals, etc...

LPC uC has USB stack in the FW, and the all the FW can be found here:
https://github.com/8devices/UPER

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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread John Crispin
Hi,

i would prefer it to be all in 1 patch with no unrelated whitespace
fixes. that makes it less work to merge and its self contained. if
there was more code then splitting it up might make sense, however its
only a few lines that get patched

ok, so it is the same uC as on the UBER ... i saw a photo of that a
while ago.

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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Jonas Gorski
On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 i would prefer it to be all in 1 patch with no unrelated whitespace
 fixes. that makes it less work to merge and its self contained. if
 there was more code then splitting it up might make sense, however its
 only a few lines that get patched

Also Signed-off-by please. See
https://dev.openwrt.org/wiki/SubmittingPatches for details.


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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
Hi all,
signed-off squashed commit that introduces WeIO board support is sent
to the list in a new thread.

Best regards,
Drasko

On Mon, Jun 30, 2014 at 3:34 PM, Jonas Gorski j...@openwrt.org wrote:
 On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 i would prefer it to be all in 1 patch with no unrelated whitespace
 fixes. that makes it less work to merge and its self contained. if
 there was more code then splitting it up might make sense, however its
 only a few lines that get patched

 Also Signed-off-by please. See
 https://dev.openwrt.org/wiki/SubmittingPatches for details.


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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread John Crispin
thanks, i will have a look tonight or in the morning

John

On 30/06/2014 17:47, Drasko DRASKOVIC wrote:
 Hi all, signed-off squashed commit that introduces WeIO board
 support is sent to the list in a new thread.
 
 Best regards, Drasko
 
 On Mon, Jun 30, 2014 at 3:34 PM, Jonas Gorski j...@openwrt.org
 wrote:
 On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org
 wrote:
 Hi,
 
 i would prefer it to be all in 1 patch with no unrelated
 whitespace fixes. that makes it less work to merge and its self
 contained. if there was more code then splitting it up might
 make sense, however its only a few lines that get patched
 
 Also Signed-off-by please. See 
 https://dev.openwrt.org/wiki/SubmittingPatches for details.
 
 
 Jonas
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 i would prefer it to be all in 1 patch with no unrelated whitespace
 fixes. that makes it less work to merge and its self contained. if
 there was more code then splitting it up might make sense, however its
 only a few lines that get patched

I squashed the commits and sent in the new thread to the list. I did
not see however white-space changes... I would prefer if the commiter
can change this, if it is not to much of a hustle.


 ok, so it is the same u C as on the UBER ... i saw a photo of that a
 while ago.

UPER project started as a spin-off of WeIO, at the point when we were
researching ideas to add HW RT and above all analog interfaces to
low-cost AR9331. As a solution we expandes these HW interfaces with an
additional Cortex-A0, and UPER FW was written, which is basically USB
TTY connected RPC server. Cool thing is that now this small uC can be
connected to any Linux host (thus PC also), and using all the
libraries we have written in Python it can drive electronics. WeIO
embeds all this + an IDE + a JS libraries for interaction from HTML
frontend on a single small footprint board.

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