]> Git Repo - J-u-boot.git/log
J-u-boot.git
8 days agosunxi: switch Allwinner A10 boards to OF_UPSTREAM
Andre Przywara [Wed, 8 Jan 2025 00:17:55 +0000 (00:17 +0000)]
sunxi: switch Allwinner A10 boards to OF_UPSTREAM

In contrast to some other Allwinner SoCs, there is no difference between
the DTs for the Allwinner A10 SoCs (sun4i) between the U-Boot and the
Linux kernel repository.

Remove the old copies of the A10 related .dts and .dtsi files, and switch
most of sun4i boards over to use OF_UPSTREAM.

There are two boards for which we don't have DTs in the kernel tree.
Keep those two .dts files in the legacy U-Boot DT directory, and let
their defconfig opt out of OF_UPSTREAM.

Signed-off-by: Andre Przywara <[email protected]>
Acked-by: Sumit Garg <[email protected]>
8 days agosuniv: switch Allwinner F1Cx00 boards to OF_UPSTREAM
Andre Przywara [Tue, 7 Jan 2025 22:49:56 +0000 (22:49 +0000)]
suniv: switch Allwinner F1Cx00 boards to OF_UPSTREAM

In contrast to some other Allwinner SoCs, there is no difference between
the DTs for the Allwinner F1C100/F1C200 SoCs (sunvi) between the U-Boot
and the Linux kernel repository.

Remove the old copies of the F1Cx00 related .dts and .dtsi files, and
switch the whole suniv SoC over to use OF_UPSTREAM.

Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Jernej Skrabec <[email protected]>
8 days agosunxi: pinephone: detect existed magnetometer and fixup dtb
Andrey Skvortsov [Wed, 13 Nov 2024 22:28:48 +0000 (01:28 +0300)]
sunxi: pinephone: detect existed magnetometer and fixup dtb

In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by
AF8133J. They use the same PB1 pin in different modes.

LIS3MDL uses it as an gpio input to handle interrupt.
AF8133J uses it as an gpio output as a reset signal.

It wasn't possible at runtime to enable both device tree
nodes and detect supported sensor at probe time.

AF8133J has reset pin (PB1) connected to the SoC. By default AF8133J
is in a reset state and don't respond to probe request on I2C
bus. Extra code would be needed to handle reset signal. Therefore this
code uses LIS3MDL magnetometer instead of AF8133J.

Introducing new dts 1.2b with AF8133J sensor would require probing in
SPL. That would lead to pulling in into SPL I2C controller driver,
RSB controller driver, introducing new AXP803 driver to power-up
sensors for probe. It's working, but SPL is pretty size-constrained on
A64 and doesn't have much space. Therefore fdt fixup is done in U-Boot
proper without introducing new board revision and new dts.

Signed-off-by: Andrey Skvortsov <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lists.denx.de/pipermail/u-boot/2024-February/545700.html
Reviewed-by: Andre Przywara <[email protected]>
[Andre: fix formatting]
Signed-off-by: Andre Przywara <[email protected]>
8 days agosunxi: defconfig: Add pstore support for pinephone
Andrey Skvortsov [Wed, 6 Nov 2024 07:49:47 +0000 (10:49 +0300)]
sunxi: defconfig: Add pstore support for pinephone

pstore will allow users to catch kernel crashes and report them to
developers. Modern (Android) phones have pstore usually enabled to get
information about kernel crash, since it's the simplest way to get
kernel backtrace on mobile device without serial console. Usually it's
enabled by default in distribution kernels like Debian.

CONFIG_PSTORE=y
CONFIG_PSTORE_RAM=m

systemd has service that automatically handles pstore and saves them
in /var/lib/pstore for later usage.

In general any DRAM address, that isn't overwritten during a boot is
suitable for pstore.

Range from 0x40000000 - 0x50000000 is heavily used by u-boot for
internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk
later in the boot process. Ramdisk start address is 0x4FF00000,
initramfs for kernel with some hacking features and debug info enabled
can take more than 100Mb and final address will be around 0x58000000.
Address 0x61000000 will most likely not overlap with that.

