| #
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 ...
|
| #
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 ...
|
| #
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 ...
|
| #
1a4f6af8 |
| 02-Mar-2020 |
Joseph Chen <chenjh@rock-chips.com> |
Merge branch 'next-dev' into thunder-boot
|
| #
85bca00e |
| 18-Aug-2019 |
Michal Suchanek <msuchanek@suse.de> |
UPSTREAM: dwc2: use the nonblock argument in submit_int_msg
An USB 1.1 keyboard connected to dwc2 through a high-speed hub does not report status until it changes. With this patch you can enable key
UPSTREAM: dwc2: use the nonblock argument in submit_int_msg
An USB 1.1 keyboard connected to dwc2 through a high-speed hub does not report status until it changes. With this patch you can enable keyboard by pressing a key while USB devices are probed. Without a keypress no state is reported and the probe times out. We don't want to wait for a keypress or timeout while polling for keypresses so implement an int_msg nonblock variant that exits early on error.
Change-Id: I6d89952ca5c00a1b076ae3fe9d9632ebdc6af843 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 9dcab2c4d2cb50ab1864c818b82a72393c160236)
show more ...
|
| #
92937b1f |
| 18-Aug-2019 |
Michal Suchanek <msuchanek@suse.de> |
UPSTREAM: usb: Add nonblock argument to submit_int_msg
This will be used to implement non-blocking keyboard polling in case of errors.
Conflicts: common/usb.c common/usb_kbd.c common/usb_storage
UPSTREAM: usb: Add nonblock argument to submit_int_msg
This will be used to implement non-blocking keyboard polling in case of errors.
Conflicts: common/usb.c common/usb_kbd.c common/usb_storage.c include/usb.h
Change-Id: I4a951d779e2cf9e80380f93000a87a617453fb32 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 3437121c037f502a3b0faaec97059777034a1ead)
show more ...
|
| #
3739bf7e |
| 21-Nov-2018 |
Sven Schwermer <sven@svenschwermer.de> |
UPSTREAM: usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/
This allows to disable the USB driver model in SPL because it checks the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for regu
UPSTREAM: usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/
This allows to disable the USB driver model in SPL because it checks the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for regular non-SPL builds.
Conflicts: drivers/usb/host/ehci-atmel.c drivers/usb/host/xhci-fsl.c
Change-Id: If6c980c620cf97c1dd131f60953c305e34dba505 Signed-off-by: Sven Schwermer <sven@svenschwermer.de> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit fd09c205fc57b90a782cac33449ef172575d0a8c)
show more ...
|
| #
a1bebf37 |
| 28-Aug-2018 |
Ley Foon Tan <ley.foon.tan@intel.com> |
UPSTREAM: usb: dwc2: Add reset ctrl to driver
Add code to reset all reset signals as in usb DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset p
UPSTREAM: usb: dwc2: Add reset ctrl to driver
Add code to reset all reset signals as in usb DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present.
If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset.
Change-Id: I1c8560b20900d65d628c05df20f5e6e5555bc2cf Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 88c34b8da62cfb4188ff9a59acb32f88ce9ed1b0)
show more ...
|
| #
b56d3e0f |
| 02-Jul-2018 |
Emmanuel Vadot <manu@freebsd.org> |
UPSTREAM: usb: dwc2: Add brcm,bcm2708-usb compatible
When using CONFIG_OF_BOARD on rpi to use the dtb provided by the RaspberryPi Fundation, the compatible string isn't the same, resulting in not-fu
UPSTREAM: usb: dwc2: Add brcm,bcm2708-usb compatible
When using CONFIG_OF_BOARD on rpi to use the dtb provided by the RaspberryPi Fundation, the compatible string isn't the same, resulting in not-functional usb from u-boot.
Change-Id: I1e780fe22dac4a19f099c6cf071c6be5e8eafea0 Signed-off-by: Oleksandr Tymoshenko <gonzo@FreeBSD.org> Signed-off-by: Emmanuel Vadot <manu@freebsd.org> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit ff5d5cc2331033c8a6987bb644827b52484160d9)
show more ...
|
| #
071d6beb |
| 15-Mar-2018 |
Patrice Chotard <patrice.chotard@st.com> |
UPSTREAM: usb: dwc2: Replace printf, pr_err by dev_info, dev_err
Replace printf() call by dev_info() and pr_err() by dev_err()
Change-Id: I841f5ef56885e225d4903aad92b3f83b724a8e30 Signed-off-by: Pa
UPSTREAM: usb: dwc2: Replace printf, pr_err by dev_info, dev_err
Replace printf() call by dev_info() and pr_err() by dev_err()
Change-Id: I841f5ef56885e225d4903aad92b3f83b724a8e30 Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit ac6c796c3f5c7b7594cf4ecede8cd8fb8d2611ba)
show more ...
|
| #
8d1c811e |
| 15-Mar-2018 |
Christophe Kerello <christophe.kerello@st.com> |
UPSTREAM: usb: dwc2: increase timeout in wait_for_chhltd
This patch increases timeout to 2s. It was seen on 2 USB devices (Verbatim STORE N GO 070B4AED0FB22358 and USB DISK 2.0 9000729BA41DDF40) tha
UPSTREAM: usb: dwc2: increase timeout in wait_for_chhltd
This patch increases timeout to 2s. It was seen on 2 USB devices (Verbatim STORE N GO 070B4AED0FB22358 and USB DISK 2.0 9000729BA41DDF40) that the request sense command takes between 1.3s and and 1.5s.
Change-Id: I3e241e2c731298cf238b31deea2785a08c012b73 Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit c2e4c8656978302ff2846a655fb87c658220c4e0)
show more ...
|
| #
79bf39c6 |
| 28-Feb-2018 |
Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
UPSTREAM: usb: dwc2: Allow selection of data buffer size
If we use hardware with very small RAM (let's consider just a couple of hundreds of kB but not megabytes) it is not super convenient to lose
UPSTREAM: usb: dwc2: Allow selection of data buffer size
If we use hardware with very small RAM (let's consider just a couple of hundreds of kB but not megabytes) it is not super convenient to lose 64kB for statically allocated bufer which most probably won't be used as big as it is. Typically we'll have much shorter data packages to excahnge and in the worst case longer packets will be split on separate transactions.
For those corner-cases user will be able to set his buffer size of choice via USB_DWC2_BUFFER_SIZE option in menuconfig.
By default we'll use 64 kB as it was hard-coeded before so existing users shouldn't be affected at all.
Change-Id: I7cbf1bfaa301434e96bc8230f638131d7d95e7dc Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 42637fdae833f8c3e8a0270ea7e74152cbd8ef38)
show more ...
|
| #
3cd21242 |
| 31-Jan-2018 |
Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
UPSTREAM: usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH
For some reason from day one we used to have both CONFIG_DWC2_UTMI_WIDTH mentioned in dwc2.h and in scripts/config_wh
UPSTREAM: usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH
For some reason from day one we used to have both CONFIG_DWC2_UTMI_WIDTH mentioned in dwc2.h and in scripts/config_whitelist.txt but never really used and CONFIG_DWC2_UTMI_PHY_WIDTH used in real code in dwc2.c (but never defined).
Moreover even though CONFIG_DWC2_UTMI_WIDTH might be either 8 or 16 depending on hardware (and the same is said in a comment for it in dwc2.h) but then 8 is hardcoded in the header leaving no ability to override this value in board's configuration.
Change-Id: Ibc6560c79a09d2116478b2131c1e0f3b02f67503 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 163f8858ae8bfcd94ef8d6c4ed75ff3abb642450)
show more ...
|
| #
782be0c4 |
| 15-Mar-2018 |
Christophe Kerello <christophe.kerello@st.com> |
UPSTREAM: usb: dwc2: disable external vbus supply when the device is removed
This patch adds an interface to disable the power in dwc2 driver. This new interface is called when the device is removed
UPSTREAM: usb: dwc2: disable external vbus supply when the device is removed
This patch adds an interface to disable the power in dwc2 driver. This new interface is called when the device is removed.
Change-Id: I4b00ce5f259abe07971753860fc801ff0ebfa0b0 Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 82e7975b85bea1c2acccf30e6fd11e1a48a7e783)
show more ...
|
| #
b491b498 |
| 18-Jun-2019 |
Jon Lin <jon.lin@rock-chips.com> |
UPSTREAM: wait_bit: use wait_for_bit_le32 and remove wait_for_bit
wait_for_bit callers use the 32 bit LE version
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwie
UPSTREAM: wait_bit: use wait_for_bit_le32 and remove wait_for_bit
wait_for_bit callers use the 32 bit LE version
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Change-Id: I638846de7db29711fb7c778cc8304b507de057fe Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 48263504c8d501678acaa90c075f3f7cda17c316) Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
show more ...
|
| #
ee0a9610 |
| 24-Feb-2018 |
Frank Wang <frank.wang@rock-chips.com> |
usb: host: dwc2: disable hnp and srp default for rockchip platform
Due to rockchip platform use live-tree which deployed from linux kernel, so abandon the previous 'hnp-srp-disable' DT property and
usb: host: dwc2: disable hnp and srp default for rockchip platform
Due to rockchip platform use live-tree which deployed from linux kernel, so abandon the previous 'hnp-srp-disable' DT property and disable hnp and srp default at probe time.
Change-Id: I5fb34bc789812d463b6a3c42b268af447d130950 Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
show more ...
|
| #
90aa625c |
| 16-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in include/linux/compiler-gcc.h
treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in include/linux/compiler-gcc.h:
# define __compiletime_error(message) __attribute__((error(message)))
This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
Let's convert error() into now treewide-available pr_err().
Done with the help of Coccinelle, excluing tools/ directory.
The semantic patch I used is as follows:
// <smpl> @@@@ -error +pr_err (...) // </smpl>
Change-Id: I921807c1770d36a91e692c48ab477558bb2ed0b8 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 9b643e312d528f291966c1f30b0d90bf3b1d43dc)
show more ...
|
| #
c32504a8 |
| 12-Sep-2017 |
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
UPSTREAM: usb: dwc2: convert to livetree
Update the DWC2 USB driver to support a live tree.
Change-Id: I1b2ccc05a637856cf1af0583985f0f336530121a Signed-off-by: Philipp Tomsich <philipp.tomsich@theo
UPSTREAM: usb: dwc2: convert to livetree
Update the DWC2 USB driver to support a live tree.
Change-Id: I1b2ccc05a637856cf1af0583985f0f336530121a Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit a9d3037a8e4f045434184623eadbe86fa3844b28)
show more ...
|
| #
d43ef73b |
| 11-Jul-2017 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-rockchip
|
| #
dd22bace |
| 28-Jun-2017 |
Meng Dongyang <daniel.meng@rock-chips.com> |
usb: dwc2: use dev_read_bool() instead of fdt_getprop()
Use dev_read_bool() instead of fdt_getprop() to get the property from DTS. And add a comment for "hnp-srp-disable" property to fully describe
usb: dwc2: use dev_read_bool() instead of fdt_getprop()
Use dev_read_bool() instead of fdt_getprop() to get the property from DTS. And add a comment for "hnp-srp-disable" property to fully describe its effect.
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
show more ...
|
| #
eab76dfd |
| 19-Jun-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
c65a3494 |
| 08-Jun-2017 |
Meng Dongyang <daniel.meng@rock-chips.com> |
usb: dwc2: force to host mode if not support HNP/SRP
In current code, after running the command of "usb start", the controller will keep in otg mode and can't switch to host mode if not support SNP/
usb: dwc2: force to host mode if not support HNP/SRP
In current code, after running the command of "usb start", the controller will keep in otg mode and can't switch to host mode if not support SNP/SRP capability. So add the property of "hnp-srp-disable" in the DTS to config the contrller work in force mode of host.
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
show more ...
|