Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2010-2011 Freescale Semiconductor, Inc. |
Biwen Li | b0939dd | 2020-05-01 20:04:01 +0800 | [diff] [blame] | 4 | * Copyright 2020 NXP |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | /* |
| 8 | * QorIQ RDB boards configuration file |
| 9 | */ |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
Simon Glass | fb64e36 | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 13 | #include <linux/stringify.h> |
| 14 | |
York Sun | 443108bf | 2016-11-17 13:52:44 -0800 | [diff] [blame] | 15 | #if defined(CONFIG_TARGET_P1020RDB_PC) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 16 | #define CONFIG_SLIC |
| 17 | #define __SW_BOOT_MASK 0x03 |
| 18 | #define __SW_BOOT_NOR 0x5c |
| 19 | #define __SW_BOOT_SPI 0x1c |
| 20 | #define __SW_BOOT_SD 0x9c |
| 21 | #define __SW_BOOT_NAND 0xec |
| 22 | #define __SW_BOOT_PCIE 0x6c |
Pali Rohár | 108bfdc | 2022-04-07 12:16:22 +0200 | [diff] [blame] | 23 | #define __SW_NOR_BANK_MASK 0xfd |
| 24 | #define __SW_NOR_BANK_UP 0x00 |
| 25 | #define __SW_NOR_BANK_LO 0x02 |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 26 | #define __SW_BOOT_NOR_BANK_UP 0x5c /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */ |
| 27 | #define __SW_BOOT_NOR_BANK_LO 0x5e /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */ |
| 28 | #define __SW_BOOT_NOR_BANK_MASK 0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 29 | #endif |
| 30 | |
Haijun.Zhang | a434d0a | 2013-06-28 10:47:09 +0800 | [diff] [blame] | 31 | /* |
| 32 | * P1020RDB-PD board has user selectable switches for evaluating different |
| 33 | * frequency and boot options for the P1020 device. The table that |
| 34 | * follow describe the available options. The front six binary number was in |
| 35 | * accordance with SW3[1:6]. |
| 36 | * 111101 533 533 267 667 NOR Core0 boot; Core1 hold-off |
| 37 | * 101101 667 667 333 667 NOR Core0 boot; Core1 hold-off |
| 38 | * 011001 800 800 400 667 NOR Core0 boot; Core1 hold-off |
| 39 | * 001001 800 800 400 667 SD/MMC Core0 boot; Core1 hold-off |
| 40 | * 001101 800 800 400 667 SPI Core0 boot; Core1 hold-off |
| 41 | * 010001 800 800 400 667 NAND Core0 boot; Core1 hold-off |
| 42 | * 011101 800 800 400 667 PCIe-2 Core0 boot; Core1 hold-off |
| 43 | */ |
York Sun | 0673238 | 2016-11-17 13:53:33 -0800 | [diff] [blame] | 44 | #if defined(CONFIG_TARGET_P1020RDB_PD) |
Haijun.Zhang | a434d0a | 2013-06-28 10:47:09 +0800 | [diff] [blame] | 45 | #define CONFIG_SLIC |
| 46 | #define __SW_BOOT_MASK 0x03 |
| 47 | #define __SW_BOOT_NOR 0x64 |
| 48 | #define __SW_BOOT_SPI 0x34 |
| 49 | #define __SW_BOOT_SD 0x24 |
| 50 | #define __SW_BOOT_NAND 0x44 |
| 51 | #define __SW_BOOT_PCIE 0x74 |
Pali Rohár | 108bfdc | 2022-04-07 12:16:22 +0200 | [diff] [blame] | 52 | #define __SW_NOR_BANK_MASK 0xfd |
| 53 | #define __SW_NOR_BANK_UP 0x00 |
| 54 | #define __SW_NOR_BANK_LO 0x02 |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 55 | #define __SW_BOOT_NOR_BANK_UP 0x64 /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */ |
| 56 | #define __SW_BOOT_NOR_BANK_LO 0x66 /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */ |
| 57 | #define __SW_BOOT_NOR_BANK_MASK 0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */ |
Yangbo Lu | 140b2bb | 2014-10-16 10:58:55 +0800 | [diff] [blame] | 58 | /* |
| 59 | * Dynamic MTD Partition support with mtdparts |
| 60 | */ |
Haijun.Zhang | a434d0a | 2013-06-28 10:47:09 +0800 | [diff] [blame] | 61 | #endif |
| 62 | |
York Sun | 9c01ff2 | 2016-11-17 14:19:18 -0800 | [diff] [blame] | 63 | #if defined(CONFIG_TARGET_P2020RDB) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 64 | #define __SW_BOOT_MASK 0x03 |
| 65 | #define __SW_BOOT_NOR 0xc8 |
| 66 | #define __SW_BOOT_SPI 0x28 |
Pali Rohár | 521973b | 2022-04-07 12:16:15 +0200 | [diff] [blame] | 67 | #define __SW_BOOT_SD 0x68 |
| 68 | #define __SW_BOOT_SD2 0x18 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 69 | #define __SW_BOOT_NAND 0xe8 |
| 70 | #define __SW_BOOT_PCIE 0xa8 |
Pali Rohár | 108bfdc | 2022-04-07 12:16:22 +0200 | [diff] [blame] | 71 | #define __SW_NOR_BANK_MASK 0xfd |
| 72 | #define __SW_NOR_BANK_UP 0x00 |
| 73 | #define __SW_NOR_BANK_LO 0x02 |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 74 | #define __SW_BOOT_NOR_BANK_UP 0xc8 /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */ |
| 75 | #define __SW_BOOT_NOR_BANK_LO 0xca /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */ |
| 76 | #define __SW_BOOT_NOR_BANK_MASK 0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */ |
Yangbo Lu | 140b2bb | 2014-10-16 10:58:55 +0800 | [diff] [blame] | 77 | /* |
| 78 | * Dynamic MTD Partition support with mtdparts |
| 79 | */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 80 | #endif |
| 81 | |
| 82 | #ifdef CONFIG_SDCARD |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 83 | #define CFG_SYS_MMC_U_BOOT_SIZE (768 << 10) |
| 84 | #define CFG_SYS_MMC_U_BOOT_DST CONFIG_TEXT_BASE |
| 85 | #define CFG_SYS_MMC_U_BOOT_START CONFIG_TEXT_BASE |
Pali Rohár | 78cc13c | 2022-08-01 14:50:12 +0200 | [diff] [blame] | 86 | #ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 87 | #define CFG_SYS_MMC_U_BOOT_OFFS (CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512) |
Pali Rohár | 78cc13c | 2022-08-01 14:50:12 +0200 | [diff] [blame] | 88 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 89 | #define CFG_SYS_MMC_U_BOOT_OFFS CONFIG_SPL_PAD_TO |
Pali Rohár | 78cc13c | 2022-08-01 14:50:12 +0200 | [diff] [blame] | 90 | #endif |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 91 | #elif defined(CONFIG_SPIFLASH) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 92 | #define CFG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) |
| 93 | #define CFG_SYS_SPI_FLASH_U_BOOT_DST CONFIG_TEXT_BASE |
| 94 | #define CFG_SYS_SPI_FLASH_U_BOOT_START CONFIG_TEXT_BASE |
| 95 | #define CFG_SYS_SPI_FLASH_U_BOOT_OFFS CONFIG_SPL_PAD_TO |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 96 | #elif defined(CONFIG_MTD_RAW_NAND) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 97 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 98 | #define CFG_SYS_NAND_U_BOOT_SIZE (832 << 10) |
| 99 | #define CFG_SYS_NAND_U_BOOT_DST (0x11000000) |
| 100 | #define CFG_SYS_NAND_U_BOOT_START (0x11000000) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 101 | #elif defined(CONFIG_SPL_BUILD) |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 102 | #define CFG_SYS_NAND_U_BOOT_SIZE (128 << 10) |
| 103 | #define CFG_SYS_NAND_U_BOOT_DST 0xf8f80000 |
| 104 | #define CFG_SYS_NAND_U_BOOT_START 0xf8f80000 |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 105 | #endif /* not CONFIG_TPL_BUILD */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 106 | #endif |
| 107 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 108 | #ifndef CONFIG_RESET_VECTOR_ADDRESS |
| 109 | #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc |
| 110 | #endif |
| 111 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 112 | /* |
| 113 | * These can be toggled for performance analysis, otherwise use default. |
| 114 | */ |
| 115 | #define CONFIG_L2_CACHE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 116 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 117 | #define CFG_SYS_CCSRBAR 0xffe00000 |
| 118 | #define CFG_SYS_CCSRBAR_PHYS_LOW CFG_SYS_CCSRBAR |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 119 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 120 | /* DDR Setup */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 121 | #define SPD_EEPROM_ADDRESS 0x52 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 122 | |
Priyanka Jain | b1d2441 | 2020-09-21 11:56:39 +0530 | [diff] [blame] | 123 | #if defined(CONFIG_TARGET_P1020RDB_PD) |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 124 | #define CFG_SYS_SDRAM_SIZE_LAW LAW_SIZE_2G |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 125 | #else |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 126 | #define CFG_SYS_SDRAM_SIZE_LAW LAW_SIZE_1G |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 127 | #endif |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 128 | #define CFG_SYS_SDRAM_SIZE (1u << (CFG_SYS_SDRAM_SIZE_LAW - 19)) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 129 | #define CFG_SYS_DDR_SDRAM_BASE 0x00000000 |
| 130 | #define CFG_SYS_SDRAM_BASE CFG_SYS_DDR_SDRAM_BASE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 131 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 132 | /* Default settings for DDR3 */ |
York Sun | 9c01ff2 | 2016-11-17 14:19:18 -0800 | [diff] [blame] | 133 | #ifndef CONFIG_TARGET_P2020RDB |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 134 | #define CFG_SYS_DDR_CS0_BNDS 0x0000003f |
| 135 | #define CFG_SYS_DDR_CS0_CONFIG 0x80014302 |
| 136 | #define CFG_SYS_DDR_CS0_CONFIG_2 0x00000000 |
| 137 | #define CFG_SYS_DDR_CS1_BNDS 0x0040007f |
| 138 | #define CFG_SYS_DDR_CS1_CONFIG 0x80014302 |
| 139 | #define CFG_SYS_DDR_CS1_CONFIG_2 0x00000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 140 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 141 | #define CFG_SYS_DDR_INIT_ADDR 0x00000000 |
| 142 | #define CFG_SYS_DDR_INIT_EXT_ADDR 0x00000000 |
| 143 | #define CFG_SYS_DDR_MODE_CONTROL 0x00000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 144 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 145 | #define CFG_SYS_DDR_ZQ_CONTROL 0x89080600 |
| 146 | #define CFG_SYS_DDR_WRLVL_CONTROL 0x8655A608 |
| 147 | #define CFG_SYS_DDR_SR_CNTR 0x00000000 |
| 148 | #define CFG_SYS_DDR_RCW_1 0x00000000 |
| 149 | #define CFG_SYS_DDR_RCW_2 0x00000000 |
| 150 | #define CFG_SYS_DDR_CONTROL 0xC70C0000 /* Type = DDR3 */ |
| 151 | #define CFG_SYS_DDR_CONTROL_2 0x04401050 |
| 152 | #define CFG_SYS_DDR_TIMING_4 0x00220001 |
| 153 | #define CFG_SYS_DDR_TIMING_5 0x03402400 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 154 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 155 | #define CFG_SYS_DDR_TIMING_3 0x00020000 |
| 156 | #define CFG_SYS_DDR_TIMING_0 0x00330004 |
| 157 | #define CFG_SYS_DDR_TIMING_1 0x6f6B4846 |
| 158 | #define CFG_SYS_DDR_TIMING_2 0x0FA8C8CF |
| 159 | #define CFG_SYS_DDR_CLK_CTRL 0x03000000 |
| 160 | #define CFG_SYS_DDR_MODE_1 0x40461520 |
| 161 | #define CFG_SYS_DDR_MODE_2 0x8000c000 |
| 162 | #define CFG_SYS_DDR_INTERVAL 0x0C300000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 163 | #endif |
| 164 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 165 | /* |
| 166 | * Memory map |
| 167 | * |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 168 | * 0x0000_0000 0x7fff_ffff DDR Up to 2GB cacheable |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 169 | * 0x8000_0000 0xdfff_ffff PCI Express Mem 1.5G non-cacheable(PCIe * 3) |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 170 | * 0xec00_0000 0xefff_ffff NOR flash Up to 64M non-cacheable CS0/1 |
Scott Wood | 03fedda | 2012-10-12 18:02:24 -0500 | [diff] [blame] | 171 | * 0xf8f8_0000 0xf8ff_ffff L2 SRAM Up to 512K cacheable |
| 172 | * (early boot only) |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 173 | * 0xff80_0000 0xff80_7fff NAND flash 32K non-cacheable CS1/0 |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 174 | * 0xffa0_0000 0xffaf_ffff CPLD 1M non-cacheable CS3 |
| 175 | * 0xffb0_0000 0xffbf_ffff VSC7385 switch 1M non-cacheable CS2 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 176 | * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 177 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K cacheable |
Scott Wood | 5e62187 | 2012-10-02 19:35:18 -0500 | [diff] [blame] | 178 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 179 | */ |
| 180 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 181 | /* |
| 182 | * Local Bus Definitions |
| 183 | */ |
Priyanka Jain | b1d2441 | 2020-09-21 11:56:39 +0530 | [diff] [blame] | 184 | #if defined(CONFIG_TARGET_P1020RDB_PD) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 185 | #define CFG_SYS_FLASH_BASE 0xec000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 186 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 187 | #define CFG_SYS_FLASH_BASE 0xef000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 188 | #endif |
| 189 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 190 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 191 | #define CFG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CFG_SYS_FLASH_BASE) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 192 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 193 | #define CFG_SYS_FLASH_BASE_PHYS CFG_SYS_FLASH_BASE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 194 | #endif |
| 195 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 196 | #define CONFIG_FLASH_BR_PRELIM (BR_PHYS_ADDR(CFG_SYS_FLASH_BASE_PHYS) \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 197 | | BR_PS_16 | BR_V) |
| 198 | |
| 199 | #define CONFIG_FLASH_OR_PRELIM 0xfc000ff7 |
| 200 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 201 | #define CFG_SYS_FLASH_BANKS_LIST {CFG_SYS_FLASH_BASE_PHYS} |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 202 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ |
| 203 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 204 | /* Nand Flash */ |
| 205 | #ifdef CONFIG_NAND_FSL_ELBC |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 206 | #define CFG_SYS_NAND_BASE 0xff800000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 207 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 208 | #define CFG_SYS_NAND_BASE_PHYS 0xfff800000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 209 | #else |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 210 | #define CFG_SYS_NAND_BASE_PHYS CFG_SYS_NAND_BASE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 211 | #endif |
| 212 | |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 213 | #define CFG_SYS_NAND_BASE_LIST { CFG_SYS_NAND_BASE } |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 214 | |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 215 | #define CFG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR(CFG_SYS_NAND_BASE_PHYS) \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 216 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
| 217 | | BR_PS_8 /* Port Size = 8 bit */ \ |
| 218 | | BR_MS_FCM /* MSEL = FCM */ \ |
| 219 | | BR_V) /* valid */ |
York Sun | 0673238 | 2016-11-17 13:53:33 -0800 | [diff] [blame] | 220 | #if defined(CONFIG_TARGET_P1020RDB_PD) |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 221 | #define CFG_SYS_NAND_OR_PRELIM (OR_AM_32KB \ |
Haijun.Zhang | a434d0a | 2013-06-28 10:47:09 +0800 | [diff] [blame] | 222 | | OR_FCM_PGS /* Large Page*/ \ |
| 223 | | OR_FCM_CSCT \ |
| 224 | | OR_FCM_CST \ |
| 225 | | OR_FCM_CHT \ |
| 226 | | OR_FCM_SCY_1 \ |
| 227 | | OR_FCM_TRLX \ |
| 228 | | OR_FCM_EHTR) |
| 229 | #else |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 230 | #define CFG_SYS_NAND_OR_PRELIM (OR_AM_32KB /* small page */ \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 231 | | OR_FCM_CSCT \ |
| 232 | | OR_FCM_CST \ |
| 233 | | OR_FCM_CHT \ |
| 234 | | OR_FCM_SCY_1 \ |
| 235 | | OR_FCM_TRLX \ |
| 236 | | OR_FCM_EHTR) |
Haijun.Zhang | a434d0a | 2013-06-28 10:47:09 +0800 | [diff] [blame] | 237 | #endif |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 238 | #endif /* CONFIG_NAND_FSL_ELBC */ |
| 239 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 240 | #define CFG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 241 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 242 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf |
| 243 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_LOW CFG_SYS_INIT_RAM_ADDR |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 244 | /* The assembler doesn't like typecast */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 245 | #define CFG_SYS_INIT_RAM_ADDR_PHYS \ |
| 246 | ((CFG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \ |
| 247 | CFG_SYS_INIT_RAM_ADDR_PHYS_LOW) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 248 | #else |
| 249 | /* Initial L1 address */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 250 | #define CFG_SYS_INIT_RAM_ADDR_PHYS CFG_SYS_INIT_RAM_ADDR |
| 251 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0 |
| 252 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_LOW CFG_SYS_INIT_RAM_ADDR_PHYS |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 253 | #endif |
| 254 | /* Size of used area in RAM */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 255 | #define CFG_SYS_INIT_RAM_SIZE 0x00004000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 256 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 257 | #define CFG_SYS_INIT_SP_OFFSET (CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 258 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 259 | #define CFG_SYS_CPLD_BASE 0xffa00000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 260 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 261 | #define CFG_SYS_CPLD_BASE_PHYS 0xfffa00000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 262 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 263 | #define CFG_SYS_CPLD_BASE_PHYS CFG_SYS_CPLD_BASE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 264 | #endif |
| 265 | /* CPLD config size: 1Mb */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 266 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 267 | /* Vsc7385 switch */ |
| 268 | #ifdef CONFIG_VSC7385_ENET |
Pali Rohár | 3cac197 | 2022-04-07 12:16:20 +0200 | [diff] [blame] | 269 | #define __VSCFW_ADDR "vscfw_addr=ef000000\0" |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 270 | #define CFG_SYS_VSC7385_BASE 0xffb00000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 271 | |
| 272 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 273 | #define CFG_SYS_VSC7385_BASE_PHYS 0xfffb00000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 274 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 275 | #define CFG_SYS_VSC7385_BASE_PHYS CFG_SYS_VSC7385_BASE |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 276 | #endif |
| 277 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 278 | /* The size of the VSC7385 firmware image */ |
| 279 | #define CONFIG_VSC7385_IMAGE_SIZE 8192 |
| 280 | #endif |
| 281 | |
Pali Rohár | 3cac197 | 2022-04-07 12:16:20 +0200 | [diff] [blame] | 282 | #ifndef __VSCFW_ADDR |
| 283 | #define __VSCFW_ADDR "" |
| 284 | #endif |
| 285 | |
Ying Zhang | 28027d7 | 2013-09-06 17:30:56 +0800 | [diff] [blame] | 286 | /* |
| 287 | * Config the L2 Cache as L2 SRAM |
| 288 | */ |
| 289 | #if defined(CONFIG_SPL_BUILD) |
Ying Zhang | f74fd4e | 2013-09-06 17:30:57 +0800 | [diff] [blame] | 290 | #if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 291 | #define CFG_SYS_INIT_L2_ADDR 0xf8f80000 |
| 292 | #define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR |
| 293 | #define CFG_SYS_INIT_L2_END (CFG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE) |
Miquel Raynal | d093536 | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 294 | #elif defined(CONFIG_MTD_RAW_NAND) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 295 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 296 | #define CFG_SYS_INIT_L2_ADDR 0xf8f80000 |
| 297 | #define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR |
| 298 | #define CFG_SYS_INIT_L2_END (CFG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 299 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 300 | #define CFG_SYS_INIT_L2_ADDR 0xf8f80000 |
| 301 | #define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR |
| 302 | #define CFG_SYS_INIT_L2_END (CFG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 303 | #endif /* CONFIG_TPL_BUILD */ |
Ying Zhang | 28027d7 | 2013-09-06 17:30:56 +0800 | [diff] [blame] | 304 | #endif |
| 305 | #endif |
| 306 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 307 | /* Serial Port - controlled on board with jumper J8 |
| 308 | * open - index 2 |
| 309 | * shorted - index 1 |
| 310 | */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 311 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
Tom Rini | df6a215 | 2022-11-16 13:10:28 -0500 | [diff] [blame] | 312 | #define CFG_SYS_NS16550_CLK get_bus_freq(0) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 313 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 314 | #define CFG_SYS_BAUDRATE_TABLE \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 315 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
| 316 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 317 | #define CFG_SYS_NS16550_COM1 (CFG_SYS_CCSRBAR+0x4500) |
| 318 | #define CFG_SYS_NS16550_COM2 (CFG_SYS_CCSRBAR+0x4600) |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 319 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 320 | /* I2C */ |
Igor Opaniuk | f7c9176 | 2021-02-09 13:52:45 +0200 | [diff] [blame] | 321 | #if !CONFIG_IS_ENABLED(DM_I2C) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 322 | #define CFG_SYS_I2C_NOPROBES { {0, 0x29} } |
Biwen Li | b0939dd | 2020-05-01 20:04:01 +0800 | [diff] [blame] | 323 | #endif |
| 324 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 325 | /* |
| 326 | * I2C2 EEPROM |
| 327 | */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 328 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 329 | #define CFG_SYS_I2C_RTC_ADDR 0x68 |
| 330 | #define CFG_SYS_I2C_PCA9557_ADDR 0x18 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 331 | |
| 332 | /* enable read and write access to EEPROM */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 333 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 334 | #if defined(CONFIG_PCI) |
| 335 | /* |
| 336 | * General PCI |
| 337 | * Memory space is mapped 1-1, but I/O space must start from 0. |
| 338 | */ |
| 339 | |
| 340 | /* controller 2, direct to uli, tgtid 2, Base address 9000 */ |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 341 | #define CFG_SYS_PCIE2_MEM_VIRT 0xa0000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 342 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 343 | #define CFG_SYS_PCIE2_MEM_PHYS 0xc20000000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 344 | #else |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 345 | #define CFG_SYS_PCIE2_MEM_PHYS 0xa0000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 346 | #endif |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 347 | #define CFG_SYS_PCIE2_IO_VIRT 0xffc10000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 348 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 349 | #define CFG_SYS_PCIE2_IO_PHYS 0xfffc10000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 350 | #else |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 351 | #define CFG_SYS_PCIE2_IO_PHYS 0xffc10000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 352 | #endif |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 353 | |
| 354 | /* controller 1, Slot 2, tgtid 1, Base address a000 */ |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 355 | #define CFG_SYS_PCIE1_MEM_VIRT 0x80000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 356 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 357 | #define CFG_SYS_PCIE1_MEM_PHYS 0xc00000000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 358 | #else |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 359 | #define CFG_SYS_PCIE1_MEM_PHYS 0x80000000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 360 | #endif |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 361 | #define CFG_SYS_PCIE1_IO_VIRT 0xffc00000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 362 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 363 | #define CFG_SYS_PCIE1_IO_PHYS 0xfffc00000ull |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 364 | #else |
Tom Rini | 56af659 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 365 | #define CFG_SYS_PCIE1_IO_PHYS 0xffc00000 |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 366 | #endif |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 367 | #endif /* CONFIG_PCI */ |
| 368 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 369 | /* |
| 370 | * Environment |
| 371 | */ |
Tom Rini | 5989fd4 | 2022-06-20 08:07:42 -0400 | [diff] [blame] | 372 | #if defined(CONFIG_MTD_RAW_NAND) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 373 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 374 | #define SPL_ENV_ADDR (CFG_SYS_INIT_L2_ADDR + (160 << 10)) |
Ying Zhang | b8b404d | 2013-09-06 17:30:58 +0800 | [diff] [blame] | 375 | #endif |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 376 | #endif |
| 377 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 378 | /* |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 379 | * USB |
| 380 | */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 381 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 382 | #ifdef CONFIG_MMC |
Tom Rini | 376b88a | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 383 | #define CFG_SYS_FSL_ESDHC_ADDR CFG_SYS_MPC85xx_ESDHC_ADDR |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 384 | #endif |
| 385 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 386 | /* |
| 387 | * Miscellaneous configurable options |
| 388 | */ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 389 | |
| 390 | /* |
| 391 | * For booting Linux, the board info and command line data |
| 392 | * have to be in the first 64 MB of memory, since this is |
| 393 | * the maximum mapped by the Linux kernel during initialization. |
| 394 | */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 395 | #define CFG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory for Linux*/ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 396 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 397 | /* |
| 398 | * Environment Configuration |
| 399 | */ |
Mario Six | 790d844 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 400 | #define CONFIG_HOSTNAME "unknown" |
Joe Hershberger | 257ff78 | 2011-10-13 13:03:47 +0000 | [diff] [blame] | 401 | #define CONFIG_ROOTPATH "/opt/nfsroot" |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 402 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ |
| 403 | |
Pali Rohár | edbaa2e | 2022-05-26 10:52:27 +0200 | [diff] [blame] | 404 | #include "p1_p2_bootsrc.h" |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 405 | |
| 406 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 407 | "netdev=eth0\0" \ |
Marek Vasut | 0b3176c | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 408 | "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 409 | "loadaddr=1000000\0" \ |
| 410 | "bootfile=uImage\0" \ |
| 411 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
Simon Glass | 72cc538 | 2022-10-20 18:22:39 -0600 | [diff] [blame] | 412 | "protect off " __stringify(CONFIG_TEXT_BASE) " +$filesize; " \ |
| 413 | "erase " __stringify(CONFIG_TEXT_BASE) " +$filesize; " \ |
| 414 | "cp.b $loadaddr " __stringify(CONFIG_TEXT_BASE) " $filesize; " \ |
| 415 | "protect on " __stringify(CONFIG_TEXT_BASE) " +$filesize; " \ |
| 416 | "cmp.b $loadaddr " __stringify(CONFIG_TEXT_BASE) " $filesize\0" \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 417 | "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0" \ |
| 418 | "consoledev=ttyS0\0" \ |
| 419 | "ramdiskaddr=2000000\0" \ |
| 420 | "ramdiskfile=rootfs.ext2.gz.uboot\0" \ |
Scott Wood | b7f4b85 | 2016-07-19 17:52:06 -0500 | [diff] [blame] | 421 | "fdtaddr=1e00000\0" \ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 422 | "bdev=sda1\0" \ |
| 423 | "jffs2nor=mtdblock3\0" \ |
| 424 | "norbootaddr=ef080000\0" \ |
| 425 | "norfdtaddr=ef040000\0" \ |
| 426 | "jffs2nand=mtdblock9\0" \ |
| 427 | "nandbootaddr=100000\0" \ |
| 428 | "nandfdtaddr=80000\0" \ |
| 429 | "ramdisk_size=120000\0" \ |
Pali Rohár | 3cac197 | 2022-04-07 12:16:20 +0200 | [diff] [blame] | 430 | __VSCFW_ADDR \ |
Pali Rohár | edbaa2e | 2022-05-26 10:52:27 +0200 | [diff] [blame] | 431 | MAP_NOR_LO_CMD(map_lowernorbank) \ |
| 432 | MAP_NOR_UP_CMD(map_uppernorbank) \ |
| 433 | RST_NOR_CMD(norboot) \ |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 434 | RST_NOR_LO_CMD(norlowerboot) \ |
| 435 | RST_NOR_UP_CMD(norupperboot) \ |
Pali Rohár | edbaa2e | 2022-05-26 10:52:27 +0200 | [diff] [blame] | 436 | RST_SPI_CMD(spiboot) \ |
| 437 | RST_SD_CMD(sdboot) \ |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 438 | RST_SD2_CMD(sd2boot) \ |
Pali Rohár | edbaa2e | 2022-05-26 10:52:27 +0200 | [diff] [blame] | 439 | RST_NAND_CMD(nandboot) \ |
| 440 | RST_PCIE_CMD(pciboot) \ |
Pali Rohár | 6037f90 | 2022-04-25 16:50:43 +0200 | [diff] [blame] | 441 | RST_DEF_CMD(defboot) \ |
Pali Rohár | edbaa2e | 2022-05-26 10:52:27 +0200 | [diff] [blame] | 442 | "" |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 443 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 444 | #define CONFIG_USB_FAT_BOOT \ |
| 445 | "setenv bootargs root=/dev/ram rw " \ |
| 446 | "console=$consoledev,$baudrate $othbootargs " \ |
| 447 | "ramdisk_size=$ramdisk_size;" \ |
| 448 | "usb start;" \ |
| 449 | "fatload usb 0:2 $loadaddr $bootfile;" \ |
| 450 | "fatload usb 0:2 $fdtaddr $fdtfile;" \ |
| 451 | "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \ |
| 452 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
| 453 | |
| 454 | #define CONFIG_USB_EXT2_BOOT \ |
| 455 | "setenv bootargs root=/dev/ram rw " \ |
| 456 | "console=$consoledev,$baudrate $othbootargs " \ |
| 457 | "ramdisk_size=$ramdisk_size;" \ |
| 458 | "usb start;" \ |
| 459 | "ext2load usb 0:4 $loadaddr $bootfile;" \ |
| 460 | "ext2load usb 0:4 $fdtaddr $fdtfile;" \ |
| 461 | "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \ |
| 462 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
| 463 | |
| 464 | #define CONFIG_NORBOOT \ |
| 465 | "setenv bootargs root=/dev/$jffs2nor rw " \ |
| 466 | "console=$consoledev,$baudrate rootfstype=jffs2 $othbootargs;" \ |
| 467 | "bootm $norbootaddr - $norfdtaddr" |
| 468 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 469 | #endif /* __CONFIG_H */ |