]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/configs/nios2-generic.h
Move defaults from config_cmd_default.h to Kconfig
[people/ms/u-boot.git] / include / configs / nios2-generic.h
CommitLineData
8cbb0ddd
TC
1/*
2 * (C) Copyright 2005, Psyent Corporation <www.psyent.com>
3 * Scott McNutt <smcnutt@psyent.com>
4 * (C) Copyright 2010, Thomas Chou <thomas@wytron.com.tw>
5 *
3765b3e7 6 * SPDX-License-Identifier: GPL-2.0+
8cbb0ddd
TC
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12/*
13 * BOARD/CPU
14 */
15#include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
16#define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
17#define CONFIG_BOARD_EARLY_INIT_F /* enable early board-spec. init */
5ff10aa7
TC
18#define CONFIG_DISPLAY_CPUINFO
19#define CONFIG_DISPLAY_BOARDINFO
8cbb0ddd
TC
20#define CONFIG_SYS_NIOS_SYSID_BASE CONFIG_SYS_SYSID_BASE
21
22/*
23 * SERIAL
24 */
857b9cb6 25#define CONFIG_ALTERA_JTAG_UART
8cbb0ddd
TC
26#if defined(CONFIG_ALTERA_JTAG_UART)
27# define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_JTAG_UART_BASE
28#else
29# define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_UART_BASE
30#endif
31
32#define CONFIG_ALTERA_JTAG_UART_BYPASS
33#define CONFIG_SYS_NIOS_FIXEDBAUD
34#define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
35#define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
36#define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
37
38/*
39 * TIMER
40 */
e110c4fe 41#define CONFIG_SYS_LOW_RES_TIMER
8cbb0ddd
TC
42#define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_TIMER_BASE
43#define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_TIMER_IRQ
8cbb0ddd
TC
44#define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period (msec)*/
45#define CONFIG_SYS_NIOS_TMRCNT \
46 (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_TIMER_FREQ / 1000) - 1)
47
48/*
49 * STATUS LED
50 */
df969b5f
JF
51#define CONFIG_ALTERA_PIO
52#define CONFIG_SYS_ALTERA_PIO_NUM 1
53#define CONFIG_SYS_ALTERA_PIO_GPIO_NUM LED_PIO_WIDTH
54
8cbb0ddd 55#define CONFIG_STATUS_LED /* Enable status driver */
db719642 56#define CONFIG_BOARD_SPECIFIC_LED
1e8e9bad
TC
57#define CONFIG_GPIO_LED /* Enable GPIO LED driver */
58#define CONFIG_GPIO /* Enable GPIO driver */
857b9cb6
TC
59#define LED_PIO_BASE USER_LED_PIO_8OUT_BASE
60#define LED_PIO_WIDTH 8
61#define LED_PIO_RSTVAL 0xff
8cbb0ddd 62
1e8e9bad 63#define STATUS_LED_BIT 0 /* Bit-0 on GPIO */
8cbb0ddd
TC
64#define STATUS_LED_STATE 1 /* Blinking */
65#define STATUS_LED_PERIOD (500 / CONFIG_SYS_NIOS_TMRMS) /* 500 msec */
66
67/*
68 * BOOTP options
69 */
70#define CONFIG_BOOTP_BOOTFILESIZE
71#define CONFIG_BOOTP_BOOTPATH
72#define CONFIG_BOOTP_GATEWAY
73#define CONFIG_BOOTP_HOSTNAME
74
75/*
76 * Command line configuration.
77 */
8cbb0ddd 78#ifdef CONFIG_CMD_NET
8cbb0ddd
TC
79# define CONFIG_CMD_DHCP
80# define CONFIG_CMD_PING
81#endif
82
857b9cb6
TC
83#define CONFIG_OF_LIBFDT
84#define CONFIG_OF_BOARD_SETUP
85#define CONFIG_LMB
86
8cbb0ddd
TC
87/*
88 * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
89 * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
90 * reset address, no? This will keep the environment in user region
91 * of flash. NOTE: the monitor length must be multiple of sector size
92 * (which is common practice).
93 */
94#define CONFIG_ENV_IS_IN_FLASH
95
857b9cb6 96#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */
8cbb0ddd
TC
97#define CONFIG_ENV_OVERWRITE /* Serial change Ok */
98#define CONFIG_ENV_ADDR ((CONFIG_SYS_RESET_ADDR + \
99 CONFIG_SYS_MONITOR_LEN) | \
100 CONFIG_SYS_FLASH_BASE)
101
102/*
103 * MEMORY ORGANIZATION
7dfb0602
TC
104 * -Monitor at top of sdram.
105 * -The heap is placed below the monitor
106 * -The stack is placed below the heap (&grows down).
8cbb0ddd
TC
107 */
108#define CONFIG_MONITOR_IS_IN_RAM
109#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
110#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
111 CONFIG_SYS_SDRAM_SIZE - \
112 CONFIG_SYS_MONITOR_LEN)
8cbb0ddd
TC
113#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000)
114#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \
115 CONFIG_SYS_MALLOC_LEN)
7dfb0602 116#define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE
8cbb0ddd
TC
117
118/*
119 * MISC
120 */
121#define CONFIG_SYS_LONGHELP /* Provide extended help */
8cbb0ddd
TC
122#define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
123#define CONFIG_SYS_MAXARGS 16 /* Max command args */
124#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
125#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
126 sizeof(CONFIG_SYS_PROMPT) + \
127 16) /* Print buf size */
128#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
129#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
130#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - 0x20000)
131#define CONFIG_CMDLINE_EDITING
132
133#define CONFIG_SYS_HUSH_PARSER
8cbb0ddd
TC
134
135#endif /* __CONFIG_H */