From patchwork Mon Oct 15 10:25:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 984078 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=none (p=none dis=none) header.from=mork.no Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HCk52oSe"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.b="FrZGeAwl"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YZQ35frMz9s3q for ; Mon, 15 Oct 2018 21:27: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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9R25+I/NSOgxEhKxn/44xIPQozACEcdrO4KyVRZnTjY=; b=HCk52oSetQNGym AuBgsemAwgWRBbPzPRjteQ+FT+4VLW3l8DaVVHAjVBPJnJZLCBvhO9iQiVklM/6KIMD0JIAKxN5HB 9JkK15VvTryvJNuUuEaBPm1tyLGlLkwClhrt0qr+rKqBueQ6YVdARXI+feJQSF5QA6i4kGe4TyDiy 8892Lr3QLhlkPlwMnDU3T9dKk05JMJWsw8FslhmyJp/LvMns87mbmtoKw/mZNELN61xf6hzgqJlR3 xejcumdLRpdrEZ7Atj5+FjB1fIWbJ+CoaCNM+LIEFvLfY++vUFpqNR+twVCOYCj4kzjrbDMaN2puQ JXnb5qCwkQngxLR9RbDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC05x-0003Ls-Ss; Mon, 15 Oct 2018 10:27:29 +0000 Received: from canardo.mork.no ([2001:4641::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC04C-0002X4-Vr for openwrt-devel@lists.openwrt.org; Mon, 15 Oct 2018 10:25:47 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id w9FAPNZY030890 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Oct 2018 12:25:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1539599124; bh=mGDP7P2fT4N7JtQblOeiiwRWCKOQL9kYvhcGh/nimaU=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=FrZGeAwlqDacf1lcjTfmBk0u05JYRJXKPkf746QuKn36b3rbSvwc/zF7uE5RJSwiC WJiweFBeBoV0Y/uASF4Bro5ydeBVko4TZpW6c0T4aIcB7Egc3GV7KOnPkFuhOGLOHo LnzIinA8z9N4Hkq5HOVV2gZfvgii4VfCmE5FCrwY= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id w9FAPNoQ030883; Mon, 15 Oct 2018 12:25:23 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: OpenWrt Development List Date: Mon, 15 Oct 2018 12:25:03 +0200 Message-Id: <20181015102503.30731-10-bjorn@mork.no> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181015102503.30731-1-bjorn@mork.no> References: <20181015102503.30731-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.100.1 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181015_032541_992721_7CF4BDF0 X-CRM114-Status: GOOD ( 12.06 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [RFC 9/9] wap6805: use mtk-eth-soc driver with DSA X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Bjørn Mork --- .../linux/ramips/base-files/etc/board.d/02_network | 3 +- target/linux/ramips/dts/WAP6805.dts | 61 +++++++++++++++++++++- target/linux/ramips/image/mt7621.mk | 1 + 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index f53bf02d221f..5b0dffbc0be2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -405,8 +405,7 @@ ramips_setup_interfaces() "0:lan:2" "1:lan:1" "4:wan" "6@eth0" ;; wap6805) - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6@eth0" + ucidef_set_interface_lan "lan0 lan1 lan2 lan3" ;; *) RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"` diff --git a/target/linux/ramips/dts/WAP6805.dts b/target/linux/ramips/dts/WAP6805.dts index 53ef7301d13b..95fd3ecbebda 100644 --- a/target/linux/ramips/dts/WAP6805.dts +++ b/target/linux/ramips/dts/WAP6805.dts @@ -125,7 +125,66 @@ }; ðernet { - mtd-mac-address = <&factory 0xe000>; + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "rgmii"; + mtd-mac-address = <&factory 0xe000>; + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; + }; + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + phy-mode = "rgmii"; + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; + }; +}; + +&phy1f { + compatible = "mediatek,mt7530"; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan0"; + cpu = <&cpu_port0>; + }; + port@1 { + reg = <1>; + label = "lan1"; + cpu = <&cpu_port0>; + }; + port@2 { + reg = <2>; + label = "lan2"; + cpu = <&cpu_port0>; + }; + port@3 { + reg = <3>; + label = "lan3"; + cpu = <&cpu_port0>; + }; + cpu_port0: port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + }; + }; }; &xhci { diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index cc37c53bad28..b2f07b5e2e68 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -539,6 +539,7 @@ define Device/wap6805 IMAGE_SIZE := $(ralink_default_fw_size_32M) DEVICE_TITLE := ZyXEL WAP6805 DEVICE_PACKAGES := \ + kmod-mtk-eth-soc \ kmod-mt7603 kmod-mt76x2 \ kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini \ -swconfig