Signed-off-by: Andrey Skvortsov <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
8 days agopower: pmic: sunxi: guard DCDC5 separately
Andre Przywara [Sun, 15 Dec 2024 00:22:48 +0000 (00:22 +0000)]
power: pmic: sunxi: guard DCDC5 separately

So far all sunxi boards programming the DCDC1 power rail on the AXP PMIC
also set the DCDC5 rail, so we could handle both with the same DCDC1
guard.
Some boards using the AXP313 will need to set DCDC1 now as well, and
since the AXP313 only has three buck converters, there will be no DCDC5,
so this trick is not going to work anymore.

Don't try to be too clever, and just protect programming the two DCDC
rails with two separate guards.

This has the interesting side effect of fixing operation on A80 boards,
using the AXP809 PMIC. Apparently programming DCDC5 right after DCDC1,
but before the other three rails caused some glitch, which made the board
hang during Linux boot, during the PSCI handler in U-Boot. Just keeping
the old setup order (DCDC1,2,3,4,5) will make those boards boot to the
Linux prompt again.

Fixes: ffb02942fab024d4a9b6a ("sunxi: board: simplify early PMIC setup conditions")
Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Chen-Yu Tsai <[email protected]>
8 days agosunxi: H616: DRAM: rename Kconfig parameters to be more generic
Andre Przywara [Mon, 21 Oct 2024 11:47:28 +0000 (12:47 +0100)]
sunxi: H616: DRAM: rename Kconfig parameters to be more generic

The H616 DRAM controller requires some board specific parameters, which
we declare in Kconfig, let each board specify in their defconfig, and
then use in the DRAM init code.

Other DRAM controllers now require a very similar, if not identical
parameter set, with so far the same parameter names used.

To help keep the Kconfig file at bay, rename the existing parameter
names to drop the H616_ part in there, to make them more naturally
reusable for other SoCs.

No functional change, just a rename.

Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Jernej Skrabec <[email protected]>
8 days agosunxi: clock: improve grouping of default clock register values
Andre Przywara [Sun, 5 Nov 2023 11:01:42 +0000 (11:01 +0000)]
sunxi: clock: improve grouping of default clock register values

With each new SoC added to the clock_sun50i_h6.h header file, we add a
list of default values for the bus clock registers. This list gets a bit
hard to read, as the spacing between the lines looks confusing.

Tighten the lines by removing empty lines, to make it more obvious which
values belong together. Also remove those comments that were more or
less duplicating the next code line, and didn't add any information.

This makes it easier to find existing values and to add support for new
SoCs.

Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Jernej Skrabec <[email protected]>
8 days agoMerge https://source.denx.de/u-boot/custodians/u-boot-snapdragon
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

8 days agoMerge patch series "spi: Collected fixes"
Tom Rini [Wed, 22 Jan 2025 15:52:38 +0000 (09:52 -0600)]
Merge patch series "spi: Collected fixes"

Alexander Dahl <[email protected]> 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/[email protected]
8 days agoMerge patch series "Update my email address"
Tom Rini [Wed, 22 Jan 2025 15:51:45 +0000 (09:51 -0600)]
Merge patch series "Update my email address"

Christopher Obbard <[email protected]> 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/[email protected]
8 days agoMerge https://source.denx.de/u-boot/custodians/u-boot-watchdog
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)

8 days agoMerge patch series "vbe: Series part F"
Tom Rini [Wed, 22 Jan 2025 15:48:24 +0000 (09:48 -0600)]
Merge patch series "vbe: Series part F"

