]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
14 months agoboard: dh_stm32mp1: Only print board code with CONFIG_SPL_DISPLAY_PRINT
Harald Seiler [Wed, 27 Sep 2023 12:46:25 +0000 (14:46 +0200)]
board: dh_stm32mp1: Only print board code with CONFIG_SPL_DISPLAY_PRINT

Ensure that the SoM and board code information is only printed when
CONFIG_SPL_DISPLAY_PRINT is set.

Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
14 months agoram: stm32mp1: Only print RAM config with CONFIG_SPL_DISPLAY_PRINT
Harald Seiler [Wed, 27 Sep 2023 12:44:40 +0000 (14:44 +0200)]
ram: stm32mp1: Only print RAM config with CONFIG_SPL_DISPLAY_PRINT

Ensure that the RAM configuration line is only printed when
CONFIG_SPL_DISPLAY_PRINT is set.

Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add RNG node for STM32MP13x platforms
Gatien Chevallier [Tue, 19 Sep 2023 15:27:59 +0000 (17:27 +0200)]
ARM: dts: stm32: add RNG node for STM32MP13x platforms

Add RNG node for STM32MP13x platforms.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agorng: stm32: Implement custom RNG configuration support
Gatien Chevallier [Tue, 19 Sep 2023 15:27:58 +0000 (17:27 +0200)]
rng: stm32: Implement custom RNG configuration support

STM32 RNG configuration should best fit the requirements of the
platform. Therefore, put a platform-specific RNG configuration
field in the platform data. Default RNG configuration for STM32MP13
is the NIST certified configuration [1].

While there, fix and the RNG init sequence to support all RNG
versions.

[1] https://csrc.nist.gov/projects/cryptographic-module-validation-program/entropy-validations/certificate/53

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agorng: stm32: add error concealment sequence
Gatien Chevallier [Tue, 19 Sep 2023 15:27:57 +0000 (17:27 +0200)]
rng: stm32: add error concealment sequence

Seed errors can occur when using the hardware RNG. Implement the
sequences to handle them. This avoids irrecoverable RNG state.

Try to conceal seed errors when possible. If, despite the error
concealing tries, a seed error is still present, then return an error.

A clock error does not compromise the hardware block and data can
still be read from RNG_DR. Just warn that the RNG clock is too slow
and clear RNG_SR.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agorng: stm32: add RNG clock frequency restraint
Gatien Chevallier [Tue, 19 Sep 2023 15:27:56 +0000 (17:27 +0200)]
rng: stm32: add RNG clock frequency restraint

In order to ensure a good RNG quality and compatibility with
certified RNG configuration, add RNG clock frequency restraint.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agorng: stm32: Implement configurable RNG clock error detection
Gatien Chevallier [Tue, 19 Sep 2023 15:27:55 +0000 (17:27 +0200)]
rng: stm32: Implement configurable RNG clock error detection

RNG clock error detection is now enabled if the "clock-error-detect"
property is set in the device tree.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoconfigs: default activate CONFIG_RNG_STM32 for STM32MP13x platforms
Gatien Chevallier [Tue, 19 Sep 2023 15:27:54 +0000 (17:27 +0200)]
configs: default activate CONFIG_RNG_STM32 for STM32MP13x platforms

Default embed this configuration. If OP-TEE PTA RNG is exposed, it means
that the RNG is managed by the secure world. Therefore, the RNG node
should be disabled in the device tree as an access would be denied
by the hardware firewall.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agorng: stm32: rename STM32 RNG driver
Gatien Chevallier [Tue, 19 Sep 2023 15:27:53 +0000 (17:27 +0200)]
rng: stm32: rename STM32 RNG driver

Rename the RNG driver as it is usable by other STM32 platforms
than the STM32MP1x ones. Rename CONFIG_RNG_STM32MP1 to
CONFIG_RNG_STM32

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32f429: put can2 in secondary mode
Dario Binacchi [Sun, 3 Sep 2023 20:33:52 +0000 (22:33 +0200)]
ARM: dts: stm32f429: put can2 in secondary mode

commit 6b443faa313c519db755ff90be32758fd9c66453 Linux upstream.

This is a preparation patch for the upcoming support to manage CAN
peripherals in single configuration.

The addition ensures backwards compatibility.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20230427204540.3126234-3-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add pin map for CAN controller on stm32f4
Dario Binacchi [Sun, 3 Sep 2023 20:33:51 +0000 (22:33 +0200)]
ARM: dts: stm32: add pin map for CAN controller on stm32f4

commit 559a6e75b4bcf0fc9e41d34865e72cf742f67d8e Linux upstream.

Add pin configurations for using CAN controller on stm32f469-disco
board. They are located on the Arduino compatible connector CN5 (CAN1)
and on the extension connector CN12 (CAN2).

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20230328073328.3949796-5-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add CAN support on stm32f429
Dario Binacchi [Sun, 3 Sep 2023 20:33:50 +0000 (22:33 +0200)]
ARM: dts: stm32: add CAN support on stm32f429

commit 7355ad1950f41e755e6dc451834be3b94f82acd4 Linux upstream.

Add support for bxcan (Basic eXtended CAN controller) to STM32F429. The
chip contains two CAN peripherals, CAN1 the primary and CAN2 the secondary,
that share some of the required logic like clock and filters. This means
that the secondary CAN can't be used without the primary CAN.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20230328073328.3949796-4-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoconfigs: stm32f769-disco: Enable VIDEO_LOGO flag
Patrice Chotard [Fri, 25 Aug 2023 16:24:39 +0000 (18:24 +0200)]
configs: stm32f769-disco: Enable VIDEO_LOGO flag

