nas220.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com>
  3. *
  4. * based on work from:
  5. * (C) Copyright 2009
  6. * Marvell Semiconductor <www.marvell.com>
  7. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #ifndef _CONFIG_NAS220_H
  12. #define _CONFIG_NAS220_H
  13. /*
  14. * Machine type definition and ID
  15. */
  16. #define MACH_TYPE_NAS220 MACH_TYPE_RD88F6192_NAS
  17. #define CONFIG_MACH_TYPE MACH_TYPE_NAS220
  18. /*
  19. * High Level Configuration Options (easy to change)
  20. */
  21. #define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */
  22. #define CONFIG_KW88F6192 /* SOC Name */
  23. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  24. /* power-on led, regulator, sata0, sata1 */
  25. #define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
  26. #define NAS220_GE_OE_VAL_HIGH (0)
  27. #define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
  28. #define NAS220_GE_OE_HIGH (~(0))
  29. /* PHY related */
  30. #define MV88E1116_LED_FCTRL_REG 10
  31. #define MV88E1116_CPRSP_CR3_REG 21
  32. #define MV88E1116_MAC_CTRL_REG 21
  33. #define MV88E1116_PGADR_REG 22
  34. #define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
  35. #define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
  36. /*
  37. * Commands configuration
  38. */
  39. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  40. #define CONFIG_CMD_NAND
  41. #define CONFIG_CMD_DATE
  42. #define CONFIG_CMD_IDE
  43. #define CONFIG_SYS_LONGHELP
  44. #define CONFIG_AUTO_COMPLETE
  45. #define CONFIG_CMDLINE_EDITING
  46. /*
  47. * mv-common.h should be defined after CMD configs since it used them
  48. * to enable certain macros
  49. */
  50. #include "mv-common.h"
  51. /*
  52. * Environment variables configurations
  53. */
  54. #ifdef CONFIG_CMD_NAND
  55. #define CONFIG_ENV_IS_IN_NAND
  56. #define CONFIG_ENV_SECT_SIZE 0x10000
  57. #else
  58. #define CONFIG_ENV_IS_NOWHERE
  59. #endif
  60. #define CONFIG_ENV_SIZE 0x10000
  61. #define CONFIG_ENV_OFFSET 0xa0000
  62. /*
  63. * Default environment variables
  64. */
  65. #define CONFIG_BOOTCOMMAND ""
  66. #define CONFIG_EXTRA_ENV_SETTINGS \
  67. "bootargs=console=ttyS0,115200\0" \
  68. "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
  69. "0x010000@0xa0000(env),"\
  70. "0x500000@0xc0000(uimage),"\
  71. "0x1a40000@0x5c0000(rootfs)\0" \
  72. "mtdids=nand0=orion_nand\0"\
  73. "bootdelay=-1\0"\
  74. "autostart=no\0"\
  75. "autoload=no\0"
  76. /*
  77. * Ethernet Driver configuration
  78. */
  79. #ifdef CONFIG_CMD_NET
  80. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  81. #define CONFIG_PHY_BASE_ADR 8
  82. #endif /* CONFIG_CMD_NET */
  83. /*
  84. * USB/EHCI
  85. */
  86. #ifdef CONFIG_CMD_USB
  87. #define CONFIG_USB_EHCI /* Enable EHCI USB support */
  88. #define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
  89. #define CONFIG_EHCI_IS_TDI
  90. #define CONFIG_DOS_PARTITION
  91. #define CONFIG_SUPPORT_VFAT
  92. #endif /* CONFIG_CMD_USB */
  93. /*
  94. * File system
  95. */
  96. #define CONFIG_CMD_JFFS2
  97. #define CONFIG_JFFS2_NAND
  98. #define CONFIG_JFFS2_LZO
  99. #define CONFIG_CMD_UBIFS
  100. #define CONFIG_RBTREE
  101. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  102. #define CONFIG_MTD_PARTITIONS
  103. #define CONFIG_CMD_MTDPARTS
  104. #define CONFIG_LZO
  105. /*
  106. * SATA
  107. */
  108. #ifdef CONFIG_MVSATA_IDE
  109. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  110. #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  111. #endif
  112. /*
  113. * EFI partition
  114. */
  115. #define CONFIG_EFI_PARTITION
  116. /*
  117. * Date Time
  118. */
  119. #ifdef CONFIG_CMD_DATE
  120. #define CONFIG_RTC_MV
  121. #endif /* CONFIG_CMD_DATE */
  122. #define CONFIG_KIRKWOOD_GPIO
  123. #endif /* _CONFIG_NAS220_H */