summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2026-01-21arm: Remove remainder of ARCH_ORION5XTom Rini
With commit 5663b137e682 ("arm: Remove edminiv2 board") the last ARCH_ORION5X platform was removed. Remove the rest of the architecture code which is now unused. Reviewed-by: Tony Dinh <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-01-17Merge branch 'master' of git://source.denx.de/u-boot-usbTom Rini
- Add the "apple,t8103-dwc3" compatible to the xhci-dwc3 glue
2026-01-16Merge branch 'qcom-main' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon We have been getting a lot more patches from Qualcomm engineers, largely focusing on IoT, router, and automotive platforms (those with QCS, IPQ, and SA prefixes specifically). Quite a variety of changes here: - Watchdog overflow fix - Hardcoded fastboot buffer addresses for a few board (hoppefully temporary until fastboot is updated to read $fastboot_addr_r) - Enable memory protection (MMU_MGPROT) for ARCH_SNAPDRAGON - pinctrl support for the QCS615 soc - various USB/phy fixes including phy config for msm8996/qcs615 - mmc and i2c clock configuration fixes - significant fixes for rpmh and regulator drivers - added config fragment for pixel devices - sa8775p clock fixes - support for "flattened" dwc3 DT that recently landed upstream for sc7280 (qcs6490) and a few other platforms
2026-01-16usb: dwc3-generic: support Qualcomm flattened DTCasey Connolly
Qualcomm devicetrees are moving away from having a glue node with dwc3 as a subnode and now may just have a single flattened node. Rockchip already have a glue_get_ctrl_dev op which returns the node for the glue device itself, commonise this and reuse it for the new Qualcomm node. Lastly adjust the qscratch base address since it now requires an offset from the dwc3 base. Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-16Merge tag 'u-boot-dfu-20260116' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20260116 CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/29018 Android: * Fix missing dependency for BOOTMETH_ANDROID * Add bootconfig support * Add 'get ramdisk' command to abootimg DFU: * Improve error handling in dfu_fill_entity() USB Gadget: * ci_udc: Ensure ci_ep->desc is valid before using it * ci_udc: Add additional debug prints
2026-01-16usb: xhci-dwc3: Add "apple,t8103-dwc3" compatibleJanne Grunau
The Linux support for dwc3 on Apple silicon SoCs switched to using a apple specific glue driver [1] that uses it own compatible string. The glue driver handles platform specific requirements on the interaction between dwc3 and the USB2/USB3 PHY and reset-controller for USB role switches and plug events. To keep USB working as before when the nodes still carried "snps,dwc3" as compatible add "apple,t8103-dwc3" to the of match table. Eventually it is probably advisable to add a dwc3-apple glue driver and write code for the currently empty Apple Type-C PHY driver in phy-apple-atc.c. Link: https://lore.kernel.org/asahi/[email protected]/ [1] Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Mark Kettenis <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Janne Grunau <[email protected]>
2026-01-14usb: gadget: Kconfig: Correct Qualcomm config name usedBalaji Selvanathan
Correct ARCH_QCOM to ARCH_SNAPDRAGON as ARCH_QCOM is outdated/unused config. Using ARCH_QCOM was causing USB fastboot mode to fail. Signed-off-by: Balaji Selvanathan <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Acked-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-14usb: dwc3: qcom: Add delays in UTMI clock selection for QscratchBalaji Selvanathan
Added delays before and after setting the PIPE_UTMI_CLK_SEL and PIPE3_PHYSTATUS_SW bits in the Qscratch GENERAL_CFG register during UTMI clock selection for DWC3 on Qualcomm platforms. These delays help ensure proper timing and stability of the UTMI clock switching sequence, potentially avoiding race conditions or unstable PHY behavior during initialization. Tested on platforms using Qscratch-based DWC3 PHY configuration. This change is taken from this Linux kernel implementation: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc3/dwc3-qcom.c?id=a4333c3a6ba9ca9cff50a3c1d1bf193dc5489e1c Signed-off-by: Balaji Selvanathan <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-09Merge patch series "Enable / require DEVRES for devm_.alloc usage outside xPL"Tom Rini
Tom Rini <[email protected]> says: As seen by a number of patches fixing memory leaks, U-Boot has a problem with developer expectations around devm_kmalloc and friends. Namely, whereas in Linux these memory allocations will be freed automatically in most cases, in U-Boot this is only true if DEVRES is enabled. Now, intentionally, in xPL phases, we do not (and do not offer as an option) enabling DEVRES. However in full U-Boot this is left either to the user, or some drivers have select'd DEVRES on their own. This inconsistency is a problem. This series goes and deals with two small issues that were shown by having all drivers that use devm_.alloc to allocate memory also select DEVRES and then we make DEVRES no longer be a prompted option and instead select'd as needed. We do not make this unconditional as it would result in growing the resulting binary on the many platforms which have no users of the devm_.alloc family of functions. Link: https://lore.kernel.org/r/[email protected]
2026-01-09dm: core: Default to using DEVRES outside of xPLTom Rini
The devm alloc functions that we have may follow the Linux kernel model where allocations are (almost always) automatically free()'d. However, quite often we don't enable, in full U-Boot, the tracking and free()'ing functionality. This in turn leads to memory leaks because the driver author expects that since the functions have the same name as in the Linux Kernel they have the same behavior. In turn we then get functionally correct commits such as commit 00e1fed93c8c ("firmware: ti_sci: Fix memory leaks in devm_ti_sci_get_of_resource") that manually add these calls. Rather than manually tracking allocations and implementing free()s, rework things so that we follow expectations by enabling the DEVRES functionality (outside of xPL phases). This turns DEVRES from a prompted symbol to a symbol that must be select'd, and we now remove our non-managed alloc/free functions from outside of xPL builds. Reviewed-by: Michael Trimarchi <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-01-09usb: ci_udc: cosmetics: EP and requests debug infoPetr Beneš
Make a note in an unexpected situation, e.g. queuing a request on a disabled endpoint, enabling an enabled endpoint... Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Petr Beneš <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-01-09usb: ci_udc: Check ci_ep->desc before usePetr Beneš
There are two places where ci_ep->desc could be accessed despite it is not valid at that moment. Either the endpoint has not been enabled yet or it has been disabled meanwhile (The ethernet gadged behaves this way at least.). That results in dereferencing a null pointer. Moreover, the patch gets rid of possible outstanding requests if the endpoint's state changes to disabled. Signed-off-by: Petr Beneš <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-01-08usb: dwc3-generic: add support for exynos7870Kaustabh Chakraborty
Exynos7870's DWC3 glue layer is quite simple, consisting of a few clocks, which is handled by this driver. Add the compatible string in here. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Kaustabh Chakraborty <[email protected]>
2026-01-08usb: dwc3-generic: allow fallback of dr_mode property to "otg"Kaustabh Chakraborty
Documentation [1] states that the default value of the dr_mode property is "otg". It also isn't marked a mandatory node, so it may or may not be set. So, accordingly if dr_mode is not mentioned in the devicetree node, OTG mode must be assumed. In this driver however, this case is not handled. If dr_mode is not mentioned, USB_DR_MODE_UNKNOWN is set. The logic implemented raises an error, instead of falling back to USB_DR_MODE_OTG. Correct this to conform to the specification. Link: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Bindings/usb/usb-drd.yaml?h=v6.18-dts [1] Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Kaustabh Chakraborty <[email protected]>
2026-01-08usb: xhci: avoid noisy 'Starting the controller' message.Heinrich Schuchardt
We should avoid overwhelming users with non-essential messages. The message 'Starting the controller' is not written for EHCI. We should not write it for XHCI either. Adjust the Python test accordingly. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-11-27usb/xhci: avoid noisy 'Register NbrPorts' messageHeinrich Schuchardt
We should avoid overwhelming users with non-essential messages. 'Register NbrPorts' is a debug message for EHCI. Do the same for XHCI. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-11-27usb: USB_EHCI_PCI depends on PCIHeinrich Schuchardt
CONFIG_USB_EHCI_PCI cannot work without CONFIG_PCI. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-11-12usb: gadget: Tighten CI_UDC dependenciesTom Rini
This driver cannot build when DM_USB_GADGET is enabled as both options control building of files that use the same global namespace and functionality. In this case make CI_UDC depend on DM_USB_GADGET being disabled as non-DM support is the legacy choice. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-11-12usb: host: xhci: Make U_BOOT_DRIVER entries uniqueTom Rini
All instances of the U_BOOT_DRIVER must use a unique name or they will lead to link time failures due to name space conflicts when both are present. Most of the XHCI drivers follow pattern of xhci_xxx in their name, but a few used "usb_xhci". Change these to follow the pattern of the rest of the XHCI glue drivers. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2025-11-12usb: gadget: Tighten the dependency for DWC2 OTG supportTom Rini
The DWC2 OTG driver depends on an ARM-specific header file to compile, so make it depend on ARM. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-11-12usb: musb: drop musb legacy driversPeter Robinson
The last of the users of the legacy musb drivers have been migrated so now remove the old musb stack, all users should now be using the new musb stack if they need this functionality. Signed-off-by: Peter Robinson <[email protected]> [trini: Remove a Makefile reference that was missed in v1] Signed-off-by: Tom Rini <[email protected]>
2025-11-12usb: gadget: spl: Add missing dependency for SPL_USB_GADGETTom Rini
It makes no sense to ask about nor enable SPL_USB_GADGET without SPL_FRAMEWORK being enabled. Attempting to do so leads to Kconfig noting dependency issues. Add the missing dependency. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-11-04Merge tag 'u-boot-imx-master-20251104' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/28144 - Extend USB support for the i.MX9 family. - Update memory controller for imx6ulz_smm_m2. - Add remoteproc support for several i.MX boards. - Add support for iMX95 15x15 EVK.
2025-11-04usb: f_sdp: Update SDP driver to support PQC containerYe Li
Since PQC container has changed version to 0x2 in container header, update the header's check. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Alice Guo <[email protected]> Acked-by: Peng Fan <[email protected]> Reviewed-by: Jacky Bai <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-11-04usb: ehci-mx6: Extend support to i.MX91, i.MX93, i.MX94, and i.MX95Alice Guo
Since the EHCI USB driver is shared across i.MX91, i.MX93, i.MX94, and i.MX95, the condition check is updated to use IMX9. Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-11-04usb: musb-new: fix typosYegor Yefremov
Typos found via codespell utility. Signed-off-by: Yegor Yefremov <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-11-04usb: musb-new: fix ti-musb dependenciesYegor Yefremov
If OF_CONTROL is on, ti-musb.c registers a "ti-musb-wrapper" driver that requires UCLASS_MISC. Hence, select MISC if both OF_CONTROL and USB_MUSB_TI are selected. Signed-off-by: Yegor Yefremov <[email protected]>
2025-10-30Merge tag 'qcom-for-2026.01-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon A variety of Qualcomm features/fixes for this cycle, notably with a few new platforms gaining support: * Initial support for SDM670 (similar to SDM845), SM6350, and SM7150 platforms is added * USB and UART issues on MSM8916 are addressed (improving stability/ reliability) * Firmware loading is implemented for the GENI serial engine, this is used on some platforms to load firmware for i2c/spi/uart to work Some additional patches like binman support for building MBN files still need some additional work. CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/8ef6ac07b35e39a57501554680bbf452e818d3e3/pipelines?ref=qcom-main
2025-10-30usb: gadget: Introduce usb gadget vendor/product default id for ARCH_QCOMGeorge Chan
Currently vendor/product id are both 0, and that might not as we want. Set to some arbitrary known value that we can make it work more smoothly. Reviewed-by: Mattijs Korpershoek <[email protected]> Acked-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: George Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: ehci-msm: Register ULPI PHY through NOP wrapperStephan Gerhold
The UCLASS_USB device is removed and rebound each time you run "usb stop" followed by "usb start", or when you switch between USB device and USB host mode. Unfortunately, this causes issues with the current ehci-msm driver: In ehci_usb_remove() we call generic_shutdown_phy(), but at that point the ULPI PHY we registered in ehci_usb_of_bind() was already removed again by the DM core. Fix this by adding a UCLASS_NOP driver that keeps the PHY driver bound permanently, and then just re-probe the actual USB part. Reported-by: Jianfeng Zhu <[email protected]> Closes: https://lore.kernel.org/u-boot/OSQPR04MB774067EBEEADD714EFE18C2A90882@OSQPR04MB7740.apcprd04.prod.outlook.com/ Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: ehci-msm: Drop redundant EHCI register writesStephan Gerhold
ehci_unregister() already clears the CMD_RUN bit with more careful checks. It also ensures that we only do this in case we were actually in USB host (rather than USB device) mode. It's not clear what the extra register writes in the Qualcomm-specific ehci-msm driver are supposed to do, so just drop them. Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: ehci-msm: Use clk bulk helpersStephan Gerhold
The enable order for the clocks does not matter much, we just need to enable all the USB clocks. Use the clk bulk helpers to simplify the code. Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: ehci-msm: Disable clocks after all register accessesStephan Gerhold
We need the USB clocks to do accesses like wait_for_bit_le32(&ehci->usbcmd, CMD_RESET, ...) so we should disable them only after all of them are done. At the moment this works only because the clock driver doesn't actually disabling these clocks in U-Boot. Fixes: 9b3a9f896e66 ("ehci: msm: bring up iface + core clocks") Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: echi-msm: Drop ulpi definitionsStephan Gerhold
These are unused. Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-30usb: host: ehci-msm: Fix pointer checkStephan Gerhold
dev_read_addr_ptr() returns a null pointer on error, not FDT_ADDR_T_NONE. Fixes: 2be1130a9305 ("usb: ehci-msm: Use dev interface to get device address") Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-28usb: musb-new: Cannot test unsigned member to be negativeAndrew Goodbody
You cannot test an unsigned member of a struct for being negative, the test will always fail. Instead assign the return value of fdtdec_get_int, which returns an int, to a temporary variable declared as an int, so that it can be tested for being negative before being assigned to the unsigned struct member. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: musb-new: Limit check array index before useAndrew Goodbody
epnum is used as an index into an array. The limit check for this index should be performed before using it to access an element in the array to prevent possible bounds overrun. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-10-28usb: musb-new: Null check before dereferenceAndrew Goodbody
A null check for the variable 'data' was introduced before dereferencing it for set_phy_power but other uses were not so protected. Add the null check for other dereferences of 'data'. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: xhci: exynos: variable node should be signedAndrew Goodbody
The variable node is assigned to the return value of a function that returns an int. It is tested for being negative and then passed as an argument to a function that takes an int. So 'node' should not be declared as unsigned. Correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ulpi: Incorrect operator usedAndrew Goodbody
Combining two bits into a mask to be used so that the same write code can be used to set or reset bits in a register clearly needs to use the binary 'or' operator, not the binary 'and'. Fix it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ohci-hcd: Null check lurb_priv before dereferenceAndrew Goodbody
When a variable needs a null check before it is dreferenced ensure that this is done even in the case of assignment on declaration. This was not happening for lurb_priv so correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: fsl-dt-fixup: Return an error code on errorAndrew Goodbody
fsl_fdt_fixup_usb_erratum uses strcmp to detect an error but then returns 'err' without it being set to an error. Calling code may not detect that an error occurred leading to a silent failure. Instead just return -EINVAL. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ehci: exynos: variable node should be signedAndrew Goodbody
THe variable node is assigned to the return value of a function that returns an int. It is tested for being negative and then passed as an argument to a function that takes an int. So 'node' should not be declared as unsigned. Correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-10-06Merge branch 'next'Tom Rini
Merge the outstanding changes from the 'next' branch to master.
2025-10-04global: Add expected space between '#include' and directiveTom Rini
These files had '#include<file.h>' rather than '#include <file.h>' which while functional is not the correct style. Signed-off-by: Tom Rini <[email protected]>
2025-09-30usb: dwc3: Remove redundant testAndrew Goodbody
In dwc3_ep0_complete_data there is a test for 'r' being null and the code will return at that point if so. After that point 'r' is guaranteed to not be null and testing for that is redundant. Remove the test for 'r' being non-null. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30usb: dwc2: Add missing null checkAndrew Goodbody
Add in the missing null check for dev->driver that is present at other points in the function before it is dereferenced. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30usb: gadget: atmel: Add missing null checkAndrew Goodbody
Add in the missing null check for udc->driver that is present at other points in the function before it is dereferenced. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-26usb: host: Tighten USB musb-new host glue driver dependenciesTom Rini
A few of the USB musb-new host glue drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-09-26usb: host: Tighten USB host driver dependenciesTom Rini
A few of the USB host drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>