]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 months agoMerge tag 'v2024.10-rc6' into next
Tom Rini [Mon, 30 Sep 2024 23:48:12 +0000 (17:48 -0600)]
Merge tag 'v2024.10-rc6' into next

Prepare v2024.10-rc6

2 months agoPrepare v2024.10-rc6
Tom Rini [Mon, 30 Sep 2024 22:47:28 +0000 (16:47 -0600)]
Prepare v2024.10-rc6

Signed-off-by: Tom Rini <trini@konsulko.com>
2 months agoMerge tag 'u-boot-dfu-20240930' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Mon, 30 Sep 2024 16:38:05 +0000 (10:38 -0600)]
Merge tag 'u-boot-dfu-20240930' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20240930

- Fix Kconfig dependencies for DFU_OVER_USB

2 months agousb: gadget: cdns3: Fix missing cache operations for non-zero Endpoints
Siddharth Vadapalli [Mon, 30 Sep 2024 09:34:07 +0000 (15:04 +0530)]
usb: gadget: cdns3: Fix missing cache operations for non-zero Endpoints

Transfer initiation and completion for the non-zero Endpoints are
handled by cdns3_ep_run_transfer() and cdns3_transfer_completed()
respectively.

Failing to flush the cache associated with the TRB Pool within
cdns3_ep_run_transfer() results in the transfers never being initiated.
Similarly, failing to invalidate the cache associated with the TRB pool
within cdns3_transfer_completed() results in the transfers never being
completed.

Fix this.

Fixes: 7e91f6ccdc84 ("usb: Add Cadence USB3 host and gadget driver")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2 months agoMerge tag 'u-boot-rockchip-20240930' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 30 Sep 2024 13:43:11 +0000 (07:43 -0600)]
Merge tag 'u-boot-rockchip-20240930' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/22470

- rk8xx pmic fix

2 months agoregulator: rk8xx: Use buck variable consistently
Jonas Karlman [Tue, 17 Sep 2024 20:59:18 +0000 (20:59 +0000)]
regulator: rk8xx: Use buck variable consistently

The buck variable is zero based, i.e. buck=0 match BUCK1 in datasheet.

Remove any buck + 1 calculation to be more consistent in usage of the
buck variable across the different RK8xx variants in the driver.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 months agoregulator: rk8xx: Fix buck get and set enabled state on RK806
Jonas Karlman [Tue, 17 Sep 2024 20:59:17 +0000 (20:59 +0000)]
regulator: rk8xx: Fix buck get and set enabled state on RK806

Wrong POWER_EN reg is used to get and set enabled state for the RK806
buck 4 and 8 regulators, also wrong POWER_SLP_EN0 bit is used for
suspend state for the RK806 buck 1-8 regulators.

Fix this by not adding one to the zero based buck variable.

Fixes: f172575d92cd ("power: rk8xx: add support for RK806")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2 months agoMerge tag 'dm-next-26sep24' of https://source.denx.de/u-boot/custodians/u-boot-dm...
Tom Rini [Thu, 26 Sep 2024 23:18:34 +0000 (17:18 -0600)]
Merge tag 'dm-next-26sep24' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

CI: https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/22430
CI: https://dev.azure.com/simon0972/u-boot/_build/results?buildId=68&view=results

2 months agoMerge tag 'u-boot-stm32-20240926' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Thu, 26 Sep 2024 17:20:26 +0000 (11:20 -0600)]
Merge tag 'u-boot-stm32-20240926' of https://source.denx.de/u-boot/custodians/u-boot-stm

- Fixes for STM32MP15x basic boot

2 months agobinman: Make a start on an iMX8 test
Simon Glass [Mon, 26 Aug 2024 19:11:43 +0000 (13:11 -0600)]
binman: Make a start on an iMX8 test

This patch is for Marek, to provide a starting point.

To try it, use 'binman test -T' and see the missing coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Allow image_pos to be None when writing symbols
Simon Glass [Mon, 26 Aug 2024 19:11:42 +0000 (13:11 -0600)]
binman: Allow image_pos to be None when writing symbols

Some images do not have an image_pos value, for example an image which
is part of a compressed section and therefore cannot be accessed
directly.

