Blame view
include/configs/pm9263.h
9.47 KB
f0a2c7b4b at91: add support... |
1 2 |
/* * (C) Copyright 2007-2008 |
c9e798d35 Fix Stelian's ema... |
3 |
* Stelian Pop <stelian@popies.net> |
f0a2c7b4b at91: add support... |
4 5 6 7 8 |
* Lead Tech Design <www.leadtechdesign.com> * Ilko Iliev <www.ronetix.at> * * Configuation settings for the RONETIX PM9263 board. * |
1a4596601 Add GPL-2.0+ SPDX... |
9 |
* SPDX-License-Identifier: GPL-2.0+ |
f0a2c7b4b at91: add support... |
10 11 12 13 |
*/ #ifndef __CONFIG_H #define __CONFIG_H |
684a567ac make pm9263 build... |
14 15 16 17 18 |
/* * SoC must be defined first, before hardware.h is included. * In this case SoC is defined in boards.cfg. */ #include <asm/hardware.h> |
f0a2c7b4b at91: add support... |
19 |
/* ARM asynchronous clock */ |
f0a2c7b4b at91: add support... |
20 |
|
01550a2b6 pm9263: use macro... |
21 22 |
#define MASTER_PLL_DIV 6 #define MASTER_PLL_MUL 65 |
f0a2c7b4b at91: add support... |
23 |
#define MAIN_PLL_DIV 2 /* 2 or 4 */ |
7c966a8bd ARM change name o... |
24 |
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 |
684a567ac make pm9263 build... |
25 |
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */ |
f0a2c7b4b at91: add support... |
26 |
|
684a567ac make pm9263 build... |
27 |
#define CONFIG_SYS_AT91_CPU_NAME "AT91SAM9263" |
f0a2c7b4b at91: add support... |
28 |
#define CONFIG_ARCH_CPU_INIT |
f0a2c7b4b at91: add support... |
29 |
|
a3e09cc28 ARM: define CONFI... |
30 |
#define CONFIG_MACH_TYPE MACH_TYPE_PM9263 |
f0a2c7b4b at91: add support... |
31 |
/* clocks */ |
01550a2b6 pm9263: use macro... |
32 |
#define CONFIG_SYS_MOR_VAL \ |
20d98c2ce pm9263 converted ... |
33 |
(AT91_PMC_MOR_MOSCEN | \ |
01550a2b6 pm9263: use macro... |
34 35 |
(255 << 8)) /* Main Oscillator Start-up Time */ #define CONFIG_SYS_PLLAR_VAL \ |
20d98c2ce pm9263 converted ... |
36 37 38 |
(AT91_PMC_PLLAR_29 | /* Bit 29 must be 1 when prog */ \ AT91_PMC_PLLXR_OUT(3) | \ AT91_PMC_PLLXR_PLLCOUNT(0x3f) | /* PLL Counter */\ |
01550a2b6 pm9263: use macro... |
39 40 |
(2 << 28) | /* PLL Clock Frequency Range */ \ ((MASTER_PLL_MUL - 1) << 16) | (MASTER_PLL_DIV)) |
f0a2c7b4b at91: add support... |
41 42 43 |
#if (MAIN_PLL_DIV == 2) /* PCK/2 = MCK Master Clock from PLLA */ |
01550a2b6 pm9263: use macro... |
44 |
#define CONFIG_SYS_MCKR1_VAL \ |
20d98c2ce pm9263 converted ... |
45 46 47 |
(AT91_PMC_MCKR_CSS_SLOW | \ AT91_PMC_MCKR_PRES_1 | \ AT91_PMC_MCKR_MDIV_2) |
f0a2c7b4b at91: add support... |
48 |
/* PCK/2 = MCK Master Clock from PLLA */ |
01550a2b6 pm9263: use macro... |
49 |
#define CONFIG_SYS_MCKR2_VAL \ |
20d98c2ce pm9263 converted ... |
50 51 52 |
(AT91_PMC_MCKR_CSS_PLLA | \ AT91_PMC_MCKR_PRES_1 | \ AT91_PMC_MCKR_MDIV_2) |
f0a2c7b4b at91: add support... |
53 54 |
#else /* PCK/4 = MCK Master Clock from PLLA */ |
01550a2b6 pm9263: use macro... |
55 |
#define CONFIG_SYS_MCKR1_VAL \ |
20d98c2ce pm9263 converted ... |
56 57 58 |
(AT91_PMC_MCKR_CSS_SLOW | \ AT91_PMC_MCKR_PRES_1 | \ AT91_PMC_MCKR_MDIV_4) |
f0a2c7b4b at91: add support... |
59 |
/* PCK/4 = MCK Master Clock from PLLA */ |
01550a2b6 pm9263: use macro... |
60 |
#define CONFIG_SYS_MCKR2_VAL \ |
20d98c2ce pm9263 converted ... |
61 62 63 |
(AT91_PMC_MCKR_CSS_PLLA | \ AT91_PMC_MCKR_PRES_1 | \ AT91_PMC_MCKR_MDIV_4) |
f0a2c7b4b at91: add support... |
64 65 66 67 68 69 |
#endif /* define PDC[31:16] as DATA[31:16] */ #define CONFIG_SYS_PIOD_PDR_VAL1 0xFFFF0000 /* no pull-up for D[31:16] */ #define CONFIG_SYS_PIOD_PPUDR_VAL 0xFFFF0000 /* EBI0_CSA, CS1 SDRAM, CS3 NAND Flash, 3.3V memories */ |
01550a2b6 pm9263: use macro... |
70 |
#define CONFIG_SYS_MATRIX_EBI0CSA_VAL \ |
20d98c2ce pm9263 converted ... |
71 72 |
(AT91_MATRIX_CSA_DBPUC | AT91_MATRIX_CSA_VDDIOMSEL_3_3V | \ AT91_MATRIX_CSA_EBI_CS1A) |
f0a2c7b4b at91: add support... |
73 74 75 76 77 |
/* SDRAM */ /* SDRAMC_MR Mode register */ #define CONFIG_SYS_SDRC_MR_VAL1 0 /* SDRAMC_TR - Refresh Timer register */ |
01550a2b6 pm9263: use macro... |
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
#define CONFIG_SYS_SDRC_TR_VAL1 0x3AA /* SDRAMC_CR - Configuration register*/ #define CONFIG_SYS_SDRC_CR_VAL \ (AT91_SDRAMC_NC_9 | \ AT91_SDRAMC_NR_13 | \ AT91_SDRAMC_NB_4 | \ AT91_SDRAMC_CAS_2 | \ AT91_SDRAMC_DBW_32 | \ (2 << 8) | /* tWR - Write Recovery Delay */ \ (7 << 12) | /* tRC - Row Cycle Delay */ \ (2 << 16) | /* tRP - Row Precharge Delay */ \ (2 << 20) | /* tRCD - Row to Column Delay */ \ (5 << 24) | /* tRAS - Active to Precharge Delay */ \ (8 << 28)) /* tXSR - Exit Self Refresh to Active Delay */ |
f0a2c7b4b at91: add support... |
92 |
/* Memory Device Register -> SDRAM */ |
01550a2b6 pm9263: use macro... |
93 94 |
#define CONFIG_SYS_SDRC_MDR_VAL AT91_SDRAMC_MD_SDRAM #define CONFIG_SYS_SDRC_MR_VAL2 AT91_SDRAMC_MODE_PRECHARGE |
f0a2c7b4b at91: add support... |
95 |
#define CONFIG_SYS_SDRAM_VAL1 0 /* SDRAM_BASE */ |
01550a2b6 pm9263: use macro... |
96 |
#define CONFIG_SYS_SDRC_MR_VAL3 AT91_SDRAMC_MODE_REFRESH |
f0a2c7b4b at91: add support... |
97 98 99 100 101 102 103 104 |
#define CONFIG_SYS_SDRAM_VAL2 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL3 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL4 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL5 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL6 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL7 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL8 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRAM_VAL9 0 /* SDRAM_BASE */ |
01550a2b6 pm9263: use macro... |
105 |
#define CONFIG_SYS_SDRC_MR_VAL4 AT91_SDRAMC_MODE_LMR |
f0a2c7b4b at91: add support... |
106 |
#define CONFIG_SYS_SDRAM_VAL10 0 /* SDRAM_BASE */ |
01550a2b6 pm9263: use macro... |
107 |
#define CONFIG_SYS_SDRC_MR_VAL5 AT91_SDRAMC_MODE_NORMAL |
f0a2c7b4b at91: add support... |
108 109 110 111 112 |
#define CONFIG_SYS_SDRAM_VAL11 0 /* SDRAM_BASE */ #define CONFIG_SYS_SDRC_TR_VAL2 1200 /* SDRAM_TR */ #define CONFIG_SYS_SDRAM_VAL12 0 /* SDRAM_BASE */ /* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */ |
01550a2b6 pm9263: use macro... |
113 |
#define CONFIG_SYS_SMC0_SETUP0_VAL \ |
20d98c2ce pm9263 converted ... |
114 115 |
(AT91_SMC_SETUP_NWE(10) | AT91_SMC_SETUP_NCS_WR(10) | \ AT91_SMC_SETUP_NRD(10) | AT91_SMC_SETUP_NCS_RD(10)) |
01550a2b6 pm9263: use macro... |
116 |
#define CONFIG_SYS_SMC0_PULSE0_VAL \ |
20d98c2ce pm9263 converted ... |
117 118 |
(AT91_SMC_PULSE_NWE(11) | AT91_SMC_PULSE_NCS_WR(11) | \ AT91_SMC_PULSE_NRD(11) | AT91_SMC_PULSE_NCS_RD(11)) |
01550a2b6 pm9263: use macro... |
119 |
#define CONFIG_SYS_SMC0_CYCLE0_VAL \ |
20d98c2ce pm9263 converted ... |
120 |
(AT91_SMC_CYCLE_NWE(22) | AT91_SMC_CYCLE_NRD(22)) |
01550a2b6 pm9263: use macro... |
121 |
#define CONFIG_SYS_SMC0_MODE0_VAL \ |
20d98c2ce pm9263 converted ... |
122 123 124 125 |
(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | \ AT91_SMC_MODE_DBW_16 | \ AT91_SMC_MODE_TDF | \ AT91_SMC_MODE_TDF_CYCLE(6)) |
f0a2c7b4b at91: add support... |
126 |
|
01550a2b6 pm9263: use macro... |
127 128 129 |
/* user reset enable */ #define CONFIG_SYS_RSTC_RMR_VAL \ (AT91_RSTC_KEY | \ |
20d98c2ce pm9263 converted ... |
130 131 132 |
AT91_RSTC_CR_PROCRST | \ AT91_RSTC_MR_ERSTL(1) | \ AT91_RSTC_MR_ERSTL(2)) |
f0a2c7b4b at91: add support... |
133 |
|
01550a2b6 pm9263: use macro... |
134 135 |
/* Disable Watchdog */ #define CONFIG_SYS_WDTC_WDMR_VAL \ |
20d98c2ce pm9263 converted ... |
136 137 138 139 |
(AT91_WDT_MR_WDIDLEHLT | AT91_WDT_MR_WDDBGHLT | \ AT91_WDT_MR_WDV(0xfff) | \ AT91_WDT_MR_WDDIS | \ AT91_WDT_MR_WDD(0xfff)) |
f0a2c7b4b at91: add support... |
140 141 142 143 144 145 |
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 #undef CONFIG_SKIP_LOWLEVEL_INIT |
f0a2c7b4b at91: add support... |
146 147 148 149 150 |
#define CONFIG_USER_LOWLEVEL_INIT 1 /* * Hardware drivers */ |
f0a2c7b4b at91: add support... |
151 |
/* LCD */ |
f0a2c7b4b at91: add support... |
152 153 154 155 156 |
#define LCD_BPP LCD_COLOR8 #define CONFIG_LCD_LOGO 1 #undef LCD_TEST_PATTERN #define CONFIG_LCD_INFO 1 #define CONFIG_LCD_INFO_BELOW_LOGO 1 |
f0a2c7b4b at91: add support... |
157 158 |
#define CONFIG_ATMEL_LCD 1 #define CONFIG_ATMEL_LCD_BGR555 1 |
f0a2c7b4b at91: add support... |
159 160 |
#define CONFIG_LCD_IN_PSRAM 1 |
f0a2c7b4b at91: add support... |
161 162 163 164 |
/* * BOOTP options */ #define CONFIG_BOOTP_BOOTFILESIZE 1 |
f0a2c7b4b at91: add support... |
165 |
|
f0a2c7b4b at91: add support... |
166 167 168 169 |
/* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define PHYS_SDRAM 0x20000000 #define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */ |
f0a2c7b4b at91: add support... |
170 171 172 173 174 175 176 177 178 179 180 |
/* NOR flash, if populated */ #define CONFIG_SYS_FLASH_CFI 1 #define CONFIG_FLASH_CFI_DRIVER 1 #define PHYS_FLASH_1 0x10000000 #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 #define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* NAND flash */ #ifdef CONFIG_CMD_NAND #define CONFIG_NAND_ATMEL |
f0a2c7b4b at91: add support... |
181 182 183 184 185 186 187 |
#define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_NAND_BASE 0x40000000 #define CONFIG_SYS_NAND_DBW_8 1 /* our ALE is AD21 */ #define CONFIG_SYS_NAND_MASK_ALE (1 << 21) /* our CLE is AD22 */ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) |
ac45bb164 at91: nand: switc... |
188 189 |
#define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) #define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PB(30) |
2eb99ca80 NAND: Part 2: Fix... |
190 |
|
f0a2c7b4b at91: add support... |
191 |
#endif |
f0a2c7b4b at91: add support... |
192 193 194 195 196 197 198 199 200 |
#define CONFIG_JFFS2_CMDLINE 1 #define CONFIG_JFFS2_NAND 1 #define CONFIG_JFFS2_DEV "nand0" /* NAND device jffs2 lives on */ #define CONFIG_JFFS2_PART_OFFSET 0 /* start of jffs2 partition */ #define CONFIG_JFFS2_PART_SIZE (256 * 1024 * 1024) /* partition size*/ /* PSRAM */ #define PHYS_PSRAM 0x70000000 #define PHYS_PSRAM_SIZE 0x00400000 /* 4MB */ |
20d98c2ce pm9263 converted ... |
201 202 203 204 205 |
/* Slave EBI1, PSRAM connected */ #define CONFIG_PSRAM_SCFG (AT91_MATRIX_SCFG_ARBT_FIXED_PRIORITY | \ AT91_MATRIX_SCFG_FIXED_DEFMSTR(5) | \ AT91_MATRIX_SCFG_DEFMSTR_TYPE_FIXED | \ AT91_MATRIX_SCFG_SLOT_CYCLE(255)) |
f0a2c7b4b at91: add support... |
206 207 208 209 |
/* Ethernet */ #define CONFIG_MACB 1 #define CONFIG_RMII 1 |
f0a2c7b4b at91: add support... |
210 211 212 213 214 |
#define CONFIG_NET_RETRY_COUNT 20 #define CONFIG_RESET_PHY_R 1 /* USB */ #define CONFIG_USB_ATMEL |
dcd2f1a0d arm: atmel: get r... |
215 |
#define CONFIG_USB_ATMEL_CLK_SEL_PLLB |
f0a2c7b4b at91: add support... |
216 |
#define CONFIG_USB_OHCI_NEW 1 |
f0a2c7b4b at91: add support... |
217 218 219 220 |
#define CONFIG_SYS_USB_OHCI_CPU_INIT 1 #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 /* AT91SAM9263_UHP_BASE */ #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 |
f0a2c7b4b at91: add support... |
221 222 223 224 225 226 227 228 229 230 231 232 233 |
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM #define CONFIG_SYS_MEMTEST_END 0x23e00000 #define CONFIG_SYS_USE_FLASH 1 #undef CONFIG_SYS_USE_DATAFLASH #undef CONFIG_SYS_USE_NANDFLASH #ifdef CONFIG_SYS_USE_DATAFLASH /* bootstrap + u-boot + env + linux in dataflash on CS0 */ |
f0a2c7b4b at91: add support... |
234 |
#define CONFIG_ENV_OFFSET 0x4200 |
f0a2c7b4b at91: add support... |
235 |
#define CONFIG_ENV_SIZE 0x4200 |
0dfe3ffe0 board: pm9263: Up... |
236 237 238 239 240 |
#define CONFIG_ENV_SECT_SIZE 0x210 #define CONFIG_ENV_SPI_MAX_HZ 15000000 #define CONFIG_BOOTCOMMAND "sf probe 0; " \ "sf read 0x22000000 0x84000 0x294000; " \ "bootm 0x22000000" |
f0a2c7b4b at91: add support... |
241 242 243 244 |
#elif defined(CONFIG_SYS_USE_NANDFLASH) /* CFG_USE_NANDFLASH */ /* bootstrap + u-boot + env + linux in nandflash */ |
f0a2c7b4b at91: add support... |
245 246 247 248 |
#define CONFIG_ENV_OFFSET 0x60000 #define CONFIG_ENV_OFFSET_REDUND 0x80000 #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */ #define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm" |
f0a2c7b4b at91: add support... |
249 250 |
#elif defined(CONFIG_SYS_USE_FLASH) /* CFG_USE_FLASH */ |
f0a2c7b4b at91: add support... |
251 252 253 254 255 256 257 258 259 260 261 262 263 |
#define CONFIG_ENV_OFFSET 0x40000 #define CONFIG_ENV_SECT_SIZE 0x10000 #define CONFIG_ENV_SIZE 0x10000 #define CONFIG_ENV_OVERWRITE 1 /* JFFS Partition offset set */ #define CONFIG_SYS_JFFS2_FIRST_BANK 0 #define CONFIG_SYS_JFFS2_NUM_BANKS 1 /* 512k reserved for u-boot */ #define CONFIG_SYS_JFFS2_FIRST_SECTOR 11 #define CONFIG_BOOTCOMMAND "run flashboot" |
8b3637c66 common: cosmetic:... |
264 |
#define CONFIG_ROOTPATH "/ronetix/rootfs" |
f0a2c7b4b at91: add support... |
265 266 |
#define CONFIG_CON_ROT "fbcon=rotate:3 " |
f0a2c7b4b at91: add support... |
267 |
|
f0a2c7b4b at91: add support... |
268 |
#define CONFIG_EXTRA_ENV_SETTINGS \ |
43ede0bca Kconfig: Migrate ... |
269 270 |
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
f0a2c7b4b at91: add support... |
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
"partition=nand0,0\0" \ "ramargs=setenv bootargs $(bootargs) $(mtdparts)\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \ CONFIG_CON_ROT \ "nfsroot=$(serverip):$(rootpath) $(mtdparts)\0" \ "addip=setenv bootargs $(bootargs) " \ "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"\ ":$(hostname):eth0:off\0" \ "ramboot=tftpboot 0x22000000 vmImage;" \ "run ramargs;run addip;bootm 22000000\0" \ "nfsboot=tftpboot 0x22000000 vmImage;" \ "run nfsargs;run addip;bootm 22000000\0" \ "flashboot=run ramargs;run addip;bootm 0x10050000\0" \ "" #else #error "Undefined memory device" #endif |
f0a2c7b4b at91: add support... |
289 290 291 292 |
/* * Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000) |
f0a2c7b4b at91: add support... |
293 |
|
9a2a05a4a pm9263: ARM reloc... |
294 |
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
0dfe3ffe0 board: pm9263: Up... |
295 |
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - \ |
9a2a05a4a pm9263: ARM reloc... |
296 |
GENERATED_GBL_DATA_SIZE) |
f0a2c7b4b at91: add support... |
297 |
#endif |