]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
6 months agoarm: move _end to linker symbols
Ilias Apalodimas [Tue, 28 May 2024 06:18:27 +0000 (09:18 +0300)]
arm: move _end to linker symbols

commit 6e2228fb052b ("Merge patch series "Clean up arm linker scripts")
was cleaning up linker scripts for armv7 and v8 but was leaving
_end and __secure_stack_start/end.

commit d0b5d9da5de2 ("arm: make _end compiler-generated")
was moving _end to be compiler generated. _end is defined as c variable
in its own section to force the compiler emit relative a reference.
However, defining those in the linker script will do the same thing
since [0].

So let's remove the special sections from the linker scripts, the
variable definitions from sections.c and define them as a symbols.
It's worth noting that _image_binary_end symbol is now redundant and
can be removed in the future.

- SPL

The .end section has been removed from the new binary
[ 5] .end
     PROGBITS         00000000fffdf488  000000000002f488  0
     0000000000000000 0000000000000000  0                 1
     [0000000000000003]: WRITE, ALLOC

$~ bloat-o-meter kria_old/spl/u-boot-spl krina_new/spl/u-boot-spl
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Function                                     old     new   delta
Total: Before=115980, After=115980, chg +0.00%

$~ readelf -sW kria_old/u-boot kria_new/u-boot | grep -w _end
 12047: 000000000813a0f0     0 OBJECT  GLOBAL DEFAULT   11 _end
 12047: 000000000813a118     0 NOTYPE  GLOBAL DEFAULT   11 _end

$~ readelf -sW kria_old/spl/u-boot-spl kria_new/spl/u-boot-spl | grep -w _end
  1605: 00000000fffdf488     0 OBJECT  GLOBAL DEFAULT    5 _end
  1603: 00000000fffdf498     0 NOTYPE  GLOBAL DEFAULT    4 _end

$~ readelf -sW old/u-boot new/u-boot | grep -w _end
  8847: 0000000000103710     0 OBJECT  GLOBAL DEFAULT   11 _end
  8847: 0000000000103738     0 NOTYPE  GLOBAL DEFAULT   11 _end

$~ readelf -sW old_v7/u-boot new_v7/u-boot | grep -w _end
 10638: 000da824     0 OBJECT  GLOBAL DEFAULT   10 _end
 10637: 000da84c     0 NOTYPE  GLOBAL DEFAULT   10 _end

- For both QEMU instances
$~ bloat-o-meter old/u-boot new/u-boot
add/remove: 0/0 grow/shrink: 1/0 up/down: 20/0 (20)
Function                                     old     new   delta
version_string                                50      70     +20
Total: Before=656915, After=656935, chg +0.00%

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agoimage: Set load_end on partial loads
Mattijs Korpershoek [Thu, 23 May 2024 09:27:09 +0000 (11:27 +0200)]
image: Set load_end on partial loads

When decompressing, it's possible that the algorithm only performs
a partial decompression.
This usually happens when CONFIG_SYS_BOOTM_LEN is too small for
the uncompressed image.

When that happens, image_decomp() returns an error and *load_end == load.
The error is then handled by handle_decomp_error().

handle_decomp_error() expects the number of uncompressed bytes in
uncomp_size but receives *load_end - load == load - load == 0.

Because of this, handle_decomp_error does not report the expected
"Image too large: increase CONFIG_SYS_BOOTM_LEN" error message.

Modify the image_decomp() logic to always report the decompressed size,
even when a partial decompression happened.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
6 months agofs: relax ext4_write_file() dependency
Baruch Siach [Wed, 15 May 2024 04:37:16 +0000 (07:37 +0300)]
fs: relax ext4_write_file() dependency

ext4_write_file() depends on CONFIG_EXT4_WRITE. Allow build without
CONFIG_CMD_EXT4_WRITE.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
6 months agodm: use newly added linux/compat alloc functions
Maxim Moskalets [Wed, 15 May 2024 20:13:30 +0000 (23:13 +0300)]
dm: use newly added linux/compat alloc functions

Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
6 months agomemory: ti-gpmc: use printf to dump settings/timings
Roger Quadros [Wed, 15 May 2024 12:20:08 +0000 (15:20 +0300)]
memory: ti-gpmc: use printf to dump settings/timings

pr_info() depends on CONFIG_LOGLEVEL > 6. If user has
enabled CONFIG_TI_GPMC_DEBUG then we should print the
GPMC settings/timings regardless of CONFIG_LOGLEVEL.

So use printf() instead of pr_info().

Signed-off-by: Roger Quadros <rogerq@kernel.org>
6 months agoarm: dts: k3-j7200: Move to OF_UPSTREAM
Aniket Limaye [Tue, 21 May 2024 05:48:42 +0000 (11:18 +0530)]
arm: dts: k3-j7200: Move to OF_UPSTREAM

Move to using OF_UPSTREAM config and thus using the devicetree-rebasing
subtree.

Signed-off-by: Aniket Limaye <a-limaye@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoinclude: extension_board: Increase overlay file name size
Daniel Schultz [Wed, 22 May 2024 07:21:00 +0000 (00:21 -0700)]
include: extension_board: Increase overlay file name size

Upstream overlays like the ARM64 TI
k3-am625-beagleplay-csi2-tevi-ov5640.dtso can easily have more then
32 characters. Increase the overlay length to 64 characters to
apply overlays with longer names.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Acked-by: Kory Maincent <kory.maincent@bootlin.com>
6 months agoMerge patch series "*** phyCORE-AM62x: DDR detection / Inject DDR timing deltas ***"
Tom Rini [Fri, 7 Jun 2024 20:03:36 +0000 (14:03 -0600)]
Merge patch series "*** phyCORE-AM62x: DDR detection / Inject DDR timing deltas ***"

Wadim Egorov <w.egorov@phytec.de> says:

Changes in v2:
  - Reabse to current next
  - Add Tested-by: John Ma <jma@phytec.com>
  - Add Kconfig option to select RAM size statically
  - Make board/phytec/common/k3 always compile for CONFIG_ARCH_K3

v1: https://lists.denx.de/pipermail/u-boot/2024-May/553057.html

6 months agoboard: phytec: am62x: Add support for 1 & 4 GB RAM variants
Wadim Egorov [Wed, 22 May 2024 07:55:05 +0000 (09:55 +0200)]
board: phytec: am62x: Add support for 1 & 4 GB RAM variants

Use content of EEPROM to detect the actual RAM size and adjust
DDR timings, size and banks accordingly.
Also enable the SoM detection per default in the defconfigs.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: John Ma <jma@phytec.com>
6 months agoboard: phytec: common: Introduce a method to inject DDR timings deltas
Wadim Egorov [Wed, 22 May 2024 07:55:04 +0000 (09:55 +0200)]
board: phytec: common: Introduce a method to inject DDR timings deltas

Introduce fdt_apply_ddrss_timings_patch() to allow board code to
override DDR settings in the device tree prior to DDRSS driver probing.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: John Ma <jma@phytec.com>
6 months agoarm: mach-k3: am625: Call do_board_detect() before DDR probing
Wadim Egorov [Wed, 22 May 2024 07:55:03 +0000 (09:55 +0200)]
arm: mach-k3: am625: Call do_board_detect() before DDR probing

Call do_board_detect() hook before the K3 DDRSS driver gets probed.
It will allow boards to adjust DDR timings in do_board_detect().

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: John Ma <jma@phytec.com>
6 months agoboard: phytec: Fix function definitions in AM6x SOM detection
Wadim Egorov [Wed, 22 May 2024 07:55:02 +0000 (09:55 +0200)]
board: phytec: Fix function definitions in AM6x SOM detection

Functions are declared as phytec_am6* and not phytec_am62*.
Update the definitions to match the declarations.

Fixes: 9d152c23279c ("board: phytec: Add SOM detection for AM6x")
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: John Ma <jma@phytec.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
6 months agoboard: phytec: Make AM6 SoM detection depend on I2C
Wadim Egorov [Wed, 22 May 2024 07:55:01 +0000 (09:55 +0200)]
board: phytec: Make AM6 SoM detection depend on I2C

SoM detection is using I2C driver model functions.
Let's depend on I2C.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: John Ma <jma@phytec.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
6 months agoMerge patch series "PHYTEC SOM Detection API v3"
Tom Rini [Fri, 7 Jun 2024 20:02:02 +0000 (14:02 -0600)]
Merge patch series "PHYTEC SOM Detection API v3"

Daniel Schultz <d.schultz@phytec.de> says:

This patch series adds support for the EEPROM v3 API.

V3 is backwards compatible to V2 and therefore, the V2 image still
exists at the beginning. Only the API version changed from 2 to 3.

V3 is a block-based memory layout organized as singled-linked list
with different types of blocks. This is a more flexible approach and
allows us to extend it by more block types in the future.

The V3 data starts with a 8-byte large header which defines the
block count (u8), V3 subversion (u8) and data payload length (u16).
Additionally the header contains a CRC8 checksum a 3 reserved bytes.

Each block starts with a 4-byte large header which defined the
block type (u8), the absolute address of the next block (u16) and a
CRC8 checksum. The content itself is defined via the block type and
we currently have 2 different types:

1) MAC: Contains the Ethernet interface number (u8), MAC address
        (6 x u8) and a CRC8 checksum.

