pandora-u-boot.git
3 months agoARM: dts: stm32: Add TIMERS inverted PWM channel 3 on STM32MP135F-DK
Cheick Traore [Tue, 11 Mar 2025 14:30:37 +0000 (15:30 +0100)]
ARM: dts: stm32: Add TIMERS inverted PWM channel 3 on STM32MP135F-DK

The pwm source TIM1_CH3N channel (on PE12) in inverted polarity mode
will be used to manage the brightness of the panel backlight on
STM32MP135F-DK.

Signed-off-by: Cheick Traore <cheick.traore@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoconfigs: stm32mp13: Enable MFD timer and PWM for stm32mp13_defconfig
Cheick Traore [Tue, 11 Mar 2025 14:30:36 +0000 (15:30 +0100)]
configs: stm32mp13: Enable MFD timer and PWM for stm32mp13_defconfig

Enable the following configs:

* CONFIG_MFD_STM32_TIMERS: enables support for the STM32 multifunction
                           timer
* CONFIG_DM_PWM: enables support for pulse-width modulation devices
* CONFIG_CMD_PWM: enables 'pwm' command to control PWM channels
* CONFIG_PWM_STM32: enables support for the STM32 PWM devices

Signed-off-by: Cheick Traore <cheick.traore@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agopwm: stm32: add driver to support pwm with timer
Cheick Traore [Tue, 11 Mar 2025 14:30:35 +0000 (15:30 +0100)]
pwm: stm32: add driver to support pwm with timer

Add driver to support pwm on STM32MP1X SoCs. The PWM signal is generated
using a multifuntion timer which provide a pwm feature. Clock rate and
addresses are retrieved from the multifunction timer driver.

Signed-off-by: Cheick Traore <cheick.traore@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agomach-stm32: add multifunction timer driver support
Cheick Traore [Tue, 11 Mar 2025 14:30:34 +0000 (15:30 +0100)]
mach-stm32: add multifunction timer driver support

Add support for STM32MP timer multi-function driver.
These timers can be use as counter, trigger or pwm generator.
This driver will be used to manage the main resources of the timer to
provide them to the functionnalities which need these ones.

Signed-off-by: Cheick Traore <cheick.traore@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: dts: stm32: Add support for environment in eMMC on STM32MP13xx DHCOR SoM
Marek Vasut [Mon, 10 Feb 2025 01:32:29 +0000 (02:32 +0100)]
ARM: dts: stm32: Add support for environment in eMMC on STM32MP13xx DHCOR SoM

Enable support for environment in eMMC on STM32MP13xx DHCOR SoM,
in addition to existing support for environment in SPI NOR. The
environment size is the same, except in case the environment is
placed in eMMC, it is stored at the end of eMMC BOOT partitions
in the last 32 sectors of each eMMC HW BOOT partition.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoconfigs: stm32f769-disco: Fix console cmdline
Linus Walleij [Tue, 11 Feb 2025 09:12:51 +0000 (10:12 +0100)]
configs: stm32f769-disco: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: stm32: Introduce DH STM32MP15xx DHSOM board specific defconfigs
Marek Vasut [Sat, 22 Feb 2025 17:13:44 +0000 (18:13 +0100)]
ARM: stm32: Introduce DH STM32MP15xx DHSOM board specific defconfigs

Move stm32mp15_dhcom_basic_defconfig into stm32mp15_dhcom_basic.config.
Retain legacy stm32mp15_dhcom_basic_defconfig as multi-config for all
DH STM32MP15xx DHCOM based boards. Move stm32mp15_dhsor_basic_defconfig
into stm32mp15_dhsor_basic.config. Retain stm32mp15_dhsor_basic_defconfig
as multi-config for all DH STM32MP15xx DHCOR based boards.

Introduce separate stm32mp15_dhcom_drc02_basic_defconfig,
stm32mp15_dhcom_pdk2_basic_defconfig, stm32mp15_dhcom_picoitx_basic_defconfig
for each STM32MP15xx DHCOM based board and separate
stm32mp15_dhcor_avenger96_basic_defconfig,
stm32mp15_dhcor_drc_compact_basic_defconfig,
stm32mp15_dhcor_testbench_basic_defconfig for each
STM32MP15xx DHCOR based board, to make build for those boards easier.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: stm32: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD update on DH STM32MP1 DHSOM
Marek Vasut [Fri, 21 Feb 2025 17:08:38 +0000 (18:08 +0100)]
ARM: stm32: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD update on DH STM32MP1 DHSOM

The environment is missing closing quotes for string variable, but the
variable is empty on this system, remove the CONFIG_BOOTCOUNT_ALTBOOTCMD
assignment entirely.

Fixes: 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 months agoboard: stm32f746-disco: drop board_late_init()
Dario Binacchi [Mon, 24 Feb 2025 18:39:27 +0000 (19:39 +0100)]
board: stm32f746-disco: drop board_late_init()

The removal of the "st,button1" and "st,led1" compatibles has emptied
the board_late_init(), so let's remove it along with the configuration
that allows its invocation.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: dts: stm32: drop "st,led1" compatible
Dario Binacchi [Mon, 24 Feb 2025 18:39:26 +0000 (19:39 +0100)]
ARM: dts: stm32: drop "st,led1" compatible

It is pointless to use the custom compatible "st,led1" when
stm32746g-eval.dts and stm32f769-disco.dts already contain the
"gpio-leds" compatible, which is specifically used for GPIO LEDs
management.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: dts: stm32: drop "st,button1" compatible
Dario Binacchi [Mon, 24 Feb 2025 18:39:25 +0000 (19:39 +0100)]
ARM: dts: stm32: drop "st,button1" compatible

