pandora-u-boot.git
6 weeks agorockchip: rk3399: Enable random generator on all boards
Jonas Karlman [Tue, 30 Apr 2024 15:30:14 +0000 (15:30 +0000)]
rockchip: rk3399: Enable random generator on all boards

The RK3399 SoC contain a crypto engine block that can generate random
numbers.

Imply DM_RNG and RNG_ROCKCHIP Kconfig options to take advantage of the
random generator on all RK3399 boards. Also remove the unnecessary use
of a status = "okay" prop.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
6 weeks agorockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation
Jonas Karlman [Tue, 30 Apr 2024 15:30:13 +0000 (15:30 +0000)]
rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation

The RK3399 SoC support the ARMv8 Cryptography Extensions, use of ARMv8
crypto can speed up FIT checksum validation in SPL.

Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto
extensions for SHA256 when validating checksum of FIT images.

Imply SPL_FIT_SIGNATURE and LEGACY_IMAGE_FORMAT to enable FIT checksum
validation to almost all RK3399 boards.

The following boards have been excluded:
- chromebook_bob: SPL max size limitation of 120 KiB
- chromebook_kevin: SPL max size limitation of 120 KiB

Also imply OF_LIVE to help speed up init of U-Boot proper and disable
CONFIG_SPL_RAW_IMAGE_SUPPORT on leez-rk3399 to ensure SPL does not try
to jump to code that failed checksum validation.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 weeks agorockchip: rk3399: Sort imply statements alphabetically
Jonas Karlman [Tue, 30 Apr 2024 15:30:12 +0000 (15:30 +0000)]
rockchip: rk3399: Sort imply statements alphabetically

Sort imply statements under ROCKCHIP_RK3399 alphabetically.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
6 weeks agorockchip: rk3399-ficus: Enable TPL and use common bss and stack addr
Jonas Karlman [Tue, 30 Apr 2024 15:30:11 +0000 (15:30 +0000)]
rockchip: rk3399-ficus: Enable TPL and use common bss and stack addr

The rk3399-ficus board is only using SPL and not TPL+SPL like all other
RK3399 boards, chromebook bob/kevin excluded. It does not seem to be any
technical reason why this board was left using only SPL.

Switch to use TPL+SPL and to use the common bss and stack addresses
introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and
stack addresses"). Also add the missing DEFAULT_FDT_FILE option.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 weeks agorockchip: rk3399-puma: Use common bss and stack addresses
Jonas Karlman [Tue, 30 Apr 2024 15:30:10 +0000 (15:30 +0000)]
rockchip: rk3399-puma: Use common bss and stack addresses

The rk3399-puma board is currently using SPL stack and bss addr in SRAM,
the same addr typically used by TPL, this differs from most other RK3399
boards.

Switch to use the common bss and stack addresses introduced in commit
008ba0d56d00 ("rockchip: Add common default bss and stack addresses").

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 weeks agorockchip: rk3399-puma: Update SPL_PAD_TO Kconfig option
Jonas Karlman [Tue, 30 Apr 2024 15:30:09 +0000 (15:30 +0000)]
rockchip: rk3399-puma: Update SPL_PAD_TO Kconfig option

On rk3399-puma the FIT payload is located at sector 0x200 compared
to the more Rockchip common sector 0x4000 offset:

  SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200

Because FIT payload is located at sector 0x200 and IDBlock is located at
sector 64, the combined size of TPL+SPL (idbloader.img) cannot take up
more than 224 KiB:

  (0x200 - 64) x 512 = 0x38000 (224 KiB)

Adjust SPL_PAD_TO to match the used 0x200 sector offset.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 weeks agorockchip: rk3399-gru: Fix max SPL size on bob and kevin
Jonas Karlman [Tue, 30 Apr 2024 15:30:08 +0000 (15:30 +0000)]
rockchip: rk3399-gru: Fix max SPL size on bob and kevin

Chromebook bob and kevin typically run coreboot as the initial boot
loader, however, U-Boot proper can be used as a secondary boot loader.
It is also possible to run U-Boot SPL and proper bare metal, with SPL
and the U-Boot payload loaded from SPI flash.

Because of this chromebook bob and kevin only use SPL and not TPL+SPL
like other RK3399 boards, this mean that SPL is loaded to and run from
SRAM instead of DRAM.

The U-Boot payload is located at 0x40000 (256 KiB) offset in SPI flash
and because the BROM only read first 2 KiB for each 4 KiB page, the size
of SPL (idbloader.img) is limited to max 128 KiB.

The chosen bss start address further limits the size of SPL to 120 KiB.

  0xff8e0000 (SPL_BSS_START_ADDR) - 0xff8c2000 (SPL_TEXT_BASE) = 0x1e000

Update SPL_MAX_SIZE to reflect the 120 KiB max size limitation.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 weeks agoPrepare v2024.07-rc2 v2024.07-rc2
Tom Rini [Mon, 6 May 2024 19:54:17 +0000 (13:54 -0600)]
Prepare v2024.07-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agoMerge tag 'u-boot-imx-master-20240505' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 5 May 2024 22:15:02 +0000 (16:15 -0600)]
Merge tag 'u-boot-imx-master-20240505' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Add SPL variant of DM_RNG so that the DM_RNG can be disabled in SPL if
  necessary. This may be necessary due to e.g. size constraints of the SPL.
- dd SPL variant of SPL_FSL_CAAM_RNG so that the SPL_FSL_CAAM_RNG can be
  disabled in SPL if necessary. This may be necessary due to e.g.  size
  constraints of the SPL.
- Differentiate between CAAM and DCP in Kconfig entry.

7 weeks agocrypto/fsl: Differentiate between CAAM and DCP in Kconfig entry
Marek Vasut [Thu, 25 Apr 2024 23:02:09 +0000 (01:02 +0200)]
crypto/fsl: Differentiate between CAAM and DCP in Kconfig entry

