1
0
Fork 0
Commit Graph

157 Commits (32f2ed864dd523bca2ee804effa9f3f43aa03ba6)

Author SHA1 Message Date
William Wu 32f2ed864d usb: dwc3: make usb2 phy utmi interface configurable
Support to configure the UTMI+ PHY with an 8- or 16-bit
interface via DT. The UTMI+ PHY interface is a hardware
capability, and it's platform dependent. Normally, the
PHYIF can be configured during coreconsultant.

But for some specific USB cores(e.g. rk3399 SoC DWC3),
the default PHYIF configuration value is false, so we
need to reconfigure it by software.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-08-25 12:13:11 +03:00
William Wu 16199f3389 usb: dwc3: add dis_u2_freeclk_exists_quirk
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit,
which specifies whether the USB2.0 PHY provides a free-running
PHY clock, which is active when the clock control input is active.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-08-25 12:13:11 +03:00
Felipe Balbi 0b3e4af3c7 usb: dwc3: gadget: add sg and num_pending_sgs to dwc3_request
These two fields will be used in a follow-up patch
to track how many entries of request's sglist we
have already processed. The reason is that if a
gadget driver sends an sglist with more entries then
we can fit in the ring, we will have to continue
processing remaining afterwards.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-08-22 10:45:37 +03:00
Felipe Balbi 68d34c8a74 usb: dwc3: gadget: keep track of allocated and queued reqs
We will be using this information to change how we
figure out when we need LST bit. For now, just
update our counters.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:49 +03:00
William Wu 475c8beb35 usb: dwc3: add DWC3_GUCTL1 reg for debug
GUCTL1 reg has some useful functions which can be
written by user. For rockchip platform, we set
GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK (bit26, applicable
for the core is programmed to operate in 2.0 device
only) to 1 in bootrom, and after start the kernel,
we want to check whether this bit can be reset to
default 0 after the core reset. Dump GUCTL1 reg from
debugfs is more convenient for us.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:46 +03:00
John Youn e77c561432 usb: dwc3: Fix DWC3_USB31_REVISION_110A definition
The DWC3_USB31_REVISION_110A macro uses an invalid constant name in its
definition. This is currently not used.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:46 +03:00
Felipe Balbi 74674cbf85 usb: dwc3: gadget: add a per-endpoint request queue lock
This will allow us to process several endpoints at a
time by making sure that we lock only shared
resources.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:38 +03:00
Felipe Balbi fc8bb91bc8 usb: dwc3: implement runtime PM
this patch implements the most basic pm_runtime
support for dwc3. Whenever USB cable is dettached,
then we will allow core to runtime_suspend.

Runtime suspending will involve completely tearing
down event buffers and require a full soft-reset of
the IP.

Note that a further optimization could be
implemented once we decide to support hibernation,
which is to allow runtime_suspend with cable
connected when bus is in U3. That's subject to a
separate patch, however.

Tested-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:38 +03:00
Felipe Balbi 3f308d17d7 usb: dwc3: gadget: hold gadget IRQ in dwc->irq_gadget
by holding gadget's IRQ number in dwc->irq_gadget,
it'll be simpler to free_irq() and disable the IRQ
in case an IRQ fires while we are runtime suspended.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:36 +03:00
Felipe Balbi 51f5d49ad6 usb: dwc3: core: simplify suspend/resume operations
now that we have re-factored dwc3_core_init() and
dwc3_core_exit() we can use them for suspend/resume
operations.

This will help us avoid some common mistakes when
patching code when we have duplicated pieces of code
doing the same thing.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:36 +03:00
Felipe Balbi bcdb3272e8 usb: dwc3: core: move fladj to dwc3 structure
this patch is in preparation for some further
re-factoring in dwc3 initialization. No functional
changes.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:35 +03:00
Felipe Balbi 2eb8801650 usb: dwc3: gadget: add a pointer to endpoint registers
By adding a pointer to endpoint registers' base
address, we can avoid using our controller-wide
struct dwc3 pointer for everything. At some point
this will allow us to have per-endpoint locks which
will, in turn, let us queue requests to separate
endpoints in parallel.

Because of this change our debugfs interface and io
accessors need to be changed accordingly.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:35 +03:00
Felipe Balbi 2cd4718d0b usb: dwc3: gadget: pass dep as argument to endpoint command
In all call sites of dwc3_send_gadget_ep_cmd() we
already had a valid dep pointer, so instead of
passing dwc and dep->number, which would be used to
fetch the same pointer we already had, just pass dep
directly.

