summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-26binman: fit: Set the image_pos attributes only onceSimon Glass
The section etype has its own implementation of SetImagePos(), most of which is not useful since the code is included here. So call Entry.SetImagePos() which has the only piece of this which we actually want. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: fit: Avoid assuming that a FIT member is a sectionSimon Glass
Use the more generic variable name 'entry' to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Update fdt-list-dir to use the provided directorySimon Glass
Since the files are known to be in the provided directory, use that instead of requiring it to be added to the list of input directories. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Avoid setting the image_pos attribute directlySimon Glass
Two places set this attribute directly. Update them to use the function provided. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Tidy up comments and pylint warnings in fitSimon Glass
Update this entry type to resolve some pylint warnings and make sure that functions and members are fully commented. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Tidy up comments for Entry.GetEntryArgsOrProps()Simon Glass
Improve the comments for this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Correct the comment for fdtgrepSimon Glass
This returns stdout, not a CommandResult so update the comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26binman: Fix up test coverage for mkeficapsuleSimon Glass
Add tests for missing tools to complete the test coverage for this etype. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26buildman: Allow skipping the dtc buildSimon Glass
For most boards, the device-tree compiler is built in-tree, ignoring the system version. Add a special option to skip this build. This can be useful when the system dtc is up-to-date, as it speeds up the build. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-26buildman: Retry the build for current sourceSimon Glass
Buildman retries a failed build when processing a branch, but does not do this when building current source. It is useful to do this retry in both cases, so add the logic for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-25power: regulator: Consistently return -ENOSYS when ops is unimplementedJonas Karlman
dev_get_driver_ops() may return NULL when the udevice is invalid. Move the ops check to top of functions to consistently return -ENOSYS when ops is unimplemented and prevent trying to access uclass plat data, also add missing NULL checks to suspend ops. Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-09-25power: regulator: Do not call set_suspend_value with -ENODATAJonas Karlman
On some boards a PMIC regulator is flagged with regulator-on-in-suspend and does not define any suspend or max microvolt, e.g. on Radxa ROCK 3A: vcc_ddr: DCDC_REG3 { regulator-name = "vcc_ddr"; regulator-always-on; regulator-boot-on; regulator-initial-mode = <0x2>; regulator-state-mem { regulator-on-in-suspend; }; }; This result in suspend_uV having the value -ENODATA after probe. This negative voltage, -ENODATA, gets missinterpreted and result in an unexpected voltage being set by autoset. E.g. on Radxa ROCK 3A the vcc_ddr regulator by default have a normal and suspend voltage value of 0.5v. However, due to this missinterpretation the suspend voltage end up beind set to 0.5625v instead. Fix this by skip calling regulator_set_suspend_value() in autoset and also protect calling set value ops when input value is -ENODATA. Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-09-25Merge tag 'u-boot-imx-next-20240925' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22406 - i.MX93 FEC fixes. - Always name the generated fitImage u-boot.itb to keep compatibility with pr-buildman behavior. -----------------------
2024-09-24net: fec_mxc: Skip recv packet process when fec is haltedYe Li
After FEC is halted by calling fec_halt callback, we should not continue receiving packet. Otherwise it will process previous pending interrupts on EIR register and uses wrong rbd index as this has been reset to 0. The GRA interrupt which is triggered by issuing graceful stop command to FEC transmitter in fec_halt is processed in this case. It causes wrong receive buffer descriptors be used by FEC in next time. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-24net: fec_mxc: Fix clk_ref rate on iMX93Peng Fan
i.MX93 FEC ENET port supports two mode: RGMII and RMII. For RGMII, there is an internal /2 divider, so the freq needs to set with (*2), otherwise the speed will not reach 1G and cause communication error in some network environments. For RMII, the clk path is ccm -> enet tx_clk pin -> pad loop back to enet, no /2 divider. So fix for RGMII mode with freq multiplied by 2. Fixes: 09de565f76b ("net: fec_mxc: support i.MX93") Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-24arm64: dts: imx8m: Always name the generated fitImage u-boot.itbMarek Vasut
Maintain backward compatibility with pre-binman u-boot file naming, the U-Boot fitImage used to be named u-boot.itb before, restore the file name after binman conversion. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2024-09-24Merge patch series "Miscellaneous fixes"Tom Rini
Jerome Forissier <jerome.forissier@linaro.org> says: Miscellaneous fixes made when developing the lwIP series [1]. They are posted separately since they make sense on their own. Subsequent versions of the lwIP series will contain a squashed version of this one. [1] http://patchwork.ozlabs.org/project/uboot/list/?series=420712&state=%2A&archive=both
2024-09-24cmd: pxe: CMD_PXE implies CMD_TFTPBOOTJerome Forissier
cmd/pxe.c (CMD_PXE) calls do_get_tftp() (CMD_TFTPBOOT) therefore add an "imply" to cmd/Kconfig. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-09-24common: update: UPDATE_COMMON implies CMD_TFTPBOOTJerome Forissier
common/update.c (UPDATE_COMMON) depends on tftp_timeout_ms which is defined in cmd/tftp.c (CMD_TFTPBOOT). Therefore add the appropriate imply statement to Kconfig. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
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-24test/py/tests/test_bootstage.py: Combine stash/unstash testsTom Rini
When running the bootstage tests currently we get a warning like: tests/test_bootstage.py::test_bootstage_stash ...PytestReturnNotNoneWarning: Expected None, but tests/test_bootstage.py::test_bootstage_stash returned (37748736, 4096), which will be an error in a future version of pytest. Did you mean to use `assert` in stead of `return`? This is because the unstash test will run the stash test and fetch the addr / size from that. Rework the test to be stash and unstash and then run the unstash command at the end of the current stash test. Acked-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Love Kumar <love.kumar@amd.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-09-24spl: ram: hide SPL_RAM_SUPPORTJerome Forissier
Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning: common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function] 19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-09-23Merge tag 'xilinx-for-v2025.01-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next AMD/Xilinx changes for v2025.01-rc1 kbuild: - Add rules for automatically applying DT overlays Microblaze: - Enable bootscript location via DT AMD/Xilinx - Enable SIMPLE_PM_BUS by default ZynqMP: - DT updates and alignments with dt-schema - Call fdtoverlay via make directly - Enable non-invasive CCI-400 PMU debug - Disable secure access for boot devices - Add new zynqmp reboot command Versal NET: - Cleanup spi_get_env_dev() Kria: - Add bootmenu support sdhci: - Do not call device_is_compatible everywhere net: - Remove is-internal-pcspma DT flag
2024-09-21mmc: Poll CD in case cyclic framework is enabledMarek Vasut
In case the cyclic framework is enabled, poll the card detect of already initialized cards and deinitialize them in case they are removed. Since the card initialization is a longer process and card initialization is done on first access to an uninitialized card anyway, avoid initializing newly detected uninitialized cards in the cyclic callback. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-20Merge patch series "lmb: rework logic to validate load address for network ↵Tom Rini
commands" Sughosh Ganu <sughosh.ganu@linaro.org> says: Rework the logic to verify the load address so that address re-use is not an issue.
2024-09-20cmd: sf: prevent overwriting the reserved memoryPrasad Kummari
Added LMB API to prevent SF command from overwriting reserved memory areas. The current SPI code does not use LMB APIs for loading data into memory addresses. To resolve this, LMB APIs were added to check the load address of an SF command and ensure it does not overwrite reserved memory addresses. Similar checks are used in TFTP, serial load, and boot code to prevent overwriting reserved memory. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2024-09-20wget: rework the logic to validate the load addressSughosh Ganu
Use the lmb_read_check() function to verify if it is safe to use a region of memory to load data from the wget command. The current logic checks the amount of free memory available, starting from the 'load address'. This call fails if the same region of memory has been used earlier. This used to work earlier as the LMB memory map had a local scope and was not persistent. Fix this issue by using the lmb_read_check() call instead which only returns an error in case the memory region has been marked for not allowing re-use. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Tested-by: Vaishnav Achath <vaishnav.a@ti.com>
2024-09-20tftp: rework the logic to validate the load addressSughosh Ganu
Use the lmb_read_check() function to verify if it is safe to use a region of memory to load data from a tftp command. The current logic checks the amount of free memory available, starting from the 'load address'. This call fails if the same region of memory has been used earlier. This used to work earlier as the LMB memory map had a local scope and was not persistent. Fix this issue by using the lmb_read_check() call instead which only returns an error in case the memory region has been marked for not allowing re-use. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Tested-by: Vaishnav Achath <vaishnav.a@ti.com>
2024-09-20xilinx: zynqmp: Add bootmenu supportJohn Vicky Vykuntapu
Popup the bootmenu for 5 sec with default boot options to CC on AMD CCs and default to SOM on others. Users can anytime disable the bootmenu by setting the variable enable_bootmenu=0 in zynqmp_kria.env or setup it up at run time and save variables to NV memory. The patch is also fixing issue created by commit 4c7363068651 ("cmd: setexpr: fix no matching string in gsub return empty value") which has changed return value from setexpr command (Before this commit when matching string wasn't found command return 1 that's why was possible to use with if). Signed-off-by: John Vicky Vykuntapu <johnvicky.vykuntapu@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/6193d95a9c0f3ae319a900b46d6212f7ab16aba4.1726041851.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Rename ina226-vccint-io-bram-ps nodesMichal Simek
Remove -ps suffix to avoid issues with dt-schema where -ps is allocated in property-units.yaml for pico seconds. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/88cc8423db6726fb1f3d1ffc0ad0262611c0fed5.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Use generic spi@ name in zcu111-revAMichal Simek
DT schema requires to use spi@ name for SPI devices that's why fix it. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/394cc43935d41eea3cfa4e3745edf495009b98d9.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Define phy-mode in zcu1275-revBMichal Simek
Add missing required phy-mode property. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/fdd98ebd217e005fedde6aa2175449f7ad5555eb.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Align mini-qspi DT with dt-schemaMichal Simek
fixed-clock can't be described on the bus because it is missing reg property. Also remove additional compatible string for flash. Mini qspi configuration is used with multiple different flashes that's why describing only one is not correct but also not required based on DT schema. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/0e4721eda8d0f23a9d9f0c15cf887f0bba639cd4.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: fix i2c mux bus description for m-a2197 platformsMichal Simek
Uncomment reg property for bus 3 in i2c mux. It is better option than removing the whole node. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/f28ff644fd2c6bdf5f2e646f6bc0e1ad0c92e8be.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Fix comment style around gpio line-namesMichal Simek
Just fix description to be aligned with other comments. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/938a2658edf68665ef9e34d2584adacfa83dd01f.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Fix gpio-line-name size for m-a2197 platformsMichal Simek
There were 3 additional empty strings which shouldn't be there. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/33290fcbcd3ef19cae8ef036dca0f6dcc8080d5b.1726219714.git.michal.simek@amd.com
2024-09-20xilinx: Fix axi and mmc node names in mini configurationMichal Simek
amba is not approved node name for simple-bus that's why use axi instead to be aligned with other xilinx boards. Node reference is not changed that's why there is no impact but also mini configuration will never gets to OS that's why nothing should be affected from OS perspective (paths in /proc/ for example). Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/1b18a69ae47bdcb1a0795af7621d13bfecfc9861.1726219714.git.michal.simek@amd.com
2024-09-20arm64: zynqmp: Align gpio hogs with dt-schemaMichal Simek
As was done in past for zcu102 append -hog to node name to pass dt-schema. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/112e36e2578c84f30c3c038440405069671d2853.1726219714.git.michal.simek@amd.com