Migrate CUSTOM_SYS_INIT_SP_ADDR to Kconfig using system-constants.h
[platform/kernel/u-boot.git] / include / configs / imx8mm_venice.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2021 Gateworks Corporation
4  */
5
6 #ifndef __IMX8MM_VENICE_H
7 #define __IMX8MM_VENICE_H
8
9 #include <asm/arch/imx-regs.h>
10 #include <linux/sizes.h>
11
12 #define CONFIG_SYS_MONITOR_LEN          SZ_512K
13 #define CONFIG_SYS_UBOOT_BASE   \
14         (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
15
16 #ifdef CONFIG_SPL_BUILD
17 #define CONFIG_SPL_STACK                0x920000
18 #define CONFIG_SPL_BSS_START_ADDR       0x910000
19 #define CONFIG_SYS_SPL_MALLOC_START     0x42200000
20 #define CONFIG_SYS_SPL_MALLOC_SIZE      SZ_1M
21
22 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
23 #define CONFIG_MALLOC_F_ADDR            0x930000
24 /* For RAW image gives a error info not panic */
25 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
26
27 #endif
28
29 #define MEM_LAYOUT_ENV_SETTINGS \
30         "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
31         "fdt_addr_r=0x50200000\0" \
32         "scriptaddr=0x50280000\0" \
33         "ramdisk_addr_r=0x50300000\0" \
34         "kernel_comp_addr_r=0x40200000\0"
35
36 /* Enable Distro Boot */
37 #ifndef CONFIG_SPL_BUILD
38 #define BOOT_TARGET_DEVICES(func) \
39         func(MMC, mmc, 1) \
40         func(MMC, mmc, 2) \
41         func(USB, usb, 0) \
42         func(USB, usb, 1) \
43         func(DHCP, dhcp, na)
44 #include <config_distro_bootcmd.h>
45 #else
46 #define BOOTENV
47 #endif
48
49 /* Initial environment variables */
50 #define CONFIG_EXTRA_ENV_SETTINGS \
51         BOOTENV \
52         MEM_LAYOUT_ENV_SETTINGS \
53         "script=boot.scr\0" \
54         "bootm_size=0x10000000\0" \
55         "dev=2\0" \
56         "preboot=gsc wd-disable\0" \
57         "console=ttymxc1,115200\0" \
58         "update_firmware=" \
59                 "tftpboot $loadaddr $image && " \
60                 "setexpr blkcnt $filesize + 0x1ff && " \
61                 "setexpr blkcnt $blkcnt / 0x200 && " \
62                 "mmc dev $dev && " \
63                 "mmc write $loadaddr 0x42 $blkcnt\0" \
64         "loadfdt=" \
65                 "if $fsload $fdt_addr_r $dir/$fdt_file1; " \
66                         "then echo loaded $fdt_file1; " \
67                 "elif $fsload $fdt_addr_r $dir/$fdt_file2; " \
68                         "then echo loaded $fdt_file2; " \
69                 "elif $fsload $fdt_addr_r $dir/$fdt_file3; " \
70                         "then echo loaded $fdt_file3; " \
71                 "elif $fsload $fdt_addr_r $dir/$fdt_file4; " \
72                         "then echo loaded $fdt_file4; " \
73                 "elif $fsload $fdt_addr_r $dir/$fdt_file5; " \
74                         "then echo loaded $fdt_file5; " \
75                 "fi\0" \
76         "boot_net=" \
77                 "setenv fsload tftpboot; " \
78                 "run loadfdt && tftpboot $kernel_addr_r $dir/Image && " \
79                 "booti $kernel_addr_r - $fdt_addr_r\0" \
80         "update_rootfs=" \
81                 "tftpboot $loadaddr $image && " \
82                 "gzwrite mmc $dev $loadaddr $filesize 100000 1000000\0" \
83         "update_all=" \
84                 "tftpboot $loadaddr $image && " \
85                 "gzwrite mmc $dev $loadaddr $filesize\0" \
86         "erase_env=mmc dev $dev; mmc erase 0x7f08 0x40\0"
87
88 #define CONFIG_SYS_INIT_RAM_ADDR        0x40000000
89 #define CONFIG_SYS_INIT_RAM_SIZE        SZ_2M
90
91 #define CONFIG_SYS_SDRAM_BASE           0x40000000
92
93 /* SDRAM configuration */
94 #define PHYS_SDRAM                      0x40000000
95 #define PHYS_SDRAM_SIZE                 SZ_4G
96 #define CONFIG_SYS_BOOTM_LEN            SZ_256M
97
98 /* UART */
99 #define CONFIG_MXC_UART_BASE            UART_BASE_ADDR(2)
100
101 /* FEC */
102 #define CONFIG_FEC_MXC_PHYADDR          0
103 #define FEC_QUIRK_ENET_MAC
104
105 #endif