summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-22qemu-arm64: enable UNIT_TESTJerome Forissier
Enable CONFIG_UNIT_TEST in configs/qemu_arm64_defconfig so that the unit tests are run in CI. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-22lib/uuid.c: use unique name for PARTITION_SYSTEM_GUIDJerome Forissier
The name defined for PARTITION_SYSTEM_GUID in list_guid[] depends on configuration options. It is "system" if CONFIG_PARTITION_TYPE_GUID is enabled or "System Partition" if CONFIG_CMD_EFIDEBUG or CONFIG_EFI are enabled. In addition, the unit test in test/common/print.c is incorrect because it expects only "system" (or a hex GUID). Make things more consistent by using a clear and unique name: "EFI System Partition" whatever the configuration, and update the unit test accordingly. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
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>
2025-04-11cmd: optee: fix hello subcommand argument checkVincent Stehlé
When the `optee hello' subcommand is called, the do_optee_hello_world_ta() function passes a NULL pointer to the strcmp() function while verifying its input argument, which results in the following crash: => optee hello "Synchronous Abort" handler, esr 0x96000010, far 0x0 Fix this by verifying the number of input arguments instead. Fixes: e3cf80fbe02d ("cmd: Add support for optee commands") Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Tom Rini <trini@konsulko.com> Cc: Jerome Forissier <jerome.forissier@linaro.org> Cc: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-11configs: qemu-arm raise CONFIG_NR_DRAM_BANKSHeinrich Schuchardt
The number of memory banks in QEMU is not bounded by 1. In this example we have two banks: qemu-system-aarch64 \ -machine virt \ -nographic \ -cpu cortex-a72 \ -m 8G \ -smp 8,sockets=2,cores=4,threads=1 \ -object memory-backend-ram,id=mem0,size=4G \ -numa node,cpus=0-3,memdev=mem0 \ -object memory-backend-ram,id=mem1,size=4G \ -numa node,cpus=4-7,memdev=mem1 \ -bios u-boot.bin Use the default value defined in /Kconfig as 4. Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-11configs: phycore_am62x_a53_defconfig: Enable gpioDaniel Schultz
The AM62x uses the DA8XX (DaVinci) GPIO controller. Enable CONFIG_DA8XX_GPIO to support GPIO access from the Cortex-A53. Also enable the 'gpio' command to allow users to interact with GPIOs from the U-Boot shell. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-11configs: phycore_am62x_a53_defconfig: Enable remoteproc cmdDaniel Schultz
This enables the 'rproc' command, allowing users to start, stop, and manage co-processors as well as load firmware images. Useful for systems with auxiliary cores, such as the M4 core in the AM62x soc. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-11configs: phycore_am64x_a53_defconfig: Enable remoteproc cmdDaniel Schultz
This enables the 'rproc' command, allowing users to start, stop, and manage co-processors as well as load firmware images. Useful for systems with auxiliary cores, such as M4 or R5 cores in the AM64x soc. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>