[OpenWrt-Devel] [PATCH 2/2] ar71xx: WPN824N: enable buttons

2016-03-25 Thread Hartmut Knaack
Enable buttons connected to the GPIOs of the AR9285.

Signed-off-by: Hartmut Knaack 
---
 .../ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 38 +++---
 1 file changed, 33 insertions(+), 5 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 1fea5ef..4961026 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -80,7 +80,7 @@
 #define WNR1000V2_GPIO_WMAC_BTN_RESET  7
 #define WNR1000V2_GPIO_WMAC_BTN_RFKILL 8
 
-/* Connected through AR7240 */
+/* WPN824N - connected through AR7240 */
 #define WPN824N_GPIO_LED_WAN_AMBER 0
 #define WPN824N_GPIO_LED_STATUS_AMBER  1
 #define WPN824N_GPIO_LED_LAN1_AMBER6 /* AR724X_GPIO_FUNC_JTAG_DISABLE */
@@ -93,15 +93,15 @@
 #define WPN824N_GPIO_LED_LAN4_GREEN16
 #define WPN824N_GPIO_LED_WAN_GREEN 17
 
-/* Connected through AR9285 */
+/* WPN824N - connected through AR9285 */
 #define WPN824N_WGPIO_LED_PWR_GREEN0
 #define WPN824N_WGPIO_LED_WLAN_BLUE1
 #define WPN824N_WGPIO_LED_WPS1_BLUE5
 #define WPN824N_WGPIO_LED_WPS2_BLUE9
 #define WPN824N_WGPIO_LED_TEST_AMBER   10
-#define WPN824N_WGPIO_BTN_PUSH 6   /* currently unused */
-#define WPN824N_WGPIO_BTN_RESET7   /* currently unused */
-#define WPN824N_WGPIO_BTN_WLAN 8   /* currently unused */
+#define WPN824N_WGPIO_BTN_WPS  6
+#define WPN824N_WGPIO_BTN_RESET7
+#define WPN824N_WGPIO_BTN_WLAN 8
 
 #define WNR2000V3_KEYS_POLL_INTERVAL   20  /* msecs */
 #define WNR2000V3_KEYS_DEBOUNCE_INTERVAL   (3 * 
WNR2000V3_KEYS_POLL_INTERVAL)
@@ -391,6 +391,31 @@ static struct gpio_keys_button wnr1000v2_wmac_keys_gpio[] 
= {
}
 };
 
+static struct gpio_keys_button wpn824n_wmac_keys_gpio[] = {
+   {
+   .desc   = "reset",
+   .type   = EV_KEY,
+   .code   = KEY_RESTART,
+   .debounce_interval  = WNR2000V3_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = WPN824N_WGPIO_BTN_RESET,
+   .active_low = 1,
+   }, {
+   .desc   = "rfkill",
+   .type   = EV_KEY,
+   .code   = KEY_RFKILL,
+   .debounce_interval  = WNR2000V3_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = WPN824N_WGPIO_BTN_WLAN,
+   .active_low = 1,
+   }, {
+   .desc   = "wps",
+   .type   = EV_KEY,
+   .code   = KEY_WPS_BUTTON,
+   .debounce_interval  = WNR2000V3_KEYS_DEBOUNCE_INTERVAL,
+   .gpio   = WPN824N_WGPIO_BTN_WPS,
+   .active_low = 1,
+   }
+};
+
 /*
  * For WNR2000v3 ART flash area used for WLAN MAC is usually empty (0xff)
  * so ath9k driver uses random MAC instead each time module is loaded.
@@ -603,6 +628,9 @@ static void __init wpn824n_setup(void)
ap9x_pci_setup_wmac_led_name(0, wnr2000v3_wmac_led_name);
ap9x_pci_setup_wmac_leds(0, wpn824n_wmac_leds_gpio,
 ARRAY_SIZE(wpn824n_wmac_leds_gpio));
+   ap9x_pci_setup_wmac_btns(0, wpn824n_wmac_keys_gpio,
+ARRAY_SIZE(wpn824n_wmac_keys_gpio),
+WNR2000V3_KEYS_POLL_INTERVAL);
 }
 
 MIPS_MACHINE(ATH79_MACH_WPN824N, "WPN824N", "NETGEAR WPN824N", wpn824n_setup);
-- 
2.7.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] ar71xx: WPN824N: set WLAN LED name

2016-03-25 Thread Hartmut Knaack
Make use of ap9x_pci_setup_wmac_led_name() to set the name of the WLAN
LED.

Signed-off-by: Hartmut Knaack 
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 8f585fb..1fea5ef 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -173,7 +173,7 @@ static struct gpio_led wnr2000v3_wmac_leds_gpio[] = {
}
 };
 
-/* Blue WLAN LED for: WNR2000v3, WNR1000v2 */
+/* Blue WLAN LED for: WNR2000v3, WNR1000v2, WPN824N */
 static const char *wnr2000v3_wmac_led_name = "netgear:blue:wlan";
 
 static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
