From patchwork Fri Apr 12 22:41:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10899183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9741B13B5 for ; Fri, 12 Apr 2019 22:42:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7864728748 for ; Fri, 12 Apr 2019 22:42:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CB1E28F20; Fri, 12 Apr 2019 22:42:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A93128748 for ; Fri, 12 Apr 2019 22:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbfDLWml (ORCPT ); Fri, 12 Apr 2019 18:42:41 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44364 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbfDLWmR (ORCPT ); Fri, 12 Apr 2019 18:42:17 -0400 Received: by mail-pl1-f194.google.com with SMTP id g12so5766807pll.11 for ; Fri, 12 Apr 2019 15:42:16 -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=kWLUeccQHJNmQbwFQHETrVq/WCQE28hsAbD/ch2jk/0=; b=iNMu0LcBBkEoblkNikvLsoe0iRPOEcYwdGkme5UBFA+0XD/4tIOYO3Vx+bjaKXVji7 M9To4tbMSajbIxOowKsnAp4q+36Y4WzW03NdM1LpN81G934TCBDxl1SozQCahv/f3raJ 4+lFk6UNxhDm3Ecv5oEwAFbQCwkJy4u1t8ZN4= 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=kWLUeccQHJNmQbwFQHETrVq/WCQE28hsAbD/ch2jk/0=; b=c0lOZQSfXfNLSvIaAsXOzgvQExY50xjGQGkZI8wbvd6imFpo6X89hfnG0Ny32gh7jP kwN9Dvqeh/hbDAlNB1+vhN1mqQL9aatz8mSQvKZI+8dytyWXu4Sp1LZm4nqprQBDqWaY hSgYoGA9Czs4jxsCS/XCXwQJG4RJYzrHyvLxhC/VfAdzGL0wHtC8wqLTWNkLLYkrDMFY 6ubA212XA7UvFY/3hKIvUD5rjSFkZMv0lhGBtF7VRROs5eGwpJFsrPczpjz5b80XND9l s5WrMBEQnkLGDKD5Wxyyp0BLY16/ID4+eC0CoBZAg+NrL5l/+uNgL83JEZYj3lIjl6E7 gg3Q== X-Gm-Message-State: APjAAAXs0Q5QMHvUz8TNQlpHpKWvqQjp6wtkl14pmYI5beuCFkbQ7CGJ WyiJCblLL78Z+HRJLwfqo8oybQ== X-Google-Smtp-Source: APXvYqxcV0ZgFhV+rNuPFw2kv/DYtmiXsbIMqoDb86eGxEMGMKNVH9kszsGPxxLMa87ZWhMQFr0SUg== X-Received: by 2002:a17:902:e508:: with SMTP id ck8mr58797653plb.96.1555108936236; Fri, 12 Apr 2019 15:42:16 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id j22sm57170579pfn.129.2019.04.12.15.42.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 15:42:15 -0700 (PDT) From: Douglas Anderson To: Rob Herring , Minas Harutyunyan , Heiko Stuebner , Felipe Balbi Cc: amstan@chromium.org, linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org, Randy Li , mka@chromium.org, ryandcase@chromium.org, jwerner@chromium.org, Elaine Zhang , Douglas Anderson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Rutland Subject: [PATCH 1/4] dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup Date: Fri, 12 Apr 2019 15:41:46 -0700 Message-Id: <20190412224149.106971-2-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190412224149.106971-1-dianders@chromium.org> References: <20190412224149.106971-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Rockchip rk3288 there's a hardware quirk where we need to assert the reset signal to the PHY when we get a remote wakeup on one of the two ports. Document this quirk in the bindings. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index 6dc3c4a34483..f70f3aee4bfc 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,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. Deprecated properties: - g-use-dma: gadget DMA mode is automatically detected From patchwork Fri Apr 12 22:41:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10899181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94AB41708 for ; Fri, 12 Apr 2019 22:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7246C28748 for ; Fri, 12 Apr 2019 22:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 660F828F20; Fri, 12 Apr 2019 22:42:39 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B59FA28748 for ; Fri, 12 Apr 2019 22:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbfDLWmS (ORCPT ); Fri, 12 Apr 2019 18:42:18 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42566 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727130AbfDLWmS (ORCPT ); Fri, 12 Apr 2019 18:42:18 -0400 Received: by mail-pf1-f194.google.com with SMTP id w25so5784056pfi.9 for ; Fri, 12 Apr 2019 15:42:17 -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=m7bMG3CshorQmg1lKkeTmGf1nYdxxwbwlljLNgyUqRE=; b=fbSrJK0g0fV9BeN6bDPthd9lwEe9RLJC+eoaMbx0RbbjJBVQAYnXPHCBoED/Iwmtoy 43NBpBf2SWtGJXyPHTMBb6VifLYayinWnZmQZQc/fNKtRQB8E+htKim93DGLixzSaRGI 9XLSySNPGmeKLiswXK6NlSTK6HU0CXSn6zWis= 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=m7bMG3CshorQmg1lKkeTmGf1nYdxxwbwlljLNgyUqRE=; b=GunXFp/D1EYkn47SwEJZJxt8FaVuHMv48J2S/c7xgSwRfTHrtW+4VZsaEJpnZGEzWy NzXDzZMkoaZ2+4mN96HcMA6TqHlK6OIXGFUd/QcvSUq5QNTfJk2gbckPQ+bzqo058Qny jDes1r9znFjou2kCJSIElJmAt1+0cCvQIdxxdqa+eSWb8SS18CifJ7sMvMUWbn4TywYq +U3bFnuUAOLeEyUNMnAgRsytpMYoLMUr3f/wHNQW3gc0j+6C29/MRFaMJg9Qg8Eg/WgM v3CoIhw+VZNjHtxJzmFMdNH1j7/XwzE4D71cGvGiLH+xGuefA4f7dsnjJASt99DP+UrN Et3g== X-Gm-Message-State: APjAAAWiKUI2D0jX/MS8RquB1vRKvWyfulAadEjfnYK4lV47EAKv5lYf b/v2zlZP4+0Vr0t5qh3NTU1K+A== X-Google-Smtp-Source: APXvYqweeBTDzcVs0mDhVE440cgj90OdEU1JkqINcR2OMkCnTKxWPM/VbLWGNBobMDyb4Goe8LhlsA== X-Received: by 2002:a63:6193:: with SMTP id v141mr56642537pgb.392.1555108937371; Fri, 12 Apr 2019 15:42:17 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id j22sm57170579pfn.129.2019.04.12.15.42.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 15:42:16 -0700 (PDT) From: Douglas Anderson To: Rob Herring , Minas Harutyunyan , Heiko Stuebner , Felipe Balbi Cc: amstan@chromium.org, linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org, Randy Li , mka@chromium.org, ryandcase@chromium.org, jwerner@chromium.org, Elaine Zhang , Douglas Anderson , Yunzhi Li , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] usb: dwc2: optionally assert phy reset when waking up Date: Fri, 12 Apr 2019 15:41:47 -0700 Message-Id: <20190412224149.106971-3-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190412224149.106971-1-dianders@chromium.org> References: <20190412224149.106971-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On the rk3288 USB host-only port (the one that's not the OTG-enabled port) the PHY can get into a bad state when a wakeup is asserted (not just a wakeup from full system suspend but also a wakeup from autosuspend). We can get the PHY out of its bad state by asserting its "port reset", but unfortunately that seems to assert a reset onto the USB bus so it could confuse things if we don't actually deenumerate / reenumerate the device. We can also get the PHY out of its bad state by fully resetting it using the reset from the CRU (clock reset unit), which does a more full reset. The CRU-based reset appears to actually cause devices on the bus to be removed and reinserted, which fixes the problem (albeit in a hacky way). It's unfortunate that we need to do a full re-enumeration of devices at wakeup time, but this is better than alternative of letting the bus get wedged. Signed-off-by: Douglas Anderson Signed-off-by: Yunzhi Li --- drivers/usb/dwc2/core.h | 5 +++++ drivers/usb/dwc2/core_intr.c | 12 ++++++++++++ drivers/usb/dwc2/hcd.c | 16 +++++++++++++--- drivers/usb/dwc2/platform.c | 9 +++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 30bab8463c96..f30748f4fe7e 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -859,6 +859,8 @@ struct dwc2_hregs_backup { * @gadget_enabled: Peripheral mode sub-driver initialization indicator. * @ll_hw_enabled: Status of low-level hardware resources. * @hibernated: True if core is hibernated + * @reset_phy_on_wake: Quirk saying that we should assert PHY reset on a + * remote wakeup. * @frame_number: Frame number read from the core. For both device * and host modes. The value ranges are from 0 * to HFNUM_MAX_FRNUM. @@ -972,6 +974,7 @@ struct dwc2_hregs_backup { * @status_buf_dma: DMA address for status_buf * @start_work: Delayed work for handling host A-cable connection * @reset_work: Delayed work for handling a port reset + * @phy_reset_work: Work structure for doing a PHY reset * @otg_port: OTG port number * @frame_list: Frame list * @frame_list_dma: Frame list DMA address @@ -1045,6 +1048,7 @@ struct dwc2_hsotg { unsigned int gadget_enabled:1; unsigned int ll_hw_enabled:1; unsigned int hibernated:1; + unsigned int reset_phy_on_wake:1; u16 frame_number; struct phy *phy; @@ -1147,6 +1151,7 @@ struct dwc2_hsotg { struct delayed_work start_work; struct delayed_work reset_work; + struct work_struct phy_reset_work; u8 otg_port; u32 *frame_list; dma_addr_t frame_list_dma; diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index 19ae2595f1c3..16ff33574116 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -435,6 +435,18 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg) /* Restart the Phy Clock */ pcgcctl &= ~PCGCTL_STOPPCLK; dwc2_writel(hsotg, pcgcctl, PCGCTL); + + /* + * If we've got this quirk then the PHY is stuck upon + * wakeup. Assert reset. This will propagate out and + * eventually we'll re-enumerate the device. Not great + * but the best we can do. We can't call phy_reset() + * at interrupt time but there's no hurry, so we'll + * schedule it for later. + */ + if (hsotg->reset_phy_on_wake) + schedule_work(&hsotg->phy_reset_work); + mod_timer(&hsotg->wkp_timer, jiffies + msecs_to_jiffies(71)); } else { diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 3f087962f498..332349148d3f 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4376,6 +4376,17 @@ static void dwc2_hcd_reset_func(struct work_struct *work) spin_unlock_irqrestore(&hsotg->lock, flags); } +static void dwc2_hcd_phy_reset_func(struct work_struct *work) +{ + struct dwc2_hsotg *hsotg = container_of(work, struct dwc2_hsotg, + phy_reset_work); + int ret; + + ret = phy_reset(hsotg->phy); + if (ret) + dev_warn(hsotg->dev, "PHY reset failed\n"); +} + /* * ========================================================================= * Linux HC Driver Functions @@ -5271,11 +5282,10 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg) hsotg->hc_ptr_array[i] = channel; } - /* Initialize hsotg start work */ + /* Initialize work */ INIT_DELAYED_WORK(&hsotg->start_work, dwc2_hcd_start_func); - - /* Initialize port reset work */ INIT_DELAYED_WORK(&hsotg->reset_work, dwc2_hcd_reset_func); + INIT_WORK(&hsotg->phy_reset_work, dwc2_hcd_phy_reset_func); /* * Allocate space for storing data on status transactions. Normally no diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index c0b64d483552..9b65b766e0b9 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -481,6 +481,15 @@ static int dwc2_driver_probe(struct platform_device *dev) hsotg->gadget_enabled = 1; } + hsotg->reset_phy_on_wake = + of_property_read_bool(dev->dev.of_node, + "snps,reset-phy-on-wake"); + if (hsotg->reset_phy_on_wake && !hsotg->phy) { + dev_warn(hsotg->dev, + "Quirk reset-phy-on-wake only supports generic PHYs\n"); + hsotg->reset_phy_on_wake = false; + } + if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) { retval = dwc2_hcd_init(hsotg); if (retval) { From patchwork Fri Apr 12 22:41:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10899169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80BB813B5 for ; Fri, 12 Apr 2019 22:42:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6806828748 for ; Fri, 12 Apr 2019 22:42:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B79C28F21; Fri, 12 Apr 2019 22:42:28 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFAD28748 for ; Fri, 12 Apr 2019 22:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727186AbfDLWmU (ORCPT ); Fri, 12 Apr 2019 18:42:20 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34015 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727166AbfDLWmT (ORCPT ); Fri, 12 Apr 2019 18:42:19 -0400 Received: by mail-pg1-f194.google.com with SMTP id v12so5863944pgq.1 for ; Fri, 12 Apr 2019 15:42:18 -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=QzD3qq/PMUVMpjWUpPygcIhbopx0mZxT37qNcK5sZeg=; b=I51Nr8NvO7I03CvvyUyTROENQTyD5o14qi2nx7dIdi+6gWVZccni3+8Y7liLPOoM6S y9AG/P3jxdIb+NZo10L2IGrB8/rc53LHv3xCCHWPWM+fMXpDiqO5LcdzLIgZz+NkIkQb YE2yvYHVcGNlyAKI03VIkTIuDLRqZg1dLbm2k= 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=QzD3qq/PMUVMpjWUpPygcIhbopx0mZxT37qNcK5sZeg=; b=fAZpT3fPQJZ2HesSiyTx8B/HLht4WilC2uh2hYGQX0XmLn2w/WQRXvJx0BKFNANRSn 4G0qvwJ8kR8FZM9bnFcM9QffB9mq1TaHKdNgtWIDsmXtL7PGjNKqnaZiceXC+Qs27K3n dMGOCB3lfMo+oHqizhG7yYZ355QpQALNVgwG982P5RFqBVGvouyXYB/DdfFqjfCzC3Yl HSI9P7LhajSXESiBvbB7zYFxYrwdkfZ8gqwrO7TESuqytAZQsC/EI12K40laQimcMg68 iY2q3+kYPpgQUabDNXghS0azsTRdqXN9RTCDdK6PEL3Vt0VEkl23lCK0QcRhD7QXbmDH wujg== X-Gm-Message-State: APjAAAVZQ3OPBTkvTxck/Pm4HqWxEyiomd8eyvifnNHaylFzqAksvW9w ffm1olf2i9lHTXoS8LlPAUeDRA== X-Google-Smtp-Source: APXvYqwsHgmjXC6uKa5IaBxOFT2e9eBfb4WK9JupK/WhHmuI1mKfXXGN9jIgHYYXdygBtHRX1fxrvA== X-Received: by 2002:aa7:8384:: with SMTP id u4mr59216540pfm.214.1555108938477; Fri, 12 Apr 2019 15:42:18 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id j22sm57170579pfn.129.2019.04.12.15.42.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 15:42:17 -0700 (PDT) From: Douglas Anderson To: Rob Herring , Minas Harutyunyan , Heiko Stuebner , Felipe Balbi Cc: amstan@chromium.org, linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org, Randy Li , mka@chromium.org, ryandcase@chromium.org, jwerner@chromium.org, Elaine Zhang , Douglas Anderson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288. Date: Fri, 12 Apr 2019 15:41:48 -0700 Message-Id: <20190412224149.106971-4-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190412224149.106971-1-dianders@chromium.org> References: <20190412224149.106971-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let's hook up the resets to the three USB PHYs on rk3288 as per the bindings. This is in preparation for a future patch that will set the "snps,reset-phy-on-wake" on the host port. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- arch/arm/boot/dts/rk3288.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 2e604f0afa98..92e0600595f8 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -905,6 +905,8 @@ clocks = <&cru SCLK_OTGPHY0>; clock-names = "phyclk"; #clock-cells = <0>; + resets = <&cru SRST_USBOTG_PHY>; + reset-names = "phy-reset"; }; usbphy1: usb-phy@334 { @@ -913,6 +915,8 @@ clocks = <&cru SCLK_OTGPHY1>; clock-names = "phyclk"; #clock-cells = <0>; + resets = <&cru SRST_USBHOST0_PHY>; + reset-names = "phy-reset"; }; usbphy2: usb-phy@348 { @@ -921,6 +925,8 @@ clocks = <&cru SCLK_OTGPHY2>; clock-names = "phyclk"; #clock-cells = <0>; + resets = <&cru SRST_USBHOST1_PHY>; + reset-names = "phy-reset"; }; }; };