It is pointless to use the custom compatible "st,button1" when
stm32746g-eval.dts and stm32f769-disco.dts already contain the
"gpio-keys" compatible, which is specifically used for button
management.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoARM: dts: stm32: Add support for STM32MP13xx DHCOR SoM and DHSBC rev.200 board
Marek Vasut [Sun, 2 Mar 2025 15:43:41 +0000 (16:43 +0100)]
ARM: dts: stm32: Add support for STM32MP13xx DHCOR SoM and DHSBC rev.200 board

LDO2 is expansion connector supply on STM32MP13xx DHCOR DHSBC rev.200.
LDO5 is carrier board supply on STM32MP13xx DHCOR DHSBC rev.200. Keep
both regulators always enabled to make sure both the carrier board and
the expansion connector is always powered on and supplied with correct
voltage.

Describe ST33TPHF2XSPI TPM 2.0 chip reset lines.

This is a port of Linux kernel patch posted at:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20250302152605.54792-1-marex@denx.de/
This change shall be removed when the Linux kernel DT change lands
and Linux kernel DTs get synchronized with U-Boot DTs.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 months agoMerge patch series "This series adds support for file renaming to EFI_FILE_PROTOCOL...
Tom Rini [Fri, 7 Mar 2025 17:50:34 +0000 (11:50 -0600)]
Merge patch series "This series adds support for file renaming to EFI_FILE_PROTOCOL.SetInfo()."

Gabriel Dalimonte <gabriel.dalimonte@gmail.com> says:

This series adds support for file renaming to EFI_FILE_PROTOCOL.SetInfo().
One of the use cases for renaming in EFI is to facilitate boot loader
boot counting.

No existing filesystems in U-Boot currently include file renaming,
resulting in support for renaming at the filesystem level and a
concrete implementation for the FAT filesystem.

Link: https://lore.kernel.org/r/20250217182648.31294-1-gabriel.dalimonte@gmail.com
3 months agoefi_loader: support file rename in SetInfo()
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:47 +0000 (13:26 -0500)]
efi_loader: support file rename in SetInfo()

Following the UEFI specification. The specification did not seem to
delineate if file_name was explicitly a file name only, or could
include paths to move the file to a different directory. The more
generous interpretation of supporting paths was selected.

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agoefi_loader: move path out of file_handle
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:46 +0000 (13:26 -0500)]
efi_loader: move path out of file_handle

In order to support renaming via SetInfo(), path must allow for longer
values than what was originally present when file_handle was allocated.

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
3 months agofs: fat: update parent dirs metadata on dentry create/delete
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:45 +0000 (13:26 -0500)]
fs: fat: update parent dirs metadata on dentry create/delete

POSIX filesystem functions that create or remove directory entries contain
text along the lines of "[function] shall mark for update the last data
modification and last file status change timestamps of the parent
directory of each file." [1][2][3] The common theme is these timestamp
updates occur when a directory entry is added or removed. The
create_link() and delete_dentry_link() functions have been changed to
update the modification timestamp on the directory where the direntry
change occurs. This differs slightly from Linux in the case of rename(),
where Linux will not update `new_path`'s parent directory's timestamp if
it is replacing an existing file. (via `vfat_add_entry` [4])

The timestamps are not updated if the build configuration does not support
RTCs. This is an effort to minimize introducing erratic timestamps where
they would go from [current date] -> 2000-01-01 (error timestamp in the
FAT driver). I would assume an unchanged timestamp would be more valuable
than a default timestamp in these cases.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html
[2] https://pubs.opengroup.org/onlinepubs/9799919799/functions/unlink.html
[3] https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html
[4] https://elixir.bootlin.com/linux/v6.12.6/source/fs/fat/namei_vfat.c#L682

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
3 months agofs: fat: add rename
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:44 +0000 (13:26 -0500)]
fs: fat: add rename

The implementation roughly follows the POSIX specification for
rename() [1]. The ordering of operations attempting to minimize the chance
for data loss in unexpected circumstances.

The 'mv' command was implemented as a front end for the rename operation
as that is what most users are likely familiar with in terms of behavior.

The 'FAT_RENAME' Kconfig option was added to prevent code size increase on
size-oriented builds like SPL.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
3 months agofs: add rename infrastructure
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:43 +0000 (13:26 -0500)]
fs: add rename infrastructure

The selection for *rename as the name for the rename/move operation
derives from the POSIX specification where they name the function
rename/renameat. [1] This aligns with Linux where the syscalls for
renaming/moving also use the rename/renameat naming.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agofs: fat: factor out dentry link create/delete
Gabriel Dalimonte [Mon, 17 Feb 2025 18:26:42 +0000 (13:26 -0500)]
fs: fat: factor out dentry link create/delete

The create_link() code was previously duplicated in two existing functions.
The two functions will be used in a future commit to achieve renaming.

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
3 months agoMerge patch series "tools: Minor clean-ups for the command library"
Tom Rini [Tue, 4 Mar 2025 19:31:54 +0000 (13:31 -0600)]
Merge patch series "tools: Minor clean-ups for the command library"

Simon Glass <sjg@chromium.org> says:

This series adds comments and fixes pylint warnings in the command
library. It also introduces a new, simpler way of running a single
command.

Link: https://lore.kernel.org/r/20250203162704.627469-1-sjg@chromium.org
3 months agou_boot_pylib: Add a function to run a single command
Simon Glass [Mon, 3 Feb 2025 16:26:45 +0000 (09:26 -0700)]
u_boot_pylib: Add a function to run a single command

Add a helper to avoid needing to use a list within a list for this
simple case.

