From patchwork Fri Nov 25 13:12:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9447579 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 07AEF60779 for ; Fri, 25 Nov 2016 13:15:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBE4D27F85 for ; Fri, 25 Nov 2016 13:15:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E05BF2808F; Fri, 25 Nov 2016 13:15:56 +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 2FEC327F8F for ; Fri, 25 Nov 2016 13:15:53 +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 1cAGLw-0001Pa-7o; Fri, 25 Nov 2016 13:15:44 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAGIu-0005rx-Hi for linux-amlogic@lists.infradead.org; Fri, 25 Nov 2016 13:12:42 +0000 Received: by mail-wm0-x242.google.com with SMTP id a20so7772400wme.2 for ; Fri, 25 Nov 2016 05:12:16 -0800 (PST) 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=mUBPYuglulz4emEXe/NaXJhJR5UwlgEXfa7qkT/mSq4=; b=f5MUpPIQIgnFicw7TUSYSWK6cRuO9XxF0A+31bfxRKWH58sXfBssyyOgPcS6LD8J3T BgTe3qdrjP/chqwf6b4y6omSzpJdVvBI2vZQRe2QxD0lxeu2KjQAkmz7a5b13B5hmJng B2Q7MCvWQU7QB+d/T8IXszThJH7CptTaQgQUrD3XczsqQ6SA74K9cbI3u85Xjf7PDzX6 aZdRVnVqcGaI44ro52PY1VJu1n1GuyclzhY0tAL9GccI1QNXRzP3TWs5fxzkUMf5HeHU lfepl/W+h4/7AfXzmrj7r5hZVyEmTFIk5b6E8C7VUxvcKSsiyfiUikPs6BpHwfhsabB+ dw0Q== 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=mUBPYuglulz4emEXe/NaXJhJR5UwlgEXfa7qkT/mSq4=; b=FibVkGxPJ+PuZIJBulMaO5yGkJlqWI5k0WLSoOpktAd6WHWxKI9611anf/fkIvjKz9 Dk2xKwqQfuCna4oMcB0xraYQKPlkz5apcS7XQ4lJFRQGjxHfNI0YeJZd6jIqu6jnt5O1 77HsuGTon+8DE43OCMCO8+HxELNTU0bYSLN+sN4x1HMktGRxXBPJZ9dN0SJF5kTOUINW TTbqCYVxP0LlDr4DSUgBWRnis3TTLfplA0pkmxJ1KlNrwjCDjjKI3FV0uh3HK4mkiWvb Ctx0qfKY5/vSRQcUN4K1OX+eF3/JJmdjrKbbGarKqRkuivXqMa1SR5149qmbI4EL1GHr 7Trw== X-Gm-Message-State: AKaTC01XYRqCmm+/qoJIWGYAuKCiU0D5DFveT96Ihe+igU9v41yer/ZG8lNp/Sfarpe+0Q== X-Received: by 10.28.58.14 with SMTP id h14mr8004258wma.7.1480079534722; Fri, 25 Nov 2016 05:12:14 -0800 (PST) Received: from blackbox.darklights.net ([2003:dc:d3d3:9204:9426:48db:352f:a6de]) by smtp.googlemail.com with ESMTPSA id y4sm47009872wjp.0.2016.11.25.05.12.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 05:12:13 -0800 (PST) From: Martin Blumenstingl To: f.fainelli@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, davem@davemloft.net, sean.wang@mediatek.com, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/2] Documentation: devicetree: clarify usage of the RGMII phy-modes Date: Fri, 25 Nov 2016 14:12:00 +0100 Message-Id: <20161125131201.19994-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161125131201.19994-1-martin.blumenstingl@googlemail.com> References: <20161125131201.19994-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161125_051237_172199_05BB4056 X-CRM114-Status: GOOD ( 11.54 ) 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 , linux-amlogic@lists.infradead.org, jbrunet@baylibre.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 RGMII requires special RX and/or TX delays depending on the actual hardware circuit/wiring. These delays can be added by the MAC, the PHY or the designer of the circuit (the latter means that no delay has to be added by PHY or MAC). There are 4 RGMII phy-modes used describe where a delay should be applied: - rgmii: the RX and TX delays are either added by the MAC (where the exact delay is typically configurable, and can be turned off when no extra delay is needed) or not needed at all (because the hardware wiring adds the delay already). The PHY should neither add the RX nor TX delay in this case. - rgmii-rxid: configures the PHY to enable the RX delay. The MAC should not add the RX delay in this case. - rgmii-txid: configures the PHY to enable the TX delay. The MAC should not add the TX delay in this case. - rgmii-id: combines rgmii-rxid and rgmii-txid and thus configures the PHY to enable the RX and TX delays. The MAC should neither add the RX nor TX delay in this case. Document these cases in the ethernet.txt documentation to make it clear when to use each mode. If applied incorrectly one might end up with MAC and PHY both enabling for example the TX delay, which breaks ethernet TX traffic on 1000Mbit/s links. Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/ethernet.txt | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt index e1d7681..0515095 100644 --- a/Documentation/devicetree/bindings/net/ethernet.txt +++ b/Documentation/devicetree/bindings/net/ethernet.txt @@ -9,10 +9,26 @@ The following properties are common to the Ethernet controllers: - max-speed: number, specifies maximum speed in Mbit/s supported by the device; - max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than the maximum frame size (there's contradiction in ePAPR). -- phy-mode: string, operation mode of the PHY interface; supported values are - "mii", "gmii", "sgmii", "qsgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id", - "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii", "trgmii"; this is now a - de-facto standard property; +- phy-mode: string, operation mode of the PHY interface. This is now a de-facto + standard property; supported values are: + * "mii" + * "gmii" + * "sgmii" + * "qsgmii" + * "tbi" + * "rev-mii" + * "rmii" + * "rgmii" (RX and TX delays are added by the MAC when required) + * "rgmii-id" (RGMII with internal RX and TX delays provided by the PHY, the + MAC should not add the RX or TX delays in this case) + * "rgmii-rxid" (RGMII with internal RX delay provided by the PHY, the MAC + should not add an RX delay in this case) + * "rgmii-txid" (RGMII with internal TX delay provided by the PHY, the MAC + should not add an TX delay in this case) + * "rtbi" + * "smii" + * "xgmii" + * "trgmii" - phy-connection-type: the same as "phy-mode" property but described in ePAPR; - phy-handle: phandle, specifies a reference to a node representing a PHY device; this property is described in ePAPR and so preferred;