[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141030163743.GJ10130@saruman>
Date: Thu, 30 Oct 2014 11:37:43 -0500
From: Felipe Balbi <balbi@...com>
To: Huang Rui <ray.huang@....com>
CC: Felipe Balbi <balbi@...com>,
Alan Stern <stern@...land.harvard.edu>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Jason Chang <jason.chang@....com>,
Vincent Wan <vincent.wan@....com>, Tony Li <tony.li@....com>,
<linux-usb@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 20/20] usb: dwc3: make HIRD threshold configurable
On Thu, Oct 30, 2014 at 06:08:45PM +0800, Huang Rui wrote:
> HIRD threshold should be configurable by different platforms.
>
> From DesignWare databook:
> When HIRD_Threshold[4] is set to 1b1 and HIRD value is greater than or
> equal to the value in HIRD_Threshold[3:0], dwc3 asserts output signals
> utmi_l1_suspend_n to put PHY into Deep Low-Power mode in L1.
>
> When HIRD_Threshold[4] is set to 1b0 or the HIRD value is less than
> HIRD_Threshold[3:0], dwc3 asserts output signals utmi_sleep_n on L1.
>
> Signed-off-by: Huang Rui <ray.huang@....com>
> ---
> Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++
> drivers/usb/dwc3/core.c | 17 +++++++++++++++++
> drivers/usb/dwc3/core.h | 6 ++++++
> drivers/usb/dwc3/gadget.c | 6 +-----
> drivers/usb/dwc3/platform_data.h | 3 +++
> 5 files changed, 30 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
> index feaf2c8..5b99755 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -34,6 +34,9 @@ Optional properties:
> LTSSM during USB3 Compliance mode.
> - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy.
> - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy.
> + - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
> + utmi_l1_suspend_n, false when asserts utmi_sleep_n
> + - snps,hird-threshold: HIRD threshold
>
> This is usually a subnode to DWC3 glue to which it is connected.
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index a28ed1c..f4172ab 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -729,6 +729,7 @@ static int dwc3_probe(struct platform_device *pdev)
> struct dwc3 *dwc;
> u8 lpm_nyet_threshold;
> u8 tx_de_emphasis;
> + u8 hird_threshold;
>
> int ret;
>
> @@ -790,12 +791,22 @@ static int dwc3_probe(struct platform_device *pdev)
> /* default to -3.5dB de-emphasis */
> tx_de_emphasis = 1;
>
> + /*
> + * defalut to assert utmi_sleep_n and use maximum allowed HIRD
default
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists