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