11251e490SNobuhiro Iwamatsu /* 21251e490SNobuhiro Iwamatsu * include/configs/koelsch.h 31251e490SNobuhiro Iwamatsu * 41251e490SNobuhiro Iwamatsu * Copyright (C) 2013 Renesas Electronics Corporation 51251e490SNobuhiro Iwamatsu * 61251e490SNobuhiro Iwamatsu * SPDX-License-Identifier: GPL-2.0 71251e490SNobuhiro Iwamatsu */ 81251e490SNobuhiro Iwamatsu 91251e490SNobuhiro Iwamatsu #ifndef __KOELSCH_H 101251e490SNobuhiro Iwamatsu #define __KOELSCH_H 111251e490SNobuhiro Iwamatsu 121251e490SNobuhiro Iwamatsu #undef DEBUG 131251e490SNobuhiro Iwamatsu #define CONFIG_ARMV7 141251e490SNobuhiro Iwamatsu #define CONFIG_R8A7791 151251e490SNobuhiro Iwamatsu #define CONFIG_RMOBILE 161251e490SNobuhiro Iwamatsu #define CONFIG_RMOBILE_BOARD_STRING "Koelsch" 171251e490SNobuhiro Iwamatsu #define CONFIG_SH_GPIO_PFC 181251e490SNobuhiro Iwamatsu 191251e490SNobuhiro Iwamatsu #include <asm/arch/rmobile.h> 201251e490SNobuhiro Iwamatsu 211251e490SNobuhiro Iwamatsu #define CONFIG_CMD_EDITENV 221251e490SNobuhiro Iwamatsu #define CONFIG_CMD_SAVEENV 231251e490SNobuhiro Iwamatsu #define CONFIG_CMD_MEMORY 241251e490SNobuhiro Iwamatsu #define CONFIG_CMD_DFL 251251e490SNobuhiro Iwamatsu #define CONFIG_CMD_SDRAM 261251e490SNobuhiro Iwamatsu #define CONFIG_CMD_RUN 271251e490SNobuhiro Iwamatsu #define CONFIG_CMD_LOADS 2890362c0cSNobuhiro Iwamatsu #define CONFIG_CMD_NET 2990362c0cSNobuhiro Iwamatsu #define CONFIG_CMD_MII 3090362c0cSNobuhiro Iwamatsu #define CONFIG_CMD_PING 3190362c0cSNobuhiro Iwamatsu #define CONFIG_CMD_DHCP 3290362c0cSNobuhiro Iwamatsu #define CONFIG_CMD_NFS 331251e490SNobuhiro Iwamatsu #define CONFIG_CMD_BOOTZ 34*c71b4dd2SNobuhiro Iwamatsu 35*c71b4dd2SNobuhiro Iwamatsu #if defined(CONFIG_SYS_USE_BOOT_NORFLASH) 361251e490SNobuhiro Iwamatsu #define CONFIG_CMD_FLASH 37*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SYS_TEXT_BASE 0x00000000 38*c71b4dd2SNobuhiro Iwamatsu #else 39*c71b4dd2SNobuhiro Iwamatsu /* SPI flash boot is default. */ 40*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_CMD_SF 41*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_CMD_SPI 42*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SYS_TEXT_BASE 0xE6304000 43*c71b4dd2SNobuhiro Iwamatsu #endif 441251e490SNobuhiro Iwamatsu 451251e490SNobuhiro Iwamatsu #define CONFIG_CMDLINE_TAG 461251e490SNobuhiro Iwamatsu #define CONFIG_SETUP_MEMORY_TAGS 471251e490SNobuhiro Iwamatsu #define CONFIG_INITRD_TAG 481251e490SNobuhiro Iwamatsu #define CONFIG_CMDLINE_EDITING 491251e490SNobuhiro Iwamatsu 501251e490SNobuhiro Iwamatsu #define CONFIG_OF_LIBFDT 511251e490SNobuhiro Iwamatsu #define BOARD_LATE_INIT 521251e490SNobuhiro Iwamatsu 531251e490SNobuhiro Iwamatsu #define CONFIG_BAUDRATE 38400 541251e490SNobuhiro Iwamatsu #define CONFIG_BOOTDELAY 3 551251e490SNobuhiro Iwamatsu #define CONFIG_BOOTARGS "" 561251e490SNobuhiro Iwamatsu 571251e490SNobuhiro Iwamatsu #define CONFIG_VERSION_VARIABLE 581251e490SNobuhiro Iwamatsu #undef CONFIG_SHOW_BOOT_PROGRESS 591251e490SNobuhiro Iwamatsu 601251e490SNobuhiro Iwamatsu #define CONFIG_ARCH_CPU_INIT 611251e490SNobuhiro Iwamatsu #define CONFIG_DISPLAY_CPUINFO 621251e490SNobuhiro Iwamatsu #define CONFIG_DISPLAY_BOARDINFO 631251e490SNobuhiro Iwamatsu #define CONFIG_BOARD_EARLY_INIT_F 641251e490SNobuhiro Iwamatsu #define CONFIG_USE_ARCH_MEMSET 651251e490SNobuhiro Iwamatsu #define CONFIG_USE_ARCH_MEMCPY 661251e490SNobuhiro Iwamatsu #define CONFIG_TMU_TIMER 671251e490SNobuhiro Iwamatsu 681251e490SNobuhiro Iwamatsu /* STACK */ 691251e490SNobuhiro Iwamatsu #define CONFIG_SYS_INIT_SP_ADDR 0xE633fffc 701251e490SNobuhiro Iwamatsu #define STACK_AREA_SIZE 0xC000 711251e490SNobuhiro Iwamatsu #define LOW_LEVEL_MERAM_STACK \ 721251e490SNobuhiro Iwamatsu (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4) 731251e490SNobuhiro Iwamatsu 741251e490SNobuhiro Iwamatsu /* MEMORY */ 751251e490SNobuhiro Iwamatsu #define KOELSCH_SDRAM_BASE 0x40000000 761251e490SNobuhiro Iwamatsu #define KOELSCH_SDRAM_SIZE (2048u * 1024 * 1024) 771251e490SNobuhiro Iwamatsu #define KOELSCH_UBOOT_SDRAM_SIZE (512 * 1024 * 1024) 781251e490SNobuhiro Iwamatsu 791251e490SNobuhiro Iwamatsu #define CONFIG_SYS_LONGHELP 801251e490SNobuhiro Iwamatsu #define CONFIG_SYS_CBSIZE 256 811251e490SNobuhiro Iwamatsu #define CONFIG_SYS_PBSIZE 256 821251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MAXARGS 16 831251e490SNobuhiro Iwamatsu #define CONFIG_SYS_BARGSIZE 512 841251e490SNobuhiro Iwamatsu #define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 } 851251e490SNobuhiro Iwamatsu 861251e490SNobuhiro Iwamatsu /* SCIF */ 871251e490SNobuhiro Iwamatsu #define CONFIG_SCIF_CONSOLE 881251e490SNobuhiro Iwamatsu #define CONFIG_CONS_SCIF0 891251e490SNobuhiro Iwamatsu #define SCIF0_BASE 0xe6e60000 901251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_CONSOLE_INFO_QUIET 911251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 921251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_CONSOLE_ENV_OVERWRITE 931251e490SNobuhiro Iwamatsu 941251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MEMTEST_START (KOELSCH_SDRAM_BASE) 951251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \ 961251e490SNobuhiro Iwamatsu 504 * 1024 * 1024) 971251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_ALT_MEMTEST 981251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_MEMTEST_SCRATCH 991251e490SNobuhiro Iwamatsu #undef CONFIG_SYS_LOADS_BAUD_CHANGE 1001251e490SNobuhiro Iwamatsu 1011251e490SNobuhiro Iwamatsu #define CONFIG_SYS_SDRAM_BASE (KOELSCH_SDRAM_BASE) 1021251e490SNobuhiro Iwamatsu #define CONFIG_SYS_SDRAM_SIZE (KOELSCH_UBOOT_SDRAM_SIZE) 1031251e490SNobuhiro Iwamatsu #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fc0) 1041251e490SNobuhiro Iwamatsu #define CONFIG_NR_DRAM_BANKS 1 1051251e490SNobuhiro Iwamatsu 1061251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MONITOR_BASE 0x00000000 1071251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MONITOR_LEN (256 * 1024) 1081251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) 1091251e490SNobuhiro Iwamatsu #define CONFIG_SYS_GBL_DATA_SIZE (256) 1101251e490SNobuhiro Iwamatsu #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) 1111251e490SNobuhiro Iwamatsu 1121251e490SNobuhiro Iwamatsu /* FLASH */ 113*c71b4dd2SNobuhiro Iwamatsu #if defined(CONFIG_SYS_USE_BOOT_NORFLASH) 1141251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_CFI 1151251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT 1161251e490SNobuhiro Iwamatsu #define CONFIG_FLASH_CFI_DRIVER 1171251e490SNobuhiro Iwamatsu #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS 1181251e490SNobuhiro Iwamatsu #define CONFIG_FLASH_SHOW_PROGRESS 45 1191251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_BASE 0x00000000 1201251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_SIZE 0x04000000 /* 64 MB */ 1211251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MAX_FLASH_SECT 1024 1221251e490SNobuhiro Iwamatsu #define CONFIG_SYS_MAX_FLASH_BANKS 1 1231251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_BANKS_LIST { (CONFIG_SYS_FLASH_BASE) } 1241251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_BANKS_SIZES { (CONFIG_SYS_FLASH_SIZE) } 1251251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_ERASE_TOUT 3000 1261251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_WRITE_TOUT 3000 1271251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_LOCK_TOUT 3000 1281251e490SNobuhiro Iwamatsu #define CONFIG_SYS_FLASH_UNLOCK_TOUT 3000 1291251e490SNobuhiro Iwamatsu /* ENV setting */ 1301251e490SNobuhiro Iwamatsu #define CONFIG_ENV_IS_IN_FLASH 1311251e490SNobuhiro Iwamatsu #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + \ 1321251e490SNobuhiro Iwamatsu CONFIG_SYS_MONITOR_LEN) 133*c71b4dd2SNobuhiro Iwamatsu 134*c71b4dd2SNobuhiro Iwamatsu #else /* CONFIG_SYS_USE_BOOT_NORFLASH */ 135*c71b4dd2SNobuhiro Iwamatsu 136*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SYS_NO_FLASH 137*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SPI 138*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SH_QSPI 139*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SPI_FLASH 140*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SPI_FLASH_BAR 141*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_SPI_FLASH_SPANSION 142*c71b4dd2SNobuhiro Iwamatsu /* ENV setting */ 143*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_ENV_IS_IN_SPI_FLASH 144*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_ENV_ADDR 0xC0000 145*c71b4dd2SNobuhiro Iwamatsu 146*c71b4dd2SNobuhiro Iwamatsu #endif /* CONFIG_SYS_USE_BOOT_NORFLASH */ 147*c71b4dd2SNobuhiro Iwamatsu 148*c71b4dd2SNobuhiro Iwamatsu /* Common ENV setting */ 149*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_ENV_OVERWRITE 150*c71b4dd2SNobuhiro Iwamatsu #define CONFIG_ENV_SECT_SIZE (256 * 1024) 1511251e490SNobuhiro Iwamatsu #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) 1521251e490SNobuhiro Iwamatsu #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) 1531251e490SNobuhiro Iwamatsu #define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN) 1541251e490SNobuhiro Iwamatsu 15590362c0cSNobuhiro Iwamatsu /* SH Ether */ 15690362c0cSNobuhiro Iwamatsu #define CONFIG_NET_MULTI 15790362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER 15890362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_USE_PORT 0 15990362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_PHY_ADDR 0x1 16090362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII 16190362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_CACHE_WRITEBACK 16290362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_CACHE_INVALIDATE 16390362c0cSNobuhiro Iwamatsu #define CONFIG_PHYLIB 16490362c0cSNobuhiro Iwamatsu #define CONFIG_PHY_MICREL 16590362c0cSNobuhiro Iwamatsu #define CONFIG_BITBANGMII 16690362c0cSNobuhiro Iwamatsu #define CONFIG_BITBANGMII_MULTI 16790362c0cSNobuhiro Iwamatsu #define CONFIG_SH_ETHER_ALIGNE_SIZE 64 16890362c0cSNobuhiro Iwamatsu 1691251e490SNobuhiro Iwamatsu /* Board Clock */ 1701251e490SNobuhiro Iwamatsu #define CONFIG_SYS_CLK_FREQ 10000000 1711251e490SNobuhiro Iwamatsu #define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ 1721251e490SNobuhiro Iwamatsu #define CONFIG_SH_SCIF_CLK_FREQ 14745600 1731251e490SNobuhiro Iwamatsu #define CONFIG_SYS_TMU_CLK_DIV 4 1741251e490SNobuhiro Iwamatsu #define CONFIG_SYS_HZ 1000 1751251e490SNobuhiro Iwamatsu 176bb611cceSNobuhiro Iwamatsu /* i2c */ 177bb611cceSNobuhiro Iwamatsu #define CONFIG_CMD_I2C 178bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C 179bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH 180bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SLAVE 0x7F 181bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3 182bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_BASE0 0xE6500000 183bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_SPEED0 400000 184bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_BASE1 0xE6510000 185bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_SPEED1 400000 186bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_BASE2 0xE60B0000 187bb611cceSNobuhiro Iwamatsu #define CONFIG_SYS_I2C_SH_SPEED2 400000 188bb611cceSNobuhiro Iwamatsu #define CONFIG_SH_I2C_DATA_HIGH 4 189bb611cceSNobuhiro Iwamatsu #define CONFIG_SH_I2C_DATA_LOW 5 190bb611cceSNobuhiro Iwamatsu #define CONFIG_SH_I2C_CLOCK 10000000 191bb611cceSNobuhiro Iwamatsu 192b8f383b8SNobuhiro Iwamatsu #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ 193b8f383b8SNobuhiro Iwamatsu 1941251e490SNobuhiro Iwamatsu #endif /* __KOELSCH_H */ 195