Differentiate between "Enable Random Number Generator support" and
"Enable Random Number Generator support" in Kconfig entry, mark the
first as CAAM and the second as DCP, otherwise users cannot easily
decide which of the options is which and enable the correct one.

Signed-off-by: Marek Vasut <marex@denx.de>
7 weeks agocrypto/fsl: Introduce SPL_FSL_CAAM_RNG
Marek Vasut [Thu, 25 Apr 2024 23:02:08 +0000 (01:02 +0200)]
crypto/fsl: Introduce SPL_FSL_CAAM_RNG

Add SPL variant of SPL_FSL_CAAM_RNG so that the SPL_FSL_CAAM_RNG can
be disabled in SPL if necessary. This may be necessary due to e.g.
size constraints of the SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
7 weeks agorng: Introduce SPL_DM_RNG
Marek Vasut [Thu, 25 Apr 2024 23:02:07 +0000 (01:02 +0200)]
rng: Introduce SPL_DM_RNG

Add SPL variant of DM_RNG so that the DM_RNG can be disabled in SPL
if necessary. This may be necessary due to e.g. size constraints of
the SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
7 weeks agoMerge branch '2024-05-02-assorted-updates'
Tom Rini [Fri, 3 May 2024 22:18:51 +0000 (16:18 -0600)]
Merge branch '2024-05-02-assorted-updates'

- Typo fixes, gpt command fix, a few npcm fixes, fix a reported Coverity
  issue and increase the malloc pool on am62x_evm_r5 to fix some use
  cases.

7 weeks agoMAINTAINERS: update Broadcom BCMBCA maintainer
William Zhang [Fri, 3 May 2024 05:23:43 +0000 (22:23 -0700)]
MAINTAINERS: update Broadcom BCMBCA maintainer

Joel is no longer with Broadcom. Remove his email from bcmbca maintainer
list and replace him with myself for stack protection maintainer.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
7 weeks agoconfigs: am62x_evm_r5: Increase size of malloc_simple heap after relocation
Judith Mendez [Mon, 29 Apr 2024 21:49:36 +0000 (16:49 -0500)]
configs: am62x_evm_r5: Increase size of malloc_simple heap after relocation

On AM62x SK we can see a boot failure with signature "alloc space
exhausted", so fix by increasing size of SPL_STACK_R_MALLOC_SIMPLE_LEN.

Fixes: 128f81290b ("arm: dts: k3: binman: am625: add support for signing TIFSSTUB Images")
Signed-off-by: Judith Mendez <jm@ti.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
7 weeks agobinman: Fix typo in mkimage etype description
Marek Vasut [Thu, 25 Apr 2024 22:54:08 +0000 (00:54 +0200)]
binman: Fix typo in mkimage etype description

Fix a typo, no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
7 weeks agoboard: arbel: Limit the dram effective size to bank0 maximal size
Jim Liu [Tue, 23 Apr 2024 07:22:10 +0000 (15:22 +0800)]
board: arbel: Limit the dram effective size to bank0 maximal size

For 4GB dram size, the dram is divided into 2 banks and
the address space of these 2 banks are not concatenated.
Limit the gd->ram_top to not exceed bank0 top to prevent
accessing invalid memory region.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
7 weeks agoconfigs: arbel: increase u-boot mapping size
Jim Liu [Tue, 23 Apr 2024 07:22:09 +0000 (15:22 +0800)]
configs: arbel: increase u-boot mapping size

When u-boot enable CONFIG_SYS_BOOT_RAMDISK_HIGH, rootfs image relocated
from FIU address space to memory address before jump to kernel.

Since Arbel reserved memory from 0x00000000 to 0x06200000 for tip image,
and rootfs image may too large that cannot found a suitable location
before 128MB(0x8000000), so increase mapping size from 128MB to 192MB.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
7 weeks agoArm: npcm: fix npcm7xx boot to kernel error
Jim Liu [Tue, 23 Apr 2024 07:22:08 +0000 (15:22 +0800)]
Arm: npcm: fix npcm7xx boot to kernel error

Add mem and console env information and modify the wrong earlycon env.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
7 weeks agonet: consider option-length when parsing NIS domain
Heinrich Schuchardt [Tue, 23 Apr 2024 07:09:44 +0000 (09:09 +0200)]
net: consider option-length when parsing NIS domain

When parsing option 40 (network information service domain) the
option length is in variable 'oplen' and not in 'size'.

Addresses-Coverity-ID: 492765 Uninitialized variables (UNINIT)
Fixes: 8ab388bfdbcf ("net: add support to parse the NIS domain for the dhcp options")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agospi: npcm_pspi: Reset HW in driver probe
Jim Liu [Tue, 23 Apr 2024 06:38:42 +0000 (14:38 +0800)]
spi: npcm_pspi: Reset HW in driver probe

Reset HW to clear old status and use default data mode(8-bit).

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
7 weeks agocmd: gpt: initialize partition table
Kishan Dudhatra [Mon, 22 Apr 2024 18:17:33 +0000 (23:47 +0530)]
cmd: gpt: initialize partition table

Change in v2:
- Fix applies to all block devices, not just MMC.

If partition init is not completed within the gpt write,
the gpt partition list will not be updated.

Signed-off-by: Kishan Dudhatra <kishan.dudhatra@siliconsignals.io>
7 weeks agotools: typo arguemnts
Heinrich Schuchardt [Fri, 19 Apr 2024 11:37:46 +0000 (13:37 +0200)]
tools: typo arguemnts

%s/arguemnts/arguemnts/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agoevent: typo arguemnts
Heinrich Schuchardt [Fri, 19 Apr 2024 11:37:45 +0000 (13:37 +0200)]
event: typo arguemnts

%s/arguemnts/arguments/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agommc: sdhci: Correct ADMA_DESC_LEN to 12
Alexander Sverdlin [Wed, 1 May 2024 18:53:04 +0000 (20:53 +0200)]
mmc: sdhci: Correct ADMA_DESC_LEN to 12

