Re: [OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace

2019-09-17 Thread Martin Schiller

On 2019-09-17 08:51, Martin Schiller wrote:
Meanwhile I found out that there is a mechanism with swconfig to 
configure

the link attributes:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=6219b3deae1c8dfbf405f5a701d3f3b00ebacce1

I will try to integrate this into the "old" xrx200-net driver.


I've sent a PR where I have added the set_port_link feature to the 
xrx200-net driver:


https://github.com/openwrt/openwrt/pull/2421

Martin

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


Re: [OpenWrt-Devel] [PATCH V2] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread mail
Hi,

> Issues:
> switch configuration currently broken (port 2 on device is seen as port 3, 
> port
> 3 as port 2).

If it's only that, just do:

+   tplink,tl-mr6400-v1)
+   ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "1:lan:1" "2:lan:3" "3:lan:2"
+   ;;

This won't change swconfig, but will show ports correctly in Luci.
(This assignment will change again if you experiment with phy-swap...)

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH V2] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso
This device is an LTE router supported in ar71xx.
As per original commit, hardware specifications (v1.0 EU):
- SoC: QCA9531
- Flash: Winbond W25Q64FV (8MiB)
- RAM: EtronTech EM6AB160TSE-5G (64MiB)
- Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
- Ethernet: 2NIC (3x100M + 1x100M)
- WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
- Power: DC 12V 1A

Flashing instructions:
You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Working:
- Wi-Fi
- TP-Link LTE module does it's thing (but see Notes)
- reset/rfkill keys

Untested:
- recovery via factory
- leds

(I promise I'll test untested items as well in final version.)

Issues:
switch configuration currently broken (port 2 on device is seen as port 3, port 
3 as port 2).

Note: as it happened occasionally in ar71xx, during bursty flash activity, LTE 
module init will fail, with USB enumeration errors.

V1->V2:
- addressed most comments, except for SUPPORTED_DEVICES

Signed-off-by: Enrico Mioso 
CC: Filip Moc 
CC: Piotr Dymacz 
---
{
This version is not meant to be definite nor merged. I'll be laving tomorrow, 
and will be back sunday, so I wanted to post this version so in case you have 
visibility over last changes.
Thanks!
Enrico
}
 .../ath79/base-files/etc/board.d/01_leds  |   5 +
 .../ath79/base-files/etc/board.d/02_network   |   5 +
 .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 172 ++
 target/linux/ath79/image/generic-tp-link.mk   |  10 +
 4 files changed, 192 insertions(+)
 create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 778316e450..385ac8d9ca 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -130,6 +130,11 @@ tplink,archer-c7-v5)
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
"0x10"
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
"0x20"
;;
+tplink,tl-mr6400-v1)
+   ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0"
+   ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1"
+   ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0"
+   ;;
 tplink,archer-c2-v3|\
 tplink,tl-wr1043nd-v4|\
 tplink,tl-wr1043n-v5)
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 5b47af8ef7..2b0e1ce400 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -56,6 +56,11 @@ ath79_setup_interfaces()
winchannel,wb2000)
ucidef_set_interface_lan "eth0"
;;
+   tplink,tl-mr6400-v1)
+   ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "1:lan" "2:lan" "3:lan"
+   ;;
avm,fritz4020|\
pcs,cr3000|\
tplink,archer-c58-v1|\
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts 
b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
new file mode 100644
index 00..a2c006f05e
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca953x.dtsi"
+
+/ {
+   compatible = "tplink,tl-mr6400-v1", "qca,qca9531";
+   model = "TP-Link TL-MR6400 v1";
+
+   aliases {
+   led-boot = _power;
+   led-failsafe = _power;
+   led-running = _power;
+   led-upgrade = _power;
+   };
+
+   gpio_leds: leds {
+   compatible = "gpio-leds";
+
+   /* D12 */
+   wan {
+   label = "tp-link:white:wan";
+   gpios = < 0 GPIO_ACTIVE_HIGH>;
+   };
+
+   /* D11 */
+   4g {
+   label = "tp-link:white:4g";
+   gpios = < 1 GPIO_ACTIVE_HIGH>;
+   };
+
+   /* D5 */
+   wps {
+   label = "tp-link:white:wps";
+   gpios = < 3 GPIO_ACTIVE_HIGH>;
+   };
+
+   /* D3 */
+   wlan {
+   label = "tp-link:white:wlan";
+   gpios = < 11 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "phy0tpt";
+   };
+
+   /* D2 */
+   led_power: power {
+   label = "tp-link:white:power";
+   gpios = < 13 GPIO_ACTIVE_HIGH>;
+   };
+
+   /* D4 */
+   lan {
+

[OpenWrt-Devel] [PATCH lede-17.01] openssl: bump to 1.0.2t, Makefile updates

2019-09-17 Thread Eneas U de Queiroz
This version fixes 3 low-severity vulnerabilities:

- CVE-2019-1547: ECDSA remote timing attack
- CVE-2019-1549: Fork Protection
- CVE-2019-1563: Padding Oracle in PKCS7_dataDecode and
 CMS_decrypt_set1_pkey

Patches were refreshed, PKG_SOURCE_URL was updated to match
openwrt-18.06, and Eneas U de Queiroz added as maintainer.

Signed-off-by: Eneas U de Queiroz 

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 60357604b1..3f8907cf17 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
 PKG_BASE:=1.0.2
-PKG_BUGFIX:=s
+PKG_BUGFIX:=t
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
@@ -18,15 +18,17 @@ PKG_BUILD_PARALLEL:=0
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.openssl.org/source/ \
-   ftp://ftp.openssl.org/source/ \
-   http://www.openssl.org/source/old/$(PKG_BASE)/ \
-   ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \
-   ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/
-PKG_HASH:=cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96
+PKG_SOURCE_URL:= \
+   http://ftp.fi.muni.cz/pub/openssl/source/ \
+   http://ftp.linux.hr/pub/openssl/source/ \
+   http://gd.tuwien.ac.at/infosys/security/openssl/source/ \
+   http://www.openssl.org/source/ \
+   http://www.openssl.org/source/old/$(PKG_BASE)/
+PKG_HASH:=14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
 
 PKG_LICENSE:=OpenSSL
 PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Eneas U de Queiroz 
 PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE_CRYPTO \
CONFIG_OPENSSL_ENGINE_DIGEST \
diff --git a/package/libs/openssl/patches/150-no_engines.patch 
b/package/libs/openssl/patches/150-no_engines.patch
index a518a00496..314075a910 100644
--- a/package/libs/openssl/patches/150-no_engines.patch
+++ b/package/libs/openssl/patches/150-no_engines.patch
@@ -1,6 +1,6 @@
 --- a/Configure
 +++ b/Configure
-@@ -2144,6 +2144,11 @@ EOF
+@@ -2145,6 +2145,11 @@ EOF
close(OUT);
}


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


[OpenWrt-Devel] [PATCH 18.06] openssl: bump to 1.0.2t, add maintainer

2019-09-17 Thread Eneas U de Queiroz
This version fixes 3 low-severity vulnerabilities:

- CVE-2019-1547: ECDSA remote timing attack
- CVE-2019-1549: Fork Protection
- CVE-2019-1563: Padding Oracle in PKCS7_dataDecode and
 CMS_decrypt_set1_pkey

Patches were refreshed, and Eneas U de Queiroz added as maintainer.

Signed-off-by: Eneas U de Queiroz 

--
This was run-tested in openwrt master with 18.06 versions of libustream
and openssl with uhttp, uclient-fetch, and openssl-util.

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 99f1b861b4..50939568c8 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
 PKG_BASE:=1.0.2
-PKG_BUGFIX:=s
+PKG_BUGFIX:=t
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
@@ -24,10 +24,11 @@ PKG_SOURCE_URL:= \
http://gd.tuwien.ac.at/infosys/security/openssl/source/ \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
-PKG_HASH:=cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96
+PKG_HASH:=14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
 
 PKG_LICENSE:=OpenSSL
 PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Eneas U de Queiroz 
 PKG_CPE_ID:=cpe:/a:openssl:openssl
 PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE_CRYPTO \
diff --git a/package/libs/openssl/patches/150-no_engines.patch 
b/package/libs/openssl/patches/150-no_engines.patch
index a518a00496..314075a910 100644
--- a/package/libs/openssl/patches/150-no_engines.patch
+++ b/package/libs/openssl/patches/150-no_engines.patch
@@ -1,6 +1,6 @@
 --- a/Configure
 +++ b/Configure
-@@ -2144,6 +2144,11 @@ EOF
+@@ -2145,6 +2145,11 @@ EOF
close(OUT);
}


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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso

Thanks! I'll take a look now.
Still, something should be interestingly wrong here:

root@OpenWrt:/# swconfig dev switch0 show|grep -i link
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
link: port:1 link:up speed:100baseT full-duplex auto
link: port:2 link:down
link: port:3 link:down
link: port:4 link:down
root@OpenWrt:/#

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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread mail
Hi,

> > As stated above, this will make eth1 part of "lan" ...
> I don't think you can have two interfaces in one network unless you use
> bridge which you definitely don't want to use in this case.

Well, I would have expected that this adds eth0.1 and eth1 to br-lan, which is 
a bridge.
Haven't checked the code, though.

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread mail
Hi,

> I am investigating it.
> Still, something is wrong if I don't see interface events when unplugging the
> cable, right?

For that topic, maybe have a look at:
https://github.com/openwrt/openwrt/pull/1942#issuecomment-529078064

This might not apply 1:1 for your device, but essentially the port link status 
depends on how you assign eth0 and eth1 ...

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso

I am investigating it.
Still, something is wrong if I don't see interface events when unplugging the 
cable, right?



On Tue, 17 Sep 2019, Adrian Schmutzler wrote:


Date: Tue, 17 Sep 2019 19:02:12
From: Adrian Schmutzler 
To: Enrico Mioso , Filip Moc 
Cc: openwrt-devel@lists.openwrt.org, Piotr Dymacz 
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

Hi,


-Original Message-
From: Enrico Mioso [mailto:mrkiko...@gmail.com]
Sent: Dienstag, 17. September 2019 18:57
To: Filip Moc 
Cc: Adrian Schmutzler ; openwrt-devel@lists.openwrt.org; 
Piotr Dymacz 
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

BTW I can see the code for setting up network interfaces in mach-tl-mr6400.c is 
identical to the one in mach-fritz4020.c for which we
have ath79 support.
Hence, I copied the setup from there:

 {
   status = "okay";
   phy-mode = "mii";
   phy-handle = <>;

   mtd-mac-address = < 0x1fc00>;
   mtd-mac-address-increment = <1>;

   gmac-config {
 device = <>;
 switch-phy-addr-swap = <1>;
 switch-phy-swap = <1>;


That's the phy-swap I was referring to in the other mail.
Using that will change the ports in 02_network, so you will have to re-evaluate 
the connection status with swconfig.

I do not remember what switch-phy-addr-swap does.

Best

Adrian


   };
};

 {
   status = "okay";
   mtd-mac-address = < 0x1fc00>;
   mtd-mac-address-increment = <(-1)>;
};

yeah, here I am using spaces but the original code has tabs. :)

