summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-13cmd: add FDT setup for bootelf by flagMaxim Moskalets
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-13board: developerbox: fix mem_map setup timingMasahisa Kojima
The setup of global variable mem_map was moved into enable_caches() by commit a70c75cabae1 ("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-13arm: dts: k3-am64: Move to OF_UPSTREAMAndrew Davis
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-13initcall: break loop immediately on failureCaleb Connolly
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-13cli: allow users to determine history buffer allocation methodHanyuan Zhao
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-13cli: panic when failed to allocate memory for the history bufferHanyuan Zhao
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-13boards: Remove empty BOARD_SPECIFIC_OPTIONSTom Rini
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-13cmd: rng: Add rng list commandWeizhao Ouyang
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-13driver: rng: Fix SMCCC TRNG crashWeizhao Ouyang
Fix a SMCCC TRNG null pointer crash due to a failed smccc feature binding. Fixes: 53355bb86c25 ("drivers: rng: add smccc trng driver") Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-03-13firmware: psci: Fix bind_smccc_features psci checkWeizhao Ouyang
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-13arm64: Enable CONFIG_64BIT for static analysisDan Carpenter
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-13Kconfig: move CONFIG_32/64BIT to arch/KconfigDan Carpenter
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-13fdt: Fix bootm_low handlingMarek Vasut
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-13Merge patch series "Introduce basic support for TI's AM62Px SoC family"Tom Rini
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-13arm: mach-k3: fixup whitespace in SPDX License IDsBryan Brattlof
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-13doc: board: ti: introduce am62px documentationBryan Brattlof
Introduce basic documentation for the am62p family of SoCs. Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13configs: introduce configs needed for the am62pxBryan Brattlof
Introduce the initial configs needed to support the am62px SoC family Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13arm: dts: introduce am62p5 U-Boot dts filesBryan Brattlof
Include the U-Boot device tree files needed to boot the board. Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-13dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722SVignesh Raghavendra
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-13firmware: ti_sci_static_data: add static DMA channel dataHari Nagalla
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-13board: ti: introduce basic board files for the am62px familyBryan Brattlof
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-13arch: mach-k3: introduce basic files to support the am62px SoC familyBryan Brattlof
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-13arm: mach-k3: invert logic for split DM firmware configBryan Brattlof
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-13ram: k3-ddrss: enable the am62ax's DDR controller for am62pxBryan Brattlof
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-13arm: mach-k3: am62px: introduce clock and device files for wkup splBryan Brattlof
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-13power: domain: ti: use IS_ENABLED macroBryan Brattlof
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-13soc: add info to identify the am62p SoC familyBryan Brattlof
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-11Merge tag 'v2024.04-rc4' into nextTom Rini
Prepare v2024.04-rc4
2024-03-11Prepare v2024.04-rc4v2024.04-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-11Merge tag 'u-boot-imx-master-20240311' of ↵Tom Rini
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-11configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-11arm: dts: imx8mp-beacon-kit: Resync DTS with Linux 6.8Adam Ford
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-11toradex: tdx-cfg-block: add 0087 i.mx8m mini product variantJoao Paulo Goncalves
Add new product id 0087 Verdin iMX8M Mini Quad 2GB IT. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-03-11configs: imx8mp_beacon: Fall back to using TF-AAdam Ford
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: ab53bd43dbde ("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-11board: phycore_imx8mp: Use 2GHz RAM timings for PCL-070 from pcb_rev 1Benjamin Hahn
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-11board: phytec: common: phytec_som_detection: Add phytec_get_som_typeBenjamin Hahn
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-09Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini
- Singular quirk DT property rename.
2024-03-09net: phy: Use PHY MDIO address from DT if availableMarek Vasut
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-07Merge branch '2024-03-07-assorted-fixes' into nextTom Rini
- Add phytec am64x platform, update am65-cpsw and a few other assorted fixes.
2024-03-07cmd: md5sum: use hash_commandIgor Opaniuk
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-07autoboot: Add check for result of malloc_cache_aligned()Maks Mishin
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-07serial: pl01x: set baudrate when probingYang Xiwen
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-07net: am65-cpsw: cpsw_mdio: Switch to proper DM_MDIO frameworkRoger Quadros
Add a new Kconfig symbol MDIO_TI_CPSW for the CPSW MDIO driver and build it with proper DM support if enabled. If MDIO_TI_CPSW is not enabled then we continue to behave like before. Clean up MDIO custom handling in am65-cpsw and use dm_eth_phy_connect() to get the PHY. Signed-off-by: Roger Quadros <rogerq@kernel.org> Tested-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2024-03-07net: mdio: Handle bus level GPIO ResetRoger Quadros
Some platforms have bus level Reset controlled by a GPIO line. If available then handle bus reset via GPIO. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2024-03-07doc: board: phytec: Add phyCORE-AM64xWadim Egorov
Add documentation for PHYTEC phyCORE-AM64x SoM. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2024-03-07board: phytec: am64x: Add PHYTEC phyCORE-AM64x SoMWadim Egorov
Add support for PHYTEC phyCORE-AM64x SoM. Supported features: - 2GB DDR4 RAM - eMMC Flash - external uSD - OSPI NOR Flash - debug UART Product page SoM: https://www.phytec.com/product/phycore-am64x Device trees were taken from Linux v6.8-rc2. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2024-03-07Check curve_name for null to avoid crashBob Wolff
If mixed rsa and ecdsa keys are specified in dtsi, an rsa key can be sent into the ecdsa verify. Without the ecdsa,curve property, this function will crash due to lack of checking the null pointer return. Signed-off-by: Bob Wolff <bob.wolff68@gmail.com>
2024-03-06Merge patch series "Move DRAM address of ATF"Tom Rini
Andrew Davis <afd@ti.com> says: Explanation for this series is mostly in [4/6]. First 3 patches should be safe to take independent of the last 3.
2024-03-06arm: mach-k3: Move DRAM address of ATF for AM62/AM62aAndrew Davis
The current address of TF-A in DRAM is just below the 512MB address line. This means if the DRAM in a system is 512MB then TF-A is right at the end of memory which is often reused, for instance U-Boot relocates itself here. If a system has less than 512MB then that system wouldn't work at all as TF-A would fail to load. To avoid the issues above, move TF-A to the start of DRAM, which doesn't change from system to system. As TF-A is position independent, this has no dependency on TF-A. We also fixup DT as needed when TF-A address is moved, so this change also has no dependency on Linux and is fully forward/backward compatible. Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Bryan Brattlof <bb@ti.com>
2024-03-06arm: mach-k3: am62a: Fixup TF-A/OP-TEE reserved-memory node in FDTAndrew Davis
The address we load TFA and OP-TEE to is configurable by CONFIG_K3_{ATF,OPTEE}_LOAD_ADDR, but the DT nodes reserving this memory are static. Fix that by updating this node when the loaded address does not match the address in DT. Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Bryan Brattlof <bb@ti.com>