Commit 37cb626da25d0d ("mmc: sdhci: Add Support for ADMA2") introduced
ADMA_DESC_LEN == 16 (64 bit case), but it was never used before commit
74755c1fed1b0 ("mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops").

"sizeof(struct sdhci_adma_desc)" (== 12 for 64bit case) was used instead.

Confusion probably originates from Linux commit 685e444bbaa0
("mmc: sdhci: Add ADMA2 64-bit addressing support for V4 mode"), but
the latter "V4 mode" was never ported to U-Boot.

Fixes: 74755c1fed1b0 ("mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops")
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com>
Tested-by: Judith Mendez <jm@ti.com>
7 weeks agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 2 May 2024 01:40:32 +0000 (19:40 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/20596

- RISC-V: cmd: Add SBI implementation ID and extension ID
- Board: Rename spl_soc_init to spl_dram_init
- Board: milkv_duo: Add SPI NOR flash, Ethernet, Sysreset support

7 weeks agoMerge tag 'efi-2024-07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 2 May 2024 01:39:45 +0000 (19:39 -0600)]
Merge tag 'efi-2024-07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-07-rc2

Documentation:

* correct description of 'env print -e'

UEFI:

* remove superfluous efi_restore_gd after EFI_CALL
* terminate efidebug test bootmgr early on error
* do not install device-tree if bootmgr fails
* pass GUID by address to efi_dp_from_lo
* remove dead code in efi_var_mem_init()
* enable QueryVariableInfo at runtime for file backed variables

7 weeks agoboard: starfive: Rename spl_soc_init() to spl_dram_init()
Lukas Funke [Wed, 24 Apr 2024 07:43:39 +0000 (09:43 +0200)]
board: starfive: Rename spl_soc_init() to spl_dram_init()

Rename spl_soc_init() to spl_dram_init() because the generic function
name does not reflect what the function actually does. Also
spl_dram_init() is commonly used for dram initialization and should be
called from board_init_f().

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 weeks agoboard: sifive: Rename spl_soc_init() to spl_dram_init()
Lukas Funke [Wed, 24 Apr 2024 07:43:38 +0000 (09:43 +0200)]
board: sifive: Rename spl_soc_init() to spl_dram_init()

Rename spl_soc_init() to spl_dram_init() because the generic function
name does not reflect what the function actually does. Also
spl_dram_init() is commonly used for dram initialization and should be
called from board_init_f().

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoconfigs: milkv_duo: Add spi nor configs
Kongyang Liu [Sat, 20 Apr 2024 07:08:25 +0000 (15:08 +0800)]
configs: milkv_duo: Add spi nor configs

Add configs related to spi nor flash for Sophgo Milk-V Duo board

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoriscv: dts: sophgo: Add spi nor flash controller node
Kongyang Liu [Sat, 20 Apr 2024 07:08:24 +0000 (15:08 +0800)]
riscv: dts: sophgo: Add spi nor flash controller node

Add spi nor flash controller node for cv18xx SoCs

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agospi: cv1800b: Add spi nor flash controller driver for cv1800b SoC
Kongyang Liu [Sat, 20 Apr 2024 07:08:23 +0000 (15:08 +0800)]
spi: cv1800b: Add spi nor flash controller driver for cv1800b SoC

Add spi nor flash controller driver for cv1800b SoC

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoconfigs: milkv_duo: Add ethernet configs
Kongyang Liu [Sat, 20 Apr 2024 07:00:29 +0000 (15:00 +0800)]
configs: milkv_duo: Add ethernet configs

Add configs related to ethernet and ethernet boot command for Sophgo Milk-V
Duo board

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoriscv: dts: sophgo: Add ethernet node
Kongyang Liu [Sat, 20 Apr 2024 07:00:28 +0000 (15:00 +0800)]
riscv: dts: sophgo: Add ethernet node

Add ethernet node for cv1800b SoC

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoboard: milkv_duo: Add init code for Milk-V Duo ethernet
Kongyang Liu [Sat, 20 Apr 2024 07:00:27 +0000 (15:00 +0800)]
board: milkv_duo: Add init code for Milk-V Duo ethernet

Initialize register in cv1800b ethernet phy to make it compatible with
generic phy driver

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agocmd: sbi: add coreboot and oreboot implementation IDs
Heinrich Schuchardt [Wed, 17 Apr 2024 14:01:28 +0000 (16:01 +0200)]
cmd: sbi: add coreboot and oreboot implementation IDs

Let the sbi command detect the coreboot and oreboot SBI Implementation IDs
defined in SBI specification v2.0.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agocmd: sbi: add Supervisor Software Events extension
Heinrich Schuchardt [Wed, 17 Apr 2024 14:01:27 +0000 (16:01 +0200)]
cmd: sbi: add Supervisor Software Events extension

OpenSBI has implemented the Supervisor Software Events Extension.
Allow detecting it in the sbi command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoconfigs: milkv_duo: Add sysreset configs
Kongyang Liu [Tue, 16 Apr 2024 07:52:40 +0000 (15:52 +0800)]
configs: milkv_duo: Add sysreset configs

Add sysreset configs as well as poweroff and reset commands for Sophgo
Milk-V Duo board.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoboard: sophgo: milkv_duo: Bind sysreset driver
Kongyang Liu [Tue, 16 Apr 2024 07:52:39 +0000 (15:52 +0800)]
board: sophgo: milkv_duo: Bind sysreset driver

Bind cv1800b sysreset driver for Sophgo Milk-V Duo board in board_init
function.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agosysreset: cv1800b: Add sysreset driver for cv1800b SoC
Kongyang Liu [Tue, 16 Apr 2024 07:52:38 +0000 (15:52 +0800)]
sysreset: cv1800b: Add sysreset driver for cv1800b SoC

Add sysreset driver for cv1800b SoC

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agommc: cv1800b: Add transmit tap delay config to fix write error
Kongyang Liu [Tue, 16 Apr 2024 07:31:05 +0000 (15:31 +0800)]
mmc: cv1800b: Add transmit tap delay config to fix write error

Currently, only the receive delay is configured while the transmit delay
is not set, which may result in errors when writing to the file. This issue
can be resolved by setting PHY_TX_SRC_INVERT to SDHCI_PHY_TX_RX_DLY.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 weeks agoriscv: andesv5: Set default cache line size to 64-bytes
Yu Chien Peter Lin [Thu, 11 Apr 2024 09:29:45 +0000 (17:29 +0800)]
riscv: andesv5: Set default cache line size to 64-bytes

The instruction and data cache line sizes of Andes core
are 64-byte. Select SYS_CACHE_SHIFT_6 for RISCV_NDS so
the SYS_CACHELINE_SIZE is enabled with a default value.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
7 weeks agoefi_loader: pass GUID by address to efi_dp_from_lo
Heinrich Schuchardt [Fri, 26 Apr 2024 14:13:08 +0000 (16:13 +0200)]
efi_loader: pass GUID by address to efi_dp_from_lo

We should not pass GUIDs by value as this requires copying.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_loader: fix description efi_dp_shorten
Heinrich Schuchardt [Fri, 26 Apr 2024 10:09:38 +0000 (12:09 +0200)]
efi_loader: fix description efi_dp_shorten

Use Sphinx style for return value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_selftest: add tests for QueryVariableInfo at boottime
Ilias Apalodimas [Thu, 25 Apr 2024 05:18:21 +0000 (08:18 +0300)]
efi_selftest: add tests for QueryVariableInfo at boottime

Previous patches added QueryVariableInfo at runtime tests and
split a common function that can be used at boottime. Weire it
up and run a similar set of tets. While at it move a test which is
checiking for 0 available storage in the common code

Add tests for
- Test QueryVariableInfo returns EFI_SUCCESS
- Test null pointers for the function arguments
- Test invalid combination of attributes

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_selftest: add tests for QueryVariableInfo at runtime
Ilias Apalodimas [Thu, 25 Apr 2024 05:18:20 +0000 (08:18 +0300)]
efi_selftest: add tests for QueryVariableInfo at runtime

Since we support QueryVariableInfo at runtime now add the relevant
tests. Since we want those to be reusable at bootime, add them
in a separate file

Add tests for
- Test QueryVariableInfo returns EFI_SUCCESS
- Test null pointers for the function arguments
- Test invalid combination of attributes

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_loader: enable QueryVariableInfo at runtime for file backed variables
Ilias Apalodimas [Thu, 25 Apr 2024 05:18:19 +0000 (08:18 +0300)]
efi_loader: enable QueryVariableInfo at runtime for file backed variables

Since commit c28d32f946f0 ("efi_loader: conditionally enable SetvariableRT")
we are enabling the last bits of missing runtime services.
Add support for QueryVariableInfo which we already support at boottime
and we just need to mark some fucntions available at runtime and move
some checks around.

It's worth noting that pointer checks for maxmimum and remaining
variable storage aren't when we store variables on the RPMB, since the
Secure World backend is already performing them.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_loader: address coverity report 492766 for dead code
Ilias Apalodimas [Tue, 23 Apr 2024 05:38:06 +0000 (08:38 +0300)]
efi_loader: address coverity report 492766 for dead code

The check of the return code is already done a few lines above.
Although it doesn't cause any functional issues, remove the superfluous
checks

Addresses-Coverity-ID: 492766 Control flow issues  (DEADCODE)
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agodoc: correct description of 'env print -e'
Heinrich Schuchardt [Mon, 22 Apr 2024 20:00:56 +0000 (22:00 +0200)]
doc: correct description of 'env print -e'

If 'env print -e' is invoked without variable name, all UEFI variables are
listed.

Describe that 'env print -e' requires CONFIG_HEXDUMP=y to print content of
UEFI variables.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agoefi_loader: do not install dtb if bootmgr fails
Heinrich Schuchardt [Mon, 22 Apr 2024 09:03:10 +0000 (11:03 +0200)]
efi_loader: do not install dtb if bootmgr fails

If the UEFI boot manager fails there is no point in installing the
device-tree as a configuration table.

Unload image if device-tree cannot be installed.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agoefi_loader: improve error handling in try_load_entry()
Heinrich Schuchardt [Mon, 22 Apr 2024 08:41:00 +0000 (10:41 +0200)]
efi_loader: improve error handling in try_load_entry()

The image is not unloaded if a security violation occurs.

If efi_set_load_options() fails, we do not free the memory allocated for
the optional data. We do not unload the image.

* Unload the image if a security violation occurs.
* Free load_options if efi_set_load_options() fails.
* Unload the image if efi_set_load_options() fails.

Fixes: 53f6a5aa8626 ("efi_loader: Replace config option for initrd loading")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agocmd: terminate efidebug test bootmgr early on error
Heinrich Schuchardt [Sat, 20 Apr 2024 14:06:16 +0000 (16:06 +0200)]
cmd: terminate efidebug test bootmgr early on error

If efi_bootmgr_load() fails, there is no point in trying to start an image
that has not been loaded.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoefi_loader: superfluous efi_restore_gd after EFI_CALL
Heinrich Schuchardt [Fri, 19 Apr 2024 09:59:01 +0000 (11:59 +0200)]
efi_loader: superfluous efi_restore_gd after EFI_CALL

EFI_CALL() invokes __efi_entry_check() which executes set_gd(efi_gd).
There is no need to execute set_gd(efi_gd) again via efi_restore_gd().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoMerge patch series "Update PHYTEC SOM Detection"
Tom Rini [Mon, 29 Apr 2024 16:56:05 +0000 (10:56 -0600)]
Merge patch series "Update PHYTEC SOM Detection"

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

This patch series extends PHYTEC's SOM detection by minor
fixes, a generic helper function and a new valid flag.

Moreover, it adds a module to provide access to the SOM
detection for our TI AM6 products.

7 weeks agoboard: phytec: Add SOM detection for AM6x
Daniel Schultz [Fri, 19 Apr 2024 15:55:40 +0000 (08:55 -0700)]
board: phytec: Add SOM detection for AM6x

Add all functions to read each SOM option from the EEPROM
image and detect whether it's the correct product for this
image.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
7 weeks agoboard: phytec: common: Fix eepom is empty check
Daniel Schultz [Fri, 19 Apr 2024 15:55:39 +0000 (08:55 -0700)]
board: phytec: common: Fix eepom is empty check

The ptr variable is currently defined as int and sizeof
returns the size of the eeprom data struct as Byte (32 in total).

In case the eeprom is empty, the check, if the eeprom is empty,
will most likely stop after 8 iterations because it will continue
with the stack which should contain some data. Therefore, the
init function will detect an empty EEPROM as API0 and return with
the valid flag set to True.

Fixes: dc22188cdc8 ("board: phytec: Add common PHYTEC SoM detection")

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
7 weeks agoboard: phytec: check eeprom_data validity
Yannic Moog [Fri, 19 Apr 2024 15:55:38 +0000 (08:55 -0700)]
board: phytec: check eeprom_data validity

For all of the functions that access the eeprom_data, make sure these
data are valid. Use the valid member of the phytec_eeprom_data struct.
This fixes a bug where only the API revision check guarded against
accessing rubbish. But if API revision was e.g. 6, eeprom setup failed
before, but phytec_get_imx8m_eth would still happily access the data.

Fixes: dc22188cdc8 ("board: phytec: Add common PHYTEC SoM detection")

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
7 weeks agoboard: phytec: introduce eeprom struct member 'valid'
Yannic Moog [Fri, 19 Apr 2024 15:55:37 +0000 (08:55 -0700)]
board: phytec: introduce eeprom struct member 'valid'

Add a new nember to the eeprom_data that indicates whether the
associated data is valid or not. Make use of this new member in the
phytec_eeprom_data_init function by setting the valid value
appropriately.
Move the eeprom data to a new struct payload that holds
the payload of the eeprom.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
7 weeks agoboard: phytec: common: Generic "add extension" function
Daniel Schultz [Fri, 19 Apr 2024 15:55:36 +0000 (08:55 -0700)]
board: phytec: common: Generic "add extension" function

Add a generic function to apply overlays in our board code to not
implement the same logic in different PHYTEC products.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
7 weeks agoMerge patch series "*** Migrate some PHYTEC boards to OF_UPSTREAM ***"
Tom Rini [Mon, 29 Apr 2024 16:55:50 +0000 (10:55 -0600)]
Merge patch series "*** Migrate some PHYTEC boards to OF_UPSTREAM ***"

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

Migrate the boards I maintain to OF_UPSTREAM.

7 weeks agophycore-rk3288: Migrate to OF_UPSTREAM
Wadim Egorov [Fri, 19 Apr 2024 06:51:17 +0000 (08:51 +0200)]
phycore-rk3288: Migrate to OF_UPSTREAM

The phycore-rk3288 can be migrated to OF_UPSTREAM.
Drop redundant device tree files, update MAINTAINERS and
defconfig's DEFAULT_DEVICE_TREE for rockchip vendor prefix accordingly.
Move device tree nodes required for u-boot to rk3288-phycore-rdk-u-boot.dtsi
such as chosen, i2c_eeprom_id and it's alias.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
7 weeks agophycore-am64x: Migrate to OF_UPSTREAM
Wadim Egorov [Fri, 19 Apr 2024 06:51:16 +0000 (08:51 +0200)]
phycore-am64x: Migrate to OF_UPSTREAM

The phycore-am64x can be migrated to OF_UPSTREAM.
Drop redundant device tree files, update MAINTAINERS and
defconfig's DEFAULT_DEVICE_TREE for ti vendor prefix accordingly.
While at it, drop the redundant definitions of AM642_PHYBOARD_ELECTRA_DTB
& SPL_AM642_PHYBOARD_ELECTRA_DTB from the binman dtsi file.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
7 weeks agophycore-am62x: Migrate to OF_UPSTREAM
Wadim Egorov [Fri, 19 Apr 2024 06:51:15 +0000 (08:51 +0200)]
phycore-am62x: Migrate to OF_UPSTREAM

The phycore-am62x can be migrated to OF_UPSTREAM.
Drop redundant device tree files, update MAINTAINERS and
defconfig's DEFAULT_DEVICE_TREE for ti vendor prefix accordingly.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
7 weeks agoMerge patch series "Fix MMC tuning algorithm"
Tom Rini [Mon, 29 Apr 2024 16:55:34 +0000 (10:55 -0600)]
Merge patch series "Fix MMC tuning algorithm"

Judith Mendez <jm@ti.com> says:

The following patch series includes a MMC tuning algorithm
fix according to the following published paper [0].

This seris also includes fixes for OTAP/ITAP delay values
in j721e_4bit_sdhci_set_ios_post and for HS400 mode.

For DDR52 mode, also set ENDLL=1 and call am654_sdhci_setup_dll()
instead of am654_sdhci_setup_delay_chain() according to
device datasheet[1].

[0] https://www.ti.com/lit/an/spract9/spract9.pdf
[1] https://www.ti.com/lit/ds/symlink/am62p.pdf

7 weeks agommc: am654_sdhci: Fix ITAPDLY for HS400 timing
Judith Mendez [Thu, 18 Apr 2024 19:01:00 +0000 (14:01 -0500)]
mmc: am654_sdhci: Fix ITAPDLY for HS400 timing

At HS400 mode the ITAPDLY value is that from High Speed mode
which is incorrect and may cause boot failures.

The ITAPDLY for HS400 speed mode should be the same as ITAPDLY
as HS200 timing after tuning is executed. Add the functionality
to save ITAPDLY from HS200 tuning and save as HS400 ITAPDLY.

Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay")
Signed-off-by: Judith Mendez <jm@ti.com>
7 weeks agommc: am654_sdhci: Set ENDLL=1 for DDR52 mode
Judith Mendez [Thu, 18 Apr 2024 19:00:59 +0000 (14:00 -0500)]
mmc: am654_sdhci: Set ENDLL=1 for DDR52 mode

According to the device datasheet [0], ENDLL=1 for
DDR52 mode, so call am654_sdhci_setup_dll() and write
itapdly after since we do not carry out tuning.

[0] https://www.ti.com/lit/ds/symlink/am62p.pdf

Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay")
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 weeks agommc: am654_sdhci: Add itap_del_ena[] to store itapdlyena bit
Judith Mendez [Thu, 18 Apr 2024 19:00:58 +0000 (14:00 -0500)]
mmc: am654_sdhci: Add itap_del_ena[] to store itapdlyena bit

Set itap_del_ena if ITAPDLY is found in DT or if the tuning
algorithm was executed and found the optimal ITAPDLY. Add the
functionality to save ITAPDLYENA that can be referenced later
by storing the bit in array itap_del_ena[].

Signed-off-by: Judith Mendez <jm@ti.com>
7 weeks agommc: am654_sdhci: Fix OTAP/ITAP delay values
Nitin Yadav [Thu, 18 Apr 2024 19:00:57 +0000 (14:00 -0500)]
mmc: am654_sdhci: Fix OTAP/ITAP delay values

U-Boot is failing to boot class U1 UHS SD cards due to incorrect
OTAP and ITAP delay select values. Update OTAP and ITAP delay select
values from DT.

Fixes: c7d106b4eb3 ("mmc: am654_sdhci: Update output tap delay writes")
Signed-off-by: Nitin Yadav <n-yadav@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
7 weeks agommc: am654_sdhci: Add tuning algorithm for delay chain
Judith Mendez [Thu, 18 Apr 2024 19:00:56 +0000 (14:00 -0500)]
mmc: am654_sdhci: Add tuning algorithm for delay chain

Currently the sdhci_am654 driver only supports one tuning
algorithm which should be used only when DLL is enabled. The
ITAPDLY is selected from the largest passing window and the
buffer is viewed as a circular buffer.

The new tuning algorithm should be used when the delay chain
is enabled; the ITAPDLY is selected from the largest passing
window and the buffer is not viewed as a circular buffer.

This implementation is based off of the following paper: [1].

Also add support for multiple failing windows.

[1] https://www.ti.com/lit/an/spract9/spract9.pdf

Fixes: a759abf569d4 ("mmc: am654_sdhci: Add support for software tuning")
Signed-off-by: Judith Mendez <jm@ti.com>
7 weeks agoMerge patch series "upstream DT compatibility"
Tom Rini [Mon, 29 Apr 2024 16:55:17 +0000 (10:55 -0600)]
Merge patch series "upstream DT compatibility"

Caleb Connolly <caleb.connolly@linaro.org> says:

This is a subset of [1]. With more platform maintainers switching to
OF_UPSTREAM I didn't want to get in the way (it has also proven more
difficult than I hoped to remove only the fully compatible header
files).

