Re: [PATCH] doc: rockchip: Clarify the rkspi image format further

2024-02-11 Thread Dragan Simic
Hello Johan, On 2024-02-11 15:07, Johan Jonker wrote: On 2/10/24 19:18, Dragan Simic wrote: As discussed on the U-Boot mailing list, [1][2] only some Rockchip SoCs suffer from a bug in their BROMs that requires a specific format for their This not a bug. SPI images, which was the reason

Re: [PATCH] doc: rockchip: Clarify the rkspi image format further

2024-02-11 Thread Dragan Simic
Hello Tom, On 2024-02-11 00:41, Tom Rini wrote: On Sat, Feb 10, 2024 at 07:18:10PM +0100, Dragan Simic wrote: As discussed on the U-Boot mailing list, [1][2] only some Rockchip SoCs suffer from a bug in their BROMs that requires a specific format for their SPI images, which was the reason for

Re: [PATCH] clk: renesas: Fix broken clocks on all Gen2 boards

2024-02-11 Thread Geert Uytterhoeven
Hi Niklas, Thanks for your patch! On Fri, Feb 9, 2024 at 10:22 PM Niklas Söderlund wrote: > To prepare support for multiple register layouts pointers to register > tables where added to struct cpg_mssr_info. These pointers are suppose supposed > to be filled in at probe time and no intended

Re: [PATCH RFC] sunxi: pinephone: detect existed magnetometer and fixup dtb

2024-02-11 Thread Andre Przywara
On Sun, 11 Feb 2024 12:28:24 +0300 Andrey Skvortsov wrote: Hi Andrey, thanks for taking care of this upstream! > In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by > AF8133J. They use the same PB1 pin in different modes. > > LIS3MDL uses it as an gpio input to handle

[PATCH v4] rng: Add Turris Mox rTWM RNG driver

2024-02-11 Thread Max Resch
A RNG driver for Armada 3720 boards running the Turris Mox rWTM firmware from CZ.NIC in the secure processor. Signed-off-by: Max Resch --- Changes in v4: - wrongful/missing git rebase Changes in v3: - More meaningful variable names in accordance with review Changes in v2: - Removed ring

[PATCH RFC] sunxi: pinephone: detect existed magnetometer and fixup dtb

2024-02-11 Thread Andrey Skvortsov
In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by AF8133J. They use the same PB1 pin in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree

Re: [PATCH] doc: rockchip: Clarify the rkspi image format further

2024-02-11 Thread Johan Jonker
On 2/10/24 19:18, Dragan Simic wrote: > As discussed on the U-Boot mailing list, [1][2] only some Rockchip SoCs > suffer from a bug in their BROMs that requires a specific format for their This not a bug. > SPI images, which was the reason for the rkspi format to be introduced. > > Improve

Re: [PATCH v1] armv8: crypto: SHA-512 using ARMv8 Crypto Extensions

2024-02-11 Thread Igor Opaniuk
Hi Tom, On Sun, Feb 11, 2024 at 1:37 AM Tom Rini wrote: > > On Sat, Feb 10, 2024 at 01:07:09PM +0100, Igor Opaniuk wrote: > > > From: Igor Opaniuk > > > > Add support for the SHA-512 Secure Hash Algorithm which uses ARMv8 Crypto > > Extensions. The CPU should support ARMv8.2 instruction set and

[PATCH 2/3] ARM: renesas: Set R-Car Gen2 board size limit to 512 kiB

2024-02-11 Thread Marek Vasut
The maximum size of u-boot.img on R-Car Gen2 is 0x8 or 512 kiB, set the limit to avoid overflows as new functionality gets pulled in. Signed-off-by: Marek Vasut --- Cc: Niklas Söderlund Cc: Paul Barker --- Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PULL] u-boot-sh/master-779h0-r2

2024-02-11 Thread Marek Vasut
The following changes since commit d7aaaf4223d0a2f9f8c9eed47d7431860b3116d8: Merge tag 'u-boot-dfu-20240209' of https://source.denx.de/u-boot/custodians/u-boot-dfu (2024-02-09 09:00:42 -0500) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-sh.git

[PATCH 1/3] ARM: renesas: Disable EFI on R-Car Gen2

2024-02-11 Thread Marek Vasut
These systems are unlikely to use EFI as this functionality has not been enabled until it got pulled in by Kconfig default. This functionality does add some 60-70 kiB to the u-boot.img size, which overflows the size limit. Disable it. Signed-off-by: Marek Vasut --- Cc: Niklas Söderlund Cc: Paul

