From patchwork Thu Feb 27 02:39:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Heppler, J. Scott" X-Patchwork-Id: 1245471 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=centurylink.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=qnfRr8uJ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=centurylink.net header.i=@centurylink.net header.a=rsa-sha1 header.s=ctl201402 header.b=MdmU9gJe; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48ScPc2vJHz9sQx for ; Thu, 27 Feb 2020 13:41:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GCIvC6GMvyS8+0MdZSg3/3Sh26RfAosuYpekLfFPl54=; b=qnfRr8uJtqm4gH cJn6slS6zbI7KeRx3gLr8JjkjZ6KpNr1dwQ+5pbHYhi2z/Rtdbz1de2NYkT7T0f/1EIGA8rdyE9d4 SH9igmg5Fp0z8H+2PqEk1wFscZSS4Rc8rffaQcvg4r9QEW+8H1IHUx/rk5skHDY0AjjFsKlYWEOhj b4xq9CaZ4OpBoNWru3qMw74yEWU96gLcxi+WB/MZOuJtNLXnm41kq1DkrNRunc45pP88bo5JaBBIK HfUt1yN4aTYB1e+3+uLfTReg3h632bec0I3MY35NEkB6JPhgnQwruJ/A0POPYmagfp3OuS/VmFKj4 idPFkHItd3Q7e7zjGHyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j797I-0000BA-Ea; Thu, 27 Feb 2020 02:41:36 +0000 Received: from util-01.infra.openwrt.org ([46.101.232.90]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j797E-0000AU-0b for openwrt-devel@lists.openwrt.org; Thu, 27 Feb 2020 02:41:34 +0000 Received: from mail.onyx.syn-alias.com ([206.152.134.66] helo=smtp.centurylink.net) by util-01.infra.openwrt.org with esmtp (Exim 4.89) (envelope-from ) id 1j7950-0001SG-A4 for openwrt-devel@openwrt.org; Wed, 26 Feb 2020 21:39:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1582771150; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=0bh2C+3HlcpWUVpd2FUO163y4Eg=; b=MdmU9gJeCR0fzvMUovlyzXO9OuE7Aiv45+w1/Ab4+B5zN9tbtHADfFh+9qH+AZbs gH2hUdxT6R8plsrNHPNOlDCUgl7mYcRcAQ4okWKA3N03BpAOorUHJTbuQfICToMA nmfOGfT+qh4cyLF4FqpT5W3GCxpQ714Xzrarb3WPnbWrR87fhXzqHZ9KrpZ6SO2M pGC71soAG2iLg4mxvVduciOeBFPAh0aI8sZg5gdBGU8rl7QWs49d6MSNQaxC4I/u +0PhRQdIQSpzNX2e5rCvwkg6Z7U7XNsPmpci1wi/zx40bHJZnqkpATRm8c9rIXfr n16fBupvBSG0isYt5luILA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.3 cv=QLoWuTDL c=1 sm=1 tr=0 a=n6W1qF9bqTqjlf0I0+Sn6Q==:117 a=n6W1qF9bqTqjlf0I0+Sn6Q==:17 a=KGjhK52YXX0A:10 a=IkcTkHD0fZMA:10 a=l697ptgUJYAA:10 a=AsiJWZegAdEA:10 a=eQrCS-SpgXYA:10 a=I_5RNyk1AAAA:8 a=jdP34snFAAAA:8 a=uE2tbS4-KPmIbnTb7AcA:9 a=7tmcSqaZo5YXhhhK:21 a=X3O_7hX04bZYp2X4:21 a=QEXdDO2ut3YA:10 a=Eh9yxdLE6B1twWrs3SXz:22 a=jlphF6vWLdwq7oh3TaWq:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Feedback-ID: dfw:ctl:res:onyx X-Authed-Username: c2hlcDk3MUBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp01.onyx.dfw.sync.lan smtp.user=shep971@centurylink.net; auth=pass (LOGIN) Received: from [71.32.5.18] ([71.32.5.18:38438] helo=centurylink.net) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id C3/6B-01558-CCB275E5; Wed, 26 Feb 2020 21:39:09 -0500 Date: Wed, 26 Feb 2020 18:39:02 -0800 From: "Heppler, J. Scott" To: openwrt-devel@openwrt.org Message-ID: <20200227023902.GA31471@centurylink.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -1.8 (-) X-Spam-Report: Spam detection software, running on the system "util-01.infra.openwrt.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see jo@mein.io for details. Content preview: Signed-off-by: J. Scott Heppler ramips: add support for TRENDnet TEW-810DR Exact hardware clone for the D-Link DIR-810L. See OpenWRT device pages and review the PCB photos, boot logs and MTP flash partitions. https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1 https: [...] Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: centurylink.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shep971[at]centurylink.net) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shep971[at]centurylink.net) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200226_184132_210914_D028E092 X-CRM114-Status: UNSURE ( 4.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.3 (-) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [46.101.232.90 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [shep971[at]centurylink.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [shep971[at]centurylink.net] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v2] ramips: add TRENDnet TEW-810DR support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: J. Scott Heppler ramips: add support for TRENDnet TEW-810DR Exact hardware clone for the D-Link DIR-810L. See OpenWRT device pages and review the PCB photos, boot logs and MTP flash partitions. https://openwrt.org/toh/trendnet/trendnet_tew-810dr_1.0_1.1 https://openwrt.org/toh/d-link/dir-810l Specification: * MediaTek MT7620A (580 Mhz) * 8 MB of FLASH * 64 MB of RAM * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN) * UART header on PCB (57600 8n1) * 2x BiColor LED (GPIO-controlled) * 2x button - power and reset * U-boot bootloader Installation: The sysupgrade.bin image needs to have a cameo hardware ID appended with ncc_att_hwid. ncc_att_hwid is available in the GPL Source download for either the TEW-810DR or DIR-810L and is located at source/user/wolf/cameo/ncc/hostTools The invocation is: ncc_att_hwid -f tew-810-squashfs-factory.bin -a -m “TEW-810DR” -H “1.0R” -r “WW” -c “1.0” More information is available in the device page for TEW-810DR linked above The appended image can then be flash via the Web rescue interface 192.168.10.1 or TFTP's to the same IP address. Subsequent upgrades can be done using the Luci web interface or the ssh command line per the OpenWRT documentation --- .../ramips/dts/mt7620a_trendnet_tew-810dr.dts | 157 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 10 ++ .../mt7620/base-files/etc/board.d/02_network | 3 +- 3 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts new file mode 100644 index 0000000000..eb38110801 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts @@ -0,0 +1,157 @@ +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc"; + model = "TRENDnet TEW-810DR"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + label-mac-device = ðernet; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power { + label = "dir-810l:green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + }; + + wan { + label = "dir-810l:orange:wan"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + + power2 { + label = "dir-810l:orange:power"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + factory5g: partition@50000 { + label = "factory5g"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "Wolf_Config"; + reg = <0x60000 0x10000>; + read-only; + }; + + partition@70000 { + label = "MyDlink"; + reg = <0x70000 0x80000>; + read-only; + }; + + partition@e0000 { + label = "Jffs2"; + reg = <0xe0000 0x80000>; + read-only; + }; + + partition@170000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x170000 0x690000>; + }; + }; + }; +}; + +&state_default { + gpio { + ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf"; + ralink,function = "gpio"; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; +}; + +&pcie { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; + pinctrl-names = "default"; + pinctrl-0 = <&pa_pins>; + mtd-mac-address = <&factory 0x28>; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + mtd-mac-address = <&factory 0x28>; + mtd-mac-address-increment = <2>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 3512a1c55a..71e4270a20 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -942,6 +942,16 @@ define Device/tplink_re200-v1 endef TARGET_DEVICES += tplink_re200-v1 +define Device/trendnet_tew-810dr + SOC := mt7620a + DEVICE_PACKAGES := kmod-mt76x0e + DEVICE_VENDOR := TRENDnet + DEVICE_MODEL := TEW-810DR + IMAGE_SIZE := 6720k + SUPPORTED_DEVICES += dir-810l +endef +TARGET_DEVICES += trendnet_tew-810dr + define Device/vonets_var11n-300 SOC := mt7620n IMAGE_SIZE := 3776k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 7397ddcc2c..a1b3f4bd0c 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -255,7 +255,8 @@ ramips_setup_macs() alfa-network,ac1200rm|\ dlink,dir-810l|\ phicomm,psg1218a|\ - phicomm,psg1218b) + phicomm,psg1218b|\ + trendnet,tew-810dr) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1) ;; alfa-network,r36m-e4g|\