km_arm.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. * (C) Copyright 2009
  3. * Marvell Semiconductor <www.marvell.com>
  4. * Prafulla Wadaskar <prafulla@marvell.com>
  5. *
  6. * (C) Copyright 2009
  7. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  8. *
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  25. * MA 02110-1301 USA
  26. */
  27. /* for linking errors see http://lists.denx.de/pipermail/u-boot/2009-July/057350.html */
  28. #ifndef _CONFIG_KM_ARM_H
  29. #define _CONFIG_KM_ARM_H
  30. /*
  31. * High Level Configuration Options (easy to change)
  32. */
  33. #define CONFIG_MARVELL
  34. #define CONFIG_ARM926EJS /* Basic Architecture */
  35. #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
  36. #define CONFIG_KIRKWOOD /* SOC Family Name */
  37. #define CONFIG_KW88F6281 /* SOC Name */
  38. #define CONFIG_MACH_SUEN3 /* Machine type */
  39. /* include common defines/options for all Keymile boards */
  40. #include "keymile-common.h"
  41. #undef CONFIG_CMD_DTT
  42. #undef CONFIG_BOOTCOUNT_LIMIT
  43. #define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */
  44. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  45. #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */
  46. #undef CONFIG_KIRKWOOD_PCIE_INIT /* Disable PCIE Port0 for kernel */
  47. #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */
  48. #define CONFIG_MISC_INIT_R
  49. /*
  50. * NS16550 Configuration
  51. */
  52. #define CONFIG_SYS_NS16550
  53. #define CONFIG_SYS_NS16550_SERIAL
  54. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  55. #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK
  56. #define CONFIG_SYS_NS16550_COM1 KW_UART0_BASE
  57. /*
  58. * Serial Port configuration
  59. * The following definitions let you select what serial you want to use
  60. * for your console driver.
  61. */
  62. #define CONFIG_CONS_INDEX 1 /* Console on UART0 */
  63. /*
  64. * For booting Linux, the board info and command line data
  65. * have to be in the first 8 MB of memory, since this is
  66. * the maximum mapped by the Linux kernel during initialization.
  67. */
  68. #define CONFIG_BOOTMAPSZ (8 << 20) /* Initial Memmap for Linux */
  69. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  70. #define CONFIG_INITRD_TAG /* enable INITRD tag */
  71. #define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */
  72. /*
  73. * Commands configuration
  74. */
  75. #define CONFIG_CMD_ELF
  76. #define CONFIG_CMD_MTDPARTS
  77. #define CONFIG_CMD_NAND
  78. #define CONFIG_CMD_NFS
  79. /*
  80. * Without NOR FLASH we need this
  81. */
  82. #define CONFIG_SYS_NO_FLASH
  83. #undef CONFIG_CMD_FLASH
  84. #undef CONFIG_CMD_IMLS
  85. /*
  86. * NAND Flash configuration
  87. */
  88. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  89. #define NAND_MAX_CHIPS 1
  90. #define CONFIG_NAND_KIRKWOOD
  91. #define CONFIG_SYS_NAND_BASE 0xd8000000
  92. #define BOOTFLASH_START 0x0
  93. #define CONFIG_KM_CONSOLE_TTY "ttyS0"
  94. /* size in bytes reserved for initial data */
  95. #define CONFIG_SYS_GBL_DATA_SIZE 128
  96. /*
  97. * Other required minimal configurations
  98. */
  99. #define CONFIG_CONSOLE_INFO_QUIET /* some code reduction */
  100. #define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */
  101. #define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */
  102. #define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
  103. #define CONFIG_NR_DRAM_BANKS 4
  104. #define CONFIG_STACKSIZE 0x00100000 /* regular stack- 1M */
  105. #define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */
  106. /*
  107. * Ethernet Driver configuration
  108. */
  109. #define CONFIG_NETCONSOLE /* include NetConsole support */
  110. #define CONFIG_NET_MULTI /* specify more that one ports available */
  111. #define CONFIG_MII /* expose smi ove miiphy interface */
  112. #define CONFIG_MVGBE /* Enable Marvell Gbe Controller Driver */
  113. #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN /* detect link using phy */
  114. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  115. #define CONFIG_PHY_BASE_ADR 0
  116. #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
  117. #define CONFIG_RESET_PHY_R /* use reset_phy() to init 88E1118 PHY */
  118. /*
  119. * UBI related stuff
  120. */
  121. #define CONFIG_SYS_USE_UBI
  122. /*
  123. * I2C related stuff
  124. */
  125. #define CONFIG_SOFT_I2C /* I2C bit-banged */
  126. #define CONFIG_KIRKWOOD_GPIO /* Enable GPIO Support */
  127. #if defined(CONFIG_SOFT_I2C)
  128. #ifndef __ASSEMBLY__
  129. #include <asm/arch-kirkwood/gpio.h>
  130. extern void __set_direction(unsigned pin, int high);
  131. void set_sda (int state);
  132. void set_scl (int state);
  133. int get_sda (void);
  134. int get_scl (void);
  135. #define SUEN3_SDA_PIN 8
  136. #define SUEN3_SCL_PIN 9
  137. #define SUEN3_ENV_WP 38
  138. #define I2C_ACTIVE __set_direction(SUEN3_SDA_PIN, 0)
  139. #define I2C_TRISTATE __set_direction(SUEN3_SDA_PIN, 1)
  140. #define I2C_READ (kw_gpio_get_value(SUEN3_SDA_PIN) ? 1 : 0)
  141. #define I2C_SDA(bit) kw_gpio_set_value(SUEN3_SDA_PIN, bit);
  142. #define I2C_SCL(bit) kw_gpio_set_value(SUEN3_SCL_PIN, bit);
  143. #endif
  144. #define I2C_DELAY udelay(3) /* 1/4 I2C clock duration */
  145. #define I2C_SOFT_DECLARATIONS
  146. #define CONFIG_SYS_I2C_SLAVE 0x0
  147. #define CONFIG_SYS_I2C_SPEED 100000
  148. #endif
  149. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  150. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  151. #if defined(CONFIG_SYS_NO_FLASH)
  152. #define CONFIG_KM_UBI_PARTITION_NAME "ubi0"
  153. #undef CONFIG_FLASH_CFI_MTD
  154. #undef CONFIG_JFFS2_CMDLINE
  155. #endif
  156. /* additions for new relocation code, must be added to all boards */
  157. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  158. #define CONFIG_SYS_INIT_SP_ADDR (0x00000000 + 0x1000 - /* Fix this */ \
  159. CONFIG_SYS_GBL_DATA_SIZE)
  160. #endif /* _CONFIG_KM_ARM_H */