Am I overlooking something?

Second question - I got the LTe module working with gpio-hog. How can now I 
turn off the LTE module, writing a value to the GPIO?
Thanks!!
Enrico




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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: Enrico Mioso [mailto:mrkiko...@gmail.com]
> Sent: Dienstag, 17. September 2019 18:57
> To: Filip Moc 
> Cc: Adrian Schmutzler ; 
> openwrt-devel@lists.openwrt.org; Piotr Dymacz 
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> 
> BTW I can see the code for setting up network interfaces in mach-tl-mr6400.c 
> is identical to the one in mach-fritz4020.c for which we
> have ath79 support.
> Hence, I copied the setup from there:
> 
>  {
>status = "okay";
>phy-mode = "mii";
>phy-handle = <>;
> 
>mtd-mac-address = < 0x1fc00>;
>mtd-mac-address-increment = <1>;
> 
>gmac-config {
>  device = <>;
>  switch-phy-addr-swap = <1>;
>  switch-phy-swap = <1>;

That's the phy-swap I was referring to in the other mail.
Using that will change the ports in 02_network, so you will have to re-evaluate 
the connection status with swconfig.

I do not remember what switch-phy-addr-swap does.

Best

Adrian

>};
> };
> 
>  {
>status = "okay";
>mtd-mac-address = < 0x1fc00>;
>mtd-mac-address-increment = <(-1)>;
> };
> 
> yeah, here I am using spaces but the original code has tabs. :)
> 
> Am I overlooking something?
> 
> Second question - I got the LTe module working with gpio-hog. How can now I 
> turn off the LTE module, writing a value to the GPIO?
> Thanks!!
> Enrico


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso

BTW I can see the code for setting up network interfaces in mach-tl-mr6400.c is 
identical to the one in mach-fritz4020.c for which we have ath79 support.
Hence, I copied the setup from there:

 {
  status = "okay";
  phy-mode = "mii";
  phy-handle = <>;

  mtd-mac-address = < 0x1fc00>;
  mtd-mac-address-increment = <1>;

  gmac-config {
device = <>;
switch-phy-addr-swap = <1>;
switch-phy-swap = <1>;
  };
};

 {
  status = "okay";
  mtd-mac-address = < 0x1fc00>;
  mtd-mac-address-increment = <(-1)>;
};

yeah, here I am using spaces but the original code has tabs. :)

Am I overlooking something?

Second question - I got the LTe module working with gpio-hog. How can now I 
turn off the LTE module, writing a value to the GPIO?
Thanks!!
Enrico

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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso

Hello all,
thand thank you very very much for your kind help, and patience.
Adrian, you're a tireless reviewer, and to you my gratitude.
To you filip as well - very much thank you for your insight, I'll do the 
testing of the different ports ASAP!! :)
Dear Piotr,
I added you in CC since you developed the U-Boot replacement for this device, 
so I would like you to test the final patch to be sure we don't break things!

I am composing this message from scratch, since excessive quoting doesn't help 
readability for me. Sorry for the confusion.


Adrian wrote:

Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 to 
"lan".

...

Maybe I am introducing an isse I am overlooking here, but I would like to point 
out that in ar71xx the setup is as follows:

root@OpenWrt:~# brctl show
bridge name bridge id   STP enabled interfaces
br-lan  7fff.18d6c796aaed   no  eth1
eth0.1

And personally I would not like to change how things work.

Adrian:

phy0tpt trigger can be moved to DTS, just have a look at other devices recently 
added to ath79

I will, thank you! But if this is going to disallow users from easily changing 
how the LED is used, I would rather avoid that.
Let me try this out!

Adrian said:

I would remove the ".0" here, as with TP-Link the sub-revisions typically refer only to 
their firmware. So just "v1" should be better.

Thanks!

Adrian:

What's that?

I copied those from ar71xx C implementation, since I tought there was a reason 
why Filip put them here.
And, in general, I tought they may aid debugging / help newcomers to explore 
the device further.

Adrian:

IMO those labels only make sense if you use them, as for led_power. I would remove all of the other 
ones, i.e. only "wan {" here instead of "led_wan: wan {" ...

Thanks!

Adrian:

Sure about the 0?

Ok, I'll transition to gpio-hogg. My intention is to leave this available in 
user-space.
I used the .0 here due to the following line in the C implementation file:
gpio_request_one(TL_MR6400_GPIO_LTE_POWER,
GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED | GPIOF_ACTIVE_LOW,
"LTE power");

and in particular the GPIOF_OUT_INIT_LOW; with this setup the device powers on 
the LTE modem at startup.
Any particular advice when using gpio-hogg?

Adrian:

There is a tab between uboot and partition. Replace by space ...

Thanks!


You can remove kmod-usb-core, kmod-usb-net and kmod-usb-serial, as those are 
dependencies of the other packages.

Thank you very much.

Filip:

Anyway good job Enrico.

Thanks man! And thank you again for your work in supporting this nice 
device!

Filip:

When you face MR6400's ethernet ports to you the port order is from left to 
right:


Thank you very very much! I'll test ASAP.

Thank you also for the testing you plan to do.
I plan to sort out ethernet issues, then address all the other problems (e.g.: 
switch to gpio-hog and so on).
When I'll have sighted assistance I'll check LEDs and recovery as well. :)

Adrian:

Maybe you need phy-swap? I try to have a look later during the week.

Precious hint! Thanks!!



Enrico

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


[OpenWrt-Devel] [PATCH] ath79: image: pad kernel for Adtran/Bluesocket devices

2019-09-17 Thread Tomasz Maciej Nowak
It has been reported that using the sysupgrade-tar image will trigger
"lzma_decode failed error". The RedBoot bootloader always loads data
from flash till block size boundary, so if there's no padding it'll also
load the beginning of rootfs, and it seems that lzma_decoder can't handle
that garbage data. Previously the script creating combined-image
silently padded the kernel and rootfs, but since sysupgrade-tar doesn't,
pad the default kernel image.

