From patchwork Sat Dec 17 18:21:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9479081 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 7857660237 for ; Sat, 17 Dec 2016 18:22:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D347285AC for ; Sat, 17 Dec 2016 18:22:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61610285B4; Sat, 17 Dec 2016 18:22:29 +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 DF1FC285AC for ; Sat, 17 Dec 2016 18:22:28 +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 1cIJcj-0002fl-8x; Sat, 17 Dec 2016 18:22:21 +0000 Received: from mail-wj0-x242.google.com ([2a00:1450:400c:c01::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cIJcL-0002Vq-EF; Sat, 17 Dec 2016 18:21:58 +0000 Received: by mail-wj0-x242.google.com with SMTP id j10so18485524wjb.3; Sat, 17 Dec 2016 10:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Zo9yQX4W01HLlyaT0JqoYByFmtg7hndU0Ucawj6CW1k=; b=OCM72gAdq1Vhm1Jv1JjgyFM03yYZAPOX/xFZs4Fpg6xGnyKSeYC/8zHe/2gimJjq2d bX9WXs7N0Wxq+Rsnizw2BTxU3sTslRgTgfZn0aKeP0vOg7L3nQWlxlaPqcomVblrWNpf 1aUU2guCgOj957v4+NfS//zZTe+vksvnU4OJEhkl8nUIZBbQWR1x/+ETuZi6GxMvzV1B cgw8Bdk/sXesDQjiDg+Vu7Oq/ITNAogZKkDI5Xq70FfTir37wLbL0/xs1gNUp98QJKHG uWLilJ7QWptGoQZFAe5z+U2W5hv54M+e7QdgfLKHfxkqtNuX0lFYAF2z0xNm2j9kwDkc AYGw== 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=Zo9yQX4W01HLlyaT0JqoYByFmtg7hndU0Ucawj6CW1k=; b=UaWLt0xjWJ7efule3IEZoI4nfmX5tBkx5XEz6UBabARLez4NfsKYRFMJE0thSRY8tu lIKtKtf3TO7Pv4770oooFzZwHmjSMRKI3VcikzqRiCb/NcJqJUCiFeT0zfL8Rc/+hhM7 nimMBhbCQWgw/gdXrB+ZV4BzRIksm19kbQZsSjC6yifd9nbcF/OK/zFxmPUODVY4p2r0 jjeAqb4EjQ6ZTCrUIdP0dVl5FRdcrtuP0SUJPjJ57AxXNgcKj1+RQEPveix277LEodPh VD0USCKY2CqfWw9duTxYBoXzd3xMPcsona+J84CemgV+zSXr1OP7hyQxhKvDxrufTc9D kzQg== X-Gm-Message-State: AIkVDXLp7SsR5A0qkXEHQHkwtaWi9qb4GPNBcLCXoB6ig43foMg2/W9PqJPMuS+5H9IOmg== X-Received: by 10.194.71.133 with SMTP id v5mr7531419wju.222.1481998895383; Sat, 17 Dec 2016 10:21:35 -0800 (PST) Received: from blackbox.darklights.net (p5DE38254.dip0.t-ipconnect.de. [93.227.130.84]) by smtp.googlemail.com with ESMTPSA id wg8sm12484420wjb.42.2016.12.17.10.21.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2016 10:21:34 -0800 (PST) From: Martin Blumenstingl To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, robh+dt@kernel.org, mark.rutland@arm.com, carlo@caione.org, khilman@baylibre.com Subject: [PATCH net-next v4 1/2] net: dt-bindings: add RGMII TX delay configuration to meson8b-dwmac Date: Sat, 17 Dec 2016 19:21:18 +0100 Message-Id: <20161217182119.4037-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161217182119.4037-1-martin.blumenstingl@googlemail.com> References: <20161202233238.17561-1-martin.blumenstingl@googlemail.com> <20161217182119.4037-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161217_102157_711379_F60CC504 X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. 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: Martin Blumenstingl , peppe.cavallaro@st.com, alexandre.torgue@st.com, linux-arm-kernel@lists.infradead.org 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 allows configuring the RGMII TX clock delay. The RGMII clock is generated by underlying hardware of the the Meson 8b / GXBB DWMAC glue. The configuration depends on the actual hardware (no delay may be needed due to the design of the actual circuit, the PHY might add this delay, etc.). Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/meson-dwmac.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/net/meson-dwmac.txt b/Documentation/devicetree/bindings/net/meson-dwmac.txt index 89e62ddc69ca..f8bc54094e3c 100644 --- a/Documentation/devicetree/bindings/net/meson-dwmac.txt +++ b/Documentation/devicetree/bindings/net/meson-dwmac.txt @@ -25,6 +25,20 @@ Required properties on Meson8b and newer: - "clkin0" - first parent clock of the internal mux - "clkin1" - second parent clock of the internal mux +Optional properties on Meson8b and newer: +- amlogic,tx-delay-ns: The internal RGMII TX clock delay (provided + by this driver) in nanoseconds. Allowed values + are: 0ns, 2ns, 4ns, 6ns. + This must be configured when the phy-mode is + "rgmii" (typically a value of 2ns is used in + this case). + When phy-mode is set to "rgmii-id" or + "rgmii-txid" the TX clock delay is already + provided by the PHY. In that case this + property should be set to 0ns (which disables + the TX clock delay in the MAC to prevent the + clock from going off because both PHY and MAC + are adding a delay). Example for Meson6: