blob: 364bd50b5912fc52c34b6e4df8427cd926e26bdb [file] [log] [blame]
Anatolij Gustschin49234a32020-01-07 16:37:42 +01001/* 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"
Anatolij Gustschin49234a32020-01-07 16:37:42 +010014
15/* SPL config */
16#ifdef CONFIG_SPL_BUILD
17
18#define CONFIG_SPL_MAX_SIZE (124 * 1024)
19#define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
Anatolij Gustschin49234a32020-01-07 16:37:42 +010020
Anatolij Gustschin49234a32020-01-07 16:37:42 +010021#define CONFIG_SPL_STACK 0x013E000
22#define CONFIG_SPL_BSS_START_ADDR 0x00128000
23#define CONFIG_SPL_BSS_MAX_SIZE 0x1000 /* 4 KB */
24#define CONFIG_SYS_SPL_MALLOC_START 0x00120000
25#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3000 /* 12 KB */
26#define CONFIG_MALLOC_F_ADDR 0x00120000
27
28#define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
29#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
30
31#endif /* CONFIG_SPL_BUILD */
32
33#define CONFIG_FACTORYSET
34
Anatolij Gustschin49234a32020-01-07 16:37:42 +010035/* ENET1 connects to base board and MUX with ESAI */
36#define CONFIG_FEC_ENET_DEV 1
37#define CONFIG_FEC_MXC_PHYADDR 0x0
Anatolij Gustschin49234a32020-01-07 16:37:42 +010038
39/* I2C Configuration */
40#ifndef CONFIG_SPL_BUILD
Anatolij Gustschin49234a32020-01-07 16:37:42 +010041/* EEPROM */
42#define EEPROM_I2C_BUS 0 /* I2C0 */
43#define EEPROM_I2C_ADDR 0x50
44/* PCA9552 */
45#define PCA9552_1_I2C_BUS 1 /* I2C1 */
46#define PCA9552_1_I2C_ADDR 0x60
47#endif /* !CONFIG_SPL_BUILD */
48
49/* AHAB */
50#ifdef CONFIG_AHAB_BOOT
51#define AHAB_ENV "sec_boot=yes\0"
52#else
53#define AHAB_ENV "sec_boot=no\0"
54#endif
55
56#define MFG_ENV_SETTINGS_DEFAULT \
57 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
58 "rdinit=/linuxrc " \
59 "clk_ignore_unused "\
60 "\0" \
61 "kboot=booti\0"\
62 "bootcmd_mfg=run mfgtool_args;" \
63 "if iminfo ${initrd_addr}; then " \
64 "if test ${tee} = yes; then " \
65 "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \
66 "else " \
67 "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \
68 "fi; " \
69 "else " \
70 "echo \"Run fastboot ...\"; fastboot 0; " \
71 "fi;\0"
72
73/* Boot M4 */
74#define M4_BOOT_ENV \
75 "m4_0_image=m4_0.bin\0" \
76 "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} " \
77 "${loadaddr} ${m4_0_image}\0" \
78 "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
79
80#define CONFIG_MFG_ENV_SETTINGS \
81 MFG_ENV_SETTINGS_DEFAULT \
82 "initrd_addr=0x83100000\0" \
83 "initrd_high=0xffffffffffffffff\0" \
84 "emmc_dev=0\0"
85
86/* Initial environment variables */
87#define CONFIG_EXTRA_ENV_SETTINGS \
88 CONFIG_MFG_ENV_SETTINGS \
89 M4_BOOT_ENV \
90 AHAB_ENV \
91 ENV_COMMON \
92 "script=boot.scr\0" \
93 "image=Image\0" \
94 "panel=NULL\0" \
95 "console=ttyLP2\0" \
96 "fdt_addr=0x83000000\0" \
97 "fdt_high=0xffffffffffffffff\0" \
98 "cntr_addr=0x88000000\0" \
99 "cntr_file=os_cntr_signed.bin\0" \
100 "initrd_addr=0x83800000\0" \
101 "initrd_high=0xffffffffffffffff\0" \
102 "netdev=eth0\0" \
103 "nfsopts=vers=3,udp,rsize=4096,wsize=4096,nolock rw\0" \
104 "hostname=capricorn\0" \
105 ENV_EMMC \
106 ENV_NET
107
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100108/* Default location for tftp and bootm */
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100109#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
110
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100111/* On CCP board, USDHC1 is for eMMC */
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100112
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100113#define CONFIG_SYS_SDRAM_BASE 0x80000000
114#define PHYS_SDRAM_1 0x80000000
115#define PHYS_SDRAM_2 0x880000000
116/* DDR3 board total DDR is 1 GB */
117#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1 GB */
118#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
119
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100120/* Console buffer and boot args */
121#define CONFIG_SYS_CBSIZE 2048
122#define CONFIG_SYS_MAXARGS 64
123#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
124
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100125#define BOOTAUX_RESERVED_MEM_BASE 0x88000000
126#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
127
128#endif /* __IMX8X_CAPRICORN_H */