Re: [PATCH] doc/develop/codingstyle.rst: Clarify include section

2024-02-11 Thread Igor Opaniuk
Hi Tom, On Fri, Feb 9, 2024 at 3:52 PM Tom Rini wrote: > > Rework the section about includes slightly. We should not be using > common.h anywhere, so remove that from examples and ask people to send > patches removing it when found. Doing this also means we need to reword > other parts of this

Re: inconsistent wget behavior

2024-02-11 Thread Paul Liu
Hi Fabio, I'm on vacation now (Chinese new year). I hope I'll find some time to revive my imx8 board. I've tried sandbox and qemu. Both of them are not reproducible. I'm wondering if it could be some packet loss that causes the issue. Because sandbox and qemu there won't be any missing packets

[PATCH] doc: fix mistyped "env flags" command

2024-02-11 Thread Thomas Weißschuh
exists CONFIG_CMD_ENV_EXISTS -flsgs +flags CONFIG_CMD_ENV_FLAGS erase --- base-commit: d7aaaf4223d0a2f9f8c9eed47d7431860b3116d8 change-id: 20240211-doc-flsgs-31daddb198ec Best regards, -- Thomas Weißschuh

Re: [PATCH v2 16/20] board: rockchip: add Theobroma-Systems RK3588 Jaguar SBC

