aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-11-28fs: fat: calculate FAT type based on cluster countChristian Taedcke
This fixes an issue where the FAT type (FAT12, FAT16) is not correctly detected, e.g. when the BPB field BS_FilSysType contains the valid value "FAT ". According to the FAT spec the field BS_FilSysType has only informational character and does not determine the FAT type. The logic of this code is based on the linux kernel implementation from the file fs/fat/inode.c function fat_fill_super(). For details about FAT see http://elm-chan.org/docs/fat_e.html Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-14dm: Do not enable debug messages by defaultHeinrich Schuchardt
CONFIG_DM_WARN has a text indicating that these messages should only provided when debugging. This implies that the setting must be default no. We should still create debug messages. Reported-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-14efi: Correct handling of frame bufferSimon Glass
The efi_gop driver uses private fields from the video uclass to obtain a pointer to the frame buffer. Use the platform data instead. Check the VIDEO_COPY setting to determine which frame buffer to use. Once the next stage is running (and making use of U-Boot's EFI boot services) U-Boot does not handle copying from priv->fb to the hardware framebuffer, so we must allow EFI to write directly to the hardware framebuffer. We could provide a function to read this, but it seems better to just document how it works. The original change ignored an explicit comment in the video.h file ("Things that are private to the uclass: don't use these in the driver") which is why this was missed when the VIDEO_COPY feature was added. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 8f661a5b662 ("efi_loader: gop: Expose fb when 32bpp") Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-11-12power: regulator: add AXP313 supportAndre Przywara
The X-Powers AXP313a is a small PMIC with just three buck converters and three LDOs, one of which is actually fixed (so not modelled here). Add the compatible string and the respective regulator ranges to allow drivers to adjust voltages. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-10Merge branch '2023-11-10-assorted-fixes'Tom Rini
- Fix some issues Coverity has reported, update MAINTAINERS file, another bootstd fix, typo fix in error message, gitignore fix and update TI's URL in many places.
2023-11-10bootstd: Skip over bad device during bootflows scanningTony Dinh
During bootstd scanning for bootdevs, if bootdev_hunt_drv() encounters a device not found error (e.g. ENOENT), let it return a successful status so that bootstd will continue scanning the next devices, not stopping prematurely. Background: During scanning for bootflows, it's possible for bootstd to encounter a faulty device controller. Also when the same u-boot is used for another variant of the same board, some device controller such as SATA might not exist. I've found this issue while converting the Marvell Sheevaplug board to use bootstd. This board has 2 variants, the original Sheevaplug has MMC and USB only, but the later variant comes with USB, MMC, and eSATA ports. We have been using the same u-boot (starting with CONFIG_IDE and later with DM CONFIG_SATA) for both variants. This worked well with the old envs-scripting booting scheme. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-10tree-wide: Replace http:// link with https:// link for ti.comNishanth Menon
Replace instances of http://www.ti.com with https://www.ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-09board: rockchip: add Pine64 QuartzPro64 RK3588 boardTom Fitzhenry
QuartzPro64 is a Rockchip RK3588 based SBC by Pine64. UART and boot over SD/eMMC/RJ45 are tested to work. Linux commits from next-20231013: 8152d3d070a9 ("arm64: dts: rockchip: Add QuartzPro64 SBC device tree") Signed-off-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Cc: Eugen Hristev <eugen.hristev@collabora.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Ondrej Jirman <megi@xff.cz>
2023-11-07dt-bindings: Remove VSC8531 specific RGMII delay definitionsMichal Simek
Based on Linux upstream discussion value enumeration shouldn't be used. Instead of it delay in pS should be used that's why remove it from the header. Link: https://lore.kernel.org/all/YNsm%2F0dmpBgO8mqr@lunn.ch/ Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/bbd343474856a67252f3b31d22b3b5a80ad04043.1698851109.git.michal.simek@amd.com
2023-11-07serial: zynqmp: Fetch baudrate from dtb and updateAlgapally Santosh Sagar
The baudrate configured in .config is taken by default by serial. If change of baudrate is required then the .config needs to changed and u-boot recompilation is required or the u-boot environment needs to be updated. To avoid this, support is added to fetch the baudrate directly from the device tree file and update. The serial, prints the log with the configured baudrate in the dtb. The commit c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") is taken as reference for changing the default environment variable. The default environment stores the default baudrate value, When default baudrate and dtb baudrate are not same glitches are seen on the serial. So, the environment also needs to be updated with the dtb baudrate to avoid the glitches on the serial. Also add test to cover this new function. Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20230921112043.3144726-3-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-11-07configs: Add support in Kconfig and convert for armada boardsAlgapally Santosh Sagar
Move the DEFAULT_ENV_IS_RW to Kconfig for easier configuration. Hence, add the CONFIG_DEFAULT_ENV_IS_RW config to the defconfig files to allow enabling them for armada boards. Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20230921112043.3144726-2-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-11-06bmips: Add Inteno XG6846 boardLinus Walleij
This adds support for the Inteno XG6846 board based on the Broadcom MIPS 6328 SoC. The default boot will read a uImage from flash and boot it. Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-11-06Merge tag 'u-boot-amlogic-20231106' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic - fixup to also enabled DFU RAM boot for libretech-ac - sm fix to bind child sm devices in the device tree - add missing A1 clocks for USB stack
2023-11-06ARM: configs: libretech-ac: enable USB_DFU like in meson64.hNeil Armstrong
USB_DFU was added in meson64.h but is missing in libretech-ac.h, fix this to enable DFU RAM boot for libretech-ac. Fixes 4aa027b3f8 ("configs: meson64: add alternate USB DFU boot target") Link: https://lore.kernel.org/r/20231102-libretech-ac-fix-dfu-v1-1-112379165028@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-05net: Add option for tracing packetsSean Anderson
Add an option to trace all packets send/received. This can be helpful when debugging protocol issues, as the packets can then be imported into wireshark [1] and analyzed further. [1] https://www.wireshark.org/docs/wsug_html_chunked/ChIOImportSection.html Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-03sysreset: implement PALMAS sysreset functionsSvyatoslav Ryhel
PALMAS PMIC family has embedded poweroff function used by some device to initiane device power off. Implement it as sysreset driver. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-03sysreset: implement TPS65910 sysreset functionsSvyatoslav Ryhel
TPS65910/TPS65911 PMICs have embedded power control functions used by some device to initiane device power off. Implement it as sysreset driver. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-03sysreset: implement TPS80031 sysreset functionsSvyatoslav Ryhel
TPS80031/TPS80032 PMICs have embedded power control functions used by some device to initiane device power off. Implement it as sysreset driver. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-03sysreset: implement MAX77663 sysreset functionsSvyatoslav Ryhel
MAX77663 PMIC has embedded poweroff function used by some device to initiane device power off. Implement it as sysreset driver. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-03power: pmic: tps65910: add TPS65911 PMIC supportSvyatoslav Ryhel
Add support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-03power: pmic: add the base TPS80031 PMIC supportSvyatoslav Ryhel
Add support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-03power: pmic: add the base MAX77663 PMIC supportSvyatoslav Ryhel
Add support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-03configs: transformer_t30: convert bootmenu optionSvyatoslav Ryhel
Convert refresh USB to enter console. Transformers have full size USB and a dock keyboard so access to U-Boot console would be handy. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-02binman: Rename TYPE_STAGE to TYPE_LEGACY_STAGESimon Glass
In preparation for changing how stages are stored, rename the existing stage tag. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-02Merge tag 'i2cfixes-for-v2024-01-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2024.01-rc2 - nuvoton: support standard/fast/fast plus mode - bootcount: remove legacy i2c driver and implement DM based version Bugfixes: - designware_i2c: adjust timing calculation SPL probing failed on the StarFive VisionFive 2 board Heinrich fixed this, by syncing timing calculation with linux implementation.
2023-11-02Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
+ CI: Use OpenSBI 1.3.1 release for testing + riscv: Support resume after exception + rng: Support RNG provided by RISC-V Zkr ISA extension + board: starfive VF2: Support jtag + board: starfive VF2: Support TRNG driver + board: sifive unmatched: Move kernel load address
2023-11-02riscv: allow resume after exceptionHeinrich Schuchardt
If CSRs like seed are readable by S-mode, may not be determinable by S-mode. For safe driver probing allow to resume via a longjmp after an exception. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02board: sifive: unmatched: move kernel load address to 0x80200000Yong-Xuan Wang
U-boot initially loads the kernel image to the kernel_addr_r, and subsequently relocates it to memory address 0x80200000. Setting kernel_addr_r to 0x80200000 can eliminate one copy operation. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-01Merge tag 'clk-2024.01-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-clk Clock changes for 2024.01-rc2 This contains several fixes for the clock core.
2023-11-01clk: also handle ENOENT in *_optional functionsYang Xiwen
If the device does not specify any clocks in device tree, these functions will return PTR_ERR(-ENOENT). This is not the intended behavior and does not comply with linux kernel CCF. Fix that by returning NULL under such circumstances instead. Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230818-clk-fix-v1-3-49ec18f820bf@outlook.com
2023-11-01clk: fix count parameter type for clk_release_allEugen Hristev
The second parameter for clk_release_all is used as an unsigned (which makes sense) but the function prototype declares it as an int. This causes warnings/error like such below: include/clk.h:422:48: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] 422 | return clk_release_all(bulk->clks, bulk->count); To fix this, changed the type of the count to `unsigned int` Fixes: 82a8a669b4f7 ("clk: add clk_release_all()") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230619104752.278500-1-eugen.hristev@collabora.com
2023-11-01mmc: sdhci: Rework SDHCI_QUIRK_BROKEN_R1BSean Anderson
As noted in commit 3a6383207be ("mmc: sdhci: add the quirk for broken r1b response"), some MMC controllers don't always set the transfer complete bit with R1b responses. According to the SD Host Controller Simplified Specification v4.20, > In the case of a command pairing with response-with-busy[, Transfer > Complete] is set when busy is de-asserted. Refer to DAT Line Active > and Command Inhibit (DAT) in the Present State register. By polling the DAT Line Active bit in the present state register, we can detect when we are no longer busy, without waiting for a long timeout. This results in much faster reads/writes on buggy controllers. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Tested-by: Henrik Grimler <henrik@grimler.se>
2023-10-31corstone1000: enable distro booting commandAbdellatif El Khlifi
enable distro_bootcmd Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2023-10-31board: developerbox: remove obsolete NOR flash layout definitionMasahisa Kojima
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-31configs: npcm: Support more uart baud rateJim Liu
Add uart baud rate table to arbel(npcm8xx) and poleg(npcm7xx) Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> [trini: Rework slightly] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-31i2c: Implement i2c_get_chip_by_phandle()Philip Richard Oberfichtner
This new function enhances the i2c_get_chip*() toolbox by implementing a variant that does not require a chip_addr. Instead, the desired device is pointed to by a phandle. Signed-off-by: Philip Richard Oberfichtner <pro@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-10-28iot2050: Allow for more than 1 USB storage deviceJan Kiszka
This was lost in refactoring while some users of the IOT2050 expect it to work: Make sure that up to 3 USB storage devices are probed. Fixes: 53873974a4b0 ("include: armv7: Enable distroboot across all configs") Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-10-27vexpress64: Add MMC card to the BOOT_TARGET_DEVICES of FVPWei Chen
Add MMC disk to FVP's BOOT_TARGET_DEVICES. This allows the user to boot from MMC devices. Signed-off-by: Wei Chen <wei.chen@arm.com> Signed-off-by: Qi Feng <qi.feng@arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2023-10-27Merge tag 'tpm-next-27102023' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tpm bootX measurements and measurement API moved to u-boot core: Up to now, U-Boot could perform measurements and EventLog creation as described by the TCG spec when booting via EFI. The EFI code was residing in lib/efi_loader/efi_tcg2.c and contained both EFI specific code + the API needed to access the TPM, extend PCRs and create an EventLog. The non-EFI part proved modular enough and moving it around to the TPM subsystem was straightforward. With that in place we can have a common API for measuring binaries regardless of the boot command, EFI or boot(m|i|z), and contructing an EventLog. I've tested all of the EFI cases -- booting with an empty EventLog and booting with a previous stage loader providing one and found no regressions. Eddie tested the bootX part. Eddie also fixed the sandbox TPM which couldn't be used for the EFI code and it now supports all the required capabilities. This had a slight sideeffect in our testing since the EFI subsystem initializes the TPM early and 'tpm2 init' failed during some python tests. That code only opens the device though, so we can replace it with 'tpm2 autostart' which doesn't error out and still allows you to perfom the rest of the tests but doesn't report an error if the device is already opened. There's a few minor issues with this PR as well but since testing and verifying the changes takes a considerable amount of time, I prefer merging it now. Heinrich has already sent a PR for -master containing "efi_loader: fix EFI_ENTRY point on get_active_pcr_banks" and I am not sure if that will cause any conflicts, but in any case they should be trivial to resolve. Both the EFI and non-EFI code have a Kconfig for measuring the loaded Device Tree. The reason this is optional is that we can't reason when/if devices add random info like kaslr-seed, mac addresses etc in the DT. In that case measurements are random, board specific and eventually useless. The reason it was difficult to fix it prior to this patchset is because the EFI subsystem and thus measurements was brought up late and DT fixups might have already been applied. With this patchset we can measure the DT really early in the future. Heinrich also pointed out that the two Kconfigs for the DTB measurements can be squashed in a single one and that the documentation only explains the non-EFI case. I agree on both but as I said this is a sane working version, so let's pull this first it's aleady big enough and painful to test.
2023-10-27Merge tag 'u-boot-amlogic-20231027' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic - Fix environment saving for new Android boot features on vim3*_android - Add SPIFC support for Amlogic A1 - Add DFU RAM boot step when booting over USB
2023-10-27test: Add sandbox TPM boot measurementEddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-27bootm: Support boot measurementEddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Ilias: Added some info on Kconfig explaining this is when booting !EFI Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-27tpm: Support boot measurementsEddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James <eajames@linux.ibm.com> For the API moving around from EFI -> u-boot core Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> For EFI testing Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-27tpm: Fix spelling for tpmu_ha unionEddie James
tmpu -> tpmu Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-26configs: meson64: add alternate USB DFU boot targetNeil Armstrong
Add boot over DFU RAM as an alternate to running script at a fixed address like done today. The main culprit is that it's not possible to do that on G12A/Sm1 platforms due to changes in the USB boot protocol. With this, U-Boot will present a DFU device with a ram slot where the Host could write a fitImage or legacy U-Boot image, then with the detach command boot will continue trying to boot the uploaded image. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20231023-usb-dfu-boot-v1-3-df9d121c67c1@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-26configs: meson64: declare addr out of EXTRA_ENV_SETTINGSNeil Armstrong
In order to reuse addresses for DFU RAM, define them separately, it's cleaner and will be easier to override. Link: https://lore.kernel.org/r/20231023-usb-dfu-boot-v1-2-df9d121c67c1@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-26arm: kirkwood: Enable bootstd for Zyxel NSA310S boardTony Dinh
Enable bootstd for Zyxel NSA310S board, and remove distroboot. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-26arm: kirkwood: Enable bootstd for Pogo V4 boardTony Dinh
Enable bootstd for Pogo V4 board, and remove distroboot. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-24power: domain: add SCMI driverAKASHI Takahiro
Add power domain driver based on SCMI power domain management protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-10-24firmware: scmi: add power domain protocol supportAKASHI Takahiro
In this patch, added are helper functions to directly manipulate SCMI power domain management protocol. DM compliant power domain driver will be implemented on top of those interfaces in a succeeding patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>