Simon Glass <[email protected]> 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/[email protected]
8 days agovexpress64: Fix bootargs when building without NET
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 <[email protected]>
Acked-by: Linus Walleij <[email protected]>
8 days agospi: cadence-quadspi: fix potential malfunction after ~49 days uptime
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 <[email protected]>
Cc: Vignesh R <[email protected]>
Cc: Pratyush Yadav <[email protected]>
Reviewed-by: Vignesh Raghavendra <[email protected]>
8 days agoMAINTAINERS: maintain qcs9100_defconfig
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 <[email protected]>
Link: https://lore.kernel.org/u-boot/[email protected]
8 days agoRevert "mem: spi-mem: add declaration for spi_mem_default_supports_op"
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 <[email protected]>
8 days agospi: atmel: Really drop atmel_spi.h
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 <[email protected]>
8 days agoboard: rockpi4-rk3399: update email address for Christopher Obbard
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 <[email protected]>
8 days ago.mailmap: update email address for Christopher Obbard
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 <[email protected]>
8 days agovbe: Update simple-fw to support using the SPL loader
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 <[email protected]>
8 days agovbe: Support loading SPL images
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 <[email protected]>
8 days agovbe: Support loading an FDT with the relocating loader
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 <[email protected]>
8 days agospl: Plumb in the relocating loader
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 <[email protected]>
8 days agospl: Add support for a relocating jump to the next phase
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 <[email protected]>
8 days agospl: Add a type for the jumper function
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 <[email protected]>
8 days agospl: Add fields for VBE
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 <[email protected]>
8 days agovbe: Support loading an FDT from the FIT
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 <[email protected]>
8 days agovbe: Allow loading loadables if there is no firmware
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 <[email protected]>
8 days agovbe: Handle loading from an unaligned offset
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 <[email protected]>
8 days agovbe: Tidy up error checking with blk_read()
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 <[email protected]>
8 days agovbe: Allow VBE to load FITs on any architecture
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 <[email protected]>
8 days agovbe: Allocate space for the FIT header
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 <[email protected]>
8 days agovbe: Split out reading a FIT into the common file
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 <[email protected]>
8 days agovbe: Move reading the nvdata into the common file
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 <[email protected]>
8 days agovbe: Move reading the version into the common file
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 <[email protected]>
8 days agovbe: Create a common function to get the block device
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 <[email protected]>
8 days agovbe: Convert some checks to assertions
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 <[email protected]>
8 days agovbe: Pass simple_priv to internal functions
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 <[email protected]>
8 days agovbe: Use a block device instead of descriptor
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 <[email protected]>
8 days agovbe: Start a common header file
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 <[email protected]>
8 days agovbe: Use blk_read() to read blocks
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 <[email protected]>
8 days agomach-snapdragon: pass fdt to qcom_parse_memory
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 <[email protected]>
Signed-off-by: Sam Day <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agocmd: ufetch: Show CPU architecture under "CPU"
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 <[email protected]>
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agocmd: Allow building ufetch without CONFIG_BLK
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 <[email protected]>
Signed-off-by: J. Neuschäfer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agocmd: ufetch: Fix type mismatch on 32-bit
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 <[email protected]>
Signed-off-by: J. Neuschäfer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agophy: qcom: add QMP PCIe PHY driver
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopci: Add support for Qualcomm PCIe controller
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopci: pcie_dw_common: introduce pcie_dw_find_capability()
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoconfigs: qcom_defconfig: enable RNG driver and command
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agorng: msm: add support for newer Qualcomm hwrandom IPs
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 <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk: qcom: x1e80100: add support for PCIe clocks
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk: qcom: sm8650: add support for PCIe clocks
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk: qcom: sm8550: add support for PCIe clocks
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk: qcom: add clk_phy_mux_enable() for PCIe PIPE clock
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoregulator: qcom-rpmh-regulator: add support for pmc8380 regulators
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 <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
Link: https://lore.kernel.org/r/20241125-topic-hamoa-pmc8380-rpmh-regulators-v1-1-695c44ea8586@linaro.org
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopinctrl: qcom: x1e80100: add pcie[3456ab]_clk functions
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 <[email protected]>
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopinctrl: qcom: sm8650: add pcie[01]_clk_req_n function
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 <[email protected]>
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopinctrl: qcom: sm8550: add pcie1_clk_req_n function
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 <[email protected]>
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agobutton: qcom-pmic: add software debounce
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/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoqcom_defconfig: enable X1E80100 pinctrl driver
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 <[email protected]>
Tested-by: Caleb Connolly <[email protected]> # Yoga Slim 7x
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agopinctrl: qcom: Add X1E80100 pinctrl driver
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 <[email protected]>
Tested-by: Caleb Connolly <[email protected]> # Yoga Slim 7x
Reviewed-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoqcom_defconfig: enable X1E80100 clock driver
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk: qcom: Add X1E80100 clock driver
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 <[email protected]>
Reviewed-by: Caleb Connolly <[email protected]>
Tested-by: Caleb Connolly <[email protected]> # Yoga Slim 7x
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoconfigs: add qcs9100_defconfig
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 <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoqcom_defconfig: enable SA8775P clock driver
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 <[email protected]>
Signed-off-by: Varadarajan Narayanan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agophy: qcom: Add SA8775 to QMP UFS PHY driver
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 <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Varadarajan Narayanan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoclk/qcom: add initial clock driver for qcs9100
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 <[email protected]>
Signed-off-by: Varadarajan Narayanan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agodts: qcs9100-ride-r3-u-boot: add override dtsi
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
8 days agoarm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards
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 <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
[ upstream commit: 7dcc1dfaa3d1cd3aafed2beb7086ed34fdb22303 ]