Handle this case, returning None as the value.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Unwind the end-at-4gb special-case a little
Simon Glass [Mon, 26 Aug 2024 19:11:41 +0000 (13:11 -0600)]
binman: Unwind the end-at-4gb special-case a little

Move the check for this further out, so that base_addr is computed in
Entry.WriteSymbols() rather than at lower levels.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Provide a way to set the symbol base address
Simon Glass [Mon, 26 Aug 2024 19:11:40 +0000 (13:11 -0600)]
binman: Provide a way to set the symbol base address

The base address of the ELF containing symbols is normally added to
any symbols written, so that the value points to the correct address in
memory when everything is loaded. When the binary resides on disk, a
different offset may be needed, typically 0. Provide a way to specify
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Add minor improvements to symbol-writing
Simon Glass [Mon, 26 Aug 2024 19:11:39 +0000 (13:11 -0600)]
binman: Add minor improvements to symbol-writing

Add a clarification to the documentation and add a missing comment. Also
update the test so that when it fails it is easier to see what is going
on, rather than having to decode hex strings.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Adjust naming for reading symbols
Simon Glass [Mon, 26 Aug 2024 19:11:38 +0000 (13:11 -0600)]
binman: Adjust naming for reading symbols

These functions get the value of a symbol. The reference to ELF files
is confusing since they are reading the position/size of entries, not
ELF symbols. Rename the functions and adjust the comments also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: fit: Refine handling of devicetrees for OF_UPSTREAM
Simon Glass [Mon, 26 Aug 2024 19:11:37 +0000 (13:11 -0600)]
binman: fit: Refine handling of devicetrees for OF_UPSTREAM

With OF_UPSTREAM the dts files are in an SoC-specific subdirectory,
meaning that the resulting dtb files all end up in a similar
subdirectory.

We don't want the subdirectory name to appear as a node name in the FIT,
so handle this as a special case.

Also the default devicetree may have a directory-name prefix, so handle
that when searching through the available devicetree files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: fit: Set the image_pos attributes only once
Simon Glass [Mon, 26 Aug 2024 19:11:36 +0000 (13:11 -0600)]
binman: fit: Set the image_pos attributes only once

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>
2 months agobinman: fit: Avoid assuming that a FIT member is a section
Simon Glass [Mon, 26 Aug 2024 19:11:35 +0000 (13:11 -0600)]
binman: fit: Avoid assuming that a FIT member is a section

Use the more generic variable name 'entry' to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Update fdt-list-dir to use the provided directory
Simon Glass [Mon, 26 Aug 2024 19:11:34 +0000 (13:11 -0600)]
binman: Update fdt-list-dir to use the provided directory

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>
2 months agobinman: Avoid setting the image_pos attribute directly
Simon Glass [Mon, 26 Aug 2024 19:11:33 +0000 (13:11 -0600)]
binman: Avoid setting the image_pos attribute directly

Two places set this attribute directly. Update them to use the function
provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Tidy up comments and pylint warnings in fit
Simon Glass [Mon, 26 Aug 2024 19:11:32 +0000 (13:11 -0600)]
binman: Tidy up comments and pylint warnings in fit

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>
2 months agobinman: Tidy up comments for Entry.GetEntryArgsOrProps()
Simon Glass [Mon, 26 Aug 2024 19:11:31 +0000 (13:11 -0600)]
binman: Tidy up comments for Entry.GetEntryArgsOrProps()

Improve the comments for this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Correct the comment for fdtgrep
Simon Glass [Mon, 26 Aug 2024 19:11:30 +0000 (13:11 -0600)]
binman: Correct the comment for fdtgrep

This returns stdout, not a CommandResult so update the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobinman: Fix up test coverage for mkeficapsule
Simon Glass [Mon, 26 Aug 2024 19:11:29 +0000 (13:11 -0600)]
binman: Fix up test coverage for mkeficapsule

Add tests for missing tools to complete the test coverage for this
etype.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobuildman: Allow skipping the dtc build
Simon Glass [Thu, 15 Aug 2024 19:57:45 +0000 (13:57 -0600)]
buildman: Allow skipping the dtc build

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>
2 months agobuildman: Retry the build for current source
Simon Glass [Sun, 23 Jun 2024 17:55:14 +0000 (11:55 -0600)]
buildman: Retry the build for current source

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>
2 months agoarm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM
Marek Vasut [Tue, 24 Sep 2024 22:08:23 +0000 (00:08 +0200)]
arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM

