summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-23net: lwip: allow DM_DSA=y when NET_LWIP=yJerome Forissier
Now that the DSA tests in test/dm/dsa.c are compatible with NET_LWIP, remove the dependency of DM_DSA on NET. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23test: dm: eth, dsa: update tests for NET_LWIPJerome Forissier
Convert the tests to use the do_ping() interface which is now common to NET and NET_LWIP. This allows running most network test with SANDBOX and NET_LWIP. A few things to note though: 1. The ARP and IPv6 tests are enabled for NET only 2. The net_retry test is modified to use eth0 (eth@10002000) as the active (but disabled) interface, and therefore we expect eth1 (eth@10003000) to be the fallback when "netretry" is "yes". This is in replacement of eth7 (lan1) and eth0 (eth@10002000) respectively. Indeed, it seems eth7 works with NET by chance and it certainly does not work with NET_LWIP. I observed that even with NET, sandbox_eth_disable_response(1, true) has no effect: remove it and the test still passes. The interface ID is not correct to begin with; 1 corresponds to eth1 (eth@10003000) as shown by debug traces, it is not eth7 (lan1). And using index 7 causes a SEGV. In fact, it is not the call to sandbox_eth_disable_response() that prevents the stack from processing the ICMP reply but the timeout caused by the call to sandbox_eth_skip_timeout(). Here is what happens when trying to ping using the eth7 (lan1) interface with NET: do_ping(...) net_loop(PING) ping_start() eth_rx() sb_eth_recv() time_test_add_offset(11000UL); if (get_timer(0) - time_start > time_delta) ping_timeout_handler() // ping error, as expected And the same with NET_LWIP: do_ping(...) ping_loop(...) sys_check_timeouts() net_lwip_rx(...) sb_eth_recv() time_test_add_offset(11000UL); netif->input(...) // the packet is processed succesfully By choosing eth0 and sandbox_eth_disable_response(0, true), the incoming packet is indeed discarded and things work as expected with both network stacks. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: ping: make do_ping() available via <net.h>Jerome Forissier
Make the do_ping() function in cmd/net.c a global one by getting rid of the static qualifier, and move the prototype declaration from net-lwip.h to net-common.h. This makes the function available to other parts of U-Boot when CONFIG_NET=y, as was already the case when CONFIG_NET_LWIP=y. This is a peparation step to make the sandbox tests use a common API between NET and NET_LWIP. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23sandbox: provide static IP addresses for eth{2, 3, 5, 6, 7}Jerome Forissier
The tests in test/dm/eth.c and test/dm/dsa.c use interfaces that have no static IP addresses configured in the board's default environment file. That will be a problem when NET_LWIP=y because the lwIP stack refuses to send ICMP packets through an interface that doesn't have an IP ("no route to host"). Therefore and in preparation for enabling the sandbox tests with NET_LWIP, provide such addresses in board/sandbox/sandbox.env. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23drivers: net: sandbox: add support for NET_LWIPJerome Forissier
Make the sandbox mock ethernet driver (drivers/net/sandbox.c) compatible with NET_LWIP by not relying on any of the structures or functions defined in net-legacy.h. This is done by providing local definitions of the various protocol structures (Ethernet, ARP, IPv4, ICMP). Drop the stub driver that was introduced specifically for NET_LWIP (drivers/net/sandbox-lwip.c). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: lwip: use timer_early_get_count() when CONFIG_SANDBOX_TIMER=yJerome Forissier
When the sandbox timer is available, use it. This allows skipping time in the tests (sandbox_eth_skip_timeout()). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: lwip: add restart support to pingJerome Forissier
Use net_start_again() in do_ping() to determine if a failed ping should be restarted on a different interface. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: lwip: provide net_start_again()Jerome Forissier
Implement net_start_again() when NET_LWIP=y in a very similar way to NET. This will be used in a future commit to determine if a failed ping needs to be tried again on a different interface. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: lwip: fix initialization sequence before a commandJerome Forissier
The things that are done prior to executing a network command with NET_LWIP are not consistent with what is done with NET. It impacts the selection of the current device, and more precisely if the active device is invalid NET would return an error while NET_LWIP would try to pick a new device. This incorrect behavior was detected thanks to the eth_rotate sandbox test (dm_test_eth_rotate()). Fix it by re-using a sequence similar to what NET has in net_loop(). This piece of code is inserted in a function called net_lwip_eth_start() renamed from net_lwip_eth_set_current(). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-23net: make initr_net() invocation command line agnosticHeinrich Schuchardt
initr_net() initalizes the network devices by calling eth_initalize(). There is no good reason to disable this if no command line interface is present. Let initr_net() depend on CONFIG_NET || CONFIG_NET_LWIP. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-23cmd: Remove CMD_NET protectionMichal Simek
CMD_PXE is already under CMD_NET in Kconfig that's why make no sense to have another ifdef inside source code. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-04-23net: dhcpv6: remove excluded middle expressionBryan Brattlof
!A || (A && B) is equivalent to !A || B Drop the middle expression from the statement Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-23net: dhcp6: Send DHCPv6 using multicast MACSean Edmond
In IPv6, the broadcast MAC address is not used. Instead, it should use the multicast address (see RFC RFC2464). Add IPV6_ALL_NODE_ETH_ADDR macro for clarity. Signed-off-by: Sean Edmond <seanedmond@microsoft.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-22mips: mt7688: gardena-smart-gateway: Increase CONFIG_SYS_BOOTM_LENEzra Buehler
The default value of 0x800000 (8 MB) is somewhat limiting for us, as our compressed kernel may grow up to around 4 MB. By choosing the commonly used value of 0x2000000 (32 MB), we are definitely on the safe side. This rather large amount should be fine, as we have 128 MB of RAM. Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de>
2025-04-22Merge patch series "MIPS: Boston: Various enhancements"Tom Rini
Jiaxun Yang <jiaxun.yang@flygoat.com> says: This is a huge series which promoted MIPS/Boston target into a usable state, with fixes to drivers and general framework issues I found in this process. I also converted the target to OF_UPSTREAM. This target is covered by QEMU, to test on QEMU: ``` make boston64r6el_defconfig make qemu-system-mips64el -M boston -cpu I6500 -bios ./u-boot.bin -nographic ``` Link: https://lore.kernel.org/r/20240517-boston-v3-0-1ea7d23f4a1d@flygoat.com
2025-04-22mailmap: Update email for Paul BurtonJiaxun Yang
Paul had left MIPS a couple of years ago, his email address is no longer valid. Replace it with his kenrel.org email, which has been used in kernel and QEMU, in case we still want to reach him. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22MIPS: boston: Migrate to OF_UPSTREAMJiaxun Yang
We can now boot with upstream devicetree. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22dts/upstream: Add Makefile for MIPSJiaxun Yang
It is required to make OF_UPSTREAM work. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22clk: boston: Allow to get regmap from parent deviceJiaxun Yang
In upstream devicetree, clk_boston is a child of syscon node and there is no "regmap" property for clk_boston node. Try to check parent device first to look for syscon. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22MIPS: boston: Provide default env varsJiaxun Yang
Provide default environment variables on image loading address to make the board useful. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22MIPS: boston: Imply various optionsJiaxun Yang
This is a PC-like platform board. Enable drivers for most on-board devices to make it useful. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22MIPS: Provide dummy acpi_table.hJiaxun Yang
Some drivers need this header. Provide this dummy header as riscv did. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22ahci: dwc_ahsata: Generalize the driverJiaxun Yang
Remove hard dependencies to arch headers, get clock from clk subsystem if arch clock function is not available, align compatible strings with devicetree binding. No functional change on existing platforms, just get it build on other platforms. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2025-04-22ahci: DMA addressing fixesJiaxun Yang
Ensure that we are using correct physical/virtual address for DMA buffer write and hardware register settings. The convention is: in ahci_ioports all pointers are virtual, that will be converted to physical address when writing to hardware registers or into sg/cmd_tbl. Also fixed 64bit physical address support for dwc_ahsata, ensure higher bits are written into registers/sg properly. Use memalign for allocating aligned buffer in dwc_ahsata so we don't have to do our own alignment in driver. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2025-04-22pci: Enable PCI_MAP_SYSTEM_MEMORY when ARCH_MAP_SYSMEM is not setJiaxun Yang
For MIPS we are always looking gd->dram in virtual address so PCI_MAP_SYSTEM_MEMORY should always be enabled. If in future we ever want to make it physical we have to set ARCH_MAP_SYSMEM. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22pci: auto: Reduce bridge mem alignment boundary for bostonJiaxun Yang
Boston has a very limited memory range for PCI controllers, where 1MB can't easily fit into it. Make alignment boundary of PCI memory resource allocation a Kconfig option and default to 0x10000 for boston. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22pci: xilinx: Handle size of ecam region properlyJiaxun Yang
Probe size of ecam from devicetree properly and cap accessible bus number accorading to ecam region size to ensure we don't go beyond hardware address space. Also disable all interrupts to ensure errors are handled silently. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2025-04-22Merge patch series "configs: ACPI enabled QEMU defconfigs"Tom Rini
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says: For QEMU we have developed supporting passsing through ACPI tables. This functionality has been broken multipled times due to missing CI builds. * Two new defconfigs qemu_arm64_acpi and qemu-riscv64_smode_acpi. * Assign the defconfigs to the respective maintainers. Link: https://lore.kernel.org/r/20250420085929.36226-1-heinrich.schuchardt@canonical.com
2025-04-22Merge patch series "Enable UNIT_TEST for all qemu* generic targets"Tom Rini
Jerome Forissier <jerome.forissier@linaro.org> says: Enable CONFIG_UNIT_TEST in most of the configs/qemu*_defconfig files to increase test coverage in CI, and fix what needs to be fixed. Link: https://lore.kernel.org/r/20250416135744.1995084-1-jerome.forissier@linaro.org
2025-04-22Merge patch series "ut: fix print_guid() and enable UNIT_TEST for qemu_arm64"Tom Rini
Jerome Forissier <jerome.forissier@linaro.org> says: There is a bug in the print_guid() unit test in test/common/print.c when PARTITION_TYPE_GUID is not enabled but either CMD_EFIDEBUG or EFI are. The first patch fixes the issue and the second one enables UNIT_TEST in the qemu_arm64 defconfig so that the unit tests are run in CI (this platform has CMD_EFIDEBUG so the bug applies). Link: https://lore.kernel.org/r/20250416074839.1267396-1-jerome.forissier@linaro.org
2025-04-22qemu-arm64: enable UNIT_TESTJerome Forissier
Enable CONFIG_UNIT_TEST in configs/qemu_arm64_defconfig so that the unit tests are run in CI. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-22lib/uuid.c: use unique name for PARTITION_SYSTEM_GUIDJerome Forissier
The name defined for PARTITION_SYSTEM_GUID in list_guid[] depends on configuration options. It is "system" if CONFIG_PARTITION_TYPE_GUID is enabled or "System Partition" if CONFIG_CMD_EFIDEBUG or CONFIG_EFI are enabled. In addition, the unit test in test/common/print.c is incorrect because it expects only "system" (or a hex GUID). Make things more consistent by using a clear and unique name: "EFI System Partition" whatever the configuration, and update the unit test accordingly. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-04-22MAINTAINERS: add qemu-riscv* defconfigs to QEMU RISC-V 'VIRT' BOARDHeinrich Schuchardt
Add the follow board to VIRT which otherwise would be unmaintained: * qemu-riscv64_smode_acpi_defconfig Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-22configs: add qemu-riscv64_smode_acpi_defconfigHeinrich Schuchardt
Add a configuration that supports ACPI. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-22MAINTAINERS: add all qemu_arm64* defconfigs to VIRTHeinrich Schuchardt
Add the following boards to VIRT which otherwise would be unmaintained. * qemu_arm64_acpi_defconfig * qemu_arm64_lwip_defconfig Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-22configs: add qemu_arm64_acpi_defconfigHeinrich Schuchardt
Add a qemu_arm64 variant that supports ACPI. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-22configs: enable CONFIG_UNIT_TEST for all qemu* generic targetsJerome Forissier
The qemu* "generic" targets (i.e. not those emulating a particular board) are typically used for testing as many features as possible, especially in CI so it makes sense to have UNIT_TEST enabled for all of the defconfigs for these targets. Not enabling UNIT_TEST in qemu-x86_defconfig due to: LD u-boot ld.bfd: section .rel.dyn VMA wraps around address space ld.bfd: section .start16 LMA [fffff800,fffff86f] overlaps section .rel.dyn LMA [ffffb77c,0002ac93] make: *** [Makefile:1824: u-boot] Error 1 Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-22test: run some test commands only if HUSH_PARSER is enabledJerome Forissier
Some test commands (such as "false", or the empty string) need CONFIG_HUSH_PARSER=y. Fix test/cmd/command.c. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-04-22Merge tag 'i2cfixes-for-2025.07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2025.07-rc1 - omap24xx_i2c: Enable Repeated Start functionality add Repeated Start functionality for the DM_I2C xfer API (omap_i2c_xfer() from Aniket Limaye - mediatek i2c driver fixes from Martin - add end marker for struct udevice_id mtk_i2c_ids - remove duplicate entry in mt_i2c_regs_v1
2025-04-22Merge tag 'u-boot-socfpga-next-20250422' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-socfpga This pull request contains updates for the SoCFPGA platform, targeting the 2025.07 release cycle. Highlights include enhancements to Agilex5 support, improvements in DDR error handling, and bridge reset handling for SoC64 devices. Key updates: Agilex5 platform enhancements: * New MMU region mappings and memory layout updates using LMB_ARCH_MEM_MAP. * Fixes for bloblist configuration, kernel FIT image generation, and VAB flow enablement. * GPIO pin control added for SDIO selection. * Marvell PHY driver enabled in defconfig. Agilex5 / SoC64 DDR subsystem: * Added ECC debug improvements for IOSSM. * Introduced LPDDR inline ECC support. * Resolved size calculation overflow in memory driver. SoC64 improvements: * Enhanced mailbox communication with the SDM to reflect various boot stage transitions. * Implemented F2S bridge reset support and updated related reset manager registers. * Expanded SoC64 CPU info reporting. General maintenance: * Additional peripherals released from reset for Arria10. * Cleanup of legacy or incorrect Kconfig implications. This patch set has been tested on Agilex 5 devkit. Passing all pipeline tests at: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/25867
2025-04-22i2c: mediatek: remove duplicate entry in mt_i2c_regs_v1[]Martin Schiller
This removes a duplicate entry in mt_i2c_regs_v1[]. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22i2c: mediatek: add missing empty entry at end of mkt_i2c_ids[]Martin Schiller
This adds the missing empty entry at the end of mtk_i2c_ids[]. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22drivers: i2c: Kconfig: Add CONFIG_SYS_I2C_OMAP24XX_REPEATED_STARTAniket Limaye
Add a Kconfig option to disable sending Stop conditions between multiple i2c_msgs within a single xfer. Enable this config by default for ARCH_K3 platforms. Signed-off-by: Aniket Limaye <a-limaye@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22i2c: omap24xx_i2c: support CONFIG for repeated start in DM_I2C xferAniket Limaye
Repeated Start Condition (Sr) can be used to transfer multiple i2c msgs without sending a Stop condition (P). So far, the driver default was to always send a Stop condition after every i2c msg. Add support for a config option (CONFIG_SYS_I2C_OMAP24XX_REPEATED_START) to disable sending the Stop condition by default. If this config is enabled, Stop condition will be sent only if explicitly requested in the msg flags OR if it is the last msg in the transfer. Consequently, handle the Repeated Start condition (Sr) in the next msg by not calling the wait_for_bb() check since it will simply timeout in the absence of a stop condition (BB will be 1 until Stop is programmed) Signed-off-by: Aniket Limaye <a-limaye@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22i2c: omap24xx_i2c: Use new function __omap24_i2c_xfer_msg()Aniket Limaye
Remove __omap24_i2c_read/write() usage from omap_i2c_xfer() in favour of the more flexible __omap24_i2c_xfer_msg(). Consequently, these are also no longer needed when DM_I2C is enabled. New function __omap24_i2c_xfer_msg() will take care of individual read OR write transfers with a target device. It goes through below sequence: - Program the provided Target Chip address (OMAP_I2C_SA_REG) - Program the provided Data len (OMAP_I2C_CNT_REG) - Program the provided Control register flags (OMAP_I2C_CON_REG) - Read from or Write to the provided Data buffer (OMAP_I2C_DATA_REG) For a detailed programming guide, refer to the TRM[0] (12.1.3.4 I2C Programming Guide). This patch by itself should be a transparent change. However this is needed for implementing a proper Repeated Start (Sr) functionality for i2c_msgs. Previous implementation for omap_i2c_xfer called __omap24_i2c_read/write functions, with hardcoded addr=0 and alen=0 for each i2c_msg. Each of these calls would program the registers always with a Stop bit set, not allowing for a repeated start between i2c_msgs in the same xfer(). [0]: https://www.ti.com/lit/zip/spruj28 (TRM) Signed-off-by: Aniket Limaye <a-limaye@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22i2c: omap24xx_i2c: Remove unused CONFIG_I2C_REPEATED_STARTAniket Limaye
Remove unused piece of code under CONFIG_I2C_REPEATED_START which does not have any Kconfig entry at all. Signed-off-by: Aniket Limaye <a-limaye@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-22ddr: altera: iossm: Enhance debug information for ECC errorsTingting Meng
ECC debug information was enhanced to improve the readability of error messages. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-04-22ddr: altera: agilex5: LPDDRs in-line ECC supportTingting Meng
In-line ECC support was added for LPDDR by reserving the last one-eighth of the memory space for ECC data. Full memory initialization using the BIST MEM INIT mailbox command, based on address and size, is required to correctly generate ECC data and enable proper ECC logic verification. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-04-22arm: dts: agilex5: Update CCU configurationTingting Meng
Cache allocation for dirty writes in the CCU system cache was disabled for performance optimization. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-04-22arm: socfpga: socfpga_soc64: Enable LMB_ARCH_MEM_MAPTingting Meng
LMB_ARCH_MEM_MAP is enabled, and lmb_arch_add_memory() is introduced to correctly handle memory reservations for the second and third DDR memory banks. Signed-off-by: Tingting Meng <tingting.meng@altera.com>