Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2016 Freescale Semiconductor, Inc. |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __LS1012ARDB_H__ |
| 7 | #define __LS1012ARDB_H__ |
| 8 | |
| 9 | #include "ls1012a_common.h" |
| 10 | |
Shengzhou Liu | cb7fb12 | 2016-08-26 18:30:39 +0800 | [diff] [blame] | 11 | /* DDR */ |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 12 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
| 13 | #define CONFIG_CHIP_SELECTS_PER_CTRL 1 |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 14 | #define CONFIG_SYS_SDRAM_SIZE 0x20000000 |
Shengzhou Liu | cb7fb12 | 2016-08-26 18:30:39 +0800 | [diff] [blame] | 15 | #define CONFIG_CHIP_SELECTS_PER_CTRL 1 |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 16 | #define CONFIG_CMD_MEMINFO |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 17 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 18 | #define CONFIG_SYS_MEMTEST_END 0x9fffffff |
| 19 | |
Rajesh Bhagat | d5ee59e | 2017-11-30 16:44:45 +0530 | [diff] [blame] | 20 | #ifndef CONFIG_SPL_BUILD |
| 21 | #undef BOOT_TARGET_DEVICES |
| 22 | #define BOOT_TARGET_DEVICES(func) \ |
| 23 | func(USB, usb, 0) |
| 24 | #endif |
| 25 | |
Pratiyush Srivastava | 716a1f9 | 2016-10-07 23:08:38 +0530 | [diff] [blame] | 26 | #undef CONFIG_EXTRA_ENV_SETTINGS |
Rajesh Bhagat | d5ee59e | 2017-11-30 16:44:45 +0530 | [diff] [blame] | 27 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 28 | "verify=no\0" \ |
| 29 | "fdt_high=0xffffffffffffffff\0" \ |
| 30 | "initrd_high=0xffffffffffffffff\0" \ |
| 31 | "fdt_addr=0x00f00000\0" \ |
| 32 | "kernel_addr=0x01000000\0" \ |
| 33 | "scriptaddr=0x80000000\0" \ |
| 34 | "fdtheader_addr_r=0x80100000\0" \ |
| 35 | "kernelheader_addr_r=0x80200000\0" \ |
| 36 | "kernel_addr_r=0x96000000\0" \ |
| 37 | "fdt_addr_r=0x90000000\0" \ |
| 38 | "load_addr=0x96000000\0" \ |
| 39 | "kernel_size=0x2800000\0" \ |
| 40 | "console=ttyS0,115200\0" \ |
| 41 | BOOTENV \ |
| 42 | "boot_scripts=ls1012afrdm_boot.scr\0" \ |
| 43 | "scan_dev_for_boot_part=" \ |
| 44 | "part list ${devtype} ${devnum} devplist; " \ |
| 45 | "env exists devplist || setenv devplist 1; " \ |
| 46 | "for distro_bootpart in ${devplist}; do " \ |
| 47 | "if fstype ${devtype} " \ |
| 48 | "${devnum}:${distro_bootpart} " \ |
| 49 | "bootfstype; then " \ |
| 50 | "run scan_dev_for_boot; " \ |
| 51 | "fi; " \ |
| 52 | "done\0" \ |
| 53 | "scan_dev_for_boot=" \ |
| 54 | "echo Scanning ${devtype} " \ |
| 55 | "${devnum}:${distro_bootpart}...; " \ |
| 56 | "for prefix in ${boot_prefixes}; do " \ |
| 57 | "run scan_dev_for_scripts; " \ |
| 58 | "done;" \ |
| 59 | "\0" \ |
| 60 | "installer=load usb 0:2 $load_addr " \ |
| 61 | "/flex_installer_arm64.itb; " \ |
| 62 | "bootm $load_addr#$board\0" \ |
Biwen Li | e709951 | 2019-11-15 15:10:14 +0800 | [diff] [blame] | 63 | "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \ |
Rajesh Bhagat | d5ee59e | 2017-11-30 16:44:45 +0530 | [diff] [blame] | 64 | "sf probe && sf read $load_addr " \ |
| 65 | "$kernel_addr $kernel_size && bootm $load_addr#$board\0" |
| 66 | |
| 67 | #undef CONFIG_BOOTCOMMAND |
Rajesh Bhagat | 487084e | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 68 | #ifdef CONFIG_TFABOOT |
| 69 | #undef QSPI_NOR_BOOTCOMMAND |
| 70 | #define QSPI_NOR_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd" |
| 71 | #else |
Calvin Johnson | 0e6101a | 2018-03-08 15:30:35 +0530 | [diff] [blame] | 72 | #define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd" |
Rajesh Bhagat | 487084e | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 73 | #endif |
Pratiyush Srivastava | 716a1f9 | 2016-10-07 23:08:38 +0530 | [diff] [blame] | 74 | |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 75 | #define CONFIG_CMD_MEMINFO |
Prabhakar Kushwaha | 9e7ee7b | 2016-06-03 18:41:36 +0530 | [diff] [blame] | 76 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 77 | #define CONFIG_SYS_MEMTEST_END 0x9fffffff |
| 78 | |
| 79 | #endif /* __LS1012ARDB_H__ */ |