Merge https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / include / configs / pcm058.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) Stefano Babic <sbabic@denx.de>
4  */
5
6 #ifndef __PCM058_CONFIG_H
7 #define __PCM058_CONFIG_H
8
9 #ifdef CONFIG_SPL
10 #include "imx6_spl.h"
11 #endif
12
13 #include "mx6_common.h"
14
15 #define PHYS_SDRAM_SIZE         (1u * 1024 * 1024 * 1024)
16
17 /* Size of malloc() pool */
18 #define CONFIG_SYS_MALLOC_LEN           (8 * SZ_1M)
19
20 /* Enable NAND support */
21 #define CONFIG_SYS_MAX_NAND_DEVICE      1
22
23 /* Physical Memory Map */
24 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
25
26 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
27 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
28 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
29
30 #define CONFIG_SYS_INIT_SP_OFFSET \
31         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
32 #define CONFIG_SYS_INIT_SP_ADDR \
33         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
34
35 /* Environment organization */
36 #define ENV_MMC \
37         "mmcdev=0\0" \
38         "mmcpart=2\0" \
39         "fitpart=1\0" \
40         "mmcrootfstype=ext4\0" \
41         "fitname=fitImage\0" \
42         "mmcloadfit=load mmc ${mmcdev}:${fitpart} ${loadaddr} ${fitname}\0" \
43         "mmcargs=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcpart} " \
44                 "rootfstype=${mmcrootfstype} ${optargs}\0" \
45         "mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0"
46
47 #define ENV_NAND \
48         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
49         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
50         "nandroot=ubi0:root ubi.mtd=rootfs\0" \
51         "nandrootfstype=ubifs\0" \
52         "nandargs=setenv bootargs root=${nandroot} " \
53                 "rootfstype=${nandrootfstype} ${mtdparts} ${optargs}\0" \
54         "nandloadfit=ubi part rootfs;ubi readvol ${loadaddr} fit\0" \
55         "nandboot=run nandloadfit;run nandargs;bootm ${loadaddr}\0"
56
57 #define CONFIG_EXTRA_ENV_SETTINGS \
58         "bootm_size=0x30000000\0" \
59         "optargs=rw rootwait\0" \
60         ENV_MMC \
61         ENV_NAND
62
63 #define CONFIG_BOOTCOMMAND "run mmcboot;run nandboot"
64 #endif