@@ -312,10 +312,6 @@ static struct gpio_led wpn824n_wmac_leds_gpio[] = {
.gpio   = WPN824N_WGPIO_LED_PWR_GREEN,
.active_low = 1,
}, {
-   .name   = "netgear:blue:wlan",
-   .gpio   = WPN824N_WGPIO_LED_WLAN_BLUE,
-   .active_low = 1,
-   }, {
.name   = "netgear:blue:wps1",
.gpio   = WPN824N_WGPIO_LED_WPS1_BLUE,
.active_low = 1,
@@ -604,6 +600,7 @@ static void __init wpn824n_setup(void)
 wpn824n_leds_gpio);
 
ap9x_pci_setup_wmac_led_pin(0, WPN824N_WGPIO_LED_WLAN_BLUE);
+   ap9x_pci_setup_wmac_led_name(0, wnr2000v3_wmac_led_name);
ap9x_pci_setup_wmac_leds(0, wpn824n_wmac_leds_gpio,
 ARRAY_SIZE(wpn824n_wmac_leds_gpio));
 }
-- 
2.7.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Brauche Hilfe

2016-03-25 Thread Valent Turkovic
What cpu is RB433UL actually using?

When the RB433UL board was released in 2013 it said "Atheros AR7161 400MHz"
[1], but not it says it is "AR7130 300Mhz" [2]

I see that AR7130 is supported in OpenWrt becase RB493 [3] works ok with
same CPU, so can anyone explain what is the issue with getting OpenWrt
running on RB433UL?

Has Mikrotik introduced any changes that prevent running OpenWrt on this
board?

[1] http://download2.mikrotik.com/news/news50.pdf
[2] http://routerboard.com/RB433UL
[3] https://wiki.openwrt.org/toh/mikrotik/mikrotik_routerboard_rb493
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Add preliminary TL-WR841N/ND v11 support

2016-03-25 Thread Stijn Segers
Something went wrong with the subject - I resent so the e-mail can be retrieved 
in the mailing list archives.

This patch adds preliminary support for the TP-Link TL-WR841N/ND to trunk.
It is similar to the already supported v10 [1]. I have added support based
on that topic but since I do not have the device myself I am looking for
testers. Trunk and stable images are available here: 

https://volatilesystems.org/dl/openwrt/tl-wr841n-v11/

(DNS might be flaky - if you use e.g. OpenDNS or Google's DNS the domain
should resolve).

Thanks for testing and reporting back.

Stijn

[1]: https://forum.openwrt.org/viewtopic.php?id=61309

---
 target/linux/ar71xx/image/Makefile | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 290e85b..595fba2 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -850,6 +850,13 @@ define Device/tl-wr841-v10
 TPLINK_HWID := 0x08410010
 endef
 
+define Device/tl-wr841-v11
+   $(Device/tplink-4mlzma)
+   BOARDNAME := TL-WR841N-v9
+   DEVICE_PROFILE := TLWR841
+   TPLINK_HWID := 0x08410011
+endef
+
 define Device/tl-wr842n-v1
 $(Device/tplink-8m)
 BOARDNAME := TL-MR3420
@@ -877,7 +884,7 @@ define Device/tl-wr847n-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08470008
 endef
-TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 
tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v1 tl-wr842n-v2 tl-wr843nd-v1 
tl-wr847n-v8
+TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 
tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr842n-v1 tl-wr842n-v2 
tl-wr843nd-v1 tl-wr847n-v8
 
 define Device/tl-wr941nd-v2
 $(Device/tplink-4m)
-- 
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: avoid AR71XX_MODEL ending with a space on some TP-LINK-like devices

2016-03-25 Thread Matthias Schiffer
Instead of adding the space when combining $model and $hwver, add the space
to the beginning of $hwver, so the resulting string won't end with a space
when $hwver is set to the empty string.

Signed-off-by: Matthias Schiffer 
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 0d1405a..1822998 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -99,7 +99,7 @@ tplink_board_detect() {
hwid=$(tplink_get_hwid)
mid=$(tplink_get_mid)
hwver=${hwid:6:2}
-   hwver="v${hwver#0}"
+   hwver=" v${hwver#0}"
 
case "$hwid" in
"015000"*)
@@ -171,8 +171,8 @@ tplink_board_detect() {
"083000"*)
model="TP-Link TL-WA830RE"
 
