nbg460n.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * (C) Copyright 2010
  3. * Michael Kurz <michi.kurz@googlemail.com>.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /* This file contains the configuration parameters for the zyxel nbg460n board. */
  24. #ifndef _NBG460N_CONFIG_H
  25. #define _NBG460N_CONFIG_H
  26. #define CONFIG_MIPS32 1 /* MIPS32 CPU core */
  27. #define CONFIG_AR71XX 1
  28. #define CONFIG_AR91XX 1
  29. #define CONFIG_SYS_HZ 1000
  30. #define CONFIG_SYS_MIPS_TIMER_FREQ (400000000/2)
  31. /* Cache Configuration */
  32. #define CONFIG_SYS_DCACHE_SIZE 32768
  33. #define CONFIG_SYS_ICACHE_SIZE 65536
  34. #define CONFIG_SYS_CACHELINE_SIZE 32
  35. /* Cache lock for stack */
  36. #define CONFIG_SYS_INIT_SP_OFFSET 0x1000
  37. #define CONFIG_SYS_MONITOR_BASE (TEXT_BASE)
  38. #define CONFIG_BAUDRATE 115200
  39. #define CONFIG_SYS_BAUDRATE_TABLE {115200}
  40. #define CONFIG_MISC_INIT_R
  41. /* SPI-Flash support */
  42. #define CONFIG_SPI_FLASH
  43. #define CONFIG_AR71XX_SPI
  44. #define CONFIG_SPI_FLASH_MACRONIX
  45. #define CONFIG_SF_DEFAULT_HZ 25000000
  46. #define CONFIG_ENV_SPI_MAX_HZ 25000000
  47. #define CONFIG_ENV_SPI_BUS 0
  48. #define CONFIG_ENV_SPI_CS 0
  49. #define CONFIG_ENV_IS_IN_SPI_FLASH
  50. #define CONFIG_ENV_ADDR 0xbfc20000
  51. #define CONFIG_ENV_OFFSET 0x20000
  52. #define CONFIG_ENV_SIZE 0x01000
  53. #define CONFIG_ENV_SECT_SIZE 0x10000
  54. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  55. #define CONFIG_SYS_MAX_FLASH_SECT 64
  56. #define CONFIG_SYS_FLASH_BASE 0xbfc00000
  57. /* Net support */
  58. #define CONFIG_ETHADDR_ADDR 0xbfc0fff8
  59. #define CONFIG_SYS_RX_ETH_BUFFER 16
  60. #define CONFIG_AG71XX
  61. #define CONFIG_AG71XX_PORTS { 1, 1 }
  62. #define CONFIG_AG71XX_MII0_IIF MII0_CTRL_IF_RGMII
  63. #define CONFIG_AG71XX_MII1_IIF MII1_CTRL_IF_RGMII
  64. #define CONFIG_NET_MULTI
  65. #define CONFIG_IPADDR 192.168.1.254
  66. #define CONFIG_SERVERIP 192.168.1.42
  67. /* Switch support */
  68. #define CONFIG_MII
  69. #define CONFIG_RTL8366_MII
  70. #define RTL8366_PIN_SDA 16
  71. #define RTL8366_PIN_SCK 18
  72. #define MII_GPIOINCLUDE <asm/ar71xx_gpio.h>
  73. #define MII_SETSDA(x) ar71xx_setpin(RTL8366_PIN_SDA, x)
  74. #define MII_GETSDA ar71xx_getpin(RTL8366_PIN_SDA)
  75. #define MII_SETSCK(x) ar71xx_setpin(RTL8366_PIN_SCK, x)
  76. #define MII_SDAINPUT ar71xx_setpindir(RTL8366_PIN_SDA, 0)
  77. #define MII_SDAOUTPUT ar71xx_setpindir(RTL8366_PIN_SDA, 1)
  78. #define MII_SCKINPUT ar71xx_setpindir(RTL8366_PIN_SCK, 0)
  79. #define MII_SCKOUTPUT ar71xx_setpindir(RTL8366_PIN_SCK, 1)
  80. #define CONFIG_BOOTDELAY 3
  81. #define CONFIG_BOOTARGS "console=ttyS0,115200 rootfstype==squashfs,jffs2 noinitrd machtype=NBG460N"
  82. #define CONFIG_BOOTCOMMAND "bootm 0xbfc70000"
  83. #define CONFIG_LZMA
  84. /* Commands */
  85. #define CONFIG_SYS_NO_FLASH
  86. #include <config_cmd_default.h>
  87. #undef CONFIG_CMD_BDI
  88. #undef CONFIG_CMD_FPGA
  89. #undef CONFIG_CMD_IMI
  90. #undef CONFIG_CMD_IMLS
  91. #undef CONFIG_CMD_LOADS
  92. #define CONFIG_CMD_SF
  93. #define CONFIG_CMD_MII
  94. #define CONFIG_CMD_PING
  95. #define CONFIG_CMD_DHCP
  96. #define CONFIG_CMD_SPI
  97. /* Miscellaneous configurable options */
  98. #define CONFIG_SYS_PROMPT "U-Boot> "
  99. #define CONFIG_SYS_CBSIZE 256
  100. #define CONFIG_SYS_MAXARGS 16
  101. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  102. #define CONFIG_SYS_LONGHELP 1
  103. #define CONFIG_CMDLINE_EDITING 1
  104. #define CONFIG_AUTO_COMPLETE
  105. #define CONFIG_SYS_HUSH_PARSER
  106. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  107. /* Size of malloc() pool */
  108. #define CONFIG_SYS_MALLOC_LEN ROUND(3 * 0x10000 + 128*1024, 0x1000)
  109. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
  110. #define CONFIG_SYS_BOOTPARAMS_LEN 128*1024
  111. #define CONFIG_SYS_SDRAM_BASE 0x80000000 /* Cached addr */
  112. #define CONFIG_SYS_LOAD_ADDR 0x80060000 /* default load address */
  113. #define CONFIG_SYS_MEMTEST_START 0x80000800
  114. #define CONFIG_SYS_MEMTEST_END 0x81E00000
  115. #endif /* _NBG460N_CONFIG_H */