U-Boot is currently unable to automatically enable regulators which
contain DT property regulator-always-on or regulator-boot-on. There
is an ongoing work to add this functionality to regulator core code,
but until the proper solution lands, add this awful workaround code
to force these regulators on. This is specifically needed to assure
the VIO regulator used to supply ethernet magnetics is enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
2 months agoARM: stm32: Fix secure_waitbits() mask check
Marek Vasut [Mon, 8 Jul 2024 11:43:23 +0000 (13:43 +0200)]
ARM: stm32: Fix secure_waitbits() mask check

Do not apply bitwise AND to register value and expected value, only
apply bitwise AND to register value and mask, and only then compare
the result with expected value that the function polls for.

Fixes: b49105320a5b ("stm32mp: psci: Implement PSCI system suspend and DRAM SSR")
Signed-off-by: Marek Vasut <marex@denx.de>
2 months agoARM: stm32: Fix TAMP_SMCR BKP..PROT fields on STM32MP15xx
Marek Vasut [Tue, 18 Jun 2024 22:57:25 +0000 (00:57 +0200)]
ARM: stm32: Fix TAMP_SMCR BKP..PROT fields on STM32MP15xx

Update the TAMP_SMCR BKP..PROT fields to put first 10 registers
into protection zone 1 and next 5 into zone 2. This fixes use of
boot counter which is often in zone 3 and has to be updated from
Linux, which runs in NS.

Fixes: 73f7fc944cf6 ("ARM: stm32: Initialize TAMP_SMCR BKP..PROT fields on STM32MP15xx")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 months agopower: regulator: Consistently return -ENOSYS when ops is unimplemented
Jonas Karlman [Wed, 24 Jul 2024 22:47:11 +0000 (22:47 +0000)]
power: regulator: Consistently return -ENOSYS when ops is unimplemented

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>
2 months agopower: regulator: Do not call set_suspend_value with -ENODATA
Jonas Karlman [Wed, 24 Jul 2024 22:47:10 +0000 (22:47 +0000)]
power: regulator: Do not call set_suspend_value with -ENODATA

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>
2 months agoMerge tag 'u-boot-imx-next-20240925' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 25 Sep 2024 14:21:40 +0000 (08:21 -0600)]
Merge tag 'u-boot-imx-next-20240925' of 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.
-----------------------

2 months agonet: fec_mxc: Skip recv packet process when fec is halted
Ye Li [Tue, 24 Sep 2024 07:32:00 +0000 (15:32 +0800)]
net: fec_mxc: Skip recv packet process when fec is halted

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>
2 months agonet: fec_mxc: Fix clk_ref rate on iMX93
Peng Fan [Tue, 24 Sep 2024 07:31:59 +0000 (15:31 +0800)]
net: fec_mxc: Fix clk_ref rate on iMX93

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>
2 months agoarm64: dts: imx8m: Always name the generated fitImage u-boot.itb
Marek Vasut [Tue, 24 Sep 2024 13:02:09 +0000 (15:02 +0200)]
arm64: dts: imx8m: Always name the generated fitImage u-boot.itb

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>
2 months agoMerge patch series "Miscellaneous fixes"
Tom Rini [Tue, 24 Sep 2024 16:11:59 +0000 (10:11 -0600)]
Merge patch series "Miscellaneous fixes"

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