This series removes only the dt-bindings headers which contain generic
data like GPIO flags, input event codes, etc.

It then implements support for building all DTBs for a vendor with
OF_UPSTREAM_BUILD_VENDOR. This removes the need to maintain a set list
of DTBs that can be built by U-Boot and opens up the possibility of new
boards becoming supported "by default" just by landing their DT
upstream.

[1]: https://lore.kernel.org/u-boot/20240321-b4-upstream-dt-headers-v2-0-1eac0df875fe@linaro.org

7 weeks agodts: support building all dtb files for a specific vendor
Caleb Connolly [Thu, 18 Apr 2024 18:39:58 +0000 (19:39 +0100)]
dts: support building all dtb files for a specific vendor

This adjusts OF_UPSTREAM to behave more like the kernel by allowing for
all the devicetree files for a given vendor to be compiled. This is
useful for Qualcomm in particular as most boards are supported by a
single U-Boot build just provided with a different DT.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Amlogic boards builds
7 weeks agodt-bindings: drop generic headers
Caleb Connolly [Thu, 18 Apr 2024 18:39:57 +0000 (19:39 +0100)]
dt-bindings: drop generic headers

Drop all the subsystem headers that are compatible with the headers in
dts/upstream.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
7 weeks agoarm: dts: imx6dl-brppt2: fix gpio.h include
Caleb Connolly [Thu, 18 Apr 2024 18:39:56 +0000 (19:39 +0100)]
arm: dts: imx6dl-brppt2: fix gpio.h include

