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: 907624 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 (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; 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 arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40bkZN1S62z9s02 for ; Thu, 3 May 2018 02:41:48 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 25A71B91089; Wed, 2 May 2018 18:41:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Wed, 2 May 2018 18:41:44 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E88FFB800CF for ; Wed, 2 May 2018 18:41:41 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .linaro. - helo: .mail-lf0-f66.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 2 May 2018 18:41:40 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id h197-v6so21772816lfg.11 for ; Wed, 02 May 2018 09:41:40 -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=LXhgbGFdD+KQLDKkFCzpF9hmoxZpaYsShLyESEWTHoaups6FroAh1UaJzADohC6ar/ XoEunG0T/beHcRVgg1ZcVNcrl5TinBJUM5Qsxw9mhY7hasjTV6ymtzipdauV0oG0yYTF q2PoNXKtTnnkrD1NSJSj9LIBIuhuEX8XZveb5NnN3slQo8m76f29eFs25r3pqAEFxWxi RiCIKhg55HaWMwfGG7UfXldzeUlfJ/6ZT/TPd6Fb/Pq6+Su43NHRWLggmNMlKuSQJNJP vOOHG2QI1IT3DyBRiZUDnLFj+EUytDNK8k9yCubBGzcYEhyeG49L2+r0akJ+iv6gSk9b xjzQ== X-Gm-Message-State: ALQs6tARVbgbGcaXest2zQYYJVxMc8W/I/RJ0AOcqEOcZm77W2G2xK9V 37vlxS7lTYpzQuz9+wRjzArqEQ== 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 Subject: [OpenWrt-Devel] [PATCH] gemini: Add ethernet to DNS-313 and Wiliboard X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LEDE Development List , openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 +