184c7204bSMichal Simek /* 284c7204bSMichal Simek * Configuration for Xilinx ZynqMP 384c7204bSMichal Simek * (C) Copyright 2014 - 2015 Xilinx, Inc. 484c7204bSMichal Simek * Michal Simek <michal.simek@xilinx.com> 584c7204bSMichal Simek * 684c7204bSMichal Simek * Based on Configuration for Versatile Express 784c7204bSMichal Simek * 884c7204bSMichal Simek * SPDX-License-Identifier: GPL-2.0+ 984c7204bSMichal Simek */ 1084c7204bSMichal Simek 1184c7204bSMichal Simek #ifndef __XILINX_ZYNQMP_H 1284c7204bSMichal Simek #define __XILINX_ZYNQMP_H 1384c7204bSMichal Simek 1484c7204bSMichal Simek #define CONFIG_REMAKE_ELF 1584c7204bSMichal Simek 1684c7204bSMichal Simek /* #define CONFIG_ARMV8_SWITCH_TO_EL1 */ 1784c7204bSMichal Simek 1884c7204bSMichal Simek #define CONFIG_SYS_NO_FLASH 1984c7204bSMichal Simek 2084c7204bSMichal Simek #define CONFIG_SYS_GENERIC_BOARD 2184c7204bSMichal Simek 2284c7204bSMichal Simek /* Generic Interrupt Controller Definitions */ 2384c7204bSMichal Simek #define CONFIG_GICV2 2484c7204bSMichal Simek #define GICD_BASE 0xF9010000 2584c7204bSMichal Simek #define GICC_BASE 0xF9020000 2684c7204bSMichal Simek 2784c7204bSMichal Simek /* Physical Memory Map */ 2884c7204bSMichal Simek #define CONFIG_NR_DRAM_BANKS 1 2984c7204bSMichal Simek #define CONFIG_SYS_SDRAM_BASE 0 3084c7204bSMichal Simek #define CONFIG_SYS_SDRAM_SIZE 0x40000000 3184c7204bSMichal Simek 3284c7204bSMichal Simek #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 3384c7204bSMichal Simek #define CONFIG_SYS_MEMTEST_END CONFIG_SYS_SDRAM_SIZE 3484c7204bSMichal Simek 3584c7204bSMichal Simek /* Have release address at the end of 256MB for now */ 3684c7204bSMichal Simek #define CPU_RELEASE_ADDR 0xFFFFFF0 3784c7204bSMichal Simek 3884c7204bSMichal Simek /* Cache Definitions */ 39222b2129SSiva Durga Prasad Paladugu #define CONFIG_SYS_CACHELINE_SIZE 64 4084c7204bSMichal Simek 4184c7204bSMichal Simek #define CONFIG_IDENT_STRING " Xilinx ZynqMP" 4284c7204bSMichal Simek 4384c7204bSMichal Simek #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) 4484c7204bSMichal Simek 4584c7204bSMichal Simek /* Flat Device Tree Definitions */ 4684c7204bSMichal Simek #define CONFIG_OF_LIBFDT 4784c7204bSMichal Simek 4884c7204bSMichal Simek /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ 4984c7204bSMichal Simek #define COUNTER_FREQUENCY 4000000 5084c7204bSMichal Simek 5184c7204bSMichal Simek /* Size of malloc() pool */ 5284c7204bSMichal Simek #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x400000) 5384c7204bSMichal Simek 5484c7204bSMichal Simek /* Serial setup */ 55b0d18beeSSiva Durga Prasad Paladugu #if defined(CONFIG_ZYNQMP_DCC) 56b0d18beeSSiva Durga Prasad Paladugu # define CONFIG_ARM_DCC 57b0d18beeSSiva Durga Prasad Paladugu # define CONFIG_CPU_ARMV8 58b0d18beeSSiva Durga Prasad Paladugu #else 59b0d18beeSSiva Durga Prasad Paladugu # if defined(CONFIG_ZYNQ_SERIAL_UART0) || defined(CONFIG_ZYNQ_SERIAL_UART1) 6084c7204bSMichal Simek # define CONFIG_ZYNQ_SERIAL 61b0d18beeSSiva Durga Prasad Paladugu # endif 62b0d18beeSSiva Durga Prasad Paladugu #endif 6384c7204bSMichal Simek 6484c7204bSMichal Simek #define CONFIG_CONS_INDEX 0 6584c7204bSMichal Simek #define CONFIG_BAUDRATE 115200 6684c7204bSMichal Simek #define CONFIG_SYS_BAUDRATE_TABLE \ 6784c7204bSMichal Simek { 4800, 9600, 19200, 38400, 57600, 115200 } 6884c7204bSMichal Simek 6984c7204bSMichal Simek /* Command line configuration */ 7084c7204bSMichal Simek #define CONFIG_CMD_ENV 7184c7204bSMichal Simek #define CONFIG_CMD_EXT2 7284c7204bSMichal Simek #define CONFIG_CMD_EXT4 7384c7204bSMichal Simek #define CONFIG_CMD_FAT 745af37bd0SSiva Durga Prasad Paladugu #define CONFIG_CMD_FS_GENERIC 7584c7204bSMichal Simek #define CONFIG_DOS_PARTITION 765cb24200SMichal Simek #define CONFIG_CMD_ELF 775cb24200SMichal Simek #define CONFIG_MP 7884c7204bSMichal Simek 79cb7ea820SMichal Simek #define CONFIG_CMD_MII 80cb7ea820SMichal Simek 81cb7ea820SMichal Simek /* BOOTP options */ 82cb7ea820SMichal Simek #define CONFIG_BOOTP_BOOTFILESIZE 83cb7ea820SMichal Simek #define CONFIG_BOOTP_BOOTPATH 84cb7ea820SMichal Simek #define CONFIG_BOOTP_GATEWAY 85cb7ea820SMichal Simek #define CONFIG_BOOTP_HOSTNAME 86cb7ea820SMichal Simek #define CONFIG_BOOTP_MAY_FAIL 87cb7ea820SMichal Simek #define CONFIG_BOOTP_SERVERIP 88cb7ea820SMichal Simek 8948d7260dSSiva Durga Prasad Paladugu /* SPI */ 9048d7260dSSiva Durga Prasad Paladugu #ifdef CONFIG_ZYNQ_SPI 9148d7260dSSiva Durga Prasad Paladugu # define CONFIG_SPI_FLASH_SST 9248d7260dSSiva Durga Prasad Paladugu # define CONFIG_CMD_SF 9348d7260dSSiva Durga Prasad Paladugu #endif 9448d7260dSSiva Durga Prasad Paladugu 9584c7204bSMichal Simek #if defined(CONFIG_ZYNQ_SDHCI0) || defined(CONFIG_ZYNQ_SDHCI1) 9684c7204bSMichal Simek # define CONFIG_MMC 9784c7204bSMichal Simek # define CONFIG_GENERIC_MMC 9884c7204bSMichal Simek # define CONFIG_SDHCI 9984c7204bSMichal Simek # define CONFIG_ZYNQ_SDHCI 10084c7204bSMichal Simek # define CONFIG_CMD_MMC 10184c7204bSMichal Simek #endif 10284c7204bSMichal Simek 10384c7204bSMichal Simek #if defined(CONFIG_ZYNQ_SDHCI) 10484c7204bSMichal Simek # define CONFIG_FAT_WRITE 10584c7204bSMichal Simek # define CONFIG_CMD_EXT4_WRITE 10684c7204bSMichal Simek #endif 10784c7204bSMichal Simek 10884c7204bSMichal Simek /* Miscellaneous configurable options */ 10984c7204bSMichal Simek #define CONFIG_SYS_LOAD_ADDR 0x8000000 11084c7204bSMichal Simek 11184c7204bSMichal Simek /* Initial environment variables */ 11284c7204bSMichal Simek #define CONFIG_EXTRA_ENV_SETTINGS \ 11384c7204bSMichal Simek "kernel_addr=0x80000\0" \ 11484c7204bSMichal Simek "fdt_addr=0x7000000\0" \ 11584c7204bSMichal Simek "fdt_high=0x10000000\0" \ 1165af37bd0SSiva Durga Prasad Paladugu "sdboot=mmcinfo && load mmc 0:0 $fdt_addr system.dtb && " \ 1175af37bd0SSiva Durga Prasad Paladugu "load mmc 0:0 $kernel_addr Image && booti $kernel_addr - $fdt_addr\0" 11884c7204bSMichal Simek 11984c7204bSMichal Simek #define CONFIG_BOOTARGS "setenv bootargs console=ttyPS0,${baudrate} " \ 12084c7204bSMichal Simek "earlycon=cdns,mmio,0xff000000,${baudrate}n8" 12184c7204bSMichal Simek #define CONFIG_PREBOOT "run bootargs" 12284c7204bSMichal Simek #define CONFIG_BOOTCOMMAND "run $modeboot" 12384c7204bSMichal Simek #define CONFIG_BOOTDELAY 5 12484c7204bSMichal Simek 12584c7204bSMichal Simek #define CONFIG_BOARD_LATE_INIT 12684c7204bSMichal Simek 12784c7204bSMichal Simek /* Do not preserve environment */ 12884c7204bSMichal Simek #define CONFIG_ENV_IS_NOWHERE 1 12984c7204bSMichal Simek #define CONFIG_ENV_SIZE 0x1000 13084c7204bSMichal Simek 13184c7204bSMichal Simek /* Monitor Command Prompt */ 13284c7204bSMichal Simek /* Console I/O Buffer Size */ 13384c7204bSMichal Simek #define CONFIG_SYS_CBSIZE 2048 13484c7204bSMichal Simek #define CONFIG_SYS_PROMPT "ZynqMP> " 13584c7204bSMichal Simek #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 13684c7204bSMichal Simek sizeof(CONFIG_SYS_PROMPT) + 16) 13784c7204bSMichal Simek #define CONFIG_SYS_HUSH_PARSER 13884c7204bSMichal Simek #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 13984c7204bSMichal Simek #define CONFIG_SYS_LONGHELP 14084c7204bSMichal Simek #define CONFIG_CMDLINE_EDITING 14184c7204bSMichal Simek #define CONFIG_SYS_MAXARGS 64 14284c7204bSMichal Simek 143cb7ea820SMichal Simek /* Ethernet driver */ 144cb7ea820SMichal Simek #if defined(CONFIG_ZYNQ_GEM0) || defined(CONFIG_ZYNQ_GEM1) || \ 145cb7ea820SMichal Simek defined(CONFIG_ZYNQ_GEM2) || defined(CONFIG_ZYNQ_GEM3) 146cb7ea820SMichal Simek # define CONFIG_NET_MULTI 147cb7ea820SMichal Simek # define CONFIG_ZYNQ_GEM 148cb7ea820SMichal Simek # define CONFIG_MII 149cb7ea820SMichal Simek # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 150cb7ea820SMichal Simek # define CONFIG_PHYLIB 151cb7ea820SMichal Simek # define CONFIG_PHY_MARVELL 152cb7ea820SMichal Simek #endif 153cb7ea820SMichal Simek 1542594e03cSSiva Durga Prasad Paladugu /* I2C */ 1552594e03cSSiva Durga Prasad Paladugu #if defined(CONFIG_SYS_I2C_ZYNQ) 1562594e03cSSiva Durga Prasad Paladugu # define CONFIG_CMD_I2C 1572594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_I2C 1582594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_I2C_ZYNQ_SPEED 100000 1592594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_I2C_ZYNQ_SLAVE 0 1602594e03cSSiva Durga Prasad Paladugu #endif 1612594e03cSSiva Durga Prasad Paladugu 1622594e03cSSiva Durga Prasad Paladugu /* EEPROM */ 1632594e03cSSiva Durga Prasad Paladugu #ifdef CONFIG_ZYNQMP_EEPROM 1642594e03cSSiva Durga Prasad Paladugu # define CONFIG_CMD_EEPROM 1652594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 1662594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 1672594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 1682594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 1692594e03cSSiva Durga Prasad Paladugu # define CONFIG_SYS_EEPROM_SIZE (64 * 1024) 1702594e03cSSiva Durga Prasad Paladugu #endif 1712594e03cSSiva Durga Prasad Paladugu 172*6fe6f135SMichal Simek #ifdef CONFIG_AHCI 173*6fe6f135SMichal Simek #define CONFIG_LIBATA 174*6fe6f135SMichal Simek #define CONFIG_SCSI_AHCI 175*6fe6f135SMichal Simek #define CONFIG_SCSI_AHCI_PLAT 176*6fe6f135SMichal Simek #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 177*6fe6f135SMichal Simek #define CONFIG_SYS_SCSI_MAX_LUN 1 178*6fe6f135SMichal Simek #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ 179*6fe6f135SMichal Simek CONFIG_SYS_SCSI_MAX_LUN) 180*6fe6f135SMichal Simek #define CONFIG_CMD_SCSI 181*6fe6f135SMichal Simek #endif 182*6fe6f135SMichal Simek 18384c7204bSMichal Simek #define CONFIG_FIT 18484c7204bSMichal Simek #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ 18584c7204bSMichal Simek 18684c7204bSMichal Simek #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) 18784c7204bSMichal Simek 18884c7204bSMichal Simek #define CONFIG_CMD_BOOTI 18984c7204bSMichal Simek #define CONFIG_CMD_UNZIP 19084c7204bSMichal Simek 19184c7204bSMichal Simek #define CONFIG_BOARD_EARLY_INIT_R 19284c7204bSMichal Simek #define CONFIG_CLOCKS 19384c7204bSMichal Simek 19484c7204bSMichal Simek #endif /* __XILINX_ZYNQMP_H */ 195