Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 1 | /* |
| 2 | * include/configs/koelsch.h |
| 3 | * |
| 4 | * Copyright (C) 2013 Renesas Electronics Corporation |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0 |
| 7 | */ |
| 8 | |
| 9 | #ifndef __KOELSCH_H |
| 10 | #define __KOELSCH_H |
| 11 | |
| 12 | #undef DEBUG |
| 13 | #define CONFIG_ARMV7 |
| 14 | #define CONFIG_R8A7791 |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 15 | #define CONFIG_RMOBILE_BOARD_STRING "Koelsch" |
| 16 | #define CONFIG_SH_GPIO_PFC |
| 17 | |
| 18 | #include <asm/arch/rmobile.h> |
| 19 | |
Nobuhiro Iwamatsu | 157585e | 2013-10-20 20:37:17 +0900 | [diff] [blame] | 20 | #define CONFIG_CMD_EDITENV |
| 21 | #define CONFIG_CMD_SAVEENV |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 22 | #define CONFIG_CMD_MEMORY |
| 23 | #define CONFIG_CMD_DFL |
| 24 | #define CONFIG_CMD_SDRAM |
| 25 | #define CONFIG_CMD_RUN |
| 26 | #define CONFIG_CMD_LOADS |
Nobuhiro Iwamatsu | 157585e | 2013-10-20 20:37:17 +0900 | [diff] [blame] | 27 | #define CONFIG_CMD_NET |
| 28 | #define CONFIG_CMD_MII |
| 29 | #define CONFIG_CMD_PING |
| 30 | #define CONFIG_CMD_DHCP |
| 31 | #define CONFIG_CMD_NFS |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 32 | #define CONFIG_CMD_BOOTZ |
Nobuhiro Iwamatsu | e7c981e | 2014-03-27 14:13:06 +0900 | [diff] [blame] | 33 | #define CONFIG_CMD_USB |
Nobuhiro Iwamatsu | 0e50351 | 2014-03-28 17:29:45 +0900 | [diff] [blame] | 34 | #define CONFIG_CMD_FAT |
Nobuhiro Iwamatsu | 1484dd8 | 2014-01-08 10:32:24 +0900 | [diff] [blame] | 35 | #define CONFIG_CMD_SF |
| 36 | #define CONFIG_CMD_SPI |
Nobuhiro Iwamatsu | 04207bc | 2014-03-31 15:22:31 +0900 | [diff] [blame] | 37 | |
| 38 | #define CONFIG_FAT_WRITE |
| 39 | #define CONFIG_EXT4_WRITE |
| 40 | |
Nobuhiro Iwamatsu | 25c0dca | 2014-10-31 16:16:27 +0900 | [diff] [blame] | 41 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 42 | #define CONFIG_SYS_TEXT_BASE 0x70000000 |
| 43 | #else |
Nobuhiro Iwamatsu | 1484dd8 | 2014-01-08 10:32:24 +0900 | [diff] [blame] | 44 | #define CONFIG_SYS_TEXT_BASE 0xE6304000 |
Nobuhiro Iwamatsu | 25c0dca | 2014-10-31 16:16:27 +0900 | [diff] [blame] | 45 | #endif |
| 46 | |
Nobuhiro Iwamatsu | 303d4ee | 2014-04-07 17:11:52 +0900 | [diff] [blame] | 47 | #define CONFIG_SYS_THUMB_BUILD |
Nobuhiro Iwamatsu | e1d4fb3 | 2014-05-19 16:10:12 +0900 | [diff] [blame] | 48 | #define CONFIG_SYS_GENERIC_BOARD |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 49 | |
Nobuhiro Iwamatsu | 0e50351 | 2014-03-28 17:29:45 +0900 | [diff] [blame] | 50 | /* Support File sytems */ |
| 51 | #define CONFIG_DOS_PARTITION |
| 52 | #define CONFIG_SUPPORT_VFAT |
| 53 | |
| 54 | |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 55 | #define CONFIG_CMDLINE_TAG |
| 56 | #define CONFIG_SETUP_MEMORY_TAGS |
| 57 | #define CONFIG_INITRD_TAG |
| 58 | #define CONFIG_CMDLINE_EDITING |
| 59 | |
| 60 | #define CONFIG_OF_LIBFDT |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 61 | |
| 62 | #define CONFIG_BAUDRATE 38400 |
| 63 | #define CONFIG_BOOTDELAY 3 |
| 64 | #define CONFIG_BOOTARGS "" |
| 65 | |
| 66 | #define CONFIG_VERSION_VARIABLE |
| 67 | #undef CONFIG_SHOW_BOOT_PROGRESS |
| 68 | |
| 69 | #define CONFIG_ARCH_CPU_INIT |
| 70 | #define CONFIG_DISPLAY_CPUINFO |
| 71 | #define CONFIG_DISPLAY_BOARDINFO |
| 72 | #define CONFIG_BOARD_EARLY_INIT_F |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 73 | #define CONFIG_TMU_TIMER |
| 74 | |
| 75 | /* STACK */ |
Nobuhiro Iwamatsu | 25c0dca | 2014-10-31 16:16:27 +0900 | [diff] [blame] | 76 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 77 | #define CONFIG_SYS_INIT_SP_ADDR 0x7003FFFC |
| 78 | #else |
| 79 | #define CONFIG_SYS_INIT_SP_ADDR 0xE633fffC |
| 80 | #endif |
| 81 | |
| 82 | #define STACK_AREA_SIZE 0xC000 |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 83 | #define LOW_LEVEL_MERAM_STACK \ |
| 84 | (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4) |
| 85 | |
| 86 | /* MEMORY */ |
| 87 | #define KOELSCH_SDRAM_BASE 0x40000000 |
| 88 | #define KOELSCH_SDRAM_SIZE (2048u * 1024 * 1024) |
| 89 | #define KOELSCH_UBOOT_SDRAM_SIZE (512 * 1024 * 1024) |
| 90 | |
| 91 | #define CONFIG_SYS_LONGHELP |
| 92 | #define CONFIG_SYS_CBSIZE 256 |
| 93 | #define CONFIG_SYS_PBSIZE 256 |
| 94 | #define CONFIG_SYS_MAXARGS 16 |
| 95 | #define CONFIG_SYS_BARGSIZE 512 |
| 96 | #define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 } |
| 97 | |
| 98 | /* SCIF */ |
| 99 | #define CONFIG_SCIF_CONSOLE |
| 100 | #define CONFIG_CONS_SCIF0 |
Nobuhiro Iwamatsu | 5d70d7f | 2014-07-28 08:35:05 +0900 | [diff] [blame] | 101 | #define CONFIG_SCIF_USE_EXT_CLK |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 102 | #undef CONFIG_SYS_CONSOLE_INFO_QUIET |
| 103 | #undef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 104 | #undef CONFIG_SYS_CONSOLE_ENV_OVERWRITE |
| 105 | |
| 106 | #define CONFIG_SYS_MEMTEST_START (KOELSCH_SDRAM_BASE) |
| 107 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \ |
| 108 | 504 * 1024 * 1024) |
| 109 | #undef CONFIG_SYS_ALT_MEMTEST |
| 110 | #undef CONFIG_SYS_MEMTEST_SCRATCH |
| 111 | #undef CONFIG_SYS_LOADS_BAUD_CHANGE |
| 112 | |
| 113 | #define CONFIG_SYS_SDRAM_BASE (KOELSCH_SDRAM_BASE) |
| 114 | #define CONFIG_SYS_SDRAM_SIZE (KOELSCH_UBOOT_SDRAM_SIZE) |
| 115 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fc0) |
| 116 | #define CONFIG_NR_DRAM_BANKS 1 |
| 117 | |
| 118 | #define CONFIG_SYS_MONITOR_BASE 0x00000000 |
| 119 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) |
| 120 | #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 121 | #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) |
| 122 | |
| 123 | /* FLASH */ |
Nobuhiro Iwamatsu | 1484dd8 | 2014-01-08 10:32:24 +0900 | [diff] [blame] | 124 | #define CONFIG_SYS_NO_FLASH |
| 125 | #define CONFIG_SPI |
| 126 | #define CONFIG_SH_QSPI |
| 127 | #define CONFIG_SPI_FLASH |
| 128 | #define CONFIG_SPI_FLASH_BAR |
| 129 | #define CONFIG_SPI_FLASH_SPANSION |
| 130 | /* ENV setting */ |
| 131 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 132 | #define CONFIG_ENV_ADDR 0xC0000 |
| 133 | |
Nobuhiro Iwamatsu | 1484dd8 | 2014-01-08 10:32:24 +0900 | [diff] [blame] | 134 | /* Common ENV setting */ |
| 135 | #define CONFIG_ENV_OVERWRITE |
| 136 | #define CONFIG_ENV_SECT_SIZE (256 * 1024) |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 137 | #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) |
| 138 | #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) |
| 139 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN) |
| 140 | |
Nobuhiro Iwamatsu | 157585e | 2013-10-20 20:37:17 +0900 | [diff] [blame] | 141 | /* SH Ether */ |
| 142 | #define CONFIG_NET_MULTI |
| 143 | #define CONFIG_SH_ETHER |
| 144 | #define CONFIG_SH_ETHER_USE_PORT 0 |
| 145 | #define CONFIG_SH_ETHER_PHY_ADDR 0x1 |
| 146 | #define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII |
| 147 | #define CONFIG_SH_ETHER_CACHE_WRITEBACK |
| 148 | #define CONFIG_SH_ETHER_CACHE_INVALIDATE |
| 149 | #define CONFIG_PHYLIB |
| 150 | #define CONFIG_PHY_MICREL |
| 151 | #define CONFIG_BITBANGMII |
| 152 | #define CONFIG_BITBANGMII_MULTI |
| 153 | #define CONFIG_SH_ETHER_ALIGNE_SIZE 64 |
| 154 | |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 155 | /* Board Clock */ |
Nobuhiro Iwamatsu | c7922f3 | 2014-03-31 11:06:46 +0900 | [diff] [blame] | 156 | #define RMOBILE_XTAL_CLK 20000000u |
| 157 | #define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK |
| 158 | #define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 159 | #define CONFIG_SH_SCIF_CLK_FREQ 14745600 |
| 160 | #define CONFIG_SYS_TMU_CLK_DIV 4 |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 161 | |
Nobuhiro Iwamatsu | 2546d4f | 2013-09-11 15:04:33 +0900 | [diff] [blame] | 162 | /* i2c */ |
| 163 | #define CONFIG_CMD_I2C |
| 164 | #define CONFIG_SYS_I2C |
| 165 | #define CONFIG_SYS_I2C_SH |
| 166 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
| 167 | #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3 |
Nobuhiro Iwamatsu | 2546d4f | 2013-09-11 15:04:33 +0900 | [diff] [blame] | 168 | #define CONFIG_SYS_I2C_SH_SPEED0 400000 |
Nobuhiro Iwamatsu | 2546d4f | 2013-09-11 15:04:33 +0900 | [diff] [blame] | 169 | #define CONFIG_SYS_I2C_SH_SPEED1 400000 |
Nobuhiro Iwamatsu | 2546d4f | 2013-09-11 15:04:33 +0900 | [diff] [blame] | 170 | #define CONFIG_SYS_I2C_SH_SPEED2 400000 |
| 171 | #define CONFIG_SH_I2C_DATA_HIGH 4 |
| 172 | #define CONFIG_SH_I2C_DATA_LOW 5 |
| 173 | #define CONFIG_SH_I2C_CLOCK 10000000 |
| 174 | |
Nobuhiro Iwamatsu | 6c57c16 | 2013-10-10 10:48:20 +0900 | [diff] [blame] | 175 | #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ |
| 176 | |
Nobuhiro Iwamatsu | e7c981e | 2014-03-27 14:13:06 +0900 | [diff] [blame] | 177 | /* USB */ |
| 178 | #define CONFIG_USB_EHCI |
| 179 | #define CONFIG_USB_EHCI_RMOBILE |
Nobuhiro Iwamatsu | a9c085f | 2014-07-28 15:29:31 +0900 | [diff] [blame] | 180 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
Nobuhiro Iwamatsu | e7c981e | 2014-03-27 14:13:06 +0900 | [diff] [blame] | 181 | #define CONFIG_USB_STORAGE |
| 182 | |
Nobuhiro Iwamatsu | 7fbb92b | 2013-11-21 17:07:46 +0900 | [diff] [blame] | 183 | #endif /* __KOELSCH_H */ |