6 months agoconfigs: phycore_am62x_a53_defconfig: Enable CONFIG_ENV_OVERWRITE
Daniel Schultz [Wed, 22 May 2024 06:18:27 +0000 (23:18 -0700)]
configs: phycore_am62x_a53_defconfig: Enable CONFIG_ENV_OVERWRITE

Enable CONFIG_ENV_OVERWRITE to overwrite ethaddr in the environment.
This is required because our environment is not located in the
boot partition.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoboard: phytec: common: k3: Set MAC
Daniel Schultz [Wed, 22 May 2024 06:18:26 +0000 (23:18 -0700)]
board: phytec: common: k3: Set MAC

Read the EEPROM API v3 content and set all available
MAC-Addresses to the environment.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoboard: phytec: common: Add API v3
Daniel Schultz [Wed, 22 May 2024 06:18:25 +0000 (23:18 -0700)]
board: phytec: common: Add API v3

This API is based on a block structure with a 8 Byte large
API v3 header and various of different blocks following. It extends
our current API v2, which is always 32 Byte large, and is located
directly after v2.

Add the MAC block as first block type. It contains the physical
Ehternet interface number, a MAC address and a CRC checksum over the
MAC payload.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoboard: phytec: common: Move API v2 init to new function
Daniel Schultz [Wed, 22 May 2024 06:18:24 +0000 (23:18 -0700)]
board: phytec: common: Move API v2 init to new function

Move the entire initialization code for API v2 into a dedicated
function. This rework will allow to easily integrate the API v3
as next step during init.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoboard: phytec: common: Define PHYTEC_API2_DATA_LEN
Daniel Schultz [Wed, 22 May 2024 06:18:23 +0000 (23:18 -0700)]
board: phytec: common: Define PHYTEC_API2_DATA_LEN

The EEPROM image length for API v2 is fixed to 32 bytes. No need
to use sizeof while this value won't change. This value is
also be required for API v3 to know where the API v3 header starts.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoboard: phytec: common: Move eeprom read to new function
Daniel Schultz [Wed, 22 May 2024 06:18:22 +0000 (23:18 -0700)]
board: phytec: common: Move eeprom read to new function

We need to read multiple times from different offsets in API v3.
Move the EEPROM read logic into a dedicated function to make it
usable multiple times.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
6 months agoMerge patch series "Add remoteproc support for J784S4 SoCs"
Tom Rini [Fri, 7 Jun 2024 20:01:38 +0000 (14:01 -0600)]
Merge patch series "Add remoteproc support for J784S4 SoCs"

Beleswar Padhi <b-padhi@ti.com> says:

Hello All,

This series adds remoteproc support for TI's J784S4 SoCs. The K3 J784S4
SoCs have four dual-core R5F subsystems and four C71x DSP subsystems.
Enable the remoteproc drivers in defconfig and set the rproc firmware
names to add remoteproc support.

Note: No driver changes are required as J784S4 SoCs have the same data
as J721S2 SoCs. Thus, utilize the existing compatible string for driver
probe.

