From patchwork Wed May 2 16:39:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 907625 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=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EORNJpRn"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="D2QvyIjo"; 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 40bkbh1t7bz9ryk for ; Thu, 3 May 2018 02:42:56 +1000 (AEST) 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:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OCxuiRBMw7GqTeDDaUwNhVZfy2esSe+Ueto9Yskf73Q=; b=EORNJpRn0cpA2S 8vxVS38e8YqvNhtrbbbmZxc/g6ZoiLYkRLKQkGr1Hzp2ZRzhMCISFc/h4M+9BpZDshWoYbR33lnf4 LHCgs6MvrGWKcjb6HMXwALZBni/Ue68FuqKgvQ+m8uXNO0V0PMVxBBzPnVEPGCR1JDZwQy8nI8xrQ JzdSgZ9PML6NdNdwcZNR+nnbTVqqM2cJjFbfFSfOr6aMHMesHLVnq0Gb4KmLUMeTI5RuAuh7iWO/i VhmKLrpx32k/2YX9Pkfe7hKDlKEmeELc3nd/mkpNESY/xRQHfeEZpKRVpVqIaj1O0i+SV0jpW+j3i hebWxo/HKH8WRrFAYPVA==; 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 1fDuq6-0001YY-8v; Wed, 02 May 2018 16:42:46 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDupE-0000zb-1Y for lede-dev@lists.infradead.org; Wed, 02 May 2018 16:42:02 +0000 Received: by mail-lf0-x242.google.com with SMTP id m18-v6so21830346lfb.0 for ; Wed, 02 May 2018 09:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=4hTRB/jxnefBC5t1frjz+QZN3z6ClGmbnRxzOrVWKcU=; b=D2QvyIjonhMjHoGoH488kuf+rqh0Dl8kPt1Y9vCMOLHIgd05l+aNSHg3VJTUnfMR2K dFl/uMrpZXU6m6qSTnbRegifq8E/tvW00mPg6XjQe4MGGSZ70wHfgGb4I6D/TDfaOXff pv1VSbduQX7iAkHUIgK1laY/sm6RJSJLp6sjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4hTRB/jxnefBC5t1frjz+QZN3z6ClGmbnRxzOrVWKcU=; b=hTP1ZopH15/6vS2oy76EBCNOlvlaGSjDZgRICTT9oBvVRPHLmm57dundc26C7ueOBM WxqyqVjKPclGIuhoHTAPdDg9THtzXXH9nzal4zrgUMz0ArSo4sCj5ZN3OR5OKymPu2O6 Y7g4l/fKsWrOWY7sgyDIXiduuj8Z0wxNGtfdNpPueRaLV+iiokDv25/i0MbBnODjNa3g EzNTwcM8Cvo/PHOvO5DFdI8B7iQjmCOiwsvVtVYQuVDVLOR8hQNqItN5L3qa16H7eDuH 61jwv4gEFfopcK/y+NHsASpqmMp7CzUrssyfXoGbCga0+BhD2qjTC6YIQ5co+Jm/r/yQ Kp7Q== X-Gm-Message-State: ALQs6tB1RWt5b36iGKduc5FKm/MeSSH7GHFZ27YBIzu68bIyygTdjROg zxUJhNXl1IdgdwRLDhXsihb1Qw== X-Google-Smtp-Source: AB8JxZqaM4pWXKrY4f97DwIOnhIfuXaMjV1kd8+EtAxksYRa0AloQGWVRHxOaBaVW0AWrLPR8akikQ== X-Received: by 2002:a2e:9cc7:: with SMTP id g7-v6mr14585595ljj.141.1525279299951; Wed, 02 May 2018 09:41:39 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id r81-v6sm360410lja.36.2018.05.02.09.41.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 May 2018 09:41:38 -0700 (PDT) From: Linus Walleij To: Roman Yeryomin , Sebastian Luft , Hans Ulli Kroll , Hauke Mehrtens Date: Wed, 2 May 2018 18:39:35 +0200 Message-Id: <20180502163935.9231-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180502_094152_136380_9A46334C X-CRM114-Status: GOOD ( 18.47 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH] gemini: Add ethernet to DNS-313 and Wiliboard X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , Florian Fainelli , LEDE Development List , openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This adds an interrim patch for v4.14 based on an upstream commit to get ethernet working on D-Link DNS-313 (probably also on the Wiliboards) Signed-off-by: Linus Walleij --- ...-dts-Add-ethernet-to-a-bunch-of-platforms.patch | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 target/linux/gemini/patches-4.14/0034-ARM-dts-Add-ethernet-to-a-bunch-of-platforms.patch diff --git a/target/linux/gemini/patches-4.14/0034-ARM-dts-Add-ethernet-to-a-bunch-of-platforms.patch b/target/linux/gemini/patches-4.14/0034-ARM-dts-Add-ethernet-to-a-bunch-of-platforms.patch new file mode 100644 index 000000000000..4a511a28669a --- /dev/null +++ b/target/linux/gemini/patches-4.14/0034-ARM-dts-Add-ethernet-to-a-bunch-of-platforms.patch @@ -0,0 +1,123 @@ +From 6d5af7093aea4f18e040e73db2ad99aaa0c0f77e Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 19 Nov 2017 11:04:23 +0100 +Subject: [PATCH] ARM: dts: Add ethernet to a bunch of platforms + +These platforms have the PHY defined already so we just +need to add a single device node to each of them to activate +the ethernet device. + +The PHY skew/delay settings for pin control is known from a +few vendor trees and old OpenWRT patch sets. + +This is a modified version of upstream commit +95220046a62c00b5afb1aa7c1971989d427db977, +just dropping the NAS4220B changes. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini-dlink-dns-313.dts | 62 ++++++++++++++++++++++++++++++ + arch/arm/boot/dts/gemini-wbd222.dts | 7 ++++ + 2 files changed, 69 insertions(+) + +diff --git a/arch/arm/boot/dts/gemini-dlink-dns-313.dts b/arch/arm/boot/dts/gemini-dlink-dns-313.dts +index 685719a0b8c0..df46375457b6 100644 +--- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts ++++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts +@@ -215,6 +215,56 @@ + groups = "gpio1dgrp"; + }; + }; ++ pinctrl-gmii { ++ mux { ++ function = "gmii"; ++ groups = "gmii_gmac0_grp"; ++ }; ++ /* ++ * In the vendor Linux tree, these values are set for the C3 ++ * version of the SL3512 ASIC with the comment "benson suggest" ++ */ ++ conf0 { ++ pins = "R8 GMAC0 RXDV", "U11 GMAC1 RXDV"; ++ skew-delay = <0>; ++ }; ++ conf1 { ++ pins = "T8 GMAC0 RXC"; ++ skew-delay = <10>; ++ }; ++ conf2 { ++ pins = "T11 GMAC1 RXC"; ++ skew-delay = <15>; ++ }; ++ conf3 { ++ pins = "P8 GMAC0 TXEN", "V11 GMAC1 TXEN"; ++ skew-delay = <7>; ++ }; ++ conf4 { ++ pins = "V7 GMAC0 TXC", "P10 GMAC1 TXC"; ++ skew-delay = <10>; ++ }; ++ conf5 { ++ /* The data lines all have default skew */ ++ pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1", ++ "P9 GMAC0 RXD2", "R9 GMAC0 RXD3", ++ "R11 GMAC1 RXD0", "P11 GMAC1 RXD1", ++ "V12 GMAC1 RXD2", "U12 GMAC1 RXD3", ++ "R10 GMAC1 TXD0", "T10 GMAC1 TXD1", ++ "U10 GMAC1 TXD2", "V10 GMAC1 TXD3"; ++ skew-delay = <7>; ++ }; ++ conf6 { ++ pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1", ++ "R7 GMAC0 TXD2", "P7 GMAC0 TXD3"; ++ skew-delay = <5>; ++ }; ++ /* Set up drive strength on GMAC0 to 16 mA */ ++ conf7 { ++ groups = "gmii_gmac0_grp"; ++ drive-strength = <16>; ++ }; ++ }; + }; + }; + +@@ -235,6 +285,18 @@ + pinctrl-0 = <&gpio1_default_pins>; + }; + ++ ethernet@60000000 { ++ status = "okay"; ++ ++ ethernet-port@0 { ++ phy-mode = "rgmii"; ++ phy-handle = <&phy0>; ++ }; ++ ethernet-port@1 { ++ /* Not used in this platform */ ++ }; ++ }; ++ + ata@63000000 { + status = "okay"; + }; +diff --git a/arch/arm/boot/dts/gemini-wbd222.dts b/arch/arm/boot/dts/gemini-wbd222.dts +index 0678d3beb51d..820978d20166 100644 +--- a/arch/arm/boot/dts/gemini-wbd222.dts ++++ b/arch/arm/boot/dts/gemini-wbd222.dts +@@ -136,6 +136,13 @@ + "gpio0bgrp"; + }; + }; ++ pinctrl-gmii { ++ /* This platform use both the ethernet ports */ ++ mux { ++ function = "gmii"; ++ groups = "gmii_gmac0_grp", "gmii_gmac1_grp"; ++ }; ++ }; + }; + }; + +-- +2.14.3 +