summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-24test/py: test_efi_loader: add HTTP (wget) test for the EFI loaderJerome Forissier
Add a test to test_efi_loader.py similar to the TFTP test but for HTTP with the wget command. Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-09-24test/py: test_efi_loader: add missing dependency on cmd_tftpbootJerome Forissier
test_efi_helloworld_net() and test_efi_grub_net() depend on cmd_tftpboot so add the missing annotations. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24test/py: net_boot: fix commentJerome Forissier
If env__pxe_boot_test_skip is not present, it defaults to True not False. Therefore fix the comment. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24net: fec_mxc_init(): do not ignore return status of fec_open()Jerome Forissier
The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24net: wget: allow EFI bootJerome Forissier
wget followed by bootefi currently fails as follows: U-Boot> wget 200000 192.168.0.30:helloworld.efi Waiting for Ethernet connection... done. HTTP/1.0 200 OK Packets received 13, Transfer Successful Bytes transferred = 12720 (31b0 hex) U-Boot> bootefi 200000 No UEFI binary known at 200000 U-Boot> Fix the problem by adding the missing efi_set_bootdev() call. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-24net: ftgmac100: depend on NETJerome Forissier
FTGMAC100 enables drivers/net/ftgmac100.c which uses PHY_INTERFACE_MODE_NCSI, which is defined only when PHY_NCSI is enabled. Therefore FTGMAC100 depends on PHY_NCSI. However adding such a dependency causes a "recursive dependency detected!" message, so add a dependency on NET instead (PHY_NCSI depends on NET). All in all, either the stack is NET and FTGMAC100 can be enabled, or it is NET_LWIP (or NO_NET) and it cannot. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-24net: phy: ncsi: depend on NETJerome Forissier
PHY_NCSI enables drivers/net/phy/ncsi.c which calls net_loop() and net_set_timeout_handler(). That's the legacy NET stack (as opposed to NET_LWIP). Therefore add the dependency to Kconfig. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24net: wget: removed unused function wget_success()Jerome Forissier
wget_success() is used nowhere so remove it. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-09-24net: fm: call dtsec_init_phy() only when it is definedJerome Forissier
dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-24arm: omap2: add missing #include <netdev.h>Jerome Forissier
emac.c implements cpu_eth_init() so it needs to pull the corresponding header file. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-24at91: rename mem_init() to at91_mem_init()Jerome Forissier
The AT91-based platforms have a mem_init() function declared in arch/arm/mach-at91/include/mach/at91_common.h and implemented in various places. In preparation of the introduction of the lwIP networking library which also has a global mem_init() function, rename the AT91 one to at91_mem_init(). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Hari Prasath Gujulan Elango <hari.prasathge@microchip.com>
2024-09-24flash: prefix error codes with FL_Jerome Forissier
Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-09-24buildman/toolchain.py: do not set CROSS_COMPILE for sandboxJerome Forissier
When building for sandbox, self.cross is empty. In MakeEnvironment(), CROSS_COMPILE is defined to be self.cross (with or without a full path), optionally prefixed by the toolchain wrapper defined in ~/.buildman. This is fine when self.cross is not empty, but it doesn't make sense when it is: - Either there is no wrapper and we end up with an empty CROSS_COMPILE which is the same as not defining it (the host compiler will be used), - Or there is a wrapper and CROSS_COMPILE will contain only the wrapper which obviously is not a valid compiler, hence an error. Test case: $ sudo apt install ccache $ grep -q toolchain-wrapper ~/.buildman || \ printf "[toolchain-wrapper]\nwrapper = ccache\n" >>~/.buildman $ make mrproper $ ./tools/buildman/buildman sandbox_noinst $ ./tools/buildman/buildman sandbox_noinst Building current source for 1 boards (1 thread, 24 jobs per thread) sandbox: + sandbox_noinst +arch/sandbox/lib/reloc_sandbox_efi.c:10:15: error: operator '==' has no left operand + 10 | #if HOST_ARCH == HOST_ARCH_X86_64 + | ^~ [...] The GetEnvArgs function is modified too, since the VAR_CROSS_COMPILE case has the same issue. In tools/buildman/test.py, testGetEnvArgs is extended and testMakeEnvironment is added. They check the 'arm' and 'sandbox' toolchains, with and without a wrapper. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-10Merge patch series "phycore-am62/4: Add more boot sources"Tom Rini
Daniel Schultz <d.schultz@phytec.de> says: This patch stack extends the phyCORE-AM62x/AM64x U-Boot by following boot sources: - Load U-Boot with USB DFU - Load a Linux and initramfs from OSPI/QSPI NOR flash - Load a Linux and rootfs from Network Moreover, it adds required changes to the environment to boot an A/B system with RAUC and includes some minor fixes.
2024-09-10configs: phycore_am62x_*_defconfig: Set PHYTEC as ManufacturerDaniel Schultz
Commit 371b379edbf3 ("configs: Make USB_GADGET_MANUFACTURER consistent over all PHYTEC boards") made the USB_GADGET_MANUFACTURER value consistent over all PHYTEC boards. Update the phyCORE-AM62x defconfigs to make this config consistent as well. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: phycore_am62x_a53_defconfig: Fix CONFIG_ENV_SIZEDaniel Schultz
The environment should have a size of 0x20000 instead 0x2000. Update to have the same environment size for all PHYTEC K3 products. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: Add phycore_am62x_r5_usbdfu_defconfigDaniel Schultz
This config includes the phycore_am62x_r5_defconfig file as well as the am62x_r5_usbdfu.config fragment. We need another defconfig because the AM62x has not enough internal SRAM to support all boot sources. The normal phycore_am62x_r5_defconfig should allow to boot from MMC and OSPI while this new defconfig allows to boot from USB. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: phycore_am62x_a53_defconfig: Merge am62x_a53_usbdfu.configDaniel Schultz
Merge the am62x_a53_usbdfu.config into the phyCORE-AM62x A53 defconfig to properly support USB DFU boot. This config was made with the following command: make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- \ phycore_am62x_a53_defconfig am62x_a53_usbdfu.config However, CONFIG_USB_GADGET_MANUFACTURER was not merged to keep Phytec as manufacturer. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: phycore_am64x_a53_defconfig: Make BOOTCMD genericDaniel Schultz
The phyCORE-AM64x board code sets an environment variable 'boot' with the device U-Boot booted from. Use this variable in CONFIG_BOOTCOMMAND to boot Linux from the same boot device by default. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: phycore_am62x_a53_defconfig: Make BOOTCMD genericDaniel Schultz
The phyCORE-AM62x board code sets an environment variable 'boot' with the device U-Boot booted from. Use this variable in CONFIG_BOOTCOMMAND to boot Linux from the same boot device by default. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10board: phytec: phycore_am64x: Add Network/SPI BootDaniel Schultz
Include the boot logic to boot via Network or from a OSPI/QSPI NOR flash. Moreover, set all required variables to both boot methods to the environment. Note: The phyBOARD-Electra AM64x is not able to load the U-Boot via Network. However, it's still possible to load the kernel. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10board: phytec: phycore_am62x: Add Network/SPI BootDaniel Schultz
Include the boot logic to boot via Network or from a OSPI/QSPI NOR flash. Moreover, set all required variables to both boot methods to the environment. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10include: env: phytec: Add K3 boot logic for OSPI/QSPI flashesDaniel Schultz
This boot logic allows to boot a Kernel image, Device-Tree blob and a initramfs from an external OSPI/QSPI NOR flash. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10include: net: phytec: Add K3 network boot logicDaniel Schultz
This boot logic allows to boot a Kernel image, Device-Tree blob and overlays via tftp/dhcp (configurable with 'net_fetch_cmd'). Additionally, it loads a rootfs via NFS. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10include: env: phytec: Add raucinit to k3_mmc environmentDaniel Schultz
Initialize the environment for booting an RAUC image when 'doraucboot' is set to 1. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10include: env: phytec: k3_mmc: Rename variablesDaniel Schultz
Add a mmc prefix to 'loadimage' and 'loadfdt' because we need similar variables for other boot sources. This will prevent name clashes and allows to implement similar boot logic. Also switch from loadaddr to kernel_addr_r. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10configs: phycore_am64x_a53_defconfig: Enable CONFIG_OF_BOARD_SETUPWadim Egorov
Enable CONFIG_OF_BOARD_SETUP to fixup kernel device tree with mtd partitions. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-09-10spl: spl_load: fix comparison between negative error code and unsigned sizeDaniel Palmer
read could be a negative error value but size in spl_image is unsigned so when they are compared read is used as if it's a unsigned value and if it's negative it'll most likely be bigger than size and the result will be true and _spl_load() will return 0 to the caller. This results in the caller to _spl_load() not seeing that an error happened as it should and continuing as if the load was completed when it might not have been. Check if read is negative and return it's value if it is before comparing against size in spl_image. Signed-off-by: Daniel Palmer <daniel@0x0f.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-10test/py: spi: Set the expected error messageLove Kumar
If erase/write/read size is 0 then it throws the mentioned error message when debug message ie enabled as per 899fb5aa8bec ("cmd: sf/nand: Print and return failure when 0 length is passed"), setting it to None as debug message is not enabled by default for testing. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-09-10treewide: drop redundant "type string" for SYS_SOC and friendsRasmus Villemoes
The Kconfig symbols SYS_ARCH, SYS_CPU, SYS_SOC, SYS_VENDOR and SYS_BOARD are defined in arch/Kconfig as having type string, and most board files simply amend those definition with suitable default "foo" or default "foo" if BAR stanzas. But some also include a redundant repetition of the type. Homogenize the code base by removing those lines. Generated by find arch/*/ board -name Kconfig | xargs perl -i -g -pe 's/(config SYS_(ARCH|CPU|SOC|VENDOR|BOARD)\n)\s*string\n/\1/gs' with the trailing slash in arch/*/ ensuring that arch/Kconfig itself is not found. This does not change boards which add a prompt string, e.g. string "Board name" because I think those change the semantics of the symbol into being user-settable. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-09-10arm: Remove ethernut5 boardTom Rini
As per the maintainers at egnite GmbH, they are no longer interested in supporting this board. Go and remove the platform here. Furthermore, this is the only AT91SAM9XE platform in-tree so remove supporting code for that as well. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-09-10net: guard call to tftp_start() with IS_ENABLED(CONFIG_CMD_TFTPBOOT)Jerome Forissier
net_auto_load() cannot call tftp_start() if CONFIG_CMD_TFTPBOOT is disabled. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2024-09-09Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb ↵Tom Rini
into next
2024-09-09Merge branch 'qcom-next' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon into next Various improvements to Snapdragon support: * Bumped up the pagetable size to handle newer SoCs with much more RAM * Made memory map parsing more robust, fixing chainloading on SM8550/SM8650 * Populate fdt_addr_r with U-Boot's FDT by default, and set $loadaddr to prevent crashes with some commands which expect it * Added initial support for SC7280/QCM6490 and the new RB3 Gen 2 board * Add debug config fragments to enable debug UART on some SoCs. * Enable RPMh regulators on SM8550/SM8650 * Map the cmd-db memory explicitly since it may not be in the memory map CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/22255
2024-09-09phy: test: Implement sandbox PHY .set_mode and DM testMarek Vasut
Implement trivial extension to the sandbox PHY, which makes it pretend to support selecting USB Host mode and nothing else. Any other mode is rejected with -EINVAL. Any submode except for default submode 0 is rejected with -EOPNOTSUPP . The implementation behaves in this trivial way to permit easy unit testing using test which is also added in this commit. To run the test, use e.g. sandbox64_defconfig and run U-Boot as follows: $ ./u-boot -Tc 'ut dm phy_setup' Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-09phy: rcar: Split init and set_mode operationsMarek Vasut
The current init operation also sets the PHY into USB host mode. Split the mode configuration into set_mode callback instead and implement support for device and OTG modes as well. The OTG mode performs auto-detection and selects either host or device mode. In case the OTG mode is configured, submode field can be used to select full PHY (re)initialization or only mode auto-detection. The full (re)initialization is only necessary once, on start up. Since the OTG mode may enable IRQ generation in the PHY, disable that IRQ generation in the exit callback again. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-09phy: Extend generic_setup_phy() with PHY mode and submodeMarek Vasut
Extend generic_setup_phy() parameter list with PHY mode and submode and call generic_phy_set_mode() in generic_setup_phy(), so the generic PHY setup function can configure the PHY into correct mode before powering the PHY up. Update all call sites of generic_setup_phy() as well, all of which are USB host related, except for DM test which now behaves as a USB host test. Note that if the PHY driver does not implement the .set_mode callback, generic_phy_set_mode() call returns 0 and does not error out, so this should not break any existing systems. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-09-06buildman: Support building within a Python venvSimon Glass
The Python virtualenv tool sets up a few things in the environment, putting its path first in the PATH environment variable and setting up a sys.prefix different from the sys.base_prefix value. At present buildman puts the toolchain path first in PATH so that it can be found easily during the build. For sandbox this causes problems since /usr/bin/gcc (for example) results in '/usr/bin' being prepended to the PATH variable. As a result, the venv is partially disabled. The result is that sandbox builds within a venv ignore the venv, e.g. when looking for packages. Correct this by detecting the venv and adding the toolchain path after the venv path. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-06board/qualcomm: add debug config fragments for some SoCsCaleb Connolly
We already have some documentation describing how to enable debug UART for Qualcomm SoCs. However the UART address varies per-soc... Add some config fragments to enable debug UART for few well supported SoCs. These can be used like: $ make qcom_defconfig debug-sdm845.config Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06doc: board/qualcomm: document rb3gen2 building/flashingCaleb Connolly
The process here is almost identical to the Dragonboard 410c, we've come full circle! Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06configs: add qcm6490_defconfigCaleb Connolly
Introduce a defconfig for the RB3 Gen 2 and other QCM6490 boards with a dedicated uefi partition. These can replace EDK2 entirely with U-Boot. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06qcom_defconfig: enable SC7280 clocksCaleb Connolly
Enable clocks on SC7280 Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06iommu: qcom-smmu: add sc7280-smmu-500 compatibleCaleb Connolly
This soc doesn't have the generic compatible. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06dts: qcs6490-rb3gen2-u-boot: USB host modeCaleb Connolly
Adjust DTS so USB runs in host mode. The type-c port is the only supported port (since the others need PCIe). Booting from USB is possible with a powered type-c dock. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06dts: qcs6490-rb3gen2-u-boot: add override dtsiCaleb Connolly
For running U-Boot as primary bootloader we must define the memory layout statically. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06clk/qcom: add initial clock driver for sc7280Caleb Connolly
We don't actually need any clocks to get UFS up and running, resets are useful though. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06regulator: qcom-rpmh-regulator: add support for PM8550 & related regulatorsNeil Armstrong
Add the PM8550 & related regulators found on the SM8550 and SM8650 platforms. The tables are imported from the Linux driver. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06soc: qcom: rpmh-rsc: add back __tcs_set_trigger() for SM8550/SM8650Neil Armstrong
The TCS writes has no effect after the removal of the __tcs_set_trigger() call, obviously it seems the RSC version 3 requires it to complete the transactions. Fixes: 80c5be164ad ("soc: qcom: rpmh-rsc: drop unused multi-threading and non-active TCS support") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # sm8250 rb5 Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06qcom_defconfig: bump CONFIG_NR_DRAM_BANKSCaleb Connolly
Some newer boards end up with a bunch of holes in the memory map due to how Qualcomm's hypervisor and ABL work. The end result is 14+ memory regions. Bump CONFIG_NR_DRAM_BANKS to 24 so we can handle these and any future expansion easily. Yes, this is ridiculous, but there is no other way. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06soc: qcom: cmd-db: map cmd-db regionCaleb Connolly
On at least SM8650 this region might not be included in the memory map. Use the new mmu_map_region() helper to map it during bind(). Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>