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 | 6a994e5 | 2014-11-06 15:39:28 +0900 | [diff] [blame] | 36 | |
| 37 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 38 | #define CONFIG_SYS_TEXT_BASE 0x70000000 |
| 39 | #else |
| 40 | #define CONFIG_SYS_TEXT_BASE 0xE6304000 |
| 41 | #endif |
| 42 | |
| 43 | #define CONFIG_SYS_THUMB_BUILD |
| 44 | #define CONFIG_SYS_GENERIC_BOARD |
| 45 | |
| 46 | #define CONFIG_CMDLINE_TAG |
| 47 | #define CONFIG_SETUP_MEMORY_TAGS |
| 48 | #define CONFIG_INITRD_TAG |
| 49 | #define CONFIG_CMDLINE_EDITING |
| 50 | |
| 51 | #define CONFIG_OF_LIBFDT |
| 52 | |
| 53 | #define CONFIG_BAUDRATE 38400 |
| 54 | #define CONFIG_BOOTDELAY 3 |
| 55 | #define CONFIG_BOOTARGS "" |
| 56 | |
| 57 | #define CONFIG_VERSION_VARIABLE |
| 58 | #undef CONFIG_SHOW_BOOT_PROGRESS |
| 59 | |
| 60 | #define CONFIG_ARCH_CPU_INIT |
| 61 | #define CONFIG_DISPLAY_CPUINFO |
| 62 | #define CONFIG_DISPLAY_BOARDINFO |
| 63 | #define CONFIG_BOARD_EARLY_INIT_F |
| 64 | #define CONFIG_TMU_TIMER |
| 65 | |
| 66 | /* STACK */ |
| 67 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 68 | #define CONFIG_SYS_INIT_SP_ADDR 0x7003FFFC |
| 69 | #else |
| 70 | #define CONFIG_SYS_INIT_SP_ADDR 0xE633FFFC |
| 71 | #endif |
| 72 | |
| 73 | #define STACK_AREA_SIZE 0xC000 |
| 74 | #define LOW_LEVEL_MERAM_STACK \ |
| 75 | (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4) |
| 76 | |
| 77 | /* MEMORY */ |
| 78 | #define GOSE_SDRAM_BASE 0x40000000 |
| 79 | #define GOSE_SDRAM_SIZE 0x40000000 |
| 80 | #define GOSE_UBOOT_SDRAM_SIZE 0x20000000 |
| 81 | |
| 82 | #define CONFIG_SYS_LONGHELP |
| 83 | #define CONFIG_SYS_CBSIZE 256 |
| 84 | #define CONFIG_SYS_PBSIZE 256 |
| 85 | #define CONFIG_SYS_MAXARGS 16 |
| 86 | #define CONFIG_SYS_BARGSIZE 512 |
| 87 | #define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 } |
| 88 | |
| 89 | /* SCIF */ |
| 90 | #define CONFIG_SCIF_CONSOLE |
| 91 | #define CONFIG_CONS_SCIF0 |
| 92 | #define CONFIG_SCIF_USE_EXT_CLK |
| 93 | #undef CONFIG_SYS_CONSOLE_INFO_QUIET |
| 94 | #undef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 95 | #undef CONFIG_SYS_CONSOLE_ENV_OVERWRITE |
| 96 | |
| 97 | #define CONFIG_SYS_MEMTEST_START (GOSE_SDRAM_BASE) |
| 98 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \ |
| 99 | 504 * 1024 * 1024) |
| 100 | #undef CONFIG_SYS_ALT_MEMTEST |
| 101 | #undef CONFIG_SYS_MEMTEST_SCRATCH |
| 102 | #undef CONFIG_SYS_LOADS_BAUD_CHANGE |
| 103 | |
| 104 | #define CONFIG_SYS_SDRAM_BASE (GOSE_SDRAM_BASE) |
| 105 | #define CONFIG_SYS_SDRAM_SIZE (GOSE_UBOOT_SDRAM_SIZE) |
| 106 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fc0) |
| 107 | #define CONFIG_NR_DRAM_BANKS 1 |
| 108 | |
| 109 | #define CONFIG_SYS_MONITOR_BASE 0x00000000 |
| 110 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) |
| 111 | #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) |
| 112 | #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) |
| 113 | |
| 114 | /* FLASH */ |
| 115 | #define CONFIG_SYS_NO_FLASH |
| 116 | #define CONFIG_SPI |
| 117 | #define CONFIG_SH_QSPI |
| 118 | #define CONFIG_SPI_FLASH |
| 119 | #define CONFIG_SPI_FLASH_BAR |
| 120 | #define CONFIG_SPI_FLASH_SPANSION |
| 121 | /* ENV setting */ |
| 122 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 123 | #define CONFIG_ENV_ADDR 0xC0000 |
| 124 | |
| 125 | /* Common ENV setting */ |
| 126 | #define CONFIG_ENV_OVERWRITE |
| 127 | #define CONFIG_ENV_SECT_SIZE (256 * 1024) |
| 128 | #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) |
| 129 | #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) |
| 130 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN) |
| 131 | |
Nobuhiro Iwamatsu | f026124 | 2014-11-06 15:42:24 +0900 | [diff] [blame] | 132 | /* SH Ether */ |
| 133 | #define CONFIG_NET_MULTI |
| 134 | #define CONFIG_SH_ETHER |
| 135 | #define CONFIG_SH_ETHER_USE_PORT 0 |
| 136 | #define CONFIG_SH_ETHER_PHY_ADDR 0x1 |
| 137 | #define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII |
| 138 | #define CONFIG_SH_ETHER_CACHE_WRITEBACK |
| 139 | #define CONFIG_SH_ETHER_CACHE_INVALIDATE |
| 140 | #define CONFIG_PHYLIB |
| 141 | #define CONFIG_PHY_MICREL |
| 142 | #define CONFIG_BITBANGMII |
| 143 | #define CONFIG_BITBANGMII_MULTI |
| 144 | #define CONFIG_SH_ETHER_ALIGNE_SIZE 64 |
| 145 | |
Nobuhiro Iwamatsu | 6a994e5 | 2014-11-06 15:39:28 +0900 | [diff] [blame] | 146 | /* Board Clock */ |
| 147 | #define RMOBILE_XTAL_CLK 20000000u |
| 148 | #define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK |
| 149 | #define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) |
| 150 | #define CONFIG_SH_SCIF_CLK_FREQ 14745600 |
| 151 | #define CONFIG_SYS_TMU_CLK_DIV 4 |
| 152 | |
| 153 | /* I2C */ |
| 154 | #define CONFIG_SYS_I2C |
| 155 | #define CONFIG_SYS_I2C_SH |
| 156 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
| 157 | #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3 |
| 158 | #define CONFIG_SYS_I2C_SH_BASE0 0xE6500000 |
| 159 | #define CONFIG_SYS_I2C_SH_SPEED0 400000 |
| 160 | #define CONFIG_SYS_I2C_SH_BASE1 0xE6510000 |
| 161 | #define CONFIG_SYS_I2C_SH_SPEED1 400000 |
| 162 | #define CONFIG_SYS_I2C_SH_BASE2 0xE60B0000 |
| 163 | #define CONFIG_SYS_I2C_SH_SPEED2 400000 |
| 164 | #define CONFIG_SH_I2C_DATA_HIGH 4 |
| 165 | #define CONFIG_SH_I2C_DATA_LOW 5 |
| 166 | #define CONFIG_SH_I2C_CLOCK 10000000 |
| 167 | |
| 168 | #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ |
| 169 | |
Nobuhiro Iwamatsu | d3ee73f | 2014-11-06 15:42:25 +0900 | [diff] [blame^] | 170 | /* USB */ |
| 171 | #define CONFIG_USB_STORAGE |
| 172 | #define CONFIG_USB_EHCI |
| 173 | #define CONFIG_USB_EHCI_RMOBILE |
| 174 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 175 | |
Nobuhiro Iwamatsu | 6a994e5 | 2014-11-06 15:39:28 +0900 | [diff] [blame] | 176 | #endif /* __GOSE_H */ |