Re: [LEDE-DEV] [PATCH] ramips: Add support for the VoCore2 Lite

2017-05-06 Thread Mathias Kresin

Hey Laray,

Please split the patch. One patch for the minor corrections of the 
VoCore2 an one adding the VoCore2 lite to make the review easier.


Find some comments inline.

07.05.2017 03:41, L. D. Pinney:

The VoCore2 Lite uses the same PCB as the Vocore2 with a MT7688A and 8M 
Flash/64M RAM
https://www.indiegogo.com/projects/vocore2-4-coin-sized-linux-computer-with-wifi#/
http://vocore.io/
http://vonger.net/

This patch uses a common dtsi and includes minor corrections for the VoCore2.

- Installing from the bootloader is recommended.
- The original firmware is LEDE/OpenWrt, so both LuCI or sysupgrade can be used.
- However you may need to edit /sys/sysinfo/board_name and 
/lib/upgrade/platform.sh
- If using luci/sysupgrade use the -n option (do not keep settings)
- Reverting to the factory firmware one may need to edit the same files or use 
the bootloader.

Signed-off-by: L. D. Pinney 
Tested-by: Noble Pepper 

---
 target/linux/ramips/base-files/etc/board.d/01_leds |  5 -
 target/linux/ramips/base-files/etc/board.d/02_network  |  3 ++-
 target/linux/ramips/base-files/etc/diag.sh |  5 -
 target/linux/ramips/base-files/lib/ramips.sh   |  3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ramips/dts/VOCORE2.dts| 79 
--
 target/linux/ramips/dts/VOCORE2.dtsi   | 79 
++
 target/linux/ramips/dts/VOCORE2L.dts   | 52 
+++
 target/linux/ramips/image/mt7688.mk|  9 
 9 files changed, 158 insertions(+), 78 deletions(-)

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 52542ec265..c4d46cf31a 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -334,7 +334,10 @@ vocore-16M)
set_wifi_led "vocore:green:status"
;;
 vocore2)
-   set_wifi_led "$board:fuchsia:status"
+   set_wifi_led "$board:pink:status"
+   ;;


Fuchsia is pink, please omit the LED colour rename.


+vocore2l)
+   set_wifi_led "$board:green:status"
;;
 w502u)
set_usb_led "$board:blue:usb"
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 80a3bc2c51..57245ef737 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -272,7 +272,8 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
;;
-   vocore2)
+   vocore2|\
+   vocore2l)
ucidef_add_switch "switch0" \
"0:lan" "2:lan" "6t@eth0"
;;
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 461f46c26b..aff27cb3c0 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -228,7 +228,10 @@ get_status_led() {
status_led="vocore:green:status"
;;
vocore2)
-   status_led="$board:fuchsia:status"
+   status_led="$board:pink:status"
+   ;;
+   vocore2l)
+   status_led="$board:green:status"
;;
w306r-v20|\
witi|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 87cb7ffb91..3738d8ead1 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -502,6 +502,9 @@ ramips_board_detect() {
*"VoCore2")
name="vocore2"
;;
+   *"VoCore2-Lite")
+   name="vocore2l"


Please use "vocore2lite".