-   if [ "$hwver" = 'v10' ]; then
-   hwver='v1'
+   if [ "$hwver" = ' v10' ]; then
+   hwver=' v1'
fi
;;
"084100"*)
@@ -277,7 +277,7 @@ tplink_board_detect() {
;;
esac
 
-   AR71XX_MODEL="$model $hwver"
+   AR71XX_MODEL="$model$hwver"
 }
 
 tplink_pharos_get_model_string() {
-- 
2.7.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: fix the revision of a few TP-LINK devices in AR71XX_MODEL to match labels/image names

2016-03-25 Thread Matthias Schiffer
Let's not confuse users about the revisions of their devices when we can
easily avoid it.

Not tested on real hardware.

Signed-off-by: Matthias Schiffer 
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 8 
 1 file changed, 8 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1822998..6b8550a 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -137,6 +137,10 @@ tplink_board_detect() {
;;
"071000"*)
model="TP-Link TL-WR710N"
+
+   if [ "$hwid" = '0712' -a "$mid" = '0002' ]; then
+   hwver=' v2.1'
+   fi
;;
"072001"*)
model="TP-Link TL-WR720N"
@@ -177,6 +181,10 @@ tplink_board_detect() {
;;
"084100"*)
model="TP-Link TL-WR841N/ND"
+
+   if [ "$hwid" = '08410002' -a "$mid" = '0002' ]; then
+   hwver=' v1.5'
+   fi
;;
"084200"*)
model="TP-Link TL-WR842N/ND"
-- 
2.7.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: check both HWID and HWREV on upgrades of TP-LINK devices

2016-03-25 Thread Matthias Schiffer
There's no reason for us to be more lenient than the stock firmware, so
better check the HWREV as well to avoid bricked devices.

Signed-off-by: Matthias Schiffer 
---
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 1d3695f..923e02b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -66,6 +66,10 @@ tplink_get_image_hwid() {
get_image "$@" | dd bs=4 count=1 skip=16 2>/dev/null | hexdump -v -n 4 
-e '1/1 "%02x"'
 }
 
+tplink_get_image_mid() {
+   get_image "$@" | dd bs=4 count=1 skip=17 2>/dev/null | hexdump -v -n 4 
-e '1/1 "%02x"'
+}
+
 tplink_get_image_boot_size() {
get_image "$@" | dd bs=4 count=1 skip=37 2>/dev/null | hexdump -v -n 4 
-e '1/1 "%02x"'
 }
@@ -396,13 +400,17 @@ platform_check_image() {
}
 
local hwid
-   local imageid
+   local mid
+   local imagehwid
+   local imagemid
 
hwid=$(tplink_get_hwid)
-   imageid=$(tplink_get_image_hwid "$1")
+   mid=$(tplink_get_mid)
+   imagehwid=$(tplink_get_image_hwid "$1")
+   imagemid=$(tplink_get_image_mid "$1")
 
-   [ "$hwid" != "$imageid" ] && {
-   echo "Invalid image, hardware ID mismatch, hw:$hwid 
image:$imageid."
+   [ "$hwid" != "$imagehwid" -o "$mid" != "$imagemid" ] && {
+   echo "Invalid image, hardware ID mismatch, hw:$hwid 
$mid image:$imagehwid $imagemid."
return 1
}
 
-- 
2.7.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Brauche Hilfe

2016-03-25 Thread Valent Turkovic
2016-01-19 18:10 GMT+01:00 :

> ich könnte jemanden deutschsprachigen gebrauchen, der mir etwas
> Nachhilfe in OpenWRT bietet und vielleicht auch bei meinem Problem
> hilft.
>
> Ich würde gern das Board RB433UL, welches bei mir versauert gangbar
> machen, aber dazu fehlt mir noch etwas Wissen zu OpenWRT.
>
> Momentaner Stand:
>
> Ich lade den Kern für RB433U per tftpboot hoch und erhalte einen Log
> über die serielle Schnittstelle.
> Das Schreiben auf die Serielle Schnittstelle funktioniert noch nicht.
> Der Bootloader unterstützt die Serielle Schnittstelle nicht.
> Die Interfaces melden sich noch nicht mittels "netdiscover -i eth0 -r
> 192.168.0.0/16".
> Demnach vermute ich die Interfaces werden nicht per Default hochgefahren.
> Das Ein- und Ausstecken des Netzkabels wird allerdings auf der Console
> angezeigt.
>
> ToDo
>
> Aktivieren der Interfaces.
> Nachweis einer stabilen Funktion des Systems.
> Lösung finden, wie mit dem Bootloader umzugehen ist.
> Eine Meldung: "Nand not found" ist zu prüfen.
> Eventuell GPIO9 für serielle Schnittstelle RXD hinzufügen/korrigieren.
>
>
>
> Wer hat Lust???
>

Was there any progress on getting OpenWrt running on RB433UL since January?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rsync mirror of download.openwrt.org ?

2016-03-25 Thread Laurent GUERBY
On Sat, 2016-03-19 at 15:47 +0100, John Crispin wrote:
> 
> On 19/03/2016 14:10, Laurent GUERBY wrote:
> > Hi, 
> > 
> > We've setup a mirror of openwrt on a 10G+ connection IPv4+v6, MPTCP
> > support using initial rsync from ba.mirror.garr.it :
> > 
> > http://openwrt.tetaneutral.net
> > 
> > But garr.it does not have 15.05.1, is there a way to directly rsync from
> > downloads.openwrt.org ? Or any other way ? (push would be okay if
> > needed).
> > 
> > Sincerely
> > 
> > Laurent GUERBY
> > AS197422 http://tetaneutral.net
> 
> i can rsync 15.05.1 to your server if that is ok for you ...

Ok for us :)