2 months agocmd: pxe: CMD_PXE implies CMD_TFTPBOOT
Jerome Forissier [Wed, 11 Sep 2024 09:58:28 +0000 (11:58 +0200)]
cmd: pxe: CMD_PXE implies CMD_TFTPBOOT

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>
2 months agocommon: update: UPDATE_COMMON implies CMD_TFTPBOOT
Jerome Forissier [Wed, 11 Sep 2024 09:58:27 +0000 (11:58 +0200)]
common: update: UPDATE_COMMON implies CMD_TFTPBOOT

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>
2 months agotest/py: test_efi_loader: add HTTP (wget) test for the EFI loader
Jerome Forissier [Wed, 11 Sep 2024 09:58:26 +0000 (11:58 +0200)]
test/py: test_efi_loader: add HTTP (wget) test for the EFI loader

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>
2 months agotest/py: test_efi_loader: add missing dependency on cmd_tftpboot
Jerome Forissier [Wed, 11 Sep 2024 09:58:25 +0000 (11:58 +0200)]
test/py: test_efi_loader: add missing dependency on cmd_tftpboot

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>
2 months agotest/py: net_boot: fix comment
Jerome Forissier [Wed, 11 Sep 2024 09:58:24 +0000 (11:58 +0200)]
test/py: net_boot: fix comment

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>
2 months agonet: fec_mxc_init(): do not ignore return status of fec_open()
Jerome Forissier [Wed, 11 Sep 2024 09:58:23 +0000 (11:58 +0200)]
net: fec_mxc_init(): do not ignore return status of fec_open()

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>
2 months agonet: wget: allow EFI boot
Jerome Forissier [Wed, 11 Sep 2024 09:58:22 +0000 (11:58 +0200)]
net: wget: allow EFI boot

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>
2 months agonet: ftgmac100: depend on NET
Jerome Forissier [Wed, 11 Sep 2024 09:58:21 +0000 (11:58 +0200)]
net: ftgmac100: depend on NET

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>
2 months agonet: phy: ncsi: depend on NET
Jerome Forissier [Wed, 11 Sep 2024 09:58:20 +0000 (11:58 +0200)]
net: phy: ncsi: depend on NET

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>
2 months agonet: wget: removed unused function wget_success()
Jerome Forissier [Wed, 11 Sep 2024 09:58:19 +0000 (11:58 +0200)]
net: wget: removed unused function wget_success()

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>
2 months agonet: fm: call dtsec_init_phy() only when it is defined
Jerome Forissier [Wed, 11 Sep 2024 09:58:18 +0000 (11:58 +0200)]
net: fm: call dtsec_init_phy() only when it is defined

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>
2 months agoarm: omap2: add missing #include <netdev.h>
Jerome Forissier [Wed, 11 Sep 2024 09:58:17 +0000 (11:58 +0200)]
arm: omap2: add missing #include <netdev.h>

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>
2 months agoat91: rename mem_init() to at91_mem_init()
Jerome Forissier [Wed, 11 Sep 2024 09:58:16 +0000 (11:58 +0200)]
at91: rename mem_init() to at91_mem_init()

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>
2 months agoflash: prefix error codes with FL_
Jerome Forissier [Wed, 11 Sep 2024 09:58:15 +0000 (11:58 +0200)]
flash: prefix error codes with FL_

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>
2 months agobuildman/toolchain.py: do not set CROSS_COMPILE for sandbox
Jerome Forissier [Wed, 11 Sep 2024 09:58:14 +0000 (11:58 +0200)]
buildman/toolchain.py: do not set CROSS_COMPILE for sandbox

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>
2 months agotest/py/tests/test_bootstage.py: Combine stash/unstash tests
Tom Rini [Wed, 28 Aug 2024 22:56:10 +0000 (16:56 -0600)]
test/py/tests/test_bootstage.py: Combine stash/unstash tests

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>
2 months agospl: ram: hide SPL_RAM_SUPPORT
Jerome Forissier [Tue, 10 Sep 2024 13:00:18 +0000 (15:00 +0200)]
spl: ram: hide SPL_RAM_SUPPORT

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>
2 months agoram: k3-ddrss: Handle error properly in lpddr4_start
Udit Kumar [Thu, 29 Aug 2024 08:34:53 +0000 (14:04 +0530)]
ram: k3-ddrss: Handle error properly in lpddr4_start

In lpddr4_start function error returned by lpddr4_enablepiinitiator
may go undetected due to overwrite of return code.
Add support to handle error in above case.

Reported-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
2 months agoMerge tag 'xilinx-for-v2025.01-rc1' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 23 Sep 2024 14:11:01 +0000 (08:11 -0600)]
Merge tag 'xilinx-for-v2025.01-rc1' of 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

3 months agommc: Poll CD in case cyclic framework is enabled
Marek Vasut [Fri, 6 Sep 2024 17:10:42 +0000 (19:10 +0200)]
mmc: Poll CD in case cyclic framework is enabled

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>
3 months agoMerge tag 'doc-2024-10-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 21 Sep 2024 15:37:16 +0000 (09:37 -0600)]
Merge tag 'doc-2024-10-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2024-10-rc6

Documentation:

