aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-16arm: rmobile: Restrict PINCTRL_PFC selection to R-Car gen3/gen4Paul Barker
The RZ/G2L family uses CONFIG_RCAR_64 but does not share a common PFC driver with the R-Car gen3 & gen4 boards. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16clk: renesas: Add RZ/G2L & RZ/G2LC CPG driverPaul Barker
This driver provides clock and reset control for the Renesas R9A07G044L (RZ/G2L) and R9A07G044C (RZ/G2LC) SoC. It consists of two parts: * driver code which is applicable to all SoCs in the RZ/G2L family. * static data describing the clocks and resets which are specific to the R9A07G044{L,C} SoCs. The identifier r9a07g044 (without a final letter) is used to indicate that both SoCs are supported. clk_set_rate() and clk_get_rate() are implemented only for the clocks that are actually used in u-boot. The CPG driver is marked with DM_FLAG_PRE_RELOC to ensure that its bind function is called before the SCIF (serial port) driver is probed. This is required so that we can de-assert the relevant reset signal during the serial driver probe function. This patch is based on the corresponding Linux v6.5 driver (commit 52e12027d50affbf60c6c9c64db8017391b0c22e). Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16arm: rmobile: Add basic R9A07G044L SoC supportPaul Barker
Add a config option for the R9A07G044L SoC used in the RZ/G2L so that we can make use of this in the subsequent driver patches. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16arm: rmobile: Add basic RZ/G2L family supportPaul Barker
The Renesas RZ/G2L family includes the following ARM SoCs: * RZ/G2L (r9a07g044l) * RZ/G2LC (r9a07g044c) * RZ/G2UL (r9a07g043u) * RZ/V2L (r9a07g054l) Support for individual SoCs and evaluation boards will be added in separate patches. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16dt-bindings: Add RZ/G2L IRQC bindingsPaul Barker
Import bindings for the Interrupt Controller (IRQC) module in the Renesas RZ/G2L SoC family. This patch is based on the dt-bindings in Linux v6.5 (commit 52e12027d50affbf60c6c9c64db8017391b0c22e). Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16dt-bindings: Add RZ/G2L PFC bindingsPaul Barker
Import bindings for the Port Function Control (PFC) module in the Renesas RZ/G2L SoC family. This patch is based on the dt-bindings in Linux v6.5 (commit 52e12027d50affbf60c6c9c64db8017391b0c22e). Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16dt-bindings: Add RZ/G2L CPG bindingsPaul Barker
Import bindings for the Clock Pulse Generator (CPG) module in the Renesas RZ/G2L SoC family. This patch is based on the dt-bindings in Linux v6.5 (commit 52e12027d50affbf60c6c9c64db8017391b0c22e). Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16serial: sh: Fix compile error when lacking HSCIF supportPaul Barker
If we attempt to compile serial_sh.c for a system which lacks HSCIF support (e.g. R8A7740), we see the following compilation error: In file included from drivers/serial/serial_sh.c:20: drivers/serial/serial_sh.c: In function ‘sh_serial_init_generic’: drivers/serial/serial_sh.h:429:35: warning: implicit declaration of function ‘sci_HSSRR_out’; did you mean ‘sci_SCSCR_out’? [-Wimplicit-function-declaration] 429 | #define sci_out(port, reg, value) sci_##reg##_out(port, value) | ^~~~ drivers/serial/serial_sh.c:62:17: note: in expansion of macro ‘sci_out’ 62 | sci_out(port, HSSRR, HSSRR_SRE | HSSRR_SRCYC8); | ^~~~~~~ To fix this, only try to support access to the HSSRR register for SoCs where it actually exists. Support for the RZ/G2L will be introduced in following patches, which selects CONFIG_RCAR_64 but does not have HSCIF interfaces, so check for CONFIG_RCAR_GEN2 || CONFIG_RCAR_GEN3 || CONFIG_RCAR_GEN4 to determine if HSCIF is present. Fixes: bbe36e29ca2c ('serial: sh: Add HSCIF support for R-Car SoC') Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-10-16Merge tag 'u-boot-amlogic-20231015' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic - add Amlogic A1 clock driver - add Amlogic A1 reset support - add USB Device support for Amlogic A1 - enable RNG on Amlogic A1 & Amlogic S4 - move Amlogic Secure Monitor to standalone driver
2023-10-16serial: lpuart: Enable IPG clockYe Li
Current codes only ennable the PER clock. However on iMX8 the LPUART also needs IPG clock which is an LPCG. Should not depend on the default LPCG setting. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2023-10-16arm: dts: imx93: add a per clock for LPUART1Alice Guo
When CLK is enabled, get_lpuart_clk_rate() needs to get a per clock of lpuart, so that add a per clock for lpuart1. Signed-off-by: Alice Guo <alice.guo@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2023-10-16clk: imx: add i.MX93 CCF driverSébastien Szymanski
Add i.MX93 CCF driver support. Modifed from Linux Kernel v6.5-rc2 and adapted for U-Boot. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2023-10-16ARM: dts: imx: Switch USB1 port control to GPIO on Data Modul i.MX8M Plus ↵Marek Vasut
eDM SBC The USB_PWR signal operation is not reliable on this DWC3 controller instance in case the signal is active high. Switch to GPIO control, which always behaves correctly. Perform the change in u-boot extras until this hits Linux upstream. Signed-off-by: Marek Vasut <marex@denx.de>
2023-10-16arm: mvebu: AC5/AC5X: Disable SMBIOSChris Packham
The RD-AC5X doesn't make use of EFI or SMBIOS. Recently we started seeing boot failures such as WARNING: SMBIOS table_address overflow 27f60f020 Failed to write SMBIOS table initcall failed at event 10/(unknown) (err=-22) ### ERROR ### Please RESET the board ### The error is because the physical address of the RAM on the AC5X SoC is above the 32GiB boundary. As we don't need SMBIOS or EFI this can be safely disabled. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: mvebu: clearfog: support 512MB memory size from tlv eepromJosua Mayer
Handle 2GBit memory size value "2" from tlv eeprom on ddr initialisation, to support SoMs with 512MB ddr memory. Signed-off-by: Josua Mayer <josua@solid-run.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: mvebu: clearfog: read number of ddr channels from tlv dataJosua Mayer
Extend the existing tlv vendor extension used for ram size by one byte to also store the number of ddr channels. The length of the tlv entry can indicate whether the new information is present. If not default to single channel. Signed-off-by: Josua Mayer <josua@solid-run.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: mvebu: Enable bootstd for Thecus N2350 boardTony Dinh
Enable bootstd for Thecus N2350 board, and remove distroboot. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: mvebu: Enable bootstd for Synology DS116 boardTony Dinh
Enable bootstd for Synology DS116 board, and remove distroboot. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16Revert "arm: mvebu: x240: Use i2c-gpio instead of built in controller"Chris Packham
This reverts commit 5c1c6b7306f2b4c0fd50c7cb5d757e245b93606e. The reason for switching to i2c-gpio was due to an issue we were seeing in the Linux kernel where the CPU would lock up on certain adverse I2C bus conditions. We were never able to reproduce the lockup in U-Boot but assumed that was probably just luck. Since then we have discovered that the lock up was due to the I2C transaction offload engine in the I2C controller not coping with the adverse bus conditions (basically it thinks there's another master and waits for a STOP condition that never comes). U-Boot doesn't use the I2C offload feature so is not susceptible to the lockup. We can therefore safely return to using the built-in I2C controller. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: mvebu: x240: Disable SMBIOSChris Packham
The x240 doesn't make use of EFI or SMBIOS. Recently we started seeing boot failures such as WARNING: SMBIOS table_address overflow 23f60c020 Failed to write SMBIOS table initcall failed at event 10/(unknown) (err=-22) ### ERROR ### Please RESET the board ### The error is because the physical address of the RAM on the AC5X SoC is above the 32GiB boundary. As we don't need SMBIOS or EFI this can be safely disabled. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16board: phytec: phycore_imx8mp: Add 4000MTS RAM timings based on PCB revTeresa Remmet
Starting with PCB revision 3 we can safely make use of higher RAM frequency again. Make use of the EEPROM detection to determine the revision and use the updated RAM timings for new SoMs. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
2023-10-16board: phytec: phycore-imx8mp: Add EEPROM detection initialisationTeresa Remmet
Add EEPROM detection initialisation for phyCORE-i.MX8MM and print SoM information during boot when successful. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
2023-10-16board: phytec: common: phytec_som_detection: Add helper for PCB revisionTeresa Remmet
Add helper function to read out the PCB revision of a PHYTEC SoM. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
2023-10-16board: phytec: phycore_imx8mp: Update 2GB RAM TimingsTeresa Remmet
Due to PCB layout constraints in PCB revisions until including 1549.2, a RAM frequency of 2 GHz can cause rare instabilities. Set the RAM frequency to 1.5 GHz to achieve a stable system under all conditions. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
2023-10-16board: phytec: common: Add imx8m specific EEPROM detection supportTeresa Remmet
Add imx8m specific detection part. Which includes checking the EEPROM data for article number options. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de>
2023-10-16board: phytec: Add common PHYTEC SoM detectionTeresa Remmet
Recent shipped PHYTEC SoMs come with an i2c EEPROM containing information about the hardware such as board revision and variant. This can be used for RAM detection and loading device tree overlays during kernel start. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Yannic Moog <y.moog@phytec.de> Tested-by: Yannic Moog <y.moog@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdevTony Dinh
Add hook in sata_mv probe to enable bootstd bootdev. Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16arm: kirkwood: Add support for ZyXEL NSA325 boardTony Dinh
ZyXEL NSA325 specifications: Marvell Kirkwood 88F6282 SoC 1.6 GHz CPU 1x GBE LAN port (Marvell MV88E1318) 512 MB RAM 128 MB Eon NAND, SLC I2C 1x USB 3.0 (on PCIe bus) 2x USB 2.0 2x SATA (hot swap slots) Serial console Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16ARM64: dts: marvell: cn9310-crb: Remove duplicate pinctrlChris Packham
The cn9130.dtsi defines a pinctrl node for SPI1 (until recently it was mislabeled as spi0). Use this instead of having a duplicate definition with a different label. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16ARM64: dts: marvell: cn9310: Use appropriate label for spi1 pinsChris Packham
The CN9130-DB uses the SPI1 interface but had the pinctrl node labelled as "cp0_spi0_pins". Use the label "cp0_spi1_pins" and update the node name to "cp0-spi-pins-1" to avoid confusion with the pinctrl options for SPI0. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16kirkwood: dns325: Enable 2nd harddriveStefan Roese
The 2nd HD is not enabled in U-Boot on the D-Link DNS325. This patch sets the responsible GPIO to high, enabling the drive. Suggested-by: Peter Granilla Signed-off-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Tony Dinh <mibodhi@gmail.com>
2023-10-16toradex: verdin-imx8mm/imx8mp: Remove bootcmd_mfgJoao Paulo Goncalves
The bootcmd_mfg env variable is legacy from IMX downstream u-boot branch and is not needed on mainline. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16smegw01: Remove misuse of CONFIG_ENV_IS_NOWHEREEduard Strehlau
When using a list of writeable variables, the initial values come from the built-in default environment since commit 5ab81058364b ("env: Complete generic support for writable list"). Remove unnecessary misuse of CONFIG_ENV_IS_NOWHERE as default environment. Based on the fix done by commit b16fd7f75f6d ("imx6q: acc: Remove misuse of env is nowhere driver"). Signed-off-by: Eduard Strehlau <eduard@lionizers.com> Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-10-16mx28evk: Add USB Mass Storage supportFabio Estevam
Select the USB options to allow running "ums 0 mmc 0". Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-10-16usb: ehci: mxs: Use regulator_set_enable_if_allowed()Fabio Estevam
Since commit 4fcba5d556b4 ("regulator: implement basic reference counter") the return value of regulator_set_enable() may be EALREADY or EBUSY for fixed/GPIO regulators. Switch to using the more relaxed regulator_set_enable_if_allowed() to continue if regulator already was enabled or disabled. This fixes the following error when running the 'ums' command: => ums 0 mmc 0 UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0xece000 Error enabling VBUS supply g_dnl_register: failed!, error: -114 g_dnl_register failed Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-10-16usb: ehci: mxs: Fix the USB node pointer retrievalFabio Estevam
Use dev_ofnode() to retrieve the USB node pointer from the udevice structure. This fixes the following build error: drivers/usb/host/ehci-mxs.c:143:38: error: 'struct udevice' has no member named 'node_' Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-10-16arm: mach-imx: Makefile: Extend u-boot-nand.imx paddingHiago De Franco
Extend the padding process of u-boot-nand.imx target by adding 10k bytes of zeros to the end of the binary using the 'dd' command. The existing padding method did not generate a functional binary, as discussed in more detail in this thread [1]. Instead, we adopt the end-padding calculation method documented in 'board/doc/colibri_imx7.rst' as a reference, which is relevant for iMX7 with NAND storage. Adding 10k bytes of zeros provides an approximate value that makes the proper padding for these NAND devices. [1] https://lore.kernel.org/all/CAC4tdFUqffQzRQFv5AGe_xtbFy1agr2SEpn_FzEdexhwjdryyw@mail.gmail.com/ Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16toradex: colibri_imx7: Enable nand/emmc detection and set boot variantHiago De Franco
Add detection of eMMC vs NAND devices on the Colibri iMX7 board. A GPIO is configured to detect the presence of an on-board resistor that is configured differently based on the flash memory used. Depending on the detection result, the 'variant' environment variable is set to '-emmc' or cleared, indicating the type of storage device. This enhancement improves variant detection during system initialization through USB recovery mode, where U-Boot is loaded directly to RAM. This allows variant detection for an accurate device tree selection. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16board: toradex: verdin-imx8mm: set fixed LPDDR4 refresh rate as per errata ↵Andrejs Cainikovs
ERR050805 Update lpddr4 configuration and training using updated spreadsheet and tools from NXP using data from previous spreadsheet and verified toward datasheet: - MX8M_Mini_LPDDR4_RPA_v22.xlsx - mscale_ddr_tool_v3.31_setup.exe The most relevant update is related to errata ERR050805: "DRAM: Controller automatic derating logic may not work when the LPDDR4 memory temperature is above 85 °C at initialization" Other relevant fixes: - DRAMTMG7 register: corrected calculation of T_CKPDX parameter (equal to tCKCKEH for LPDDR4) - RANKCTL register: corrected calculations for ODTLon and ODTLoff to follow the JEDEC specification - ADDRMAP7 register: added support for 17-row devices As per errata ERR050805: An issue exists with the automatic derating logic of the DDR controller that only samples the LPDDR4 MR4 register when the Temperature Update Flag (TUF) field (MR4[7] ) is 1’b1. If the LPDDR4 memory is initialized and starts operation above 85 °C (MR4[2:0] > 3’b011), the MR4 Temperature Update Flag (TUF) will not be set. The DDR Controller will therefore not automatically adjust the memory refresh rate or de-rate memory timings based on the LPDDR4 memory temperature. This may cause the controller incorrectly setting the refresh period, potentially cause the LPDDR4 memory losing data contents and lead to possible data integrity issues above 85 °C. Errata provides three possible workaround options, while option 2 is the most reasonable: Disable the automatic derating logic of the DDR controller and apply fixed x2 refresh rate (0.5x refresh). This option is suitable for designs that are expected to boot at or above 85 °C and memory’s MR4[2:0] (Refresh Rate) DOES NOT report the following conditions: 3b101: 0.25x refresh, no de-rating 3b110: 0.25x refresh, with de-rating 3b111: SDRAM High temperature operating limit exceeded [1]: https://www.nxp.com/docs/en/errata/IMX8MM_0N87W.pdf Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16usbarmory: Add DM_I2C and DM_SERIAL supportAndrej Rosano
Use DM_I2C and DM_SERIAL as it is now mandatory. Signed-off-by: Andrej Rosano <andrej.rosano@withsecure.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-10-16mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT headerRasmus Villemoes
When built with CONFIG_IMX_HAB, the full FIT image, including stuff tacked on beyond the end of the fdt structure, is expected to be (fdt size rounded up to 0x1000 boundary)+CONFIG_CSF_SIZE. Now, when the FIT image is loaded from a storage device, it doesn't really matter that the flash.bin that gets written to target isn't quite that big - we will just load some garbage bytes that are never read or used for anything. But when flash.bin is uploaded via uuu, it's important that we actually serve at least as many bytes as the target expects, or we will hang in rom_api_download_image(). Extend the logic in the csf.sh script so that the csf blob is padded to CONFIG_CSF_SIZE minus the size of the IVT header. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-10-16imx: spl_imx_romapi.c: remove dead codeRasmus Villemoes
These IS_ENABLED(CONFIG_SPL_LOAD_FIT) cases can no longer be reached, and thus get_fit_image_size() is also redundant. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full ↵Rasmus Villemoes
FIT size Currently, spl_imx_romapi uses a somewhat tricky workaround for the fact that a FIT image with external data doesn't directly allow one to know the full size of the file: It does a dummy spl_load_simple_fit(), having the ->read callback remember the largest offset requested, and then does a last call to rom_api_download_image() to fetch the remaining part of the full FIT image. We can avoid that by just keeping track of how much we have downloaded already, and if the ->read() requests something outside the current valid buffer, fetch up to the end of the current request. The current method also suffers from not working when CONFIG_IMX_HAB is enabled: While in that case u-boot.itb is not built with external data, so the fdt header does contain the full size of the dtb structure. However, it does not account for the extra CONFIG_CSF_SIZE added by board_spl_fit_size_align(). And also, the data it hands out during the first dummy spl_load_simple_fit() is of course garbage, and wouldn't pass the verification. So we really need to call spl_load_simple_fit() only once, let that figure out just how big the FIT image is (including whatever data, CSF or "ordinary" external data, has been tacked on beyond the fdt structure), and always provide valid data from the ->read callback. This only affects the CONFIG_SPL_LOAD_FIT case - I don't have any hardware or experience with the CONFIG_SPL_LOAD_IMX_CONTAINER case, so I leave that alone for now. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16imx8mp: binman: rename spl and u-boot nodesRasmus Villemoes
The hab signing script doc/imx/habv4/csf_examples/mx8m/csf.sh does fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset to figure out the offset of u-boot.itb inside flash.bin. That works fine for imx8mm, imx8mn, imx8mq, but fails for imx8mp because in that case 'uboot' is merely a label and not actually the node name. Homogenize these cases and make imx8mp the same as the other imx8m* variants. The binman type is explicitly given and no longer derived from the node name, and the csf.sh script will work for all four SOCs. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16verdin-imx8mp: drop unused tdx easy installer ifdefHiago De Franco
Drop unused code related to CONFIG_TDX_EASY_INSTALLER, that existed only on toradex downstream branch. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16imx: hab: Use CONFIG_SPL_LOAD_FIT_ADDRESS in the CSF exampleMarek Vasut
The SPL authenticates image starting from CONFIG_SPL_LOAD_FIT_ADDRESS address, update the csf_fit.txt to match. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16arm: imx: imx8m: add optee configuration to ft_system_setupTim Harvey
If optee is detected configure it in the Linux device-tree: - add /firmware/optee node - add /reserved-memory nodes for optee_core and optee_shm Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-10-16arm: dts: imx8m: move CAAM nodes into common u-boot.dtsiTim Harvey
Move the crypto and sec_jr* nodes from board-specific u-boot.dtsi files into the common files. Additionally protect the nodes with ifdef CONFIG_FSL_CAAM as they don't serve any purpose if that is not enabled. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-10-16arm: dts: imx8mn: protect the firmware/optee node with ifdefTim Harvey
There is no need to include the firmware/optee node if the optee driver is not enabled. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-10-16arm: dts: imx8mp: move firmware/optee node to common imx8mp-u-boot.dtsiTim Harvey
Move the firmware/optee node to the common imx8mp-u-boot.dtsi and protect it with an ifdef CONFIG_OPTEE as it is a meaningless node without the optee driver enabled. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@denx.de>