From patchwork Sun Nov 18 13:46:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Yeryomin X-Patchwork-Id: 999472 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=advem.lv Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EB7lGaeo"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="W6RRF6Km"; 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 42yYFc73Ljz9s5c for ; Mon, 19 Nov 2018 00:48:04 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date:To: From: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=wxBWerbBYv/P5QvD4KoYX5JBCYuHcP+bX29GS0kfC0M=; b=EB7lGaeow57xsR gJQB92gZ0zr2Oxv270cdtcMCI8G2ZdO5UmviNoeNlUQ/T7NQ83Szxs72315FP0M32WWUFlZ/L0f44 /WbbOw93Xn0Jiz3dUf0JdxAi+/z1blmY7ZWKWsfjbfIWA/uH0xOwgfyTpEaesK6qTtlPH2oDrcKdG y0dlVfC88t32o+Axhvi5ZJjP/WyS1bqfhmn8dWI2I/n/EcT06C59o4+PHMNRSjNSdL+rP5H2QaPIh Fo3PpretN9+8XIhD/PvFsBB2mm/ksmf/6Gh7+zWlg45Ew+DPupjd4sAoEDmruSubF5t9qHFube4g+ oYBHy0zLcX3dSk+NxQng==; 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 1gONQN-0003a0-MS; Sun, 18 Nov 2018 13:47:43 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gONQM-0003Zq-C8 for openwrt-devel@bombadil.infradead.org; Sun, 18 Nov 2018 13:47:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zNScnXEVombrNz0+orze7Cq3V3CV5hTZNJBB3+y1KSQ=; b=W6RRF6KmmEqg0DWAslFKkFzMIr gFJAgCFf6DEZV2HbR6WAZum3SZ7qlFFvGeR5riURiyJYm7kCgiLRYLiAAkRJjSa21AOUeUD2PoXSE v6TTaKvGL52+W43xYpu5i8OTF2sj/gNk0W1OZaZESwL56RZgnlObQf0RAaCdA3RIHsRVwSmtyPNJX 4/NbbHh+qCx06BbM9ndQGxWsyMpO9eZJOzuRzRHdsi2uW7XMgPv+sFQW5twWZ7wvLGnGAcwknkweQ Th3p/LWlu6yqAjQ+FAur2C+lBW3C0I/5d5lxfjUKupJGZZP67qoHTabEm+6u1obv8pNO2QxPDycmH w+Mi9X9A==; Received: from [213.175.92.62] (helo=mail.pbx.lv) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gONQI-0008CI-EY for openwrt-devel@lists.openwrt.org; Sun, 18 Nov 2018 13:47:39 +0000 Received: from localhost.localdomain (unknown [213.175.92.61]) by mail.pbx.lv (MailSystem) with ESMTPSA id 86D591A57F6 for ; Sun, 18 Nov 2018 15:47:06 +0200 (EET) From: Roman Yeryomin To: OpenWrt Development List Date: Sun, 18 Nov 2018 15:46:58 +0200 Message-Id: <20181118134658.30447-1-roman@advem.lv> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181118_084738_617991_EDCD48E5 X-CRM114-Status: GOOD ( 10.64 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Subject: [OpenWrt-Devel] [PATCH] ramips: fix ethernet for f5d8235-v2 board 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: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Belkin F5D8235 v2 has two ethernet switches on board. One internal rt3052 and rtl8366rb on rgmii interface. Looks like internal switch settings were lost in translation to device tree infrastructure. Signed-off-by: Roman Yeryomin --- .../linux/ramips/base-files/etc/board.d/02_network | 2 +- target/linux/ramips/dts/F5D8235_V2.dts | 13 ++++++++++++- target/linux/ramips/image/rt305x.mk | 1 + 3 files changed, 14 insertions(+), 2 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 9e9ecbcb51..7a6b4c76b4 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -200,7 +200,6 @@ ramips_setup_interfaces() awm002-evb-8M|\ c20i|\ dir-645|\ - f5d8235-v2|\ gl-mt300a|\ gl-mt300n|\ gl-mt750|\ @@ -371,6 +370,7 @@ ramips_setup_interfaces() "0:lan" "2:lan" "6t@eth0" ;; f5d8235-v1|\ + f5d8235-v2|\ tew-714tru|\ v11st-fe|\ wzr-agl300nh) diff --git a/target/linux/ramips/dts/F5D8235_V2.dts b/target/linux/ramips/dts/F5D8235_V2.dts index a3a1255941..1a86557ca4 100644 --- a/target/linux/ramips/dts/F5D8235_V2.dts +++ b/target/linux/ramips/dts/F5D8235_V2.dts @@ -111,7 +111,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,group = "spi", "i2c", "jtag", "mdio", "uartf"; ralink,function = "gpio"; }; }; @@ -119,10 +119,21 @@ ðernet { mtd-mac-address = <&uboot 0x40004>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; }; &esw { + ralink,rgmii = <1>; mediatek,portmap = <0x3f>; + ralink,fct2 = <0x0002500c>; + /* + * ext phy base addr 31, rx/tx clock skew 0, + * turbo mii off, rgmi 3.3v off, port 5 polling off + * port5: enabled, gige, full-duplex, rx/tx-flow-control + * port6: enabled, gige, full-duplex, rx/tx-flow-control + */ + ralink,fpa2 = <0x1f003fff>; }; &wmac { diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 066cef23cb..cc743c609d 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -329,6 +329,7 @@ define Device/f5d8235-v2 DTS := F5D8235_V2 IMAGE_SIZE := 7744k DEVICE_TITLE := Belkin F5D8235 v2 + DEVICE_PACKAGES := kmod-switch-rtl8366rb endef TARGET_DEVICES += f5d8235-v2