+   ;;
*"VR500")
name="vr500"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index adad8dae75..a7958f3a19 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -147,6 +147,7 @@ platform_check_image() {
vocore-8M|\
vocore-16M|\
vocore2|\
+   vocore2l|\
vr500|\
w150m|\
w2914nsv2|\
diff --git a/target/linux/ramips/dts/VOCORE2.dts 
b/target/linux/ramips/dts/VOCORE2.dts
index 297cd1bb99..087d16ea69 100644
--- a/target/linux/ramips/dts/VOCORE2.dts
+++ b/target/linux/ramips/dts/VOCORE2.dts
@@ -1,64 +1,18 @@
 /dts-v1/;

-#include "mt7628an.dtsi"
-
-#include 
-#include 
+#include "VOCORE2.dtsi"

 / {
-   compatible = 

[LEDE-DEV] [PATCH] Add missing packages for WeVO 11AC NAS

2017-05-06 Thread perillamint via Lede-dev
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
mt7621.mk does not include all required packages for WeVO 11AC NAS,
so official image does not support 5GHz WiFi(mt76x2) out of the box.
This patch fixes that.
---
 target/linux/ramips/image/mt7621.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/mt7621.mk
b/target/linux/ramips/image/mt7621.mk
index 733fb08..f5e5b34 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -30,7 +30,9 @@ define Device/11acnas
   DTS := 11ACNAS
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := WeVO 11AC NAS Router
-  DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport
wpad-mini
+  DEVICE_PACKAGES := \
+   kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
kmod-mt76 \
+   wpad-mini
 endef
 TARGET_DEVICES += 11acnas
 -- 2.1.4

--- End Message ---
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/3] ramips-mt7621: add GPIO-config for Ubiquiti-EdgeRouterX(-SFP)

2017-05-06 Thread Mathias Kresin

06.05.2017 14:31, Sven Roederer:

On Freitag, 5. Mai 2017 14:32:12 CEST Mathias Kresin wrote:

Is it necessary to control the GPIOs from userspace/via config files?
If not, add a gpio_export node to the dts and set the output value
this way [0].


> Or is there something better?

Yes there is. Please add a gpio-export node to the dts (see 
target/linux/ramips/dts/A5-V11.dts). It does basically the same but 
allows to set the polarity and uses the gpio-export,name for the actual 
export. And it doesn't add userspace stuff to the image which is 
included for all images.




To have it in userspace is the best (only?) option to enable / disable or
power-cycle the attached PoE-equipment.


The question is more or less whether it is necessary to disable PoE for 
the ports. The gpio-export node for example, is used in most cases for 
enabling something like usb power.


I have no strong opinion on this and I'll leave it up to you to add what 
you are the opinion is the best.


Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ipq806x: Add nand boot support for ipq40xx AP-DK04.1-C1

2017-05-06 Thread Christian Lamparter via Lede-dev
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hello,

On Friday, May 5, 2017 9:19:36 PM CEST Ram Chandra Jangir wrote:
> This change add nand boot support for IPQ40xx based
> AP-DK04.1-C1 board using ubi image, also add sysupgrage
> support for AP-DK04.1-C1 and generates a sysupgrade.tar
> image.
> 
> Testing:
> *Tested on IPQ40xx AP-DK04.1-C1 and IPQ806x AP148 Board:
>   a. NAND boot
>   b. ubi sysupgrade
> 
> Signed-off-by: Ram Chandra Jangir 

Thanks for posting this.

Chris Blake is currently in the process of adding the Cisco Meraki MR33.

The MR33 uses the IPQ4029 and has just a Spansion S34ML01G200TFV00 128MiB
NAND Flash for storage.

He reported that with this patch attached. The driver is loading, but it
can't access the nand: 

[0.860703] nand: second ID read did not match 7f,7f against 01,71
[0.861633] nand: No NAND device found

The id is supposed to be 01 (manuf = Spanion), f1 (128MiB).
both readings are bad.

I think this is caused by two problems:

1. 7f, 7f should be 0xff, 0xff. 0x71 should be 0xf1.

2. It seems that the NAND chip was not ready on the first read. 

I strongly suspect (due to the MSB error for BIT 7), that
at least one I/O line is missing due to a bad pinctrl/mux
setup.

Could you please add the pinctrl nand definitions to
the dts so he can test again?

Regards,
Christian

--- End Message ---
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] ramips-mt7621: add dts for UBNT-ERX-SFP

2017-05-06 Thread Mathias Kresin

06.05.2017 16:23, Sven Roederer:

On Freitag, 5. Mai 2017 14:34:18 CEST Mathias Kresin wrote:

