Convert CONFIG_PCI_GT64120 to Kconfig
[platform/kernel/u-boot.git] / include / configs / imx8qm_mek.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2018 NXP
4  */
5
6 #ifndef __IMX8QM_MEK_H
7 #define __IMX8QM_MEK_H
8
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include <asm/arch/imx-regs.h>
12
13 #define CONFIG_SYS_BOOTM_LEN            (64 * SZ_1M)
14
15 #ifdef CONFIG_SPL_BUILD
16 #define CONFIG_SYS_MONITOR_LEN                          (1024 * 1024)
17
18 #define CONFIG_SERIAL_LPUART_BASE       0x5a060000
19 #define CONFIG_MALLOC_F_ADDR            0x00120000
20
21 #endif
22
23 #ifdef CONFIG_AHAB_BOOT
24 #define AHAB_ENV "sec_boot=yes\0"
25 #else
26 #define AHAB_ENV "sec_boot=no\0"
27 #endif
28
29 /* Initial environment variables */
30 #define CONFIG_EXTRA_ENV_SETTINGS               \
31         AHAB_ENV \
32         "script=boot.scr\0" \
33         "image=Image\0" \
34         "panel=NULL\0" \
35         "console=ttyLP0,${baudrate} earlycon=lpuart32,0x5a060000,${baudrate}\0" \
36         "fdt_addr=0x83000000\0"                 \
37         "fdt_high=0xffffffffffffffff\0"         \
38         "boot_fdt=try\0" \
39         "fdt_file=undefined\0" \
40         "initrd_addr=0x83800000\0"              \
41         "initrd_high=0xffffffffffffffff\0" \
42         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
43         "mmcpart=1\0" \
44         "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
45         "mmcautodetect=yes\0" \
46         "mmcargs=setenv bootargs console=${console} root=${mmcroot}\0 " \
47         "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
48         "bootscript=echo Running bootscript from mmc ...; " \
49                 "source\0" \
50         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
51         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
52         "boot_os=booti ${loadaddr} - ${fdt_addr};\0" \
53         "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
54         "auth_os=auth_cntr ${cntr_addr}\0" \
55         "mmcboot=echo Booting from mmc ...; " \
56                 "run mmcargs; " \
57                 "if test ${sec_boot} = yes; then " \
58                         "if run auth_os; then " \
59                                 "run boot_os; " \
60                         "else " \
61                                 "echo ERR: failed to authenticate; " \
62                         "fi; " \
63                 "else " \
64                         "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
65                                 "if run loadfdt; then " \
66                                         "run boot_os; " \
67                                 "else " \
68                                         "echo WARN: Cannot load the DT; " \
69                                 "fi; " \
70                         "else " \
71                                 "echo wait for boot; " \
72                         "fi;" \
73                 "fi;\0" \
74         "netargs=setenv bootargs console=${console} " \
75                 "root=/dev/nfs " \
76                 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
77         "netboot=echo Booting from net ...; " \
78                 "run netargs;  " \
79                 "if test ${ip_dyn} = yes; then " \
80                         "setenv get_cmd dhcp; " \
81                 "else " \
82                         "setenv get_cmd tftp; " \
83                 "fi; " \
84                 "if test ${sec_boot} = yes; then " \
85                         "${get_cmd} ${cntr_addr} ${cntr_file}; " \
86                         "if run auth_os; then " \
87                                 "run boot_os; " \
88                         "else " \
89                                 "echo ERR: failed to authenticate; " \
90                         "fi; " \
91                 "else " \
92                         "${get_cmd} ${loadaddr} ${image}; " \
93                         "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
94                                 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
95                                         "booti ${loadaddr} - ${fdt_addr}; " \
96                                 "else " \
97                                         "echo WARN: Cannot load the DT; " \
98                                 "fi; " \
99                         "else " \
100                                 "booti; " \
101                         "fi;" \
102                 "fi;\0"
103
104 /* Link Definitions */
105
106 /* Default environment is in SD */
107
108 /* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board */
109
110 #define CONFIG_SYS_SDRAM_BASE           0x80000000
111 #define PHYS_SDRAM_1                    0x80000000
112 #define PHYS_SDRAM_2                    0x880000000
113 #define PHYS_SDRAM_1_SIZE               0x80000000      /* 2 GB */
114 #define PHYS_SDRAM_2_SIZE               0x100000000     /* 4 GB */
115
116 #endif /* __IMX8QM_MEK_H */