6 months agoboard: ti: j784s4: j784s4.env: Set remoteproc firmware names
Beleswar Padhi [Wed, 22 May 2024 04:53:31 +0000 (10:23 +0530)]
board: ti: j784s4: j784s4.env: Set remoteproc firmware names

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

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
6 months agoconfigs: j784s4_evm_a72_defconfig: Enable remoteproc drivers
Beleswar Padhi [Wed, 22 May 2024 04:53:30 +0000 (10:23 +0530)]
configs: j784s4_evm_a72_defconfig: Enable remoteproc drivers

The K3 J784S4 SoC has four dual-core R5F subsystems and four C71x DSP
subsystems. Set config values to enable the remoteproc functionality
with these R5F and DSP subsystems.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
6 months agoMerge patch series "Adding support to load secure firmware for HS devices"
Tom Rini [Fri, 7 Jun 2024 20:01:15 +0000 (14:01 -0600)]
Merge patch series "Adding support to load secure firmware for HS devices"

Udit Kumar <u-kumar1@ti.com> says:

Some use case needs rproc firmware to be loaded at u-boot stage,
using following commands at u-boot shell, firmware could be loaded

=> setenv dorprocboot 1
=> run boot_rprocs

For Secure devices, secure version of rproc firmware should be loaded,
which is appended by sec keyword[0].
but currently non-secure firmware is loaded even for secure devices.
So adding support for loading secure firmware on Secured devices.

[0]: https://gist.github.com/uditkumarti/cd8bf6a448079b59145d17a0e8bf13b7

Bootlogs:
GP : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-gp_device line 65 onwards
HS : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-hs-device line 60 onwards

6 months agomach-k3: common.c: add a flag for booting authenticated rproc binaries
Manorit Chawdhry [Tue, 21 May 2024 10:56:48 +0000 (16:26 +0530)]
mach-k3: common.c: add a flag for booting authenticated rproc binaries

The flag will be used for booting authenticated remote procs from hs-se
devices which can optionally be used in hs-fs devices also.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 months agoinclude: env: ti: Add support for secure firmwares
Udit Kumar [Tue, 21 May 2024 10:56:47 +0000 (16:26 +0530)]
include: env: ti: Add support for secure firmwares

Secure firmwares must be loaded if SOC is secure,
currently rproc framework chooses non-secure firmware always.

So adding support to load secure firmware, when SOC is secure

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 months agodrivers: remoteproc: ti_k3 : enable secure booting with firmware images
Manorit Chawdhry [Tue, 21 May 2024 10:56:46 +0000 (16:26 +0530)]
drivers: remoteproc: ti_k3 : enable secure booting with firmware images

Remoteproc firmware images aren't authenticated in the current boot flow.
Authenticates remoteproc firmware images to complete the root of trust
in secure booting.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 months agoinclude: mach-k3: move k3 security functions to security.h
Manorit Chawdhry [Tue, 21 May 2024 10:56:45 +0000 (16:26 +0530)]
include: mach-k3: move k3 security functions to security.h

ti_secure_image_post_process and ti_secure_image_check_binary is used
for the authentication purposes in the current boot flow. Authentication
of remoteproc firmware images require ti_secure_image_post_process to be
available outside mach-k3.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 months agoMerge patch series "k3-j721e: Enable OF_UPSTREAM for J721E"
Tom Rini [Fri, 7 Jun 2024 20:00:26 +0000 (14:00 -0600)]
Merge patch series "k3-j721e: Enable OF_UPSTREAM for J721E"

Neha Malcom Francis <n-francis@ti.com> says:

This series was plucked out from the larger series [1] that did some
templating reformatting and also enabled OF_UPSTREAM for J721E. The
former has been kept aside till all the platforms affected have moved to
using OF_UPSTREAM to have less conflicts while merging.

Patches split J721E EVM and J721E SK to using separate builds, as well
as enable OF_UPSTREAM for both the platforms.

Boot logs:
https://gist.github.com/nehamalcom/8f326376b6c6b1196084721405159bb9

[1] https://lore.kernel.org/all/20240322131011.1029620-1-n-francis@ti.com/

6 months agoarm: dts: k3-j721e: Move to OF_UPSTREAM
Neha Malcom Francis [Mon, 20 May 2024 09:59:16 +0000 (15:29 +0530)]
arm: dts: k3-j721e: Move to OF_UPSTREAM

Move to using OF_UPSTREAM config and thus using the devicetree-rebasing
subtree.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoconfigs: j721e_sk: Move to separate defconfig for J721E SK board
Neha Malcom Francis [Mon, 20 May 2024 09:59:15 +0000 (15:29 +0530)]
configs: j721e_sk: Move to separate defconfig for J721E SK board

Add defconfig for J721E SK R5 and A72 configuration.

This includes and modifies the J721E EVM defconfigs:
j721e_evm_r5_defconfig -> j721e_sk_r5_defconfig
j721e_evm_a72_defconfig -> j721e_sk_a72_defconfig

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
6 months agoarm: dts: k3-j721e-r5*: Introduce k3-j721e-r5.dtsi
Neha Malcom Francis [Mon, 20 May 2024 09:59:14 +0000 (15:29 +0530)]
arm: dts: k3-j721e-r5*: Introduce k3-j721e-r5.dtsi

Introduce k3-j721e-r5.dtsi to be used by board R5 DTS files. This
helps sync SoC changes across boards.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
6 months agoMerge patch series "arm: dts: k3-am625-verdin: Enable LPDDR4 WDQS control"
Tom Rini [Fri, 7 Jun 2024 19:58:25 +0000 (13:58 -0600)]
Merge patch series "arm: dts: k3-am625-verdin: Enable LPDDR4 WDQS control"

Emanuele Ghidoli <emanuele.ghidoli@toradex.com> says:

Manually, since SysConfig tool do not have the relevant option,
set PHY_LP4_WDQS_OE_EXTEND to 1.
Since WDQS control mode is required on our modules LPDDR4,
this enables WDQS control mode 1.

6 months agoarm: dts: k3-am625-verdin: Enable LPDDR4 WDQS control
Emanuele Ghidoli [Wed, 15 May 2024 08:00:58 +0000 (10:00 +0200)]
arm: dts: k3-am625-verdin: Enable LPDDR4 WDQS control

