From patchwork Fri Nov 16 09:18:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?QmlhbyBIdWFuZyAo6buE5b2qKQ==?= X-Patchwork-Id: 10685729 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 AFAA4109C for ; Fri, 16 Nov 2018 09:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EB702D1DA for ; Fri, 16 Nov 2018 09:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92E482D1DF; Fri, 16 Nov 2018 09:19:23 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=unavailable 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 314A82D1DA for ; Fri, 16 Nov 2018 09:19:23 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=ingSDOFvp4SeIeZQcFKEy9QBatBhfS+AFcFcw+x+/gQ=; b=Qb5NrFQ0HKej6d WDh9KOrpgD6LCnt05HviEQjq/0jV7bXKXL7SRjnOp1BJmtTL0/hScGd1igH9bGfpAmoEK9Le0epIh 5dz29P7Fhr+dFp++o4OSry4KJ4cGscPrYFDVbDg93gVIToUpP14gHG5vh65KPwf7R8XXY2x0Hq9LQ PAfUTqG2HsLhDweCXilHDeQUTOmJqFqdTdZTd8daBbEp8JCVGhaWY43WMuKm6j44TIPO4HIW6pkaB fK0Y0+BYOfxiE02dQGnflLaoMoUZF3wtRUuBseEQmPpMov6e+nbypkwS7jGDKJyf4z5/+VFu8kh4O pJv9cWr2mf/sq7xOgEaA==; 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 1gNaHZ-0002RO-2i; Fri, 16 Nov 2018 09:19:21 +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 1gNaHX-0002Qb-3t; Fri, 16 Nov 2018 09:19:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: 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=fR+Is5Bx2Di/bWswiVeFKMMN5RRziiNO6B+RGJU835M=; b=qoI87etxa4+JcVOFVMBz50Y4N cNqfdarssO+Qvf5Che4lI9nVBo7eLjVVyzQHjQs0TMyutMMQzhXEG0xRyzutq7jUlCMlzvOOypVU5 bh53clywnfZsYucCN29liEIwzfjm5srLSTEIEJt41E66zI7HHzdgP41pNZS9D1PMsbFkYq05Oouuf mRQZ72jenTAJUgi86+L7+kaqr+ui76Wv0xVZkmN2LpsOBOFqP25/xCL15KHoiD+PzfbytqrE9pcoN yn/L/FJFvxkFdGZXmxU8d6EmmgGD1qw71hDfnN7eGE9RGvSmQMQJ1HSPkCjPeb3DDltOqApbHw+5T Fzu/TcDZA==; Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNaHS-0002Lu-MZ; Fri, 16 Nov 2018 09:19:17 +0000 X-UUID: 5cb67d35a357418495ab0bc90dbba86b-20181116 X-UUID: 5cb67d35a357418495ab0bc90dbba86b-20181116 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2124849772; Fri, 16 Nov 2018 17:18:54 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 16 Nov 2018 17:18:53 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 16 Nov 2018 17:18:52 +0800 From: Biao Huang To: , Subject: [v3, PATCH 2/2] dt-binding: mediatek-dwmac: add binding document for MediaTek MT2712 DWMAC Date: Fri, 16 Nov 2018 17:18:46 +0800 Message-ID: <1542359926-28800-2-git-send-email-biao.huang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1542359926-28800-1-git-send-email-biao.huang@mediatek.com> References: <1542359926-28800-1-git-send-email-biao.huang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_091915_314331_46DC0701 X-CRM114-Status: GOOD ( 17.76 ) 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: mark.rutland@arm.com, devicetree@vger.kernel.org, nelson.chang@mediatek.com, andrew@lunn.ch, biao.huang@mediatek.com, netdev@vger.kernel.org, liguo.zhang@mediatek.com, linux-kernel@vger.kernel.org, matthias.bgg@gmail.com, joabreu@synopsys.com, linux-mediatek@lists.infradead.org, honghui.zhang@mediatek.com, yt.shen@mediatek.com, linux-arm-kernel@lists.infradead.org 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 commit adds the device tree binding documentation for the MediaTek DWMAC found on MediaTek MT2712. Change-Id: I3728666bf65927164bd82fa8dddb90df8270bd44 Signed-off-by: Biao Huang --- .../devicetree/bindings/net/mediatek-dwmac.txt | 77 ++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/mediatek-dwmac.txt diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.txt b/Documentation/devicetree/bindings/net/mediatek-dwmac.txt new file mode 100644 index 0000000..7fd56e0 --- /dev/null +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.txt @@ -0,0 +1,77 @@ +MediaTek DWMAC glue layer controller + +This file documents platform glue layer for stmmac. +Please see stmmac.txt for the other unchanged properties. + +The device node has following properties. + +Required properties: +- compatible: Should be "mediatek,mt2712-gmac" for MT2712 SoC +- reg: Address and length of the register set for the device +- interrupts: Should contain the MAC interrupts +- interrupt-names: Should contain a list of interrupt names corresponding to + the interrupts in the interrupts property, if available. + Should be "macirq" for the main MAC IRQ +- clocks: Must contain a phandle for each entry in clock-names. +- clock-names: The name of the clock listed in the clocks property. These are + "axi", "apb", "mac_ext", "mac_parent", "ptp_ref", "ptp_parent", "ptp_top" + for MT2712 SoC +- mac-address: See ethernet.txt in the same directory +- phy-mode: See ethernet.txt in the same directory + +Optional properties: +- tx-delay: TX clock delay macro value. Range is 0~31. Default is 0. + It should be defined for rgmii/rgmii-rxid/mii interface. +- rx-delay: RX clock delay macro value. Range is 0~31. Default is 0. + It should be defined for rgmii/rgmii-txid/mii/rmii interface. +- fine-tune: This property will select coarse-tune delay or fine delay + for rgmii interface. + If fine-tune delay is enabled, tx-delay/rx-delay is 170+/-50ps + per stage. + Else coarse-tune delay is enabled, tx-delay/rx-delay is 0.55+/-0.2ns + per stage. + This property do not apply to non-rgmii PHYs. + Only coarse-tune delay is supported for mii/rmii PHYs. +- rmii-rxc: Reference clock of rmii is from external PHYs, + and it can be connected to TXC or RXC pin on MT2712 SoC. + If ref_clk <--> TXC, disable it. + Else ref_clk <--> RXC, enable it. +- txc-inverse: Inverse tx clock for mii/rgmii. + Inverse tx clock inside MAC relative to reference clock for rmii, + and it rarely happen. +- rxc-inverse: Inverse rx clock for mii/rgmii interfaces. + Inverse reference clock for rmii. + +Example: + eth: ethernet@1101c000 { + compatible = "mediatek,mt2712-gmac"; + reg = <0 0x1101c000 0 0x1300>; + interrupts = ; + interrupt-names = "macirq"; + phy-mode ="rgmii-id"; + mac-address = [00 55 7b b5 7d f7]; + clock-names = "axi", + "apb", + "mac_ext", + "mac_parent", + "ptp_ref", + "ptp_parent", + "ptp_top"; + clocks = <&pericfg CLK_PERI_GMAC>, + <&pericfg CLK_PERI_GMAC_PCLK>, + <&topckgen CLK_TOP_ETHER_125M_SEL>, + <&topckgen CLK_TOP_ETHERPLL_125M>, + <&topckgen CLK_TOP_ETHER_50M_SEL>, + <&topckgen CLK_TOP_APLL1_D3>, + <&topckgen CLK_TOP_APLL1>; + snps,txpbl = <32>; + snps,rxpbl = <32>; + snps,reset-gpio = <&pio 87 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + tx-delay = <9>; + rx-delay = <9>; + fine-tune; + rmii-rxc; + txc-inverse; + rxc-inverse; + };