Laurent

PS: public key request sent last sunday by mail
(may be lost somewhere ?)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] (no subject)

2016-03-25 Thread Michael Watson
Stijn,

Thank you.

The openwrt project is really amazing.  It must take years to get up to
speed.

R/
Mike

-Original Message-
From: francesco.borrom...@inventati.org
[mailto:francesco.borrom...@inventati.org] 
Sent: Friday, March 25, 2016 8:48 AM
To: Michael Watson
Cc: openwrt-devel@lists.openwrt.org
Subject: RE: [OpenWrt-Devel] (no subject)



Hi Mike,

Sorry, not technical enough to help out with that...

Hope someone else can help you out.

Cheers

Stijn

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


[OpenWrt-Devel] [PATCH] ar71xx: fix qca956x ge0 speed

2016-03-25 Thread Weijie Gao
when qca956x uses the internal fe switch, the dummy function should be used

Signed-off-by: Weijie Gao 
---
 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index b43c80a..f292800 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -1128,7 +1128,7 @@ void __init ath79_register_eth(unsigned int id)
if (pdata->phy_if_mode == PHY_INTERFACE_MODE_SGMII)
pdata->set_speed = qca956x_set_speed_sgmii;
else
-   pdata->set_speed = ath79_set_speed_ge0;
+   pdata->set_speed = ath79_set_speed_dummy;
} else {
pdata->reset_bit = QCA955X_RESET_GE1_MAC |
   QCA955X_RESET_GE1_MDIO;
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] (no subject)

2016-03-25 Thread francesco . borromini
Hi Mike,
Sorry, not technical enough to help out with that...
Hope someone else can help you out.
Cheers
Stijn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] (no subject)

2016-03-25 Thread Michael Watson
Stijn,

Thank you.

Regrettably, I do not have one.  However, I just picket up a TL-WA850RE v2.
Based on the FCC page the TL-WA850RE v2 components appear to be the same as
the TL-WR841ND V10.  It this what is called the ap143 reference design?

QCA9533-BL3A SOC
Zentel A3S56D40gIP-50L RAM
Winbond 25Q32FVS1G (not clear - can't make out about half in the photo)

R/
Mike

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Stijn Segers
Sent: Friday, March 25, 2016 3:36 AM
To: openwrt-devel@lists.openwrt.org
Subject: [OpenWrt-Devel] (no subject)


Subject: [PATCH] ar71xx: Add preliminary TL-WR841N/ND v11 support

This patch adds preliminary support for the TP-Link TL-WR841N/ND to trunk.
It is similar to the already supported v10 [1]. I have added support based
on that topic but since I do not have the device myself I am looking for
testers. Trunk and stable images are available here: 

https://volatilesystems.org/dl/openwrt/tl-wr841n-v11/

(DNS might be flaky - if you use e.g. OpenDNS or Google's DNS the domain
should resolve).

Thanks for testing.

Stijn

[1]: https://forum.openwrt.org/viewtopic.php?id=61309

---
 target/linux/ar71xx/image/Makefile | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index 290e85b..595fba2 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -850,6 +850,13 @@ define Device/tl-wr841-v10
 TPLINK_HWID := 0x08410010
 endef
 
+define Device/tl-wr841-v11
+   $(Device/tplink-4mlzma)
+   BOARDNAME := TL-WR841N-v9
+   DEVICE_PROFILE := TLWR841
+   TPLINK_HWID := 0x08410011
+endef
+
 define Device/tl-wr842n-v1
 $(Device/tplink-8m)
 BOARDNAME := TL-MR3420
@@ -877,7 +884,7 @@ define Device/tl-wr847n-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08470008
 endef
-TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7
tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v1 tl-wr842n-v2 tl-wr843nd-v1
tl-wr847n-v8
+TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 
+tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr842n-v1 
+tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8
 
 define Device/tl-wr941nd-v2
 $(Device/tplink-4m)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for Compex WPJ342

2016-03-25 Thread Christian Mehlis
OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050 openwrt-ar71xx-generic-wpj342-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis 
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   5 +
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj342.c | 178 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 13 files changed, 218 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj342.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index bd488a2..c6a2014 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -405,6 +405,11 @@ gl-ar300)
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
 
