quark.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. *
  6. * Intel Quark MRC bindings include several properties
  7. * as part of an Intel Quark MRC node. In most cases,
  8. * the value of these properties uses the standard values
  9. * defined in this header.
  10. */
  11. #ifndef _DT_BINDINGS_QRK_MRC_H_
  12. #define _DT_BINDINGS_QRK_MRC_H_
  13. /* MRC platform data flags */
  14. #define MRC_FLAG_ECC_EN 0x00000001
  15. #define MRC_FLAG_SCRAMBLE_EN 0x00000002
  16. #define MRC_FLAG_MEMTEST_EN 0x00000004
  17. /* 0b DDR "fly-by" topology else 1b DDR "tree" topology */
  18. #define MRC_FLAG_TOP_TREE_EN 0x00000008
  19. /* If set ODR signal is asserted to DRAM devices on writes */
  20. #define MRC_FLAG_WR_ODT_EN 0x00000010
  21. /* DRAM width */
  22. #define DRAM_WIDTH_X8 0
  23. #define DRAM_WIDTH_X16 1
  24. #define DRAM_WIDTH_X32 2
  25. /* DRAM speed */
  26. #define DRAM_FREQ_800 0
  27. #define DRAM_FREQ_1066 1
  28. /* DRAM type */
  29. #define DRAM_TYPE_DDR3 0
  30. #define DRAM_TYPE_DDR3L 1
  31. /* DRAM rank mask */
  32. #define DRAM_RANK(n) (1 << (n))
  33. /* DRAM channel mask */
  34. #define DRAM_CHANNEL(n) (1 << (n))
  35. /* DRAM channel width */
  36. #define DRAM_CHANNEL_WIDTH_X8 0
  37. #define DRAM_CHANNEL_WIDTH_X16 1
  38. #define DRAM_CHANNEL_WIDTH_X32 2
  39. /* DRAM address mode */
  40. #define DRAM_ADDR_MODE0 0
  41. #define DRAM_ADDR_MODE1 1
  42. #define DRAM_ADDR_MODE2 2
  43. /* DRAM refresh rate */
  44. #define DRAM_REFRESH_RATE_195US 1
  45. #define DRAM_REFRESH_RATE_39US 2
  46. #define DRAM_REFRESH_RATE_785US 3
  47. /* DRAM SR temprature range */
  48. #define DRAM_SRT_RANGE_NORMAL 0
  49. #define DRAM_SRT_RANGE_EXTENDED 1
  50. /* DRAM ron value */
  51. #define DRAM_RON_34OHM 0
  52. #define DRAM_RON_40OHM 1
  53. /* DRAM rtt nom value */
  54. #define DRAM_RTT_NOM_40OHM 0
  55. #define DRAM_RTT_NOM_60OHM 1
  56. #define DRAM_RTT_NOM_120OHM 2
  57. /* DRAM rd odt value */
  58. #define DRAM_RD_ODT_OFF 0
  59. #define DRAM_RD_ODT_60OHM 1
  60. #define DRAM_RD_ODT_120OHM 2
  61. #define DRAM_RD_ODT_180OHM 3
  62. /* DRAM density */
  63. #define DRAM_DENSITY_512M 0
  64. #define DRAM_DENSITY_1G 1
  65. #define DRAM_DENSITY_2G 2
  66. #define DRAM_DENSITY_4G 3
  67. #endif /* _DT_BINDINGS_QRK_MRC_H_ */