goflexhome.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * Copyright (C) 2013 Suriyan Ramasami <suriyan.r@gmail.com>
  3. *
  4. * Based on dockstar.h originally written by
  5. * Copyright (C) 2010 Eric C. Cooper <ecc@cmu.edu>
  6. *
  7. * Based on sheevaplug.h originally written by
  8. * Prafulla Wadaskar <prafulla@marvell.com>
  9. * (C) Copyright 2009
  10. * Marvell Semiconductor <www.marvell.com>
  11. *
  12. * See file CREDITS for list of people who contributed to this
  13. * project.
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License as
  17. * published by the Free Software Foundation; either version 2 of
  18. * the License, or (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  28. * MA 02110-1301 USA
  29. */
  30. #ifndef _CONFIG_GOFLEXHOME_H
  31. #define _CONFIG_GOFLEXHOME_H
  32. /*
  33. * Version number information
  34. */
  35. #define CONFIG_IDENT_STRING "\nSeagate GoFlex Home"
  36. /*
  37. * High Level Configuration Options (easy to change)
  38. */
  39. #define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
  40. #define CONFIG_KIRKWOOD 1 /* SOC Family Name */
  41. #define CONFIG_KW88F6281 1 /* SOC Name */
  42. #define CONFIG_MACH_GOFLEXHOME /* Machine type */
  43. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  44. /*
  45. * Default GPIO configuration and LED status
  46. */
  47. #define GOFLEXHOME_OE_LOW (~(0))
  48. #define GOFLEXHOME_OE_HIGH (~(0))
  49. #define GOFLEXHOME_OE_VAL_LOW (1 << 29) /* USB_PWEN low */
  50. #define GOFLEXHOME_OE_VAL_HIGH (1 << 17) /* LED pin high */
  51. /* PHY related */
  52. #define MV88E1116_LED_FCTRL_REG 10
  53. #define MV88E1116_CPRSP_CR3_REG 21
  54. #define MV88E1116_MAC_CTRL_REG 21
  55. #define MV88E1116_PGADR_REG 22
  56. #define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
  57. #define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
  58. /*
  59. * Commands configuration
  60. */
  61. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  62. #define CONFIG_CONSOLE_MUX
  63. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  64. #include <config_cmd_default.h>
  65. #define CONFIG_CMD_DHCP
  66. #define CONFIG_CMD_ENV
  67. #define CONFIG_CMD_MII
  68. #define CONFIG_CMD_NAND
  69. #define CONFIG_CMD_PING
  70. #define CONFIG_CMD_USB
  71. #define CONFIG_CMD_IDE
  72. #define CONFIG_CMD_DATE
  73. #define CONFIG_CMD_EXT4
  74. #define CONFIG_SYS_MVFS /* Picks up Filesystem from mv-common.h */
  75. /*
  76. * mv-common.h should be defined after CMD configs since it used them
  77. * to enable certain macros
  78. */
  79. #include "mv-common.h"
  80. #undef CONFIG_SYS_PROMPT /* previously defined in mv-common.h */
  81. #define CONFIG_SYS_PROMPT "GoFlexHome> " /* Command Prompt */
  82. /*
  83. * Environment variables configurations
  84. */
  85. #ifdef CONFIG_CMD_NAND
  86. #define CONFIG_ENV_IS_IN_NAND 1
  87. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
  88. #else
  89. #define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
  90. #endif
  91. /*
  92. * max 4k env size is enough, but in case of nand
  93. * it has to be rounded to sector size
  94. */
  95. #define CONFIG_ENV_SIZE 0x20000 /* 128k */
  96. #define CONFIG_ENV_ADDR 0xC0000
  97. #define CONFIG_ENV_OFFSET 0xC0000 /* env starts here */
  98. /*
  99. * Default environment variables
  100. */
  101. #define CONFIG_BOOTCOMMAND \
  102. "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
  103. "ubi part root; " \
  104. "ubifsmount ubi:root; " \
  105. "ubifsload 0x800000 ${kernel}; " \
  106. "bootm 0x800000"
  107. #define CONFIG_MTDPARTS \
  108. "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"
  109. #define CONFIG_EXTRA_ENV_SETTINGS \
  110. "console=console=ttyS0,115200\0" \
  111. "mtdids=nand0=orion_nand\0" \
  112. "mtdparts="CONFIG_MTDPARTS \
  113. "kernel=/boot/uImage\0" \
  114. "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
  115. /*
  116. * Ethernet Driver configuration
  117. */
  118. #ifdef CONFIG_CMD_NET
  119. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  120. #define CONFIG_PHY_BASE_ADR 0
  121. #endif /* CONFIG_CMD_NET */
  122. /*
  123. * * SATA Driver configuration
  124. * */
  125. #ifdef CONFIG_MVSATA_IDE
  126. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  127. #endif /*CONFIG_MVSATA_IDE*/
  128. /*
  129. * * RTC driver configuration
  130. * */
  131. #ifdef CONFIG_CMD_DATE
  132. #define CONFIG_RTC_MV
  133. #endif /* CONFIG_CMD_DATE */
  134. #endif /* _CONFIG_GOFLEXHOME_H */