[OpenWrt-Devel] help

2015-09-29 Thread Christian Beier
Am Tue, 29 Sep 2015 15:32:15 +0200
schrieb openwrt-devel-requ...@lists.openwrt.org:

> Send openwrt-devel mailing list submissions to
>   openwrt-devel@lists.openwrt.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> or, via email, send a message with subject or body 'help' to
>   openwrt-devel-requ...@lists.openwrt.org
> 
> You can reach the person managing the list at
>   openwrt-devel-ow...@lists.openwrt.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of openwrt-devel digest..."
> 
> 
> Today's Topics:
> 
>1. Re: [PATCH netifd] netifd-proto.sh: add table argument to
>   proto_add_ipv4_route() (Steven Barth)
>2. [PATCH] [SIGNED-OFF] Correct WeIO board name (Drasko DRASKOVIC)
>3. periodic task checking for usb flash media? (Karl Palsson)
>4. [PATCH] base-files: create /var/tmp on boot (Paul Fertser)
>5. Re: periodic task checking for usb flash media? (Karl Palsson)
>    6. [PATCH][odhcpd] Limit size of IPv4 DHCP reply (Dmitry Ivanov)
>7. unsubscribe (Christian Beier)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 29 Sep 2015 12:06:20 +0200
> From: Steven Barth 
> To: Alexander Couzens ,
>   openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH netifd] netifd-proto.sh: add table
>   argument to proto_add_ipv4_route()
> Message-ID: <560a629c.5040...@openwrt.org>
> Content-Type: text/plain; charset=windows-1252
> 
> Alexander,
> 
> I don't have a problem with that particular patch. However since the
> other patch was redundant and the only user of this one it seemed
> redundant to me as well. If you have another usecase for this then
> please let us know.
> 
> 
> Cheers,
> 
> Steven
> 
> 
> On 29.09.2015 11:37, Alexander Couzens wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Hi Steven,
> >
> > you rejected this patch as well.
> >
> > Why would you not allow to define a specific table for ipv4, but for
> > ipv6?
> >
> >> cy...@openwrt.org
> >> NAK. Use "option ip4table" and "option ip6table" which works with
> >> all protocols already.
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v2
> >
> > iQIcBAEBCAAGBQJWClv2AAoJEMKenaag34YEpGUP/1j+pipA5j9C7vkfAMyYqkkU
> > ZzDR3k/rEXK9JeAXVABagSG3SRmfOGOCkgFMShW4vxapO7beKViAFU/tUroSB69K
> > +hdCFMqkUcKtAa9AMm0JDkA5tkNxQ3uBPNAnj/PTxNMFFRDk2+qX7Do05Y4KbB2g
> > FWeialu1K5pJydPFeu2fP1ajID05phOlJPHjalLyDjYLtPU2KDDSiGICmldGo18J
> > 0RDgy4/9GVxGkU8v3+3S5szQWZxns2M/CJSJ0T182cHpLRzP2qOFvt802q+hdm1i
> > latOWvVJ6+qsX0rMJh3SlSMF75vWo6FkAkld4vpiWtF0KT718v1+xEF+DDou9pw4
> > QLhb/OO52Ic2Qv81St7kkknVQU45jcOA3JNQsB9UpDxRSng0QnTZyX507B8iHfJh
> > XfHOz5ZBgZ1J+OW/RgPf889ChUtGWYlFU31snZWPfBcSVsHuKpZ396SoKyqDWOZI
> > GuSnNQViYrgBQAba98Y0UlYQ+lFxHs4+Vivd2qzGE/9RxhR4wuSWbiI5vKic2S1r
> > anEklRrDpv0zo8tyaEKKetMyE9K2l2k3zEJ54jJhALC9vldX+cEnYnvqt5zN3ImE
> > hHO8BtlrjcdUGOu9xHyWG4Igsra23wGZ0UGAuGVDGyED3oBFX4kJlv3JF4g9DEiV
> > 6xqiqLeAcZ/f5+gVaua3
> > =Xe6x
> > -END PGP SIGNATURE-
> 
> 
> --
> 
> Message: 2
> Date: Tue, 29 Sep 2015 13:20:37 +0200
> From: Drasko DRASKOVIC 
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Correct WeIO board name
> Message-ID:
>   <1443525637-27087-1-git-send-email-drasko.drasko...@gmail.com>
> 
> Trivial parch to correct WeIO board name in the system.
> 
> Signed-off-by: Drasko DRASKOVIC 
> ---
>  target/linux/ar71xx/base-files/lib/ar71xx.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ad98cfb..4679a4b 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -850,7 +850,7 @@ ar71xx_board_detect() {
>   *"UniFi AP Pro")
>   name="uap-pro"
>   ;;
> - *"WeIO")
> + "WeIO"*)
>   name="weio"
>   ;;
>   *WHR-G301N)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] unsubscribe