In other words, we're changing:

	struct dwc3_ep *dep = dwc[dep->number];

to just passing struct dwc3_ep *dep as argument.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:32:31 +03:00
Felipe Balbi 4e99472bc1 usb: dwc3: gadget: initialize NUMP based on RxFIFO Size
Instead of using burst size to configure NUMP, we
should be using RxFIFO Size instead. DWC3 is smart
enough to know that it shouldn't burst in case burst
size is 0.

Reported-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:30:07 +03:00
Felipe Balbi 9f8a67b65a usb: dwc3: gadget: fix gadget suspend/resume
Instead of trying hard to stay connected to the
host, it's best (and far easier) to disconnect from
the host already.

Anything relying on KEEP_CONNECT will just have that
ignored, but we don't have proper hibernation
implementation yet, so there are no regressions.

In any case, hibernation is only useful for runtime
PM, not system sleep.

While at that, also remove dwc3.dcfg which has been
rendered unnecessary.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20 12:30:04 +03:00
John Youn 50c763f8c1 usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command
As of core revision 2.60a the recommended programming model is to set
the ClearPendIN bit when issuing a Clear Stall EP command for IN
endpoints. This is to prevent an issue where some (non-compliant) hosts
may not send ACK TPs for pending IN transfers due to a mishandled error
condition. Synopsys STAR 9000614252.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-01 09:53:42 +03:00
Dan Carpenter 973986126a usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP()
In the original DWC3_DCFG_NUMP() was always zero.  It looks like the
intent was to shift first and then do the mask.

Fixes: 2a58f9c12b ('usb: dwc3: gadget: disable automatic calculation of ACK TP NUMP')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:32:07 -07:00
Felipe Balbi 2a58f9c12b usb: dwc3: gadget: disable automatic calculation of ACK TP NUMP
Now that we calculate DCFG.NUMP, we can disable
dwc3's automatic calculation so we maximize our
chances of very high throughtput through the use of
bursts.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-28 10:56:28 +03:00
Felipe Balbi 676e349744 usb: dwc3: gadget: update DCFG.NumP to max burst size
NumP field of DCFG register is used on NumP field of
ACK TP header and it tells the host how many packets
an endpoint can receive before waiting for
synchronization.

Documentation says it should be set to anything
<=bMaxBurst. Interestingly, however, this setting is
not per-endpoint how it should be (different
endpoints could have different burst sizes), but
things seem to work okay right now.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-28 10:47:29 +03:00
Konrad Leszczynski 7b9cc7a2b1 usb: dwc3: gadget: give better command return code
if Start Transfer command fails, let's try a little
harder to figure out why the command failed and give
slightly better return codes. This will be usefulf
or isochronous endpoints, at least, which could
decide to retry a given request.

Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-28 09:02:00 +03:00
Felipe Balbi b058f3e8a3 usb: dwc3: core: add helper to extract trb type
This helper will be used later to convert trb type
into a human-readable string for debugfs.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-19 11:11:57 +03:00
Felipe Balbi cf6d867d3b usb: dwc3: core: add fifo space helper
this helper will be used, initially, to dump space
of different queues and fifos in dwc3 to
debugfs. Later, it'll be used to issue remote wakeup
when we want to start a transfer and there's
something in a TX FIFO.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-19 11:11:57 +03:00
Felipe Balbi 70fdb273db usb: dwc3: get rid of DWC3_TRB_MASK
instead of using a bitwise and, let's rely on the %
operator since that's a lot more clear. Also, GCC
will optimize % 256 to nothing anyway.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-19 11:10:45 +03:00
Felipe Balbi c28f82595d usb: dwc3: switch trb enqueue/dequeue and first_trb_index to u8
We *know* that we have 1 PAGE (4096 bytes) for our
TRB poll. We also know the size of each TRB and know
that we can fit 256 of them in one PAGE. By using a
u8 type we can make sure that:

	enqueue++ % 256;

