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