From patchwork Wed Sep 7 13:53:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 667028 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sTlLK1WMnz9s36 for ; Wed, 7 Sep 2016 23:53:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=IRzPb1k2; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbcIGNxm (ORCPT ); Wed, 7 Sep 2016 09:53:42 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:36576 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437AbcIGNxl (ORCPT ); Wed, 7 Sep 2016 09:53:41 -0400 Received: by mail-lf0-f45.google.com with SMTP id g62so11396904lfe.3 for ; Wed, 07 Sep 2016 06:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=664dGKXosithetfhvvOlBBq3ZD3BFRdod5QVI/1cu9o=; b=IRzPb1k2P/hlmtlRahKHjl8GnEC6+uM6sl2kQXpzItLSeYCWdMkPeMdQuW/UbH8KB/ 5yjxXC8Vl2Zc6gkFyE3MTPaXD3wupEmuCKow3dwJAmMEdfLiPJZu6ZbOoHcuXPJjBFyZ 0nsZC2jyqIIpAUKwyCPhw6g2NF+kPezOCEWwE= 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; bh=664dGKXosithetfhvvOlBBq3ZD3BFRdod5QVI/1cu9o=; b=MM/jop/frq/YRoJdGSGch8PBLrrprRwrQeaQX7jAmKxnXtfMjyp1zAbqd1BpNFRZlV k8Si601VeMUpEtL39rQBRHU/0NA3wgCzw71VQA6B64BcXtPnQa9poCcQhEkkxanzAGnY 96pm/ho417EYJ/xmjyMMjXLOc5RoD4Q6kzWLTTEdS0sqbXlrmYmBshhbl0wEbyK4BbnH /RBb8bFDCSm2Ag2ahDEAVdowjIMQUQIx1Ng6wfAbXFj4MGEA7lygPO1jqjuG+Lho5Rrc fs/Gioyp5F+y500rPMzLw/ECEj2PMyucE97SQ/Pv/M/RlFYM06iNTDHvH+TWhPk8gTLc iF2A== X-Gm-Message-State: AE9vXwMjqREncYAvFZvLGgBgfq6xuBwHxkJt4uNOd4w1WDCCQVIsqwRCwjmJGd9rxkU5L+Ks X-Received: by 10.25.212.206 with SMTP id l197mr59032lfg.69.1473256419027; Wed, 07 Sep 2016 06:53:39 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id s2sm6527036lja.35.2016.09.07.06.53.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 06:53:38 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , Steve Glendinning Cc: Guenter Roeck , Jeremy Linton , Kamlakant Patel , Pavel Fedin , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 1/2 v3] net: smsc911x: augment device tree bindings Date: Wed, 7 Sep 2016 15:53:31 +0200 Message-Id: <1473256411-13965-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This adds device tree bindings for: - An optional GPIO line for releasing the RESET signal to the SMSC911x devices - An optional PME (power management event) interrupt line that can be utilized to wake up the system on network activity. This signal exist on all the SMSC911x devices, it is just not very often routed. Both these lines are routed to the SoC on the Qualcomm APQ8060 Dragonboard and thus needs to be bound in the device tree. Cc: devicetree@vger.kernel.org Cc: Jeremy Linton Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann --- ChangeLog v2->v3: - Augment interrupt specificiers to be more to the point and less technical as suggested by Arnd. ChangeLog v1->v2: - Document for "interrupts", skip mentioning "interrupts-extended" as both are always supported. --- Documentation/devicetree/bindings/net/smsc911x.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/smsc911x.txt b/Documentation/devicetree/bindings/net/smsc911x.txt index 3fed3c124411..16c3a9501f5d 100644 --- a/Documentation/devicetree/bindings/net/smsc911x.txt +++ b/Documentation/devicetree/bindings/net/smsc911x.txt @@ -3,9 +3,11 @@ Required properties: - compatible : Should be "smsc,lan", "smsc,lan9115" - reg : Address and length of the io space for SMSC LAN -- interrupts : Should contain SMSC LAN interrupt line -- interrupt-parent : Should be the phandle for the interrupt controller - that services interrupts for this device +- interrupts : one or two interrupt specifiers + - The first interrupt is the SMSC LAN interrupt line + - The second interrupt (if present) is the PME (power + management event) interrupt that is able to wake up the host + system with a 50ms pulse on network activity - phy-mode : See ethernet.txt file in the same directory Optional properties: @@ -21,6 +23,10 @@ Optional properties: external PHY - smsc,save-mac-address : Indicates that mac address needs to be saved before resetting the controller +- reset-gpios : a GPIO line connected to the RESET (active low) signal + of the device. On many systems this is wired high so the device goes + out of reset at power-on, but if it is under program control, this + optional GPIO can wake up in response to it. Examples: @@ -29,7 +35,8 @@ lan9220@f4000000 { reg = <0xf4000000 0x2000000>; phy-mode = "mii"; interrupt-parent = <&gpio1>; - interrupts = <31>; + interrupts = <31>, <32>; + reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; reg-io-width = <4>; smsc,irq-push-pull; };