From: Thinh Nguyen <thinh.nguyen@synopsys.com>
To: Rob Herring <robh@kernel.org>, Thinh Nguyen <thinh.nguyen@synopsys.com>
Cc: Felipe Balbi <balbi@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
John Youn <john.youn@synopsys.com>
Subject: Re: [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns
Date: Wed, 19 Dec 2018 00:22:07 +0000 [thread overview]
Message-ID: <30102591E157244384E984126FC3CB4F639AB1BC@us01wembx1.internal.synopsys.com> (raw)
In-Reply-To: 20181218163858.GA12336@bogus
Hi Rob,
On 12/18/2018 8:39 AM, Rob Herring wrote:
> On Fri, Dec 07, 2018 at 06:27:30PM -0800, Thinh Nguyen wrote:
>> 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 <thinhn@synopsys.com>
>> ---
>> 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.
> Shouldn't you be able to retrieve the refclk frequency and then
> calculate the period?
The thing is we cannot determine the ref_clk frequency for some devices
that don't specify their clocks. So I think we should have an option to
inform the controller of the ref_clk period for those devices.
Thanks for the the review,
Thinh
WARNING: multiple messages have this Message-ID (diff)
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Rob Herring <robh@kernel.org>, Thinh Nguyen <thinh.nguyen@synopsys.com>
Cc: Felipe Balbi <balbi@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
John Youn <john.youn@synopsys.com>
Subject: [v2,1/4] usb: dwc3: Add property snps,refclk-period-ns
Date: Wed, 19 Dec 2018 00:22:07 +0000 [thread overview]
Message-ID: <30102591E157244384E984126FC3CB4F639AB1BC@us01wembx1.internal.synopsys.com> (raw)
Hi Rob,
On 12/18/2018 8:39 AM, Rob Herring wrote:
> On Fri, Dec 07, 2018 at 06:27:30PM -0800, Thinh Nguyen wrote:
>> 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 <thinhn@synopsys.com>
>> ---
>> 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.
> Shouldn't you be able to retrieve the refclk frequency and then
> calculate the period?
The thing is we cannot determine the ref_clk frequency for some devices
that don't specify their clocks. So I think we should have an option to
inform the controller of the ref_clk period for those devices.
Thanks for the the review,
Thinh
next prev parent reply other threads:[~2018-12-19 0:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-08 2:27 [PATCH v2 0/4] usb: dwc3: Introduce refclk lpm Thinh Nguyen
2018-12-08 2:27 ` [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns Thinh Nguyen
2018-12-08 2:27 ` [v2,1/4] " Thinh Nguyen
2018-12-18 16:38 ` [PATCH v2 1/4] " Rob Herring
2018-12-18 16:38 ` [v2,1/4] " Rob Herring
2018-12-19 0:22 ` Thinh Nguyen [this message]
2018-12-19 0:22 ` Thinh Nguyen
2018-12-19 13:18 ` [PATCH v2 1/4] " Rob Herring
2018-12-19 13:18 ` [v2,1/4] " Rob Herring
2018-12-19 21:31 ` [PATCH v2 1/4] " Thinh Nguyen
2018-12-19 21:31 ` [v2,1/4] " Thinh Nguyen
2018-12-20 6:48 ` [PATCH v2 1/4] " Felipe Balbi
2018-12-20 6:48 ` [v2,1/4] " Felipe Balbi
2018-12-21 0:21 ` [PATCH v2 1/4] " Thinh Nguyen
2018-12-21 0:21 ` [v2,1/4] " Thinh Nguyen
2018-12-21 17:11 ` [PATCH v2 1/4] " Rob Herring
2018-12-21 17:11 ` [v2,1/4] " Rob Herring
2018-12-21 19:30 ` [PATCH v2 1/4] " Thinh Nguyen
2018-12-21 19:30 ` [v2,1/4] " Thinh Nguyen
2018-12-08 2:27 ` [PATCH v2 3/4] usb: dwc3: Add property snps,enable-refclk-sof Thinh Nguyen
2018-12-08 2:27 ` [v2,3/4] " Thinh Nguyen
2018-12-18 16:41 ` [PATCH v2 3/4] " Rob Herring
2018-12-18 16:41 ` [v2,3/4] " Rob Herring
2018-12-19 0:19 ` [PATCH v2 3/4] " Thinh Nguyen
2018-12-19 0:19 ` [v2,3/4] " Thinh Nguyen
2018-12-20 6:52 ` [PATCH v2 3/4] " Felipe Balbi
2018-12-20 6:52 ` [v2,3/4] " Felipe Balbi
2018-12-20 15:19 ` [PATCH v2 3/4] " Rob Herring
2018-12-20 15:19 ` [v2,3/4] " Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30102591E157244384E984126FC3CB4F639AB1BC@us01wembx1.internal.synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=john.youn@synopsys.com \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.