Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Michael Nazzareno Trimarchi
HI Fabio On Wed, Jul 10, 2024 at 3:43 PM Fabio Estevam wrote: > > On Wed, Jul 10, 2024 at 10:39 AM Michael Nazzareno Trimarchi > wrote: > > > clk dump > > > > It's how uboot is registering the clk in dts. My idea now was not to > > change it to not impact other architectures. > > I have a lot of

Re: [PATCH] driver: rng: Do not check ARM_SMCCC_TRNG_VERSION

2024-07-10 Thread Weizhao Ouyang
On Wed, Jul 10, 2024 at 12:23 AM Leo Yan wrote: > > As described in the document SMC Calling Convention (ARM DEN 0028 1.5 F), > section 7 "Arm Architecture Calls", the SMC call SMCCC_ARCH_FEATURES is > not expected to support the function ID ARM_SMCCC_TRNG_VERSION. Trusted > Firmware-A follows up

Re: [PATCH] gpt: allow spaces in partition list

2024-07-10 Thread Sam Protsenko
On Tue, Jul 9, 2024 at 9:00 PM Sam Protsenko wrote: > > On Thu, Jun 27, 2024 at 6:29 AM Mikhail Kshevetskiy > wrote: > > > > This allows spliting partition list to several lines in environment file > > > > ex: > > > > gpt_partition_list= > > name=boot1,size=5MiB,start

Re: [PATCH 3/6] power: pmic: sunxi: replace AXP717 SPL driver

2024-07-10 Thread Chris Morgan
On Thu, May 16, 2024 at 12:48:36AM +0100, Andre Przywara wrote: > We now have a generic AXP SPL driver implementation, that already covers > the DC/DC converters of the AXP717 PMIC. > > Remove the old, dedicated driver and switch to the new generic driver. > This should not introduce any change in

[PATCH] board: freescale: Replace invalid usage of sprintf by strcat

2024-07-10 Thread Francois Berder
buf was used as destination and as parameter to sprintf which triggers an undefined behaviour. This commit removes this usage of sprintf and uses strcat to append strings to buf variable. Signed-off-by: Francois Berder --- board/freescale/t208xqds/eth_t208xqds.c | 40 - 1

slimbootloader and u-boot payload mmc communication issue

2024-07-10 Thread Sébastien Basset
Hello, I try with slimbootloader and u-boot payload to read on mmc, i have this issue: => mmc info sdhci_set_clock: Timeout to wait cmd & data inhibit sdhci_set_clock: Timeout to wait cmd & data inhibit sdhci_set_clock: Timeout to wait cmd & data inhibit CMD_SEND:0 ARG

Re: [PATCH v3] arm: mvebu: Enable bootstd and other modernization for Synology DS414 (Armada XP) board

2024-07-10 Thread Tony Dinh
Hi Phil & Stefan, On Wed, Jul 10, 2024 at 4:02 AM Phil Sutter wrote: > > On Wed, Jul 10, 2024 at 08:26:12AM +0200, Stefan Roese wrote: > > On 7/8/24 06:39, Tony Dinh wrote: > > > - Switch to standard boot (in include/configs/ds414.h and > > > configs/ds414_defconfig) > > > - Implement board_late_

Re: [PATCH] dt-bindings: nvmem: convert U-Boot env to a layout

2024-07-10 Thread Rob Herring (Arm)
On Sat, 06 Jul 2024 00:58:21 +0200, Rafał Miłecki wrote: > From: Rafał Miłecki > > U-Boot environment variables can be stored in various data sources. MTD > is just one of available options. Refactor DT binding into a layout so > it can be used with UBI volumes and other NVMEM devices. > > Lin

[PATCH 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block

2024-07-10 Thread Rasmus Villemoes
This was added in commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That incarnation of the watchdog driver later got removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references), but this block wa

[PATCH 1/2] arm: bcm283x: remove pointless empty hw_watchdog_disable

