From patchwork Sat Jun 25 16:50:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9198615 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 6DC32608A7 for ; Sat, 25 Jun 2016 16:50:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F1A2284EF for ; Sat, 25 Jun 2016 16:50:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53CB62851F; Sat, 25 Jun 2016 16:50:50 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AEFA72851D for ; Sat, 25 Jun 2016 16:50:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGqn8-0004ey-9v; Sat, 25 Jun 2016 16:50:46 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGqn5-0004cI-Gb for linux-amlogic@lists.infradead.org; Sat, 25 Jun 2016 16:50:44 +0000 Received: by mail-wm0-x243.google.com with SMTP id 187so13358669wmz.1 for ; Sat, 25 Jun 2016 09:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NFZZ8zncCNtd8I7fyQk88KNCAuR5bdCa4w0JVsVLDZw=; b=bDFCrdmtbLi18j0lSZUu9QAxnFyj7muHPRKSDW5mnDVNsBws8wE31EAXq6o/sWfzCg 606a+r0n9KPoJKU97s6R/zUOhjEhAZP+3l6812a9241i6jbQOFFxDFog3WVr0t0Ut5si DoBGf1h6VUxyOVmaskIuupa9L6uMrCyFiNQ/u5e1lP+BC0RWXrWcPghyeYdun0nzwg3w VNOyU+pCXT+Y3Q1oXGdcI3yn+fStUeOZLbpn6khkHY8H92Mn8UMjHR3nal9UbvYN+Iv9 3/ZpFWHiixVOzVrYySpDxWaFODv6EwMgpUIfc6G6g7cpn9Ir78pE+LhgM50E/vld0icQ ukwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NFZZ8zncCNtd8I7fyQk88KNCAuR5bdCa4w0JVsVLDZw=; b=SI63NOGd1+6merkT8Y9d5fhhg/jwNFxKUipXGLyhxG6r7xIPvbXuqu/5Git97DVgGt xSwyGD2xxnT+GbZRHzYhnFPbcNVsWj/TZaLgSsNYeqOcJ1KiUHFIYhKIYb5TUPOtbR6/ gOd3l+7lp5o2OvS3aVTIuWriG4v9eXSs/PAOPIfhAO7P1yUiLR2cPgim1IRsJ9HcPgpd RILH/84LtAj18dum+xhtpXwv2sPyOlPFxRczrRVUIlwoJGMXnw6uFXblAKmTItn2d6s0 ZfTsTPBLm3QHgDS42/GKk3/8kQCOrsaW7azp0ZswwPsySEcl9Ety3ncnc8iBRROacOpZ eZOw== X-Gm-Message-State: ALyK8tI51+9JzK1Jk3V2zXKs+srsGHRUpbH5q7qdHtXhrdh7kTrg62seGSXoi0aSkhPWJw== X-Received: by 10.194.162.168 with SMTP id yb8mr9694173wjb.32.1466873422943; Sat, 25 Jun 2016 09:50:22 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CD1B04957A13FD6F05B849.dip0.t-ipconnect.de. [2003:dc:d3cd:1b04:957a:13fd:6f05:b849]) by smtp.googlemail.com with ESMTPSA id el4sm3144603wjd.23.2016.06.25.09.50.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Jun 2016 09:50:22 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Subject: [PATCH RFC 1/3] net: dt-bindings: add the amlogic, meson8b-dwmac binding Date: Sat, 25 Jun 2016 18:50:11 +0200 Message-Id: <20160625165013.15917-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160625165013.15917-1-martin.blumenstingl@googlemail.com> References: <20160625165013.15917-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160625_095043_715444_7AAA59D4 X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Martin Blumenstingl , khilman@baylibre.com, robh+dt@kernel.org, netdev@vger.kernel.org, carlo@caione.org, peppe.cavallaro@st.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the documentation for the DWMAC ethernet controller found in Amlogic Meson 8b (S805) and GXBB (S905) SoCs. Compared to the standard stmmac/dwmac configuration this requires some some additional parameters for configuring the clock-generator depending on the actual ethernet PHY on the board. Signed-off-by: Martin Blumenstingl --- .../bindings/net/amlogic,meson8b-dwmac.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/amlogic,meson8b-dwmac.txt diff --git a/Documentation/devicetree/bindings/net/amlogic,meson8b-dwmac.txt b/Documentation/devicetree/bindings/net/amlogic,meson8b-dwmac.txt new file mode 100644 index 0000000..4164753e --- /dev/null +++ b/Documentation/devicetree/bindings/net/amlogic,meson8b-dwmac.txt @@ -0,0 +1,44 @@ +* Amlogic Meson 8b/GXBB DWMAC Ethernet controller + +The device inherits all the properties of the dwmac/stmmac devices +described in the file net/stmmac.txt with the following changes. + +Required properties: +- compatible: should be "amlogic,meson8b-dwmac" along with "snps,dwmac" + and any applicable more detailed version number + described in net/stmmac.txt +- prg-ethernet: should contain a phandle to a syscon device mapping the + PRG_ETHERNET registers. + + +Optional properties: +- amlogic,enable-tx-phy-ref-clk: Enables the TX_CLK and PHY_REF_CLK + clock generator. +- amlogic,mp2-clock: Sets the frequency for the mp2_clk_out clock. See + the MESON8B_DWMAC_MP2_CLOCK_* definitions in + "include/dt-bindings/net/amlogic-meson8b-dwmac.h". +- amlogic,tx-delay: Configures the TX clock delay. See the + MESON8B_DWMAC_TX_CLK_DELAY_* definitions in + "include/dt-bindings/net/amlogic-meson8b-dwmac.h". + + +Example: + +#include + + gmac: ethernet@37000000 { + compatible = "amlogic,meson8b-dwmac", "snps,dwmac"; + reg = <0x0 0xc9410000 0x0 0x10000>; + interrupts = <0 8 1>; + interrupt-names = "macirq"; + + clocks = <&clkc CLKID_ETH>; + clock-names = "stmmaceth"; + + phy-mode = "rgmii"; + + amlogic,prg-ethernet = <&prg_ethernet>; + amlogic,enable-25mhz-phy-clk; + amlogic,mp2-clock = ; + amlogic,tx-delay = ; + };