From patchwork Fri Feb 2 18:04: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: 10197767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4BDE160362 for ; Fri, 2 Feb 2018 18:06:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B76328F31 for ; Fri, 2 Feb 2018 18:06:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3040428F33; Fri, 2 Feb 2018 18:06:13 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 AAEA328F31 for ; Fri, 2 Feb 2018 18:06:12 +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=ix9SlLpLBA5FbctOQ5XSERQJ2hvxnt0K5zudXIzf3L4=; b=VUjGOSZKB91bD4vjLqDMWxscnd cnaFGQxK2XUV19uuW7lNN2wEljNbwQiYCv+ghlcYYYUZKM2rTRKFAOWkO9SfjFCWLrBU4eq5MtsfW 3MROCWzq/9rglA1jV3kfr+6OOY8xgP/UqijL6j2d0wWVrEg4xjocjLrKOM/wif0c4e0nBZmynJZZR 5VZZKTHf89yKlRA/U7/GeBag7h+jNn6543OY/lGZ3wkT5tUNZ0I6/UU/SYx4pBBfWHHYkHZI6I/VV BM0nBlZ+SzDznq7RFD1DZReECwnevFIlbL8+u3BKFDnfiuLFgOLBPCZhv2XKoV9TxcVYA/m2xDcQ0 WVFvDO/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ehfiz-0002Ar-0w; Fri, 02 Feb 2018 18:06:09 +0000 Received: from caracal.maple.relay.mailchannels.net ([23.83.214.30]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ehfim-0001tT-P3 for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2018 18:05:58 +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 350A6562405; Fri, 2 Feb 2018 18:05:54 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.14.37]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id AA8DB5608D5; Fri, 2 Feb 2018 18:05:50 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.36.240]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.13.1); Fri, 02 Feb 2018 18:05:54 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Tart-Imminent: 0dcd82ed52afaf4e_1517594751454_1510567565 X-MC-Loop-Signature: 1517594751454:3815046735 X-MC-Ingress-Time: 1517594751453 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id EAB4756823; Fri, 2 Feb 2018 18:05:45 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Giuseppe Cavallaro , Corentin Labbe , "David S . Miller" Subject: [PATCH 2/3] ARM: sun8i: v3s: add V3s EMAC device tree node Date: Sat, 3 Feb 2018 02:04:55 +0800 Message-Id: <20180202180456.60378-3-icenowy@aosc.io> In-Reply-To: <20180202180456.60378-1-icenowy@aosc.io> References: <20180202180456.60378-1-icenowy@aosc.io> 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 V3/V3s EMAC is just similar to the one in H3 SoC, but as the package of V3s is pin-limited, the external MII/MDIO bus is not wired out. Add V3s EMAC device tree node. As V3s is only capable of using the internal PHY, it's hardcoded in the V3s DTSI file. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-v3s.dtsi | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index 443b083c6adc..4d49a8b22a1c 100644 --- a/arch/arm/boot/dts/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi @@ -141,6 +141,12 @@ }; }; + syscon: syscon@1c00000 { + compatible = "allwinner,sun8i-v3-system-controller", + "syscon"; + reg = <0x01c00000 0x1000>; + }; + tcon0: lcd-controller@1c0c000 { compatible = "allwinner,sun8i-v3s-tcon"; reg = <0x01c0c000 0x1000>; @@ -402,6 +408,55 @@ #size-cells = <0>; }; + emac: ethernet@1c30000 { + compatible = "allwinner,sun8i-v3-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"; + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + }; + + mdio-mux { + compatible = "allwinner,sun8i-v3-mdio-mux", + "allwinner,sun8i-h3-mdio-mux"; + #address-cells = <1>; + #size-cells = <0>; + + mdio-parent-bus = <&mdio>; + + internal_mdio: mdio@1 { + compatible = "allwinner,sun8i-v3-mdio-internal", + "allwinner,sun8i-h3-mdio-internal"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + int_mii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + }; + }; + + /* V3s has no external MDIO bus, but V3 has it */ + }; + }; + spi0: spi@1c68000 { compatible = "allwinner,sun8i-h3-spi"; reg = <0x01c68000 0x1000>;