Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4681011yba; Wed, 17 Apr 2019 17:16:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLjmlhe9svhNN01htkX81FncCjgvuPML2HqQdr31Ud4AWxA7858i9HyjThdfcLbTC9q1vE X-Received: by 2002:a17:902:784d:: with SMTP id e13mr93250662pln.152.1555546583092; Wed, 17 Apr 2019 17:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555546583; cv=none; d=google.com; s=arc-20160816; b=Xhsd1e99RrfSZfMZIHu1OjD59UlPDPIz+Ww8xfe8VGRJ3U0a0w9rhwT9IsqBQL+c6Q 7a0P21w/sF27SgFdyyHt10jDXpF/GGJw/vqRoSIUOK7HmnNwefNFYaX4CfBWBThyFkdK RTF0TH3VCPXLrq2DmxKaNX8pVzs88Wlgv7j4J4BlJSfW0GVE9y2TkcKJgd0Gv6vW6mKy XC66QB8DoH++Al/ORE/AlK9QWpFK3lTc8Rs68Fb4uwmGdGX29/dOclnYk7Gojnm9M6P5 rtETr2kes6I4GBi5LeZON+s5ONab8FoZ3DP6UloO+OSWs6fMW+Wsw72yd8HIHyXNl9V1 +sFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8a+BZEe7v/lxE++Jk26DJvDIeRtcgS+edmxjVgSar6E=; b=bFNUN/7yVq/HTXuO7Hb/Z4VVvS45E86z9q4mLYZtPe0katKT2xElnV8y2ZNh1hqBJw 0+E+idGLZ7zWr2NJDHQqtv+wS//uHOek+tpGY/pCWAWRMCd2Dwb9BzycSAEEgtx9Rqgj aYqHKLvNEBZygJNmFnqClJCw6/CWa/lrGsyPHexqK8NT/cDLj1wLAsGGK0jdnVT+Py8q L8jXbM1ZsjAlekIvuSwMbc+Pym2ru0ILVM0KWPq6gEnHiIHr9o9NaYaYYtYFkjtPLsg4 OfNWha5BYs5V75SEQEPt2cAnMaJ2LZ5cmWrwQvw3KYAOF6QuYW9lvU1xhAHAZOIjjxn2 jmVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IVSeUaSO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k73si579642pfb.195.2019.04.17.17.16.08; Wed, 17 Apr 2019 17:16:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IVSeUaSO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387802AbfDRAPC (ORCPT + 99 others); Wed, 17 Apr 2019 20:15:02 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:34750 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387783AbfDRAPB (ORCPT ); Wed, 17 Apr 2019 20:15:01 -0400 Received: by mail-pg1-f193.google.com with SMTP id v12so313958pgq.1 for ; Wed, 17 Apr 2019 17:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8a+BZEe7v/lxE++Jk26DJvDIeRtcgS+edmxjVgSar6E=; b=IVSeUaSONgbK9dI1ta/UwuOc1HRfMQvPSCtcNOmVBdiHzUEh6REoeZBCONmL+PZwSV gdii0s7Vx/s52jH8A1PQYwkkHw9YqXyjHxrrr/jGLWyyR7H1KXSZpkgeusUpVeqsGy6D hURXqfMjL0W5jtLLmOK6G1hVPp3iOLlOrIF3A= 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:mime-version:content-transfer-encoding; bh=8a+BZEe7v/lxE++Jk26DJvDIeRtcgS+edmxjVgSar6E=; b=C9g8O8TvK2b3t9iQ31ldssvkq90UYPhzSjNKzIbfhaCJHblthyYwA6bzaMtOGA9PA0 Ay2U8gOV9ZiVIr//9TE39xN76r115bji4dbVMCEq4IcFYIhPqsa5LZeT/g1at337jtvI BPyhliDBv7ZGZCZkhwABvQFzpcpWCH20BYKpkf0dOp8Lb91TnSpLBxrOZjjC8JhUaDEk voviNHcwtZvfPf1zFWOcsucFxwUUXGba4B5pAjQEa7e2K04sez3OvjqfWcEguSTSP2Ys 4hlb3rcuTVJ02ZvK0tMrcLBpa4ClAAhawhOrT4Xf+Z+FSh3xdQfkfbZtl5ePiy4ELlC3 uqmA== X-Gm-Message-State: APjAAAWV3GeMkbUrNmLxSocW4Q2ogCkEYQGyDGO4oG/+Jf//DcvNLJWm GS5G03DfSwx3XKHcuRWHRfaocQ== X-Received: by 2002:a62:6fc6:: with SMTP id k189mr74302179pfc.154.1555546500578; Wed, 17 Apr 2019 17:15:00 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id q5sm447668pff.97.2019.04.17.17.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 17:15:00 -0700 (PDT) From: Douglas Anderson To: Minas Harutyunyan , Felipe Balbi , heiko@sntech.de Cc: Alan Stern , Artur Petrosyan , amstan@chromium.org, linux-rockchip@lists.infradead.org, William Wu , linux-usb@vger.kernel.org, Stefan Wahren , Randy Li , zyw@rock-chips.com, mka@chromium.org, ryandcase@chromium.org, Amelie Delaunay , jwerner@chromium.org, dinguyen@opensource.altera.com, Elaine Zhang , Douglas Anderson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Greg Kroah-Hartman , Mark Rutland Subject: [PATCH v2 3/5] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB Date: Wed, 17 Apr 2019 17:13:54 -0700 Message-Id: <20190418001356.124334-4-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog In-Reply-To: <20190418001356.124334-1-dianders@chromium.org> References: <20190418001356.124334-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some SoCs with a dwc2 USB controller may need to keep the PHY on to support remote wakeup. Allow specifying this as a device tree property. Signed-off-by: Douglas Anderson --- For relevant prior discussion on this patch, see: https://lkml.kernel.org/r/1435017144-2971-3-git-send-email-dianders@chromium.org I didn't make any changes from the prior version since I never found out what Rob thought of my previous arguments. If folks want a change, perhaps they could choose from these options: 1. Assume that all dwc2 hosts would like to keep their PHY on for suspend if there's a USB wakeup enabled, thus we totally drop this binding. This doesn't seem super great to me since I'd bet that many devices that use dwc2 weren't designed for USB wakeup (they may not keep enough clocks or rails on) so we might be wasting power for nothing. 2. Rename this property to "snps,wakeup-from-suspend-with-phy" to make it more obvious that this property is intended both to document that wakeup from suspend is possible and that we need the PHY for said wakeup. 3. Rename this property to "snps,can-wakeup-from-suspend" and assume it's implicit that if we can wakeup from suspend that we need to keep the PHY on. If/when someone shows that a device exists using dwc2 where we can wakeup from suspend without the PHY they can add a new property. Changes in v2: None Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index f70f3aee4bfc..1c5e29d23c51 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -37,6 +37,8 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties - g-rx-fifo-size: size of rx fifo size in gadget mode. - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode. - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode. +- snps,need-phy-for-wake: If present indicates that the phy needs to be left + on for remote wakeup during suspend. - snps,reset-phy-on-wake: If present indicates that we need to reset the PHY when we detect a wakeup. This is due to a hardware errata. @@ -53,4 +55,5 @@ Example: clock-names = "otg"; phys = <&usbphy>; phy-names = "usb2-phy"; + snps,need-phy-for-wake; }; -- 2.21.0.593.g511ec345e18-goog