Update existing users of runpipe() to use this where possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agou_boot_pylib: Fix pylint warnings in command
Simon Glass [Mon, 3 Feb 2025 16:26:44 +0000 (09:26 -0700)]
u_boot_pylib: Fix pylint warnings in command

This file has a lot of warnings. Before adding any more features, fix
those which are straightforward to resolve.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agou_boot_pylib: Add an exception-class for errors
Simon Glass [Mon, 3 Feb 2025 16:26:43 +0000 (09:26 -0700)]
u_boot_pylib: Add an exception-class for errors

Throwing an Exception is not very friendly since it is the top-level
class of all exceptions. Declare a new class instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agou_boot_pylib: Correct case for test_result
Simon Glass [Mon, 3 Feb 2025 16:26:42 +0000 (09:26 -0700)]
u_boot_pylib: Correct case for test_result

This should be in capitals and defined at the start of the file. Update
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agolib: ecdsa: fix prevent memory leak in ecdsa_add_verify_data
Anton Moryakov [Thu, 6 Feb 2025 21:47:59 +0000 (00:47 +0300)]
lib: ecdsa: fix prevent memory leak in ecdsa_add_verify_data

- Ensure `free_ctx` is called in both error and success paths.
- Fix memory leak in `ctx.signature` when `do_add` fails."

Triggers found by static analyzer Svace.

Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
3 months agotiny-printf: emit \0 as %c
Alexander Sverdlin [Thu, 20 Feb 2025 12:49:07 +0000 (13:49 +0100)]
tiny-printf: emit \0 as %c

The current code has a problematic corner case with formar "%c" and
0 as parameter. The proper zero byte is being emitted into digit buffer
but the final copy into outstr expects null-terminated string and doesn't
copy the required \0 byte. This has lead to malformed TFTP packets, refer
to tftp_send() which relies on %c to generate multiple zero-terminated
strings in one buffer.

Introduce a variable to force the copy of one character in this case.
The new behaviour is consistent with non-tiny implementation.

Reported-by: Chintan Vankar <c-vankar@ti.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
3 months agoMerge patch series "arm: mach-k3: j722s: Enable ESM to support watchdogs"
Tom Rini [Mon, 3 Mar 2025 20:22:24 +0000 (14:22 -0600)]
Merge patch series "arm: mach-k3: j722s: Enable ESM to support watchdogs"

Keerthy <j-keerthy@ti.com> says:

The series enables watchdog support on J722S. It adds ESM initialization
to enable routing the watchdog events to trigger a SOC reset.

Link: https://lore.kernel.org/r/20250217105718.3109-1-j-keerthy@ti.com
3 months agoMerge patch series "J784S4: Enable USB DFU boot, DFU flash and UMS configs"
Tom Rini [Mon, 3 Mar 2025 20:21:14 +0000 (14:21 -0600)]
Merge patch series "J784S4: Enable USB DFU boot, DFU flash and UMS configs"

Siddharth Vadapalli <s-vadapalli@ti.com> says:

This series enables configs for USB DFU boot, USB DFU flash and USB Mass
Storage command for J784S4. The device-tree changes required for enabling
these features will be posted as patches to Linux device-tree mailing lists
and will eventually make it to U-Boot via DT Sync.

Link: https://lore.kernel.org/r/20250218094950.2542006-1-s-vadapalli@ti.com
3 months agoconfigs: j784s4_evm_a72_defconfig: enable USB DFU boot, DFU flash and UMS
Siddharth Vadapalli [Tue, 18 Feb 2025 09:49:45 +0000 (15:19 +0530)]
configs: j784s4_evm_a72_defconfig: enable USB DFU boot, DFU flash and UMS

Enable support for USB DFU boot via USB0 instance of USB on J784S4 SoC
which is a Cadence USB Controller. Additionally, enable support for USB
DFU flash and USB Mass Storage (UMS) command. While at it, sync with
savedefconfig.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
3 months agoconfigs: j784s4_evm_r5_defconfig: enable USB DFU boot
Siddharth Vadapalli [Tue, 18 Feb 2025 09:49:44 +0000 (15:19 +0530)]
configs: j784s4_evm_r5_defconfig: enable USB DFU boot

The USB0 instance of USB on J784S4 SoC is a Cadence USB Controller and
supports USB DFU boot. Enable support for it.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
3 months agoconfigs: j722s_evm_r5_defconfig: Enable the ESM Configs to support watchdog
Keerthy [Mon, 17 Feb 2025 10:57:18 +0000 (16:27 +0530)]
configs: j722s_evm_r5_defconfig: Enable the ESM Configs to support watchdog

Enable ESM configs. ESMs are a prerequisite to enable
watchdog reset functionality. The ESM aka error signalling module
is primarily responsible for sensing the watchdog reset event.

Signed-off-by: Keerthy <j-keerthy@ti.com>
3 months agoarm: mach-k3: j722s: Initialize MCU & MAIN Domain ESMs
Keerthy [Mon, 17 Feb 2025 10:57:17 +0000 (16:27 +0530)]
arm: mach-k3: j722s: Initialize MCU & MAIN Domain ESMs

Initialize MCU & MAIN Domain ESMs as a prerequisite to enable
watchdog reset functionality. The ESM aka error signalling module
is primarily responsible for sensing the watchdog reset event.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
3 months agoMerge patch series "rsa: Add rsa_verify_openssl() to use openssl for host builds"
Tom Rini [Fri, 28 Feb 2025 22:51:10 +0000 (16:51 -0600)]
Merge patch series "rsa: Add rsa_verify_openssl() to use openssl for host builds"

Paul HENRYS <paul.henrys_ext@softathome.com> says:

This serie of patches adds a new tool to authenticate files signed with
a preload header.  This tool is also used in the tests to actually
verify the authenticity of the file signed with such a preload header.

