summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-16Merge tag 'u-boot-dfu-20240516' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20240516 - Fix cdns3 low power hang via fast access bit - Multiple dwc3 gadget fixes, mainly for USB support on TI AM6232 - Consistent USB_GADGET_MANUFACTURER for PHYTEC boards - MAINTAINERS file update for u-boot-dfu
2024-05-16MAINTAINERS: add USB gadget regex to u-boot-dfu treeMattijs Korpershoek
We try to split work with Marek on USB as following: - Mattijs handles USB gadget - Marek handles the rest of USB Add additional gadget patterns to the maintainers file so that I get cc'ed more often on USB gadget patches. Acked-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16MAINTAINERS: add tree link for fastbootMattijs Korpershoek
Fastboot patches go through the u-boot-dfu tree. Add a link in the maintainers file for it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End TransferThinh Nguyen
Upstream Linux commit 3aa07f72894d. If there's a disconnection while operating in eSS, there may be a delay in VBUS drop response from the connector. In that case, the internal link state may drop to operate in usb2 speed while the controller thinks the VBUS is still high. The driver must make sure to disable GUSB2PHYCFG.SUSPHY when sending endpoint command while in usb2 speed. The End Transfer command may be called, and only that command needs to go through at this point. Let's keep it simple and unconditionally disable GUSB2PHYCFG.SUSPHY whenever we issue the command. This scenario is not seen in real hardware. In a rare case, our prototype type-c controller/interface may have a slow response triggerring this issue. Signed-off-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/5651117207803c26e2f22ddf4e5ce9e865dcf7c7.1668045468.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: properly check ep cmdFelipe Balbi
Upstream Linux commit 5999914f227b. The cmd argument we pass to dwc3_send_gadget_ep_cmd() could contain extra arguments embedded. When checking for StartTransfer command, we need to make sure to match only lower 4 bits which contain the actual command and ignore the rest. Reported-by: Janusz Dziedzic <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> [A. Sverdlin: cherry-picked only DWC3_DEPCMD_CMD() define] Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: Check ENBLSLPM before sending ep commandThinh Nguyen
Upstream Linux commit 87dd96111b0b. When operating in USB 2.0 speeds (HS/FS), if GUSB2PHYCFG.ENBLSLPM or GUSB2PHYCFG.SUSPHY is set, it must be cleared before issuing an endpoint command. Current implementation only save and restore GUSB2PHYCFG.SUSPHY configuration. We must save and clear both GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY settings. Restore them after the command is completed. DWC_usb3 3.30a and DWC_usb31 1.90a programming guide section 3.2.2 Signed-off-by: Thinh Nguyen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEEDFelipe Balbi
Upstream Linux commit ab2a92e7a608. As a micro-power optimization, let's only resume the USB2 PHY if we're working on <=HIGHSPEED. If we're gonna work on SUPERSPEED or SUPERSPEED+, there's no point in resuming the USB2 PHY. Fixes: 2b0f11df84bb ("usb: dwc3: gadget: clear SUSPHY bit before ep cmds") Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: clear SUSPHY bit before ep cmdsFelipe Balbi
Upstream Linux commit 2b0f11df84bb. Synopsys Databook 2.60a has a note that if we're sending an endpoint command we _must_ make sure that DWC3_GUSB2PHY(n).SUSPHY bit is cleared. This patch implements that particular detail. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-16usb: dwc3: gadget: combine return points into a single oneFelipe Balbi
Upstream Linux commit c0ca324d09a0. dwc3_send_gadget_ep_cmd() had three return points. That becomes a pain to track when we need to debug something or if we need to add more code before returning. Let's combine all three return points into a single one just by introducing a local 'ret' variable. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-15dma: ti: k3-udma: invalidate prepared buffers before pushing to recv ringMatthias Schiffer
Buffers must not have an unclean cache before being used for DMA - a pending write-back may corrupt the next dev-to-mem transfer otherwise. This was consistently noticeable during long TFTP transfers, when an ARP request is answered by U-Boot in the middle of the transfer: As U-Boot's arp_receive() reuses the receive buffer to prepare its reply packet, the beginning of one of the next incoming TFTP packets is overwritten by the ARP reply. The corrupted packet is ignored, but the TFTP transfer stalls for a few seconds until a timeout is detected and a retransmit is triggered. Signed-off-by: Matthias Schiffer <[email protected]> Tested-by: Alexander Sverdlin <[email protected]>
2024-05-15dma: ti: k3-udma: add missing <net.h> includeMatthias Schiffer
net.h is needed for PKTBUFSRX. Without this definition, the driver will always use 4 RX buffers, causing am65-cpsw-nuss initialization to fail when a higher number of buffers is requested. Signed-off-by: Matthias Schiffer <[email protected]>
2024-05-15net: ti: am65-cpsw-nuss: fix error handling for "RX dma add buf failed"Matthias Schiffer
The RX DMA channel has been requested at this point already, so it must be freed. Signed-off-by: Matthias Schiffer <[email protected]>
2024-05-15net: ti: am65-cpsw-nuss: avoid errors due to imbalanced start()/stop()Matthias Schiffer
The eth-uclass state machine doesn't prevent imbalanced start()/stop() calls - to the contrary, it even provides eth_init_state_only() and eth_halt_state_only() functions that change the state without any calls into the driver. This means that the driver must be robust against duplicate start() and stop() calls as well as send/recv calls while the interface is down. We decide not to print error messages but just to return an error in the latter case, as trying to send packets on a disabled interface commonly happens when the netconsole is still active after the Ethernet has been halted during bootm. Signed-off-by: Matthias Schiffer <[email protected]>
2024-05-15net: eth-uclass: guard against reentrant eth_init()/eth_halt() callsMatthias Schiffer
With netconsole, any log message can result in an eth_init(), possibly causing an reentrant call into eth_init() if a driver's ops print anything: eth_init() -> driver.start() -> printf() -> netconsole -> eth_init() eth_halt() -> driver.stop() -> printf() -> netconsole -> eth_init() Rather than expecting every single Ethernet driver to handle this case, prevent the reentrant calls in eth_init() and eth_halt(). The issue was noticed on an AM62x board, where a bootm after simultaneous netconsole and TFTP would result in a crash. Signed-off-by: Matthias Schiffer <[email protected]> Link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1350550/sk-am62a-lp-am65_cpsw_nuss_port-error-in-u-boot-while-using-netconsole-functionality/
2024-05-15Merge patch series "Add remoteproc driver for AM62a SoC"Tom Rini
Hari Nagalla <[email protected]> says: This series adds relevant ip data in remoteproc driver for AM62a devices. Logs: https://paste.sr.ht/~hnagalla/5e20838705c1d688bca81886dad56451b56d3913
2024-05-15board: ti: am62ax: Add support for remote proc loadHari Nagalla
Add AM62a remote proc firmware names to environment variables for loading of C7x DSP and R5F processors. Signed-off-by: Hari Nagalla <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]>
2024-05-15configs: am62ax: enable remote proc driversHari Nagalla
Enable K3-DSP and K3-R5FSS remote proc drivers for am62ax. Signed-off-by: Hari Nagalla <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]>
2024-05-15remoteproc: k3-r5: Add support for R5F core on AM62A SoCsHari Nagalla
AM62A has a R5F core in MCU voltage domain. Extend support for R5F remote proc driver on AM62A with compatible strings. Signed-off-by: Hari Nagalla <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]>
2024-05-15remoteproc: k3-dsp: Enable C71x support for AM62AHari Nagalla
AM62A SoC has a single C71x DSP subsystem with analytics engine in main voltage domain. Extend support to AM62A with compatible strings. Signed-off-by: Hari Nagalla <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]>
2024-05-15Merge patch series "Add DFU and usb boot for TI am62x SK and beagleplay"Tom Rini
Martyn Welch <[email protected]> says: This series adds DFU support for TI AM62 SK and beagleplay boards. I have picked this series up from Sjoerd due to time constraints. Since the last revision: * Removed dwc3 mode setting in favour of reinstating forced peripheral mode for usb0 * Use of config fragments for both r5 and a53 DFU configuration to reduce duplication * Typographical improvements to documentation We plan to also submit the dts changes to linux so that those can be dropped again in the near future (hopefully)
2024-05-15doc: board: Add document for DFU boot on am62x SoCsSjoerd Simons
Both AM62 SK and beagleplay support DFU boot in a similar way now; Document how to actually run DFU boot for both boards Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # on beagle play Signed-off-by: Martyn Welch <[email protected]>
2024-05-15beagleplay: Add DFU supportSjoerd Simons
DFU mode on a beagleplay can be used via the Type-C connector by holding the USR switch while powering on. Configuration is already provided as fragments for both the A53 and R5 u-boot parts. Include the am62x_a53_usbdfu.config config. The am62x_r5_usbdfu.config fragment needs to be added should DFU boot be required as this will disable booting from persistent storage due to binary size constraints. Signed-off-by: Sjoerd Simons <[email protected]> Signed-off-by: Martyn Welch <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]>
2024-05-15configs: am62x_evm_*: Enable USB and DFU supportSjoerd Simons
Provide config fragments to enable USB host as well as USB gadget and DFU support for a53 and r5. This relevant fragment is included into the am62x EVM a53 defconfig. For the r5, due to the smaller available size, the config fragment also disables support for persistent storage to free up space for USB support. This fragment needs to be included is DFU booting is desired. The CONFIG_DFU_SF option is placed in the defconfig rather than the fragment as this is known not to be supported on all boards that can support DFU. Signed-off-by: Sjoerd Simons <[email protected]> Signed-off-by: Martyn Welch <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-05-15arm: dts: k3-am625-sk: Enable usb port in u-bootSjoerd Simons
Enable usb0 in all boot phases for use with DFU Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Martyn Welch <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-05-15board: ti: am62x: am62x: include env for DFUSjoerd Simons
Include standard TI K3 dfu environment Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # on beagle play
2024-05-15usb: dwc3: Add dwc3 glue driver for am62Sjoerd Simons
Add glue code for TI AM62 to the dwc3 driver; Most code adopted from TI vendor u-boot code. Signed-off-by: Sjoerd Simons <[email protected]> Tested-by: Alexander Sverdlin <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # on beagle play
2024-05-14Merge branch '2024-05-13-assorted-updates' into nextTom Rini
- A few zfs fixes, ARMv8 timer cleanups, support more algorithms with the nuvoton crypto driver, virtio + env in filesystem fix, K3 code cleanup and warning fix in gen_compile_commands.
2024-05-14Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/20690 - RISC-V: Add NULL check after parsing compatible string - Board: Add Milk-V Mars CM board - Andes: Unify naming policy
2024-05-14Merge branch 'qcom-main' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon This [pull request] for master fixes framebuffer video on almost all Qualcomm platforms where the framebuffer is initialised by the first stage bootloader.
2024-05-14andes: Unify naming policy for Andes related sourceLeo Yu-Chi Liang
Signed-off-by: Leo Yu-Chi Liang <[email protected]>
2024-05-14riscv: simplify backtrace reportHeinrich Schuchardt
* We already have a header 'backtrace', there is no need to repeat the word backtrace on every line. * Add a blank line before the backtrace section of the crash report for improved readability. * If U-Boot is compiled without backtrace, there is no need to write a message at all. * Avoid #ifdef. We prefer functions to always be compiled and let the linker remove them if not needed. * Foresee 3 digits for the backtrace index. For testing the 'exception' command can be used. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2024-05-14starfive: add mac vendor sub-commandHeinrich Schuchardt
As boards from multiple vendors (Milk-V, StarFive, Pine64) use the mac command provide a sub-command to set the vendor string. Reported-by: E. Shattow <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2024-05-14configs: visionfive2: enable SPL_YMODEM_SUPPORTHeinrich Schuchardt
We can use U-Boot for recovering JH7110 based boards via UART if CONFIG_SPL_YMODEM_SUPPORT=y. * Send u-boot-spl.normal.out via XMODEM. * Send u-boot.itb via YMODEM. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: E. Shattow <[email protected]>
2024-05-14doc: Milk-V Mars CM and Milk-V Mars CM LiteHeinrich Schuchardt
Provide a man-page describing the usage of U-Boot on the Milk-V Mars CM and Milk-V Mars CM Lite boards. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: E Shattow <[email protected]>
2024-05-14board: add support for Milk-V Mars CMHeinrich Schuchardt
We already support the VisionFive 2 and the Milk-V Mars board by patching the VisionFive 2 device tree. With this patch the same is done for the Milk-V Mars CM. Signed-off-by: Heinrich Schuchardt <[email protected]> Tested-by: E. Shattow <[email protected]> Reviewed-by: E. Shattow <[email protected]>
2024-05-14board: starfive: function to read eMMC sizeHeinrich Schuchardt
The EEPROM provides information about the size of the eMMC. Provide a new function get_mmc_size_from_eeprom() to read it. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: E. Shattow <[email protected]>
2024-05-14riscv: add NULL check before calling strlen in the riscv cpu's get_desc()Hanyuan Zhao
Without the NULL check, if the devicetree that u-boot loads does not have a compatible property then a store access fault will be raised and force the machine to reset, due to the NULL pointer we passed to strlen. This commit adds this check and will return -ENOSPC to indicate the get_desc failed. Signed-off-by: Hanyuan Zhao <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2024-05-14configs: Make USB_GADGET_MANUFACTURER consistent over all PHYTEC boardsBenjamin Hahn
Set CONFIG_USB_GADGET_MANUFACTURER to PHYTEC for all PHYTEC boards. Signed-off-by: Benjamin Hahn <[email protected]> Acked-by: Wadim Egorov <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-14usb: cdns3: gadget.c: Set fast access bitAswath Govindraju
When the device port is in a low power state [U3/L2/Not Connected], accesses to usb device registers may take a long time. This could lead to potential core hang when the controller registers are accessed after the port is disabled by setting DEVDS field. Setting the fast register access bit ensures that the PHY clock is keeping up in active state. Therefore, set fast access bit to ensure the accesses to device registers are quick even in low power states. commit b5148d946f45 ("usb: cdns3: gadget: set fast access bit") in the upstream kernel is taken as reference. Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Ravi Gunasekaran <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-05-14mach-snapdragon: do carveouts for qcs404 onlySam Day
The newly introduced carve_out_reserved_memory causes issues when U-Boot is chained from the lk2nd bootloader. lk2nd provides a simple-framebuffer device and marks the framebuffer region as no-map in the supplied /reserved-memory. Consequently, the simple_video driver triggers a page fault when it tries to write to this region. As per Caleb's advice, this simple patch only does the carveouts for the qcs404 SoC for which it was originally designed. The intent is to do the carveouts for more Qualcomm SoCs in future. Signed-off-by: Caleb Connolly <[email protected]>
2024-05-13arm: mach-k3: Move code specific to a SoC into that SoC's directoryAndrew Davis
Each SoC now has a directory in mach-k3, let's move the SoC specific files into their respective directories. Signed-off-by: Andrew Davis <[email protected]>
2024-05-13scripts: gen_compile_commands: fix invalid escape sequence warningCaleb Connolly
Since Python 3.12 unrecognised escape sequences trigger a SyntaxWarning. Convert the '\#' string to a raw string so the backslash is correctly used as a literal. Ported from Linux commit dae4a0171e25 ("gen_compile_commands: fix invalid escape sequence warning"). This updates the script to be in-line with Linux 6.9-rc6. Signed-off-by: Caleb Connolly <[email protected]> Reviewed-by: João Marcos Costa <[email protected]>
2024-05-13Init virtio before loading ENV from EXT4 or FATFiona Klute
Specifying a file in an EXT4 or FAT partition on a virtio device as environment location failed because virtio hadn't been initialized by the time the environment was loaded. This patch mirrors commit 54ee5ae84191 ("Add SCSI scan for ENV in EXT4 or FAT") in issue and fix, just for a different kind of block device. The additional include in include/virtio.h is needed so all functions called there are defined, the alternative would have been to include dm/device.h separately in the env/ sources. Checkpatch suggests using "if (IS_ENABLED(CONFIG...))" instead of "#if defined(CONFIG_...)", I'm sticking to the style of the existing code here. Signed-off-by: Fiona Klute <[email protected]> CC: Joe Hershberger <[email protected]> CC: Bin Meng <[email protected]> CC: Rogier Stam <[email protected]>
2024-05-13armv8: generic_timer: Use event stream for udelayPeter Hoyes
Polling cntpct_el0 in a tight loop for delays is inefficient. This is particularly apparent on Arm FVPs, which do not simulate real time, meaning that a 1s sleep can take a couple of orders of magnitude longer to execute in wall time. If running at EL2 or above (where CNTHCTL_EL2 is available), enable the cntpct_el0 event stream temporarily and use wfe to implement the delay more efficiently. The event period is chosen as a trade-off between efficiency and the fact that Arm FVPs do not typically simulate real time. This is only implemented for Armv8 boards, where an architectural timer exists, and only enabled by default for the ARCH_VEXPRESS64 board family. Signed-off-by: Peter Hoyes <[email protected]> Reviewed-by: Andre Przywara <[email protected]>
2024-05-13arm: Move sev() and wfe() definitions to common Arm header filePeter Hoyes
The sev() and wfe() asm macros are currently defined only for mach-exynos. As these are common Arm instructions, move them to the common asm/system.h header file, for both Armv7 and Armv8, so they can be used by other machines. wfe may theoretically trigger a context switch if an interrupt occurs so add a memory barrier to this call. Signed-off-by: Peter Hoyes <[email protected]> Reviewed-by: Andre Przywara<[email protected]>
2024-05-13sandbox: make function 'do_undefined' properly compiles for PowerPCWHR
The 2 bytes 0xffff is too short for being a PowerPC instruction, resulting in an error similar to: /tmp/ccW8yjie.s: Assembler messages: /tmp/ccW8yjie.s: Error: unaligned opcodes detected in executable segment /tmp/ccW8yjie.s:223: Error: instruction address is not a multiple of 4 make[2]: *** [/tmp/ccyF4HIC.mk:17: /tmp/ccCKUFuF.ltrans5.ltrans.o] Error 1 Signed-off-by: WHR <[email protected]>
2024-05-13zfs: fix function 'zlib_decompress' pointlessly calling itselfWHR
In order to prevent crashing due to infinite recursion and actually decompress the requested data, call the zlib function 'uncompress' instead. Signed-off-by: WHR <[email protected]>
2024-05-13zfs: recognize zpools formatted with features supportWHR
Currently no features are implemented, only the zpool version 5000 that indicating the features support, is recognized. Since it is possible for OpenZFS to create a pool with features support enabled, but without enabling any actual feature, this change enables U-Boot to read such pools. Signed-off-by: WHR <[email protected]>
2024-05-13crypto: nuvoton: npcm_sha: Support SHA 384/512Jim Liu
1. Use vendor naming rule to rename each function 2. add SHA 384/512 support Signed-off-by: Jim Liu <[email protected]>
2024-05-13Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
Roger Quadros <[email protected]> says: Sync AM62 device tree files with Linux v6.9 and add in the missing bits in -u-boot.dtsi to get CPSW Ethernet working. CI testing: https://github.com/u-boot/u-boot/pull/534