+#include "mt7621.dtsi"
+
+/ {
+   model = "UBNT-ERX-SFP";
+
+   memory@0 {


In some of the other dts-files I found the "compatible"-property. Which is not
defined for this board.

should I include something like compatible = "ubiquiti,edgerouterx"; to the
dtsi-file?
And then consequently compatible = "ubiquiti,edgerouterx-sfp" to the UBNT-ERX-
SFP.dts?


Yes, please do it exactly this way.

Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] ramips-mt7621: add dts for UBNT-ERX-SFP

2017-05-06 Thread Sven Roederer
On Freitag, 5. Mai 2017 14:34:18 CEST Mathias Kresin wrote:
> > +#include "mt7621.dtsi"
> > +
> > +/ {
> > +   model = "UBNT-ERX-SFP";
> > +
> > +   memory@0 {

In some of the other dts-files I found the "compatible"-property. Which is not 
defined for this board.

should I include something like compatible = "ubiquiti,edgerouterx"; to the 
dtsi-file?
And then consequently compatible = "ubiquiti,edgerouterx-sfp" to the UBNT-ERX-
SFP.dts?

Sven

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH netifd] interface: add new "ifup-failed" hotplug event

2017-05-06 Thread Jo-Philipp Wich
Hi,

> Are there any comments about this patch?

can't you achieve the same by simply watching ifdown events and checking
ifstatus/devstatus indicators?

~ Jo

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ipq806x: Add nand boot support for ipq40xx AP-DK04.1-C1

2017-05-06 Thread Ram Chandra Jangir

  On Fri, May 5, 2017 at 10:39 PM, Matthew McClintock  
wrote:
>On Fri, May 5, 2017 at 12:00 PM, John Crispin  wrote:
> On 05/05/17 17:49, Ram Chandra Jangir wrote:
>>
>> This change add nand boot support for IPQ40xx based
>> AP-DK04.1-C1 board using ubi image, also add sysupgrage support for 
>> AP-DK04.1-C1 and generates a sysupgrade.tar image.
>>
>> Testing:
>> *Tested on IPQ40xx AP-DK04.1-C1 and IPQ806x AP148 Board:
>>a. NAND boot
>>b. ubi sysupgrade
>>
>> Signed-off-by: Ram Chandra Jangir 
>
> Hi Ram,
>
> have you posted this driver upstream already ?

>It's been posted before:

>https://patchwork.kernel.org/project/linux-arm-msm/list/?submitter=163301

>-M

Thanks Matt,

John:  BAM  DMA engine driver has been also submitted before:
https://patchwork.kernel.org/patch/3807381/ 

Thanks,
Ram


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/3] ramips-mt7621: add GPIO-config for Ubiquiti-EdgeRouterX(-SFP)

2017-05-06 Thread Sven Roederer
On Freitag, 5. Mai 2017 14:32:12 CEST Mathias Kresin wrote:
> Is it necessary to control the GPIOs from userspace/via config files?
> If not, add a gpio_export node to the dts and set the output value
> this way [0].
> 

To have it in userspace is the best (only?) option to enable / disable or 
power-cycle the attached PoE-equipment. 
Or is there something better?

Sven

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] imx6: add gw560x support

2017-05-06 Thread Mathias Kresin

05.05.2017 22:15, Tim Harvey:

Signed-off-by: Tim Harvey 


Hey Tim,

would you please include a short description about the hardware and how 
to install LEDE on the board in your commit message! Have a look at the 
recent board additions for some examples.


I prefer to have backports (even for device tree files) as patches in 
patches-*. But I've no strong opinion on this. But please mention in the 
commit message in case something is a backport.


Beside of that, look good to me.
Mathias



---
 .../linux/imx6/base-files/etc/board.d/02_network   |   1 +
 target/linux/imx6/base-files/lib/imx6.sh   |   5 +
 .../files-4.9/arch/arm/boot/dts/imx6dl-gw560x.dts  |  55 ++
 .../files-4.9/arch/arm/boot/dts/imx6q-gw560x.dts   |  59 ++
 .../arch/arm/boot/dts/imx6qdl-gw560x.dtsi  | 750 +
 target/linux/imx6/image/Makefile   |   4 +-
 ...-imx-add-gateworks-ventana-gw560x-support.patch |  18 +
 7 files changed, 891 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6dl-gw560x.dts
 create mode 100644 
target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6q-gw560x.dts
 create mode 100644 
target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6qdl-gw560x.dtsi
 create mode 100644 
target/linux/imx6/patches-4.9/0002-arm-dts-imx-add-gateworks-ventana-gw560x-support.patch

diff --git a/target/linux/imx6/base-files/etc/board.d/02_network 
b/target/linux/imx6/base-files/etc/board.d/02_network
index fbe3eea..e315a48 100755
--- a/target/linux/imx6/base-files/etc/board.d/02_network
+++ b/target/linux/imx6/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ board_config_update
 case "$board" in
 *gw51xx |\
 *gw52xx |\
+*gw560x |\
 *gw5904)
ucidef_set_interface_lan 'eth0'
;;
diff --git a/target/linux/imx6/base-files/lib/imx6.sh 
b/target/linux/imx6/base-files/lib/imx6.sh
index 8254cac..0e8c343 100755
--- a/target/linux/imx6/base-files/lib/imx6.sh
+++ b/target/linux/imx6/base-files/lib/imx6.sh
@@ -49,6 +49,11 @@ imx6_board_detect() {
name="gw553x"
;;

+   "Gateworks Ventana i.MX6 DualLite/Solo GW560X" |\
+   "Gateworks Ventana i.MX6 Dual/Quad GW560X")
+   name="gw560x"
+   ;;
+
"Gateworks Ventana i.MX6 DualLite/Solo GW5904" |\
"Gateworks Ventana i.MX6 Dual/Quad GW5904")
name="gw5904"
diff --git a/target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6dl-gw560x.dts 
b/target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6dl-gw560x.dts
new file mode 100644
index 000..21bdfaf
--- /dev/null
+++ b/target/linux/imx6/files-4.9/arch/arm/boot/dts/imx6dl-gw560x.dts
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2017 Gateworks Corporation
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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 file; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"