Link: https://lore.kernel.org/r/20250224212055.2992852-1-paul.henrys_ext@softathome.com
3 months agobinman: Authenticate the image when testing the preload signature
Paul HENRYS [Mon, 24 Feb 2025 21:20:55 +0000 (22:20 +0100)]
binman: Authenticate the image when testing the preload signature

Use preload_check_sign to authenticate the generated image when testing the
preload signature in testPreLoad().

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agoconfigs: Enable the pre-load signature in tools-only_defconfig
Paul HENRYS [Mon, 24 Feb 2025 21:20:54 +0000 (22:20 +0100)]
configs: Enable the pre-load signature in tools-only_defconfig

pre-load related config options are enabled to have support of it in host
tools.

'CONFIG_FIT_SIGNATURE=y' is being automatically removed since it is
selected by CONFIG_IMAGE_PRE_LOAD_SIG.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agotools: Add preload_check_sign to authenticate images with a pre-load
Paul HENRYS [Mon, 24 Feb 2025 21:20:53 +0000 (22:20 +0100)]
tools: Add preload_check_sign to authenticate images with a pre-load

preload_check_sign is added so that it can be used to authenticate images
signed with the pre-load signature supported by binman and U-Boot.
It could also be used to test the signature in binman tests signing
images with the pre-load.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agoboot: Add support of the pre-load signature for host tools
Paul HENRYS [Mon, 24 Feb 2025 21:20:52 +0000 (22:20 +0100)]
boot: Add support of the pre-load signature for host tools

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agoimage: Add an inline declaration of unmap_sysmem()
Paul HENRYS [Mon, 24 Feb 2025 21:20:51 +0000 (22:20 +0100)]
image: Add an inline declaration of unmap_sysmem()

Add an empty inline declaration when compiling tools for a host where
unmap_sysmem() is not defined.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agorsa: Add rsa_verify_openssl() to use openssl for host builds
Paul HENRYS [Mon, 24 Feb 2025 21:20:50 +0000 (22:20 +0100)]
rsa: Add rsa_verify_openssl() to use openssl for host builds

rsa_verify_openssl() is used in lib/rsa/rsa-verify.c to authenticate data
when building host tools.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
3 months agoMerge patch series "boards: siemens: iot2050: SM variant, sysinfo support, fixes...
Tom Rini [Fri, 28 Feb 2025 14:42:01 +0000 (08:42 -0600)]
Merge patch series "boards: siemens: iot2050: SM variant, sysinfo support, fixes & cleanups"

Baocheng Su <baocheng.su@siemens.com> says:

This introduces a sysinfo driver which also permits SMBIOS support.

The first 10 patches of v2 have already been applied. The remaining is
solely the sysinfo driver. To maintain consistency and ease of searching
through the history, the series title remains unchanged.

Link: https://lore.kernel.org/r/20250218023614.52574-1-baocheng.su@siemens.com
3 months agoboard: siemens: iot2050: Use sysinfo for board initialization
Baocheng Su [Tue, 18 Feb 2025 02:36:14 +0000 (10:36 +0800)]
board: siemens: iot2050: Use sysinfo for board initialization

Drop the info structure parsing of the board in favor of our new sysinfo
driver to avoid code duplication.

Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
[Jan: rebasing, split-up, cleanup]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 months agosysinfo: Add driver for IOT2050 boards
Baocheng Su [Tue, 18 Feb 2025 02:36:13 +0000 (10:36 +0800)]
sysinfo: Add driver for IOT2050 boards

This brings a sysinfo driver and DT entry for the IOT2050 board series.
It translates the board information passed from SE-Boot to SPL into
values that can be retrieved via the sysinfo API. Will is already used
to fill the SMBIOS table when booting via EFI.

Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
[Jan: split-off as separate patch, cleanup]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 months agosysinfo: Add SYSID_BOARD_RAM_SIZE_MB
Baocheng Su [Tue, 18 Feb 2025 02:36:12 +0000 (10:36 +0800)]
sysinfo: Add SYSID_BOARD_RAM_SIZE_MB

Add a new field SYSID_BOARD_RAM_SIZE_MB to sysinfo structure to store
the size of RAM in MB. dram_init can use this field to get the RAM size
via sysinfo driver.

Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
3 months agosysinfo: Add API for accessing data elements
Baocheng Su [Tue, 18 Feb 2025 02:36:11 +0000 (10:36 +0800)]
sysinfo: Add API for accessing data elements

This commit introduces a new API to the sysinfo module, allowing access
to data elements. This is particularly useful for handling data with
multiple instances, such as MAC addresses.

Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
3 months agosmbios: Fill UUID from sysinfo when available
Baocheng Su [Tue, 18 Feb 2025 02:36:10 +0000 (10:36 +0800)]
smbios: Fill UUID from sysinfo when available

Allow for the sysinfo drivers to provide a system UUID to SMBIOS. Will
be first used by the IOT2050 boards.

Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
3 months agodma: ti: k3-udma: Avoid Memory leak issues during dma memcpy
Prasanth Babu Mantena [Thu, 20 Feb 2025 13:18:27 +0000 (18:48 +0530)]
dma: ti: k3-udma: Avoid Memory leak issues during dma memcpy

During dma memcpy, bcdma descriptor gets allocated for each
transaction and not freed after completion of that transaction.
So, avoid the memory allocation for every transaction.

Add one descriptor per dma device and allocate it once in
resource setup. This descriptor can now be used for all
dma memcpy transactions optimally.

Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
3 months agoserial: ns16550: Fix pointer type mismatch
J. Neuschäfer [Tue, 18 Feb 2025 13:39:45 +0000 (14:39 +0100)]
serial: ns16550: Fix pointer type mismatch