gets optimized to an increment only.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-18 15:23:49 +03:00
Felipe Balbi 5ef68c56e1 usb: dwc3: core: document struct dwc3_request
No functional changes. Merely adding useful
documentation for future readers.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-18 15:23:48 +03:00
Felipe Balbi 53fd88189e usb: dwc3: gadget: rename busy/free_slot to trb_enqueue/dequeue
This makes it clear that we're dealing with a queue
of TRBs. No functional changes. While at that, also
rename start_slot to first_trb_index for similar
reasons.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-18 15:23:46 +03:00
Rajesh Bhagat e58dd35774 usb: dwc3: add disable receiver detection in P3 quirk
Some freescale QorIQ platforms require to disable receiver detection
in P3 for correct detection of USB devices. If GUSB3PIPECTL(DISRXDETINP3)
is set, Core will change PHY power state to P2 and then perform receiver
detection. After receiver detection, Core will change PHY power state to
P3. Same quirk would be added in dts file in future patches.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-18 15:23:44 +03:00
Felipe Balbi 696c8b1282 usb: dwc3: drop ev_buffs array
we will be using a single event buffer and that
renders ev_buffs array unnecessary. Let's remove it
in favor of a single pointer to a single event
buffer.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-14 09:24:39 +03:00
Felipe Balbi 660e9bde74 usb: dwc3: remove num_event_buffers
We never, ever route any of the other event buffers
so we might as well drop support for them.

Until someone has a real, proper benefit for
multiple event buffers, we will rely on a single
one. This also helps reduce memory footprint of
dwc3.ko which won't allocate memory for the extra
event buffers.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-14 09:24:39 +03:00
Felipe Balbi aa3342c8bb usb: dwc3: better name for our request management lists
request_list and req_queued were, well, weird naming
choices.

Let's give those better names and call them,
respectively, pending_list and started_list. These
new names better reflect what these lists are
supposed to do.

While at that also rename req->queued to req->started.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-14 09:24:38 +03:00
Felipe Balbi 8495036e98 usb: dwc3: increase maximum number of TRBs per endpoint
previously we were using a maximum of 32 TRBs per
endpoint. With each TRB being 16 bytes long, we were
using 512 bytes of memory for each endpoint.

However, SLAB/SLUB will always allocate PAGE_SIZE
chunks. In order to better utilize the memory we
allocate and to allow deeper queues for gadgets
which would benefit from it (g_ether comes to mind),
let's increase the maximum to 256 TRBs which rounds
up to 4096 bytes for each endpoint.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-14 09:24:37 +03:00
Felipe Balbi bc5081617f usb: dwc3: drop FIFO resizing logic
That FIFO resizing logic was added to support OMAP5
ES1.0 which had a bogus default FIFO size. I can't
remember the exact size of default FIFO, but it was
less than one bulk superspeed packet (<1024) which
would prevent USB3 from ever working on OMAP5 ES1.0.

