bcm4908: NetGear OEM firmware for R7900P identical to R8000P

2021-12-14 Thread Heppler, J. Scott via openwrt-devel
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 ---

The information supporting the Subject is documented in this OpenWRT
forum thread:

https://forum.openwrt.org/t/kernel-patches-netgear-r8000p-r7900p/114540

My neighbor has a R7900P and it is likely to be unsupported from a
security point-of-view shortly (Netgear stops all support 3 years after
the last unit is manufactured).  I was going to try to build a R7900P
image labeled as such but am not sure what to do with the kernel 5.10
patches.  Duplicating the patches might work for my build, but the
projects bulk builds would patch a previously patched kernel.

I previously added the TRENDnet TEW-810DR which had the same Board ID as
the D-Link DIR-810L which did not involve kernel patches.  Any guidance
on how to deal with the patches?

--
J. Scott Heppler

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


bcm4908: NetGear OEM firmware for R7900P identical to R8000P

2021-12-14 Thread Heppler, J. Scott via openwrt-devel
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 ---

The information supporting the Subject is documented in this OpenWRT
forum thread:

https://forum.openwrt.org/t/kernel-patches-netgear-r8000p-r7900p/114540

My neighbor has a R7900P and it is likely to be unsupported from a
security point-of-view shortly (Netgear stops all support 3 years after
the last unit is manufactured).  I was going to try to build a R7900P
image labeled as such but am not sure what to do with the kernel 5.10
patches.  Duplicating the patches might work for my build, but the
projects bulk builds would patch a previously patched kernel.

I previously added the TRENDnet TEW-810DR which had the same Board ID as
the D-Link DIR-810L. It did not involve kernel patches.  Any guidance on
how to deal with the patches?


--
J. Scott Heppler

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


[PATCH v3] ramips: add support for Linksys EA7300 v2

2020-09-22 Thread Heppler, J. Scott

ramips:  add  support  for  Linksys  EA7300  v2

This submission relied heavily on the work of
Santiago Rodriguez-Papa 

Specifications:

*  SoC: MediaTek  MT7621A   (880  MHz  2c/4t)
*  RAM: Winbond W632GG6MB-12(256M  DDR3-1600)
*  Flash:   Winbond W29N01HVSINA(128M  NAND)
*  Eth: MediaTek  MT7621A   (10/100/1000  Mbps  x5)
*  Radio:   MT7603E/MT7615N (2.4  GHz  &  5  GHz)
 4  antennae:  1  internal  and  3  non-deatachable
*  USB: 3.0  (x1)
*  LEDs:
 White  (x1  logo)
 Green  (x6  eth  +  wps)
 Orange (x5,  hardware-bound)
*  Buttons:
 Reset  (x1)
 WPS(x1)

Installation:

Flash  factory  image  through  GUI.

This  might  fail  due  to  the  A/B  nature  of  this  device.  When  
flashing,  OEM
firmware  writes  over  the  non-booted  partition.  If  booted  from  'A',
flashing  over  'B'  won't  work.  To  get  around  this,  you  should  flash  
the
OEM  image  over  itself.  This  will  then  boot  the  router  from  'B'  and
allow  you  to  flash  OpenWRT  without  problems.

Reverting  to  factory  firmware:

Hard-reset  the  router  three  times  to  force  it  to  boot  from  'B.'  
This  is
where  the  stock  firmware  resides.  To  remove  any  traces  of  OpenWRT  
from
your  router  simply  flash  the  OEM  image  at  this  point.

Signed-off-by: J. Scott Heppler 
---
  package/boot/uboot-envtools/files/ramips  |  1 +
  .../ramips/dts/mt7621_linksys_ea7300-v2.dts   | 55 +++
  target/linux/ramips/image/mt7621.mk   |  9 +++
  .../mt7621/base-files/etc/board.d/01_leds |  1 +
  .../mt7621/base-files/etc/board.d/02_network  |  1 +
  .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |  1 +
  .../mt7621/base-files/etc/init.d/bootcount|  1 +
  .../mt7621/base-files/lib/upgrade/platform.sh |  1 +
  8 files changed, 70 insertions(+)
  create mode 100644 target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index 6ff04b26e8..14c12bbf09 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -40,6 +40,7 @@ ravpower,rp-wd03)
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" 
"0x1000"
;;
  linksys,ea7300-v1|\
+linksys,ea7300-v2|\
  linksys,ea7500-v2|\
  xiaomi,mi-router-ac2100|\
  xiaomi,mir3p|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts 