(cherry picked from commit db6231faa8ef46e5ff5d5ece0c930a07c6358562)

Reviewed-by: Sumit Garg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Caleb Connolly <[email protected]>
9 days agocyclic: Fix typo in struct cyclic_info description
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 <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
9 days agocyclic: Fix rollover every 72 min on 32 bits platforms
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 <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
9 days agoMerge patch series "MediaTek MT7629 OF_UPSTREAM migration (v2)"
Tom Rini [Tue, 21 Jan 2025 15:28:47 +0000 (09:28 -0600)]
Merge patch series "MediaTek MT7629 OF_UPSTREAM migration (v2)"

Weijie Gao <[email protected]> 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/[email protected]
9 days agoMerge patch series "Broadcom bcmbca dts updates"
Tom Rini [Tue, 21 Jan 2025 15:28:10 +0000 (09:28 -0600)]
Merge patch series "Broadcom bcmbca dts updates"

david regan <[email protected]> says:

Updates for Broadcom bcmbca devices,
make use of OF_UPSTREAM which uses Linux dts,
update bcmbca dts to current nand node naming convention,
enable basic nand functionality for bcmbca devices.

Link: https://lore.kernel.org/r/[email protected]
9 days agosbp1: Add support for IBM SBP1 board
Patrick Rudolph [Tue, 14 Jan 2025 05:31:53 +0000 (11:01 +0530)]
sbp1: Add support for IBM SBP1 board

Add defconfig & devicetree for IBM SBP1 board BMC based on AST2600 SoC.

Signed-off-by: Patrick Rudolph <[email protected]>
Signed-off-by: Naresh Solanki <[email protected]>
9 days agoboard: mediatek: mt7629: Migrate to OF_UPSTREAM
Sam Shih [Tue, 14 Jan 2025 10:43:00 +0000 (18:43 +0800)]
board: mediatek: mt7629: Migrate to OF_UPSTREAM

Move differences in DT files between upstream Linux DT and U-Boot DT to
mt7629-rfb-u-boot.dtsi.
Remove old copies of mt7629-related clock bindings, .dts, and .dtsi files.
Update defconfig to switch the whole mt7629 SoC to use OF_UPSTREAM.

Signed-off-by: Sam Shih <[email protected]>
Signed-off-by: Weijie Gao <[email protected]>
9 days agoclk: mediatek: mt7629: fix gate offset of peri clock tree
Sam Shih [Tue, 14 Jan 2025 10:42:55 +0000 (18:42 +0800)]
clk: mediatek: mt7629: fix gate offset of peri clock tree

