atmel-matrix.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright (C) 2014 Atmel Corporation.
  3. *
  4. * Memory Controllers (MATRIX, EBI) - System peripherals registers.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef _LINUX_MFD_SYSCON_ATMEL_MATRIX_H
  12. #define _LINUX_MFD_SYSCON_ATMEL_MATRIX_H
  13. #define AT91SAM9260_MATRIX_MCFG 0x00
  14. #define AT91SAM9260_MATRIX_SCFG 0x40
  15. #define AT91SAM9260_MATRIX_PRS 0x80
  16. #define AT91SAM9260_MATRIX_MRCR 0x100
  17. #define AT91SAM9260_MATRIX_EBICSA 0x11c
  18. #define AT91SAM9261_MATRIX_MRCR 0x0
  19. #define AT91SAM9261_MATRIX_SCFG 0x4
  20. #define AT91SAM9261_MATRIX_TCR 0x24
  21. #define AT91SAM9261_MATRIX_EBICSA 0x30
  22. #define AT91SAM9261_MATRIX_USBPUCR 0x34
  23. #define AT91SAM9263_MATRIX_MCFG 0x00
  24. #define AT91SAM9263_MATRIX_SCFG 0x40
  25. #define AT91SAM9263_MATRIX_PRS 0x80
  26. #define AT91SAM9263_MATRIX_MRCR 0x100
  27. #define AT91SAM9263_MATRIX_TCR 0x114
  28. #define AT91SAM9263_MATRIX_EBI0CSA 0x120
  29. #define AT91SAM9263_MATRIX_EBI1CSA 0x124
  30. #define AT91SAM9RL_MATRIX_MCFG 0x00
  31. #define AT91SAM9RL_MATRIX_SCFG 0x40
  32. #define AT91SAM9RL_MATRIX_PRS 0x80
  33. #define AT91SAM9RL_MATRIX_MRCR 0x100
  34. #define AT91SAM9RL_MATRIX_TCR 0x114
  35. #define AT91SAM9RL_MATRIX_EBICSA 0x120
  36. #define AT91SAM9G45_MATRIX_MCFG 0x00
  37. #define AT91SAM9G45_MATRIX_SCFG 0x40
  38. #define AT91SAM9G45_MATRIX_PRS 0x80
  39. #define AT91SAM9G45_MATRIX_MRCR 0x100
  40. #define AT91SAM9G45_MATRIX_TCR 0x110
  41. #define AT91SAM9G45_MATRIX_DDRMPR 0x118
  42. #define AT91SAM9G45_MATRIX_EBICSA 0x128
  43. #define AT91SAM9N12_MATRIX_MCFG 0x00
  44. #define AT91SAM9N12_MATRIX_SCFG 0x40
  45. #define AT91SAM9N12_MATRIX_PRS 0x80
  46. #define AT91SAM9N12_MATRIX_MRCR 0x100
  47. #define AT91SAM9N12_MATRIX_EBICSA 0x118
  48. #define AT91SAM9X5_MATRIX_MCFG 0x00
  49. #define AT91SAM9X5_MATRIX_SCFG 0x40
  50. #define AT91SAM9X5_MATRIX_PRS 0x80
  51. #define AT91SAM9X5_MATRIX_MRCR 0x100
  52. #define AT91SAM9X5_MATRIX_EBICSA 0x120
  53. #define SAMA5D3_MATRIX_MCFG 0x00
  54. #define SAMA5D3_MATRIX_SCFG 0x40
  55. #define SAMA5D3_MATRIX_PRS 0x80
  56. #define SAMA5D3_MATRIX_MRCR 0x100
  57. #define AT91_MATRIX_MCFG(o, x) ((o) + ((x) * 0x4))
  58. #define AT91_MATRIX_ULBT GENMASK(2, 0)
  59. #define AT91_MATRIX_ULBT_INFINITE (0 << 0)
  60. #define AT91_MATRIX_ULBT_SINGLE (1 << 0)
  61. #define AT91_MATRIX_ULBT_FOUR (2 << 0)
  62. #define AT91_MATRIX_ULBT_EIGHT (3 << 0)
  63. #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
  64. #define AT91_MATRIX_SCFG(o, x) ((o) + ((x) * 0x4))
  65. #define AT91_MATRIX_SLOT_CYCLE GENMASK(7, 0)
  66. #define AT91_MATRIX_DEFMSTR_TYPE GENMASK(17, 16)
  67. #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
  68. #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
  69. #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
  70. #define AT91_MATRIX_FIXED_DEFMSTR GENMASK(20, 18)
  71. #define AT91_MATRIX_ARBT GENMASK(25, 24)
  72. #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
  73. #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
  74. #define AT91_MATRIX_ITCM_SIZE GENMASK(3, 0)
  75. #define AT91_MATRIX_ITCM_0 (0 << 0)
  76. #define AT91_MATRIX_ITCM_16 (5 << 0)
  77. #define AT91_MATRIX_ITCM_32 (6 << 0)
  78. #define AT91_MATRIX_ITCM_64 (7 << 0)
  79. #define AT91_MATRIX_DTCM_SIZE GENMASK(7, 4)
  80. #define AT91_MATRIX_DTCM_0 (0 << 4)
  81. #define AT91_MATRIX_DTCM_16 (5 << 4)
  82. #define AT91_MATRIX_DTCM_32 (6 << 4)
  83. #define AT91_MATRIX_DTCM_64 (7 << 4)
  84. #define AT91_MATRIX_PRAS(o, x) ((o) + ((x) * 0x8))
  85. #define AT91_MATRIX_PRBS(o, x) ((o) + ((x) * 0x8) + 0x4)
  86. #define AT91_MATRIX_MPR(x) GENMASK(((x) * 0x4) + 1, ((x) * 0x4))
  87. #define AT91_MATRIX_RCB(x) BIT(x)
  88. #define AT91_MATRIX_CSA(cs, val) (val << (cs))
  89. #define AT91_MATRIX_DBPUC BIT(8)
  90. #define AT91_MATRIX_DBPDC BIT(9)
  91. #define AT91_MATRIX_VDDIOMSEL BIT(16)
  92. #define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
  93. #define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
  94. #define AT91_MATRIX_EBI_IOSR BIT(17)
  95. #define AT91_MATRIX_DDR_IOSR BIT(18)
  96. #define AT91_MATRIX_NFD0_SELECT BIT(24)
  97. #define AT91_MATRIX_DDR_MP_EN BIT(25)
  98. #define AT91_MATRIX_EBI_NUM_CS 8
  99. #define AT91_MATRIX_USBPUCR_PUON BIT(30)
  100. #endif /* _LINUX_MFD_SYSCON_ATMEL_MATRIX_H */