Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) Stefano Babic <sbabic@denx.de> |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 6 | #ifndef __PCM058_CONFIG_H |
| 7 | #define __PCM058_CONFIG_H |
| 8 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 9 | #ifdef CONFIG_SPL |
Stefano Babic | 876a25d | 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 | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 15 | #define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) |
| 16 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 17 | /* Size of malloc() pool */ |
| 18 | #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M) |
| 19 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 20 | /* Enable NAND support */ |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 21 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 22 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 23 | /* Physical Memory Map */ |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 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 | |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 35 | /* Environment organization */ |
Niel Fourie | 26a6ed1 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 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" |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 46 | |
Niel Fourie | 26a6ed1 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 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" |
Stefano Babic | 876a25d | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 64 | #endif |