blob: 3ca03774506c8d818f13a3a2a039d62cbe1cf23c [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefano Babic876a25d2016-06-08 10:50:20 +02002/*
3 * Copyright (C) Stefano Babic <sbabic@denx.de>
Stefano Babic876a25d2016-06-08 10:50:20 +02004 */
5
Stefano Babic876a25d2016-06-08 10:50:20 +02006#ifndef __PCM058_CONFIG_H
7#define __PCM058_CONFIG_H
8
Stefano Babic876a25d2016-06-08 10:50:20 +02009#ifdef CONFIG_SPL
Stefano Babic876a25d2016-06-08 10:50:20 +020010#include "imx6_spl.h"
11#endif
12
13#include "mx6_common.h"
14
Stefano Babic876a25d2016-06-08 10:50:20 +020015#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
16
Stefano Babic876a25d2016-06-08 10:50:20 +020017/* Enable NAND support */
Stefano Babic876a25d2016-06-08 10:50:20 +020018#define CONFIG_SYS_MAX_NAND_DEVICE 1
Niel Fourie3da96302021-03-22 14:05:11 +010019#define CONFIG_SYS_NAND_ONFI_DETECTION
Stefano Babic876a25d2016-06-08 10:50:20 +020020
Stefano Babic876a25d2016-06-08 10:50:20 +020021/* Physical Memory Map */
Stefano Babic876a25d2016-06-08 10:50:20 +020022#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
23
24#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
25#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
26#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
27
28#define CONFIG_SYS_INIT_SP_OFFSET \
29 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
30#define CONFIG_SYS_INIT_SP_ADDR \
31 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
32
Stefano Babic876a25d2016-06-08 10:50:20 +020033/* Environment organization */
Niel Fourie26a6ed12020-05-19 14:01:43 +020034#define ENV_MMC \
35 "mmcdev=0\0" \
36 "mmcpart=2\0" \
37 "fitpart=1\0" \
38 "mmcrootfstype=ext4\0" \
39 "fitname=fitImage\0" \
40 "mmcloadfit=load mmc ${mmcdev}:${fitpart} ${loadaddr} ${fitname}\0" \
41 "mmcargs=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcpart} " \
42 "rootfstype=${mmcrootfstype} ${optargs}\0" \
43 "mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0"
Stefano Babic876a25d2016-06-08 10:50:20 +020044
Niel Fourie26a6ed12020-05-19 14:01:43 +020045#define ENV_NAND \
46 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
47 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
48 "nandroot=ubi0:root ubi.mtd=rootfs\0" \
49 "nandrootfstype=ubifs\0" \
50 "nandargs=setenv bootargs root=${nandroot} " \
51 "rootfstype=${nandrootfstype} ${mtdparts} ${optargs}\0" \
52 "nandloadfit=ubi part rootfs;ubi readvol ${loadaddr} fit\0" \
53 "nandboot=run nandloadfit;run nandargs;bootm ${loadaddr}\0"
54
55#define CONFIG_EXTRA_ENV_SETTINGS \
56 "bootm_size=0x30000000\0" \
57 "optargs=rw rootwait\0" \
58 ENV_MMC \
59 ENV_NAND
60
61#define CONFIG_BOOTCOMMAND "run mmcboot;run nandboot"
Stefano Babic876a25d2016-06-08 10:50:20 +020062#endif