summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-23rockchip: rk3588: Use hptimer reg names in rockchip_stimer_initJonas Karlman
Define constants for hptimer reg names and use them instead of magic numbers in rockchip_stimer_init(). Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Add RK3576 support for ROCKCHIP_COMMON_STACK_ADDRJonas Karlman
The Rockchip RK3576 SoC uses a different DRAM base address, 0x40000000, compared to prior SoCs. Add default options that should work when 0x40000000 is used as DRAM base address. Use same offsets as before, just below 64 MiB. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Move imply ROCKCHIP_EXTERNAL_TPL under SoC Kconfig symbolJonas Karlman
New Rockchip SoCs will typically require use or an external TPL when support for the SoC is added to U-Boot. Move imply ROCKCHIP_EXTERNAL_TPL under SoC Kconfig symbol to remove a future likelihood of a long "default y if" line. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Move imply ROCKCHIP_COMMON_STACK_ADDR under SoC Kconfig symbolJonas Karlman
The ROCKCHIP_COMMON_STACK_ADDR Kconfig option was originally enabled in the SoC specific Kconfig files to ease during the initial migration to use common stack addresses. All boards for the affected SoCs have been migrated to use common stack addresses. Migrate to use an imply under the SoC symbol instead of re-define the symbol in each SoC specific Kconfig file. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDRJonas Karlman
A few Rockchip ARMv7 SoCs use 0x60000000 as DRAM base address instead of the more common 0x0 DRAM base address used on AArch64 SoCs. Add default options that should work for these ARMv7 SoCs. Same offsets as before are used, just below 64 MiB. Hex values have also been padded to improve alignment. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Make ROCKCHIP_COMMON_STACK_ADDR depend on TPLJonas Karlman
The stack-pointer addresses used with ROCKCHIP_COMMON_STACK_ADDR expect that DRAM is initialized by TPL or ROCKCHIP_EXTERNAL_TPL, that SPL has access to full DRAM and SPL is loaded to/executed from start of DRAM. Add depends on to ensure use of the ROCKCHIP_COMMON_STACK_ADDR symbol does not cause problem for any board not using TPL and back-to-BROM loading of SPL. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: Move imply TPL_ROCKCHIP_COMMON_BOARD under SoC Kconfig symbolJonas Karlman
The Kconfig symbol ROCKCHIP_COMMON_STACK_ADDR currently imply the TPL_ROCKCHIP_COMMON_BOARD option when TPL=y. This is inconvenient for a SoC with very limited SRAM to use a custom tpl.c together with the common stack addresses. Move any imply TPL_ROCKCHIP_COMMON_BOARD to under the SoC symbol, where it belongs. Add the missing imply to RK3328 and PX30 use a SoC specific tpl.c and only expect imply TPL_LIBGENERIC_SUPPORT. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: ringneck-px30: enable DT overlay supportQuentin Schulz
Haikou carrierboard allows multiple adapter boards to be connected, for now there exists the following adapter boards compatible with PX30 Ringneck: - Haikou Video Demo on the Video Connector, - Haikou LVDS 9904379 on the Video Connector, So support DT overlays so we can use this mechanism instead of full DTB containing both the carrierboard and the adapter. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: px30: add fdtoverlay_addr_r default value to support FDTOQuentin Schulz
In order to be able to use Device Tree Overlays, the fdtoverlay_addr_r needs to be specified. Follow what's been done for other Rockchip SoCs and leave 1MiB for the base DTB before the address for the overlay. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: px30: enable RNG for all boardsQuentin Schulz
I don't see a reason why this should only be enabled on a per-board basis. The rng IP is inside the SoC and doesn't seem to rely on anything external to it, therefore let's enable it on the SoC DTSI and remove the now empty px30-evb-u-boot.dtsi. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: theobroma-systems: use HAVE_VENDOR_COMMON_LIB to simplify MakefileQuentin Schulz
The build system uses HAVE_VENDOR_COMMON_LIB to automatically include board/$(VENDOR)/common/Makefile, therefore let's use that to implicitly include board/theobroma-systems/common/Makefile and compile the common.c file when building proper. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: rk3308: Drop unused rk_board_init()Jonas Karlman
Nothing is calling the function rk_board_init() and the io-domain driver can handle the functions intended purpose based on information from DT. Cleanup by removing the unused rk_board_init() function and re-sort included headers. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23CI: add sandbox64_lwipJerome Forissier
Add sandbox64_lwip_defconfig to the list of tested boards. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-04-23configs: add sandbox64_lwip_defconfigJerome Forissier
Add sandbox64_lwip_defconfig based on sandbox64_defconfig with NET_LWIP enabled. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
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 <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
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 <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
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 <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
2025-04-23fwu: developerbox: fix dfu alt buffer clearingVincent Stehlé
The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER() macro to declare a `buf' variable pointer into an array allocated on the stack. It then calls the memset() function to clear the useable portion of the array using the idiomatic expression `sizeof(buf)'. While this would indeed work fine for an array, in the present case we end up clearing only the size of a pointer. Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead. Fixes: 6b403ca4dcf4 ("fwu: DeveloperBox: add support for FWU") Signed-off-by: Vincent StehlĂ© <[email protected]> Cc: Masahisa Kojima <[email protected]> Cc: Tom Rini <[email protected]> Cc: Jassi Brar <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-04-23usb: gadget: introduce 'enabled' flag in struct usb_epStephan Gerhold
f_acm calls usb_ep_disable(f_acm->ep_notify) unconditionally in acm_start_ctrl(), even if the USB endpoint was never enabled before. This causes crashes for some UDC drivers (e.g. ci_udc), because they dereference data structures that are assigned only after having called usb_ep_enable(). The f_acm driver in U-Boot is similar to the Linux driver, where this issue does not occur because usb_ep_disable() and usb_ep_enable() internally track the enabled state. In Linux this change was made in commit b0bac2581c19 ("usb: gadget: introduce 'enabled' flag in struct usb_ep") by Robert Baldyga. Fix the crashes for f_acm by making the same change in U-Boot. This makes the API less bug-prone and avoids introducing crashes when adapting new gadget drivers from Linux. Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-04-23usb: gadget: f_acm: Allow restarting ACM console after stopping itStephan Gerhold
When using IOMUX, the "usbacm" console can be added/removed dynamically from the stdout/stderr/stdin environment variables to allow temporarily starting other USB gadgets (e.g. Fastboot). However, right now acm_stdio_stop() does not completely undo acm_stdio_start(): The USB gadget is unregistered, but as long as dev->priv stays set acm_stdio_start() will never register the USB gadget again. Clear dev->priv after we detach to make sure a start operation after a stop operation registers the gadget again. Fixes: fc2b399ac03b ("usb: gadget: Add CDC ACM function") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-04-23usb: gadget: f_acm: Claim requested USB endpointsStephan Gerhold
U-Boot has an older version of the Linux gadget API, where USB endpoints returned by usb_ep_autoconfig() are not automatically claimed. As written in the documentation comment: "To prevent the endpoint from being returned by a later autoconfig call, claim it by assigning ep->driver_data to some non-null value." Right now f_acm doesn't do that, which means that e.g. ep_in and ep_notify may end up being assigned the same endpoint. Surprisingly, the ACM console is still somehow working, but this is not the expected behavior. It will break with a later commit that disallows calling usb_ep_enable() multiple times. Fix this by assigning some data to ep->driver_data, similar to the other gadget drivers. Fixes: fc2b399ac03b ("usb: gadget: Add CDC ACM function") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-04-23power: regulator: scmi: Move regulator subnode hack to scmi_regulatorMarek Vasut
The current code attempts to bind scmi_voltage_domain to regulator subnode of the SCMI protocol node, so scmi_voltage_domain can then bind regulators directly to subnodes of its node. This kind of behavior should not be in core code, move it into scmi_voltage_domain driver code. Let the driver descend into regulator node and bind regulators to its subnodes. Fixes: 1f213ee4dbf2 ("firmware: scmi: voltage regulator") Signed-off-by: Marek Vasut <[email protected]> [Alice Guo: Fix scmi_regulator_bind] Signed-off-by: Peng Fan <[email protected]>
2025-04-23mmc: omap_hsmmc: implement send_init_stream callbackMathieu Othacehe
This callback is used to send the 74 clock cycles after power up. Signed-off-by: Mathieu Othacehe <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-04-23mmc: Add a new callback function to perform the 74 clocks cycle sequenceJean-Jacques Hiblot
Add a new callback function *send_init_stream* which start a sequence of at least 74 clock cycles. The mmc core uses *mmc_send_init_stream* in order to invoke the callback function. This will be used during power cycle where the specification requires such a sequence after power up. Signed-off-by: Jean-Jacques Hiblot <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-04-23mmc: type 'Relatvie'Heinrich Schuchardt
%s/Relatvie/Relative' Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
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 <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-04-22Merge patch series "MIPS: Boston: Various enhancements"Tom Rini
Jiaxun Yang <[email protected]> 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/[email protected]
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
2025-04-22MIPS: boston: Migrate to OF_UPSTREAMJiaxun Yang
We can now boot with upstream devicetree. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
2025-04-22dts/upstream: Add Makefile for MIPSJiaxun Yang
It is required to make OF_UPSTREAM work. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
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 <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]>
2025-04-22Merge patch series "configs: ACPI enabled QEMU defconfigs"Tom Rini
Heinrich Schuchardt <[email protected]> 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/[email protected]