serial_out_dynamic() takes a u8* addr and uses it for 8-bit or 32-bit
accesses, depending on the value of plat->reg_width. This results in a
pointer type mismatch that the compiler may even turn into an error:

drivers/serial/ns16550.c: In function â€˜serial_out_dynamic’:
drivers/serial/ns16550.c:115:42: error: passing argument 1 of â€˜out_be32’ from incompatible pointer type [-Wincompatible-pointer-types]
  115 |                                 out_be32(addr, value);
      |                                          ^~~~
      |                                          |
      |                                          u8 * {aka unsigned char *}

This error was observed on PowerPC.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
3 months agomtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area
Alexander Stein [Thu, 20 Feb 2025 14:58:07 +0000 (15:58 +0100)]
mtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area

If there is an unallocated memory area before the last, filling parting
the size calculation for MTD_SIZE_REMAINING does not take this hole
into account.
Fix this by calculating the remaining size just based on total size
and partition offset.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
3 months agoMerge patch series "env: mmc: Make redundant env in both eMMC boot partitions conside...
Tom Rini [Fri, 28 Feb 2025 14:35:57 +0000 (08:35 -0600)]
Merge patch series "env: mmc: Make redundant env in both eMMC boot partitions consider DT properties"

This series from Marek Vasut <marex@denx.de> clarifies and makes a bit
more configurable the case of redundant environment storage using the
eMMC boot partitions.

Link: https://lore.kernel.org/r/20250221184732.202336-1-marex@denx.de
3 months agoenv: mmc: Clean up env_mmc_load() ifdeffery
Marek Vasut [Fri, 21 Feb 2025 18:47:24 +0000 (19:47 +0100)]
env: mmc: Clean up env_mmc_load() ifdeffery

Rename the variants of env_mmc_load() for redundant and non-redundant
environment to env_mmc_load_redundant() and env_mmc_load_singular()
respectively and convert the env_mmc_load() implementation to use of
if (IS_ENABLED(...)). As a result, drop __maybe_unused from
mmc_env_is_redundant_in_both_boot_hwparts().

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agoenv: mmc: Make redundant env in both eMMC boot partitions consider DT properties
Marek Vasut [Fri, 21 Feb 2025 18:47:23 +0000 (19:47 +0100)]
env: mmc: Make redundant env in both eMMC boot partitions consider DT properties

Introduce a new function mmc_env_is_redundant_in_both_boot_hwparts()
which replaces IS_ENABLED(ENV_MMC_HWPART_REDUND) and internally does
almost the same check as the macro which assigned ENV_MMC_HWPART_REDUND
did, and call it in place of IS_ENABLED(ENV_MMC_HWPART_REDUND).

The difference compared to IS_ENABLED(ENV_MMC_HWPART_REDUND) is
in the last conditional, which does not do plain macro compare
(CONFIG_ENV_OFFSET == CONFIG_ENV_OFFSET_REDUND), but instead does
mmc_offset(mmc, 0) == mmc_offset(mmc, 1). If OF_CONTROL is not
in use, this gets optimized back to original macro compare, but
if OF_CONTROL is in use, this also takes into account the DT
properties u-boot,mmc-env-offset and u-boot,mmc-env-offset-redundant.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
3 months agoMerge tag 'u-boot-imx-next-20250227' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 27 Feb 2025 15:23:36 +0000 (09:23 -0600)]
Merge tag 'u-boot-imx-next-20250227' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

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

- Convert imx6q-lxr and imxrt1050 to OF_UPSTREAM.
- Fix potential memory leak on ]imx/imx8/imx8m]image.
- Restrict DDR_SI_TEST to only Siemens Capricorn board.
- Fix CONFIG_BOOTCOUNT_ALTBOOTCMD on Data Modul and DH imx8m boards.

3 months agoimx6q-lxr: Convert to OF_UPSTREAM
Fabio Estevam [Thu, 27 Feb 2025 13:02:20 +0000 (10:02 -0300)]
imx6q-lxr: Convert to OF_UPSTREAM

The imx6q-lxr devicetree has landed in kernel 6.13.

Switch to OF_UPSTREAM to make use of the upstream devicetree.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 months agoARM: imx: Introduce DH i.MX6 DHSOM board specific defconfigs
Marek Vasut [Sat, 22 Feb 2025 17:13:26 +0000 (18:13 +0100)]
ARM: imx: Introduce DH i.MX6 DHSOM board specific defconfigs

Move content of dh_imx6_defconfig into dh_imx6.config. Retain legacy
dh_imx6_defconfig as multi-config for all DH i.MX6 DHSOM based boards.
Introduce separate imx6_dhcom_drc02_defconfig, imx6_dhcom_pdk2_defconfig
and imx6_dhcom_picoitx_defconfig for each i.MX6 DHSOM based board, to
make build for those boards easier. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
3 months agoARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD duplication on DH i.MX8MP DHCOM
Marek Vasut [Fri, 21 Feb 2025 17:08:01 +0000 (18:08 +0100)]
ARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD duplication on DH i.MX8MP DHCOM

Deduplicate the config files again, move CONFIG_BOOTCOUNT_ALTBOOTCMD
into common imx8mp_dhsom.config .

Fixes: 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig")
Signed-off-by: Marek Vasut <marex@denx.de>
3 months agoARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD duplication on Data Modul i.MX8M eDM SBC
Marek Vasut [Fri, 21 Feb 2025 17:07:17 +0000 (18:07 +0100)]
ARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD duplication on Data Modul i.MX8M eDM SBC

