Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012 Michal Simek <monstr@monstr.eu> |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_ZYNQ_H |
| 8 | #define __CONFIG_ZYNQ_H |
| 9 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 10 | /* High Level configuration Options */ |
| 11 | #define CONFIG_ARMV7 |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 12 | #define CONFIG_ZYNQ |
| 13 | |
| 14 | /* CPU clock */ |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 15 | #ifndef CONFIG_CPU_FREQ_HZ |
| 16 | # define CONFIG_CPU_FREQ_HZ 800000000 |
| 17 | #endif |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 18 | |
Jagannadha Sutradharudu Teki | fef608a | 2014-01-09 01:48:07 +0530 | [diff] [blame^] | 19 | /* Cache options */ |
| 20 | #define CONFIG_CMD_CACHE |
| 21 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
| 22 | |
| 23 | #define CONFIG_SYS_L2CACHE_OFF |
| 24 | #ifndef CONFIG_SYS_L2CACHE_OFF |
| 25 | # define CONFIG_SYS_L2_PL310 |
| 26 | # define CONFIG_SYS_PL310_BASE 0xf8f02000 |
| 27 | #endif |
| 28 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 29 | /* Serial drivers */ |
| 30 | #define CONFIG_BAUDRATE 115200 |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 31 | /* The following table includes the supported baudrates */ |
| 32 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 33 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
| 34 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 35 | /* Zynq Serial driver */ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 36 | #define CONFIG_ZYNQ_SERIAL |
| 37 | #define CONFIG_ZYNQ_SERIAL_BASEADDR0 0xE0001000 |
| 38 | #define CONFIG_ZYNQ_SERIAL_BAUDRATE0 CONFIG_BAUDRATE |
| 39 | #define CONFIG_ZYNQ_SERIAL_CLOCK0 50000000 |
| 40 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 41 | /* DCC driver */ |
| 42 | #if defined(CONFIG_ZYNQ_DCC) |
| 43 | # define CONFIG_ARM_DCC |
| 44 | # define CONFIG_CPU_V6 /* Required by CONFIG_ARM_DCC */ |
| 45 | #endif |
| 46 | |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 47 | /* Ethernet driver */ |
| 48 | #define CONFIG_NET_MULTI |
| 49 | #define CONFIG_ZYNQ_GEM |
Michal Simek | 242192b | 2013-04-12 16:33:08 +0200 | [diff] [blame] | 50 | #define CONFIG_ZYNQ_GEM0 |
David Andrey | 1b0dd5e | 2013-04-04 19:13:07 +0200 | [diff] [blame] | 51 | #define CONFIG_ZYNQ_GEM_PHY_ADDR0 7 |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 52 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 53 | #define CONFIG_ZYNQ_SPI |
| 54 | /* SPI */ |
| 55 | #ifdef CONFIG_ZYNQ_SPI |
| 56 | # define CONFIG_SPI_FLASH |
| 57 | # define CONFIG_SPI_FLASH_SST |
| 58 | # define CONFIG_CMD_SF |
| 59 | #endif |
| 60 | |
| 61 | /* NOR */ |
| 62 | #define CONFIG_SYS_NO_FLASH |
Michal Simek | 0dd222b | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 63 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 64 | #define CONFIG_ZYNQ_SDHCI0 |
Michal Simek | 0dd222b | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 65 | /* MMC */ |
| 66 | #if defined(CONFIG_ZYNQ_SDHCI0) || defined(CONFIG_ZYNQ_SDHCI1) |
| 67 | # define CONFIG_MMC |
| 68 | # define CONFIG_GENERIC_MMC |
| 69 | # define CONFIG_SDHCI |
| 70 | # define CONFIG_ZYNQ_SDHCI |
| 71 | # define CONFIG_CMD_MMC |
| 72 | # define CONFIG_CMD_FAT |
| 73 | # define CONFIG_SUPPORT_VFAT |
| 74 | # define CONFIG_CMD_EXT2 |
| 75 | # define CONFIG_DOS_PARTITION |
| 76 | #endif |
| 77 | |
Michal Simek | beedbcf | 2013-04-22 15:21:33 +0200 | [diff] [blame] | 78 | #define CONFIG_ZYNQ_I2C0 |
Michal Simek | beedbcf | 2013-04-22 15:21:33 +0200 | [diff] [blame] | 79 | /* I2C */ |
| 80 | #if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1) |
| 81 | # define CONFIG_CMD_I2C |
Heiko Schocher | 465819a | 2013-11-08 07:30:53 +0100 | [diff] [blame] | 82 | # define CONFIG_SYS_I2C |
| 83 | # define CONFIG_SYS_I2C_ZYNQ |
| 84 | # define CONFIG_SYS_I2C_ZYNQ_SPEED 100000 |
| 85 | # define CONFIG_SYS_I2C_ZYNQ_SLAVE 1 |
Michal Simek | beedbcf | 2013-04-22 15:21:33 +0200 | [diff] [blame] | 86 | #endif |
| 87 | |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 88 | #define CONFIG_BOOTP_SERVERIP |
| 89 | #define CONFIG_BOOTP_BOOTPATH |
| 90 | #define CONFIG_BOOTP_GATEWAY |
| 91 | #define CONFIG_BOOTP_HOSTNAME |
| 92 | #define CONFIG_BOOTP_MAY_FAIL |
| 93 | |
| 94 | /* MII and Phylib */ |
| 95 | #define CONFIG_MII |
| 96 | #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN |
| 97 | #define CONFIG_PHYLIB |
| 98 | #define CONFIG_PHY_MARVELL |
| 99 | |
| 100 | /* Environment */ |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 101 | #define CONFIG_ENV_SIZE 0x10000 /* Env. sector size */ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 102 | #define CONFIG_ENV_IS_NOWHERE |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 103 | #define CONFIG_SYS_LOAD_ADDR 0 |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 104 | |
Jagannadha Sutradharudu Teki | 4817a19 | 2014-01-09 01:48:04 +0530 | [diff] [blame] | 105 | /* Miscellaneous configurable options */ |
| 106 | #define CONFIG_SYS_PROMPT "zynq-uboot> " |
| 107 | #define CONFIG_SYS_HUSH_PARSER |
| 108 | |
| 109 | #define CONFIG_CMDLINE_EDITING |
| 110 | #define CONFIG_AUTO_COMPLETE |
| 111 | #define CONFIG_SYS_LONGHELP |
| 112 | #define CONFIG_SYS_MAXARGS 15 /* max number of command args */ |
| 113 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 114 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 115 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 116 | |
Jagannadha Sutradharudu Teki | 6681b3e | 2014-01-09 01:48:05 +0530 | [diff] [blame] | 117 | /* Physical Memory map */ |
| 118 | #define CONFIG_SYS_TEXT_BASE 0 |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 119 | |
Jagannadha Sutradharudu Teki | 6681b3e | 2014-01-09 01:48:05 +0530 | [diff] [blame] | 120 | #define CONFIG_NR_DRAM_BANKS 1 |
| 121 | #define CONFIG_SYS_SDRAM_BASE 0 |
| 122 | #define CONFIG_SYS_SDRAM_SIZE 0x40000000 |
| 123 | |
| 124 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE |
| 125 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x1000) |
| 126 | |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 127 | #define CONFIG_SYS_MALLOC_LEN 0x400000 |
Jagannadha Sutradharudu Teki | 6681b3e | 2014-01-09 01:48:05 +0530 | [diff] [blame] | 128 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SDRAM_BASE |
| 129 | #define CONFIG_SYS_INIT_RAM_SIZE CONFIG_SYS_MALLOC_LEN |
| 130 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ |
| 131 | CONFIG_SYS_INIT_RAM_SIZE - \ |
| 132 | GENERATED_GBL_DATA_SIZE) |
Jagannadha Sutradharudu Teki | 4ecfc2f | 2014-01-09 01:48:06 +0530 | [diff] [blame] | 133 | |
| 134 | /* Enable the PL to be downloaded */ |
| 135 | #define CONFIG_FPGA |
| 136 | #define CONFIG_FPGA_XILINX |
| 137 | #define CONFIG_FPGA_ZYNQPL |
| 138 | #define CONFIG_CMD_FPGA |
| 139 | |
| 140 | /* Open Firmware flat tree */ |
| 141 | #define CONFIG_OF_LIBFDT |
| 142 | |
| 143 | /* FIT support */ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 144 | #define CONFIG_FIT |
Jagannadha Sutradharudu Teki | fc54fc4 | 2014-01-09 01:48:02 +0530 | [diff] [blame] | 145 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 146 | |
Jagannadha Sutradharudu Teki | d06b7ad | 2014-01-09 01:48:03 +0530 | [diff] [blame] | 147 | /* Boot FreeBSD/vxWorks from an ELF image */ |
| 148 | #if defined(CONFIG_ZYNQ_BOOT_FREEBSD) |
| 149 | # define CONFIG_API |
| 150 | # define CONFIG_CMD_ELF |
| 151 | # define CONFIG_SYS_MMC_MAX_DEVICE 1 |
| 152 | #endif |
| 153 | |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 154 | /* Commands */ |
| 155 | #include <config_cmd_default.h> |
| 156 | |
| 157 | #define CONFIG_CMD_PING |
| 158 | #define CONFIG_CMD_DHCP |
| 159 | #define CONFIG_CMD_MII |
| 160 | |
| 161 | #endif /* __CONFIG_ZYNQ_H */ |