b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
new file mode 100644
index 00..f7330d1c86
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+   compatible = "linksys,ea7300-v2", "mediatek,mt7621-soc";
+   model = "Linksys EA7300 v2";
+
+   aliases {
+   led-boot = _power;
+   led-failsafe = _power;
+   led-running = _power;
+   led-upgrade = _power;
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   wan_green {
+   label = "ea7300-v2:green:wan";
+   gpios = < 7 GPIO_ACTIVE_LOW>;
+   };
+
+   lan1_green {
+   label = "ea7300-v2:green:lan1";
+   gpios = < 3 GPIO_ACTIVE_LOW>;
+   };
+
+   lan2_green {
+   label = "ea7300-v2:green:lan2";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   };
+
+   lan3_green {
+   label = "ea7300-v2:green:lan3";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   lan4_green {
+   label = "ea7300-v2:green:lan4";
+   gpios = < 15 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power: power {
+   label = "ea7300-v2:white:power";
+   gpios = < 10 GPIO_ACTIVE_HIGH>;
+   };
+
+   wps {
+   label = "ea7300-v2:green:wps";
+   gpios = < 5 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index 78629563ee..274d9f7158 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -655,6 +655,15 @@ define Device/linksys_ea7300-v1
  endef
  TARGET_DEVICES += linksys_ea7300-v1
  
+define Device/linksys_ea7300-v2

+  $(Device/linksys_ea7xxx)
+  DEVICE_MODEL := EA7300
+  DEVICE_VARIANT := v2
+  LINKSYS_HWNAME := EA7300v2
+  DEVICE_PACKAGES += kmod-mt7603
+endef
+TARGET_DEVICES += linksys_ea7300-v2
+
  define 

[PATCH v2]ramips: add support for Linksys EA7300 v2

2020-09-22 Thread Heppler, J. Scott

ramips:  add  support  for  Linksys  EA7300  v2

This submission relied heavily on the work of
Santiago Rodriguez-Papa 

Specifications:

*  SoC: MediaTek  MT7621A   (880  MHz  2c/4t)
*  RAM: Winbond W632GG6MB-12(256M  DDR3-1600)
*  Flash:   Winbond W29N01HVSINA(128M  NAND)
*  Eth: MediaTek  MT7621A   (10/100/1000  Mbps  x5)
*  Radio:   MT7603E/MT7615N (2.4  GHz  &  5  GHz)
4  antennae:  1  internal  and  3  non-deatachable
*  USB: 3.0  (x1)
*  LEDs:
White   (x1  logo)
Green   (x6  eth  +  wps)
Orange  (x5,  hardware-bound)
*  Buttons:
Reset   (x1)
WPS (x1)

Installation:

Flash  factory  image  through  GUI.

This  might  fail  due  to  the  A/B  nature  of  this  device.  When  
flashing,  OEM
firmware  writes  over  the  non-booted  partition.  If  booted  from  'A',
flashing  over  'B'  won't  work.  To  get  around  this,  you  should  flash  
the
OEM  image  over  itself.  This  will  then  boot  the  router  from  'B'  and
allow  you  to  flash  OpenWRT  without  problems.

Reverting  to  factory  firmware:

Hard-reset  the  router  three  times  to  force  it  to  boot  from  'B.'  
This  is
where  the  stock  firmware  resides.  To  remove  any  traces  of  OpenWRT  
from
your  router  simply  flash  the  OEM  image  at  this  point.
---
 package/boot/uboot-envtools/files/ramips  |  1 +
 .../ramips/dts/mt7621_linksys_ea7300-v2.dts   | 55 +++
 target/linux/ramips/image/mt7621.mk   |  9 +++
 .../mt7621/base-files/etc/board.d/01_leds |  1 +
 .../mt7621/base-files/etc/board.d/02_network  |  1 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |  1 +
 .../mt7621/base-files/etc/init.d/bootcount|  1 +
 .../mt7621/base-files/lib/upgrade/platform.sh |  1 +
 8 files changed, 70 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index 6ff04b26e8..14c12bbf09 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -40,6 +40,7 @@ ravpower,rp-wd03)
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" 
"0x1000"
;;
 linksys,ea7300-v1|\
+linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 xiaomi,mi-router-ac2100|\
 xiaomi,mir3p|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts 
b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
new file mode 100644
index 00..f7330d1c86
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+   compatible = "linksys,ea7300-v2", "mediatek,mt7621-soc";
+   model = "Linksys EA7300 v2";
+
+   aliases {
+   led-boot = _power;
+   led-failsafe = _power;
+   led-running = _power;
+   led-upgrade = _power;
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   wan_green {
+   label = "ea7300-v2:green:wan";
+   gpios = < 7 GPIO_ACTIVE_LOW>;
+   };
+
+   lan1_green {
+   label = "ea7300-v2:green:lan1";
+   gpios = < 3 GPIO_ACTIVE_LOW>;
+   };
+
+   lan2_green {
+   label = "ea7300-v2:green:lan2";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   };
+
+   lan3_green {
+   label = "ea7300-v2:green:lan3";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   lan4_green {
+   label = "ea7300-v2:green:lan4";
+   gpios = < 15 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power: power {
+   label = "ea7300-v2:white:power";
+   gpios = < 10 GPIO_ACTIVE_HIGH>;
+   };
+
+   wps {
+   label = "ea7300-v2:green:wps";
+   gpios = < 5 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index 78629563ee..274d9f7158 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -655,6 +655,15 @@ define Device/linksys_ea7300-v1
 endef
 TARGET_DEVICES += linksys_ea7300-v1
 
+define Device/linksys_ea7300-v2

+  $(Device/linksys_ea7xxx)
+  DEVICE_MODEL := EA7300
+  DEVICE_VARIANT := v2
+  LINKSYS_HWNAME := EA7300v2
+  DEVICE_PACKAGES += kmod-mt7603
+endef
+TARGET_DEVICES += linksys_ea7300-v2
+
 define Device/linksys_ea7500-v2
   $(Device/linksys_ea7xxx)
   DEVICE_MODEL 

[PATCH]ramips: add support for Linksys EA7300 v2

2020-09-22 Thread Heppler, J. Scott



ramips:  add  support  for  Linksys  EA7300  v2

This submission relied heavily on the work of
Santiago Rodriguez-Papa 

Specifications:

*  SoC:MediaTek  MT7621A(880  MHz  
2c/4t)
*  RAM:Nanya  NT5CC128M16IP-DIT  (256M  DDR3-1600)
*  Flash:Macronix  MX30LF1G18AC-TI(128M  NAND)
*  Eth:MediaTek  MT7621A(10/100/1000  
Mbps  x5)
*  Radio:MT7603E/MT7615N   (2.4  GHz  
&  5  GHz)
4  antennae:  1  internal  and  3  non-deatachable
*  USB:3.0  (x1)
*  LEDs:
White  (x1  logo)
Green  (x6  eth  +  wps)
Orange(x5,  hardware-bound)
*  Buttons:
Reset  (x1)
WPS  (x1)

Installation:

Flash  factory  image  through  GUI.

This  might  fail  due  to  the  A/B  nature  of  this  device.  When  
flashing,  OEM
firmware  writes  over  the  non-booted  partition.  If  booted  from  'A',
flashing  over  'B'  won't  work.  To  get  around  this,  you  should  flash  
the
OEM  image  over  itself.  This  will  then  boot  the  router  from  'B'  and
allow  you  to  flash  OpenWRT  without  problems.

Reverting  to  factory  firmware:

Hard-reset  the  router  three  times  to  force  it  to  boot  from  'B.'  
This  is
where  the  stock  firmware  resides.  To  remove  any  traces  of  OpenWRT  
from
your  router  simply  flash  the  OEM  image  at  this  point.
---
 package/boot/uboot-envtools/files/ramips  |  1 +
 .../ramips/dts/mt7621_linksys_ea7300-v2.dts   | 55 +++
 target/linux/ramips/image/mt7621.mk   |  9 +++
 .../mt7621/base-files/etc/board.d/01_leds |  1 +
 .../mt7621/base-files/etc/board.d/02_network  |  1 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |  1 +
 .../mt7621/base-files/etc/init.d/bootcount|  1 +
 .../mt7621/base-files/lib/upgrade/platform.sh |  1 +
 8 files changed, 70 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index 6ff04b26e8..14c12bbf09 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -40,6 +40,7 @@ ravpower,rp-wd03)
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" 
"0x1000"
;;
 linksys,ea7300-v1|\
+linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 xiaomi,mi-router-ac2100|\
 xiaomi,mir3p|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts 
b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
new file mode 100644
index 00..f7330d1c86
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+   compatible = "linksys,ea7300-v2", "mediatek,mt7621-soc";
+   model = "Linksys EA7300 v2";
+
+   aliases {
+   led-boot = _power;
+   led-failsafe = _power;
+   led-running = _power;
+   led-upgrade = _power;
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   wan_green {
+   label = "ea7300-v2:green:wan";
+   gpios = < 7 GPIO_ACTIVE_LOW>;
+   };
+
+   lan1_green {
+   label = "ea7300-v2:green:lan1";
+   gpios = < 3 GPIO_ACTIVE_LOW>;
+   };
+
+   lan2_green {
+   label = "ea7300-v2:green:lan2";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   };
+
+   lan3_green {
+   label = "ea7300-v2:green:lan3";
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   lan4_green {
+   label = "ea7300-v2:green:lan4";
+   gpios = < 15 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power: power {
+   label = "ea7300-v2:white:power";
+   gpios = < 10 GPIO_ACTIVE_HIGH>;
+   };
+
+   wps {
+   label = "ea7300-v2:green:wps";
+   gpios = < 5 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index 78629563ee..274d9f7158 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -655,6 +655,15 @@ define Device/linksys_ea7300-v1
 endef
 TARGET_DEVICES += linksys_ea7300-v1
 
+define Device/linksys_ea7300-v2

+  $(Device/linksys_ea7xxx)
+  DEVICE_MODEL := EA7300
+  DEVICE_VARIANT := v2
+  LINKSYS_HWNAME := EA7300v2
+  DEVICE_PACKAGES += kmod-mt7603
+endef
+TARGET_DEVICES += linksys_ea7300-v2
+
 define Device/linksys_ea7500-v2
   

mt7603 radio not enabled in Linksys EA7300 V2 build

2020-09-21 Thread Heppler, J. Scott

My build, based on the EA7300v1 build has 2 glitches, the mt7603 radio
is not enable and the switch does not show in LuCi.  The switch does
seem to function.

I essentially edited all the EA7300v1 commits and duplicated/edited the
EA7300v1 dts to a EA7300v2.  In the image/mt7621.mk entry, I appended 
DEVICE_PACKAGES += kmod-mt7603.  If specific files are needed to review,

beyond, my overview, I'm glad to provide them.


Hopefully, fixing this will not open up a can of worms in the *ea7xxx
dtsi.

--
J. Scott Heppler

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


Quick question on Linksys EA7300 V2

2020-09-20 Thread Heppler, J. Scott

Based on the commit of Santiago Rodruquez-Papa, for a Linksys EA7300 V1,
I purchased a factory recertified EA7300 - version was not advertised.
On arrival, it was a version 2.

I researched and V2 is almost the same as V1 except it has 7603/7615
radios instead of a pair of 7615s.  The memory/flash is the same size
but from different manufactures.  I posted the details, with wikidevi
links, and the modifications I made to the code in the OpenWrt forum.
It built fine but I'm looking for some reassurance before flashing.  I
understand the case is difficult to pry open and I'd like to avoid the
possibility of soldering/serial console.

Any comments or suggestions appreciated.  If it works, I intend to submit
a patch.  Also have a question on the description.  I could copy/paste
Santiago's description with 4 small edits or link/reference his work with
a shorter description of the differences.  I expect the lengthy install
procedure to be the same and will confirm prior to submission.

https://forum.openwrt.org/t/add-support-for-linksys-ea7300-v2/74563

Thanks
--
J. Scott Heppler

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


Re: Licensing an OpenWrt router - No response to Trademark use

2020-08-19 Thread Heppler, J. Scott

Too much effort to say "No interest at this time?"

On Aug 19, 2020: 23:25, Piotr Dymacz wrote:

Hi Scott,

On 18.08.2020 23:27, Heppler, J. Scott wrote:

request.
Reply-To:
Organization:

I sent an email to cont...@openwrt.org, subject line Trademark Use
Request, inquiring about crowd funding an OpenWrt router.  I never
received a reply.  The email gave the background, links to forum
discussion and a poll and outlined the basic structure.  The contents:


Probably nobody with access to this mailbox was interested in your idea.

[...]


Would the project be interested in exploring this further?"


Personally, I don't think so. 3y ago we (some of devs with commit 
access) were discussing similar idea. But there just wasn't enough 
interest in it.


--
Cheers,
Piotr


--
J. Scott Heppler

Penguin Innovations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 



NOTICE: This e-mail message and any attachments may
contain legally privileged and confidential information intended
solely for the use of the intended recipients. If you are not an
intended recipient, you are hereby notified that you have
received this message in error and any review, dissemination,
distribution, copying, or other unauthorized use of this email
and any attachment is strictly prohibited. If you have received
this email in error, please notify the sender immediately and
delete the message and any attachments from your system.

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


Re: Licensing an OpenWrt router - No response to Trademark use

2020-08-19 Thread Heppler, J. Scott

The approach I was taking was based on choosing the actual chips based
on developer input and then find a HW who can provide based on those
recommendations.

I also lean toward a lower price point for an initial production run -
this is new ground and it lowers financial risk.  The initial run, if
successful, can serve as a template for higher end devices.

I believe the developers would have opinions based on open source
support and HW design.  I've seen OpenWrt wiki's discussing things like
Flash/Ram size that are HW specific; eg Qualcomm Dual 5G ram.

So, the initial question stands, is there interest from the project
putting its name on a device and are developers willing to input?

Thanks


On Aug 18, 2020: 14:46, Ben Greear wrote:

Hello,

Consider perhaps the TIP project?  It has HW manufacturers on board to
build platforms known to work and tested with OpenWrt

https://telecominfraproject.com/wifi/

If you have a particular price point you're trying to meet, I'm
curious to know...

Thanks,
Ben

On 8/18/20 2:27 PM, Heppler, J. Scott wrote:

request.
Reply-To: Organization:

I sent an email to cont...@openwrt.org, subject line Trademark Use
Request, inquiring about crowd funding an OpenWrt router.?? I never
received a reply.?? The email gave the background, links to forum
discussion and a poll and outlined the basic structure.?? The contents:

"I've noticed that OpenWrt is used widely in SOHO routers without the
vendors providing much in the way of donations.?? Additionally, vendors
are making it increasingly difficult; bootdelay = 0, disabled keyboard
input etc., to install OpenWrt.

Browsing Alibaba/Aliexpress, there are large numbers of Chinese vendors
offering routers with custom branding for purchases > 500.?? Many offer
products with the same outward appearance/specs and I think the line
between resellers/OEM's is blurry.

This link is an example:
https://www.alibaba.com/product-detail/EP-RT2656-Wireless-Routers-1300mbps-compa
tible_62040312059.html?spm=a2700.wholesale.deiletai6.2.1ab67d83z4DNLg
This is recognizable as a device sold by Lenovo/D-team and is offered
with both u-boot/breed bootloader.

Comfast has used OpenWrt in the CF-WR618AC and CF-WR-610N routers.
http://en.comfast.com.cn/index.php?m=content=index=show=16=24
Comfast uses OpenWrt and does not provide GPL'd source.
https://forum.archive.openwrt.org/viewtopic.php?id=58973

It occurred to me that one way to have an OpenWrt accessible router, and
support the project would be to crowd fund an OpenWrt Development router
and build in an OpenWrt donation into the cost.?? It would be somewhat
like the PineBook Pro, orders taken and if a threshold met, a production
run is certified.?? OpenWrt would license the logo and provide stable
firmware for initial flash and development firmware via download.?? The
donations would be earmarked to support infrastructure or development
meetings (Like OpenBSD).

A poll was setup and run for 2 weeks:
https://forum.openwrt.org/t/poll-interest-in-an-openwrt-purpose-built-router/692
95d
A prior thread where the idea was kicked around:
https://forum.openwrt.org/t/advertising-and-selling-routers-with-openwrt-lede-in
stalled/12372/3
Some respondents wanted high end routers but I'm pushing for limiting
risk.

Would the project be interested in exploring this further?"






--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com


--
J. Scott Heppler

Penguin Innovations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 



NOTICE: This e-mail message and any attachments may
contain legally privileged and confidential information intended
solely for the use of the intended recipients. If you are not an
intended recipient, you are hereby notified that you have
received this message in error and any review, dissemination,
distribution, copying, or other unauthorized use of this email
and any attachment is strictly prohibited. If you have received
this email in error, please notify the sender immediately and
delete the message and any attachments from your system.

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


Licensing an OpenWrt router - No response to Trademark use

2020-08-18 Thread Heppler, J. Scott

request.
Reply-To: 
Organization:


I sent an email to cont...@openwrt.org, subject line Trademark Use
Request, inquiring about crowd funding an OpenWrt router.  I never
received a reply.  The email gave the background, links to forum
discussion and a poll and outlined the basic structure.  The contents:

"I've noticed that OpenWrt is used widely in SOHO routers without the
vendors providing much in the way of donations.  Additionally, vendors
are making it increasingly difficult; bootdelay = 0, disabled keyboard
input etc., to install OpenWrt.

Browsing Alibaba/Aliexpress, there are large numbers of Chinese vendors
offering routers with custom branding for purchases > 500.  Many offer
products with the same outward appearance/specs and I think the line
between resellers/OEM's is blurry.

This link is an example:
https://www.alibaba.com/product-detail/EP-RT2656-Wireless-Routers-1300mbps-compa
tible_62040312059.html?spm=a2700.wholesale.deiletai6.2.1ab67d83z4DNLg
This is recognizable as a device sold by Lenovo/D-team and is offered
with both u-boot/breed bootloader.

Comfast has used OpenWrt in the CF-WR618AC and CF-WR-610N routers.
http://en.comfast.com.cn/index.php?m=content=index=show=16=24
Comfast uses OpenWrt and does not provide GPL'd source.
https://forum.archive.openwrt.org/viewtopic.php?id=58973

It occurred to me that one way to have an OpenWrt accessible router, and
support the project would be to crowd fund an OpenWrt Development router
and build in an OpenWrt donation into the cost.  It would be somewhat
like the PineBook Pro, orders taken and if a threshold met, a production
run is certified.  OpenWrt would license the logo and provide stable
firmware for initial flash and development firmware via download.  The
donations would be earmarked to support infrastructure or development
meetings (Like OpenBSD).

A poll was setup and run for 2 weeks:
https://forum.openwrt.org/t/poll-interest-in-an-openwrt-purpose-built-router/692
95d
A prior thread where the idea was kicked around:
https://forum.openwrt.org/t/advertising-and-selling-routers-with-openwrt-lede-in
stalled/12372/3
Some respondents wanted high end routers but I'm pushing for limiting
risk.

Would the project be interested in exploring this further?"



--
J. Scott Heppler

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


ramips: mt7621 novel art_block partition

2020-07-26 Thread Heppler, J. Scott

I came onto a Trendnet TEW-827DRU Version 2 that is MT7621an with
MT7615E x 2 wifi chips.  I was able to get UART output and stock has
these partitions:

[2.512000] 0x-0x0100 : "ALL"
[2.52] 0x-0x0003 : "Bootloader"
[2.532000] 0x0003-0x0004 : "Config"
[2.544000] 0x0004-0x0005 : "Factory"
[2.552000] 0x0005-0x00ef : "firmware"
[2.564000] 0x0005-0x0038 : "kernel"
[2.576000] 0x0038-0x00ef : "rootfs"
[2.584000] 0x00ef-0x00ff : "rootfs_data"
[2.596000] 0x00ff-0x0100 : "art_block"

I reviewed all the mt7621 *dts files and none have an art_block.
My understanding is that for Qualcomm, the art* partition contains
Atheros calibration data. I'm lost as to what and art_block is on a
mediatek device.  Trendnet can be lazy with partition naming - the
TEW-810 has a partion referred to a D-Link.

I did find a "firmware2" partition -
mt7621_asus_rt-acx5p.dtsi, a "second_config" - mt7621_mtc_wr1201.dts
that are about the same size and position.


Are there any Mediatek experts that can enlighten me and point me in the
right direction?

Thanks in advance
--
J. Scott Heppler

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


[OpenWrt-Devel] [PATCH] ramips: fix port display for TRENDnet TEW-810DR

2020-06-11 Thread Heppler, J. Scott

Was unable to communicate TEW-810DR port order was inverted similar to
the D-Link DIR-810L.  Tested - Patch corrects port order.

Signed-off-by: J. Scott Heppler 
---
 target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network 
b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index c70e4ff8e4..f85b7cfed1 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -25,7 +25,6 @@ ramips_setup_interfaces()
ralink,mt7620a-mt7610e-evb|\
ralink,mt7620a-v22sg-evb|\
sanlinking,d240|\
-   trendnet,tew-810dr|\
youku,yk1|\
zbtlink,zbt-ape522ii|\
zbtlink,zbt-we826-16m|\
@@ -109,6 +108,7 @@ ramips_setup_interfaces()
"0:lan" "6@eth0"
;;
dlink,dir-810l|\
+   trendnet,tew-810dr|\
zbtlink,zbt-we2026)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
--
2.20.1


--
J. Scott Heppler

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


[OpenWrt-Devel] [PATCH v7] ramips: add support for TRENDnet TEW-810DR

2020-05-25 Thread Heppler, J. Scott

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH * 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios both now functional
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
  Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is a 32bit binary in the GPL Source download for either
the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.
The invocation is: ncc_att_hwid
-f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0"
This may need to be altered if your hardware version is "1.1R".
The image can also be directly flashed via serial tftp.
1.  Load *.sysupgrade.bin to your tftp server directory and rename for
convenience.
2.  Set a static ip 192.168.10.100.
3.  NIC cable to a lan port.
4.  Serial connection parameters 57600,8N1
5.  Power on the TEW-810 and press 4 for a u-boot command line prompt.
6.  Verify IP's with U-Boot command "printenv".
7.  Adjust tftp settings if needed per the tftp documentation
8.  Boot the tftp image to test the build.
9.  If the image loads, reset your server ip to 192.168.1.10 and restart 
network.
10. Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image.

Summary v4 -> v5 -> v6
1.  Enumerated installation steps and corrected grammar.
2.  Added SPDX License Identifier to *.dts.
3.  gpio-keys-polled -> gpio-keys in *.dts.
4.  gpio2 0 is actually behind a Globe/Internet lens - changed to wan.
5.  Increased spi-max-frequency 1000 -> 5000
6.  jffs2 partition 0xe -> 0xf.
7.  _default groups dropped mdio, rgmii1, wled.
8.  MAC assignments mirror DIR-810L and verify in Luci.  Unchanged
02_network and *.dts.
9.  01_leds changed consistent with #4.
10. Removed SUPPORTED_DEVICES from image/mt7620.mk.  Note: the D-Link
DIR-810L has the same SUPPORTED_DEVICES entry in image/mt7620.mk.
11. Builds/Runs on my test Device.

Summary v6 -> v7
1.  White space issues in  *.dts, image/mt7620.mk, 01_leds and 02_network;
spaces replaced with tabs 


Signed-off-by: J. Scott Heppler 
---
 .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 166 ++
 target/linux/ramips/image/mt7620.mk   |   9 +
 .../mt7620/base-files/etc/board.d/01_leds |   3 +
 .../mt7620/base-files/etc/board.d/02_network  |   4 +-
 4 files changed, 181 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts 
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..2873b5d780
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,166 @@
+//SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power_green {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_orange: wan_orange {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_green: wan_green {
+   label = "tew-810dr:green:wan";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power_orange {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <5000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label 

[OpenWrt-Devel] [PATCH v6] ramips: add support for Trendnet TEW-810DR

2020-05-25 Thread Heppler, J. Scott



* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios both now functional
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
  Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is a 32bit binary in the GPL Source download for either
the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.
The invocation is: ncc_att_hwid
-f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0"
This may need to be altered if your hardware version is "1.1R".
The image can also be directly flashed via serial tftp.
1.  Load *.sysupgrade.bin to your tftp server directory and rename for
convenience.
2.  Set a static ip 192.168.10.100.
3.  NIC cable to a lan port.
4.  Serial connection parameters 57600,8N1
5.  Power on the TEW-810 and press 4 for a u-boot command line prompt.
6.  Verify IP's with U-Boot command "printenv".
7.  Adjust tftp settings if needed per the tftp documentation
8.  Boot the tftp image to test the build.
9.  If the image loads, reset your server ip to 192.168.1.10 and restart 
network.
10.  Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image.

Signed-off-by: J. Scott Heppler 

Summary v4 -> v5
1.  Enumerated installation steps and corrected grammar.
2.  Added SPDX License Identifier to *.dts.
3.  gpio-keys-polled -> gpio-keys in *.dts.
4.  gpio2 0 is actually behind a Globe/Internet lens - changed to wan.
5.  Increased spi-max-frequency 1000 -> 5000
6.  jffs2 partition 0xe -> 0xf.
7.  _default groups dropped mdio, rgmii1, wled.
8.  MAC assignments mirror DIR-810L and verify in Luci.  Unchanged
02_network and *.dts.
9.  01_leds changed consistent with #4.
10. Removed SUPPORTED_DEVICES from image/mt7620.mk.  Note: the D-Link
DIR-810L has the same SUPPORTED_DEVICES entry in image/mt7620.mk.
11. Builds/Runs on my test Device.
---
 .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 166 ++
 target/linux/ramips/image/mt7620.mk   |   9 +
 .../mt7620/base-files/etc/board.d/01_leds |   3 +
 .../mt7620/base-files/etc/board.d/02_network  |   8 +-
 4 files changed, 183 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts 
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..5012d39b51
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,166 @@
+//SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power_green {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_orange: wan_orange {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_green: wan_green {
+   label = "tew-810dr:green:wan";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power_orange {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <5000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   

[OpenWrt-Devel] [PATCH v5] ramips: add support for Trendnet TEW-810DR

2020-05-25 Thread Heppler, J. Scott



* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios both now functional
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
  Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is a 32bit binary in the GPL Source download for either
the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.
The invocation is: ncc_att_hwid
-f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0"
This may need to be altered if your hardware version is "1.1R".
The image can also be directly flashed via serial tftp.
1.  Load *.sysupgrade.bin to your tftp server directory and rename for
convenience.
2.  Set a static ip 192.168.10.100.
3.  NIC cable to a lan port.
4.  Serial connection parameters 57600,8N1
5.  Power on the TEW-810 and press 4 for a u-boot command line prompt.
6.  Verify IP's with U-Boot command "printenv".
7.  Adjust tftp settings if needed per the tftp documentation
8.  Boot the tftp image to test the build.
9.  If the image loads, reset your server ip to 192.168.1.10 and restart 
network.
10. Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image.

Signed-off-by: J. Scott Heppler 

Summary v4 -> v5
1.  Enumerated installation steps and corrected grammar.
2.  Added SPDX License Identifier to *.dts.
3.  gpio-keys-polled -> gpio-keys in *.dts.
4.  gpio2 0 is actually behind a Globe/Internet lens - changed to wan.
5.  Increased spi-max-frequency 1000 -> 5000
6.  jffs2 partition 0xe -> 0xf.
7.  _default groups; dropped mdio, rgmii1, wled.
8.  MAC assignments mirror DIR-810L code and verify in Luci.  Unchanged
02_network and *.dts.
9.  01_leds changed consistent with #4.
10. Removed SUPPORTED_DEVICES from image/mt7620.mk.  Note: the D-Link
DIR-810L has the same SUPPORTED_DEVICES entry in image/mt7620.mk.
11. Builds/Runs on my test Device.
---
 .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 166 ++
 target/linux/ramips/image/mt7620.mk   |   9 +
 .../mt7620/base-files/etc/board.d/01_leds |   3 +
 .../mt7620/base-files/etc/board.d/02_network  |   8 +-
 4 files changed, 183 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts 
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..5012d39b51
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,166 @@
+//SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power_green {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_orange: wan_orange {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan_green: wan_green {
+   label = "tew-810dr:green:wan";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+
+   led_power_orange {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+



--
J. Scott Heppler

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


[OpenWrt-Devel] [PATCH v4] ramips: add support for TRENDnet TEW-810DR

2020-05-07 Thread Heppler, J. Scott

Information for reviewers:
By report, FCCid and board photos, this device shares a Cameo manufactured
board with the D-Link DIR-810L.  The DIR-810L dts does not enable GPIO40 for
the Green Internet/Globe lan led. The TEW-810DR dts should be applicable to the
DIR-810L and would provide improved Green Internet/Globe lan led
configurability.  I believe that it would be efficient to test the potential
DIR-810L changes prior to generating a *.dtsi.  I do not have a DIR-810L to
test.  I also reverted the spi-max-frequency to <1000> based on a forum
report of instability.  Forum links detailing development:
https://forum.openwrt.org/t/trendnet-tew-810dr-leds/56601
https://forum.openwrt.org/t/trendnet-tew-810dr-mtd-partition/59676

Changes to be committed:
new file:   target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
modified:   target/linux/ramips/image/mt7620.mk
modified:   target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
modified:   target/linux/ramips/mt7620/base-files/etc/board.d/02_network

Specification:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios functional
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
 Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is available in the GPL Source download for either the
TEW-810DR or DIR-810L and is located at source/user/wolf/cameo/ncc/hostTools.
In Debian 10 amd64, 32bit libs are needed.  The invocation is:
ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR” -H “1.0R” -r
“WW” -c “1.0”.  This may need to be altered if your hardware version is "1.1R".
More information is available in the device page for TEW-810DR.  See the device
pages for the DIR-810L and TEW-810DR for more information.  The image can also
be reliable flashed via tftpboot as described in this OpenWrt forum
thread:
https://forum.openwrt.org/t/trendnet-tew-810dr-mtd-partition/59676.
---
.../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 166 ++
target/linux/ramips/image/mt7620.mk   |  10 ++
.../mt7620/base-files/etc/board.d/01_leds |   3 +
.../mt7620/base-files/etc/board.d/02_network  |   4 +-
4 files changed, 182 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts 
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..cba646f76e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,166 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys-polled";
+   poll-interval = <20>;
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power_green {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   lan {
+   label = "tew-810dr:green:lan";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+
+   power_orange {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   

[OpenWrt-Devel] [ramips]:3 dependent patches for mt7620a_cameo-810 - howto roll out for testing

2020-04-10 Thread Heppler, J. Scott



With forum help from @123serge123 the trendnet:internet:green gpio was
enabled and added to a *dts and 01_leds.  It is highly likely that this
change will work for the D-Link DIR-810L.  Both the Trendnet and the
D-Link use a Cameo based board with the same cpu, spi flash and ram
chips.  They have Identical LED's.  The led change does away with the
need for an LAN4 NIC, mimics OEM and is configurable.

I could roll out a cameo-810.dtsi patch, with led fix, followed by
adding Trendnet support but this bypasses DIR-810 testing prior to
committing.  If DIR-810 testers reject the led change, I would, barring
any major issues, keep it for the Trendnet which would modify the
dts/dtsi changes.

Alternatively, a patch for the DIR-810L/led for testing.  If tests OK,
cameo-810.dtsi, followed by adding Trendnet support.  Alternatively
could combine the dtsi patch with adding Trendnet support.  


Preference?
--
J. Scott Heppler

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


[OpenWrt-Devel] [PATCH v3] ramips: add support for TRENDnet TEW-810DR

2020-03-29 Thread Heppler, J. Scott

ramips: add support for TRENDnet TEW-810DR
  new file:   target/linux/ramips/dts/mt7620a_cameo_810.dtsi
  modified:   target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
  new file:   target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
  modified:   target/linux/ramips/image/mt7620.mk
  modified:   target/linux/ramips/mt7620/base-files/etc/board.d/02_network

Trendnet TEW-810DR builds and tests on my device.  TEW-810DR leds
functional with LAN4 caveat.  D-Link DIR-810L builds
but unable to test.

Specification:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios functional
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* BiColor Green/Orange Power LED GPIO contolled,
 BiColor Green/Orange Internet LED has a none-GPIO based driver
 active with NIC into LAN4
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image needs to have a cameo hardware ID appended
with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
download for either the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.  Debian 10 amd64, 32bit libs are needed.
The invocation is:
ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR”
-H “1.0R” -r “WW” -c “1.0”
More information is available in the device page for TEW-810DR.
The appended image can then be flash via the Web rescue interface
192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
can be done using the Luci web interface or the ssh command line per the
OpenWRT documentation
---
.../linux/ramips/dts/mt7620a_cameo_810.dtsi   | 143 ++
.../ramips/dts/mt7620a_dlink_dir-810l.dts | 130 +---
.../ramips/dts/mt7620a_trendnet_tew-810dr.dts |  31 
target/linux/ramips/image/mt7620.mk   |  10 ++
.../mt7620/base-files/etc/board.d/02_network  |   3 +-
5 files changed, 187 insertions(+), 130 deletions(-)
create mode 100644 target/linux/ramips/dts/mt7620a_cameo_810.dtsi
create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi 
b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
new file mode 100644
index 00..a3039a2400
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
@@ -0,0 +1,143 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+   };
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <5000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   factory5g: partition@5 {
+   label = "factory5g";
+   reg = <0x5 0x1>;
+   read-only;
+   };
+
+   partition@6 {
+   label = "Wolf_Config";
+   reg = <0x6 0x1>;
+   read-only;
+   };
+
+   partition@7 {
+   label = "MyDlink";
+   reg = <0x7 0x8>;
+   read-only;
+   };
+
+   partition@f {
+  

Re: [OpenWrt-Devel] ramips: adding support for TRENDnet DIR-810DR

2020-03-09 Thread Heppler, J. Scott

The prior post had a question on the default MAC address.  My build
generates the Trendnet portion of the MAC but not the model.  This is
the behavior of the D-Link DIR-810L code.  As I'm new to the build
system and was basing my build on the DIR-810L, do I need to do more?

On Mar 09, 2020: 13:28, Adrian Schmutzler wrote:

Hi,


-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Heppler, J. Scott
Sent: Samstag, 7. März 2020 22:24
To: openwrt-de...@openwrt.org
Subject: [OpenWrt-Devel] ramips: adding support for TRENDnet DIR-810DR

I'm looking for some clarification on a prior patch:

I'm generating a new snapshot build and have the following questions:

1)  My prior patch was criticized for a lack of
mt7620/base-files/etc/board.d/01_leds entry.  I was basing my build on
the D-Link DIR-810L which seems to have the same Cameo manufactured
board.  The D-Link lacks any entries in 01_leds.  Is this an oversight
that I, and DIR-810L entry will need to correct?  Or is it just not
needed?


I was not aware that the WAN LED seems to be controlled by the driver and not 
by the device-tree or userspace code (as reported by Roger).

If that's also the case for your device, you won't need to enter anything into 
01_leds.

How's the WAN LED behaving for you and is it referring to the correct port (or 
a wrong one as Roger reported for DIR-810L).


The Globe Lens which contains green and orange(amber) leds is
non-functional on the TEW-810DR. I have a TEW-732BR with this entry:
tew-732br)
ucidef_set_led_netdev "wan" "WAN" "trendnet:green:wan" "eth1"

This makes me think there is a missing LED entry in the DIR-810L dts.
Physically, both the DIR-810L, TEW-732BR and TEW-810DR have 4 LEDs:  2
green and 2 orange(amber) The three cases have a Power lens and a Globe
lens.  Each Lens has a Green LED and an Orange LED.  The DIR-810L dts
only has 3 LED entries
entries.
   leds {
   compatible = "gpio-leds";

   led_power_green: power_green {
   label = "dir-810l:green:power";
   gpios = < 9 GPIO_ACTIVE_HIGH>;
   };

   wan {
   label = "dir-810l:orange:wan";
   gpios = < 12 GPIO_ACTIVE_HIGH>;
   };

   power_orange {
   label = "dir-810l:orange:power";
   gpios = < 13 GPIO_ACTIVE_HIGH>;
   };
   };

I think there should be a dir-810l:green:wan on GPIO 10 or 11 or 14 or
15. I suspect Roger's DIR-810L Globe is not fully functional and would
like to confirm with him and potentially work with him on a common fix
for both.  Feel free to forward my email address to Roger.





2)  I think it would be possible for both the DIR-810L and TEW-810DR to
have factory.bin.  Presently, a factory image is needed for initial
installation and is produced using Cameo
cameo/ncc/hostTools/ncc_att_hwid tool.  This tool is difficult to use as
it requires 32bit libs and full paths to implement.  Essentially the
following string needs to be appended to the sysupgrade image:
"  TEW-810DR1.1RWW1.0

1.13B04

If you think it's easy, include it in your patch already. Otherwise, first 
provide sysupgrade support and then provide factory in a second step.

Obviously, not having a factory image will make writing flashing instructions 
more complicated.

Best

Adrian





--
J. Scott Heppler

Penguin Innovations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 



NOTICE: This e-mail message and any attachments may
contain legally privileged and confidential information intended
solely for the use of the intended recipients. If you are not an
intended recipient, you are hereby notified that you have
received this message in error and any review, dissemination,
distribution, copying, or other unauthorized use of this email
and any attachment is strictly prohibited. If you have received
this email in error, please notify the sender immediately and
delete the message and any attachments from your system.

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


[OpenWrt-Devel] ramips: adding support for TRENDnet DIR-810DR

2020-03-07 Thread Heppler, J. Scott

I'm looking for some clarification on a prior patch:

I'm generating a new snapshot build and have the following questions:

1)  My prior patch was criticized for a lack of
mt7620/base-files/etc/board.d/01_leds entry.  I was basing my build on
the D-Link DIR-810L which seems to have the same Cameo manufactured
board.  The D-Link lacks any entries in 01_leds.  Is this an oversight
that I, and DIR-810L entry will need to correct?  Or is it just not
needed?

2)  I think it would be possible for both the DIR-810L and TEW-810DR to
have factory.bin.  Presently, a factory image is needed for initial
installation and is produced using Cameo
cameo/ncc/hostTools/ncc_att_hwid tool.  This tool is difficult to use as
it requires 32bit libs and full paths to implement.  Essentially the
following string needs to be appended to the sysupgrade image:
"  TEW-810DR1.1RWW1.01.13B04 )‹ÊW9"
The DIR-810L should work the same way.  Can you point to any project
firmware tools to append the string to a sysupgrade.bin?

3) MAC address.  My preliminary build does read the mtd-eeprom for the
factory MAC.  The 1st 3 couplets specify Trendnet.  The later 3 are
random and do not match the factory firmware.  My OpenWRT TEW-732BR has
the Vendor part of the MAC and not the model.  This is also replicated
on the existing DIR-810L MAC.  Does this need to be alter and if so it
appears it needs to be done in the D-Link.

4)  Planet LED.  Both the D-Link and the Trendnet have 2 lenses:  Power
and Planet.  Behind each lense, sit green/orange leds.  The D-Link does
not have any *.dts green:planet entries.  I think both need some
additional entires.  I have 4 gpio pins that are not referenced:
gpio 10, 11, 14 or 15.  The Power Lense seems to work fine,  blinking
orange while booting, steady green on success.  On my TEW-732BR, the
Planet LED is steady green with quiet connection and blinking green with
wireless/nic port data flow. Code from
ar71xx/base-files/etc/board.d/01_leds

ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"

The DIR-810L and TEW-810DR I think should signal the same information as
the TEW-732BR.

Regards

--
J. Scott Heppler

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


Re: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR support

2020-02-28 Thread Heppler, J. Scott

On Feb 27, 2020: 14:44, Adrian Schmutzler wrote:

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Heppler, J. Scott
Sent: Donnerstag, 27. Februar 2020 14:29
To: openwrt-de...@openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR
support

On Feb 27, 2020: 13:37, Adrian Schmutzler wrote:
>Hi,
>
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
>> Behalf Of Heppler, J. Scott
>> Sent: Donnerstag, 27. Februar 2020 03:39
>> To: openwrt-de...@openwrt.org
>> Subject: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR
support
>>
>> Signed-off-by: J. Scott Heppler 
>>
>> ramips: add support for TRENDnet TEW-810DR
>>
>> Exact hardware clone for the D-Link DIR-810L.  See OpenWRT device pages
>> and review the PCB photos, boot logs and MTP flash partitions.
>> https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1
>> https://openwrt.org/toh/d-link/dir-810l
>>
>> Specification:
>>
>> * MediaTek MT7620A (580 Mhz)
>> * 8 MB of FLASH
>> * 64 MB of RAM
>> * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
>> * UART header on PCB (57600 8n1)
>> * 2x BiColor LED (GPIO-controlled)
>> * 2x button - power and reset
>> * U-boot bootloader
>>
>> Installation:
>>
>> The sysupgrade.bin image needs to have a cameo hardware ID appended
>> with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
>> download for either the TEW-810DR or DIR-810L and is located at
>> source/user/wolf/cameo/ncc/hostTools
>> The invocation is:
>> ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR”
>> -H “1.0R” -r “WW” -c “1.0”
>> More information is available in the device page for TEW-810DR linked
>> above The appended image can then be flash via the Web rescue interface
>> 192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
>> can be done using the Luci web interface or the ssh command line per the
>> OpenWRT documentation
>> ---
>>  .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 157
++
>>  target/linux/ramips/image/mt7620.mk   |  10 ++
>>  .../mt7620/base-files/etc/board.d/02_network  |   3 +-
>>  3 files changed, 169 insertions(+), 1 deletion(-)
>>  create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-
810dr.dts
>>
>> diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
>> b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
>> new file mode 100644
>> index 00..eb38110801
>> --- /dev/null
>> +++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
>
>shared DTSI with dir-810l ?


Device Tree Usage in OpenWRT (DTS) does not really go into this.  Can
you give me some guidance?  What naming conventions would be used for
the new dtsi?  Can a dts include 2 dtsi's?  Is it OK to chain 2 dtsi's?


I'm worried about altering the DIR-810L code.  I do not have the D-Link
to test and it was submitted by someone else.


I will send a some patches for the DIR-810L in a minute. Those should make it 
easier to move a lot of code into a shared DTSI. Obviously, stuff that still 
deviates would be kept in the DTSes.


>
>> @@ -0,0 +1,157 @@
>> +/dts-v1/;
>> +
>> +#include "mt7620a.dtsi"
>> +
>> +#include 
>> +#include 
>> +
>> +/ {
>> +  compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
>> +  model = "TRENDnet TEW-810DR";
>> +
>> +  aliases {
>> +  led-boot = _power_green;
>> +  led-failsafe = _power_green;
>> +  led-running = _power_green;
>> +  led-upgrade = _power_green;
>> +  label-mac-device = 
>> +  };
>> +
>> +  keys {
>> +  compatible = "gpio-keys";
>> +
>> +  reset {
>> +  label = "reset";
>> +  gpios = < 1 GPIO_ACTIVE_LOW>;
>> +  linux,code = ;
>> +  };
>> +
>> +  wps {
>> +  label = "wps";
>> +  gpios = < 2 GPIO_ACTIVE_LOW>;
>> +  linux,code = ;
>
>Why not use the proper codes on these?  Would the code also need to be
>altered on the DIR-810L?  Can you point me to reference?


See my patch for DIR-810L coming in a minute.

Essentially duplicated your 2 patches.



>
>> +  };
>> +  };
>> +
>> +

Re: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR support

2020-02-27 Thread Heppler, J. Scott

On Feb 27, 2020: 13:37, Adrian Schmutzler wrote:

Hi,


-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Heppler, J. Scott
Sent: Donnerstag, 27. Februar 2020 03:39
To: openwrt-de...@openwrt.org
Subject: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR support

Signed-off-by: J. Scott Heppler 

ramips: add support for TRENDnet TEW-810DR

Exact hardware clone for the D-Link DIR-810L.  See OpenWRT device pages
and review the PCB photos, boot logs and MTP flash partitions.
https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1
https://openwrt.org/toh/d-link/dir-810l

Specification:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* 2x BiColor LED (GPIO-controlled)
* 2x button - power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image needs to have a cameo hardware ID appended
with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
download for either the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools
The invocation is:
ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR”
-H “1.0R” -r “WW” -c “1.0”
More information is available in the device page for TEW-810DR linked
above The appended image can then be flash via the Web rescue interface
192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
can be done using the Luci web interface or the ssh command line per the
OpenWRT documentation
---
 .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 157 ++
 target/linux/ramips/image/mt7620.mk   |  10 ++
 .../mt7620/base-files/etc/board.d/02_network  |   3 +-
 3 files changed, 169 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..eb38110801
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts


shared DTSI with dir-810l ?


I'm worried about altering the DIR-810L code.  I do not have the D-Link
to test and it was submitted by someone else.



@@ -0,0 +1,157 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;


Why not use the proper codes on these?  Would the code also need to be
altered on the DIR-810L?  Can you point me to reference?


+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power {


led_power_green: power_green {


+   label = "dir-810l:green:power";


That would be one of the few parts where both devices will be different (and 
which would not belong into a shared DTSI). But if you didn't even change the 
name, have you actually checked whether the LED GPIOs are the same?

The Trendnet also has 2 pairs of green/orange LEDs



+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan {
+   label = "dir-810l:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   power2 {


power_orange


+   label = "dir-810l:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   m25p80@0 {


flash@0


+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;


Can this go faster?

Would this would go in a shared dtsi.  Should I make a change on a
device I do not have access to?



+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   

[OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR support

2020-02-26 Thread Heppler, J. Scott

Signed-off-by: J. Scott Heppler 

ramips: add support for TRENDnet TEW-810DR

Exact hardware clone for the D-Link DIR-810L.  See OpenWRT device pages
and review the PCB photos, boot logs and MTP flash partitions.
https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1
https://openwrt.org/toh/d-link/dir-810l

Specification:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* 2x BiColor LED (GPIO-controlled)
* 2x button - power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image needs to have a cameo hardware ID appended
with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
download for either the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools
The invocation is:
ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR”
-H “1.0R” -r “WW” -c “1.0”
More information is available in the device page for TEW-810DR linked
above The appended image can then be flash via the Web rescue interface
192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
can be done using the Luci web interface or the ssh command line per the
OpenWRT documentation
---
.../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 157 ++
target/linux/ramips/image/mt7620.mk   |  10 ++
.../mt7620/base-files/etc/board.d/02_network  |   3 +-
3 files changed, 169 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts

diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts 
b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 00..eb38110801
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,157 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   label-mac-device = 
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power {
+   label = "dir-810l:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan {
+   label = "dir-810l:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   power2 {
+   label = "dir-810l:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   m25p80@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   factory5g: partition@5 {
+   label = "factory5g";
+   reg = <0x5 0x1>;
+   read-only;
+   };
+
+   partition@6 {
+   label = "Wolf_Config";
+   reg = <0x6 0x1>;
+   read-only;
+   };
+
+   partition@7 {
+   label = "MyDlink";
+   reg = <0x7 0x8>;
+   read-only;
+   };
+
+   partition@e {
+   label = "Jffs2";
+   

[OpenWrt-Devel] [PATCH] ramips: add TRENDnet TEW-810DR support -corrected

2020-02-25 Thread Heppler, J. Scott

Signed-off-by: J. Scott Heppler 

ramips: add support for TRENDnet TEW-810DR

Exact hardware clone for the D-Link DIR-810L.

Specification:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* 2x BiColor LED (GPIO-controlled)
* 2x button - power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image needs to have a cameo hardware ID appended
with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
download for either the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools
The invocation is:
ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR”
-H “1.0R” -r “WW” -c “1.0”
More information is available in the device page for TEW-810DR.
The appended image can then be flash via the Web rescue interface
192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
can be done using the Luci web interface or the ssh command line per the
OpenWRT documentation

---
.../ramips/base-files/etc/board.d/02_network  |   1 +
target/linux/ramips/base-files/lib/ramips.sh  |   3 +
target/linux/ramips/dts/TEW-810DR.dts | 159 ++
target/linux/ramips/image/mt7620.mk   |   8 +
4 files changed, 171 insertions(+)
create mode 100644 target/linux/ramips/dts/TEW-810DR.dts

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 f743ce851a..a692ef6ea4 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -116,6 +116,7 @@ ramips_setup_interfaces()
sap-g3200u3|\
sk-wb8|\
telco-electronics,x1|\
+   tew-810dr|\
totolink,lr1200|\
unielec,u7621-06-256m-16m|\
unielec,u7621-06-512m-64m|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 093303892c..3ce42421ee 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -478,6 +478,9 @@ ramips_board_detect() {
*"TEW-714TRU")
name="tew-714tru"
;;
+   *"TEW-810DR")
+name="tew-810dr"
+;;
*"Timecloud")
name="timecloud"
;;
diff --git a/target/linux/ramips/dts/TEW-810DR.dts 
b/target/linux/ramips/dts/TEW-810DR.dts
new file mode 100644
index 00..6be20c1dda
--- /dev/null
+++ b/target/linux/ramips/dts/TEW-810DR.dts
@@ -0,0 +1,159 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   };
+
+   keys {
+   compatible = "gpio-keys-polled";
+   poll-interval = <20>;
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   power2 {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   m25p80@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+ 

[OpenWrt-Devel] [PATCH] ramips: add TRENDnet TEW-810DR support

2020-02-25 Thread Heppler, J. Scott

Signed-off-by: J. Scott Heppler 

ramips: add support for TRENDnet TEW-810DR

Exact hardware clone for the D-Link DIR-810L.

Specification:

 * MediaTek MT7620N (580 Mhz)
 * 8 MB of FLASH
 * 64 MB of RAM
 * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
 * UART header on PCB (57600 8n1)
 * 2x BiColor LED (GPIO-controlled)
 * 2x button - power and reset
 * U-boot bootloader

Installation:

The sysupgrade.bin image needs to have a cameo hardware ID appended
with ncc_att_hwid.  ncc_att_hwid is available in the GPL Source
download in either the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools
The appended image can then be flash via the Web rescue interface
192.168.10.1 or TFTP's to the same IP address.  Subsequent upgrades
can be done using the Luci web interface or the ssh command line per the
OpenWRT documentation.

---
.../ramips/base-files/etc/board.d/02_network  |   1 +
target/linux/ramips/base-files/lib/ramips.sh  |   3 +
target/linux/ramips/dts/TEW-810DR.dts | 159 ++
target/linux/ramips/image/mt7620.mk   |   8 +
4 files changed, 171 insertions(+)
create mode 100644 target/linux/ramips/dts/TEW-810DR.dts

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 f743ce851a..a692ef6ea4 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -116,6 +116,7 @@ ramips_setup_interfaces()
sap-g3200u3|\
sk-wb8|\
telco-electronics,x1|\
+   tew-810dr|\
totolink,lr1200|\
unielec,u7621-06-256m-16m|\
unielec,u7621-06-512m-64m|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 093303892c..3ce42421ee 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -478,6 +478,9 @@ ramips_board_detect() {
*"TEW-714TRU")
name="tew-714tru"
;;
+   *"TEW-810DR")
+name="tew-810dr"
+;;
*"Timecloud")
name="timecloud"
;;
diff --git a/target/linux/ramips/dts/TEW-810DR.dts 
b/target/linux/ramips/dts/TEW-810DR.dts
new file mode 100644
index 00..6be20c1dda
--- /dev/null
+++ b/target/linux/ramips/dts/TEW-810DR.dts
@@ -0,0 +1,159 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+   model = "TRENDnet TEW-810DR";
+
+   aliases {
+   led-boot = _power_green;
+   led-failsafe = _power_green;
+   led-running = _power_green;
+   led-upgrade = _power_green;
+   };
+
+   keys {
+   compatible = "gpio-keys-polled";
+   poll-interval = <20>;
+
+   reset {
+   label = "reset";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power_green: power {
+   label = "tew-810dr:green:power";
+   gpios = < 9 GPIO_ACTIVE_HIGH>;
+   };
+
+   wan {
+   label = "tew-810dr:orange:wan";
+   gpios = < 12 GPIO_ACTIVE_HIGH>;
+   };
+
+   power2 {
+   label = "tew-810dr:orange:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+   };
+};
+
+ {
+   status = "okay";
+
+   m25p80@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   factory5g: partition@5 {
+   label = "factory5g";
+   reg 

[OpenWrt-Devel] tools/firmware-utils/mkcameofw not found

2020-02-24 Thread Heppler, J. Scott

Some D-Link/Trendnet devices use a cameo signature and I found prior
posts regarding appending about 40 bytes of code to rootfs.

https://patchwork.ozlabs.org/patch/699611/

The post suggested the use of tools/firmware-utils/mkcameofw.
Presently, a build had the error that mkcameofw (also tried cameofw) was
not found.

If one looks at the OpenWRT device pages for both the D-Link DIR-810L
B1 and the Trendnet TEW-810DR, both describe using ncc_att_hwid to
append the signature.  ncc_att_hwid is included in ghe GPL source
package from both D-Link and Trendnet and can also be obtained from
DD-wrt.

https://openwrt.org/toh/d-link/dir-810l
https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1

Couple of points:
1.  mkcameofw seems to be broken and unused.  Both the device pages
describe the use of GPL'd ncc_att_hwid after the build for the initial
install.

2.  I've searched for the documentation for ncc_att_hwid and cameo
signature and only came up with it being applied in OpenWRT/DD-wrt.

3.  Users are working around the broken code manually.

4.  ncc_att_hwid is GPL'd and could be included in the build tree.


--
J. Scott Heppler

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


[OpenWrt-Devel] firmware-utils/mkcameofw for TEW-810DR

2020-02-22 Thread Heppler, J. Scott

I have successfully adapted OpenWRT's D-Link DIR-810L build for a
Trendnet TEW-810DR.  It was low-hanging fruit, the devices essentially
use the same board.

One difference is that Trendnet firmware has what I've seen described as
a cameo signature appended at the end.

For my own use, I could use the cameo tool: ncc_att_hwid as described
here:

https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1

I think if I take the extra step to incorporate the cameo signature, the
patch would be committable.

I've searched the git code base for an example of how to append the code
during the build and have come up empty.  Source for mkcameofw.c has

"Options:\n"
"  -kread kernel image from the file \n"
"  -c  use the kernel image as a combined image\n"
"  -M   set model to \n"
"  -owrite output to the file \n"
"  -rread rootfs image from the file \n"
"  -S   set image signature to \n"
"  -R  set image region to \n"
"  -V set image version to \n"
"  -Iset image size to \n"
"  -Kset kernel size to \n"
"  -h  show this screen\n"

If I read this correctly
-M TEW-810DR
-V 1.0R
-R WW  #I'm guessing WW is Region code
-S 1.0

Could someone point me to a *dts that utilizes this tool or a *dts that
reaches the same goal?

Thanks in advance
--
J. Scott Heppler

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