Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2010-2011 Freescale Semiconductor, Inc. |
Biwen Li | 2703e64 | 2020-05-01 20:04:13 +0800 | [diff] [blame] | 4 | * Copyright 2020 NXP |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | /* |
| 8 | * P010 RDB board configuration file |
| 9 | */ |
| 10 | |
| 11 | #ifndef __CONFIG_H |
| 12 | #define __CONFIG_H |
| 13 | |
Simon Glass | 1af3c7f | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 14 | #include <linux/stringify.h> |
| 15 | |
Prabhakar Kushwaha | 74fa22e | 2013-04-16 13:27:44 +0530 | [diff] [blame] | 16 | #include <asm/config_mpc85xx.h> |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 17 | |
| 18 | #ifdef CONFIG_SDCARD |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 19 | #define CFG_SYS_MMC_U_BOOT_SIZE (512 << 10) |
| 20 | #define CFG_SYS_MMC_U_BOOT_DST (0x11000000) |
| 21 | #define CFG_SYS_MMC_U_BOOT_START (0x11000000) |
| 22 | #define CFG_SYS_MMC_U_BOOT_OFFS (96 << 10) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 23 | #endif |
| 24 | |
| 25 | #ifdef CONFIG_SPIFLASH |
Udit Agarwal | bef1845 | 2019-11-07 16:11:39 +0000 | [diff] [blame] | 26 | #ifdef CONFIG_NXP_ESBC |
Tom Rini | 3db78c8 | 2022-12-04 10:13:40 -0500 | [diff] [blame] | 27 | #define CFG_RESET_VECTOR_ADDRESS 0x110bfffc |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 28 | #else |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 29 | #define CFG_SYS_SPI_FLASH_U_BOOT_SIZE (512 << 10) |
| 30 | #define CFG_SYS_SPI_FLASH_U_BOOT_DST (0x11000000) |
| 31 | #define CFG_SYS_SPI_FLASH_U_BOOT_START (0x11000000) |
| 32 | #define CFG_SYS_SPI_FLASH_U_BOOT_OFFS (96 << 10) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 33 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 34 | #endif |
| 35 | |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 36 | #ifdef CONFIG_MTD_RAW_NAND |
Udit Agarwal | bef1845 | 2019-11-07 16:11:39 +0000 | [diff] [blame] | 37 | #ifdef CONFIG_NXP_ESBC |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 38 | #define CFG_SYS_NAND_U_BOOT_SIZE ((768 << 10) - 0x2000) |
| 39 | #define CFG_SYS_NAND_U_BOOT_DST (0x00200000 - CONFIG_SPL_MAX_SIZE) |
| 40 | #define CFG_SYS_NAND_U_BOOT_START 0x00200000 |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 41 | #else |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 42 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 43 | #define CFG_SYS_NAND_U_BOOT_SIZE (576 << 10) |
| 44 | #define CFG_SYS_NAND_U_BOOT_DST (0x11000000) |
| 45 | #define CFG_SYS_NAND_U_BOOT_START (0x11000000) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 46 | #elif defined(CONFIG_SPL_BUILD) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 47 | #define CFG_SYS_NAND_U_BOOT_SIZE (128 << 10) |
| 48 | #define CFG_SYS_NAND_U_BOOT_DST 0xD0000000 |
| 49 | #define CFG_SYS_NAND_U_BOOT_START 0xD0000000 |
Dipen Dudhat | d793e5a | 2011-07-28 14:47:28 -0500 | [diff] [blame] | 50 | #endif |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 51 | #endif |
| 52 | #endif |
Ruchika Gupta | 2f439e8 | 2011-06-08 22:52:48 -0500 | [diff] [blame] | 53 | |
| 54 | #ifdef CONFIG_NAND_SECBOOT /* NAND Boot */ |
Tom Rini | 3db78c8 | 2022-12-04 10:13:40 -0500 | [diff] [blame] | 55 | #define CFG_RESET_VECTOR_ADDRESS 0x110bfffc |
Ruchika Gupta | 2f439e8 | 2011-06-08 22:52:48 -0500 | [diff] [blame] | 56 | #endif |
| 57 | |
Tom Rini | 3db78c8 | 2022-12-04 10:13:40 -0500 | [diff] [blame] | 58 | #ifndef CFG_RESET_VECTOR_ADDRESS |
| 59 | #define CFG_RESET_VECTOR_ADDRESS 0xeffffffc |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 60 | #endif |
| 61 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 62 | /* High Level Configuration Options */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 63 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 64 | #if defined(CONFIG_PCI) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 65 | /* |
| 66 | * PCI Windows |
| 67 | * Memory space is mapped 1-1, but I/O space must start from 0. |
| 68 | */ |
| 69 | /* controller 1, Slot 1, tgtid 1, Base address a000 */ |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 70 | #define CFG_SYS_PCIE1_MEM_VIRT 0x80000000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 71 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 72 | #define CFG_SYS_PCIE1_MEM_PHYS 0xc00000000ull |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 73 | #else |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 74 | #define CFG_SYS_PCIE1_MEM_PHYS 0x80000000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 75 | #endif |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 76 | #define CFG_SYS_PCIE1_IO_VIRT 0xffc00000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 77 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 78 | #define CFG_SYS_PCIE1_IO_PHYS 0xfffc00000ull |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 79 | #else |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 80 | #define CFG_SYS_PCIE1_IO_PHYS 0xffc00000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 81 | #endif |
| 82 | |
| 83 | /* controller 2, Slot 2, tgtid 2, Base address 9000 */ |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 84 | #define CFG_SYS_PCIE2_MEM_VIRT 0xa0000000 |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 85 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 86 | #define CFG_SYS_PCIE2_MEM_PHYS 0xc20000000ull |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 87 | #else |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 88 | #define CFG_SYS_PCIE2_MEM_PHYS 0xa0000000 |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 89 | #endif |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 90 | #define CFG_SYS_PCIE2_IO_VIRT 0xffc10000 |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 91 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 92 | #define CFG_SYS_PCIE2_IO_PHYS 0xfffc10000ull |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 93 | #else |
Tom Rini | ecc8d42 | 2022-11-16 13:10:33 -0500 | [diff] [blame] | 94 | #define CFG_SYS_PCIE2_IO_PHYS 0xffc10000 |
Hou Zhiqiang | 9de7c76 | 2020-05-01 19:06:28 +0800 | [diff] [blame] | 95 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 96 | #endif |
| 97 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 98 | /* DDR Setup */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 99 | #define SPD_EEPROM_ADDRESS 0x52 |
| 100 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 101 | #ifndef __ASSEMBLY__ |
| 102 | extern unsigned long get_sdram_size(void); |
| 103 | #endif |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 104 | #define CFG_SYS_SDRAM_SIZE get_sdram_size() /* DDR size */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 105 | #define CFG_SYS_DDR_SDRAM_BASE 0x00000000 |
| 106 | #define CFG_SYS_SDRAM_BASE CFG_SYS_DDR_SDRAM_BASE |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 107 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 108 | #define CFG_SYS_CCSRBAR 0xffe00000 |
| 109 | #define CFG_SYS_CCSRBAR_PHYS_LOW CFG_SYS_CCSRBAR |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 110 | |
| 111 | /* |
| 112 | * Memory map |
| 113 | * |
| 114 | * 0x0000_0000 0x3fff_ffff DDR 1G cacheable |
| 115 | * 0x8000_0000 0xbfff_ffff PCI Express Mem 1.5G non-cacheable |
| 116 | * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable |
| 117 | * |
| 118 | * Localbus non-cacheable |
| 119 | * 0xff80_0000 0xff8f_ffff NAND Flash 1M non-cacheable |
| 120 | * 0xffb0_0000 0xffbf_ffff Board CPLD 1M non-cacheable |
| 121 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0 |
| 122 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable |
| 123 | */ |
| 124 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 125 | /* |
| 126 | * IFC Definitions |
| 127 | */ |
| 128 | /* NOR Flash on IFC */ |
Prabhakar Kushwaha | 0fa934d | 2013-04-16 13:28:12 +0530 | [diff] [blame] | 129 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 130 | #define CFG_SYS_FLASH_BASE 0xee000000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 131 | |
| 132 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 133 | #define CFG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CFG_SYS_FLASH_BASE) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 134 | #else |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 135 | #define CFG_SYS_FLASH_BASE_PHYS CFG_SYS_FLASH_BASE |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 136 | #endif |
| 137 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 138 | #define CFG_SYS_NOR_CSPR (CSPR_PHYS_ADDR(CFG_SYS_FLASH_BASE_PHYS) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 139 | CSPR_PORT_SIZE_16 | \ |
| 140 | CSPR_MSEL_NOR | \ |
| 141 | CSPR_V) |
Tom Rini | 0ed384f | 2022-11-16 13:10:25 -0500 | [diff] [blame] | 142 | #define CFG_SYS_NOR_AMASK IFC_AMASK(32*1024*1024) |
| 143 | #define CFG_SYS_NOR_CSOR CSOR_NOR_ADM_SHIFT(7) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 144 | /* NOR Flash Timing Params */ |
Tom Rini | 0ed384f | 2022-11-16 13:10:25 -0500 | [diff] [blame] | 145 | #define CFG_SYS_NOR_FTIM0 FTIM0_NOR_TACSE(0x4) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 146 | FTIM0_NOR_TEADC(0x5) | \ |
| 147 | FTIM0_NOR_TEAHC(0x5) |
Tom Rini | 0ed384f | 2022-11-16 13:10:25 -0500 | [diff] [blame] | 148 | #define CFG_SYS_NOR_FTIM1 FTIM1_NOR_TACO(0x1e) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 149 | FTIM1_NOR_TRAD_NOR(0x0f) |
Tom Rini | 0ed384f | 2022-11-16 13:10:25 -0500 | [diff] [blame] | 150 | #define CFG_SYS_NOR_FTIM2 FTIM2_NOR_TCS(0x4) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 151 | FTIM2_NOR_TCH(0x4) | \ |
| 152 | FTIM2_NOR_TWP(0x1c) |
Tom Rini | 0ed384f | 2022-11-16 13:10:25 -0500 | [diff] [blame] | 153 | #define CFG_SYS_NOR_FTIM3 0x0 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 154 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 155 | #define CFG_SYS_FLASH_BANKS_LIST {CFG_SYS_FLASH_BASE_PHYS} |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 156 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 157 | /* CFI for NOR Flash */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 158 | |
| 159 | /* NAND Flash on IFC */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 160 | #define CFG_SYS_NAND_BASE 0xff800000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 161 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 162 | #define CFG_SYS_NAND_BASE_PHYS 0xfff800000ull |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 163 | #else |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 164 | #define CFG_SYS_NAND_BASE_PHYS CFG_SYS_NAND_BASE |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 165 | #endif |
| 166 | |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 167 | #define CFG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CFG_SYS_NAND_BASE_PHYS) \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 168 | | CSPR_PORT_SIZE_8 \ |
| 169 | | CSPR_MSEL_NAND \ |
| 170 | | CSPR_V) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 171 | #define CFG_SYS_NAND_AMASK IFC_AMASK(64*1024) |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 172 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 173 | #if defined(CONFIG_TARGET_P1010RDB_PA) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 174 | #define CFG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 175 | | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ |
| 176 | | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \ |
| 177 | | CSOR_NAND_RAL_2 /* RAL = 2 Bytes */ \ |
| 178 | | CSOR_NAND_PGS_512 /* Page Size = 512b */ \ |
| 179 | | CSOR_NAND_SPRZ_16 /* Spare size = 16 */ \ |
| 180 | | CSOR_NAND_PB(32)) /* 32 Pages Per Block */ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 181 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 182 | #elif defined(CONFIG_TARGET_P1010RDB_PB) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 183 | #define CFG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 184 | | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ |
| 185 | | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \ |
| 186 | | CSOR_NAND_RAL_3 /* RAL = 3Byes */ \ |
| 187 | | CSOR_NAND_PGS_4K /* Page Size = 4K */ \ |
| 188 | | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \ |
| 189 | | CSOR_NAND_PB(128)) /*Pages Per Block = 128 */ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 190 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 191 | |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 192 | #define CFG_SYS_NAND_BASE_LIST { CFG_SYS_NAND_BASE } |
Dipen Dudhat | d793e5a | 2011-07-28 14:47:28 -0500 | [diff] [blame] | 193 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 194 | #if defined(CONFIG_TARGET_P1010RDB_PA) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 195 | /* NAND Flash Timing Params */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 196 | #define CFG_SYS_NAND_FTIM0 FTIM0_NAND_TCCST(0x01) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 197 | FTIM0_NAND_TWP(0x0C) | \ |
| 198 | FTIM0_NAND_TWCHT(0x04) | \ |
| 199 | FTIM0_NAND_TWH(0x05) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 200 | #define CFG_SYS_NAND_FTIM1 FTIM1_NAND_TADLE(0x1d) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 201 | FTIM1_NAND_TWBE(0x1d) | \ |
| 202 | FTIM1_NAND_TRR(0x07) | \ |
| 203 | FTIM1_NAND_TRP(0x0c) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 204 | #define CFG_SYS_NAND_FTIM2 FTIM2_NAND_TRAD(0x0c) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 205 | FTIM2_NAND_TREH(0x05) | \ |
| 206 | FTIM2_NAND_TWHRE(0x0f) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 207 | #define CFG_SYS_NAND_FTIM3 FTIM3_NAND_TWW(0x04) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 208 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 209 | #elif defined(CONFIG_TARGET_P1010RDB_PB) |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 210 | /* support MT29F16G08ABABAWP 4k-pagesize 2G-bytes NAND */ |
| 211 | /* ONFI NAND Flash mode0 Timing Params */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 212 | #define CFG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07)| \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 213 | FTIM0_NAND_TWP(0x18) | \ |
| 214 | FTIM0_NAND_TWCHT(0x07) | \ |
| 215 | FTIM0_NAND_TWH(0x0a)) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 216 | #define CFG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32)| \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 217 | FTIM1_NAND_TWBE(0x39) | \ |
| 218 | FTIM1_NAND_TRR(0x0e) | \ |
| 219 | FTIM1_NAND_TRP(0x18)) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 220 | #define CFG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 221 | FTIM2_NAND_TREH(0x0a) | \ |
| 222 | FTIM2_NAND_TWHRE(0x1e)) |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 223 | #define CFG_SYS_NAND_FTIM3 0x0 |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 224 | #endif |
| 225 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 226 | /* Set up IFC registers for boot location NOR/NAND */ |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 227 | #if defined(CONFIG_MTD_RAW_NAND) || defined(CONFIG_NAND_SECBOOT) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 228 | #define CFG_SYS_CSPR0 CFG_SYS_NAND_CSPR |
| 229 | #define CFG_SYS_AMASK0 CFG_SYS_NAND_AMASK |
| 230 | #define CFG_SYS_CSOR0 CFG_SYS_NAND_CSOR |
| 231 | #define CFG_SYS_CS0_FTIM0 CFG_SYS_NAND_FTIM0 |
| 232 | #define CFG_SYS_CS0_FTIM1 CFG_SYS_NAND_FTIM1 |
| 233 | #define CFG_SYS_CS0_FTIM2 CFG_SYS_NAND_FTIM2 |
| 234 | #define CFG_SYS_CS0_FTIM3 CFG_SYS_NAND_FTIM3 |
| 235 | #define CFG_SYS_CSPR1 CFG_SYS_NOR_CSPR |
| 236 | #define CFG_SYS_AMASK1 CFG_SYS_NOR_AMASK |
| 237 | #define CFG_SYS_CSOR1 CFG_SYS_NOR_CSOR |
| 238 | #define CFG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0 |
| 239 | #define CFG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1 |
| 240 | #define CFG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2 |
| 241 | #define CFG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3 |
Dipen Dudhat | d793e5a | 2011-07-28 14:47:28 -0500 | [diff] [blame] | 242 | #else |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 243 | #define CFG_SYS_CSPR0 CFG_SYS_NOR_CSPR |
| 244 | #define CFG_SYS_AMASK0 CFG_SYS_NOR_AMASK |
| 245 | #define CFG_SYS_CSOR0 CFG_SYS_NOR_CSOR |
| 246 | #define CFG_SYS_CS0_FTIM0 CFG_SYS_NOR_FTIM0 |
| 247 | #define CFG_SYS_CS0_FTIM1 CFG_SYS_NOR_FTIM1 |
| 248 | #define CFG_SYS_CS0_FTIM2 CFG_SYS_NOR_FTIM2 |
| 249 | #define CFG_SYS_CS0_FTIM3 CFG_SYS_NOR_FTIM3 |
| 250 | #define CFG_SYS_CSPR1 CFG_SYS_NAND_CSPR |
| 251 | #define CFG_SYS_AMASK1 CFG_SYS_NAND_AMASK |
| 252 | #define CFG_SYS_CSOR1 CFG_SYS_NAND_CSOR |
| 253 | #define CFG_SYS_CS1_FTIM0 CFG_SYS_NAND_FTIM0 |
| 254 | #define CFG_SYS_CS1_FTIM1 CFG_SYS_NAND_FTIM1 |
| 255 | #define CFG_SYS_CS1_FTIM2 CFG_SYS_NAND_FTIM2 |
| 256 | #define CFG_SYS_CS1_FTIM3 CFG_SYS_NAND_FTIM3 |
Dipen Dudhat | d793e5a | 2011-07-28 14:47:28 -0500 | [diff] [blame] | 257 | #endif |
| 258 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 259 | /* CPLD on IFC */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 260 | #define CFG_SYS_CPLD_BASE 0xffb00000 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 261 | |
| 262 | #ifdef CONFIG_PHYS_64BIT |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 263 | #define CFG_SYS_CPLD_BASE_PHYS 0xfffb00000ull |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 264 | #else |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 265 | #define CFG_SYS_CPLD_BASE_PHYS CFG_SYS_CPLD_BASE |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 266 | #endif |
| 267 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 268 | #define CFG_SYS_CSPR3 (CSPR_PHYS_ADDR(CFG_SYS_CPLD_BASE_PHYS) \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 269 | | CSPR_PORT_SIZE_8 \ |
| 270 | | CSPR_MSEL_GPCM \ |
| 271 | | CSPR_V) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 272 | #define CFG_SYS_AMASK3 IFC_AMASK(64*1024) |
| 273 | #define CFG_SYS_CSOR3 0x0 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 274 | /* CPLD Timing parameters for IFC CS3 */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 275 | #define CFG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0x0e) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 276 | FTIM0_GPCM_TEADC(0x0e) | \ |
| 277 | FTIM0_GPCM_TEAHC(0x0e)) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 278 | #define CFG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0x0e) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 279 | FTIM1_GPCM_TRAD(0x1f)) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 280 | #define CFG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(0x0e) | \ |
Shaohui Xie | de51916 | 2014-06-26 14:41:33 +0800 | [diff] [blame] | 281 | FTIM2_GPCM_TCH(0x8) | \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 282 | FTIM2_GPCM_TWP(0x1f)) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 283 | #define CFG_SYS_CS3_FTIM3 0x0 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 284 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 285 | #define CFG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */ |
| 286 | #define CFG_SYS_INIT_RAM_SIZE 0x00004000 /* End of used area in RAM */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 287 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 288 | #define CFG_SYS_INIT_SP_OFFSET (CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 289 | |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 290 | /* |
| 291 | * Config the L2 Cache as L2 SRAM |
| 292 | */ |
| 293 | #if defined(CONFIG_SPL_BUILD) |
| 294 | #if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 295 | #define CFG_SYS_INIT_L2_ADDR 0xD0000000 |
| 296 | #define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR |
| 297 | #define CFG_SYS_INIT_L2_END (CFG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE) |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 298 | #elif defined(CONFIG_MTD_RAW_NAND) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 299 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 300 | #define CFG_SYS_INIT_L2_ADDR 0xD0000000 |
| 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 | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 303 | #else |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 304 | #define CFG_SYS_INIT_L2_ADDR 0xD0000000 |
| 305 | #define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR |
| 306 | #define CFG_SYS_INIT_L2_END (CFG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 307 | #endif |
| 308 | #endif |
| 309 | #endif |
| 310 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 311 | /* Serial Port */ |
Tom Rini | 9109213 | 2022-11-16 13:10:28 -0500 | [diff] [blame] | 312 | #define CFG_SYS_NS16550_CLK get_bus_freq(0) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 313 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 314 | #define CFG_SYS_BAUDRATE_TABLE \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 315 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
| 316 | |
Tom Rini | 65cc0e2 | 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) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 319 | |
Heiko Schocher | 00f792e | 2012-10-24 13:48:22 +0200 | [diff] [blame] | 320 | /* I2C */ |
Shengzhou Liu | ad89da0 | 2013-09-13 14:46:02 +0800 | [diff] [blame] | 321 | #define I2C_PCA9557_ADDR1 0x18 |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 322 | #define I2C_PCA9557_ADDR2 0x19 |
Shengzhou Liu | ad89da0 | 2013-09-13 14:46:02 +0800 | [diff] [blame] | 323 | #define I2C_PCA9557_BUS_NUM 0 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 324 | |
| 325 | /* I2C EEPROM */ |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 326 | #if defined(CONFIG_TARGET_P1010RDB_PB) |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 327 | #define MAX_NUM_PORTS 9 /* for 128Bytes EEPROM */ |
| 328 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 329 | /* enable read and write access to EEPROM */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 330 | |
| 331 | /* RTC */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 332 | #define CFG_SYS_I2C_RTC_ADDR 0x68 |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 333 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 334 | /* |
| 335 | * SPI interface will not be available in case of NAND boot SPI CS0 will be |
| 336 | * used for SLIC |
| 337 | */ |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 338 | #if !defined(CONFIG_MTD_RAW_NAND) || !defined(CONFIG_NAND_SECBOOT) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 339 | /* eSPI - Enhanced SPI */ |
Dipen Dudhat | d793e5a | 2011-07-28 14:47:28 -0500 | [diff] [blame] | 340 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 341 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 342 | #ifdef CONFIG_MMC |
Tom Rini | 6cc0454 | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 343 | #define CFG_SYS_FSL_ESDHC_ADDR CFG_SYS_MPC85xx_ESDHC_ADDR |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 344 | #endif |
| 345 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 346 | /* |
| 347 | * Environment |
| 348 | */ |
Tom Rini | d8e8461 | 2022-06-20 08:07:42 -0400 | [diff] [blame] | 349 | #if defined(CONFIG_MTD_RAW_NAND) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 350 | #ifdef CONFIG_TPL_BUILD |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 351 | #define SPL_ENV_ADDR (CFG_SYS_INIT_L2_ADDR + (160 << 10)) |
Ying Zhang | c9e1f58 | 2014-01-24 15:50:09 +0800 | [diff] [blame] | 352 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 353 | #endif |
| 354 | |
Tom Rini | 8850c5d | 2017-05-12 22:33:27 -0400 | [diff] [blame] | 355 | #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI_HCD) \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 356 | || defined(CONFIG_FSL_SATA) |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 357 | #endif |
| 358 | |
| 359 | /* |
| 360 | * Miscellaneous configurable options |
| 361 | */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 362 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 363 | /* |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 364 | * For booting Linux, the board info and command line data |
| 365 | * have to be in the first 64 MB of memory, since this is |
| 366 | * the maximum mapped by the Linux kernel during initialization. |
| 367 | */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 368 | #define CFG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory map for Linux */ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 369 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 370 | /* |
| 371 | * Environment Configuration |
| 372 | */ |
| 373 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 374 | #define CFG_EXTRA_ENV_SETTINGS \ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 375 | "hwconfig=" __stringify(CONFIG_DEF_HWCONFIG) "\0" \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 376 | "netdev=eth0\0" \ |
Tom Rini | 54f80dd | 2022-12-02 16:42:27 -0500 | [diff] [blame] | 377 | "uboot=" CONFIG_UBOOTPATH "\0" \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 378 | "loadaddr=1000000\0" \ |
| 379 | "consoledev=ttyS0\0" \ |
| 380 | "ramdiskaddr=2000000\0" \ |
| 381 | "ramdiskfile=rootfs.ext2.gz.uboot\0" \ |
Scott Wood | b24a4f6 | 2016-07-19 17:52:06 -0500 | [diff] [blame] | 382 | "fdtaddr=1e00000\0" \ |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 383 | "fdtfile=p1010rdb.dtb\0" \ |
| 384 | "bdev=sda1\0" \ |
| 385 | "hwconfig=usb1:dr_mode=host,phy_type=utmi\0" \ |
| 386 | "othbootargs=ramdisk_size=600000\0" \ |
| 387 | "usbfatboot=setenv bootargs root=/dev/ram rw " \ |
| 388 | "console=$consoledev,$baudrate $othbootargs; " \ |
| 389 | "usb start;" \ |
| 390 | "fatload usb 0:2 $loadaddr $bootfile;" \ |
| 391 | "fatload usb 0:2 $fdtaddr $fdtfile;" \ |
| 392 | "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \ |
| 393 | "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \ |
| 394 | "usbext2boot=setenv bootargs root=/dev/ram rw " \ |
| 395 | "console=$consoledev,$baudrate $othbootargs; " \ |
| 396 | "usb start;" \ |
| 397 | "ext2load usb 0:4 $loadaddr $bootfile;" \ |
| 398 | "ext2load usb 0:4 $fdtaddr $fdtfile;" \ |
| 399 | "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 400 | "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \ |
Tom Rini | 028aa09 | 2022-02-25 11:19:49 -0500 | [diff] [blame] | 401 | BOOTMODE |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 402 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 403 | #if defined(CONFIG_TARGET_P1010RDB_PA) |
Tom Rini | 028aa09 | 2022-02-25 11:19:49 -0500 | [diff] [blame] | 404 | #define BOOTMODE \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 405 | "boot_bank0=i2c dev 0; i2c mw 18 1 f1; i2c mw 18 3 f0;" \ |
| 406 | "mw.b ffb00011 0; mw.b ffb00009 0; reset\0" \ |
| 407 | "boot_bank1=i2c dev 0; i2c mw 18 1 f1; i2c mw 18 3 f0;" \ |
| 408 | "mw.b ffb00011 0; mw.b ffb00009 1; reset\0" \ |
| 409 | "boot_nand=i2c dev 0; i2c mw 18 1 f9; i2c mw 18 3 f0;" \ |
| 410 | "mw.b ffb00011 0; mw.b ffb00017 1; reset\0" |
| 411 | |
York Sun | 7601686 | 2016-11-16 13:30:06 -0800 | [diff] [blame] | 412 | #elif defined(CONFIG_TARGET_P1010RDB_PB) |
Tom Rini | 028aa09 | 2022-02-25 11:19:49 -0500 | [diff] [blame] | 413 | #define BOOTMODE \ |
Shengzhou Liu | e512c50 | 2013-09-13 14:46:03 +0800 | [diff] [blame] | 414 | "boot_bank0=i2c dev 0; i2c mw 18 1 fe; i2c mw 18 3 0;" \ |
| 415 | "i2c mw 19 1 2; i2c mw 19 3 e1; reset\0" \ |
| 416 | "boot_bank1=i2c dev 0; i2c mw 18 1 fe; i2c mw 18 3 0;" \ |
| 417 | "i2c mw 19 1 12; i2c mw 19 3 e1; reset\0" \ |
| 418 | "boot_nand=i2c dev 0; i2c mw 18 1 fc; i2c mw 18 3 0;" \ |
| 419 | "i2c mw 19 1 8; i2c mw 19 3 f7; reset\0" \ |
| 420 | "boot_spi=i2c dev 0; i2c mw 18 1 fa; i2c mw 18 3 0;" \ |
| 421 | "i2c mw 19 1 0; i2c mw 19 3 f7; reset\0" \ |
| 422 | "boot_sd=i2c dev 0; i2c mw 18 1 f8; i2c mw 18 3 0;" \ |
| 423 | "i2c mw 19 1 4; i2c mw 19 3 f3; reset\0" |
| 424 | #endif |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 425 | |
Ruchika Gupta | 2f439e8 | 2011-06-08 22:52:48 -0500 | [diff] [blame] | 426 | #include <asm/fsl_secure_boot.h> |
Ruchika Gupta | 2f439e8 | 2011-06-08 22:52:48 -0500 | [diff] [blame] | 427 | |
Poonam Aggrwal | 49249e1 | 2011-02-09 19:17:53 +0000 | [diff] [blame] | 428 | #endif /* __CONFIG_H */ |