1 /* 2 * (C) Copyright 2007-2008 3 * Stelian Pop <stelian@popies.net> 4 * Lead Tech Design <www.leadtechdesign.com> 5 * 6 * Configuation settings for the AT91SAM9261EK board. 7 * 8 * SPDX-License-Identifier: GPL-2.0+ 9 */ 10 11 #ifndef __CONFIG_H 12 #define __CONFIG_H 13 14 /* ARM asynchronous clock */ 15 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */ 16 #define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */ 17 18 #ifdef CONFIG_AT91SAM9G10 19 #define CONFIG_AT91SAM9G10EK /* It's an Atmel AT91SAM9G10 EK*/ 20 #else 21 #define CONFIG_AT91SAM9261EK /* It's an Atmel AT91SAM9261 EK*/ 22 #endif 23 24 #include <asm/hardware.h> 25 26 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 27 #define CONFIG_SETUP_MEMORY_TAGS 28 #define CONFIG_INITRD_TAG 29 30 #define CONFIG_SKIP_LOWLEVEL_INIT 31 32 #define CONFIG_ATMEL_LEGACY 33 34 /* 35 * Hardware drivers 36 */ 37 38 /* LCD */ 39 #define LCD_BPP LCD_COLOR8 40 #define CONFIG_LCD_LOGO 41 #undef LCD_TEST_PATTERN 42 #define CONFIG_LCD_INFO 43 #define CONFIG_LCD_INFO_BELOW_LOGO 44 #define CONFIG_ATMEL_LCD 45 #ifdef CONFIG_AT91SAM9261EK 46 #define CONFIG_ATMEL_LCD_BGR555 47 #endif 48 49 /* 50 * BOOTP options 51 */ 52 #define CONFIG_BOOTP_BOOTFILESIZE 53 #define CONFIG_BOOTP_BOOTPATH 54 #define CONFIG_BOOTP_GATEWAY 55 #define CONFIG_BOOTP_HOSTNAME 56 57 /* SDRAM */ 58 #define CONFIG_NR_DRAM_BANKS 1 59 #define CONFIG_SYS_SDRAM_BASE 0x20000000 60 #define CONFIG_SYS_SDRAM_SIZE 0x04000000 61 #define CONFIG_SYS_INIT_SP_ADDR \ 62 (ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE) 63 64 /* NAND flash */ 65 #ifdef CONFIG_CMD_NAND 66 #define CONFIG_NAND_ATMEL 67 #define CONFIG_SYS_MAX_NAND_DEVICE 1 68 #define CONFIG_SYS_NAND_BASE 0x40000000 69 #define CONFIG_SYS_NAND_DBW_8 70 /* our ALE is AD22 */ 71 #define CONFIG_SYS_NAND_MASK_ALE (1 << 22) 72 /* our CLE is AD21 */ 73 #define CONFIG_SYS_NAND_MASK_CLE (1 << 21) 74 #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14 75 #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC15 76 77 #endif 78 79 /* Ethernet */ 80 #define CONFIG_DRIVER_DM9000 81 #define CONFIG_DM9000_BASE 0x30000000 82 #define DM9000_IO CONFIG_DM9000_BASE 83 #define DM9000_DATA (CONFIG_DM9000_BASE + 4) 84 #define CONFIG_DM9000_USE_16BIT 85 #define CONFIG_DM9000_NO_SROM 86 #define CONFIG_NET_RETRY_COUNT 20 87 #define CONFIG_RESET_PHY_R 88 89 /* USB */ 90 #define CONFIG_USB_ATMEL 91 #define CONFIG_USB_ATMEL_CLK_SEL_PLLB 92 #define CONFIG_USB_OHCI_NEW 93 #define CONFIG_SYS_USB_OHCI_CPU_INIT 94 #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9261_UHP_BASE */ 95 #ifdef CONFIG_AT91SAM9G10EK 96 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9g10" 97 #else 98 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9261" 99 #endif 100 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 101 102 #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ 103 104 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 105 #define CONFIG_SYS_MEMTEST_END 0x23e00000 106 107 #ifdef CONFIG_SYS_USE_DATAFLASH_CS0 108 109 /* bootstrap + u-boot + env + linux in dataflash on CS0 */ 110 #define CONFIG_ENV_OFFSET 0x4200 111 #define CONFIG_ENV_SIZE 0x4200 112 #define CONFIG_ENV_SECT_SIZE 0x210 113 #define CONFIG_ENV_SPI_MAX_HZ 15000000 114 #define CONFIG_BOOTCOMMAND "sf probe 0; " \ 115 "sf read 0x22000000 0x84000 0x294000; " \ 116 "bootm 0x22000000" 117 118 #elif CONFIG_SYS_USE_DATAFLASH_CS3 119 120 /* bootstrap + u-boot + env + linux in dataflash on CS3 */ 121 #define CONFIG_ENV_OFFSET 0x4200 122 #define CONFIG_ENV_SIZE 0x4200 123 #define CONFIG_ENV_SECT_SIZE 0x210 124 #define CONFIG_ENV_SPI_MAX_HZ 15000000 125 #define CONFIG_BOOTCOMMAND "sf probe 0:3; " \ 126 "sf read 0x22000000 0x84000 0x294000; " \ 127 "bootm 0x22000000" 128 129 #else /* CONFIG_SYS_USE_NANDFLASH */ 130 131 /* bootstrap + u-boot + env + linux in nandflash */ 132 #define CONFIG_ENV_OFFSET 0x120000 133 #define CONFIG_ENV_OFFSET_REDUND 0x100000 134 #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */ 135 #define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm" 136 #endif 137 138 #define CONFIG_SYS_LONGHELP 139 #define CONFIG_CMDLINE_EDITING 140 #define CONFIG_AUTO_COMPLETE 141 142 /* 143 * Size of malloc() pool 144 */ 145 #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) 146 147 #endif 148