Fixes: 900330f ("ath79: image: retire combined-image for Adtran/Bluesocket
devices")
Cc: Brian Gonyer 
Cc: Daniel Gimpelevich 
Signed-off-by: Tomasz Maciej Nowak 
---
 target/linux/ath79/image/generic.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index dffb4bf577..4e824e7d6d 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -102,11 +102,11 @@ define Device/adtran_bsap1880
   ATH_SOC := ar7161
   DEVICE_VENDOR := Adtran/Bluesocket
   DEVICE_PACKAGES += -swconfig -uboot-envtools fconfig
-  KERNEL := kernel-bin | append-dtb | lzma
+  KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
   KERNEL_INITRAMFS := kernel-bin | append-dtb
   IMAGE_SIZE := 11200k
   IMAGES += kernel.bin rootfs.bin
-  IMAGE/kernel.bin := append-kernel | pad-to (BLOCKSIZE)
+  IMAGE/kernel.bin := append-kernel
   IMAGE/rootfs.bin := append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size 
(IMAGE_SIZE) | sysupgrade-tar rootfs=@ | append-metadata
 endef
-- 
2.23.0


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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Filip Moc 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 ---
>But I don't have ath79 version of MR6400 so I can't tell whether LED labels on
> board didn't change.
Ah, never mind this part. I didn't know what was going on when I was typing it.

Filip


On Tue, Sep 17, 2019 at 01:14:52PM +0200, Filip Moc wrote:
> Hi,
> 
> > Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 
> > to "lan".
> > Either change 02_network or this LED shouldn't be called WAN.
> I think this is correct because the port is actually labeled as WAN but is 
> used
> as LAN by default since LTE module is used for wan connection.
> 
> > phy0tpt trigger can be moved to DTS, just have a look at other devices 
> > recently added to ath79.
> Won't this disallow user to change LED function?
> 
> > As stated above, this will make eth1 part of "lan" ...
> I don't think you can have two interfaces in one network unless you use bridge
> which you definitely don't want to use in this case.
> 
> > What's that?
> You mean the "D12" comment? These are LED labels on board. But I don't have
> ath79 version of MR6400 so I can't tell whether LED labels on board didn't
> change.
> 
> 
> Anyway good job Enrico.
> 
> 
> Filip
> 
> 
> On Tue, Sep 17, 2019 at 12:07:20PM +0200, Adrian Schmutzler wrote:
> > Hi,
> > 
> > > -Original Message-
> > > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> > > Behalf Of Enrico Mioso
> > > Sent: Dienstag, 17. September 2019 02:21
> > > To: openwrt-devel@lists.openwrt.org
> > > Cc: Filip Moc ; Piotr Dymacz ; Enrico 
> > > Mioso 
> > > Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> > > 
> > > This adds support to the ath79 target for the TP-Link MR6400 router.
> > > 
> > > As per original commit, hardware specifications (v1.0 EU):
> > > - SoC: QCA9531
> > > - Flash: Winbond W25Q64FV (8MiB)
> > > - RAM: EtronTech EM6AB160TSE-5G (64MiB)
> > > - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
> > > - Ethernet: 2NIC (3x100M + 1x100M)
> > > - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
> > > - Power: DC 12V 1A
> > > 
> > > Flashing instructions:
> > > You can flash via tftp recovery (serve factory image as 
> > > /mr6400_tp_recovery.bin
> > > on 192.168.0.66/24, connect to any ethernet port and power on device while
> > > holding the reset button). Flashing via OEM web interface does not work.
> > > 
> > > Working:
> > > - Wi-Fi
> > > - TP-Link LTE module does it's thing (but see Notes)
> > > - reset/rfkill keys
> > > Untested:
> > > - recovery via factory
> > > - leds
> > > 
> > > Issues for which I need help:
> > > eth1 detects link when infact it's not there, and occasionally causes 
> > > kernel traces due to tx timeouts.
> > > I promise I'll test untested items as well in final version
> > > 
> > > Note: as it happened occasionally in ar71xx, during bursty flash 
> > > activity, LTE module init will fail, with USB enumeration errors.
> > > 
> > > Signed-off-by: Enrico Mioso 
> > > CC: Filip Moc 
> > > CC: Piotr Dymacz 
> > > ---
> > >  .../ath79/base-files/etc/board.d/01_leds  |   6 +
> > >  .../ath79/base-files/etc/board.d/02_network   |   5 +
> > >  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
> > >  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
> > >  4 files changed, 186 insertions(+)
> > >  create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> > > 
> > > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
> > > b/target/linux/ath79/base-files/etc/board.d/01_leds
> > > index 778316e450..5728aeb491 100755
> > > --- a/target/linux/ath79/base-files/etc/board.d/01_leds
> > > +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
> > > @@ -130,6 +130,12 @@ tplink,archer-c7-v5)
> > >   ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
> > > "0x10"
> > >   ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
> > > "0x20"
> > >   ;;
> > > +tplink,tl-mr6400-v1)
> > > + ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0"
> > > + ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1"
> > 
> > Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 
> > to "lan".
> > Either change 02_network or this LED shouldn't be called WAN.
> > 
> > > + ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0"
> > > + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:white:wlan" "phy0tpt"
> > 
> > phy0tpt trigger can be moved to DTS, just have a look at other devices 
> > recently added to ath79.
> > 
> > > + ;;
> > >  tplink,archer-c2-v3|\
> > >  tplink,tl-wr1043nd-v4|\
> > >  tplink,tl-wr1043n-v5)
> > > diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
> > > 

Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: Filip Moc [mailto:l...@moc6.cz]
> Sent: Dienstag, 17. September 2019 15:52
> To: Enrico Mioso 
> Cc: Adrian Schmutzler ; 
> openwrt-devel@lists.openwrt.org; Piotr Dymacz 
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> 
> Hi,
> 
> > Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), 
> > eth0 does not.
> I faintly remember I had to tweak ethernet ports on MR6400 somehow. I think it
> had to be somehow put into swap mode or something to separate the WAN port,
> otherwise some other port (LAN1 I think) was separated. And I also remember I
> had to experiment a bit to group phys and miis right so that right port
> connection controls up status of the right ethernet interface.
> Check if you have this setup correctly.
> When you face MR6400's ethernet ports to you the port order is from left to 
> right:
> - LAN1 (the one right next to power button)
> - LAN2
> - LAN3
> - LAN4/WAN (the one right next to reset button)
> 
> I can check your code when I get near to my MR6400 which will be sometime in 
> next week.

Maybe you need phy-swap? I try to have a look later during the week.

Best

Adrian

> 
> Filip
> 
> 
> On Tue, Sep 17, 2019 at 12:48:55PM +0200, Enrico Mioso wrote:
> > thank you very very much Adrian!! I'll address all of the comments 
> > hopefully, and send a new version. In the meantime I am trying
> to configure the switch correctly, which is not the case.
> > My current snippet is:
> >  {
> > status = "okay";
> > phy-handle = <>;
> >
> > mtd-mac-address = < 0x1fc00>;
> > mtd-mac-address-increment = <1>;
> > };
> >
> >  {
> > mtd-mac-address = < 0x1fc00>;
> > mtd-mac-address-increment = <(-1)>;
> > };
> >
> > Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), 
> > eth0 does not.
> > Can you help me translate the C code in the mach- file to the DTS 
> > equivalent?
> > The most similar device is TP-Link 942N but it seems not supported.
> >
> > BTW - fixing eth1 issue helped mitigate LTE init problem...
> > As per leds, I was trying to keep things the ar71xx way, what do you think?
> >
> > Enrico
> >
> > On Tue, 17 Sep 2019, Adrian Schmutzler wrote:
> >
> > > Date: Tue, 17 Sep 2019 12:07:20
> > > From: Adrian Schmutzler 
> > > To: Enrico Mioso , openwrt-devel@lists.openwrt.org
> > > Cc: Filip Moc , Piotr Dymacz 
> > > Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link 
> > > TL-MR6400
> > >
> > > Hi,
> > >
> > > > -Original Message-
> > > > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> > > > Behalf Of Enrico Mioso
> > > > Sent: Dienstag, 17. September 2019 02:21
> > > > To: openwrt-devel@lists.openwrt.org
> > > > Cc: Filip Moc ; Piotr Dymacz ; Enrico 
> > > > Mioso 
> > > > Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link 
> > > > TL-MR6400
> > > >
> > > > This adds support to the ath79 target for the TP-Link MR6400 router.
> > > >
> > > > As per original commit, hardware specifications (v1.0 EU):
> > > > - SoC: QCA9531
> > > > - Flash: Winbond W25Q64FV (8MiB)
> > > > - RAM: EtronTech EM6AB160TSE-5G (64MiB)
> > > > - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
> > > > - Ethernet: 2NIC (3x100M + 1x100M)
> > > > - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
> > > > - Power: DC 12V 1A
> > > >
> > > > Flashing instructions:
> > > > You can flash via tftp recovery (serve factory image as 
> > > > /mr6400_tp_recovery.bin
> > > > on 192.168.0.66/24, connect to any ethernet port and power on device 
> > > > while
> > > > holding the reset button). Flashing via OEM web interface does not work.
> > > >
> > > > Working:
> > > > - Wi-Fi
> > > > - TP-Link LTE module does it's thing (but see Notes)
> > > > - reset/rfkill keys
> > > > Untested:
> > > > - recovery via factory
> > > > - leds
> > > >
> > > > Issues for which I need help:
> > > > eth1 detects link when infact it's not there, and occasionally causes 
> > > > kernel traces due to tx timeouts.
> > > > I promise I'll test untested items as well in final version
> > > >
> > > > Note: as it happened occasionally in ar71xx, during bursty flash 
> > > > activity, LTE module init will fail, with USB enumeration errors.
> > > >
> > > > Signed-off-by: Enrico Mioso 
> > > > CC: Filip Moc 
> > > > CC: Piotr Dymacz 
> > > > ---
> > > >  .../ath79/base-files/etc/board.d/01_leds  |   6 +
> > > >  .../ath79/base-files/etc/board.d/02_network   |   5 +
> > > >  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
> > > >  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
> > > >  4 files changed, 186 insertions(+)
> > > >  create mode 100644 
> > > > target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> > > >
> > > > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
> > > > b/target/linux/ath79/base-files/etc/board.d/01_leds
> > > > index 778316e450..5728aeb491 100755
> > > > --- 

[OpenWrt-Devel] Pre UBoot initiliation required to get MDIO working.

2019-09-17 Thread sven falempin
To anyone with DTS and qcom MDIO/ESS knowledge,
please help, you are my only hope.

Using an QCOM ap.dk04.1-c1 / ipq4019 device,
I ran into an initialization problem for MDIO driver.

The problem only appeared when I started booting from the device,
because executing 'dhcp' in uboot , do some initialization that fix the problem.

I m running openWRT current, 4.19 kernel with 5.3-rc4 wireless code
and a few other patches, ( openwrt r10985-4364dd244c ) , and minor
tweaks.

Also , to run IPQ4019 and ESS, which kernel offer the better driver
support right now ?
4.14 ? 4.19 ? 5.3 ? 3.x is not possible. (regarding Voltage regulator
and RTC for example )