2015-09-29 Thread Christian Beier
Am Tue, 29 Sep 2015 12:00:02 +0200
schrieb openwrt-devel-requ...@lists.openwrt.org:

> Send openwrt-devel mailing list submissions to
>   openwrt-devel@lists.openwrt.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> or, via email, send a message with subject or body 'help' to
>   openwrt-devel-requ...@lists.openwrt.org
> 
> You can reach the person managing the list at
>   openwrt-devel-ow...@lists.openwrt.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of openwrt-devel digest..."
> 
> 
> Today's Topics:
> 
>1. [PATCH v2] ar71xx: add support for TP-LINK  TL-WR941ND v6
>   (international version) (Matthias Schiffer)
>2. Re: [PATCH netifd] netifd-proto.sh: add table argument to
>   proto_add_ipv4_route() (Alexander Couzens)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 29 Sep 2015 11:20:04 +0900
> From: Matthias Schiffer 
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH v2] ar71xx: add support for TP-LINK
>   TL-WR941ND v6 (international version)
> Message-ID:
>   
> 
>   
> 
> The international version is completely different from the already
> supported Chinese version. The WLAN of the QCA956x SoC used by this router
> has been fixed in r46948.
> 
> Signed-off-by: Matthias Schiffer 
> ---
> v2: rebased on top of trunk + http://patchwork.ozlabs.org/patch/523133/
>   
>  
> The 700-MIPS-ath79-openwrt-machines.patch should only be ~10 added lines,  
> but git gets confused and makes the diff completely
> incomprehensible...
> 
> 
>  target/linux/ar71xx/base-files/etc/diag.sh |   3 +-
>  .../ar71xx/base-files/etc/uci-defaults/01_leds |   9 ++
>  .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../lib/preinit/05_set_preinit_iface_ar71xx|   1 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>  target/linux/ar71xx/config-4.1 |   1 +
>  .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 151 +++
>  target/linux/ar71xx/image/Makefile |   9 +-
>  .../700-MIPS-ath79-openwrt-machines.patch  | 166
> +++-- 10 files changed, 266 insertions(+), 79 deletions(-)
>  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c
> 
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh index cfba6b4..d97de9f 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -287,7 +287,8 @@ get_status_led() {
>   tl-wdr4300 | \
>   tl-wr703n | \
>   tl-wr710n | \
> - tl-wr720n-v3)
> + tl-wr720n-v3 | \
> + tl-wr941nd-v6)
>   status_led="tp-link:blue:system"
>   ;;
>   tl-wr841n-v9)
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index
> fac4751..e8ee929 100644 ---
> a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -503,6 +503,15
> @@ tl-wr941nd-v5) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan"
> "phy0tpt" ;;
>  
> +tl-wr941nd-v6)
> + ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0"
> + ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0"
> "0x10"
> + ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0"
> "0x08"
> + ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0"
> "0x04"
> + ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0"
> "0x02"
> + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt"
> + ;;
> +
>  tl-wa830re-v2)
>   ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
>   ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index
> 880953c..35cd05d 100644 ---
> a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -242,6 +242,7
> @@ tl-mr3420-v2 |\ tl-wr841n-v8 |\
>  tl-wr842n-v2 |\
>  tl-wr941nd-v5 |\
> +tl-wr941nd-v6 |\
>  tl-wdr6500-v2 |\
>  wnr2000-v3 |\
>  wnr2000-v4 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ad98cfb..6dba074 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -820,6 +820,9 @@ ar71xx_board_detect() {
>   *"TL-WR941N/ND v5")
>   name=

Re: [OpenWrt-Devel] [PATCH] CC: ar71xx: Enable ath10k calibration data loading for EnGenius ESR1750 and EPG500.

2015-08-15 Thread Christian Beier
Am Tue,  4 Aug 2015 14:40:24 +0200
schrieb Christian Beier :

> Kinda-backport of r46415, though this patch uses the old-style
> calibration data loading.
> 
> Signed-off-by: Christian Beier 
> ---
>  .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> | 4  1 file changed, 4 insertions(+)
> 
> diff --git
> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index c827e31..dd3f546 100644 ---
> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++
> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -39,6 +39,10 @@ case "$FIRMWARE" in dlan-pro-1200-ac)
> ath10kcal_from_file $(find_mtd_part "art") 20480 $ath10kcal_tmp ;;
> + esr1750 | \
> + epg5000)
> + ath10kcal_from_file $(find_mtd_part "caldata") 20480
> $ath10kcal_tmp
> + ;;
>   esac
>   ;;
>  

Would be really nice to have this in CC as without, the boxxes are not
really up to par 5ghz wise...

Thanks,
-- 
Christian Beier, CTO.

W   shoutrlabs.com
E   c...@shoutrlabs.com
L   https://www.linkedin.com/in/christianbeier
P   +49 (0)30 12076581
T   https://twitter.com/shoutrlabs

what is, is; what is not is possible.