Manually, since SysConfig tool do not have the relevant option,
set PHY_LP4_WDQS_OE_EXTEND to 1.
Since WDQS control mode is required on our modules LPDDR4,
this enables WDQS control mode 1.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agoarm: dts: k3-am625-verdin: Update autogenerated LPDDR4 configuration
Emanuele Ghidoli [Wed, 15 May 2024 08:00:57 +0000 (10:00 +0200)]
arm: dts: k3-am625-verdin: Update autogenerated LPDDR4 configuration

Update the autogenerated LPDDR4 configuration using the latest available
SysConfig tool.
This changes are cosmetic and are made to track the last used tool version.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agoMerge patch series "'eeprom' command improvements"
Tom Rini [Fri, 7 Jun 2024 16:48:41 +0000 (10:48 -0600)]
Merge patch series "'eeprom' command improvements"

Marek Behún <kabel@kernel.org> says:

This series contains improvements for the 'eeprom' command:
- refactors
- fixes
- improvements
- ability to use driver model EEPROMs (uclass UCLASS_I2C_EEPROM)
- more flexible EEPROM layout support

It should not cause any behavior change for any existing board.

This series is a dependency for some DDR issue fixes for Turris Omnia.
I will be sending that one separately.

github PR link (with CI):
  https://github.com/u-boot/u-boot/pull/540
- there is a failure for
    test.py for sandbox sandbox_clang
  but it seems unrelated to these changes

6 months agocmd: eeprom: Extend to EEPROMs probed via driver model
Marek Behún [Tue, 21 May 2024 07:13:35 +0000 (09:13 +0200)]
cmd: eeprom: Extend to EEPROMs probed via driver model

Extend the 'eeprom' command to allow accessing EEPROMs probed via
driver model, uclass UCLASS_I2C_EEPROM.

When the CONFIG_I2C_EEPROM config option is enabled (and so the
i2c-eeprom driver is built), the 'eeprom' command now accepts driver
model device name as EEPROM specifier for the 'eeprom' command, in
addition to the legacy [[bus] devaddr] specifier.

Moreover if no device specifier is given, then the first
UCLASS_I2C_EEPROM device is used, if found.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Don't read/write whole EEPROM if not necessary
Marek Behún [Tue, 21 May 2024 07:13:34 +0000 (09:13 +0200)]
cmd: eeprom: Don't read/write whole EEPROM if not necessary

Don't read/write whole EEPROM if not necessary when printing / updating
EEPROM layout fields. Only read/write layout.data_size bytes.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Refactor command execution into function by action
Marek Behún [Tue, 21 May 2024 07:13:33 +0000 (09:13 +0200)]
cmd: eeprom: Refactor command execution into function by action

Refactor the eeprom_execute_command() function into separate functions
do_eeprom_rw(), do_eeprom_print() and do_eeprom_update().

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Refactor eeprom device specifier parsing
Marek Behún [Tue, 21 May 2024 07:13:32 +0000 (09:13 +0200)]
cmd: eeprom: Refactor eeprom device specifier parsing

In preparation for allowing to access eeprom by driver-model device
name, refactor the eeprom device specifier parsing. Instead of filling
two parameters (i2c_bus, i2c_addr), the parsing function now fills one
parameter of type struct eeprom_dev_spec.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Deduplicate parse_i2c_bus_addr() calls
Marek Behún [Tue, 21 May 2024 07:13:31 +0000 (09:13 +0200)]
cmd: eeprom: Deduplicate parse_i2c_bus_addr() calls

Deduplicate the calls to parse_i2c_bus_addr().

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Hide eeprom layout versioning behind a Kconfig option
Marek Behún [Tue, 21 May 2024 07:13:30 +0000 (09:13 +0200)]
cmd: eeprom: Hide eeprom layout versioning behind a Kconfig option

Add a new Kconfig option EEPROM_LAYOUT_VERSIONS, and hide eeprom
layout versionsing code behind it. Only print the relevant help in
'eeprom' command usage if this option is enabled.

Enable this new option for cm_fx6_defconfig and cm_t43_defconfig.
These are the only boards using EEPROM layout versioning.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocmd: eeprom: Fix usage help for the eeprom command
Marek Behún [Tue, 21 May 2024 07:13:29 +0000 (09:13 +0200)]
cmd: eeprom: Fix usage help for the eeprom command

The bus and devaddr arguments of the eeprom command are optional, and if
only one is given, it is assumed to be devaddr. Change the usage help
from
  <bus> <devaddr>
to
  [[bus] [devaddr]

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocommon: eeprom_field: Drop unnecessary comparison
Marek Behún [Tue, 21 May 2024 07:13:28 +0000 (09:13 +0200)]
common: eeprom_field: Drop unnecessary comparison

The byte variable is of type unsigned char, it is never less than zero.
The error case is handled by *endptr, so drop the comparison altogether.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocommon: eeprom_field: Fix updating binary field
Marek Behún [Tue, 21 May 2024 07:13:27 +0000 (09:13 +0200)]
common: eeprom_field: Fix updating binary field

The __eeprom_field_update_bin() function is expected to parse a hex
string into bytes (potentially in reverse order), but the
simple_strtoul() function is given 0 as base. This does not work since
the string does not contain '0x' prefix. Add explicit base 16.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocommon: eeprom_layout: Split field finding code from the field update function
Marek Behún [Tue, 21 May 2024 07:13:26 +0000 (09:13 +0200)]
common: eeprom_layout: Split field finding code from the field update function

Split the eeprom layout field finding code from the
eeprom_layout_update_field() function in order to make it usable in
alternative implementations of update method.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agocommon: eeprom_layout: Assign default layout methods and parameters before specific...
Marek Behún [Tue, 21 May 2024 07:13:25 +0000 (09:13 +0200)]
common: eeprom_layout: Assign default layout methods and parameters before specific ones

Assign the default eeprom layout parameter .data_size and methods
.print() and .update() before calling eeprom_layout_assign() in
eeprom_layout_setup().

This allows eeprom_layout_assign() to overwrite these if needed.

Signed-off-by: Marek Behún <kabel@kernel.org>
6 months agoMerge tag 'v2024.07-rc4' into next
Tom Rini [Tue, 4 Jun 2024 00:42:11 +0000 (18:42 -0600)]
Merge tag 'v2024.07-rc4' into next

Prepare v2024.070-rc4

6 months agoPrepare v2024.07-rc4
Tom Rini [Tue, 4 Jun 2024 00:34:59 +0000 (18:34 -0600)]
Prepare v2024.07-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
6 months agoMerge tag 'u-boot-imx-next-20240603' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 3 Jun 2024 17:42:51 +0000 (11:42 -0600)]
Merge tag 'u-boot-imx-next-20240603' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

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

