1 /* SPDX-License-Identifier: GPL-2.0+ */
6 #ifndef __IMX8QXP_MEK_H
7 #define __IMX8QXP_MEK_H
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include <asm/arch/imx-regs.h>
13 #ifdef CONFIG_SPL_BUILD
14 #define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
16 #define CONFIG_SERIAL_LPUART_BASE 0x5a060000
17 #define CONFIG_MALLOC_F_ADDR 0x00120000
19 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
21 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
24 #ifdef CONFIG_AHAB_BOOT
25 #define AHAB_ENV "sec_boot=yes\0"
27 #define AHAB_ENV "sec_boot=no\0"
30 /* Initial environment variables */
31 #define CONFIG_EXTRA_ENV_SETTINGS \
37 "fdt_addr=0x83000000\0" \
38 "fdt_high=0xffffffffffffffff\0" \
40 "fdt_file=undefined\0" \
41 "initrd_addr=0x83800000\0" \
42 "initrd_high=0xffffffffffffffff\0" \
43 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
45 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
46 "mmcautodetect=yes\0" \
47 "mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}\0 " \
48 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
49 "bootscript=echo Running bootscript from mmc ...; " \
51 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
52 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
53 "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
54 "auth_os=auth_cntr ${cntr_addr}\0" \
55 "boot_os=booti ${loadaddr} - ${fdt_addr};\0" \
56 "mmcboot=echo Booting from mmc ...; " \
58 "if test ${sec_boot} = yes; then " \
59 "if run auth_os; then " \
62 "echo ERR: failed to authenticate; " \
65 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
66 "if run loadfdt; then " \
69 "echo WARN: Cannot load the DT; " \
72 "echo wait for boot; " \
75 "netargs=setenv bootargs console=${console},${baudrate} " \
77 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
78 "netboot=echo Booting from net ...; " \
80 "if test ${ip_dyn} = yes; then " \
81 "setenv get_cmd dhcp; " \
83 "setenv get_cmd tftp; " \
85 "if test ${sec_boot} = yes; then " \
86 "${get_cmd} ${cntr_addr} ${cntr_file}; " \
87 "if run auth_os; then " \
90 "echo ERR: failed to authenticate; " \
93 "${get_cmd} ${loadaddr} ${image}; " \
94 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
95 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
98 "echo WARN: Cannot load the DT; " \
105 /* Link Definitions */
107 /* Default environment is in SD */
109 /* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board */
111 #define CONFIG_SYS_SDRAM_BASE 0x80000000
112 #define PHYS_SDRAM_1 0x80000000
113 #define PHYS_SDRAM_2 0x880000000
114 #define PHYS_SDRAM_1_SIZE 0x80000000 /* 2 GB */
115 /* LPDDR4 board total DDR is 3GB */
116 #define PHYS_SDRAM_2_SIZE 0x40000000 /* 1 GB */
118 #ifndef CONFIG_DM_PCA953X
119 #define CONFIG_PCA953X
122 /* Misc configuration */
124 #endif /* __IMX8QXP_MEK_H */