shoutr labs UG (haftungsbeschränkt), 
Wolfener Straße 32-34 Haus K, 12681 Berlin, DE
HRB 154532 B, AG Charlottenburg
Managing directors: Christian Beier, Benjamin Werner, Sebastian Winkler
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] CC: ar71xx: Enable ath10k calibration data loading for EnGenius ESR1750 and EPG500.

2015-08-04 Thread Christian Beier
Kinda-backport of r46415, though this patch uses the old-style calibration data 
loading.

Signed-off-by: Christian Beier 
---
 .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata  | 4 
 1 file changed, 4 insertions(+)

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index c827e31..dd3f546 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -39,6 +39,10 @@ case "$FIRMWARE" in
dlan-pro-1200-ac)
ath10kcal_from_file $(find_mtd_part "art") 20480 $ath10kcal_tmp
;;
+   esr1750 | \
+   epg5000)
+   ath10kcal_from_file $(find_mtd_part "caldata") 20480 
$ath10kcal_tmp
+   ;;
esac
;;
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/6] CC: ar71xx: add profile and build image for EnGenius EPG5000.

2015-07-21 Thread Christian Beier
Backport of r46049.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/generic/profiles/engenius.mk | 12 
 target/linux/ar71xx/image/Makefile   |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/target/linux/ar71xx/generic/profiles/engenius.mk 
b/target/linux/ar71xx/generic/profiles/engenius.mk
index b42c5cc..7ea93e3 100644
--- a/target/linux/ar71xx/generic/profiles/engenius.mk
+++ b/target/linux/ar71xx/generic/profiles/engenius.mk
@@ -39,3 +39,15 @@ define Profile/ESR1750/Description
 endef
 
 $(eval $(call Profile,ESR1750))
+
+
+define Profile/EPG5000
+NAME:=EnGenius EPG5000
+PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb-storage kmod-ath10k 
wpad-mini
+endef
+
+define Profile/EPG5000/Description
+Package set optimized for the EnGenius EPG5000
+endef
+
+$(eval $(call Profile,EPG5000))
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index a2a66b8..c8ed2ec 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -930,6 +930,7 @@ 
cameo_ap94_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware)
 
cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x66(caldata_orig),6208k@0x5(firmware_orig)
 
esr900_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
 
esr1750_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
+epg5000_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
 
ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),3712k(firmware),64k(art)
 
ew-dorin_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
 
f9k1115v2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14464k(rootfs),1408k(kernel),64k(nvram)ro,64k(envram)ro,64k(art)ro,15872k@0x5(firmware)
@@ -1860,6 +1861,7 @@ $(eval $(call 
SingleProfile,CameoAP94,64kraw,DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS
 
 $(eval $(call 
SingleProfile,EnGenius,64k,ESR900,esr900,ESR900,ttyS0,115200,$$(esr900_mtdlayout),KRuImage,,0x4e))
 $(eval $(call 
SingleProfile,EnGenius,64k,ESR1750,esr1750,ESR1750,ttyS0,115200,$$(esr1750_mtdlayout),KRuImage,,0x61))
+$(eval $(call 
SingleProfile,EnGenius,64k,EPG5000,epg5000,EPG5000,ttyS0,115200,$$(epg5000_mtdlayout),KRuImage,,0x71))
 
 $(eval $(call 
SingleProfile,HiWiFi,64k,HIWIFI_HC6361,hiwifi-hc6361,HiWiFi-HC6361,ttyATH0,115200,$$(hiwifi_hc6361_mtdlayout),KRuImage))
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/6] CC: ar71xx: Fix LED-to-phy mapping for EnGenius ESR1750.

2015-07-21 Thread Christian Beier
wlan5g is phy0tpt and wlan2g phy1tpt.

Backport of r46270.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 7c10f42..3adabcd 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -161,8 +161,8 @@ esr900)
;;
 
 esr1750)
-   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "esr1750:blue:wlan-2g" 
"phy0tpt"
-   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "esr1750:blue:wlan-2g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy0tpt"
;;
 
 epg5000)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/6] CC: ar71xx: add LED defaults for the EnGenius EPG5000

2015-07-21 Thread Christian Beier
NB that wlan5g is phy0tpt and wlan2g phy1tpt.

Backport of r46226.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..7c10f42 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -165,6 +165,11 @@ esr1750)
ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy1tpt"
;;
 
+epg5000)
+   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "epg5000:blue:wlan-2g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "epg5000:blue:wlan-5g" 
"phy0tpt"
+   ;;
+
 hiwifi-hc6361)
ucidef_set_led_netdev "inet" "INET" "hiwifi:blue:internet" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "hiwifi:blue:wlan-2p4" "phy0tpt"
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/6] CC: ar71xx: add user-space support for EnGenius EPG5000.

