Re: [OpenWrt-Devel] [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

2019-03-01 Thread Jeff Kletsky


(Resend using git-send-email to resolve mangling)

Update of patch based on feedback that the variants
have different colors for the LEDs. Confirmed with
OEM that they are not all green, in contrast to the
presently mach file in OEM's source.

This patch is now self-contained.

Patch [2/2] in this series should be withdrawn.

See also https://patchwork.ozlabs.org/patch/1049396/

Jeff Kletsky


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


Re: [OpenWrt-Devel] [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

2019-03-01 Thread Jeff Kletsky

Update of patch based on feedback that the variants
have different colors for the LEDs. Confirmed with
OEM that they are not all green, in contrast to the
presently mach file in OEM's source.

This patch is now self-contained.

Patch [2/2] in this series should be withdrawn.

See also https://patchwork.ozlabs.org/patch/1049396/

Jeff Kletsky


From 5536569e7cf589d3c64e1405937c56c931f30eaa Mon Sep 17 00:00:00 2001
From: Jeff Kletsky 
Date: Wed, 16 Jan 2019 12:32:15 -0800
Subject: [PATCH] ath79: Add GL.iNet AR300M-Lite

AR300M-Lite is single-Ethernet variant of the AR300M series
Its eth0 would otherwise be assigned to the WAN interface
making it unreachable firstboot or failsafe.

Installation instructions from OEM (OpenWrt variant):
* Install sysupgrade.bin using OEM's "Advanced" GUI (LuCI),
   * Do not preserve settings
   * Access rebooted device via Ethernet at OpenWrt default address

Runtime-tested:  GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky 
---
 .../linux/ath79/base-files/etc/board.d/02_network  |  1 +
 .../ath79/dts/qca9531_glinet_gl-ar300m-lite.dts    | 22 +
 .../ath79/dts/qca9531_glinet_gl-ar300m-nand.dts    | 34 -
 .../ath79/dts/qca9531_glinet_gl-ar300m-nor.dts | 39 ---
 .../linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi  | 57 
+++---

 target/linux/ath79/image/generic.mk    | 14 +-
 6 files changed, 84 insertions(+), 83 deletions(-)
 create mode 100644 
target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts


diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network

index f1171695bd..a275af0e9e 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
 devolo,dvl1200i|\
 devolo,dvl1750c|\
 devolo,dvl1750i|\
+    glinet,ar300m-lite|\
 ocedo,koala|\
 ocedo,raccoon|\
 pcs,cap324|\
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts

new file mode 100644
index 00..fba08e4295
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
@@ -0,0 +1,22 @@
+/dts-v1/;
+
+#include "qca9531_glinet_gl-ar300m-nor.dts"
+
+/ {
+    compatible = "glinet,gl-ar300m-lite", "qca,qca9531";
+    model = "GL.iNet GL-AR300M-Lite";
+};
+
+// GL-AR300M-Lite has different LED colors than the non-Lite version
+
+_status {
+    label = "gl-ar300m-lite:red:status";
+};
+
+_lan {
+    label = "gl-ar300m-lite:green:lan";
+};
+
+_wlan {
+    label = "gl-ar300m-lite:green:wlan";
+};
\ No newline at end of file
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts

index 9e78f83a76..26c30f2b72 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts
@@ -8,42 +8,8 @@
 };

  {
-    status = "okay";
 num-cs = <1>;

-    flash@0 {
-        compatible = "winbond,w25q128", "jedec,spi-nor";
-        reg = <0>;
-        spi-max-frequency = <2500>;
-
-        partitions {
-            compatible = "fixed-partitions";
-            #address-cells = <1>;
-            #size-cells = <1>;
-
-            partition@0 {
-                label = "u-boot";
-                reg = <0x00 0x04>;
-                read-only;
-            };
-
-            partition@1 {
-                label = "u-boot-env";
-                reg = <0x04 0x01>;
-            };
-
-            partition@2 {
-                label = "reserved";
-                reg = <0x05 0xfa>;
-            };
-
-            art: partition@3 {
-                label = "art";
-                reg = <0xff 0x01>;
-            };
-        };
-    };
-
 flash@1 {
     compatible = "spinand,mt29f";
     reg = <1>;
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts

index 6b77af0401..02196cf9c4 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts
@@ -9,42 +9,3 @@
 compatible = "glinet,gl-ar300m-nor", "qca,qca9531";
 model = "GL.iNet GL-AR300M (NOR)";
 };
-
- {
-    status = "okay";
-    num-cs = <0>;
-
-    flash@0 {
-        compatible = "winbond,w25q128", "jedec,spi-nor";
-        reg = <0>;
-        spi-max-frequency = <2500>;
-
-        partitions {
-            compatible = "fixed-partitions";
-            #address-cells = <1>;
-            #size-cells = <1>;
-
-            partition@0 {
-                label = "u-boot";
-                reg = <0x00 0x04>;
-                read-only;
-            };
-
-            partition@1 {
-                label = "u-boot-env";
-                reg = <0x04 0x01>;
-            };
-
-            

Re: [OpenWrt-Devel] [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

2019-02-17 Thread Jeff Kletsky


On 2/16/19 12:03 PM, w...@reboot.ch wrote:

Hello Jeff,

I did try your suggested change but really not sure to have done that correctly,
this is what lsusb shows while I have a wifi usb dongle connected (also tried 
with memory stick):

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

No luck to use USB. Did you had a chance to have a look?

Thank you!
- will



I built an image this morning and my AR300M-Lite recognizes devices and 
attaches drivers as expected


root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

(start following log and insert Transcend card reader)

root@OpenWrt:~# logread -f
Sun Feb 17 15:52:01 2019 kern.info kernel: [  763.408605] usb 1-1: new 
high-speed USB device number 2 using ehci-platform
Sun Feb 17 15:52:01 2019 kern.info kernel: [  763.613737] usb-storage 
1-1:1.0: USB Mass Storage device detected
Sun Feb 17 15:52:01 2019 kern.info kernel: [  763.621082] scsi host0: 
usb-storage 1-1:1.0
Sun Feb 17 15:52:02 2019 kern.notice kernel: [  764.670474] scsi 
0:0:0:0: Direct-Access TS-RDF5  SD  Transcend    TS35 PQ: 0 ANSI: 6
Sun Feb 17 15:52:02 2019 kern.notice kernel: [  764.685408] sd 0:0:0:0: 
[sda] Attached SCSI removable disk


root@OpenWrt:~# lsusb
Bus 001 Device 002: ID 8564:4000 Transcend Information, Inc. RDF8
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Do you have the proper USB drivers installed?

Test above performed with

jeff@deb-devel:~/devel/openwrt-ar300m$ ./scripts/diffconfig.sh | fgrep usb
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage-uas=y
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_usbutils=y


Jeff



On 4 Feb 2019, at 21:59, Jeff Kletsky  wrote:

On 2/4/19 4:20 AM, w...@reboot.ch wrote:


Hello Jeff, thanks for adding GL.iNet AR-300M-Lite !

I can't test it as it's not yet merged into master I think,
I'm currently using GL.iNet AR-300M settings with a GL.iNet AR-300M-Lite box
and USB is not working, lsusb shows nothing.

Wondering if it's a known issue and if your latest patches fix it.

Thank you!
- will

It will be this evening, GMT+8, until I will be able to check, but it wouldn't surprise 
me if the change to "gl-ar300m:green:usb" in the DTS will resolve the issue. I 
can imagine all kinds of problems with a trigger on a USB device-present flipping the USB 
power!

Until then, you can try changing the trigger to "always on" in 
/etc/config/system or through LuCI.

Jeff




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


Re: [OpenWrt-Devel] [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

2019-02-04 Thread Jeff Kletsky

On 2/4/19 4:20 AM, w...@reboot.ch wrote:


Hello Jeff, thanks for adding GL.iNet AR-300M-Lite !

I can't test it as it's not yet merged into master I think,
I'm currently using GL.iNet AR-300M settings with a GL.iNet AR-300M-Lite box
and USB is not working, lsusb shows nothing.

Wondering if it's a known issue and if your latest patches fix it.

Thank you!
- will


It will be this evening, GMT+8, until I will be able to check, but it 
wouldn't surprise me if the change to "gl-ar300m:green:usb" in the DTS 
will resolve the issue. I can imagine all kinds of problems with a 
trigger on a USB device-present flipping the USB power!


Until then, you can try changing the trigger to "always on" in 
/etc/config/system or through LuCI.


Jeff



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


[OpenWrt-Devel] [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

2019-01-27 Thread Jeff Kletsky

Resend as per M. Kreskin


From 2e3b968813e3862c5319c6c360781b0921d4b413 Mon Sep 17 00:00:00 2001
From: Jeff Kletsky 
Date: Sun, 20 Jan 2019 14:07:30 -0800
Subject: [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite

AR300M-Lite is single-Ethernet variant of the AR300M series
Its eth0 would otherwise be assigned to the WAN interface
making it unreachable firstboot or failsafe.

Installation instructions from OEM (OpenWrt variant):
* Install sysupgrade.bin using OEM's "Advanced" GUI (LuCI),
  * Do not preserve settings
* Access rebooted device via Ethernet at OpenWrt default address

Runtime-tested:  GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky 
---
 target/linux/ath79/base-files/etc/board.d/02_network |  1 +
 target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts |  8 
 target/linux/ath79/image/generic.mk  | 14 
--

 3 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts


diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network

index 3eb0e413f3..fa947203f8 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
 devolo,dvl1200i|\
 devolo,dvl1750c|\
 devolo,dvl1750i|\
+    glinet,ar300m-lite|\
 ocedo,koala|\
 ocedo,raccoon|\
 pcs,cap324|\
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts

new file mode 100644
index 00..b14d1a47a9
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
@@ -0,0 +1,8 @@
+/dts-v1/;
+
+#include "qca9531_glinet_gl-ar300m-nor.dts"
+
+/ {
+    compatible = "glinet,gl-ar300m-lite", "qca,qca9531";
+    model = "GL.iNet GL-AR300M-Lite";
+};
diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk

index 22ba5305b1..2021d83471 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -296,13 +296,23 @@ define Device/glinet_gl-ar150
 endef
 TARGET_DEVICES += glinet_gl-ar150

-define Device/glinet_gl-ar300m-nor
+define Device/glinet_gl-ar300m-common-nor
   ATH_SOC := qca9531
-  DEVICE_TITLE := GL.iNet GL-AR300M
   DEVICE_PACKAGES := kmod-usb-core kmod-usb2
   IMAGE_SIZE := 16000k
   SUPPORTED_DEVICES += gl-ar300m
 endef
+
+define Device/glinet_gl-ar300m-lite
+  $(Device/glinet_gl-ar300m-common-nor)
+  DEVICE_TITLE := GL.iNet GL-AR300M-Lite
+endef
+TARGET_DEVICES += glinet_gl-ar300m-lite
+
+define Device/glinet_gl-ar300m-nor
+  $(Device/glinet_gl-ar300m-common-nor)
+  DEVICE_TITLE := GL.iNet GL-AR300M
+endef
 TARGET_DEVICES += glinet_gl-ar300m-nor

 define Device/glinet_gl-ar750s
--
2.11.0



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