Convert CONFIG_SPL_BSS_START_ADDR to Kconfig
[platform/kernel/u-boot.git] / include / configs / capricorn-common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2017-2018 NXP
4  * Copyright 2019 Siemens AG
5  */
6
7 #ifndef __IMX8X_CAPRICORN_H
8 #define __IMX8X_CAPRICORN_H
9
10 #include <linux/sizes.h>
11 #include <asm/arch/imx-regs.h>
12
13 #include "siemens-env-common.h"
14
15 /* SPL config */
16 #ifdef CONFIG_SPL_BUILD
17
18 #define CONFIG_SYS_MONITOR_LEN          (1024 * 1024)
19
20 #define CONFIG_SYS_SPL_MALLOC_START     0x00120000
21 #define CONFIG_SYS_SPL_MALLOC_SIZE      0x3000  /* 12 KB */
22 #define CONFIG_MALLOC_F_ADDR            0x00120000
23
24 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
25 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
26
27 #endif /* CONFIG_SPL_BUILD */
28
29 #define CONFIG_FACTORYSET
30
31 /* ENET1 connects to base board and MUX with ESAI */
32 #define CONFIG_FEC_ENET_DEV             1
33 #define CONFIG_FEC_MXC_PHYADDR          0x0
34
35 /* I2C Configuration */
36 #ifndef CONFIG_SPL_BUILD
37 /* EEPROM */
38 #define  EEPROM_I2C_BUS         0 /* I2C0 */
39 #define  EEPROM_I2C_ADDR        0x50
40 /* PCA9552 */
41 #define  PCA9552_1_I2C_BUS      1 /* I2C1 */
42 #define  PCA9552_1_I2C_ADDR     0x60
43 #endif /* !CONFIG_SPL_BUILD */
44
45 /* AHAB */
46 #ifdef CONFIG_AHAB_BOOT
47 #define AHAB_ENV "sec_boot=yes\0"
48 #else
49 #define AHAB_ENV "sec_boot=no\0"
50 #endif
51
52 #define MFG_ENV_SETTINGS_DEFAULT \
53         "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
54                 "rdinit=/linuxrc " \
55                 "clk_ignore_unused "\
56                 "\0" \
57         "kboot=booti\0"\
58         "bootcmd_mfg=run mfgtool_args;" \
59         "if iminfo ${initrd_addr}; then " \
60         "if test ${tee} = yes; then " \
61                 "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \
62         "else " \
63                 "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \
64         "fi; " \
65         "else " \
66             "echo \"Run fastboot ...\"; fastboot 0; "  \
67         "fi;\0"
68
69 /* Boot M4 */
70 #define M4_BOOT_ENV \
71         "m4_0_image=m4_0.bin\0" \
72         "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} " \
73                         "${loadaddr} ${m4_0_image}\0" \
74         "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
75
76 #define CONFIG_MFG_ENV_SETTINGS \
77         MFG_ENV_SETTINGS_DEFAULT \
78         "initrd_addr=0x83100000\0" \
79         "initrd_high=0xffffffffffffffff\0" \
80         "emmc_dev=0\0"
81
82 /* Initial environment variables */
83 #define CONFIG_EXTRA_ENV_SETTINGS \
84         CONFIG_MFG_ENV_SETTINGS \
85         M4_BOOT_ENV \
86         AHAB_ENV \
87         ENV_COMMON \
88         "script=boot.scr\0" \
89         "image=Image\0" \
90         "panel=NULL\0" \
91         "console=ttyLP2\0" \
92         "fdt_addr=0x83000000\0" \
93         "fdt_high=0xffffffffffffffff\0" \
94         "cntr_addr=0x88000000\0" \
95         "cntr_file=os_cntr_signed.bin\0" \
96         "initrd_addr=0x83800000\0" \
97         "initrd_high=0xffffffffffffffff\0" \
98         "netdev=eth0\0" \
99         "nfsopts=vers=3,udp,rsize=4096,wsize=4096,nolock rw\0" \
100         "hostname=capricorn\0" \
101         ENV_EMMC \
102         ENV_NET
103
104 /* Default location for tftp and bootm */
105
106 /* On CCP board, USDHC1 is for eMMC */
107
108 #define CONFIG_SYS_SDRAM_BASE           0x80000000
109 #define PHYS_SDRAM_1                    0x80000000
110 #define PHYS_SDRAM_2                    0x880000000
111 /* DDR3 board total DDR is 1 GB */
112 #define PHYS_SDRAM_1_SIZE               0x40000000      /* 1 GB */
113 #define PHYS_SDRAM_2_SIZE               0x00000000      /* 0 GB */
114
115 #define BOOTAUX_RESERVED_MEM_BASE       0x88000000
116 #define BOOTAUX_RESERVED_MEM_SIZE       SZ_128M /* Reserve from second 128MB */
117
118 #endif /* __IMX8X_CAPRICORN_H */