blob: 6b1e82ad3b17e04ad3388643a32530975899bb8e [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
Anatolij Gustschin49234a32020-01-07 16:37:42 +010018#define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
Anatolij Gustschin49234a32020-01-07 16:37:42 +010019
Anatolij Gustschin49234a32020-01-07 16:37:42 +010020#define CONFIG_MALLOC_F_ADDR 0x00120000
21
Anatolij Gustschin49234a32020-01-07 16:37:42 +010022#endif /* CONFIG_SPL_BUILD */
23
Anatolij Gustschin49234a32020-01-07 16:37:42 +010024/* ENET1 connects to base board and MUX with ESAI */
25#define CONFIG_FEC_ENET_DEV 1
26#define CONFIG_FEC_MXC_PHYADDR 0x0
Anatolij Gustschin49234a32020-01-07 16:37:42 +010027
Anatolij Gustschin49234a32020-01-07 16:37:42 +010028/* EEPROM */
29#define EEPROM_I2C_BUS 0 /* I2C0 */
30#define EEPROM_I2C_ADDR 0x50
31/* PCA9552 */
32#define PCA9552_1_I2C_BUS 1 /* I2C1 */
33#define PCA9552_1_I2C_ADDR 0x60
Anatolij Gustschin49234a32020-01-07 16:37:42 +010034
35/* AHAB */
36#ifdef CONFIG_AHAB_BOOT
37#define AHAB_ENV "sec_boot=yes\0"
38#else
39#define AHAB_ENV "sec_boot=no\0"
40#endif
41
42#define MFG_ENV_SETTINGS_DEFAULT \
43 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
44 "rdinit=/linuxrc " \
45 "clk_ignore_unused "\
46 "\0" \
47 "kboot=booti\0"\
48 "bootcmd_mfg=run mfgtool_args;" \
49 "if iminfo ${initrd_addr}; then " \
50 "if test ${tee} = yes; then " \
51 "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \
52 "else " \
53 "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \
54 "fi; " \
55 "else " \
56 "echo \"Run fastboot ...\"; fastboot 0; " \
57 "fi;\0"
58
59/* Boot M4 */
60#define M4_BOOT_ENV \
61 "m4_0_image=m4_0.bin\0" \
62 "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} " \
63 "${loadaddr} ${m4_0_image}\0" \
64 "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
65
66#define CONFIG_MFG_ENV_SETTINGS \
67 MFG_ENV_SETTINGS_DEFAULT \
68 "initrd_addr=0x83100000\0" \
69 "initrd_high=0xffffffffffffffff\0" \
70 "emmc_dev=0\0"
71
72/* Initial environment variables */
73#define CONFIG_EXTRA_ENV_SETTINGS \
74 CONFIG_MFG_ENV_SETTINGS \
75 M4_BOOT_ENV \
76 AHAB_ENV \
77 ENV_COMMON \
78 "script=boot.scr\0" \
79 "image=Image\0" \
80 "panel=NULL\0" \
81 "console=ttyLP2\0" \
82 "fdt_addr=0x83000000\0" \
83 "fdt_high=0xffffffffffffffff\0" \
84 "cntr_addr=0x88000000\0" \
85 "cntr_file=os_cntr_signed.bin\0" \
86 "initrd_addr=0x83800000\0" \
87 "initrd_high=0xffffffffffffffff\0" \
88 "netdev=eth0\0" \
89 "nfsopts=vers=3,udp,rsize=4096,wsize=4096,nolock rw\0" \
90 "hostname=capricorn\0" \
91 ENV_EMMC \
92 ENV_NET
93
Anatolij Gustschin49234a32020-01-07 16:37:42 +010094/* Default location for tftp and bootm */
Anatolij Gustschin49234a32020-01-07 16:37:42 +010095
Anatolij Gustschin49234a32020-01-07 16:37:42 +010096/* On CCP board, USDHC1 is for eMMC */
Anatolij Gustschin49234a32020-01-07 16:37:42 +010097
Anatolij Gustschin49234a32020-01-07 16:37:42 +010098#define CONFIG_SYS_SDRAM_BASE 0x80000000
99#define PHYS_SDRAM_1 0x80000000
100#define PHYS_SDRAM_2 0x880000000
101/* DDR3 board total DDR is 1 GB */
102#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1 GB */
103#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
104
Anatolij Gustschin49234a32020-01-07 16:37:42 +0100105#define BOOTAUX_RESERVED_MEM_BASE 0x88000000
106#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
107
108#endif /* __IMX8X_CAPRICORN_H */