Svyatoslav Ryhel [Wed, 19 Mar 2025 11:51:58 +0000 (13:51 +0200)]
video: backlight: add TI LM3532 led controller
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>
Svyatoslav Ryhel [Wed, 19 Mar 2025 08:15:29 +0000 (10:15 +0200)]
video: panel: add Motorola Atrix 4G and Droid X2 panel
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>
Svyatoslav Ryhel [Tue, 25 Mar 2025 18:23:07 +0000 (20:23 +0200)]
input: add support for CPCAP power button
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>
Svyatoslav Ryhel [Mon, 17 Mar 2025 18:49:22 +0000 (20:49 +0200)]
power: regulator: add regulator support for CPCAP PMIC
The driver provides regulator set/get voltage and enable/disable functions
for CPCAP PMIC.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Svyatoslav Ryhel [Sat, 1 Feb 2025 14:02:45 +0000 (16:02 +0200)]
power: pmic: add the basic CPCAP PMIC support
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>
Svyatoslav Ryhel [Sat, 29 Mar 2025 15:18:12 +0000 (17:18 +0200)]
video: tegra: adjust DC and DSI config names
Fix DC and DSI config names to reflect more generic nature of existing
Tegra video drivers.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Svyatoslav Ryhel [Sat, 29 Mar 2025 15:00:20 +0000 (17:00 +0200)]
video: tegra: drop prefix from file names
Dir name is enough.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Svyatoslav Ryhel [Sat, 29 Mar 2025 14:53:24 +0000 (16:53 +0200)]
video: move tegra124 into common tegra dir
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>
Svyatoslav Ryhel [Sat, 29 Mar 2025 14:49:53 +0000 (16:49 +0200)]
video: rename tegra20 to tegra
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>
Svyatoslav Ryhel [Mon, 24 Mar 2025 19:25:17 +0000 (21:25 +0200)]
video: tegra20: dsi: add Tegra20 support
Existing Tegra30 DSI configuration is fully compatible with Tegra20.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Svyatoslav Ryhel [Sat, 29 Mar 2025 11:02:03 +0000 (13:02 +0200)]
sysreset: diverge GPIO reset and poweroff configs per-phase
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>
Svyatoslav Ryhel [Tue, 25 Mar 2025 07:51:47 +0000 (09:51 +0200)]
ARM: tegra: clock: fix PLLD2 info table entry on Tegra124 and Tegra210
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>
Svyatoslav Ryhel [Mon, 24 Mar 2025 19:24:45 +0000 (21:24 +0200)]
ARM: tegra: clock: take in account PLLD/D2 enable bit on clock_set_rate
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>
Svyatoslav Ryhel [Sun, 26 Jan 2025 17:48:22 +0000 (19:48 +0200)]
spi: tegra20_slink: fix CS polarity setup
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>
Tom Rini [Fri, 11 Apr 2025 18:16:49 +0000 (12:16 -0600)]
Merge patch series "Switch to using $(PHASE_) in Makefiles"
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
Tom Rini [Tue, 1 Apr 2025 22:55:25 +0000 (16:55 -0600)]
doc/develop/codingstyle.rst: Expand to include CONFIG_IS_ENABLED and PHASE_
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>
Tom Rini [Tue, 1 Apr 2025 22:55:24 +0000 (16:55 -0600)]
doc/develop/codingstyle.rst: Add a section on conditional compilation
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>
Tom Rini [Tue, 1 Apr 2025 22:55:23 +0000 (16:55 -0600)]
Kbuild: Always use $(PHASE_)
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>
Vincent Stehlé [Fri, 4 Apr 2025 12:53:58 +0000 (14:53 +0200)]
cmd: optee: fix hello subcommand argument check
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>
Heinrich Schuchardt [Thu, 3 Apr 2025 14:47:53 +0000 (16:47 +0200)]
configs: qemu-arm raise CONFIG_NR_DRAM_BANKS
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>
Daniel Schultz [Fri, 28 Mar 2025 05:58:24 +0000 (22:58 -0700)]
configs: phycore_am62x_a53_defconfig: Enable gpio
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>
Daniel Schultz [Fri, 28 Mar 2025 05:58:23 +0000 (22:58 -0700)]
configs: phycore_am62x_a53_defconfig: Enable remoteproc cmd
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>
Daniel Schultz [Fri, 28 Mar 2025 05:58:22 +0000 (22:58 -0700)]
configs: phycore_am64x_a53_defconfig: Enable remoteproc cmd
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>
Leonard Anderweit [Tue, 1 Apr 2025 08:46:42 +0000 (10:46 +0200)]
CI: Build missing binman tools before binman tests
The CI image does not ship with all tools required for the binman tests.
Have binman build the missing tools.
Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Tom Rini [Fri, 11 Apr 2025 15:12:16 +0000 (09:12 -0600)]
Merge tag 'qcom-for-2025.07' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
Qualcomm changes for v2025.07:
CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/25653
There's been a surprising amount of activity lately on the Qualcomm
side with the two oldest boards getting some fresh attention and a lot
of cleanup and polish going on across the board.
* SDM660 gets USB phy fixes and a pinctrl driver
* The recently added SA8775P/QCS9100 SoC gets a pinctrl driver
* The Qualcomm pinctrl driver now handles reserved pins correctly,
fixing crashes on some boards when running "gpio status -a"
* OF_UPSTREAM_BUILD_VENDOR is enabled in qcom_defconfig
* SDM845 and SC7280 get missing clocks added (since we're now stricter
about those). This gets USB working more reliably in more cases.
* DM_USB_GADGET is enabled for all boards using DWC3 and fasbtoot is
enabled too
* A bug in the livetree fixup code is fixed (making USB work on a lot
more platforms)
* Button label lookup is made case insensitive* bootretry becomes more dynamic, allowing it to be hijacked to make a
"persistent" boot menu that allows dropping to U-Boot shell later on
* A new qcom-phone.config fragment is added along with a phone-specific
default environment and phone-specific debugging/bringup docs. These
make U-Boot more usable on devices without a serial port or keyboard.
* The db820c gets fixed up and updated documentation
* The db410c also gets some love and modernisation as well as a new
reviewer.
* A new driver is added for the USB VBUS regulator found on various
Qualcomm PMICs
* The Qualcomm SPMI driver gets some fixes and cleanup for SPMI v5 and
v7 support.
Tom Rini [Fri, 11 Apr 2025 15:11:38 +0000 (09:11 -0600)]
Merge tag 'u-boot-imx-master-
20250411' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25652
- Add i.MX8MP LDB support.
- Various phycore-imx93 environment improvements.
- Add support for Toradex SMARC iMX8MP.
Tom Rini [Fri, 11 Apr 2025 15:09:08 +0000 (09:09 -0600)]
Merge tag 'efi-2025-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-07-rc1
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25648
Documentation:
* Update authenticated capsules documentation
UEFI:
* Add support for loading FIT images including initrd
- efi_loader: efi_load_initrd: provide a memory mapped initrd
- efi_loader: binary_run: register an initrd
- bootm: add support for initrd in do_bootm_efi
* efi_selftest: remove un-needed NULL checks
* efi: Fix efiboot for payloads loaded from memory
* Print extra information from the bootmgr
* Move public cert for capsules to .rodata
* Set EFI capsule dfu_alt_info env explicitly
* Make FDT extra space configurable
* Install the ACPI table from the bloblist
* Handle GD_FLG_SKIP_RELOC
* Handle malloc() errors
Others:
* acpi: select CONFIG_BLOBLIST
* smbios: select CONFIG_BLOBLIST
* xilinx: dfu: Fill directly update_info.dfu_string
* cmd: fwu: Dump custom fields from mdata structure
* board: remove capsule update support in set_dfu_alt_info()
Tom Rini [Fri, 11 Apr 2025 14:50:55 +0000 (08:50 -0600)]
Merge tag 'mmc-2025-04-11' of https://source.denx.de/u-boot/custodians/u-boot-mmc
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/25640
- Support Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing
- Optimize eMMC erasing time
- Simplify poll CD logic
- Fix possible Synchronous Abort for sdhci
- Kconfig dependencies fix
- Minor code update, return fail if mmc_complete_init, avoid uniniting twice
Stephan Gerhold [Mon, 7 Apr 2025 16:59:34 +0000 (18:59 +0200)]
board: dragonboard410c: Update maintainers
Ramon has been inactive on the U-Boot mailing list for over a year now and
the DB410c port has not been updated much lately. I've been doing most of
the DB410c-specific fixes/rework lately and try to test it every now and
then, so add myself as new maintainer. Also add Sam as reviewer, since he's
been doing lots of testing and reviews for MSM8916 recently.
Cc: Sam Day <me@samcday.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-13-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:33 +0000 (18:59 +0200)]
board: dragonboard410c: Use button_cmd instead of custom code
Simplify the board code by using the new BUTTON_CMD functionality, instead
of implementing this separately using C code. This allows disabling or
customizing this functionality if wanted.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-12-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:32 +0000 (18:59 +0200)]
board: dragonboard410c: Enable support for Android boot images
The U-Boot port for DB410c still has plenty of extra space available at
this point, so avoid disabling features that would be normally enabled by
default. In particular, this incldues support for Android boot images,
which is quite likely to be used together with the USB Fastboot interface.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-11-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:31 +0000 (18:59 +0200)]
board: dragonboard410c: Use BOOTSTD instead of DISTRO_DEFAULTS
Reduce the environment size by using standard boot instead of distro boot.
It uses faster bootdevs first by default (eMMC -> SD -> USB -> Network), so
set "boot_targets" to keep the current ordering (USB -> SD -> eMMC ->
Network). Perhaps this should be changed for consistency, but for now this
keeps the behavior similar to before.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-10-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:30 +0000 (18:59 +0200)]
board: dragonboard410c: Enable RTL8152 ethernet
The Geniatech DB4 V3 [1] has a RTL8152 onboard for Ethernet. I don't have
one to test if that works, but the other USB Ethernet drivers work pretty
much as-is, so just enable it with the assumption it will work out fine.
[1]: https://www.96boards.org/product/db4/
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-9-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:29 +0000 (18:59 +0200)]
board: dragonboard410c: Fix counter frequency
The actual counter frequency is 19.2 MHz, not 19.0 MHz. This isn't really
used so far though, since probably no one (except me) ever tried using
U-Boot in EL3 where we need to program the counter frequency.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-8-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:28 +0000 (18:59 +0200)]
board: dragonboard410c: Use dynamically allocated load addresses
The generic Qualcomm board code allocates addresses for loading the kernel,
ramdisk, DT, fastboot etc. This also happens on the DB410c and already
overrides these definitions defined in the default env. So let's just drop
the static ones, since the dynamic ones work just fine.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-7-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:27 +0000 (18:59 +0200)]
board: dragonboard410c: Drop unused linux_image
This does not seem to be used anywhere.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-6-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:26 +0000 (18:59 +0200)]
board: dragonboard410c: Drop reflash functionality
This is broken ever since we switched to using U-Boot as first stage
bootloader. Since no one seems to test this actively, let's just drop this
entirely. There are other tools available for re-flashing the DB410c.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-5-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:25 +0000 (18:59 +0200)]
board: dragonboard410c: Drop UNSTUFF_BITS() macro
This was originally taken from Linux, but at this point it's an inline
function upstream and no longer a macro. Given that we just want to extract
the serial number from the MMC CID, let's just inline that specifically.
This is also the style used in the MMC core code within U-Boot.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-4-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:24 +0000 (18:59 +0200)]
board: dragonboard410c: Fix BD address
local-bd-address in the device tree needs to be formatted with the least
significant byte first (i.e. little endian). We're not doing this when
adding it to the DT, which means the MAC address ends up being reversed in
Linux. Fix this by reversing the array before setting it in the DT.
We're also flipping the wrong bit when generating the BD address. Before
reversing the array, the least significant bit is in the last byte.
Fixes:
ff06dc240325 ("db410: alter WLAN/BT MAC address fixup")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-3-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:23 +0000 (18:59 +0200)]
board: dragonboard410c: Fix RAM size
DB410c has exactly 1 GiB of RAM. Some of it is reserved, but this is
described separately in the DT.
This was fixed before in commit
1d667227ea51 ("board: dragonboard410c: Fix
PHYS_SDRAM_1_SIZE"), but was reintroduced when DB410c was converted to use
the upstream device tree.
Note that there are variants of apq8016-sbc with 2 GiB RAM (e.g. the
Geniatech DB4). They need the WIP SMEM memory map parsing [1] to use the
full amount of RAM.
[1]: https://lore.kernel.org/u-boot/
20241124-b4-modernise-smem-v1-0-
b7852c11b67c@linaro.org/T/
Fixes:
ed8fbd2889fc ("dts: msm8916: replace with upstream DTS")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-2-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:22 +0000 (18:59 +0200)]
mach-snapdragon: Fix EL2 boot on DragonBoard 410c
The workaround for the "PSCI bug" on DragonBoard 410c implemented in
arch/arm/mach-snapdragon/include/mach/boot0.h clobbers the x0 register
by storing the CurrentEL in there. When running in EL1, the mode switch
sequence implemented there later clears the register again, but this is
skipped when U-Boot is booted in EL2.
This causes crashes in the mach-snapdragon board_fdt_blob_setup() later,
because the invalid address stored in x0 gets dereferenced to check if it
points to a valid DTB.
We can't rely on having a valid values in the CPU registers for the first
stage bootloader configuration on DB410c, and nothing would place a DTB
there anyway. Skip selecting the SAVE_PREV_BL_FDT_ADDR option for the boot0
hook case to avoid crashing with the clobbered register value.
Fixes:
059d526af312 ("mach-snapdragon: generalise board support")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-1-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Thu, 10 Apr 2025 08:52:38 +0000 (10:52 +0200)]
pinctrl: qcom: handle reserved ranges
Some Qualcomm boards feature reserved ranges of pins which are protected
by firmware. Attempting to read or write any registers associated with
these pins results the board resetting.
Add support for parsing these ranges from devicetree and ensure that the
pinctrl and GPIO drivers don't try to interact with these pins.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250410-topic-sm8x50-pinctrl-reserved-ranges-v2-1-654488392b9a@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:23 +0000 (14:23 +0200)]
button: make button_get_by_label() case insensitive
This function is already doing a fuzzy match, since there are no
guarantees that a given label is unique.
Ignoring case makes it much easier to catch "Volume down" or "Volume
Down" in board-agnostic code.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-6-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:22 +0000 (14:23 +0200)]
button: qcom-pmic: prettify and standardise button labels
Boards using gpio-keys for volume buttons label them "Volume Down",
let's match that here, and make the power button nicer too.
This simplifies configuring button_cmds in a board-agnostic way.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-5-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:21 +0000 (14:23 +0200)]
doc: board/qualcomm: describe phone support and bringup
Add some documentation which attempts to describe Qualcomm smartphone
support with the qcom-phone.config fragment, as well as a high level
debugging guide for diagnosing U-Boot issues when UART and framebuffer
are unavailable.
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-4-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:20 +0000 (14:23 +0200)]
bootretry: check for bootretry variable changes
To enable more complex sequencing of the bootmenu, autoboot, and
bootretry, handle changes to the bootretry variable between tries. This
makes it possible to turn bootretry off (e.g. to drop to a shell) and
then back on again.
This makes it possible to have a persistent bootmenu (the only way to
navigate U-Boot on devices like smartphones which lack a physical
keyboard) by having bootcmd be defined to launch the bootmenu. This
allows for menu options like enabling USB mass storage gadget to return
back to the boot menu once the gadget is shut down.
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-3-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:19 +0000 (14:23 +0200)]
cli_hush: support running bootcmd on boot retry
Introduce a new config option: RETRY_BOOTCMD. When enabled this causes
hush shell to re-run "bootcmd" when the auto-boot counter times out.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-2-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:18 +0000 (14:23 +0200)]
board/qualcomm: introduce phone config
Phones don't have keyboards! Introduce a phone-specific config fragment
and associated environment file to make U-Boot more useful on these
devices. This allows for navigating via the buttons and enabling
various USB gadget modes or displaying info about U-Boot.
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-1-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Alexey Minnekhanov [Mon, 31 Mar 2025 15:55:31 +0000 (18:55 +0300)]
drivers: pinctrl: Add Qualcomm SDM630/660 TLMM driver
Add support for TLMM pin controller block (Top Level Mode
Multiplexer) on SDM630/660 SoCs, with support for special pins.
Correct pin configuration is required for working debug UART
and eMMC/SD cards.
SDM630 and SDM660 TLMM blocks are the same.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250331155531.3638165-1-alexeymin@postmarketos.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Tue, 1 Apr 2025 07:45:20 +0000 (09:45 +0200)]
gpio: msm: return correct value return for special output pins
When a special pin is output only, the current code would return 0,
but if the pin is output only we can get the output value.
Try to return the output value and in all the other cases return
an error instead of 0.
Fixes:
f9bb539460d ("gpio: msm: add support for special pins")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-2-a1148a02bb16@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Tue, 1 Apr 2025 07:45:19 +0000 (09:45 +0200)]
gpio: msm: fix get_function return for special pins
The get_function callback wrongly returns 0 for special pins,
return the appropriate pin function by probing into the special
pins data fields to find if the pin is gpio capable.
Fixes:
f9bb539460d ("gpio: msm: add support for special pins")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-1-a1148a02bb16@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Martin Schwan [Thu, 10 Apr 2025 08:41:22 +0000 (10:41 +0200)]
board: phycore-imx93: env: Add common RAUC boot logic
Add a common RAUC boot logic environment and make use of it in the
i.MX93 environment. The RAUC boot logic is deactivated by default and
can be activated by setting "doraucboot" to "1".
Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Reviewed-by: Leonard Anderweit <l.anderweit@phytec.de>
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Leonard Anderweit [Thu, 10 Apr 2025 08:41:21 +0000 (10:41 +0200)]
board: phycore-imx93: env: Move bootcmd from defconfig to env
Move the default bootcmd from the defconfig to the board environment in
preparation for RAUC support. No change in functionality.
Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Primoz Fiser [Thu, 10 Apr 2025 08:41:20 +0000 (10:41 +0200)]
board: phycore-imx93: env: Add option to disable bootenv.txt import
Add support for disabling external environment import (bootenv.txt) by
setting the ${no_bootenv} environment variable.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Primoz Fiser [Thu, 10 Apr 2025 08:41:19 +0000 (10:41 +0200)]
board: phycore-imx93: env: Add prepare_mcore to environment
Add prepare_mcore script to environment to be able to notify Linux about
the state of M33 core via the kernel cmdline by appending to ${optargs}.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Primoz Fiser [Thu, 10 Apr 2025 08:41:18 +0000 (10:41 +0200)]
board: phycore-imx93: env: Add optargs to environment
Add the optargs variable so we can set optional arguments while booting.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Primoz Fiser [Thu, 10 Apr 2025 08:41:17 +0000 (10:41 +0200)]
board: phycore-imx93: env: Move fdt and bootenv addresses
Move the load addresses for FDTs and bootenv.txt to create space for
loading OS image. Otherwise, parts of the image might get corrupted.
and the following boot error will be present:
ERROR: FDT image overlaps OS image (OS=
80400000..
832a0000)
Moreover, this commit also syncs addresses with downstream PHYTEC
u-boot for i.MX93 in preparation for FIT image support in the future.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Vitor Soares [Mon, 7 Apr 2025 13:04:36 +0000 (14:04 +0100)]
board: toradex: add Toradex SMARC iMX8MP
Add support for the Toradex SMARC iMX8MP.
Link: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus
Link: https://www.toradex.com/products/carrier-board/smarc-development-board-kit
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Vitor Soares [Mon, 7 Apr 2025 13:04:35 +0000 (14:04 +0100)]
toradex: tdx-cfg-block: add 0096 Toradex SMARC iMX95
Add PID4 0096 Toradex SMARC iMX95 Hexa 8GB WB IT to config block handling.
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Vitor Soares [Mon, 7 Apr 2025 13:04:34 +0000 (14:04 +0100)]
arm: dts: imx8mp: sync with Linux v6.15-rc1
Sync imx8mp.dtsi with Linux v6.15-rc1.
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Bryan Brattlof [Tue, 8 Apr 2025 06:06:58 +0000 (01:06 -0500)]
efi_selftest: remove un-needed NULL checks
Because we've already returned early in the event 'handle' is NULL we
don't need these extra not NULL checks. Remove them
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 7 Apr 2025 06:59:24 +0000 (08:59 +0200)]
doc/buildman: typo 'require'
%s/require/required/
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 7 Apr 2025 06:44:24 +0000 (08:44 +0200)]
smbios: select CONFIG_BLOBLIST
Since commit
53d5a221632e ("emulation: Use bloblist to hold tables")
`make qemu-riscv64_smode_defconfig acpi.config && make` fails with
drivers/misc/qfw_smbios.c:93:(.text.qfw_evt_write_smbios_tables+0xe):
undefined reference to `bloblist_add'
Build with bloblist support.
Fixes:
53d5a221632e ("emulation: Use bloblist to hold tables")
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 7 Apr 2025 06:44:23 +0000 (08:44 +0200)]
acpi: select CONFIG_BLOBLIST
Since commit
53d5a221632e ("emulation: Use bloblist to hold tables")
`make qemu-riscv64_smode_defconfig acpi.config && make` fails with
qfw_acpi.c:146:(.text.evt_write_acpi_tables+0xc):
undefined reference to `bloblist_add'
Build with bloblist support.
Fixes:
53d5a221632e ("emulation: Use bloblist to hold tables")
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Viorel Suman [Tue, 1 Apr 2025 07:56:35 +0000 (15:56 +0800)]
firmware: scmi: smt: Interrupt communication enable
i.MX95 System Manager uses interrupt driven communication which requires
the caller to set Bit[0] of channel flags to 1. When transmission
completes and the previous general purpose interrupt has been processed
by the other core, i.MX95 System Manager will set General Purpose
Interrupt Control Register (GCR). U-Boot polls General-purpose Status
(GSR) to check if the operation is finished.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Rafael Beims [Fri, 28 Mar 2025 10:20:40 +0000 (11:20 +0100)]
toradex: apalis-imx6: Fix build failure when CONFIG_VIDEO_IPUV3 is enabled
If CONFIG_VIDEO_IPUV3 is enabled without also having CONFIG_IMX_HDMI
enabled, the build fails for the Apalis iMX6 board.
Fixes:
592f4aed6db7 ("arm: imx: initial support for apalis imx6")
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Ilias Apalodimas [Tue, 1 Apr 2025 11:27:26 +0000 (14:27 +0300)]
doc: Update authenticated capsules documentation
Now that we moved out the capsule signature from the DTB, remove the
relevant documentation.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 1 Apr 2025 11:27:25 +0000 (14:27 +0300)]
efi_loader: Move public cert for capsules to .rodata
commit
ddf67daac39d ("efi_capsule: Move signature from DTB to .rodata")
was reverted in
commit
47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to .rodata"")
because that's what U-Boot was usually doing -- using the DT to store
configuration and data. Some of the discussions can be found here [0].
(Ab)using the device tree to store random data isn't ideal though.
On top of that with new features introduced over the years, keeping
the certificates in the DT has proven to be problematic.
One of the reasons is that platforms might send U-Boot a DTB
from the previous stage loader using a transfer list which won't contain
the signatures since other loaders are not aware of internal
U-Boot ABIs. On top of that QEMU creates the DTB on the fly, so adding
the capsule certificate there does not work and requires users to dump
it and re-create it injecting the public keys.
Now that we have proper memory permissions for arm64, move the certificate
to .rodata and read it from there.
[0] https://lore.kernel.org/u-boot/CAPnjgZ2uM=n8Qo-a=DUkx5VW5Bzp5Xy8=Wgmrw8ESqUBK00YJQ@mail.gmail.com/
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com> # on TI sk-am62p-lp
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on AML-A311D-CC
Tested-by: Raymond Mao <raymond.mao@linaro.org>
Vincent Stehlé [Tue, 1 Apr 2025 11:15:00 +0000 (13:15 +0200)]
efi_loader: handle malloc() errors
The new_packagelist() function of the HII Protocols implementation is
calling malloc() without checking its return code; fix this.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Fri, 28 Mar 2025 12:58:18 +0000 (14:58 +0200)]
efi_loader: Print extra information from the bootmgr
Instead of just printing the label, add information for the Device
path as well so it's easier to see if we are booting from disk, network
etc
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Varadarajan Narayanan [Wed, 26 Mar 2025 05:46:53 +0000 (11:16 +0530)]
efi_loader: Handle GD_FLG_SKIP_RELOC
If the EFI runtime services pointers are relocated even though
relocation is skipped, it corrupts some other data resulting in some
unexpected behaviour.
In this specific case, it overwrote some page table entries resulting in
the device memory address range's mappings getting removed. Eventually,
after the completion of efi_runtime_relocate(), when a driver tries to
access its device's registers it crashes since the mappings are absent.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Christian Kohlschütter [Sun, 23 Mar 2025 19:03:03 +0000 (20:03 +0100)]
efi: Fix efiboot for payloads loaded from memory
Calling bootefi on an address that was loaded from memory (e.g., cramfs
or SPI flash via "sf read", etc.), currently results in the EFI binary
not being able to access the EFI image device path.
For example, iPXE would fail with an error "EFI could not get loaded
image's device path: Error 0x7f39e082 (https://ipxe.org/
7f39e082)".
This is due to an incomplete special-case in efi_binary_run, where a new
device path was created but not used in all required places.
Fix the in-memory special case, set the "bootefi_device_path" to the
generated "file_path".
iPXE will now boot, and report the device path as
"/MemoryMapped(0x0,0xSTART,0xLEN)"
Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Michal Simek [Fri, 21 Mar 2025 10:25:48 +0000 (11:25 +0100)]
cmd: fwu: Dump custom fields from mdata structure
The commit
cb9ae40a16f0 ("tools: mkfwumdata: add logic to append vendor
data to the FWU metadata") added support for adding vendor data to mdata
structure but it is not visible anywhere that's why extend fwu command to
dump it.
Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Adriano Cordova [Wed, 19 Mar 2025 14:45:01 +0000 (11:45 -0300)]
bootm: add support for initrd in do_bootm_efi
Pass a pointer to a memory mapped initrd and its size to
efi_binary_run. The EFI stack will register an EFI_LOAD_FILE2_PROTOCOL
for the next boot stage to access this initrd.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Adriano Cordova [Wed, 19 Mar 2025 14:45:00 +0000 (11:45 -0300)]
efi_loader: binary_run: register an initrd
Add support to install an initrd when running an EFI binary
with efi_binary_run
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Adriano Cordova [Wed, 19 Mar 2025 14:44:59 +0000 (11:44 -0300)]
efi_loader: efi_load_initrd: provide a memory mapped initrd
U-Boot can pass an initrd to subsequent boot stages via the
EFI_LOAD_FILE2_PROTOCOL. The current implementation only supports
this functionality via the efi boot manager: the initrd is taken
from the load options of the BootCurrent variable. This commit adds
support for registering a memory mapped initrd, e.g. loaded from a
FIT image. For now this new method takes precedence over loading the
initrd from the BootCurrent variable (if both are present) because
the BootCurrent variable is not cleared on exiting the boot manager.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Pawel Kochanowski [Tue, 18 Mar 2025 09:22:18 +0000 (10:22 +0100)]
efi: Make FDT extra space configurable
U-Boot currently reserves only 0x3000 bytes when copying the FDT
in copy_fdt(), which may not be sufficient if additional nodes
(such as FMAN firmware) are added later.
This patch uses the exisitng SYS_FDT_PAD to reserve space for FDT fixup
instead of hardcoded value.
This change prevents potential corruption when resizing FDT after
EFI boot, especially when firmware like FMAN requires additional
space.
Signed-off-by: Gabriel Nesteruk <gnesteruk@sii.pl>
Signed-off-by: Pawel Kochanowski <pkochanowski@sii.pl>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Thu, 6 Mar 2025 14:31:24 +0000 (07:31 -0700)]
efi_loader: Install the ACPI table from the bloblist
When BLOBLIST_TABLES is used, the ACPI tables are not currently added to
the list of EFI tables. While we don't want to create a new memory
region, we do want to tell EFI about the tables.
Fix this by covering this case. At some point the non-bloblist code can
likely be removed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
3da59ee9579 ("efi_loader: Avoid mapping the ACPI tables twice")
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Jonathan Humphreys [Wed, 26 Feb 2025 22:35:47 +0000 (16:35 -0600)]
board: remove capsule update support in set_dfu_alt_info()
Now that capsule update sets the dfu_alt_info environment variable
explicitly, there is no need to support it in the set_dfu_alt_info()
function. Decouple SET_DFU_ALT_INFO from EFI_CAPSULE_FIRMWARE_FIT and
EFI_CAPSULE_FIRMWARE_RAW. For many boards, this was the only use of
set_dfu_alt_info() so remove the function entirely.
Fixes:
a9e6f01a941f ("efi: Define set_dfu_alt_info() for boards with UEFI capsule update enabled")
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> # for board/libre-computer/*
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de> # for
Jonathan Humphreys [Wed, 26 Feb 2025 22:35:46 +0000 (16:35 -0600)]
efi_firmware: set EFI capsule dfu_alt_info env explicitly
The current implementation of EFI capsule update uses set_dfu_alt_info() to
set the dfu_alt_info environment variable with the settings it requires.
However, set_dfu_alt_info() is doing this for all DFU operations, even
those unrelated to capsule update.
Thus other uses of DFU, such as DFU boot which sets its own value for the
dfu_alt_info environment variable, will have that setting overwritten with
the capsule update setting. Similarly, any user defined value for the
dfu_alt_info environment variable would get overwritten when any DFU
operation was performed, including simply performing a "dfu 0 list"
command.
The solution is stop using the set_dfu_alt_info() mechanism to set the
dfu_alt_info environment variable and instead explicitly set it to the
capsule update's setting just before performing the capsule update's DFU
operation, and then restore the environment variable back to its original
value.
This patch implements the explicit setting and restoring of the
dfu_alt_info environment variable as part of the EFI capsule update
operation.
The fix is fully implemented in a subsequent patch that removes the capsule
update dfu_alt_info support in set_dfu_alt_info().
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Michal Simek [Wed, 26 Feb 2025 22:35:45 +0000 (16:35 -0600)]
xilinx: dfu: Fill directly update_info.dfu_string
Directly fill update_info.dfu_string to prepare platforms to switch
from using dfu_alt_info variable to dfu_string which contains description
for capsule update when switch is done.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Luke Wang [Tue, 25 Mar 2025 08:29:14 +0000 (16:29 +0800)]
mmc: mmc_boot: Support Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing
Current mmc bootpart-resize command only support Samsung eMMC BOOT/RPMB
hardware partition resizing. Add Sandisk and Micron eMMC BOOT/RPMB hardware
partition resizing support. The commands and parameters for resizing
partitions are different for each manufacturer. Select the corresponding
function according to CID.
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Simon Glass [Sun, 16 Feb 2025 12:55:59 +0000 (05:55 -0700)]
mmc: Avoid uniniting twice
Each MMC device has a child which ihs a block device. At present we call
mmc_deinit() when the block device is removed.
But the MMC struct (i.e. struct mmc) is attached to the MMC's device,
not its child.
So at present, when an MMC device is removed, mmc_deinit() is called
twice, once for the MMC device and once for its block device. This
results in a double call to cyclic_unregister().
Fix this by adding a 'remove' method to the uclass and calling
mmc_deinit() from there.
Also drop the call to device_probe() within the block-device's probe()
method. The device is already in the process of being probed, so this
call does nothing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
c822c1a50bd ("mmc: call device_probe() after scanning")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jonas Karlman [Thu, 23 Jan 2025 21:48:48 +0000 (21:48 +0000)]
mmc: sdhci: Fix possible Synchronous Abort using PIO mode
When MMC_SDHCI_SDMA=y or MMC_SDHCI_ADMA=y and PIO mode is used
dma_unmap_single() is called on an unmapped address, 0x0. This may
result in a Synchronous Abort:
## Checking hash(es) for Image atf-1 ... sha256+ OK
CMD_SEND:16
ARG 0x00000200
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:18
ARG 0x00004005
"Synchronous Abort" handler, esr 0x96000147
elr:
00000000400015bc lr :
0000000040012b4c
x 0:
0000000000008000 x 1:
0000000000092600
x 2:
0000000000000040 x 3:
000000000000003f
x 4:
0000000000000030 x 5:
0000000000000001
x 6:
0000000000000001 x 7:
0000000000000000
x 8:
000000000000000a x 9:
0000000000000090
x10:
0000000043dffc68 x11:
0000000043c00440
x12:
0000000043c00440 x13:
ffffffffbfe00000
x14:
000000000000031c x15:
0000000240000000
x16:
000000004001145c x17:
0000000000000032
x18:
0000000043dffef0 x19:
0000000043c00000
x20:
0000000043dffbc8 x21:
0000000000000000
x22:
00000000000f3d95 x23:
0000000000000002
x24:
0000000000000493 x25:
0000000000092600
x26:
0000000000000001 x27:
0000000000000001
x28:
0000000000000008 x29:
0000000043dffab0
Code:
d2800082 9ac32042 d1000443 8a230000 (
d5087620)
Resetting CPU ...
resetting ...
Fix this by only dma_unmap_single() when DMA mode is used and
sdhci_prepare_dma() has been called to map host->start_addr.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 20 Jan 2025 04:30:09 +0000 (12:30 +0800)]
mmc: Optimize eMMC erase speed
Per JESD84-B51 6.6.9 Erase:
The host can erase a contiguous range of Erase Groups. Starting the erase
process is a three steps sequence. First the host defines the start address
of the range using the ERASE_GROUP_START (CMD35) command, next it defines
the last address of the range using the ERASE_GROUP_END (CMD36) command and
finally it starts the erase process by issuing the ERASE (CMD38) command
with argument bits set to zero. See Table 11 for the arguments supported by
CMD38. The address field in the erase commands is an Erase Group address,
in byte units for densities up to 2GB, and in sector units for densities
greater than 2GB. The Device will ignore all LSB's below the Erase Group
size, effectively rounding the address down to the Erase Group boundary.
So choose 2GB bytes as check condition.
If the erase size is larger that 2GB, use 2GB to avoid breaking non high
capacity cards. If erase size is less than 2GB and larger than a grp, use
'grpcnt * mmc->erase_grp_size' to cover all the sectors, else use
the number of sectors.
With test erasing 20GB eMMC
board: Evk_8ulp Evk_8mm Evk_8mn Evk_8mp Mek_8qxpc0 Mek_8qm
kingston sandisk
before: 37.683s 112.738s 129.365s 28.238s 112.605s 500.470s 490.708s
after: 0.093s 0.111s 0.951s 0.080s 0.121s 6.960s 6.915s
Tested-by: Faqiang Zhu <faqiang.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Sat, 18 Jan 2025 03:27:34 +0000 (04:27 +0100)]
mmc: Exit from mmc_init() if mmc_complete_init() fails
In case mmc_complete_init() returns error, exit from mmc_init()
without possibly calling cyclic_register(), which at that point
would be undesired.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Sat, 18 Jan 2025 03:09:53 +0000 (04:09 +0100)]
mmc: Simplify poll CD logic in case cyclic framework is enabled
Simplify
90cc07fd786d ("mmc: Poll CD in case cyclic framework is enabled")
according to suggestions by Rasmus. The struct cyclic_info is zero-size in
case CONFIG_CYCLIC is not enabled and does not add any size to struct mmc,
so it can unconditionally be part of that structure. This allows clean up
of all the other conditionals in mmc.c which can now be unconditionally
present, as they also add no extra space.
Suggested-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Wed, 15 Jan 2025 02:07:36 +0000 (20:07 -0600)]
mmc: Kconfig: Correct dependencies SDHCI ADMA options
The option MMC_SDHCI_ADMA_FORCE_32BIT is only tested or used when
MMC_SDHCI_ADMA or SPL_MMC_SDHCI_ADMA is enabled. And for
MMC_SDHCI_ADMA_64BIT the same is true except we also require
MMC_SDHCI_ADMA_FORCE_32BIT to be disabled.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Varadarajan Narayanan [Tue, 1 Apr 2025 10:09:59 +0000 (15:39 +0530)]
drivers: scsi: Add 'erase' support
UFS devices uses the block and scsi frameworks. Enable UFS erase
support by adding erase support to SCSI.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Varadarajan Narayanan [Tue, 1 Apr 2025 10:09:58 +0000 (15:39 +0530)]
dm: blk: Add 'erase' generic block device commands
Add support for doing 'erase' using the generic block commands
framework.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
牛 志宏 [Tue, 1 Apr 2025 07:44:34 +0000 (07:44 +0000)]
bootm: Support load images when os is elf
This extends the bootm command to allow find images when os type is elf.
Signed-off-by: Niu Zhihong <zone.niuzh@hotmail.com>
Daniel Golle [Sat, 29 Mar 2025 23:24:31 +0000 (23:24 +0000)]
tools/fit_check_sign: make key optional
Allow invoking fit_check_sig without the key parameter, allowing to
validate only checksums and hashes for unsigned images.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Sat, 29 Mar 2025 23:23:51 +0000 (23:23 +0000)]
image-fit-sig: skip in tools build if key is missing
Skip signature verification in case no public key was given in order to
allow using fit_check_sign also to validate uImage.FIT images without
signatures. Guarded by USE_HOSTCC macro the behavior on target is
unchanged.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
牛 志宏 [Mon, 24 Mar 2025 03:05:56 +0000 (03:05 +0000)]
bootm: Add support for passing arguments to elf app
This extends the bootm command to allow passing arguments to standalone
ELF applications.
Signed-off-by: Niu Zhihong <zone.niuzh@hotmail.com>
Xu Zhang [Wed, 26 Mar 2025 01:44:12 +0000 (09:44 +0800)]
armv8: start.S: Subordinate CPUs psci setup vector
As current design, only Manager CPU called armv8_setup_psci() before
jump to next stage(such as Linux Kernel), Subordinate CPUs also need
setup psci vector to handle trap request which comes from higher EL
level.
Signed-off-by: Xu Zhang <423756212@qq.com>
[trini: Guard with !CONFIG_XPL_BUILD check]
Miquel Raynal [Thu, 3 Apr 2025 07:39:12 +0000 (09:39 +0200)]
video: imx: Add LCDIF driver
Add support for the LCD interfaces (LCDIF1/2). When probed, these
interfaces request numerous clocks and power domains, attach the bridge
and look for a panel in order to retrieve its capabilities and
properties.
There is a similar existing driver in the upper folder for other i.MX
targets, I discovered this driver a bit late. It is not targeting the
i.MX8MP and I have no idea how different can the LCDIF be on this SoC,
but I did not manage to get it work, especially because it is not fully
compliant with the device-model, especially on the clocks/power
management side which is all ad-hoc. This is normal though, it was
contributed more than ten years ago.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Apr 2025 07:39:11 +0000 (09:39 +0200)]
video: imx: Add LDB driver
Add support for the LVDS Display Bridge (LDB) found on i.MX8MP.
When attached, the bridge driver looks for panels connected to one of
its two outputs and adapts its own configuration to use them. There is
currently no support for merged/split displays.
Note regarding the clock configuration:
The LDB output clock should be absolutely identical to the LCDIF output
clock so both blocks can talk to each other synchronously. However, the
LDB clock has an internal divisor of 7 (respectively 3.5 in dual
configuration) which means the LDB input clock must be explicitly set
once we know the configuration.
This driver was tested on i.MX8MP using a single panel connected to the
LVDS2 interface.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Apr 2025 07:39:10 +0000 (09:39 +0200)]
video: imx: Fix Makefile in order to be able to add other imx drivers
The IPUv3 is one IP part of the imx world, there are others, and
selecting the whole imx/ folder based on such a specific Kconfig symbol
is sub-optimal. Let's always enter the imx/ folder, and then selectively
compile parts of the folder based on the configuration.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Apr 2025 07:39:09 +0000 (09:39 +0200)]
imx: power-domain: Add support for the MEDIAMIX control block
This block delivers power and clocks to the whole display and rendering
pipeline.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Apr 2025 07:39:08 +0000 (09:39 +0200)]
imx: power-domain: Describe the i.MX8 MEDIAMIX domain
Add support for the i.MX8 MEDIAMIX domain which is driving the power
over the whole display/rendering pipeline.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>