Age | Commit message (Collapse) | Author |
|
Rather than relying on special USB/PHY pins/registers use the generic
extcon framework with its extcon-usb-gpio implementation to detect ID
and VBUS changes.
(cherry picked from commit a257098741b441e6e84ffe97b7793c580642d502)
|
|
This patch move simply OF helper function to extcon core and change function
name as following:
- of_extcon_get_extcon_dev() -> extcon_get_edev_by_phandle()
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 1ad94ffef22c0a6e2ee6ba90a800c32fd29ffa1f)
|
|
We should only do charger detection if both we have enabled
usb charger at kernel configuration and set usb charger enable
at dts. Otherwise, we will do useless things, like toggle dp.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 6b677c09dbda0274c6b2e1d61ea0d7f1cc73f621)
|
|
peripheral
We should signal connect (pull up dp) after we have already
at peripheral mode, otherwise, the dp may be toggled due to
we reset controller or do disconnect during the initialization
for peripheral, then, the host may be confused during the
enumeration, eg, it finds the reset can't succeed, but the
device is still there, see below error message.
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-0:1.0: unable to enumerate USB device on port 1
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit b4b5728425454c1713d152855f09af9c9c12d78d)
|
|
Since BSV irq is only used for B-device, this patch correct the setting of
BSVIE of otgsc only for case of ID change, that is:
- In otg fsm mode, ID change from 0 to 1 means otg state from A_IDLE to
B_IDLE; ID change from 1 to 0 means otg state from B_IDLE to A_IDLE, so
only disable BSVIE if the current state is B_IDLE(to be update to A_IDLE),
only enable BSVIE if the current state is A_IDLE(to be update to B_IDLE).
- In non-otg-fsm mode, it's already correct.
This fix the bug of MLK-10243.
Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit c6151e8cc4a01128cbab4b26c09f859cfcd7ff39)
|
|
on is required
If CI_HDRC_IMX_VBUS_EARLY_ON is set, turn on vbus before add hcd, and do not
set reg_vbus of ehci_ci_priv, so vbus will not be handled by ehci core.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit a745133191bfe0c2ca408d9f8bcfc2a5204b0dbd)
|
|
Some PHY of imx usb need power supply from vbus to make it work, if there
is no vbus, USB PHY will not in correct state when the controller starts to
work, for host, this requires vbus should be turned on before setting port
power(PP) of ehci, to work with this kind of USB PHY design, this patch adds
a flag CI_HDRC_IMX_VBUS_EARLY_ON, can be checked by host driver to turn on
vbus while start host.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 1d4c054323817b49897fd7a59bc57b4d36f09491)
|
|
LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
(cherry picked from commit 7d849e4d9ebca3c3c045deca0a12559f84ad6fa1)
|
|
This patch is to keep usb controller power on while system suspend if there
is usb device connected by telling GPC to keep mega fast domain power.
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
This patch changes the vbus glitch check to cover usb otg certification
case, so the possible cases of vbus rise:
- USB vbus can reach AVV(4.4v), valid vbus.
- USB vbus keeps above BSV(0.8v) but lower than AVV(4.4v) for
more than 300ms, we think it's valid vbus event, this can meet
usb otg certificataion case(B device can do connection in 1s when
vbus is 4.0v).
- USB vbus cannot be kept above BSV(0.8v) for more than 300ms,
it's a vbus glitch.
In case of vbus drop: if the vbus on flag is not set, it's a vbus glitch,
otherwise it's a valid vbus drop event.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit de5ab444839b6d1492d697256ea2b8a1dcaffc62)
|
|
We add vbus glitch handling for both BSV rise and drop interruptes.
If it is a vbus glitch (higher than BSV but cannot reach AVV), ignore it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 827f2fe71e6222882930db7e89460087cb3bce5b)
|
|
Set otg_fsm of usb_bus to be ci->fsm while start host.
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
This patch sets bcdOTG field of OTG descriptor for below 3 gadget drivers:
- ether
- mass storage
- serial
OTG and EH supplement release number in binary-coded decimal(i.e. 2.0 is 0200H).
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit a426ace68acd9b770ce3a609f92029782b8ca1d1)
|
|
The default TPL is for USB OTG & EH compliance test, the supported
class is: mass storage, hub, and hid.
Besides, we add one match criterion that matching targeted device
through class at interface descriptor.
Tested-by: Li Jun <b47624@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 483c071d989ceb36cacf76e1e3e779c67e5b8280)
|
|
In case of b_peripheral --> b_wait_acon --> b_idle due to vbus off
in b_wait_acon state, b_bus_req cannot be cleared in b_idle state,
which result in b device will do data pulse because b_bus_req is set.
This patch fix this issue by clear the input variable b_bus_req when
vbus is off.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit bc600546bf9193f1a39186ad4c07a5fd497c7bfd)
|
|
Since BSV irq is enabled for B-device all the time, so B_SESS_VLD timer
is not required, and also no need to check BSV status when B_ASE0_BRST
timer timeout.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit a7d0b864b613c555add9ea864eb8c163e1d3362e)
|
|
When B-device in host mode, if Vbus is off by A-device or A-device is removed,
B-device should update charger status correctly. This patch enables BSV irq
for B-device in all states, so the charger connection and removal can be early
handled by BSV change irq.
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
There is 2s delay for controller resume from usb wakeup case already,
in OTG fsm mode, A-dev can start a new session via sys input file(means
not via usb wakeup), in this case, A-dev still need the 2s delay for
host root hub access registers, otherwise system will hang due to access
register at low power mode.
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
Disable usb wakeup as initial setting in probe.
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
We have different wakeup setting for different roles:
For peripheral-only mode, we may only enable vbus wakeup.
The Micro-AB cable should not be considered as wakeup source.
For host-only mode, the ID change or vbus change should not be
considered as wakeup source.
For OTG mode, all wakeup setting should be considered as wakeup
source.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 632e2eda5d071781479e0e0a80496c9a198d614f)
|
|
The glue layer may need to know current available role, add
ci_hdrc_query_available_role for that.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 5c340402131ca6eacaeb122deb1ee59bcea2778c)
|
|
ITC (Interrupt Threshold Control) is used to set the maximum rate at which
the host/device controller will issue interrupts. The default value is 8 (1ms)
for it. EHCI core will modify it to 1, but device mode keeps it as default
value.
In some use cases like this CR, it uses Android ADB to transfer data, ADB
only has one usb request for each direction, and maximum payload data is
only 4KB, so the speed is 4MB/s at most, it needs controller to trigger
interrupt as fast as possible to increase the speed. The USB performance
will be better if the interrupt can be triggered faster.
In this case, we set ITC default value as 0, which will trigger USB interrupt
immediately once the transfer has completed.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 479fda4154b698adc4ed274ad9ff4d15f045fafe)
|
|
With this setting and AHBBRST at SBUSCFG as "Incremental burst of
unspecified length", each unburst size can be taken as one single transfer.
It is benefit for unburst size transfer.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit bf1c51efe90898d701b33a4de745680a8ba07554)
|
|
For imx6, below AHB burst setting are better performance:
- Incremental burst of unspecified length, see SBUSCFG, $BASE + 0x90
- Set Both RX/TX burst size as 16 DWords, see BURSTSIZE, $BASE + 0x160
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 48ebdd800ff8f7075dfb7fa217e5b33a4b39bbc9)
|
|
The AHBBRST at SBUSCFG and RX/TX burst size at BURSTSIZE are implementation
dependent, each platform may have different values, and some values may not be
optimized.
The glue layer can override ahb burst configuration value by setting flag
CI_HDRC_OVERRIDE_AHB_BURST and ahbburst_config.
The glue layer can override RX/TX burst size by setting flag
CI_HDRC_OVERRIDE_BURST_LENGTH and burst_length.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit a6bf7a97a83a58b9fe6de91975e4203c235036be)
|
|
Enable park mode will improve the performance a lot at USB ethernet use
case, but a little at USB mass storage use case, and it is not harm from
the tests. Below the performance comparison at imx6sl:
USB Ethernet (Mbps)
Default Enable Park
TX 192 262
RX 262 290
USB Mass Storage (MB/s)
Read 21.8 22.9
Write 19.5 22.8
This patch is used for freescale internal.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit b2289a78958859cff37508e4db0314463f33c2e0)
|
|
imx6sl/imx6sx
Stream mode enable is known for better performance
(eg, rx at g_ncm: 175Mbps->250Mbps), and stream mode
enable has been passed with stress tests at device mode
for imx6sl and imx6sx, and no issue is found.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 7d72920a894d7dab6501520af82e3e92211a4291)
|
|
The chipidea IP has different limitations for host and device mode,
see below errata, we may need to enable SDIS(Stream Disable Mode)
at host mode, but we don't want it at device mode at some situations.
TAR 9000378958
Title: Non-Double Word Aligned Buffer Address Sometimes Causes Host to Hang on OUT Retry
Impacted Configuration: Host mode, all transfer types
Description:
The host core operating in streaming mode may under run while sending the data packet of an OUT transaction. This under run can occur if there are unexpected system delays in fetching the remaining packet data from memory. The host forces a bad CRC on the packet, the device detects the error and discards the packet. The host then retries a Bulk, Interrupt, or Control transfer if an under run occurs according to the USB specification.
During simulations, it was found that the host does not issue the retry of the failed bulk OUT. It does not issue any other transactions except SOF packets that have incorrect frame numbers.
The second failure mode occurs if the under run occurs on an ISO OUT transaction and the next ISO transaction is a zero byte packet. The host does not issue any transactions (including SOFs). The device detects a Suspend condition, reverts to full speed, and waits for resume signaling.
A third failure mode occurs when the host under runs on an ISO OUT and the next ISO in the schedule is an ISO OUT with two max packets of 1024 bytes each.
The host should issue MDATA for the first OUT followed by DATA1 for the second. However, it drops the MDATA transaction, and issues the DATA1 transaction.
The system impact of this bug is the same regardless of the failure mode observed. The host core hangs, the ehci_ctrl state machine waits for the protocol engine to send the completion status for the corrupted transaction, which never occurs. No indication is sent to the host controller driver, no register bits change and no interrupts occur. Eventually the requesting application times out.
Detailed internal behavior:
The EHCI control state machine (ehci_ctrl) in the DMA block is responsible for parsing the schedules and initiating all transactions. The ehci_ctrl state machine passes the transaction details to the protocol block by writing the transaction information in to the TxFIFO. It then asserts the pe_hst_run_pkt signal to inform the host protocol state machine (pe_hst_state) that there is a packet in the TxFIFO.
A tag of 0x0 indicates a start of packet with the data providing the following information:
35:32 Tag
31:30 Reserved
29:23 Endpoint (lowest 4 bits)
22:16 Address
15:10 Reserved
9:8 Endpoint speed
7:6 Endpoint type
5:6 Data Toggle
3:0 PID
The pe_hst_state reads the packet information and constructs the packet and issues it to the PHY interface.
The ehci_ctrl state machine writes the start transaction information in to the TxFIFO as 0x03002910c for the OUT packet that had the under run error. However, it writes 0xC3002910C for the retry of the Out transaction, which is incorrect.
The pe_hst_state enters a bus timeout state after sending the bad CRC for the packet that under ran. It then purges any data that was back filled in to the TxFIFO for the packet that under ran. The pe_hst_state machine stops purging the TxFIFO when it is empty or if it reads a location that has a tag of 0x0, indicating a start of packet command.
The pe_hst_state reads 0xC3002910C and discards it as it does not decode to a start of packet command. It continues to purge the OUT data that has been pre-buffered for the OUT retry . The pe_hst_state detects the hst_packet_run signal and attempts to read the PID and address information from the TxFIFO. This location has packet data and so does not decode to a valid PID and so falls through to the PE_HST_SOF_LOAD state where the frame_num_counter is updated. The frame_num_counter is updated with the data in the TxFIFO. In this case, the data is incorrect as the ehci_ctrl state machine did not initiate the load. The hst_pe_state machine detects the SOF request signal and sends an SOF with the bad frame number. Meanwhile, the ehci_ctrl state machine waits indefinitely in the run_pkt state waiting for the completion status from pe_hst_state machine, which will never happen.
The ISO failure case is similar except that there is no retry for ISO. The ehci_ctrl state machine moves to the next transfer in the periodic schedule. If the under run occurs on the last entry of the periodic list then it moves to the Async schedule.
In the case of ISO OUT simulations, the next ISO is a zero byte OUT and again the start of packet command gets corrupted. The TxFIFO is empty when the hst_pe_state attempts to read the Address and PID information as the transaction is a zero byte packet. This results in the hst_pe_state machine staying in the GET_PID state, which means that it does not issue any transactions (including SOFs). The device detects a Suspend condition and reverts to full speed mode and waits for a Resume or Reset signal.
The EHCI specification allows a Non-DoubleWord (32 bits) offset to be used as a current offset for Buffer Pointer Page 0 of the qTD. In Non-DoubleWord aligned cases, the core reads the packet data from the AHB memory, performs the alignment operation before writing it in to the TxFIFO as a 32 bit data word. An End Of Packet tag (EOP) is written to the TxFIFO after all the packet data has been written in to the TxFIFO. The alignment function is reset to Idle by the EOP tag. The corruption of the start of packet command arises because the packet buffer for the OUT transaction that under ran is not aligned to a DoubleWord, and hence no EOP tag is written to the TxFIFO. The alignment function is still active when the start packet information is written in to the TxFIFO for the retry of the bulk packet or for the next transaction in the case of an under run on an ISO. This results in the corruption of the start tag and the transaction information.
Click for waveform showing the command 0x 0000300291 being written in to the TX FIFO for the Out that under ran.
Click for waveform showing the command 0xC3002910C written to the TxFIFO instead of 0x 0000300291
Versions affected: Versions 2.10a and previous versions
How discovered: Customer simulation
Workaround:
1- The EHCI specification allows a non-DoubleWord offset to be used as a current offset for Buffer Pointer Page 0 of the qTD. However, if a DoubleWord offset is used then this issue does not arise.
2- Use non streaming mode to eliminate under runs.
Resolution:
The fix involves changes to the traffic state machine in the vusb_hs_dma_traf block. The ehci_ctrl state machine updates the context information by encoding the transaction results on the hst_op_context_update signals at the end of a transaction. The signal hst_op_context_update is added to the traffic state machine, and the tx_fifo_under_ran_r signal is generated if the transaction results in an under run error. Click for waveform
The traffic state machine then traverses to the do_eop states if the tx_fifo_under_ran error is asserted. Thus an EOP tag is written in to the TxFIFO as shown in this waveform .
The EOP tag resets the align state machine to the Idle state ensuring that the next command written by the echi_ctrl state machine does not get corrupted.
File(s) modified:
RTL code fixed: …..
Method of reproducing: This failure cannot be reproduced in the current test bench.
Date Found: March 2010
Date Fixed: June 2010
Update information:
Added the RTL code fix
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 9bbed86327e015a28f7e680784bb00dd7c83533d)
|
|
It is better we disconnect (pulldown dp) host when the system enters
suspend if the host did not suspend bus beforehand, it can avoid
unnecessary udc suspend irq during usb enters suspend. This unexpected
suspend irq occurs due to the udc still pulls up dp, but the host
suspends bus due to it finds the device has disconnected. The device
turns off high speed terminal will be considered a disconnection event
from the host.
It also fixes the bug ENGR00325724 describes.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 9d9ddd142cdbfb4bcbaae161a452596668441b1a)
|
|
After _gadget_stop_activity is executed, we can consider the hardware
operation for gadget has finished, and the udc can be stopped and enter
low power mode. So, any later hardware operations (from usb_ep_ops APIs
or usb_gadget_ops APIs) should be considered invalid, any deinitializatons
has been covered at _gadget_stop_activity.
I meet this problem when I plug out usb cable from PC (using g_mass_storage),
my callstack like: vbus interrupt->.vbus_session->composite_disconnect
->pm_runtime_put_sync(&_gadget->dev), the composite_disconnect will
call fsg_disable, but fsg_disable calls usb_ep_disable using async way,
there are register accesses for usb_ep_disable. So sometimes, I get system
hang due to visit register without clock, sometimes not.
The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution.
See: http://marc.info/?l=linux-usb&m=138541769810983&w=2.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit ac760d29366f19eb1a4d4c37899b33019570a447)
|
|
Define quirk CI_HDRC_IMX_EHCI_QUIRK for necessary platforms.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
Add imx6 HSIC support
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
Add clock enable/disable at .set_suspend if the PHY has
suspend requirement, it can be benefit of power saving for
phy and the whole system (parent clock may also be disabled).
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
This patch is to prevent usb entering low power mode if vbus is on even gadget
driver is not binded, by holding the PM count of ci->dev.
So, there are 3 pm usage_count status:
- ci->dev: 1 ci->gadget.dev: 1
Device mode with gadget driver binded and vbus on.
- ci->dev: 1 ci->gadget.dev: 0
USB vbus on but gadget driver not binded.
- ci->dev: 0 ci->gadget.dev: 1
USB OTG FSM is in a_peripheral mode.
Above 2 device's pm usage_count hold by ci otg(ci->dev) and usb gadget
(ci->gadget.dev).
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
Use ci_hdrc_gadget_connect() API directly if vbus is on.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
This patch moves out hnp polling from usb otg work queue to shared queue, as
hnp polling call to usb_control_msg() which sends a control message and waits
for it complete or timeout, so it's not proper to handle it in usb otg work
queue which handles work with usb irq disabled.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit a147c8808ad198a7b9694b7dd517166505b76c50)
|
|
Use imx6sx_usb_data instead of imx6sl_usb_data for i.mx6sx in
ci_hdrc_imx_dt_ids[].
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
Export imx_usbmisc_power_lost_check.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
This patch sets host request flag with sys input when a A device
sets a_bus_req or a B device sets b_bus_req as peripheral role.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
flag is set
The A-device is required to set this feature and suspend the bus within
THOST_REQ_SUSP when it determines that the B-device wishes to become host
(host_req_flag = TRUE). So this patch does this if host request flag is set
and a_set_b_hnp_en has not been set.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
This patch adds HNP polling support for chipidea otg fsm driver, which
adds a SW timer to send HNP polling request.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
Peripheral answers OTG status selector request from host according to
host request flag of gadget, length is 1. this flag may be set by application
via sysfs.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
This patch clear host_request_flag when leaves peripheral state, instead of
entering host state, this can make sure this flag can be cleared after try
to do role switch, no matter the role switch succeeds or not.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
This patch adds OTG status selector request sending function, can be used
to poll peripheral if it wants to be host.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
This patch starts HNP polling timer when otg is set to be a_host
or b_host.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
This patch adds a timer to delay turn on vbus after detecting data pulse
from B-device, this is required by OTG SRP timing.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
For 3.19 kernel, it doesn't be needed due to CONFIG_PM_RUNTIME depends
on CONFIG_PM_SLEEP, but in 3.14, it still needs a standalone
CONFIG_PM_RUNTIME.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
When the port goes to suspend or finishes resme, it needs to
notify PHY, it is not a standard EHCI operation, so we add a
quirk for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
For chipidea, its resume sequence is not-EHCI compatible, see
below description for FPR at portsc. So in order to send SoF in
time for remote wakeup sequence(within 3ms), the RUN/STOP bit must
be set before the resume signal is ended, but the usb resume
code may run after resume signal is ended, so we had to set it
at suspend path.
Force Port Resume - RW. Default = 0b.
1= Resume detected/driven on port.
0=No resume (K-state) detected/driven on port.
Host mode:
Software sets this bit to one to drive resume signaling. The Controller sets this bit to '1' if
a J-to-K transition is detected while the port is in the Suspend state. When this bit
transitions to a '1' because a J-to-K transition is detected, the Port Change Detect bit in
the USBSTS register is also set to '1'. This bit will automatically change to '0' after the
resume sequence is complete. This behavior is different from EHCI where the controller
driver is required to set this bit to a '0' after the resume duration is timed in the driver.
Note that when the controller owns the port, the resume sequence follows the defined
sequence documented in the USB Specification Revision 2.0. The resume signaling
(Full-speed 'K') is driven on the port as long as this bit remains a '1'. This bit will remain
a '1' until the port has switched to idle. Writing a '0' has no affect because the port
controller will time the resume operation, clear the bit and the port control state switches
to HS or FS idle.
This field is '0' if Port Power(PP) is '0' in host mode.
This bit is not-EHCI compatible.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
There is a request from IC engineer that if we doesn't
set phypwd as 0xffffffff, we need to delay about five
32Khz cycles before set phypwd, otherwise, the wakeup
signal may can't wake up controller.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit a7a99b979db9d0bf7277533a3a39ba09755768f0)
|