Commit graph

95892 commits

Author SHA1 Message Date
Rasmus Villemoes
4da44fa646 i2c: rzg2l: include u-boot/schedule.h
This TU currently relies on getting a declaration of schedule()
through some nested include. Include the proper header directly.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
ed8a807df8 lib/sha*: include u-boot/schedule.h instead of cyclic.h
These library routines obviously do not make use of the
cyclic_register() etc. API, but do need to call schedule(). Include
the proper header.

Eventually, their ifdef logic should be updated to avoid talking about
CONFIG_WATCHDOG.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
bd66575489 watchdog.h: change include of cyclic.h to u-boot/schedule.h
Nobody relies on getting the cyclic API declared by including the
watchdog.h header, but for historical reasons, many TUs include
watchdog.h to get a declaration of schedule(). Now that we have a
dedicated header for just that, include that header instead of
cyclic.h.

Eventually, all TUs that call schedule() should themselves include
u-boot/schedule.h, but this is a step towards getting rid of
unnecessary include statements in cyclic.h and global_data.h.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
307449de90 cyclic: make cyclic_run static
The only caller left is schedule(); everybody outside cyclic.c now
calls or references schedule().

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
e3bc477e80 test: dm: wdt: replace cyclic_run() by schedule()
This is the last place outside of cyclic.c that references
cyclic_run() directly. Replace by schedule(), so that cyclic_run() can
be made private. This also better matches what I believe commit
29caf9305b ("cyclic: Use schedule() instead of WATCHDOG_RESET()")
intended to do.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
92957de362 fs/cramfs: use schedule instead of cyclic_run as callback
Prior to commit 29caf9305b ("cyclic: Use schedule() instead of
WATCHDOG_RESET()") we had

/* Currently only needed for fs/cramfs/uncompress.c */
static inline void watchdog_reset_func(void)
{
       WATCHDOG_RESET();
}

and .outcb was set to that watchdog_reset_func().  Said commit changed
that .outcb to cyclic_run instead of schedule, which would otherwise
match all the other WATCHDOG_RESET replacements done. As the
HW_WATCHDOG case is not handled by cyclic_run, this seems to be an
oversight.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
b279aa505d m68k: asm/ptrace.h: include linux/types.h
Modifying a generic header like watchdog.h, removing not directly used
asm/ptrace.h header relies on whoever includes it to already have
included something that defines the type ulong.

Make the asm/ptrace.h header self-contained by including the proper
header.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
9e62892228 led: include cyclic.h in led_sw_blink.c
This makes use of the cyclic API but relies on implicitly getting the
appropriate declarations through some nested include. Include the
cyclic.h header directly.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
4457e5c61d cyclic: introduce u-boot/schedule.h
I noticed an "unnecessary" include of <cyclic.h> in
global_data.h, in the sense that nothing in cyclic.h is needed in
order to define 'struct global_data'.

Well, it's not unnecessary, as it implicitly ensures that everybody
gets a declaration of schedule(), and schedule() is (obviously) called
all over the tree. Almost none of those places directly include
<cyclic.h>, but for historical reasons, many do include
<watchdog.h> (most schedule() instances are replacements of
WATCHDOG_RESET()).

However, very few TUs actually need the declarations of the
cyclic_register() and struct cyclic_info, and they also don't really
need anything from the watchdog.h header.

So introduce a new header which just contains a declaration of
schedule(), which can then be included from all the places that do
call schedule(). I removed the direct reference to cyclic_run(),
because we shouldn't have two public functions for doing roughly the
same without being very explicit about when one should call one or the
other.

Testing of later patches that explicitly include <schedule.h> when
schedule() is used revealed a problem with host tool build on win32,
which apparently picked up a host <schedule.h>. To avoid that problem,
put the new header in include/u-boot/ and hence make the include
statements say <u-boot/schedule.h>.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
6250945367 doc: cyclic: remove reference to WATCHDOG_RESET
WATCHDOG_RESET is no more. Replace the reference by schedule().

While here, rearrange the sentence a bit so that "cyclic_run()"
becomes the object and "the main function responsible for calling all
registered cyclic functions" a parenthetical rather than the other way
around, which at least to me makes it more readable.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Bastien Curutchet
f9318b067f drivers: watchdog: Add DaVinci's watchdog support
Add support for the DaVinci's watchdog timer

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Rasmus Villemoes
7f3d53c8bf watchdog: gpio_wdt: add support for stoppable devices
Back when I added this driver in commit 2ac8490412, I wrote

    The corresponding linux driver apparently has support for some
    watchdog circuits which can be disabled by tri-stating the gpio, but I
    have never actually encountered such a chip in the wild;

That has changed now; I have a board with just such a watchdog on my
desk currently. Add support for that.

- For a hw_algo="toggle" device, the gpio is requested as output if the
  always-running flag is set, otherwise as input.

- The ->start() method is updated to change the direction to output when
  required (i.e. it is not always-running).

- The ->stop() method is implemented, but of course reports failure if
  always-running.

As I still haven't met any hw_algo="level" devices, I'm not entirely
sure how they fit in, but I'm borrowing logic from the corresponding
linux driver:

- In ->probe(), such devices always request the gpio as GPIOD_IS_OUT.

- In ->stop(), the linux driver has an "eternal ping" comment and sets
  the gpio to (logic) high.

Stefan:
Added necessary changes in test/dm/wdt.c to fix CI build breakage, as
suggested by Rasmus.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-23 06:52:38 +02:00
Tom Rini
392ff1449f - VNBYTES() comment fix
- add VIDEO dependency for FDT_SIMPLEFB
  - fdt_simplefb: drop not needed CONFIG_VIDEO check
  - am62x,evm: preserve splash screen while OS is booting
  - simplefb: warning fix for CONFIG_FDT_64BIT=n
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCZxgEmQ4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXNzwAJ4u2/QQ4yWrhSInFhNABwcAXZFOOQCfdoyKFHrp
 EIGzVUGFQssY1z3iLu0=
 =uNBi
 -----END PGP SIGNATURE-----

Merge tag 'video-20241022' of https://source.denx.de/u-boot/custodians/u-boot-video

CI: https://source.denx.de/u-boot/custodians/u-boot-video/-/pipelines/22907

* VNBYTES() comment fix
* add VIDEO dependency for FDT_SIMPLEFB
* fdt_simplefb: drop not needed CONFIG_VIDEO check
* am62x,evm: preserve splash screen while OS is booting
* simplefb: warning fix for CONFIG_FDT_64BIT=n
2024-10-22 14:11:20 -06:00
Eva Kurchatova
722073a065 video: simplefb: Fix build warn with CONFIG_FDT_64BIT=n
Fix compile warning with !CONFIG_FDT_64BIT by
casting the variable in the debug print.

Signed-off-by: Eva Kurchatova <lekkit@at.encryp.ch>
Reported-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-22 20:56:28 +02:00
Devarsh Thakkar
7aa6906dda board: ti: am62x: evm: Update simple-framebuffer node in device-tree
Update simple-framebuffer device-tree node by enumerating framebuffer
related information in existing simple-framebuffer node in Linux
device-tree file and enabling it.

In case there is no simple-framebuffer stub detected in Linux kernel
device-tree and video is still active, then update the device-tree to
reserve the framebuffer region for the active splash screen.

This helps preserve the splash screen till the display server takes over
after OS is booted.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-10-22 19:55:28 +02:00
Devarsh Thakkar
944e515e75 boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig
CONFIG_VIDEO conditional compilation checks are no longer needed since
FDT_SIMPLEFB Kconfig now depends on VIDEO Kconfig.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-22 19:54:08 +02:00
Devarsh Thakkar
c525423e5c boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB
The fdt_simplefb.c APIs rely on video-uclass APIs and structures to
fill/update framebuffer information, so compile it only when VIDEO
Kconfig is enabled, as otherwise below warning can be seen if VIDEO
Kconfig is disabled:

"boot/fdt_simplefb.c:96:12: warning: fdt_simplefb_enable_existing_node
defined but not used [-Wunused-function]
96 | static int fdt_simplefb_enable_existing_node(void *blob)"

Reported-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-22 19:52:59 +02:00
Miquel Raynal
b34849c5ac video: Fix VNBYTES() macro comment
The VNBYTES() macro has been updated to silence possible warnings
regarding authorized (but unusual) uses of this macro, but the comment
was kept unchanged. A year has passed so let's fix the comment now to
avoid confusions.

Fixes: cc05d352fb ("video: Add parentheses around VNBYTES() macro")
Suggested-by: Tom Rini <trini@konsulko.com>
Link: https://lore.kernel.org/u-boot/20240906183432.GG3879073@bill-the-cat/
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-22 19:51:23 +02:00
Rasmus Villemoes
6606a6adfa envtools: make them build again
In v2024.10, "make envtools" is broken for at least these defconfigs:

   am335x_evm_defconfig
   rpi_3_defconfig
   rpi_4_defconfig
   mx7dsabresd_defconfig
   wandboard_defconfig
   imx8mp_evk_defconfig

The only defconfig we use for which it is not broken is
stm32mp13_defconfig. They all work just fine in v2024.07.

The symptoms are slightly different, but all related to the fact that
some transitively included header uses IS_ENABLED or CONFIG_IS_ENABLED
without linux/kconfig.h having already been included.

A simple git bisect doesn't produce anything sensible, it ends up at
3a9f642ca9 (crypto: nuvoton: npcm_sha: Support SHA 384/512) which
clearly has nothing to do with this. But digging deeper, one
eventually finds 0f92fa4560 ("env: Remove <common.h> and add needed
includes").

So at first I tried adding "#include <linux/kconfig.h>" in
include/env_default.h and include/env_flags.h. That fixes it for some,
but not all, of the above. For example rpi_3_defconfig still fails,
then in log.h complaining about BIT() and u8 not being defined. At
least BIT() is should have gotten from bitops.h, except that that's
behind ifdef __KERNEL__, so not set for the envtools build.

It turns out that the envtools source code in fw_env_private.h already
has some hackery to deal with all this, in the form of the __ASSEMBLY__
games it plays before including config.h. It seems that if we just
make sure to do that include early enough, so that config.h is indeed
parsed with that __ASSEMBLY__ hackery in place, everything builds
fine.

Fixes: 0f92fa4560 ("env: Remove <common.h> and add needed includes")
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-10-21 20:51:23 -06:00
Tom Rini
a3709638ec Merge patch series "aspeed: ast2700: Add Caliptra ECDSA driver"
Chia-Wei Wang <chiawei_wang@aspeedtech.com> says:

Aspeed AST2700 SoCs integrates the Caliptra secure IP, where an ECDSA384
signature verification HW interface is exported for SoC crypto needs.

This patch series firstly extends the FIT image signing/verify common
code to support the ECDSA384 algorithm. For better convenience, the
device tree for ECDSA public key storage is also revised by referring
to RSA implementations.

After the FIT common code revision, the driver is implemented for
AST2700 to leverage the Caliptra ECDSA384 signature verification.

These are verified by signed FIT images with the algorithm "sha384,ecdsa384".

Link: https://lore.kernel.org/r/20241014095620.216936-1-chiawei_wang@aspeedtech.com
2024-10-21 17:53:11 -06:00
Chia-Wei Wang
936d4cb6eb drivers/crypto: aspeed: Add Caliptra ECDSA384 support
Aspeed AST27xx SoCs integrate the CPTRA 1.0 secure IP, which export
an ECDSA384_SIGNATURE_VERIFY mailbox command service for SoC to use.

This patch is verified by the FIT signature verification using the
"sha384,ecdsa384" algorithm.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-21 17:52:52 -06:00
Chia-Wei Wang
2e6cf57e8e image-fit-sig: Remove padding check
The padding algorithm is not mandatory for all signing algorithm.
For example, ECDSA does not require a padding method.

For RSA requiring PKCS padding, the belonging info->crypto(), assigned
with rsa_verify_key(), also has the check on the validity of info->padding().

Thus, remove the info->padding check from the upper, general layer.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-21 17:52:52 -06:00
Chia-Wei Wang
75068b1a2d lib: ecdsa: Add ECDSA384 support
Add ECDSA384 algorithm support for image signing and verification.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-21 17:52:52 -06:00
Tom Rini
63a3dbb7b9 Merge patch series "Add AVS support for J721S2"
Manorit Chawdhry <m-chawdhry@ti.com> says:

This series adds support for Adaptive voltage scaling on J721S2 device [0].

[0]: https://www.ti.com/lit/pdf/spruj28 (Section 5.2.4.1 AVS Support)

AVS Test for J721S2: https://gist.github.com/manorit2001/b2fd9f6764a863294d4aa0755c83c84f
Boot Test results: https://gist.github.com/manorit2001/d44e035552cb19aadeb0d928d5cb5f26

Link: https://lore.kernel.org/r/20241015-b4-upstream-j721s2-avs-v5-0-5c8087387dc5@ti.com
2024-10-21 17:52:40 -06:00
Manorit Chawdhry
1b379f4a41 configs: j721s2_evm_r5_defconfig: Add AVS Configs
Add AVS and PMIC regulator configs

Also, disable it explicitly in am68_sk_r5_defconfig as it includes
j721s2_evm_r5_defconfig for re-usability.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
6965d8f1a6 arm: dts: j721s2: Add VTM node in R5
Also adds bootph-pre-ram property to VTM node and the pmic node.

vdd-supply is used to assign the buck regulator that the AVS driver can
use to program the proper voltage which it picked up from e-fuse.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
3ef28a6a93 arm: mach-k3: j721s2_init: Initialize AVS Class 0
Adaptive Voltage Scaling (AVS) Class 0 is a procedure for lowering the
voltage on certain device power rails. Initialize AVS Class 0.

Link: https://www.ti.com/lit/pdf/spruj28 (Section 5.2.3.3.2.5 AVS-Class0)
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
96ef1f227d drivers: misc: k3_avs: Extract MPU clk and dev ID from DT
Different devices have different MPU clk and dev ID. Currently it had
been hardcoded. Move it to DT based extraction.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
8659144ae5 arm: dts: k3-*-r5: Add MPU clock in clocks property
MPU clock had been missing. Distinguish multiple clocks with clock-names
and add MPU clock as well.

Link: https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j721s2/clocks.html#clocks-for-a72ss0-core0-device
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
c530cd4fa1 drivers: misc: k3_avs: Check return code while programming AVS
Check if AVS could not be programmed and print a warning.

Fixes: 9d233b4e3e ("misc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0")
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Manorit Chawdhry
48b45f131f power: pmic: tps65941: Add DM_PMIC dependency
This Kconfig depends on DM_PMIC but hadn't be explicitly stated which
could cause config related issues.

Adds the dependency in Kconfig for tps65941.

Fixes: 6b86dd0c1e ("power: pmic: tps65941: Add support for tps65941 family of PMICs")
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21 17:52:31 -06:00
Tom Rini
33da135f7e Merge patch series "Add TI K3 PCIe Controller support for J7200"
Siddharth Vadapalli <s-vadapalli@ti.com> says:

Hello,

This series adds support for the Cadence PCIe controller on TI's K3
family of SoCs to which the J7200 SoC belongs. The driver is an adaptation
of the Linux driver (drivers/pci/controller/cadence/pci-j721e.c) and has
been implemented specifically for Root-Complex mode of operation on the
J7200 SoC. A minor set of changes will be sufficient to support other K3
SoCs as well with plans to implement it in the near future.

Link: https://lore.kernel.org/r/20241014053924.4027491-1-s-vadapalli@ti.com
2024-10-21 17:51:55 -06:00
Siddharth Vadapalli
f3e1aaddb4 configs: j7200_evm_a72_defconfig: Enable configs for PCI support
TI's J7200 SoC has a single instance of PCIe Controller namely PCIe1 which
is a Cadence PCIe Controller. To support PCIe functionality with the PCIe1
instance of PCIe, enable the corresponding configs.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2024-10-21 17:51:51 -06:00
Siddharth Vadapalli
59ad548009 pci: Add TI K3 Cadence PCIe Controller
Add support for the Cadence PCIe Controller present on TI's K3 SoCs.
This driver is an adaptation of the Linux driver.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-21 17:51:51 -06:00
Tom Rini
52254a3d3b Merge patch series "dwc3: gadget: properly fix cache operations"
Neil Armstrong <neil.armstrong@linaro.org> says:

We experience huge problems with cache handling on Qualcomm
systems, and it appears the dcache handling in the DWC3 gadget
code is quite wrong and causes operational issues.

This serie fixes the dcache operations on unaligned data,
and properly invalidate buffers when reading back data from
hardware.

Link: https://lore.kernel.org/r/20241011-u-boot-dwc3-gadget-dcache-fixup-v4-0-5f3498d8035b@linaro.org
2024-10-21 15:27:38 -06:00
Neil Armstrong
9214627f5e usb: dwc3: invalidate dcache on buffer used in interrupt handling
On Qualcomm systems, the setup buffer and even buffers are in
a bad state at interrupt handling, so invalidate the dcache lines
for the setup_buf and event buffer to make sure we read correct
data written by the hardware.

This fixes the following error:
dwc3-generic-peripheral usb@a600000: UNKNOWN IRQ type -1
dwc3-generic-peripheral usb@a600000: UNKNOWN IRQ type 4673109

and invalid situation in dwc3_gadget_giveback() because setup_buf content
is read at 0s and leads to fatal crash fixed by [1].

[1] https://lore.kernel.org/all/20240528-topic-sm8x50-dwc3-gadget-crash-fix-v1-1-58434ab4b3d3@linaro.org/

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2024-10-21 15:27:33 -06:00
Neil Armstrong
73ab819688 usb: dwc3: fix dcache flush range calculation
The current flush operation will omit doing a flush/invalidate on
the first and last bytes if the base address and size are not aligned
with CACHELINE_SIZE.

This causes operation failures Qualcomm platforms.

Take in account the alignment and size of the buffer and also
flush the previous and last cacheline.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2024-10-21 15:27:33 -06:00
Neil Armstrong
ef6f4f8e3c usb: dwc3: allocate setup_buf with dma_alloc_coherent()
Since setup_buf is also consumed by hardware DMA, aligns it's
allocation like other hardware buffers by introduce setup_buf_addr
populated by dma_alloc_coherent(), and use it to pass the physical
address of the buffer to the hardware.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-10-21 15:27:33 -06:00
Tom Rini
2f204bba68 Merge tag 'i2c-tag-v2025.01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-i2c
i2c updates for v2025.01-rc1

- Add support for the following Maxim chips using the existing PCA954x
  driver from Maxim:
  - MAX7356
  - MAX7357
  - MAX7358
  - MAX7367
  - MAX7368
  - MAX7369

- introduce "i2c-gpio,sda-output-only" functionality
  from Alex
2024-10-21 08:30:12 -06:00
Alex Shumsky
f315a48131 i2c: i2c-gpio: add support for i2c-gpio,sda-output-only
Some I2C slave devices are read-only and don't even answer with NACK.
For example FD65x segment LED controllers.
Make them usable with i2c-gpio,sda-output-only that are already supported
by Linux 6.3+.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2024-10-21 06:32:40 +02:00
Maksim Kiselev
f7c9839a61 i2c: muxes: pca954x: Add MAX735x/MAX736x support
Add support for the following Maxim chips using the existing PCA954x
driver:
- MAX7356
- MAX7357
- MAX7358
- MAX7367
- MAX7368
- MAX7369

All added Maxim chips behave like the PCA954x, where a single SMBUS byte
write selects up to 8 channels to be bridged to the primary bus.

Tested using the MAX7358.

Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2024-10-21 06:32:28 +02:00
Tom Rini
fa0ed06a74 Pull request efi-2025-01-rc1-2
Documentation:
 
 * Add document describing Ethernet boot on AM62x SoC
 * Fix typo in blkmap command example
 
 UEFI:
 
 * Avoid #ifdef in efi_setup.c
 * Reduce message noisiness if ESP is missing
 * Remove ERROR:, WARNING: prefixes in messages
 * Use blk_create_devicef() in block device driver
 
 Others:
 
 * Let CONFIG_CMD_WGET depend on CONFIG_CMD_NET
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmcSnMgACgkQhO4vgnE3
 U0upVA/+L1jXBSSXnR8FnvI40SbACxYFx5MFHEkEyNn5D9wwc2ptzH6zWCamzFkG
 /mH5vaHrjV89WU8EkLFUepCiYz5053KnoK3NlnBNL6mISQcB6YHi2ZNfjWOTwIn9
 z12DrXJcs1gNIOxTMI3AdQ9UespsC4XytBgsm0zpzh1ZpBKnqcaX4p0iU/TBFibi
 rZ9yk+iXp04lfJiz1rPaBMQY7HlByCdlM4o6JwQkqW8RS5ozsuKYzZdrMrNO/ksN
 9Cuqwqrst58JcZXZ4zdnaTCqCAqBfo3h6iiPN6+skn0XGgTC7KWHoLffW/z5cqUy
 2PgyEASlpyB6Q0VX6+tRRj06ZWpSGudp92hNY5kb7ZXyU+boEwrkWZZNCf2HU+KF
 sifu7KMU2yOPTcA2qHIYEJ8gI7Zg9Xpzz9lrtm8a0XUbvOnobzIp7tkDUo27q0/B
 YLEf24BoBEmbFTEvTXbI5Xehq1TGWao0UfAAm6vtZIhZp42Efc0EYVUiZz8zw8mf
 x+GEhP08yT3sMSZXKtxT50w4UTVyfRStwHNQ+f217Q96ndNuj+LNFwpURBwWlQ5E
 59WoM235coc9vwynFspaaPSVuYzpDOuaYtEJRmksslhSj/c4w/sDiROXaOGvBs3S
 ZVH4ObLjnl2x3ngA1x1EVeDCrMt5ujvmKJIEiBHFmFsY707rRAQ=
 =F6+Y
 -----END PGP SIGNATURE-----

Merge tag 'efi-2025-01-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-01-rc1-2

CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/22810

Documentation:

* Add document describing Ethernet boot on AM62x SoC
* Fix typo in blkmap command example

UEFI:

* Avoid #ifdef in efi_setup.c
* Reduce message noisiness if ESP is missing
* Remove ERROR:, WARNING: prefixes in messages
* Use blk_create_devicef() in block device driver

Others:

* Let CONFIG_CMD_WGET depend on CONFIG_CMD_NET
2024-10-20 08:27:15 -06:00
Tom Rini
7036abbd5c A few new x86 commands and minor improvements
expo improvements
 binman support for signing FIT images
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmcSwRQRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYWLgf/dnh+7hFENA/pIp57kiihzLc4sH+XaCiR
 A6MDkSnYWFCJpklz2rPPGsyuxEVtNgVtHEpPwA8OPaXitfuyLW/u5woBN6Sdtcvw
 Fqvq72IIMIt3BR6pU2uYZ6w/4t0r0/2pdSYG7L77QJjGsFSe35/RbVaGeln//SEk
 7/5tnqQ13QbhfazwLWNGT7+8R65NcpSwywxGqMcKWMPLt0CW+DMmon4oBuya20pv
 i5uDIp7WWtyxFaCxB3vzKmaXVmX74x9wyWA/K6uWsWt0/9JnEpQh5+IcgKw5ifGF
 sz2kVyZgCXilw1itrmO67O98KPfbRSFIQO2gSZ5NnNB4wrIgFXK2KA==
 =1pdb
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-17oct24-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

A few new x86 commands and minor improvements
expo improvements
binman support for signing FIT images
2024-10-18 22:32:45 -06:00
Marek Vasut
f83e36fd83 mtd: spi-nor: Move SR3 WPS bit definition in the correct location
Move the SR3 bit definition in the right place. Fix
what is likely a rebase artifact. No functional change.

Fixes: 215f1d5794 ("mtd: spi-nor: Clear Winbond SR3 WPS bit on boot")
Signed-off-by: Marek Vasut <marex@denx.de>
2024-10-18 14:18:33 -06:00
Raymond Mao
7f45377152 mbedtls: fix defects in coverity scan
Fixes of unreleased buffer, deadcode and wrong variable type detected
by coverity scan.

Addresses-Coverity-ID: 510809:  Resource leaks  (RESOURCE_LEAK)
Addresses-Coverity-ID: 510806:  Control flow issues  (DEADCODE)
Addresses-Coverity-ID: 510794 Control flow issues  (NO_EFFECT)

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-10-18 14:18:12 -06:00
Heinrich Schuchardt
b92a18e2b6 cmd: upl: correct printf code
Building on 32-bit results in a build failure:

    cmd/upl.c:75:51: warning: format ‘%lx’ expects argument of type
    ‘long unsigned int’, but argument 3 has type ‘size_t’
    {aka ‘unsigned int’} [-Wformat=]
    75 | printf("UPL handoff written to %lx size %lx\n", addr, abuf_size(&buf));
       |                                         ~~^           ~~~~~~~~~~~~~~~
       |                                           |           |
       |                                           |           size_t {aka unsigned int}
       |                                           long unsigned int
       |                                         %x

Fixes: 264f4b0b34 ("upl: Add a command")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:18:05 -06:00
Caleb Connolly
491195769d lmb: notify when adjacent regions are added
lmb_add_region() returns a positive integer if the added regions causes
existing regions to be coalesced. We still want to notify the EFI
subsystem about these added regions though, so adjust lmb_add() to only
bail on errors.

This fixes EFI memory allocation on boards with adjacent memory banks as is the
case on several Qualcomm boards like the RB3 Gen 2.

Fixes: 2f6191526a (lmb: notify of any changes to the LMB memory map)
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-10-18 14:16:10 -06:00
Andy Shevchenko
44917d5866 x86: cpu: Add missing header inclusion
Without asm/cpu_x86.h inclusion a compiler is not happy:

  arch/x86/cpu/cpu_x86.c:14:5: warning: no previous prototype for ‘cpu_x86_bind’ [-Wmissing-prototypes]
  arch/x86/cpu/cpu_x86.c:29:5: warning: no previous prototype for ‘cpu_x86_get_vendor’ [-Wmissing-prototypes]
  arch/x86/cpu/cpu_x86.c:41:5: warning: no previous prototype for ‘cpu_x86_get_desc’ [-Wmissing-prototypes]
  arch/x86/cpu/cpu_x86.c:55:5: warning: no previous prototype for ‘cpu_x86_get_count’ [-Wmissing-prototypes]

Add missing header inclusion.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00
Andy Shevchenko
c1614a4ef6 x86: cpu: Add a few prototypes to the header file
The compiler is not happy to have no prototypes for the functions that
are not defined static. Add them. This helps avoiding the compiler warnings:

  arch/x86/cpu/cpu.c:197:13: warning: no previous prototype for ‘board_final_init’ [-Wmissing-prototypes]
  arch/x86/cpu/cpu.c:205:13: warning: no previous prototype for ‘board_final_cleanup’ [-Wmissing-prototypes]
  arch/x86/cpu/cpu.c:307:5: warning: no previous prototype for ‘reserve_arch’ [-Wmissing-prototypes]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00
Andy Shevchenko
2fb5cc2ad8 x86: cpu: Mark a few functions static
Some functions are not used anywhere except the same file
where they are defined. Mark them static. This helps avoiding
the compiler warnings:

  arch/x86/cpu/cpu.c:343:6: warning: no previous prototype for ‘detect_coreboot_table_at’ [-Wmissing-prototypes]
  arch/x86/cpu/mtrr.c:90:6: warning: no previous prototype for ‘mtrr_write_all’ [-Wmissing-prototypes]
  arch/x86/cpu/i386/interrupt.c:240:6: warning: no previous prototype for ‘__do_irq’ [-Wmissing-prototypes]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00