at32ap700x.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Pin definitions for AT32AP7000.
  3. *
  4. * Copyright (C) 2006 Atmel Corporation
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARCH_AT32AP700X_H__
  11. #define __ASM_ARCH_AT32AP700X_H__
  12. #define GPIO_PERIPH_A 0
  13. #define GPIO_PERIPH_B 1
  14. /*
  15. * Pin numbers identifying specific GPIO pins on the chip. They can
  16. * also be converted to IRQ numbers by passing them through
  17. * gpio_to_irq().
  18. */
  19. #define GPIO_PIOA_BASE (0)
  20. #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32)
  21. #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32)
  22. #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32)
  23. #define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32)
  24. #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N))
  25. #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N))
  26. #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N))
  27. #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N))
  28. #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N))
  29. /*
  30. * DMAC peripheral hardware handshaking interfaces, used with dw_dmac
  31. */
  32. #define DMAC_MCI_RX 0
  33. #define DMAC_MCI_TX 1
  34. #define DMAC_DAC_TX 2
  35. #define DMAC_AC97_A_RX 3
  36. #define DMAC_AC97_A_TX 4
  37. #define DMAC_AC97_B_RX 5
  38. #define DMAC_AC97_B_TX 6
  39. #define DMAC_DMAREQ_0 7
  40. #define DMAC_DMAREQ_1 8
  41. #define DMAC_DMAREQ_2 9
  42. #define DMAC_DMAREQ_3 10
  43. /* HSB master IDs */
  44. #define HMATRIX_MASTER_CPU_DCACHE 0
  45. #define HMATRIX_MASTER_CPU_ICACHE 1
  46. #define HMATRIX_MASTER_PDC 2
  47. #define HMATRIX_MASTER_ISI 3
  48. #define HMATRIX_MASTER_USBA 4
  49. #define HMATRIX_MASTER_LCDC 5
  50. #define HMATRIX_MASTER_MACB0 6
  51. #define HMATRIX_MASTER_MACB1 7
  52. #define HMATRIX_MASTER_DMACA_M0 8
  53. #define HMATRIX_MASTER_DMACA_M1 9
  54. /* HSB slave IDs */
  55. #define HMATRIX_SLAVE_SRAM0 0
  56. #define HMATRIX_SLAVE_SRAM1 1
  57. #define HMATRIX_SLAVE_PBA 2
  58. #define HMATRIX_SLAVE_PBB 3
  59. #define HMATRIX_SLAVE_EBI 4
  60. #define HMATRIX_SLAVE_USBA 5
  61. #define HMATRIX_SLAVE_LCDC 6
  62. #define HMATRIX_SLAVE_DMACA 7
  63. /* Bits in HMATRIX SFR4 (EBI) */
  64. #define HMATRIX_EBI_SDRAM_ENABLE (1 << 1)
  65. #define HMATRIX_EBI_NAND_ENABLE (1 << 3)
  66. #define HMATRIX_EBI_CF0_ENABLE (1 << 4)
  67. #define HMATRIX_EBI_CF1_ENABLE (1 << 5)
  68. #define HMATRIX_EBI_PULLUP_DISABLE (1 << 8)
  69. /*
  70. * Base addresses of controllers that may be accessed early by
  71. * platform code.
  72. */
  73. #define PM_BASE 0xfff00000
  74. #define HMATRIX_BASE 0xfff00800
  75. #define SDRAMC_BASE 0xfff03800
  76. #endif /* __ASM_ARCH_AT32AP700X_H__ */