- Support different RAM sizes on imx8m phycoce boards.
- Support new toradex variants.
- Support Samsung 4GB DDR and Realtek RTL8211E PHY on imx8mm-cl-iot-gate.
- Convert imx8mm-phycore and imx8mp-phycore boards to use OF_UPSTREAM.

6 months agoMerge branch 'next-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh...
Tom Rini [Mon, 3 Jun 2024 17:42:38 +0000 (11:42 -0600)]
Merge branch 'next-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh into next

6 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Mon, 3 Jun 2024 15:48:03 +0000 (09:48 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-samsung

6 months agoMerge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 3 Jun 2024 15:47:43 +0000 (09:47 -0600)]
Merge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh

6 months agoimx8mm-cl-iot-gate: Add support for the Realtek RTL8211E PHY
Fabio Estevam [Tue, 28 May 2024 19:15:10 +0000 (16:15 -0300)]
imx8mm-cl-iot-gate: Add support for the Realtek RTL8211E PHY

Newer imx8mm-cl-iot-gate versions are populated with a Realtek RTL8211E
PHY instead of the Atheros AR8033.

Adapted Compulab's patch from:
https://github.com/compulab-yokneam/meta-bsp-imx8mm/blob/iot-gate-imx8_5.10.72/recipes-bsp/u-boot/compulab/imx8mm/0125-imx8mm-net-enable-phy-Realtek-RTL8211E.patch

to support both PHYs in U-Boot.

Signed-off-by: Fabio Estevam <festevam@denx.de>
6 months agoimx8mm-cl-iot-gate: Add support for Samsung 4GB DDR
Fabio Estevam [Tue, 28 May 2024 19:15:09 +0000 (16:15 -0300)]
imx8mm-cl-iot-gate: Add support for Samsung 4GB DDR

Newer versions of the imx8mm-cl-iot-gate boards may come populated with a
Samsung 4GB DDR model.

Add support for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
6 months agoboard: phycore_imx8mp: enable setting 2GHz timings without RAM size
Benjamin Hahn [Tue, 28 May 2024 13:35:15 +0000 (15:35 +0200)]
board: phycore_imx8mp: enable setting 2GHz timings without RAM size

make it possible to set the RAM timing frequency statically independent
from the RAM size. Fixed RAM timing frequency can be used while the
RAM size is still determined by the EEPROM image.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
6 months agoboard: phytec: phycore_imx8mp: Make RAM size configuration fix
Teresa Remmet [Tue, 28 May 2024 13:35:14 +0000 (15:35 +0200)]
board: phytec: phycore_imx8mp: Make RAM size configuration fix

We might not be able to always rely on the EEPROM introspection data.
So add a config option alternative which configures the RAM size
to a fix value.

We still try to read the EEPROM introspection data at this point.
So we can print the SoM information if available.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
6 months agoboard: phytec: phycore_imx8mp: Add support for different RAM sizes
Teresa Remmet [Tue, 28 May 2024 13:35:13 +0000 (15:35 +0200)]
board: phytec: phycore_imx8mp: Add support for different RAM sizes

Add support for different RAM sizes and speed grades on the
phyCORE-i.MX8MP.
Add support for 1GB 1.5GHz, 1GB 2GHz, 4GB 1.5GHz,
4GB 2GHz and 8GB 2GHz RAM.
The RAM size and speed grade is detected by the information
stored in the EEPROM on the SoM.

Co-developed-by: Benjamin Hahn <B.Hahn@phytec.de>
Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
Co-developed-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Co-developed-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
6 months agoboard: phytec: phycore-imx8mp: spl: Fix syle issue
Teresa Remmet [Tue, 28 May 2024 13:35:12 +0000 (15:35 +0200)]
board: phytec: phycore-imx8mp: spl: Fix syle issue

Use tabs instead of spaces.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
6 months agoarm: imx8mp-phycore: move to OF_UPSTREAM
Yannic Moog [Tue, 28 May 2024 11:25:00 +0000 (13:25 +0200)]
arm: imx8mp-phycore: move to OF_UPSTREAM

The PHYCORE_IMX8MP is used by the phyBOARD-Pollux. Migrate board to
OF_UPSTREAM. Linux kernel device tree for the board can be used as is,
corresponding U-Boot device tree files are removed. U-Boot tweaks are
kept unchanged.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Teresa Remmet <t.remmet@phytec.de>
6 months agoarm: imx8mm-phycore: move to OF_UPSTREAM
Yannic Moog [Tue, 28 May 2024 11:24:59 +0000 (13:24 +0200)]
arm: imx8mm-phycore: move to OF_UPSTREAM

The PHYCORE_IMX8MM is used by the phyBOARD-Polis and the
phyGATE-Tauri-L. Migrate both boards to OF_UPSTREAM. Linux kernel device
trees for both boards can be used as is, corresponding U-Boot device
tree files are removed. U-Boot tweaks are kept unchanged.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Teresa Remmet <t.remmet@phytec.de>
6 months agotoradex: tdx-cfg-block: add verdin i.mx8m mini 0090 pid4
Emanuele Ghidoli [Tue, 28 May 2024 09:59:41 +0000 (11:59 +0200)]
toradex: tdx-cfg-block: add verdin i.mx8m mini 0090 pid4

Add new PID4 0090 Verdin iMX8M Mini Quad 4GB WB ET to support
the new hardware variant.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agotoradex: tdx-cfg-block: add verdin imx95 sku 0089 pid4
Emanuele Ghidoli [Tue, 28 May 2024 09:59:40 +0000 (11:59 +0200)]
toradex: tdx-cfg-block: add verdin imx95 sku 0089 pid4

Add new PID4 0089 Verdin iMX95 Hexa 16GB WB IT to config block handling.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agotoradex: tdx-cfg-block: add aquila am69 sku 0088 pid4
Emanuele Ghidoli [Tue, 28 May 2024 09:59:39 +0000 (11:59 +0200)]
toradex: tdx-cfg-block: add aquila am69 sku 0088 pid4