2015-07-21 Thread Christian Beier
Backport of r46048.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 3 ++-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 +
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..c02efa8 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -92,6 +92,9 @@ get_status_led() {
gl-inet)
status_led="gl-connect:green:lan"
;;
+   epg5000)
+   status_led="epg5000:amber:power"
+   ;;
esr1750)
status_led="esr1750:amber:power"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..2fab4c2 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -30,7 +30,8 @@ wlr8100)
ucidef_add_switch_vlan "switch0" "2" "0t 1"
;;
 
-esr1750)
+esr1750 |\
+epg5000)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..00e39ae 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -433,6 +433,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"EnGenius EPG5000")
+   name="epg5000"
+   ;;
*"EnGenius ESR1750")
name="esr1750"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..0f3ea9c 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -208,6 +208,7 @@ platform_check_image() {
dir-825-c1 | \
dir-835-a1 | \
dragino2 | \
+   epg5000 | \
esr1750 | \
esr900 | \
ew-dorin | \
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/6] CC: ar71xx: Fix WAN port location on EnGenius ESR1750 and EPG5000.

2015-07-21 Thread Christian Beier
The designated blue WAN port on both devices has index 5, not 1.

Backport of r46227.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2fab4c2..fe4733a 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -34,8 +34,8 @@ esr1750 |\
 epg5000)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
-   ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
-   ucidef_add_switch_vlan "switch0" "2" "0t 1"
+   ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
+   ucidef_add_switch_vlan "switch0" "2" "0t 5"
;;
 
 ap136-010)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/6] CC: ar71xx: add kernel support for EnGenius EPG5000.

2015-07-21 Thread Christian Beier
Backport of r46047.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-epg5000.c| 178 +
 .../718-MIPS-ath79-add-EPG5000-support.patch   |  39 +
 3 files changed, 218 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/718-MIPS-ath79-add-EPG5000-support.patch

diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..17f33bd 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -58,6 +58,7 @@ CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
 CONFIG_ATH79_MACH_EL_M150=y
 CONFIG_ATH79_MACH_EL_MINI=y
+CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
new file mode 100644
index 000..b049f5d
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
@@ -0,0 +1,178 @@
+/*
+ *  EnGenius EPG5000 board support
+ *
+ *  Copyright (c) 2014 Jon Suphammer 
+ *  Copyright (c) 2015 Christian Beier 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "nvram.h"
+
+#define EPG5000_GPIO_LED_WLAN_5G   23
+#define EPG5000_GPIO_LED_WLAN_2G   13
+#define EPG5000_GPIO_LED_POWER_AMBER   2
+#define EPG5000_GPIO_LED_WPS_AMBER 22
+#define EPG5000_GPIO_LED_WPS_BLUE  19
+
+#define EPG5000_GPIO_BTN_WPS   16
+#define EPG5000_GPIO_BTN_RESET 17
+
+#define EPG5000_KEYS_POLL_INTERVAL 20  /* msecs */
+#define EPG5000_KEYS_DEBOUNCE_INTERVAL (3 * EPG5000_KEYS_POLL_INTERVAL)
+
+#define EPG5000_CALDATA_ADDR 0x1fff
+#define EPG5000_WMAC_CALDATA_OFFSET0x1000
+#define EPG5000_PCIE_CALDATA_OFFSET0x5000
+
+#define EPG5000_NVRAM_ADDR 0x1f03
+#define EPG5000_NVRAM_SIZE 0x1
+
+static struct gpio_led epg5000_leds_gpio[] __initdata = {
+   {
+   .name   = "epg5000:amber:power",
+   .gpio   = EPG5000_GPIO_LED_POWER_AMBER,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wps",
+   .gpio   = EPG5000_GPIO_LED_WPS_BLUE,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:amber:wps",
+   .gpio   = EPG5000_GPIO_LED_WPS_AMBER,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wlan-2g",
+   .gpio   = EPG5000_GPIO_LED_WLAN_2G,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wlan-5g",
+   .gpio   = EPG5000_GPIO_LED_WLAN_5G,
+   .active_low = 1,
+   }
+};
+
+static struct gpio_keys_button epg5000_gpio_keys[] __initdata = {
+   {
+   .desc   = "WPS button",
+   .type   = EV_KEY,
+   .code   = KEY_WPS_BUTTON,
+   .debounce_interval = EPG5000_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = EPG5000_GPIO_BTN_WPS,
+   .active_low = 1,
+   },
+   {
+   .desc   = "Reset button",
+   .type   = EV_KEY,
+   .code   = KEY_RESTART,
+   .debounce_interval = EPG5000_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = EPG5000_GPIO_BTN_RESET,
+   .active_low = 1,
+   },
+};
+
+static struct ar8327_pad_cfg epg5000_ar8327_pad0_cfg = {
+   .mode = AR8327_PAD_MAC_RGMII,
+   .txclk_delay_en = true,
+   .rxclk_delay_en = true,
+   .txclk_delay_sel = AR8327_CLK_DELAY_SEL2,
+   .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
+   .mac06_exchange_en = true,
+};
+
+static struct ar8327_platform_data epg5000_ar8327_data = {
+   .pad0_cfg = &epg5000_ar8327_pad0_cfg,
+   .port0_cfg = {
+   .force_link = 1,
+   .speed = AR8327_PORT_SPEED_1000,
+   .duplex = 1,
+   .txpause = 1,
+   .rxpause = 1,
+   },
+};
+
+static struct mdio_board_info epg5000_mdio0_info[] = {
+   {

[OpenWrt-Devel] [RFC] [PATCH 0/6] CC: Backport EnGenius ESR1750 && EPG5000 fixes from trunk

2015-07-21 Thread Christian Beier
This set of patches is my attempt to get decent support for the
ESR1750 and EPG5000 EnGenius devices into CC. They apply to the CC release
branch I got from git://git.openwrt.org/15.05/openwrt.git and build all ar71xx
images just fine. I also tested the image on an EPG5000.

If you think it's too late for these backports, simply ignore this -
otherwise I'd be happy to have these in CC, I tried to make the work impact
as low as possible.

Christian Beier (6):
  CC: ar71xx: add kernel support for EnGenius EPG5000.
  CC: ar71xx: add user-space support for EnGenius EPG5000.
  CC: ar71xx: add profile and build image for EnGenius EPG5000.
  CC: ar71xx: Fix WAN port location on EnGenius ESR1750 and EPG5000.
  CC: ar71xx: add LED defaults for the EnGenius EPG5000
  CC: ar71xx: Fix LED-to-phy mapping for EnGenius ESR1750.

 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   9 +-
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-epg5000.c| 178 +
 target/linux/ar71xx/generic/profiles/engenius.mk   |  12 ++
 target/linux/ar71xx/image/Makefile |   2 +
 .../718-MIPS-ath79-add-EPG5000-support.patch   |  39 +
 10 files changed, 250 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/718-MIPS-ath79-add-EPG5000-support.patch

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


Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc3 target image for EPG5000

2015-07-18 Thread Christian Beier

> the backported EPG5000 patches caused build errors in the release
> branch so i reverted them. due to this EPG5000 support is currently
> not part of CC

I just cloned git://git.openwrt.org/15.05/openwrt.git, reverted the
reverts:

http://git.openwrt.org/?p=15.05/openwrt.git;a=commit;h=083654c25534c0fc55ea3224781fb71e6ad29067
http://git.openwrt.org/?p=15.05/openwrt.git;a=commit;h=d42f3611913724e22aaae33d1da34d37f26cb7d4
http://git.openwrt.org/?p=15.05/openwrt.git;a=commit;h=4e318a6c103839d44af6eb9cf5052bbe74e5a202

ran make defconfig, make prereq, make menuconfig, selected EPG5000 and
it builds just fine. Am I missing something here?

Cheers,

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


[OpenWrt-Devel] [PATCH] ar71xx: Enable ath10k calibration data loading for EnGenius ESR1750 and EPG500.

2015-07-17 Thread Christian Beier
As r46245 disabled the board.bin template workaround, 5GHz wifi stopped working
on these devices. This adds them to the calibration data loading introduced in
r46244 and thus makes 5GHz work again for these devices.

Signed-off-by: Christian Beier 
---
 .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index fbbfbd7..7111630 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -62,6 +62,11 @@ case "$FIRMWARE" in
ath10kcal_extract "radiocfg" 20480 2116
ath10kcal_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
;;
+   esr1750 | \
+   epg5000)
+   ath10kcal_extract "caldata" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
+   ;;
esac
;;
 "ath10k/cal-pci-:01:00.0.bin")
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ath10k fails to load firmware in r46386 on ESR1750

2015-07-17 Thread Christian Beier

Hi list!

On an EnGenius ESR1750 running current trunk (r46386), the ath10k driver fails
to load the firmware blob - it did work in Barrier Breaker though. Here's the
failing dmesg bits:

---snip---
[   72.05] PCI: Enabling device :00:00.0 ( -> 0002)
[   72.06] ath10k_pci :00:00.0: pci irq legacy interrupts 0 irq_mode 0 
reset_mode 0
[   72.28] ath10k_pci :00:00.0: Direct firmware load for 
ath10k/cal-pci-:00:00.0.bin failed with error -2
[   72.29] ath10k_pci :00:00.0: Falling back to user helper
[   72.36] firmware ath10k!cal-pci-:00:00.0.bin: 
firmware_loading_store: map pages failed
[   72.46] ath10k_pci :00:00.0: otp calibration failed: 2
[   72.47] ath10k_pci :00:00.0: failed to run otp: -22
[   72.47] ath10k_pci :00:00.0: could not init core (-22)
[   72.48] ath10k_pci :00:00.0: could not probe fw (-22)
---snap---


