Age | Commit message (Collapse) | Author |
|
platform.
This driver is based on the current code which runs the the EMV test on the i.MX258 platform.
Since there are still many cases that can't pass on the i.MX258 and i.MX7d platform. The
driver will need to be improved after per-test work. Just check in as a base code. There
would be definitly some timing improvement work to do in the future.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from 3ac1ad5b2a68ecb052ccacca4ac7459ead04415e)
|
|
There is occasion that dma callback come late after the substream is released.
Then there will be kernel dump.
[<805866b0>] (imx_pcm_dma_complete) from [<802fad9c>] (sdma_handle_channel_loop.isra.25+0x48/0x54)
[<802fad9c>] (sdma_handle_channel_loop.isra.25) from [<802fae48>] (sdma_tasklet+0xa0/0x1d4)
[<802fae48>] (sdma_tasklet) from [<800356e0>] (tasklet_action+0x64/0xf8)
[<800356e0>] (tasklet_action) from [<80034ea0>] (__do_softirq+0x104/0x218)
[<80034ea0>] (__do_softirq) from [<80035220>] (irq_exit+0xa8/0xec)
[<80035220>] (irq_exit) from [<8000ed44>] (handle_IRQ+0x3c/0x90)
[<8000ed44>] (handle_IRQ) from [<80008578>] (gic_handle_irq+0x28/0x5c)
[<80008578>] (gic_handle_irq) from [<80012100>] (__irq_svc+0x40/0x70)
The reason is the sdma tasklet is async with audio substream release. ALSA
think when terminate dma, the dma should be stopped and no callback be called.
This patch is to add new api dma_sync_wait_tasklet(), which is called in
snd_dmaengine_pcm_close(). It will make sure the callback not be called
after this funtion. Tasklet_kill is to wait scheduled tasklet end.
Tasklet_kill can't be added to terminate dma function, because terminate dma
function may be called in interrupt, but tasklet_kill can't be called in
interrupt context.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 9815881b6acaa72a705e1fa3c26a852fc81bfce5)
|
|
As SSI has dual fifo, add src_dualfifo and dst_dualfifo in imx_dma_data
to support dual fifo in DMA_DEV_TO_DEV.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit cfde1308f170166a0099ca39ee8733895f9626f0)
|
|
cherry-pick below patch from v3.14.y:
ENGR00329948-3: dma: imx-sdma: Add hdmi audio support
in sdma
There's a missing script for hdmi audio support in current sdma driver,
thus add it.
This HDMI script doesn't use bd to copy memory like a normal one does
but only to update the memory address for HDMI internal AHB DMA and
then trigger its procedure automatically.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit dafddac916a03ae4477e2de7c1b7ad291f956f68)
|
|
Add new ecspi and qspi script.
Signed-off-by: Robin Gong <b38343@freescale.com>
|
|
parent on
On Freescale i.MX7D platform, all clocks operations, including enable/disable,
rate change and re-parent, requires its parent clock on.
Current clock core can not support it well.
This patch introduce a new flag CLK_SET_PARENT_ON to handle this special case
in clock core that enable its parent clock firstly for each operation and disable
it later after operation complete.
The most special case is for set_parent() operation which requires both parent,
old one and new one, to be enabled at the same time during the operation.
Acked-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Dong Aisheng <b29396@freescale.com>
|
|
This patch adds busfreq support for i.MX7D SDB
board with DDR3 memory, 3 setpoints supported:
HIGH: DRAM CLK = 533MHz, AXI = 332MHz, AHB = 135MHz;
AUDIO: DRAM CLK = 100MHz; AXI = 24MHz, AHB = 24MHz;
LOW: DRAM CLK = 24MHz; AXI = 24MHz, AHB = 24MHz;
Signed-off-by: Anson Huang <b20788@freescale.com>
|
|
For Freescale QorIQ LS1021AQDS board, there is a SDIO interrupt
in the process of resume without inserting SD adapter because of
some unknown issue. But the driver doesn't assign sdio_irq_thread
pointer. This will block the resume of kernel. This patch is used
to avoid using NULL sdio_irq_thread pointer.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 9b902cdec6d1248881ffb1a1b8ea69aa2c90d7cc)
|
|
In the (not so unlikely) case that the mmc controller timeout budget is
enough for exactly one erase-group, the simplification of allowing one
sector has an enormous performance penalty. We optimize this special case
by introducing a flag that prohibits erase-group boundary crossing, so
that we can allow trimming more than one sector at a time.
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 2edcf1262dd2ec79d3d3bcf7ea11216dbf2d77a7)
|
|
After commit 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()"),
it's not used anymore.
Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Reviewed-by: Johan Derycke <johan.derycke@barco.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 29946dca76b23944acb5ae963c0247a5b0d9c5ea)
|
|
Add the ability to set eMMC driver strength
for HS200 and HS400.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit cc4f414c885cd04f7227ad9bcd6b18fd78d718d9)
|
|
In preparation for supporing drive strength selection
for eMMC, read the card's valid driver strengths.
Note that though the SD spec uses the term "drive strength",
the JEDEC eMMC spec uses the term "driver strength".
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit b097e07f57930eda774c83aa46e8e401686d01dc)
|
|
In preparation for adding drive strength support
for eMMC, add drive_strength to struct mmc_card
to record the card drive strength for UHS-I modes
and HS200 / HS400. For eMMC this will be needed
when switching between HS200 and HS400.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 3853a042325e8f497c199020979c4fc824528c6e)
|
|
In preparation for supporting also eMMC drive strength,
add the 'card' as a parameter so that the callback can
distinguish different types of cards if necessary.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit f168359efbb99d6f8591bb666d6510bb78df2d07)
|
|
Initialization of UHS-I modes for SD and SDIO cards
employs a callback to allow the host driver to
choose a drive strength value. Currently that
assumes the card drive strength and host driver
type must be the same value. Change to let the
callback make that decision and return both the
card drive strength and host driver type.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit b4f30a174e1fda8118eda038b5d8d5260db36ad5)
|
|
It is not uncommon to see systems where there is no physical write-protect
signal (e.g. when using eMMC or microSD card slots). For some controllers,
which have a dedicated write-protection detection logic (like SDHCI
controllers), the get_ro() callback can return bogus data in such a case.
Instead of handling this on a per controller basis this patch adds a new
capability flag to the MMC core that can be set to specify that the result
of get_ro() is invalid. When the flag is set the core will not call
get_ro() and assume that the card is always read-write.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 9f6e0bff2afb52a4c29f5ca8a4db01810357974e)
|
|
Currently, there is core support for tuning during
initialization. There can also be a need to re-tune
periodically (e.g. sdhci) or to re-tune after the
host controller is powered off (e.g. after PM
runtime suspend / resume) or to re-tune in response
to CRC errors.
The main requirements for re-tuning are:
- ability to enable / disable re-tuning
- ability to flag that re-tuning is needed
- ability to re-tune before any request
- ability to hold off re-tuning if the card is busy
- ability to hold off re-tuning if re-tuning is in
progress
- ability to run a re-tuning timer
To support those requirements 7 members are added to struct
mmc_host:
unsigned int can_retune:1; /* re-tuning can be used */
unsigned int doing_retune:1; /* re-tuning in progress */
unsigned int retune_now:1; /* do re-tuning at next req */
int need_retune; /* re-tuning is needed */
int hold_retune; /* hold off re-tuning */
unsigned int retune_period; /* re-tuning period in secs */
struct timer_list retune_timer; /* for periodic re-tuning */
need_retune is an integer so it can be set without needing
synchronization. hold_retune is a integer to allow nesting.
Various simple functions are provided to set / clear those
variables.
Subsequent patches take those functions into use.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit dfa13ebbe3340e538b988f5608efd9ff2ca7fc35)
|
|
i.MX7D has a silicon issue on full speed termination after A device ends
a session, which causes it can not detect data pulse from B device if
A device isn't in low power mode, this patch work around it by override
Termsel bit to be 1 for FS mode termination. After A device detects data
pulse or turns on vbus, this override will be cleared and disabled.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 1ec37968c892efbb1925784446a75d35e8bda228)
|
|
HNP polling uses a kernel stack variable when sending the HNP polling
control message, which causes dma-debug to complain, fix it by adding
host_req_flag to otg_fsm struct, so it's done by kmallocing.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 05b5f53b2c4d71761454b47852d5c5a48c5cc93a)
|
|
B-device detects that bus is idle for more than TB_AIDL_BDIS min and begins HNP
by turning off pullup on DP, this allows the bus to discharge to the SE0 state.
This timer was missed and failed with one PET test, this patch is to fix this
timing issue.
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 338efb70f6400d0930e6c8d53b2f4293a80db6d1)
|
|
This patch adds a flag hnp_polling to indicate if HNP polling is supported.
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit b19d4b1110fe1fb2ec3141233781a1e016c9a9cf)
(cherry picked from commit cad8ae2986ab0b70d0f13b96c98f340564213d4c)
|
|
After B device as host enumerates A peripheral and sets configuration,
B host should start to hand host role back to A device when this timer
expires.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 3f4a8c8a20ef69721f9e7886b8d245036d41d91a)
(cherry picked from commit 72b535f92ea078d8c3bd73186763bcb2f39106bb)
|
|
This patch adds flag otg_hnp_reqd in struct otg_fsm to indicate A device
as host wants to start HNP sequence.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 92382e06c6902731b05dcbb0db4f0ebfa486969f)
(cherry picked from commit 8e3f26a58f995711a81b401af26fbe5ed12e17f4)
|
|
This patch adds otg_hnp_reqd wIndex high byte value for otg test mode.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit c334dc80bc2672aab012cad6926d819feaf4634d)
(cherry picked from commit dd95b40fa19e522353b548554f55e8c77ac9bdfe)
|
|
This patch adds a timer for chipidea otg fsm driver to start data pulse
after A host ends the session.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 35e92b59080b58925c3b96e36511056cb51d4a00)
(cherry picked from commit eeded24ce2d20b1c19d5c666e916f41995cf2385)
|
|
This patch adds flag otg_srp_reqd in struct otg_fsm to indicate A device
as host wants B-UUT to do SRP once it ends the session.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 8e5f1b6b12ec77ec591909b09727049ffff37b9c)
(cherry picked from commit 7eaf8cf8ff375917e9972cca69bcecd6d807e6db)
|
|
This patch adds otg_srp_reqd wIndex high byte value for otg test mode.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 34660f7aa14972630622406b9dbfc7a106d8d15d)
(cherry picked from commit c5128f9bafaa37a8e63989032372a5ff36dc82c4)
|
|
This patch adds 2 variables: tst_maint and otg_vbus_off, tst_maint is to check if
current session for test device; otg_vbus_off is to notify if A device need turn
off vbus immediately after B device disconnects.
The otg test device handling is added into ehset driver, for that device,
A-device should start a timer for maintain the session, and set otg_vbus_off
flag according to its bcdDevice value.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 78a2c14bdea4b8e334c7e0afad074b61b71193cb)
(cherry picked from commit b854141cc5a7150751e7f7fd2dfb10a415cfea10)
|
|
For some platforms, time delay is required between putting PHY into low power
mode and gate PHY clock.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit ec0f2d7c8198f368d97ef070186c1b3b5a78bbea)
|
|
Add otg_fsm pointer in struct of usb_bus for access otg_fsm via bus.
Original way was to put it in usb_otg, then usb host can access otg_fsm
via hcd->usb_phy->otg->fsm, since usb_phy will not be the future direction,
instead phy is preferred, so this way may not work. It's more direct and
simple to put it in usb_bus.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit c118afccbbb1c78938c649ee72758213c22cf489)
|
|
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)
|
|
Add imx6 HSIC support
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 0cebf3e28ec0b7e47a45d16aa2237b819746b494)
|
|
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>
(cherry picked from commit 4ffe8d85d4eed813b43cbd37e5241a8a0069021d)
|
|
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>
(cherry picked from commit aeb26447ee561dcd525448a8542a1912a581a1e8)
|
|
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>
(cherry picked from commit e19d0282ed6e2587187ee6329c33332b1e320672)
|
|
This patch adds host_request_flag in usb_gadget to store host request
information from application.
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit eeeb09c86010e72153fbe15b0b67eefd160a0344)
|
|
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>
(cherry picked from commit f02ee3e93715c41f5b1e11140f36e350c7ed4d6b)
|
|
They are used to notify PHY that the controller enters suspend
or finishes resume.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 737908259ccc3c3166a51ed8e3638ac1f1730e08)
|
|
This patch adds support of power lost during system sleep in otg fsm mode.
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 493f3c4f04f48240dacc49f84db57e7ecf90161b)
|
|
- Change .notify's return value from void to int, update msm notify_event
return value accordingly.
- Add CI_HDRC_CONTROLLER_VBUS_EVENT and
CI_HDRC_CONTROLLER_CHARGER_POST_EVENT to finish the USB charger
detection flow.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
|
|
The user can adjust it through dts or platform data
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 4c16a2a7f8d6c8ba9c4aefaa126a5961a4decde3)
|
|
The users can change it through dts or platform data if they
want to change the default value.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit ebcf71aedb6d9cd4eacffd3480b6349daf157ffb)
|
|
The system bus and chipidea IP have different limitations for
both host and device mode.
For example, with below errata, we need to enable SDIS(Stream Disable
Mode) at host mode. But we don't want it for device mode at the
same system.
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 05292aed5cb82e8bb6846f2f808310d699f7000f)
|
|
Allocate usb otg descriptor and initialize it according to gadget's otg
capabilities, if usb_otg_caps is not set, keep settings as current gadget
drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor
for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg
features can be decided by the combination of usb hardware property
and driver config.
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 371fae666a460d6452c6329253211f77b59894b5)
|
|
Init and update otg capabilities by DT, set gadget's otg capabilities
accordingly.
Acked-by: Peter Chen <peter.chen@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 8b22c5d6f38ebe82a78fb5e46d674ec838c38078)
|
|
Check property of usb hardware to update otg version and disable SRP, HNP
and ADP if its disable flag is present.
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 695585918d95dcb97d2f2c72e888ecdc7afff75a)
|
|
Add usb_otg_caps pointer to usb_gadget structure to indicate its
otg capabilities.
Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit e262a7812ff8a971e1b7a8ba18b1ba7f68b28c46)
|
|
This patch adds a structure usb_otg_caps to cover all otg related
capabilities of the device, including otg revision, and if hnp/srp/adp
is supported.
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c0b79dc778505ba458b2d650b2c4628eccd2aa5d)
|
|
Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes.
Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 01772f5c91c488dd933575836d4d457188123908)
|
|
OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH
supplement release number with which the OTG device is compliant, this
patch adds structure usb_otg20_descriptor for OTG 2.0 and above.
Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c2cefe9a6208aa4c006ffcf65a7cbf2c694cf85a)
|