Nevertheless I am not sure if my DTS file could also be a source or trouble;
My DTS contains :
/*  */
   mdio_pins: mdio_pinmux {
mux_1 {
 pins = "gpio6";
 function = "mdio"; // ipq4019-pinctrl 100.pinctrl: invalid
function mdio0 in map table
 bias-pull-up;
};
mux_2 {
 pins = "gpio7";
 function = "mdc";
 bias-pull-up;
};
   };
/*  */
  tcsr: tcsr@194b000 {
   status = "ok";
  };
  ess-switch@c00 {
   status = "okay";
  };
/* */

  mdio@9 {
   status = "ok";
   pinctrl-0 = <_pins>;
   pinctrl-names = "default";
   phy-reset-gpio = < 47 0>;
   status = "ok";
   bias-disable;
  };

/ * */

In the uboot vendor, the DHCP  'init' the ess, and enable the kernel
to detect the ethernet phy:
( only two are wired , and i only tested eth1 because it s the only
one that matters for now )

u32 data;
ipq40xx_ess_sw_wr(S17_GLOFW_CTRL1_REG, 0x3e3e3e);
/*
 * configure Speed, Duplex.
 */
ipq40xx_ess_sw_wr(S17_P0STATUS_REG, S17_PORT_SPEED(2) |
S17_PORT_FULL_DUP |
S17_TX_FLOW_EN |
S17_RX_FLOW_EN);

ipq40xx_ess_sw_wr(S17_P0LOOKUP_CTRL_REG, 0x14);
ipq40xx_ess_sw_wr(S17_P1LOOKUP_CTRL_REG, 0x14);
ipq40xx_ess_sw_wr(S17_P2LOOKUP_CTRL_REG, 0x14);
ipq40xx_ess_sw_wr(S17_P3LOOKUP_CTRL_REG, 0x14);
ipq40xx_ess_sw_wr(S17_P4LOOKUP_CTRL_REG, 0x14);
ipq40xx_ess_sw_wr(S17_P5LOOKUP_CTRL_REG, 0x14);
/*
* HOL setting for Port0
*/
ipq40xx_ess_sw_wr(S17_PORT0_HOL_CTRL0, 0x1e44);
ipq40xx_ess_sw_wr(S17_PORT0_HOL_CTRL1, 0x1c6);
/*
* HOL setting for Port1
*/
ipq40xx_ess_sw_wr(S17_PORT1_HOL_CTRL0, 0x1e00);
ipq40xx_ess_sw_wr(S17_PORT1_HOL_CTRL1, 0x1c6);
/*
* HOL setting for Port2
*/
ipq40xx_ess_sw_wr(S17_PORT2_HOL_CTRL0, 0x1e00);
ipq40xx_ess_sw_wr(S17_PORT2_HOL_CTRL1, 0x1c6);
/*
* HOL setting for Port3
*/
ipq40xx_ess_sw_wr(S17_PORT3_HOL_CTRL0, 0x1e00);
ipq40xx_ess_sw_wr(S17_PORT3_HOL_CTRL1, 0x1c6);
/*
* HOL setting for Port4
*/
ipq40xx_ess_sw_wr(S17_PORT4_HOL_CTRL0, 0x1e00);
ipq40xx_ess_sw_wr(S17_PORT4_HOL_CTRL1, 0x1c6);
/*
* HOL setting for Port5
*/
ipq40xx_ess_sw_wr(S17_PORT5_HOL_CTRL0, 0x1e44);
ipq40xx_ess_sw_wr(S17_PORT5_HOL_CTRL1, 0x1c6);
break;

mdelay(1);
/*
 * Enable Rx and Tx mac. // this one ?
 */
ipq40xx_ess_sw_rd(S17_P0STATUS_REG, );
ipq40xx_ess_sw_wr(S17_P0STATUS_REG, data |
S17_PORT_TX_MAC_EN |
S17_PORT_RX_MAC_EN);
ipq40xx_ess_sw_rd(ESS_MIB_OFFSET, );
ipq40xx_ess_sw_wr(ESS_MIB_OFFSET, data |
ESS_MIB_EN);
ipq40xx_ess_sw_wr(S17_GLOFW_CTRL1_REG, 0x7f7f7f);


Is there missing pieces in the MDIO / ESS driver , or can it be the DTS file ?


Best.


-- 
--
-
Knowing is not enough; we must apply. Willing is not enough; we must do

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


[OpenWrt-Devel] [PATCH] openssl: bump to 1.1.1d

2019-09-17 Thread Eneas U de Queiroz
This version fixes 3 low-severity vulnerabilities:

- CVE-2019-1547: ECDSA remote timing attack
- CVE-2019-1549: Fork Protection
- CVE-2019-1563: Padding Oracle in PKCS7_dataDecode and
 CMS_decrypt_set1_pkey

Patches were refreshed.

Signed-off-by: Eneas U de Queiroz 

--
Run-tested on WRT3200ACM, mvebu, running openwrt master, using uhttpd,
nginx, openssl-util, and uclient-fetch; devcrypto engine specifically
tested.

This should be cherry-picked to openwrt-19.07 as well.

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 5663fd4b95..28625bad05 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
 PKG_BASE:=1.1.1
-PKG_BUGFIX:=c
+PKG_BUGFIX:=d
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 ENGINES_DIR=engines-1.1
 
@@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
-PKG_HASH:=f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90
+PKG_HASH:=1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
 
 PKG_LICENSE:=OpenSSL
 PKG_LICENSE_FILES:=LICENSE
diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch 
b/package/libs/openssl/patches/100-Configure-afalg-support.patch
index 274a4f1cf9..0f91a9d5da 100644
--- a/package/libs/openssl/patches/100-Configure-afalg-support.patch
+++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch
@@ -1,4 +1,4 @@
-From bf4f3a5696c65b4a48935599ccba43311c114c95 Mon Sep 17 00:00:00 2001
+From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001
 From: Eneas U de Queiroz 
 Date: Thu, 27 Sep 2018 08:29:21 -0300
 Subject: Do not use host kernel version to disable AFALG
@@ -8,9 +8,11 @@ version to disable building the AFALG engine on openwrt 
targets.
 
 Signed-off-by: Eneas U de Queiroz 
 
+diff --git a/Configure b/Configure
+index 5a699836f3..74d057c219 100755
 --- a/Configure
 +++ b/Configure
