Marek Vasut | c115a0d | 2014-12-30 18:16:08 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Marek Vasut <marex@denx.de> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | #ifndef __CONFIG_SOCFPGA_ARRIA5_H__ |
| 7 | #define __CONFIG_SOCFPGA_ARRIA5_H__ |
| 8 | |
| 9 | #include <asm/arch/socfpga_base_addrs.h> |
| 10 | #include "../../board/altera/socfpga/pinmux_config.h" |
| 11 | #include "../../board/altera/socfpga/iocsr_config.h" |
| 12 | #include "../../board/altera/socfpga/pll_config.h" |
| 13 | |
| 14 | /* U-Boot Commands */ |
| 15 | #define CONFIG_SYS_NO_FLASH |
| 16 | #include <config_cmd_default.h> |
| 17 | #define CONFIG_DOS_PARTITION |
| 18 | #define CONFIG_FAT_WRITE |
| 19 | #define CONFIG_HW_WATCHDOG |
| 20 | |
| 21 | #define CONFIG_CMD_ASKENV |
| 22 | #define CONFIG_CMD_BOOTZ |
| 23 | #define CONFIG_CMD_CACHE |
| 24 | #define CONFIG_CMD_DFU |
| 25 | #define CONFIG_CMD_DHCP |
| 26 | #define CONFIG_CMD_EXT4 |
| 27 | #define CONFIG_CMD_EXT4_WRITE |
| 28 | #define CONFIG_CMD_FAT |
| 29 | #define CONFIG_CMD_FPGA |
| 30 | #define CONFIG_CMD_FS_GENERIC |
| 31 | #define CONFIG_CMD_GREPENV |
| 32 | #define CONFIG_CMD_MII |
| 33 | #define CONFIG_CMD_MMC |
| 34 | #define CONFIG_CMD_NET |
| 35 | #define CONFIG_CMD_PING |
| 36 | #define CONFIG_CMD_SETEXPR |
| 37 | #define CONFIG_CMD_USB |
| 38 | #define CONFIG_CMD_USB_MASS_STORAGE |
| 39 | |
| 40 | #define CONFIG_REGEX /* Enable regular expression support */ |
| 41 | |
| 42 | /* Memory configurations */ |
| 43 | #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCDK */ |
| 44 | |
| 45 | /* Booting Linux */ |
| 46 | #define CONFIG_BOOTDELAY 3 |
| 47 | #define CONFIG_BOOTFILE "zImage" |
| 48 | #define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) |
| 49 | #ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET |
| 50 | #define CONFIG_BOOTCOMMAND "run ramboot" |
| 51 | #else |
| 52 | #define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot" |
| 53 | #endif |
| 54 | #define CONFIG_LOADADDR 0x8000 |
| 55 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 56 | |
| 57 | /* Ethernet on SoC (EMAC) */ |
| 58 | #if defined(CONFIG_CMD_NET) |
| 59 | #define CONFIG_EMAC_BASE SOCFPGA_EMAC1_ADDRESS |
| 60 | #define CONFIG_PHY_INTERFACE_MODE PHY_INTERFACE_MODE_RGMII |
| 61 | |
| 62 | /* PHY */ |
| 63 | #define CONFIG_PHY_MICREL |
| 64 | #define CONFIG_PHY_MICREL_KSZ9021 |
| 65 | #define CONFIG_KSZ9021_CLK_SKEW_ENV "micrel-ksz9021-clk-skew" |
| 66 | #define CONFIG_KSZ9021_CLK_SKEW_VAL 0xf0f0 |
| 67 | #define CONFIG_KSZ9021_DATA_SKEW_ENV "micrel-ksz9021-data-skew" |
| 68 | #define CONFIG_KSZ9021_DATA_SKEW_VAL 0x0 |
| 69 | |
| 70 | #endif |
| 71 | |
| 72 | /* USB */ |
| 73 | #ifdef CONFIG_CMD_USB |
| 74 | #define CONFIG_USB_DWC2_REG_ADDR SOCFPGA_USB1_ADDRESS |
| 75 | #endif |
| 76 | #define CONFIG_G_DNL_MANUFACTURER "Altera" |
| 77 | |
| 78 | /* Extra Environment */ |
| 79 | #define CONFIG_HOSTNAME socfpga_arria5 |
| 80 | |
| 81 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 82 | "verify=n\0" \ |
| 83 | "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 84 | "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ |
| 85 | "bootm ${loadaddr} - ${fdt_addr}\0" \ |
| 86 | "bootimage=zImage\0" \ |
| 87 | "fdt_addr=100\0" \ |
| 88 | "fdtimage=socfpga.dtb\0" \ |
| 89 | "fsloadcmd=ext2load\0" \ |
| 90 | "bootm ${loadaddr} - ${fdt_addr}\0" \ |
| 91 | "mmcroot=/dev/mmcblk0p2\0" \ |
| 92 | "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ |
| 93 | " root=${mmcroot} rw rootwait;" \ |
| 94 | "bootz ${loadaddr} - ${fdt_addr}\0" \ |
| 95 | "mmcload=mmc rescan;" \ |
| 96 | "load mmc 0:1 ${loadaddr} ${bootimage};" \ |
| 97 | "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ |
| 98 | "qspiroot=/dev/mtdblock0\0" \ |
| 99 | "qspirootfstype=jffs2\0" \ |
| 100 | "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ |
| 101 | " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ |
| 102 | "bootm ${loadaddr} - ${fdt_addr}\0" |
| 103 | |
| 104 | /* The rest of the configuration is shared */ |
| 105 | #include <configs/socfpga_common.h> |
| 106 | |
| 107 | #endif /* __CONFIG_SOCFPGA_ARRIA5_H__ */ |