at91sam9rl_matrix.h 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
  3. *
  4. * Copyright (C) 2007 Atmel Corporation
  5. *
  6. * Memory Controllers (MATRIX, EBI) - System peripherals registers.
  7. * Based on AT91SAM9RL datasheet revision A. (Preliminary)
  8. *
  9. * This file is subject to the terms and conditions of the GNU General Public
  10. * License. See the file COPYING in the main directory of this archive for
  11. * more details.
  12. */
  13. #ifndef AT91SAM9RL_MATRIX_H
  14. #define AT91SAM9RL_MATRIX_H
  15. #define AT91_MATRIX_MCFG0 0x00 /* Master Configuration Register 0 */
  16. #define AT91_MATRIX_MCFG1 0x04 /* Master Configuration Register 1 */
  17. #define AT91_MATRIX_MCFG2 0x08 /* Master Configuration Register 2 */
  18. #define AT91_MATRIX_MCFG3 0x0C /* Master Configuration Register 3 */
  19. #define AT91_MATRIX_MCFG4 0x10 /* Master Configuration Register 4 */
  20. #define AT91_MATRIX_MCFG5 0x14 /* Master Configuration Register 5 */
  21. #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
  22. #define AT91_MATRIX_ULBT_INFINITE (0 << 0)
  23. #define AT91_MATRIX_ULBT_SINGLE (1 << 0)
  24. #define AT91_MATRIX_ULBT_FOUR (2 << 0)
  25. #define AT91_MATRIX_ULBT_EIGHT (3 << 0)
  26. #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
  27. #define AT91_MATRIX_SCFG0 0x40 /* Slave Configuration Register 0 */
  28. #define AT91_MATRIX_SCFG1 0x44 /* Slave Configuration Register 1 */
  29. #define AT91_MATRIX_SCFG2 0x48 /* Slave Configuration Register 2 */
  30. #define AT91_MATRIX_SCFG3 0x4C /* Slave Configuration Register 3 */
  31. #define AT91_MATRIX_SCFG4 0x50 /* Slave Configuration Register 4 */
  32. #define AT91_MATRIX_SCFG5 0x54 /* Slave Configuration Register 5 */
  33. #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
  34. #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
  35. #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
  36. #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
  37. #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
  38. #define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
  39. #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
  40. #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
  41. #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
  42. #define AT91_MATRIX_PRAS0 0x80 /* Priority Register A for Slave 0 */
  43. #define AT91_MATRIX_PRAS1 0x88 /* Priority Register A for Slave 1 */
  44. #define AT91_MATRIX_PRAS2 0x90 /* Priority Register A for Slave 2 */
  45. #define AT91_MATRIX_PRAS3 0x98 /* Priority Register A for Slave 3 */
  46. #define AT91_MATRIX_PRAS4 0xA0 /* Priority Register A for Slave 4 */
  47. #define AT91_MATRIX_PRAS5 0xA8 /* Priority Register A for Slave 5 */
  48. #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
  49. #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
  50. #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
  51. #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
  52. #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
  53. #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
  54. #define AT91_MATRIX_MRCR 0x100 /* Master Remap Control Register */
  55. #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
  56. #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
  57. #define AT91_MATRIX_RCB2 (1 << 2)
  58. #define AT91_MATRIX_RCB3 (1 << 3)
  59. #define AT91_MATRIX_RCB4 (1 << 4)
  60. #define AT91_MATRIX_RCB5 (1 << 5)
  61. #define AT91_MATRIX_TCMR 0x114 /* TCM Configuration Register */
  62. #define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
  63. #define AT91_MATRIX_ITCM_0 (0 << 0)
  64. #define AT91_MATRIX_ITCM_16 (5 << 0)
  65. #define AT91_MATRIX_ITCM_32 (6 << 0)
  66. #define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
  67. #define AT91_MATRIX_DTCM_0 (0 << 4)
  68. #define AT91_MATRIX_DTCM_16 (5 << 4)
  69. #define AT91_MATRIX_DTCM_32 (6 << 4)
  70. #define AT91_MATRIX_EBICSA 0x120 /* EBI0 Chip Select Assignment Register */
  71. #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
  72. #define AT91_MATRIX_CS1A_SMC (0 << 1)
  73. #define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
  74. #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
  75. #define AT91_MATRIX_CS3A_SMC (0 << 3)
  76. #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
  77. #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
  78. #define AT91_MATRIX_CS4A_SMC (0 << 4)
  79. #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
  80. #define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
  81. #define AT91_MATRIX_CS5A_SMC (0 << 5)
  82. #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
  83. #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
  84. #define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
  85. #define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
  86. #define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
  87. #endif