1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 253193a4fSChristophe Leroy /* 353193a4fSChristophe Leroy * Copyright (C) 2010-2017 CS Systemes d'Information 453193a4fSChristophe Leroy * Christophe Leroy <christophe.leroy@c-s.fr> 553193a4fSChristophe Leroy */ 653193a4fSChristophe Leroy 753193a4fSChristophe Leroy #ifndef __CONFIG_H 853193a4fSChristophe Leroy #define __CONFIG_H 953193a4fSChristophe Leroy 1053193a4fSChristophe Leroy /* High Level Configuration Options */ 1153193a4fSChristophe Leroy 1253193a4fSChristophe Leroy #define CONFIG_EXTRA_ENV_SETTINGS \ 1353193a4fSChristophe Leroy "sdram_type=SDRAM\0" \ 1453193a4fSChristophe Leroy "flash_type=AM29LV160DB\0" \ 1553193a4fSChristophe Leroy "loadaddr=0x400000\0" \ 1653193a4fSChristophe Leroy "filename=uImage.lzma\0" \ 1753193a4fSChristophe Leroy "nfsroot=/opt/ofs\0" \ 1853193a4fSChristophe Leroy "dhcp_ip=ip=:::::eth0:dhcp\0" \ 1953193a4fSChristophe Leroy "console_args=console=ttyCPM0,115200N8\0" \ 2053193a4fSChristophe Leroy "flashboot=setenv bootargs " \ 2153193a4fSChristophe Leroy "${console_args} " \ 2253193a4fSChristophe Leroy "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 2353193a4fSChristophe Leroy "mcr3k:eth0:off;" \ 2453193a4fSChristophe Leroy "${ofl_args}; " \ 2553193a4fSChristophe Leroy "bootm 0x04060000 - 0x04050000\0" \ 2653193a4fSChristophe Leroy "tftpboot=setenv bootargs " \ 2753193a4fSChristophe Leroy "${console_args} " \ 2853193a4fSChristophe Leroy "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 2953193a4fSChristophe Leroy "mcr3k:eth0:off " \ 3053193a4fSChristophe Leroy "${ofl_args}; " \ 3153193a4fSChristophe Leroy "tftp ${loadaddr} ${filename};" \ 3253193a4fSChristophe Leroy "tftp 0xf00000 mcr3000.dtb;" \ 3353193a4fSChristophe Leroy "bootm ${loadaddr} - 0xf00000\0" \ 3453193a4fSChristophe Leroy "netboot=dhcp ${loadaddr} ${filename};" \ 3553193a4fSChristophe Leroy "tftp 0xf00000 mcr3000.dtb;" \ 3653193a4fSChristophe Leroy "setenv bootargs " \ 3753193a4fSChristophe Leroy "root=/dev/nfs rw " \ 3853193a4fSChristophe Leroy "${console_args} " \ 3953193a4fSChristophe Leroy "${dhcp_ip};" \ 4053193a4fSChristophe Leroy "bootm ${loadaddr} - 0xf00000\0" \ 4153193a4fSChristophe Leroy "nfsboot=setenv bootargs " \ 4253193a4fSChristophe Leroy "root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} " \ 4353193a4fSChristophe Leroy "${console_args} " \ 4453193a4fSChristophe Leroy "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 4553193a4fSChristophe Leroy "mcr3k:eth0:off;" \ 4653193a4fSChristophe Leroy "bootm 0x04060000 - 0x04050000\0" \ 4753193a4fSChristophe Leroy "dhcpboot=dhcp ${loadaddr} ${filename};" \ 4853193a4fSChristophe Leroy "tftp 0xf00000 mcr3000.dtb;" \ 4953193a4fSChristophe Leroy "setenv bootargs " \ 5053193a4fSChristophe Leroy "${console_args} " \ 5153193a4fSChristophe Leroy "${dhcp_ip} " \ 5253193a4fSChristophe Leroy "${ofl_args}; " \ 5353193a4fSChristophe Leroy "bootm ${loadaddr} - 0xf00000\0" 5453193a4fSChristophe Leroy 5553193a4fSChristophe Leroy #define CONFIG_IPADDR 192.168.0.3 5653193a4fSChristophe Leroy #define CONFIG_SERVERIP 192.168.0.1 5753193a4fSChristophe Leroy #define CONFIG_NETMASK 255.0.0.0 5853193a4fSChristophe Leroy 5953193a4fSChristophe Leroy #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ 6053193a4fSChristophe Leroy 6153193a4fSChristophe Leroy /* Miscellaneous configurable options */ 6253193a4fSChristophe Leroy 6353193a4fSChristophe Leroy #define CONFIG_SYS_MEMTEST_START 0x00002000 6453193a4fSChristophe Leroy #define CONFIG_SYS_MEMTEST_END 0x00800000 6553193a4fSChristophe Leroy 6653193a4fSChristophe Leroy #define CONFIG_SYS_LOAD_ADDR 0x200000 6753193a4fSChristophe Leroy 6853193a4fSChristophe Leroy #define CONFIG_SYS_HZ 1000 6953193a4fSChristophe Leroy 7053193a4fSChristophe Leroy /* Definitions for initial stack pointer and data area (in DPRAM) */ 71b3ede331SChristophe Leroy #define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800) 72b3ede331SChristophe Leroy #define CONFIG_SYS_INIT_RAM_SIZE (0x2e00 - 0x2800) 7353193a4fSChristophe Leroy 7453193a4fSChristophe Leroy /* RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero) */ 7553193a4fSChristophe Leroy #define CONFIG_SYS_SDRAM_BASE 0x00000000 7653193a4fSChristophe Leroy 7753193a4fSChristophe Leroy /* FLASH organization */ 7853193a4fSChristophe Leroy #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE 7953193a4fSChristophe Leroy #define CONFIG_SYS_MAX_FLASH_BANKS 1 8053193a4fSChristophe Leroy #define CONFIG_SYS_MAX_FLASH_SECT 35 8153193a4fSChristophe Leroy #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 8253193a4fSChristophe Leroy #define CONFIG_SYS_FLASH_WRITE_TOUT 500 8353193a4fSChristophe Leroy 8453193a4fSChristophe Leroy /* 8553193a4fSChristophe Leroy * For booting Linux, the board info and command line data 8653193a4fSChristophe Leroy * have to be in the first 8 MB of memory, since this is 8753193a4fSChristophe Leroy * the maximum mapped by the Linux kernel during initialization. 8853193a4fSChristophe Leroy */ 8953193a4fSChristophe Leroy #define CONFIG_SYS_BOOTMAPSZ (8 << 20) 900fb62205SChristophe Leroy #define CONFIG_SYS_MONITOR_LEN (320 << 10) 9153193a4fSChristophe Leroy #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE 9253193a4fSChristophe Leroy #define CONFIG_SYS_MALLOC_LEN (4096 << 10) 9353193a4fSChristophe Leroy 9453193a4fSChristophe Leroy /* Environment Configuration */ 9553193a4fSChristophe Leroy 9653193a4fSChristophe Leroy /* environment is in FLASH */ 970fb62205SChristophe Leroy #define CONFIG_ENV_SECT_SIZE 0x2000 980fb62205SChristophe Leroy #define CONFIG_ENV_OFFSET 0x4000 9953193a4fSChristophe Leroy #define CONFIG_ENV_OVERWRITE 1 10053193a4fSChristophe Leroy 10153193a4fSChristophe Leroy /* Ethernet configuration part */ 10253193a4fSChristophe Leroy #define CONFIG_SYS_DISCOVER_PHY 1 10353193a4fSChristophe Leroy #define CONFIG_MII_INIT 1 10453193a4fSChristophe Leroy 10553193a4fSChristophe Leroy /* NAND configuration part */ 10653193a4fSChristophe Leroy #define CONFIG_SYS_MAX_NAND_DEVICE 1 10753193a4fSChristophe Leroy #define CONFIG_SYS_NAND_MAX_CHIPS 1 10853193a4fSChristophe Leroy #define CONFIG_SYS_NAND_BASE 0x0C000000 10953193a4fSChristophe Leroy 11053193a4fSChristophe Leroy #endif /* __CONFIG_H */ 111