Add new PID4 0088 Aquila AM69 Octa 32GB WB IT to config block handling.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agoboard: toradex: verdin-imx8mm: increase maximum addressable ram to 4GB
Emanuele Ghidoli [Tue, 28 May 2024 09:59:38 +0000 (11:59 +0200)]
board: toradex: verdin-imx8mm: increase maximum addressable ram to 4GB

Add support for SKUs with higher memory sizes.
Actual memory size is auto-detected.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agoboard: toradex: verdin-imx8mm: add 4 GB lpddr4 memory support
Emanuele Ghidoli [Tue, 28 May 2024 09:59:37 +0000 (11:59 +0200)]
board: toradex: verdin-imx8mm: add 4 GB lpddr4 memory support

Add support for MT53E512M32D1ZW-046 IT:C memory.
This 4 GB memory has 17 row bits instead of 16 and requires 380 ns of
tRFC (tRFCab) instead of 280 ns due to increased channel density to 16 Gb.
Both modifications are retro-compatible with previous memories.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
6 months agoARM: dts: renesas: Drop R8A779H0 V4M DTs with OF_UPSTREAM counterparts
Marek Vasut [Sun, 26 May 2024 18:00:26 +0000 (20:00 +0200)]
ARM: dts: renesas: Drop R8A779H0 V4M DTs with OF_UPSTREAM counterparts

Remove R8A779H0 V4M DTs which are now replaced by OF_UPSTREAM counterparts.
No functional change expected.

This patch finalizes OF_UPSTREAM conversion of R8A779H0 V4M which DTs landed
in Linux 6.9 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoARM: dts: renesas: Switch to using upstream DT on Renesas R8A779H0 V4M
Marek Vasut [Sun, 26 May 2024 18:00:25 +0000 (20:00 +0200)]
ARM: dts: renesas: Switch to using upstream DT on Renesas R8A779H0 V4M

Enable OF_UPSTREAM to use upstream DT and add renesas/ prefix to the
DEFAULT_DEVICE_TREE. And thereby directly build DTB from dts/upstream/src/
including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory.

This patch finalizes OF_UPSTREAM conversion of R8A779H0 V4M which DTs
landed in Linux 6.9 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoconfigs: rzg2_beacon: Realign ENV location and offset
Adam Ford [Sat, 1 Jun 2024 14:55:20 +0000 (09:55 -0500)]
configs: rzg2_beacon: Realign ENV location and offset

The ENV size and offset were changed to different
values in Beacon's downstream release.  Change them to the
same values as the downstream for consistent behavior.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 months agorenesas: beacon-rzg2m: Add Marek to MAINTAINER file
Adam Ford [Sat, 1 Jun 2024 14:55:19 +0000 (09:55 -0500)]
renesas: beacon-rzg2m: Add Marek to MAINTAINER file

Since any changes to the RZ/G2 family go through Marek's tree,
update the MAINTAINER file to automatically show his name
when running get_maintainer.pl.  Without this, he is not
copied.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 months agoARM: dts: renesas: Reserve space in 64bit R-Car DTs
Marek Vasut [Sun, 19 May 2024 20:40:07 +0000 (22:40 +0200)]
ARM: dts: renesas: Reserve space in 64bit R-Car DTs

Reserve 4 kiB of space in 64bit R-Car DTs when those DTs are compiled
to permit patching in OpTee-OS /firmware node, /reserved-memory node,
possibly also additional /memory@ nodes and RPC node by TFA.

This duplicates behavior in arch/arm/dts/Makefile with OF_UPSTREAM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoARM: dts: renesas: Remove leftovers after OF_UPSTREAM conversion
Marek Vasut [Sun, 19 May 2024 20:39:19 +0000 (22:39 +0200)]
ARM: dts: renesas: Remove leftovers after OF_UPSTREAM conversion