Barrier Breaker dmesg instead:
---snip---
[   12.44] ath10k_pci :00:00.0: BAR 0: assigned [mem 
0x1000-0x101f 64bit]
[   12.45] PCI: Enabling device :00:00.0 ( -> 0002)
[   12.75] ath10k: pci irq legacy irq_mode 0 reset_mode 0
[   13.16] ath10k: otp stream is empty, using board.bin contents
[   14.12] ath10k: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 10.1.467.3-1 
api 2 htt 2.1
---snap---

Any hints on this?

Thanks,
-- 
Christian Beier, CTO.

W   shoutrlabs.com
E   c...@shoutrlabs.com
L   https://www.linkedin.com/in/christianbeier
P   +49 (0)30 12076581
T   https://twitter.com/shoutrlabs

what is, is; what is not is possible.

shoutr labs UG (haftungsbeschränkt), 
Wolfener Straße 32-34, Haus K, CleanTech Innovation Center, 12681 Berlin
HRB 154532 B, AG Charlottenburg
Managing directors: Christian Beier, Benjamin Werner, Sebastian Winkler
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Chaos Calmer 15.05-rc3 target image for EPG5000

2015-07-17 Thread Christian Beier

Hi there,

I see that an image for the EnGenius EPG5000 is generated for snapshots
(https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-epg5000-squashfs-sysupgrade.bin),
but there's none for rc-3. Are there certain criteria targets to be part of a
release?

Cheers,
-- 
Christian Beier, CTO.

W   shoutrlabs.com
E   c...@shoutrlabs.com
L   https://www.linkedin.com/in/christianbeier
P   +49 (0)30 12076581
T   https://twitter.com/shoutrlabs

what is, is; what is not is possible.

shoutr labs UG (haftungsbeschränkt), 
Wolfener Straße 32-34, Haus K, CleanTech Innovation Center, 12681 Berlin
HRB 154532 B, AG Charlottenburg
Managing directors: Christian Beier, Benjamin Werner, Sebastian Winkler
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] firstboot aka jffs2reset - can this brick the bootloader?

2015-07-10 Thread Christian Beier

Hi list,

I've flashed yesterday's EnGenius EPG5000 image from
https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-epg5000-squashfs-sysupgrade.bin
which went fine. Thing is 'firstboot' in failsafe mode via telnet just simply
hang without outputting anything (erasing jffs2 in mounted mode seemed to work
fine). Now after reboot in serial console, I just get

---snip---
U-Boot 1.0.2 (Sep  3 2014 - 15:17:15)
Product Name: ESR1200_1750
ap136 - Scorpion 1.0
DRAM:256 MB
---snap---

... and nothing more.

Is there anything I can do to diagnose the problem/ does jffs2reset need some
config/ any ideas what might have happened?

Thanks,

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


[OpenWrt-Devel] [PATCH] ar71xx: Fix LED-to-phy mapping for EnGenius ESR1750.

2015-07-08 Thread Christian Beier
wlan5g is phy0tpt and wlan2g phy1tpt.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 4bb8d40..a361b77 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -184,8 +184,8 @@ esr900)
;;
 
 esr1750)
-   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "esr1750:blue:wlan-2g" 
"phy0tpt"
-   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "esr1750:blue:wlan-2g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy0tpt"
;;
 
 epg5000)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: add LED defaults for the EnGenius EPG5000

2015-07-06 Thread Christian Beier
Am Mon, 22 Jun 2015 13:28:14 +0200
schrieb Christian Beier :

> NB that wlan5g is phy0tpt and wlan2g phy1tpt.

Hey,

just wanted to know whether I need to change anything or this just takes time
to get applied?

Cheers,

   Christian 

> 
> Signed-off-by: Christian Beier 
> ---
>  target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index
> 19814f4..7c10f42 100644 ---
> a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -165,6 +165,11
> @@ esr1750) ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g"
> "phy1tpt" ;;
>  
> +epg5000)
> + ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "epg5000:blue:wlan-2g"
> "phy1tpt"
> + ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "epg5000:blue:wlan-5g"
> "phy0tpt"
> + ;;
> +
>  hiwifi-hc6361)
>   ucidef_set_led_netdev "inet" "INET" "hiwifi:blue:internet" "eth1"
>   ucidef_set_led_wlan "wlan" "WLAN" "hiwifi:blue:wlan-2p4" "phy0tpt"
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add LED defaults for the EnGenius EPG5000

2015-06-22 Thread Christian Beier
NB that wlan5g is phy0tpt and wlan2g phy1tpt.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..7c10f42 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -165,6 +165,11 @@ esr1750)
ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" 
"phy1tpt"
;;
 
+epg5000)
+   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "epg5000:blue:wlan-2g" 
"phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "epg5000:blue:wlan-5g" 
"phy0tpt"
+   ;;
+
 hiwifi-hc6361)
ucidef_set_led_netdev "inet" "INET" "hiwifi:blue:internet" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "hiwifi:blue:wlan-2p4" "phy0tpt"
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Fix WAN port location on EnGenius ESR1750 and EPG5000.

