Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 1 | /* |
| 2 | * include/configs/alt.h |
| 3 | * This file is alt board configuration. |
| 4 | * |
| 5 | * Copyright (C) 2014 Renesas Electronics Corporation |
| 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0 |
| 8 | */ |
| 9 | |
| 10 | #ifndef __ALT_H |
| 11 | #define __ALT_H |
| 12 | |
| 13 | #undef DEBUG |
| 14 | #define CONFIG_ARMV7 |
| 15 | #define CONFIG_R8A7794 |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 16 | #define CONFIG_RMOBILE_BOARD_STRING "Alt" |
| 17 | #define CONFIG_SH_GPIO_PFC |
| 18 | |
| 19 | #include <asm/arch/rmobile.h> |
| 20 | |
| 21 | #define CONFIG_CMD_EDITENV |
| 22 | #define CONFIG_CMD_SAVEENV |
| 23 | #define CONFIG_CMD_MEMORY |
| 24 | #define CONFIG_CMD_DFL |
| 25 | #define CONFIG_CMD_SDRAM |
| 26 | #define CONFIG_CMD_RUN |
| 27 | #define CONFIG_CMD_LOADS |
| 28 | #define CONFIG_CMD_NET |
| 29 | #define CONFIG_CMD_MII |
| 30 | #define CONFIG_CMD_PING |
| 31 | #define CONFIG_CMD_DHCP |
| 32 | #define CONFIG_CMD_NFS |
| 33 | #define CONFIG_CMD_BOOTZ |
Nobuhiro Iwamatsu | 7ffc8df | 2014-10-31 16:30:26 +0900 | [diff] [blame] | 34 | #define CONFIG_CMD_USB |
Nobuhiro Iwamatsu | 9cb8d9d | 2014-10-31 16:30:27 +0900 | [diff] [blame] | 35 | #define CONFIG_CMD_FAT |
| 36 | #define CONFIG_FAT_WRITE |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 37 | #define CONFIG_CMD_SF |
| 38 | #define CONFIG_CMD_SPI |
| 39 | |
Nobuhiro Iwamatsu | c9b59bf | 2014-10-31 16:16:28 +0900 | [diff] [blame] | 40 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 41 | #define CONFIG_SYS_TEXT_BASE 0x70000000 |
| 42 | #else |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 43 | #define CONFIG_SYS_TEXT_BASE 0xE6304000 |
Nobuhiro Iwamatsu | c9b59bf | 2014-10-31 16:16:28 +0900 | [diff] [blame] | 44 | #endif |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 45 | #define CONFIG_SYS_THUMB_BUILD |
| 46 | #define CONFIG_SYS_GENERIC_BOARD |
| 47 | |
| 48 | #define CONFIG_CMDLINE_TAG |
| 49 | #define CONFIG_SETUP_MEMORY_TAGS |
| 50 | #define CONFIG_INITRD_TAG |
| 51 | #define CONFIG_CMDLINE_EDITING |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 52 | #define CONFIG_OF_LIBFDT |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 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 | |
Nobuhiro Iwamatsu | c9b59bf | 2014-10-31 16:16:28 +0900 | [diff] [blame] | 67 | #if defined(CONFIG_RMOBILE_EXTRAM_BOOT) |
| 68 | #define CONFIG_SYS_INIT_SP_ADDR 0x7003FFFC |
| 69 | #else |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 70 | #define CONFIG_SYS_INIT_SP_ADDR 0xE633FFFC |
Nobuhiro Iwamatsu | c9b59bf | 2014-10-31 16:16:28 +0900 | [diff] [blame] | 71 | #endif |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 72 | #define STACK_AREA_SIZE 0xC000 |
| 73 | #define LOW_LEVEL_MERAM_STACK \ |
| 74 | (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4) |
| 75 | |
| 76 | /* MEMORY */ |
| 77 | #define ALT_SDRAM_BASE 0x40000000 |
| 78 | #define ALT_SDRAM_SIZE (1024u * 1024 * 1024) |
| 79 | #define ALT_UBOOT_SDRAM_SIZE (512 * 1024 * 1024) |
| 80 | |
| 81 | #define CONFIG_SYS_LONGHELP |
| 82 | #define CONFIG_SYS_CBSIZE 256 |
| 83 | #define CONFIG_SYS_PBSIZE 256 |
| 84 | #define CONFIG_SYS_MAXARGS 16 |
| 85 | #define CONFIG_SYS_BARGSIZE 512 |
| 86 | #define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 } |
| 87 | |
| 88 | /* SCIF */ |
| 89 | #define CONFIG_SCIF_CONSOLE |
| 90 | #define CONFIG_CONS_SCIF2 |
Nobuhiro Iwamatsu | 62b571a | 2014-11-10 14:43:59 +0900 | [diff] [blame^] | 91 | #define CONFIG_SCIF_USE_EXT_CLK |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 92 | #undef CONFIG_SYS_CONSOLE_INFO_QUIET |
| 93 | #undef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 94 | #undef CONFIG_SYS_CONSOLE_ENV_OVERWRITE |
| 95 | |
| 96 | #define CONFIG_SYS_MEMTEST_START (ALT_SDRAM_BASE) |
| 97 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \ |
| 98 | 504 * 1024 * 1024) |
| 99 | #undef CONFIG_SYS_ALT_MEMTEST |
| 100 | #undef CONFIG_SYS_MEMTEST_SCRATCH |
| 101 | #undef CONFIG_SYS_LOADS_BAUD_CHANGE |
| 102 | |
| 103 | #define CONFIG_SYS_SDRAM_BASE (ALT_SDRAM_BASE) |
| 104 | #define CONFIG_SYS_SDRAM_SIZE (ALT_UBOOT_SDRAM_SIZE) |
| 105 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fc0) |
| 106 | #define CONFIG_NR_DRAM_BANKS 1 |
| 107 | |
| 108 | #define CONFIG_SYS_MONITOR_BASE 0x00000000 |
| 109 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) |
| 110 | #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) |
| 111 | #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) |
| 112 | |
| 113 | /* FLASH */ |
| 114 | #define CONFIG_SPI |
| 115 | #define CONFIG_SPI_FLASH_BAR |
| 116 | #define CONFIG_SH_QSPI |
| 117 | #define CONFIG_SPI_FLASH |
| 118 | #define CONFIG_SPI_FLASH_SPANSION |
| 119 | #define CONFIG_SPI_FLASH_QUAD |
| 120 | #define CONFIG_SYS_NO_FLASH |
| 121 | |
| 122 | /* ENV setting */ |
| 123 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 124 | #define CONFIG_ENV_SECT_SIZE (256 * 1024) |
| 125 | #define CONFIG_ENV_ADDR 0xC0000 |
| 126 | #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) |
| 127 | #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) |
| 128 | |
| 129 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 130 | "bootm_low=0x40e00000\0" \ |
| 131 | "bootm_size=0x100000\0" \ |
| 132 | |
| 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_SH_ETHER_ALIGNE_SIZE 64 |
| 142 | #define CONFIG_PHYLIB |
| 143 | #define CONFIG_PHY_MICREL |
| 144 | #define CONFIG_BITBANGMII |
| 145 | #define CONFIG_BITBANGMII_MULTI |
| 146 | |
| 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) /* EXT / 2 */ |
| 151 | #define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 156 / 2) |
| 152 | #define CONFIG_P_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 24) |
Nobuhiro Iwamatsu | 62b571a | 2014-11-10 14:43:59 +0900 | [diff] [blame^] | 153 | #define CONFIG_SH_SCIF_CLK_FREQ 14745600 /* External Clock */ |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 154 | |
| 155 | #define CONFIG_SYS_TMU_CLK_DIV 4 |
| 156 | |
| 157 | /* i2c */ |
| 158 | #define CONFIG_CMD_I2C |
| 159 | #define CONFIG_SYS_I2C |
| 160 | #define CONFIG_SYS_I2C_SH |
| 161 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
| 162 | #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3 |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 163 | #define CONFIG_SYS_I2C_SH_SPEED0 400000 |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 164 | #define CONFIG_SYS_I2C_SH_SPEED1 400000 |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 165 | #define CONFIG_SYS_I2C_SH_SPEED2 400000 |
| 166 | #define CONFIG_SH_I2C_DATA_HIGH 4 |
| 167 | #define CONFIG_SH_I2C_DATA_LOW 5 |
| 168 | #define CONFIG_SH_I2C_CLOCK 10000000 |
| 169 | |
| 170 | #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ |
| 171 | |
Nobuhiro Iwamatsu | 9cb8d9d | 2014-10-31 16:30:27 +0900 | [diff] [blame] | 172 | /* Filesystems */ |
| 173 | #define CONFIG_DOS_PARTITION |
| 174 | #define CONFIG_SUPPORT_VFAT |
| 175 | |
Nobuhiro Iwamatsu | 7ffc8df | 2014-10-31 16:30:26 +0900 | [diff] [blame] | 176 | /* USB */ |
| 177 | #define CONFIG_USB_STORAGE |
| 178 | #define CONFIG_USB_EHCI |
| 179 | #define CONFIG_USB_EHCI_RMOBILE |
| 180 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 181 | |
Nobuhiro Iwamatsu | cff2f5f | 2014-06-26 10:23:30 +0900 | [diff] [blame] | 182 | #endif /* __ALT_H */ |