-@@ -1535,7 +1535,9 @@ unless ($disabled{"crypto-mdebug-backtra
+@@ -1532,7 +1532,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
  
  unless ($disabled{afalgeng}) {
  $config{afalgeng}="";
diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch 
b/package/libs/openssl/patches/110-openwrt_targets.patch
index bc49e27aeb..d0530b4661 100644
--- a/package/libs/openssl/patches/110-openwrt_targets.patch
+++ b/package/libs/openssl/patches/110-openwrt_targets.patch
@@ -1,4 +1,4 @@
-From 9a83f8fb7c46215dfb8d6dc2e2cc612bc2a0fd01 Mon Sep 17 00:00:00 2001
+From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001
 From: Eneas U de Queiroz 
 Date: Thu, 27 Sep 2018 08:30:24 -0300
 Subject: Add openwrt targets
@@ -7,6 +7,9 @@ Targets are named: linux-$(CONFIG_ARCH)-openwrt
 
 Signed-off-by: Eneas U de Queiroz 
 
+diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf
+new file mode 100644
+index 00..86a86d31e4
 --- /dev/null
 +++ b/Configurations/25-openwrt.conf
 @@ -0,0 +1,48 @@
diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch 
b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
index d6e35b7451..75fb9d1684 100644
--- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
+++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
@@ -1,16 +1,18 @@
-From f453f3eccb852740e37e9436dac5670d311c13b0 Mon Sep 17 00:00:00 2001
+From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001
 From: Eneas U de Queiroz 
 Date: Thu, 27 Sep 2018 08:31:38 -0300
-Subject: void exposing build directories
+Subject: Avoid exposing build directories
 
 The CFLAGS contain the build directories, and are shown by calling
 OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a
 
 Signed-off-by: Eneas U de Queiroz 
 
+diff --git a/crypto/build.info b/crypto/build.info
+index 2c619c62e8..893128345a 100644
 --- a/crypto/build.info
 +++ b/crypto/build.info
-@@ -10,7 +10,7 @@ EXTRA=  ../ms/uplink-x86.pl ../ms/uplink
+@@ -10,7 +10,7 @@ EXTRA=  ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
  ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
  
  DEPEND[cversion.o]=buildinf.h
diff --git a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch 
b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
index 7c61b1e292..fa79cc6022 100644
--- a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
+++ b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
@@ -1,4 +1,4 @@
-From e2339aa9c68837089d17cf309022cee497fe2412 Mon Sep 17 00:00:00 2001
+From ba2fe646f2d9104a18b066e43582154049e9ffcb Mon Sep 17 00:00:00 2001
 From: Eneas U de Queiroz 
 Date: Thu, 27 Sep 2018 08:34:38 -0300
 Subject: Do not build tests and fuzz directories
@@ -7,9 +7,11 @@ This shortens build 

Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Filip Moc 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 ---
Hi,

> Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), 
> eth0 does not.
I faintly remember I had to tweak ethernet ports on MR6400 somehow. I think it
had to be somehow put into swap mode or something to separate the WAN port,
otherwise some other port (LAN1 I think) was separated. And I also remember I
had to experiment a bit to group phys and miis right so that right port
connection controls up status of the right ethernet interface.
Check if you have this setup correctly.
When you face MR6400's ethernet ports to you the port order is from left to 
right:
- LAN1 (the one right next to power button)
- LAN2
- LAN3
- LAN4/WAN (the one right next to reset button)

I can check your code when I get near to my MR6400 which will be sometime in 
next week.

Filip


On Tue, Sep 17, 2019 at 12:48:55PM +0200, Enrico Mioso wrote:
> thank you very very much Adrian!! I'll address all of the comments hopefully, 
> and send a new version. In the meantime I am trying to configure the switch 
> correctly, which is not the case.
> My current snippet is:
>  {
>   status = "okay";
>   phy-handle = <>;
> 
>   mtd-mac-address = < 0x1fc00>;
>   mtd-mac-address-increment = <1>;
> };
> 
>  {
>   mtd-mac-address = < 0x1fc00>;
>   mtd-mac-address-increment = <(-1)>;
> };
> 
> Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), 
> eth0 does not.
> Can you help me translate the C code in the mach- file to the DTS equivalent?
> The most similar device is TP-Link 942N but it seems not supported.
> 
> BTW - fixing eth1 issue helped mitigate LTE init problem...
> As per leds, I was trying to keep things the ar71xx way, what do you think?
> 
> Enrico
> 
> On Tue, 17 Sep 2019, Adrian Schmutzler wrote:
> 
> > Date: Tue, 17 Sep 2019 12:07:20
> > From: Adrian Schmutzler 
> > To: Enrico Mioso , openwrt-devel@lists.openwrt.org
> > Cc: Filip Moc , Piotr Dymacz 
> > Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link 
> > TL-MR6400
> > 
> > Hi,
> > 
> > > -Original Message-
> > > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> > > Behalf Of Enrico Mioso
> > > Sent: Dienstag, 17. September 2019 02:21
> > > To: openwrt-devel@lists.openwrt.org
> > > Cc: Filip Moc ; Piotr Dymacz ; Enrico 
> > > Mioso 
> > > Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> > > 
> > > This adds support to the ath79 target for the TP-Link MR6400 router.
> > > 
> > > As per original commit, hardware specifications (v1.0 EU):
> > > - SoC: QCA9531
> > > - Flash: Winbond W25Q64FV (8MiB)
> > > - RAM: EtronTech EM6AB160TSE-5G (64MiB)
> > > - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
> > > - Ethernet: 2NIC (3x100M + 1x100M)
> > > - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
> > > - Power: DC 12V 1A
> > > 
> > > Flashing instructions:
> > > You can flash via tftp recovery (serve factory image as 
> > > /mr6400_tp_recovery.bin
> > > on 192.168.0.66/24, connect to any ethernet port and power on device while
> > > holding the reset button). Flashing via OEM web interface does not work.
> > > 
> > > Working:
> > > - Wi-Fi
> > > - TP-Link LTE module does it's thing (but see Notes)
> > > - reset/rfkill keys
> > > Untested:
> > > - recovery via factory
> > > - leds
> > > 
> > > Issues for which I need help:
> > > eth1 detects link when infact it's not there, and occasionally causes 
> > > kernel traces due to tx timeouts.
> > > I promise I'll test untested items as well in final version
> > > 
> > > Note: as it happened occasionally in ar71xx, during bursty flash 
> > > activity, LTE module init will fail, with USB enumeration errors.
> > > 
> > > Signed-off-by: Enrico Mioso 
> > > CC: Filip Moc 
> > > CC: Piotr Dymacz 
> > > ---
> > >  .../ath79/base-files/etc/board.d/01_leds  |   6 +
> > >  .../ath79/base-files/etc/board.d/02_network   |   5 +
> > >  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
> > >  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
> > >  4 files changed, 186 insertions(+)
> > >  create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> > > 
> > > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
> > > b/target/linux/ath79/base-files/etc/board.d/01_leds
> > > index 778316e450..5728aeb491 100755
> > > --- a/target/linux/ath79/base-files/etc/board.d/01_leds
> > > +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
> > > @@ -130,6 +130,12 @@ tplink,archer-c7-v5)
> > >   ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
> > > "0x10"
> > >   ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
> > > "0x20"
> > >   ;;
> > > 

Re: [OpenWrt-Devel] [PATCH] ath79: Add LED migration for several Archer Cxx devices

2019-09-17 Thread Adrian Schmutzler
Hi David,

since C59v2 had to be added anyway, I've sent a v2 patchset with a different 
approach.

Just wanted to notify you also in this thread, as you have marked this as Under 
Review.

Best

Adrian

> -Original Message-
> From: David Bauer [mailto:m...@david-bauer.net]
> Sent: Dienstag, 3. September 2019 01:09
> To: Adrian Schmutzler 
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: Add LED migration for several 
> Archer Cxx devices
> 
> Hello Adrian
> 
> On 9/2/19 11:10 AM, Adrian Schmutzler wrote:
> > Several Archer Cxx devices were using board-specific LED names in
> > ar71xx, which were changed to "tp-link:*" in ath79.
> >
> > This patch adds migration for them.
> 
> Have you run-tested this patch? For me i ran into the issue of the device
> not being reachable via Ethernet, as the Ethernet MACs were swapped.
> 
> Has anyone yet tried to find an migration approach for this? I assume this
> could be tricky, as we might need to update the board.json also in this run.
> 
> Regarding the actual patch: I assume the LEDs were migrated (as the WAN 
> Ethernet
> got illuminated), but i want to hear your opinion on how we should proceed 
> with
> the Ethernet migration. :)
> 
> Best wishes
> David


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 2/2] ath79: add LED migration for several Archer Cxx devices

2019-09-17 Thread Adrian Schmutzler
Several Archer Cxx devices were using board-specific LED names in
ar71xx, which were changed to "tp-link:*" in ath79.

This patch adds migration for them.

Signed-off-by: Adrian Schmutzler 

---

v2: Added C59v2, use new concept
---
 .../base-files/etc/uci-defaults/04_led_migration | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration 
b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
index 4e4e91c788..b23e5f7db6 100644
--- a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
@@ -10,13 +10,19 @@ case "$board" in
 engenius,epg5000)
migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
;;
-tplink,archer-c7-v2)
-   migrate_leds ":blue:=:green:"
-   ;;
+tplink,archer-c25-v1|\
+tplink,archer-c58-v1|\
+tplink,archer-c59-v1|\
+tplink,archer-c59-v2|\
+tplink,archer-c60-v1|\
+tplink,archer-c60-v2|\
 tplink,archer-c7-v4|\
 tplink,archer-c7-v5)
migrate_leds "^$boardonly:=tp-link:"
;;
+tplink,archer-c7-v2)
+   migrate_leds ":blue:=:green:"
+   ;;
 tplink,re355-v1)
migrate_leds "re355:=tp-link:"
;;
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH v2 1/2] ath79: use board name in LED migrations

2019-09-17 Thread Adrian Schmutzler
Several devices added to LED migration script will just have their
(old) board name converted to tp-link.

By using a variable for this, the amount of code in the migration
script can be reduced and the chance for typos is reduced.

This patch also introduces the marker for beginning of a pattern
"^" to the regex, so the match is more specific.

Signed-off-by: Adrian Schmutzler 
---
 .../ath79/base-files/etc/uci-defaults/04_led_migration | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration 
b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
index b1afd0ee76..4e4e91c788 100644
--- a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
@@ -4,6 +4,7 @@
 . /lib/functions/migrations.sh
 
 board=$(board_name)
+boardonly="${board##*,}"
 
 case "$board" in
 engenius,epg5000)
@@ -12,11 +13,9 @@ engenius,epg5000)
 tplink,archer-c7-v2)
migrate_leds ":blue:=:green:"
;;
-tplink,archer-c7-v4)
-   migrate_leds "archer-c7-v4:=tp-link:"
-   ;;
+tplink,archer-c7-v4|\
 tplink,archer-c7-v5)
-   migrate_leds "archer-c7-v5:=tp-link:"
+   migrate_leds "^$boardonly:=tp-link:"
;;
 tplink,re355-v1)
migrate_leds "re355:=tp-link:"
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH] ath79: fix whitespace issues in DTS files

2019-09-17 Thread Adrian Schmutzler
This is the result of grepping/searching for several common
whitespace issues like double empty lines, leading spaces, etc.

This patch fixes them for the ath79 target.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts| 2 --
 target/linux/ath79/dts/ar7161_netgear_wndr3800.dts| 1 -
 target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts   | 1 -
 target/linux/ath79/dts/ar7240_on_n150r.dts| 1 -
 target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 1 -
 target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi  | 1 -
 target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts | 1 -
 target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts| 1 -
 target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts| 1 -
 target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi  | 1 -
 target/linux/ath79/dts/ar9344_pcs_cr5000.dts  | 1 -
 target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts   | 1 -
 target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts  | 2 +-
 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts| 3 ---
 target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts   | 2 +-
 target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts| 1 -
 target/linux/ath79/dts/qca953x.dtsi   | 3 ---
 target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts  | 1 -
 target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts  | 1 -
 target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts| 1 -
 target/linux/ath79/dts/qca9558_engenius_ecb1750.dts   | 1 -
 target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts | 4 
 target/linux/ath79/dts/qca9558_ocedo_ursus.dts| 2 --
 target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi  | 1 -
 target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts| 3 ---
 target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi | 1 -
 target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts| 1 -
 target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi  | 1 -
 28 files changed, 2 insertions(+), 39 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts 
b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index da19921973..ec5367fede 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -120,7 +120,6 @@
};
 };
 
-
  {
#address-cells = <1>;
#size-cells = <0>;
@@ -222,7 +221,6 @@
};
 };
 
