blob: 4f03699117b7fc7cb99d290266e55cdad1e0b6a0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefano Babic17b60372016-06-08 10:50:20 +02002/*
3 * Copyright (C) Stefano Babic <sbabic@denx.de>
Stefano Babic17b60372016-06-08 10:50:20 +02004 */
5
Stefano Babic17b60372016-06-08 10:50:20 +02006#ifndef __PCM058_CONFIG_H
7#define __PCM058_CONFIG_H
8
Stefano Babic17b60372016-06-08 10:50:20 +02009#ifdef CONFIG_SPL
Stefano Babic17b60372016-06-08 10:50:20 +020010#include "imx6_spl.h"
11#endif
12
13#include "mx6_common.h"
14
Stefano Babic17b60372016-06-08 10:50:20 +020015#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
16
Stefano Babic17b60372016-06-08 10:50:20 +020017/* Size of malloc() pool */
18#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
19
Stefano Babic17b60372016-06-08 10:50:20 +020020/* Enable NAND support */
Stefano Babic17b60372016-06-08 10:50:20 +020021#define CONFIG_SYS_MAX_NAND_DEVICE 1
Stefano Babic17b60372016-06-08 10:50:20 +020022
Stefano Babic17b60372016-06-08 10:50:20 +020023/* Physical Memory Map */
Stefano Babic17b60372016-06-08 10:50:20 +020024#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
Stefano Babic17b60372016-06-08 10:50:20 +020035/* Environment organization */
Niel Fourie8ee19072020-05-19 14:01:43 +020036#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
Stefano Babic17b60372016-06-08 10:50:20 +020062
Niel Fourie8ee19072020-05-19 14:01:43 +020063#define CONFIG_BOOTCOMMAND "run mmcboot;run nandboot"
Stefano Babic17b60372016-06-08 10:50:20 +020064#endif