The "include" directory was included in the include path... Remove it.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
7 weeks agoMerge patch series "Enable ICSSG Ethernet Driver for AM65x"
Tom Rini [Mon, 29 Apr 2024 16:54:46 +0000 (10:54 -0600)]
Merge patch series "Enable ICSSG Ethernet Driver for AM65x"

MD Danish Anwar <danishanwar@ti.com> says:

The series introduces device tree and config changes and AM65x
to enable ICSSG driver. The series also enables SPL_LOAD_FIT_APPLY_OVERLAY
for AM65x in order to load overlay over spl.

The ICSSG2 node is added in device tree overlay so that it remains in
sync with linux kernel.

This series has been tested on AM65x SR2.0, and the ICSSG interface is
able to ping / dhcp and boot kernel using tftp in uboot.

The users need to set env variables fw_storage_interface, fw_dev_part,
fw_ubi_mtdpart, fw_ubi_volume to indicate which storage medium and
partition they want to use to load firmware files from. By default the env
fw_storage_interface=mmc and fw_dev_part=1:2 but users can modify these
envs as per their requirements.

7 weeks agoboard: ti: am65x: Set fw_storage_interface and fw_dev_part ENVs
MD Danish Anwar [Tue, 16 Apr 2024 09:20:18 +0000 (14:50 +0530)]
board: ti: am65x: Set fw_storage_interface and fw_dev_part ENVs

