Re: [PATCH v4 20/20] usb: dwc3: make HIRD threshold configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux