timberdale.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * timberdale.h timberdale FPGA MFD driver defines
  3. * Copyright (c) 2009 Intel Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. /* Supports:
  19. * Timberdale FPGA
  20. */
  21. #ifndef MFD_TIMBERDALE_H
  22. #define MFD_TIMBERDALE_H
  23. #define DRV_VERSION "0.3"
  24. /* This driver only support versions >= 3.8 and < 4.0 */
  25. #define TIMB_SUPPORTED_MAJOR 3
  26. /* This driver only support minor >= 8 */
  27. #define TIMB_REQUIRED_MINOR 8
  28. /* Registers of the control area */
  29. #define TIMB_REV_MAJOR 0x00
  30. #define TIMB_REV_MINOR 0x04
  31. #define TIMB_HW_CONFIG 0x08
  32. #define TIMB_SW_RST 0x40
  33. /* bits in the TIMB_HW_CONFIG register */
  34. #define TIMB_HW_CONFIG_SPI_8BIT 0x80
  35. #define TIMB_HW_VER_MASK 0x0f
  36. #define TIMB_HW_VER0 0x00
  37. #define TIMB_HW_VER1 0x01
  38. #define TIMB_HW_VER2 0x02
  39. #define TIMB_HW_VER3 0x03
  40. #define OCORESOFFSET 0x0
  41. #define OCORESEND 0x1f
  42. #define SPIOFFSET 0x80
  43. #define SPIEND 0xff
  44. #define UARTLITEOFFSET 0x100
  45. #define UARTLITEEND 0x10f
  46. #define RDSOFFSET 0x180
  47. #define RDSEND 0x183
  48. #define ETHOFFSET 0x300
  49. #define ETHEND 0x3ff
  50. #define GPIOOFFSET 0x400
  51. #define GPIOEND 0x7ff
  52. #define CHIPCTLOFFSET 0x800
  53. #define CHIPCTLEND 0x8ff
  54. #define CHIPCTLSIZE (CHIPCTLEND - CHIPCTLOFFSET + 1)
  55. #define INTCOFFSET 0xc00
  56. #define INTCEND 0xfff
  57. #define INTCSIZE (INTCEND - INTCOFFSET)
  58. #define MOSTOFFSET 0x1000
  59. #define MOSTEND 0x13ff
  60. #define UARTOFFSET 0x1400
  61. #define UARTEND 0x17ff
  62. #define XIICOFFSET 0x1800
  63. #define XIICEND 0x19ff
  64. #define I2SOFFSET 0x1C00
  65. #define I2SEND 0x1fff
  66. #define LOGIWOFFSET 0x30000
  67. #define LOGIWEND 0x37fff
  68. #define MLCOREOFFSET 0x40000
  69. #define MLCOREEND 0x43fff
  70. #define DMAOFFSET 0x01000000
  71. #define DMAEND 0x013fffff
  72. /* SDHC0 is placed in PCI bar 1 */
  73. #define SDHC0OFFSET 0x00
  74. #define SDHC0END 0xff
  75. /* SDHC1 is placed in PCI bar 2 */
  76. #define SDHC1OFFSET 0x00
  77. #define SDHC1END 0xff
  78. #define PCI_VENDOR_ID_TIMB 0x10ee
  79. #define PCI_DEVICE_ID_TIMB 0xa123
  80. #define IRQ_TIMBERDALE_INIC 0
  81. #define IRQ_TIMBERDALE_MLB 1
  82. #define IRQ_TIMBERDALE_GPIO 2
  83. #define IRQ_TIMBERDALE_I2C 3
  84. #define IRQ_TIMBERDALE_UART 4
  85. #define IRQ_TIMBERDALE_DMA 5
  86. #define IRQ_TIMBERDALE_I2S 6
  87. #define IRQ_TIMBERDALE_TSC_INT 7
  88. #define IRQ_TIMBERDALE_SDHC 8
  89. #define IRQ_TIMBERDALE_ADV7180 9
  90. #define IRQ_TIMBERDALE_ETHSW_IF 10
  91. #define IRQ_TIMBERDALE_SPI 11
  92. #define IRQ_TIMBERDALE_UARTLITE 12
  93. #define IRQ_TIMBERDALE_MLCORE 13
  94. #define IRQ_TIMBERDALE_MLCORE_BUF 14
  95. #define IRQ_TIMBERDALE_RDS 15
  96. #define TIMBERDALE_NR_IRQS 16
  97. #define GPIO_PIN_ASCB 8
  98. #define GPIO_PIN_INIC_RST 14
  99. #define GPIO_PIN_BT_RST 15
  100. #define GPIO_NR_PINS 16
  101. /* DMA Channels */
  102. #define DMA_UART_RX 0
  103. #define DMA_UART_TX 1
  104. #define DMA_MLB_RX 2
  105. #define DMA_MLB_TX 3
  106. #define DMA_VIDEO_RX 4
  107. #define DMA_VIDEO_DROP 5
  108. #define DMA_SDHCI_RX 6
  109. #define DMA_SDHCI_TX 7
  110. #define DMA_ETH_RX 8
  111. #define DMA_ETH_TX 9
  112. #endif