183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 22ac07f75SDavid Lechner /* 32ac07f75SDavid Lechner * Copyright (C) 2016 David Lechner <david@lechnology.com> 42ac07f75SDavid Lechner * 52ac07f75SDavid Lechner * Based on da850evm.h 62ac07f75SDavid Lechner * 72ac07f75SDavid Lechner * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ 82ac07f75SDavid Lechner * 92ac07f75SDavid Lechner * Based on davinci_dvevm.h. Original Copyrights follow: 102ac07f75SDavid Lechner * 112ac07f75SDavid Lechner * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> 122ac07f75SDavid Lechner */ 132ac07f75SDavid Lechner 142ac07f75SDavid Lechner #ifndef __CONFIG_H 152ac07f75SDavid Lechner #define __CONFIG_H 162ac07f75SDavid Lechner 172ac07f75SDavid Lechner /* 182ac07f75SDavid Lechner * SoC Configuration 192ac07f75SDavid Lechner */ 202ac07f75SDavid Lechner #define CONFIG_SYS_EXCEPTION_VECTORS_HIGH 212ac07f75SDavid Lechner #define CONFIG_SYS_CLK_FREQ clk_get(DAVINCI_ARM_CLKID) 222ac07f75SDavid Lechner #define CONFIG_SYS_OSCIN_FREQ 24000000 232ac07f75SDavid Lechner #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE 242ac07f75SDavid Lechner #define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) 252ac07f75SDavid Lechner 262ac07f75SDavid Lechner /* 272ac07f75SDavid Lechner * Memory Info 282ac07f75SDavid Lechner */ 292ac07f75SDavid Lechner #define CONFIG_SYS_MALLOC_LEN (0x10000 + 1*1024*1024) /* malloc() len */ 302ac07f75SDavid Lechner #define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */ 312ac07f75SDavid Lechner #define PHYS_SDRAM_1_SIZE (64 << 20) /* SDRAM size 64MB */ 322ac07f75SDavid Lechner #define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/ 332ac07f75SDavid Lechner 342ac07f75SDavid Lechner /* memtest start addr */ 352ac07f75SDavid Lechner #define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1 + 0x2000000) 362ac07f75SDavid Lechner 372ac07f75SDavid Lechner /* memtest will be run on 16MB */ 382ac07f75SDavid Lechner #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024) 392ac07f75SDavid Lechner 402ac07f75SDavid Lechner /* 412ac07f75SDavid Lechner * Serial Driver info 422ac07f75SDavid Lechner */ 432ac07f75SDavid Lechner #define CONFIG_SYS_NS16550_SERIAL 442ac07f75SDavid Lechner #define CONFIG_SYS_NS16550_REG_SIZE -4 /* NS16550 register size */ 452ac07f75SDavid Lechner #define CONFIG_SYS_NS16550_COM1 DAVINCI_UART1_BASE /* Base address of UART1 */ 462ac07f75SDavid Lechner #define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) 472ac07f75SDavid Lechner 482ac07f75SDavid Lechner #define CONFIG_SYS_SPI_BASE DAVINCI_SPI0_BASE 492ac07f75SDavid Lechner #define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI0_CLKID) 502ac07f75SDavid Lechner 512ac07f75SDavid Lechner /* 522ac07f75SDavid Lechner * I2C Configuration 532ac07f75SDavid Lechner */ 542ac07f75SDavid Lechner #define CONFIG_SYS_I2C 552ac07f75SDavid Lechner #define CONFIG_SYS_DAVINCI_I2C_SPEED 400000 562ac07f75SDavid Lechner #define CONFIG_SYS_DAVINCI_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ 572ac07f75SDavid Lechner 582ac07f75SDavid Lechner /* 592ac07f75SDavid Lechner * U-Boot general configuration 602ac07f75SDavid Lechner */ 612ac07f75SDavid Lechner #define CONFIG_BOOTFILE "uImage" /* Boot file name */ 622ac07f75SDavid Lechner #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ 632ac07f75SDavid Lechner #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */ 642ac07f75SDavid Lechner #define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1 + 0x700000) 652ac07f75SDavid Lechner #define CONFIG_MX_CYCLIC 662ac07f75SDavid Lechner 672ac07f75SDavid Lechner /* 682ac07f75SDavid Lechner * Linux Information 692ac07f75SDavid Lechner */ 702ac07f75SDavid Lechner #define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100) 712ac07f75SDavid Lechner #define CONFIG_HWCONFIG /* enable hwconfig */ 722ac07f75SDavid Lechner #define CONFIG_CMDLINE_TAG 732ac07f75SDavid Lechner #define CONFIG_REVISION_TAG 742ac07f75SDavid Lechner #define CONFIG_SERIAL_TAG 752ac07f75SDavid Lechner #define CONFIG_SETUP_MEMORY_TAGS 762ac07f75SDavid Lechner #define CONFIG_SETUP_INITRD_TAG 772ac07f75SDavid Lechner #define CONFIG_BOOTCOMMAND \ 782ac07f75SDavid Lechner "if mmc rescan; then " \ 792ac07f75SDavid Lechner "if run loadbootscr; then " \ 802ac07f75SDavid Lechner "run bootscript; " \ 812ac07f75SDavid Lechner "else " \ 82*f203a479SDavid Lechner "if run loadbootenv; then " \ 83*f203a479SDavid Lechner "echo Loaded env from ${bootenvfile};" \ 84*f203a479SDavid Lechner "run importbootenv;" \ 85*f203a479SDavid Lechner "fi;" \ 86*f203a479SDavid Lechner "if test -n $uenvcmd; then " \ 87*f203a479SDavid Lechner "echo Running uenvcmd...;" \ 88*f203a479SDavid Lechner "run uenvcmd;" \ 89*f203a479SDavid Lechner "fi;" \ 902ac07f75SDavid Lechner "if run loadimage; then " \ 912ac07f75SDavid Lechner "run mmcargs; " \ 92*f203a479SDavid Lechner "if run loadfdt; then " \ 93*f203a479SDavid Lechner "echo Using ${fdtfile}...;" \ 94*f203a479SDavid Lechner "run fdtfixup; " \ 95*f203a479SDavid Lechner "run fdtboot; "\ 96*f203a479SDavid Lechner "fi; " \ 972ac07f75SDavid Lechner "run mmcboot; " \ 982ac07f75SDavid Lechner "fi; " \ 992ac07f75SDavid Lechner "fi; " \ 100*f203a479SDavid Lechner "fi; "\ 1012ac07f75SDavid Lechner "run flashargs; " \ 102*f203a479SDavid Lechner "run flashboot" 1032ac07f75SDavid Lechner #define CONFIG_EXTRA_ENV_SETTINGS \ 104*f203a479SDavid Lechner "bootenvfile=uEnv.txt\0" \ 105*f203a479SDavid Lechner "fdtfile=da850-lego-ev3.dtb\0" \ 1062ac07f75SDavid Lechner "memsize=64M\0" \ 1072ac07f75SDavid Lechner "filesyssize=10M\0" \ 1082ac07f75SDavid Lechner "verify=n\0" \ 1092ac07f75SDavid Lechner "console=ttyS1,115200n8\0" \ 1102ac07f75SDavid Lechner "bootscraddr=0xC0600000\0" \ 111*f203a479SDavid Lechner "fdtaddr=0xC0600000\0" \ 1122ac07f75SDavid Lechner "loadaddr=0xC0007FC0\0" \ 1132ac07f75SDavid Lechner "filesysaddr=0xC1180000\0" \ 1142ac07f75SDavid Lechner "fwupdateboot=mw 0xFFFF1FFC 0x5555AAAA; reset\0" \ 115*f203a479SDavid Lechner "importbootenv=echo Importing environment...; " \ 116*f203a479SDavid Lechner "env import -t ${loadaddr} ${filesize}\0" \ 117*f203a479SDavid Lechner "loadbootenv=fatload mmc 0 ${loadaddr} ${bootenvfile}\0" \ 118*f203a479SDavid Lechner "mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rw " \ 119*f203a479SDavid Lechner "rootwait ${optargs}\0" \ 1202ac07f75SDavid Lechner "mmcboot=bootm ${loadaddr}\0" \ 121*f203a479SDavid Lechner "flashargs=setenv bootargs initrd=${filesysaddr},${filesyssize} " \ 122*f203a479SDavid Lechner "root=/dev/ram0 rw rootfstype=squashfs console=${console} " \ 123*f203a479SDavid Lechner "${optargs}\0" \ 124*f203a479SDavid Lechner "flashboot=sf probe 0; " \ 125*f203a479SDavid Lechner "sf read ${fdtaddr} 0x40000 0x10000; " \ 126*f203a479SDavid Lechner "sf read ${loadaddr} 0x50000 0x400000; " \ 127*f203a479SDavid Lechner "sf read ${filesysaddr} 0x450000 0xA00000; " \ 128*f203a479SDavid Lechner "run fdtfixup; " \ 129*f203a479SDavid Lechner "run fdtboot\0" \ 1302ac07f75SDavid Lechner "loadimage=fatload mmc 0 ${loadaddr} uImage\0" \ 131*f203a479SDavid Lechner "loadfdt=fatload mmc 0 ${fdtaddr} ${fdtfile}\0" \ 132*f203a479SDavid Lechner "fdtfixup=fdt addr ${fdtaddr}; fdt resize; fdt chosen\0" \ 133*f203a479SDavid Lechner "fdtboot=bootm ${loadaddr} - ${fdtaddr}\0" \ 1342ac07f75SDavid Lechner "loadbootscr=fatload mmc 0 ${bootscraddr} boot.scr\0" \ 135*f203a479SDavid Lechner "bootscript=source ${bootscraddr}\0" 1362ac07f75SDavid Lechner 1372ac07f75SDavid Lechner #ifdef CONFIG_CMD_BDI 1382ac07f75SDavid Lechner #define CONFIG_CLOCKS 1392ac07f75SDavid Lechner #endif 1402ac07f75SDavid Lechner 1412ac07f75SDavid Lechner #define CONFIG_ENV_SIZE (16 << 10) 1422ac07f75SDavid Lechner 1432ac07f75SDavid Lechner /* additions for new relocation code, must added to all boards */ 1442ac07f75SDavid Lechner #define CONFIG_SYS_SDRAM_BASE 0xc0000000 1452ac07f75SDavid Lechner 1462ac07f75SDavid Lechner #define CONFIG_SYS_INIT_SP_ADDR 0x80010000 1472ac07f75SDavid Lechner 14889f5eaa1SSimon Glass #include <asm/arch/hardware.h> 14989f5eaa1SSimon Glass 1502ac07f75SDavid Lechner #endif /* __CONFIG_H */ 151