xref: /rk3399_rockchip-uboot/include/configs/at91sam9m10g45ek.h (revision dc3e30bab7c5ef87bd24ebcbb7cdfc3fb2b44555)
122ee6473SSedji Gaouaou /*
222ee6473SSedji Gaouaou  * (C) Copyright 2007-2008
3c9e798d3SStelian Pop  * Stelian Pop <stelian@popies.net>
422ee6473SSedji Gaouaou  * Lead Tech Design <www.leadtechdesign.com>
522ee6473SSedji Gaouaou  *
622ee6473SSedji Gaouaou  * Configuation settings for the AT91SAM9M10G45EK board(and AT91SAM9G45EKES).
722ee6473SSedji Gaouaou  *
822ee6473SSedji Gaouaou  * See file CREDITS for list of people who contributed to this
922ee6473SSedji Gaouaou  * project.
1022ee6473SSedji Gaouaou  *
1122ee6473SSedji Gaouaou  * This program is free software; you can redistribute it and/or
1222ee6473SSedji Gaouaou  * modify it under the terms of the GNU General Public License as
1322ee6473SSedji Gaouaou  * published by the Free Software Foundation; either version 2 of
1422ee6473SSedji Gaouaou  * the License, or (at your option) any later version.
1522ee6473SSedji Gaouaou  *
1622ee6473SSedji Gaouaou  * This program is distributed in the hope that it will be useful,
1722ee6473SSedji Gaouaou  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1822ee6473SSedji Gaouaou  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1922ee6473SSedji Gaouaou  * GNU General Public License for more details.
2022ee6473SSedji Gaouaou  *
2122ee6473SSedji Gaouaou  * You should have received a copy of the GNU General Public License
2222ee6473SSedji Gaouaou  * along with this program; if not, write to the Free Software
2322ee6473SSedji Gaouaou  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2422ee6473SSedji Gaouaou  * MA 02111-1307 USA
2522ee6473SSedji Gaouaou  */
2622ee6473SSedji Gaouaou 
2722ee6473SSedji Gaouaou #ifndef __CONFIG_H
2822ee6473SSedji Gaouaou #define __CONFIG_H
2922ee6473SSedji Gaouaou 
305cfeec51SThomas Petazzoni #include <asm/hardware.h>
315cfeec51SThomas Petazzoni 
32425de62dSJens Scharsig #define CONFIG_AT91_LEGACY
335cfeec51SThomas Petazzoni #define CONFIG_ATMEL_LEGACY		/* required until (g)pio is fixed */
34425de62dSJens Scharsig 
3522ee6473SSedji Gaouaou /* ARM asynchronous clock */
365cfeec51SThomas Petazzoni #define CONFIG_SYS_AT91_SLOW_CLOCK      32768
377c966a8bSAchim Ehrlich #define CONFIG_SYS_AT91_MAIN_CLOCK      12000000 /* from 12 MHz crystal */
3822ee6473SSedji Gaouaou #define CONFIG_SYS_HZ		        1000
3922ee6473SSedji Gaouaou 
405cfeec51SThomas Petazzoni #define CONFIG_AT91SAM9M10G45EK
415cfeec51SThomas Petazzoni #define CONFIG_AT91FAMILY
4222ee6473SSedji Gaouaou 
435cfeec51SThomas Petazzoni #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs	*/
445cfeec51SThomas Petazzoni #define CONFIG_SETUP_MEMORY_TAGS
455cfeec51SThomas Petazzoni #define CONFIG_INITRD_TAG
4622ee6473SSedji Gaouaou #define CONFIG_SKIP_LOWLEVEL_INIT
475cfeec51SThomas Petazzoni #define CONFIG_BOARD_EARLY_INIT_F
485cfeec51SThomas Petazzoni #define CONFIG_DISPLAY_CPUINFO
495cfeec51SThomas Petazzoni 
50*dc3e30baSBo Shen #define CONFIG_OF_LIBFDT
51*dc3e30baSBo Shen 
525cfeec51SThomas Petazzoni /* general purpose I/O */
535cfeec51SThomas Petazzoni #define CONFIG_ATMEL_LEGACY		/* required until (g)pio is fixed */
545cfeec51SThomas Petazzoni #define CONFIG_AT91_GPIO
555cfeec51SThomas Petazzoni #define CONFIG_AT91_GPIO_PULLUP	1	/* keep pullups on peripheral pins */
565cfeec51SThomas Petazzoni 
575cfeec51SThomas Petazzoni /* serial console */
585cfeec51SThomas Petazzoni #define CONFIG_ATMEL_USART
595cfeec51SThomas Petazzoni #define CONFIG_USART_BASE		ATMEL_BASE_DBGU
605cfeec51SThomas Petazzoni #define	CONFIG_USART_ID			ATMEL_ID_SYS
6122ee6473SSedji Gaouaou 
6222ee6473SSedji Gaouaou /* LCD */
635cfeec51SThomas Petazzoni #define CONFIG_LCD
6422ee6473SSedji Gaouaou #define LCD_BPP				LCD_COLOR8
655cfeec51SThomas Petazzoni #define CONFIG_LCD_LOGO
6622ee6473SSedji Gaouaou #undef LCD_TEST_PATTERN
675cfeec51SThomas Petazzoni #define CONFIG_LCD_INFO
685cfeec51SThomas Petazzoni #define CONFIG_LCD_INFO_BELOW_LOGO
695cfeec51SThomas Petazzoni #define CONFIG_SYS_WHITE_ON_BLACK
705cfeec51SThomas Petazzoni #define CONFIG_ATMEL_LCD
715cfeec51SThomas Petazzoni #define CONFIG_ATMEL_LCD_RGB565
725cfeec51SThomas Petazzoni #define CONFIG_SYS_CONSOLE_IS_IN_ENV
7322ee6473SSedji Gaouaou /* board specific(not enough SRAM) */
7422ee6473SSedji Gaouaou #define CONFIG_AT91SAM9G45_LCD_BASE		0x73E00000
7522ee6473SSedji Gaouaou 
7622ee6473SSedji Gaouaou /* LED */
7722ee6473SSedji Gaouaou #define CONFIG_AT91_LED
7822ee6473SSedji Gaouaou #define	CONFIG_RED_LED		AT91_PIN_PD31	/* this is the user1 led */
7922ee6473SSedji Gaouaou #define	CONFIG_GREEN_LED	AT91_PIN_PD0	/* this is the user2 led */
8022ee6473SSedji Gaouaou 
8122ee6473SSedji Gaouaou #define CONFIG_BOOTDELAY	3
8222ee6473SSedji Gaouaou 
8322ee6473SSedji Gaouaou /*
8422ee6473SSedji Gaouaou  * BOOTP options
8522ee6473SSedji Gaouaou  */
865cfeec51SThomas Petazzoni #define CONFIG_BOOTP_BOOTFILESIZE
875cfeec51SThomas Petazzoni #define CONFIG_BOOTP_BOOTPATH
885cfeec51SThomas Petazzoni #define CONFIG_BOOTP_GATEWAY
895cfeec51SThomas Petazzoni #define CONFIG_BOOTP_HOSTNAME
9022ee6473SSedji Gaouaou 
9122ee6473SSedji Gaouaou /*
9222ee6473SSedji Gaouaou  * Command line configuration.
9322ee6473SSedji Gaouaou  */
9422ee6473SSedji Gaouaou #include <config_cmd_default.h>
9522ee6473SSedji Gaouaou #undef CONFIG_CMD_BDI
9622ee6473SSedji Gaouaou #undef CONFIG_CMD_FPGA
9722ee6473SSedji Gaouaou #undef CONFIG_CMD_IMI
9822ee6473SSedji Gaouaou #undef CONFIG_CMD_IMLS
9922ee6473SSedji Gaouaou #undef CONFIG_CMD_LOADS
10022ee6473SSedji Gaouaou 
1015cfeec51SThomas Petazzoni #define CONFIG_CMD_PING
1025cfeec51SThomas Petazzoni #define CONFIG_CMD_DHCP
1035cfeec51SThomas Petazzoni #define CONFIG_CMD_NAND
1045cfeec51SThomas Petazzoni #define CONFIG_CMD_USB
10522ee6473SSedji Gaouaou 
10622ee6473SSedji Gaouaou /* SDRAM */
10722ee6473SSedji Gaouaou #define CONFIG_NR_DRAM_BANKS		1
1085cfeec51SThomas Petazzoni #define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_CS6
1095cfeec51SThomas Petazzoni #define CONFIG_SYS_SDRAM_SIZE		0x08000000
11022ee6473SSedji Gaouaou 
1115cfeec51SThomas Petazzoni #define CONFIG_SYS_INIT_SP_ADDR \
1125cfeec51SThomas Petazzoni 	(CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
11322ee6473SSedji Gaouaou 
1145cfeec51SThomas Petazzoni /* No NOR flash */
1155cfeec51SThomas Petazzoni #define CONFIG_SYS_NO_FLASH
11622ee6473SSedji Gaouaou 
11722ee6473SSedji Gaouaou /* NAND flash */
11822ee6473SSedji Gaouaou #ifdef CONFIG_CMD_NAND
11922ee6473SSedji Gaouaou #define CONFIG_NAND_ATMEL
12022ee6473SSedji Gaouaou #define CONFIG_SYS_MAX_NAND_DEVICE		1
1215cfeec51SThomas Petazzoni #define CONFIG_SYS_NAND_BASE			ATMEL_BASE_CS3
1225cfeec51SThomas Petazzoni #define CONFIG_SYS_NAND_DBW_8
12322ee6473SSedji Gaouaou /* our ALE is AD21 */
12422ee6473SSedji Gaouaou #define CONFIG_SYS_NAND_MASK_ALE		(1 << 21)
12522ee6473SSedji Gaouaou /* our CLE is AD22 */
12622ee6473SSedji Gaouaou #define CONFIG_SYS_NAND_MASK_CLE		(1 << 22)
12722ee6473SSedji Gaouaou #define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIN_PC14
12822ee6473SSedji Gaouaou #define CONFIG_SYS_NAND_READY_PIN		AT91_PIN_PC8
1292eb99ca8SWolfgang Denk 
13022ee6473SSedji Gaouaou #endif
13122ee6473SSedji Gaouaou 
13222ee6473SSedji Gaouaou /* Ethernet */
1335cfeec51SThomas Petazzoni #define CONFIG_MACB
1345cfeec51SThomas Petazzoni #define CONFIG_RMII
13522ee6473SSedji Gaouaou #define CONFIG_NET_RETRY_COUNT		20
1365cfeec51SThomas Petazzoni #define CONFIG_RESET_PHY_R
13722ee6473SSedji Gaouaou 
13822ee6473SSedji Gaouaou /* USB */
139e1edd065SBo Shen #define CONFIG_USB_EHCI
140e1edd065SBo Shen #define CONFIG_USB_EHCI_ATMEL
141e1edd065SBo Shen #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	2
1425cfeec51SThomas Petazzoni #define CONFIG_DOS_PARTITION
1435cfeec51SThomas Petazzoni #define CONFIG_USB_STORAGE
14422ee6473SSedji Gaouaou 
14522ee6473SSedji Gaouaou #define CONFIG_SYS_LOAD_ADDR		0x22000000	/* load address */
14622ee6473SSedji Gaouaou 
1475cfeec51SThomas Petazzoni #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
14822ee6473SSedji Gaouaou #define CONFIG_SYS_MEMTEST_END		0x23e00000
14922ee6473SSedji Gaouaou 
1505cfeec51SThomas Petazzoni /* bootstrap + u-boot + env in nandflash */
1515cfeec51SThomas Petazzoni #define CONFIG_ENV_IS_IN_NAND
15222ee6473SSedji Gaouaou #define CONFIG_ENV_OFFSET		0x60000
15322ee6473SSedji Gaouaou #define CONFIG_ENV_OFFSET_REDUND	0x80000
1545cfeec51SThomas Petazzoni #define CONFIG_ENV_SIZE			0x20000
15522ee6473SSedji Gaouaou 
1565cfeec51SThomas Petazzoni #define CONFIG_BOOTCOMMAND	"nand read 0x70000000 0x100000 0x200000;" \
1575cfeec51SThomas Petazzoni 	"bootm 0x70000000"
1585cfeec51SThomas Petazzoni #define CONFIG_BOOTARGS							\
1595cfeec51SThomas Petazzoni 	"console=ttyS0,115200 earlyprintk "				\
1605cfeec51SThomas Petazzoni 	"root=/dev/mtdblock5 "						\
1615cfeec51SThomas Petazzoni 	"mtdparts=atmel_nand:128k(bootstrap)ro,"			\
1625cfeec51SThomas Petazzoni 	"256k(uboot)ro,128k(env1)ro,128k(env2)ro,"			\
1635cfeec51SThomas Petazzoni 	"2M@1M(linux),-(root) "						\
1645cfeec51SThomas Petazzoni 	"rw rootfstype=jffs2"
16522ee6473SSedji Gaouaou 
16622ee6473SSedji Gaouaou #define CONFIG_BAUDRATE			115200
16722ee6473SSedji Gaouaou 
16822ee6473SSedji Gaouaou #define CONFIG_SYS_PROMPT		"U-Boot> "
16922ee6473SSedji Gaouaou #define CONFIG_SYS_CBSIZE		256
17022ee6473SSedji Gaouaou #define CONFIG_SYS_MAXARGS		16
17122ee6473SSedji Gaouaou #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
1725cfeec51SThomas Petazzoni #define CONFIG_SYS_LONGHELP
1735cfeec51SThomas Petazzoni #define CONFIG_CMDLINE_EDITING
17422ee6473SSedji Gaouaou #define CONFIG_AUTO_COMPLETE
17522ee6473SSedji Gaouaou #define CONFIG_SYS_HUSH_PARSER
17622ee6473SSedji Gaouaou 
17722ee6473SSedji Gaouaou /*
17822ee6473SSedji Gaouaou  * Size of malloc() pool
17922ee6473SSedji Gaouaou  */
18022ee6473SSedji Gaouaou #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
18122ee6473SSedji Gaouaou 
18222ee6473SSedji Gaouaou #endif
183