Remove leftover DTSI files after OF_UPSTREAM conversion.
Those are no longer used and no longer necessary, remove them.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Adam Ford <aford173@gmail.com>
6 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 30 May 2024 13:23:30 +0000 (07:23 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- board: fix support for icicle
- board: support Star64 board
- andes: minor fixes
- riscv: deprecate cache enablement in start.S

6 months agoMerge patch series "omap3: igep0x00: Fix boot failure and modernize the boards support"
Tom Rini [Thu, 30 May 2024 13:07:51 +0000 (07:07 -0600)]
Merge patch series "omap3: igep0x00: Fix boot failure and modernize the boards support"

Javier Martinez Canillas <javier@dowhile0.org> says:

Hello,

I noticed that the IGEPv2 board did not boot anymore with mainline U-Boot.
This was caused by a driver change to allocate its platform data before
relocation and U-Boot not having enough pre-relocation heap size for this.

This series fixes this issue and also makes the board support more modern,
by enabling DM for SPL and migrating the IGEP boards to use upstream DTBs.

6 months agoomap3: igep0x00: Migrate to use upstream DT
Javier Martinez Canillas [Sat, 18 May 2024 13:06:15 +0000 (15:06 +0200)]
omap3: igep0x00: Migrate to use upstream DT

Enable OF_UPSTREAM to use upstream DT and add a ti/omap/ prefix to the
DEFAULT_DEVICE_TREE config option.

That way, a DTS from the upstream dts/upstream/src/ directory is used
instead of the arch/$(ARCH)/dts/ directory. These in turn are removed.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep0x00: Update for DM SPL support
Javier Martinez Canillas [Sat, 18 May 2024 13:06:14 +0000 (15:06 +0200)]
omap3: igep0x00: Update for DM SPL support

This change is heavily based on commit e0cc7df9fdf2 ("omap3_beagle: Update
for DM SPL support"), that did the same update for the OMAP3 Beagle board.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep0x00: Drop unused SPI support
Javier Martinez Canillas [Sat, 18 May 2024 13:06:13 +0000 (15:06 +0200)]
omap3: igep0x00: Drop unused SPI support

There are no SPI peripherals in neither the IGEPv2 board nor the IGEP COM
Module, so there's no reason to have this enabled in the boards defconfig.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep00x0: Increase malloc() pool size
Javier Martinez Canillas [Sat, 18 May 2024 13:06:12 +0000 (15:06 +0200)]
omap3: igep00x0: Increase malloc() pool size

The IGEPv2 board boot started to fail since the commit afd4f15a39de ("spi:
omap3_spi: Read platform data in ofdata_to_platdata()"). Because this made
the OMAP3 SPI controller driver to allocate its platform data before doing
a relocation, but the igep0x00 config sets this pool size to just 1 KiB.

Increase the pre-relocation malloc heap size to 16 KiB, as is set by other
OMAP3 boards. This not only restores booting but also makes it consistent.

Leave the SPL pool size to the previous 1 KiB size since 16 KiB may not be
a possible size in that constrained environment and is also the value that
is set by other OMAP3 boards.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoandes: Use UCCTLCOMMAND instead of MCCTLCOMMAND
Leo Yu-Chi Liang [Tue, 28 May 2024 12:57:50 +0000 (20:57 +0800)]
andes: Use UCCTLCOMMAND instead of MCCTLCOMMAND

Use CSR_UCCTLCOMMAND instead of CSR_MCCTLCOMMAND
to do cache flush operation in M-mode and S-mode.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoriscv: remove cache enablement in start.S
Leo Yu-Chi Liang [Tue, 28 May 2024 12:49:57 +0000 (20:49 +0800)]
riscv: remove cache enablement in start.S

Cache could be enabled in harts_early_init board-specific hook,
so remove cache enablement in start.S

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoandes: l2 cache driver: fixes typos and cctl status
Leo Yu-Chi Liang [Tue, 28 May 2024 12:49:42 +0000 (20:49 +0800)]
andes: l2 cache driver: fixes typos and cctl status

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoboard: starfive: support Pine64 Star64 board
H Bell [Wed, 22 May 2024 19:12:51 +0000 (19:12 +0000)]
board: starfive: support Pine64 Star64 board

Add documentation files

Signed-off-by: Henry Bell <dmoo_dv@protonmail.com>
Cc: ycliang@andestech.com
Cc: heinrich.schuchardt@canonical.com
Reviewed-by: E Shattow <lucent@gmail.com>
6 months agoboard: starfive: support Pine64 Star64 board
H Bell [Wed, 22 May 2024 19:12:48 +0000 (19:12 +0000)]
board: starfive: support Pine64 Star64 board

Similar to the Milk-V Mars, The Star64 board contains few differences to the
VisionFive 2 boards, so can be part of the same U-boot build.

Signed-off-by: Henry Bell <dmoo_dv@protonmail.com>
Cc: ycliang@andestech.com
Cc: heinrich.schuchardt@canonical.com
Reviewed-by: E Shattow <lucent@gmail.com>
6 months agoboard: microchip: icicle: make both ethernets optional
Conor Dooley [Wed, 15 May 2024 15:04:31 +0000 (16:04 +0100)]
board: microchip: icicle: make both ethernets optional

A given AMP configuration for a board may make either one, or neither
of, the ethernet ports available to U-Boot. The Icicle's init code will
fail if mac1 is not present, so move it to the optional approach taken
for mac0.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoboard: microchip: icicle: correct type for node offset
Conor Dooley [Wed, 15 May 2024 15:04:30 +0000 (16:04 +0100)]
board: microchip: icicle: correct type for node offset

Node offsets returned by libfdt can contain negative error numbers, so
the variable type should be "int". As things stand, if the ethernet
nodes are not found in the early init callback, the if (node < 0) tests
pass and the code errors out while trying to set the local-mac-address
for a non-existent node.

Fixes: 64413e1b7c ("riscv: Add Microchip MPFS Icicle Kit support")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoMerge branch '2024-05-29-assorted-small-fixes'
Tom Rini [Wed, 29 May 2024 17:18:09 +0000 (11:18 -0600)]
Merge branch '2024-05-29-assorted-small-fixes'

- A few maintainer updates, bump a python package version, TI K3-AM62P
  fix

6 months agoUpdate maintainer for Versatile Express.
Kristian Amlie [Fri, 24 May 2024 11:57:05 +0000 (13:57 +0200)]
Update maintainer for Versatile Express.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
6 months agorockchip: theobroma: update URLs to point to CHERRY website
Quentin Schulz [Fri, 24 May 2024 11:46:37 +0000 (13:46 +0200)]
rockchip: theobroma: update URLs to point to CHERRY website

Most of the current URLs should be redirected but some aren't already,
so let's anticipate more IT hiccups by migrating to new URLs.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agomigrate Theobroma Systems mail addresses to CHERRY Embedded Solutions
Quentin Schulz [Fri, 24 May 2024 11:46:36 +0000 (13:46 +0200)]
migrate Theobroma Systems mail addresses to CHERRY Embedded Solutions

See
https://embedded.cherry.de/theobroma-systems-is-now-officially-part-of-cherry-se/

While the mail addresses on the theobroma-systems.com domain should be
redirect to cherry.de, let's anticipate IT hiccups and avoid important
mails not reaching us by swapping the domain name wherever appropriate
for the newer one.

Christoph Mueller isn't working at ~Theobroma~ CHERRY Embedded Solutions
anymore, but I don't know his new mail address so mails destined to him
will keep bouncing.

Cc: Heiko Stuebner <heiko.stuebner@cherry.de> <heiko.stuebner@theobroma-systems.com>
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
Cc: Klaus Goger <klaus.goger@cherry.de>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months ago.mailmap: redirect Philipp Tomsich Theobroma address to Vrull
Quentin Schulz [Fri, 24 May 2024 11:46:35 +0000 (13:46 +0200)]
.mailmap: redirect Philipp Tomsich Theobroma address to Vrull

The Theobroma address bounces as Philipp is not working there anymore,
so let's update with the one that seems to be working right now.

Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agoarm: mach-k3: am62p: Fixup TF-A/OP-TEE reserved-memory node in FDT
Bryan Brattlof [Thu, 23 May 2024 16:43:20 +0000 (11:43 -0500)]
arm: mach-k3: am62p: Fixup TF-A/OP-TEE reserved-memory node in FDT

The address we load TFA and OPTEE is configurable by the
CONFIG_K3_{ATF,OPTEE)_LOAD_ADDR, but the DT node reservations remain
static which can cause some confusion about where exactly these firmware
are exactly. Fix this by updating the reserved-memory{} nodes when the
loaded address does not match the address in DT.

Reported-by: Andrew Davis <afd@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
6 months agoboard: toradex: change maintainer to Francesco
Francesco Dolcini [Wed, 22 May 2024 08:28:48 +0000 (10:28 +0200)]
board: toradex: change maintainer to Francesco

Marcel is leaving Toradex and the email will start bouncing in a few
weeks, move maintainership to myself.

Cc: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 months agoarm: exynos: Map iRAM APM area for Exynos850 SoC
Sam Protsenko [Sat, 25 May 2024 21:53:30 +0000 (16:53 -0500)]
arm: exynos: Map iRAM APM area for Exynos850 SoC

This iRAM APM area is needed for I3C access to PMIC via APM block.
Without this mapping any access to APM iRAM leads to "Synchronous Abort"
exception.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoarm: dts: e850-96: Remove not needed bootph-all flags
Sam Protsenko [Sat, 25 May 2024 21:51:38 +0000 (16:51 -0500)]
arm: dts: e850-96: Remove not needed bootph-all flags

Most of the nodes in e850-96 appended device tree that add bootph-all
flags are not necessary. All those nodes are instantiated as
dependencies of other nodes anyway. Remove those nodes to avoid
cluttering the appended dts. 'bdinfo' reports 768 bytes reduction for
"Early malloc usage", and 'dm tree' output doesn't change. Keep only
pmu_system_controller changes, which are actually needed for serial to
work properly.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoarm: exynos: Migrate E850-96 board to OF_UPSTREAM
Sam Protsenko [Sat, 25 May 2024 21:18:36 +0000 (16:18 -0500)]
arm: exynos: Migrate E850-96 board to OF_UPSTREAM

Use upstream device tree files and bindings. To do so:
 - imply (enable) OF_UPSTREAM option for E850-96 target
 - point DEFAULT_DEVICE_TREE in E850-96 config to upstream dts
 - remove now not needed local dts files, binding docs and headers
 - update MAINTAINERS and board/samsung/e850-96/MAINTAINERS
   correspondingly

Upstream device tree files for Exynos850 SoC and E850-96 board are
pretty much the same as local (removed) ones, so the conversion is
rather straightforward and painless in this case. The appended dts file
(arch/arm/dts/exynos850-e850-96-u-boot.dtsi) stays unchanged.

The only remaining local dt-bindings doc for E850-96 board is
exynos-pmu.yaml. It wasn't removed as it's quite different from Linux
kernel version. Particularly U-Boot local version of exynos-pmu.yaml
describes "samsung,uart-debug-1" property, which is not present in Linux
kernel binding. Later it might be upstreamed to Linux kernel, and once
it's done the U-Boot exynos-pmu.yaml binding can be removed.

No functional change.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoMerge tag 'tpm-master-27052024' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Mon, 27 May 2024 14:56:02 +0000 (08:56 -0600)]
Merge tag 'tpm-master-27052024' of https://source.denx.de/u-boot/custodians/u-boot-tpm

TPM fixes

6 months agotpm-v2: allow algorithm name to be configured for pcr_read and pcr_extend
Tim Harvey [Sat, 25 May 2024 20:00:49 +0000 (13:00 -0700)]
tpm-v2: allow algorithm name to be configured for pcr_read and pcr_extend

For pcr_read and pcr_extend commands allow the digest algorithm to be
specified by an additional argument. If not specified it will default to
SHA256 for backwards compatibility.

Additionally update test_tpm2.py for the changes in output in pcr_read
which now shows the algo and algo length in the output.

A follow-on to this could be to extend all PCR banks with the detected
algo when the <digest_algo> argument is 'auto'.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agotpm-v2: add support for mapping algorithm names to algos
Tim Harvey [Sat, 25 May 2024 20:00:48 +0000 (13:00 -0700)]
tpm-v2: add support for mapping algorithm names to algos

replace tpm2_supported_algorithms with an array of structures
relating algorithm names, to TCG id's, digest length and mask values.

While at it fix the tpm2_algorithm_to_mask to return the proper value.

Cc: Eddie James <eajames@linux.ibm.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Fixes: 97707f12fdab ("tpm: Support boot measurements")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agotpm: display warning if using gpio reset with TPM
Tim Harvey [Wed, 15 May 2024 23:21:38 +0000 (16:21 -0700)]
tpm: display warning if using gpio reset with TPM

Instead of displaying what looks like an error message if a
gpio-reset dt prop is missing for a TPM display a warning that
having a gpio reset on a TPM should not be used for a secure production
device.

TCG TIS spec [1] says:
"The TPM_Init (LRESET#/SPI_RST#) signal MUST be connected to the
platform CPU Reset signal such that it complies with the requirements
specified in section 1.2.7 HOST Platform Reset in the PC Client
Implementation Specification for Conventional BIOS."

The reasoning is that you should not be able to toggle a GPIO and reset
the TPM without resetting the CPU as well because if an attacker can
break into your OS via an OS level security flaw they can then reset the
TPM via GPIO and replay the measurements required to unseal keys
that you have otherwise protected.

Additionally restructure the code for improved readability allowing for
removal of the init label.

Before:
 - board with no reset gpio
u-boot=> tpm init && tpm info
tpm_tis_spi_probe: missing reset GPIO
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]
 - board with a reset gpio
u-boot=> tpm init && tpm info
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]

After:
 - board with no reset gpio
u-boot=> tpm init && tpm info
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]
 - board with a reset gpio
u-boot=> tpm init && tpm info
tpm@1: TPM gpio reset should not be used on secure production devices
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]

[1] https://trustedcomputinggroup.org/wp-content/uploads/TCG_PCClientTPMInterfaceSpecification_TIS__1-3_27_03212013.pdf

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agoMerge tag 'u-boot-rockchip-20240525' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sat, 25 May 2024 14:01:20 +0000 (08:01 -0600)]
Merge tag 'u-boot-rockchip-20240525' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/20844

- new board: rk3566 Powkiddy X55, rk3588s Indiedroid Nova;
- rv1126 migrate to OF_UPSTREAM;
- Fix for px30 ringneck board;
- Fix for rk3588 SPLL clock init;