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 | /* Size of malloc() pool */ |
| 18 | #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M) |
| 19 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 20 | /* Enable NAND support */ |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 21 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Niel Fourie | a9317c4 | 2021-03-22 14:05:11 +0100 | [diff] [blame] | 22 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 23 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 24 | /* Physical Memory Map */ |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 25 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 26 | |
| 27 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 28 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 29 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 30 | |
| 31 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 32 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 33 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 34 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 35 | |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 36 | /* Environment organization */ |
Niel Fourie | 8ee1907 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 37 | #define ENV_MMC \ |
| 38 | "mmcdev=0\0" \ |
| 39 | "mmcpart=2\0" \ |
| 40 | "fitpart=1\0" \ |
| 41 | "mmcrootfstype=ext4\0" \ |
| 42 | "fitname=fitImage\0" \ |
| 43 | "mmcloadfit=load mmc ${mmcdev}:${fitpart} ${loadaddr} ${fitname}\0" \ |
| 44 | "mmcargs=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcpart} " \ |
| 45 | "rootfstype=${mmcrootfstype} ${optargs}\0" \ |
| 46 | "mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0" |
| 47 | |
| 48 | #define ENV_NAND \ |
| 49 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
| 50 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
| 51 | "nandroot=ubi0:root ubi.mtd=rootfs\0" \ |
| 52 | "nandrootfstype=ubifs\0" \ |
| 53 | "nandargs=setenv bootargs root=${nandroot} " \ |
| 54 | "rootfstype=${nandrootfstype} ${mtdparts} ${optargs}\0" \ |
| 55 | "nandloadfit=ubi part rootfs;ubi readvol ${loadaddr} fit\0" \ |
| 56 | "nandboot=run nandloadfit;run nandargs;bootm ${loadaddr}\0" |
| 57 | |
| 58 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 59 | "bootm_size=0x30000000\0" \ |
| 60 | "optargs=rw rootwait\0" \ |
| 61 | ENV_MMC \ |
| 62 | ENV_NAND |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 63 | |
Niel Fourie | 8ee1907 | 2020-05-19 14:01:43 +0200 | [diff] [blame] | 64 | #define CONFIG_BOOTCOMMAND "run mmcboot;run nandboot" |
Stefano Babic | 17b6037 | 2016-06-08 10:50:20 +0200 | [diff] [blame] | 65 | #endif |