From 0c141103b4601cf0957122255f5b284184be9117 Mon Sep 17 00:00:00 2001 From: Francesco Dolcini Date: Wed, 1 Sep 2021 09:48:03 +0200 Subject: colibri-imx7: improve env badblock management Use the complete 512kb (4 blocks) nand partition reserved for u-boot environment instead of just the first block, this allows the module to have a working environment even if 3 blocks are bad. Signed-off-by: Francesco Dolcini --- include/configs/colibri_imx7.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index faf27ba4fa3..92e24ea8c61 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -180,6 +180,11 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +/* environment organization */ +#if defined(CONFIG_ENV_IS_IN_NAND) +#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE) +#endif + #ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND /* NAND stuff */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 -- cgit v1.2.3 From 8b71576f3842bee0559b3865ed0b129c417f27c9 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Sun, 12 Sep 2021 17:32:57 +0300 Subject: mx7ulp_com: add support for SPL Add EA iMX7ULP COM board support for building SPL. Signed-off-by: Ricardo Salveti Signed-off-by: Oleksandr Suvorov --- include/configs/mx7ulp_com.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h index 8c4d94215b9..75f5cf0b6de 100644 --- a/include/configs/mx7ulp_com.h +++ b/include/configs/mx7ulp_com.h @@ -11,6 +11,10 @@ #include #include +#ifdef CONFIG_SPL +#include "imx7ulp_spl.h" +#endif + #define CONFIG_BOARD_POSTCLK_INIT #define CONFIG_SYS_BOOTM_LEN 0x1000000 @@ -67,5 +71,7 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +#define CONFIG_ARMV7_SECURE_BASE 0x2F000000 + #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #endif /* __CONFIG_H */ -- cgit v1.2.3 From c4c1ed68c1e85ed3100840e395d40294d38f5f7c Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 23 Nov 2021 13:33:30 -0300 Subject: imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: - 1GiB DDR4 RAM - 16 GiB eMMC - SD card - Gigabit ethernet - USBOTG1 peripheral - fastboot Signed-off-by: Ariel D'Alessandro Reviewed-by: Tom Rini Reviewed-by: Fabio Estevam --- include/configs/imx8mn_var_som.h | 90 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 include/configs/imx8mn_var_som.h (limited to 'include') diff --git a/include/configs/imx8mn_var_som.h b/include/configs/imx8mn_var_som.h new file mode 100644 index 00000000000..1e800f0ecc0 --- /dev/null +++ b/include/configs/imx8mn_var_som.h @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 Collabora Ltd. + */ + +#ifndef __IMX8MN_VAR_SOM_H +#define __IMX8MN_VAR_SOM_H + +#include +#include +#include + +#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) + +#define CONFIG_SPL_MAX_SIZE (148 * SZ_1K) +#define CONFIG_SYS_MONITOR_LEN SZ_512K +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +#define CONFIG_SYS_UBOOT_BASE \ + (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) + +#define CONFIG_SPL_STACK 0x980000 +#define CONFIG_SPL_BSS_START_ADDR 0x950000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(MMC, mmc, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) \ + +#include + +/* ENET */ +#if defined(CONFIG_FEC_MXC) +#define CONFIG_ETHPRIME "FEC" +#define CONFIG_FEC_XCV_TYPE RGMII +#endif /* CONFIG_FEC_MXC */ + +#define MEM_LAYOUT_ENV_SETTINGS \ + "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "ramdisk_addr_r=0x43800000\0" \ + "fdt_addr_r=0x43000000\0" \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "fastboot_partition_alias_all=" \ + __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".0:0\0" \ + "fastboot_partition_alias_bootloader=" \ + __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".1:0\0" \ + "emmc_dev=" __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) "\0" \ + "emmc_ack=1\0" \ + "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + +/* Initial environment variables */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + MEM_LAYOUT_ENV_SETTINGS \ + BOOTENV + +/* Link Definitions */ + +#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +#define CONFIG_SYS_INIT_RAM_SIZE SZ_512K +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define PHYS_SDRAM 0x40000000 +#define PHYS_SDRAM_SIZE SZ_1G /* 1GB DDR */ + +#define CONFIG_MXC_UART_BASE UART4_BASE_ADDR + +/* Monitor Command Prompt */ +#define CONFIG_SYS_CBSIZE SZ_2K +#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) + +/* USDHC */ +#define CONFIG_SYS_FSL_ESDHC_ADDR 0 + +/* I2C */ +#define CONFIG_SYS_I2C_SPEED 400000 + +#endif /* __IMX8MN_VAR_SOM_H */ -- cgit v1.2.3 From ca27227c5940371c792cfd36826315b3e17e46a1 Mon Sep 17 00:00:00 2001 From: Christoph Niedermaier Date: Sun, 28 Nov 2021 03:53:18 +0100 Subject: ARM: dts: imx6q-dhcom: Use 1G ethernet on the PDK2 board The PDK2 board is capable of running both 100M and 1G ethernet. However, the i.MX6 has only one ethernet MAC, so it is possible to configure either 100M or 1G Ethernet. In case of 100M option, the PHY is on the SoM and the signals are routed to a RJ45 port. For 1G the PHY is on the PDK2 board with another RJ45 port. 100M and 1G ethernet use different signal pins from the i.MX6, but share the MDIO bus. This SoM board combination is used to demonstrate how to enable 1G ethernet configuration. Signed-off-by: Christoph Niedermaier Signed-off-by: Marek Vasut Cc: Christoph Niedermaier Cc: Stefano Babic --- include/configs/dh_imx6.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 8b8cd4c31b4..410ac890762 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -32,9 +32,9 @@ /* FEC ethernet */ #define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RMII +#define CONFIG_FEC_XCV_TYPE RGMII #define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 0 +#define CONFIG_FEC_MXC_PHYADDR 7 #define CONFIG_ARP_TIMEOUT 200UL /* MMC Configs */ -- cgit v1.2.3 From f8a5cda5ec27fd532a218c9988aa30b2318cb13d Mon Sep 17 00:00:00 2001 From: "Ying-Chun Liu (PaulLiu)" Date: Wed, 12 Jan 2022 00:38:04 +0800 Subject: configs: imx8mm-cl-iot-gate: update dfu_alt_info for single flash.bin We changed to single flash.bin now. So dfu_alt_info should be modified to reflect this change. Signed-off-by: Ying-Chun Liu (PaulLiu) Reviewed-by: Fabio Estevam --- include/configs/imx8mm-cl-iot-gate.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/imx8mm-cl-iot-gate.h b/include/configs/imx8mm-cl-iot-gate.h index 991839c0bcd..7e6be6050c0 100644 --- a/include/configs/imx8mm-cl-iot-gate.h +++ b/include/configs/imx8mm-cl-iot-gate.h @@ -72,8 +72,7 @@ "fdt_addr=0x43000000\0" \ "fdt_addr_r=0x43000000\0" \ "boot_fit=no\0" \ - "dfu_alt_info=mmc 2=flash-bin raw 0x42 0x250 mmcpart 1;" \ - "u-boot-itb raw 0x300 0x1B00 mmcpart 1\0" \ + "dfu_alt_info=mmc 2=flash-bin raw 0x42 0x1D00 mmcpart 1\0" \ "fdt_file=sb-iotgimx8.dtb\0" \ "fdtfile=sb-iotgimx8.dtb\0" \ "initrd_addr=0x43800000\0" \ -- cgit v1.2.3 From efaf9a2b32d8e054874515b6b52751858c614e92 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Sun, 16 Jan 2022 22:38:31 +0100 Subject: imx8mq_evk: configs: add/cleanup variables for distro boot Add fdt_addr_r fdtfile which used by distro boot, and cleanup legacy environment variables. Signed-off-by: Andrey Zhizhikin --- include/configs/imx8mq_evk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index 6e1d387e2b1..5f587f73363 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -61,13 +61,13 @@ /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "scriptaddr=0x43500000\0" \ - "kernel_addr_r=0x40880000\0" \ + "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "image=Image\0" \ "console=ttymxc0,115200\0" \ - "fdt_addr=0x43000000\0" \ + "fdt_addr_r=0x43000000\0" \ "boot_fdt=try\0" \ - "fdt_file=imx8mq-evk.dtb\0" \ + "fdtfile=imx8mq-evk.dtb\0" \ "initrd_addr=0x43800000\0" \ "bootm_size=0x10000000\0" \ "mmcpart=1\0" \ -- cgit v1.2.3 From 8c34cdc7358629b153fafd6bd4e27601d3ad508b Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 17 Jan 2022 12:31:46 +0100 Subject: imx: ventana: correct splashimage load address Commit 72d81360aabd ("global: Convert CONFIG_LOADADDR to CONFIG_SYS_LOADADDR") dropped the usage of LOADADDR and replaced it with SYS_LOADADDR. Use the correct macro in environment by replacing CONFIG_LOADADDR with CONFIG_SYS_LOADADDR. Fixes: d75ebf3482c3 ("imx: ventana: fix splash logo drawing") Signed-off-by: Andrey Zhizhikin Cc: Tim Harvey Reviewed-by: Fabio Estevam Acked-By: Tim Harvey --- include/configs/gw_ventana.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 2853d75a163..8f73c3b873c 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -104,7 +104,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ + "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "usb_pgood_delay=2000\0" \ "console=ttymxc1\0" \ "bootdevs=usb mmc sata flash\0" \ -- cgit v1.2.3 From a7e22ec90e2af84c80161b7787c0d379e48e757c Mon Sep 17 00:00:00 2001 From: Oliver Graute Date: Wed, 26 Jan 2022 22:55:08 +0100 Subject: imx: imx8qm_rom7720: Increase CONFIG_SYS_BOOTM_LEN to 64MB Increase CONFIG_SYS_BOOTM_LEN to 64MB Signed-off-by: Oliver Graute --- include/configs/imx8qm_rom7720.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h index 1a553510f6d..c2c5493abd6 100644 --- a/include/configs/imx8qm_rom7720.h +++ b/include/configs/imx8qm_rom7720.h @@ -21,6 +21,8 @@ #define USDHC2_BASE_ADDR 0x5B020000 #define USDHC3_BASE_ADDR 0x5B030000 +#define CONFIG_SYS_BOOTM_LEN SZ_64M + /* FUSE command */ /* Boot M4 */ -- cgit v1.2.3 From 8f55003c587bf10ee8c5d90cae23430109a74d7d Mon Sep 17 00:00:00 2001 From: Oliver Graute Date: Wed, 26 Jan 2022 22:56:07 +0100 Subject: imx: imx8qm_rm7720: adjust fdt_addr The Linux Kernel Image size for arm64 is still growing. A Kernel with 54 MB at load address 0x80280000 overlaps with fdt_addr at 0x83000000. So let's increase it to 0x84000000 Signed-off-by: Oliver Graute --- include/configs/imx8qm_rom7720.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h index c2c5493abd6..973793fc9dd 100644 --- a/include/configs/imx8qm_rom7720.h +++ b/include/configs/imx8qm_rom7720.h @@ -61,7 +61,7 @@ "image=Image\0" \ "panel=NULL\0" \ "console=ttyLP0\0" \ - "fdt_addr=0x83000000\0" \ + "fdt_addr=0x84000000\0" \ "boot_fdt=try\0" \ "fdt_file=imx8qm-rom7720-a1.dtb\0" \ "initrd_addr=0x83800000\0" \ -- cgit v1.2.3 From 10a99f0c222e86ffad30f51be20fc04c76c9ae64 Mon Sep 17 00:00:00 2001 From: Richard Zhu Date: Fri, 28 Jan 2022 04:41:02 +0100 Subject: dt-bindings: phy: phy-imx8-pcie: Add binding for the pad modes of imx8 pcie phy Add binding for reference clock PAD modes of the i.MX8 PCIe PHY. Signed-off-by: Richard Zhu Tested-by: Marcel Ziswiler Reviewed-by: Tim Harvey Tested-by: Tim Harvey Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1638432158-4119-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul Signed-off-by: Marek Vasut # Pick from Linux f6f787874aa5 ("dt-bindings: phy: phy-imx8-pcie: Add binding for the pad modes of imx8 pcie phy") --- include/dt-bindings/phy/phy-imx8-pcie.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/dt-bindings/phy/phy-imx8-pcie.h (limited to 'include') diff --git a/include/dt-bindings/phy/phy-imx8-pcie.h b/include/dt-bindings/phy/phy-imx8-pcie.h new file mode 100644 index 00000000000..8bbe2d6538d --- /dev/null +++ b/include/dt-bindings/phy/phy-imx8-pcie.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* + * This header provides constants for i.MX8 PCIe. + */ + +#ifndef _DT_BINDINGS_IMX8_PCIE_H +#define _DT_BINDINGS_IMX8_PCIE_H + +/* Reference clock PAD mode */ +#define IMX8_PCIE_REFCLK_PAD_UNUSED 0 +#define IMX8_PCIE_REFCLK_PAD_INPUT 1 +#define IMX8_PCIE_REFCLK_PAD_OUTPUT 2 + +#endif /* _DT_BINDINGS_IMX8_PCIE_H */ -- cgit v1.2.3 From 881c8a6154f9a8d203aa8d409e394519dea051b1 Mon Sep 17 00:00:00 2001 From: Angus Ainslie Date: Wed, 2 Feb 2022 07:31:43 -0800 Subject: arm: dts: imx8mq kernel dts updates Update to the 5.16 imx8mq dts files and dt bindings Changes since v1: Dropped rfkill.h that is not in linux mainline yet. Signed-off-by: Angus Ainslie Reviewed-by: Fabio Estevam --- include/dt-bindings/interconnect/imx8mq.h | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/dt-bindings/interconnect/imx8mq.h (limited to 'include') diff --git a/include/dt-bindings/interconnect/imx8mq.h b/include/dt-bindings/interconnect/imx8mq.h new file mode 100644 index 00000000000..1a4cae7f8be --- /dev/null +++ b/include/dt-bindings/interconnect/imx8mq.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Interconnect framework driver for i.MX SoC + * + * Copyright (c) 2019-2020, NXP + */ + +#ifndef __DT_BINDINGS_INTERCONNECT_IMX8MQ_H +#define __DT_BINDINGS_INTERCONNECT_IMX8MQ_H + +#define IMX8MQ_ICN_NOC 1 +#define IMX8MQ_ICS_DRAM 2 +#define IMX8MQ_ICS_OCRAM 3 +#define IMX8MQ_ICM_A53 4 + +#define IMX8MQ_ICM_VPU 5 +#define IMX8MQ_ICN_VIDEO 6 + +#define IMX8MQ_ICM_GPU 7 +#define IMX8MQ_ICN_GPU 8 + +#define IMX8MQ_ICM_DCSS 9 +#define IMX8MQ_ICN_DCSS 10 + +#define IMX8MQ_ICM_USB1 11 +#define IMX8MQ_ICM_USB2 12 +#define IMX8MQ_ICN_USB 13 + +#define IMX8MQ_ICM_CSI1 14 +#define IMX8MQ_ICM_CSI2 15 +#define IMX8MQ_ICM_LCDIF 16 +#define IMX8MQ_ICN_DISPLAY 17 + +#define IMX8MQ_ICM_SDMA2 18 +#define IMX8MQ_ICN_AUDIO 19 + +#define IMX8MQ_ICN_ENET 20 +#define IMX8MQ_ICM_ENET 21 + +#define IMX8MQ_ICM_SDMA1 22 +#define IMX8MQ_ICM_NAND 23 +#define IMX8MQ_ICM_USDHC1 24 +#define IMX8MQ_ICM_USDHC2 25 +#define IMX8MQ_ICM_PCIE1 26 +#define IMX8MQ_ICM_PCIE2 27 +#define IMX8MQ_ICN_MAIN 28 + +#endif /* __DT_BINDINGS_INTERCONNECT_IMX8MQ_H */ -- cgit v1.2.3 From 16c7369ede7deba187a873b2f16ae487d39d1215 Mon Sep 17 00:00:00 2001 From: Heiko Thiery Date: Mon, 31 Jan 2022 17:30:45 +0100 Subject: board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support The Kontron pitx-imx8m is an NXP i.MX8MQ based board in the pITX form factor. Signed-off-by: Heiko Thiery --- include/configs/kontron_pitx_imx8m.h | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 include/configs/kontron_pitx_imx8m.h (limited to 'include') diff --git a/include/configs/kontron_pitx_imx8m.h b/include/configs/kontron_pitx_imx8m.h new file mode 100644 index 00000000000..0f96b905ab6 --- /dev/null +++ b/include/configs/kontron_pitx_imx8m.h @@ -0,0 +1,97 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __KONTRON_PITX_IMX8M_H +#define __KONTRON_PITX_IMX8M_H + +#include +#include +#include + +#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) + +#define CONFIG_SPL_MAX_SIZE (124 * SZ_1K) +#define CONFIG_SYS_MONITOR_LEN (512 * SZ_1K) +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds" +#define CONFIG_SPL_STACK 0x187FF0 +#define CONFIG_SPL_BSS_START_ADDR 0x00180000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K +#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 + +/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +#define CONFIG_MALLOC_F_ADDR 0x182000 +/* For RAW image gives a error info not panic */ +#define CONFIG_SPL_ABORT_ON_RAW_IMAGE + + +#define CONFIG_POWER_PFUZE100 +#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 +#endif + +#define CONFIG_REMAKE_ELF + +/* ENET1 Config */ +#if defined(CONFIG_CMD_NET) +#define CONFIG_ETHPRIME "FEC" + +#define CONFIG_FEC_XCV_TYPE RGMII +#define CONFIG_FEC_MXC_PHYADDR 0 +#define FEC_QUIRK_ENET_MAC + +#define IMX_FEC_BASE 0x30BE0000 +#define PHY_ANEG_TIMEOUT 20000 + +#endif + +#define ENV_MEM_LAYOUT_SETTINGS \ + "kernel_addr_r=0x40880000\0" \ + "fdt_addr_r=0x43000000\0" \ + "scriptaddr=0x43500000\0" \ + "initrd_addr=0x43800000\0" \ + "pxefile_addr_r=0x43500000\0" \ + "bootm_size=0x10000000\0" \ + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(USB, usb, 0) \ + func(DHCP, dhcp, na) \ + func(PXE, pxe, 0) + +#include + +/* Initial environment variables */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "image=Image\0" \ + "console=ttymxc2,115200\0" \ + "boot_fdt=try\0" \ + "fdtfile=freescale/imx8mq-kontron-pitx-imx8m.dtb\0" \ + "dfu_alt_info=mmc 0=flash-bin raw 0x42 0x1000 mmcpart 1\0"\ + ENV_MEM_LAYOUT_SETTINGS \ + BOOTENV + + +#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +#define CONFIG_SYS_INIT_RAM_SIZE 0x80000 +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define PHYS_SDRAM 0x40000000 +#define PHYS_SDRAM_SIZE 0xC0000000 /* 3GB DDR */ + +#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR + +#define CONFIG_SYS_FSL_USDHC_NUM 2 +#define CONFIG_SYS_FSL_ESDHC_ADDR 0 + +#define CONFIG_OF_SYSTEM_SETUP + +#endif -- cgit v1.2.3 From 2b8e304b93d812e516cfbdf60983d618de70c878 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 28 Nov 2021 03:52:35 +0100 Subject: ARM: imx6: dh-imx6: Add update_sf script to install U-Boot into SF Add script to read U-Boot from SD card and write it to matching locations in the SPI NOR, thus making the SPI NOR bootable. Signed-off-by: Marek Vasut Cc: Christoph Niedermaier Cc: Stefano Babic Acked-by: Peng Fan Reviewed-by: Fabio Estevam --- include/configs/dh_imx6.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 410ac890762..72843c942ce 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -75,6 +75,10 @@ "ramdisk_addr_r=0x18000000\0" \ "scriptaddr=0x14000000\0" \ "fdtfile=imx6q-dhcom-pdk2.dtb\0"\ + "update_sf=" /* Erase SPI NOR and install U-Boot from SD */ \ + "load mmc 0:1 ${loadaddr} /boot/u-boot-with-spl.imx && "\ + "sf probe && sf erase 0x0 0xa0000 && " \ + "sf write ${loadaddr} 0x400 ${filesize}\0" \ BOOTENV #define BOOT_TARGET_DEVICES(func) \ -- cgit v1.2.3 From 2bc2f817cea78b8aaae4477554cb4174c941ef70 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 7 Feb 2022 11:54:13 +0100 Subject: board: toradex: add verdin imx8m plus support This adds initial support for the Toradex Verdin iMX8M Plus Quad 4GB WB IT V1.0B module. They are strapped to boot from eFuses which are factory fused to properly boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC only, SDP support is disabled for now due to missing i.MX 8M Plus USB support. Functionality wise the following is known to be working: - eMMC, 8-bit and 4-bit MMC/SD card slots - Ethernet both on-module eQoS and FEC (requires PHY on carrier board) - GPIOs - I2C Boot sequence is: SPL ---> ATF (TF-A) ---> U-boot proper ATF, U-boot proper and u-boot.dtb images are packed into a FIT image, loaded by SPL. Boot: U-Boot SPL 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) Quad die, dual rank failed, attempting dual die, single rank configuration. Normal Boot WDT: Started watchdog@30280000 with servicing (60s timeout) Trying to boot from BOOTROM Find img info 0x&48025a00, size 872 Need continue download 1024 Download 779264, Total size 780424 NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b NOTICE: BL31: Built : 16:52:37, Aug 26 2021 U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) CPU: Freescale i.MX8MP[8] rev1.1 at 1200 MHz Reset cause: POR DRAM: 8 GiB Core: 78 devices, 18 uclasses, devicetree: separate WDT: Started watchdog@30280000 with servicing (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial Out: serial Err: serial Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0B, Serial# 06817281 Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609 Setting variant to wifi Net: Hard-coding pdata->enetaddr eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME] Hit any key to stop autoboot: 0 Verdin iMX8MP # Signed-off-by: Marcel Ziswiler Reviewed-by: Fabio Estevam --- include/configs/verdin-imx8mp.h | 131 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 include/configs/verdin-imx8mp.h (limited to 'include') diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h new file mode 100644 index 00000000000..f8b4bf2df9b --- /dev/null +++ b/include/configs/verdin-imx8mp.h @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright 2022 Toradex + */ + +#ifndef __VERDIN_IMX8MP_H +#define __VERDIN_IMX8MP_H + +#include +#include + +#define CONFIG_SPL_MAX_SIZE (152 * 1024) +#define CONFIG_SYS_MONITOR_LEN SZ_512K +#define CONFIG_SYS_UBOOT_BASE \ + (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) + +#ifdef CONFIG_SPL_BUILD +/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ +#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds" +#define CONFIG_SPL_STACK 0x960000 +#define CONFIG_SPL_BSS_START_ADDR 0x0098fc00 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_1K +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K + +/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +#define CONFIG_MALLOC_F_ADDR 0x184000 +/* For RAW image gives a error info not panic */ +#define CONFIG_SPL_ABORT_ON_RAW_IMAGE + +#define CONFIG_POWER_PCA9450 + +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SPEED 100000 +#endif /* CONFIG_SPL_BUILD */ + +#define CONFIG_REMAKE_ELF + +/* ENET Config */ +/* ENET1 */ +#if defined(CONFIG_CMD_NET) +#define CONFIG_ETHPRIME "eth0" /* eqos is aliased on-module Ethernet interface */ + +#define CONFIG_FEC_XCV_TYPE RGMII +#define CONFIG_FEC_MXC_PHYADDR 7 +#define FEC_QUIRK_ENET_MAC + +#define PHY_ANEG_TIMEOUT 20000 +#endif /* CONFIG_CMD_NET */ + +#define MEM_LAYOUT_ENV_SETTINGS \ + "fdt_addr_r=0x43000000\0" \ + "kernel_addr_r=0x40000000\0" \ + "ramdisk_addr_r=0x46400000\0" \ + "scriptaddr=0x46000000\0" + +/* Enable Distro Boot */ +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(DHCP, dhcp, na) +#include +#undef CONFIG_ISO_PARTITION +#else +#define BOOTENV +#endif + +#if defined(CONFIG_TDX_EASY_INSTALLER) +# define BOOT_SCRIPT "boot-tezi.scr" +#else +# define BOOT_SCRIPT "boot.scr" +#endif + +/* Initial environment variables */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ + "bootcmd_mfg=fastboot 0\0" \ + "boot_file=Image\0" \ + "boot_scripts=" BOOT_SCRIPT "\0" \ + "boot_script_dhcp=" BOOT_SCRIPT "\0" \ + "console=ttymxc2\0" \ + "fdt_board=dev\0" \ + "initrd_addr=0x43800000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "netargs=setenv bootargs console=${console},${baudrate} " \ + "root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \ + "\0" \ + "nfsboot=run netargs; dhcp ${loadaddr} ${boot_file}; " \ + "tftp ${fdt_addr} verdin/${fdtfile}; " \ + "booti ${loadaddr} - ${fdt_addr}\0" \ + "setup=setenv setupargs console=${console},${baudrate} console=tty1 " \ + "consoleblank=0 earlycon\0" \ + "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \ + "if test \"$confirm\" = \"y\"; then " \ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 2 1; mmc write ${loadaddr} 0x0 " \ + "${blkcnt}; fi\0" + +#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +#define CONFIG_SYS_INIT_RAM_SIZE SZ_512K +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +#define CONFIG_SYS_BOOTM_LEN SZ_64M /* Increase max gunzip size */ + +/* i.MX 8M Plus supports max. 8GB memory in two albeit concecutive banks */ +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define PHYS_SDRAM 0x40000000 +#define PHYS_SDRAM_SIZE (SZ_2G + SZ_1G) +#define PHYS_SDRAM_2 0x100000000 +#define PHYS_SDRAM_2_SIZE (SZ_4G + SZ_1G) + +/* UART */ +#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR + +/* Monitor Command Prompt */ +#define CONFIG_SYS_CBSIZE SZ_2K +#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) + +/* USDHC */ +#define CONFIG_SYS_FSL_USDHC_NUM 2 +#define CONFIG_SYS_FSL_ESDHC_ADDR 0 + +#endif /* __VERDIN_IMX8MP_H */ -- cgit v1.2.3 From 530780a69cb5d32a7794dcc322afaa25cdbdab96 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Mon, 7 Feb 2022 14:19:18 +0200 Subject: apalis/colibri_imx6: move setting bootcmd to defconfig Move setting the default boot command to the apalis/colibri_imx6_defconfig. It allows replacing the command without code modification. Signed-off-by: Oleksandr Suvorov Reviewed-by: Peng Fan Reviewed-by: Igor Opaniuk Acked-by: Marcel Ziswiler --- include/configs/apalis_imx6.h | 4 ---- include/configs/colibri_imx6.h | 4 ---- 2 files changed, 8 deletions(-) (limited to 'include') diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index c165f618be9..bbdcab29d8f 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -108,10 +108,6 @@ #endif #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=run distro_bootcmd ; " \ - "usb start ; " \ - "setenv stdout serial,vidconsole; " \ - "setenv stdin serial,usbkbd\0" \ "boot_file=zImage\0" \ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off vmalloc=400M\0" \ diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index c8e733bc366..1dbc77dde1c 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -92,10 +92,6 @@ #define FDT_FILE "imx6dl-colibri-eval-v3.dtb" #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=run distro_bootcmd; " \ - "usb start ; " \ - "setenv stdout serial,vidconsole; " \ - "setenv stdin serial,usbkbd\0" \ "boot_file=zImage\0" \ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off galcore.contiguousSize=50331648\0" \ -- cgit v1.2.3