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