MCR3000.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2010-2017 CS Systemes d'Information
  4. * Christophe Leroy <christophe.leroy@c-s.fr>
  5. */
  6. #ifndef __CONFIG_H
  7. #define __CONFIG_H
  8. /* High Level Configuration Options */
  9. #define CONFIG_EXTRA_ENV_SETTINGS \
  10. "sdram_type=SDRAM\0" \
  11. "flash_type=AM29LV160DB\0" \
  12. "loadaddr=0x400000\0" \
  13. "filename=uImage.lzma\0" \
  14. "nfsroot=/opt/ofs\0" \
  15. "dhcp_ip=ip=:::::eth0:dhcp\0" \
  16. "console_args=console=ttyCPM0,115200N8\0" \
  17. "flashboot=setenv bootargs " \
  18. "${console_args} " \
  19. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  20. "mcr3k:eth0:off;" \
  21. "${ofl_args}; " \
  22. "bootm 0x04060000 - 0x04050000\0" \
  23. "tftpboot=setenv bootargs " \
  24. "${console_args} " \
  25. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  26. "mcr3k:eth0:off " \
  27. "${ofl_args}; " \
  28. "tftp ${loadaddr} ${filename};" \
  29. "tftp 0xf00000 mcr3000.dtb;" \
  30. "bootm ${loadaddr} - 0xf00000\0" \
  31. "netboot=dhcp ${loadaddr} ${filename};" \
  32. "tftp 0xf00000 mcr3000.dtb;" \
  33. "setenv bootargs " \
  34. "root=/dev/nfs rw " \
  35. "${console_args} " \
  36. "${dhcp_ip};" \
  37. "bootm ${loadaddr} - 0xf00000\0" \
  38. "nfsboot=setenv bootargs " \
  39. "root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} " \
  40. "${console_args} " \
  41. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  42. "mcr3k:eth0:off;" \
  43. "bootm 0x04060000 - 0x04050000\0" \
  44. "dhcpboot=dhcp ${loadaddr} ${filename};" \
  45. "tftp 0xf00000 mcr3000.dtb;" \
  46. "setenv bootargs " \
  47. "${console_args} " \
  48. "${dhcp_ip} " \
  49. "${ofl_args}; " \
  50. "bootm ${loadaddr} - 0xf00000\0"
  51. #define CONFIG_IPADDR 192.168.0.3
  52. #define CONFIG_SERVERIP 192.168.0.1
  53. #define CONFIG_NETMASK 255.0.0.0
  54. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  55. /* Miscellaneous configurable options */
  56. #define CONFIG_SYS_LOAD_ADDR 0x200000
  57. #define CONFIG_SYS_HZ 1000
  58. /* Definitions for initial stack pointer and data area (in DPRAM) */
  59. #define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800)
  60. #define CONFIG_SYS_INIT_RAM_SIZE (0x2e00 - 0x2800)
  61. /* RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero) */
  62. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  63. /* FLASH organization */
  64. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE
  65. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  66. #define CONFIG_SYS_MAX_FLASH_SECT 35
  67. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000
  68. #define CONFIG_SYS_FLASH_WRITE_TOUT 500
  69. /*
  70. * For booting Linux, the board info and command line data
  71. * have to be in the first 8 MB of memory, since this is
  72. * the maximum mapped by the Linux kernel during initialization.
  73. */
  74. #define CONFIG_SYS_BOOTMAPSZ (8 << 20)
  75. #define CONFIG_SYS_MONITOR_LEN (320 << 10)
  76. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  77. #define CONFIG_SYS_MALLOC_LEN (4096 << 10)
  78. /* Environment Configuration */
  79. /* environment is in FLASH */
  80. /* Ethernet configuration part */
  81. #define CONFIG_SYS_DISCOVER_PHY 1
  82. #define CONFIG_MII_INIT 1
  83. /* NAND configuration part */
  84. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  85. #define CONFIG_SYS_NAND_MAX_CHIPS 1
  86. #define CONFIG_SYS_NAND_BASE 0x0C000000
  87. #endif /* __CONFIG_H */