From patchwork Fri Mar 11 10:55:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8564551 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 F0DE4C0553 for ; Fri, 11 Mar 2016 10:58:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1625220340 for ; Fri, 11 Mar 2016 10:58:55 +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 3451820222 for ; Fri, 11 Mar 2016 10:58:54 +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 1aeKmT-0008DZ-LO; Fri, 11 Mar 2016 10:58:53 +0000 Received: from mail-pa0-f65.google.com ([209.85.220.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aeKlw-0007hi-CX for linux-rockchip@lists.infradead.org; Fri, 11 Mar 2016 10:58:23 +0000 Received: by mail-pa0-f65.google.com with SMTP id q6so8005279pav.0 for ; Fri, 11 Mar 2016 02:58:02 -0800 (PST) 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=9Gk+0ALSpFcukat3CTKqVhXoWfXJvIsrpMmWdajTfZ0=; b=iWMJiJ4zw3X1Scn2itLf8u2hhHj/jDmazxyryfOt2FWeT5XXSOLBpVN1Ly36B+V6/v MgvEbeJrHz8MvbUlXFYZdd8iKdIZP6ca1/Hbo8KUItqZJabKKmxZMKd16ql3AG4wWwTN n6EVTxdoUfhjCSMk1ahVs4JozUt6P0g4UGprdyuDXruQueu5c5SLQ+Thv6M895D1+uqG 2Ng2P/0z3Wxv3S0fGawufUQJga8dhnDVdHD+j+mwECEUZidpj+Hi1MLx8zhhhzScl+Qh MoCm8JDhKQenNFcpEBEsPakIPyw7uG3DyARxHKmk604mPYnHVdbaUy+OHyuxQ4E9rHcF RiWw== X-Gm-Message-State: AD7BkJLFd4vLUI7n7iIvGAN+vKpNjk9jQf7lA78/R7kKEIhDmwAxrTwUXIzhO0GAvNKAeQ== X-Received: by 10.66.218.225 with SMTP id pj1mr13630551pac.83.1457693881881; Fri, 11 Mar 2016 02:58:01 -0800 (PST) Received: from localhost.localdomain ([58.22.7.114]) by smtp.gmail.com with ESMTPSA id x64sm12042302pfa.72.2016.03.11.02.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Mar 2016 02:58:00 -0800 (PST) From: Caesar Wang To: Heiko Stuebner , "David S. Miller" , Rob Herring Subject: [PATCH 2/6] net: arc_emac: add phy-reset-* are optional for device tree Date: Fri, 11 Mar 2016 18:55:27 +0800 Message-Id: <1457693731-6966-3-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457693731-6966-1-git-send-email-wxt@rock-chips.com> References: <1457693731-6966-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160311_025820_903851_C71F37AD X-CRM114-Status: GOOD ( 10.31 ) 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 , Ian Campbell , 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-gpios 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. 3) phy-reset-active-high: We need that for a custom hardware that needs the reverse reset sequence. Anyway, we can add the above property for arc emac. Signed-off-by: Caesar Wang --- Documentation/devicetree/bindings/net/arc_emac.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt index a1d71eb..6389b00 100644 --- a/Documentation/devicetree/bindings/net/arc_emac.txt +++ b/Documentation/devicetree/bindings/net/arc_emac.txt @@ -7,6 +7,16 @@ 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. +- phy-reset-active-high : If present then the reset sequence using the GPIO + specified in the "phy-reset-gpios" property is reversed (H=reset state, + L=operation state). + Clock handling: The clock frequency is needed to calculate and set polling period of EMAC. It must be provided by one of: