blob: 14e207e9351227bdfccaa058ae0a18dbd4d69a8a [file] [log] [blame]
Andy Fleming87e29872015-11-04 15:48:32 -06001/*
2 * Based on corenet_ds.h
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
Andy Fleming87e29872015-11-04 15:48:32 -060010#define CONFIG_CYRUS
11
York Sun95390362016-11-18 11:39:36 -080012#if !defined(CONFIG_ARCH_P5020) && !defined(CONFIG_ARCH_P5040)
Andy Fleming87e29872015-11-04 15:48:32 -060013#error Must call Cyrus CONFIG with a specific CPU enabled.
14#endif
15
Andy Fleming87e29872015-11-04 15:48:32 -060016#define CONFIG_SDCARD
17#define CONFIG_FSL_SATA_V2
18#define CONFIG_PCIE3
19#define CONFIG_PCIE4
York Suncefe11c2016-11-18 11:30:56 -080020#ifdef CONFIG_ARCH_P5020
Andy Fleming87e29872015-11-04 15:48:32 -060021#define CONFIG_SYS_FSL_RAID_ENGINE
22#define CONFIG_SYS_DPAA_RMAN
23#endif
24#define CONFIG_SYS_DPAA_PME
25
26/*
27 * Corenet DS style board configuration file
28 */
29#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE
30#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
31#define CONFIG_SYS_FSL_PBL_PBI board/varisys/cyrus/pbi.cfg
York Suncefe11c2016-11-18 11:30:56 -080032#if defined(CONFIG_ARCH_P5020)
Andy Fleming87e29872015-11-04 15:48:32 -060033#define CONFIG_SYS_CLK_FREQ 133000000
34#define CONFIG_SYS_FSL_PBL_RCW board/varisys/cyrus/rcw_p5020_v2.cfg
York Sun95390362016-11-18 11:39:36 -080035#elif defined(CONFIG_ARCH_P5040)
Andy Fleming87e29872015-11-04 15:48:32 -060036#define CONFIG_SYS_CLK_FREQ 100000000
37#define CONFIG_SYS_FSL_PBL_RCW board/varisys/cyrus/rcw_p5040.cfg
38#endif
39
Andy Fleming87e29872015-11-04 15:48:32 -060040/* High Level Configuration Options */
Andy Fleming87e29872015-11-04 15:48:32 -060041#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
42#define CONFIG_MP /* support multiple processors */
43
Andy Fleming87e29872015-11-04 15:48:32 -060044#define CONFIG_SYS_MMC_MAX_DEVICE 1
45
46#ifndef CONFIG_SYS_TEXT_BASE
47#define CONFIG_SYS_TEXT_BASE 0xeff40000
48#endif
49
50#define CONFIG_SYS_FSL_CPC /* Corenet Platform Cache */
York Sun51370d52016-12-28 08:43:45 -080051#define CONFIG_SYS_NUM_CPC CONFIG_SYS_NUM_DDR_CTLRS
Andy Fleming87e29872015-11-04 15:48:32 -060052#define CONFIG_FSL_ELBC /* Has Enhanced localbus controller */
Robert P. J. Dayb38eaec2016-05-03 19:52:49 -040053#define CONFIG_PCIE1 /* PCIE controller 1 */
54#define CONFIG_PCIE2 /* PCIE controller 2 */
Andy Fleming87e29872015-11-04 15:48:32 -060055#define CONFIG_FSL_PCI_INIT /* Use common FSL init code */
56#define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */
57
Andy Fleming87e29872015-11-04 15:48:32 -060058#define CONFIG_ENV_OVERWRITE
59
60#define CONFIG_SYS_NO_FLASH
61
62#if defined(CONFIG_SDCARD)
63#define CONFIG_SYS_EXTRA_ENV_RELOC
64#define CONFIG_ENV_IS_IN_MMC
65#define CONFIG_FSL_FIXED_MMC_LOCATION
66#define CONFIG_SYS_MMC_ENV_DEV 0
67#define CONFIG_ENV_SIZE 0x2000
68#define CONFIG_ENV_OFFSET (512 * 1658)
69#endif
70
71/*
72 * These can be toggled for performance analysis, otherwise use default.
73 */
74#define CONFIG_SYS_CACHE_STASHING
75#define CONFIG_BACKSIDE_L2_CACHE
76#define CONFIG_SYS_INIT_L2CSR0 L2CSR0_L2E
77#define CONFIG_BTB /* toggle branch predition */
78#define CONFIG_DDR_ECC
79#ifdef CONFIG_DDR_ECC
80#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
81#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
82#endif
83
84#define CONFIG_ENABLE_36BIT_PHYS
85
86#ifdef CONFIG_PHYS_64BIT
87#define CONFIG_ADDR_MAP
88#define CONFIG_SYS_NUM_ADDR_MAP 64 /* number of TLB1 entries */
89#endif
90
91/* test POST memory test */
92#undef CONFIG_POST
93#define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */
94#define CONFIG_SYS_MEMTEST_END 0x00400000
95#define CONFIG_SYS_ALT_MEMTEST
96#define CONFIG_PANIC_HANG /* do not reset board on panic */
97
98/*
99 * Config the L3 Cache as L3 SRAM
100 */
101#define CONFIG_SYS_INIT_L3_ADDR CONFIG_RAMBOOT_TEXT_BASE
102#ifdef CONFIG_PHYS_64BIT
103#define CONFIG_SYS_INIT_L3_ADDR_PHYS (0xf00000000ull | CONFIG_RAMBOOT_TEXT_BASE)
104#else
105#define CONFIG_SYS_INIT_L3_ADDR_PHYS CONFIG_SYS_INIT_L3_ADDR
106#endif
107#define CONFIG_SYS_L3_SIZE (1024 << 10)
108#define CONFIG_SYS_INIT_L3_END (CONFIG_SYS_INIT_L3_ADDR + CONFIG_SYS_L3_SIZE)
109
110#ifdef CONFIG_PHYS_64BIT
111#define CONFIG_SYS_DCSRBAR 0xf0000000
112#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
113#endif
114
115/*
116 * DDR Setup
117 */
118#define CONFIG_VERY_BIG_RAM
119#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
120#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
121
122#define CONFIG_DIMM_SLOTS_PER_CTLR 1
123#define CONFIG_CHIP_SELECTS_PER_CTRL (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
124
125#define CONFIG_DDR_SPD
Andy Fleming87e29872015-11-04 15:48:32 -0600126
127#define CONFIG_SYS_SPD_BUS_NUM 1
128#define SPD_EEPROM_ADDRESS1 0x51
129#define SPD_EEPROM_ADDRESS2 0x52
130#define CONFIG_SYS_SDRAM_SIZE 4096 /* for fixed parameter use */
131
132/*
133 * Local Bus Definitions
134 */
135
136#define CONFIG_SYS_LBC0_BASE 0xe0000000 /* Start of LBC Registers */
137#ifdef CONFIG_PHYS_64BIT
138#define CONFIG_SYS_LBC0_BASE_PHYS 0xfe0000000ull
139#else
140#define CONFIG_SYS_LBC0_BASE_PHYS CONFIG_SYS_LBC0_BASE
141#endif
142
143#define CONFIG_SYS_LBC1_BASE 0xe1000000 /* Start of LBC Registers */
144#ifdef CONFIG_PHYS_64BIT
145#define CONFIG_SYS_LBC1_BASE_PHYS 0xfe1000000ull
146#else
147#define CONFIG_SYS_LBC1_BASE_PHYS CONFIG_SYS_LBC1_BASE
148#endif
149
150/* Set the local bus clock 1/16 of platform clock */
151#define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_16 | LCRR_EADC_1)
152
153#define CONFIG_SYS_BR0_PRELIM \
154(BR_PHYS_ADDR(CONFIG_SYS_LBC0_BASE_PHYS) | BR_PS_16 | BR_V)
155#define CONFIG_SYS_BR1_PRELIM \
156(BR_PHYS_ADDR(CONFIG_SYS_LBC1_BASE_PHYS) | BR_PS_16 | BR_V)
157
158#define CONFIG_SYS_OR0_PRELIM 0xfff00010
159#define CONFIG_SYS_OR1_PRELIM 0xfff00010
160
Andy Fleming87e29872015-11-04 15:48:32 -0600161#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
162
163#if defined(CONFIG_RAMBOOT_PBL)
164#define CONFIG_SYS_RAMBOOT
165#endif
166
167#define CONFIG_BOARD_EARLY_INIT_F
168#define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
169#define CONFIG_MISC_INIT_R
170
171#define CONFIG_HWCONFIG
172
173/* define to use L1 as initial stack */
174#define CONFIG_L1_INIT_RAM
175#define CONFIG_SYS_INIT_RAM_LOCK
176#define CONFIG_SYS_INIT_RAM_ADDR 0xfdd00000 /* Initial L1 address */
177#ifdef CONFIG_PHYS_64BIT
178#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
179#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR
180/* The assembler doesn't like typecast */
181#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
182 ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
183 CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
184#else
185#define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR /* Initial L1 address */
186#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
187#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
188#endif
189#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000 /* Size of used area in RAM */
190
191#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
192#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
193
194#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
195#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */
196
197/* Serial Port - controlled on board with jumper J8
198 * open - index 2
199 * shorted - index 1
200 */
201#define CONFIG_CONS_INDEX 1
Andy Fleming87e29872015-11-04 15:48:32 -0600202#define CONFIG_SYS_NS16550_SERIAL
203#define CONFIG_SYS_NS16550_REG_SIZE 1
204#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)/2)
205
206#define CONFIG_SYS_BAUDRATE_TABLE \
207{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
208
209#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
210#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
211#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
212#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)
213
Andy Fleming87e29872015-11-04 15:48:32 -0600214/* I2C */
215#define CONFIG_SYS_I2C
216#define CONFIG_SYS_I2C_FSL
217#define CONFIG_I2C_MULTI_BUS
218#define CONFIG_I2C_CMD_TREE
219#define CONFIG_SYS_FSL_I2C_SPEED 400000 /* I2C speed and slave address */
220#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
221#define CONFIG_SYS_FSL_I2C_OFFSET 0x118000
222#define CONFIG_SYS_FSL_I2C2_SPEED 400000 /* I2C speed and slave address */
223#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
224#define CONFIG_SYS_FSL_I2C2_OFFSET 0x118100
225#define CONFIG_SYS_FSL_I2C3_SPEED 400000 /* I2C speed and slave address */
226#define CONFIG_SYS_FSL_I2C3_SLAVE 0x7F
227#define CONFIG_SYS_FSL_I2C3_OFFSET 0x119000
228#define CONFIG_SYS_FSL_I2C4_SPEED 400000 /* I2C speed and slave address */
229#define CONFIG_SYS_FSL_I2C4_SLAVE 0x7F
230#define CONFIG_SYS_FSL_I2C4_OFFSET 0x119100
231
232#define CONFIG_ID_EEPROM
233#define CONFIG_SYS_I2C_EEPROM_NXID
234#define CONFIG_SYS_EEPROM_BUS_NUM 0
235#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
236#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
237
238#define CONFIG_SYS_I2C_GENERIC_MAC
239#define CONFIG_SYS_I2C_MAC1_BUS 3
240#define CONFIG_SYS_I2C_MAC1_CHIP_ADDR 0x57
241#define CONFIG_SYS_I2C_MAC1_DATA_ADDR 0xf2
242#define CONFIG_SYS_I2C_MAC2_BUS 0
243#define CONFIG_SYS_I2C_MAC2_CHIP_ADDR 0x50
244#define CONFIG_SYS_I2C_MAC2_DATA_ADDR 0xfa
245
246#define CONFIG_CMD_DATE 1
247#define CONFIG_RTC_MCP79411 1
248#define CONFIG_SYS_RTC_BUS_NUM 3
249#define CONFIG_SYS_I2C_RTC_ADDR 0x6f
250
251/*
252 * eSPI - Enhanced SPI
253 */
Andy Fleming87e29872015-11-04 15:48:32 -0600254
255/*
256 * General PCI
257 * Memory space is mapped 1-1, but I/O space must start from 0.
258 */
259
260/* controller 1, direct to uli, tgtid 3, Base address 20000 */
261#define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
262#ifdef CONFIG_PHYS_64BIT
263#define CONFIG_SYS_PCIE1_MEM_BUS 0xe0000000
264#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc00000000ull
265#else
266#define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
267#define CONFIG_SYS_PCIE1_MEM_PHYS 0x80000000
268#endif
269#define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
270#define CONFIG_SYS_PCIE1_IO_VIRT 0xf8000000
271#define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
272#ifdef CONFIG_PHYS_64BIT
273#define CONFIG_SYS_PCIE1_IO_PHYS 0xff8000000ull
274#else
275#define CONFIG_SYS_PCIE1_IO_PHYS 0xf8000000
276#endif
277#define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
278
279/* controller 2, Slot 2, tgtid 2, Base address 201000 */
280#define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
281#ifdef CONFIG_PHYS_64BIT
282#define CONFIG_SYS_PCIE2_MEM_BUS 0xe0000000
283#define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull
284#else
285#define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
286#define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
287#endif
288#define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
289#define CONFIG_SYS_PCIE2_IO_VIRT 0xf8010000
290#define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
291#ifdef CONFIG_PHYS_64BIT
292#define CONFIG_SYS_PCIE2_IO_PHYS 0xff8010000ull
293#else
294#define CONFIG_SYS_PCIE2_IO_PHYS 0xf8010000
295#endif
296#define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
297
298/* controller 3, Slot 1, tgtid 1, Base address 202000 */
299#define CONFIG_SYS_PCIE3_MEM_VIRT 0xc0000000
300#ifdef CONFIG_PHYS_64BIT
301#define CONFIG_SYS_PCIE3_MEM_BUS 0xe0000000
302#define CONFIG_SYS_PCIE3_MEM_PHYS 0xc40000000ull
303#else
304#define CONFIG_SYS_PCIE3_MEM_BUS 0xc0000000
305#define CONFIG_SYS_PCIE3_MEM_PHYS 0xc0000000
306#endif
307#define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */
308#define CONFIG_SYS_PCIE3_IO_VIRT 0xf8020000
309#define CONFIG_SYS_PCIE3_IO_BUS 0x00000000
310#ifdef CONFIG_PHYS_64BIT
311#define CONFIG_SYS_PCIE3_IO_PHYS 0xff8020000ull
312#else
313#define CONFIG_SYS_PCIE3_IO_PHYS 0xf8020000
314#endif
315#define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */
316
317/* controller 4, Base address 203000 */
318#define CONFIG_SYS_PCIE4_MEM_BUS 0xe0000000
319#define CONFIG_SYS_PCIE4_MEM_PHYS 0xc60000000ull
320#define CONFIG_SYS_PCIE4_MEM_SIZE 0x20000000 /* 512M */
321#define CONFIG_SYS_PCIE4_IO_BUS 0x00000000
322#define CONFIG_SYS_PCIE4_IO_PHYS 0xff8030000ull
323#define CONFIG_SYS_PCIE4_IO_SIZE 0x00010000 /* 64k */
324
325/* Qman/Bman */
326#define CONFIG_SYS_DPAA_QBMAN /* Support Q/Bman */
327#define CONFIG_SYS_BMAN_NUM_PORTALS 10
328#define CONFIG_SYS_BMAN_MEM_BASE 0xf4000000
329#ifdef CONFIG_PHYS_64BIT
330#define CONFIG_SYS_BMAN_MEM_PHYS 0xff4000000ull
331#else
332#define CONFIG_SYS_BMAN_MEM_PHYS CONFIG_SYS_BMAN_MEM_BASE
333#endif
334#define CONFIG_SYS_BMAN_MEM_SIZE 0x00200000
335#define CONFIG_SYS_BMAN_SP_CENA_SIZE 0x4000
336#define CONFIG_SYS_BMAN_SP_CINH_SIZE 0x1000
337#define CONFIG_SYS_BMAN_CENA_BASE CONFIG_SYS_BMAN_MEM_BASE
338#define CONFIG_SYS_BMAN_CENA_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
339#define CONFIG_SYS_BMAN_CINH_BASE (CONFIG_SYS_BMAN_MEM_BASE + \
340 CONFIG_SYS_BMAN_CENA_SIZE)
341#define CONFIG_SYS_BMAN_CINH_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
342#define CONFIG_SYS_BMAN_SWP_ISDR_REG 0xE08
343#define CONFIG_SYS_QMAN_NUM_PORTALS 10
344#define CONFIG_SYS_QMAN_MEM_BASE 0xf4200000
345#ifdef CONFIG_PHYS_64BIT
346#define CONFIG_SYS_QMAN_MEM_PHYS 0xff4200000ull
347#else
348#define CONFIG_SYS_QMAN_MEM_PHYS CONFIG_SYS_QMAN_MEM_BASE
349#endif
350#define CONFIG_SYS_QMAN_MEM_SIZE 0x00200000
351#define CONFIG_SYS_QMAN_SP_CENA_SIZE 0x4000
352#define CONFIG_SYS_QMAN_SP_CINH_SIZE 0x1000
353#define CONFIG_SYS_QMAN_CENA_BASE CONFIG_SYS_QMAN_MEM_BASE
354#define CONFIG_SYS_QMAN_CENA_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
355#define CONFIG_SYS_QMAN_CINH_BASE (CONFIG_SYS_QMAN_MEM_BASE + \
356 CONFIG_SYS_QMAN_CENA_SIZE)
357#define CONFIG_SYS_QMAN_CINH_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
358#define CONFIG_SYS_QMAN_SWP_ISDR_REG 0xE08
359
360#define CONFIG_SYS_DPAA_FMAN
361/* Default address of microcode for the Linux Fman driver */
362/*
363 * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is
364 * about 825KB (1650 blocks), Env is stored after the image, and the env size is
365 * 0x2000 (16 blocks), 8 + 1650 + 16 = 1674, enlarge it to 1680.
366 */
367#define CONFIG_SYS_QE_FMAN_FW_IN_MMC
368#define CONFIG_SYS_FMAN_FW_ADDR (512 * 1680)
369
370#define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000
371#define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
372
373#ifdef CONFIG_SYS_DPAA_FMAN
374#define CONFIG_FMAN_ENET
375#define CONFIG_PHY_MICREL
376#define CONFIG_PHY_MICREL_KSZ9021
377#endif
378
379#ifdef CONFIG_PCI
380#define CONFIG_PCI_INDIRECT_BRIDGE
Andy Fleming87e29872015-11-04 15:48:32 -0600381#define CONFIG_NET_MULTI
382
383#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
384#define CONFIG_DOS_PARTITION
385#endif /* CONFIG_PCI */
386
387/* SATA */
388#ifdef CONFIG_FSL_SATA_V2
389#define CONFIG_LIBATA
390#define CONFIG_FSL_SATA
391
392#define CONFIG_SYS_SATA_MAX_DEVICE 2
393#define CONFIG_SATA1
394#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
395#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
396#define CONFIG_SATA2
397#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
398#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
399
400#define CONFIG_LBA48
401#define CONFIG_CMD_SATA
402#define CONFIG_DOS_PARTITION
Andy Fleming87e29872015-11-04 15:48:32 -0600403#endif
404
405#ifdef CONFIG_FMAN_ENET
406#define CONFIG_SYS_TBIPA_VALUE 8
407#define CONFIG_MII /* MII PHY management */
408#define CONFIG_ETHPRIME "FM1@DTSEC4"
409#define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */
410#endif
411
412/*
413 * Environment
414 */
415#define CONFIG_LOADS_ECHO /* echo on for serial download */
416#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
417
418/*
419 * Command line configuration.
420 */
Andy Fleming87e29872015-11-04 15:48:32 -0600421#define CONFIG_CMD_ERRATA
Andy Fleming87e29872015-11-04 15:48:32 -0600422#define CONFIG_CMD_IRQ
Andy Fleming87e29872015-11-04 15:48:32 -0600423#define CONFIG_CMD_REGINFO
424
425#ifdef CONFIG_PCI
426#define CONFIG_CMD_PCI
427#endif
428
429/*
430 * USB
431 */
432#define CONFIG_HAS_FSL_DR_USB
433#define CONFIG_HAS_FSL_MPH_USB
434
435#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
Andy Fleming87e29872015-11-04 15:48:32 -0600436#define CONFIG_USB_EHCI
437#define CONFIG_USB_EHCI_FSL
438#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
Andy Fleming87e29872015-11-04 15:48:32 -0600439#define CONFIG_EHCI_IS_TDI
Andy Fleming87e29872015-11-04 15:48:32 -0600440#define CONFIG_SYS_USB_EVENT_POLL
441 /* _VIA_CONTROL_EP */
Andy Fleming87e29872015-11-04 15:48:32 -0600442#endif
443
444#ifdef CONFIG_MMC
445#define CONFIG_FSL_ESDHC
446#define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
447#define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
Andy Fleming87e29872015-11-04 15:48:32 -0600448#define CONFIG_GENERIC_MMC
Andy Fleming87e29872015-11-04 15:48:32 -0600449#define CONFIG_DOS_PARTITION
450#endif
451
452/*
453 * Miscellaneous configurable options
454 */
455#define CONFIG_SYS_LONGHELP /* undef to save memory */
456#define CONFIG_CMDLINE_EDITING /* Command-line editing */
457#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
458#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
Andy Fleming87e29872015-11-04 15:48:32 -0600459#ifdef CONFIG_CMD_KGDB
460#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
461#else
462#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
463#endif
464#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
465#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
466#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
467
468/*
469 * For booting Linux, the board info and command line data
470 * have to be in the first 64 MB of memory, since this is
471 * the maximum mapped by the Linux kernel during initialization.
472 */
473#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory map for Linux*/
474#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
475
476#ifdef CONFIG_CMD_KGDB
477#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
478#endif
479
480/*
481 * Environment Configuration
482 */
483#define CONFIG_ROOTPATH "/opt/nfsroot"
484#define CONFIG_BOOTFILE "uImage"
485#define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
486
487/* default location for tftp and bootm */
488#define CONFIG_LOADADDR 1000000
489
Andy Fleming87e29872015-11-04 15:48:32 -0600490
491#define CONFIG_BAUDRATE 115200
492
493#define __USB_PHY_TYPE utmi
494
495#define CONFIG_EXTRA_ENV_SETTINGS \
496"hwconfig=fsl_ddr:ctlr_intlv=cacheline," \
497"bank_intlv=cs0_cs1;" \
498"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) ";"\
499"usb2:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
500"netdev=eth0\0" \
501"uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \
502"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \
503"consoledev=ttyS0\0" \
504"ramdiskaddr=2000000\0" \
Scott Woodb24a4f62016-07-19 17:52:06 -0500505"fdtaddr=1e00000\0" \
Andy Fleming87e29872015-11-04 15:48:32 -0600506"bdev=sda3\0"
507
508#define CONFIG_HDBOOT \
509"setenv bootargs root=/dev/$bdev rw " \
510"console=$consoledev,$baudrate $othbootargs;" \
511"tftp $loadaddr $bootfile;" \
512"tftp $fdtaddr $fdtfile;" \
513"bootm $loadaddr - $fdtaddr"
514
515#define CONFIG_NFSBOOTCOMMAND \
516"setenv bootargs root=/dev/nfs rw " \
517"nfsroot=$serverip:$rootpath " \
518"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
519"console=$consoledev,$baudrate $othbootargs;" \
520"tftp $loadaddr $bootfile;" \
521"tftp $fdtaddr $fdtfile;" \
522"bootm $loadaddr - $fdtaddr"
523
524#define CONFIG_RAMBOOTCOMMAND \
525"setenv bootargs root=/dev/ram rw " \
526"console=$consoledev,$baudrate $othbootargs;" \
527"tftp $ramdiskaddr $ramdiskfile;" \
528"tftp $loadaddr $bootfile;" \
529"tftp $fdtaddr $fdtfile;" \
530"bootm $loadaddr $ramdiskaddr $fdtaddr"
531
532#define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
533
534#include <asm/fsl_secure_boot.h>
535
536#ifdef CONFIG_SECURE_BOOT
537#endif
538
539#endif /* __CONFIG_H */