2015-06-22 Thread Christian Beier
The designated blue WAN port on both devices has index 5, not 1.

Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2fab4c2..fe4733a 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -34,8 +34,8 @@ esr1750 |\
 epg5000)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
-   ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
-   ucidef_add_switch_vlan "switch0" "2" "0t 1"
+   ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
+   ucidef_add_switch_vlan "switch0" "2" "0t 5"
;;
 
 ap136-010)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Fix WAN port location on EnGenius ESR1750 and EPG5000.

2015-06-22 Thread Christian Beier
The designated blue WAN port has index 5, not 1, on both devices.

Christian Beier (1):
  ar71xx: Fix WAN port location on EnGenius ESR1750 and EPG5000.

 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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


[OpenWrt-Devel] [PATCH 3/3] ar71xx: add profile and build image for EnGenius EPG5000.

2015-06-18 Thread Christian Beier
Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/generic/profiles/engenius.mk | 12 
 target/linux/ar71xx/image/Makefile   |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/target/linux/ar71xx/generic/profiles/engenius.mk 
b/target/linux/ar71xx/generic/profiles/engenius.mk
index b42c5cc..7ea93e3 100644
--- a/target/linux/ar71xx/generic/profiles/engenius.mk
+++ b/target/linux/ar71xx/generic/profiles/engenius.mk
@@ -39,3 +39,15 @@ define Profile/ESR1750/Description
 endef
 
 $(eval $(call Profile,ESR1750))
+
+
+define Profile/EPG5000
+NAME:=EnGenius EPG5000
+PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb-storage kmod-ath10k 
wpad-mini
+endef
+
+define Profile/EPG5000/Description
+Package set optimized for the EnGenius EPG5000
+endef
+
+$(eval $(call Profile,EPG5000))
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 21d0d66..5e5e6a0 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1139,6 +1139,7 @@ 
cameo_ap94_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware)
 
cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x66(caldata_orig),6208k@0x5(firmware_orig)
 
esr900_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
 
esr1750_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
+epg5000_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
 
ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),3712k(firmware),64k(art)
 
ew-dorin_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
 
f9k1115v2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14464k(rootfs),1408k(kernel),64k(nvram)ro,64k(envram)ro,64k(art)ro,15872k@0x5(firmware)
@@ -2001,6 +2002,7 @@ $(eval $(call 
SingleProfile,CameoAP94,64kraw,DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS
 
 $(eval $(call 
SingleProfile,EnGenius,64k,ESR900,esr900,ESR900,ttyS0,115200,$$(esr900_mtdlayout),KRuImage,,0x4e))
 $(eval $(call 
SingleProfile,EnGenius,64k,ESR1750,esr1750,ESR1750,ttyS0,115200,$$(esr1750_mtdlayout),KRuImage,,0x61))
+$(eval $(call 
SingleProfile,EnGenius,64k,EPG5000,epg5000,EPG5000,ttyS0,115200,$$(epg5000_mtdlayout),KRuImage,,0x71))
 
 $(eval $(call 
SingleProfile,HiWiFi,64k,HIWIFI_HC6361,hiwifi-hc6361,HiWiFi-HC6361,ttyATH0,115200,$$(hiwifi_hc6361_mtdlayout),KRuImage))
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ar71xx: add user-space support for EnGenius EPG5000.

2015-06-18 Thread Christian Beier
Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 3 ++-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 +
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 0553251..8af4ae5 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -89,6 +89,9 @@ get_status_led() {
gl-inet)
status_led="gl-connect:green:lan"
;;
+   epg5000)
+   status_led="epg5000:amber:power"
+   ;;
esr1750)
status_led="esr1750:amber:power"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index f5c6865..23d0be5 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -30,7 +30,8 @@ wlr8100)
ucidef_add_switch_vlan "switch0" "2" "0t 1"
;;
 