* Correct function descriptions that are not Sphinx conformant.
* Correct incorrect dependency CONFIG_USB_USB_GADGET in the ums command
  description.

3 months agodoc: usage: cmd: ums: fix dependencies
Thomas Perrot [Fri, 20 Sep 2024 14:56:41 +0000 (16:56 +0200)]
doc: usage: cmd: ums: fix dependencies

Replace CONFIG_USB_USB_GADGET by CONFIG_USB_GADGET_DOWNLOAD.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 months agoevents: correct event_uninit() description
Heinrich Schuchardt [Wed, 18 Sep 2024 22:01:13 +0000 (00:01 +0200)]
events: correct event_uninit() description

The function name in the description must match the function.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoboot: correct struct expo_action description
Heinrich Schuchardt [Wed, 18 Sep 2024 21:58:03 +0000 (23:58 +0200)]
boot: correct struct expo_action description

Correct the description of the select.id member to fix a kernel-doc
warning.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: fix OS function descriptions
Heinrich Schuchardt [Wed, 18 Sep 2024 21:54:08 +0000 (23:54 +0200)]
sandbox: fix OS function descriptions

* Add missing function names.
* Align names used in descriptions with function names.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoefi_loader: correct efi_set_variable_int() description
Heinrich Schuchardt [Wed, 18 Sep 2024 21:51:34 +0000 (23:51 +0200)]
efi_loader: correct efi_set_variable_int() description

The name used in the function description must match the function.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agodoc: include/getopt.h: remove comments confusing Sphinx
Heinrich Schuchardt [Wed, 18 Sep 2024 21:49:40 +0000 (23:49 +0200)]
doc: include/getopt.h: remove comments confusing Sphinx

The Sphinx documentation build process cannot handle the interspersed
'private:' and 'public:' comments. Remove them.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 months agocmd/efidebug: fix some function descriptions
Heinrich Schuchardt [Wed, 18 Sep 2024 21:43:42 +0000 (23:43 +0200)]
cmd/efidebug: fix some function descriptions

The function name must match the name used in the description.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agoefi_loader: fix some function descriptions
Heinrich Schuchardt [Wed, 18 Sep 2024 21:37:28 +0000 (23:37 +0200)]
efi_loader: fix some function descriptions

* The function name must be provided in the description.
* The function name must match the name used in the description.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agodts: beagleboneai64: Add boothph in chipid node
Udit Kumar [Tue, 17 Sep 2024 08:13:29 +0000 (13:43 +0530)]
dts: beagleboneai64: Add boothph in chipid node

beagleboneai64 boot was broken after OF_UPSTREAM support for
J721E SOC.
So add bootph in chipid node similar to other boards of
this SOC.

Fixes: 46bb1405b461 ("arm: dts: k3-j721e: Move to OF_UPSTREAM")
Reported-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
3 months agoMerge patch series "lmb: rework logic to validate load address for network commands"
Tom Rini [Fri, 20 Sep 2024 23:37:34 +0000 (17:37 -0600)]
Merge patch series "lmb: rework logic to validate load address for network 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.

3 months agocmd: sf: prevent overwriting the reserved memory
Prasad Kummari [Fri, 13 Sep 2024 07:32:52 +0000 (13:02 +0530)]
cmd: sf: prevent overwriting the reserved memory

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>
3 months agowget: rework the logic to validate the load address
Sughosh Ganu [Mon, 16 Sep 2024 15:20:25 +0000 (20:50 +0530)]
wget: rework the logic to validate the load address

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>
3 months agotftp: rework the logic to validate the load address
Sughosh Ganu [Mon, 16 Sep 2024 15:20:24 +0000 (20:50 +0530)]
tftp: rework the logic to validate the load address

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>
3 months agoMerge patch series "mux: mmio: support "reg-mux" compatible"
Tom Rini [Fri, 20 Sep 2024 15:10:30 +0000 (09:10 -0600)]
Merge patch series "mux: mmio: support "reg-mux" compatible"

Roger Quadros <rogerq@kernel.org> says:

TI upstream has moved from "mmio-mux" to "reg-mux" that doesn't
require the Mux device node's parent to be a syscon type.

Add support for "reg-mux" compatible.

