[From nobody Thu Jun 25 05:55:23 2020
Received: from hosting.moc6.cz ([2a02:c60:c70:8900::1] helo=moc6.cz)
 by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux))
 id 1iADtS-0003nT-0Z
 for openwrt-devel@lists.openwrt.org; Tue, 17 Sep 2019 13:51:48 +0000
Received: by moc6.cz (Postfix, from userid 1025)
 id 6F1EA2320022; Tue, 17 Sep 2019 15:51:38 +0200 (CEST)
Date: Tue, 17 Sep 2019 15:51:38 +0200
From: Filip Moc &lt;lede@moc6.cz&gt;
To: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Cc: Adrian Schmutzler &lt;mail@adrianschmutzler.de&gt;,
 openwrt-devel@lists.openwrt.org, Piotr Dymacz &lt;pepe2k@gmail.com&gt;
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
Message-ID: &lt;20190917135138.GA24389@moc6.cz&gt;
References: &lt;20190917002048.1062539-1-mrkiko.rs@gmail.com&gt;
 &lt;003c01d56d3f$b216bee0$16443ca0$@adrianschmutzler.de&gt;
 &lt;alpine.LNX.2.21.99999.353.1909171243340.1098807@mStation.localdomain&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: &lt;alpine.LNX.2.21.99999.353.1909171243340.1098807@mStation.localdomain&gt;
User-Agent: Mutt/1.10.1 (2018-07-13)
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20190917_065146_367554_BAB34C93 
X-CRM114-Status: GOOD (  36.20  )
X-Spam-Score: -0.0 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-0.0 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record

Hi,