However, OMAP5 ES1.0 support has been dropped by
commit aa2f4b16f8 ("ARM: OMAP5: id: Remove ES1.0
support") which renders FIFO resizing unnecessary.

Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-14 09:24:37 +03:00
John Youn 1f38f88a24 usb: dwc3: Update register fields for SuperSpeedPlus
Update various registers fields definitions for the DWC_usb31 controller
for SuperSpeedPlus support.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2016-03-04 15:14:26 +02:00
John Youn c4137a9c84 usb: dwc3: DWC_usb31 controller check
Add a convenience function to check if the controller is DWC_usb31.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2016-03-04 15:14:26 +02:00
John Youn c450960187 usb: dwc3: Fix assignment of EP transfer resources
The assignement of EP transfer resources was not handled properly in the
dwc3 driver. Commit aebda61871 ("usb: dwc3: Reset the transfer
resource index on SET_INTERFACE") previously fixed one aspect of this
where resources may be exhausted with multiple calls to SET_INTERFACE.
However, it introduced an issue where composite devices with multiple
interfaces can be assigned the same transfer resources for different
endpoints. This patch solves both issues.

The assignment of transfer resources cannot perfectly follow the data
book due to the fact that the controller driver does not have all
knowledge of the configuration in advance. It is given this information
piecemeal by the composite gadget framework after every
SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook
programming model in this scenario can cause errors. For two reasons:

1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and
SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple
interfaces.

2) The databook does not mention doing more DEPXFERCFG for new endpoint
on alt setting (8.1.6).

The following simplified method is used instead:

All hardware endpoints can be assigned a transfer resource and this
setting will stay persistent until either a core reset or hibernation.
So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for
every hardware endpoint as well. We are guaranteed that there are as
many transfer resources as endpoints.

This patch triggers off of the calling dwc3_gadget_start_config() for
EP0-out, which always happens first, and which should only happen in one
of the above conditions.

Fixes: aebda61871 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE")
Cc: <stable@vger.kernel.org> # v3.2+
Reported-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2016-02-17 10:31:53 +02:00
Felipe Balbi 04c03d10e5 usb: dwc3: gadget: handle request->zero
So far, dwc3 has always missed request->zero
handling for every endpoint. Let's implement
that so we can handle cases where transfer must
be finished with a ZLP.

Note that dwc3 is a little special. Even though
we're dealing with a ZLP, we still need a buffer
of wMaxPacketSize bytes; to hide that detail from
every gadget driver, we have a preallocated buffer
of 1024 bytes (biggest bulk size) to use (and
share) among all endpoints.

Reported-by: Ravi B <ravibabu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-12-15 09:12:41 -06:00
John Youn ec791d149b usb: dwc3: Add dis_enblslpm_quirk
Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls
whether the PHY receives the suspend signal from the controller.

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-10-09 16:06:59 -05:00
John Youn 690fb3718a usb: dwc3: Support Synopsys USB 3.1 IP
This patch allows the dwc3 driver to run on the new Synopsys USB 3.1
IP core, albeit in USB 3.0 mode only.

The Synopsys USB 3.1 IP (DWC_usb31) retains mostly the same register
interface and programming model as the existing USB 3.0 controller IP
(DWC_usb3). However the GSNPSID and version numbers are different.

Add checking for the new ID to pass driver probe.

Also, since the DWC_usb31 version number is lower in value than the
full GSNPSID of the DWC_usb3 IP, we set the high bit to identify
DWC_usb31 and to ensure the values are higher.

Finally, add a documentation note about the revision numbering scheme.
Any future revision checks (for STARS, workarounds, and new features)
should take into consideration how it applies to both the 3.1/3.0 IP.

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-10-09 16:06:58 -05:00
Nikhil Badola db2be4e9e3 usb: dwc3: Add frame length adjustment quirk
Add adjust_frame_length_quirk for writing to fladj register
which adjusts (micro)frame length to value provided by
"snps,quirk-frame-length-adjustment" property thus avoiding
USB 2.0 devices to time-out over a longer run

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-09-27 10:54:31 -05:00
Greg Kroah-Hartman 19915e6234 Merge 4.1-rc7 into usb-next
This resolves a merge issue in musb_core.c and we want the fixes that
were in Linus's tree in this branch as well for testing.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 10:57:51 -07:00
Subbaraya Sundeep Bhatta 459e210c4f usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
Fixed the incorrect macro definitions correctly as per databook.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Fixes: b09bb64239 (usb: dwc3: gadget: implement Global Command support)
Cc: <stable@vger.kernel.org> #v3.5+
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-26 09:44:55 -05:00
Heikki Krogerus 88bc9d194f usb: dwc3: add ULPI interface support
Registers DWC3's ULPI interface with the ULPI bus when it's
available.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-13 12:06:52 -05:00
Heikki Krogerus 3e10a2ce98 usb: dwc3: add hsphy_interface property
Platforms that have configured DWC_USB3_HSPHY_INTERFACE with
value 3, i.e. UTMI+ and ULPI, need to inform the driver of
the actual HSPHY interface type with the property. "utmi" if
the interface is UTMI+ or "ulpi" if the interface is ULPI.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-13 12:06:42 -05:00
Heikki Krogerus f699b94789 usb: dwc3: ULPI or UTMI+ select
Make selection between ULPI and UTMI+ interfaces possible by
providing definition for the bit in Global USB2 PHY
Configuration Register that controls it.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-13 12:05:41 -05:00
Heikki Krogerus b5699eeee6 usb: dwc3: USB2 PHY register access bits
Definitions for Global USB2 PHY Vendor Control Register
bits. We will need them to access ULPI PHY registers later.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-13 12:05:33 -05:00
Robert Baldyga eac68e8f97 usb: dwc3: make LPM configurable in DT
This patch removes "Enable USB3 LPM Capability" option from Kconfig
and adds snps,usb3_lpm_capable devicetree property instead of it.

USB3 LPM (Link Power Management) capability is hardware property, and
it's platform dependent, so if our hardware supports this feature, we
want rather to configure it in devicetree than having it as Kconfig option.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-10 15:33:33 -05:00
Peter Chen bcdea50312 usb: dwc3: gadget: use common is_selfpowered
Delete private selfpowered variable, and use common one.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29 10:35:40 -06:00
Amit Virdi 3cd0e29d5e usb: dwc3: Remove current_trb as it is unused
This field was introduced but never used. So, remove it.

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:24 -06:00
Huang Rui 460d098cb6 usb: dwc3: make HIRD threshold configurable
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@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03 10:03:41 -06:00
Huang Rui 0effe0a3e7 usb: dwc3: add disable usb2 suspend phy quirk
This patch adds disable usb2 suspend phy quirk, and some special platforms
can configure that if it is needed.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03 10:03:39 -06:00