3 months agophy: cadence: sierra: Don't spam console
Roger Quadros [Wed, 18 Sep 2024 13:49:22 +0000 (16:49 +0300)]
phy: cadence: sierra: Don't spam console

use dev_dbg() instead of dev_info() for debug related
prints.

Get's rid of below print from console.

"cdns,sierra serdes@5030000: sierra probed"

Signed-off-by: Roger Quadros <rogerq@kernel.org>
3 months agomux: mmio: Support "reg-mux" compatible
Roger Quadros [Wed, 18 Sep 2024 13:49:21 +0000 (16:49 +0300)]
mux: mmio: Support "reg-mux" compatible

With "reg-mux" compatible the driver no longer expects the parent
device to be a syscon type. It uses it's own regmux.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
3 months agoxilinx: zynqmp: Add bootmenu support
John Vicky Vykuntapu [Wed, 11 Sep 2024 08:04:13 +0000 (10:04 +0200)]
xilinx: zynqmp: Add bootmenu support

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
3 months agoarm64: zynqmp: Rename ina226-vccint-io-bram-ps nodes
Michal Simek [Fri, 13 Sep 2024 09:28:51 +0000 (11:28 +0200)]
arm64: zynqmp: Rename ina226-vccint-io-bram-ps nodes

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
3 months agoarm64: zynqmp: Use generic spi@ name in zcu111-revA
Michal Simek [Fri, 13 Sep 2024 09:28:50 +0000 (11:28 +0200)]
arm64: zynqmp: Use generic spi@ name in zcu111-revA

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
3 months agoarm64: zynqmp: Define phy-mode in zcu1275-revB
Michal Simek [Fri, 13 Sep 2024 09:28:49 +0000 (11:28 +0200)]
arm64: zynqmp: Define phy-mode in zcu1275-revB

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
3 months agoarm64: zynqmp: Align mini-qspi DT with dt-schema
Michal Simek [Fri, 13 Sep 2024 09:28:48 +0000 (11:28 +0200)]
arm64: zynqmp: Align mini-qspi DT with dt-schema

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
3 months agoarm64: zynqmp: fix i2c mux bus description for m-a2197 platforms
Michal Simek [Fri, 13 Sep 2024 09:28:47 +0000 (11:28 +0200)]
arm64: zynqmp: fix i2c mux bus description for m-a2197 platforms

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
3 months agoarm64: zynqmp: Fix comment style around gpio line-names
Michal Simek [Fri, 13 Sep 2024 09:28:46 +0000 (11:28 +0200)]
arm64: zynqmp: Fix comment style around gpio line-names

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
3 months agoarm64: zynqmp: Fix gpio-line-name size for m-a2197 platforms
Michal Simek [Fri, 13 Sep 2024 09:28:45 +0000 (11:28 +0200)]
arm64: zynqmp: Fix gpio-line-name size for m-a2197 platforms

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
3 months agoxilinx: Fix axi and mmc node names in mini configuration
Michal Simek [Fri, 13 Sep 2024 09:28:44 +0000 (11:28 +0200)]
xilinx: Fix axi and mmc node names in mini configuration

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
3 months agoarm64: zynqmp: Align gpio hogs with dt-schema
Michal Simek [Fri, 13 Sep 2024 09:28:43 +0000 (11:28 +0200)]
arm64: zynqmp: Align gpio hogs with dt-schema

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
3 months agoarm64: zynqmp: Fix status property for m-a2197 boards
Michal Simek [Fri, 13 Sep 2024 09:28:42 +0000 (11:28 +0200)]
arm64: zynqmp: Fix status property for m-a2197 boards

Status property should be missing or okay or disabled but not just disable.
dt-validate is reporting it too.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/bbf62f5911fcb356d1467b3979b4ff3c485124ad.1726219714.git.michal.simek@amd.com
3 months agoarm64: zynqmp: Define only one revision in zcu106-rev1.0
Michal Simek [Fri, 13 Sep 2024 09:58:39 +0000 (11:58 +0200)]
arm64: zynqmp: Define only one revision in zcu106-rev1.0

zcu106 rev1.0 is sw compatible with revA but only one revision should be
listed in compatible string that's why remove revA and keep only rev1.0.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c5214b1a01032b88a394104a57624e0d91a22f29.1726221517.git.michal.simek@amd.com
3 months agonet: gem: Remove undocumented is-internal-pcspma dt flag
Michal Simek [Fri, 13 Sep 2024 07:37:38 +0000 (09:37 +0200)]
net: gem: Remove undocumented is-internal-pcspma dt flag

