Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp102854imu; Thu, 15 Nov 2018 22:59:13 -0800 (PST) X-Google-Smtp-Source: AJdET5cRcUoVcToYdzCz1qGnLvuAFm+UqrXg3gnyoZEyxcL1l9Aic0SHhJiWgl6A/xXiM3vTtTfi X-Received: by 2002:a17:902:e103:: with SMTP id cc3-v6mr217499plb.309.1542351553559; Thu, 15 Nov 2018 22:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542351553; cv=none; d=google.com; s=arc-20160816; b=fBpvswzGODYoJHFVT+Z6zW+R9whiKRyj5H8y9e7/XH0zQ20UonOw4EuiXFZjPUvMY2 Jo/k0PYSNF1WvLsW0TulO3t9WmztvCw0R0A7pwvzgVOySLczSPZpAp99XhC632Ghr9P3 E7rIShyxJd2zqEkH+uWzUhha9R6ArkW9l96m+KLFEjRJi4uIi2sgvI6lt1b5dLbl5nLX UAsc7zyz7DrgNea1djNM61h3SLfZ3FKxicWPhmbDa7HK4PWIRSOHOuaxGqtEU1EQGnyn MqZgVd5Z+qCrQ5G/FKCB0cjgS3hlkm9WoZ48mB63dcqSzdreesDpCWIvlJ6hlVRkB/5o Vdmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=MJFv7dVoGS72dfAtEMgAxapbZHpCY3Cpr7TqpbhJBS8=; b=w40RJL/SpwWaw2ZXbMGF0W59dhjjNIvay5NiLe29WzZIsvfSVEcKyoZluwCsi2o1aI AlhomZkzqWFJ3jAaOjuXc1auyNj6CR+0Ott1HEavQvC8IeCphNSwO504qgPmtYhSUX0m jIwa9CjEGE7nkHD/I5mpTymuqhgdBy5Rmn9K9LEZZ+rMON8kBMFi3NMWFAvyESZnGm7F xnWrym+CBe/elt8NhwP1qUlnp13PFQ9UtsCHvSs8n3/7Gj49e1xVhSZ2TKLsvNJrzfOo 7Ab2TRwxRcq9Jo1RxElNeC/EpqYnDGTRPVAbpXPhUpNLSxR7HimOUPUjzYQhXqOc2n/U 7tCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3-v6si32778645plj.372.2018.11.15.22.58.58; Thu, 15 Nov 2018 22:59:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389066AbeKPRJ1 (ORCPT + 99 others); Fri, 16 Nov 2018 12:09:27 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:9295 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727370AbeKPRJ1 (ORCPT ); Fri, 16 Nov 2018 12:09:27 -0500 X-UUID: ea1c98a43e1a4c62b12c0876858d8edc-20181116 X-UUID: ea1c98a43e1a4c62b12c0876858d8edc-20181116 Received: from mtkcas32.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 177332613; Fri, 16 Nov 2018 14:58:10 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 16 Nov 2018 14:58:08 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 16 Nov 2018 14:58:07 +0800 Message-ID: <1542351487.26982.28.camel@mhfsdcap03> Subject: Re: [PATCH 2/2] dt-binding: mediatek-dwmac: add binding document for MediaTek MT2712 DWMAC From: biao huang To: Rob Herring CC: , , , , , , , , , , , , , , Date: Fri, 16 Nov 2018 14:58:07 +0800 In-Reply-To: <20181112162204.GA8910@bogus> References: <1540782294-27721-1-git-send-email-biao.huang@mediatek.com> <1540782294-27721-3-git-send-email-biao.huang@mediatek.com> <20181112162204.GA8910@bogus> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Rob, Thanks for your comments. On Mon, 2018-11-12 at 10:22 -0600, Rob Herring wrote: > On Mon, Oct 29, 2018 at 11:04:54AM +0800, Biao Huang wrote: > > The commit adds the device tree binding documentation for the MediaTek DWMAC > > found on MediaTek MT2712. > > > > Signed-off-by: Biao Huang > > --- > > .../devicetree/bindings/net/mediatek-dwmac.txt | 49 ++++++++++++++++++++ > > 1 file changed, 49 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..8baf0e4 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.txt > > @@ -0,0 +1,49 @@ > > +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 > > Clocks should represent the physical clocks connected to a block. Parent > clocks are not in that category. There are two categories of physical clocks related to MAC. 1. axi/apb/ptp_top, these clks are from clk gates, so only on/off is needed. 2. mac_ext/ptp_ref, these clks are from mux. If different source is selected, the clk frequecy will be different. So it's necessary to set a proper parent for them, i.e. mac_parent/ptp_parent. How should I handle parent clocks if not defined here? Any examples I can refer to? > > > +- mac-address: See ethernet.txt in the same directory > > +- phy-mode: See ethernet.txt in the same directory > > + > > +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; > > + }; > > -- > > 1.7.9.5 > > > Best Regards! Biao