Stephan Gerhold [Thu, 24 Apr 2025 09:16:41 +0000 (11:16 +0200)]
clk: qcom: apq8016: Fix SDCC clock addresses
The SDCC_...(n) macros in clock-apq8016.c result in the wrong addresses:
- SDCC1: SDCC_APPS_CBCR(0) = ((0 * 0x1000) + 0x41018) = 0x41018
Should be 0x42018, this is an invalid register close to the USB clocks.
- SDCC2: SDCC_APPS_CBCR(1) = ((1 * 0x1000) + 0x41018) = 0x42018
Should be 0x43018, this is the SDCC1 clock.
When we try to enable SDCC2, we actually end up enabling SDCC1. When we try
to enable SDCC1, we just issue some broken register writes.
This hasn't caused any trouble so far, because the boot firmware is keeping
both SDCC clocks running. However, if these clocks are disabled when
entering U-Boot, MMC initialization is failing.
Fix this by using the proper offset for the macros. The SDCC_CMD_RCGR() was
already correct, but change it the same way for consistency.
Fixes:
085921368b7d ("arm: Add support for Qualcomm Snapdragon family")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250424-apq8016-clock-fixes2-v2-1-fcc371c9e45f@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Rui Miguel Silva [Sat, 12 Apr 2025 17:41:31 +0000 (18:41 +0100)]
power: qcom_vbus_regulator: add and fix support for pmic variants
Fix and add support for different pmic variants pm8x50b to handle
the vbus regulator.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20250412174157.104419-1-rui.silva@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Stephan Gerhold [Thu, 17 Apr 2025 13:49:13 +0000 (15:49 +0200)]
board: dragonboard410c: Enable support for KASLR in Linux
When booting Linux, there is currently the following warning in the console
when using the default dragonboard410c_defconfig:
[ 0.000000] KASLR disabled due to lack of seed
Fix this by enabling DM_RNG and RNG_MSM in the defconfig to generate the
KASLR seed:
[ 0.000000] KASLR enabled
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by:
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250417-db410c-fixes2-v1-3-76ad994da152@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Stephan Gerhold [Thu, 17 Apr 2025 13:49:12 +0000 (15:49 +0200)]
board: dragonboard410c: Drop custom reduced malloc size
At the moment, the dragonboard410c_defconfig specifies a custom
SYS_MALLOC_LEN, lower than the default for Qualcomm boards defined in
arch/arm/mach-snapdragon/Kconfig. It looks like it's too low, since
flashing larger sparse partition images using Fastboot fails with:
FAILED (remote: 'Malloc failed for: CHUNK_TYPE_RAW')
We are not really that memory-constrained for U-Boot on DB410c, so fix
this by just dropping the custom malloc size and using the default.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by:
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250417-db410c-fixes2-v1-2-76ad994da152@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Stephan Gerhold [Thu, 17 Apr 2025 13:49:11 +0000 (15:49 +0200)]
board: dragonboard410c: Fix button cmd name
Commit
359e1d4a57e0 ("board: dragonboard410c: Use button_cmd instead of
custom code") was made in parallel with commit
8f5685d5d32f ("button:
qcom-pmic: prettify and standardise button labels"), which changed the
default button label from "vol_down" to "Volume Down". This is causing
errors in the console during boot now:
No button labelled 'vol_down'
Fix this by using the new label.
Fixes:
359e1d4a57e0 ("board: dragonboard410c: Use button_cmd instead of custom code")
Fixes:
8f5685d5d32f ("button: qcom-pmic: prettify and standardise button labels")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by:
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250417-db410c-fixes2-v1-1-76ad994da152@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Eddie Kovsky [Wed, 21 May 2025 21:26:59 +0000 (15:26 -0600)]
image: android: fix ramdisk default address
Commit
21e7fa0e3ac5 ("image: android: handle ramdisk default address")
changed the default behavior for header versions less than or equal to 2.
The ramdisk address (img_data.ramdisk_ptr) is only assigned to *rd_data
if the physical load address (img_data.ramdisk_addr) is equal to 0 or
the Android default ramdisk address.
/* Ramdisk can be used in-place, use current ptr */
if (img_data.ramdisk_addr == 0 ||
img_data.ramdisk_addr == ANDROID_IMAGE_DEFAULT_RAMDISK_ADDR) {
*rd_data = img_data.ramdisk_ptr;
} else {
ramdisk_ptr = img_data.ramdisk_addr;
*rd_data = ramdisk_ptr;
memcpy((void *)(ramdisk_ptr), (void *)img_data.ramdisk_ptr,
img_data.ramdisk_size);
}
When the img_data.ramdisk_addr and the img_data.kernel_addr are the same
*rd_data needs to be assigned to the ramdisk address (ramdisk_ptr), not
the physical address (ramdisk_addr).
As a result of the current behavior, we can no longer boot a kernel on
the Renesas R-Car S4 board.
Add an additional check to the if clause so that the ramdisk address is
assigned when the kernel address and the ramdisk address are the same,
restoring the previous default behavior.
Fixes:
21e7fa0e3ac5 ("image: android: handle ramdisk default address")
Signed-off-by: Eddie Kovsky <ekovsky@redhat.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # khadas vim3
Benjamin ROBIN [Tue, 20 May 2025 20:35:15 +0000 (22:35 +0200)]
bootm: Fix bmi->images pointer not initialized in some cases
When building with only bootz command, without bootm, images pointer
inside bootm_info structure is not initialized. And since this structure
is stored in stack, the generated error is kind of random, but most of
the time this will generate: "ramdisk - allocation error".
Also, after analysis, this problem could occur with the command booti,
if the command bootm is disabled.
Currently bootm_init() is called by: do_bootz(), do_bootm(), do_booti()
and by do_stm32prog(). And all of these commands execute bootm_run_states()
which access the images pointer stored into bootm_info structure.
So, to fix this issue, just do the assignment unconditionally.
Fixes:
c2211ff65136 ("bootm: Add more fields to bootm_info")
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
Benjamin ROBIN [Sat, 17 May 2025 20:09:30 +0000 (22:09 +0200)]
env: Fix network support when CONFIG_NET_LWIP is set
When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
environment flags support associated with network was not built: restore
support of "i" and "m" environment flags.
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sun, 2 Mar 2025 18:30:28 +0000 (19:30 +0100)]
scripts/setlocalversion: Reinstate .scmversion support
The .scmversion is used by oe-core to append U-Boot version string.
LOCALVERSION is not fully compatible replacement as it adds trailing
"-dirty" string at the end of version string in case the U-Boot git
tree contains uncommitted changes. This behavior itself is correct.
However, OE builds do clone U-Boot sources from git and may apply
additional patches on top, which are not tracked in U-Boot git tree,
but rather in the OE metalayer git tree, which leads to the addition
of "-dirty" string as well.
The .scmversion used by oe-core used to replace the version string
suffix fully, including the "-dirty" string. Reinstate support for
the .scmversion to let OE core do exactly that as it used to do it.
Fixes:
5c02350fa03d ("scripts/setlocalversion: sync with linux v6.9")
Signed-off-by: Marek Vasut <marex@denx.de>
Tom Rini [Thu, 29 May 2025 16:09:39 +0000 (10:09 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Marek Vasut [Sun, 25 May 2025 13:42:51 +0000 (15:42 +0200)]
board: rzg2l: Update MAINTAINERS file
Un-orphan the RZ/G2L , keep the RZ/G2L maintained.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul@pbarker.dev>
Paul Barker [Mon, 19 May 2025 13:32:07 +0000 (13:32 +0000)]
board: rzg2l: Drop myself to reviewer for RZ/G2L boards
I still intend to review patches, and will be using my own email address
going forward.
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sun, 13 Apr 2025 13:10:45 +0000 (15:10 +0200)]
ARM: renesas: Enable serial RX buffer on Renesas R-Car
Enable CONFIG_SERIAL_RX_BUFFER on all Renesas R-Car devices which
use the SCIF serial port. This allows receiving large strings at
bulk even if the RX FIFO is small and would otherwise overflow.
The usual trigger for the problem addressed here is a paste of a
very long command into U-Boot command line, somewhere between 400
and 500 characters long. The trailing end of the string is usually
not received and the command line input stops responding due to RX
overflow errors. The CONFIG_SERIAL_RX_BUFFER allows efficient read
of data from the RX FIFO, which prevents the overflow, and allows
safe reception of long pasted strings.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tom Rini [Mon, 26 May 2025 22:29:31 +0000 (16:29 -0600)]
Revert "ext4fs: Fix: Read outside partition error"
The issue here is that the function read_allocated_block() will report
problems via a negative return value. If we say the return value is
stored in an lbaint_t that can no longer happen (and Coverity discovered
this by reporting a no effect comparison and then dead code). The
problem being fixed by allowing for storing a larger block number will
have to be solved in some other manner.
This reverts commit
df2ed552f0b05591090369a7fe7ddc92439dea5c.
Addresses-Coverity-ID: 131183
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 26 May 2025 22:02:19 +0000 (16:02 -0600)]
Prepare v2025.07-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 26 May 2025 00:01:54 +0000 (18:01 -0600)]
Merge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Sun, 25 May 2025 15:14:07 +0000 (09:14 -0600)]
Merge tag 'efi-2025-07-rc3-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-07-rc3-3
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/26313
UEFI:
* run dhcp if an http boot option is selected
* separate device path into its own header and add it to the API docs
* rename END to EFI_DP_END
* make x86 SMBIOS tables usable in the EFI context
Tom Rini [Sat, 15 Mar 2025 01:27:36 +0000 (19:27 -0600)]
usb: ulpi: Clean up how we enable support
The way we enable ULPI support today isn't something that should work.
The "optional" keyword in a choice statement is not a documented
feature. To make this work in a supported way, make USB_ULPI something
we ask about if USB_HOST is set. Next, we move the choice of what
viewer to use to be after the framework portion and to depend on that.
We then borrow a few words from the top-level README to make the help
text here clearer. Finally we make the Qualcomm driver select ULPI as
it's required and we make the tegra driver not duplicate a check that
Kconfig now handles for us.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sat, 15 Mar 2025 01:27:35 +0000 (19:27 -0600)]
usb: ulpi: Remove unused omap-ulpi-viewport driver
The last platform to enable this driver was removed in 2019. Remove this
unused code and documentation now.
Signed-off-by: Tom Rini <trini@konsulko.com>
Varadarajan Narayanan [Wed, 15 Jan 2025 06:20:44 +0000 (11:50 +0530)]
usb: dwc3: core: Fix timeout check
dwc3_core_init loops 'timeout' times to check if the IP block is out
of reset using 'while (timeout--)'. If there is some issue and
the block doesn't come out of reset, the loop will run till
'timeout' becomes zero and the post decrement operator would set
timeout to 0xffffffff. Though the IP block is not out reset, the
subsequent if check 'if !timeout' would fail as timeout is not
equal to zero and the function proceeds with the initialization.
Use poll API instead to resolve this.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Ilias Apalodimas [Fri, 23 May 2025 13:04:04 +0000 (16:04 +0300)]
efi_loader: Run dhcp if an http boot option is selected
The EFI boot manager relies on having an IP address before trying to
boot an EFI HTTP(s) boot entry. However, defining it as a boot or
pre-boot command is not always the right answer since it will
unconditionally add delay to the board boot, even if we don't boot
over the network.
So let's do a DHCP request from the boot manager, if 'ipaddr' is
empty and fail early if we don't have an address.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
Simon Glass [Fri, 23 May 2025 16:55:04 +0000 (17:55 +0100)]
x86: efi_loader: Ensure the SMBIOS tables are sent via EFI
The EFI-loader code has not been fully converted to use bloblist, so
relies on the SMBIOS-table address being set in global_data.
Set this up in write_tables() so that the SMBIOS tables are actually
available.
Enable the command for x86 QEMU so that the SMBIOS tests actually run.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
83ce35d6ebb ("emulation: Use bloblist to hold tables")
Reported-by: Niklas Sombert <niklas.sombert@uni-duesseldorf.de>
Tested-by: Niklas Sombert <niklas.sombert@uni-duesseldorf.de>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sat, 24 May 2025 17:28:23 +0000 (11:28 -0600)]
efi: Rename END to EFI_DP_END
This exported symbol has a very generic name. Rename it to indicate that
it relates to EFI and device-paths.
Fix checkpatch warnings related to use of multiple assignments.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sat, 24 May 2025 17:28:22 +0000 (11:28 -0600)]
efi: Include device-path functions in the EFI API docs
Include these function so they can be browsed in the API docs. Exclude
END since it causes a warning, which becomes an error:
./include/efi_device_path.h:22: warning: cannot understand function
prototype: 'const struct efi_device_path END; '
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sat, 24 May 2025 17:28:21 +0000 (11:28 -0600)]
efi_loader: Separate device path into its own header
These functions are useful for the EFI app. As a first step towards
making these available outside lib/efi_loader, create a separate header
file and include it where needed. Add proper comments to the functions,
since many are missing at present.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tony Dinh [Fri, 23 May 2025 05:02:01 +0000 (22:02 -0700)]
ext4fs: Fix: Read outside partition error
Use lbaint_t for blknr to avoid overflow in ext4fs_read_file().
Background:
blknr (block number) used in ext4fs_read_file() could be increased to a
very large value and causes a wrap around at 32 bit signed integer max,
thus becomes negative. This results in an out-of-normal range for sector
number (during the assignment delayed_start = blknr) where delayed_start
sector is typed uint64 lbaint_t. This causes the "Read outside partition"
error.
This patch was tested on the Synology DS116 (Armada 385) board, and a
4TB Seagate HDD.
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Tony Dinh [Tue, 20 May 2025 23:49:24 +0000 (16:49 -0700)]
fs: fs_devread should log error when read outside partition
Log the error if fs_devread() fails when trying to reading outside
partition. This will make bug reporting easier.
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Jayanth Dodderi Chidanand [Thu, 8 May 2025 10:55:55 +0000 (11:55 +0100)]
board: total_Compute: enable bloblist for SPL handoff
Add bloblist support to total_comput platform for passing data
from TF-A using the firmware handoff framework.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Marius Dinu [Thu, 8 May 2025 12:05:19 +0000 (12:05 +0000)]
EXT4: add CRC16 dependency
CRC16 is used in ext4_common.c. Build fails without it.
PS:
This is my first patch sent to a mailing list.
If there is anything wrong with it (email format, whitespace, etc.)
please let me know.
Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Weijie Gao [Tue, 6 May 2025 07:15:01 +0000 (15:15 +0800)]
env: mtd: fix usability with NAND flashes
1. As this is for MTD-based devices, the Kconfig dependency should be MTD
instead of only spi-nor flashes
2. Initialize saved_buf to avoid crash on free()
3. Remaining size should be set correctly to write_size
Fixes:
03fb08d4aef (env: Introduce support for MTD)
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Christian Marangi <ansuelsmth@gmail.com>
Tom Rini [Thu, 22 May 2025 14:41:25 +0000 (08:41 -0600)]
Merge tag 'u-boot-imx-master-
20250522' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/26275
- Fix boot regression on imx8mn_bsh_smm_s2/s2pro.
- Fix reset on imx6ulz_smm_m2.
- Adjust DDR initialization on imx6ulz_smm_m2.
- Fix CAAM startup error.
Olaf Baehring [Wed, 21 May 2025 11:03:40 +0000 (08:03 -0300)]
caam: Fix CAAM error on startup
In rare cases U-Boot returns an error message when intantiating the RNG
of the CAAM device:
“SEC0: RNG4 SH0 instantiation failed with error 0xffffffff”
This means, that even when the CAAM device reports a finished
descriptor, none is found in the output ring.
This might be caused by a missing cache invalidation before
reading the memory of the output ring
This patch moves the cache invalidation of the output ring from start of
the job to immediately after the notification from hardware where the
output ring will be read.
Signed-off-by: Olaf Baehring <olaf.baehring@draeger.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tom Rini [Wed, 21 May 2025 14:59:10 +0000 (08:59 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/26259
- Initial SPL support for T-Head TH1520 SoC
- Improve usability of TH1520 with mainline SPL
- Support building RV32 & RV64 images
- riscv: Improve jh7110 support
Tom Rini [Wed, 21 May 2025 14:58:51 +0000 (08:58 -0600)]
Merge tag 'net-
20250520' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-
20250520.
CI: https://source.denx.de/u-boot/custodians/u-boot-net/-/pipelines/26247
net, net-lwip:
- Remove wget console output when called by EFI
net-lwip:
- Add 10 s timeout to TFTP
- Add LMB buffer checks
Michael Bode [Wed, 21 May 2025 09:47:32 +0000 (11:47 +0200)]
board: bsh: imx6ulz_smm_m2: Add delay between DRAM read access
A small delay between DRAM read access with wrong parameters and
reconfiguration is necessary.
Without a delay between DRAM read access and a following reconfiguration
this reconfiguration fails for certain DRAM chips (Nanya).
Signed-off-by: Michael Bode <michael.bode@bshg.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Michael Bode [Wed, 21 May 2025 09:47:31 +0000 (11:47 +0200)]
board: bsh: imx6ulz_smm_m2: Add support for 512 MiB DRAM
Calibration values were calculated using the NXP tool
I.MX6ULL_DDR3_Script_Aid_V0.01.xlsx
Signed-off-by: Michael Bode <michael.bode@bshg.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Simon Holesch [Wed, 21 May 2025 09:47:30 +0000 (11:47 +0200)]
board: bsh: imx6ulz_smm_m2: Add support for 256 MiB DRAM
Calibration values were calculated using the NXP tool
I.MX6ULL_DDR3_Script_Aid_V0.01.xlsx
Signed-off-by: Wolfgang Birkner <wolfgang.birkner@bshg.com>
Signed-off-by: Simon Holesch <simon.holesch@bshg.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Michael Trimarchi [Wed, 21 May 2025 09:47:29 +0000 (11:47 +0200)]
board: bsh: imx6ulz_smm_m2: Match SPL DDR settings to DCD table
When using SPL on i.mx6 we frequently notice some DDR initialization
mismatches between the SPL code and the non-SPL code.
As the non-SPL code have been tested for long time and proves to be
reliable, let's configure the DDR in the exact same way as the non-SPL
case.
The idea is simple: just use the DCD table and write directly to the DDR
registers.
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Michael Trimarchi [Tue, 20 May 2025 09:02:15 +0000 (11:02 +0200)]
board: freescale: imx8mn_evk: let clock system enable UART clock
Now that the UART driver can enable the required clocks, remove
the hard-coded clock enable.
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Dario Binacchi [Tue, 20 May 2025 08:54:20 +0000 (10:54 +0200)]
board: bsh: imx8mn_bsh_smm_s2/s2pro: let clock system enable UART clock
Now that the UART driver can enable the required clocks, remove
the hard-coded clock enable.
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Dario Binacchi [Tue, 20 May 2025 08:54:19 +0000 (10:54 +0200)]
board: bsh: imx8mn_bsh_smm_s2/s2pro: enlarge CONFIG_SPL_SYS_MALLOC_F_LEN
The commit
dda454e933c6 ("serial: mxc: Support bulk enabling clocks")
breaks the booting of the BSH SMM S2 board. The analysis of the issue
revealed memory allocation failures during the registration of UART4
clocks as well as other peripherals. Increasing SYS_MALLOC_F_LEN to
0x10000 fixed the issue.
Dropping this option allows it to be set to the default value of
CONFIG_SYS_MALLOC_F_LEN, which is set by default to 0x10000 on
i.MX8M platforms.
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Dario Binacchi [Tue, 20 May 2025 08:54:18 +0000 (10:54 +0200)]
configs: imx8mn_bsh_smm_s2: load U-Boot from raw NAND
Commit
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
the boot of the BSH SMM S2 board. Add options to load U-Boot from raw NAND
sector.
Fixes:
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Dario Binacchi [Tue, 20 May 2025 08:54:17 +0000 (10:54 +0200)]
imx: spl_imx_romapi: support raw NAND sector
Commit
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
the boot of the BSH SMM S2 board. As stated in the dropped comment, "Some
boards use this value even though MMC is not enabled in SPL, for example
imx8mn_bsh_smm_s2".
Support load of the U-Boot image from raw NAND sector.
Fixes:
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Dario Binacchi [Tue, 20 May 2025 08:54:16 +0000 (10:54 +0200)]
spl: Kconfig: support U-Boot load from raw NAND
Commit
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
the boot of the BSH SMM S2 board. As stated in the commit itself, "Some
boards use this value even though MMC is not enabled in SPL, for example
imx8mn_bsh_smm_s2".
Support load of the U-Boot image from raw NAND sector. This is equivalent
to load from MMC raw sector.
Fixes:
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Primoz Fiser [Fri, 16 May 2025 10:46:02 +0000 (12:46 +0200)]
ARM: dts: imx93-phycore: Migrate to OF_UPSTREAM
Migrate to OF_UPSTREAM for phyCORE-i.MX93 since board can use upstream
Linux kernel device-tree for phyBOARD-Segin-i.MX93.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Michael Trimarchi [Fri, 16 May 2025 08:17:21 +0000 (10:17 +0200)]
arm: dts: imx6ulz-bsh-smm-m2: Fix reset using wdt-reboot driver
commit
68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()")
introduced a regression that 'reset' command unable to reset
imx6ulz based BSH module's modules in the u-boot.
BSH module's imx6, imx6ulz-bsh-smm-m2.dts
Fixes:
68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Michael Trimarchi [Fri, 16 May 2025 08:17:20 +0000 (10:17 +0200)]
configs: imx6ulz_smm_m2: Add board watchdog reset configuration
Add the configuration that allow to reset the board from reset
cmd
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Michael Trimarchi [Fri, 16 May 2025 08:17:19 +0000 (10:17 +0200)]
arm: dts: imx6ulz-bsh-smm-m2-u-boot: Drop soc node
The node is specified on the parent architecture u-boot.dtsi
file
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Dario Binacchi [Thu, 15 May 2025 15:09:52 +0000 (17:09 +0200)]
arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()
Standardize on using the IS_ENABLED macro.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Michael Trimarchi [Thu, 15 May 2025 15:09:51 +0000 (17:09 +0200)]
arm: imx: imx8m: soc: fix the macro name
The function arch_spl_mmc_get_uboot_raw_sector() was never compiled,
even when the option CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION was
enabled. So rename the macro SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION to
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION.
Fixes:
2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Yao Zi [Fri, 16 May 2025 03:05:25 +0000 (03:05 +0000)]
riscv: dts: th1520: Complete clock tree
Describe the newly-supported clock controller of TH1520 in SoC
devicetree, replace dummy clocks with the controller-supplied ones and
add correct clocks for GPIO controllers.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Fri, 16 May 2025 03:05:24 +0000 (03:05 +0000)]
riscv: cpu: th1520: Select clock driver
The clock driver is essential for TH1520 SoCs to operate. Select the
driver in SoC Kconfig entry.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Fri, 16 May 2025 03:05:23 +0000 (03:05 +0000)]
clk: thead: Port clock controller driver of TH1520 SoC
The driver is adapted from Linux kernel's version of clk-th1520-ap.c,
with only output clocks for external sensors, which are barely useful in
bootloaders, removed.
Same as the mainline driver, it currently lacks of ability to enable and
reconfigure PLLs, which could be implemented later.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Fri, 16 May 2025 03:05:22 +0000 (03:05 +0000)]
riscv: cpu: th1520: Initialize IOPMPs in SPL
TH1520 SoC ships several IOPMPs protecting various on-chip peripherals.
They must be configured before accessing the peripherals. Let's
initialize them in SPL harts_early_init().
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:05:03 +0000 (09:05 +0000)]
doc: thead: lpi4a: Update documentation
Support for eMMC, SD card, GPIO and SPL have been available in LPi4A
port. Update the documentation of support status and build
instructions.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:05:02 +0000 (09:05 +0000)]
board: thead: licheepi4a: Enable SPL support
Adjust Kconfig and defconfig and add SPL initialization code for
Lichee Pi 4A. Then enable SPL support which we've added for TH1520 SoC
earlier. The board devicetree is changed to use TH1520 binman
configuration to generate bootable images.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:05:01 +0000 (09:05 +0000)]
riscv: dts: th1520: Add binman configuration
Add binman configuration for TH1520 SoC, whose BROM loads the image
combined into SRAM and directly jumps to it. The configuration creates
u-boot-with-spl.bin where the SPL code locates at the start and the DDR
firmware is shipped.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:05:00 +0000 (09:05 +0000)]
riscv: dts: th1520: Add DRAM controller
Describe DRAM controller integrated in TH1520 SoC and preserve it in SPL
devicetree blob.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:59 +0000 (09:04 +0000)]
riscv: dts: lichee-module-4a: Preserve memory node for SPL
Memory node is necessary for TH1520 SPL to configure size and base
address of DRAM. Let's preserve it in SPL devicetree blob.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:58 +0000 (09:04 +0000)]
riscv: dts: th1520: Preserve necessary devices for SPL
SPL for TH1520 requires CPU and boot UART nodes to function. Preserve
them in SPL devicetree blob with bootph-pre-ram property.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:57 +0000 (09:04 +0000)]
ram: thead: Add initial DDR controller support for TH1520
This patch cleans the vendor code of DDR initialization up, converts the
driver to fit in DM framework and use a firmware[1] packaged by binman to
ship PHY configuration.
Currently the driver is only capable of initializing the controller to
work with dual-rank 3733MHz LPDDR4, which is shipped by 16GiB variants
of LicheePi 4A boards and I could test with. Support for other
configurations could be easily added later.
Link: https://github.com/ziyao233/th1520-firmware
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:56 +0000 (09:04 +0000)]
riscv: cpu: Add TH1520 CPU support
Introduce the SoC-specific code and corresponding Kconfig entries for
TH1520 SoC. Following features are implemented for TH1520,
- Cache enable/disable through customized CSR
- Invalidation of customized PMP entries
- DRAM driver probing for SPL
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:55 +0000 (09:04 +0000)]
configs: th1520_lpi4a: Add UART clock frequency
The BROM of TH1520 always initializes UART0's parent clock and
configures the baudrate to 115200. Describe the clock frequency to make
UART function correctly in SPL without introducing CCF.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Tue, 13 May 2025 09:04:54 +0000 (09:04 +0000)]
riscv: lib: Split out support for T-Head cache management operations
Designed before a standard set of cache management operations defined in
RISC-V, earlier T-Head cores like C906 and C910 provide CMO through the
customized extension XTheadCMO, which has been used in the CV1800B port
of U-Boot.
This patch splits XTheadCMO-related code into a generic module, allowing
SoCs shipping T-Head cores to share the code.
Link: https://github.com/XUANTIE-RV/thead-extension-spec
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
E Shattow [Sat, 10 May 2025 18:42:27 +0000 (11:42 -0700)]
riscv: dts: jh7110: override syscrg assigned clock rates with defaults
JH7110 drivers are missing support for CPU frequency scaling, so override
upstream device-tree to use default clock rates for syscrg. This override
duplicates a portion of jh7110-common-u-boot.dtsi file planned for removal.
Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Liang <ycliang@andestech.com>
E Shattow [Sat, 3 May 2025 21:25:54 +0000 (14:25 -0700)]
riscv: dts: jh7110: remove redundant parent nodes
- use upstream alias name for cpu and timer nodes
- remove bootph-pre-ram hint from parent nodes
- drop S7 cpu core "okay" status
Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
E Shattow [Sat, 3 May 2025 11:52:52 +0000 (04:52 -0700)]
riscv: starfive: jh7110: move uart0 clock frequency to config header
Move unnecessary clock frequency assignment out of device-tree and into the
board config header so that the ns16550 serial driver can successfully init
during SPL after failing to resolve the parent clock from upstream dts. The
serial driver will then resolve clock frequency from device-tree node parent
clock at init during Main app as it is expected by upstream.
Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Mayuresh Chitale [Mon, 28 Apr 2025 04:48:45 +0000 (04:48 +0000)]
riscv: insn-def.h: Fix header guard
Fix the erroneous header guard for insn-def.h to reflect the correct
header name.
Fixes:
bfc8ca3f7f6 ("riscv: Add support for defining instructions")
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Sun, 27 Apr 2025 14:50:11 +0000 (14:50 +0000)]
riscv: Access gd with inline assembly when building with LTO or Clang
Similar to AArch64's case, Clang may wrongly fold accesses to gd pointer
which is defined with register qualifier into constants, breaking
various components.
This patch defines gd as a macro when building with Clang or LTO, which
expands to get_gd() that accesses gp pointer in assembly, making RISC-V
ports function properly and preparing for introduction of LTO in the
future. Board initialization code is also adapted for non-assignable gd.
Reported-by: Nathaniel Hourt <I@nathaniel.land>
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yao Zi [Sat, 26 Apr 2025 17:26:02 +0000 (17:26 +0000)]
riscv: dts: binman.dtsi: Drop filename property for proper U-Boot
Drop filename property for proper U-Boot entry since binman takes
"u-boot-nodtb.bin" as the default filename for u-boot-nodtb entries.
This follows
efe9c12322b ("riscv: dts: binman.dtsi: Switch to
u-boot-nodtb entry for proper U-Boot") to clean binman.dtsi up.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Mayuresh Chitale [Fri, 4 Apr 2025 14:48:57 +0000 (14:48 +0000)]
booti/bootm: riscv: Verify image arch type
Unlike ARM and X86, booting 32-bit images on 64-bit CPUs is currently
not supported for Risc-V. Hence, for bootm, disallow booting a FIT
or a legacy image that was built for an arch type which is different
than the current arch and for booti, set the arch type to be the
same as the current arch.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Mayuresh Chitale [Fri, 4 Apr 2025 14:48:56 +0000 (14:48 +0000)]
riscv: Select appropriate image type
Select between the 32-bit or 64-bit arch type for the image headers
depending on how the build is configured.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Mayuresh Chitale [Fri, 4 Apr 2025 14:48:55 +0000 (14:48 +0000)]
riscv: image: Add new image type for RV64
Similar to ARM and X86, introduce a new image type which allows u-boot
to distinguish between images built for 32-bit vs 64-bit Risc-V CPUs.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Maxim Moskalets <maximmosk4@gmail.com>
Tom Rini [Tue, 20 May 2025 14:35:31 +0000 (08:35 -0600)]
Merge tag 'mmc-2025-05-20' of https://source.denx.de/u-boot/custodians/u-boot-mmc
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/26241
- Fix mmc cv1800b build without MMC_SUPPORTS_TUNING
Alexander Sverdlin [Sun, 27 Apr 2025 21:46:19 +0000 (23:46 +0200)]
mmc: cv1800b: Fix build without MMC_SUPPORTS_TUNING
That's how it looks like without CONFIG_MMC_SUPPORTS_TUNING before the
patch:
aarch64-buildroot-linux-gnu-ld.bfd: drivers/mmc/cv1800b_sdhci.o: in function `cv1800b_execute_tuning':
drivers/mmc/cv1800b_sdhci.c:47:(.text.cv1800b_execute_tuning+0x50): undefined reference to `mmc_send_tuning'
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jerome Forissier [Mon, 28 Apr 2025 09:24:07 +0000 (11:24 +0200)]
net: lwip: tftp: time out if there is no reply from server
When there is no reply from the TFTP server, do_tftpb() should
eventually time out. Add a 10 second timer for that purpose.
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Jerome Forissier [Thu, 17 Apr 2025 13:27:00 +0000 (15:27 +0200)]
net-lwip: tftp: add LMB and buffer checks
Legacy NET tftp invokes a store_block() function which performs buffer
validation (LMB, address wrapping). Do the same with NET_LWIP.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Jerome Forissier [Thu, 17 Apr 2025 13:26:59 +0000 (15:26 +0200)]
net-lwip: wget: add LMB and buffer checks
Legacy NET wget invokes a store_block() function which performs buffer
validation (LMB, address wrapping). Do the same with NET_LWIP.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Jerome Forissier [Thu, 17 Apr 2025 13:26:58 +0000 (15:26 +0200)]
net, net-lwip: wget: suppress console output when called by EFI
Functions called from EFI applications should not do console output.
Refactor the wget code to implement this requirement. The wget_http_info
struct is used to hold the boolean that signifies whether the output is
allowed or not.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Jerome Forissier [Thu, 17 Apr 2025 13:26:57 +0000 (15:26 +0200)]
net-lwip: change static function wget_loop() to be wget_do_request()
wget_do_request() currently does so little before calling the static
function wget_loop() that we may as well rename wget_loop() to
wget_do_request() and put everything in one function.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tom Rini [Sun, 18 May 2025 14:06:56 +0000 (08:06 -0600)]
Merge tag 'efi-2025-07-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-07-rc3-2
Documentation:
* Add test/py/requirements.txt to documentation
* Use globing for selecting pytest files
UEFI:
* Provide a function to disable ANSI output during tests
Other:
* test: allow multiple config options in buildconfigspec
* test: allow testing with NET_LWIP=y
Heinrich Schuchardt [Sat, 3 May 2025 13:31:55 +0000 (15:31 +0200)]
test: allow testing with NET_LWIP=y
Adjust network tests to run with CONFIG_NET_LWIP=y.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Heinrich Schuchardt [Sat, 3 May 2025 13:31:54 +0000 (15:31 +0200)]
test: allow multiple config options in buildconfigspec
In some cases we have alternative configuration options that supply the
same functionality, e.g CONFIG_NET and CONFIG_NET_LWIP.
Allow to specify all of them as arguments for buildconfigspec() and execute
the text if any of these is fulfilled, e.g.
@pytest.mark.buildconfigspec('net', 'net_lwip')
Update the documentation.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Mon, 12 May 2025 21:54:24 +0000 (15:54 -0600)]
doc: pytest: Use globing for test files
After the original series was merged, Quentin noted that we could handle
adding additional tests more easily by using the glob feature. Do so.
Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Tom Rini [Mon, 12 May 2025 21:51:23 +0000 (15:51 -0600)]
CI, docs: Install test/py/requirements.txt as well
As noted by Quentin, in CI we should be at least versioning the pytest
that we install. To avoid problems later, go with the whole requirements
file being used. Furthermore, our documentation building for readthedocs
must also have pytest so install the requirements file there as well.
Reported-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Simon Glass [Sat, 10 May 2025 12:54:38 +0000 (14:54 +0200)]
efi_loader: Disable ANSI output for tests
We don't want ANSI escape-sequences written in tests since it is a pain
to check the output with ut_assert_nextline() et al.
Provide a way to tests to request that these characters not be sent.
Add a proper function comment while we are here, to encourage others.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Fri, 16 May 2025 17:05:27 +0000 (11:05 -0600)]
Merge tag 'u-boot-watchdog-
20250516' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=393&view=results
- make cyclic_(un)register idempotent
Tom Rini [Fri, 16 May 2025 14:34:33 +0000 (08:34 -0600)]
Merge tag 'u-boot-marvell-
20250516-v2' of https://source.denx.de/u-boot/custodians/u-boot-marvell
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=392&view=results
- mvebu_espressobin_ultra-88f3720_defconfig: enable hwrng
- kirkwood: Convert to DM_SERIAL for Kirkwood boards
- kirkwood: Convert to DM_SERIAL for Synology DS109 board
- cmd: tlv_eeprom: return after successful read from EEPROM
Rasmus Villemoes [Wed, 7 May 2025 10:58:21 +0000 (12:58 +0200)]
cyclic: document new guarantees for cyclic_(un)register
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
Rasmus Villemoes [Wed, 7 May 2025 10:58:20 +0000 (12:58 +0200)]
cyclic: make cyclic_register safe to call on already-registered info
Now that cyclic_unregister() is safe to call on a not-registered
cyclic_info, we can make cyclic_register() behave like the mod_timer()
and hrtimer_start() APIs in linux, in that they don't distinguish
between whether the timer was already enabled or not; from the point
of the call it is, with whatever timeout/period is set in that most
recent call.
This avoids users of the cyclic API from separately keeping track of
whether their callback is already registered or not, and even if they
know it is, can be used for changing the period (and/or the callback
function) without first doing unregister().
See also this recent'ish message from kernel maintainer Thomas
Gleixner on that API design for timer frameworks:
https://lore.kernel.org/lkml/87ikn6sibi.ffs@tglx/
First of all the question is whether add() and mod() are really
valuable distinctions. I'm not convinced at all. Back then, when we
introduced hrtimers, we came to the conclusion that hrtimer_start()
is sufficient.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
Rasmus Villemoes [Wed, 7 May 2025 10:58:19 +0000 (12:58 +0200)]
cyclic: make cyclic_unregister() idempotent
Make cyclic_unregister() safe to call with an already unregistered, or
possibly never registered, struct cyclic_info. This is similar to how
the various timer APIs in the linux kernel work (they all allow
calling delete/cancel/... on an inactive timer object).
This means callers don't have to separately keep track of whether
their cyclic callback is registered or not, and avoids them trying to
peek into the struct cyclic_info for that information - which leads to
somewhat ugly code as it would have to be guarded by ifdef
CONFIG_CYCLIC.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
Martin Schiller [Wed, 16 Apr 2025 06:13:16 +0000 (08:13 +0200)]
cmd: tlv_eeprom: return after successful read from EEPROM
Commit
f6eff35b8c19 ("cmd: tlv_eeprom: handle -ENODEV error from
read_eeprom function") removed the needed 'return 0' after a successful
read. As a result, the usage message is shown when 'tlv_eeprom read' is
successfully called.
Let's fix it by adding the needed 'return 0'.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Tony Dinh [Tue, 6 May 2025 02:58:43 +0000 (19:58 -0700)]
arm: kirkwood: Remove Synology DS109 board reset_misc
Remove DS109 board reset_misc() function. U-Boot generic reset is enough.
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tony Dinh [Tue, 6 May 2025 02:58:42 +0000 (19:58 -0700)]
arm: kirkwood: Convert to DM_SERIAL for Synology DS109 board
Enable DM_SERIAL for Marvell Kirkwood Synology DS109.
Note that this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/
20250505220853.23679-1-mibodhi@gmail.com/
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tony Dinh [Mon, 5 May 2025 22:08:52 +0000 (15:08 -0700)]
arm: kirkwood: Convert to DM_SERIAL for Kirkwood boards
Enable DM_SERIAL for Marvell Kirkwood boards that have not been converted.
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Benjamin Schneider [Thu, 17 Apr 2025 19:37:24 +0000 (12:37 -0700)]
configs: mvebu_espressobin_ultra-88f3720_defconfig: enable hwrng
This device has a hardware random number generator. Linux can
use this feature to randomize the location of the kernel in
memory for better security. However, that functionality is only
available if the bootloader firmware provides it. Enable support
for it in the default configuration for this device.
Signed-off-by: Benjamin Schneider <ben@bens.haus>
Reviewed-by: Stefan Roese <sr@denx.de>
Tom Rini [Mon, 12 May 2025 22:05:22 +0000 (16:05 -0600)]
Merge tag 'u-boot-imx-master-
20250512' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/26116
- Add imxrt1170 support to the fspi SPI driver.
- Enable PCI early on imx95_evk.
- Fix fsl_enetc imdio register calculation.
Tim Harvey [Fri, 9 May 2025 02:58:56 +0000 (23:58 -0300)]
imx95_evk: enable PCI early
Enable PCI early as the NETC device is an PCI ECAM device.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Thomas Schaefer [Mon, 28 Apr 2025 09:59:46 +0000 (11:59 +0200)]
net: fsl_enetc: fix imdio register calculation
With commit
cc4e8af2c552, fsl_enetc register accessors have been split to
handle different register offsets on different SoCs. However, for
internal MDIO register calculation, only ENETC_PM_IMDIO_BASE was fixed
without adding the SoC specific MAC register offset.
As a result, the network support for the Kontron SMARC-sAL28 and
probably other boards based on the LS1028A CPU is broken.
Add the SoC specific MAC register offset to calculation of imdio.priv to
fix this.
Fixes:
cc4e8af2c552 ("net: fsl_enetc: Split register accessors")
Signed-off-by: Thomas Schaefer <thomas.schaefer@kontron.com>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # LS1028A
Tested-by: Tim Harvey <tharvey@gateworks.com> # imx95_19x19_evk
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Jonathan Currier [Wed, 7 May 2025 08:36:24 +0000 (03:36 -0500)]
configs: imxrt1170-evk_defconfig: include FlexSPI driver and flash chip support
Signed-off-by: Jonathan Currier <dullfire@yahoo.com>