Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 |
| 3 | * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com> |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | #ifndef __CONFIG_H |
| 25 | #define __CONFIG_H |
| 26 | |
| 27 | /* |
| 28 | * High Level Configuration Options |
| 29 | * (easy to change) |
| 30 | */ |
Wolfgang Denk | dc25d15 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 31 | #if defined(CONFIG_spear300) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 32 | #define CONFIG_SPEAR3XX |
| 33 | #define CONFIG_SPEAR300 |
Wolfgang Denk | dc25d15 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 34 | #elif defined(CONFIG_spear310) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 35 | #define CONFIG_SPEAR3XX |
| 36 | #define CONFIG_SPEAR310 |
Wolfgang Denk | dc25d15 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 37 | #elif defined(CONFIG_spear320) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 38 | #define CONFIG_SPEAR3XX |
| 39 | #define CONFIG_SPEAR320 |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 40 | #endif |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 41 | |
Vipin KUMAR | 0c93dec | 2012-05-07 13:06:46 +0530 | [diff] [blame] | 42 | #if defined(CONFIG_usbtty) |
| 43 | #define CONFIG_SPEAR_USBTTY |
| 44 | #endif |
| 45 | |
| 46 | #if defined(CONFIG_nand) |
| 47 | #define CONFIG_ENV_IS_IN_NAND |
| 48 | #else |
| 49 | #define CONFIG_ENV_IS_IN_FLASH |
| 50 | #endif |
| 51 | |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 52 | #include <configs/spear-common.h> |
| 53 | |
Vipin KUMAR | 6b49f98 | 2012-05-07 13:06:42 +0530 | [diff] [blame] | 54 | /* Ethernet driver configuration */ |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 55 | #define CONFIG_DW_ALTDESCRIPTOR |
Vipin KUMAR | 6b49f98 | 2012-05-07 13:06:42 +0530 | [diff] [blame] | 56 | |
Vipin KUMAR | a1dba02 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 57 | #if defined(CONFIG_SPEAR310) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 58 | #define CONFIG_MACB |
Vipin KUMAR | a1dba02 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 59 | #define CONFIG_MACB0_PHY 0x01 |
| 60 | #define CONFIG_MACB1_PHY 0x03 |
| 61 | #define CONFIG_MACB2_PHY 0x05 |
| 62 | #define CONFIG_MACB3_PHY 0x07 |
| 63 | |
| 64 | #elif defined(CONFIG_SPEAR320) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 65 | #define CONFIG_MACB |
Vipin KUMAR | a1dba02 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 66 | #define CONFIG_MACB0_PHY 0x01 |
| 67 | |
| 68 | #endif |
| 69 | |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 70 | /* Serial Configuration (PL011) */ |
| 71 | #define CONFIG_SYS_SERIAL0 0xD0000000 |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 72 | |
| 73 | #if defined(CONFIG_SPEAR300) |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 74 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0} |
| 75 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 76 | #elif defined(CONFIG_SPEAR310) |
| 77 | |
| 78 | #if (CONFIG_CONS_INDEX) |
| 79 | #undef CONFIG_PL011_CLOCK |
| 80 | #define CONFIG_PL011_CLOCK (83 * 1000 * 1000) |
| 81 | #endif |
| 82 | |
| 83 | #define CONFIG_SYS_SERIAL1 0xB2000000 |
| 84 | #define CONFIG_SYS_SERIAL2 0xB2080000 |
| 85 | #define CONFIG_SYS_SERIAL3 0xB2100000 |
| 86 | #define CONFIG_SYS_SERIAL4 0xB2180000 |
| 87 | #define CONFIG_SYS_SERIAL5 0xB2200000 |
| 88 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ |
| 89 | (void *)CONFIG_SYS_SERIAL1, \ |
| 90 | (void *)CONFIG_SYS_SERIAL2, \ |
| 91 | (void *)CONFIG_SYS_SERIAL3, \ |
| 92 | (void *)CONFIG_SYS_SERIAL4, \ |
| 93 | (void *)CONFIG_SYS_SERIAL5 } |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 94 | #elif defined(CONFIG_SPEAR320) |
| 95 | |
| 96 | #if (CONFIG_CONS_INDEX) |
| 97 | #undef CONFIG_PL011_CLOCK |
| 98 | #define CONFIG_PL011_CLOCK (83 * 1000 * 1000) |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 99 | #endif |
| 100 | |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 101 | #define CONFIG_SYS_SERIAL1 0xA3000000 |
| 102 | #define CONFIG_SYS_SERIAL2 0xA4000000 |
| 103 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ |
| 104 | (void *)CONFIG_SYS_SERIAL1, \ |
| 105 | (void *)CONFIG_SYS_SERIAL2 } |
| 106 | #endif |
| 107 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 108 | #if defined(CONFIG_SPEAR_EMI) |
| 109 | |
| 110 | #define CONFIG_SYS_FLASH_CFI |
| 111 | #define CONFIG_FLASH_CFI_DRIVER |
| 112 | |
| 113 | #if defined(CONFIG_SPEAR310) |
Vipin Kumar | 6e051e9 | 2012-05-07 13:06:54 +0530 | [diff] [blame] | 114 | #define CONFIG_SYS_FLASH_PROTECTION |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 115 | #define CONFIG_SYS_FLASH_BASE 0x50000000 |
| 116 | #define CONFIG_SYS_CS1_FLASH_BASE 0x60000000 |
| 117 | #define CONFIG_SYS_CS2_FLASH_BASE 0x70000000 |
| 118 | #define CONFIG_SYS_CS3_FLASH_BASE 0x80000000 |
| 119 | #define CONFIG_SYS_CS4_FLASH_BASE 0x90000000 |
| 120 | #define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000 |
| 121 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ |
| 122 | CONFIG_SYS_CS1_FLASH_BASE, \ |
| 123 | CONFIG_SYS_CS2_FLASH_BASE, \ |
| 124 | CONFIG_SYS_CS3_FLASH_BASE, \ |
| 125 | CONFIG_SYS_CS4_FLASH_BASE, \ |
| 126 | CONFIG_SYS_CS5_FLASH_BASE } |
| 127 | #define CONFIG_SYS_MAX_FLASH_BANKS 6 |
| 128 | |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 129 | #elif defined(CONFIG_SPEAR320) |
Vipin Kumar | 6e051e9 | 2012-05-07 13:06:54 +0530 | [diff] [blame] | 130 | #define CONFIG_SYS_FLASH_PROTECTION |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 131 | #define CONFIG_SYS_FLASH_BASE 0x44000000 |
| 132 | #define CONFIG_SYS_CS1_FLASH_BASE 0x45000000 |
| 133 | #define CONFIG_SYS_CS2_FLASH_BASE 0x46000000 |
| 134 | #define CONFIG_SYS_CS3_FLASH_BASE 0x47000000 |
| 135 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ |
| 136 | CONFIG_SYS_CS1_FLASH_BASE, \ |
| 137 | CONFIG_SYS_CS2_FLASH_BASE, \ |
| 138 | CONFIG_SYS_CS3_FLASH_BASE } |
| 139 | #define CONFIG_SYS_MAX_FLASH_BANKS 4 |
| 140 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 141 | #endif |
| 142 | |
| 143 | #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8) |
Amit Virdi | 870d11e | 2012-05-07 13:07:02 +0530 | [diff] [blame^] | 144 | #define CONFIG_SYS_FLASH_QUIET_TEST |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 145 | |
| 146 | #endif |
| 147 | |
Vipin KUMAR | f1bd24e | 2012-05-22 00:15:55 +0000 | [diff] [blame] | 148 | /* NAND flash configuration */ |
| 149 | #define CONFIG_SYS_FSMC_NAND_SP |
| 150 | #define CONFIG_SYS_FSMC_NAND_8BIT |
| 151 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 152 | #if defined(CONFIG_SPEAR300) |
Amit Virdi | 9ee8d63 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 153 | #define CONFIG_SYS_NAND_BASE 0x80000000 |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 154 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 155 | #elif defined(CONFIG_SPEAR310) |
Amit Virdi | 9ee8d63 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 156 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 157 | |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 158 | #elif defined(CONFIG_SPEAR320) |
Amit Virdi | 9ee8d63 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 159 | #define CONFIG_SYS_NAND_BASE 0x50000000 |
Vipin KUMAR | cc0da71 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 160 | |
Vipin KUMAR | 6e2998f | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 161 | #endif |
| 162 | |
Vipin KUMAR | c54105b | 2012-05-07 13:06:48 +0530 | [diff] [blame] | 163 | /* Environment Settings */ |
| 164 | #if defined(CONFIG_SPEAR300) |
| 165 | #define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY |
| 166 | |
| 167 | #elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320) |
| 168 | #define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0" |
| 169 | #define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ |
| 170 | CONFIG_EXTRA_ENV_UNLOCK |
| 171 | #endif |
| 172 | |
Vipin KUMAR | b0ea089 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 173 | #endif /* __CONFIG_H */ |