2024-07-10 Thread Rasmus Villemoes
This empty stub was originally added as one branch of an #ifdef in commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 watchdog). That incarnation of the rpi watchdog driver was later removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references),

radxa cm3 2024.01 mmc write error

2024-07-10 Thread Belisko Marek
Hi, I'm playing with radxa cme and mainline u-boot 2024.01 (present in scarthgap yocto). I realized that mmc write fails all the time like: => md.l $loadaddr 00c00800: ff7ff7eb fffd fff5 9fff => mmc write $loadaddr 1fc0 10 MMC write: dev # 0, block # 8128, count 16 .

Re: [PATCH v4] bloblist: fix bloblist convention check.

2024-07-10 Thread Raymond Mao
Hi Levi, On Wed, 10 Jul 2024 at 09:53, Levi Yun wrote: > According to recently firmware handsoff spec [1]'s "Register usage at > handoff > boundary", Transfer List's signature value was changed from 0x40_b10b > (3 bytes) to 4a0f_b10b (4 bytes). > > As updating of TL's signature, register value o

Re: [PATCH v4 00/21] qcom: rpmh core and regulator support

2024-07-10 Thread Caleb Connolly
On 10/07/2024 13:33, Sumit Garg wrote: Hi Caleb, On Tue, 9 Jul 2024 at 15:04, Caleb Connolly wrote: This series introduces support for the RPMh (Resource Power Manager (hardened)) co-processor and associated regulator driver found on most modern Qualcomm platforms (since ~2017). Even thou

[PATCH RFC 3/3] arm64: unwind stack on exception

2024-07-10 Thread Caleb Connolly
We already build arm64 images with frame pointers. Let's finally make use of them in tandem with the new symbol lookup support by unwinding the stack when an exception occurs, producing a backtrace similar to those emitted by Linux. In addition, introduce a dedicated unwind_stack() function which

[PATCH RFC 2/3] add support for symbol lookups

2024-07-10 Thread Caleb Connolly
This is mostly a port of the Xen hypervisor implementation. The U-Boot binary is built as normal, then its symbol table is fed into tools/symbols to generate an optimised lookup table. U-Boot is rebuilt with the symbol table and handling code in lib/symbols.c. Based on code from Xen at c20850540

[PATCH RFC 1/3] drop unused kallsyms support

2024-07-10 Thread Caleb Connolly
There was some very old code floating around for decoding symbols, it's incomplete and is never built. Remove it so we can add a new implementation. Signed-off-by: Caleb Connolly --- Makefile| 11 --- common/Makefile | 1 - common/kallsyms.c | 43 --

[PATCH RFC 0/3] ARM64: add symbol name lookup and print a backtrace on exception

2024-07-10 Thread Caleb Connolly
+++ tools/Makefile| 3 + tools/symbols.c | 646 ++ 12 files changed, 896 insertions(+), 63 deletions(-) --- change-id: 20240710-arm64-backtrace-2926f764dbdc base-commit: 13f9c5668411aa18ef64846d5bc86e9e6be52082 // Caleb (they/them)

adding fdt-overlay function - help needed

2024-07-10 Thread Frank Wunderlich
Hi, i try to get overlay-merging working in uboot (for OF_UPSTREAM conversion), but failing on missing Makefile knowledge i have the state now, that upstream dtso get compiled to dtbo files (that needed further changes). now i added this from linux-tree: #merge CONFIG_DEFAULT_DEVICE_TREE + OF

[PATCH v4] bloblist: fix bloblist convention check.

2024-07-10 Thread Levi Yun
According to recently firmware handsoff spec [1]'s "Register usage at handoff boundary", Transfer List's signature value was changed from 0x40_b10b (3 bytes) to 4a0f_b10b (4 bytes). As updating of TL's signature, register value of x1/r1 should be: In aarch32's r1 value should be R1[23:0]: set

Re: [PATCH v3 1/1] bloblist: Fix bloblist convention checking.