Generic understanding/consideration is that phy-mode as sgmi means that the
internal PCS(Physical Coding Sublayer) should be enabled by default.
Xilinx GEM implementation allows configuration GEM (gmii mode) + PL PCS PMA
(sgmii mode, Physical Medum Attachment) but in this case phy-mode should be
setup as gmii.
The reason for this assumption is that phy-mode should be described based
on GEM configuration not based on mode coming out of PHY.

Also Linux kernel automatically setting up PCSSEL bit when phy mode is
sgmii without a need to specified additional DT propety.
All our DTSes with sgmii phy mode have this flag enabled that's why there
is no need/reason to just duplicate information.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/2ecdbcc4ce692e2f8b3e7054a2abab35f6c03a69.1726213052.git.michal.simek@amd.com
3 months agoboard: xilinx: Remove conditional check for Microblaze
Padmarao Begari [Fri, 13 Sep 2024 09:32:31 +0000 (15:02 +0530)]
board: xilinx: Remove conditional check for Microblaze

U-Boot is not picking boot.scr script address from device tree
rather it's using default address for Microblaze platform,
and it's picking for other platforms. Remove conditional check
for Microblaze platform, so that u-boot pick up boot.scr script
address for all platforms from device tree.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20240913093231.2343528-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 months agommc: zynq_sdhci: Remove device_is_compatible() function
Padmarao Begari [Fri, 13 Sep 2024 09:31:57 +0000 (15:01 +0530)]
mmc: zynq_sdhci: Remove device_is_compatible() function

There are lot of device_is_compatible() present in the driver.
Remove them and replace with a variables "SDHCI_COMPATIBLE_SDHCI_89A"
and "SDHCI_COMPATIBLE_VERSAL_NET_EMMC" with match data.
This change saves the space and reduce the execution time.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20240913093157.2343476-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 months agoarm64: zynqmp: Remove overlays and add new dtb entries for ZynqMP
Prasad Kummari [Fri, 6 Sep 2024 07:08:08 +0000 (12:38 +0530)]
arm64: zynqmp: Remove overlays and add new dtb entries for ZynqMP

Remove device tree overlay (DTBO) entries for the ZynqMP target
from the Makefile. Add new device tree binaries (DTBs) for the
zynqmp-sm-k24-revA and zynqmp-smk-k24-revA configurations.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240906070808.1045991-3-prasad.kummari@amd.com
3 months agokbuild: cherry-pick kbuild fdtoverlay changes from linux
Prasad Kummari [Fri, 6 Sep 2024 07:08:07 +0000 (12:38 +0530)]
kbuild: cherry-pick kbuild fdtoverlay changes from linux

Linux commits:
15d16d6dadf6 kbuild: Add generic rule to apply fdtoverlay
44f87191d105 kbuild: parameterize the .o part of suffix-search

The Linux commit 15d16d6dadf6 adds a generic rule in Makefile.lib
to automatically apply fdtoverlay, so that each platform doesn't
need to include a complex rule. This also automatically appends
DTC_FLAGS_foo_base += -@ to all base files

The platform's Makefile only needs to have this now:

foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo
dtb-y := foo.dtb

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240906070808.1045991-2-prasad.kummari@amd.com
3 months agoarm64: zynqmp: Add missing vc7_xin fixed clock to sc-vpk180-revA
Michal Simek [Mon, 9 Sep 2024 11:24:09 +0000 (13:24 +0200)]
arm64: zynqmp: Add missing vc7_xin fixed clock to sc-vpk180-revA

Add missing vc7_xin fixed clock as clock input for some clock generators.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/4904f5e0aab8a0b0c2fcc1912be493d4185e6173.1725881047.git.michal.simek@amd.com
3 months agoarm: zynqmp: Enable non-invasive CCI-400 PMU debug
Sean Anderson [Thu, 5 Sep 2024 17:18:33 +0000 (13:18 -0400)]
arm: zynqmp: Enable non-invasive CCI-400 PMU debug

