aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-15Merge https://source.denx.de/u-boot/custodians/u-boot-shWIP/15Jan2023Tom Rini8-10/+16
2023-01-15Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini4-2/+23
2023-01-14usb: gadget: dwc2_udc_otg: implement pullup()Mattijs Korpershoek1-0/+9
Pullup is used by the usb framework in order to do software-controlled usb_gadget_connect() and usb_gadget_disconnect(). Implement pullup() for dwc2 using the SOFT_DISCONNECT bit in the dctl register: * when pullup is on, clear SOFT_DISCONNECT * when pullup is off, set SOFT_DISCONNECT This is especially useful when a gadget disconnection is initiated but no board_usb_cleanup() is called. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-01-14usb: gadget: fastboot: detach usb just before rebootingDario Binacchi1-1/+1
The patch fixes the following error when updating a BSH SMM S2 board: 3:72>Start Cmd:FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize} 3:72>Okay (0.023s) 3:72>Start Cmd:FB: reboot 3:72>Fail Bulk(R):LIBUSB_ERROR_IO(0s) The "fastboot reboot" command detaches the USB when it still needs to be used. So let's detach the USB just before the reset. CC: Mattijs Korpershoek <mkorpershoek@baylibre.com> Fixes: 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands") Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2023-01-14usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUTPatrick Delaunay2-1/+13
Add a new CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to increase the HUB_DEBOUNCE_TIMEOUT value, for example to 2s because some usb device needs around 1.5s or more to make the hub port status to be connected steadily after being powered off and powered on. This 2s value is aligned with Linux driver and avoids to configure "usb_pgood_delay" as a workaround for connection timeout on some USB device; normally the env variable "usb_pgood_delay" is used to delay the first query after power ON and thus the device answer, but this variable not used to increase the connection timeout delay. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-14configs: r8a77980: Condor: Enable MMC support by defaultAndrey Dolnikov1-1/+6
This enables MMC support, which is available on Condor board, by default. Signed-off-by: Andrey Dolnikov <andrey.dolnikov@cogentembedded.com> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2023-01-14ARM: renesas: condor: switch eMMC bus to 1V8Hai Pham1-7/+1
The eMMC card has two supplies, VCC and VCCQ. The VCC supplies the NAND array and the VCCQ supplies the bus. On Condor, the VCC is connected to 3.3V rail, while the VCCQ is connected to 1.8V rail. Adjust the pinmux to match the bus, which is always operating in 1.8V mode. Based on Linux commit 69efe4bbeda50745 ("arm64: dts: renesas: condor: Switch eMMC bus to 1V8") from Wolfram Sang Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2023-01-14ARM: dts: renesas: condor: Enable SPI NOR fast-readMarek Vasut1-0/+1
This board requires SPI NOR fast-read, otherwise the SPI NOR access returns corrupted data. Enable the fast-read explicitly in DT as it has been disabled in the MTD subsystem by commit d008190920 ("mtd: spi-nor: Mask out fast read if not requested in DT") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: ulcb: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 ULCBMarek Vasut1-1/+1
Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: condor: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 CondorMarek Vasut1-1/+1
Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 FalconMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 30 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 DraakMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 29 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 EbisuMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 34 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 CondorMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 EagleMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 ULCBMarek Vasut1-0/+1
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 31 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-13Merge tag 'u-boot-stm32-20230113' of ↵WIP/13Jan2023Tom Rini25-86/+507
https://source.denx.de/u-boot/custodians/u-boot-stm Add driver to manage onboard hub supplies Add calibration support for stm32-adc Linux kernel v6.1 DT synchronization for stm32mp151.dtsi stm32mp157a-dk1-scmi-u-boot.dtsi update Add support of OP-TEE and STM32MP13x in bsec driver ECDSA various fixes for stm32mp
2023-01-13Merge tag 'efi-2023-04-rc1' of ↵Tom Rini9-51/+117
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc1 Documentation: * build infodocs target on Gitlab CI, Azure UEFI: * fix function descriptions * add .rela sections to .text on arm64 * use EFI_EXIT in efi_riscv_get_boot_hartid * improve specification conformance of set_keyboard_layout()
2023-01-13ARM: stm32: Make ECDSA authentication available to U-BootMarek Vasut1-1/+1
With U-Boot having access to ROM API call table, it is possible to use the ROM API call it authenticate e.g. signed kernel fitImages using the BootROM ECDSA support. Make this available by pulling the ECDSA BootROM call support from SPL-only guard. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Pass ROM API table pointer to U-Boot properMarek Vasut1-0/+15
The ROM API table pointer is no longer accessible from U-Boot, fix this by passing the ROM API pointer through. This makes it possible for U-Boot to call ROM API functions to authenticate payload like signed fitImages. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Factor out save_boot_paramsMarek Vasut4-36/+43
The STM32MP15xx platform currently comes with two incompatible implementations of save_boot_params() weak function override. Factor the save_boot_params() implementation into common cpu.c code and provide accessors to read out both ROM API table address and DT address from any place in the code instead. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Fix ECDSA authentication with Dcache enabledMarek Vasut1-0/+4
In case Dcache is enabled while the ECDSA authentication function is called via BootROM ROM API, the MMU tables are set up and the BootROM region is not marked as executable, so an attempt to run code from it results in a hang. Mark the BootROM region as executable as suggested by Patrick to prevent the hang. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13efi_loader: provide agent_handle to efi_disk_add_dev()Heinrich Schuchardt1-21/+29
In efi_disk_add_dev() we have to open protocols with BY_DRIVER and BY_CHILD_CONTROLLER. Provide the handle of the EFI block driver. The actual usage of the value will follow in a later patch. Change function descriptions to Sphinx style. Remove a TODO: tag. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-13efi_selftest: add hii set keyboard layout test caseVincent Stehlé1-0/+12
Add a test for the case when the HII database protocol set_keyboard_layout() function is called with a NULL key_guid argument. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13efi_loader: refine set_keyboard_layout() statusVincent Stehlé1-0/+3
As per the EFI specification, the HII database protocol function set_keyboard_layout() must return EFI_INVALID_PARAMETER when it is called with a NULL key_guid argument. Modify the function accordingly to improve conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13efi_loader: use EFI_EXIT in efi_riscv_get_boot_hartidHeinrich Schuchardt1-1/+1
After calling EFI_ENTRY we have to call EFI_EXIT before returning. Add a missing EFI_EXIT(). Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones <dave.jones@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2023-01-13efi_loader: add .rela sections to .text on arm64Heinrich Schuchardt1-4/+4
_relocate() needs the information in .rela* for self relocation of the EFI binary. Fixes: d7ddeb66a6ce ("efi_loader: fix building aarch64 EFI binaries") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-13efi_loader: fix description of memory functionsHeinrich Schuchardt1-20/+62
* Add missing function descriptions * Adjust to Sphinx style Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13doc: build infodocs target on Gitlab CI, AzureHeinrich Schuchardt2-4/+6
Add infodocs target to CI testing. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-13doc: fix description of u16_strcasecmp()Heinrich Schuchardt1-1/+0
Remove non-existent parameter 'n' from function description. Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-12Merge branch '2023-01-12-further-assorted-general-updates'Tom Rini26-83/+340
- Bring in a number of assorted updates, some of which have been waiting around for a bit. Make silent console really be silent, get rid of gpio_hog_probe_all, add RNG for imx6, make net/fm use fs_loader, get rid of a bad __weak usage and set distro_bootpart_uuid in another case.
2023-01-12gpio: Get rid of gpio_hog_probe_all()Marek Vasut5-41/+10
The gpio_hog_probe_all() functionality can be perfectly well replaced by DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback of each GPIO hog driver instance after .bind() and thus configure the hogged GPIO accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-01-12dm: fix probing of all devices that have u-boot, dm-pre-reloc in SPL/TPLQuentin Schulz1-5/+7
Currently, dm_probe_devices checks that the flags of the device contains DM_FLAG_PRE_RELOC. However DM_FLAG_PRE_RELOC is a driver - and not a device - flag. This means that the check in pre_reloc_only mode would always fail. Instead, what was aimed to be checked is that either the driver of the device has the flag set, or that the device has the u-boot,dm-pre-reloc Device Tree property set. So let's fix the check to allow u-boot,dm-pre-reloc devices to be probed. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2023-01-12distro_bootcmd: Set distro_bootpart_uuid for block devicesMarek Vasut1-0/+3
The assignment of block device nodes in Linux is not deterministic by default, i.e. a newly added eMMC controller or other block device can change the assignment of /dev/mmcblkN (or other block device node like e.g. /dev/sdXy) and prevent the system from picking the correct block device for root filesystem in case the root filesystem is specified on kernel command line using 'root=/dev/mmcblkNpM' (or 'root=/dev/sdXy' etc.). One way out is to derive PARTUUID in U-Boot, which is unique identifier of a partition, and pass that as root=PARTUUID=<partuuid> to Linux via kernel command line. Linux would then find the partition using PARTUUID, no matter on which block device the partition resides and which node was assigned to that block device. Derive the PARTUUID before scanning for extlinux presence and assign it into distro_bootpart_uuid environment variable, which can then be used in extlinux.conf kernel command line specifier. Note that it is not possible to do this in scan_dev_for_extlinux script because this script is called from scan_dev_for_boot script, which is called for both block devices as well as UBI volumes, and we can not derive PARTUUID for UBI volumes. Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-12Revert "time: add weak annotation to timer_read_counter declaration"Harald Seiler1-1/+1
This reverts commit 65ba7add0d609bbd035b8d42fafdaf428ac24751. A weak extern is a nasty sight to behold: If the symbol is never defined, on ARM, the linker will replace the function call with a NOP. This behavior isn't well documented but there are at least some hints to it [1]. When timer_read_counter() is not defined, this obviously does the wrong thing here and it does so silently. The consequence is that a board without timer_read_counter() will sleep for random amounts and generally have erratic get_ticks() values. Drop the __weak annotation of the extern so a linker error is raised when timer_read_counter() is not defined. This is okay, the original reason for the reverted change - breaking the sandbox build - no longer applies. Final sidenote: This was the only weak extern in the entire tree at this time as far as I can tell. I guess we should avoid introduction of them again as they are obviously a very big footgun. [1]: https://stackoverflow.com/questions/31203402/gcc-behavior-for-unresolved-weak-functions Fixes: 65ba7add0d60 ("time: add weak annotation to timer_read_counter declaration") Reported-by: Serge Bazanski <q3k@q3k.org> Signed-off-by: Harald Seiler <hws@denx.de>
2023-01-12net: fm: Support loading firmware from a filesystemSean Anderson2-1/+28
This adds a new method to load Fman firmware from a filesystem. This allows users to use regular files instead of hard-coded offsets for the firmware. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-12net: fm: Add firmware name parameterSean Anderson2-4/+13
In order to read the firmware from the filesystem, we need a file name. Read the firmware name from the device tree, using the firmware-name property. This property is commonly used in Linux to determine the correct name to use (and can be seen in several device trees in U-Boot). Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-12misc: fs_loader: Add function to get the chosen loaderSean Anderson5-27/+44
The fs_loader device is used to pull in settings via the chosen node. However, there was no library function for this, so arria10 was doing it explicitly. This function subsumes that, and uses ofnode_get_chosen_node instead of navigating the device tree directly. Because fs_loader pulls its config from the environment by default, it's fine to create a device with nothing backing it at all. Doing this allows enabling CONFIG_FS_LOADER without needing to modify the device tree. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-12Added configs required for dcp_rng driverKshitiz Varshney2-0/+8
This commit adds configs required for using dcp_rng driver in imx6ull defconfig files. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2023-01-12Added dcp_rng driver initialization codeKshitiz Varshney1-0/+10
This commit initializes dcp_rng device driver inside arch_misc_init() function. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2023-01-12Uboot RNG Driver using Data Co-processorKshitiz Varshney3-0/+193
This commit introduces Random number generator to uboot. It uses DCP driver for number generation. RNG driver can be invoked by using below command on uboot prompt:- rng <number of bytes> Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-12common: spl: ram: fix return codeNikita Shubin1-4/+5
Instead of always retuning success, return actual result of load_simple_fit_image or spl_parse_image_header, otherwise we might end up jumping on uninitialized spl_image->entry_point. Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-01-12cmd: spi: Judge the number of added parameterschenzhipeng1-0/+3
When only sspi is entered, help information can be printed. Signed-off-by: chenzhipeng <chenzhipeng@eswincomputing.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-12console: Add option to keep it silent until env is loadedHarald Seiler2-0/+15
Add a config-option which forces the console to stay silent until the proper environment is loaded from flash. This is important when the default environment does not silence the console but no output must be printed when 'silent' is set in the flash environment. After the environment from flash is loaded, the console will be silenced/unsilenced depending on it. If PRE_CONSOLE_BUFFER is also used, the buffer will now be flushed if the console should not be silenced. Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-12configs: stm32mp13: Activate command stm32keyPatrick Delaunay1-0/+1
Activate the command stm32key with CONFIG_CMD_STM32KEY. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12board: st: Add support of STM32MP13x boards in stm32board cmdPatrick Delaunay2-4/+5
Add board identifiers for STMicroelectronics STM32MP13x boards: - DISCO board: MB1635 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12configs: stm32mp13: Activate CONFIG_CMD_FUSEPatrick Delaunay1-0/+1
Activate the command fuse to access on STM32MP13x OTP with the BSEC driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12stm32mp: Add support of STM32MP13x in bsec driverPatrick Delaunay1-0/+1
Add support for "st,stm32mp13-bsec" for STM32MP13x in the bsec driver based on OP-TEE pseudo TA STM32MP BSEC. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12stm32mp: Add OP-TEE support in bsec driverPatrick Delaunay5-12/+183
When OP-TEE is used, the SMC for BSEC management are not available and the STM32MP BSEC pseudo TA must be used (it is mandatory for STM32MP13 and it is a new feature for STM32MP15x). The BSEC driver try to open a session to this PTA BSEC at probe and use it for OTP read or write access to fuse or to shadow. This patch also adapts the commands stm32key and stboard to handle the BSEC_LOCK_PERM lock value instead of 1. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12stm32mp: cosmetic: Update of bsec driverPatrick Delaunay1-3/+1
Remove unnecessary return in stm32mp_bsec_write_lock and replace tab by space for plat_auto opts. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>