-
  {
status = "okay";
pll-data = <0x 0x1099 0x00991099>;
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts 
b/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts
index 589d0ec840..0959bf4d97 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts
@@ -33,4 +33,3 @@
read-only;
};
 };
-
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts 
b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
index b3ceecf932..b568d90eff 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
@@ -7,4 +7,3 @@
model = "Netgear WNR612 v2";
compatible = "netgear,wnr612-v2", "qca,ar7240";
 };
-
diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts 
b/target/linux/ath79/dts/ar7240_on_n150r.dts
index a318846a83..3aaa07f724 100644
--- a/target/linux/ath79/dts/ar7240_on_n150r.dts
+++ b/target/linux/ath79/dts/ar7240_on_n150r.dts
@@ -7,4 +7,3 @@
model = "ON Network N150R";
compatible = "on,n150r", "qca,ar7240";
 };
-
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts 
b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
index 9182374235..1750e92499 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
@@ -153,7 +153,6 @@
};
 };
 
-
  {
status = "okay";
 
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi 
b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
index ffd3d71a62..bec430a89b 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
@@ -43,7 +43,6 @@
regulator-max-microvolt = <500>;
enable-active-high;
};
-
 };
 
  {
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts 
b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts
index 056e9fa512..0a660639a1 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts
@@ -47,7 +47,6 @@
gpio = < 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
-
 };
 
  {
diff --git 

[OpenWrt-Devel] [PATCH 1/3] ramips/mt762x: convert devices to interrupt-driven gpio-keys

2019-09-17 Thread Adrian Schmutzler
This converts all remaining devices to use interrupt-driven
gpio-keys compatible instead of gpio-keys-polled.
The poll-interval is removed.

While at it, add/remove newlines in keys and leds node where
necessary.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts   |  3 +--
 .../ramips/dts/mt7620a_alfa-network_ac1200rm.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_asus_rp-n53.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts |  3 +--
 target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts |  3 +--
 .../linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts|  3 +--
 target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts|  4 +---
 target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts|  3 +--
 target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts|  3 +--
 .../linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts  |  6 --
 target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts |  3 +--
 target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts  |  4 ++--
 target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts  |  4 ++--
 target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts   |  4 ++--
 .../linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts |  3 +--
 target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi|  3 +--
 target/linux/ramips/dts/mt7620a_hnet_c108.dts |  3 +--
 .../linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts   |  3 +--
 .../linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts|  3 +--
 target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi |  3 +--
 target/linux/ramips/dts/mt7620a_linksys_e1700.dts |  3 +--
 .../linux/ramips/dts/mt7620a_microduino_microwrt.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_netgear_ex2700.dts|  3 +--
 target/linux/ramips/dts/mt7620a_netgear_ex3700.dts|  3 +--
 .../linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts  |  3 +--
 target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts|  3 +--
 target/linux/ramips/dts/mt7620a_phicomm_k2g.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi  |  3 +--
 target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts  |  1 +
 target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts  |  1 +
 target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts|  3 +--
 target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts |  3 +--
 .../linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts   |  3 +--
 .../linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts   |  3 +--
 .../linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts   |  1 -
 .../ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts |  1 -
 .../ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_sanlinking_d240.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_sercomm_na930.dts |  3 +--
 .../linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts |  3 +--
 .../linux/ramips/dts/mt7620a_tplink_archer-c20i.dts   |  6 ++
 .../linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts |  6 +++---
 .../linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts   |  3 +--
 target/linux/ramips/dts/mt7620a_youku_yk1.dts |  8 ++--
 target/linux/ramips/dts/mt7620a_yukai_bocco.dts   |  3 +--
 .../linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi   |  5 +++--
 .../linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts |  3 +--
 .../linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi   |  7 +--
 target/linux/ramips/dts/mt7620a_zte_q7.dts|  3 +--
 .../linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts  |  1 -
 target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts  |  3 +--
 target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts  |  3 +--
 target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts   |  3 +--
 target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts |  3 +--
 target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts  |  3 +--
 target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts  |  3 +--
 target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts  |  3 +--
 target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts  |  5 ++---
 target/linux/ramips/dts/mt7620n_kimax_u35wf.dts   |  3 +--
 target/linux/ramips/dts/mt7620n_kingston_mlw221.dts   |  3 +--
 target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts|  3 +--
 target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi  |  3 +--
 target/linux/ramips/dts/mt7620n_ravpower_wd03.dts |  4 +---
 target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts |  3 +--
 .../linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts   |  

[OpenWrt-Devel] [PATCH 2/3] ramips: fix whitespace issues in DTS files

2019-09-17 Thread Adrian Schmutzler
This is the result of grepping/searching for several common
whitespace issues like double empty lines, leading spaces, etc.

This patch fixes them for the ramips target.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts   | 1 -
 target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts  | 2 --
 target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts| 1 -
 target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts | 2 +-
 target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts  | 1 -
 target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts   | 1 -
 target/linux/ramips/dts/mt7621.dtsi  | 2 --
 target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts | 1 -
 target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts| 3 +--
 target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts| 3 +--
 target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 1 -
 target/linux/ramips/dts/mt7621_mikrotik_rbm11g.dts   | 2 --
 target/linux/ramips/dts/mt7621_mikrotik_rbm33g.dts   | 2 --
 target/linux/ramips/dts/mt7621_mtc_wr1201.dts| 1 -
 target/linux/ramips/dts/mt7628an_cudy_wr1000.dts | 1 -
 target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts| 1 -
 target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi | 1 -
 target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts| 1 -
 target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts   | 2 --
 target/linux/ramips/dts/rt3052_argus_atp-52b.dts | 1 -
 target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts  | 1 -
 target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts   | 1 -
 target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts  | 1 -
 target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi   | 1 -
 target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi | 2 --
 target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts  | 1 -
 26 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts 
b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
index cbd8d4cb80..56c0f8f890 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
@@ -137,4 +137,3 @@
};
};
 };
-
diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts 
b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
index a30250e74f..43698d9fd6 100644
--- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
+++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
@@ -69,7 +69,6 @@
};
};
 
-
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
@@ -81,7 +80,6 @@
};
 };
 
-
  {
status = "okay";
 };
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts 
b/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts
index eb326ccbd8..782263a068 100644
--- a/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts
@@ -44,4 +44,3 @@
};
};
 };
-
diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts 
b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
index 7bf63b3287..8d58d12f02 100644
--- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
+++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
@@ -183,5 +183,5 @@
 };
 
  {
-status = "okay";
+   status = "okay";
 };
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts 
b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
index 2d7f6c03a3..2da35936b1 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -153,7 +153,6 @@
};
 };
 
-
  {
status = "okay";
 };
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts 
b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
index 10d8ca0eb6..3885428345 100644
--- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
@@ -13,7 +13,6 @@
bootargs = "console=ttyS0,115200";
};
 
-
aliases {
led-boot = _4g_0;
led-failsafe = _4g_0;
diff --git a/target/linux/ramips/dts/mt7621.dtsi 
b/target/linux/ramips/dts/mt7621.dtsi
index 4f69e0902e..849f1f0a09 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -49,8 +49,6 @@
clock-frequency = <5000>;
};
 
