1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 21dcdd862SMateusz Kulikowski /* 31dcdd862SMateusz Kulikowski * (C) Copyright 2007-2013 41dcdd862SMateusz Kulikowski * Stelian Pop <stelian.pop@leadtechdesign.com> 51dcdd862SMateusz Kulikowski * Lead Tech Design <www.leadtechdesign.com> 61dcdd862SMateusz Kulikowski * Thomas Petazzoni, Free Electrons, <thomas.petazzoni@free-electrons.com> 71dcdd862SMateusz Kulikowski * Mateusz Kulikowski <mateusz.kulikowski@gmail.com> 81dcdd862SMateusz Kulikowski * 91dcdd862SMateusz Kulikowski * Settings for Calao USB-A9263 board 101dcdd862SMateusz Kulikowski * 111dcdd862SMateusz Kulikowski * U-Boot image has to be less than 200704 bytes, otherwise at91bootstrap 121dcdd862SMateusz Kulikowski * installed on board will not be able to load it properly. 131dcdd862SMateusz Kulikowski */ 141dcdd862SMateusz Kulikowski 151dcdd862SMateusz Kulikowski #ifndef __CONFIG_H 161dcdd862SMateusz Kulikowski #define __CONFIG_H 171dcdd862SMateusz Kulikowski #include <asm/hardware.h> 181dcdd862SMateusz Kulikowski 191dcdd862SMateusz Kulikowski /* ARM asynchronous clock */ 201dcdd862SMateusz Kulikowski #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */ 211dcdd862SMateusz Kulikowski #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 221dcdd862SMateusz Kulikowski 231dcdd862SMateusz Kulikowski #define CONFIG_MACH_TYPE MACH_TYPE_USB_A9263 241dcdd862SMateusz Kulikowski 251dcdd862SMateusz Kulikowski #define CONFIG_ARCH_CPU_INIT 261dcdd862SMateusz Kulikowski 271dcdd862SMateusz Kulikowski #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 281dcdd862SMateusz Kulikowski #define CONFIG_SETUP_MEMORY_TAGS 291dcdd862SMateusz Kulikowski #define CONFIG_INITRD_TAG 301dcdd862SMateusz Kulikowski 311dcdd862SMateusz Kulikowski #define CONFIG_SKIP_LOWLEVEL_INIT 321dcdd862SMateusz Kulikowski 331dcdd862SMateusz Kulikowski /* 341dcdd862SMateusz Kulikowski * Hardware drivers 351dcdd862SMateusz Kulikowski */ 361dcdd862SMateusz Kulikowski /* 371dcdd862SMateusz Kulikowski * BOOTP options 381dcdd862SMateusz Kulikowski */ 391dcdd862SMateusz Kulikowski #define CONFIG_BOOTP_BOOTFILESIZE 401dcdd862SMateusz Kulikowski 411dcdd862SMateusz Kulikowski /* SDRAM */ 421dcdd862SMateusz Kulikowski #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1 431dcdd862SMateusz Kulikowski #define CONFIG_SYS_SDRAM_SIZE 0x04000000 441dcdd862SMateusz Kulikowski 451dcdd862SMateusz Kulikowski #define CONFIG_SYS_INIT_SP_ADDR \ 46fdc77189SWenyou.Yang@microchip.com (ATMEL_BASE_SRAM1 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) 471dcdd862SMateusz Kulikowski 481dcdd862SMateusz Kulikowski /* NAND flash */ 491dcdd862SMateusz Kulikowski #ifdef CONFIG_CMD_NAND 501dcdd862SMateusz Kulikowski #define CONFIG_SYS_MAX_NAND_DEVICE 1 511dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 521dcdd862SMateusz Kulikowski /* our ALE is AD21 */ 531dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_MASK_ALE (1 << 21) 541dcdd862SMateusz Kulikowski /* our CLE is AD22 */ 551dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) 561dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) 571dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22) 581dcdd862SMateusz Kulikowski #endif 591dcdd862SMateusz Kulikowski 601dcdd862SMateusz Kulikowski /* Ethernet */ 611dcdd862SMateusz Kulikowski #define CONFIG_MACB 621dcdd862SMateusz Kulikowski #define CONFIG_RMII 631dcdd862SMateusz Kulikowski #define CONFIG_NET_RETRY_COUNT 20 641dcdd862SMateusz Kulikowski #define CONFIG_AT91_WANTS_COMMON_PHY 651dcdd862SMateusz Kulikowski 661dcdd862SMateusz Kulikowski /* USB */ 671dcdd862SMateusz Kulikowski #ifdef CONFIG_CMD_USB 681dcdd862SMateusz Kulikowski #define CONFIG_USB_ATMEL 691dcdd862SMateusz Kulikowski #define CONFIG_USB_OHCI_NEW 701dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_CPU_INIT 711dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 721dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" 731dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 741dcdd862SMateusz Kulikowski #endif 751dcdd862SMateusz Kulikowski 761dcdd862SMateusz Kulikowski #define CONFIG_SYS_LOAD_ADDR 0x22000000 771dcdd862SMateusz Kulikowski 781dcdd862SMateusz Kulikowski #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 791dcdd862SMateusz Kulikowski #define CONFIG_SYS_MEMTEST_END 0x23e00000 801dcdd862SMateusz Kulikowski 81fdc77189SWenyou.Yang@microchip.com /* bootstrap + u-boot + env + linux in dataflash on CS0 */ 821dcdd862SMateusz Kulikowski #define CONFIG_ENV_OFFSET 0x2000 831dcdd862SMateusz Kulikowski #define CONFIG_ENV_SIZE 0x2000 84fdc77189SWenyou.Yang@microchip.com #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE 851dcdd862SMateusz Kulikowski #define CONFIG_BOOTCOMMAND "nboot 21000000 0" 861dcdd862SMateusz Kulikowski #define CONFIG_EXTRA_ENV_SETTINGS \ 8743ede0bcSTom Rini "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ 881dcdd862SMateusz Kulikowski 891dcdd862SMateusz Kulikowski /* 901dcdd862SMateusz Kulikowski * Size of malloc() pool 911dcdd862SMateusz Kulikowski */ 921dcdd862SMateusz Kulikowski #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) 931dcdd862SMateusz Kulikowski 941dcdd862SMateusz Kulikowski #endif 95