Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) Stefano Babic <sbabic@denx.de> |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 6 | #ifndef __PCM058_CONFIG_H |
| 7 | #define __PCM058_CONFIG_H |
| 8 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 9 | #ifdef CONFIG_SPL |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 10 | #include "imx6_spl.h" |
| 11 | #endif |
| 12 | |
| 13 | #include "mx6_common.h" |
| 14 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 15 | #define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) |
| 16 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 17 | /* Enable NAND support */ |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 18 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 19 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 20 | /* Physical Memory Map */ |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 21 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 22 | |
| 23 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 24 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 25 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 26 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 27 | /* Environment organization */ |
Niel Fourie | 8ee1907 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 28 | #define ENV_MMC \ |
| 29 | "mmcdev=0\0" \ |
| 30 | "mmcpart=2\0" \ |
| 31 | "fitpart=1\0" \ |
| 32 | "mmcrootfstype=ext4\0" \ |
| 33 | "fitname=fitImage\0" \ |
| 34 | "mmcloadfit=load mmc ${mmcdev}:${fitpart} ${loadaddr} ${fitname}\0" \ |
| 35 | "mmcargs=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcpart} " \ |
| 36 | "rootfstype=${mmcrootfstype} ${optargs}\0" \ |
| 37 | "mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0" |
| 38 | |
| 39 | #define ENV_NAND \ |
Niel Fourie | 8ee1907 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 40 | "nandroot=ubi0:root ubi.mtd=rootfs\0" \ |
| 41 | "nandrootfstype=ubifs\0" \ |
| 42 | "nandargs=setenv bootargs root=${nandroot} " \ |
| 43 | "rootfstype=${nandrootfstype} ${mtdparts} ${optargs}\0" \ |
| 44 | "nandloadfit=ubi part rootfs;ubi readvol ${loadaddr} fit\0" \ |
| 45 | "nandboot=run nandloadfit;run nandargs;bootm ${loadaddr}\0" |
| 46 | |
| 47 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 48 | "bootm_size=0x30000000\0" \ |
| 49 | "optargs=rw rootwait\0" \ |
| 50 | ENV_MMC \ |
| 51 | ENV_NAND |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 52 | #endif |