summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-04imx: spl: fix u-boot fit loadingtoradex_imx_lf_v2022.04Emanuele Ghidoli
Override weak spl_load_simple_fix_load function only when necessary to manage signature verification via High Assurance Boot (HAB). In particular if spl_load_simple_fix_load function is overridden also the board_spl_fit_size_align must be overridden to provide the correct buffer size. This ensures correct sizing of the upload buffer and prevents buffer overflows which may lead to memory corruption and system reset. Since an IVT header is checked using just a byte magic number, and the memory beyond the buffer size is random, this fix addresses an issue where the presence of an apparently valid IVT header beyond the buffer size could result in unintended memcpy operations to random memory addresses, often leading to system reset. Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Fixes: 9de354485800 ("imx: spl: implement spl_load_simple_fit_fix_load") Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2024-03-08toradex: tdx-cfg-block: add 0087 i.mx8m mini product variantJoao Paulo Goncalves
Add new product id 0087 Verdin iMX8M Mini Quad 2GB IT. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20240308141801.49081-1-jpaulo.silvagoncalves@gmail.com/] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-02-19Merge tag 'lf-5.15.71-2.2.2' into toradex_imx_lf_v2022.04Max Krummenacher
This pulls in the following commits: git log --oneline --no-merges ^HEAD lf-5.15.71-2.2.2 14b6c8f3e3b MA-20886 imx8ulp: Boot from recovery mode when pressing key 62ad7799b6c LF-7602: Device tree fixup based on compatible string b35420da607 crypto: fsl_hash: Remove unnecessary alignment check in caam_hash() 918dbf78bbb MA-20872 Revert "MA-18775 system will hang about 3s when boot up kernel" ed2c3cbd6ac MA-20814 add fastboot command to erase u-boot env a6762e28bf0 LF-6627: nand drvier fixups in sdboot on ls1043ardb-pd d23cfa09767 LFU-426: qspihdr: Coverity Issue: unchecked return value 413b08f841f MLK-25850: imx8dxl_ddr3l_evk: change the default fdt file name e91a047f54f LF-7382: fastboot: improve emmc write speed 205680f9f4b LFU-428 imx8ulp: Add warning for CAAM non-secure state failure f405551dcc1 LF-7369-2 clk: imx93: update LPCG control API 676831be672 LF-7369-1 clk: imx: implement a clock gate driver for i.MX93 94c5bb2eb83 MA-20507-7 trusty: fix dereference null return value 6933487b4df LFU-427 imx93: Print ELE FW version 15b1ebb00cc LFU-393 imx93: Add reset cause print f3b75e3317d LF-7332 imx8/ahab: sha256: enable image verification using ARMv8 crypto extention 330e2634143 LFU-423: usb: cdns3: gadget: Avoid using usb_ss after null check 58ba744cbad MLK-26034 imx6: Disable LCDIF clock before jumping to kernel ae396d343a3 LF-6627: nand drvier fixups in nandboot on ls1043ardb-pd 0a99627b60e LFU-422-2 imx8ulp_evk: Enable the GD25LX256E support c6c06de038f LFU-422-1 mtd: spi-nor: Add GigaDevice GD25LX256E NOR flash 032fab5e127 LFU-421 imx93_evk: Add imx93 low drive mode support on 11x11 EVK d9f477625d3 LF-7332 armv8: SHA-256 using ARMv8 Crypto Extensions 53689e4f7db MA-20667 set metadata partition of type f2fs f824cd01955 LFU-415 net: fec_mxc: Skip recv packet process when fec is halted 4e7c44e1f33 LFU-419 arm: dts: imx8mp: fix flexspi nand reg 957bdd9c925 LFU-418 imx8ulp: upower_hal: make code cleaner 361b23b98ed Revert "MLK-25478-1 efi: add Platform-Reset-Attack variables" e1ed0611b5e Revert "MLK-25478-2 efi: clean memory and reset MemoryOverwriteRequestControl" 4998fef38a5 Revert "MLK-25478-3 workaround: disable verify time of signer and signee." 320096439b6 MA-20738 imx8ulp: bumps CONFIG_LMB_MAX_REGIONS c244bdfd76c LFU-417-2 imx93_evk/qsb: Enable DDR inline ECC feature 026521c7d65 LFU-417-1 ddr: imx: imx9: Add DDR inline ECC support a555a21be69 LFU-413 imx8ulp_evk: Remove CONFIG_BOOTDELAY=0 from ND defconfig aaead5a2b8d LFU-416 imx: cmd_dek: Fix build warning in blob_encap_dek 933a3b25fe3 LF-7234 enable CONFIG_CMD_CRC32 and CONFIG_CRC32_VERIFY 97fc905e7f7 LFU-409: imx8dxl: fix the i.MX8DXL ddr3l NAND DQS iomux setting aa4ebb66199 LFU-414 imx8ulp: clock: Update clocks to meet max rate restrictions 63d0579f397 LFU-410 imx: ele_ahab: Add ahab_sec_fuse_prog command 266dddae454 LFU-412 configs: imx93_evk: shrink mem= for jailhouse 5703d3ae37e LFU-411 imx8ulp: Always enable MIPI_DSI power switch 32965eb52f7 LFU-392 imx8ulp: upower: replace magic number with macro beb5e5e3303 MA-20677 imx8ulp: android: enable CONFIG_AHAB_BOOT by default bb45dd592db LFU-408 imx93evk: config the pmic standby voltage for buck1 25e38cb4762 LFU-407-02 ddr: imx9: Change the saved ddr data base to 0x2051c000 a8fef10ab92 LFU-407-01 configs: imx93: Update spl stack & bss base address 8731024fe7e LFU-406 mx6ul/mx6ulz: Fix build break caused by RNG patch a95afe08769 LF-7238 imx9: soc: Remove OPTEE memory from DRAM bank and MMU 19c3fdebf8d LFU-403-4 imx93_evk/qsb: Enable TMU sensor driver e1703ec06a4 LFU-403-3 iMX93: soc: print current CPU temperature 050a94e6365 LFU-403-2 DTS: imx93: Update TMU node to sync with kernel 91e711a565c LFU-403-1 thermal: imx_tmu: Update TMU driver to support iMX93 78749666dd3 LFU-402-3 imx93_evk/qsb: Use API to set max ARM clock 401b9824f92 LFU-402-2 iMX93: clock: Add API to set max ARM core clock e4722baa5af LFU-402-1 iMX93: soc: Get market segment and speed grading 432a4af9608 LFU-400 imx8ulp: clock: Clear dividers in PLL3DIV_PFD registers 53f06207782 LFU-399 imx8ulp: Reconfigure MRC3 for SRAM0 access 48a2221acc9 LFU-395 imx93: Add fused parts support d8760a74793 LFU-398-7 imx93_9x9_qsb: Enable Flexspi NOR support 1f500a59670 LFU-398-6 imx93_qsb: Enable M.2 VPCIe_3V3 and deassert SD3_nRST ba4f72198f5 LFU-398-5 DTS: imx93-9x9-qsb: Add flexspi NOR nodes and pinctrl d9f563336f7 LFU-398-4 imx93_11x11_evk: Enable Flexspi NOR support c56f2132d53 LFU-398-3 imx93_evk: Enable M.2 VPCIe_3V3 and deassert SD3_nRST b6cbe6b1416 LFU-398-2 DTS: imx93-11x11-evk: Enable and update flexspi NOR c45c4fb791b LFU-398-1 DTS: imx93: Update flexspi node in DTSi fab973fe1df LFU-397 imx8m: clock: not configure reserved SRC register 4881ba99fa4 LFU-396-7 imx93_9x9_qsp_defconfig: support splash screen 60e0e629f99 LFU-396-6 arm: dts: add imx93 9x9 ontat panel dts fffc330cf1a LFU-396-5 imx9: clock: add 300MHz fracn pll table ef6a3d9cc38 LFU-396-4 video: nxp: imx: add Add i.MX93 parallel display format encoder driver 5f414738a5f LFU-396-3 video: nxp: imx_lcdifv3: support VSYNC/HSYNC active low 21eb66fe1f8 LFU-396-2 video: nxp: imx: dsi: force DISPLAY_FLAGS_HSYNC_HIGH & DISPLAY_FLAGS_VSYNC_HIGH 88132ed0b4e LFU-396-1 video: simple_panel: make backlight optional 65287dc074d LF-7055: video: imx: Add set_parent calls to LVDS initialization 167f65006fb MLK-26021 imx93: add 9x9 qsb lpddr4 board 0a6297a290e MA-20677 imx8ulp: android: enable CONFIG_AHAB_BOOT by default 8789f3ca3e4 PLATSEC-1781-2 MX6: Device tree fix-up 60555c4a445 PLATSEC-1781-1 mx6ull:Add config CONFIG_OF_SYSTEM_SETUP 48b1d6e34fd MA-20149 set fs type of android partitions 9710cc4840e LFOPTEE-177 imx93evk: enable cmd_dek command f0721d67f03 LFOPTEE-177 imx8ulp: enable cmd_dek command bf07f5166bf LFOPTEE-177 imx: cmd_dek: add ELE DEK Blob generation support 6de56c3f629 LFOPTEE-177 s400_api: add DEK Blob generation Conflicts: drivers/crypto/fsl/fsl_hash.c commit 41b2182af73 ("crypto: fsl_hash: Remove unnecessary alignment check in caam_hash()") Both NXP and TXD branch did cherry-picking that commit, but NXP additionally removed a debug print (not present in master) while the TDX branch did not. Resolved by doing it the NXP way. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-01-31toradex: tdx-cfg-block: add 0086 i.mx8m mini skuJoao Paulo Goncalves
Add new product id 0086 Verdin iMX8M Mini DualLite 2GB IT. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20240131173204.100407-1-jpaulo.silvagoncalves@gmail.com/] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-12-22MA-21597 check spl fit pointer before parsing itJi Luo
the spl fit pointer could be set as NULL in HAB verify failed case, return error in such case. Change-Id: Idb44a19ca89f2a6065ea423782441e57109d6e3a Signed-off-by: Ji Luo <ji.luo@nxp.com> Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Backport from NXP downstream [6cb283bb4e19da6667abaedd83efc23a15fdc48d] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-12-22LFU-573-3 doc: imx8m: Update iMX8M secure boot and encrypted boot docYe Li
Update the documents of iMX8M secure boot and encrypted boot to mention the hash of FIT FDT and optional FIT FDT signature. Add the steps for how to sign and generate FIT FDT signature. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Backport from NXP downstream [25fdc42caa30faa586a277162ae5373d3e2bc2be] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-12-22LFU-573-2 imx8m: hab: Verify optional FIT FDT signatureYe Li
One limitation of verifying FIT hash approach is SPL must bind with FIT, because FIT FDT hash is inserted into SPL image and authenticated by ROM. For use cases need to upgrade the FIT individually, for example, android's dual bootloader, this patch introduces an optional approach. This optional approach adds FIT FDT signature (a new pair of IVT and CSF for FIT FDT structure) after original FIT image IVT and CSF. imx-mkimage always generates the new IVT and reserves the space for the new CSF. Users just need an additional signing step. This approach is default not enabled in SPL except Android build. To enable it, set CONFIG_IMX_SPL_FIT_FDT_SIGNATURE=y with CONFIG_IMX_HAB=y in u-boot defconfig Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Backport from NXP downstream [07b688228c5817e4d76cdc5484fd50f92e9cf1f0] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-12-22LFU-573-1 imx8m: hab: Verify hash of FIT FDT strucureYe Li
By default, we insert the hash of FIT FDT into SPL image (append it after DDR FW) by imx-mkimage. When secure boot, this hash is authenticated with SPL image by ROM. So the hash is trusted. Before SPL starts parsing FIT image, SPL should verify the FIT FDT structure with the hash to ensure the FIT FDT structure is trusted. This patch could resolve the problem that SPL FIT authentication is later than loading the FIT image. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Upstream-Status: Inappropriate [downstream specific] Upstream U-Boot fixed this differently in combination with binman to create the final bootcontainer. Commit 6039e0edc854 ("imx: hab: Simplify the mechanism") Backport from NXP downstream [0746cfd931de8f7591d263ff60dd806ffe23c093] Conflicts: arch/arm/mach-imx/spl.c (additional includes in theirs, boot/lz4.h, image.h, image.h now needed) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-12-20colibri-imx8x: configure usb hub to bypass modeAndrejs Cainikovs
This change configures Toradex Colibri iMX8X SoM USB hub to bypass mode, and brings out of the reset state. Upstream-Status: Submitted [https://lore.kernel.org/all/20231220103811.228515-4-andrejs.cainikovs@gmail.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-12-20colibri-imx8x: remove -u-boot.dtsi includeAndrejs Cainikovs
This file is included automatically since quite some time now. From documentation: U-Boot automatically looks for and includes a file with updates to the standard devicetree for your board, searching for them in the same directory as the main file, in this order: <orig_filename>-u-boot.dtsi <CONFIG_SYS_SOC>-u-boot.dtsi <CONFIG_SYS_CPU>-u-boot.dtsi <CONFIG_SYS_VENDOR>-u-boot.dtsi u-boot.dtsi Upstream-Status: Submitted [https://lore.kernel.org/all/20231220103811.228515-3-andrejs.cainikovs@gmail.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-12-20apalis-imx8: remove -u-boot.dtsi includeAndrejs Cainikovs
This file is included automatically since quite some time now. From documentation: U-Boot automatically looks for and includes a file with updates to the standard devicetree for your board, searching for them in the same directory as the main file, in this order: <orig_filename>-u-boot.dtsi <CONFIG_SYS_SOC>-u-boot.dtsi <CONFIG_SYS_CPU>-u-boot.dtsi <CONFIG_SYS_VENDOR>-u-boot.dtsi u-boot.dtsi Upstream-Status: Submitted [https://lore.kernel.org/all/20231220103811.228515-2-andrejs.cainikovs@gmail.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-12-11libfdt: Fix invalid version warningMichal Suchanek
python does not like the u-boot- prefix in the version, drop it. /usr/lib/python3.10/site-packages/setuptools/dist.py:544: UserWarning: The version specified ('u-boot-2022.10') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Upstream-Status: Backport [c977b184350479b8c43a0e002eaf2b13b510ba4f] The update of python setuptools from 68.2.2 to 69.0.2 in current OE master now fails the build without this fix. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-10-20apalis-imx8: initialize usb gadget in host modeAndrejs Cainikovs
This will prevent error on usb start: starting USB... Bus usb@5b0d0000: Port not available. Upstream-Status: Inappropriate [other] No iMX8 USB support present in mainline. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-10-20apalis-imx8: add USBH_EN gpio hogAndrejs Cainikovs
USB host interface is not working on some Apalis Toradex carrier boards with Apalis iMX8 SoM. This is due to USBH_EN pin, which powers USB peripherals, having a strong pull-down on some boards, and a weak pull-down on the others. This USBH_EN pin is left unconfigured, which means it is in its default state at cold boot: input with a strong pull-up. As a result, carrier boards with a weak pull-down have this signal high enough to trigger power delivery to USB peripherals, and opposite - boards with strong pull-down on USBH_EN have this signal below the threshold needed to trigger USB power delivery. This change configures the USBH_EN pin as gpio hog, fixing this issue for all Apalis carrier boards regardless of pull-down resistor value. Also, update apalis-imx8_defconfig via savedefconfig. Upstream-Status: Submitted [https://lore.kernel.org/all/20231020152516.57338-1-andrejs.cainikovs@gmail.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-10-11imx8: Enable env is nowhere for apalis and colibriJoao Paulo Goncalves
The downstream code will not build when the environment on MMC is not defined. This change makes it possible to use ENV_IS_NOWHERE for recovery mode without the need to enable the environment in MMC downstream. This is the same correction of commit 8bb483b3cb3d ("toradex: env: Enable env is nowhere for imx8 modules") that solve it for imx8mm/mp. The difference is that imx8 modules define the function on another file. Upstream-Status: Inappropriate [other] This change is specific to the downstream code, as the solution in upstream differs. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-06toradex: 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. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20231004191358.24488-1-francesco@dolcini.it/] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-10-06toradex: env: Enable env is nowhere for imx8 modulesJoao Paulo Goncalves
The downstream code will not build when the environment on MMC is not defined. Additionally, when the environment on EMMC is defined simultaneously with ENV_IS_NOWHERE, it takes priority. This change makes it possible to use ENV_IS_NOWHERE for recovery mode without the need to enable the environment in MMC downstream. Upstream-Status: Inappropriate [other] This change is specific to the downstream code, as the solution in upstream differs. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-25toradex: colibri-imx8x: Sync defconfig and usb idJoao Paulo Goncalves
Update defconfig with a savedefconfig and correct usb ids (vendor, vid and pid) to Toradex values. Upstream-Status: Inappropriate [configuration] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-25colibri-imx8qxp: enable fastboot supportIgor Opaniuk
Enable USB fastboot support (CONFIG_FASTBOOT). Upstream-Status: Pending Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> (cherry picked from commit f213fab63669c967a4136b9b527e3f7dc83902b8)
2023-09-22toradex: apalis-imx8: Sync defconfig and update usb idJoao Paulo Goncalves
Update defconfig with savedefconfig and change usb gadget identification to Toradex values. Upstream-Status: Inappropriate [configs] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-12board: toradex: verdin-imx8mp: enable usb device and fastboot supportMarcel Ziswiler
Enable USB device and fastboot support which may be used to load the Toradex Easy Installer FIT image. While at it also enable USB mass storage aka UMS support. Note that the i.MX 8M Plus recovery mode support is based on the USB boot stage of the BOOTROM and does NOT require USB SDP SPL aka serial downloader support. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230828213803.454303-1-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-09-12toradex: verdin-imx8mp: Savedefconfig syncJoao Paulo Goncalves
Update verdin imx8mp defconfig with a savedefconfig to show automatic configuration modifications more clearly. Upstream-Status: Inappropriate [configuration] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-12imx8mn/8mp: Allow booting via USBFabio Estevam
When trying to boot via USB on i.MX8MN it is necessary to specify the U-Boot environment location, otherwise the boot process simply hangs. Specify the environment location when booting from USB. Tested on a imx8mn-evk. Upstream-Status: Backport [d175982c207bb2ace592d7985cd3f05ab99759d9] Suggested-by: Michael Nazzareno Trimarchi <michael@amarulasolutions.com> Signed-off-by: Fabio Estevam <festevam@denx.de> Tested-by: Tim Harvey <tharvey@gateworks.com>
2023-09-12toradex: imx8mp: Enable serial number for fastbootJoao Paulo Goncalves
Fix build error when enabling fastboot support. FSL fastboot use serial number value when CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is enabled. Upstream-Status: Inappropriate [other] This is a downstream only fix. In upstream fsl fastboot is not implemented. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-12board: 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 Upstream-Status: Pending Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-09-04toradex: verdin-imx8mm: Enable usb sdp supportJoao Paulo Goncalves
Add necessary configuration options and device tree changes for usb sdp support. USB driver model disabled for SPL to reduce size as it is not needed for now for usb to works. Upstream-Status: Submitted [https://lore.kernel.org/all/20230822221726.8355-1-marcel@ziswiler.com] The changes are almost a backport from commit 1c2567a3f129 ("verdin-imx8mm: enable usb sdp spl recovery support") of u-boot-toradex next that was already submmited to upstream. The differences to the patch are device tree syntax and getting only the necessary configurations. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-04toradex: verdin-imx8mm: Enable LTO optimizationJoao Paulo Goncalves
Enable LTO to help reducing SPL binary size to avoid problems with DDR training firmware appended to it by nxp mkimage tool. When SPL binary grows too much there is a chance of corrupting this DDR firmware or DDR controller accessing memory beyond 256KB TCM RAM limit making SPL crash. Upstream-Status: Inappropriate [other] LTO was already enabled on upstream for verdin-imx8mm by commit 546dd667aab0 ("verdin-imx8mm: various config additions and improvements") Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-04toradex: usb: imx: Revert some donwstream changesJoao Paulo Goncalves
Revert donwstream changes for correct USB Gadget VID and PID handling. Upstream-Status: Inappropriate [other] This was need because of a donwstream change on commit e330a88a8a76 ("MLK-25803-2: Update VID/PID"). On upstream it is already corrected by commit a95aee6af70d ("usb: gadget: Make g_dnl USB settings common"). Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-04toradex: verdin-imx8mm: Update defconfigJoao Paulo Goncalves
Update verdin imx8mm defconfig with a savedefconfig to show automatic configuration modifications more clearly. The configurations changes were: - No CONFIG_USE_ETHPRIME or CONFIG_ETHPRIME on this u-boot version - CONFIG_SPL_CLK_COMPOSITE_CCF and CONFIG_CLK_COMPOSITE_CCF are enabled by default for IMX8MM - Default size for CONFIG_SYS_MALLOC_F_LEN already is 0x10000 - CONFIG_USB_GADGET_DOWNLOAD is enabled by default when FASTBOOT is enabled - CONFIG_DM_USB is enabled by default when USB and DM are enabled Other changes are just positional. Upstream-Status: Inappropriate [other] These cofigurations changes are a result of a savedefconfig for this u-boot version that is behind upstream. Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-09-04ARM: imx8m: verdin-imx8mm: Drop bogus content from spl_board_init()Marek Vasut
The current implementation of spl_board_init() USB boot handling is not correct, the MX8MM BootROM v1 does not support SDP load when re-entered from U-Boot SPL, it is up to U-Boot to perform the next stage load using its own internal CI gadget driver and SDP protocol implementation. Drop the spl_board_init() to let SPL continue with normal load in case the SDP support is enabled. Upstream-Status: Backport[f687c1ef4fdf14faea16c13b1eaac5496dee39df] Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-09-04usb: Add missing guard around env_get() in usb_hubMarek Vasut
The env_get() might be undefined in case ENV_SUPPORT is disabled, which may happen e.g. in SPL. Add missing ifdef guard around the env_get() to prevent build failure. Upstream-Status: Backport[fcb670b794c9839c026757bf2d5cd564323ce199] Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Fabio Estevam <festevam@denx.de>
2023-09-04u-boot-initial-env: rework make targetMax Krummenacher
With LTO enabled the U-Boot initial environment is no longer stored in an easy accessible section in env/common.o. I.e. the section name changes from build to build, its content maybe compressed and it is annotated with additional data. Drop trying to read the initial env with elf tools from the compiler specific object file in favour of adding and using a host tool with the only functionality of printing the initial env to stdout. See also: https://lore.kernel.org/all/927b122e-1f62-e790-f5ca-30bae4332c77@foss.st.com/ Upstream-Status: Backport[486aef08de091ca35386f32fe961a201c3cfa9d4] ​ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-21Bump LMB_MAX_REGIONS default to 16Sjoerd Simons
Since commit 06d514d77c37 ("lmb: consider EFI memory map") the EFI regions are also pushed into the lmb if EFI_LOADER is enabled (which is by default on most system). Which can cause the number of entries to go over the maximum as it's default is only 8. Specifically i ran into this case on an TI am62 which has an fdt with 4 reserved regions (in practice 3 lmb entries due to adjecent ranges). As this is likely to impact more devices bump the default max regions to 16 so there is a bit more slack. Upstream-Status: Backport[2dc16a2c1f924985216b3f1d6710f96d6c4fb1ab] Fixes: 06d514d77c ("lmb: consider EFI memory map") Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1207562 Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com> Signed-off-by: Michal Suchanek <msuchanek@suse.de> [trini: collect tags from the other equivalent patch]
2023-07-18toradex: tdx-cfg-block: rework display adapter name handlingMax Krummenacher
Rework the rather big array of zero length strings with 4 entries of actual display adapter names to a array of structs which ties a pid4 to its correspondent human readable string. Provide an accessor to get the string for a given PID4. Upstream-Status: Submitted [https://lore.kernel.org/all/20230718090734.20357-4-andrejs.cainikovs@toradex.com/] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-18toradex: tdx-cfg-block: rework carrier board name handlingMax Krummenacher
Rework the rather big array of zero length strings with 4 entries of actual carrier board names to a array of structs which ties a pid4 to its correspondent human readable string. Provide an accessor to get the string for a given PID4. Rework the user of the information to use the accessor. Note that check_pid8_sanity() is used for early samples of Dahlia and the development board. Yavia isn't affected. Upstream-Status: Submitted [https://lore.kernel.org/all/20230718090734.20357-3-andrejs.cainikovs@toradex.com/] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-18toradex: tdx-cfg-block: add yavia carrier cfg block infoMax Krummenacher
Add the Yavia Carrier board name string to the known carrier board list. Upstream-Status: Submitted [https://lore.kernel.org/all/20230718090734.20357-2-andrejs.cainikovs@toradex.com/] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-11arm64: dts: verdin-imx8mp: add ctrl_sleep_moci# hogAndrejs Cainikovs
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Upstream-Status: Submitted [https://lore.kernel.org/all/20230711090918.523772-6-marcel@ziswiler.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-11arm64: dts: verdin-imx8mp: move ctrl_sleep_moci gpioAndrejs Cainikovs
Move ctrl_sleep_moci pin to gpio bank &gpio4, where it belongs. Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support") Upstream-Status: Inappropriate [other] This is fixed in upstream via device tree synchronisation patch: https://lore.kernel.org/all/20230711090918.523772-2-marcel@ziswiler.com/ Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-11configs: verdin-imx8mp: enable spl_gpio_hogAndrejs Cainikovs
Enable CONFIG_SPL_GPIO_HOG option to be able to control GPIO hogs from SPL. Upstream-Status: Submitted [https://lore.kernel.org/all/20230711090918.523772-5-marcel@ziswiler.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-11arm64: dts: verdin-imx8mm: add ctrl_sleep_moci# hogAndrejs Cainikovs
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Upstream-Status: Submitted [https://lore.kernel.org/all/20230711090918.523772-4-marcel@ziswiler.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-11configs: verdin-imx8mm: enable spl_gpio_hogAndrejs Cainikovs
Enable CONFIG_SPL_GPIO_HOG option to be able to control gpio hog from SPL. Upstream-Status: Submitted [https://lore.kernel.org/all/20230711090918.523772-3-marcel@ziswiler.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-06-15gpio: fix incorrect depends on for SPL_GPIO_HOGQuentin Schulz
Since commit 83061dbd1c89 ("Rename GPIO_SUPPORT to GPIO"), SPL_GPIO_SUPPORT has been renamed to SPL_GPIO, meaning that SPL_GPIO_HOG can never be enabled. Let's fix this by using the proper name for the Kconfig option. Upstream-Status: Backport [5536a5f4ac12f4f14e31c85305c2fc7647d5fc03] Fixes: 1d99e673c752 ("gpio: Enable hogging support in SPL") Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-15gpio: Enable hogging support in SPLEddie James
Use the CONFIG macros to conditionally build the GPIO hogging support in either the SPL or U-Boot, or both, depending on the configuration. Also call the GPIO hog probe function in the common SPL board initialization as an equivalent to adding it to the U-Boot init sequence functions. Upstream-Status: Backport [1d99e673c752bc7d55aa25b02e050741496f7109] Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15toradex: tdx-cfg-block: add 0070 verdin i.mx 8m plus quad skuEmanuele Ghidoli
Add new i.MX 8M Plus Quad SKU to ConfigBlock handling. 0070: Verdin iMX8M Plus Quad 8GB WB IT This SKU is identical to 0066 but supporting Industrial Temperature range. Upstream-Status: Submitted [https://lore.kernel.org/all/20230515130641.26028-1-francesco@dolcini.it/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-05-02configs: verdin-imx8mp: enable ARCH_MISC_INITSergio Prado
This is required to boot a FIT image, otherwise the caam_jr driver is not initialized and the hash verification fails with the following error: Verifying Hash Integrity ... sha256dev_get_priv: null device CAAM was not setup properly or it is faulty Upstream-Status: Submitted [https://lore.kernel.org/all/20230502085751.496122-1-marcel@ziswiler.com/] Signed-off-by: Sergio Prado <sergio.prado@toradex.com>
2023-04-26crypto: fsl_hash: Remove unnecessary alignment check in caam_hash()Stefan Roese
While working on an LX2160 based board and updating to latest mainline I noticed problems using the HW accelerated hash functions on this platform, when trying to boot a FIT Kernel image. Here the resulting error message: Using 'conf-freescale_lx2160a.dtb' configuration Trying 'kernel-1' kernel subimage Verifying Hash Integrity ... sha256Error: Address arguments are not aligned CAAM was not setup properly or it is faulty error! Bad hash value for 'hash-1' hash node in 'kernel-1' image node Bad Data Hash ERROR: can't get kernel image! Testing and checking with Gaurav Jain from NXP has revealed, that this alignment check is not necessary here at all. So let's remove this check completely. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Gaurav Jain <gaurav.jain@nxp.com> Cc: dullfire@yahoo.com Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2023-04-03board: colibri-imx8x: initialize snvsAndrejs Cainikovs
Initialize Secure Non-Volatile Storage, aka SNVS. Upstream-Status: Submitted [https://lore.kernel.org/all/20230403111426.61327-3-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-04-03colibri-imx8x: enable i.MX specific BOOTAUX and SNVSAndrejs Cainikovs
- Enable CONFIG_IMX_BOOTAUX - Add SNVS support Upstream-Status: Inappropriate [other] So far no boards have SNVS support enabled in mainline, even though support for iMX8QX is in place. CONFIG_IMX_BOOTAUX option in mainline can be enabled only for IMX8M. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-04-03colibri-imx8x: print firmware versionsAndrejs Cainikovs
Print firmware versions during U-Boot start: BuildInfo: - SCFW f5623878, SECO-FW c9de51c0, IMX-MKIMAGE 0, ATF c6a19b1 - U-Boot 2022.04-00335-g65192567f81-dirty Upstream-Status: Submitted [https://lore.kernel.org/all/20230403111426.61327-2-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-04-03colibri-imx8x: add usb supportAndrejs Cainikovs
Add USB support. Upstream-Status: Pending As of now, no iMX8 USB support present in mainline. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>