]> Git Repo - J-u-boot.git/blame - include/configs/imx8qxp_mek.h
Convert CONFIG_SYS_MALLOC_LEN to Kconfig
[J-u-boot.git] / include / configs / imx8qxp_mek.h
CommitLineData
d0dd7397
PF
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2018 NXP
4 */
5
6#ifndef __IMX8QXP_MEK_H
7#define __IMX8QXP_MEK_H
8
9#include <linux/sizes.h>
1af3c7f4 10#include <linux/stringify.h>
d0dd7397
PF
11#include <asm/arch/imx-regs.h>
12
018e3fd2 13#ifdef CONFIG_SPL_BUILD
018e3fd2
PF
14#define CONFIG_SPL_MAX_SIZE (124 * 1024)
15#define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
16#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
b1525842 17#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x800
018e3fd2
PF
18
19#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds"
20#define CONFIG_SPL_STACK 0x013E000
21#define CONFIG_SPL_BSS_START_ADDR 0x00128000
22#define CONFIG_SPL_BSS_MAX_SIZE 0x1000 /* 4 KB */
23#define CONFIG_SYS_SPL_MALLOC_START 0x00120000
24#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3000 /* 12 KB */
25#define CONFIG_SERIAL_LPUART_BASE 0x5a060000
018e3fd2
PF
26#define CONFIG_MALLOC_F_ADDR 0x00120000
27
28#define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
29
30#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
31
32#define CONFIG_OF_EMBED
33#endif
34
d0dd7397
PF
35#define CONFIG_REMAKE_ELF
36
d0dd7397
PF
37/* Flat Device Tree Definitions */
38#define CONFIG_OF_BOARD_SETUP
39
d0dd7397
PF
40#define CONFIG_SYS_FSL_ESDHC_ADDR 0
41#define USDHC1_BASE_ADDR 0x5B010000
42#define USDHC2_BASE_ADDR 0x5B020000
d0dd7397 43
d0dd7397
PF
44#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
45
6dcc6ceb
PF
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
d0dd7397
PF
52/* Initial environment variables */
53#define CONFIG_EXTRA_ENV_SETTINGS \
6dcc6ceb 54 AHAB_ENV \
d0dd7397
PF
55 "script=boot.scr\0" \
56 "image=Image\0" \
57 "panel=NULL\0" \
10a8cc01 58 "console=ttyLP0\0" \
d0dd7397
PF
59 "fdt_addr=0x83000000\0" \
60 "fdt_high=0xffffffffffffffff\0" \
61 "boot_fdt=try\0" \
a6c36f15 62 "fdt_file=undefined\0" \
d0dd7397
PF
63 "initrd_addr=0x83800000\0" \
64 "initrd_high=0xffffffffffffffff\0" \
65 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
66 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
67 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
68 "mmcautodetect=yes\0" \
10a8cc01 69 "mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}\0 " \
d0dd7397
PF
70 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
71 "bootscript=echo Running bootscript from mmc ...; " \
72 "source\0" \
73 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
74 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
6dcc6ceb
PF
75 "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
76 "auth_os=auth_cntr ${cntr_addr}\0" \
77 "boot_os=booti ${loadaddr} - ${fdt_addr};\0" \
d0dd7397
PF
78 "mmcboot=echo Booting from mmc ...; " \
79 "run mmcargs; " \
6dcc6ceb
PF
80 "if test ${sec_boot} = yes; then " \
81 "if run auth_os; then " \
82 "run boot_os; " \
d0dd7397 83 "else " \
6dcc6ceb 84 "echo ERR: failed to authenticate; " \
d0dd7397
PF
85 "fi; " \
86 "else " \
6dcc6ceb
PF
87 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
88 "if run loadfdt; then " \
89 "run boot_os; " \
90 "else " \
91 "echo WARN: Cannot load the DT; " \
92 "fi; " \
93 "else " \
94 "echo wait for boot; " \
95 "fi;" \
d0dd7397 96 "fi;\0" \
10a8cc01 97 "netargs=setenv bootargs console=${console},${baudrate} " \
d0dd7397
PF
98 "root=/dev/nfs " \
99 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
100 "netboot=echo Booting from net ...; " \
101 "run netargs; " \
102 "if test ${ip_dyn} = yes; then " \
103 "setenv get_cmd dhcp; " \
104 "else " \
105 "setenv get_cmd tftp; " \
106 "fi; " \
6dcc6ceb
PF
107 "if test ${sec_boot} = yes; then " \
108 "${get_cmd} ${cntr_addr} ${cntr_file}; " \
109 "if run auth_os; then " \
110 "run boot_os; " \
d0dd7397 111 "else " \
6dcc6ceb 112 "echo ERR: failed to authenticate; " \
d0dd7397
PF
113 "fi; " \
114 "else " \
6dcc6ceb
PF
115 "${get_cmd} ${loadaddr} ${image}; " \
116 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
117 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
118 "run boot_os; " \
119 "else " \
120 "echo WARN: Cannot load the DT; " \
121 "fi; " \
122 "else " \
123 "booti; " \
124 "fi;" \
d0dd7397
PF
125 "fi;\0"
126
127#define CONFIG_BOOTCOMMAND \
128 "mmc dev ${mmcdev}; if mmc rescan; then " \
129 "if run loadbootscript; then " \
130 "run bootscript; " \
131 "else " \
6dcc6ceb
PF
132 "if test ${sec_boot} = yes; then " \
133 "if run loadcntr; then " \
134 "run mmcboot; " \
135 "else run netboot; " \
136 "fi; " \
137 "else " \
138 "if run loadimage; then " \
139 "run mmcboot; " \
140 "else run netboot; " \
141 "fi; " \
142 "fi; " \
d0dd7397
PF
143 "fi; " \
144 "else booti ${loadaddr} - ${fdt_addr}; fi"
145
146/* Link Definitions */
d0dd7397
PF
147
148#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
149
150/* Default environment is in SD */
d0dd7397
PF
151
152#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
153
154/* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board */
d0dd7397
PF
155#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
156#define CONFIG_SYS_FSL_USDHC_NUM 2
157
d0dd7397
PF
158#define CONFIG_SYS_SDRAM_BASE 0x80000000
159#define PHYS_SDRAM_1 0x80000000
160#define PHYS_SDRAM_2 0x880000000
161#define PHYS_SDRAM_1_SIZE 0x80000000 /* 2 GB */
162/* LPDDR4 board total DDR is 3GB */
163#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1 GB */
164
d0dd7397
PF
165/* Generic Timer Definitions */
166#define COUNTER_FREQUENCY 8000000 /* 8MHz */
167
168#ifndef CONFIG_DM_PCA953X
169#define CONFIG_PCA953X
d0dd7397
PF
170#endif
171
172/* Networking */
173#define CONFIG_FEC_XCV_TYPE RGMII
d0dd7397 174
5c1c7c1e
AG
175/* Misc configuration */
176#define CONFIG_SYS_CBSIZE 2048
177#define CONFIG_SYS_MAXARGS 64
178#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
179
d0dd7397 180#endif /* __IMX8QXP_MEK_H */
This page took 0.186209 seconds and 4 git commands to generate.