Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 |
| 3 | * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com> |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __CONFIG_H |
| 9 | #define __CONFIG_H |
| 10 | |
| 11 | /* |
| 12 | * High Level Configuration Options |
| 13 | * (easy to change) |
| 14 | */ |
Wolfgang Denk | d24f2d3 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 15 | #if defined(CONFIG_spear300) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 16 | #define CONFIG_SPEAR3XX |
| 17 | #define CONFIG_SPEAR300 |
Wolfgang Denk | d24f2d3 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 18 | #elif defined(CONFIG_spear310) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 19 | #define CONFIG_SPEAR3XX |
| 20 | #define CONFIG_SPEAR310 |
Wolfgang Denk | d24f2d3 | 2010-10-04 19:58:00 +0200 | [diff] [blame] | 21 | #elif defined(CONFIG_spear320) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 22 | #define CONFIG_SPEAR3XX |
| 23 | #define CONFIG_SPEAR320 |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 24 | #endif |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 25 | |
Vipin KUMAR | f273e5b | 2012-05-07 13:06:46 +0530 | [diff] [blame] | 26 | #if defined(CONFIG_usbtty) |
| 27 | #define CONFIG_SPEAR_USBTTY |
| 28 | #endif |
| 29 | |
| 30 | #if defined(CONFIG_nand) |
| 31 | #define CONFIG_ENV_IS_IN_NAND |
| 32 | #else |
| 33 | #define CONFIG_ENV_IS_IN_FLASH |
| 34 | #endif |
| 35 | |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 36 | #include <configs/spear-common.h> |
| 37 | |
Vipin KUMAR | deb0056 | 2012-05-07 13:06:42 +0530 | [diff] [blame] | 38 | /* Ethernet driver configuration */ |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 39 | #define CONFIG_DW_ALTDESCRIPTOR |
Vipin KUMAR | deb0056 | 2012-05-07 13:06:42 +0530 | [diff] [blame] | 40 | |
Vipin KUMAR | 8eb0ee6 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 41 | #if defined(CONFIG_SPEAR310) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 42 | #define CONFIG_MACB |
Vipin KUMAR | 8eb0ee6 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 43 | #define CONFIG_MACB0_PHY 0x01 |
| 44 | #define CONFIG_MACB1_PHY 0x03 |
| 45 | #define CONFIG_MACB2_PHY 0x05 |
| 46 | #define CONFIG_MACB3_PHY 0x07 |
| 47 | |
| 48 | #elif defined(CONFIG_SPEAR320) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 49 | #define CONFIG_MACB |
Vipin KUMAR | 8eb0ee6 | 2012-05-07 13:06:43 +0530 | [diff] [blame] | 50 | #define CONFIG_MACB0_PHY 0x01 |
| 51 | |
| 52 | #endif |
| 53 | |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 54 | /* Serial Configuration (PL011) */ |
| 55 | #define CONFIG_SYS_SERIAL0 0xD0000000 |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 56 | |
| 57 | #if defined(CONFIG_SPEAR300) |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 58 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0} |
| 59 | |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 60 | #elif defined(CONFIG_SPEAR310) |
| 61 | |
| 62 | #if (CONFIG_CONS_INDEX) |
| 63 | #undef CONFIG_PL011_CLOCK |
| 64 | #define CONFIG_PL011_CLOCK (83 * 1000 * 1000) |
| 65 | #endif |
| 66 | |
| 67 | #define CONFIG_SYS_SERIAL1 0xB2000000 |
| 68 | #define CONFIG_SYS_SERIAL2 0xB2080000 |
| 69 | #define CONFIG_SYS_SERIAL3 0xB2100000 |
| 70 | #define CONFIG_SYS_SERIAL4 0xB2180000 |
| 71 | #define CONFIG_SYS_SERIAL5 0xB2200000 |
| 72 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ |
| 73 | (void *)CONFIG_SYS_SERIAL1, \ |
| 74 | (void *)CONFIG_SYS_SERIAL2, \ |
| 75 | (void *)CONFIG_SYS_SERIAL3, \ |
| 76 | (void *)CONFIG_SYS_SERIAL4, \ |
| 77 | (void *)CONFIG_SYS_SERIAL5 } |
Vipin KUMAR | 7da6923 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 78 | #elif defined(CONFIG_SPEAR320) |
| 79 | |
| 80 | #if (CONFIG_CONS_INDEX) |
| 81 | #undef CONFIG_PL011_CLOCK |
| 82 | #define CONFIG_PL011_CLOCK (83 * 1000 * 1000) |
| 83 | #endif |
| 84 | |
| 85 | #define CONFIG_SYS_SERIAL1 0xA3000000 |
| 86 | #define CONFIG_SYS_SERIAL2 0xA4000000 |
| 87 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ |
| 88 | (void *)CONFIG_SYS_SERIAL1, \ |
| 89 | (void *)CONFIG_SYS_SERIAL2 } |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 90 | #endif |
| 91 | |
| 92 | #if defined(CONFIG_SPEAR_EMI) |
| 93 | |
| 94 | #define CONFIG_SYS_FLASH_CFI |
| 95 | #define CONFIG_FLASH_CFI_DRIVER |
| 96 | |
| 97 | #if defined(CONFIG_SPEAR310) |
Vipin Kumar | 484e0b0 | 2012-05-07 13:06:54 +0530 | [diff] [blame] | 98 | #define CONFIG_SYS_FLASH_PROTECTION |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 99 | #define CONFIG_SYS_FLASH_BASE 0x50000000 |
| 100 | #define CONFIG_SYS_CS1_FLASH_BASE 0x60000000 |
| 101 | #define CONFIG_SYS_CS2_FLASH_BASE 0x70000000 |
| 102 | #define CONFIG_SYS_CS3_FLASH_BASE 0x80000000 |
| 103 | #define CONFIG_SYS_CS4_FLASH_BASE 0x90000000 |
| 104 | #define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000 |
| 105 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ |
| 106 | CONFIG_SYS_CS1_FLASH_BASE, \ |
| 107 | CONFIG_SYS_CS2_FLASH_BASE, \ |
| 108 | CONFIG_SYS_CS3_FLASH_BASE, \ |
| 109 | CONFIG_SYS_CS4_FLASH_BASE, \ |
| 110 | CONFIG_SYS_CS5_FLASH_BASE } |
| 111 | #define CONFIG_SYS_MAX_FLASH_BANKS 6 |
| 112 | |
Vipin KUMAR | 7da6923 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 113 | #elif defined(CONFIG_SPEAR320) |
Vipin Kumar | 484e0b0 | 2012-05-07 13:06:54 +0530 | [diff] [blame] | 114 | #define CONFIG_SYS_FLASH_PROTECTION |
Vipin KUMAR | 7da6923 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 115 | #define CONFIG_SYS_FLASH_BASE 0x44000000 |
| 116 | #define CONFIG_SYS_CS1_FLASH_BASE 0x45000000 |
| 117 | #define CONFIG_SYS_CS2_FLASH_BASE 0x46000000 |
| 118 | #define CONFIG_SYS_CS3_FLASH_BASE 0x47000000 |
| 119 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ |
| 120 | CONFIG_SYS_CS1_FLASH_BASE, \ |
| 121 | CONFIG_SYS_CS2_FLASH_BASE, \ |
| 122 | CONFIG_SYS_CS3_FLASH_BASE } |
| 123 | #define CONFIG_SYS_MAX_FLASH_BANKS 4 |
| 124 | |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 125 | #endif |
| 126 | |
| 127 | #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8) |
Amit Virdi | 9b382b4 | 2012-05-07 13:07:02 +0530 | [diff] [blame] | 128 | #define CONFIG_SYS_FLASH_QUIET_TEST |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 129 | |
| 130 | #endif |
| 131 | |
Vipin KUMAR | 1fa943b | 2012-05-22 00:15:55 +0000 | [diff] [blame] | 132 | /* NAND flash configuration */ |
| 133 | #define CONFIG_SYS_FSMC_NAND_SP |
| 134 | #define CONFIG_SYS_FSMC_NAND_8BIT |
| 135 | |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 136 | #if defined(CONFIG_SPEAR300) |
Amit Virdi | bc0bdf4 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 137 | #define CONFIG_SYS_NAND_BASE 0x80000000 |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 138 | |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 139 | #elif defined(CONFIG_SPEAR310) |
Amit Virdi | bc0bdf4 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 140 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 141 | |
Vipin KUMAR | 7da6923 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 142 | #elif defined(CONFIG_SPEAR320) |
Amit Virdi | bc0bdf4 | 2012-05-07 13:07:01 +0530 | [diff] [blame] | 143 | #define CONFIG_SYS_NAND_BASE 0x50000000 |
Vipin KUMAR | 7da6923 | 2010-01-15 19:15:53 +0530 | [diff] [blame] | 144 | |
Vipin KUMAR | 080cfee | 2010-01-15 19:15:52 +0530 | [diff] [blame] | 145 | #endif |
| 146 | |
Vipin KUMAR | 1b7935c | 2012-05-07 13:06:48 +0530 | [diff] [blame] | 147 | /* Environment Settings */ |
| 148 | #if defined(CONFIG_SPEAR300) |
| 149 | #define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY |
| 150 | |
| 151 | #elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320) |
| 152 | #define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0" |
| 153 | #define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ |
| 154 | CONFIG_EXTRA_ENV_UNLOCK |
| 155 | #endif |
| 156 | |
Vipin KUMAR | 7e07415 | 2010-01-15 19:15:50 +0530 | [diff] [blame] | 157 | #endif /* __CONFIG_H */ |