2024-07-10 Thread Yeo Reum Yun
HI. Raymond. > Please remove the "FIXME" on top of your changes. > It was a reminder for the bug of the FW handoff spec. > We don't need it anymore once your patch is merged. > BTW, you might need to resend the patch with a new > subject "[PATCH v2 ]" instead of following the original > topic

[PATCH v3 4/4] lib: Convert str_to_list() to use alist

2024-07-10 Thread Simon Glass
Use this new data structure in the utility function. Signed-off-by: Simon Glass --- Changes in v3: - Update for alist_add() API change lib/strto.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/lib/strto.c b/lib/strto.c index f83ac67c6

[PATCH v3 3/4] alist: Add support for an allocated pointer list

2024-07-10 Thread Simon Glass
In various places it is useful to have an array of structures, but allow it to grow. In some cases we work around it by setting maximum number of entries, using a Kconfig option. In other places we use a linked list, which does not provide for random access and can complicate the code. Introduce a

[PATCH v3 2/4] lib: Handle a special case with str_to_list()

2024-07-10 Thread Simon Glass
The current implementation can return an extra result at the end when the string ends with a space. Fix this by adding a special case. Signed-off-by: Simon Glass --- (no changes since v1) lib/strto.c | 4 +++- test/str_ut.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --g

[PATCH v3 0/4] alist: Implement a pointer list / array of structs

2024-07-10 Thread Simon Glass
This data structure provides a list of pointers / array of structures. I was planning to use it for the lmb restructure, to allow it to support any number of entries, but then I gave up on it. There are quite a few places in U-Boot where such a list would be useful, since it supports growing the a

[PATCH v3 1/4] malloc: Support testing with realloc()

2024-07-10 Thread Simon Glass
At present in tests it is possible to cause an out-of-memory condition with malloc() but not realloc(). Add support to realloc() too, so code which uses that function can be tested. Signed-off-by: Simon Glass --- (no changes since v1) common/dlmalloc.c | 4 1 file changed, 4 insertions(+)

[PATCH v2 4/4] lib: Convert str_to_list() to use alist

2024-07-10 Thread Simon Glass
Use this new data structure in the utility function. Signed-off-by: Simon Glass --- (no changes since v1) lib/strto.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/lib/strto.c b/lib/strto.c index f83ac67c666..f059408755a 100644 --- a/

[PATCH v2 3/4] alist: Add support for an allocated pointer list

2024-07-10 Thread Simon Glass
In various places it is useful to have an array of structures, but allow it to grow. In some cases we work around it by setting maximum number of entries, using a Kconfig option. In other places we use a linked list, which does not provide for random access and can complicate the code. Introduce a

[PATCH v2 2/4] lib: Handle a special case with str_to_list()

2024-07-10 Thread Simon Glass
The current implementation can return an extra result at the end when the string ends with a space. Fix this by adding a special case. Signed-off-by: Simon Glass --- (no changes since v1) lib/strto.c | 4 +++- test/str_ut.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --g

[PATCH v2 1/4] malloc: Support testing with realloc()

2024-07-10 Thread Simon Glass
At present in tests it is possible to cause an out-of-memory condition with malloc() but not realloc(). Add support to realloc() too, so code which uses that function can be tested. Signed-off-by: Simon Glass --- (no changes since v1) common/dlmalloc.c | 4 1 file changed, 4 insertions(+)

[PATCH v2 0/4] alist: Implement a pointer list / array of structs

2024-07-10 Thread Simon Glass
This data structure provides a list of pointers / array of structures. I was planning to use it for the lmb restructure, to allow it to support any number of entries, but then I gave up on it. There are quite a few places in U-Boot where such a list would be useful, since it supports growing the a

Re: [PATCH v3 1/1] bloblist: Fix bloblist convention checking.