The clock definitions in mt7629-clk.h indicate that CLK_PERIBUS_SEL is the
first element in the pericfg clock tree and also serves as a clock mux,
unlike other clocks belonging to the clock gate in pericfg.

This make the clock consumer get a wrong clock gate during request a clock
from <&pericfg>.

Since CLK_PERIBUS_SEL clock is not required in U-Boot, add a clock gate
offset for the pericfg clock tree to resolve this problem.

Signed-off-by: Sam Shih <[email protected]>
Signed-off-by: Weijie Gao <[email protected]>
9 days agoarm: dts: Enable basic nand functionality for bcmbca devices
david regan [Tue, 14 Jan 2025 04:54:25 +0000 (20:54 -0800)]
arm: dts: Enable basic nand functionality for bcmbca devices

Enable rudimentary nand read/write capability.

Changes in v2:
- New patch in series added enabling of nand functionality

Signed-off-by: david regan <[email protected]>
Reviewed-by: William Zhang <[email protected]>
Reviewed-by: Anand Gore <[email protected]>
9 days agoarm: dts: Update nand node for bcmbca board dts
david regan [Tue, 14 Jan 2025 04:54:24 +0000 (20:54 -0800)]
arm: dts: Update nand node for bcmbca board dts

Update bcmbca dts to current nand node naming convention.

Changes in v2:
- Removed addition of nand-on-flash-bbt parameter

Signed-off-by: david regan <[email protected]>
Reviewed-by: William Zhang <[email protected]>
Reviewed-by: Anand Gore <[email protected]>
9 days agoarm: dts: Use upstream dts for additional bcmbca devices
david regan [Tue, 14 Jan 2025 04:54:23 +0000 (20:54 -0800)]
arm: dts: Use upstream dts for additional bcmbca devices

Make use of OF_UPSTREAM which uses Linux dts.

Changes in v2:
- Removed enabling of nand functionality

Signed-off-by: david degan <[email protected]>
Reviewed-by: William Zhang <[email protected]>
Reviewed-by: Anand Gore <[email protected]>
9 days agoconfigs: am62x_evm_*: Set DFU buffer size to 256k
Jonathan Humphreys [Fri, 20 Dec 2024 21:53:34 +0000 (15:53 -0600)]
configs: am62x_evm_*: Set DFU buffer size to 256k

OSPI flash writing was broken on am62x SKs as the OSPI flash device has a
256k sector size but was set to 20k. This breaks OSPI flash writes because
the current implementation of the SF DFU backend requires that the DFU data
buffer size be the same as the sector erase size, and the USB DFU config
fragment (for both A53 and R5) reduced the size of the DFU data buffer,
presumably so that it can fit into SPL's much smaller heap.

Change the SYS_DFU_DATA_BUF_SIZE to the erase sector size, which still fits
within the post-relocation heap size in SPL.

Fixes: dfc2dff5a844 ("configs: am62x_evm_*: Enable USB and DFU support")
Signed-off-by: Jonathan Humphreys <[email protected]>
Reviewed-by: Roger Quadros <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
9 days agoacpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y
Heinrich Schuchardt [Fri, 20 Dec 2024 00:37:59 +0000 (01:37 +0100)]
acpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y

When using the ACPI tables supplied by QEMU, we don't need to build the
FADT and MADT tables in U-Boot.

This patch avoids a build failure

    make qemu-riscv64_smode_defconfig acpi.config

    riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
    in function `acpi_write_fadt':
    lib/acpi/acpi_table.c:265:(.text.acpi_write_fadt+0x15c):
    undefined reference to `acpi_fill_fadt'

    riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
    in function `acpi_write_madt':
    lib/acpi/acpi_table.c:294:(.text.acpi_write_madt+0x52):
    undefined reference to `acpi_fill_madt'

