From patchwork Mon Apr 3 09:14:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9659063 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 D47F260352 for ; Mon, 3 Apr 2017 09:18:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C577228437 for ; Mon, 3 Apr 2017 09:18:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA4C6284BC; Mon, 3 Apr 2017 09:18:31 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM 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 6AE3628437 for ; Mon, 3 Apr 2017 09:18:31 +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=Vj+A4gV8tHwotalKnxIpQ88hNUT/Rwy9641hvjhgQUo=; b=qLnBph8DUnvMLxBSqpVzyjZaXo 0tICDxvw9GH9os4IPmJepAyOipAdxWdaF398WhtWDKt3TvT7Y8NWqZc9q1zH8P1k5TPChvbzAIGYq sZRwutAlAEYmm6pI8kGLQDU7+HpJnlDOuL49Ti64/2jVf191mcDF1O+WbY2esa7ry5bz0bLU7JZtt 1O1mnYqBZwdkp1pqFjvux9ipvtHmYUiah4qZcaiNQjsVWTvYHrFGycsczdgK3+aUxD4MdFXLlFuIa GINO+uHs7OIXcnrjJphXwhCldIIlRW4lGHN8ufm8TxcpJMGg7wG/qhi02FH2bbQCO1VH5WkfN6fPO BCPMsfIA==; 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 1cuy82-0004FW-Qd; Mon, 03 Apr 2017 09:18:26 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cuy79-000311-HF for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2017 09:17:34 +0000 Received: by mail-wr0-x244.google.com with SMTP id p52so31746769wrc.2 for ; Mon, 03 Apr 2017 02:17:12 -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=E75U+N1/mxnJt74HMiEsoarpBPblb48nMVxYPGxPnj0=; b=moafpiMMO6syJDg1WkpWo87PuVNJWvc/QH54oECGEadt8zMN5ZoMZH32XP4yCVNpTw t03mDpSDFMmWuUWmlQyk9lMdlH8/0wm9/S0jTJMKZPz/TaR5dKX+F1M5aaDnvJr3NeVg AASe9CXicmf24s5REL1OaC/5MK88Cf78fWvFA6hUe/D9ODwjtrSNmbhliHsgmmjYr4kk pH1w3VoOr6xvISq072pMdfji6Rq0crnPFsPaC+ZYR93beyb+OqLMcAcPsEYQzg4G0stm 5Nk1SnrYFss4JLSYQDaOjOl4zecLkL0l75H7huAGlZyho2jIVnLyeqWGGaUp7hIAef6a 9DlA== 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=E75U+N1/mxnJt74HMiEsoarpBPblb48nMVxYPGxPnj0=; b=KGRkJYI7JcOR/qPRY4KBMy8X4psBqrGDlIAeQycbgfiMYGwOo2s6LVEMigjXv14jQV RKuYV8AtIugERPm9jTftuOCQ5htunHC386KhOiFNwCWjBmZQFp4WTKNJRIPJx8kTbhOp 51Yzo2wYO0MvBdCHdWEXCwc/s49sS2YJReBei1Iw+zy1gpJVF7oGoTdFKu2EukG23eF0 C7mDHCZ3NESSRnJOieijjRg3s/UgrCWDDuoVWHbAoYBT40EgCuDvZ4+eXVP92ivnXIlb 4/hAVF44bHRWOFSSmNF4Cn4nqWn3gUYTXsR0+0lsEZSKgpDedaPEwpD+aoqX7DPssrDr yAWg== X-Gm-Message-State: AFeK/H0QT+kgfuz4iAt/4dIDssF0ib+SpqkjpvwfaWo5lKltqsshv5+xu5rK2Ck+m43Wow== X-Received: by 10.28.194.7 with SMTP id s7mr8699708wmf.34.1491211030888; Mon, 03 Apr 2017 02:17:10 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id v14sm13457558wmv.24.2017.04.03.02.17.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:17:10 -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, peppe.cavallaro@st.com, alexandre.torgue@st.com Subject: [PATCH v3 03/20] dt-bindings: net: Add DT bindings documentation for Allwinner dwmac-sun8i Date: Mon, 3 Apr 2017 11:14:27 +0200 Message-Id: <20170403091444.29876-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170403091444.29876-1-clabbe.montjoie@gmail.com> References: <20170403091444.29876-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170403_021731_837502_4A009EAE X-CRM114-Status: GOOD ( 13.50 ) 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, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@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 This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe Acked-by: Rob Herring --- .../devicetree/bindings/net/dwmac-sun8i.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 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 0000000..f01ef17 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -0,0 +1,77 @@ +* 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,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-a64-system-controller + - allwinner,sun8i-a83t-system-controller + +Optional properties: +- allwinner,tx-delay: TX clock delay chain value. Range value is 0-0x07. Default is 0) +- allwinner,rx-delay: RX clock delay chain value. Range value is 0-0x1F. Default is 0) +Both delay properties are in 0.1ns step. + +Optional properties for "allwinner,sun8i-h3-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 "allwinner,sun8i-h3-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 = <&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>; + }; + }; +};