Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Configuation settings for the WB50N CPU Module. |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __CONFIG_H |
| 7 | #define __CONFIG_H |
| 8 | |
| 9 | #include <asm/hardware.h> |
| 10 | |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 11 | /* ARM asynchronous clock */ |
| 12 | #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 |
| 13 | #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */ |
| 14 | |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 15 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
| 16 | #define CONFIG_SETUP_MEMORY_TAGS |
| 17 | #define CONFIG_INITRD_TAG |
| 18 | |
| 19 | #ifndef CONFIG_SPL_BUILD |
| 20 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 21 | #endif |
| 22 | |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 23 | /* serial console */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 24 | #define CONFIG_USART_BASE ATMEL_BASE_DBGU |
| 25 | #define CONFIG_USART_ID ATMEL_ID_DBGU |
| 26 | |
| 27 | /* |
| 28 | * BOOTP options |
| 29 | */ |
| 30 | #define CONFIG_BOOTP_BOOTFILESIZE |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 31 | |
| 32 | /* SDRAM */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 33 | #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS |
| 34 | #define CONFIG_SYS_SDRAM_SIZE 0x04000000 |
| 35 | |
| 36 | #ifdef CONFIG_SPL_BUILD |
| 37 | #define CONFIG_SYS_INIT_SP_ADDR 0x310000 |
| 38 | #else |
| 39 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 40 | (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) |
| 41 | #endif |
| 42 | |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 43 | /* NAND flash */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 44 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 45 | #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 |
| 46 | /* our ALE is AD21 */ |
| 47 | #define CONFIG_SYS_NAND_MASK_ALE (1 << 21) |
| 48 | /* our CLE is AD22 */ |
| 49 | #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) |
| 50 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 51 | |
| 52 | /* Ethernet Hardware */ |
| 53 | #define CONFIG_MACB |
| 54 | #define CONFIG_RMII |
| 55 | #define CONFIG_NET_RETRY_COUNT 20 |
| 56 | #define CONFIG_MACB_SEARCH_PHY |
| 57 | #define CONFIG_RGMII |
| 58 | #define CONFIG_ETHADDR C0:EE:40:00:00:00 |
| 59 | #define CONFIG_ENV_OVERWRITE 1 |
| 60 | |
| 61 | #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ |
| 62 | |
| 63 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 64 | "autoload=no\0" \ |
| 65 | "autostart=no\0" |
| 66 | |
| 67 | /* bootstrap + u-boot + env in nandflash */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 68 | #define CONFIG_BOOTCOMMAND \ |
| 69 | "nand read 0x22000000 0x000e0000 0x500000; " \ |
| 70 | "bootm" |
| 71 | |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 72 | #define CONFIG_SYS_CBSIZE 1024 |
| 73 | #define CONFIG_SYS_MAXARGS 16 |
| 74 | #define CONFIG_SYS_PBSIZE \ |
| 75 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 76 | |
| 77 | /* Size of malloc() pool */ |
| 78 | #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024) |
| 79 | |
| 80 | /* SPL */ |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 81 | #define CONFIG_SPL_MAX_SIZE 0x10000 |
| 82 | #define CONFIG_SPL_BSS_START_ADDR 0x20000000 |
| 83 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 |
| 84 | #define CONFIG_SYS_SPL_MALLOC_START 0x20080000 |
| 85 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 |
| 86 | |
| 87 | #define CONFIG_SYS_MONITOR_LEN (512 << 10) |
| 88 | |
| 89 | #define CONFIG_SPL_NAND_DRIVERS |
| 90 | #define CONFIG_SPL_NAND_BASE |
| 91 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000 |
| 92 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 93 | #define CONFIG_SYS_NAND_PAGE_SIZE 0x800 |
| 94 | #define CONFIG_SYS_NAND_PAGE_COUNT 64 |
| 95 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
| 96 | #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 |
| 97 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 |
Ben Whitten | b2e01ff | 2017-11-23 13:47:48 +0000 | [diff] [blame] | 98 | |
| 99 | #endif |