Fixes: f5f7962091e4 ("acpi: x86: Write FADT in common code")
Fixes: 4a3fc0f525da ("acpi: x86: Move MADT to common code")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
10 days agoMerge patch series "Rework the BLK symbol usage in Kconfig"
Tom Rini [Tue, 21 Jan 2025 01:18:36 +0000 (19:18 -0600)]
Merge patch series "Rework the BLK symbol usage in Kconfig"

Tom Rini <[email protected]> says:

One problem we have today is how the BLK symbol is set and used in
Kconfig files. Part of the challenge is that we use it as a gating
symbol for "we have a block device" and also for "enable block device
library code". What this series does is move to always use "select BLK"
by block drivers (a few were and a few others had it the inverse) and
then "depends on BLK" for functionality that needs a block device
present. The end result of this series is that a number of platforms
which had disabled EFI_LOADER now don't ask for it (they have no block
device) and espresso7420 has a regression about MMC support fixed. With
v2 of this I've picked up the review tags from v1 and also reworded the
body of the commit in the first patch.

Link: https://lore.kernel.org/r/[email protected]
10 days agoblock: Remove "select BLK" from non-block drivers
Tom Rini [Wed, 15 Jan 2025 01:22:13 +0000 (19:22 -0600)]
block: Remove "select BLK" from non-block drivers

Now that block drivers are all selecting the BLK symbol, there's no need
for other options to be select'ing BLK so that other required
functionality can be enabled. Remove these places.

Reviewed-by: Peter Robinson <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agomtd: Correct dependency of BLK
Tom Rini [Wed, 15 Jan 2025 01:22:12 +0000 (19:22 -0600)]
mtd: Correct dependency of BLK

In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as
they provide block device functionality and not depending on some other
block device already being enabled too (as is the typical case).

Reviewed-by: Quentin Schulz <[email protected]>
Reviewed-by: Peter Robinson <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agoblk: Make block subsystems select BLK
Tom Rini [Wed, 15 Jan 2025 01:22:11 +0000 (19:22 -0600)]
blk: Make block subsystems select BLK

The BLK symbol has a few meanings, one of which is that it controls the
driver model portion of a "block device". Rather than having this hidden
symbol be "default y if ..." it should be select'd by the various block
subsystems. Symbols such as PVBLOCK which already select'd BLK are
unchanged".

Reviewed-by: Peter Robinson <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agoefi_loader: Depend on BLK
Tom Rini [Wed, 15 Jan 2025 01:22:10 +0000 (19:22 -0600)]
efi_loader: Depend on BLK

In reworking the BLK usage in Kconfig, I found there's a few issues with
EFI_LOADER=y and BLK=n. In general, we can easily say that
lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK.
That however leaves the bootmgr code, eficonfig code and then parts of
efi_device_path.c, efi_boottime.c and efi_setup.c which functionally
depend on BLK. While these calls can be if'd out, I'm unsure if the
result is usable. So rather than leave that buildable and imply that it
is, I'm leaving that combination non-buildable and commenting that
EFI_LOADER depends on BLK in the Kconfig currently.

Reviewed-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agodrivers/mmc/Kconfig: Make DM_MMC a hidden symbol
Tom Rini [Wed, 15 Jan 2025 01:22:09 +0000 (19:22 -0600)]
drivers/mmc/Kconfig: Make DM_MMC a hidden symbol

At this point in time, DM is always enabled. So if MMC is enabled, it
should select DM_MMC. No drivers need to depend on DM_MMC being enabled
now, so remove that from dependency lists. This now means that a number
of platforms which select'd DM_MMC need to select MMC instead. This also
fixes a migration problem with espresso7420 in that MMC is built again
with the platform.

Reviewed-by: Peter Robinson <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agodrivers/mmc/Kconfig: Remove extraneous BLK dependencies
Tom Rini [Wed, 15 Jan 2025 01:22:08 +0000 (19:22 -0600)]
drivers/mmc/Kconfig: Remove extraneous BLK dependencies

At this point in time, we know that with the MMC symbol enabled we will
always also have the BLK symbol enabled, so we do not need to list that
as a dependency for MMC drivers.

