From patchwork Sat Dec 8 02:27:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 1009727 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="brf7njFK"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43BYC84ymYz9s8F for ; Sat, 8 Dec 2018 13:27:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726081AbeLHC1c (ORCPT ); Fri, 7 Dec 2018 21:27:32 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:45514 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbeLHC1c (ORCPT ); Fri, 7 Dec 2018 21:27:32 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id C881F24E05B9; Fri, 7 Dec 2018 18:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1544236051; bh=pg1hUK46eUNAF16CJuvSDi1HGvcfjuSL0QdiO35kR10=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=brf7njFKIwS92y7gbb0vr0wUmEQQ5q4CZHDU5iGV9P6Xy/wEyUMxcDRw3ibQjLNcK EIF7TrhkNvBxDOSXCfrfWXvtK74yL7TeKph+K/0v8E6mTkN132Xlll2QRHeKAanlFN VG3tQcC6WExg82526THMui6fENB96OcIy61/v7YfYDUV5ORYNCEoIQraQt8FkUx2Bq 7fDGJFF7NPUTZMECZnyDzbG+FcNqdB8bNnq0D60N86ptoNBrh5EJQ/Kfdko8VE3GQU 4dV5av6N9rpyCOYsGnyIbWGCR9WXnkq/LN/VkcgRp7ys5xJBHsebI6U2QR2rTx2I/x kcE3PoOrnK8UQ== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2.internal.synopsys.com [10.12.239.237]) by mailhost.synopsys.com (Postfix) with ESMTP id B82163A81; Fri, 7 Dec 2018 18:27:31 -0800 (PST) Received: from US01WEHTC1.internal.synopsys.com (10.12.239.236) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 7 Dec 2018 18:27:31 -0800 Received: from te-lab16 (10.13.184.20) by us01wehtc1.internal.synopsys.com (10.12.239.236) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 7 Dec 2018 18:27:30 -0800 Received: by te-lab16 (sSMTP sendmail emulation); Fri, 07 Dec 2018 18:27:30 -0800 Date: Fri, 7 Dec 2018 18:27:30 -0800 Message-ID: <83adc98adc1760a0fad87d81d171e1dac783e7e5.1544235317.git.thinhn@synopsys.com> In-Reply-To: References: From: Thinh Nguyen Subject: [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns To: Felipe Balbi , , , Rob Herring , Mark Rutland CC: John Youn MIME-Version: 1.0 X-Originating-IP: [10.13.184.20] Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch introduces property "snps,refclk-period-ns" to inform the controller of the reference clock period. If the reference clock period is different from the default Core Consultant setting, then this property can be set to the reference clock period. This property does not control the reference clock rate. The controller uses this value to perform internal timing calculations that are based on the reference clock. Signed-off-by: Thinh Nguyen --- Changes in v2: - Split from "usb: dwc3: Add reference clock properties" - Revise commit message and property description Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 8e5265e9f658..b7e67edff9b2 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -99,6 +99,8 @@ Optional properties: this and tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 programming guide section 1.2.3) to enable periodic ESS TX threshold. + - snps,refclk-period-ns: if set, this value informs the controller of the + reference clock period in nanoseconds. - tx-fifo-resize: determines if the FIFO *has* to be reallocated. - snps,incr-burst-type-adjustment: Value for INCR burst type of GSBUSCFG0 From patchwork Sat Dec 8 02:27:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 1009728 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="RR3UkGBy"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43BYCP4mj7z9s8F for ; Sat, 8 Dec 2018 13:27:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbeLHC1p (ORCPT ); Fri, 7 Dec 2018 21:27:45 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:45520 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbeLHC1p (ORCPT ); Fri, 7 Dec 2018 21:27:45 -0500 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id CA60524E062E; Fri, 7 Dec 2018 18:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1544236064; bh=rdSTznapJllTPBNgynndcRvRaXmoijFTEWxr8I3HR1A=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=RR3UkGByaeEo5GPhcPaG5zQwzgwLLEmMARnCL8CoUi5qNU9xbTdb/a+Jmo8gnCl9Z jgr2PmZnSlaS2w1V6T50ckPxNZlbN0uHc8clDyJShgym59xRTwu2qAe7vDOtxP4BF9 fb4dmAvaD8c5PJDTLudF3aBNWnytoSILYVzDmMRMFeFTC7fRnAOMfyyDQscn647YsY a7iuazQT8ePG7vwgUo0l1ZoJiX875osZahiCyeCpy9IUbAdUJwaCClIeZq1q8htVKh Z2Aff9m3GudFrZsBH2aqA43U1H7sT+SFMZ0MqGfq4ZMGLupPRNbW1pyjRFGlymQIYN bjrLrWTPm5ZSg== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id B385D3824; Fri, 7 Dec 2018 18:27:44 -0800 (PST) Received: from US01WEHTC1.internal.synopsys.com (10.12.239.236) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 7 Dec 2018 18:27:44 -0800 Received: from te-lab16 (10.13.184.20) by us01wehtc1.internal.synopsys.com (10.12.239.236) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 7 Dec 2018 18:27:43 -0800 Received: by te-lab16 (sSMTP sendmail emulation); Fri, 07 Dec 2018 18:27:43 -0800 Date: Fri, 7 Dec 2018 18:27:43 -0800 Message-ID: In-Reply-To: References: From: Thinh Nguyen Subject: [PATCH v2 3/4] usb: dwc3: Add property snps,enable-refclk-sof To: Felipe Balbi , , , Rob Herring , Mark Rutland CC: John Youn MIME-Version: 1.0 X-Originating-IP: [10.13.184.20] Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds a property to enable the controller to track the frame number based on the reference clock. When operating in USB 2.0 mode, the peripheral controller uses the USB2 PHY clocks to track the frame number. This prevents the controller from suspending the USB2 PHY when the device goes into low power. Version 1.80a of the DWC_usb31 peripheral controller introduces a way to track frame number based on the reference clock instead. This feature allows the controller to suspend the USB2 PHY when the device goes into low power. This improves power saving for devices that have isochronous endpoints. Signed-off-by: Thinh Nguyen --- Changes in v2: - Revise property description - Rename property from snps,enable-refclk-lpm to snps,enable-refclk-sof Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index b7e67edff9b2..01b948fff0eb 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -101,6 +101,9 @@ Optional properties: enable periodic ESS TX threshold. - snps,refclk-period-ns: if set, this value informs the controller of the reference clock period in nanoseconds. + - snps,enable-refclk-sof: set to enable reference clock based frame number + tracking while in low power, allowing the controller to + suspend the PHY during low power states. - tx-fifo-resize: determines if the FIFO *has* to be reallocated. - snps,incr-burst-type-adjustment: Value for INCR burst type of GSBUSCFG0