Mattijs Korpershoek [Wed, 8 Jan 2025 14:38:42 +0000 (15:38 +0100)]
bootstd: android: Allow boot with AVB failures when unlocked
When the bootloader is UNLOCKED, it should be possible to boot Android
even if AVB reports verification errors [1].
This allows developers to flash modified partitions on
userdebug/engineering builds.
Developers can do so on unlocked devices with:
$ fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
In such case, bootmeth_android refuses to boot.
Allow the boot to continue when the device is UNLOCKED and AVB reports
verification errors.
[1] https://source.android.com/docs/security/features/verifiedboot/boot-flow#unlocked-devices
Fixes:
125d9f3306ea ("bootstd: Add a bootmeth for Android")
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Link: https://lore.kernel.org/r/20250108-avb-disable-verif-v2-2-ba7d3b0d5b6a@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Mattijs Korpershoek [Wed, 8 Jan 2025 14:38:41 +0000 (15:38 +0100)]
bootstd: android: Add missing NULL in the avb partition list
When booting an Android build with AVB enabled, it's still possible to
deactivate the check for development purposes if the bootloader state is
UNLOCKED.
This is very useful for development and can be done at flashing time via:
$ fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
However, with bootmeth_android, we cannot boot this way:
Scanning bootdev 'mmc@fa10000.bootdev':
0 android ready mmc 0 mmc@fa10000.bootdev.whole
** Booting bootflow 'mmc@fa10000.bootdev.whole' with android
avb_vbmeta_image.c:188: ERROR: Hash does not match!
avb_slot_verify.c:732: ERROR: vbmeta_a: Error verifying vbmeta image: HASH_MISMATCH
get_partition: can't find partition '_a'
avb_slot_verify.c:496: ERROR: _a: Error determining partition size.
Verification failed, reason: I/O error occurred while trying to load data
Boot failed (err=-5)
No more bootdevs
From the logs we can see that avb tries to read a partition named '_a'.
It's doing so because the last element of requested_partitions implicitly is
'\0', but the doc explicitly request it to be NULL instead.
Add NULL as last element to requested_partitions to avoid this problem.
Fixes:
125d9f3306ea ("bootstd: Add a bootmeth for Android")
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Link: https://lore.kernel.org/r/20250108-avb-disable-verif-v2-1-ba7d3b0d5b6a@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Igor Opaniuk [Thu, 9 Jan 2025 11:28:22 +0000 (12:28 +0100)]
MAINTAINERS: move myself to reviewers for avb/ab
As Mattijs Korpershoek is in fact doing overall
maintenance of AVB/AB code, move myself to reviewers.
CC: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20250109112854.825204-1-igor.opaniuk@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Aaron Kling [Mon, 13 Jan 2025 09:11:45 +0000 (10:11 +0100)]
boot: android: Check kcmdline's for NULL in android_image_get_kernel()
kcmdline and kcmdline_extra strings can be NULL. In that case, we still
read the content from 0x00000 and pass that to the kernel, which is
completely wrong.
Fix android_image_get_kernel() to check for NULL before checking if
they are empty strings.
Fixes:
53a0ddb6d3be ("boot: android: fix extra command line support")
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Reviewed-by: Nicolas Belin <nbelin@baylibre.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Tested-by: Sam Day <me@samcday.com>
Link: https://lore.kernel.org/r/20250113-kcmdline-extra-fix-v1-1-03cc9c039159@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tom Rini [Wed, 22 Jan 2025 22:08:34 +0000 (16:08 -0600)]
Merge patch series "upl: Prerequite patches for updated spec"
Simon Glass <sjg@chromium.org> says:
The current UPL spec[1] has been tidied up and improved over the last
year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL
patches. It is split from [2]
[1] https://github.com/UniversalPayload/spec/tree/3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Link: https://lore.kernel.org/r/20250111000029.245022-1-sjg@chromium.org
Simon Glass [Sat, 11 Jan 2025 00:00:29 +0000 (17:00 -0700)]
dm: core: Provide ofnode_find_subnode_unit()
The ofnode_find_subnode() function currently processes things two
different ways, so the treatment of unit addresses differs depending on
whether OF_LIVE is enabled or not.
Add a new version which uses the ofnode API and add a test to check that
unit addresses can be matched correctly. Leave the old function in place
for the !OF_LIVE case, to avoid a code-size increase, e.g. on
firefly-rk3288
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:28 +0000 (17:00 -0700)]
dm: core: Provide ofnode_name_eq_unit() to accept a unit address
When a unit-address is provided, use it to match against the node
name.
Since this increases code size, put it into a separate function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:27 +0000 (17:00 -0700)]
dm: core: Clarify behaviour of ofnode_name_eq()
This function is somewhat ambiguous, so expand the comments and add a
test for the undefined behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:26 +0000 (17:00 -0700)]
x86: emulation: Enable bloblist
Add bloblist support so that tables can be generated and placed in a
bloblist, then passed to a payload using UPL
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:25 +0000 (17:00 -0700)]
efi_loader: Avoid mapping the ACPI tables twice
The add_u_boot_and_runtime() function paints with a broad brush,
considering all of the memory from the top of U-Boot stack to
gd->ram_top as EFI_RUNTIME_SERVICES_CODE
This is fine, but we need to make sure we don't add a separate entry for
any ACPI tables in this region (which happens when bloblist is used for
tables). Otherwise the memory map looks strange and we get a test
failure on qemu-x86 (only) for the 'virtual address map' test.
Good map:
Type Start End Attributes
================ ================ ================ ==========
CONVENTIONAL
0000000000000000-
00000000000a0000 WB
RESERVED
00000000000a0000-
00000000000f0000 WB
RUNTIME DATA
00000000000f0000-
00000000000f2000 WB|RT
RESERVED
00000000000f2000-
0000000000100000 WB
CONVENTIONAL
0000000000100000-
0000000005cc7000 WB
BOOT DATA
0000000005cc7000-
0000000005ccc000 WB
RUNTIME DATA
0000000005ccc000-
0000000005ccd000 WB|RT
BOOT DATA
0000000005ccd000-
0000000005cce000 WB
RUNTIME DATA
0000000005cce000-
0000000005cf0000 WB|RT
BOOT DATA
0000000005cf0000-
0000000006cf5000 WB
RESERVED
0000000006cf5000-
0000000006cfa000 WB
ACPI RECLAIM MEM
0000000006cfa000-
0000000006d1c000 WB
RESERVED
0000000006d1c000-
0000000006f35000 WB
RUNTIME CODE
0000000006f35000-
0000000006f37000 WB|RT
RESERVED
0000000006f37000-
0000000008000000 WB
RESERVED
00000000e0000000-
00000000f0000000 WB
Bad map: (with BLOBLIST_TABLES but without this patch):
Type Start End Attributes
================ ================ ================ ==========
CONVENTIONAL
0000000000000000-
00000000000a0000 WB
RESERVED
00000000000a0000-
00000000000f0000 WB
ACPI RECLAIM MEM
00000000000f0000-
00000000000f1000 WB
RESERVED
00000000000f1000-
0000000000100000 WB
CONVENTIONAL
0000000000100000-
0000000005ca5000 WB
BOOT DATA
0000000005ca5000-
0000000005caa000 WB
RUNTIME DATA
0000000005caa000-
0000000005cab000 WB|RT
BOOT DATA
0000000005cab000-
0000000005cac000 WB
RUNTIME DATA
0000000005cac000-
0000000005cce000 WB|RT
BOOT DATA
0000000005cce000-
0000000006cd3000 WB
RUNTIME DATA
0000000006cd3000-
0000000006cd5000 WB|RT
BOOT DATA
0000000006cd5000-
0000000006cf4000 WB
RESERVED
0000000006cf4000-
0000000006cf9000 WB
ACPI RECLAIM MEM
0000000006cf9000-
0000000006ce6000 WB
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:24 +0000 (17:00 -0700)]
x86: Align the SMBIOS table to a 4K boundary
This isn't strictly needed, but with UPL we use the reserved-memory
nodes to indicate where the SMBIOS table is. Tianocore requires 4KB
alignment on these regions, so it is easier to adjust the alignment
to match.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:23 +0000 (17:00 -0700)]
x86: Move tables to use SZ macros
Update the tables to use linux/sizes rather than open-coped values.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Sat, 11 Jan 2025 00:00:22 +0000 (17:00 -0700)]
x86: Enable UPL handoff for SPL
Add the GD_FLG_UPL so that a UPL-handoff is created.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:21 +0000 (17:00 -0700)]
x86: Support jumping to a UPL image
Add a function to allow x86 boards to jump to a UPL images. Currently
only 32-bit entry is supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:20 +0000 (17:00 -0700)]
x86: Show an error if video fails
If video is enabled we expect it to work. Avoid silent failure by adding
a panic if things go wrong.
Expand the SPL malloc-area for qemu-x86_64 to avoid a panic.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:19 +0000 (17:00 -0700)]
pci: video: Set up the pixel-format field
Add this information to the handoff structure so that it is available to
U-Boot proper. Update bochs and the video handoff.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:18 +0000 (17:00 -0700)]
x86: Create more space for SPL with qemu-x86_64
The space here is quite tight and there is plenty of room in the ROM.
Move SPL earlier to allow for expansion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:17 +0000 (17:00 -0700)]
emulation: Use bloblist to hold tables
QEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot
copies out the SMBIOS tables but points directly to the ACPI ones.
The ACPI tables are not aligned on a 4KB boundary, which means that UPL
cannot use them directly, since it uses a reserved-memory node for the
tables and that it assumed (by EDK2) to be 4KB-aligned.
On x86, QEMU provides the tables in a mapped memory region and U-Boot
makes use of these directly, thus making it difficult to use any common
code.
Adjust the logic to fit within the existing table-generation code. Use a
bloblist always and ensure that the ACPI tables is placed in an aligned
region. Set a size of 8K for QEMU. This does not actually put all the
tables in one place, for QEMU, since it currently adds a pointer to the
tables in QFW.
On ARM, enable bloblist so that SMBIOS tables can be added to the
bloblist.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:16 +0000 (17:00 -0700)]
emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE
QEMU always gets its devicetree from the OF_BOARD mechanism so we should
not depend on !BLOBLIST here.
It's not clear why we need to have any relationship with BLOBLIST so
let's remove the entire condition.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
2b71470628c dts: OF_HAS_PRIOR_STAGE should depend on !BLOBLIST
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Sat, 11 Jan 2025 00:00:15 +0000 (17:00 -0700)]
test: Fix inpected typo in upl test
Fix a typo in the test comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:14 +0000 (17:00 -0700)]
boot: Use fit_image_get_data() to get data
Use this function instead of fit_image_get_emb_data() data, since it
works will FITs that use external data.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:13 +0000 (17:00 -0700)]
boot: Rename fit_image_get_data_and_size()
This function is really just getting the data. The size comes along for
the ride. In fact this function is only reliable way to obtain the data
for an image in a FIT, since the FIT may use external data.
Rename it to fit_image_get_data()
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:12 +0000 (17:00 -0700)]
boot: Rename fit_image_get_data()
This function can only be used with FITs that use embedded data. Rename
it so this is clear.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Sat, 11 Jan 2025 00:00:11 +0000 (17:00 -0700)]
ofnode: Update of_add_subnode() to indicate name is alloced
This function allocates memory for the node name, so mention this in the
function comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:10 +0000 (17:00 -0700)]
ofnode: Indicate when out of space in a few places
Update ofnode_add_subnode() and ofnode_add_prop() to return a suitable
error when space is exhausted in the FDT. This makes it easier to see
what is going wrong.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Sat, 11 Jan 2025 00:00:09 +0000 (17:00 -0700)]
ofnode: Use 4K for a default tree-size
At some point it would be nice to have the ofnode API automatically
expand the tree as required, to accommodate new nodes. For now, expand
the default size so that UPL can be supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:08 +0000 (17:00 -0700)]
x86: Show the timestamp counter with bdinfo
Add a line to the 'bdinfo' command which shows the current value of the
TSC.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:07 +0000 (17:00 -0700)]
x86: Enable meminfo command
Enable this command for x86 boards as it is quite useful for seeing
where memory is.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:06 +0000 (17:00 -0700)]
mkimage: Update map_to_sysmem() to match its prototype
Update the version of this function in mkimage so that it uses a const
pointer, as is done in the mapmem.h header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:05 +0000 (17:00 -0700)]
serial: Support info() method in ns16550 xPL with UPL
UPL needs to pass the serial details onto the next stage, so adjust the
condition to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:04 +0000 (17:00 -0700)]
cpu: Provide a way to get the physical-address size
This concept exists on x86. Declare it as a generic function so that the
value can be accessed by UPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:03 +0000 (17:00 -0700)]
abuf: Provide a constant buffer
Add a new initialiser which can accept a constant pointer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:02 +0000 (17:00 -0700)]
abuf: Allow use in host tools
Some header files included on the host are moving to use abuf, so adjust
the header-inclusion to bring in size_t correctly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:01 +0000 (17:00 -0700)]
abuf: Provide a way to get the buffer address
In many cases it is useful to get the address of a buffer, e.g. when
booting from it. Add a function to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 11 Jan 2025 00:00:00 +0000 (17:00 -0700)]
bloblist: Make BLOBLIST_ALLOC the default
We want to encourage people to use an allocated bloblist since it is
more flexible than a fixed one. Make this the default, being sure not to
change existing users.
The unit tests require BLOBLIST_FIXED so add a dependency in the
Makefile to avoid build errors.
All sandbox builds require BLOBLIST_FIXED so make that the default for
sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 22 Jan 2025 17:23:35 +0000 (11:23 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-snapdragon
The highlights are:
* Fixed boot regression due to broken memory parsing
* Enable HW RNG and KASLR on all platforms
* Add support for Snapdragon X1 Elite hardware (clk/pinctrl)
* Add support for QCS9100 ride automotive development platform (clk/ufs)
* Add support for PCIe on SM8550, SM8650 and X1E
* Implement software debounce for PMIC buttons
Additionally, some minor improvements to "ufetch" have been pulled in:
* Show CPU architecture (arm/mips/etc)
* Make CONFIG_BLK optional
* Fix 32-bit support
Tom Rini [Wed, 22 Jan 2025 15:52:38 +0000 (09:52 -0600)]
Merge patch series "spi: Collected fixes"
Alexander Dahl <ada@thorsis.com> says:
Hello,
two patches for header issues I came across when working on (Q)SPI
drivers for atmel boards.
Link: https://lore.kernel.org/r/20250115161621.1551826-1-ada@thorsis.com
Tom Rini [Wed, 22 Jan 2025 15:51:45 +0000 (09:51 -0600)]
Merge patch series "Update my email address"
Christopher Obbard <christopher.obbard@linaro.org> says:
Update my email address for various locations in the U-Boot project.
This will (hopefully) stop any mails from going to /dev/null.
Link: https://lore.kernel.org/r/20250115-wip-obbardc-update-email-v1-0-0b4cd69c91fd@linaro.org
Tom Rini [Wed, 22 Jan 2025 15:49:14 +0000 (09:49 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=381&view=results
- cyclic: Fix rollover every 72 min on 32 bits platforms (Patrice)
Tom Rini [Wed, 22 Jan 2025 15:48:24 +0000 (09:48 -0600)]
Merge patch series "vbe: Series part F"
Simon Glass <sjg@chromium.org> says:
This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot. It mostly focuses on introducing a relocating
SPL-loader so that VBE can run in the limited amount of SRAM available
on many devices.
Another minor new feature is support in VBE for specifying the image
phase when loading from a FIT. This allows a single FIT to include
images for several boot phases, thus simplifying image-creation.
One lingering niggle in this series is that it has a different code path
for sandbox, since it does not support the relocating jump. It should be
possible to resolve this with additional work, but I have not attempted
this so far.
For v2, I have split the first patch into 5 pieces, to make it easier to
see the code-size impact, plus added a few tweaks to reduce code size.
Again, only MMC is supported so far.
Looking ahead, series G will have some more plumbing and H some rk3399
pieces. That should be enough to complete these feature.
Here is a run in my lab, with the VBE ABrec bootmeth. You can see that
VPL runs before memory is set up. SPL sets up memory and can be upgraded
in the field reliably.
$ ub-int vbe
Building U-Boot in sourcedir for rk3399-generic
Bootstrapping U-Boot from dir /tmp/b/rk3399-generic
Writing U-Boot using method rockchip
U-Boot TPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Using 'config-3' configuration
Trying 'image-vpl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
U-Boot VPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Starting with empty state
VBE: Firmware pick A at 800000
Using 'config-3' configuration
Trying 'spl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
Channel 0: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
U-Boot SPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
VBE: Firmware pick A at 900000
load_simple_fit: Skip load 'atf-5': image size is 0!
Relocating bloblist
ff8eff00 to 100000: done
ns16550_serial serial@
ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM: 4 GiB (effective 3.9 GiB)
Core: 314 devices, 33 uclasses, devicetree: separate
MMC: mmc@
fe310000: 3, mmc@
fe320000: 1, mmc@
fe330000: 0
Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
In: serial,usbkbd
Out: serial,vidconsole
Err: serial,vidconsole
Model: Firefly-RK3399 Board
Net: PMIC: RK808
eth0: ethernet@
fe300000
starting USB...
Bus usb@
fe380000: USB EHCI 1.00
Bus usb@
fe3a0000: USB OHCI 1.0
Bus usb@
fe3c0000: USB EHCI 1.00
Bus usb@
fe3e0000: USB OHCI 1.0
Bus usb@
fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@
fe380000 for devices... 1 USB Device(s) found
scanning bus usb@
fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@
fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@
fe3e0000 for devices... 1 USB Device(s) found
scanning bus usb@
fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
Link: https://lore.kernel.org/r/20250116012723.2820301-1-sjg@chromium.org
Chanho Park [Wed, 15 Jan 2025 15:31:48 +0000 (00:31 +0900)]
vexpress64: Fix bootargs when building without NET
When building without DHCP/PXE configurations (NET disabled),
compilation errors may occur due to mismatched bootargs.
Ensure bootargs related to DHCP/PXE are not enabled if the
corresponding commands are disabled.
include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before
‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’
443 | BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Chanho Park <parkch98@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Ronald Wahl [Wed, 11 Dec 2024 20:51:04 +0000 (21:51 +0100)]
spi: cadence-quadspi: fix potential malfunction after ~49 days uptime
The get_timer function returns an unsigned long which may be calculated
from the ARM system counter. This counter is reset only on a cold reset.
U-boot divides this counter down to a 1000 Hz counter that will cross
the 32bit barrier after a bit more than 49 days. Assigning the value to
an unsigned int will truncate it on 64bit systems.
Passing this truncated value back to the get_timer function will return
a very large value that is certainly larger than the timeout and so will
go down the error path and besides stopping U-Boot will lead to messages
like
"SPI: QSPI is still busy after poll for 5000 ms."
Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Caleb Connolly [Wed, 22 Jan 2025 16:08:50 +0000 (17:08 +0100)]
MAINTAINERS: maintain qcs9100_defconfig
Add this to ARM SNAPDRAGON maintainers entry.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/u-boot/20250122160951.1861910-1-caleb.connolly@linaro.org
Alexander Dahl [Wed, 15 Jan 2025 16:16:21 +0000 (17:16 +0100)]
Revert "mem: spi-mem: add declaration for spi_mem_default_supports_op"
We have a duplicate declaration of spi_mem_default_supports_op() which
was added twice, first with commit
af6266c1c27a ("mem: spi-mem: add
declaration for spi_mem_default_supports_op") for v2021.04, and again
with commit
2299076e34f8 ("spi: spi-mem: export
spi_mem_default_supports_op()") for v2021.07.
The first commit is reverted here, because the second better matches the
definition and has a better place in the declaration order.
Note: Linux declares this in a different section of spi-mem.h which is
disabled in U-Boot through `#ifndef __UBOOT__`.
This reverts commit
af6266c1c27add8beac7f3365c00b3525a9012c4.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Alexander Dahl [Wed, 15 Jan 2025 16:16:20 +0000 (17:16 +0100)]
spi: atmel: Really drop atmel_spi.h
First try dropping this was with commit
37434db29be4 ("spi: atmel: Drop
atmel_spi.h") back in 2018 which was reverted not much later with commit
5270df283676 ("Revert "spi: atmel: Drop atmel_spi.h"").
Second try dropping this was in 2020 with commit
beeb34ac0cc6 ("spi:
atmel: Drop atmel_spi.h"), but that only moved all the definitions into
the source file and did not remove the header file.
Currently all of the definitions in the header file are (still)
contained in the source file, and the header file is include nowhere.
Fixes:
beeb34ac0cc6 ("spi: atmel: Drop atmel_spi.h")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Christopher Obbard [Wed, 15 Jan 2025 10:32:59 +0000 (10:32 +0000)]
board: rockpi4-rk3399: update email address for Christopher Obbard
Update my email address.
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Christopher Obbard [Wed, 15 Jan 2025 10:32:58 +0000 (10:32 +0000)]
.mailmap: update email address for Christopher Obbard
Update my email address.
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Simon Glass [Thu, 16 Jan 2025 01:27:23 +0000 (18:27 -0700)]
vbe: Update simple-fw to support using the SPL loader
For a sandbox implementation, where code size is no object, it makes sense
to use the full bootstd drivers to load images.
For real boards, running from SRAM, this adds quite a bit of overhead.
Add a way to load the next phase using just the underlying storage
driver, to reduce code size. For now, only MMC is supported.
Change the log_debug() to show the load address and size in a more
neutral way, rather than suggesting that the load has already happened.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:22 +0000 (18:27 -0700)]
vbe: Support loading SPL images
VBE needs to load different images from a FIT depending on the xPL phase
in use. The IH_PHASE value is used to select the image to load.
Add the required logic to handle this. For compatibility with the
SPL-loader driver, fill out a struct spl_image_info with the details
needed to boot the next phase.
This is good enough for VBE-simple but ABrec will need the full set of
bootstd features. So add a USE_BOOTMETH define to control this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:21 +0000 (18:27 -0700)]
vbe: Support loading an FDT with the relocating loader
Add FDT support so that this can be copied down in memory after loading
and made available to the new image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:20 +0000 (18:27 -0700)]
spl: Plumb in the relocating loader
This is fairly easy to use. The SPL loader sets up some fields in the
spl_image_info struct and calls spl_reloc_prepare(). When SPL is ready
to do the jump it must call spl_reloc_jump() instead of jump_to_image().
Add this logic.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:19 +0000 (18:27 -0700)]
spl: Add support for a relocating jump to the next phase
When one xPL phase wants to jump to the next, the next phase must be
loaded into its required address. This means that the TEXT_BASE for the
two phases must be different and there cannot be any memory overlap
between the code used by the two phases. It also can mean that phases
need to be moved around to accommodate any size growth.
Having two xPL phases in SRAM at the same time can be tricky if SRAM
is limited, which it often is. It would be better if the second phase
could be loaded somewhere else, then decompressed into place over the
top of the first phase.
Introduce a relocating jump for xPL to support this. This selects a
suitable place to load the (typically compressed) next phase, copies
some decompression code out of the first phase, then jumps to this code
to decompress and start the next phase.
This feature makes it much easier to support Verified Boot for Embedded
(VBE) on RK3399 boards, which have 192KB of SRAM.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:18 +0000 (18:27 -0700)]
spl: Add a type for the jumper function
This function will be used by the relocating jumper too, so add a
typedef to the header file to avoid mismatches.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:17 +0000 (18:27 -0700)]
spl: Add fields for VBE
Add some fields to track the VBE state in SPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:16 +0000 (18:27 -0700)]
vbe: Support loading an FDT from the FIT
In many cases the FIT includes a devicetree. Add support for loading
this into a suitable place in memory.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:15 +0000 (18:27 -0700)]
vbe: Allow loading loadables if there is no firmware
In some cases only the 'loadable' property is present in the FIT.
Handle this by loading the first such image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:14 +0000 (18:27 -0700)]
vbe: Handle loading from an unaligned offset
There is no guarantee that an FIT image starts on a block boundary. When
it doesn't, the image starts part-way through the first block.
Add logic to detect this and copy the image down into place.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:13 +0000 (18:27 -0700)]
vbe: Tidy up error checking with blk_read()
This function can read fewer blocks than requested, so update the checks
to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:12 +0000 (18:27 -0700)]
vbe: Allow VBE to load FITs on any architecture
At present the VBE implementation is limited to sandbox only. Adjust the
call to fit_image_load() to remove this limitation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:11 +0000 (18:27 -0700)]
vbe: Allocate space for the FIT header
It is convenient to use TEXT_BASE as a place to hold the FIT header, but
this does not work in VPL, since SDRAM is not inited yet.
Allocate the memory instead. Ensure the size is aligned to the media
block-size so that it can be read in directly. Improve the
error-checking for blk_read() and add some more debugging.
Keep the existing TEXT_BASE mechanism in sandbox to avoid an
'Exec format error' when trying to run the image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:10 +0000 (18:27 -0700)]
vbe: Split out reading a FIT into the common file
Loading a FIT is useful for other VBE methods, such as ABrec. Create a
new function to handling reading it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:09 +0000 (18:27 -0700)]
vbe: Move reading the nvdata into the common file
All VBE methods read non-volatile data, so move this function into a
common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:08 +0000 (18:27 -0700)]
vbe: Move reading the version into the common file
All VBE methods read a version string, so move this function into a
common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:07 +0000 (18:27 -0700)]
vbe: Create a common function to get the block device
Add a vbe_get_blk() function and use it to obtain the block device used
by VBE.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:06 +0000 (18:27 -0700)]
vbe: Convert some checks to assertions
VBE is currently quite careful with function arguments because it is
used in VPL which cannot be updated after manufacture. Bugs can cause
security holes.
Unfortunately this adds to code size.
In several cases we are reading values from a devicetree which is part
of U-Boot (or at least VPL) and so known to be good. Also, in several
places, getting bad values does not matter.
So change a few checks to assert() to reduce code size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:05 +0000 (18:27 -0700)]
vbe: Pass simple_priv to internal functions
Pass the private data instead of the device, to help the compiler
optimise better. This saves 16 bytes of code on pinecube (rk3288)
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:04 +0000 (18:27 -0700)]
vbe: Use a block device instead of descriptor
Pass a struct udevice instead of the descriptor structure, since this is
the native argument for blk_read()
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:03 +0000 (18:27 -0700)]
vbe: Start a common header file
Move a few things into a new, common header file so that vbe-simple can
share code with the upcoming abrec.
Put struct simple_nvdata in it and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:02 +0000 (18:27 -0700)]
vbe: Use blk_read() to read blocks
We should not be using the old blk_d...() interface, is only there to
aid migration to driver model.
Move to blk_read() instead.
Changes in v2:
- Split patch into several pieces
Signed-off-by: Simon Glass <sjg@chromium.org>
Sam Day [Wed, 22 Jan 2025 10:26:59 +0000 (10:26 +0000)]
mach-snapdragon: pass fdt to qcom_parse_memory
commit
fc37a73e6679 ("fdt: Swap the signature for
board_fdt_blob_setup()") introduced a subtle change to the Snapdragon
implementation, removing the assignment to gd->fdt_blob partway through
the function.
This breaks qcom_parse_memory() which was also called during
board_fdt_blob_setup().
The underlying issue here is that qcom_parse_memory is using the of_ api
to traverse a devicetree, which relies on the fdt_blob in global data.
Rather than relying on this subtle behaviour, explicitly pass the FDT
that should be consulted for a /memory node.
Using the OF API is typically preferable because it's easier to read,
but using the lower level fdt_ methods instead here doesn't add too much
complexity, I think.
Finally, a minor tweak was made to board_fdt_blob_setup to use the
passed fdt blob pointer instead of gd->fdt_blob, which removes the last
of the references to global data in this area.
Fixes:
fc37a73e6679 (fdt: Swap the signature for board_fdt_blob_setup())
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Sam Day <me@samcday.com>
Link: https://lore.kernel.org/r/20250122-qcom-parse-memory-updates-v2-1-98dfcac821d7@samcday.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
J. Neuschäfer [Wed, 11 Dec 2024 22:25:27 +0000 (23:25 +0100)]
cmd: ufetch: Show CPU architecture under "CPU"
When looking at ufetch output it isn't immediately obvious which CPU
architecture the presented board has. This patch therefore adds the
CPU architecture string (for example "powerpc") to the "CPU:" line.
The new format is:
CPU: powerpc (1 cores, 1 in use)
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241211-ufetch-v2-3-2b5432ffaeb1@posteo.net
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
J. Neuschäfer [Wed, 11 Dec 2024 22:25:26 +0000 (23:25 +0100)]
cmd: Allow building ufetch without CONFIG_BLK
The ufetch command is still quite useful on systems without block
device support; remove the CONFIG_BLK dependency and make sure the code
compiles/works with and without CONFIG_BLK.
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://lore.kernel.org/r/20241211-ufetch-v2-2-2b5432ffaeb1@posteo.net
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
J. Neuschäfer [Wed, 11 Dec 2024 22:25:25 +0000 (23:25 +0100)]
cmd: ufetch: Fix type mismatch on 32-bit
On 32-bit architectures, LAST_LINE (_LAST_LINE - 1UL) is 64 bits long,
but size_t (from ARRAY_SIZE(...)) is 32 bits. This results in a warning
because the max() macro expects the same type on both sides:
cmd/ufetch.c: In function ‘do_ufetch’:
include/linux/kernel.h:179:24: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
179 | (void) (&_max1 == &_max2); \
| ^~
cmd/ufetch.c:92:25: note: in expansion of macro ‘max’
92 | int num_lines = max(LAST_LINE + 1, ARRAY_SIZE(logo_lines));
| ^~~
Fix this by casting LAST_LINE to size_t.
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://lore.kernel.org/r/20241211-ufetch-v2-1-2b5432ffaeb1@posteo.net
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:54:24 +0000 (09:54 +0100)]
phy: qcom: add QMP PCIe PHY driver
Add support for the PCIe QMP PHY on the SM8550,
SM8650 and x1e80100 SoCs.
The driver is based on the Linux phy/qualcomm/phy-qcom-qmp-pcie.c
driver and adapted to U-Boot.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-phy-v1-1-bf08811d0a07@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 09:46:17 +0000 (10:46 +0100)]
pci: Add support for Qualcomm PCIe controller
Add support for the PCIe busses on Qualcomm platforms,
by using the pcie_dw_common infrastructure.
The driver is based on the Linux driver but only supporting
the "1_9_0" and compatible platforms like:
- sa8540p
- sc7280
- sc8180x
- sc8280xp
- sdm845
- sdx55
- sm8150
- sm8250
- sm8350
- sm8450
- sm8550
- sm8650
- x1e80100
But it has only been tested on:
- sc7280
- sm8550
- sm8650
- x1e80100
It supports setting the IOMMU SID table for supported platforms.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-controller-v1-2-45c20070dd53@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 09:46:16 +0000 (10:46 +0100)]
pci: pcie_dw_common: introduce pcie_dw_find_capability()
Add PCIe config space capability search function specific for
the host controller, which are bridges *to* PCI devices but
are not PCI devices themselves.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-controller-v1-1-45c20070dd53@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 17:12:57 +0000 (18:12 +0100)]
configs: qcom_defconfig: enable RNG driver and command
Enable the MSM RNG driver by default with the associated
command, this will fill KASLR seed when booting Linux.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-sm8x50-rng-v1-2-52b72821c3e9@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 17:12:56 +0000 (18:12 +0100)]
rng: msm: add support for newer Qualcomm hwrandom IPs
On recent Qualcomm SoCs, the hardware random generator
is initialized and handled by the firmware because shared
between different Execution Environments (EE), thus the
initialization step should be skipped.
Also support the newer "TRNG" found on SM8550 and newer
SoCs that has inbuilt NIST SP800 90B compliant entropic source.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Link: https://lore.kernel.org/r/20241125-topic-sm8x50-rng-v1-1-52b72821c3e9@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:34:29 +0000 (09:34 +0100)]
clk: qcom: x1e80100: add support for PCIe clocks
Add the PCIe clocks for the x1e80100 GCC.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-clk-v1-4-4315d1e4e164@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:34:28 +0000 (09:34 +0100)]
clk: qcom: sm8650: add support for PCIe clocks
Add the PCIe clocks for the SM8650 GCC.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-clk-v1-3-4315d1e4e164@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:34:27 +0000 (09:34 +0100)]
clk: qcom: sm8550: add support for PCIe clocks
Add the PCIe clocks for the SM8550 GCC.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-clk-v1-2-4315d1e4e164@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:34:26 +0000 (09:34 +0100)]
clk: qcom: add clk_phy_mux_enable() for PCIe PIPE clock
The PCIe PIPE clock requires a special setup function to
mux & enable the clock from the PCIe PHY before the PHY
has enabled the clock.
Import the clk_phy_mux_enable() from the Linux driver to
use the same implementation regarding the PIPE clock.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-clk-v1-1-4315d1e4e164@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:24:47 +0000 (09:24 +0100)]
regulator: qcom-rpmh-regulator: add support for pmc8380 regulators
Add the PMC8380 regulator data found on the Snapdragon X Elite platforms.
The tables are imported from the Linux driver.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Link: https://lore.kernel.org/r/20241125-topic-hamoa-pmc8380-rpmh-regulators-v1-1-695c44ea8586@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:29:12 +0000 (09:29 +0100)]
pinctrl: qcom: x1e80100: add pcie[3456ab]_clk functions
Add the missing PCIe clk_req function for the x1e80100 TLMM.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-pinctrl-v1-3-4df323d90397@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:29:11 +0000 (09:29 +0100)]
pinctrl: qcom: sm8650: add pcie[01]_clk_req_n function
Add the missing PCIe clk_req functions for the SM8650 TLMM.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-pinctrl-v1-2-4df323d90397@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 25 Nov 2024 08:29:10 +0000 (09:29 +0100)]
pinctrl: qcom: sm8550: add pcie1_clk_req_n function
Add the missing PCIe clk_req function for the SM8550 TLMM.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241125-topic-pcie-pinctrl-v1-1-4df323d90397@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Wed, 13 Nov 2024 04:51:03 +0000 (05:51 +0100)]
button: qcom-pmic: add software debounce
This helps with reliability on some platforms. We should probably also
configure the hardware debounce timer eventually.
Link: https://lore.kernel.org/r/20241113045109.1838241-1-caleb.connolly@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 15 Nov 2024 15:44:16 +0000 (16:44 +0100)]
qcom_defconfig: enable X1E80100 pinctrl driver
Enable the X1E80100 pinctrl driver in the Qualcomm defconfig.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # Yoga Slim 7x
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241115-topic-x1e80100-pinctrl-v1-2-35f984226e47@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 15 Nov 2024 15:44:15 +0000 (16:44 +0100)]
pinctrl: qcom: Add X1E80100 pinctrl driver
Add pinctrl driver for the TLMM block found in the X1E80100 SoC.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # Yoga Slim 7x
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20241115-topic-x1e80100-pinctrl-v1-1-35f984226e47@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 18 Nov 2024 14:42:01 +0000 (15:42 +0100)]
qcom_defconfig: enable X1E80100 clock driver
Enable the X1E80100 clock driver in the Qualcomm defconfig.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241118-topic-x1e80100-clk-v1-2-8841e87ad81f@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Mon, 18 Nov 2024 14:42:00 +0000 (15:42 +0100)]
clk: qcom: Add X1E80100 clock driver
Add Clock driver for the GCC block found in the X1E80100 SoC.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # Yoga Slim 7x
Link: https://lore.kernel.org/r/20241118-topic-x1e80100-clk-v1-1-8841e87ad81f@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Fri, 10 Jan 2025 05:08:17 +0000 (10:38 +0530)]
configs: add qcs9100_defconfig
Introduce a defconfig for the Ride R3 and other QCS9100 boards with a
dedicated uefi partition. These can replace EDK2 entirely with U-Boot.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/20250110050817.3819282-7-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Fri, 10 Jan 2025 05:08:16 +0000 (10:38 +0530)]
qcom_defconfig: enable SA8775P clock driver
Enable the SA8775P clock driver in the Qualcomm defconfig.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20250110050817.3819282-6-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Fri, 10 Jan 2025 05:08:15 +0000 (10:38 +0530)]
phy: qcom: Add SA8775 to QMP UFS PHY driver
Copy PHY tables over from Linux to support SA8775.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v6.13-rc6
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20250110050817.3819282-5-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Fri, 10 Jan 2025 05:08:14 +0000 (10:38 +0530)]
clk/qcom: add initial clock driver for qcs9100
Add initial set of clocks and resets for enabling U-Boot on QCS9100
based Ride platforms.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20250110050817.3819282-4-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Fri, 10 Jan 2025 05:08:13 +0000 (10:38 +0530)]
dts: qcs9100-ride-r3-u-boot: add override dtsi
Add initial support for the QCS9100 (derived from SA8775p) Ride platforms.
Define memory layout statically.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20250110050817.3819282-3-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Tengfei Fan [Fri, 10 Jan 2025 05:08:12 +0000 (10:38 +0530)]
arm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards
Add device tree support for the QCS9100 Ride and Ride Rev3 boards. The
QCS9100 is a variant of the SA8775p, and they are fully compatible with
each other. The QCS9100 Ride/Ride Rev3 board is essentially the same as
the SA8775p Ride/Ride Rev3 board, with the QCS9100 SoC mounted instead
of the SA8775p.
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
Link: https://lore.kernel.org/r/20240911-add_qcs9100_support-v2-4-e43a71ceb017@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
[ upstream commit:
7dcc1dfaa3d1cd3aafed2beb7086ed34fdb22303 ]
(cherry picked from commit
db6231faa8ef46e5ff5d5ece0c930a07c6358562)
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/20250110050817.3819282-2-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Patrice Chotard [Tue, 14 Jan 2025 13:28:14 +0000 (14:28 +0100)]
cyclic: Fix typo in struct cyclic_info description
Replace delay_ns by delay_us which is the field name used into
struct cyclic_info.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Patrice Chotard [Tue, 14 Jan 2025 13:28:13 +0000 (14:28 +0100)]
cyclic: Fix rollover every 72 min on 32 bits platforms
On 32 bits platforms, timer_get_us() returns an unsigned long which
is a 32 bits. timer_get_us() wraps around every 72 minutes
(2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min).
So the test "if time_after_eq64(now, cyclic->next_call)" is no more
true when cyclic->next_call becomes above 32 bits max value (
4294967295).
At this point after 72 min, no more cyclic function are
executed included watchdog one.
Instead of using timer_get_us(), use get_timer_us() which returns a
uint64_t, this allows a rollover every 584942 years.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tom Rini [Tue, 21 Jan 2025 15:28:47 +0000 (09:28 -0600)]
Merge patch series "MediaTek MT7629 OF_UPSTREAM migration (v2)"
Weijie Gao <weijie.gao@mediatek.com> says:
This patch series migrates MediaTek MT7629 to OF_UPSTREAM
Changes in v2:
* Remove mt7629-rfb.dtb from arch/arm/dts/Makefile
* Add wdt-reboot node to make reset command work
Link: https://lore.kernel.org/r/cover.1736851116.git.weijie.gao@mediatek.com