Reviewed-by: Jaehoon Chung <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
10 days agoMerge tag 'u-boot-imx-master-20250120' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 20 Jan 2025 18:08:16 +0000 (12:08 -0600)]
Merge tag 'u-boot-imx-master-20250120' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24263

- Add i.MX95 EMDIO support
- Guard binman nodes with CONFIG_OPTEE on imx8m
- Enable CAAM in phycore-imx8mp SPL.
- Fix Fix NULL dereference in imx_pinctrl_probe().

10 days agoarch: arm: mach-k3: Delete tifs node in DT fixup
Udit Kumar [Mon, 13 Jan 2025 04:25:24 +0000 (09:55 +0530)]
arch: arm: mach-k3: Delete tifs node in DT fixup

Delete tifs DT node as part of fixup.

TISCI API reported msmc_size, does not include 64KB reserved size for
tifs aka MSMC comms memory, see documentation[0].

As part of fixup, original code uses TISCI API reported msmc_size as
size for SRAM DT node.

tifs node is similar to l3-cache, which should hold address above
msmc_size, and should be deleted before passing control to OS.

[0] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html?highlight=msmc#tisci-msg-query-msmc

Reviewed-by: Neha Malcom Francis <[email protected]>
Signed-off-by: Udit Kumar <[email protected]>
10 days agoboard: ti: j722s: j722s.env: Set remoteproc firmware names
Beleswar Padhi [Wed, 8 Jan 2025 10:25:16 +0000 (15:55 +0530)]
board: ti: j722s: j722s.env: Set remoteproc firmware names

Include k3_rproc.env to access rproc boot commands and specify rproc
firmware names for adding remoteproc support in J722S SoCs.

Signed-off-by: Beleswar Padhi <[email protected]>
Reviewed-by: Bryan Brattlof <[email protected]>
10 days agoarch: arm: mach-k3: j784s4_init: Set CTRL_MMR for AUDIO_REFCLK1 clk_sel
Jayesh Choudhary [Mon, 6 Jan 2025 10:04:00 +0000 (15:34 +0530)]
arch: arm: mach-k3: j784s4_init: Set CTRL_MMR for AUDIO_REFCLK1 clk_sel

The default value for the mux to select the parent clock,
AUDIO_REFCLK1_CTRL_CLK_SEL is '11111' (31) but the mux input for 31
is marked as 'Reserved' so the ti-sci-clk call for get-parent fails.
Mark it to a valid value, '11100' (28) for MAIN_PLL4_HSDIV2_CLKOUT
to get rid of the linux failures during boot-time like:
"[    1.573193] ti-sci-clk 44083000.system-controller:clock-controller:
 get-parent failed for dev=157, clk=34, ret=-19"

Signed-off-by: Jayesh Choudhary <[email protected]>
10 days agofs: eliminate YAFFS2 implementation
Heinrich Schuchardt [Sat, 4 Jan 2025 00:34:02 +0000 (01:34 +0100)]
fs: eliminate YAFFS2 implementation

Upstream development stopped 2012.
Linux eliminated YAFFS2 in 2010.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
11 days agophycore-imx8mp: Enable CAAM in spl
Leonard Anderweit [Fri, 17 Jan 2025 13:20:13 +0000 (14:20 +0100)]
phycore-imx8mp: Enable CAAM in spl

Enable CAAM in spl.

Signed-off-by: Leonard Anderweit <[email protected]>
11 days agopinctrl: imx: Fix NULL dereference in imx_pinctrl_probe()
Jesse Taube [Fri, 17 Jan 2025 03:00:48 +0000 (22:00 -0500)]
pinctrl: imx: Fix NULL dereference in imx_pinctrl_probe()

When converting to ofnode `ofnode_read_u32` was accedentally used to
replace `fdtdec_get_int` instead of `ofnode_read_u32_default`.
Use `ofnode_read_u32_default` to fix this.