2024-07-10 Thread Raymond Mao
Hi Levi, On Tue, 9 Jul 2024 at 16:21, Levi Yun wrote: > According to recently firmware handsoff spec [1]'s "Register usage at > handoff > boundary", Transfer List's signature value was changed from 0x40_b10b > (3 bytes) to 4a0f_b10b (4 bytes). > > As updating of TL's signature, register value of

Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Fabio Estevam
On Wed, Jul 10, 2024 at 10:39 AM Michael Nazzareno Trimarchi wrote: > clk dump > > It's how uboot is registering the clk in dts. My idea now was not to > change it to not impact other architectures. > I have a lot of changes but I don't want to address regression and fix > and test before send mo

avoid syscon fallback class for getting regmap

2024-07-10 Thread Frank Wunderlich
Hi, i'm working on OF_UPSTREAM for mediatek boards and noticed missing syscon-fallback on some (mt7988) devicetree nodes. i know that u-boot uses this fallback to get the regmap shared across drivers, but only initializing once with the syscon_uclass. i tried adding the syscon-fallback to linu

Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Michael Nazzareno Trimarchi
Hi On Wed, Jul 10, 2024 at 3:34 PM Fabio Estevam wrote: > > Hi Michael, > > On Sun, Jul 7, 2024 at 5:20 AM Michael Trimarchi > wrote: > > > -static const char *imx8mn_ecspi1_sels[] = {"osc_24m", "sys_pll2_200m", > > "sys_pll1_40m", > > +static const char *imx8mn_ecspi1_sels[] = {"clock-osc-24m"

Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Fabio Estevam
Hi Michael, On Sun, Jul 7, 2024 at 5:20 AM Michael Trimarchi wrote: > -static const char *imx8mn_ecspi1_sels[] = {"osc_24m", "sys_pll2_200m", > "sys_pll1_40m", > +static const char *imx8mn_ecspi1_sels[] = {"clock-osc-24m", "sys_pll2_200m", > "sys_pll1_40m", The kernel uses osc_24m. Why does U

Re: [PATCH v4 00/21] qcom: rpmh core and regulator support

2024-07-10 Thread Sumit Garg
Hi Caleb, On Tue, 9 Jul 2024 at 15:04, Caleb Connolly wrote: > > This series introduces support for the RPMh (Resource Power Manager > (hardened)) co-processor and associated regulator driver found on most > modern Qualcomm platforms (since ~2017). > > Even though most regulators are controlled v

Re: [PATCH v3] arm: mvebu: Enable bootstd and other modernization for Synology DS414 (Armada XP) board

2024-07-10 Thread Phil Sutter
On Wed, Jul 10, 2024 at 08:26:12AM +0200, Stefan Roese wrote: > On 7/8/24 06:39, Tony Dinh wrote: > > - Switch to standard boot (in include/configs/ds414.h and > > configs/ds414_defconfig) > > - Implement board_late_init() to ensure successful enumeration > > of USB3 devices > > - Remove unnecessar

[PATCH v3 4/5] bootstd: Add a bootmeth for Android

2024-07-10 Thread Mattijs Korpershoek
Android boot flow is a bit different than a regular Linux distro. Android relies on multiple partitions in order to boot. A typical boot flow would be: 1. Parse the Bootloader Control Block (BCB, misc partition) 2. If BCB requested bootonce-bootloader, start fastboot and wait. 3. If BCB requested

[PATCH v3 5/5] bootstd: Add test for bootmeth_android

2024-07-10 Thread Mattijs Korpershoek
Add a unit test for testing the Android bootmethod. This requires another mmc image (mmc7) to contain the following partitions: - misc: contains the Bootloader Control Block (BCB) - boot_a: contains a fake generic kernel image - vendor_boot_a: contains a fake vendor_boot image Also add BOOTMETH_A

[PATCH v3 3/5] android: boot: Add set_abootimg_addr() and set_avendor_bootimg_addr()

2024-07-10 Thread Mattijs Korpershoek
The only way to configure the load addresses for both bootimg and vendor_bootimg is by using the "abootimg" command. If we want to use the C API, there is no equivalent. Add set_abootimg_addr() and set_avendor_bootimg_addr() so that we can specify the load address from C. This can be useful for i

[PATCH v3 2/5] bootstd: Add bootflow_iter_check_mmc() helper

2024-07-10 Thread Mattijs Korpershoek
Some bootflows might be able to only boot from MMC devices. Add a helper function these bootflows can use. Reviewed-by: Igor Opaniuk Reviewed-by: Julien Masson Reviewed-by: Guillaume La Roque Tested-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek --- boot/bootflow.c| 12 ++

[PATCH v3 1/5] boot: android: Provide vendor_bootimg_addr in boot_get_fdt()

2024-07-10 Thread Mattijs Korpershoek
When calling android_image_get_dtb_by_index() using boot image v3+, we should also pass the vendor_boot ramdisk address. Use get_avendor_bootimg_addr() to do so. Notes: on boot image v2, this is harmless since get_avendor_bootimg_addr() returns -1. for legacy implementations that do

[PATCH v3 0/5] bootstd: Add Android support

2024-07-10 Thread Mattijs Korpershoek
Android boot flow is a bit different than a regular Linux distro. Android relies on multiple partitions in order to boot. A typical boot flow would be: 1. Parse the Bootloader Control Block (BCB, misc partition) 2. If BCB requested bootonce-bootloader, start fastboot and wait. 3. If BCB requested

Re: [PATCH] mtd: nand: raw: atmel: Use ONFI ECC params if available

2024-07-10 Thread Alexander Dahl
Hello, Am Tue, Jul 09, 2024 at 10:28:12PM + schrieb Zixun Li: > When ECC parameters are not specified in DT, first try ONFI ECC parameters > before fallback to maximum strength. To be inline with kernel driver behavior. > > Signed-off-by: Zixun LI > --- > drivers/mtd/nand/raw/atmel/nand-con

[PATCH v2 4/5] test/py: efi_capsule: rename device tree overlay source to .dtso

2024-07-10 Thread Rasmus Villemoes
Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. Note that in the linux tree, all device tree overlay sources have been renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards st

[PATCH v2 5/5] kbuild: Disallow DTB overlays to built from .dts named source files

2024-07-10 Thread Rasmus Villemoes
[equivalent to linux commit 81d362732bac] As a follow up to the series allowing DTB overlays to built from .dtso files. Now that all overlays have been renamed, remove the ability to build from overlays from .dts files to prevent any files with the old name from accidental being added. Signed-off

[PATCH v2 3/5] test: overlay: rename overlay source files to .dtso

2024-07-10 Thread Rasmus Villemoes
Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. In this case, the files are really meant to be compiled to .dtbo -> .dtbo.S -> .dtbo.o that get embedded in the image, which means that the begin/end symbols generated by the makefile rule

[PATCH v2 2/5] kbuild: Allow DTB overlays to built into .dtbo.S files

2024-07-10 Thread Rasmus Villemoes
[linux commit 941214a512d8, modified for U-Boot by removing the include of vmlinux.lds.h and replacing STRUCT_ALIGNMENT by 16.] DTB files can be built into the kernel by converting them to assembly files then assembling them into object files. We extend this here for DTB overlays with the .dtso ex

[PATCH v2 1/5] arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso

2024-07-10 Thread Rasmus Villemoes
Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. No functional change, as we currently have rules for producing a foo.dtbo from either foo.dts or foo.dtso. Note that in the linux tree, all device tree overlay sources have been renamed to

[PATCH v2 0/5] finish using .dtso for overlay source files

2024-07-10 Thread Rasmus Villemoes
This is a followup to the patches that landed in 2024.01 and nearly made sure that source files for producing .dtbo files use the .dtso extension. In the same release, a few new .dts files snuck in, and there was also some test code involving .dtbo -> .dtbo.S -> .dtbo.o I didn't really know how to