1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2017-2018 NXP
4 * Copyright 2019 Siemens AG
7 #ifndef __IMX8X_CAPRICORN_H
8 #define __IMX8X_CAPRICORN_H
10 #include <linux/sizes.h>
11 #include <asm/arch/imx-regs.h>
13 #include "siemens-env-common.h"
14 #include "siemens-ccp-common.h"
17 #ifdef CONFIG_SPL_BUILD
19 #define CONFIG_SPL_MAX_SIZE (124 * 1024)
20 #define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
21 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
22 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x800
24 #define CONFIG_SPL_STACK 0x013E000
25 #define CONFIG_SPL_BSS_START_ADDR 0x00128000
26 #define CONFIG_SPL_BSS_MAX_SIZE 0x1000 /* 4 KB */
27 #define CONFIG_SYS_SPL_MALLOC_START 0x00120000
28 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x3000 /* 12 KB */
29 #define CONFIG_MALLOC_F_ADDR 0x00120000
31 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
32 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
34 #endif /* CONFIG_SPL_BUILD */
36 #define CONFIG_FACTORYSET
38 #undef CONFIG_IDENT_STRING
39 #define CONFIG_IDENT_STRING GENERATE_CCP_VERSION("01", "07")
41 #define CONFIG_REMAKE_ELF
44 #define CONFIG_FEC_XCV_TYPE RMII
46 /* ENET1 connects to base board and MUX with ESAI */
47 #define CONFIG_FEC_ENET_DEV 1
48 #define CONFIG_FEC_MXC_PHYADDR 0x0
49 #define CONFIG_ETHPRIME "eth1"
51 /* I2C Configuration */
52 #ifndef CONFIG_SPL_BUILD
54 #define EEPROM_I2C_BUS 0 /* I2C0 */
55 #define EEPROM_I2C_ADDR 0x50
57 #define PCA9552_1_I2C_BUS 1 /* I2C1 */
58 #define PCA9552_1_I2C_ADDR 0x60
59 #endif /* !CONFIG_SPL_BUILD */
62 #ifdef CONFIG_AHAB_BOOT
63 #define AHAB_ENV "sec_boot=yes\0"
65 #define AHAB_ENV "sec_boot=no\0"
68 #define MFG_ENV_SETTINGS_DEFAULT \
69 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
74 "bootcmd_mfg=run mfgtool_args;" \
75 "if iminfo ${initrd_addr}; then " \
76 "if test ${tee} = yes; then " \
77 "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \
79 "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \
82 "echo \"Run fastboot ...\"; fastboot 0; " \
87 "m4_0_image=m4_0.bin\0" \
88 "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} " \
89 "${loadaddr} ${m4_0_image}\0" \
90 "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
92 #define CONFIG_MFG_ENV_SETTINGS \
93 MFG_ENV_SETTINGS_DEFAULT \
94 "initrd_addr=0x83100000\0" \
95 "initrd_high=0xffffffffffffffff\0" \
98 /* Initial environment variables */
99 #define CONFIG_EXTRA_ENV_SETTINGS \
100 CONFIG_MFG_ENV_SETTINGS \
104 "script=boot.scr\0" \
108 "fdt_addr=0x83000000\0" \
109 "fdt_high=0xffffffffffffffff\0" \
110 "cntr_addr=0x88000000\0" \
111 "cntr_file=os_cntr_signed.bin\0" \
112 "initrd_addr=0x83800000\0" \
113 "initrd_high=0xffffffffffffffff\0" \
115 "nfsopts=vers=3,udp,rsize=4096,wsize=4096,nolock rw\0" \
116 "hostname=capricorn\0" \
120 /* Default location for tftp and bootm */
121 #define CONFIG_SYS_INIT_SP_ADDR 0x80200000
123 /* On CCP board, USDHC1 is for eMMC */
124 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* eMMC */
125 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
127 #define CONFIG_SYS_SDRAM_BASE 0x80000000
128 #define PHYS_SDRAM_1 0x80000000
129 #define PHYS_SDRAM_2 0x880000000
130 /* DDR3 board total DDR is 1 GB */
131 #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1 GB */
132 #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
134 /* Console buffer and boot args */
135 #define CONFIG_SYS_CBSIZE 2048
136 #define CONFIG_SYS_MAXARGS 64
137 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
139 /* Generic Timer Definitions */
140 #define COUNTER_FREQUENCY 8000000 /* 8MHz */
142 #define BOOTAUX_RESERVED_MEM_BASE 0x88000000
143 #define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
145 #endif /* __IMX8X_CAPRICORN_H */