When ICSSG driver is enabled (CONFIG_TI_ICSSG_PRUETH=y) set
storage_interface and fw_dev_part env variables.

These variables need be set appropriately in order to load differnet
ICSSG firmwares needed for ICSSG driver. By default the storage
interface is mmc and the partition is 1:2. User can modify this based on
their needs.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoboard: ti: am65x: Add check for k3-am654-icssg2 in board_fit_config_match()
MD Danish Anwar [Tue, 16 Apr 2024 09:20:17 +0000 (14:50 +0530)]
board: ti: am65x: Add check for k3-am654-icssg2 in board_fit_config_match()

When CONFIG_TI_ICSSG_PRUETH is enabled, add config name check for the
icssg2 overlay in board_fit_config_match() API.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoconfigs: am65x_evm_a53: add SPL_LOAD_FIT_APPLY_OVERLAY
MD Danish Anwar [Tue, 16 Apr 2024 09:20:16 +0000 (14:50 +0530)]
configs: am65x_evm_a53: add SPL_LOAD_FIT_APPLY_OVERLAY

We want SPL to apply DTB overlays (e.g. ICSSG2 overlay) so enable
SPL_LOAD_FIT_APPLY_OVERLAY.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoconfigs: am65x_evm_a53: Enable ICSSG Driver
MD Danish Anwar [Tue, 16 Apr 2024 09:20:15 +0000 (14:50 +0530)]
configs: am65x_evm_a53: Enable ICSSG Driver