-
-
palmbus: palmbus@1E00 {
compatible = "palmbus";
reg = <0x1E00 0x10>;
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts 
b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
index 2e1479d0c6..cfd6d5fabe 100644
--- 

[OpenWrt-Devel] [PATCH 3/3] ramips: rearrange LEDs for ZBT-WE826 devices to prevent delete-node

2019-09-17 Thread Adrian Schmutzler
So far, for the ZBT-WE826-E the leds pulled from the DTSI are
deleted and then redefined. The config in the DTSI is then used
in two other DTSes for the ZBT-WE826 flash variants.

Since the block is effectively only used for two devices, this
moves led definitions to the device DTSes to prevent the use of
delete-node.
This seems more logical than created the config and then deleting
it again.

Signed-off-by: Adrian Schmutzler 
---
 .../dts/mt7620a_zbtlink_zbt-we826-16m.dts | 21 +++
 .../dts/mt7620a_zbtlink_zbt-we826-32m.dts | 21 +++
 .../dts/mt7620a_zbtlink_zbt-we826-e.dts   |  2 --
 .../ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi | 21 ---
 4 files changed, 42 insertions(+), 23 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts 
b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
index 7f2b2646b2..ff72640399 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
@@ -5,6 +5,27 @@
 / {
compatible = "zbtlink,zbt-we826-16m", "zbtlink,zbt-we826", 
"ralink,mt7620a-soc";
model = "ZBT-WE826 (16M)";
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power: power {
+   label = "zbt-we826:green:power";
+   gpios = < 14 GPIO_ACTIVE_HIGH>;
+   };
+
+   usb {
+   label = "zbt-we826:green:usb";
+   gpios = < 15 GPIO_ACTIVE_HIGH>;
+   trigger-sources = <_port1>, <_port1>;
+   linux,default-trigger = "usbport";
+   };
+
+   air {
+   label = "zbt-we826:green:wifi";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+   };
 };
 
  {
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts 
b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
index e7cdcab5e9..27613d54d6 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
@@ -5,6 +5,27 @@
 / {
compatible = "zbtlink,zbt-we826-32m", "zbtlink,zbt-we826", 
"ralink,mt7620a-soc";
model = "ZBT-WE826 (32M)";
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_power: power {
+   label = "zbt-we826:green:power";
+   gpios = < 14 GPIO_ACTIVE_HIGH>;
+   };
+
+   usb {
+   label = "zbt-we826:green:usb";
+   gpios = < 15 GPIO_ACTIVE_HIGH>;
+   trigger-sources = <_port1>, <_port1>;
+   linux,default-trigger = "usbport";
+   };
+
+   air {
+   label = "zbt-we826:green:wifi";
+   gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+   };
 };
 
  {
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts 
b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
index 243126125b..d8f51f6692 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
@@ -7,8 +7,6 @@
compatible = "zbtlink,zbt-we826-e", "zbtlink,zbt-we826", 
"ralink,mt7620a-soc";
model = "ZBT-WE826-E";
 
-   /delete-node/ leds;
-
leds {
compatible = "gpio-leds";
 
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi 
b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
index 41c6b07dbd..d66a7baddd 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
@@ -17,27 +17,6 @@
bootargs = "console=ttyS0,115200";
};
 
-   leds {
-   compatible = "gpio-leds";
-
-   led_power: power {
-   label = "zbt-we826:green:power";
-   gpios = < 14 GPIO_ACTIVE_HIGH>;
-   };
-
-   usb {
-   label = "zbt-we826:green:usb";
-   gpios = < 15 GPIO_ACTIVE_HIGH>;
-   trigger-sources = <_port1>, <_port1>;
-   linux,default-trigger = "usbport";
-   };
-
-   air {
-   label = "zbt-we826:green:wifi";
-   gpios = < 0 GPIO_ACTIVE_LOW>;
-   };
-   };
-
keys {
compatible = "gpio-keys";
 
-- 
2.20.1


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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Filip Moc 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 ---
Hi,

> Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 to 
> "lan".
> Either change 02_network or this LED shouldn't be called WAN.
I think this is correct because the port is actually labeled as WAN but is used
as LAN by default since LTE module is used for wan connection.

> phy0tpt trigger can be moved to DTS, just have a look at other devices 
> recently added to ath79.
Won't this disallow user to change LED function?

> As stated above, this will make eth1 part of "lan" ...
I don't think you can have two interfaces in one network unless you use bridge
which you definitely don't want to use in this case.

> What's that?
You mean the "D12" comment? These are LED labels on board. But I don't have
ath79 version of MR6400 so I can't tell whether LED labels on board didn't
change.


Anyway good job Enrico.


Filip


On Tue, Sep 17, 2019 at 12:07:20PM +0200, Adrian Schmutzler wrote:
> Hi,
> 
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> > Behalf Of Enrico Mioso
> > Sent: Dienstag, 17. September 2019 02:21
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Filip Moc ; Piotr Dymacz ; Enrico Mioso 
> > 
> > Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> > 
> > This adds support to the ath79 target for the TP-Link MR6400 router.
> > 
> > As per original commit, hardware specifications (v1.0 EU):
> > - SoC: QCA9531
> > - Flash: Winbond W25Q64FV (8MiB)
> > - RAM: EtronTech EM6AB160TSE-5G (64MiB)
> > - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
> > - Ethernet: 2NIC (3x100M + 1x100M)
> > - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
> > - Power: DC 12V 1A
> > 
> > Flashing instructions:
> > You can flash via tftp recovery (serve factory image as 
> > /mr6400_tp_recovery.bin
> > on 192.168.0.66/24, connect to any ethernet port and power on device while
> > holding the reset button). Flashing via OEM web interface does not work.
> > 
> > Working:
> > - Wi-Fi
> > - TP-Link LTE module does it's thing (but see Notes)
> > - reset/rfkill keys
> > Untested:
> > - recovery via factory
> > - leds
> > 
> > Issues for which I need help:
> > eth1 detects link when infact it's not there, and occasionally causes 
> > kernel traces due to tx timeouts.
> > I promise I'll test untested items as well in final version
> > 
> > Note: as it happened occasionally in ar71xx, during bursty flash activity, 
> > LTE module init will fail, with USB enumeration errors.
> > 
> > Signed-off-by: Enrico Mioso 
> > CC: Filip Moc 
> > CC: Piotr Dymacz 
> > ---
> >  .../ath79/base-files/etc/board.d/01_leds  |   6 +
> >  .../ath79/base-files/etc/board.d/02_network   |   5 +
> >  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
> >  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
> >  4 files changed, 186 insertions(+)
> >  create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> > 
> > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
> > b/target/linux/ath79/base-files/etc/board.d/01_leds
> > index 778316e450..5728aeb491 100755
> > --- a/target/linux/ath79/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
> > @@ -130,6 +130,12 @@ tplink,archer-c7-v5)
> > ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
> > "0x10"
> > ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
> > "0x20"
> > ;;
> > +tplink,tl-mr6400-v1)
> > +   ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0"
> > +   ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1"
> 
> Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 to 
> "lan".
> Either change 02_network or this LED shouldn't be called WAN.
> 
> > +   ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0"
> > +   ucidef_set_led_wlan "wlan" "WLAN" "tp-link:white:wlan" "phy0tpt"
> 
> phy0tpt trigger can be moved to DTS, just have a look at other devices 
> recently added to ath79.
> 
> > +   ;;
> >  tplink,archer-c2-v3|\
> >  tplink,tl-wr1043nd-v4|\
> >  tplink,tl-wr1043n-v5)
> > diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
> > b/target/linux/ath79/base-files/etc/board.d/02_network
> > index 5b47af8ef7..2b0e1ce400 100755
> > --- a/target/linux/ath79/base-files/etc/board.d/02_network
> > +++ b/target/linux/ath79/base-files/etc/board.d/02_network
> > @@ -56,6 +56,11 @@ ath79_setup_interfaces()
> > winchannel,wb2000)
> > ucidef_set_interface_lan "eth0"
> > ;;
> > +   tplink,tl-mr6400-v1)
> > +   ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
> 
> As stated above, this will 

Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Enrico Mioso

thank you very very much Adrian!! I'll address all of the comments hopefully, 
and send a new version. In the meantime I am trying to configure the switch 
correctly, which is not the case.
My current snippet is:
 {
status = "okay";
phy-handle = <>;

mtd-mac-address = < 0x1fc00>;
mtd-mac-address-increment = <1>;
};

 {
mtd-mac-address = < 0x1fc00>;
mtd-mac-address-increment = <(-1)>;
};

Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), eth0 
does not.
Can you help me translate the C code in the mach- file to the DTS equivalent?
The most similar device is TP-Link 942N but it seems not supported.

BTW - fixing eth1 issue helped mitigate LTE init problem...
As per leds, I was trying to keep things the ar71xx way, what do you think?

Enrico

On Tue, 17 Sep 2019, Adrian Schmutzler wrote:


Date: Tue, 17 Sep 2019 12:07:20
From: Adrian Schmutzler 
To: Enrico Mioso , openwrt-devel@lists.openwrt.org
Cc: Filip Moc , Piotr Dymacz 
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

Hi,


-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf 
Of Enrico Mioso
Sent: Dienstag, 17. September 2019 02:21
To: openwrt-devel@lists.openwrt.org
Cc: Filip Moc ; Piotr Dymacz ; Enrico Mioso 

Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

This adds support to the ath79 target for the TP-Link MR6400 router.

As per original commit, hardware specifications (v1.0 EU):
- SoC: QCA9531
- Flash: Winbond W25Q64FV (8MiB)
- RAM: EtronTech EM6AB160TSE-5G (64MiB)
- Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
- Ethernet: 2NIC (3x100M + 1x100M)
- WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
- Power: DC 12V 1A

Flashing instructions:
You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Working:
- Wi-Fi
- TP-Link LTE module does it's thing (but see Notes)
- reset/rfkill keys
Untested:
- recovery via factory
- leds

Issues for which I need help:
eth1 detects link when infact it's not there, and occasionally causes kernel 
traces due to tx timeouts.
I promise I'll test untested items as well in final version

Note: as it happened occasionally in ar71xx, during bursty flash activity, LTE 
module init will fail, with USB enumeration errors.

Signed-off-by: Enrico Mioso 
CC: Filip Moc 
CC: Piotr Dymacz 
---
 .../ath79/base-files/etc/board.d/01_leds  |   6 +
 .../ath79/base-files/etc/board.d/02_network   |   5 +
 .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
 target/linux/ath79/image/generic-tp-link.mk   |  10 ++
 4 files changed, 186 insertions(+)
 create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 778316e450..5728aeb491 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -130,6 +130,12 @@ tplink,archer-c7-v5)
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
"0x10"
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
"0x20"
;;
+tplink,tl-mr6400-v1)
+   ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0"
+   ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1"


Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 to 
"lan".
Either change 02_network or this LED shouldn't be called WAN.


+   ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0"
+   ucidef_set_led_wlan "wlan" "WLAN" "tp-link:white:wlan" "phy0tpt"


phy0tpt trigger can be moved to DTS, just have a look at other devices recently 
added to ath79.


+   ;;
 tplink,archer-c2-v3|\
 tplink,tl-wr1043nd-v4|\
 tplink,tl-wr1043n-v5)
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 5b47af8ef7..2b0e1ce400 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -56,6 +56,11 @@ ath79_setup_interfaces()
winchannel,wb2000)
ucidef_set_interface_lan "eth0"
;;
+   tplink,tl-mr6400-v1)
+   ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"


As stated above, this will make eth1 part of "lan" ...