-esr1750)
+esr1750 |\
+epg5000)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..722af51 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -430,6 +430,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
+   *"EnGenius EPG5000")
+   name="epg5000"
+   ;;
*"EnGenius ESR1750")
name="esr1750"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..1908e5b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -208,6 +208,7 @@ platform_check_image() {
dir-825-c1 | \
dir-835-a1 | \
dragino2 | \
+   epg5000 | \
esr1750 | \
esr900 | \
ew-dorin | \
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ar71xx: add kernel support for EnGenius EPG5000.

2015-06-18 Thread Christian Beier
Signed-off-by: Christian Beier 
---
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-epg5000.c| 178 +
 .../718-MIPS-ath79-add-EPG5000-support.patch   |  39 +
 3 files changed, 218 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/718-MIPS-ath79-add-EPG5000-support.patch

diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..2fb3525 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -57,6 +57,7 @@ CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
 CONFIG_ATH79_MACH_EL_M150=y
 CONFIG_ATH79_MACH_EL_MINI=y
+CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
new file mode 100644
index 000..b049f5d
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
@@ -0,0 +1,178 @@
+/*
+ *  EnGenius EPG5000 board support
+ *
+ *  Copyright (c) 2014 Jon Suphammer 
+ *  Copyright (c) 2015 Christian Beier 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "nvram.h"
+
+#define EPG5000_GPIO_LED_WLAN_5G   23
+#define EPG5000_GPIO_LED_WLAN_2G   13
+#define EPG5000_GPIO_LED_POWER_AMBER   2
+#define EPG5000_GPIO_LED_WPS_AMBER 22
+#define EPG5000_GPIO_LED_WPS_BLUE  19
+
+#define EPG5000_GPIO_BTN_WPS   16
+#define EPG5000_GPIO_BTN_RESET 17
+
+#define EPG5000_KEYS_POLL_INTERVAL 20  /* msecs */
+#define EPG5000_KEYS_DEBOUNCE_INTERVAL (3 * EPG5000_KEYS_POLL_INTERVAL)
+
+#define EPG5000_CALDATA_ADDR 0x1fff
+#define EPG5000_WMAC_CALDATA_OFFSET0x1000
+#define EPG5000_PCIE_CALDATA_OFFSET0x5000
+
+#define EPG5000_NVRAM_ADDR 0x1f03
+#define EPG5000_NVRAM_SIZE 0x1
+
+static struct gpio_led epg5000_leds_gpio[] __initdata = {
+   {
+   .name   = "epg5000:amber:power",
+   .gpio   = EPG5000_GPIO_LED_POWER_AMBER,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wps",
+   .gpio   = EPG5000_GPIO_LED_WPS_BLUE,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:amber:wps",
+   .gpio   = EPG5000_GPIO_LED_WPS_AMBER,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wlan-2g",
+   .gpio   = EPG5000_GPIO_LED_WLAN_2G,
+   .active_low = 1,
+   },
+   {
+   .name   = "epg5000:blue:wlan-5g",
+   .gpio   = EPG5000_GPIO_LED_WLAN_5G,
+   .active_low = 1,
+   }
+};
+
+static struct gpio_keys_button epg5000_gpio_keys[] __initdata = {
+   {
+   .desc   = "WPS button",
+   .type   = EV_KEY,
+   .code   = KEY_WPS_BUTTON,
+   .debounce_interval = EPG5000_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = EPG5000_GPIO_BTN_WPS,
+   .active_low = 1,
+   },
+   {
+   .desc   = "Reset button",
+   .type   = EV_KEY,
+   .code   = KEY_RESTART,
+   .debounce_interval = EPG5000_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = EPG5000_GPIO_BTN_RESET,
+   .active_low = 1,
+   },
+};
+
+static struct ar8327_pad_cfg epg5000_ar8327_pad0_cfg = {
+   .mode = AR8327_PAD_MAC_RGMII,
+   .txclk_delay_en = true,
+   .rxclk_delay_en = true,
+   .txclk_delay_sel = AR8327_CLK_DELAY_SEL2,
+   .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
+   .mac06_exchange_en = true,
+};
+
+static struct ar8327_platform_data epg5000_ar8327_data = {
+   .pad0_cfg = &epg5000_ar8327_pad0_cfg,
+   .port0_cfg = {
+   .force_link = 1,
+   .speed = AR8327_PORT_SPEED_1000,
+   .duplex = 1,
+   .txpause = 1,
+   .rxpause = 1,
+   },
+};
+
+static struct mdio_board_info epg5000_mdio0_info[] = {
+   {
+   .

[OpenWrt-Devel] [PATCH 0/3] [RFC] ar71xx: Add support for EnGenius EPG5000

2015-06-18 Thread Christian Beier
Hi list,

This patch series adds support for the EnGenius EPG5000, the successor of the
ESR1750. That is, both devices are *very* similar internally, to the point that
the EPG5000 works flawlessly with an ESR1750 image AFAICT. One important 
difference
thought is the product id that's needed for flashing them .dlf images from the 
OEM
firmware.

In fact, both are so similar that mach-epg5000.c is simply a copy of 
mach-esr1750.c
with s/esr1750/epg5000/.

Please comment.

Cheers,
   Christian

Christian Beier (3):
  ar71xx: add kernel support for EnGenius EPG5000.
  ar71xx: add user-space support for EnGenius EPG5000.
  ar71xx: add profile and build image for EnGenius EPG5000.

 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   3 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-epg5000.c| 178 +
 target/linux/ar71xx/generic/profiles/engenius.mk   |  12 ++
 target/linux/ar71xx/image/Makefile |   2 +
 .../718-MIPS-ath79-add-EPG5000-support.patch   |  39 +
 9 files changed, 241 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
 create mode 100644 
target/linux/ar71xx/patches-3.18/718-MIPS-ath79-add-EPG5000-support.patch

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