The patch removes the legacy mode of displaying the ST logo and adopts
the approach introduced by the commit 284b08fb51b6 ("board: stm32mp1: add
splash screen with stmicroelectronics logo").

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
14 months agoRemove the hardcoded ST logo no longer in use
Dario Binacchi [Sun, 20 Aug 2023 16:24:46 +0000 (18:24 +0200)]
Remove the hardcoded ST logo no longer in use

The patch removes the hardcoded ST logo from the code, as it is no
longer used.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoboard: stm32f746-disco: refactor the display of the ST logo
Dario Binacchi [Sun, 20 Aug 2023 16:24:45 +0000 (18:24 +0200)]
board: stm32f746-disco: refactor the display of the ST logo

The patch removes the legacy mode of displaying the ST logo and adopts
the approach introduced by the commit 284b08fb51b6 ("board: stm32mp1: add
splash screen with stmicroelectronics logo"). It was necessary to use a
specific logo for the stm32f746-disco board.

Furthermore, the previous version didn't properly center the logo, hiding
its upper part.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoconfigs: stm32f746-disco: limit resolution to 480x272
Dario Binacchi [Sun, 20 Aug 2023 16:24:44 +0000 (18:24 +0200)]
configs: stm32f746-disco: limit resolution to 480x272

The patch fixes the y-resolution, which was causing the creation of a
framebuffer larger than actually needed, resulting in memory waste.

Fixes: cc1b0e7b8e55b ("board: Add display to STM32F746 SoC discovery board")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: support display on stm32f746-disco board
Dario Binacchi [Sun, 3 Sep 2023 20:48:49 +0000 (22:48 +0200)]
ARM: dts: stm32: support display on stm32f746-disco board

The patch applies the changes from Linux commit 10a970bc3ebfa ("ARM: dts:
stm32: support display on stm32f746-disco board") and removes the same
settings from stm32f746-disco-u-boot.dtsi.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f746-disco
Dario Binacchi [Sun, 3 Sep 2023 20:48:48 +0000 (22:48 +0200)]
ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f746-disco

commit e4e724099f04072053cf411456e3e9aae48c4af1 Linux upstream.

In the schematics of document UM1907, the power supply for the micro SD
card is the same 3v3 voltage that is used to power other devices on the
board. By generalizing the name of the voltage regulator, it can be
referenced by other nodes in the device tree without creating
misunderstandings.

This patch is preparatory for future developments.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add pin map for LTDC on stm32f7
Dario Binacchi [Sun, 3 Sep 2023 20:48:47 +0000 (22:48 +0200)]
ARM: dts: stm32: add pin map for LTDC on stm32f7

commit ba287d1a0137702a224b1f48673d529257b3c4bf Linux upstream.

Add pin configurations for using LTDC (LCD-tft Display Controller) on
stm32f746-disco board.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add ltdc support on stm32f746 MCU
Dario Binacchi [Sun, 3 Sep 2023 20:48:46 +0000 (22:48 +0200)]
ARM: dts: stm32: add ltdc support on stm32f746 MCU

The patch applies the changes from Linux commit 008ef8b3a1a00 ("Add LTDC
(Lcd-tft Display Controller) support") and removes the same settings
from stm32f746-disco-u-boot.dtsi.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add touchscreen on stm32f746-disco board
Dario Binacchi [Sun, 3 Sep 2023 20:48:45 +0000 (22:48 +0200)]
ARM: dts: stm32: add touchscreen on stm32f746-disco board

commit f0215440069c4fb12958d2d321e05faa2708a11d Linux upstream.

The patch adds support for touchscreen on the stm32f746-disco board.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add pin map for i2c3 controller on stm32f7
Dario Binacchi [Sun, 3 Sep 2023 20:48:44 +0000 (22:48 +0200)]
ARM: dts: stm32: add pin map for i2c3 controller on stm32f7

commit 0637e66f8250c61f75042131fcb7f88ead2ad436 Linux upstream.

Add pin configurations for using i2c3 controller on stm32f7.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: use RCC macro for CRC node on stm32f746
Dario Binacchi [Sun, 3 Sep 2023 20:48:43 +0000 (22:48 +0200)]
ARM: dts: stm32: use RCC macro for CRC node on stm32f746

commit 7a5f349e592c254f3c1ac34665b6c3905576efc2 Linux upstream.

The patch replaces the number 12 with the appropriate numerical constant
already defined in the file stm32f7-rcc.h.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add CAN support on stm32f746
Dario Binacchi [Sun, 3 Sep 2023 20:48:42 +0000 (22:48 +0200)]
ARM: dts: stm32: add CAN support on stm32f746

commit 0920ccdf41e3078a4dd2567eb905ea154bc826e6 Linux upstream.

Add support for bxcan (Basic eXtended CAN controller) to STM32F746. The
chip contains three CAN peripherals, CAN1 and CAN2 in dual peripheral
configuration and CAN3 in single peripheral configuration:
- Dual CAN peripheral configuration:
  * CAN1: Primary bxCAN for managing the communication between a secondary
    bxCAN and the 512-byte SRAM memory.
  * CAN2: Secondary bxCAN with no direct access to the SRAM memory.
  This means that the two bxCAN cells share the 512-byte SRAM memory and
  CAN2 can't be used without enabling CAN1.
- Single CAN peripheral configuration:
  * CAN3: Primary bxCAN with dedicated Memory Access Controller unit and
    512-byte SRAM memory.

 -------------------------------------------------------------------------
| features | CAN1              | CAN2               | CAN 3               |
 -------------------------------------------------------------------------
| SRAM     | 512-byte shared between CAN1 & CAN2    | 512-byte            |
 -------------------------------------------------------------------------
| Filters  | 26 filters shared between CAN1 & CAN2  | 14 filters          |
 -------------------------------------------------------------------------

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20230427204540.3126234-6-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoARM: dts: stm32: add pin map for CAN controller on stm32f7
Dario Binacchi [Sun, 3 Sep 2023 20:48:41 +0000 (22:48 +0200)]
ARM: dts: stm32: add pin map for CAN controller on stm32f7

commit 011644249686f2675e142519cd59e81e04cfc231 Linux upstream.

Add pin configurations for using CAN controller on stm32f7.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20230427204540.3126234-4-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agodt-bindings: mfd: stm32f7: Add binding definition for CAN3
Dario Binacchi [Sun, 3 Sep 2023 20:48:40 +0000 (22:48 +0200)]
dt-bindings: mfd: stm32f7: Add binding definition for CAN3

commit 8f3ef556f8e1a670895f59ef3f01e4e26edd63e3 Linux upstream.

Add binding definition for CAN3 peripheral.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230423172528.1398158-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
14 months agoPrepare v2023.10
Tom Rini [Mon, 2 Oct 2023 14:39:59 +0000 (10:39 -0400)]
Prepare v2023.10

Signed-off-by: Tom Rini <trini@konsulko.com>
14 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 2 Oct 2023 14:35:27 +0000 (10:35 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
14 months agoMAINTAINERS: ufs: Change Bhupesh's email address
Bhupesh Sharma [Fri, 15 Sep 2023 18:14:41 +0000 (23:44 +0530)]
MAINTAINERS: ufs: Change Bhupesh's email address

Set my current personal email in the MAINTAINERS file.

Signed-off-by: Bhupesh Sharma <bhupesh.linux@gmail.com>
14 months agoMerge tag 'u-boot-at91-fixes-2023.10-b' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 29 Sep 2023 14:40:34 +0000 (10:40 -0400)]
Merge tag 'u-boot-at91-fixes-2023.10-b' of https://source.denx.de/u-boot/custodians/u-boot-at91

Second set of u-boot-atmel fixes for the 2023.10 cycle:

Two small fixes , one for an array not initialized and the second one
fixes an error case when a DT property is missing for the atmel NAND
driver.

14 months agoclk: at91: Fix initializing arrays
Francois Berder [Sun, 24 Sep 2023 09:58:54 +0000 (11:58 +0200)]
clk: at91: Fix initializing arrays

Arrays are not cleared entirely because ARRAY_SIZE
returns the number of elements in an array, not the size
in bytes.
This commit fixes the calls to memset by providing the
array size in bytes instead of the number of elements
in the array.

Signed-off-by: Francois Berder <fberder@outlook.fr>
14 months agoMerge tag 'doc-2023-10-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 29 Sep 2023 11:49:57 +0000 (07:49 -0400)]
Merge tag 'doc-2023-10-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc5-3

Documentation:

* describe that partition numbers are hexadecimal in load command
* remove obsolete half sentence in tools/binman/binman.rst

14 months agoMerge branch '2023-09-28-assorted-minor-fixes'
Tom Rini [Fri, 29 Sep 2023 11:49:24 +0000 (07:49 -0400)]
Merge branch '2023-09-28-assorted-minor-fixes'

- Fixes for two board builds and a script fix for many TI platforms

14 months agobinman: doc: Remove incomplete sentence
Heinrich Schuchardt [Tue, 19 Sep 2023 10:02:22 +0000 (12:02 +0200)]
binman: doc: Remove incomplete sentence

This is the difference between version 1 and 2 of Massimo's patch:

binman: doc: fix reference tag placement for Logging section
v2: https://lore.kernel.org/u-boot/20230913161633.999542-1-massimo.pegorer+oss@gmail.com/
v1: https://lore.kernel.org/u-boot/20230909135235.21242-1-massimo.pegorer+oss@gmail.com/

Fixes: 0f40e23fd22 ("binman: add documentation for binman sign option")
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
14 months agodoc: usage: load: document part as hexadecimal
Mickaël Tansorier [Fri, 15 Sep 2023 22:11:53 +0000 (00:11 +0200)]
doc: usage: load: document part as hexadecimal

`part` option is in hexadecimal, so information is missing in usage
documentation.

Callgraph for `part` parsing is :
do_load -> fs_set_blk_dev -> part_get_info_by_dev_and_name_or_num ->
blk_get_device_part_str -> hextoul (This is why it is hexadecimal)

Signed-off-by: Mickaël Tansorier <mickael.tansorier@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Reviewed-by: Simon Glass <sjg@chromium.org>
14 months agoconfigs: iot2050: Disable CONFIG_CONSOLE_MUX
Jan Kiszka [Wed, 27 Sep 2023 17:22:04 +0000 (19:22 +0200)]
configs: iot2050: Disable CONFIG_CONSOLE_MUX

We only have serial as console option, and leaving this on turns on
SYS_CONSOLE_IS_IN_ENV which is also not true for these devices, leaving
an ugly

In:    No input devices available!
Out:   No output devices available!
Err:   No error devices available!

behind.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
14 months agosmegw01: Fix inverted CONFIG_SYS_BOOT_LOCKED logic
Eduard Strehlau [Mon, 25 Sep 2023 16:32:59 +0000 (13:32 -0300)]
smegw01: Fix inverted CONFIG_SYS_BOOT_LOCKED logic

CONFIG_SYS_BOOT_LOCKED means that a restricted boot environment will
be used. In this case, hab_auth_img_or_fail should be called to prevent
U-Boot to continue running when the fitImage authentication fails.

Fix the logic accordingly.

Additionally, select CONFIG_SYS_BOOT_LOCKED by default.

Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
14 months agoenv: ti: ti_common.env: Fix get_overlaystring for FIT Image
Manorit Chawdhry [Mon, 25 Sep 2023 06:23:42 +0000 (11:53 +0530)]
env: ti: ti_common.env: Fix get_overlaystring for FIT Image

After the refactor with conf- nodes in fitImage, overlaystring wasn't
didn't handle the new conf- nodes in FIT Booting. Fix get_overlaystring
to handle conf- nodes.

Fixes: 837833a724b7 ("environment: ti: Add get_fit_config command to get FIT config string")
Reported-by: Aniket Limaye <a-limaye@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
15 months agomtd: nand: raw: atmel: Add error handling when rb-gpios missing
Alexander Dahl [Fri, 22 Sep 2023 09:08:56 +0000 (11:08 +0200)]
mtd: nand: raw: atmel: Add error handling when rb-gpios missing

Adapt behaviour to Linux kernel driver.

The return value of gpio_request_by_name_nodev() was not checked before,
and thus in case 'rb-gpios' was missing in DT, rb.type was set to
ATMEL_NAND_GPIO_RB nevertheless, leading to output like this for
example (on sam9x60-curiosity with the line removed from dts):

    NAND:  Could not find valid ONFI parameter page; aborting
    device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
    Macronix NAND 512MiB 3,3V 8-bit
    512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 64
    atmel-nand-controller nand-controller: NAND scan failed: -22
    Failed to probe nand driver (err = -22)
    Failed to initialize NAND controller. (error -22)
    0 MiB

Note: not having that gpio assigned in dts is possible, the driver does
not override nand_chip->dev_ready() then and a generic solution is used.

Fixes: 6a8dfd57220d ("nand: atmel: Add DM based NAND driver")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
15 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 26 Sep 2023 13:45:41 +0000 (09:45 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Fix VisionFive2 booting issue by providing the correct FDT.

15 months agoriscv: set fdtfile on VisionFive 2
Heinrich Schuchardt [Thu, 7 Sep 2023 11:21:28 +0000 (13:21 +0200)]
riscv: set fdtfile on VisionFive 2

Multiple revisions of the StarFive VisionFive 2 board exist. They can be
identified by reading their EEPROM.

Linux uses two differently named device-tree files. To load the correct
device-tree we need to set $fdtfile to the device-tree file name that
matches the board revision.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
15 months agoMerge tag 'u-boot-imx-20230923' of https://source.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Sun, 24 Sep 2023 21:15:31 +0000 (17:15 -0400)]
Merge tag 'u-boot-imx-20230923' of https://source.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2023.10
-----------------

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

15 months agoMerge tag 'dm-pull-23sep23' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 24 Sep 2023 21:15:15 +0000 (17:15 -0400)]
Merge tag 'dm-pull-23sep23' of https://source.denx.de/u-boot/custodians/u-boot-dm

trace: correct format of flyrecord
minor bug fixes

15 months agosmegw01: Use CONFIG_SYS_LOAD_ADDR for loading fitImage
Eduard Strehlau [Wed, 20 Sep 2023 10:49:08 +0000 (07:49 -0300)]
smegw01: Use CONFIG_SYS_LOAD_ADDR for loading fitImage

Set CONFIG_SYS_LOAD_ADDR=0x88000000 and use this address for
loading fitImage.

Also pass the standard CONFIG_BOOTFILE option to indicate
the fitImage file.

Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agoimx7: Disable CAAM Job Ring 0
Fabio Estevam [Tue, 12 Sep 2023 15:11:00 +0000 (12:11 -0300)]
imx7: Disable CAAM Job Ring 0

Trying to boot a fitImage after a successful hab_auth_img operation
causes the following error:

 ## Loading kernel from FIT Image at 88000000 ...
   Using 'conf-imx7d-smegw01.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8800010c
     Data Size:    9901752 Bytes = 9.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80800000
     Entry Point:  0x80800000
     Hash algo:    sha256
     Hash value:   28f8779bbf010780f16dd3d84ecb9b604c44c5c2cf7acd098c264a2d3f68e969
   Verifying Hash Integrity ... sha256Error in SEC deq
   CAAM was not setup properly or it is faulty error!

The reason for this error is that the BootROM uses the CAAM Job Ring 0,
so disable its node in U-Boot to avoid the resource conflict.

imx8m dtsi files also have the Job Ring 0 disable since the following
kernel commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch?h=v6.5&id=dc9c1ceb555ff661e6fc1081434600771f29657c

For a temporary solution, disable the Job Ring 0 in imx7s-u-boot.dtsi.

Reported-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agoimx: hab: Explain that ivt_offset is optional
Fabio Estevam [Thu, 7 Sep 2023 01:47:27 +0000 (22:47 -0300)]
imx: hab: Explain that ivt_offset is optional

The ivt_offset parameter is optional for both hab_auth_img_or_fail
and hab_auth_img commands.

Document it in their usage texts to make it clearer.

Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agoimx: hab: Improve the hab_auth_img_or_fail usage text
Fabio Estevam [Thu, 7 Sep 2023 01:47:26 +0000 (22:47 -0300)]
imx: hab: Improve the hab_auth_img_or_fail usage text

Split the hab_auth_img_or_fail usage text in two sentences to make it
clearer.

Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agoimx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
Eduard Strehlau [Thu, 7 Sep 2023 01:47:25 +0000 (22:47 -0300)]
imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset

Since commit ea91031b2232 ("imx: hab: extend hab_auth_img to calculate
ivt_offset"), it is possible to call the hab_auth_img command without the
last ivt_offset argument.

Currently, calling hab_auth_img_or_fail without the last
ivt_offset parameter causes a failure and the command usage text is shown.

Fix this problem by adjusting the argc logic to allow
calling hab_auth_img_or_fail with only the address and size parameters.

This way, both hab_auth_img and hab_auth_img_or_fail have the same
behavior with respect to the allowed number of command parameters.

Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agomach-imx: bootaux: fix building with disabled bootelf
Oleksandr Suvorov [Thu, 31 Aug 2023 14:03:52 +0000 (17:03 +0300)]
mach-imx: bootaux: fix building with disabled bootelf

If CMD_ELF disabled and IMX_BOOTAUX enabled, the u-boot building ends
up with a linking error [1]. Select LIB_ELF to fix the building
issue.

[1]
ld: /tmp/ccaF1rpv.ltrans0.ltrans.o: in function `do_bootaux':
arch/arm/mach-imx/imx_bootaux.c:108: undefined reference to `valid_elf_image'

Fixes: c0f037f6a2a ("mach-imx: bootaux: elf firmware support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
15 months agotrace: Fix alignment logic in flyrecord header
Michal Simek [Fri, 15 Sep 2023 12:12:05 +0000 (14:12 +0200)]
trace: Fix alignment logic in flyrecord header

Current alignment which is using 16 bytes is not correct in connection to
trace_clocks description and it's length.
That's why use start_addr variable and record proper size based on used
entries.

Fixes: be16fc81b2ed ("trace: Update proftool to use new binary format").
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agotrace: Move trace_clocks description above record offset calculation
Michal Simek [Fri, 15 Sep 2023 12:12:04 +0000 (14:12 +0200)]
trace: Move trace_clocks description above record offset calculation

Flyrecord tracing data are page aligned that's why it is necessary to
calculate alignment properly. Because trace_clocks description is the part
of record length it is necessary to have information about length earlier.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agotrace: Use 64bit variable for start and len
Michal Simek [Fri, 15 Sep 2023 12:12:03 +0000 (14:12 +0200)]
trace: Use 64bit variable for start and len

tputq() requires variables to have 64bit width that's why make them 64bit
to clean alignment requirement.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agopatman: Respect include directive on Git config lookup
Fei Shao [Fri, 8 Sep 2023 14:15:59 +0000 (22:15 +0800)]
patman: Respect include directive on Git config lookup

People may put their user name and email in a local config file and
reference it by the include.* directives, however `git config --global`
doesn't look up the included configs by default.

Enable the --includes option explicitly to support such use cases.

Signed-off-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agosandbox: test: Fix typo in test.dts
Michal Simek [Thu, 7 Sep 2023 12:55:48 +0000 (14:55 +0200)]
sandbox: test: Fix typo in test.dts

s/parititon/partition/

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agobinman: Fix SyntaxWarning: invalid escape sequence '\('
Rong Tao [Tue, 5 Sep 2023 11:41:04 +0000 (19:41 +0800)]
binman: Fix SyntaxWarning: invalid escape sequence '\('

Reproduct warning:

    $ git clean -dfx
    $ make CROSS_COMPILE="" qemu-x86_64_defconfig
    $ make -j8
    ...
    u-boot/tools/binman/etype/section.py:25:
    SyntaxWarning: invalid escape sequence '\('
    """Entry that contains other entries

Signed-off-by: Rong Tao <rongtao@cestc.cn>
15 months agobuildman: Fix full help for Python 3.8
Simon Glass [Mon, 4 Sep 2023 15:54:59 +0000 (09:54 -0600)]
buildman: Fix full help for Python 3.8

With Python versions older than 3.9 Buildman produces an error on
start-up. Fix this with a workaround for importlib.

There is already a workaround for v3.6 but I am not sure if that is still
functioning.

Signed-off-by: Simon Glass <sjg@chromium.org>
15 months agotools: Fix patman launcher script.
Maxim Cournoyer [Fri, 1 Sep 2023 05:05:12 +0000 (01:05 -0400)]
tools: Fix patman launcher script.

There is no "run_patman" procedure in patman's __main__.py file, which
would cause the following error at execution:

  "AttributeError: module 'patman.__main__' has no attribute 'run_patman'"

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoMerge branch '2023-09-22-assorted-bugfixes'
Tom Rini [Fri, 22 Sep 2023 22:25:37 +0000 (18:25 -0400)]
Merge branch '2023-09-22-assorted-bugfixes'

- A few driver fixes and MAINTAINER updates

15 months agoMAINTAINERS: Step up as maintainers of UniPhier SoC platform
Kunihiko Hayashi [Fri, 22 Sep 2023 08:54:09 +0000 (17:54 +0900)]
MAINTAINERS: Step up as maintainers of UniPhier SoC platform

Update maintainers for UniPhier SoC platform.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
15 months agopico-imx7d: Remove Vanessa from MAINTAINERS
Fabio Estevam [Tue, 19 Sep 2023 13:39:11 +0000 (10:39 -0300)]
pico-imx7d: Remove Vanessa from MAINTAINERS

Vanessa's NXP e-mail is no longer active.

Contacted her offline and she told me that she does not have
access to the board anymore and it is OK to remove her
from MAINTAINERS.

Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agodrivers: mediatek: Fix error handling in mtk_i2c_do_transfer
Francois Berder [Fri, 8 Sep 2023 16:47:46 +0000 (18:47 +0200)]
drivers: mediatek: Fix error handling in mtk_i2c_do_transfer

Errors were handled only if an I2C transfer timed out
and received a NACK which is very unlikely. This commit
changes the condition such that errors are handled if
an I2C transfer times out or received a NACK.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Heiko Schocher <hs@denx.de>
15 months agonet: sni_netsec: Add workaround for timeout error
Ryosuke Saito [Thu, 3 Aug 2023 14:56:48 +0000 (23:56 +0900)]
net: sni_netsec: Add workaround for timeout error

The NETSEC GMAC occasionally falls into a weird state where
MAC_REG_DESC_SOFT_RST has never been cleared and shows errors like the
below when networking commands are issued:

    => ping 192.168.1.1
    ethernet@522d0000 Waiting for PHY auto negotiation to complete... done
    netsec_wait_while_busy: timeout
    Using ethernet@522d0000 device

    ARP Retry count exceeded; starting again
    ping failed; host 192.168.1.1 is not alive

It happens on not only 'ping' but also 'dhcp', 'tftp' and so on.

Luckily, restarting the NETSEC GMAC and trying again seems to fix the
problematic state. So first ensure that we haven't entered the state by
checking MAC_REG_DESC_SOFT_RST to be cleared; otherwise, restarting
NETSEC/PHY and trying again would work as a workaround.

Signed-off-by: Ryosuke Saito <ryosuke.saito@linaro.org>
Tested-by: Masahisa Kojima <masahisa.kojima@linaro.org>
15 months agoconfigs: am65x_evm_r5_usbmsc_defconfig: Enable DWC3 wrapper for SPL
Ravi Gunasekaran [Fri, 8 Sep 2023 11:03:51 +0000 (16:33 +0530)]
configs: am65x_evm_r5_usbmsc_defconfig: Enable DWC3 wrapper for SPL

commit 280f45d23977 ("configs: get rid of build warnings due to
SPL_USB_DWC3_GENERIC") missed enabling DWC3 glue layer for
usbmsc_defconfig and this broke boot from USB mass storage.
Fix this by enabling DWC3 glue layer.

Fixes: 280f45d23977 ("configs: get rid of build warnings due to SPL_USB_DWC3_GENERIC")
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
15 months agonet: wget: Avoid packet queue overflow
Richard Weinberger [Thu, 20 Jul 2023 12:51:56 +0000 (14:51 +0200)]
net: wget: Avoid packet queue overflow

Make sure to stay within bounds, as a misbehaving HTTP server
can trigger a buffer overflow if not properly handled.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
15 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 21 Sep 2023 19:56:47 +0000 (15:56 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Fixup memory size passed to kernel on visionfive2

15 months agoboard: visionfive2: Fixup memory size passed to kernel
Shengyu Qu [Sat, 16 Sep 2023 19:36:33 +0000 (03:36 +0800)]
board: visionfive2: Fixup memory size passed to kernel

Use fdt_fixup_memory to make the memory size data from dtb match
the actual size.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
15 months agoconfigs: visionfive2: Enable CONFIG_OF_BOARD_SETUP
Shengyu Qu [Sat, 16 Sep 2023 19:36:32 +0000 (03:36 +0800)]
configs: visionfive2: Enable CONFIG_OF_BOARD_SETUP

Enable CONFIG_OF_BOARD_SETUP, so we could use ft_board_setup() to fixup
memory size passed to kernel.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
15 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 17 Sep 2023 13:25:08 +0000 (09:25 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Fix PHY in some cases on some platforms via enabling DM_ETH_PHY.

15 months agoMerge tag 'doc-2023-10-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 17 Sep 2023 13:24:42 +0000 (09:24 -0400)]
Merge tag 'doc-2023-10-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc5-2

Documentation:

* fix code comments referring to doc/develop/expo.rst
* remove unused values from Chromebook kernel command line
* correct reference tag placement in tools/binman/binman.rst

Others:

* test: fix build dependency for event unit tests

15 months agoARM: renesas: Enable DM_ETH_PHY on 64-bit R-Car boards
Marek Vasut [Sun, 17 Sep 2023 11:51:03 +0000 (13:51 +0200)]
ARM: renesas: Enable DM_ETH_PHY on 64-bit R-Car boards

Enable DM_ETH_PHY to correctly release the PHY on these boards from reset.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoARM: dts: renesas: Add compatible properties to KSZ9031 Ethernet PHYs on Salvator...
Marek Vasut [Sun, 17 Sep 2023 11:49:30 +0000 (13:49 +0200)]
ARM: dts: renesas: Add compatible properties to KSZ9031 Ethernet PHYs on Salvator-X boards

Add compatible values to Ethernet PHY subnodes representing Micrel
KSZ9031 PHYs on R-Car Gen3 Salvator-X boards. This allows software
to identify the PHY model at any time, regardless of the state of
the PHY reset line.

This is a fix for missed addition of these properties on Salvator-X
boards.

Ported from Linux kernel commit 722d55f3a9bd810f3a1a31916cc74e2915a994ce .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agobinman: doc: fix reference tag placement for Logging section
Massimo Pegorer [Sat, 9 Sep 2023 13:52:35 +0000 (15:52 +0200)]
binman: doc: fix reference tag placement for Logging section

Move BinmanLogging reference tag after section "Signing FIT container
with private key in an image" and just before section "Logging".

Fixes: 0f40e23fd22 ("binman: add documentation for binman sign option")
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agoexpo: Fix documentation reference
Massimo Pegorer [Sat, 9 Sep 2023 10:32:28 +0000 (12:32 +0200)]
expo: Fix documentation reference

Fix typo: doc/develop/expo.rst instead of doc/developer/expo.rst

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodoc: delete unused values kernel command line
Jaewon Jung [Fri, 8 Sep 2023 08:00:01 +0000 (17:00 +0900)]
doc: delete unused values kernel command line

Delete "boot=local", "noswap" unused values in kernel command line

Signed-off-by: Jaewon Jung <jw.jung@navercorp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agotest: build dependency for event unit tests
Heinrich Schuchardt [Thu, 7 Sep 2023 16:43:17 +0000 (18:43 +0200)]
test: build dependency for event unit tests

The test_event_base and test_event_probe unit tests use function
event_register() which depends on CONFIG_EVENT_DYNAMIC=y.

Fixes: 7d02645fe4c0 ("event: Add a simple test")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoMerge tag 'doc-2023-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 9 Sep 2023 13:33:02 +0000 (09:33 -0400)]
Merge tag 'doc-2023-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc5

Documentation:

* move more TI board documentation to HTML
* update TPM usage instructions for qemu-arm
* update the EFI app documentation

Other:

* tpm: Fix autostart for TPM1.2 devices
* spl: fix undefined return value in spl_blk_load_image

15 months agodoc: board: ti: Move documentation from README to .rst
Neha Malcom Francis [Fri, 8 Sep 2023 09:36:16 +0000 (15:06 +0530)]
doc: board: ti: Move documentation from README to .rst

Make the conversion for all existing TI documentation from README to
.rst

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
15 months agodoc: Update path to source_file_format.rst
Joao Marcos Costa [Thu, 7 Sep 2023 20:50:45 +0000 (22:50 +0200)]
doc: Update path to source_file_format.rst

Previously, the file extension was .txt, and it referenced the uImage.FIT
directory, which no longer exists. This commit updates the path accordingly.

Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agotimer: document the unit of the timer rate
Heinrich Schuchardt [Thu, 7 Sep 2023 07:54:42 +0000 (09:54 +0200)]
timer: document the unit of the timer rate

To avoid confusion document that timer_dev_priv.clock_rate and
timer_get_rate() yield the timer rate in hertz.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agodoc: efi: Update for the 64-bit app
Simon Glass [Sun, 3 Sep 2023 15:15:51 +0000 (09:15 -0600)]
doc: efi: Update for the 64-bit app

The 64-bit app is supported now, so update the documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodoc: qemu: switch swtpm instruction to 'tpm autostart'
Ilias Apalodimas [Fri, 16 Jun 2023 08:42:52 +0000 (11:42 +0300)]
doc: qemu: switch swtpm instruction to 'tpm autostart'

We don't have a documentation page for our TPM subsystem.  I plan
on sending one in the future,  but in the meantime document the
new 'tpm autostart' command in the QEMU instructions while using
a SWTPM

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agotpm: Fix autostart for TPM1.2 devices
Ilias Apalodimas [Fri, 8 Sep 2023 20:37:22 +0000 (23:37 +0300)]
tpm: Fix autostart for TPM1.2 devices

On commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command") an
autostart function was added for both TPM1.2 and 2.0 devices.  Instead
of correctly wiring the autostart command for TPM1.2 devices that patch
mistakenly added it on 'tpm init'

Fixes: commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agospl: undefined return value in spl_blk_load_image
Heinrich Schuchardt [Wed, 6 Sep 2023 12:25:11 +0000 (14:25 +0200)]
spl: undefined return value in spl_blk_load_image

spl_blk_load_image() should not return an uninitialized value if
blk_get_devnum_by_uclass_id() fails.

Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Reported-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
15 months agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Tue, 5 Sep 2023 18:44:10 +0000 (14:44 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-usb

- DWC3 fix on Layerscape

15 months agoMerge tag 'u-boot-imx-20230905' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 5 Sep 2023 13:05:16 +0000 (09:05 -0400)]
Merge tag 'u-boot-imx-20230905' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for release
-----------------

- imx9: fix DRAM calculation
- thermal: fixes
- fixed for DM, DH and Gateworks boards

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

15 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 5 Sep 2023 13:04:49 +0000 (09:04 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Implement OpenSBI DBCN extension for early debug console
+ Fixes for VisionFive2 board
      + Fix timer missing
      + Fix L2 LIM issue
      + Enable PCIE auto enumeration to support USB and NVMe by default
+ Set eth0 mac address properly
+ Add __noreturn attribute to spl_invoke_opensbi

15 months agorisc-v: implement DBCN based debug console
Heinrich Schuchardt [Mon, 4 Sep 2023 11:24:04 +0000 (13:24 +0200)]
risc-v: implement DBCN based debug console

Use the DBCN SBI extension to implement a debug console.
Make it the default for S-mode RISC-V.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agorisc-v: implement DBCN write byte
Heinrich Schuchardt [Mon, 4 Sep 2023 11:24:03 +0000 (13:24 +0200)]
risc-v: implement DBCN write byte

The DBCN extension provides a Console Write Byte call.
Implement function sbi_dbcn_write_byte to invoke it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agospl: add __noreturn attribute to spl_invoke_opensbi function
Chanho Park [Tue, 29 Aug 2023 01:20:14 +0000 (10:20 +0900)]
spl: add __noreturn attribute to spl_invoke_opensbi function

spl_invoke_opensbi function is not returned to SPL. Thus, we need to
set __noreturn function attribute.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoconfigs: starfive: Disable SYS_MALLOC_CLEAR_ON_INIT by default
Shengyu Qu [Thu, 24 Aug 2023 16:25:21 +0000 (00:25 +0800)]
configs: starfive: Disable SYS_MALLOC_CLEAR_ON_INIT by default

SPL_SYS_MALLOC_CLEAR_ON_INIT would enable SYS_MALLOC_CLEAR_ON_INIT by
default, but that's not need on JH7110, so disable that.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: cpu: jh7110: Imply SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:20 +0000 (00:25 +0800)]
riscv: cpu: jh7110: Imply SPL_SYS_MALLOC_CLEAR_ON_INIT

Starfive JH7110 needs to clear L2 LIM to zero before use or ECC error
would be triggered. Currently, we use DDR ram for SPL malloc arena on
Visionfive 2 board in defconfig, but it's also possible to use L2 LIM as
SPL malloc arena. To avoid triggering ECC error in this scenario, we
imply SPL_SYS_MALLOC_CLEAR_ON_INIT as default.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agodlmalloc: Add support for SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:19 +0000 (00:25 +0800)]
dlmalloc: Add support for SPL_SYS_MALLOC_CLEAR_ON_INIT

To support SPL_SYS_MALLOC_CLEAR_ON_INIT, we have to modify
#ifdef CONFIG_SYS_MALLOC_CLEAR_ON_INIT
to #if CONFIG_IS_ENABLED(SYS_MALLOC_CLEAR_ON_INIT)

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoKconfig: Add SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:18 +0000 (00:25 +0800)]
Kconfig: Add SPL_SYS_MALLOC_CLEAR_ON_INIT

Add SPL version of SYS_MALLOC_CLEAR_ON_INIT, this would help devices
that need to clear ram before use to work correctly.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agodoc: board: starfive: Add more info about supported driver
Shengyu Qu [Tue, 22 Aug 2023 14:33:57 +0000 (22:33 +0800)]
doc: board: starfive: Add more info about supported driver

Since PLDA PCIE driver is added and VL805 support is enabled in
defconfig for Starfive Visionfive 2, modify the document to keep
consistent.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
15 months agoconfigs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2
Shengyu Qu [Tue, 22 Aug 2023 14:33:56 +0000 (22:33 +0800)]
configs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2

Although PCIE driver already exists, board defconfig isn't configured to
enable PCIE enum on boot, thus USB storage device and NVME drive are not
supported by default. So modify defconfig to enable PCIE auto enum, then
start USB subsystem and scan nvme drive on boot.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
15 months agoriscv: jh7110: enable riscv,timer in the device tree
Torsten Duwe [Mon, 14 Aug 2023 16:05:33 +0000 (18:05 +0200)]
riscv: jh7110: enable riscv,timer in the device tree

The JH7110 has the arhitectural CPU timer on all 5 rv64 cores.
Note that in the device tree.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: allow riscv timer to be instantiated via device tree
Torsten Duwe [Mon, 14 Aug 2023 16:05:28 +0000 (18:05 +0200)]
riscv: allow riscv timer to be instantiated via device tree

For the architectural timer on riscv, there already is a defined
device tree binding[1]. Allow timer instances to be created from
device tree matches, but for now retain the old mechanism, which
registers the timer biggy-back with the CPU.

[1] linux/Documentation/devicetree/bindings/timer/riscv,timer.yaml

Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoeeprom: starfive: set eth0 mac address properly
Seung-Woo Kim [Fri, 11 Aug 2023 07:12:25 +0000 (16:12 +0900)]
eeprom: starfive: set eth0 mac address properly

fdt_fixup_ethernet() sets eth0 mac address from ethaddr. Set
ethaddr to environment instead of eth0addr.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agonokia_rx51: Remove platform
Tom Rini [Tue, 5 Sep 2023 01:12:28 +0000 (21:12 -0400)]
nokia_rx51: Remove platform

This platform is behind on migrations (it is the sole user of the oldest
legacy version of the USB gadget stack and is long overdue for
migration) and with Pali no longer being a maintainer, we remove this
platform.

Signed-off-by: Tom Rini <trini@konsulko.com>
15 months agoMAINTAINERS: Drop Pali Rohár
Tom Rini [Tue, 5 Sep 2023 01:12:27 +0000 (21:12 -0400)]
MAINTAINERS: Drop Pali Rohár

Remove Pali from his listed maintainer entries due to his publicly
visible actions on the mailing list.

Signed-off-by: Tom Rini <trini@konsulko.com>