Commit Graph

91785 Commits

Author SHA1 Message Date
Tom Rini
cacc0b2678 CI: Move to latest container image
This moves us to our latest container image, which is now based on the
current "Jammy" tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-15 08:18:54 -04:00
Tom Rini
074bfab54d CI: Cherry-pick reset support for m68k for QEMU
In order to support the reset pytest on QEMU on m68k platforms we need
to grab this change from upstream.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-14 16:11:42 -04:00
Tom Rini
96afd8a3bb CI: Update to using clang-17
Currently, llvm-17 is the stable release. Update our container and CI to
fetch and use that.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-14 16:11:33 -04:00
Heinrich Schuchardt
d3f9078bed Dockerfile: install xilinx-bootgen package
Bootgen is used in a binman test. The test is skipped without the binary.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-14 16:11:28 -04:00
Heinrich Schuchardt
25296cf3c0 Dockerfile: build fiptool
Fiptool is used in a binman test. The test is skipped without the binary.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-14 16:11:23 -04:00
Tom Rini
3987e15e88 Merge branch '2024-04-13-assorted-fixes' into next
- Fix bootm_low handling, CONFIG_64BIT usage fixes, RNG fixes, cli
  history fixes, allow bootelf to pass a device tree address, other
  assorted fixes.
2024-03-13 18:47:16 -04:00
Tom Rini
969ea37dfd stv0991: Remove stv0991 board and architecture code
This architecture and related board are unmaintained currently and have
been for a long time. Remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-13 18:47:11 -04:00
Sam Protsenko
56041aa545 Makefile: Improve generated_defconfig file handling
Commit 2027e99e61 ("Makefile: Run defconfig files through the C
preprocessor") adds `generated_defconfig' file, but fails to clean that
up. It might be useful to have that file around after `make' is done,
but it's better to clean that up on `make clean'. Also we probably want
to hide it in `git status' list. This patch makes the described changes,
and also adds `-P' parameter to the CPP command that produces the
`generated_defconfig' to avoid generating linemarkers.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: 2027e99e61 ("Makefile: Run defconfig files through the C preprocessor")
Acked-by: Andrew Davis <afd@ti.com>
2024-03-13 18:47:11 -04:00
Maxim Moskalets
6d1734f005 cmd: add FDT setup for bootelf by flag
Added the ability to use FDT for ELF applications, required to run some
OS. To make FDT setup, you need to set the -d fdt_addr_r cmd option for
bootelf command. Enable by selecting CMD_ELF_FDT_SETUP.

Signed-off-by: Maxim Moskalets <Maxim.Moskalets@kaspersky.com>
2024-03-13 18:47:11 -04:00
Masahisa Kojima
f56d9a385c board: developerbox: fix mem_map setup timing
The setup of global variable mem_map was moved into enable_caches()
by commit a70c75caba ("board: developerbox: move mem_map setup later")
since U-Boot was directly booted from NOR flash in XIP
and bss is not yet available in dram_init() at that time.
This has a problem, mem_map variable is used by
the get_page_table_size() to calculate the page table size,
but get_page_table_size() is called earlier than enable_caches()
which fills mem_map variable. With that, U-Boot fails to boot when
64GB DIMM is installed.

Currently U-Boot on the Developerbox board is not booted in XIP
and bss is available in dram_init(), let's move mem_map setup
in dram_init().

Signed-off-by: Masahisa Kojima <kojima.masahisa@socionext.com>
2024-03-13 18:47:11 -04:00
Andrew Davis
5b05266928 arm: dts: k3-am64: Move to OF_UPSTREAM
Enable OF_UPSTREAM for AM64-EVM and SK-AM64 boards. Remove DT files that
are now available in dts/upstream. Update the appended files based on
version of latest OF_UPSTREAM sync point (v6.7-rc7).

Signed-off-by: Andrew Davis <afd@ti.com>
2024-03-13 18:47:11 -04:00
Caleb Connolly
7554388c1d initcall: break loop immediately on failure
The current ordering always results in func pointing to the next
function in the init_sequence. e.g. if fdtdec_setup() fails, ret will
be set to the error code, then func will be updated to point to
initf_malloc(), only then is ret checked and the loop broken. The end
result of this is that the "initcall failed at ..." error will point you
to initf_malloc(), when the error actually occured in fdtdec_setup()!

This can be quite confusing and result in a lot of time wasted debugging
code that has nothing to do with the failure (ask me how I know :P).

Adjust the for loop to check ret immediately after the call and break
early so that func will correctly reference the failed function.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
2024-03-13 18:47:11 -04:00
Hanyuan Zhao
421359ac52 cli: allow users to determine history buffer allocation method
This commit allows users to choose the appropriate memory
allocation method between static allocated and dynamically
calloc. The previous static-array way will not obviously
contribute to the final binary size since it is uninitialized,
and might have better performance than the dynamical one.
Now we provide the users with both the two options.

Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>
2024-03-13 12:40:43 -04:00
Hanyuan Zhao
4495134030 cli: panic when failed to allocate memory for the history buffer
This commit simply modifies the history initialize function,
replacing the return value by panic with reasons. The calling
chains of hist_init don't have steps explicitly throwing or
dealing with the ENOMEM error, and once the init fails, the
whole system is died. Using panic here to provide error
information instead.

Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>
2024-03-13 12:40:43 -04:00
Tom Rini
efdf91c8ea boards: Remove empty BOARD_SPECIFIC_OPTIONS
While there are currently uses for a stanza of "config BOARD_SPECIFIC_OPTIONS"
followed by "def_bool y" and a series of select/imply statements, having
this option set followed by nothing else doesn't provide anything.
Remove these stanzas.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-13 12:40:43 -04:00
Weizhao Ouyang
9a6e975c7c cmd: rng: Add rng list command
The 'rng list' command probes all RNG devices and list those devices
that are successfully probed. Also update the help info.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-03-13 12:40:43 -04:00
Weizhao Ouyang
1da4d327d4 driver: rng: Fix SMCCC TRNG crash
Fix a SMCCC TRNG null pointer crash due to a failed smccc feature
binding.

Fixes: 53355bb86c ("drivers: rng: add smccc trng driver")
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-03-13 12:40:43 -04:00
Weizhao Ouyang
12ccdcd79b firmware: psci: Fix bind_smccc_features psci check
According to PSCI specification DEN0022F, PSCI_FEATURES is used to check
whether the SMCCC is implemented by discovering SMCCC_VERSION.

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-03-13 12:40:43 -04:00
Dan Carpenter
0cff87c90c arm64: Enable CONFIG_64BIT for static analysis
In the Makefile there is a line that says this:

    # the checker needs the correct machine size
    CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)

Set CONFIG_64BIT for ARM64 so that we pass -m64 to the static checkers
instead of -m32.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
2024-03-13 12:40:43 -04:00
Dan Carpenter
24c4ac842e Kconfig: move CONFIG_32/64BIT to arch/Kconfig
These configs are used in multiple places so put them in a shared
Kconfig file.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-03-13 12:40:43 -04:00
Marek Vasut
d545fe3b82 fdt: Fix bootm_low handling
According to README CFG_SYS_BOOTMAPSZ section, in case both "bootm_low" and
"bootm_size" variables are defined, "bootm_mapsize" variable is not defined
and CFG_SYS_BOOTMAPSZ macro is not defined, all data for the Linux kernel
must be between "bootm_low" and "bootm_low" + "bootm_size".

Currently, for systems with DRAM between 0x4000_0000..0x7fff_ffff and with
e.g. bootm_low=0x60000000 and bootm_size=0x10000000, the code will attempt
to reserve memory from 0x4000_0000..0x4fff_ffff, which is incorrect. This
is because "bootm_low" is not taken into consideration correctly.

The last parameter of lmb_alloc_base() is the maximum physical address of
the to be reserved LMB area. Currently this is the start of DRAM bank that
is considered for LMB area reservation + min(DRAM bank size, bootm_size).
In case bootm_low is set to non-zero, this maximum physical address has to
be shifted upward, to min(DRAM bank start + size, bootm_low + bootm_size),
otherwise the reserved memory may be below bootm_low address.

In case of multiple DRAM banks, the current change reserves top part of
the first bank, and reserves the rest of memory in the follow up banks.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-03-13 12:40:43 -04:00
Tom Rini
213ffd49bd Merge patch series "Introduce basic support for TI's AM62Px SoC family"
Bryan Brattlof <bb@ti.com> says:

Hello Again Everyone!

The AM62Px is an extension of the existing Sitara AM62x low-cost family
of application processors built for Automotive and Linux Application
development. Scalable Arm Cortex-A53 performance and embedded features,
such as: multi high-definition display support, 3D-graphics
acceleration, 4K video acceleration, and extensive peripherals make the
AM62Px well-suited for a broad range of automation and industrial
application, including automotive digital instrumentation, automotive
displays, industrial HMI, and more.

Some highlights of AM62P SoC are:

* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster.
  Dual/Single core variants are provided in the same package to allow HW
  compatible designs.

* One Device manager Cortex-R5F for system power and resource
  management, and one Cortex-R5F for Functional Safety or
  general-purpose usage.

* One 3D GPU up to 50 GLFOPS

* H.264/H.265 Video Encode/Decode.

* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or
  2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution

* Integrated Giga-bit Ethernet switch supporting up to a total of two
  external ports (TSN capable).

* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for
  NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio,
  1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.

* Dedicated Centralized Hardware Security Module with support for secure
  boot, debug security and crypto acceleration and trusted execution
  environment.

* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.

* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only,
  enabling battery powered system design.

For those interested, more details about this SoC can be found in the
Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83

Proof-of-Life: https://paste.sr.ht/~bryanb/af2ac108a9362549aa326f182e87918d52bf2d71
2024-03-13 10:10:25 -04:00
Bryan Brattlof
c37fda950c arm: mach-k3: fixup whitespace in SPDX License IDs
The SPDX ID format usese a single space used after the
'SPDX-License-Identifier:'. Fix all files that use any other white-space
character other than a single space.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
17926a984b doc: board: ti: introduce am62px documentation
Introduce basic documentation for the am62p family of SoCs.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
2cec68f8a3 configs: introduce configs needed for the am62px
Introduce the initial configs needed to support the am62px SoC family

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
2d01245321 arm: dts: introduce am62p5 U-Boot dts files
Include the U-Boot device tree files needed to boot the board.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Vignesh Raghavendra
558fbddbb4 dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722S
Add PSIL data for the AM62P and the J722S SoC family. The PSIL mapping
for the J722S is the same except for the extra instances of the CSI-RX.
So let's reuse the same file for both the AM62P and J722S.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
[bb@ti.com: rebased to U-Boot v2024.01]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Hari Nagalla
e17dc351a6 firmware: ti_sci_static_data: add static DMA channel data
Include the static DMA channel data for ti_sci

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
5d747f35c1 board: ti: introduce basic board files for the am62px family
Introduce the basic files needed to support the am62px family of SoCs

Co-developed-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
7f88327e94 arch: mach-k3: introduce basic files to support the am62px SoC family
Introduce the basic functions and definitions needed to properly
initialize TI's am62p family of SoCs

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:05 -04:00
Bryan Brattlof
e61755001e arm: mach-k3: invert logic for split DM firmware config
Currently, for the K3 generation of SoCs, there are more SoCs that
utilize the split firmware approach than the combined DMSC firmware.
Invert the logic to avoid adding more and more SoCs to this list.

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:04 -04:00
Bryan Brattlof
55e7e2e0e5 ram: k3-ddrss: enable the am62ax's DDR controller for am62px
The am62px family of SoCs uses the same DDR controller as found on the
am62ax family. Enable this option when building for the am62px family

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:04 -04:00
Bryan Brattlof
1bcc7a4d7d arm: mach-k3: am62px: introduce clock and device files for wkup spl
Include the clock and lpsc tree files needed for the wkup spl to
initialize the proper PLLs and power domains to boot the SoC.

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:04 -04:00
Bryan Brattlof
c59d3746d6 power: domain: ti: use IS_ENABLED macro
Cleanup this list and standardize on using the IS_ENABLED macro for the
power domain data list.

Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:04 -04:00
Bryan Brattlof
026c972fa3 soc: add info to identify the am62p SoC family
Include the part number for TI's am62px family of SoCs so we can
properly identify it during boot

Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13 10:10:04 -04:00
Tom Rini
20a0ce574d Prepare v2024.04-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmXvO2YACgkQFHw5/5Y0
 tyxRagwAtLBR/yehfOY5Zw3dKf8kREedas500ueg7nSwV+V2CZO+cwFLrtSVJhXu
 p6dtX0QZxCYidTfaoUOfGLwgvrJoXD/iY6ws8dzVMa9IX2ez3uZDlsPmQG/y2U4i
 rtDn9YgV8oAnLk4hFaaE5vhWfUmtSy6SvJ/foFeQT0B9Er14ep5AII8L/nUcP53w
 FbJ8UVF92i44+zG/0EjpG2pZeftztnVP4YVhU+mbmLLKP49sbrVwFRlo5t+VlB/j
 Q1/RCgxGMPsUG3iNWqIl6rA3VElcZbUm8+YcAy6GqTLOXPxydwBnZVS5UgYapg7y
 Yqu3IMm0LGdXp4klYcdz0tesuFHWan+j227Tme9OLmHgBYBo1WO6zDCITOW1uNVe
 tf3QjIVlrMV4/zglHP/2iceBO1sS49TuzjctCdEBKXb7vZISxgxS7QwmGVVHeigw
 zF4tw0uuzldi+e1yv9rleTIJBN+OuPqUhsyda2Fxq5a2hKW90hv33zzb7ZN5ZvVm
 GlEzhZ6c
 =CqvA
 -----END PGP SIGNATURE-----

Merge tag 'v2024.04-rc4' into next

Prepare v2024.04-rc4
2024-03-11 15:27:20 -04:00
Tom Rini
f3c979dd00 Prepare v2024.04-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-11 13:11:46 -04:00
Tom Rini
da07a629e1 Merge tag 'u-boot-imx-master-20240311' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
- Use TF-A on imx8mp_beacon to fix boot regression.
- Use latest 6.8 dts for imx8mp_beacon.
- Fix the RAM initialization for phycore_imx8mp PCL-070 rev 1.
- Describe the 0087 i.mx8m mini product variant in tdx-cfg-block.
2024-03-11 09:22:44 -04:00
Tom Rini
b8ed8b1376 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-11 09:10:24 -04:00
Adam Ford
4484c7b3c3 arm: dts: imx8mp-beacon-kit: Resync DTS with Linux 6.8
The device tree has evolved over time, so re-sync.  This also
partial reverts one change on the PCIe, because U-Boot doesn't
have a proper driver.  However, since the clock is configured
to generate a 100MHz reference clock by default, a proper driver
isn't really necessary.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2024-03-11 08:43:42 -03:00
Joao Paulo Goncalves
12d3257fa2 toradex: tdx-cfg-block: add 0087 i.mx8m mini product variant
Add new product id 0087 Verdin iMX8M Mini Quad 2GB IT.

Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-03-11 08:43:27 -03:00
Adam Ford
383d4b130c configs: imx8mp_beacon: Fall back to using TF-A
When the board was originally added, it enabled some features which
allowed it to bypass Trusted Firmware, but as the feature set of
Linux grew and more features became available, the U-Boot config
options which bypassed TF-A caused issues, so it needs to return
to the standard operating mode of using TF-A or the system no
longer boots.

Fixes: ab53bd43db ("arm64: imx: Add support for imx8mp-beacon-kit")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-03-11 08:43:08 -03:00
Benjamin Hahn
76832300a9 board: phycore_imx8mp: Use 2GHz RAM timings for PCL-070 from pcb_rev 1
We need to differ between PCL-070 and PCM-070. PCL-070 supports 2GHz RAM
timings from pcb rev 1 or newer. PCM-070 supports 2GHz RAM timings from
pcb rev 3 or newer.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
2024-03-11 08:42:44 -03:00
Benjamin Hahn
110d321a56 board: phytec: common: phytec_som_detection: Add phytec_get_som_type
Add a function that gets the som_type from the EEPROM.
Add an enum for the som_type.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
2024-03-11 08:42:44 -03:00
Tom Rini
0981f8900f Merge https://source.denx.de/u-boot/custodians/u-boot-usb
- Singular quirk DT property rename.
2024-03-09 11:29:48 -05:00
Marek Vasut
91e70367a5 net: phy: Use PHY MDIO address from DT if available
In case the PHY is fully described in DT, use PHY MDIO address
from DT directly instead of always using auto-detection. This
also fixes the behavior of 'mdio list' in such DT setup, which
now prints the PHY connected to the MAC correctly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2024-03-09 10:58:48 -05:00
Tom Rini
beedf675b3 Merge branch '2024-03-07-assorted-fixes' into next
- Add phytec am64x platform, update am65-cpsw and a few other assorted
  fixes.
2024-03-07 11:56:35 -05:00
Igor Opaniuk
6ec3f92089 cmd: md5sum: use hash_command
Drop old implementation and use hash_command() instead, as
how it's currently done for crc32 and sha1sum cmds.

Test:
=> md5sum 0x60000000 0x200
md5 for 60000000 ... 600001ff ==> e6bbbe95f5b41996f4a9b9af7bbd4050

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2024-03-07 09:23:10 -05:00
Maks Mishin
606867c849 autoboot: Add check for result of malloc_cache_aligned()
Return value of a function 'malloc_cache_aligned'
is dereferenced at autoboot.c:207 without checking for NULL,
but it is usually checked for this function.

Found by RASU JSC.

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
2024-03-07 07:59:17 -05:00
Yang Xiwen
91febe80c9 serial: pl01x: set baudrate when probing
It is found that when DM is enabled, only generic init function is
called in .probe(). Baudrate is never honored. Add a function call
to .setbrg() when probing so that we can update the baudrate of the
serial device.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2024-03-07 07:59:16 -05:00