Fixes: 59382d2 ("pinctrl: imx: Convert to use livetree API for fdt access")
Signed-off-by: Jesse Taube <[email protected]>
11 days agoimx8m: Guard binman nodes with CONFIG_OPTEE
Fabio Estevam [Fri, 17 Jan 2025 01:56:42 +0000 (22:56 -0300)]
imx8m: Guard binman nodes with CONFIG_OPTEE

Guard binman nodes with CONFIG_OPTEE to fix the following error
when building without optee support:

  BINMAN  .binman_stamp
Image 'image' has faked external blobs and is non-functional: tee.bin

Image 'image' is missing optional external blobs but is still functional: tee-os

/binman/section/fit/images/tee/tee-os (tee.bin):
   See the documentation for your board. You may need to build Open Portable
   Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin

Some images are invalid
make: *** [Makefile:1135: .binman_stamp] Error 103

While at it, only pass tee to the loadables lines when CONFIG_OPTEE is
defined.

Reported-by: Tim Harvey <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Tested-by: Yannic Moog <[email protected]>
11 days agonet: fsl_enetc: Update enetc driver to support i.MX95
Alice Guo [Thu, 16 Jan 2025 04:03:30 +0000 (05:03 +0100)]
net: fsl_enetc: Update enetc driver to support i.MX95

i.MX95 uses enetc version 4.1 controller. Update the enetc for i.MX95.
Add ARM-specific cache handling and i.MX95 specific register layout
handling.

Signed-off-by: Alice Guo <[email protected]>
Signed-off-by: Marek Vasut <[email protected]> # Clean up
Signed-off-by: Ye Li <[email protected]>
Reviewed-by: Tim Harvey <[email protected]>
11 days agonet: fsl_enetc: add i.MX95 EMDIO support
Alice Guo [Thu, 16 Jan 2025 04:03:29 +0000 (05:03 +0100)]
net: fsl_enetc: add i.MX95 EMDIO support

The verdor ID and device ID of i.MX95 EMDIO are different from LS1028A
EMDIO, so add new vendor ID and device ID to pci_device_id table to
support i.MX95 EMDIO.

Signed-off-by: Alice Guo <[email protected]>
Signed-off-by: Marek Vasut <[email protected]> # Clean up
Signed-off-by: Ye Li <[email protected]>
11 days agonet: fsl_enetc: Add initial netc-blk-ctrl driver support
Marek Vasut [Thu, 16 Jan 2025 04:03:28 +0000 (05:03 +0100)]
net: fsl_enetc: Add initial netc-blk-ctrl driver support

The netc-blk-ctrl driver is used to configure Integrated Endpoint
Register Block (IERB) and Privileged Register Block (PRB) of NETC.
For i.MX platforms, it is also used to configure the NETCMIX block.

The IERB contains registers that are used for pre-boot initialization,
debug, and non-customer configuration. The PRB controls global reset
and global error handling for NETC. The NETCMIX block is mainly used
to set MII protocol and PCS protocol of the links, it also contains
settings for some other functions.

Note the IERB configuration registers can only be written after being
unlocked by PRB, otherwise, all write operations are inhibited. A warm
reset is performed when the IERB is unlocked, and it results in an FLR
to all NETC devices. Therefore, all NETC device drivers must be probed
or initialized after the warm reset is finished.

Ported from Linux 6.13-rc as of commit
fe5ba6bf91b3 ("net: enetc: add initial netc-blk-ctrl driver support")

Signed-off-by: Marek Vasut <[email protected]>
11 days agonet: fsl_enetc: Pass udevice pointer to accessors
Marek Vasut [Thu, 16 Jan 2025 04:03:27 +0000 (05:03 +0100)]
net: fsl_enetc: Pass udevice pointer to accessors

Pass struct udevice * into the register accessors, so the accessors can reach
driver data, which contain device specific register offsets.

Signed-off-by: Marek Vasut <[email protected]>
This page took 0.094353 seconds and 4 git commands to generate.