+   ucidef_add_switch "switch0" \
+   "0@eth0" "1:lan" "2:lan" "3:lan"
+   ;;
avm,fritz4020|\
pcs,cr3000|\
tplink,archer-c58-v1|\
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts 
b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
new file mode 100644
index 00..4acb1a02a4

Re: [OpenWrt-Devel] OpenWrt 19.07 release schedule ?

2019-09-17 Thread Jonas Gorski
On Sun, 8 Sep 2019 at 21:19, Tom Psyborg  wrote:
> there seem to exist at least a dozen of critical bugs that one would
> not like to have as a part of final release, to name a few:
>
> Mainline ath10k causes crahes in ipq806x / R7800 ->
> https://bugs.openwrt.org/index.php?do=details_id=2480

We ship ath10k-ct by default, so issues with ath10 shouldn't be a
(rc-)release blocker. It should be fixed for final though.

> TP-Link CPE210v3 wifi not working ->
> https://bugs.openwrt.org/index.php?do=details_id=2478 (there are
> multiple reports for CPE v2 too)
>
> eth0 doesn't work on ath79 and AR7240 Rev 2 for ubnt-bullet-m ->
> https://bugs.openwrt.org/index.php?do=details_id=2442

These seem to be ath79 issues, since 19.07 still has ar71xx (which I
assume still works fine for those) just not providing ath79 images for
these devices would be fine IMHO.

> TD-W8980: Kernel panic - not syncing: Fatal exception in interrupt ->
> https://bugs.openwrt.org/index.php?do=details_id=2410

This should be ideally investigated and fixed by final, but guessing
from the lack of additional reports it seems it doesn't affect many
users.

> ath79: sysupgrade will brick devices with RedBoot bootloader ->
> https://bugs.openwrt.org/index.php?do=details_id=2428
>
> Flow offload regression with 4.19 kernel ->
> https://bugs.openwrt.org/index.php?do=details_id=2389

19.07 uses 4.14, not 4.19, so neither is an issue for the branch/release.


Regards

Jonas

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


Re: [OpenWrt-Devel] [PATCH] treewide: add Generic subtarget if missing

2019-09-17 Thread Jonas Gorski
On Sun, 15 Sep 2019 at 12:49, Paul Spooren  wrote:
> > What you suggest is about what we have right now. This kind of creates a 
> > misleading situation where for some targets subtargets are present, while 
> > for others paths and image names are "fixed" in several places to include a 
> > "generic". The reason for Paul's patch was to get rid of the fixes at 
> > individual places (which was/is applied somewhat inconsistently) by just 
> > making all targets apply to the same logic (i.e. that there is at least one 
> > subtarget).
> > So, the empty files are introduced to make the process of building and 
> > creating images afterwards simpler (to follow/understand).
> >
> > I was suffering from the same problem when I dealt with OpenWrt-derived 
> > firmware, where I suddenly encountered a target without subtargets and had 
> > to implement extra code to work around that.
> >
> > However, I also wondered whether one couldn't code around the necessity of 
> > the empty file, and just add the SUBTARGET/SUBTARGETS variables here...
>
> Thanks for commenting, that's very much my point!
>
> Maybe the easiest solution is to add `SUBTARGET ?= generic` to
> include/image.mk instead of introducing empty files. Will try that tomorrow.

Thanks, this is what I meant, providing some sensible default value(s).

I have to admit, even after reading your changelog and Adrian's email
twice, I still don't quite grasp what issue this change is trying to
fix. An example might be nice in the changelog.


Regards
Jonas

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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2019-09-17 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> Behalf Of Enrico Mioso
> Sent: Dienstag, 17. September 2019 02:21
> To: openwrt-devel@lists.openwrt.org
> Cc: Filip Moc ; Piotr Dymacz ; Enrico Mioso 
> 
> Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
> 
> This adds support to the ath79 target for the TP-Link MR6400 router.
> 
> As per original commit, hardware specifications (v1.0 EU):
> - SoC: QCA9531
> - Flash: Winbond W25Q64FV (8MiB)
> - RAM: EtronTech EM6AB160TSE-5G (64MiB)
> - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
> - Ethernet: 2NIC (3x100M + 1x100M)
> - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
> - Power: DC 12V 1A
> 
> Flashing instructions:
> You can flash via tftp recovery (serve factory image as 
> /mr6400_tp_recovery.bin
> on 192.168.0.66/24, connect to any ethernet port and power on device while
> holding the reset button). Flashing via OEM web interface does not work.
> 
> Working:
> - Wi-Fi
> - TP-Link LTE module does it's thing (but see Notes)
> - reset/rfkill keys
> Untested:
> - recovery via factory
> - leds
> 
> Issues for which I need help:
> eth1 detects link when infact it's not there, and occasionally causes kernel 
> traces due to tx timeouts.
> I promise I'll test untested items as well in final version
> 
> Note: as it happened occasionally in ar71xx, during bursty flash activity, 
> LTE module init will fail, with USB enumeration errors.
> 
> Signed-off-by: Enrico Mioso 
> CC: Filip Moc 
> CC: Piotr Dymacz 
> ---
>  .../ath79/base-files/etc/board.d/01_leds  |   6 +
>  .../ath79/base-files/etc/board.d/02_network   |   5 +
>  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++
>  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
>  4 files changed, 186 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> 
> diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
> b/target/linux/ath79/base-files/etc/board.d/01_leds
> index 778316e450..5728aeb491 100755
> --- a/target/linux/ath79/base-files/etc/board.d/01_leds
> +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
> @@ -130,6 +130,12 @@ tplink,archer-c7-v5)
>   ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" 
> "0x10"
>   ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" 
> "0x20"
>   ;;
> +tplink,tl-mr6400-v1)
> + ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0"
> + ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1"

Here, you assign eth1 to the "wan" LED, but in 02_network you assign eth1 to 
"lan".
Either change 02_network or this LED shouldn't be called WAN.

> + ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0"
> + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:white:wlan" "phy0tpt"

phy0tpt trigger can be moved to DTS, just have a look at other devices recently 
added to ath79.

> + ;;
>  tplink,archer-c2-v3|\
>  tplink,tl-wr1043nd-v4|\
>  tplink,tl-wr1043n-v5)
> diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
> b/target/linux/ath79/base-files/etc/board.d/02_network
> index 5b47af8ef7..2b0e1ce400 100755
> --- a/target/linux/ath79/base-files/etc/board.d/02_network
> +++ b/target/linux/ath79/base-files/etc/board.d/02_network
> @@ -56,6 +56,11 @@ ath79_setup_interfaces()
>   winchannel,wb2000)
>   ucidef_set_interface_lan "eth0"
>   ;;
> + tplink,tl-mr6400-v1)
> + ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"

As stated above, this will make eth1 part of "lan" ...

> + ucidef_add_switch "switch0" \
> + "0@eth0" "1:lan" "2:lan" "3:lan"
> + ;;
>   avm,fritz4020|\
>   pcs,cr3000|\
>   tplink,archer-c58-v1|\
> diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts 
> b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> new file mode 100644
> index 00..4acb1a02a4
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
> @@ -0,0 +1,165 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> + compatible = "tplink,tl-mr6400-v1", "qca,qca9531";
> + model = "TP-Link TL-MR6400 v1.0";

I would remove the ".0" here, as with TP-Link the sub-revisions typically refer 
only to their firmware. So just "v1" should be better.

> +
> + aliases {
> + led-boot = _power;
> + led-failsafe = _power;
> + led-running = _power;
> + led-upgrade = _power;
> + };
> +
> + gpio_leds: leds {
> + compatible = "gpio-leds";
> +
> + /* D12 */

What's that?

> + led_wan: wan {
> + label = "tp-link:white:wan";
> + gpios = < 0 GPIO_ACTIVE_HIGH>;
> + };

IMO those 

Re: [OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace

2019-09-17 Thread Martin Schiller

On 2019-09-16 22:43, Hauke Mehrtens wrote:

On 9/16/19 7:09 PM, Martin Blumenstingl wrote:

Hi Martin,

On Mon, Sep 16, 2019 at 12:54 PM Martin Schiller  
wrote:


Hi!

I am searching for a possibility to disable Auto Negotiation of an
PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch.

The xrx200-net driver does not seem to have support for that.

I don't know about xrx200-net, but ...

Accessing the STD_CRTL register on the mdio bus from uboot with the 
mdio

command works like expected.

Any suggestions how to do that from linux userspace?
... my (limited) understanding is that this is one of the benefits of 
DSA:

you get one interface per port - with that you can use for example
ethtool to disable auto negotiation for one port
kernel source reference: [0]


I also do not know if xrx200-net supports that or if it is possible 
with

swconfig at all. There is also a DSA driver for this switch in the
mainline kernel:
https://elixir.bootlin.com/linux/latest/source/drivers/net/dsa/lantiq_gswip.c

This driver should support everything the xrx200-net driver supports
plus some extras.
I would prefer to use the DSA driver also in OpenWrt, but we need a way
to migrate the existing configurations which are based on swconfig to 
DSA.


You could try the fixed-link attribute in device tree to model this 
with

DSA.


Thanks for your answers.

Switching to DSA would be nice, but it's too much work I can't afford 
right now.


Disabling ANEG in the DTS is not enough, because I also need a way to 
turn

ANEG on and off at runtime.

Meanwhile I found out that there is a mechanism with swconfig to 
configure

the link attributes:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=6219b3deae1c8dfbf405f5a701d3f3b00ebacce1

I will try to integrate this into the "old" xrx200-net driver.

Martin

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