Enable ICSSG driver in am65x_evm_a53_defconfig

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoarm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
MD Danish Anwar [Tue, 16 Apr 2024 09:20:14 +0000 (14:50 +0530)]
arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration

Add ICSSG2 overlay and configuration to tispl and u-boot images.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoarm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support
MD Danish Anwar [Tue, 16 Apr 2024 09:20:13 +0000 (14:50 +0530)]
arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support

ICSSG2 provides dual Gigabit Ethernet support.
Add ICSSG2 ethernet node to an overlay k3-am654-icssg2.dtso

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
7 weeks agoarm: mach-k3: am62ax: Fix typo in ROM data macro name
Andrew Davis [Fri, 26 Apr 2024 15:44:23 +0000 (10:44 -0500)]
arm: mach-k3: am62ax: Fix typo in ROM data macro name

s/ENTENDED/EXTENDED

Signed-off-by: Andrew Davis <afd@ti.com>
7 weeks ago.gitignore: add LTO generated file
Robert Marko [Tue, 23 Apr 2024 11:05:40 +0000 (13:05 +0200)]
.gitignore: add LTO generated file

Currently, keep-syms-lto.c is being generated if LTO is enabled but unlike
keep-syms-lto.o it is not being ignored, so lets add keep-syms-lto.* to
.gitignore.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
7 weeks agocmd: CONFIG_CMD_BLOBLIST must depend on CONFIG_BLOBLIST
Heinrich Schuchardt [Mon, 22 Apr 2024 13:50:10 +0000 (15:50 +0200)]
cmd: CONFIG_CMD_BLOBLIST must depend on CONFIG_BLOBLIST

With CONFIG_CMD_BLOBLIST=y, CONFIG_BLOBLIST=n linker errors occur:

    usr/bin/ld: cmd/bloblist.o: in function `do_bloblist_list':
    cmd/bloblist.c:27:(.text.do_bloblist_list+0x6):
    undefined reference to `bloblist_show_list'

    /usr/bin/ld: cmd/bloblist.o: in function `do_bloblist_info':
    cmd/bloblist.c:19:(.text.do_bloblist_info+0x6):
    undefined reference to `bloblist_show_stats'

Fixes: 4aed22762303 ("bloblist: Add a command")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agoarm: mach-k3: am642: Fix reset for workaround errata ID i2331
Andrew Davis [Thu, 18 Apr 2024 17:58:28 +0000 (12:58 -0500)]
arm: mach-k3: am642: Fix reset for workaround errata ID i2331

To workaround an issue in AM642 we reset the SoC in early boot. For that
we first probed the sysreset driver by calling uclass_get_device(). The
ti-sci sysreset driver is now probed during the ti-sci firmware probe.
Update this call to probe the firmware driver which will then probe
the sysreset driver allowing do_reset() to again function as expected.

Reported-by: Jonathan Humphreys <j-humphreys@ti.com>
Fixes: fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
Signed-off-by: Andrew Davis <afd@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: Kamlesh Gurudasani <kamlesh@ti.com>
7 weeks agomailmap: add entry for AKASHI Takahiro
Heinrich Schuchardt [Thu, 18 Apr 2024 14:11:12 +0000 (16:11 +0200)]
mailmap: add entry for AKASHI Takahiro

Akashi-san's Linaro email address in not valid anymore.

Cc: AKASHI Takahiro <akashi.tkhro@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoboard: toradex: verdin-am62: Remove not needed env variables
Francesco Dolcini [Thu, 18 Apr 2024 13:13:02 +0000 (15:13 +0200)]
board: toradex: verdin-am62: Remove not needed env variables

Remove not needed variables from environment.

 - boot_scripts is not needed, the default value is just fine and
   already includes boot.scr
 - setup variable used to be executed from some bootscript, however
   it's not required and there is no point on having this small helper
   here

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
7 weeks ago.gitignore: Add files produced by TI platform
Andrea Calabrese [Wed, 17 Apr 2024 16:24:34 +0000 (18:24 +0200)]
.gitignore: Add files produced by TI platform

Add files produced by compilation of TI platforms:

*.ti-secure(-rom)
*.map
*-board-config
custMpk.pem
*.bin_*
*.fit
*.itb
tispl.bin_unsigned

Signed-off-by: Andrea Calabrese <andrea.calabrese@amarulasolutions.com>
7 weeks agoarm: dts: verdin-am62: use gpio-hog for sleep moci
Stefan Eichenberger [Wed, 17 Apr 2024 08:39:21 +0000 (10:39 +0200)]
arm: dts: verdin-am62: use gpio-hog for sleep moci