Deduplicate the config files again, move CONFIG_BOOTCOUNT_ALTBOOTCMD
into common imx8m_data_modul.config .

Fixes: 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig")
Signed-off-by: Marek Vasut <marex@denx.de>
3 months agoARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD update on Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Fri, 21 Feb 2025 17:07:16 +0000 (18:07 +0100)]
ARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD update on Data Modul i.MX8M Mini eDM SBC

The environment is missing quotes for string variable, add them.

Fixes: 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 months agotools: imx8mimage: Fix potential memory leak
Maks Mishin [Sun, 2 Feb 2025 17:10:39 +0000 (20:10 +0300)]
tools: imx8mimage: Fix potential memory leak

Dynamic memory, referenced by 'line', is allocated at imx8mimage.c:187
by calling function 'getline' and lost at imx8mimage.c:210.

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
3 months agotools: imx8image: Fix potential memory leak
Maks Mishin [Sun, 2 Feb 2025 17:05:17 +0000 (20:05 +0300)]
tools: imx8image: Fix potential memory leak

Dynamic memory, referenced by 'line', is allocated at imx8image.c:270
by calling function 'getline' and lost at imx8image.c:294.

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
3 months agotools: imximage: Fix potential memory leak
Maks Mishin [Fri, 31 Jan 2025 10:04:46 +0000 (13:04 +0300)]
tools: imximage: Fix potential memory leak

Dynamic memory, referenced by 'line', is allocated at imximage.c:761
by calling function 'getline' and lost at imximage.c:793.

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
3 months agosiemens: common: Make DDR_SI_TEST depend on TARGET_CAPRICORN
Liya Huang [Fri, 31 Jan 2025 00:52:43 +0000 (08:52 +0800)]
siemens: common: Make DDR_SI_TEST depend on TARGET_CAPRICORN

The DDR_SI_TEST config option is only relevant to the i.MX8 Capricorn
board.
Make DDR_SI_TEST depend on DDR_SI_TEST so that it does not show up
on other targets.

Signed-off-by: Liya Huang <1425075683@qq.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
3 months agoARM: dts: imxrt1050: Migrate to OF_UPSTREAM
Jesse Taube [Mon, 27 Jan 2025 21:19:50 +0000 (16:19 -0500)]
ARM: dts: imxrt1050: Migrate to OF_UPSTREAM