2024-02-11 Thread Jonas Karlman
Hi Quentin, On 2024-02-09 10:50, Quentin Schulz wrote: > From: Quentin Schulz > > JAGUAR is a Single-Board Computer (SBC) based around the rk3588 SoC and > is targeting Autonomous Mobile Robots (AMR). > > It features: > * LPDDR4X (up to 16GB) > * 1Gbps Ethernet on RJ45 connector (KSZ9031 or

[PATCH] sunxi: defconfig: Add pstore support for pinephone

2024-02-11 Thread Andrey Skvortsov
In general any DRAM address, that isn't overwritten during a boot is suitable for pstore. Range from 0x4000 - 0x5000 is heavily used by u-boot for internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk later in the boot process. Ramdisk start address is 0x4FF0,

Re: [PATCH] sunxi: defconfig: Add pstore support for pinephone

2024-02-11 Thread Andrey Skvortsov
Hi Peter, On 24-02-11 16:11, Peter Robinson wrote: > On Sun, 11 Feb 2024 at 16:02, Andrey Skvortsov > wrote: > > > > In general any DRAM address, that isn't overwritten during a boot is > > suitable for pstore. > > What's this functionality providing? The details below give the > technical

[PATCH v2] arm: sunxi: Reduce inrush current on Olimex A20-OLinuXino_MICRO configs

2024-02-11 Thread Philippe Coval
This change fix reboot, both configurations were tested on my Olimex A20 Micro Rev E with debian-12. This issue was also present and fixed on A20 Lime2 (in 8311e84b18), quoting Olliver Schinagl: The lime2 features a too large capacitor on the LDO3 output, which causes the PMIC to

Re: [PATCH v2 15/20] rockchip: rk3588: bind MMC controllers in U-Boot proper pre-reloc

2024-02-11 Thread Jonas Karlman
Hi Quentin, On 2024-02-09 10:50, Quentin Schulz wrote: > From: Quentin Schulz > > Since commit 9e644284ab81 ("dm: core: Report bootph-pre-ram/sram node as > pre-reloc after relocation"), bootph-pre-ram doesn't make U-Boot proper > bind the device before relocation. > > While this is usually

[PATCH v1] cmd: md5sum: use hash_command

2024-02-11 Thread Igor Opaniuk
From: Igor Opaniuk Drop old implementation and use hash_command() instead, as how it's currently done for crc32 and sha1sum cmds. Test: => md5sum 0x6000 0x200 md5 for 6000 ... 61ff ==> e6bbbe95f5b41996f4a9b9af7bbd4050 Signed-off-by: Igor Opaniuk --- cmd/md5sum.c | 149

Re: [PULL] u-boot-sh/master-779h0-r2

2024-02-11 Thread Tom Rini
On Sun, Feb 11, 2024 at 06:31:59PM +0100, Marek Vasut wrote: > The following changes since commit d7aaaf4223d0a2f9f8c9eed47d7431860b3116d8: > > Merge tag 'u-boot-dfu-20240209' of > https://source.denx.de/u-boot/custodians/u-boot-dfu (2024-02-09 09:00:42 > -0500) > > are available in the Git

Re: [PATCH RFC] sunxi: pinephone: detect existed magnetometer and fixup dtb

2024-02-11 Thread Andrey Skvortsov
Hi Andre, thank you for the valuable feedback! On 24-02-11 13:13, Andre Przywara wrote: > On Sun, 11 Feb 2024 12:28:24 +0300 > Andrey Skvortsov wrote: > > Hi Andrey, > > thanks for taking care of this upstream! > > > In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by

Re: [PATCH] sunxi: defconfig: Add pstore support for pinephone

2024-02-11 Thread Peter Robinson
On Sun, 11 Feb 2024 at 16:02, Andrey Skvortsov wrote: > > In general any DRAM address, that isn't overwritten during a boot is > suitable for pstore. What's this functionality providing? The details below give the technical reasons for the memory address but I'm not sure what enabling pstore

Re: [PATCH v1] armv8: crypto: SHA-512 using ARMv8 Crypto Extensions

2024-02-11 Thread Igor Opaniuk
Hello Marc, On Sun, Feb 11, 2024 at 12:12 AM Marc Zyngier wrote: > > [Fixing Ard's email address for something more current.] > > On Sat, 10 Feb 2024 12:07:09 +, > Igor Opaniuk wrote: > > > > From: Igor Opaniuk > > > > Add support for the SHA-512 Secure Hash Algorithm which uses ARMv8

[PATCH 3/3] ARM: renesas: Enable LTO on R-Car

2024-02-11 Thread Marek Vasut
Enable LTO globally on Renesas R-Car platforms. This has been enabled on a subset of boards already, but at this point it is safe to enable it globally. This saves units or tens of kiB from the resulting build. Signed-off-by: Marek Vasut --- Cc: Niklas Söderlund Cc: Paul Barker ---

Re: [PATCH RFC] sunxi: pinephone: detect existed magnetometer and fixup dtb

2024-02-11 Thread Andre Przywara
On Mon, 12 Feb 2024 01:38:36 +0300 Andrey Skvortsov wrote: Hi Andrey, > thank you for the valuable feedback! > > On 24-02-11 13:13, Andre Przywara wrote: > > On Sun, 11 Feb 2024 12:28:24 +0300 > > Andrey Skvortsov wrote: > > > > Hi Andrey, > > > > thanks for taking care of this upstream! >

Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD

2024-02-11 Thread Dan Carpenter
On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: > From: Igor Opaniuk > > mmc_switch_part() is used for switching between hw partitions > on eMMC (boot0, boot1, user, rpmb). > There is no need to do that for SD card. > Is this a clean up or a bugfix? What are the visible effects

[PATCH v2 16/21] fwu: remove the config symbols for number of banks and images

2024-02-11 Thread Sughosh Ganu
With the migration to the FWU metadata version 2 structure, the values of number of banks and number of images per bank are now obtained from the metadata at runtime. Remove the now superfluous config symbols. Signed-off-by: Sughosh Ganu --- Changes since V1: None arch/sandbox/Kconfig

[PATCH v2 17/21] tools: mkfwumdata: migrate to metadata version 2

2024-02-11 Thread Sughosh Ganu
Migrate the metadata generation tool to generate the version 2 metadata. Signed-off-by: Sughosh Ganu --- Changes since V1: * Compute location of struct fwu_fw_store_desc using pointer arithmetic. tools/mkfwumdata.c | 45 ++--- 1 file changed, 34

[PATCH v2 15/21] test: fwu: align the FWU metadata access test with version 2

2024-02-11 Thread Sughosh Ganu
With the FWU metadata support having been migrated to version 2, make corresponding changes to the test for accessing the FWU metadata. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata.

[PATCH v2 11/21] fwu: mtd: modify the DFU API's to align with metadata version 2

2024-02-11 Thread Sughosh Ganu
Make changes to the functions used for generating the DFU's alt variable so that they are aligned with changes to the metadata version 2. These changes include getting the number of banks and images per bank at runtime from the metadata, as well as accessing the updatable image information from

[PATCH v2 12/21] efi_firmware: fwu: do not read FWU metadata on sandbox

2024-02-11 Thread Sughosh Ganu
The FWU metadata is being read for populating the firmware image's version information. The sandbox platform does not have the FWU metadata on any of it's storage devices. Skip attempting to read the FWU metadata on the sandbox platform. Signed-off-by: Sughosh Ganu --- Changes since V1: None

[PATCH v2 14/21] cmd: fwu: align the command with metadata version 2

2024-02-11 Thread Sughosh Ganu
Make changes to the fwu_mdata_read command to have it align with the metadata version 2. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata. cmd/fwu_mdata.c | 45

[PATCH v2 13/21] efi_firmware: fwu: get the number of FWU banks at runtime

2024-02-11 Thread Sughosh Ganu
With the migration of the FWU metadata to version 2, the number of banks are now obtained at runtime, instead of the config symbols. Make use of the API to get the number of banks in the versioning functions. Signed-off-by: Sughosh Ganu --- Changes since V1: None lib/efi_loader/efi_firmware.c

Re: [PATCH v2] arm: sunxi: Reduce inrush current on Olimex A20-OLinuXino_MICRO configs

2024-02-11 Thread Andre Przywara
On Sun, 11 Feb 2024 21:52:13 +0100 Philippe Coval wrote: Hi Philippe, > This change fix reboot, both configurations > were tested on my Olimex A20 Micro Rev E with debian-12. > > This issue was also present and fixed on A20 Lime2 (in 8311e84b18), > quoting Olliver Schinagl: > > The lime2

[PATCH 1/2] rockchip: rk3328: Update stack addresses

2024-02-11 Thread Jonas Karlman
With the stack and text base used by U-Boot SPL and proper on RK3328 there is a high likelihood of overlapping when U-Boot proper + FDT nears 1 MiB in size. Currently the following memory layout is used: - 0x (@0 MiB): U-Boot SPL text base - 0x0004 (@256 KiB): TF-A - 0x0020 (@2

[PATCH 0/2] rockchip: Update stack and bss addresses on RK3328 and RK3399

2024-02-11 Thread Jonas Karlman
With the stack and text base used by U-Boot SPL and proper on RK3328 and RK3399 there is a high likelihood of overlapping when U-Boot proper + FDT nears 1 MiB in size. Trying to run U-Boot proper close to 1 MiB in size with debug logging something similar to following can be observed: FDT

[PATCH] mtd: spi-nor: Add NO_CHIP_ERASE flag

2024-02-11 Thread Tejas Bhumkar
Since the opcode SPINOR_OP_CHIP_ERASE (0xc7) is not supported for the mt35xu02g flash, the NO_CHIP_ERASE flag has been added to enable sector erase functionality instead. Signed-off-by: Tejas Bhumkar --- drivers/mtd/spi/spi-nor-ids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 05/21] fwu: make changes to support version 2 of FWU metadata

2024-02-11 Thread Sughosh Ganu
Make changes to the FWU library functions which are used to access the metadata structure to support version 2 of the metadata. At a broad level, the following are the changes made - Use a pointer g_mdata instead of a variable, and allocate space for it at runtime. - Obtain the number of

[PATCH v2 03/21] drivers: fwu: add the size parameter to the metadata access API's

2024-02-11 Thread Sughosh Ganu
In version 2 of the metadata structure, the size of the structure cannot be determined statically at build time. The structure is now broken into the top level structure which contains a field indicating the total size of the structure. Add a size parameter to the metadata access API functions to

[PATCH v2 07/21] drivers: fwu: mtd: allocate buffer for image info dynamically

2024-02-11 Thread Sughosh Ganu
The FWU metadata access driver for MTD partitioned devices currently uses a statically allocated array for storing the updatable image information. This array depends on the number of banks and images per bank. With migration of the FWU metadata to version 2, these parameters are now obtained at

[PATCH v2 08/21] drivers: fwu: allocate memory for metadata copies

2024-02-11 Thread Sughosh Ganu
With migration of the FWU metadata access code to version 2, the size of the metadata is obtained at runtime. Allocate memory for both the metadata copies from the driver's probe function. Signed-off-by: Sughosh Ganu --- Changes since V1: None drivers/fwu-mdata/gpt_blk.c | 4

[PATCH v2 06/21] fwu: add some API's for metadata version 2 access

2024-02-11 Thread Sughosh Ganu
There are certain fields added in version 2 of the FWU metadata structure. Also, information like number of banks and number of images per bank are also part of the metadata structure. Add functions to access fields of the version 2 of the metadata structure. Signed-off-by: Sughosh Ganu ---

[PATCH v2 09/21] fwu: add a function to put a bank in Trial State

2024-02-11 Thread Sughosh Ganu
The version 2 of the FWU metadata has a field in the top level structure, called bank_state. This is used to keep the state a given bank is in, either of valid(for trial state), invalid, or accepted. Update this field when putting the platform in Trial State, in addition to starting the

[PATCH v2 10/21] capsule: accept a bank on a successful update

2024-02-11 Thread Sughosh Ganu
The version 2 of the FWU metadata maintains a bank_state field per bank, which keeps an aggregate status of the bank. A bank can either be in a valid, invalid, or accepted state. Update the bank_state field of the metadata once the update has gone through successfully(when skipping Trial State),

[PATCH v2 04/21] fwu: add helper functions for getting image description offsets

2024-02-11 Thread Sughosh Ganu
With migration of the FWU metadata structure to version 2, the size of the structure is not determined at build time, but at run time. This means, that the offsets for the structures describing firmware images which are part of the FWU metadata(struct fwu_fw_store_desc, struct fwu_image_entry and

[PATCH 2/2] rockchip: rk3399: Update stack and bss addresses

2024-02-11 Thread Jonas Karlman
With the stack and text base used by U-Boot SPL and proper on RK3399 there is a high likelihood of overlapping when U-Boot proper + FDT nears 1 MiB in size. Currently the following memory layout is used: - 0x (@0 MiB): U-Boot SPL text base - 0x0004 (@256 KiB): TF-A - 0x0020 (@2

Re: [PATCH] button: qcom-pmic: demote "unknown button" message to debug

2024-02-11 Thread Sumit Garg
On Fri, 9 Feb 2024 at 20:44, Caleb Connolly wrote: > > This message isn't an error (there can be a watchdog subnode for example) > but it shouldn't be printed unless this driver is being debugged. Demote > it to a debug print. > > Signed-off-by: Caleb Connolly > --- >

[PATCH v2 00/21] FWU: Migrate FWU metadata to version 2

2024-02-11 Thread Sughosh Ganu
The following patches migrate the FWU metadata access code to version 2 of the structure. This is based on the structure definition as defined in the latest rev of the FWU Multi Bank Update specification [1]. Since the version 1 of the structure has currently been adopted on a couple of

[PATCH v2 02/21] fwu: metadata: migrate to version 2 of the structure

2024-02-11 Thread Sughosh Ganu
The latest version of the FWU specification [1] has changes to the metadata structure. This is version 2 of the structure. Primary changes include - bank_state field in the top level structure - Total metadata size in the top level structure - Image description structures now optional -

[PATCH v2 01/21] configs: fwu: remove FWU configs for metadata V2 migration

2024-02-11 Thread Sughosh Ganu
The FWU metadata is to be migrated to version 2. Disable the FWU feature on platforms that enable it for the migration. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V1: None configs/corstone1000_defconfig | 2 -- configs/sandbox64_defconfig

[PATCH v2 21/21] doc: fwu: make changes for supporting FWU Metadata version 2

2024-02-11 Thread Sughosh Ganu
Make changes to the FWU documentation to reflect the changes made with migration of the FWU metadata to version 2. Signed-off-by: Sughosh Ganu --- Changes since V1: None doc/board/socionext/developerbox.rst | 9 +++-- doc/develop/uefi/fwu_updates.rst | 12 +---

[PATCH v2 18/21] tools: mkfwumdata: add logic to append vendor data to the FWU metadata

2024-02-11 Thread Sughosh Ganu
The version 2 of the FWU metadata allows for appending opaque vendor specific data to the metadata structure. Add support for appending this data to the metadata. The vendor specific data needs to be provided through a file, passed through a command-line parameter. Signed-off-by: Sughosh Ganu

[PATCH v2 19/21] tools: mkfwumdata: fix the size parameter to the fwrite call

2024-02-11 Thread Sughosh Ganu
The fwrite call returns the number of bytes transferred as part of the write only when the size parameter is 1. Pass the size parameter to the library call as 1 so that the correct number of bytes transferred are returned. Fixes: fdd56bfd3ad ("tools: Add mkfwumdata tool for FWU metadata image")

[PATCH v2 20/21] configs: fwu: re-enable FWU configs

2024-02-11 Thread Sughosh Ganu
Now that the migration to the FWU metadata version 2 is complete, the feature can be re-enabled on platforms which had it enabled. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/corstone1000_defconfig | 2 ++ configs/sandbox64_defconfig | 1 +