summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-07colibri-imx8x: increase SYS_MALLOC_F_LENAndrejs Cainikovs
Increase SYS_MALLOC_F_LEN to 0x8000 to get U-Boot into bootable state. Upstream-Status: Inappropriate [other] Downstream fails silently without this change, while upstream works fine. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: enable fuse commandAndrejs Cainikovs
This command is required for initial SoC provisioning. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-18-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: set bootdelayMarcel Ziswiler
Set the boot delay to one second. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-16-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: enable environment bootcount limitMarcel Ziswiler
Enable optional environment bootcount limit functionality. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-15-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: set bootaux memory base and sizeAndrejs Cainikovs
Move i.MX auxiliary core memory base and size configuration to defconfig where it should belong. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-14-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: update env memory layoutMarcel Ziswiler
Update the distro config env memory layout for the Colibri iMX8X: - kernel_comp_addr_r=0xb0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95c00000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Idea of memory layout taken from commit a9f1e35bedc4 ("apalis-imx8: update env memory layout"). Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-13-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: switch from fatload to loadAndrejs Cainikovs
Make sure M4 binary loading works equally well on ext4 as well as fat file systems. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-12-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: provide proper CONFIG_SYS_PROMPTIgor Opaniuk
Provide proper sys prompt, which should be "Colibri iMX8X #". Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-11-andrejs.cainikovs@toradex.com/] Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: drop obsolete environment variablesAndrejs Cainikovs
Drop obsolete environment variables boot_file, bootcmd_mfg, fdt_addr, finduuid, image, mfgtool_args, mmcargs, mmcdev, mmcpart, panel, sec_boot, vidargs. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-10-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: construct fdtfile dynamicallyAndrejs Cainikovs
The following expression is used to construct the device tree name: fdtfile=${soc}-colibri-${fdt_board}.dtb - soc is set dynamically (either imx8qxp or imx8dx) - fdt_board can be modified by the user (eval-v3, aster, iris/iris-v2) Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-9-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: extract is_imx8dx() from ram detectionMax Krummenacher
Refactor the detection of QXP vs. DX SoC into its own helper function. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-8-andrejs.cainikovs@toradex.com/] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: update update_uboot confirmation messageMarcel Ziswiler
Update update_uboot confirmation message. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-7-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: remove obsolete sdhc related config definesMarcel Ziswiler
Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-6-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: remove obsolete net usb startMarcel Ziswiler
Remove obsolete net USB start. While at it also add a comment about enabling distro-boot. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-5-andrejs.cainikovs@toradex.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07defconfig: colibri-imx8x: enable CONFIG_OF_SYSTEM_SETUPPhilippe Schenker
Enable a call to ft_system_setup() which reserves M4 memory region. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-4-andrejs.cainikovs@toradex.com/] Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07colibri-imx8x: Remove baudrate from console argumentPhilippe Schenker
This commit does remove the options argument from the console kernel-argument as it prevents the serial driver from outputting anything. Do this by switchting to use the variable "setup" as it is done on other Toradex modules. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-3-andrejs.cainikovs@toradex.com/] Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-03-07board: colibri-imx8x: add 2nd ethernet addressAndrejs Cainikovs
All Colibri iMX8X variants have 2nd RGMII on SoC, so add the address for 2nd ethernet. Upstream-Status: Submitted [https://lore.kernel.org/all/20230303132642.15574-2-andrejs.cainikovs@toradex.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-02-16configs: verdin-imx8mp: Fix wrong early malloc() heap sizeEmanuele Ghidoli
Set, previously unset, CONFIG_SPL_SYS_MALLOC_F_LEN to 0x4000 whose default value is 0x10000. Early malloc() uses CRAM_S at 0x184000 (CFG_MALLOC_F_ADDR), this ram area end at 0x188000. Upstream-Status: Submitted [https://lore.kernel.org/all/20230216113116.24812-1-francesco@dolcini.it/] Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support") Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-02-14board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDRMarek Vasut
In case the MALLOC_F_ADDR is set to non-zero value, the early malloc area is not going to be placed just below stack top, but elsewhere. Do not reserve MALLOC_F bytes in this case, as that wastes stack space and may even cause insufficient stack space in SPL. This functionality is particularly useful on i.MX8M, where the insufficient stack space can be triggered. Upstream-Status: Backport [5004901efb3b47f7fb22b29cdd127245d3814fd2] Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Tom Rini <trini@konsulko.com>
2023-02-08apalis-imx8_defconfig: Increase LMB_MAX_REGIONSPhilippe Schenker
We hit the limit of maximum LMB regions of 8. We hit this limit when trying to boot with an inird image. The fdt code then tries to allocate memory for the fdt relocation and does not get a memory-range. Increase this limit to 16 so we have enough logical memory blocks available for our use-case. Upstream-Status: Inappropriate [other] Mainline U-Boot will increase the default value of the setting as mentioned by Tom Rini, as many boards seem to be short of LMB memory regions due to a completely different change in EFI area. [1] [1] https://lore.kernel.org/all/Y+O86N%2F0YHfddoI9@bill-the-cat/ Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2023-02-07board: verdin-imx8mp: change prints in spl_dram_init functionEmanuele Ghidoli
change prints to show which DDR configuration (single/dual rank) is used Upstream-Status: Pending Waiting for internal test and validation before sending to upstream. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-02-07board: verdin-imx8mp: compact slight different LPDDR4 configurationEmanuele Ghidoli
Deduplicate similar DDRC configurations and LPDDR4 training patterns by patching a single configuration. The aim is to reduce the SPL memory footprint and simplify maintenance of lpddr4_timing.c Upstream-Status: Pending Waiting for internal test and validation before sending to upstream. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-02-07board: verdin-imx8mp: update LPDDR4 configuration and trainingEmanuele Ghidoli
Update lpddr4 configuration and training using updated spreadsheet and tools from NXP using data from previous spreadsheet and verified toward datasheet: - MX8M_Plus_LPDDR4_RPA_v9.xlsx - mscale_ddr_tool_v3.30.exe From: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/1104467 Some register values differ due to these fixes/modifications: - corrected calculation of T_CKPDX parameter (equal to tCKCKEH for LPDDR4) - corrected ECC related items, none of which affect normal operation when ECC is not enabled - corrected formula for calculation of tRTP in cell D122 Upstream-Status: Pending Waiting for internal test and validation before sending to upstream. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-02-07board: verdin-imx8mp: fix LPDDR4 refresh timingEmanuele Ghidoli
Change tRFCmin (tRFCab) from 280 ns to 380 ns to be compliant with current and futures memories. Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support") Upstream-Status: Pending Waiting for internal test and validation before sending to upstream. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-02-07board: verdin-imx8mp: update DDRC config to support different LPDDR4 memoriesEmanuele Ghidoli
Add support to Verdin IMX8MP V1.1B SKU which uses MT53E1G32D2FW-046 WT:B memory. Compared to the 8 GB memory (MT53E2G32D4NQ-046 WT:A) used on Verdin IMX8MP V1.0A it has 16 row addresses instead of 17. In fact, the new memory, is a 2 GB/rank memory. The 8 GB memory is a 4 GB/rank memory. Manually tweaking Host Interface addresses vs LPDDR4 signals mapping it is possible to have a single configuration working with both memories: - Old configuration: HIF bit 30 -> rank, HIF bit 29 -> Row 16 - New configuration: HIF bit 29 -> rank, HIF bit 30 -> Row 16 With this change the memory space from the host processor is contiguous for both the configurations and the correct memory size is computed using get_ram_size() at runtime. Support for single rank memories still works thanks to the fact dual ranks training fails (ddr_init->ddr_cfg_phy) toward single rank memories. Related-to: ELB-5021 Upstream-Status: Pending Waiting for internal test and validation before sending to upstream. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-01-19board: apalis-imx8: add 2nd ethernet addressAndrejs Cainikovs
All Apalis iMX8 variants have 2nd RGMII on SoC, so add the address for 2nd ethernet. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230117142911.34257-1-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: add new 8gb wifi/bt som variantAndrejs Cainikovs
Add new SoM variant to existing ones. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-3-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalix-imx8: add mmc card pinctrl's for different speedsAndrejs Cainikovs
Add pinctrl's for high speed MMCs. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-23-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: integrate fastboot recoveryIgor Opaniuk
Upstream-Status: Inappropriate [other] No iMX8 USB support present in mainline. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> (cherry picked from commit 99849529ace8cf130309eaa93bc9a5e325b903e2)
2023-01-19apalix-imx8: downstream usb supportAndrejs Cainikovs
Add USB support. Upstream-Status: Inappropriate [other] No iMX8 USB support present in mainline. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: delete boot_file environment variableAndrejs Cainikovs
Delete unused boot_file environment variable. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-15-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: add M4 boot environment helpersAndrejs Cainikovs
Add M4 boot environment functions for reference. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-22-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: enable i.MX specific BOOTAUX and SNVSAndrejs Cainikovs
- Enable CONFIG_IMX_BOOTAUX - Add SNVS support Upstream-Status: Inappropriate [other] SNVS support on mainline is present only for iMX8QX, but not for QM. CONFIG_IMX_BOOTAUX option on mainline can be enabled only for IMX8M. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: set bootaux memory base and sizeAndrejs Cainikovs
Set i.MX auxiliary core memory base and size. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-21-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19apalis-imx8: defconfig clean-upAndrejs Cainikovs
- Remove non-existent CONFIG_EVENT - Cleanup via savedefconfig Upstream-Status: Inappropriate [other] CONFIG_EVENT does not exist in this version of downstream, but does exist and used on mainline. Also, clean-up via savedefconfig - this will make sure future cherry-pics or merges apply without or with less conflicts. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19board: apalis-imx8: initialize snvsAndrejs Cainikovs
Initialize Secure Non-Volatile Storage, aka SNVS. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-20-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19board: apalis-imx8: add reset codeAndrejs Cainikovs
Add downstream specific iMX reset implementation. Upstream-Status: Inappropriate [other] This code uses sc_pm_reboot() which is not mainlined yet. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19board: apalis-imx8: remove board_phy_config duplicateAndrejs Cainikovs
Remove a duplicate of weak board_phy_config() implementation in drivers/net/phy/phy.c. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-19-francesco@dolcini.it/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-19board: apalis-imx8: get rid of sc_err_t typePhilippe Schenker
sc_pm_setup_uart() returns int, not sc_err_t. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20230113171751.331268-18-francesco@dolcini.it/] (cherry picked from commit ecc0917dd4f7efd064a1b58f4f75b85478a794b3) Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-01-05configs: verdin-imx8mm: Add bootaux commandPhilippe Schenker
The i.MX 8M Mini SoC does incorporate an additional M-Core. To be able to load it with a firmware, enable bootaux command as other Toradex modules also have it enabled to be consistent. Upstream-Status: Submitted [https://lore.kernel.org/all/20230104190216.145187-2-dev@pschenker.ch/] Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2022-12-23apalix-imx8: add emmc pinctrl's for different speedsPhilippe Schenker
Upstream-Status: Inappropriate [other] Downstream requires emmc pinctrl's for high speeds, while upstream doesn't. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2022-12-23fastboot: fix undefined serial[] errorAndrejs Cainikovs
This change fixes build error when CONFIG_SERIAL_TAG is not set and CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is set. Upstream-Status: Inappropriate [other] Fixes a build failure, which was introduced by one of the downstream commits. Fixes: 7af6854dacab ("MA-15321-2 Add command to get serial number") Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2022-12-23apalis-imx8: increase SYS_MALLOC_F_LENAndrejs Cainikovs
Increase SYS_MALLOC_F_LEN to 0x8000 to get U-Boot into bootable state. Upstream-Status: Inappropriate [other] Downstream fails silently without this change, while upstream works fine. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2022-12-23apalis-imx8: update env memory layoutMarcel Ziswiler
Update the distro config env memory layout for the Apalis iMX8 aka QuadMax: - kernel_comp_addr_r=0xf0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95400000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Basic idea of memory layout taken from commit fd5c7173ade4 ("imx8m{m,n}_venice: update env memory layout"). However, moved past any reserved areas to avoid any kind of conflicts. Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-17-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: update update_uboot confirmation messageMarcel Ziswiler
Update update_uboot confirmation message. Upstream-Status: Backport [https://lore.kernel.org/all/20221212000930.45505-16-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: drop obsolete environment variablesMarcel Ziswiler
Drop obsolete environment variables fdt_addr, finduuid, mmcargs, mmcdev, mmcpart and panel. Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-15-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: introduce setup setting setupargsMarcel Ziswiler
Introduce setup setting setupargs and move earlycon there. Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-14-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: remove obsolete net usb startMarcel Ziswiler
Remove obsolete net USB start. While at it also add a comment about enabling distro-boot. Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-13-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: remove obsolete SDHC related config definesMarcel Ziswiler
Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree. Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-12-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-12-23apalis-imx8: update spdx license identifier stringMarcel Ziswiler
Update SPDX license identifier string. While at it also update copyright period. Upstream-Status: Submitted [https://lore.kernel.org/all/20221212000930.45505-11-marcel@ziswiler.com/] Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>