ip04.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * U-Boot - Configuration file for IP04 board (having BF532 processor)
  3. *
  4. * Copyright (c) 2006 Intratrade Ltd., Ivan Danov, idanov@gmail.com
  5. *
  6. * Copyright (c) 2005-2010 Analog Devices Inc.
  7. *
  8. * (C) Copyright 2000-2004
  9. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  10. *
  11. * Licensed under the GPL-2 or later.
  12. */
  13. #ifndef __CONFIG_IP04_H__
  14. #define __CONFIG_IP04_H__
  15. #include <asm/config-pre.h>
  16. /*
  17. * Processor Settings
  18. */
  19. #define CONFIG_BFIN_CPU bf532-0.5
  20. #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_NAND
  21. /*
  22. * Clock Settings
  23. * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
  24. * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
  25. */
  26. /* CONFIG_CLKIN_HZ is any value in Hz */
  27. #define CONFIG_CLKIN_HZ 10000000
  28. /* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */
  29. /* 1 = CLKIN / 2 */
  30. #define CONFIG_CLKIN_HALF 0
  31. /* PLL_BYPASS controls the BYPASS bit in PLL_CTL 0 = do not bypass */
  32. /* 1 = bypass PLL */
  33. #define CONFIG_PLL_BYPASS 0
  34. /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
  35. /* Values can range from 0-63 (where 0 means 64) */
  36. #define CONFIG_VCO_MULT 40
  37. /* CCLK_DIV controls the core clock divider */
  38. /* Values can be 1, 2, 4, or 8 ONLY */
  39. #define CONFIG_CCLK_DIV 1
  40. /* SCLK_DIV controls the system clock divider */
  41. /* Values can range from 1-15 */
  42. #define CONFIG_SCLK_DIV 3
  43. /*
  44. * Memory Settings
  45. */
  46. #define CONFIG_MEM_ADD_WDTH 10
  47. #define CONFIG_MEM_SIZE 64
  48. #define CONFIG_EBIU_SDRRC_VAL 0x408
  49. #define CONFIG_EBIU_SDGCTL_VAL 0x9111cd
  50. #define CONFIG_EBIU_AMGCTL_VAL 0xFF
  51. #define CONFIG_EBIU_AMBCTL0_VAL 0xffc2ffc2
  52. #define CONFIG_EBIU_AMBCTL1_VAL 0xffc2ffc2
  53. #define CONFIG_SYS_MONITOR_LEN (384 * 1024)
  54. #define CONFIG_SYS_MALLOC_LEN (128 * 1024)
  55. /*
  56. * Network Settings
  57. */
  58. #define ADI_CMDS_NETWORK 1
  59. #define CONFIG_HOSTNAME IP04
  60. #define CONFIG_DRIVER_DM9000 1
  61. #define CONFIG_DM9000_NO_SROM
  62. #define CONFIG_DM9000_BASE 0x20100000
  63. #define DM9000_IO CONFIG_DM9000_BASE
  64. #define DM9000_DATA (CONFIG_DM9000_BASE + 2)
  65. /*
  66. * Flash Settings
  67. */
  68. #define CONFIG_ENV_OVERWRITE 1
  69. #define CONFIG_SYS_NO_FLASH /* we have only NAND */
  70. /*
  71. * SPI Settings
  72. */
  73. #define CONFIG_BFIN_SPI
  74. #define CONFIG_ENV_SPI_MAX_HZ 30000000
  75. #define CONFIG_SF_DEFAULT_SPEED 30000000
  76. /*
  77. * Env Storage Settings
  78. */
  79. #define CONFIG_ENV_IS_IN_SPI_FLASH
  80. #define CONFIG_PREBOOT "echo starting from spi flash"
  81. #define CONFIG_ENV_OFFSET 0x30000
  82. #define CONFIG_ENV_SIZE 0x10000
  83. #define CONFIG_ENV_SECT_SIZE 0x10000
  84. /*
  85. * NAND Settings
  86. */
  87. #define CONFIG_NAND_PLAT
  88. #define CONFIG_SYS_NAND_BASE 0x20000000
  89. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  90. #define BFIN_NAND_CLE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 2))
  91. #define BFIN_NAND_ALE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 1))
  92. #define BFIN_NAND_WRITE(addr, cmd) \
  93. do { \
  94. bfin_write8(addr, cmd); \
  95. SSYNC(); \
  96. } while (0)
  97. #define NAND_PLAT_WRITE_CMD(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_CLE(chip), cmd)
  98. #define NAND_PLAT_WRITE_ADR(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_ALE(chip), cmd)
  99. #define NAND_PLAT_GPIO_DEV_READY GPIO_PF10
  100. /*
  101. * Misc Settings
  102. */
  103. #define CONFIG_BAUDRATE 115200
  104. #define CONFIG_UART_CONSOLE 0
  105. #undef CONFIG_SHOW_BOOT_PROGRESS
  106. /* Enable this if bootretry required; currently it's disabled */
  107. #define CONFIG_BOOT_RETRY_TIME -1
  108. #define CONFIG_BOOTCOMMAND "run nandboot"
  109. /*
  110. * Pull in common ADI header for remaining command/environment setup
  111. */
  112. #include <configs/bfin_adi_common.h>
  113. #endif