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