From patchwork Wed Jul 11 19:47:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 942664 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=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="MPkDaeqg"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KOhykjOg"; 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 41QqR03Kt5z9s01 for ; Thu, 12 Jul 2018 05:49:48 +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=n6r+jmCcW5fHFDYdD9Ijj5yXMMHfp82ujAYJGNriuv8=; b=MPkDaeqgLrRk0l RrG1YbsP/4FGdWMo+LsNqUzVKp5gSo6TBGkvpn4KO4I05azM5y8+lH2Ugg8ejYr34XcCXsiZVOVtm BYhYMS3i6DjtPxei7rFO0+esFATUW9VQYgaXPLferev6N3Nqgd9l6vSOUoHU+Uej+/gn3EI0x/oT0 tjrOYeRuKi78kHOw9+q4rdSaY/1fV/YDCdX0JZCx4QHlwPF0nMSGJgpIcNXf+hEZlJbJ1B5Dctg/6 w9ze+8tBxQAt8BgscPpNoMm8lzHuI5A3gbZR0ffd90AqT733EIzHjxqFYO5EDOT/tQfZ43eNVPO1z A+yiT507+ETco+WBIfnA==; 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 1fdL7N-0004lQ-U0; Wed, 11 Jul 2018 19:49:41 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdL7L-0004jh-Jh for openwrt-devel@lists.openwrt.org; Wed, 11 Jul 2018 19:49:41 +0000 Received: by mail-lf0-x241.google.com with SMTP id n96-v6so22229292lfi.1 for ; Wed, 11 Jul 2018 12:49:29 -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=Ods3Hg65hAgUocLPL/PRdxDt+EQAOJ6aJx6rbgnnj7E=; b=KOhykjOgsGnN22n6Bytei6PNOWfGhkp4f8Ctc7tyB5J66x51An4mSDEd6mVl5obKZu EWs7tnt+R4fcel5q69ObwIQBzpCu2QdBlOsT8wVMtx+j1A46L+NfcgydGwlpK4BKpH6s QyNvnXJrF4ULkljgMzzd9e8CnGJc621Qi7SWY= 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=Ods3Hg65hAgUocLPL/PRdxDt+EQAOJ6aJx6rbgnnj7E=; b=KSsWfpdZJ+xeyHsN8n1+b+50fMY3w/659Q2PwLMI1oqhXlSASugD4WpVJ44IU7BgCX 9ucXvBqBR1epLOwzTEWGfWRCmGuwlT0THdoo9ujXN49krOubqwmre5meRGFAspx/XBjw Bj12uVmGDUD1wqyJyq0ZomFYjKVdfwwdB/Oftnm4DlvqP79m/ESa2XxYdJgiXlqMPJpo KOhPo/7AImcnxY2hK2C6j5FRFXaVp2gMQhZpNekDh4bnU9xJ6oXv78c8xkl168vvVAPo 33lYS3NBp8QYxeAL5vP+4PNy4f4CNbZoShrevY1djVTcjrPqfH502ZbJuMccWSA9PHcZ cUyQ== X-Gm-Message-State: AOUpUlF8Ru2GrFoQRPmdUndZNfS/H1EWRWPU1YF9vcQ65QoO6dwbs30L z7xZ9WLhAlEi93Sabb/sHB53RQ== X-Google-Smtp-Source: AAOMgpchkdPe9dvXGqc75WQD+o8KPr9lR551kOpZAmmYLK29Z//72CnzmPBQKIyzCBVMs2SYF4JLaQ== X-Received: by 2002:a19:238d:: with SMTP id j135-v6mr19323lfj.58.1531338567499; Wed, 11 Jul 2018 12:49:27 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id r73-v6sm3277612lfi.34.2018.07.11.12.49.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 12:49:26 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli Date: Wed, 11 Jul 2018 21:47:18 +0200 Message-Id: <20180711194720.25266-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180711_124939_650494_9B85BA16 X-CRM114-Status: GOOD ( 13.73 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4010:c07:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port to the SQ201 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: Andrew Lunn , Linus Walleij , LEDE Development List MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This sets up the ethernet interface and PHY for the WAN ethernet port which uses a Marvell PHY. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - No changes, just resending. ChangeLog v1->v2: - Rename wrongly named "ethernet-phy" to "mdio" - Drop device_type from the ethernet phy --- arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts index 7658e212e6d2..cc693e64faaf 100644 --- a/arch/arm/boot/dts/gemini-sq201.dts +++ b/arch/arm/boot/dts/gemini-sq201.dts @@ -55,6 +55,21 @@ }; }; + mdio0: ethernet-phy { + compatible = "virtual,mdio-gpio"; + /* Uses MDC and MDIO */ + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ + <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ + #address-cells = <1>; + #size-cells = <0>; + + /* This is a Marvell 88E1111 ethernet transciever */ + phy0: ethernet-phy@1 { + reg = <1>; + device_type = "ethernet-phy"; + }; + }; + soc { flash@30000000 { /* @@ -108,6 +123,7 @@ /* * gpio0fgrp cover line 18 used by reset button * gpio0ggrp cover line 20 used by info LED + * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY * gpio0kgrp cover line 31 used by USB LED */ gpio0_default_pins: pinctrl-gpio0 { @@ -115,9 +131,66 @@ function = "gpio0"; groups = "gpio0fgrp", "gpio0ggrp", + "gpio0hgrp", "gpio0kgrp"; }; }; + pinctrl-gmii { + mux { + function = "gmii"; + groups = "gmii_gmac0_grp", "gmii_gmac1_grp"; + }; + /* Settings come from memory dump in PLATO */ + conf0 { + pins = "V8 GMAC0 RXDV"; + skew-delay = <0>; + }; + conf1 { + pins = "Y7 GMAC0 RXC"; + skew-delay = <15>; + }; + conf2 { + pins = "T8 GMAC0 TXEN"; + skew-delay = <7>; + }; + conf3 { + pins = "U8 GMAC0 TXC"; + skew-delay = <10>; + }; + conf4 { + pins = "T10 GMAC1 RXDV"; + skew-delay = <7>; + }; + conf5 { + pins = "Y11 GMAC1 RXC"; + skew-delay = <8>; + }; + conf6 { + pins = "W11 GMAC1 TXEN"; + skew-delay = <7>; + }; + conf7 { + pins = "V11 GMAC1 TXC"; + skew-delay = <5>; + }; + conf8 { + /* The data lines all have default skew */ + pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1", + "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3", + "T7 GMAC0 TXD0", "U6 GMAC0 TXD1", + "V7 GMAC0 TXD2", "U7 GMAC0 TXD3", + "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1", + "T11 GMAC1 RXD2", "W12 GMAC1 RXD3", + "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1", + "W10 GMAC1 TXD2", "T9 GMAC1 TXD3"; + skew-delay = <7>; + }; + /* Set up drive strength on GMAC0 and GMAC1 to 16 mA */ + conf9 { + groups = "gmii_gmac0_grp", "gmii_gmac1_grp"; + drive-strength = <16>; + }; + }; }; }; @@ -154,6 +227,18 @@ <0x6000 0 0 4 &pci_intc 2>; }; + ethernet@60000000 { + status = "okay"; + + ethernet-port@0 { + phy-mode = "rgmii"; + phy-handle = <&phy0>; + }; + ethernet-port@1 { + /* Used for the Vitesse G5 chip, add later */ + }; + }; + ata@63000000 { status = "okay"; };