From patchwork Tue Oct 31 08:19:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 117528 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3598583qgn; Tue, 31 Oct 2017 01:24:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QGUgljJ5SC0+GPzT/YwMAcs98aLS4nQmT1v/36cLBiDq8hJr2RV6Ohw+HhU8+R42o6D0JI X-Received: by 10.159.245.142 with SMTP id a14mr1160334pls.394.1509438263894; Tue, 31 Oct 2017 01:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509438263; cv=none; d=google.com; s=arc-20160816; b=UOXcFXZNr2CFG6t2crXA+MdEgie0O/VHhul9OJ4othYAnfy/7yx7qud9/FvtcoyIb8 A9Nyd4j9uUG++OxrkFS4mQtGeStzkqhKT4NeQU3L+2/9JFUDl6SYCP5XuvOvxSrUI1m1 whoBbKXXzhcbqJz7QJRQFaCp5/CttOSwqHwbE8xw3nlmpoqvUeQYvW3XPx12bowGdP78 Mug9gyaV69tmIthp4CBAn65n1CH0l61VPE9GJcBKyApgAkWcFSIX0M4GSFA8tZKJub6y 0+27P4qvnipoPDfvrY/I4juYxR85Kjpu40vx1s7NmmS+Vk8cp/XUGbpOpaa20cO4lJxn FLOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=zrRm+dXQsnZp5wuSiAmuf1xWu93MJtd2LDhcgfPSfqc=; b=UcpMsIepUNtk3HiV4QIMMipbZ/N4X9Kq9fex4U2oqUp8ACeaaaQEC5Bt5TV9Dk0Gx9 akoP36qwI6HdatkwUdXt99iCxArKCLZK/ghi5H27Ka0ZjF+EMli48LPTChMm/ZyvVRhV jZJkLQSOBLbIH6oXeszjGPqi23H1bjpo3mlK9pr67F8+xGcdt8ZJvSIdn7fQ/wO+XAFt G9cbHejZbGM4EGZ6AzTrvR8g3D+IQRy/XAlCppXtuik6e82BTl42X2mAnJ/yDl5gREGv dqaNBouRi1oBn0D8SF68ylFlgRXnNeAob+XAUK0EOf4Dc2wQoJX75LGsnRwejjm0T6QO 0TpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BsLDsMaq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si1048267pfi.439.2017.10.31.01.24.23; Tue, 31 Oct 2017 01:24:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BsLDsMaq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753337AbdJaIYV (ORCPT + 27 others); Tue, 31 Oct 2017 04:24:21 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:45798 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbdJaIV3 (ORCPT ); Tue, 31 Oct 2017 04:21:29 -0400 Received: by mail-wm0-f65.google.com with SMTP id y80so13749282wmd.0; Tue, 31 Oct 2017 01:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zrRm+dXQsnZp5wuSiAmuf1xWu93MJtd2LDhcgfPSfqc=; b=BsLDsMaqXXBRwfuLj7lJtSuL32mDpw6ifdCGbGQQL/RiMEXE6t7mvDJ4/yjuKT5P0y cAkOLWah67t9J3s6iY+GR2uR+ypWA950jwJPFnkENCo5+zUHw4PvMr6R8L26t7F/M5f9 KM6YumS3F8OtPJj7UlytKmbgBN6zFrq2/CpupFYBq8ieoO/37hJLzngnBRayTtU+ItRK mDnfnxYU0q+ezK5BS0LnY0xmLiLbCeCJkhpJyhnn25KZ5kclskPcg0r5RAm8PNveCPmH 5TkgTAIKVFieCr9Z1KD9AhJ+cnDKFTz8E+d7uQC+C0Xb3kKIihzuXfvoxVWKYLBgwxNu Fp5w== 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:in-reply-to :references; bh=zrRm+dXQsnZp5wuSiAmuf1xWu93MJtd2LDhcgfPSfqc=; b=D0K4Qjug/lNp+52FktM7+rslm7eyJIwiygHALo2m11fg0xAPB8VOPyxQqFJ7fvRQFN ghNUw50t65o1OjfF6iFgg9jPz/wVdN/ev1Jo0vbruiLkxuuKKvAJ5nsT3qqj9IEDhpLs sG3GjHEWp10xroukAjJiLzRgkC7HgknTkoCKvsnFwMB/68JgE/48zEtOkwvO+TMfIkaM YZIetfuI9/EwPpr3lALb6hubF9dx5JMJ/1KPt6pCsOjValB3CSmqc9i6BkXztxx02eRG 720pcMvS5jfjuOh+1UtV+wOYGVsuaVkyaMGnf2BdjyGVzTyGOoE4SbURVNwsxz2k8olw Hmow== X-Gm-Message-State: AMCzsaUvqjth6cEoMpxFnmnql2FpscQV14MD7xcIc/QzwHAP/OqMeZXm JxnhNwQHPrPtKOz0prNsRsU= X-Received: by 10.28.91.65 with SMTP id p62mr985127wmb.126.1509438087829; Tue, 31 Oct 2017 01:21:27 -0700 (PDT) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id d18sm796423wra.50.2017.10.31.01.21.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Oct 2017 01:21:27 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v10 6/8] arm64: dts: allwinner: A64: Restore EMAC changes Date: Tue, 31 Oct 2017 09:19:13 +0100 Message-Id: <20171031081915.18960-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031081915.18960-1-clabbe.montjoie@gmail.com> References: <20171031081915.18960-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore arm64 DT about dwmac-sun8i for A64 This reverts commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli --- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 ++++++++++++++++ .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 15 +++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 17 +++++++++++++++++ .../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++++++++++++ 5 files changed, 84 insertions(+) -- 2.13.6 diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index d347f52e27f6..45bdbfb96126 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -51,6 +51,7 @@ compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64"; aliases { + ethernet0 = &emac; serial0 = &uart0; serial1 = &uart1; }; @@ -69,6 +70,14 @@ status = "okay"; }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; +}; + &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; @@ -79,6 +88,13 @@ bias-pull-up; }; +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts index f82ccf332c0f..24f1aac366d6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts @@ -48,3 +48,18 @@ /* TODO: Camera, touchscreen, etc. */ }; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index d06e34b5d192..806442d3e846 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -51,6 +51,7 @@ compatible = "pine64,pine64", "allwinner,sun50i-a64"; aliases { + ethernet0 = &emac; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; @@ -71,6 +72,15 @@ status = "okay"; }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rmii_pins>; + phy-mode = "rmii"; + phy-handle = <&ext_rmii_phy1>; + status = "okay"; + +}; + &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; @@ -81,6 +91,13 @@ bias-pull-up; }; +&mdio { + ext_rmii_phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index 17ccc12b58df..0eb2acedf8c3 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -53,6 +53,7 @@ "allwinner,sun50i-a64"; aliases { + ethernet0 = &emac; serial0 = &uart0; }; @@ -76,6 +77,21 @@ status = "okay"; }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 905af406dbd3..0650a1cda107 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -517,6 +517,26 @@ #size-cells = <0>; }; + emac: ethernet@1c30000 { + compatible = "allwinner,sun50i-a64-emac"; + syscon = <&syscon>; + reg = <0x01c30000 0x10000>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu RST_BUS_EMAC>; + reset-names = "stmmaceth"; + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + gic: interrupt-controller@1c81000 { compatible = "arm,gic-400"; reg = <0x01c81000 0x1000>,