summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-29pinephone-pro: Fix I/O port voltage (GPIO3D4A is 1.8V)Ondrej Jirman
This fixes access to camera sensor over I2C during probe time in the kernel. (Kernel will fix I/0 port voltage by itself, but the timing depends on probe order of the drivers, so the fix can come after the camera sensor driver already failed to probe.) Signed-off-by: Ondrej Jirman <megi@xff.cz> Cc: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
2023-06-29phy: rockchip: inno-usb2: fix phy reg=0 caseEugen Hristev
The support for #address-cells=2 has a loophole: if the reg is actually 0, but the #address-cells is actually 1, like in such case below: syscon { #address-cells = <1>; phy { reg = <0 0x10>; }; }; then the second u32 of the 'reg' is the size, not the address. The code should check for the parent's #address-cells value, and not assume that if the first u32 is 0, then the #address-cells is 2, and the reg property is something like reg = <0 0xff00 0x10>; Fixed this by looking for the #address-cells value and retrieving the reg address only if this is ==2. To avoid breaking anything I also kept the check `if reg==0` as some DT's may have a wrong #address-cells as parent and even if this commit is correct, it might break the existing wrong device-trees. Fixes: d538efb9adcf ("phy: rockchip: inno-usb2: Add support #address_cells = 2") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-06-27Merge branch 'riscv-fixes' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-riscv
2023-06-27riscv: Fix alignment of RELA sections in the linker scriptsBin Meng
In current linker script both .efi_runtime_rel and .rela.dyn sections are of RELA type whose entry size is either 12 (RV32) or 24 (RV64). These two are arranged as a continuous region on purpose so that the prelink-riscv executable can fix up the PIE addresses in one loop. However there is an 'ALIGN(8)' between these 2 sections which might cause a gap to be inserted between these 2 sections to satisfy the alignment requirement on RV32. This would break the assumption of the prelink process and generate an unbootable image. Fixes: 9a6569a043d3 ("riscv: Update alignment for some sections in linker scripts") Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com>
2023-06-27MAINTAINERS: update SiFive HiFive Unmatched maintainersHeinrich Schuchardt
Email account pragnesh.patel@sifive.com does not exist anymore. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-27board: starfive: Fixed errors reported when executing get_maintainer.plYanhong Wang
Fixed errors reported when executing 'scripts/get_maintainer.pl -f configs/starfive_visionfive2_defconfig'. Invalid MAINTAINERS address: 'startfive' Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-06-26Prepare v2023.07-rc5v2023.07-rc5Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-26configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-26smegw01: Fix duplicate bootcmdEduard Strehlau
Two conflicting bootcmds were included in the environment. Streamline to defining the bootcmd only in the env file. Signed-off-by: Eduard Strehlau <eduard@lionizers.com> Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-06-24Merge branch '2023-06-23-assorted-important-fixes'Tom Rini
- Merge in a few important fixes. This includes a (partial) regression fix, updating documentation and some sanity checking around image loading.
2023-06-24imx: hab: Simplify the mechanismMarek Vasut
The current mechanism is unnecessarily complex. Simplify the whole mechanism such that the entire fitImage is signed, IVT is placed at the end, followed by CSF, and this entire bundle is also authenticated. This makes the signing scripting far simpler. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24imx: hab: Fix a couple of build warnings with DEBUG enabledMarek Vasut
In case the DEBUG is enabled, these three lines warn about cast of pointer to integer of different size, add the missing casts to fix the warnings. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24spl: spl_legacy: Add extra address checksMarek Vasut
Check whether the loaded image or entry point does not overlap SPL. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24ARM: imx: Add weak default reset_cpu()Marek Vasut
Add weak default reset_cpu() implementation needed by e.g. panic(). Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24ARM: at91: Switch sama5d2_icp_mmc to simple malloc in SPLMarek Vasut
To avoid SRAM overflow in the SPL build, use simple malloc implementation. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24mips: cpu: Use plain puts() in restart handlerMarek Vasut
This removes dependency on fprintf() , which is not available in SPL unless full printf support is enabled. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-23mkimage: Use PATH_MAX for path lengthMingli Yu
Fixed when build xilinx_zynqmp in long directory ( >256): | /buildarea1/testtest/wr_build/wr1023test_secureboot/test1-what/test2-what/test3-what/test4-what/test5-what/test6-what/test7-what/test8-what/test9-what/test10-what/test11-what/test12-what/build/tmp-glibc/work/xilinx_zynqmp-wrs-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+gitAUTOINC+40a08d69e7-r0/build/fitImage-linux: Image file name (uboot-mkimage) too long, can't create tmpfile. | Error: Bad parameters for FIT image type Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
2023-06-23doc: statistics: Re-generate the last 3 releasesTom Rini
With some changes to our mapping files in gitdm, re-generate the last few releases worth of statistics to correctly reflect contributions. We only go back this far to try and find a balance between highlighting contributions and still being reviewable. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-23menu: Re-enable the ANSI codesSimon Glass
The intent here was to allow ANSI codes to be disabled, since it was proving impoosible to test operation of the menu code when it kept moving the cursor. Unfortunately this ended up in the patch. Correct this by enabling ANSI again. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Pali Rohár <pali@kernel.org> Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl> Reported-by: Frank Wunderlich <frank-w@public-files.de> Fixes: 32bab0eae51b ("menu: Make use of CLI character processing") Tested-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2023-06-23Merge tag 'doc-2023-07-rc6' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request doc-2023-07-rc6 * move FIT documentation to HTML * man-pages for the bind, bootm, and unbind commands
2023-06-23doc: Improve documentation for the bootm commandSimon Glass
Reformat and rewrite the documentation for this command. This is a complicated command, so further improvements are welcome. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in the command-syntax extensionsSimon Glass
Bring this file into the documentation. For now it is not in the correct format for a command, but it is valid rST. Futher work will improve this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Add signing to the FIT specSimon Glass
Move this properties into the main spec. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Move external FIT docs into the main bodySimon Glass
Rather than having this as an addition to the end, move this into the main body of the spec, rewriting as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Expand FIT tables to include all valuesSimon Glass
Add tables which include all values for type, algo, arch, algo and compression. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Tidy up the format docs to be more genericSimon Glass
Avoid reference to uImage which is the old format. Drop the historical language at the top and rewrite a few other sections. Correct the U-Boot filename which is now in the boot/ directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in the FIT overlay informationSimon Glass
Bring this file into the documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in the FIT howtoSimon Glass
Bring this file into the documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in FIT signature filesSimon Glass
Bring these files into the documentation. Fix 'wtih' and 'it' typos and repeated 'could' while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in FIT x86 bootSimon Glass
Bring this file into the documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Bring in the FIT examplesSimon Glass
Convert these to rST format and add them to the index. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Reformat the FIT documentation to make it nicerSimon Glass
Fix up headings and tables to read better. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Convert FIT source-file format to rSTSimon Glass
Move this document and convert it to rST. Make minimal changes, enough for it to build successfully. Future patches will tidy this up. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-06-23doc: Move FIT into its own directorySimon Glass
Create a new usage/fit directory which will house information about FIT. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-06-23doc: bind man-pageHeinrich Schuchardt
provide a man-page for the bind command Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-23doc: unbind man-pageHeinrich Schuchardt
Provide a man-page for the unbind command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-21Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini
2023-06-21usb: dwc2: Fix the write to W1C fields in HPRT registerTeik Heng Chong
Fix the write to the HPRT register which treat W1C fields as if they were mere RW. This leads to unintended clearing of such fields This bug was found during the testing on Simics model. Referring to specification DesignWare Cores USB 2.0 Hi-Speed On-The-Go (OTG) Databook (3.30a)"5.3.4.8 Host Port Control and Status Register (HPRT)", the HPRT.PrtPwr is cleared by this mistake. In the Linux driver (contrary to U-Boot), HPRT is always read using dwc2_read_hprt0 helper function which clears W1C bits. So after write back those bits are zeroes. Signed-off-by: Teik Heng Chong <teik.heng.chong@intel.com>
2023-06-21cmd: usb: Prevent reset in usb tree/info commandXavier Drudis Ferran
Commands causing reset in some configs: When bootflow scan is run, this will cause a UCLASS_BOOTDEV device to be added as sibling of those UCLASS_BLK devices found in the search chain defined in environment variable "boot_targets", until boot succeeds from some device. This can happen automatically as part of the default boot process on some boards (example: Rock Pi 4) depending on the board configuration (DISTRO_DEFAULTS, BOOTSTD, BOOTCOMMAND, etc.) because they have bootcmd=bootflow scan. If boot doesn't succeed from any device, and usb is in boot_targets, and an usb storage device is plugged to some usb port at boot time, its UCLASS_MASS_STORAGE device will have a UCLASS_BOOTDEV device as child, besides a UCLASS_BLK child. If once the boot fails the user enters at the U-Boot shell prompt: usb info or usb tree The code in cmd/usb.c will eventually recurse into the UCLASS_BOOTDEV device and pass a null usb_device pointer to usb_show_tree_graph() or usb_show_info() (because it has no parent_priv_). This causes a reset. The expected behaviour would be to ignore the UCLASS_BOOTDEV device, continue listing the usb information and return to the prompt. Minimal test: Another way to trigger this reset as a minimal test or on boards with a different bootcmd would be: - make sure "usb" is in environment variable boot_targets (might need setenv boot_targets usb; and/or saveenv and reset), then, with a usb storage device plugged to a usb port, run: => usb reset ; bootflow scan ; usb info Solution: Fix it (twice) by checking for null parent_priv_ and adding UCLASS_BOOTDEV to the list of ignored class ids before the recursive call. This prevents the current particular problem with UCLASS_BOOTDEV, even in case it ever gets some parent_priv_ struct which is not an usb_device, despite being the child of a usb_device->dev. And it also prevents possible future problems if other children are added to usb devices that don't have parent_priv_ because they are not part of the usb tree, just abstractions of functionality (like UCLASS_BLK and UCLASS_BOOTDEV are now). Signed-off-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2023-06-19Merge tag 'u-boot-at91-fixes-2023.07-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 First set of u-boot-atmel fixes for the 2023.07 cycle: This small fixes set includes one init fix for scmi clocks and a missing gpio_request for pm9g45.
2023-06-16Merge tag 'efi-2023-07-rc5' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2023-07-rc5 Documentation: * man-page for imxtract * correct EVT_DM_POST_INIT_F description UEFI: * bootm: don't call booti_setup for EFI images * simplify efi_disk_remove * fix tests that failed when executed repeatedly
2023-06-16ARM: at91: don't initialize clocks if scmi clock driver is enabledClément Léger
Because clock devices are initialized by the SCMI server, if CONFIG_CLK_SCMI is defined. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
2023-06-16board: pm9g45: add missing gpio_request()Ilko Iliev
This fixes the following run time error message: set_dir_flags: error: gpio PIOD3 not reserved set_dir_flags: error: gpio PIOC14 not reserved Signed-off-by: Ilko Iliev <iliev@ronetix.at>
2023-06-16efi_selftests: fix protocol repeated selftestingIlias Apalodimas
Running the protocols selftest more than one times fails with => setenv efi_selftest 'manage protocols' && bootefi selftest Testing EFI API implementation Selected test: 'manage protocols' Setting up 'manage protocols' Setting up 'manage protocols' succeeded Executing 'manage protocols' Executing 'manage protocols' succeeded Tearing down 'manage protocols' Tearing down 'manage protocols' succeeded Summary: 0 failures => bootefi selftest Testing EFI API implementation Selected test: 'manage protocols' Setting up 'manage protocols' lib/efi_selftest/efi_selftest_manageprotocols.c(88): ERROR: InstallProtocolInterface failed lib/efi_selftest/efi_selftest.c(89): ERROR: Setting up 'manage protocols' failed Tearing down 'manage protocols' Tearing down 'manage protocols' succeeded Summary: 1 failures The reason is that we don't set the handles to NULL after deleting and freeing them. As a result the subsequent protocol installation will try to use an existing handle which we just removed that from our object list. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-06-16efi_loader: simplify efi_disk_removeIlias Apalodimas
Instead of discovering the ID of the device and call two different functions for a block device or a partition, we can rewrite efi_disk_remove() and handle the minor differences between the two variants internally. As a results we can simplify efi_disk_remove() a lot and get rid of the extra efi_disk_delete_raw/blk calls. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> If a handle is not found, return 0 to let the device be removed. Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-16efi_selftests: fix controllers repeated selftestingIlias Apalodimas
Running the controller selftest more than one times fails with => setenv efi_selftest 'controllers' && bootefi selftest Testing EFI API implementation Selected test: 'controllers' Setting up 'controllers' Setting up 'controllers' succeeded Executing 'controllers' Executing 'controllers' succeeded Summary: 0 failures => bootefi selftest Testing EFI API implementation Selected test: 'controllers' Setting up 'controllers' lib/efi_selftest/efi_selftest_controllers.c(280): ERROR: InstallProtocolInterface failed lib/efi_selftest/efi_selftest.c(89): ERROR: Setting up 'controllers' failed Summary: 1 failures There are multiple reason for this. We don't uninstall the binding interface from the controller handle and we don't reset the handle pointers either. So let's uninstall all the protocols properly and reset the handles to NULL on setup(). While at it add a forgotten check when uninstalling protocols from the handle_controller and make sure the number of child controllers is 0 Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-16test: correct architecture in EFI FIT testHeinrich Schuchardt
On arm64 the its we use to generate the test FIT image has arch = "arm"; We should use "arm64" here which is mapped to IH_ARCH_ARM64 via uimage_arch[]. Fixes: 8391f955494e ("test/py: Create a test for launching UEFI binaries from FIT images") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-16bootm: don't call booti_setup for EFI imagesHeinrich Schuchardt
On the arm64 architecture booti_setup() is called for EFI FIT images. This function call fails because EFI images typically do not have a kernel signature. Check that the operating system property "os" of the image is "linux" before invoking booti_setup(). Fixes: 487b5fa6deb1 ("bootm: Handle kernel_noload on arm64") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-16efi_selftest: ReinstallProtocolInterface testHeinrich Schuchardt
Test ReinstallProtocolInterface() more rigorously. Replacing the sole installed protocol interface must not result in deleting the handle and creating a new one. Check which interface is actually installed before and after ReinstallProtocolInterface(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-16Makefile: clean lib/efi_loader/helloworld_efi.SHeinrich Schuchardt
lib/efi_loader/helloworld_efi.S is a generated file and shall be removed by 'make clean'. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>