11dcdd862SMateusz Kulikowski /* 21dcdd862SMateusz Kulikowski * (C) Copyright 2007-2013 31dcdd862SMateusz Kulikowski * Stelian Pop <stelian.pop@leadtechdesign.com> 41dcdd862SMateusz Kulikowski * Lead Tech Design <www.leadtechdesign.com> 51dcdd862SMateusz Kulikowski * Thomas Petazzoni, Free Electrons, <thomas.petazzoni@free-electrons.com> 61dcdd862SMateusz Kulikowski * Mateusz Kulikowski <mateusz.kulikowski@gmail.com> 71dcdd862SMateusz Kulikowski * 81dcdd862SMateusz Kulikowski * Settings for Calao USB-A9263 board 91dcdd862SMateusz Kulikowski * 101dcdd862SMateusz Kulikowski * U-Boot image has to be less than 200704 bytes, otherwise at91bootstrap 111dcdd862SMateusz Kulikowski * installed on board will not be able to load it properly. 121dcdd862SMateusz Kulikowski * 131dcdd862SMateusz Kulikowski * SPDX-License-Identifier: GPL-2.0+ 141dcdd862SMateusz Kulikowski */ 151dcdd862SMateusz Kulikowski 161dcdd862SMateusz Kulikowski #ifndef __CONFIG_H 171dcdd862SMateusz Kulikowski #define __CONFIG_H 181dcdd862SMateusz Kulikowski #include <asm/hardware.h> 191dcdd862SMateusz Kulikowski 201dcdd862SMateusz Kulikowski /* ARM asynchronous clock */ 211dcdd862SMateusz Kulikowski #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */ 221dcdd862SMateusz Kulikowski #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 231dcdd862SMateusz Kulikowski 241dcdd862SMateusz Kulikowski #define CONFIG_MACH_TYPE MACH_TYPE_USB_A9263 251dcdd862SMateusz Kulikowski 261dcdd862SMateusz Kulikowski #define CONFIG_ARCH_CPU_INIT 271dcdd862SMateusz Kulikowski 281dcdd862SMateusz Kulikowski #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 291dcdd862SMateusz Kulikowski #define CONFIG_SETUP_MEMORY_TAGS 301dcdd862SMateusz Kulikowski #define CONFIG_INITRD_TAG 311dcdd862SMateusz Kulikowski 321dcdd862SMateusz Kulikowski #define CONFIG_SKIP_LOWLEVEL_INIT 331dcdd862SMateusz Kulikowski 341dcdd862SMateusz Kulikowski #define CONFIG_SYS_TEXT_BASE 0x23f00000 351dcdd862SMateusz Kulikowski 361dcdd862SMateusz Kulikowski /* 371dcdd862SMateusz Kulikowski * Hardware drivers 381dcdd862SMateusz Kulikowski */ 391dcdd862SMateusz Kulikowski /* 401dcdd862SMateusz Kulikowski * BOOTP options 411dcdd862SMateusz Kulikowski */ 421dcdd862SMateusz Kulikowski #define CONFIG_BOOTP_BOOTFILESIZE 431dcdd862SMateusz Kulikowski #define CONFIG_BOOTP_BOOTPATH 441dcdd862SMateusz Kulikowski #define CONFIG_BOOTP_GATEWAY 451dcdd862SMateusz Kulikowski #define CONFIG_BOOTP_HOSTNAME 461dcdd862SMateusz Kulikowski 471dcdd862SMateusz Kulikowski /* SDRAM */ 481dcdd862SMateusz Kulikowski #define CONFIG_NR_DRAM_BANKS 1 491dcdd862SMateusz Kulikowski #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1 501dcdd862SMateusz Kulikowski #define CONFIG_SYS_SDRAM_SIZE 0x04000000 511dcdd862SMateusz Kulikowski 521dcdd862SMateusz Kulikowski #define CONFIG_SYS_INIT_SP_ADDR \ 53*fdc77189SWenyou.Yang@microchip.com (ATMEL_BASE_SRAM1 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) 541dcdd862SMateusz Kulikowski 551dcdd862SMateusz Kulikowski /* NAND flash */ 561dcdd862SMateusz Kulikowski #ifdef CONFIG_CMD_NAND 571dcdd862SMateusz Kulikowski #define CONFIG_NAND_ATMEL 581dcdd862SMateusz Kulikowski #define CONFIG_SYS_MAX_NAND_DEVICE 1 591dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 601dcdd862SMateusz Kulikowski /* our ALE is AD21 */ 611dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_MASK_ALE (1 << 21) 621dcdd862SMateusz Kulikowski /* our CLE is AD22 */ 631dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) 641dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) 651dcdd862SMateusz Kulikowski #define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22) 661dcdd862SMateusz Kulikowski #endif 671dcdd862SMateusz Kulikowski 681dcdd862SMateusz Kulikowski #define MTDPARTS_DEFAULT \ 691dcdd862SMateusz Kulikowski "mtdparts=atmel_nand:16m(kernel)ro,120m(root1),-(root2)" 701dcdd862SMateusz Kulikowski 711dcdd862SMateusz Kulikowski /* Ethernet */ 721dcdd862SMateusz Kulikowski #define CONFIG_MACB 731dcdd862SMateusz Kulikowski #define CONFIG_RMII 741dcdd862SMateusz Kulikowski #define CONFIG_NET_RETRY_COUNT 20 751dcdd862SMateusz Kulikowski #define CONFIG_AT91_WANTS_COMMON_PHY 761dcdd862SMateusz Kulikowski 771dcdd862SMateusz Kulikowski /* USB */ 781dcdd862SMateusz Kulikowski #ifdef CONFIG_CMD_USB 791dcdd862SMateusz Kulikowski #define CONFIG_USB_ATMEL 801dcdd862SMateusz Kulikowski #define CONFIG_USB_OHCI_NEW 811dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_CPU_INIT 821dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 831dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" 841dcdd862SMateusz Kulikowski #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 851dcdd862SMateusz Kulikowski #endif 861dcdd862SMateusz Kulikowski 871dcdd862SMateusz Kulikowski #define CONFIG_SYS_LOAD_ADDR 0x22000000 881dcdd862SMateusz Kulikowski 891dcdd862SMateusz Kulikowski #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 901dcdd862SMateusz Kulikowski #define CONFIG_SYS_MEMTEST_END 0x23e00000 911dcdd862SMateusz Kulikowski 92*fdc77189SWenyou.Yang@microchip.com /* bootstrap + u-boot + env + linux in dataflash on CS0 */ 931dcdd862SMateusz Kulikowski #define CONFIG_ENV_OFFSET 0x2000 941dcdd862SMateusz Kulikowski #define CONFIG_ENV_SIZE 0x2000 95*fdc77189SWenyou.Yang@microchip.com #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE 96*fdc77189SWenyou.Yang@microchip.com #define CONFIG_ENV_SPI_MAX_HZ 15000000 971dcdd862SMateusz Kulikowski #define CONFIG_BOOTCOMMAND "nboot 21000000 0" 981dcdd862SMateusz Kulikowski #define CONFIG_BOOTARGS "console=ttyS0,115200 " \ 991dcdd862SMateusz Kulikowski "root=/dev/mtdblock1 " \ 1001dcdd862SMateusz Kulikowski "mtdparts=" MTDPARTS_DEFAULT " " \ 1011dcdd862SMateusz Kulikowski "rw rootfstype=jffs2" 1021dcdd862SMateusz Kulikowski #define CONFIG_EXTRA_ENV_SETTINGS \ 1031dcdd862SMateusz Kulikowski "mtdparts=" MTDPARTS_DEFAULT "\0" \ 1041dcdd862SMateusz Kulikowski 1051dcdd862SMateusz Kulikowski #define CONFIG_SYS_CBSIZE 256 1061dcdd862SMateusz Kulikowski #define CONFIG_SYS_MAXARGS 16 1071dcdd862SMateusz Kulikowski #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 1081dcdd862SMateusz Kulikowski sizeof(CONFIG_SYS_PROMPT) + 16) 1091dcdd862SMateusz Kulikowski #define CONFIG_CMDLINE_EDITING 1101dcdd862SMateusz Kulikowski #define CONFIG_AUTO_COMPLETE 1111dcdd862SMateusz Kulikowski #define CONFIG_SYS_LONGHELP 1121dcdd862SMateusz Kulikowski 1131dcdd862SMateusz Kulikowski /* 1141dcdd862SMateusz Kulikowski * Size of malloc() pool 1151dcdd862SMateusz Kulikowski */ 1161dcdd862SMateusz Kulikowski #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) 1171dcdd862SMateusz Kulikowski 1181dcdd862SMateusz Kulikowski #endif 119