From patchwork Mon Mar 14 08:01:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8577031 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA483C0553 for ; Mon, 14 Mar 2016 08:03:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF4DF20465 for ; Mon, 14 Mar 2016 08:03:17 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 11B362045A for ; Mon, 14 Mar 2016 08:03:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1afNTA-0004gm-LS; Mon, 14 Mar 2016 08:03:16 +0000 Received: from mail-pf0-f194.google.com ([209.85.192.194]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1afNT6-0004Yb-BC for linux-rockchip@lists.infradead.org; Mon, 14 Mar 2016 08:03:15 +0000 Received: by mail-pf0-f194.google.com with SMTP id q129so12508035pfb.3 for ; Mon, 14 Mar 2016 01:02:51 -0700 (PDT) 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=ZIEPXuCYrDr6/DjPPa97H46YdyeDD3NrHybyquX5WhA=; b=Y07vhOHJsk0edsuDpaCQ5snpVUDhiZG55dU+0pMCkmTB5q0UeDGb3Y+nb2YXV7BjbF FvYIiODF3BL1Vnl7qHEVMYA+ExWf56s41fTmpEzcIkQtVPiIe04a6nfngFG1gqYoBhO1 XsHd2JuQdwxMua1y8jSnleUAyShXtZr8z0qudPRguodgnb1ItHULW09EWVFBUwu0J3O0 w+FNJibClAAVoGjrZZ6dkK1O19kxZq+CVAoeta9G8LvGhVq2s/M1sk1tpMv0KtcaQaS/ 3Fg8RktVFFdHhe6mUsYsWokurD6tO7okQsTgr1Wzvhl3d5xSzWWCDOPS+PoeOwDOSQQA 0ETw== X-Gm-Message-State: AD7BkJKNKewM43N/9A1zFXWgV97AN6Jvq2p+lZL/sWAFMJobQoihKRlCPIL0857OD8gQ3A== X-Received: by 10.98.72.8 with SMTP id v8mr17584832pfa.33.1457942570959; Mon, 14 Mar 2016 01:02:50 -0700 (PDT) Received: from localhost.localdomain ([104.37.5.155]) by smtp.gmail.com with ESMTPSA id 79sm29864427pfq.65.2016.03.14.01.02.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Mar 2016 01:02:49 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner , "David S. Miller" , Rob Herring Subject: [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree Date: Mon, 14 Mar 2016 16:01:53 +0800 Message-Id: <1457942520-12859-3-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457942520-12859-1-git-send-email-wxt@rock-chips.com> References: <1457942520-12859-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160314_010312_757493_90F00B72 X-CRM114-Status: GOOD ( 10.85 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , sergei.shtylyov@cogentembedded.com, Ian Campbell , netdev@vger.kernel.org, Kumar Gala , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, keescook@google.com, leozwang@google.com, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the following property for arc_emac. 1) phy-reset-gpios: The phy-reset-gpio is an optional property for arc emac device tree boot. Change the binding document to match the driver code. 2) phy-reset-duration: Different boards may require different phy reset duration. Add property phy-reset-duration for device tree probe, so that the boards that need a longer reset duration can specify it in their device tree. Anyway, we can add the above property for arc emac. Signed-off-by: Caesar Wang Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Sergei Shtylyov Cc; Alexander Kochetkov --- Changes in v3: - As Sergei comments, the original name is better, so %s/reset-gpios/phy-reset-gpios - Add the Cc people. Changes in v2: - %s/phy-reset-gpios/reset-gpios Documentation/devicetree/bindings/net/arc_emac.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt index a1d71eb..c73a0e9 100644 --- a/Documentation/devicetree/bindings/net/arc_emac.txt +++ b/Documentation/devicetree/bindings/net/arc_emac.txt @@ -7,6 +7,13 @@ Required properties: - max-speed: see ethernet.txt file in the same directory. - phy: see ethernet.txt file in the same directory. +Optional properties: +- phy-reset-gpios : Should specify the gpio for phy reset +- phy-reset-duration : Reset duration in milliseconds. Should present + only if property "phy-reset-gpios" is available. Missing the property + will have the duration be 1 millisecond. Numbers greater than 1000 are + invalid and 1 millisecond will be used instead. + Clock handling: The clock frequency is needed to calculate and set polling period of EMAC. It must be provided by one of: