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