+wpj342)
+   ucidef_add_switch "switch0" \
+   "0@eth0" "1:lan" "2:wan"
+   ;;
+
 wpj344)
ucidef_add_switch "switch0" \
"0@eth0" "3:lan" "2:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index a2251d1..3b88007 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -385,6 +385,9 @@ get_status_led() {
wp543)
status_led="wp543:green:diag"
;;
+   wpj342)
+   status_led="wpj342:green:sig3"
+   ;;
wpj344)
status_led="wpj344:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 0d1405a..d77483e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -953,6 +953,9 @@ ar71xx_board_detect() {
*WPE72)
name="wpe72"
;;
+   *WPJ342)
+   name="wpj342"
+   ;;
*WPJ344)
name="wpj344"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 1d3695f..8da5afb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -251,6 +251,7 @@ platform_check_image() {
rw2458n | \
wpj531 | \
wndap360 | \
+   wpj342 | \
wpj344 | \
wzr-hp-g300nh2 | \
wzr-hp-g300nh | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index d6ad850..cc410f6 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -176,6 +176,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ342=y
 CONFIG_ATH79_MACH_WPJ344=y
 CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 49cecc5..f5b475b 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -179,6 +179,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ342=y
 CONFIG_ATH79_MACH_WPJ344=y
 CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index f47f1b9..d9c8737 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -346,6 +346,16 @@ config ATH79_MACH_WPE72
select ATH79_DEV_USB
select MYLOADER
 
+config ATH79_MACH_WPJ342
+   bool "Compex WPJ342 board support"
+   select SOC_AS934X
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_USB
+   select ATH79_DEV_WMAC
+
 config ATH79_MACH_WPJ344
bool "Compex WPJ344 board support"
select SOC_AS934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 74376b2..93e3919 100644
--- 

[OpenWrt-Devel] (no subject)

2016-03-25 Thread Stijn Segers
Subject: [PATCH] ar71xx: Add preliminary TL-WR841N/ND v11 support

This patch adds preliminary support for the TP-Link TL-WR841N/ND to trunk.
It is similar to the already supported v10 [1]. I have added support based
on that topic but since I do not have the device myself I am looking for
testers. Trunk and stable images are available here: 

https://volatilesystems.org/dl/openwrt/tl-wr841n-v11/

(DNS might be flaky - if you use e.g. OpenDNS or Google's DNS the domain
should resolve).

Thanks for testing.

Stijn

[1]: https://forum.openwrt.org/viewtopic.php?id=61309

---
 target/linux/ar71xx/image/Makefile | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 290e85b..595fba2 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -850,6 +850,13 @@ define Device/tl-wr841-v10
 TPLINK_HWID := 0x08410010
 endef
 
+define Device/tl-wr841-v11
+   $(Device/tplink-4mlzma)
+   BOARDNAME := TL-WR841N-v9
+   DEVICE_PROFILE := TLWR841
+   TPLINK_HWID := 0x08410011
+endef
+
 define Device/tl-wr842n-v1
 $(Device/tplink-8m)
 BOARDNAME := TL-MR3420
@@ -877,7 +884,7 @@ define Device/tl-wr847n-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08470008
 endef
-TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 
tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v1 tl-wr842n-v2 tl-wr843nd-v1 
tl-wr847n-v8
+TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 
tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr842n-v1 tl-wr842n-v2 
tl-wr843nd-v1 tl-wr847n-v8
 
 define Device/tl-wr941nd-v2
 $(Device/tplink-4m)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel