summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-16rpi: Set bootm_size to 512MBSimon Glass
Set this option so that all boot images stay within the bottom 512MB of memory. This should allow us to drop the fdt_high and initrd_high options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org> Tested-by: Christopher Obbard <christopher.obbard@linaro.org> # CM4 1G
2025-04-16rpi: always set fdt_addr with firmware-provided FDT addressMauro Salvini
Raspberry firmware prepares the FDT blob in memory at an address that depends on both the memory size and the blob size [1]. After commit ade243a211d6 ("rpi: passthrough of the firmware provided FDT blob") this FDT is passed to kernel through fdt_addr environment variable, handled in set_fdt_addr() function in board file. When u-boot environment is persistently saved, if a change happens in loaded FDT (e.g. for a new overlay applied), firmware produces a FDT address different from the saved one, but u-boot still use the saved one because set_fdt_addr() function does not overwrite the fdt_addr variable. So, for example, if there is a script that uses fdt commands for e.g. manipulate the bootargs, boot hangs with error libfdt fdt_check_header(): FDT_ERR_BADMAGIC Removing the fdt_addr variable in saved environment allows to boot. With this patch set_fdt_addr() function always overwrite fdt_addr value. [1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018 Signed-off-by: Mauro Salvini <m.salvini@koansoftware.com> Cc: Cédric Schieli <cschieli@gmail.com> Cc: Matthias Brugger <mbrugger@suse.com>
2025-04-16rpi: copy over uart clock-frequency in DTBruno Leite
rpi5 firmware sets uart_clk clock-frequency in the firmware and patches it to the DT, copy it over when loading a new DT. Signed-off-by: Bruno Leite <brule@prevas.dk> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
2025-04-15Merge tag 'tpm-master-14042025' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tpm A small fix for the cr50 which is a TPM but doesn't support all the TPM functionality. Since it deviates from our normal TIS compliant TPMs it can't be started twice since running the selftests twice hangs.
2025-04-14firmware: ti_sci: Scan all device instances when releasing exclusive devicesNishanth Menon
When FIT image with multiple dtbs are involved for R5 boot process, R5 SPL starts off with the first instance of dtb to probe the eeprom, then once we have identified the type of board, invocation of setup_multi_dtb_fit will replace the gd->fdt_blob with the proper board dtb match. However, when we do this, two things happen: a) Prior to the invocation of setup_multi_dtb_fit, as part of the eeprom discovery process, i2c controller device is already probed and marked as exclusive with the match of the very first tisci match (from the original boot dtb). This list is stored in the info->dev_list of the first probe. b) When the second dtb is loaded, tisci is probed again (since this is a new node) and the new info->dev_list is empty. At this stage, the exclusive devices such as i2c instances used to probe the board information is left in the old info->dev_list that is no longer used actively by the system using the replaced dtb. As a result of this, the cleanup we intend to do with ti_sci_cmd_release_exclusive_devices is no longer complete and leaves the instances such as i2c for eeprom marked used as we scan just the new info->dev_list. This creates a problem when Device Manager(DM) firmware starts up later on in the boot process and identifies that this instance of i2c is already marked active, so it assumes this can no longer be controlled by software and is marked internally as reserved and HLOS can no longer control these instances. This defeated the purpose of ti_sci_cmd_release_exclusive_devices. NOTE: This scheme works just fine if the FIT has just a single dtb as the info->dev_list is upto date. To fix this, let us make ti_sci_cmd_release_exclusive_devices scan the all registrations of tisci instances and cleanup all exclusive devices that have ever been registered. As part of this, change the prototype of release_exclusive_devices to drop the handle since that has no further meaning now. Though this issue was identified on AM64-sk, this can be present in other builds which use multi-fit-dtb for R5 SPL startup. Fixes: 9566b777ae0a ("firmware: ti_sci: Add a command for releasing all exclusive devices") Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2025-04-14IOMUX: Fix stopping unused dropped consolesStephan Gerhold
iomux_match_device() returns -ENOENT instead of the end index, which means console_stop() is never called at the moment for unused consoles. This prevents e.g. f_acm from releasing the USB gadget interface when removing it from stdio/stderr/stdin. Fixes: b672c1619bb9 ("IOMUX: Split out iomux_match_device() helper") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-04-14tpm: cr50: Support opening the TPM multiple timesSimon Glass
The tpm_auto_start() function is used in tests and assumes that it can open the TPM even if it is already open and a locality claimed. The cr50 driver does not use the common TPM2 TIS code so lacks a check for the is_open field of struct tpm_chip and in fact it doesn't use that struct. Add an equivalent check to cr50_i2c_open(). This fixes all init sequences on that TPM -- e.g 'tpm init && tpm init' or 'tpm autostart && tpm init' used to hang Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-14Merge patch series "Static initcalls"Tom Rini
Jerome Forissier <jerome.forissier@linaro.org> says: This series replaces the dynamic initcalls (with function pointers) with static calls, and gets rid of initcall_run_list(), init_sequence_f, init_sequence_f_r and init_sequence_r. This makes the code simpler and the binary slighlty smaller: -2281 bytes/-0.21 % with LTO enabled and -510 bytes/-0.05 % with LTO disabled (xilinx_zynqmp_kria_defconfig). Execution time doesn't seem to change noticeably. There is no impact on the SPL. The inline assembly fixes, although they look unrelated, are triggered on some platforms with LTO enabled. For example: kirkwood_defconfig. CI: https://source.denx.de/u-boot/custodians/u-boot-net/-/pipelines/25514 Link: https://lore.kernel.org/r/20250404135038.2134570-1-jerome.forissier@linaro.org
2025-04-14initcall: remove initcall_run_list()Jerome Forissier
Now that all initcalls have been converted to static calls, remove initcall_run_list(). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-14common: board: make initcalls staticJerome Forissier
Change board_init_f(), board_init_f_r() and board_init_r() to make static calls instead of iterating over the init_sequence_f, init_sequence_f_r and init_sequence_r arrays, respectively. This makes the code a simpler (and even more so when initcall_run_list() is later removed) and it reduces the binary size as well. Tested with xilinx_zynqmp_kria_defconfig; bloat-o-meter results: - With LTO add/remove: 106/196 grow/shrink: 10/28 up/down: 31548/-33829 (-2281) Total: Before=1070471, After=1068190, chg -0.21% - Without LTO add/remove: 0/54 grow/shrink: 3/0 up/down: 2322/-2832 (-510) Total: Before=1121723, After=1121213, chg -0.05% Execution time does not change in a noticeable way. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-14arm: asm/system.h: mrc and mcr need .arm if __thumb2__ is not setJerome Forissier
The mcr and msr instructions are available in Thumb mode only if Thumb2 is supported. Therefore, if __thumb2__ is not set, make sure we switch to ARM mode by inserting a .arm directive in the inline assembly. Fixes LTO link errors with kirkwood platforms, triggered by a later commit: tools/buildman/buildman -o /tmp/build -eP sheevaplug [...] {standard input}:24085: Error: selected processor does not support `mrc p15,0,r3,c1,c0,0' in Thumb mode Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-13efi_loader: Moved the generated ESL file to objtreeIlias Apalodimas
Tom reports that generating the ESL file we need for authenticated capsule updates fails to work on azure which expects a RO git tree. Move it to $(objtree) Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-12Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegraTom Rini
2025-04-12ARM: tegra20: add funcmux for exposing UART over uSD slot on Tegra 20Artur Kowalski
UART-A can be exposed through uSD, this was tested on Transformer T20 but should work on all Ventana-based boards. TX is exported on SDD pingroup corresponding to uSD CLK pin RX is exported on SDB which is CMD pin in uSD slot Signed-off-by: Artur Kowalski <arturkow2000@gmail.com> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12board: nvidia: tegratab: add Nvidia Tegra Note 7 supportSvyatoslav Ryhel
The Tegra Note 7 is a mini tablet computer and the second Tegra 4 based mobile device designed by Nvidia that runs the Android operating system. The Tegra Note has a 7" IPS display with 1280 x 800 (217 ppi) resolution. The 1 GB of RAM and 16 GB of internal memory can be supplemented with a microSDXC card giving up to 64 GB of additional storage. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12board: asus: transformer: add ASUS Transformer Pad TF701T supportSvyatoslav Ryhel
The ASUS Transformer Pad TF701T is an Android tablet computer made by ASUS, successor to the ASUS Transformer Pad Infinity. The tablet includes a Tegra 4 T114 processor clocked at 1.9 GHz, and an upgraded 2560×1600 pixel resolution screen, increasing the pixel density to 300 PPI and a mobile dock. Transformers (t114) board derives from Nvidia Macallan development board. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra114: clock: avoid touching DISP clocks on initSvyatoslav Ryhel
The clock initialization routine sets the DISP* clock parent to PLLC, resulting in DC failure in the case when PLLD was previously configured. This issue disrupts chainloading and to prevent failures caused by DISP* clock parent conflicts, clock initialization should not modify DISP*. The DC driver handles DISP* configuration. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra: replace per-device config headers with generic TegraSvyatoslav Ryhel
Most device headers contain SoC specific part and common Tegra post part. Add a generic header which can be used by any Tegra device of one of the supported SoC generations (T20, T30, T114, T124 or T210) without need in device specific configuration. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra: convert CFG_TEGRA_BOARD_STRING into Kconfig optionSvyatoslav Ryhel
Convert CFG_TEGRA_BOARD_STRING into Kconfig option and move it into device board Kconfig. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra: board: set CFG_SYS_NS16550_COM1 according to TEGRA_ENABLE_UARTSvyatoslav Ryhel
Link CFG_SYS_NS16550_COM1 value to chosen CONFIG_TEGRA_ENABLE_UART Tegra wide. Remove all CFG_SYS_NS16550_COM1 from device headers. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12pinctrl: tegra: detect unknown/invalid pin/func configurationsSvyatoslav Ryhel
Applies same logic to general Tegra pincontrol driver as is done to Tegra20 by commit: a35bf832d70 ("pinctrl: tegra20: detect unknown/invalid pin/func configurations") Suggested-by: Artur Kowalski <arturkow2000@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12pinctrl: tegra20: detect unknown/invalid pin/func configurationsArtur Kowalski
Tegra20 driver doesn't know about some pin configurations and even about some pins. In case when pin configuration is unknown the pin would be muxed to whatever is under function 0, in case when pin itself is unknown, it could cause out-of-bounds array access in pinmux_set_func and pinmux_set_pullupdown. Signed-off-by: Artur Kowalski <arturkow2000@gmail.com> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12board: motorola: add Atrix 4G MB860 and Droid X2 MB870 supportSvyatoslav Ryhel
The Motorola Atrix 4G (MB860) and Droid X2 (MB870) both featured a dual-core NVIDIA Tegra 2 AP20H processor clocked at 1GHz, coupled with 1GB of DDR2 RAM. Storage consisted of 16GB of internal flash memory, expandable via microSD. The display was a 4.0-inch TFT LCD with a resolution of 960x540 pixels (qHD). The devices originally ran on Android up to 2.3 (Gingerbread). Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: backlight: add TI LM3532 led controllerSvyatoslav Ryhel
The LM3532 is a 500-kHz fixed frequency asynchronous boost converter which provides the power for 3 high-voltage, low-side current sinks. The device is programmable over an I2C-compatible interface and has independent current control for all three channels. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: panel: add Motorola Atrix 4G and Droid X2 panelSvyatoslav Ryhel
Add support for the LCD panel module used in Motorola Atrix 4G or Droid X2. Exact panel vendor and model are unknown. The panel has a 540x960 (qHD) resolution and uses 24 bit RGB per pixel. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12input: add support for CPCAP power buttonSvyatoslav Ryhel
CPCAP has a dedicated interrupt for power button. Implement this to have more input control over the devices. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12power: regulator: add regulator support for CPCAP PMICSvyatoslav Ryhel
The driver provides regulator set/get voltage and enable/disable functions for CPCAP PMIC. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12power: pmic: add the basic CPCAP PMIC supportSvyatoslav Ryhel
The CPCAP is a Motorola/ST-Ericsson creation, a multifunctional IC whose main purpose was power control. It was used in a wide variety of Motorola products, both Tegra and OMAP based. The most notable devices using this PMIC are the Motorola Droid 4, Atrix 4G, and Droid X2. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: tegra: adjust DC and DSI config namesSvyatoslav Ryhel
Fix DC and DSI config names to reflect more generic nature of existing Tegra video drivers. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: tegra: drop prefix from file namesSvyatoslav Ryhel
Dir name is enough. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: move tegra124 into common tegra dirSvyatoslav Ryhel
Place Tegra124 SOR and eDP implenetation into common Tegra driver folder until it is integrated into existing setup. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12video: rename tegra20 to tegraSvyatoslav Ryhel
Since this set of drivers suports four Tegra SoC generations, lets name it just 'tegra'. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2025-04-12video: tegra20: dsi: add Tegra20 supportSvyatoslav Ryhel
Existing Tegra30 DSI configuration is fully compatible with Tegra20. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12sysreset: diverge GPIO reset and poweroff configs per-phaseSvyatoslav Ryhel
GPIO reset and power-off functionality depends on device tree data, which is often absent in SPL or TPL. To address this, incorporate PHASE_ into the config option and add Kconfig option or each phase. Adjust SYSRESET_GPIO and POWEROFF_GPIO uses to address possible regressions. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra: clock: fix PLLD2 info table entry on Tegra124 and Tegra210Svyatoslav Ryhel
Historically, PLLD2 mirrored PLLD's layout on Tegra30 and 114. However, with the introduction of Tegra124, this changed. This layout alteration was not considered, and it now requires a corrective action to prevent future complications. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12ARM: tegra: clock: take in account PLLD/D2 enable bit on clock_set_rateSvyatoslav Ryhel
PLLD and PLLD2 clocks possess a unique enable bit within their miscellaneous register. Take this into account when using clock_set_rate function. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12spi: tegra20_slink: fix CS polarity setupSvyatoslav Ryhel
Add missing configuration of chip select polarity. Default polarity is LOW, which satisfies most cases but some devices require HIGH polarity and will not work. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-11Merge patch series "binman: Check code-coverage requirements"Tom Rini
Simon Glass <sjg@chromium.org> says: This series adds a cover-coverage check to CI for Binman. The iMX8 tests are still not completed, so a work-around is included for those. A few fixes are included for some other problems. Link: https://lore.kernel.org/r/20250410124333.843527-1-sjg@chromium.org
2025-04-11CI: Run code-coverage test for BinmanSimon Glass
Binman includes a good set of tests covering all of its functionality. This includes a code-coverage test. However to date the code-coverage test has not been checked automatically by CI, relying on people to run 'binman test -T' themselves. Plug the gap to avoid bugs creeping in future. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-11binman: Work around missing test coverageSimon Glass
The iMX8 entry-types don't have proper test coverage. Add a work-around to skip this for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11binman: Workaround lz4 cli padding in test casesJiaxun Yang
Newer lz4 util is not happy with any padding at end of file, it would abort with error message like: Stream followed by undecodable data at position 43. Workaround by skipping testCompUtilPadding test case and manually strip padding in testCompressSectionSize test case. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-11binman: Drop algo check in CheckSetHashValue()Simon Glass
The CheckAddHashValue() function is always called before this one, so the algorithm check is never used. Replace it with an assert to avoid a coverage error. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11binman: fit: Drop unused codeSimon Glass
The key-name-hint case is not tested so is presumably not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11binman: Drop GetRootSkipAtStart()Simon Glass
This method is not called anymore, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11binman: Exclude dist-packages and site-packagesSimon Glass
Newer versions of the python3-coverage tool require a directory separator before and after the directory name. Add this so that system package are not included in the coverage report. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11binman: Add coverage to requirementsSimon Glass
We need the code-coverage package to run the coverage tests. Add this package. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-11Merge patch series "Switch to using $(PHASE_) in Makefiles"Tom Rini
Tom Rini <trini@konsulko.com> says: This series switches to always using $(PHASE_) in Makefiles when building rather than $(PHASE_) or $(XPL_). It also starts on documenting this part of the build, but as a follow-up we need to rename doc/develop/spl.rst and expand on explaining things a bit. Link: https://lore.kernel.org/r/20250401225851.1125678-1-trini@konsulko.com
2025-04-11doc/develop/codingstyle.rst: Expand to include CONFIG_IS_ENABLED and PHASE_Tom Rini
Expand the conditional compilation section to explain when to use CONFIG_IS_ENABLED rather than IS_ENABLED and provide an example. Next, note what the PHASE_ macro is supposed to be used for as well. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-11doc/develop/codingstyle.rst: Add a section on conditional compilationTom Rini
In order to make a start on explaining how and when to use certain macros, we need to document their usage somewhere. As a first step, take section 21 of the v6.13 Linux Kernel coding-style document on conditional compilation, verbatim, and add it to our documentation. Further rewording to be clearer about U-Boot will be done next. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <trini@konsulko.com>