&gt; 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:
&gt; 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.
&gt; My current snippet is:
&gt; &amp;eth0 {
&gt; 	status = &quot;okay&quot;;
&gt; 	phy-handle = &lt;&amp;swphy0&gt;;
&gt; 
&gt; 	mtd-mac-address = &lt;&amp;uboot 0x1fc00&gt;;
&gt; 	mtd-mac-address-increment = &lt;1&gt;;
&gt; };
&gt; 
&gt; &amp;eth1 {
&gt; 	mtd-mac-address = &lt;&amp;uboot 0x1fc00&gt;;
&gt; 	mtd-mac-address-increment = &lt;(-1)&gt;;
&gt; };
&gt; 
&gt; Where - eth1 works correctly (e.g.: detects cable plugging / unplugging), eth0 does not.
&gt; Can you help me translate the C code in the mach- file to the DTS equivalent?
&gt; The most similar device is TP-Link 942N but it seems not supported.
&gt; 
&gt; BTW - fixing eth1 issue helped mitigate LTE init problem...
&gt; As per leds, I was trying to keep things the ar71xx way, what do you think?
&gt; 
&gt; Enrico
&gt; 
&gt; On Tue, 17 Sep 2019, Adrian Schmutzler wrote:
&gt; 
&gt; &gt; Date: Tue, 17 Sep 2019 12:07:20
&gt; &gt; From: Adrian Schmutzler &lt;mail@adrianschmutzler.de&gt;
&gt; &gt; To: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;, openwrt-devel@lists.openwrt.org
&gt; &gt; Cc: Filip Moc &lt;lede@moc6.cz&gt;, Piotr Dymacz &lt;pepe2k@gmail.com&gt;
&gt; &gt; Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
&gt; &gt; 
&gt; &gt; Hi,
&gt; &gt; 
&gt; &gt; &gt; -----Original Message-----
&gt; &gt; &gt; From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On Behalf Of Enrico Mioso
&gt; &gt; &gt; Sent: Dienstag, 17. September 2019 02:21
&gt; &gt; &gt; To: openwrt-devel@lists.openwrt.org
&gt; &gt; &gt; Cc: Filip Moc &lt;lede@moc6.cz&gt;; Piotr Dymacz &lt;pepe2k@gmail.com&gt;; Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
&gt; &gt; &gt; Subject: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
&gt; &gt; &gt; 
&gt; &gt; &gt; This adds support to the ath79 target for the TP-Link MR6400 router.
&gt; &gt; &gt; 
&gt; &gt; &gt; As per original commit, hardware specifications (v1.0 EU):
&gt; &gt; &gt; - SoC: QCA9531
&gt; &gt; &gt; - Flash: Winbond W25Q64FV (8MiB)
&gt; &gt; &gt; - RAM: EtronTech EM6AB160TSE-5G (64MiB)
&gt; &gt; &gt; - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
&gt; &gt; &gt; - Ethernet: 2NIC (3x100M + 1x100M)
&gt; &gt; &gt; - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
&gt; &gt; &gt; - Power: DC 12V 1A
&gt; &gt; &gt; 
&gt; &gt; &gt; Flashing instructions:
&gt; &gt; &gt; You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
&gt; &gt; &gt; on 192.168.0.66/24, connect to any ethernet port and power on device while
&gt; &gt; &gt; holding the reset button). Flashing via OEM web interface does not work.
&gt; &gt; &gt; 
&gt; &gt; &gt; Working:
&gt; &gt; &gt; - Wi-Fi
&gt; &gt; &gt; - TP-Link LTE module does it's thing (but see Notes)
&gt; &gt; &gt; - reset/rfkill keys
&gt; &gt; &gt; Untested:
&gt; &gt; &gt; - recovery via factory
&gt; &gt; &gt; - leds
&gt; &gt; &gt; 
&gt; &gt; &gt; Issues for which I need help:
&gt; &gt; &gt; eth1 detects link when infact it's not there, and occasionally causes kernel traces due to tx timeouts.
&gt; &gt; &gt; I promise I'll test untested items as well in final version
&gt; &gt; &gt; 
&gt; &gt; &gt; Note: as it happened occasionally in ar71xx, during bursty flash activity, LTE module init will fail, with USB enumeration errors.
&gt; &gt; &gt; 
&gt; &gt; &gt; Signed-off-by: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
&gt; &gt; &gt; CC: Filip Moc &lt;lede@moc6.cz&gt;
&gt; &gt; &gt; CC: Piotr Dymacz &lt;pepe2k@gmail.com&gt;
&gt; &gt; &gt; ---
&gt; &gt; &gt;  .../ath79/base-files/etc/board.d/01_leds      |   6 +
&gt; &gt; &gt;  .../ath79/base-files/etc/board.d/02_network   |   5 +
&gt; &gt; &gt;  .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++++++++++++++++++
&gt; &gt; &gt;  target/linux/ath79/image/generic-tp-link.mk   |  10 ++
&gt; &gt; &gt;  4 files changed, 186 insertions(+)
&gt; &gt; &gt;  create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
&gt; &gt; &gt; 
&gt; &gt; &gt; diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds
&gt; &gt; &gt; index 778316e450..5728aeb491 100755
&gt; &gt; &gt; --- a/target/linux/ath79/base-files/etc/board.d/01_leds
&gt; &gt; &gt; +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
&gt; &gt; &gt; @@ -130,6 +130,12 @@ tplink,archer-c7-v5)
&gt; &gt; &gt;  	ucidef_set_led_switch &quot;lan3&quot; &quot;LAN3&quot; &quot;tp-link:green:lan3&quot; &quot;switch0&quot; &quot;0x10&quot;
&gt; &gt; &gt;  	ucidef_set_led_switch &quot;lan4&quot; &quot;LAN4&quot; &quot;tp-link:green:lan4&quot; &quot;switch0&quot; &quot;0x20&quot;
&gt; &gt; &gt;  	;;
&gt; &gt; &gt; +tplink,tl-mr6400-v1)
&gt; &gt; &gt; +	ucidef_set_led_netdev &quot;lan&quot; &quot;LAN&quot; &quot;tp-link:white:lan&quot; &quot;eth0&quot;
&gt; &gt; &gt; +	ucidef_set_led_netdev &quot;wan&quot; &quot;WAN&quot; &quot;tp-link:white:wan&quot; &quot;eth1&quot;
&gt; &gt; 
&gt; &gt; Here, you assign eth1 to the &quot;wan&quot; LED, but in 02_network you assign eth1 to &quot;lan&quot;.
&gt; &gt; Either change 02_network or this LED shouldn't be called WAN.
&gt; &gt; 
&gt; &gt; &gt; +	ucidef_set_led_netdev &quot;4g&quot; &quot;4G&quot; &quot;tp-link:white:4g&quot; &quot;usb0&quot;
&gt; &gt; &gt; +	ucidef_set_led_wlan &quot;wlan&quot; &quot;WLAN&quot; &quot;tp-link:white:wlan&quot; &quot;phy0tpt&quot;
&gt; &gt; 
&gt; &gt; phy0tpt trigger can be moved to DTS, just have a look at other devices recently added to ath79.
&gt; &gt; 
&gt; &gt; &gt; +	;;
&gt; &gt; &gt;  tplink,archer-c2-v3|\
&gt; &gt; &gt;  tplink,tl-wr1043nd-v4|\
&gt; &gt; &gt;  tplink,tl-wr1043n-v5)
&gt; &gt; &gt; diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
&gt; &gt; &gt; index 5b47af8ef7..2b0e1ce400 100755
&gt; &gt; &gt; --- a/target/linux/ath79/base-files/etc/board.d/02_network
&gt; &gt; &gt; +++ b/target/linux/ath79/base-files/etc/board.d/02_network
&gt; &gt; &gt; @@ -56,6 +56,11 @@ ath79_setup_interfaces()
&gt; &gt; &gt;  	winchannel,wb2000)
&gt; &gt; &gt;  		ucidef_set_interface_lan &quot;eth0&quot;
&gt; &gt; &gt;  		;;
&gt; &gt; &gt; +	tplink,tl-mr6400-v1)
&gt; &gt; &gt; +		ucidef_set_interfaces_lan_wan &quot;eth0.1 eth1&quot; &quot;usb0&quot;
&gt; &gt; 
&gt; &gt; As stated above, this will make eth1 part of &quot;lan&quot; ...
&gt; &gt; 
&gt; &gt; &gt; +		ucidef_add_switch &quot;switch0&quot; \
&gt; &gt; &gt; +			&quot;0@eth0&quot; &quot;1:lan&quot; &quot;2:lan&quot; &quot;3:lan&quot;
&gt; &gt; &gt; +		;;
&gt; &gt; &gt;  	avm,fritz4020|\
&gt; &gt; &gt;  	pcs,cr3000|\
&gt; &gt; &gt;  	tplink,archer-c58-v1|\
&gt; &gt; &gt; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
&gt; &gt; &gt; new file mode 100644
&gt; &gt; &gt; index 0000000000..4acb1a02a4
&gt; &gt; &gt; --- /dev/null
&gt; &gt; &gt; +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
&gt; &gt; &gt; @@ -0,0 +1,165 @@
&gt; &gt; &gt; +// SPDX-License-Identifier: GPL-2.0-or-later
&gt; &gt; &gt; +/dts-v1/;
&gt; &gt; &gt; +
&gt; &gt; &gt; +#include &lt;dt-bindings/gpio/gpio.h&gt;
&gt; &gt; &gt; +#include &lt;dt-bindings/input/input.h&gt;
&gt; &gt; &gt; +
&gt; &gt; &gt; +#include &quot;qca953x.dtsi&quot;
&gt; &gt; &gt; +
&gt; &gt; &gt; +/ {
&gt; &gt; &gt; +	compatible = &quot;tplink,tl-mr6400-v1&quot;, &quot;qca,qca9531&quot;;
&gt; &gt; &gt; +	model = &quot;TP-Link TL-MR6400 v1.0&quot;;
&gt; &gt; 
&gt; &gt; I would remove the &quot;.0&quot; here, as with TP-Link the sub-revisions typically refer only to their firmware. So just &quot;v1&quot; should be better.
&gt; &gt; 
&gt; &gt; &gt; +
&gt; &gt; &gt; +	aliases {
&gt; &gt; &gt; +		led-boot = &amp;led_power;
&gt; &gt; &gt; +		led-failsafe = &amp;led_power;
&gt; &gt; &gt; +		led-running = &amp;led_power;
&gt; &gt; &gt; +		led-upgrade = &amp;led_power;
&gt; &gt; &gt; +	};
&gt; &gt; &gt; +
&gt; &gt; &gt; +	gpio_leds: leds {
&gt; &gt; &gt; +		compatible = &quot;gpio-leds&quot;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D12 */
&gt; &gt; 
&gt; &gt; What's that?
&gt; &gt; 
&gt; &gt; &gt; +		led_wan: wan {
&gt; &gt; &gt; +			label = &quot;tp-link:white:wan&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 0 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; 
&gt; &gt; 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 &quot;wan {&quot; here instead of &quot;led_wan: wan {&quot; ...
&gt; &gt; 
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D11 */
&gt; &gt; &gt; +		led_4g: 4g {
&gt; &gt; &gt; +			label = &quot;tp-link:white:4g&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 1 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D5 */
&gt; &gt; &gt; +		led_wps: wps {
&gt; &gt; &gt; +			label = &quot;tp-link:white:wps&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 3 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D3 */
&gt; &gt; &gt; +		led_wlan: wlan {
&gt; &gt; &gt; +			label = &quot;tp-link:white:wlan&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 11 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D2 */
&gt; &gt; &gt; +		led_power: power {
&gt; &gt; &gt; +			label = &quot;tp-link:white:power&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 13 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* D4 */
&gt; &gt; &gt; +		led_lan: lan {
&gt; &gt; &gt; +			label = &quot;tp-link:white:lan&quot;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 16 GPIO_ACTIVE_HIGH&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +	};
&gt; &gt; &gt; +
&gt; &gt; &gt; +	gpio-export {
&gt; &gt; &gt; +		compatible = &quot;gpio-export&quot;;
&gt; &gt; &gt; +		#size-cells = &lt;0&gt;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +		gpio_usb_power {
&gt; &gt; &gt; +			gpio-export,name = &quot;tp-link:power:LTE&quot;;
&gt; &gt; &gt; +			gpio-export,output = &lt;0&gt;;
&gt; &gt; 
&gt; &gt; Sure about the 0?
&gt; &gt; 
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 4 GPIO_ACTIVE_LOW&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +	};
&gt; &gt; 
&gt; &gt; Please replace gpio-export by a gpio-hog. Either look at recently added devices or at https://patchwork.ozlabs.org/patch/1141057/
&gt; &gt; 
&gt; &gt; Note that in this case I would call the node &quot;lte_power&quot; or &quot;power_lte&quot; instead of referring to the USB, but that's a matter of taste.
&gt; &gt; 
&gt; &gt; &gt; +
&gt; &gt; &gt; +	keys {
&gt; &gt; &gt; +		compatible = &quot;gpio-keys&quot;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* SW2 */
&gt; &gt; &gt; +		reset {
&gt; &gt; &gt; +			label = &quot;Reset button&quot;;
&gt; &gt; &gt; +			linux,code = &lt;KEY_RESTART&gt;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 12 GPIO_ACTIVE_LOW&gt;;
&gt; &gt; &gt; +			debounce-interval = &lt;60&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +
&gt; &gt; &gt; +		/* SW3 */
&gt; &gt; &gt; +		rfkill {
&gt; &gt; &gt; +			label = &quot;RFKill button&quot;;
&gt; &gt; &gt; +			linux,code = &lt;KEY_RFKILL&gt;;
&gt; &gt; &gt; +			gpios = &lt;&amp;gpio 14 GPIO_ACTIVE_LOW&gt;;
&gt; &gt; &gt; +			debounce-interval = &lt;60&gt;;
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +	};
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;uart {
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;spi {
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +	num-cs = &lt;1&gt;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +	flash@0 {
&gt; &gt; &gt; +		#address-cells = &lt;1&gt;;
&gt; &gt; &gt; +		#size-cells = &lt;1&gt;;
&gt; &gt; &gt; +		compatible = &quot;jedec,spi-nor&quot;;
&gt; &gt; &gt; +		reg = &lt;0&gt;;
&gt; &gt; &gt; +		spi-max-frequency = &lt;10000000&gt;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +		partitions {
&gt; &gt; &gt; +			compatible = &quot;fixed-partitions&quot;;
&gt; &gt; &gt; +			#address-cells = &lt;1&gt;;
&gt; &gt; &gt; +			#size-cells = &lt;1&gt;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +			uboot:	partition@0 {
&gt; &gt; 
&gt; &gt; There is a tab between uboot and partition. Replace by space ...
&gt; &gt; 
&gt; &gt; &gt; +				label = &quot;u-boot&quot;;
&gt; &gt; &gt; +				reg = &lt;0x000000 0x020000&gt;;
&gt; &gt; &gt; +				read-only;
&gt; &gt; &gt; +			};
&gt; &gt; &gt; +
&gt; &gt; &gt; +			partition@20000 {
&gt; &gt; &gt; +				compatible = &quot;tplink,firmware&quot;;
&gt; &gt; &gt; +				label = &quot;firmware&quot;;
&gt; &gt; &gt; +				reg = &lt;0x020000 0x7d0000&gt;;
&gt; &gt; &gt; +			};
&gt; &gt; &gt; +
&gt; &gt; &gt; +			art: partition@7f0000 {
&gt; &gt; &gt; +				label = &quot;art&quot;;
&gt; &gt; &gt; +				reg = &lt;0x7f0000 0x010000&gt;;
&gt; &gt; &gt; +				read-only;
&gt; &gt; &gt; +			};
&gt; &gt; &gt; +		};
&gt; &gt; &gt; +	};
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;eth1 {
&gt; &gt; &gt; +	mtd-mac-address = &lt;&amp;uboot 0x1fc00&gt;;
&gt; &gt; &gt; +	mtd-mac-address-increment = &lt;(-1)&gt;;
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;eth0 {
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +	phy-handle = &lt;&amp;swphy4&gt;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +	mtd-mac-address = &lt;&amp;uboot 0x1fc00&gt;;
&gt; &gt; &gt; +	mtd-mac-address-increment = &lt;1&gt;;
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;wmac {
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +	mtd-cal-data = &lt;&amp;art 0x1000&gt;;
&gt; &gt; &gt; +	mtd-mac-address = &lt;&amp;uboot 0x1fc00&gt;;
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;usb0 {
&gt; &gt; &gt; +	#address-cells = &lt;1&gt;;
&gt; &gt; &gt; +	#size-cells = &lt;0&gt;;
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +
&gt; &gt; &gt; +	hub_port: port@1 {
&gt; &gt; &gt; +		reg = &lt;1&gt;;
&gt; &gt; &gt; +		#trigger-source-cells = &lt;0&gt;;
&gt; &gt; &gt; +	};
&gt; &gt; &gt; +};
&gt; &gt; &gt; +
&gt; &gt; &gt; +&amp;usb_phy {
&gt; &gt; &gt; +	status = &quot;okay&quot;;
&gt; &gt; &gt; +};
&gt; &gt; &gt; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
&gt; &gt; &gt; index 5519e9c960..78d7810f29 100644
&gt; &gt; &gt; --- a/target/linux/ath79/image/generic-tp-link.mk
&gt; &gt; &gt; +++ b/target/linux/ath79/image/generic-tp-link.mk
&gt; &gt; &gt; @@ -393,6 +393,16 @@ define Device/tplink_tl-wr810n-v1
&gt; &gt; &gt;  endef
&gt; &gt; &gt;  TARGET_DEVICES += tplink_tl-wr810n-v1
&gt; &gt; &gt; 
&gt; &gt; &gt; +define Device/tplink_tl-mr6400-v1
&gt; &gt; &gt; +  $(Device/tplink-8mlzma)
&gt; &gt; &gt; +  ATH_SOC := qca9531
&gt; &gt; &gt; +  DEVICE_MODEL := TL-MR6400
&gt; &gt; &gt; +  DEVICE_VARIANT := v1
&gt; &gt; &gt; +  TPLINK_HWID := 0x64000001
&gt; &gt; &gt; +  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb
&gt; &gt; 
&gt; &gt; You can remove kmod-usb-core, kmod-usb-net and kmod-usb-serial, as those are dependencies of the other packages.
&gt; &gt; 
&gt; &gt; Since this is a port from ar71xx, you should add a SUPPORTED_DEVICES entry.
&gt; &gt; 
&gt; &gt; Best
&gt; &gt; 
&gt; &gt; Adrian
&gt; &gt; 
&gt; &gt; &gt; +endef
&gt; &gt; &gt; +TARGET_DEVICES += tplink_tl-mr6400-v1
&gt; &gt; &gt; +
&gt; &gt; &gt;  define Device/tplink_tl-wr810n-v2
&gt; &gt; &gt;    $(Device/tplink-8mlzma)
&gt; &gt; &gt;    ATH_SOC := qca9533
&gt; &gt; &gt; --
&gt; &gt; &gt; 2.23.0
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; _______________________________________________
&gt; &gt; &gt; openwrt-devel mailing list
&gt; &gt; &gt; openwrt-devel@lists.openwrt.org
&gt; &gt; &gt; https://lists.openwrt.org/mailman/listinfo/openwrt-devel
&gt; &gt; 

]