In Linux, we allow sleep moci to be turned off when the carrier board
supports it and the system is in suspend. In U-Boot, however, we want
the sleep moci to be always on. So we use a gpio hog and disable the
regulator. This change is necessary because we switched to upstream
device tree files with commit c07bba7a2c7e ("verdin-am62: move verdin
am62 to OF_UPSTREAM"). A recent upstream patch removes the gpio hog from
the Linux device tree, so we need to add it to the u-boot dtsi. The
following patch will remove the gpio hog from the Linux device tree:
https://lore.kernel.org/linux-devicetree/20240301084901.16656-1-eichest@gmail.com/
The U-Boot patch can be applied without it and will not break the build.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
7 weeks agoboard: ti: j721e: Add support for both esm probe
Udit Kumar [Wed, 17 Apr 2024 04:36:50 +0000 (10:06 +0530)]
board: ti: j721e: Add support for both esm probe

At present only MCU domain ESM is probed, this means errors
occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn.
MCU ESM accepts SOC_SAFETY_ERRORn signal as Error
event and propagate to MCU_SAFETY_ERRORn.[0]

Therefore adding support to probe both main domain and mcu
domain ESM.

[0]: https://www.ti.com/lit/zip/spruil1
spruil1c.pdf from zip
Figure 12-1244. ESM Modules Overview

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
7 weeks agoconfigs: am62px_evm_a53_defconfig: Enable MMC UHS config option
Judith Mendez [Tue, 16 Apr 2024 16:21:15 +0000 (11:21 -0500)]
configs: am62px_evm_a53_defconfig: Enable MMC UHS config option

Enable MMC UHS support for to allow to enter the UHS
modes for MMC1.

Signed-off-by: Judith Mendez <jm@ti.com>
Acked-by: Bryan Brattlof <bb@ti.com>
7 weeks agoMakefile: don't add -Wno-maybe-uninitialized twice
Heinrich Schuchardt [Tue, 16 Apr 2024 07:35:24 +0000 (09:35 +0200)]
Makefile: don't add -Wno-maybe-uninitialized twice

Avoid adding the same flag to KBUILD_CFLAGS twice.

Fixes: 8602d97ca2cf ("Makefile: avoid false positive -Wmaybe-uninitialized")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
7 weeks agoarm: dts: k3-am625-verdin: add tifsstub to tispl.bin
Parth Pancholi [Mon, 15 Apr 2024 07:54:58 +0000 (09:54 +0200)]
arm: dts: k3-am625-verdin: add tifsstub to tispl.bin

Adds tifsstub binaries, this is required for deepsleep functionality.

This implements the same change as commit 128f81290b7d ("arm: dts: k3:
binman: am625: add support for signing TIFSSTUB Images") did for TI AM62
SK board.

Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 weeks agoMerge tag 'u-boot-imx-master-20240429' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 29 Apr 2024 14:35:02 +0000 (08:35 -0600)]
Merge tag 'u-boot-imx-master-20240429' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Fix missing fdt_fixup on colibri-imx(6ull|imx7).
- Enable PCIe and NVMe on DH i.MX8M Plus DHCOM PDK3.
- Convert i.MX8M flash.bin image generation to binman
- Convert imx93-11x11-evk to OF_UPSTREAM.

7 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-pmic
Tom Rini [Mon, 29 Apr 2024 14:34:45 +0000 (08:34 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-pmic

8 weeks agopower: pmic: tps65941: Update compatible to aling with kernel DT
Udit Kumar [Fri, 19 Apr 2024 06:00:16 +0000 (11:30 +0530)]
power: pmic: tps65941: Update compatible to aling with kernel DT

Linux kernel driver drivers/mfd/tps6594-i2c.c is using different
name for compatible for tps6594 family PMIC.
After sync of Linux kernel DT to u-boot for TI platforms
J7200, J721S2 and J784S4 PMIC is no longer getting probed.

So updating compatible field to align with Linux driver and DT.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 weeks agopower: regulator: tps65941: Add TPS65224 PMIC regulator support
Bhargav Raviprakash [Mon, 22 Apr 2024 09:49:09 +0000 (09:49 +0000)]
power: regulator: tps65941: Add TPS65224 PMIC regulator support

Reuse TPS65941 regulator driver to adds support for
TPS65224 PMIC's regulators. 4 BUCKs and 3 LDOs, where
BUCK1 and BUCK2 can be configured in dual phase mode.

Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 weeks agopower: regulator: tps65941: use function callbacks for conversion ops
Bhargav Raviprakash [Mon, 22 Apr 2024 09:49:01 +0000 (09:49 +0000)]
power: regulator: tps65941: use function callbacks for conversion ops

Use function callbacks for volt2val, val2volt and slewrate lookups.
This makes it easier to add support for TPS65224 PMIC regulators.

Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 weeks agopower: regulator: tps65941: Added macros for BUCK ID
Bhargav Raviprakash [Mon, 22 Apr 2024 09:48:53 +0000 (09:48 +0000)]
power: regulator: tps65941: Added macros for BUCK ID

Adds macros for buck and ldo ids and switched to using switch
case instead of if else in probe functions. Helps in adding
support for TPS65224 PMIC.

Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 weeks agopower: pmic: tps65941: Add TI TPS65224 PMIC
Bhargav Raviprakash [Mon, 22 Apr 2024 09:48:46 +0000 (09:48 +0000)]
power: pmic: tps65941: Add TI TPS65224 PMIC

Adds compatible and data field values of TPS65224 driver in
TPS65941 PMIC driver.

Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 weeks agopower: tps65941: Add macros of TPS65224 PMIC
Bhargav Raviprakash [Mon, 22 Apr 2024 09:48:33 +0000 (09:48 +0000)]
power: tps65941: Add macros of TPS65224 PMIC

Re-use the TPS65941 PMIC driver for TPS65224 PMIC.
Add additional macros of TPS65224 to aid in the driver
re-use.

Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>