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 18*089fddfdSAntonio Borneo #define CONFIG_MISC_INIT_R 19ed09a554Srev13@wp.pl 20ed09a554Srev13@wp.pl #define CONFIG_SYS_FLASH_BASE 0x08000000 21ed09a554Srev13@wp.pl 22ed09a554Srev13@wp.pl #define CONFIG_SYS_INIT_SP_ADDR 0x10010000 23ed09a554Srev13@wp.pl #define CONFIG_SYS_TEXT_BASE 0x08000000 24ed09a554Srev13@wp.pl 25ed09a554Srev13@wp.pl #define CONFIG_SYS_ICACHE_OFF 26ed09a554Srev13@wp.pl #define CONFIG_SYS_DCACHE_OFF 27ed09a554Srev13@wp.pl 28ed09a554Srev13@wp.pl /* 29ed09a554Srev13@wp.pl * Configuration of the external SDRAM memory 30ed09a554Srev13@wp.pl */ 31ed09a554Srev13@wp.pl #define CONFIG_NR_DRAM_BANKS 1 32ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_SIZE (8 << 20) 33ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_CS 1 34ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_FREQ_DIV 2 35ed09a554Srev13@wp.pl #define CONFIG_SYS_RAM_BASE 0xD0000000 36ed09a554Srev13@wp.pl #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE 37ed09a554Srev13@wp.pl #define CONFIG_SYS_LOAD_ADDR 0xD0400000 38ed09a554Srev13@wp.pl #define CONFIG_LOADADDR 0xD0400000 39ed09a554Srev13@wp.pl 40ed09a554Srev13@wp.pl #define CONFIG_SYS_MAX_FLASH_SECT 12 41ed09a554Srev13@wp.pl #define CONFIG_SYS_MAX_FLASH_BANKS 2 42ed09a554Srev13@wp.pl 43ed09a554Srev13@wp.pl #define CONFIG_ENV_IS_IN_FLASH 44ed09a554Srev13@wp.pl #define CONFIG_ENV_OFFSET (256 << 10) 45ed09a554Srev13@wp.pl #define CONFIG_ENV_SECT_SIZE (128 << 10) 46ed09a554Srev13@wp.pl #define CONFIG_ENV_SIZE (8 << 10) 47ed09a554Srev13@wp.pl 48ed09a554Srev13@wp.pl #define CONFIG_BOARD_SPECIFIC_LED 49ed09a554Srev13@wp.pl #define CONFIG_RED_LED 110 50ed09a554Srev13@wp.pl #define CONFIG_GREEN_LED 109 51ed09a554Srev13@wp.pl 52ed09a554Srev13@wp.pl #define CONFIG_STM32_GPIO 53ed09a554Srev13@wp.pl #define CONFIG_STM32_SERIAL 5460570df1Skunhuahuang /* 5560570df1Skunhuahuang * Configuration of the USART 566f921eccSAntonio Borneo * 1: TX:PA9 RX:PA10 5760570df1Skunhuahuang * 2: TX:PD5 RX:PD6 5860570df1Skunhuahuang * 3: TX:PC10 RX:PC11 5903514739SAntonio Borneo * 6: TX:PG14 RX:PG9 6060570df1Skunhuahuang */ 61ed09a554Srev13@wp.pl #define CONFIG_STM32_USART 1 62ed09a554Srev13@wp.pl 63ed09a554Srev13@wp.pl #define CONFIG_STM32_HSE_HZ 8000000 64ed09a554Srev13@wp.pl 65ed09a554Srev13@wp.pl #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ 66ed09a554Srev13@wp.pl 67ed09a554Srev13@wp.pl #define CONFIG_CMDLINE_TAG 68ed09a554Srev13@wp.pl #define CONFIG_SETUP_MEMORY_TAGS 69ed09a554Srev13@wp.pl #define CONFIG_INITRD_TAG 70ed09a554Srev13@wp.pl #define CONFIG_REVISION_TAG 71ed09a554Srev13@wp.pl 72ed09a554Srev13@wp.pl #define CONFIG_SYS_CBSIZE 1024 73ed09a554Srev13@wp.pl #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ 74ed09a554Srev13@wp.pl + sizeof(CONFIG_SYS_PROMPT) + 16) 75ed09a554Srev13@wp.pl 76ed09a554Srev13@wp.pl #define CONFIG_SYS_MAXARGS 16 77ed09a554Srev13@wp.pl 78ed09a554Srev13@wp.pl #define CONFIG_SYS_MALLOC_LEN (2 << 20) 79ed09a554Srev13@wp.pl 80ed09a554Srev13@wp.pl #define CONFIG_STACKSIZE (64 << 10) 81ed09a554Srev13@wp.pl 82ed09a554Srev13@wp.pl #define CONFIG_BAUDRATE 115200 83ed09a554Srev13@wp.pl #define CONFIG_BOOTARGS \ 846b330568Srev13@wp.pl "console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" 85ed09a554Srev13@wp.pl #define CONFIG_BOOTCOMMAND \ 86ed09a554Srev13@wp.pl "run bootcmd_romfs" 87ed09a554Srev13@wp.pl 88ed09a554Srev13@wp.pl #define CONFIG_EXTRA_ENV_SETTINGS \ 89ed09a554Srev13@wp.pl "bootargs_romfs=uclinux.physaddr=0x08180000 root=/dev/mtdblock0\0" \ 90ed09a554Srev13@wp.pl "bootcmd_romfs=setenv bootargs ${bootargs} ${bootargs_romfs};" \ 91ed09a554Srev13@wp.pl "bootm 0x08044000 - 0x08042000\0" 92ed09a554Srev13@wp.pl 93ed09a554Srev13@wp.pl #define CONFIG_BOOTDELAY 3 94ed09a554Srev13@wp.pl #define CONFIG_AUTOBOOT 95ed09a554Srev13@wp.pl 96ed09a554Srev13@wp.pl /* 97ed09a554Srev13@wp.pl * Command line configuration. 98ed09a554Srev13@wp.pl */ 99ed09a554Srev13@wp.pl #define CONFIG_SYS_LONGHELP 100ed09a554Srev13@wp.pl #define CONFIG_SYS_HUSH_PARSER 101ed09a554Srev13@wp.pl #define CONFIG_SYS_PROMPT "U-Boot > " 102ed09a554Srev13@wp.pl #define CONFIG_AUTO_COMPLETE 103ed09a554Srev13@wp.pl #define CONFIG_CMDLINE_EDITING 104ed09a554Srev13@wp.pl 105ed09a554Srev13@wp.pl #define CONFIG_CMD_MEM 106ed09a554Srev13@wp.pl #define CONFIG_CMD_TIMER 107ed09a554Srev13@wp.pl 108ed09a554Srev13@wp.pl #endif /* __CONFIG_H */ 109