From patchwork Sun Jul 22 05:39:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6347F17F7 for ; Sun, 22 Jul 2018 05:41:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5094C27816 for ; Sun, 22 Jul 2018 05:41:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43EEF2785D; Sun, 22 Jul 2018 05:41:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5DCC27816 for ; Sun, 22 Jul 2018 05:41:29 +0000 (UTC) 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:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XSYKg3ph8TO2Jn+TauUYWuiPAZXxpT1VrslYtmnY4pU=; b=KA9gvJIBtJAAwZMYVtJEJN1VMJ pnuJWirkLORNEOVtlAP4gMtjemJz3nsdEE8OBVeTpEsrQ1udzSE9a44ZWX5oSDPpg1AQbQwT2iZw7 ysYwodXm+MsIe9ur2Efmrh2LhmMUNTIXWah84HD/x/vcQUF+c7Cya6lKS3UN6THHmJC8D1gRy3pAQ Wnw/fx5YWKAmVV6VnctRbQp1rhOOVsBS5/3Y0GqC7C039DLHJ+441X09xQyVZUAvuZc6CUJs+FFXY FAuolcU7Ndqh55Z1Om9zJxBevOQGsjT7QSHazdHt9M+CcKdmHpXUEiLQSKVSz01Kn55cllrFxvFS8 UHIfhATg==; 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 1fh77V-00053a-RL; Sun, 22 Jul 2018 05:41:25 +0000 Received: from caracal.maple.relay.mailchannels.net ([23.83.214.30]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh77R-0004on-TB for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:41:23 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A124440E08; Sun, 22 Jul 2018 05:41:08 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.29.85]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id C958D40CBB; Sun, 22 Jul 2018 05:41:07 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:08 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Name-Lettuce: 46c065ad72169ab2_1532238068504_1533593292 X-MC-Loop-Signature: 1532238068504:2201644008 X-MC-Ingress-Time: 1532238068504 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 8014B9F536; Sun, 22 Jul 2018 05:41:00 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 1/5] dt-binding: dwmac-sun8i: add H6 compatible string (w/ A64 fallback) Date: Sun, 22 Jul 2018 13:39:51 +0800 Message-Id: <20180722053955.25266-2-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180721_224122_304250_819E5EE5 X-CRM114-Status: GOOD ( 14.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Allwinner H6 SoC features a Ethernet MAC that is similar to the one in A64. Add a compatible string for it with A64 fallback compatible string, in this case the A64 driver can be used. The "internal" PHY is not internal from the perspective of the H6 main die, instead it's on the co-packaged AC200 chip, and connected to the main die with RMII at the in-package Port A PIO bank. So from the SoC driver side it needs no special treatment. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/net/dwmac-sun8i.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt index 5bb3a18cc38d..54c66d0611cb 100644 --- a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -10,6 +10,7 @@ Required properties: "allwinner,sun8i-r40-gmac" "allwinner,sun8i-v3s-emac" "allwinner,sun50i-a64-emac" + "allwinner,sun50i-h6-emac", "allwinner-sun50i-a64-emac" - reg: address and length of the register for the device. - interrupts: interrupt for the device - interrupt-names: must be "macirq" From patchwork Sun Jul 22 05:39:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A889C112B for ; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 942B127816 for ; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87DBF2785D; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2F95927816 for ; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) 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:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mo5rJpBx3YCPNXmY6TcHNxjnJ0+ucx3sCgzXShqWJ00=; b=XCnHWDaDkWghl32X4O1mdVVxFU ahAICWacnalK6TE1m4sGkQTQo8q51cx2MlVU0M33/sGek1q0UDP57D0Z51jXjdmRb5Z2C6ivdjSWy WV7Kqd7Cd2tp35JctpOl8u5p/koFr2wNyxkKGyirjcZYJOLo763hT+0szoNQy8N7wAtI091BhMiTm DtMHcZnFFJVZ69lBlJn8OTw39DdasmYSK2ohKX4Yjn2a3Pk24yFmOXuKm56DuaOllb+MTWU2SIMYd GpavTQNt3nwEp6YZNPFAqQiaM5oiHGAF6Y8MZKaaP5sWw51Af5OuCbiM6lGbPk01mY2dOFzC0Wwt8 4ve0qmLA==; 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 1fh77r-0005PM-Fl; Sun, 22 Jul 2018 05:41:47 +0000 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh77b-0004xm-8V for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:41:35 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E94976814F4; Sun, 22 Jul 2018 05:41:19 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.19.68]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 2190268135D; Sun, 22 Jul 2018 05:41:19 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Bored-Oafish: 117b764a718531b3_1532238079810_52595868 X-MC-Loop-Signature: 1532238079810:2845225607 X-MC-Ingress-Time: 1532238079810 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id AE1769F536; Sun, 22 Jul 2018 05:41:11 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 2/5] dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C Date: Sun, 22 Jul 2018 13:39:52 +0800 Message-Id: <20180722053955.25266-3-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180721_224132_049121_C2BAED0A X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the system controller to work, like A64 DE2. As H6 and A64 system controller are quite similar, code is reused now, and the A64 fallback compatible string is added after the H6 compatible string. Signed-off-by: Icenowy Zheng --- Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt index c51ade86578c..6527a1a535a3 100644 --- a/Documentation/devicetree/bindings/sram/sunxi-sram.txt +++ b/Documentation/devicetree/bindings/sram/sunxi-sram.txt @@ -18,6 +18,7 @@ Required properties: - "allwinner,sun8i-h3-system-control" - "allwinner,sun50i-a64-sram-controller" (deprecated) - "allwinner,sun50i-a64-system-control" + - "allwinner,sun50i-h6-system-contorl", "allwinner,sun50i-a64-system-control" - reg : sram controller register offset + length SRAM nodes @@ -54,6 +55,9 @@ The valid sections compatible for H3 are: The valid sections compatible for A64 are: - allwinner,sun50i-a64-sram-c +The valid sections compatible for H6 are: + - allwinner,sun50i-h6-sram-c, allwinner,sun50i-a64-sram-c + Devices using SRAM sections --------------------------- From patchwork Sun Jul 22 05:39:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EC0017F7 for ; Sun, 22 Jul 2018 05:42:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A77827816 for ; Sun, 22 Jul 2018 05:42:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E7D42785D; Sun, 22 Jul 2018 05:42:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1411027816 for ; Sun, 22 Jul 2018 05:42:26 +0000 (UTC) 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:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BlDXNXxaEB9klPEIDHj6iHVgXa9rGsOpDgGoU/UJeac=; b=P2sHizHe85NwnCqWOs6SW/5LzL hPszyvPphTqS/rzKSNrjYYMbM5Ljg6a2hSG6PNGLLgpn00OPFPETnB9fiTJbcBmgDveGyRt/n6w3x NKbhqgS2nENGPd43JBZ0D1dHhXjO4b55gMEPDxv4eEcVQAsu20ZBlw1s/b/Cx+gknLHSvQxgMK2Kz 64JxO1ev+1hHofE8ptBpIrqjLUyQ3bdSGHDu6ZALitDseiHVcDPOh9+XniHZdgmnSBQkPk70Wg4V1 G5LFS60GpFiZ6heqtuYQrjs/hmOxfNIFoAi19mM+Du+pGKlTBYy68PurmWg9SeaFiaxWMVT7sD2fS 1IHUTIUg==; 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 1fh78M-0005uL-FA; Sun, 22 Jul 2018 05:42:18 +0000 Received: from glass.birch.relay.mailchannels.net ([23.83.209.70]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh77m-0005CU-Tt for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:41:54 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9C8F35E1313; Sun, 22 Jul 2018 05:41:31 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.29.85]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id C38295E1465; Sun, 22 Jul 2018 05:41:30 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:31 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Arithmetic-Relation: 654174fd0ee353d1_1532238091491_1392297549 X-MC-Loop-Signature: 1532238091491:3768529167 X-MC-Ingress-Time: 1532238091490 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id E15CE9F536; Sun, 22 Jul 2018 05:41:23 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 3/5] arm64: allwinner: h6: add system controller device tree node Date: Sun, 22 Jul 2018 13:39:53 +0800 Message-Id: <20180722053955.25266-4-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180721_224143_239193_3DB5887F X-CRM114-Status: GOOD ( 13.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As we have already binding for the H6 system controller, add its node to the device tree. Signed-off-by: Icenowy Zheng --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index cfa5fffcf62b..3ab6cf0256ca 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -92,6 +92,29 @@ #size-cells = <1>; ranges; + syscon: syscon@3000000 { + compatible = "allwinner.sun50i-h6-system-control", + "allwinner,sun50i-a64-system-control"; + reg = <0x03000000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram_c: sram@28000 { + compatible = "mmio-sram"; + reg = <0x00028000 0x1e000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x00028000 0x1e000>; + + de2_sram: sram-section@0 { + compatible = "allwinner,sun50i-h6-sram-c", + "allwinner,sun50i-a64-sram-c"; + reg = <0x0000 0x1e000>; + }; + }; + }; + ccu: clock@3001000 { compatible = "allwinner,sun50i-h6-ccu"; reg = <0x03001000 0x1000>; From patchwork Sun Jul 22 05:39:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 774CF17F7 for ; Sun, 22 Jul 2018 05:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6257027816 for ; Sun, 22 Jul 2018 05:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53D952785D; Sun, 22 Jul 2018 05:43:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0588F27816 for ; Sun, 22 Jul 2018 05:43:07 +0000 (UTC) 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:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=W4j5QQtv8eYPIiq/XesuVrQaKdU1pdUP4h60JtgZUYA=; b=ERziPPhpfQVC6Lce/uRHDGwgPX +bxhbW6iVnvveu0hCaDymd5P5mpqABz3n+e3RbSWcKhfWW0/Q4nggrIgZDhobHsTINQqy1Rha5WqK L6K+Fwg8edwdxkJ3WBknpdPxgoKVPwMkSe9DTQxLJjWtNYpm+UlPg9Fawl1Re5BJv61XsM/p8f1CY l+89Cq7vijbWUCR9SWidF40FfWHabbWie3MqJTmFdjmpQj3UQR/HHeQCAuXvzezc/tqw+nnyG16jl kBk9sVNovabDmfgO5cUAuEL/Lz450kns8SLWIoZ4PiMK2mHwJW42wZfpsrpDpQfDAxMiNREWtM9f9 01dZfU6w==; 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 1fh794-0006Hg-TX; Sun, 22 Jul 2018 05:43:02 +0000 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh77y-0005Nm-D6 for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:42:07 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 99FEE41277; Sun, 22 Jul 2018 05:41:43 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.29.85]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id C3ED241360; Sun, 22 Jul 2018 05:41:42 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Wide-Eyed-Desert: 3ebef0b46b22036c_1532238103481_1302291629 X-MC-Loop-Signature: 1532238103480:837841102 X-MC-Ingress-Time: 1532238103480 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 9D41C9F536; Sun, 22 Jul 2018 05:41:34 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 4/5] arm64: allwinner: h6: add EMAC device nodes Date: Sun, 22 Jul 2018 13:39:54 +0800 Message-Id: <20180722053955.25266-5-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180721_224155_055111_3244CC58 X-CRM114-Status: GOOD ( 14.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner H6 SoC has an EMAC like the one in A64. Add device tree nodes for the H6 DTSI file. Signed-off-by: Icenowy Zheng --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 3ab6cf0256ca..c65311de301a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -149,6 +149,14 @@ interrupt-controller; #interrupt-cells = <3>; + ext_rgmii_pins: rgmii_pins { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", + "PD5", "PD7", "PD8", "PD9", "PD10", + "PD11", "PD12", "PD13", "PD19", "PD20"; + function = "emac"; + drive-strength = <40>; + }; + mmc0_pins: mmc0-pins { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; @@ -258,6 +266,28 @@ status = "disabled"; }; + emac: ethernet@5020000 { + compatible = "allwinner,sun50i-a64-emac", + "allwinner,sun50i-h6-emac"; + syscon = <&syscon>; + reg = <0x05020000 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 { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + r_ccu: clock@7010000 { compatible = "allwinner,sun50i-h6-r-ccu"; reg = <0x07010000 0x400>; From patchwork Sun Jul 22 05:39:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 037E6112B for ; Sun, 22 Jul 2018 05:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB68F27165 for ; Sun, 22 Jul 2018 05:58:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF18327853; Sun, 22 Jul 2018 05:58:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BEC762793A for ; Sun, 22 Jul 2018 05:58:39 +0000 (UTC) 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:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0sRtyMJ2p29sSyunu9LX3RgAOiHf8vet4joI+37uRj8=; b=cNzB1csH0EHp3WO1cZiThuIy2+ W7IvqK56P+/GCVtTyR0y336k78j+eitjRqAifVCP2TlCt8d6mSNuqbb/W5sJeZOtcYx7XhHaJE5/O bzbP/xHR0GJuNky5gXFgLTVDAr0ae1pxN3WMeFOThpTwm3uaul2mlwHaRXQhaX0g70dpkrLRsOaKt 5elYi05WgSosrFqndTFY0emdF8irlTK5nL6/fBsELajdYWwPGfeT3sQQFSSQbMiAipK8zGAj4yooQ A87N2pwAvOUmcnQrXtzfCYgEam8qW2xlNs0yvlfdqQFxlBL9m6eq0jBU8Zs84+qV+JMtBhWjijqQV yHrsGJmw==; 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 1fh7O6-0002WE-Cq; Sun, 22 Jul 2018 05:58:34 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh7O4-0002UK-74 for linux-arm-kernel@bombadil.infradead.org; Sun, 22 Jul 2018 05:58:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DqPYQdgk+zHHml2dYiB+pWdnnRwUNTMfjLZBfiW2sIU=; b=O5oCjDitLTZ9lw2cbi2jjrYtW jr3fgCsLkE8wYW7vwny2OMh/o4QqBwIMtHAxl3xlVgJ7bMSNc/C9PIzNRtclmiFWYM9DjM9ms2B9h MZp6IfdwBxJlHF/6CpiMl+GBWLIB2ry15a226LPGnNjrpNdMsXdn5wJckDC4Wo4I5rNhPd06f8csy MFUAGlUAG7dk4CC/59jT4hhSwHhKsPtybIL50k41pVrkPEt9pwQlE7sFxLOaXwT34VW/de+siRyHk LPKXGoQv9uaFb19OQMhpKfI+hm7SQs0efi0o6v1qLBIrLyPNP1Y8h1VrZLXrHEx/jNdPvNz0Vs/rd DXMwKtWEg==; Received: from burlywood.maple.relay.mailchannels.net ([23.83.214.26]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh78C-0002P0-Md for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:42:10 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D3B3B28171B; Sun, 22 Jul 2018 05:41:54 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.26.113]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 0A0D5281611; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:54 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Cooing-Fumbling: 301973e409ed32dd_1532238114712_3352376183 X-MC-Loop-Signature: 1532238114712:1809162652 X-MC-Ingress-Time: 1532238114712 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 8B4369F536; Sun, 22 Jul 2018 05:41:46 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 5/5] arm64: allwinner: h6: add support for the Ethernet on Pine H64 Date: Sun, 22 Jul 2018 13:39:55 +0800 Message-Id: <20180722053955.25266-6-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180722_064208_962659_EBD3E597 X-CRM114-Status: GOOD ( 16.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Pine H64 board has an Ethernet port, which is connected to a RTL8211E PHY, then the PHY is connected to the MAC on H6 SoC. Add support for the Ethernet port. Signed-off-by: Icenowy Zheng --- .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts index ceffc40810ee..b168b3b8a9ad 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts @@ -14,6 +14,7 @@ compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; aliases { + ethernet0 = &emac; serial0 = &uart0; }; @@ -39,6 +40,34 @@ gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ }; }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <200>; + allwinner,tx-delay-ps = <200>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; }; &mmc0 {