From patchwork Tue Oct 31 08:19:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10033697 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 046A460327 for ; Tue, 31 Oct 2017 08:22:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4D4E28614 for ; Tue, 31 Oct 2017 08:22:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8FA2289A8; Tue, 31 Oct 2017 08:22: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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, 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 8584728614 for ; Tue, 31 Oct 2017 08:22: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=olQ0tiVIJG4Qiq9V4azs2iLJnVpFcCn43+uPeryoLPc=; b=kW1FXaNT8G9DQu+oiKRGDTWZSI eIHqIFTy7zgXEcycQaI2td7n1N+ZmvcqMNUUAJYzK7m+izOp7qC545IF5A8mBfKeVT2iBCnT9HkP8 9FESbyLBxgVEUdpVrwPTh3pM9uhFyJogDlRnjzzoQmUAlBityzNtAlTemTRul1vDWY+FE7oI+VUEU 7su8o9q8MICbN+kvq++c9HamAOCKw4pStD/jLotITGLJHmfTo5z1kWa3rvQnXUl/P43ZErlbK2amX G8Xhf+vvavlh9hvZ4v8rNF/rMGXfmpcIcMMjekRGuF5xA19sMjyAV/Rt0x3ujd/ZTe1bOhFwahw2K i5WCswQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e9RoS-0002fE-RF; Tue, 31 Oct 2017 08:22:20 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e9Rnt-0002HI-RN for linux-arm-kernel@lists.infradead.org; Tue, 31 Oct 2017 08:21:47 +0000 Received: by mail-wm0-x244.google.com with SMTP id r196so20658468wmf.2 for ; Tue, 31 Oct 2017 01:21:24 -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=qBJvp3ysSQ91g66HKGMhbDJjoVj13sTs4Z0/CMDaW78=; b=LtIUk2YeqPLBR2AOuxbWXR5ruPGeP0G1LHNbv2nIwU3lDuJNQ3fPSbKUVR10Fcg90Y impicmBl5SclkDMOl1yaJHUvbKkzQTTyYCbrbN9AHHI92dqUdE6DYztk8ECvTqR3rt1m ZhykkQpf7CK633FIQvfiWvetKjG5/caOzfU75toBR68+9RNHAjrMrcjshMD7BL3C5dV6 0urCUq81gkTgYxikeRIMzIvLIQ+3nT+XQfjIbrai7vLFqJ03ICZeArQLmg63SkLQxo2r nfTpo3bND+70mxvWVO/8tCXzGTeYlnBX14PuIST0CNwBGAEWnhVuPemHs4bBsRocU/ko wW2A== 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=qBJvp3ysSQ91g66HKGMhbDJjoVj13sTs4Z0/CMDaW78=; b=LkVU71u3ip1WvEjezHNfNP/NN3Ofcymzyk0N1vOV8p4tXficecPDfMtpLOgHEt34r5 Fff4Yiw3S+Zo6GLswvXlQFo0uY7sQ52Rc4ow+tH8Fk4DLNubmPPLvqGF8Deeso1go3df p4XAiwGnpOSFiHNpYN4wZW1N11WRa2Wmj8iPQof9wwm/xSqRkIIUcY0x+IaCZPYlqj8N SGV9S3TF/OyCuNxBM4HZs5yEEaV29t32ScfRJx4iXPxsE8dFVztdbsRRfdE48NsicIKu HdnYsjc0HVc0IO77ITfjzp3fTRA5sr1iWoMExc76OMqRgVGl8KJsrejzwh+sd69H9qYc Dv8Q== X-Gm-Message-State: AMCzsaWXiFvfVMoujNJusycCNxJXrCDD+1AepnfADhhwWJkkvh2GvAVU hMhRM3lJzUboiPemTKhMygNasDda X-Google-Smtp-Source: ABhQp+RZlq1pNju/vwwufnFvWtr21WHhTCCzJ8gkTAes79+jGf5YtzuvnfUS0DW2OOivTGwLAyMuHA== X-Received: by 10.28.206.142 with SMTP id e136mr1205841wmg.27.1509438082833; Tue, 31 Oct 2017 01:21:22 -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.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Oct 2017 01:21:22 -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 Subject: [PATCH v10 1/8] dt-bindings: net: Restore sun8i dwmac binding Date: Tue, 31 Oct 2017 09:19:08 +0100 Message-Id: <20171031081915.18960-2-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171031_012146_038565_3F2ABDE9 X-CRM114-Status: GOOD ( 13.32 ) 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: netdev@vger.kernel.org, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org 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 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 dt-bindings documentation about dwmac-sun8i This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe Acked-by: Rob Herring Acked-by: Florian Fainelli --- .../devicetree/bindings/net/dwmac-sun8i.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dwmac-sun8i.txt diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt new file mode 100644 index 000000000000..725f3b187886 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -0,0 +1,84 @@ +* Allwinner sun8i GMAC ethernet controller + +This device is a platform glue layer for stmmac. +Please see stmmac.txt for the other unchanged properties. + +Required properties: +- compatible: should be one of the following string: + "allwinner,sun8i-a83t-emac" + "allwinner,sun8i-h3-emac" + "allwinner,sun8i-v3s-emac" + "allwinner,sun50i-a64-emac" +- reg: address and length of the register for the device. +- interrupts: interrupt for the device +- interrupt-names: should be "macirq" +- clocks: A phandle to the reference clock for this device +- clock-names: should be "stmmaceth" +- resets: A phandle to the reset control for this device +- reset-names: should be "stmmaceth" +- phy-mode: See ethernet.txt +- phy-handle: See ethernet.txt +- #address-cells: shall be 1 +- #size-cells: shall be 0 +- syscon: A phandle to the syscon of the SoC with one of the following + compatible string: + - allwinner,sun8i-h3-system-controller + - allwinner,sun8i-v3s-system-controller + - allwinner,sun50i-a64-system-controller + - allwinner,sun8i-a83t-system-controller + +Optional properties: +- allwinner,tx-delay-ps: TX clock delay chain value in ps. Range value is 0-700. Default is 0) +- allwinner,rx-delay-ps: RX clock delay chain value in ps. Range value is 0-3100. Default is 0) +Both delay properties need to be a multiple of 100. They control the delay for +external PHY. + +Optional properties for the following compatibles: + - "allwinner,sun8i-h3-emac", + - "allwinner,sun8i-v3s-emac": +- allwinner,leds-active-low: EPHY LEDs are active low + +Required child node of emac: +- mdio bus node: should be named mdio + +Required properties of the mdio node: +- #address-cells: shall be 1 +- #size-cells: shall be 0 + +The device node referenced by "phy" or "phy-handle" should be a child node +of the mdio node. See phy.txt for the generic PHY bindings. + +Required properties of the phy node with the following compatibles: + - "allwinner,sun8i-h3-emac", + - "allwinner,sun8i-v3s-emac": +- clocks: a phandle to the reference clock for the EPHY +- resets: a phandle to the reset control for the EPHY + +Example: + +emac: ethernet@1c0b000 { + compatible = "allwinner,sun8i-h3-emac"; + syscon = <&syscon>; + reg = <0x01c0b000 0x104>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu RST_BUS_EMAC>; + reset-names = "stmmaceth"; + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + #address-cells = <1>; + #size-cells = <0>; + + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + allwinner,leds-active-low; + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + int_mii_phy: ethernet-phy@1 { + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + }; + }; +};