| 57eee88b | 12-Jun-2025 |
Frank Wang <frank.wang@rock-chips.com> |
usb: dwc2: increase timeout to 5s in wait_for_chhltd
It was observed on specific devices such as aigo (idVendor=0xffff, idProduct=0x5678) that the response CSW packet takes more than 2 seconds. Ther
usb: dwc2: increase timeout to 5s in wait_for_chhltd
It was observed on specific devices such as aigo (idVendor=0xffff, idProduct=0x5678) that the response CSW packet takes more than 2 seconds. Therefore, this change increases the timeout threshold to 5 seconds to align with the EHCI controller driver.
Change-Id: I539a211dd4ae46dd7a7275b1030625e931a1f18f Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
show more ...
|
| 30bf5086 | 08-Jun-2025 |
William Wu <william.wu@rock-chips.com> |
usb: dwc2: gadget: support force b_session valid
Change-Id: I557280ba69c75a2a230981c22c11ff8e42cc5a94 Signed-off-by: William Wu <william.wu@rock-chips.com> |
| a7d1e51c | 09-May-2025 |
Jon Lin <jon.lin@rock-chips.com> |
rockusb: support reset to loader mode
Change-Id: Ib47a8216124b96f4e688d6f5494d640283808fc9 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> |
| e0bae237 | 27-Apr-2025 |
Jon Lin <jon.lin@rock-chips.com> |
rockusb: support switch storage to pcie
Change-Id: I7f1fb3f47b39971a0f3633fac716849b3c945f63 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> |
| d049485d | 27-Apr-2025 |
Hisping Lin <hisping.lin@rock-chips.com> |
rockusb: support lock oem otp key
Change-Id: I76afd16fd6816b7154b77e4ddd060c893266d268 Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com> |
| 04569280 | 11-Apr-2025 |
Hisping Lin <hisping.lin@rock-chips.com> |
rockusb: support write fw encrypt key
Change-Id: I046ae3219aac8af27246304e59c5da143172870a Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com> |
| fb18c489 | 27-Mar-2025 |
Frank Wang <frank.wang@rock-chips.com> |
usb: host: ohci: fix null buffer pointer
During the USB enumeration phase, the buffer address passed by certain commands such as usb_set_address() is NULL. Therefore, ensure that the buffer is not e
usb: host: ohci: fix null buffer pointer
During the USB enumeration phase, the buffer address passed by certain commands such as usb_set_address() is NULL. Therefore, ensure that the buffer is not empty when calling flush_dcache_buffer().
Without this patch, the panic occurred and the call trace was parsed as below by running ./scripts/stacktrace.sh dump.txt
Call trace: PC: [< 40201dc0 >] __asm_flush_dcache_range+0x20/0x3c uboot-nextdev/arch/arm/cpu/armv8/cache.S:144 LR: [< 4025cfc4 >] sohci_submit_job+0x518/0x7f4 uboot-nextdev/drivers/usb/host/ohci-hcd.c:964
Stack: [< 40201dc0 >] __asm_flush_dcache_range+0x20/0x3c [< 4025d4d8 >] submit_common_msg+0xe0/0x1ac [< 4025dba4 >] ohci_submit_control_msg+0x554/0x51c [< 4025b9e8 >] submit_control_msg+0x48/0x9c [< 4021abb8 >] usb_control_msg+0x5c/0xbc [< 4021b934 >] usb_setup_device+0xb8/0x120 [< 4025bc88 >] usb_scan_device+0x98/0x2a0
Change-Id: I467fe5a02f21ad06de43d34d75c052f5603f7ae3 Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
show more ...
|
| 4428ea84 | 11-Dec-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
rockusb: support dump uart debug messages
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I263d36505300498e3b6a9c5003f9132bfd05b2e7 |
| 16601491 | 29-Oct-2024 |
Frank Wang <frank.wang@rock-chips.com> |
usb: host: dwc2: fix periodic tx fifo config error
We found some errors when copy bulk data from U-Disk, and the below logs are reported if we enable usb_storage and dwc2 debug macro.
=> usb read
usb: host: dwc2: fix periodic tx fifo config error
We found some errors when copy bulk data from U-Disk, and the below logs are reported if we enable usb_storage and dwc2 debug macro.
=> usb read 0x20000000 0x0021dc4b 0xf1d1 [...] .read10: start 21fefb blocks f0 COMMAND phase dwc2_submit_bulk_msg: dev='usb@ff300000', udev=000000003bcbacd0 chunk_msg: msg: pipe c0010203 pid 0 in 0 len 31 transfer_chunk: chunk: pid 0 xfer_len 31 pkts 1 wait_for_chhltd: HCINT=00000082 sub=31 toggle=0 wait_for_chhltd: Error (HCINT=00000082) usb_stor_BBB_comdat:usb_bulk_msg error failed to send CBW status 0 BBB_reset
The root cause is Periodic Tx FIFO configured abortively for after setting the ForceHstMode bit, the application must wait at least 25 ms before the change to take effect (DWC2 Databook 3.10a Table 5-10).
Test on RK3326 platform, delay 30 ms can fix the issue.
Change-Id: I585a9dd44bafe1de0f6cffd8024708d8d3450bf0 Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
show more ...
|
| 92eae861 | 22-Oct-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
rockusb: support switch storage to sata
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I65e6867bf21a508b452053f12df635b4d6bbb8e8 |
| 73eced63 | 16-Oct-2024 |
Xuhui Lin <xuhui.lin@rock-chips.com> |
drivers: gadget: rockusb: Fix rkusb_do_vs read/write support
rockusb vs r/w no need depends on vendor storage. It already supports many other paths to store secure data.
Change-Id: I4b47227fb009780
drivers: gadget: rockusb: Fix rkusb_do_vs read/write support
rockusb vs r/w no need depends on vendor storage. It already supports many other paths to store secure data.
Change-Id: I4b47227fb00978082c57b1af4c96c63d12c51ed7 Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
show more ...
|
| b5f10227 | 19-Aug-2024 |
William Wu <william.wu@rock-chips.com> |
usb: dwc3: Disable suspend usb2 phy for rockchip platform
The rockchip SoCs need to disable usb2 phy enter suspend mode which depends on the dwc3 suspend condition, otherwise the usb2 phy doesn't ge
usb: dwc3: Disable suspend usb2 phy for rockchip platform
The rockchip SoCs need to disable usb2 phy enter suspend mode which depends on the dwc3 suspend condition, otherwise the usb2 phy doesn't get out of suspend and cause U-Boot panic with the following log when scan some udisks.
XHCI timeout on event type 33... cannot recover. BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()! BUG!
Change-Id: I54e5e1bafc93ebac4ce4076d6a60bf1e5d36ef3d Signed-off-by: William Wu <william.wu@rock-chips.com>
show more ...
|
| 91eda203 | 22-Aug-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
rockusb: add sata and pcie flash id
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I62a73d455391f4e6d515c8b4db9873f11e0301cf |
| 7bcaf050 | 27-Apr-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: usb: host: dwc2: add trace to have clean usb start
Solve issue for the display of "usb start" command on stm32mp1 because one carriage return is missing in DWC2 probe.
Before the patch:
UPSTREAM: usb: host: dwc2: add trace to have clean usb start
Solve issue for the display of "usb start" command on stm32mp1 because one carriage return is missing in DWC2 probe.
Before the patch:
STM32MP> usb start starting USB... Bus usb-otg@49000000: Bus usbh-ehci@5800d000: USB EHCI 1.00
after the patch:
STM32MP> usb start starting USB... Bus usb-otg@49000000: USB DWC2 Bus usbh-ehci@5800d000: USB EHCI 1.00
Change-Id: I821e082679cacfc53d49b95882982983810c42de Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 245847f06570a74ecff59809a2befc1dce7a354e)
show more ...
|
| 3fd577de | 27-Apr-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: usb: host: dwc2: force reset assert
Assert reset before deassert in dwc2_reset; this patch solve issues when the DWC2 registers are already initialized with value incompatible with host mo
UPSTREAM: usb: host: dwc2: force reset assert
Assert reset before deassert in dwc2_reset; this patch solve issues when the DWC2 registers are already initialized with value incompatible with host mode.
Force a hardware reset of the IP reset all the DWC2 registers at default value, the host driver start with a clean state (Core Soft reset doen in dwc_otg_core_reset is not enought to reset all register).
The error can occurs in U-Boot when DWC2 device gadget driver force device mode (called by ums or dfu command, before to execute the usb start command).
Change-Id: Iaf1494bc58c6b2d6c0323e0eb4bc6d18f8edf557 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 66004381661386d14183a436c5e0caeb19f4b415)
show more ...
|
| 1966f56e | 27-Apr-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: usb: host: dwc2: add clk support
Add support for clock with driver model.
This patch don't added dependency because when CONFIG_CLK is not activated the clk function are stubbed.
Change-
UPSTREAM: usb: host: dwc2: add clk support
Add support for clock with driver model.
This patch don't added dependency because when CONFIG_CLK is not activated the clk function are stubbed.
Change-Id: I06a8762639274a0d79ab737898b504b7989eb5f3 Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 0bc632c9b189f0350b2ef81d6583704bd10cfdc9)
show more ...
|
| 1e03ec26 | 27-Apr-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: usb: host: dwc2: add phy support
Use generic phy to initialize the PHY associated to the DWC2 device and available in the device tree.
This patch don't added dependency because when CONFI
UPSTREAM: usb: host: dwc2: add phy support
Use generic phy to initialize the PHY associated to the DWC2 device and available in the device tree.
This patch don't added dependency because when CONFIG_PHY is not activated, the generic PHY function are stubbed.
Change-Id: I0552d885a58ce693374e3bdfa0a09a2ae36fac18 Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit e17a4bf198510693967644c331ab621fc41ea8b5)
show more ...
|
| 398ff6a5 | 16-Aug-2024 |
Jon Lin <jon.lin@rock-chips.com> |
usb: gadget: rockusb: Support RK3308 SPI Nor idblock update
Change-Id: I07fe3533b15d9c33b47205b0f4c19aae2dca7b55 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> |
| 90a5cd4a | 28-May-2024 |
Neil Armstrong <neil.armstrong@linaro.org> |
UPSTREAM: usb: dwc3: gadget: fix crash in dwc3_gadget_giveback()
If the ep0 stalls or request are dequeued when gagdet is stopped, the request dma may not be mapped yet and dwc3_flush_cache() may be
UPSTREAM: usb: dwc3: gadget: fix crash in dwc3_gadget_giveback()
If the ep0 stalls or request are dequeued when gagdet is stopped, the request dma may not be mapped yet and dwc3_flush_cache() may be called with a NULL pointer.
Check req->request.dma before calling dwc3_flush_cache() and later the usb_gadget_unmap_request() functions since it means that usb_gadget_map_request() hasn't been called yet.
Fixes: fd15b58c1a9 ("dwc3: flush cache only if there is a buffer attached to a request") Change-Id: I08df172aaea16bd09f3c9596576d3b45f7338caa Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240528-topic-sm8x50-dwc3-gadget-crash-fix-v1-1-58434ab4b3d3@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: William Wu <william.wu@rock-chips.com> (cherry picked from commit 85ced6f4745f529098cae38a5bd3144035a1318c)
show more ...
|
| 1422d140 | 29-Oct-2023 |
Hector Martin <marcan@marcan.st> |
BACKPORT: usb: xhci: Guard all calls to xhci_wait_for_event
xhci_wait_for_event returns NULL on timeout, so the caller always has to check for that. This addresses immediate explosions in this part
BACKPORT: usb: xhci: Guard all calls to xhci_wait_for_event
xhci_wait_for_event returns NULL on timeout, so the caller always has to check for that. This addresses immediate explosions in this part of the code when timeouts happen, but not the root cause for the timeout.
Change-Id: Ib899b615349ed5d1d00885b6508c765b6e773d6a Signed-off-by: Hector Martin <marcan@marcan.st> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: William Wu <william.wu@rock-chips.com> (cherry picked from commit 8d1e03f984c7467d7c8883f15dea14b2f8b4c0e2)
show more ...
|
| 0c195942 | 27-Sep-2021 |
Stefan Agner <stefan@agner.ch> |
UPSTREAM: usb: xhci: reset endpoint on USB stall
There are devices which cause a USB stall when trying to read strings. Specifically Arduino Mega R3 stalls when trying to read the product string.
T
UPSTREAM: usb: xhci: reset endpoint on USB stall
There are devices which cause a USB stall when trying to read strings. Specifically Arduino Mega R3 stalls when trying to read the product string.
The stall currently remains unhandled, and subsequent retries submit new transfers on a stopped endpoint which ultimately cause a crash in abort_td(): WARN halted endpoint, queueing URB anyway. XHCI control transfer timed out, aborting... Unexpected XHCI event TRB, skipping... (3affe040 00000000 13000000 02008401) BUG at drivers/usb/host/xhci-ring.c:505/abort_td()! BUG! resetting ...
Linux seems to be able to recover from the stall by issuing a TRB_RESET_EP command.
Introduce reset_ep() which issues a TRB_RESET_EP followed by setting the transfer ring dequeue pointer via TRB_SET_DEQ. This allows to properly recover from a USB stall error and continue communicating with the USB device.
Change-Id: I3412ae470addfe67f71f2cbf4b1dfc8fcaf85c78 Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: William Wu <william.wu@rock-chips.com> (cherry picked from commit d5daa02d8d9e7c403a3339db1966e8413e64e408)
show more ...
|
| 9aae75f9 | 11-May-2024 |
William Wu <william.wu@rock-chips.com> |
usb: gadget: rockusb: Fix product id for fastboot
The current pid of fastboot (0xd00d) is not supported either in google's android_winusb.inf (see [1]) or in rockchip's android_winusb.inf, this will
usb: gadget: rockusb: Fix product id for fastboot
The current pid of fastboot (0xd00d) is not supported either in google's android_winusb.inf (see [1]) or in rockchip's android_winusb.inf, this will cause the users to install the fastboot driver manually every time if the iSerialNumber has chanaged.
This patch uses a new product id (0x4d00) which has being supported in google's android_winusb.inf.
[1]. https://developer.android.com/studio/run/win-usb Change-Id: I948702762e329b331377d72fbd4cda9df83a49d6 Signed-off-by: William Wu <william.wu@rock-chips.com>
show more ...
|
| a1b07e70 | 18-Mar-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
rockusb: update num_sectors after stroage switch
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I7c2eacc5c924edad83d01d42337ac96785944fde |
| 0aca89f2 | 06-Mar-2024 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
gpt: support ufs 4k block size
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I6e61021ccd192c49ef92bf2f54d58b9a1c4a6882 |
| 26b169f6 | 13-Mar-2024 |
Jon Lin <jon.lin@rock-chips.com> |
rockusb: Using 4KB pagesize as 2KB for idblock
Setting using 4KB pagesize as 2KB flag for SPI Nand devices.
Change-Id: I59f58fc5fded089ae053d12c7c11a5e15e4ad746 Signed-off-by: Jon Lin <jon.lin@rock
rockusb: Using 4KB pagesize as 2KB for idblock
Setting using 4KB pagesize as 2KB flag for SPI Nand devices.
Change-Id: I59f58fc5fded089ae053d12c7c11a5e15e4ad746 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
show more ...
|