Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2007-2013 |
| 4 | * Stelian Pop <stelian.pop@leadtechdesign.com> |
| 5 | * Lead Tech Design <www.leadtechdesign.com> |
| 6 | * Thomas Petazzoni, Free Electrons, <thomas.petazzoni@free-electrons.com> |
| 7 | * Mateusz Kulikowski <mateusz.kulikowski@gmail.com> |
| 8 | * |
| 9 | * Settings for Calao USB-A9263 board |
| 10 | * |
| 11 | * U-Boot image has to be less than 200704 bytes, otherwise at91bootstrap |
| 12 | * installed on board will not be able to load it properly. |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | #ifndef __CONFIG_H |
| 16 | #define __CONFIG_H |
| 17 | #include <asm/hardware.h> |
| 18 | |
| 19 | /* ARM asynchronous clock */ |
| 20 | #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */ |
| 21 | #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 22 | |
| 23 | #define CONFIG_MACH_TYPE MACH_TYPE_USB_A9263 |
| 24 | |
| 25 | #define CONFIG_ARCH_CPU_INIT |
| 26 | |
| 27 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
| 28 | #define CONFIG_SETUP_MEMORY_TAGS |
| 29 | #define CONFIG_INITRD_TAG |
| 30 | |
| 31 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 32 | |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 33 | /* |
| 34 | * Hardware drivers |
| 35 | */ |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 36 | /* |
| 37 | * BOOTP options |
| 38 | */ |
| 39 | #define CONFIG_BOOTP_BOOTFILESIZE |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 40 | |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 41 | /* SDRAM */ |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 42 | #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1 |
| 43 | #define CONFIG_SYS_SDRAM_SIZE 0x04000000 |
| 44 | |
| 45 | #define CONFIG_SYS_INIT_SP_ADDR \ |
Wenyou.Yang@microchip.com | fdc7718 | 2017-07-21 17:07:46 +0800 | [diff] [blame] | 46 | (ATMEL_BASE_SRAM1 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 47 | |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 48 | /* NAND flash */ |
| 49 | #ifdef CONFIG_CMD_NAND |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 50 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 51 | #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 |
| 52 | /* our ALE is AD21 */ |
| 53 | #define CONFIG_SYS_NAND_MASK_ALE (1 << 21) |
| 54 | /* our CLE is AD22 */ |
| 55 | #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) |
| 56 | #define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) |
| 57 | #define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22) |
| 58 | #endif |
| 59 | |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 60 | /* Ethernet */ |
| 61 | #define CONFIG_MACB |
| 62 | #define CONFIG_RMII |
| 63 | #define CONFIG_NET_RETRY_COUNT 20 |
| 64 | #define CONFIG_AT91_WANTS_COMMON_PHY |
| 65 | |
| 66 | /* USB */ |
| 67 | #ifdef CONFIG_CMD_USB |
| 68 | #define CONFIG_USB_ATMEL |
| 69 | #define CONFIG_USB_OHCI_NEW |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 70 | #define CONFIG_SYS_USB_OHCI_CPU_INIT |
| 71 | #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 |
| 72 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" |
| 73 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 74 | #endif |
| 75 | |
| 76 | #define CONFIG_SYS_LOAD_ADDR 0x22000000 |
| 77 | |
| 78 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE |
| 79 | #define CONFIG_SYS_MEMTEST_END 0x23e00000 |
| 80 | |
Wenyou.Yang@microchip.com | fdc7718 | 2017-07-21 17:07:46 +0800 | [diff] [blame] | 81 | /* bootstrap + u-boot + env + linux in dataflash on CS0 */ |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 82 | #define CONFIG_ENV_OFFSET 0x2000 |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 83 | #define CONFIG_ENV_SIZE 0x2000 |
Wenyou.Yang@microchip.com | fdc7718 | 2017-07-21 17:07:46 +0800 | [diff] [blame] | 84 | #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 85 | #define CONFIG_BOOTCOMMAND "nboot 21000000 0" |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 86 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Rini | 43ede0b | 2017-10-22 17:55:07 -0400 | [diff] [blame] | 87 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 88 | |
Mateusz Kulikowski | 1dcdd86 | 2013-12-02 23:30:58 +0100 | [diff] [blame] | 89 | /* |
| 90 | * Size of malloc() pool |
| 91 | */ |
| 92 | #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) |
| 93 | |
| 94 | #endif |