1ed09a554Srev13@wp.pl /* 2ed09a554Srev13@wp.pl * (C) Copyright 2015 3ed09a554Srev13@wp.pl * Kamil Lulko, <rev13@wp.pl> 4ed09a554Srev13@wp.pl * 5ed09a554Srev13@wp.pl * SPDX-License-Identifier: GPL-2.0+ 6ed09a554Srev13@wp.pl */ 7ed09a554Srev13@wp.pl 8ed09a554Srev13@wp.pl #ifndef __CONFIG_H 9ed09a554Srev13@wp.pl #define __CONFIG_H 10ed09a554Srev13@wp.pl 11ed09a554Srev13@wp.pl #define CONFIG_STM32F4 12ed09a554Srev13@wp.pl #define CONFIG_STM32F4DISCOVERY 13ed09a554Srev13@wp.pl #define CONFIG_SYS_GENERIC_BOARD 14ed09a554Srev13@wp.pl 15ed09a554Srev13@wp.pl #define CONFIG_OF_LIBFDT 16ed09a554Srev13@wp.pl 17ed09a554Srev13@wp.pl #define CONFIG_BOARD_EARLY_INIT_F 18ed09a554Srev13@wp.pl 19ed09a554Srev13@wp.pl #define CONFIG_SYS_FLASH_BASE 0x08000000 20ed09a554Srev13@wp.pl 21ed09a554Srev13@wp.pl #define CONFIG_SYS_INIT_SP_ADDR 0x10010000 22ed09a554Srev13@wp.pl #define CONFIG_SYS_TEXT_BASE 0x08000000 23ed09a554Srev13@wp.pl 24ed09a554Srev13@wp.pl #define CONFIG_SYS_ICACHE_OFF 25ed09a554Srev13@wp.pl #define CONFIG_SYS_DCACHE_OFF 26ed09a554Srev13@wp.pl 27ed09a554Srev13@wp.pl /* 28ed09a554Srev13@wp.pl * Configuration of the external SDRAM memory 29ed09a554Srev13@wp.pl */ 30ed09a554Srev13@wp.pl #define CONFIG_NR_DRAM_BANKS 1 31ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_SIZE (8 << 20) 32ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_CS 1 33ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_FREQ_DIV 2 34ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_BASE 0xD0000000 35ed09a554Srev13@wp.pl #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE 36ed09a554Srev13@wp.pl #define CONFIG_SYS_LOAD_ADDR 0xD0400000 37ed09a554Srev13@wp.pl #define CONFIG_LOADADDR 0xD0400000 38ed09a554Srev13@wp.pl 39ed09a554Srev13@wp.pl #define CONFIG_SYS_MAX_FLASH_SECT 12 40ed09a554Srev13@wp.pl #define CONFIG_SYS_MAX_FLASH_BANKS 2 41ed09a554Srev13@wp.pl 42ed09a554Srev13@wp.pl #define CONFIG_ENV_IS_IN_FLASH 43ed09a554Srev13@wp.pl #define CONFIG_ENV_OFFSET (256 << 10) 44ed09a554Srev13@wp.pl #define CONFIG_ENV_SECT_SIZE (128 << 10) 45ed09a554Srev13@wp.pl #define CONFIG_ENV_SIZE (8 << 10) 46ed09a554Srev13@wp.pl 47ed09a554Srev13@wp.pl #define CONFIG_BOARD_SPECIFIC_LED 48ed09a554Srev13@wp.pl #define CONFIG_RED_LED 110 49ed09a554Srev13@wp.pl #define CONFIG_GREEN_LED 109 50ed09a554Srev13@wp.pl 51ed09a554Srev13@wp.pl #define CONFIG_STM32_GPIO 52ed09a554Srev13@wp.pl #define CONFIG_STM32_SERIAL 53*60570df1Skunhuahuang /* 54*60570df1Skunhuahuang * Configuration of the USART 55*60570df1Skunhuahuang * 1: TX:PA9 PX:PA10 56*60570df1Skunhuahuang * 2: TX:PD5 RX:PD6 57*60570df1Skunhuahuang * 3: TX:PC10 RX:PC11 58*60570df1Skunhuahuang * 6: TX:PC6 RX:PC7 59*60570df1Skunhuahuang */ 60ed09a554Srev13@wp.pl #define CONFIG_STM32_USART 1 61ed09a554Srev13@wp.pl 62ed09a554Srev13@wp.pl #define CONFIG_STM32_HSE_HZ 8000000 63ed09a554Srev13@wp.pl 64ed09a554Srev13@wp.pl #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ 65ed09a554Srev13@wp.pl 66ed09a554Srev13@wp.pl #define CONFIG_CMDLINE_TAG 67ed09a554Srev13@wp.pl #define CONFIG_SETUP_MEMORY_TAGS 68ed09a554Srev13@wp.pl #define CONFIG_INITRD_TAG 69ed09a554Srev13@wp.pl #define CONFIG_REVISION_TAG 70ed09a554Srev13@wp.pl 71ed09a554Srev13@wp.pl #define CONFIG_SYS_CBSIZE 1024 72ed09a554Srev13@wp.pl #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ 73ed09a554Srev13@wp.pl + sizeof(CONFIG_SYS_PROMPT) + 16) 74ed09a554Srev13@wp.pl 75ed09a554Srev13@wp.pl #define CONFIG_SYS_MAXARGS 16 76ed09a554Srev13@wp.pl 77ed09a554Srev13@wp.pl #define CONFIG_SYS_MALLOC_LEN (2 << 20) 78ed09a554Srev13@wp.pl 79ed09a554Srev13@wp.pl #define CONFIG_STACKSIZE (64 << 10) 80ed09a554Srev13@wp.pl 81ed09a554Srev13@wp.pl #define CONFIG_BAUDRATE 115200 82ed09a554Srev13@wp.pl #define CONFIG_BOOTARGS \ 83ed09a554Srev13@wp.pl "console=ttystm0,115200 earlyprintk consoleblank=0 ignore_loglevel" 84ed09a554Srev13@wp.pl #define CONFIG_BOOTCOMMAND \ 85ed09a554Srev13@wp.pl "run bootcmd_romfs" 86ed09a554Srev13@wp.pl 87ed09a554Srev13@wp.pl #define CONFIG_EXTRA_ENV_SETTINGS \ 88ed09a554Srev13@wp.pl "bootargs_romfs=uclinux.physaddr=0x08180000 root=/dev/mtdblock0\0" \ 89ed09a554Srev13@wp.pl "bootcmd_romfs=setenv bootargs ${bootargs} ${bootargs_romfs};" \ 90ed09a554Srev13@wp.pl "bootm 0x08044000 - 0x08042000\0" 91ed09a554Srev13@wp.pl 92ed09a554Srev13@wp.pl #define CONFIG_BOOTDELAY 3 93ed09a554Srev13@wp.pl #define CONFIG_AUTOBOOT 94ed09a554Srev13@wp.pl 95ed09a554Srev13@wp.pl /* 96ed09a554Srev13@wp.pl * Command line configuration. 97ed09a554Srev13@wp.pl */ 98ed09a554Srev13@wp.pl #include <config_cmd_default.h> 99ed09a554Srev13@wp.pl 100ed09a554Srev13@wp.pl #define CONFIG_SYS_LONGHELP 101ed09a554Srev13@wp.pl #define CONFIG_SYS_HUSH_PARSER 102ed09a554Srev13@wp.pl #define CONFIG_SYS_PROMPT "U-Boot > " 103ed09a554Srev13@wp.pl #define CONFIG_AUTO_COMPLETE 104ed09a554Srev13@wp.pl #define CONFIG_CMDLINE_EDITING 105ed09a554Srev13@wp.pl 106ed09a554Srev13@wp.pl #define CONFIG_CMD_FLASH 107ed09a554Srev13@wp.pl #define CONFIG_CMD_SAVEENV 108ed09a554Srev13@wp.pl #define CONFIG_CMD_MEM 109ed09a554Srev13@wp.pl #define CONFIG_CMD_MISC 110ed09a554Srev13@wp.pl #define CONFIG_CMD_TIMER 111ed09a554Srev13@wp.pl 112ed09a554Srev13@wp.pl #endif /* __CONFIG_H */ 113