Set NIDEN, enabling non-invasive debug for the CCI-400 PMU. Otherwise,
the PMU is effectively disabled.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240905171833.325548-3-sean.anderson@linux.dev
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 months agozynqmp: Disable secure access for boot devices
Sean Anderson [Thu, 5 Sep 2024 17:18:32 +0000 (13:18 -0400)]
zynqmp: Disable secure access for boot devices

Boot devices (QSPI, MMC, NAND, and Ethernet) use secure access for DMA
by default. As this causes problems when using the SMMU [1], configure
them for normal access instead.

[1] https://support.xilinx.com/s/article/72164

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240905171833.325548-2-sean.anderson@linux.dev
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 months agoxilinx: Enable SIMPLE_PM_BUS
Michal Simek [Tue, 3 Sep 2024 07:48:15 +0000 (09:48 +0200)]
xilinx: Enable SIMPLE_PM_BUS

Enable simple-pm-bus driver to handle case where axi bus coming between PS
(fixed) part to PL (programmable) part has own clock or power domain.
That's why enable driver to be ready for this configuration.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/b9f4bb85be502616edf3be2b79e52a0e2c03e821.1725349691.git.michal.simek@amd.com
3 months agoarm64: zynqmp: Add u-boot command to boot into recovery image
Prasad Kummari [Tue, 27 Aug 2024 11:55:30 +0000 (17:25 +0530)]
arm64: zynqmp: Add u-boot command to boot into recovery image

To boot into the firmware recovery tool, the user currently
needs to press a button on the board while powering the
system up. To simplify this process, a U-Boot command
was added to allow booting directly into the recovery tool.

For example:
ZynqMP> zynqmp reboot <multiboot offset in hex>

Co-develop-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Co-develop-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240827115529.2931334-1-prasad.kummari@amd.com
3 months agoxilinx: versal-net: fix no previous prototype for function warning.
Prasad Kummari [Thu, 5 Sep 2024 11:57:59 +0000 (17:27 +0530)]
xilinx: versal-net: fix no previous prototype for function warning.

Included the SPI header to resolve the no previous prototypes
for function. Removed unused mode variable.
sparse warnings
warning: no previous prototype for 'spi_get_env_dev'
[-Wmissing-prototypes]
warning: variable 'mode' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Link: https://lore.kernel.org/r/20240905115758.999936-1-prasad.kummari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 months agomtd: spi-nor: scale up timeout for full-chip erase
Venkatesh Yadav Abbarapu [Tue, 2 Jan 2024 12:53:03 +0000 (18:23 +0530)]
mtd: spi-nor: scale up timeout for full-chip erase

This patch fixes timeout issues seen on large NOR flash.
For full-chip erase, where we use the SPINOR_OP_CHIP_ERASE (0xc7)
opcode. Use a different timeout for full-chip erase than for other
commands.

 [Ported from Linux kernel commit
                09b6a377687b ("mtd: spi-nor: scale up timeout for
                               full-chip erase") ]

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
3 months agoMerge tag 'u-boot-imx-next-20240919' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 19 Sep 2024 17:26:18 +0000 (11:26 -0600)]
Merge tag 'u-boot-imx-next-20240919' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22363

- Several updates to i.MX9 SOC and i.MX93 EVK.
- Power domain fixes.
- TRDC cleanup and update.
- MAC address layout update.
- Add support for the i.MX9301/9302 variants.
- Add runtime detection of voltage mode.
- Generalize some code for i.MX8M and i.MX9.
- Add support for Comvetia imx6q-lxr board.

3 months agoMerge tag 'fwu-next-19092024' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 19 Sep 2024 17:25:26 +0000 (11:25 -0600)]
Merge tag 'fwu-next-19092024' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next

This PR contains various improvements in the A/B update logic for EFI

- Read both copies of metadata, in case one of the is corrupted
- Check the metadata version against the running firmware to make sure it's
  allowed
- Limit the use of a revert capsule if the board is on a trial state and
  make sure it's not applied if the max counter has expired

3 months agofwu: print a message if empty capsule checks fail
Sughosh Ganu [Mon, 9 Sep 2024 11:20:21 +0000 (16:50 +0530)]
fwu: print a message if empty capsule checks fail

When dealing with processing of the empty capsule, the capsule gets
applied only when the checks for the empty capsule pass. Print a
message to highlight if empty capsule checks fail, and return an error
value, similar to the normal capsules.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>