summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/apalis-imx8.h131
-rw-r--r--include/configs/apalis-tk1.h62
-rw-r--r--include/configs/apalis_imx6.h66
-rw-r--r--include/configs/colibri-imx6ull.h13
-rw-r--r--include/configs/colibri-imx8x.h165
-rw-r--r--include/configs/colibri_imx6.h2
-rw-r--r--include/configs/colibri_imx7.h49
-rw-r--r--include/configs/colibri_vf.h15
-rw-r--r--include/configs/dh_imx6.h10
-rw-r--r--include/configs/imx6-engicam.h19
-rw-r--r--include/configs/imx8qm_mek.h9
-rw-r--r--include/configs/imx8qxp_mek.h8
-rw-r--r--include/configs/kp_imx53.h9
-rw-r--r--include/configs/mx6_common.h2
-rw-r--r--include/configs/mx7_common.h13
-rw-r--r--include/configs/novena.h9
-rw-r--r--include/configs/pcl063.h2
-rw-r--r--include/configs/pcl063_ull.h117
-rw-r--r--include/configs/pico-imx7d.h38
-rw-r--r--include/configs/tegra-common-post.h2
-rw-r--r--include/configs/vining_2000.h3
-rw-r--r--include/configs/warp7.h11
-rw-r--r--include/fdtdec.h24
-rw-r--r--include/linux/string.h1
-rw-r--r--include/power/bd71837.h62
-rw-r--r--include/splash.h6
-rw-r--r--include/time.h9
-rw-r--r--include/uuid.h10
28 files changed, 726 insertions, 141 deletions
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
new file mode 100644
index 00000000000..be2c5a2293f
--- /dev/null
+++ b/include/configs/apalis-imx8.h
@@ -0,0 +1,131 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 Toradex
+ */
+
+#ifndef __APALIS_IMX8_H
+#define __APALIS_IMX8_H
+
+#include <asm/arch/imx-regs.h>
+#include <linux/sizes.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_DISPLAY_BOARDINFO_LATE
+
+#undef CONFIG_BOOTM_NETBSD
+
+#define CONFIG_FSL_ESDHC
+#define CONFIG_FSL_USDHC
+#define CONFIG_SYS_FSL_ESDHC_ADDR 0
+#define USDHC1_BASE_ADDR 0x5b010000
+#define USDHC2_BASE_ADDR 0x5b020000
+#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
+
+#define CONFIG_ENV_OVERWRITE
+
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
+/* Networking */
+#define FEC_QUIRK_ENET_MAC
+
+#define CONFIG_IP_DEFRAG
+#define CONFIG_TFTP_BLOCKSIZE SZ_4K
+#define CONFIG_TFTP_TSIZE
+
+#define CONFIG_IPADDR 192.168.10.2
+#define CONFIG_NETMASK 255.255.255.0
+#define CONFIG_SERVERIP 192.168.10.1
+
+#define MEM_LAYOUT_ENV_SETTINGS \
+ "fdt_addr_r=0x84000000\0" \
+ "kernel_addr_r=0x82000000\0" \
+ "ramdisk_addr_r=0x94400000\0" \
+ "scriptaddr=0x87000000\0"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 2) \
+ func(MMC, mmc, 0) \
+ func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
+#undef BOOTENV_RUN_NET_USB_START
+#define BOOTENV_RUN_NET_USB_START ""
+
+/* Initial environment variables */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ BOOTENV \
+ MEM_LAYOUT_ENV_SETTINGS \
+ "console=ttyLP1 earlycon\0" \
+ "fdt_addr=0x83000000\0" \
+ "fdt_file=fsl-imx8qm-apalis-eval.dtb\0" \
+ "fdtfile=fsl-imx8qm-apalis-eval.dtb\0" \
+ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
+ "image=Image\0" \
+ "initrd_addr=0x83800000\0" \
+ "initrd_high=0xffffffffffffffff\0" \
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "root=PARTUUID=${uuid} rootwait " \
+ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
+ "netargs=setenv bootargs console=${console},${baudrate} " \
+ "root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
+ "\0" \
+ "nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr} " \
+ "apalis-imx8/${fdt_file}; booti ${loadaddr} - ${fdt_addr}\0" \
+ "panel=NULL\0" \
+ "script=boot.scr\0" \
+ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \
+ "if test \"$confirm\" = \"y\"; then " \
+ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
+ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \
+ "${blkcnt}; fi\0"
+
+/* Link Definitions */
+#define CONFIG_LOADADDR 0x80280000
+
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
+
+#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
+
+#define CONFIG_SYS_MEMTEST_START 0x88000000
+#define CONFIG_SYS_MEMTEST_END 0x89000000
+
+/* Environment in eMMC, before config block at the end of 1st "boot sector" */
+#define CONFIG_ENV_SIZE SZ_8K
+#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \
+ CONFIG_TDX_CFG_BLOCK_OFFSET)
+#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
+#define CONFIG_SYS_MMC_ENV_PART 1
+
+#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
+
+/* On Apalis iMX8 USDHC1 is eMMC, USDHC2 is 8-bit and USDHC3 is 4-bit MMC/SD */
+#define CONFIG_SYS_FSL_USDHC_NUM 3
+
+#define CONFIG_SYS_BOOTM_LEN SZ_64M /* Increase max gunzip size */
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN ((CONFIG_ENV_SIZE + (32 * 1024)) * 1024)
+
+#define CONFIG_SYS_SDRAM_BASE 0x80000000
+#define PHYS_SDRAM_1 0x80000000
+#define PHYS_SDRAM_2 0x880000000
+#define PHYS_SDRAM_1_SIZE SZ_2G /* 2 GB */
+#define PHYS_SDRAM_2_SIZE SZ_2G /* 2 GB */
+
+/* Serial */
+#define CONFIG_BAUDRATE 115200
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+#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)
+
+/* Generic Timer Definitions */
+#define COUNTER_FREQUENCY 8000000 /* 8MHz */
+
+#endif /* __APALIS_IMX8_H */
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index 9c8c8979f04..490ca64b100 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -48,15 +48,22 @@
"tegra124-apalis-eval.dtb fat 0 1 mmcpart 0"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait\0" \
- "emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} " \
- "${setupargs} ${vidargs}; echo Booting from internal eMMC " \
- "chip...; run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
+ "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} " \
+ "ro rootfstype=ext4 rootwait\0" \
+ "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \
+ "setenv bootargs ${defargs} ${emmcargs} " \
+ "${setupargs} ${vidargs}; echo Booting from internal eMMC; " \
+ "run emmcdtbload; " \
+ "load mmc ${emmcdev}:${emmcbootpart} ${kernel_addr_r} " \
"${boot_file} && run fdt_fixup && " \
"bootm ${kernel_addr_r} - ${dtbparam}\0" \
- "emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} " \
- "${soc}-apalis-${fdt_board}.dtb && " \
- "setenv dtbparam ${fdt_addr_r}\0"
+ "emmcbootpart=1\0" \
+ "emmcdev=0\0" \
+ "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \
+ "${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb && " \
+ "setenv dtbparam ${fdt_addr_r}\0" \
+ "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \
+ "emmcrootpart=2\0"
#define NFS_BOOTCMD \
"nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \
@@ -69,26 +76,38 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait\0" \
- "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
+ "set_sdargs=setenv sdargs ip=off root=PARTUUID=${uuid} ro " \
+ "rootfstype=ext4 rootwait\0" \
+ "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+ "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
"${vidargs}; echo Booting from SD card in 8bit slot...; " \
- "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \
- "${boot_file} && run fdt_fixup && " \
+ "run sddtbload; load mmc ${sddev}:${sdbootpart} " \
+ "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
"bootm ${kernel_addr_r} - ${dtbparam}\0" \
- "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
- "${soc}-apalis-${fdt_board}.dtb " \
- "&& setenv dtbparam ${fdt_addr_r}\0"
+ "sdbootpart=1\0" \
+ "sddev=1\0" \
+ "sddtbload=setenv dtbparam; load mmc ${sddev}:${sdbootpart} " \
+ "${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb " \
+ "&& setenv dtbparam ${fdt_addr_r}\0" \
+ "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+ "sdrootpart=2\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw rootfstype=ext4 rootwait\0" \
- "usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
+ "set_usbargs=setenv usbargs ip=off root=PARTUUID=${uuid} ro " \
+ "rootfstype=ext4 rootwait\0" \
+ "usbboot=run setup; usb start; run usbfinduuid; run set_usbargs; " \
+ "setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
- "usb start && run usbdtbload; load usb 0:1 ${kernel_addr_r} " \
- "${boot_file} && run fdt_fixup && " \
+ "run usbdtbload; load usb ${usbdev}:${usbbootpart} " \
+ "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
"bootm ${kernel_addr_r} - ${dtbparam}\0" \
- "usbdtbload=setenv dtbparam; load usb 0:1 ${fdt_addr_r} " \
- "${soc}-apalis-${fdt_board}.dtb " \
- "&& setenv dtbparam ${fdt_addr_r}\0"
+ "usbbootpart=1\0" \
+ "usbdev=0\0" \
+ "usbdtbload=setenv dtbparam; load usb ${usbdev}:${usbbootpart} " \
+ "${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb " \
+ "&& setenv dtbparam ${fdt_addr_r}\0" \
+ "usbfinduuid=part uuid usb ${usbdev}:${usbrootpart} uuid\0" \
+ "usbrootpart=2\0"
#define BOARD_EXTRA_ENV_SETTINGS \
"boot_file=uImage\0" \
@@ -101,6 +120,7 @@
"fdt_fixup=;\0" \
NFS_BOOTCMD \
SD_BOOTCMD \
+ USB_BOOTCMD \
"setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
"00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} " \
"flash_eth.img && source ${loadaddr}\0" \
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 9d9e16e5d96..54094e495a9 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -123,16 +123,21 @@
"imx6q-apalis-cam-eval.dtb fat 0 1"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext4 " \
- "rootwait\0" \
- "emmcboot=run setup; " \
+ "set_emmcargs emmcargs ip=off root=PARTUUID=${uuid} ro,noatime " \
+ "rootfstype=ext4 rootwait\0" \
+ "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
"${vidargs}; echo Booting from internal eMMC chip...; " \
- "run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
- "${boot_file} && run fdt_fixup && " \
+ "run emmcdtbload; load mmc ${emmcdev}:${emmcbootpart} " \
+ "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
"bootz ${kernel_addr_r} ${dtbparam}\0" \
- "emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} " \
- "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
+ "emmcbootpart=1\0" \
+ "emmcdev=0\0" \
+ "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \
+ "${fdt_addr_r} ${fdt_file} && " \
+ "setenv dtbparam \" - ${fdt_addr_r}\" && true\0" \
+ "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \
+ "emmcrootpart=2\0"
#define MEM_LAYOUT_ENV_SETTINGS \
"bootm_size=0x20000000\0" \
@@ -145,7 +150,7 @@
"scriptaddr=0x17000000\0"
#define NFS_BOOTCMD \
- "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \
+ "nfsargs=ip=:::::eth0:on root=/dev/nfs ro\0" \
"nfsboot=run setup; " \
"setenv bootargs ${defargs} ${nfsargs} ${setupargs} " \
"${vidargs}; echo Booting via DHCP/TFTP/NFS...; " \
@@ -155,27 +160,43 @@
"&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext4 " \
- "rootwait\0" \
- "sdboot=run setup; " \
+ "set_sdargs=setenv sdargs ip=off root=PARTUUID=${uuid} ro,noatime " \
+ "rootfstype=ext4 rootwait\0" \
+ "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
"setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
"${vidargs}; echo Booting from SD card; " \
- "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \
- "${boot_file} && run fdt_fixup && " \
+ "run sddtbload; load mmc ${sddev}:${sdbootpart} " \
+ "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
"bootz ${kernel_addr_r} ${dtbparam}\0" \
- "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
- "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
+ "sdbootpart=1\0" \
+ "sddev=1\0" \
+ "sddtbload=setenv dtbparam; load mmc ${sddev}:${sdbootpart} " \
+ "${fdt_addr_r} " \
+ "${fdt_file} && setenv dtbparam \" - " \
+ "${fdt_addr_r}\" && true\0" \
+ "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+ "sdrootpart=2\0"
+
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext4 " \
- "rootwait\0" \
- "usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
+ "set_usbargs=setenv usbargs ip=off root=PARTUUID=${uuid} ro,noatime " \
+ "rootfstype=ext4 rootwait\0" \
+ "usbboot=run setup; usb start; run usbfinduuid; run set_usbargs; " \
+ "setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
- "usb start && run usbdtbload; load usb 0:1 ${kernel_addr_r} " \
+ "run usbdtbload; load usb " \
+ "${usbdev}:${usbbootpart} ${kernel_addr_r} " \
"${boot_file} && run fdt_fixup && " \
"bootz ${kernel_addr_r} ${dtbparam}\0" \
- "usbdtbload=setenv dtbparam; load usb 0:1 ${fdt_addr_r} " \
- "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
+ "usbbootpart=1\0" \
+ "usbdev=0\0" \
+ "usbdtbload=setenv dtbparam; load usb ${usbdev}:${usbbootpart} "\
+ "${fdt_addr_r} " \
+ "${fdt_file} && setenv dtbparam \" - " \
+ "${fdt_addr_r}\" && true\0" \
+ "usbfinduuid=part uuid usb ${usbdev}:${usbrootpart} uuid\0" \
+ "usbrootpart=2\0"
+
#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
#define FDT_FILE "imx6q-apalis-eval.dtb"
@@ -186,7 +207,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
"bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
- "run distro_bootcmd ; " \
+ "setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \
"usb start ; " \
"setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
"boot_file=zImage\0" \
@@ -199,6 +220,7 @@
MEM_LAYOUT_ENV_SETTINGS \
NFS_BOOTCMD \
SD_BOOTCMD \
+ USB_BOOTCMD \
"setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
"00:14:2d:00:00:00; fi; tftpboot ${loadaddr} " \
"flash_eth.img && source ${loadaddr}\0" \
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index fc39e807b6a..b221e118fa4 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -62,12 +62,17 @@
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
- "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
+ "set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \
+ "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+ "setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
- "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
- "load mmc 0:1 ${fdt_addr_r} " FDT_FILE " && " \
+ "load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \
+ "load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " FDT_FILE " && " \
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+ "sdbootpart=1\0" \
+ "sddev=0\0" \
+ "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+ "sdrootpart=2\0"
#define UBI_BOOTCMD \
"ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
new file mode 100644
index 00000000000..c6a38d5118d
--- /dev/null
+++ b/include/configs/colibri-imx8x.h
@@ -0,0 +1,165 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 Toradex
+ */
+
+#ifndef __COLIBRI_IMX8X_H
+#define __COLIBRI_IMX8X_H
+
+#include <asm/arch/imx-regs.h>
+#include <linux/sizes.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_DISPLAY_BOARDINFO_LATE
+
+#undef CONFIG_BOOTM_NETBSD
+
+#define CONFIG_FSL_ESDHC
+#define CONFIG_FSL_USDHC
+#define CONFIG_SYS_FSL_ESDHC_ADDR 0
+#define USDHC1_BASE_ADDR 0x5b010000
+#define USDHC2_BASE_ADDR 0x5b020000
+#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
+
+#define CONFIG_ENV_OVERWRITE
+
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
+/* Networking */
+#define FEC_QUIRK_ENET_MAC
+
+#define CONFIG_IP_DEFRAG
+#define CONFIG_TFTP_BLOCKSIZE SZ_4K
+#define CONFIG_TFTP_TSIZE
+
+#define CONFIG_IPADDR 192.168.10.2
+#define CONFIG_NETMASK 255.255.255.0
+#define CONFIG_SERVERIP 192.168.10.1
+
+#define MEM_LAYOUT_ENV_SETTINGS \
+ "fdt_addr_r=0x83000000\0" \
+ "kernel_addr_r=0x81000000\0" \
+ "ramdisk_addr_r=0x83800000\0" \
+ "scriptaddr=0x80800000\0"
+
+#ifdef CONFIG_AHAB_BOOT
+#define AHAB_ENV "sec_boot=yes\0"
+#else
+#define AHAB_ENV "sec_boot=no\0"
+#endif
+
+/* Boot M4 */
+#define M4_BOOT_ENV \
+ "m4_0_image=m4_0.bin\0" \
+ "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
+ "${m4_0_image}\0" \
+ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
+
+#define MFG_NAND_PARTITION ""
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 0) \
+ func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
+#undef BOOTENV_RUN_NET_USB_START
+#define BOOTENV_RUN_NET_USB_START ""
+
+#define CONFIG_MFG_ENV_SETTINGS \
+ "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
+ "rdinit=/linuxrc g_mass_storage.stall=0 " \
+ "g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F " \
+ "g_mass_storage.idProduct=0x37FF " \
+ "g_mass_storage.iSerialNumber=\"\" " MFG_NAND_PARTITION \
+ "${vidargs} clk_ignore_unused\0" \
+ "initrd_addr=0x83800000\0" \
+ "initrd_high=0xffffffff\0" \
+ "bootcmd_mfg=run mfgtool_args;booti ${loadaddr} ${initrd_addr} " \
+ "${fdt_addr};\0" \
+
+/* Initial environment variables */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ AHAB_ENV \
+ BOOTENV \
+ CONFIG_MFG_ENV_SETTINGS \
+ M4_BOOT_ENV \
+ MEM_LAYOUT_ENV_SETTINGS \
+ "console=ttyLP3 earlycon\0" \
+ "fdt_addr=0x83000000\0" \
+ "fdt_file=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \
+ "fdtfile=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \
+ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
+ "image=Image\0" \
+ "initrd_addr=0x83800000\0" \
+ "initrd_high=0xffffffffffffffff\0" \
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "root=PARTUUID=${uuid} rootwait " \
+ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
+ "netargs=setenv bootargs console=${console},${baudrate} " \
+ "root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp " \
+ "${vidargs}\0" \
+ "nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr} " \
+ "colibri-imx8x/${fdt_file}; booti ${loadaddr} - " \
+ "${fdt_addr}\0" \
+ "panel=NULL\0" \
+ "script=boot.scr\0" \
+ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \
+ "if test \"$confirm\" = \"y\"; then " \
+ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
+ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \
+ "${blkcnt}; fi\0" \
+ "vidargs=video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off\0"
+
+/* Link Definitions */
+#define CONFIG_LOADADDR 0x80280000
+
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
+
+#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
+
+#define CONFIG_SYS_MEMTEST_START 0x88000000
+#define CONFIG_SYS_MEMTEST_END 0x89000000
+
+/* Environment in eMMC, before config block at the end of 1st "boot sector" */
+#define CONFIG_ENV_SIZE SZ_8K
+#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \
+ CONFIG_TDX_CFG_BLOCK_OFFSET)
+#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
+#define CONFIG_SYS_MMC_ENV_PART 1
+
+#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
+
+/* On Colibri iMX8X USDHC1 is eMMC, USDHC2 is 4-bit SD */
+#define CONFIG_SYS_FSL_USDHC_NUM 2
+
+#define CONFIG_SYS_BOOTM_LEN SZ_64M /* Increase max gunzip size */
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN ((CONFIG_ENV_SIZE + (32 * 1024)) * 1024)
+
+#define CONFIG_SYS_SDRAM_BASE 0x80000000
+#define PHYS_SDRAM_1 0x80000000
+#define PHYS_SDRAM_2 0x880000000
+#define PHYS_SDRAM_1_SIZE SZ_2G /* 2 GB */
+#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
+
+/* Serial */
+#define CONFIG_BAUDRATE 115200
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+#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)
+
+/* Generic Timer Definitions */
+#define COUNTER_FREQUENCY 8000000 /* 8MHz */
+
+#define BOOTAUX_RESERVED_MEM_BASE 0x88000000
+#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
+
+#endif /* __COLIBRI_IMX8X_H */
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index b540b3e0749..1cdf83d82d3 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -190,7 +190,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
"bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
- "run distro_bootcmd ; " \
+ "setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \
"usb start ; " \
"setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
"boot_file=zImage\0" \
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 7dfc92c085b..545f506e97f 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -49,14 +49,22 @@
#define CONFIG_SERVERIP 192.168.10.1
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait\0" \
- "emmcboot=run setup; " \
+ "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} ro " \
+ "rootfstype=ext4 rootwait\0" \
+ "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
"${vidargs}; echo Booting from internal eMMC chip...; " \
"run m4boot && " \
- "load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-emmc-${fdt_board}.dtb && " \
- "load mmc 0:1 ${kernel_addr_r} ${boot_file} && " \
- "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0"
+ "load mmc ${emmcdev}:${emmcbootpart} ${fdt_addr_r} " \
+ "${soc}-colibri-emmc-${fdt_board}.dtb && " \
+ "load mmc ${emmcdev}:${emmcbootpart} ${kernel_addr_r} " \
+ "${boot_file} && run fdt_fixup && " \
+ "bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+ "emmcbootpart=1\0" \
+ "emmcdev=0\0" \
+ "emmcfinduuid=part uuid mmc ${emmcdev}:${emmcrootpart} uuid\0" \
+ "emmcrootpart=2\0"
+
#define MEM_LAYOUT_ENV_SETTINGS \
"bootm_size=0x10000000\0" \
@@ -67,24 +75,25 @@
"ramdisk_addr_r=0x82100000\0"
#if defined(CONFIG_TARGET_COLIBRI_IMX7_NAND)
-#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
- "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
- "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
- "run m4boot && " \
- "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
- "load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
- "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0"
+#define SD_BOOTDEV 0
#elif defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC)
+#define SD_BOOTDEV 1
+#endif
+
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk1p2 ro rootwait\0" \
- "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
+ "set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \
+ "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+ "setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
"run m4boot && " \
- "load mmc 1:1 ${kernel_addr_r} ${kernel_file} && " \
- "load mmc 1:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
- "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0"
-#endif
+ "load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \
+ "load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " \
+ "${soc}-colibri-${fdt_board}.dtb && " \
+ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+ "sdbootpart=1\0" \
+ "sddev=" __stringify(SD_BOOTDEV) "\0" \
+ "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+ "sdrootpart=2\0"
#define NFS_BOOTCMD \
@@ -225,7 +234,7 @@
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M
#define DFU_DEFAULT_POLL_TIMEOUT 300
-#ifdef CONFIG_VIDEO
+#if defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO)
#define CONFIG_VIDEO_MXS
#define CONFIG_VIDEO_LOGO
#define CONFIG_SPLASH_SCREEN
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 0d57e303a1b..da9a8426ecd 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -68,12 +68,19 @@
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
- "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \
+ "set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \
+ "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+ "setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
- "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
- "load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
+ "load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \
+ "load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " \
+ "${soc}-colibri-${fdt_board}.dtb && " \
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+ "sdbootpart=1\0" \
+ "sddev=0\0" \
+ "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+ "sdrootpart=2\0"
+
#define UBI_BOOTCMD \
"ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index 3eee382a643..3b1d0a99a19 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -63,14 +63,14 @@
#define CONFIG_SYS_MMC_ENV_DEV 2 /* 1 = SDHC3, 2 = SDHC4 (eMMC) */
/* SATA Configs */
-#ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE 1
-#define CONFIG_DWC_AHSATA_PORT_ID 0
-#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
#define CONFIG_LBA48
-#endif
/* SPI Flash Configs */
+#if defined(CONFIG_SPL_BUILD)
+#undef CONFIG_DM_SPI
+#undef CONFIG_DM_SPI_FLASH
+#undef CONFIG_SPI_FLASH_MTD
+#endif
/* UART */
#define CONFIG_MXC_UART
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 571852d803a..56b3c7503eb 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -43,30 +43,20 @@
"fdt_addr=" FDT_ADDR "\0" \
"boot_fdt=try\0" \
"mmcpart=1\0" \
- "recovery_device=0\0" \
- "recovery_part=2\0" \
- "recovery_root=/dev/mmcblk0p2 rootwait rw\0" \
"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
- "recovery_mmcargs= setenv bootargs console=${console},${baudrate} "\
- "root=${recovery_root}\0" \
"ubiargs=setenv bootargs console=${console},${baudrate} " \
"ubi.mtd=5 root=${nandroot} ${mtdparts}\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "recovery_loadimage=ext2load mmc ${recovery_device}:${recovery_part} ${loadaddr} ${image}\0" \
- "recovery_loadfdt=ext2load mmc ${recovery_device}:${recovery_part} ${fdt_addr} ${fdt_file}\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"loadfit=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fit_image}\0" \
- "altbootcmd=run recovery_boot\0"\
- "recovery_boot=echo Recovery Boot from mmc ...; " \
- "run recovery_loadimage ; run recovery_loadfdt; run recovery_mmcargs; "\
- "bootm ${loadaddr} - ${fdt_addr}\0" \
+ "altbootcmd=run recoveryboot\0"\
"fitboot=echo Booting FIT image from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
@@ -108,7 +98,12 @@
"run ubiargs; " \
"nand read ${loadaddr} kernel 0x800000; " \
"nand read ${fdt_addr} dtb 0x100000; " \
- "bootm ${loadaddr} - ${fdt_addr}\0"
+ "bootm ${loadaddr} - ${fdt_addr}\0" \
+ "recoveryboot=if test ${modeboot} = mmcboot; then " \
+ "run mmcboot; " \
+ "else " \
+ "run nandboot; " \
+ "fi\0"
#define CONFIG_BOOTCOMMAND "run $modeboot"
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 2bdf3be6546..d06ed61c807 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -155,15 +155,6 @@
/* Serial */
#define CONFIG_BAUDRATE 115200
-/* Monitor Command Prompt */
-#define CONFIG_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
-#define CONFIG_SYS_CBSIZE 2048
-#define CONFIG_SYS_MAXARGS 64
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
- sizeof(CONFIG_SYS_PROMPT) + 16)
-
/* Generic Timer Definitions */
#define COUNTER_FREQUENCY 8000000 /* 8MHz */
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 261661a9782..a8591c9256d 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -154,14 +154,6 @@
/* Serial */
#define CONFIG_BAUDRATE 115200
-/* Monitor Command Prompt */
-#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
-#define CONFIG_SYS_CBSIZE 2048
-#define CONFIG_SYS_MAXARGS 64
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
- sizeof(CONFIG_SYS_PROMPT) + 16)
-
/* Generic Timer Definitions */
#define COUNTER_FREQUENCY 8000000 /* 8MHz */
diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h
index a252e9003de..55bfa0fe591 100644
--- a/include/configs/kp_imx53.h
+++ b/include/configs/kp_imx53.h
@@ -41,8 +41,10 @@
"addinitrd=setenv bootargs ${bootargs} rdinit=${rdinit} ${debug} \0" \
"upd_image=st.4k\0" \
"uboot_file=u-boot.imx\0" \
- "updargs=setenv bootargs console=${console} ${smp}"\
- "rdinit=${rdinit} ${debug} ${displayargs}\0" \
+ "updargs=setenv bootargs console=${console} ${smp} ${displayargs}\0" \
+ "initrd_ram_dev=/dev/ram\0" \
+ "addswupdate=setenv bootargs ${bootargs} root=${initrd_ram_dev} rw\0" \
+ "addkeys=setenv bootargs ${bootargs} di=${dig_in} key1=${key1}\0" \
"loadusb=usb start; " \
"fatload usb 0 ${loadaddr} ${upd_image}\0" \
"up=if tftp ${loadaddr} ${uboot_file}; then " \
@@ -59,6 +61,9 @@
"usbupd=echo Booting update from usb ...; " \
"setenv bootargs; " \
"run updargs; " \
+ "run addinitrd; " \
+ "run addswupdate; " \
+ "run addkeys; " \
"run loadusb; " \
"bootm ${loadaddr}#${fit_config}\0" \
BOOTENV
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 6b20c6db580..2b8ce9d71d0 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -59,7 +59,7 @@
/* Secure boot (HAB) support */
#ifdef CONFIG_SECURE_BOOT
-#define CONFIG_CSF_SIZE 0x2000
+#define CONFIG_CSF_SIZE 0x4000
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
#endif
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index cc7e87269ee..4f822ef9a07 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -48,10 +48,21 @@
/* Secure boot (HAB) support */
#ifdef CONFIG_SECURE_BOOT
-#define CONFIG_CSF_SIZE 0x2000
+#define CONFIG_CSF_SIZE 0x4000
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
#endif
#endif
+/*
+ * If we have defined the OPTEE ram size and not OPTEE it means that we were
+ * launched by OPTEE, because of that we shall skip all the low level
+ * initialization since it was already done by ATF or OPTEE
+ */
+#if (CONFIG_OPTEE_TZDRAM_SIZE != 0)
+#ifndef CONFIG_OPTEE
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#endif
+#endif
+
#endif
diff --git a/include/configs/novena.h b/include/configs/novena.h
index bb5bf808c2b..cdc437c4925 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -102,12 +102,7 @@
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
/* SATA Configs */
-#ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE 1
-#define CONFIG_DWC_AHSATA_PORT_ID 0
-#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
#define CONFIG_LBA48
-#endif
/* UART */
#define CONFIG_MXC_UART
@@ -124,14 +119,12 @@
#endif
/* Video output */
-#ifdef CONFIG_VIDEO
#define CONFIG_VIDEO_BMP_RLE8
#define CONFIG_SPLASH_SCREEN
#define CONFIG_BMP_16BPP
#define CONFIG_VIDEO_LOGO
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
-#endif
/* Extra U-Boot environment. */
#ifndef CONFIG_SPL_BUILD
@@ -149,6 +142,8 @@
"ramdisk_addr_r=0x28000000\0" \
"fdt_addr_r=0x18000000\0" \
"fdtfile=imx6q-novena.dtb\0" \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0" \
"addcons=" \
"setenv bootargs ${bootargs} " \
"console=${consdev},${baudrate}\0" \
diff --git a/include/configs/pcl063.h b/include/configs/pcl063.h
index 12d8d67f0ff..8fef250ac47 100644
--- a/include/configs/pcl063.h
+++ b/include/configs/pcl063.h
@@ -22,6 +22,8 @@
* Tweak the SPL text base address to avoid this.
*/
+#define CONFIG_SYS_FSL_USDHC_NUM 1
+
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
new file mode 100644
index 00000000000..0f1a010b4e5
--- /dev/null
+++ b/include/configs/pcl063_ull.h
@@ -0,0 +1,117 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Board configuration file for Phytec phyBOARD-i.MX6ULL-Segin SBC
+ * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
+ *
+ * Based on include/configs/xpress.h:
+ * Copyright (C) 2015-2016 Stefan Roese <sr@denx.de>
+ */
+#ifndef __PCL063_ULL_H
+#define __PCL063_ULL_H
+
+#include <linux/sizes.h>
+#include "mx6_common.h"
+
+/* SPL options */
+#include "imx6_spl.h"
+
+#define CONFIG_SYS_FSL_USDHC_NUM 2
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
+
+/* Environment settings */
+#define CONFIG_ENV_SIZE (0x4000)
+#define CONFIG_ENV_OFFSET (0x80000)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#define CONFIG_ENV_OFFSET_REDUND \
+ (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+
+/* Environment in SD */
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_PART 0
+#define MMC_ROOTFS_DEV 0
+#define MMC_ROOTFS_PART 2
+
+/* Console configs */
+#define CONFIG_MXC_UART_BASE UART1_BASE
+
+/* MMC Configs */
+#define CONFIG_FSL_USDHC
+
+#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
+#define CONFIG_SUPPORT_EMMC_BOOT
+
+/* I2C configs */
+#ifdef CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
+#define CONFIG_SYS_I2C_SPEED 100000
+#endif
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_MEMTEST_START 0x80000000
+#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000000)
+
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
+#define CONFIG_SYS_HZ 1000
+
+/* Physical Memory Map */
+#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
+#define PHYS_SDRAM_SIZE SZ_256M
+
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
+#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
+
+#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)
+
+/* NAND */
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE 0x40000000
+
+/* USB Configs */
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
+#define CONFIG_MXC_USB_FLAGS 0
+#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
+
+#define CONFIG_IMX_THERMAL
+
+#define ENV_MMC \
+ "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \
+ "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \
+ "fitpart=1\0" \
+ "bootdelay=3\0" \
+ "silent=1\0" \
+ "optargs=rw rootwait\0" \
+ "mmcautodetect=yes\0" \
+ "mmcrootfstype=ext4\0" \
+ "mmcfit_name=fitImage\0" \
+ "mmcloadfit=fatload mmc ${mmcdev}:${fitpart} ${fit_addr} " \
+ "${mmcfit_name}\0" \
+ "mmcargs=setenv bootargs " \
+ "root=/dev/mmcblk${mmcdev}p${mmcpart} ${optargs} " \
+ "console=${console} rootfstype=${mmcrootfstype}\0" \
+ "mmc_mmc_fit=run mmcloadfit;run mmcargs addcon; bootm ${fit_addr}\0" \
+
+/* Default environment */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "console=ttymxc0,115200n8\0" \
+ "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \
+ "fit_addr=0x82000000\0" \
+ ENV_MMC
+
+#define CONFIG_BOOTCOMMAND "run mmc_mmc_fit"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
+#endif /* __PCL063_ULL_H */
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 365a5984e4d..9a3b3b1e80b 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -52,11 +52,29 @@
"/boot/imx7d-pico-pi.dtb ext4 0 1;" \
"rootfs part 0 1\0" \
-#define BOOTMENU_ENV \
+/* When booting with FIT specify the node entry containing boot.scr */
+#if defined(CONFIG_FIT)
+#define PICO_BOOT_ENV \
+ "bootscr_fitimage_name=bootscr\0" \
+ "bootscriptaddr=0x83200000\0" \
+ "fdtovaddr=0x83100000\0" \
+ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
+ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "rootwait rw;\0" \
+ "loadbootscript=" \
+ "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "source ${bootscriptaddr}:${bootscr_fitimage_name}\0"
+#else
+#define PICO_BOOT_ENV \
"bootmenu_0=Boot using PICO-Hobbit baseboard=" \
"setenv fdtfile imx7d-pico-hobbit.dtb\0" \
"bootmenu_1=Boot using PICO-Pi baseboard=" \
"setenv fdtfile imx7d-pico-pi.dtb\0" \
+ BOOTENV
+#endif
+
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
@@ -69,7 +87,6 @@
"initrd_high=0xffffffff\0" \
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
"videomode=video=ctfb:x:800,y:480,depth:24,mode:0,pclk:30000,le:46,ri:210,up:22,lo:23,hs:20,vs:10,sync:0,vmode:0\0" \
- BOOTMENU_ENV \
"fdt_addr=0x83000000\0" \
"fdt_addr_r=0x83000000\0" \
"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
@@ -89,7 +106,22 @@
"name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
"fastboot_partition_alias_system=rootfs\0" \
"setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \
- BOOTENV
+ PICO_BOOT_ENV
+
+#if defined(CONFIG_FIT)
+#define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev};" \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "if run loadbootscript; then " \
+ "iminfo ${bootscriptaddr};" \
+ "if test $? -eq 1; then hab_failsafe; fi;" \
+ "run bootscript; " \
+ "else " \
+ "echo Fail to load fitImage with boot script;" \
+ "hab_failsafe;" \
+ "fi; " \
+ "fi"
+#endif
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index e54428ba43e..9685ee5059a 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -21,12 +21,14 @@
#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
#ifndef CONFIG_SPL_BUILD
+#ifndef BOOT_TARGET_DEVICES
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
func(USB, usb, 0) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
+#endif
#include <config_distro_bootcmd.h>
#else
#define BOOTENV
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index fd98c1417e7..d4db9b4a567 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -17,9 +17,6 @@
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
-#define CONFIG_MXC_UART
-#define CONFIG_MXC_UART_BASE UART1_BASE
-
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1) \
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 0ef8e359480..8ceaa0c6c60 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -13,17 +13,6 @@
#define PHYS_SDRAM_SIZE SZ_512M
-/*
- * If we have defined the OPTEE ram size and not OPTEE it means that we were
- * launched by OPTEE, because of that we shall skip all the low level
- * initialization since it was already done by ATF or OPTEE
- */
-#ifdef CONFIG_OPTEE_TZDRAM_SIZE
-#ifndef CONFIG_OPTEE
-#define CONFIG_SKIP_LOWLEVEL_INIT
-#endif
-#endif
-
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M)
diff --git a/include/fdtdec.h b/include/fdtdec.h
index fa8e34f6f96..e6c22dd5cd5 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -997,6 +997,30 @@ int fdtdec_setup_memory_banksize_fdt(const void *blob);
int fdtdec_setup_memory_banksize(void);
/**
+ * fdtdec_set_ethernet_mac_address() - set MAC address for default interface
+ *
+ * Looks up the default interface via the "ethernet" alias (in the /aliases
+ * node) and stores the given MAC in its "local-mac-address" property. This
+ * is useful on platforms that store the MAC address in a custom location.
+ * Board code can call this in the late init stage to make sure that the
+ * interface device tree node has the right MAC address configured for the
+ * Ethernet uclass to pick it up.
+ *
+ * Typically the FDT passed into this function will be U-Boot's control DTB.
+ * Given that a lot of code may be holding offsets to various nodes in that
+ * tree, this code will only set the "local-mac-address" property in-place,
+ * which means that it needs to exist and have space for the 6-byte address.
+ * This ensures that the operation is non-destructive and does not invalidate
+ * offsets that other drivers may be using.
+ *
+ * @param fdt FDT blob
+ * @param mac buffer containing the MAC address to set
+ * @param size size of MAC address
+ * @return 0 on success or a negative error code on failure
+ */
+int fdtdec_set_ethernet_mac_address(void *fdt, const u8 *mac, size_t size);
+
+/**
* fdtdec_set_phandle() - sets the phandle of a given node
*
* @param blob FDT blob
diff --git a/include/linux/string.h b/include/linux/string.h
index 36066207392..5d63be4ce5b 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -94,6 +94,7 @@ size_t strcspn(const char *s, const char *reject);
#ifndef __HAVE_ARCH_STRDUP
extern char * strdup(const char *);
#endif
+extern char * strndup(const char *, size_t);
#ifndef __HAVE_ARCH_STRSWAB
extern char * strswab(const char *);
#endif
diff --git a/include/power/bd71837.h b/include/power/bd71837.h
new file mode 100644
index 00000000000..38c69b2b909
--- /dev/null
+++ b/include/power/bd71837.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright (C) 2018 ROHM Semiconductors */
+
+#ifndef BD71837_H_
+#define BD71837_H_
+
+#define BD71837_REGULATOR_DRIVER "bd71837_regulator"
+
+enum {
+ BD71837_REV = 0x00,
+ BD71837_SWRESET = 0x01,
+ BD71837_I2C_DEV = 0x02,
+ BD71837_PWRCTRL0 = 0x03,
+ BD71837_PWRCTRL1 = 0x04,
+ BD71837_BUCK1_CTRL = 0x05,
+ BD71837_BUCK2_CTRL = 0x06,
+ BD71837_BUCK3_CTRL = 0x07,
+ BD71837_BUCK4_CTRL = 0x08,
+ BD71837_BUCK5_CTRL = 0x09,
+ BD71837_BUCK6_CTRL = 0x0a,
+ BD71837_BUCK7_CTRL = 0x0b,
+ BD71837_BUCK8_CTRL = 0x0c,
+ BD71837_BUCK1_VOLT_RUN = 0x0d,
+ BD71837_BUCK1_VOLT_IDLE = 0x0e,
+ BD71837_BUCK1_VOLT_SUSP = 0x0f,
+ BD71837_BUCK2_VOLT_RUN = 0x10,
+ BD71837_BUCK2_VOLT_IDLE = 0x11,
+ BD71837_BUCK3_VOLT_RUN = 0x12,
+ BD71837_BUCK4_VOLT_RUN = 0x13,
+ BD71837_BUCK5_VOLT = 0x14,
+ BD71837_BUCK6_VOLT = 0x15,
+ BD71837_BUCK7_VOLT = 0x16,
+ BD71837_BUCK8_VOLT = 0x17,
+ BD71837_LDO1_VOLT = 0x18,
+ BD71837_LDO2_VOLT = 0x19,
+ BD71837_LDO3_VOLT = 0x1a,
+ BD71837_LDO4_VOLT = 0x1b,
+ BD71837_LDO5_VOLT = 0x1c,
+ BD71837_LDO6_VOLT = 0x1d,
+ BD71837_LDO7_VOLT = 0x1e,
+ BD71837_TRANS_COND0 = 0x1f,
+ BD71837_TRANS_COND1 = 0x20,
+ BD71837_VRFAULTEN = 0x21,
+ BD71837_MVRFLTMASK0 = 0x22,
+ BD71837_MVRFLTMASK1 = 0x23,
+ BD71837_MVRFLTMASK2 = 0x24,
+ BD71837_RCVCFG = 0x25,
+ BD71837_RCVNUM = 0x26,
+ BD71837_PWRONCONFIG0 = 0x27,
+ BD71837_PWRONCONFIG1 = 0x28,
+ BD71837_RESETSRC = 0x29,
+ BD71837_MIRQ = 0x2a,
+ BD71837_IRQ = 0x2b,
+ BD71837_IN_MON = 0x2c,
+ BD71837_POW_STATE = 0x2d,
+ BD71837_OUT32K = 0x2e,
+ BD71837_REGLOCK = 0x2f,
+ BD71837_MUXSW_EN = 0x30,
+ BD71837_REG_NUM,
+};
+
+#endif
diff --git a/include/splash.h b/include/splash.h
index 228aff441b8..7fd2de8fea1 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -66,10 +66,10 @@ void splash_get_pos(int *x, int *y);
static inline void splash_get_pos(int *x, int *y) { }
#endif
-#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_LCD)
-int lcd_splash(ulong addr);
+#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP)
+int splash_display(void);
#else
-static inline int lcd_splash(ulong addr)
+static inline int splash_display(void)
{
return -ENOSYS;
}
diff --git a/include/time.h b/include/time.h
index 9fd0d73fb4e..1e9b369be7c 100644
--- a/include/time.h
+++ b/include/time.h
@@ -4,6 +4,7 @@
#define _TIME_H
#include <linux/typecheck.h>
+#include <linux/types.h>
unsigned long get_timer(unsigned long base);
@@ -21,6 +22,14 @@ unsigned long timer_get_us(void);
*/
void timer_test_add_offset(unsigned long offset);
+/**
+ * usec_to_tick() - convert microseconds to clock ticks
+ *
+ * @usec: duration in microseconds
+ * Return: duration in clock ticks
+ */
+uint64_t usec_to_tick(unsigned long usec);
+
/*
* These inlines deal with timer wrapping correctly. You are
* strongly encouraged to use them
diff --git a/include/uuid.h b/include/uuid.h
index 124bbce8a2c..abcc325eae9 100644
--- a/include/uuid.h
+++ b/include/uuid.h
@@ -6,6 +6,8 @@
#ifndef __UUID_H__
#define __UUID_H__
+#include <linux/bitops.h>
+
/* This is structure is in big-endian */
struct uuid {
unsigned int time_low;
@@ -16,10 +18,10 @@ struct uuid {
unsigned char node[6];
} __packed;
-enum {
- UUID_STR_FORMAT_STD,
- UUID_STR_FORMAT_GUID
-};
+/* Bits of a bitmask specifying the output format for GUIDs */
+#define UUID_STR_FORMAT_STD 0
+#define UUID_STR_FORMAT_GUID BIT(0)
+#define UUID_STR_UPPER_CASE BIT(1)
#define UUID_STR_LEN 36
#define UUID_BIN_LEN sizeof(struct uuid)