The device tree for imxrt1050 is now
available in the /dts/upstream directory.
Migrate board to use OF_UPSTREAM.

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
Tom Rini [Wed, 26 Feb 2025 20:32:16 +0000 (14:32 -0600)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next

bbmiiphy clean up and DM alignment, finally gets rid of the static
bbmiiphy variables and plugs bbmiiphy into MDIO framework.

3 months agonet: miiphybb: Drop bb_miiphy_buses and bb_miiphy_buses_num
Marek Vasut [Sat, 22 Feb 2025 20:33:33 +0000 (21:33 +0100)]
net: miiphybb: Drop bb_miiphy_buses and bb_miiphy_buses_num

Neither bb_miiphy_buses nor bb_miiphy_buses_num are used anymore.
Drop both of them.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: sh_eth: Drop use of miiphy_get_dev_by_name()
Marek Vasut [Sat, 22 Feb 2025 20:33:32 +0000 (21:33 +0100)]
net: sh_eth: Drop use of miiphy_get_dev_by_name()

Instead of doing another lookup, trivially access the struct mii_dev
embedded in struct bb_miiphy_bus . No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: ravb: Drop use of miiphy_get_dev_by_name()
Marek Vasut [Sat, 22 Feb 2025 20:33:31 +0000 (21:33 +0100)]
net: ravb: Drop use of miiphy_get_dev_by_name()

Instead of doing another lookup, trivially access the struct mii_dev
embedded in struct bb_miiphy_bus . No functional change.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoarm: mvebu: a38x: Drop use of miiphy_get_dev_by_name()
Marek Vasut [Sat, 22 Feb 2025 20:33:30 +0000 (21:33 +0100)]
arm: mvebu: a38x: Drop use of miiphy_get_dev_by_name()

Instead of doing another lookup, trivially access the struct mii_dev
embedded in struct bb_miiphy_bus . No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: miiphybb: Drop name field from struct bb_miiphy_bus
Marek Vasut [Sat, 22 Feb 2025 20:33:29 +0000 (21:33 +0100)]
net: miiphybb: Drop name field from struct bb_miiphy_bus

The struct bb_miiphy_bus embeds struct struct mii_dev, which
already contains one copy of name field. Drop the duplicate
top level copy of name field.

The a38x code does static assignment of disparate names, use
snprintf(...) to fill in matching name in probe to avoid any
breakage.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: miiphybb: Use container_of() in bb_miiphy_getbus()
Marek Vasut [Sat, 22 Feb 2025 20:33:28 +0000 (21:33 +0100)]
net: miiphybb: Use container_of() in bb_miiphy_getbus()

Replace the name based look up in bb_miiphy_getbus() with trivial
container_of() call. This works because the struct bb_miiphy_bus
always embeds the matching struct mii_dev . This also makes the
code much simpler and more efficient.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: designware: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Marek Vasut [Sat, 22 Feb 2025 20:33:27 +0000 (21:33 +0100)]
net: designware: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks

Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: sh_eth: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Marek Vasut [Sat, 22 Feb 2025 20:33:26 +0000 (21:33 +0100)]
net: sh_eth: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks

Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: ravb: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Marek Vasut [Sat, 22 Feb 2025 20:33:25 +0000 (21:33 +0100)]
net: ravb: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks

Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoarm: mvebu: a38x: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Marek Vasut [Sat, 22 Feb 2025 20:33:24 +0000 (21:33 +0100)]
arm: mvebu: a38x: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks

Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: miiphybb: Introduce bb_miiphy_alloc()/bb_miiphy_free() wrappers
Marek Vasut [Sat, 22 Feb 2025 20:33:23 +0000 (21:33 +0100)]
net: miiphybb: Introduce bb_miiphy_alloc()/bb_miiphy_free() wrappers

Introduce bb_miiphy_alloc()/bb_miiphy_free() wrappers to allocate and free
struct bb_miiphy_bus. Make struct bb_miiphy_bus wrap struct mii_dev, which
will become useful later in bb_miiphy_bus accessors, which would be able
to access struct bb_miiphy_bus using container_of, even if the PHY stack
only passes in the inner struct mii_dev .

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: miiphy: Introduce mdio_init()
Marek Vasut [Sat, 22 Feb 2025 20:33:22 +0000 (21:33 +0100)]
net: miiphy: Introduce mdio_init()

Introduce mdio_init() split off from mdio_alloc(), which is used
to initialize already allocated struct mii_dev.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: designware: Extract bbmiiphy initialization into dedicated function
Marek Vasut [Sat, 22 Feb 2025 20:33:21 +0000 (21:33 +0100)]
net: designware: Extract bbmiiphy initialization into dedicated function

Pull the bbmiiphy initialization code from designware_eth_probe() into
dedicated function, dw_bb_mdio_init(), just like all the other MDIO
initialization functions.

Keep check for "snps,bitbang-mii" in the designware_eth_probe(), so the
driver can initialize this MDIO only in case the property is present,
and initialize regular DW MDIO in case it is not present.

The dw_bb_mdio_init() allocates its own MDIO instance, because thus far
code gated behind "snps,bitbang-mii" did depend on allocation of MDIO bus
by the other two MDIO bus options and then rewrote the newly allocated
MDIO bus callbacks, which is wrong, instead allocate proper MDIO bus with
the correct callbacks outright.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: designware: Drop bus index
Marek Vasut [Sat, 22 Feb 2025 20:33:20 +0000 (21:33 +0100)]
net: designware: Drop bus index

There is literally one single bbmiiphy bus in this driver,
remove the bus index handling.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: miiphybb: Drop bb_miiphy_init() and .init callback
Marek Vasut [Sat, 22 Feb 2025 20:33:19 +0000 (21:33 +0100)]
net: miiphybb: Drop bb_miiphy_init() and .init callback

The .init callback is not called by any function, drop it.
There are no more users of the init callback, drop the entire
mechanism.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoarm: mvebu: a38x: Call bb_miiphy init directly in driver probe
Marek Vasut [Sat, 22 Feb 2025 20:33:18 +0000 (21:33 +0100)]
arm: mvebu: a38x: Call bb_miiphy init directly in driver probe

All the resources needed by this .init callback should already
be available by the time probe function runs, simply call the
init callback directly and set the bb_miiphy init callback to
NULL. This shouldn't break anything on this hardware, but would
be nice if someone could double-check and test that.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: designware: Reorder bb_miiphy functions
Marek Vasut [Sat, 22 Feb 2025 20:33:17 +0000 (21:33 +0100)]
net: designware: Reorder bb_miiphy functions

Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agoarm: mvebu: a38x: Reorder bb_miiphy functions
Marek Vasut [Sat, 22 Feb 2025 20:33:16 +0000 (21:33 +0100)]
arm: mvebu: a38x: Reorder bb_miiphy functions

Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: sh_eth: Reorder bb_miiphy functions
Marek Vasut [Sat, 22 Feb 2025 20:33:15 +0000 (21:33 +0100)]
net: sh_eth: Reorder bb_miiphy functions

Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agonet: ravb: Reorder bb_miiphy functions
Marek Vasut [Sat, 22 Feb 2025 20:33:14 +0000 (21:33 +0100)]
net: ravb: Reorder bb_miiphy functions

Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: designware: Drop NULL priv assignment
Marek Vasut [Sat, 22 Feb 2025 20:33:13 +0000 (21:33 +0100)]
net: designware: Drop NULL priv assignment

This is unnecessary, the unset structure member is initialized to
NULL by default, drop the assignment.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: sh_eth: Drop empty init callback
Marek Vasut [Sat, 22 Feb 2025 20:33:12 +0000 (21:33 +0100)]
net: sh_eth: Drop empty init callback

The init function does nothing, the bb_miiphy_init() already checks
whether the .init callback is assigned, and if not, skips calling it.
Remove the empty init function. The entire init callback will be
removed in follow up patches.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agonet: ravb: Drop empty init callback
Marek Vasut [Sat, 22 Feb 2025 20:33:11 +0000 (21:33 +0100)]
net: ravb: Drop empty init callback

The init function does nothing, the bb_miiphy_init() already checks
whether the .init callback is assigned, and if not, skips calling it.
Remove the empty init function. The entire init callback will be
removed in follow up patches.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoMerge patch series "Remove "saveenv" functionality from am57xx evms"
Tom Rini [Tue, 25 Feb 2025 17:11:32 +0000 (11:11 -0600)]
Merge patch series "Remove "saveenv" functionality from am57xx evms"

Anurag Dutta <a-dutta@ti.com> says:

Previously saved environment introduce discrepancies and may lead to
incompatibilities without default settings. This series removes the saved
environment functionality on am57xx evms so that the default configuration
is always loaded

Test result: https://gist.github.com/anuragdutta731/b253ddb0a5538ab6588a3535d7bbecf7

Link: https://lore.kernel.org/r/20250208043938.52832-1-a-dutta@ti.com
3 months agoconfigs: am57xx: Remove saved environments
Anurag Dutta [Sat, 8 Feb 2025 04:39:38 +0000 (10:09 +0530)]
configs: am57xx: Remove saved environments

Saved environments lead to inconsistencies leading to conflicts
with the default environment that U-boot should update during
development. Remove the previously saved environment so that
the default environment is always loaded.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
3 months agoconfigs: am57xx_hs: Remove saved environments
Anurag Dutta [Sat, 8 Feb 2025 04:39:37 +0000 (10:09 +0530)]
configs: am57xx_hs: Remove saved environments

Saved environments cause inconsistencies leading to conflicts
with the default environment that U-boot should update during
development. Remove the previously saved environment so that
the default environment is always loaded.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
3 months agoMerge tag 'u-boot-socfpga-next-20250225' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 25 Feb 2025 14:25:00 +0000 (08:25 -0600)]
Merge tag 'u-boot-socfpga-next-20250225' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next

CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/24816

Please pull the SoCFPGA changes for next from u-boot-socfpga, containing
boot support for the  Altera SoCFPGA Agilex 5 platform in U-Boot. The
changes include:

1. Board-specific configurations and setup required to enable Agilex 5
   operation in U-Boot.
2. Integration of cache coherency unit (CCU) initialization routine,
   including CCU conguration in DT.
3. Clock, firewall (configured in DT), SMMU, low level initialization
   specific to Agilex 5.
4. Integration of memory initialization routine, including DDR setup.

This patch set has been tested on Agilex 5 devkit with QSPI boot
(UBI/UBIFS) and RAM boot (TFTP & ARM DS debugger).

3 months agoconfigs: agilex5: Enable watchdog autostart
Alif Zakuan Yuslaimi [Tue, 18 Feb 2025 08:35:11 +0000 (16:35 +0800)]
configs: agilex5: Enable watchdog autostart

Automatically start watchdog timer for Agilex5. This
configuration is enabled by default in the Kconfig,
hence removing this configuration from Agilex5 defconfig.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoconfigs: socfpga: soc64: agilex5: Enable QSPI boot with UBI / UBIFS
Alif Zakuan Yuslaimi [Tue, 18 Feb 2025 08:35:10 +0000 (16:35 +0800)]
configs: socfpga: soc64: agilex5: Enable QSPI boot with UBI / UBIFS

Add the required configuration in the U-Boot env to enable Linux QSPI
boot with UBI / UBIFS.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoarm: socfpga: soc64: Add support for board_boot_order()
Tien Fong Chee [Tue, 18 Feb 2025 08:35:09 +0000 (16:35 +0800)]
arm: socfpga: soc64: Add support for board_boot_order()

Add board_boot_order() to retrieve the list of boot devices from
spl-boot-order property in device tree. This board_boot_order()
would be used for all Intel SOC64 devices.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoconfigs: socfpga: soc64: agilex5: Enable XGMAC
Tien Fong Chee [Tue, 18 Feb 2025 08:35:08 +0000 (16:35 +0800)]
configs: socfpga: soc64: agilex5: Enable XGMAC

Enable XGMAC for SoCFPGA Agilex5 devkit.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoconfigs: socfpga: soc64: agilex5: Use common ARMv8 linker script
Alif Zakuan Yuslaimi [Tue, 18 Feb 2025 08:35:07 +0000 (16:35 +0800)]
configs: socfpga: soc64: agilex5: Use common ARMv8 linker script

Use default common ARMv8 linker script instead of a separate
SoC64 linker script

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
3 months agoarm: armv8: Improve SPL data save and restore implementation
Alif Zakuan Yuslaimi [Tue, 18 Feb 2025 08:35:06 +0000 (16:35 +0800)]
arm: armv8: Improve SPL data save and restore implementation

Introduce a new symbol in the beginning of .data section in
the common ARMv8 linker script and use that as a reference
for data save and restore.

Previously, the code would rely on calculating the start of
the .data section address via data size, however, we observed
that the data size does not really reflect the SPL mapped
addresses.

In our case, the binman_sym section size was not included in
the data size, which will result in a wrong address for the
.data start section, which prevents us from properly saving
and restoring SPL data.

This approach skips the calculation for the starting address
of the .data section, and instead just defines the beginning
address of the .data section and calling the symbol as needed,
in which we think as a simpler and much more robust method.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoarm: socfpga: agilex5: Add SPL for Agilex5 SoCFPGA
Tien Fong Chee [Wed, 14 Aug 2024 07:56:25 +0000 (15:56 +0800)]
arm: socfpga: agilex5: Add SPL for Agilex5 SoCFPGA

Add SPL support for Agilex5 SoCFPGA.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoddr: altera: Add DDR driver for Agilex5 series
Tingting Meng [Fri, 21 Feb 2025 13:49:41 +0000 (21:49 +0800)]
ddr: altera: Add DDR driver for Agilex5 series

Adding DDR driver support for Agilex5 series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
3 months agoarm: socfpga: smc: Add memory coherency support to mailbox command
Alif Zakuan Yuslaimi [Tue, 18 Feb 2025 08:35:03 +0000 (16:35 +0800)]
arm: socfpga: smc: Add memory coherency support to mailbox command

As cache is enabled in U-Boot and disabled in ATF(BL31). We need to
perform cache flush of buffers that are shared between U-Boot and
ATF using secure monitor calls.

Signed-off-by: Mahesh Rao <mahesh.rao@altera.com>
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
3 months agoconfigs: agilex5: Add configuration for malloc pool
Tien Fong Chee [Tue, 18 Feb 2025 08:35:02 +0000 (16:35 +0800)]
configs: agilex5: Add configuration for malloc pool

Adding configuration for SPL malloc pool.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>