timberdale.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * timberdale.h timberdale FPGA MFD driver defines
  4. * Copyright (c) 2009 Intel Corporation
  5. */
  6. /* Supports:
  7. * Timberdale FPGA
  8. */
  9. #ifndef MFD_TIMBERDALE_H
  10. #define MFD_TIMBERDALE_H
  11. #define DRV_VERSION "0.3"
  12. /* This driver only support versions >= 3.8 and < 4.0 */
  13. #define TIMB_SUPPORTED_MAJOR 3
  14. /* This driver only support minor >= 8 */
  15. #define TIMB_REQUIRED_MINOR 8
  16. /* Registers of the control area */
  17. #define TIMB_REV_MAJOR 0x00
  18. #define TIMB_REV_MINOR 0x04
  19. #define TIMB_HW_CONFIG 0x08
  20. #define TIMB_SW_RST 0x40
  21. /* bits in the TIMB_HW_CONFIG register */
  22. #define TIMB_HW_CONFIG_SPI_8BIT 0x80
  23. #define TIMB_HW_VER_MASK 0x0f
  24. #define TIMB_HW_VER0 0x00
  25. #define TIMB_HW_VER1 0x01
  26. #define TIMB_HW_VER2 0x02
  27. #define TIMB_HW_VER3 0x03
  28. #define OCORESOFFSET 0x0
  29. #define OCORESEND 0x1f
  30. #define SPIOFFSET 0x80
  31. #define SPIEND 0xff
  32. #define UARTLITEOFFSET 0x100
  33. #define UARTLITEEND 0x10f
  34. #define RDSOFFSET 0x180
  35. #define RDSEND 0x183
  36. #define ETHOFFSET 0x300
  37. #define ETHEND 0x3ff
  38. #define GPIOOFFSET 0x400
  39. #define GPIOEND 0x7ff
  40. #define CHIPCTLOFFSET 0x800
  41. #define CHIPCTLEND 0x8ff
  42. #define CHIPCTLSIZE (CHIPCTLEND - CHIPCTLOFFSET + 1)
  43. #define INTCOFFSET 0xc00
  44. #define INTCEND 0xfff
  45. #define INTCSIZE (INTCEND - INTCOFFSET)
  46. #define MOSTOFFSET 0x1000
  47. #define MOSTEND 0x13ff
  48. #define UARTOFFSET 0x1400
  49. #define UARTEND 0x17ff
  50. #define XIICOFFSET 0x1800
  51. #define XIICEND 0x19ff
  52. #define I2SOFFSET 0x1C00
  53. #define I2SEND 0x1fff
  54. #define LOGIWOFFSET 0x30000
  55. #define LOGIWEND 0x37fff
  56. #define MLCOREOFFSET 0x40000
  57. #define MLCOREEND 0x43fff
  58. #define DMAOFFSET 0x01000000
  59. #define DMAEND 0x013fffff
  60. /* SDHC0 is placed in PCI bar 1 */
  61. #define SDHC0OFFSET 0x00
  62. #define SDHC0END 0xff
  63. /* SDHC1 is placed in PCI bar 2 */
  64. #define SDHC1OFFSET 0x00
  65. #define SDHC1END 0xff
  66. #define PCI_VENDOR_ID_TIMB 0x10ee
  67. #define PCI_DEVICE_ID_TIMB 0xa123
  68. #define IRQ_TIMBERDALE_INIC 0
  69. #define IRQ_TIMBERDALE_MLB 1
  70. #define IRQ_TIMBERDALE_GPIO 2
  71. #define IRQ_TIMBERDALE_I2C 3
  72. #define IRQ_TIMBERDALE_UART 4
  73. #define IRQ_TIMBERDALE_DMA 5
  74. #define IRQ_TIMBERDALE_I2S 6
  75. #define IRQ_TIMBERDALE_TSC_INT 7
  76. #define IRQ_TIMBERDALE_SDHC 8
  77. #define IRQ_TIMBERDALE_ADV7180 9
  78. #define IRQ_TIMBERDALE_ETHSW_IF 10
  79. #define IRQ_TIMBERDALE_SPI 11
  80. #define IRQ_TIMBERDALE_UARTLITE 12
  81. #define IRQ_TIMBERDALE_MLCORE 13
  82. #define IRQ_TIMBERDALE_MLCORE_BUF 14
  83. #define IRQ_TIMBERDALE_RDS 15
  84. #define TIMBERDALE_NR_IRQS 16
  85. #define GPIO_PIN_ASCB 8
  86. #define GPIO_PIN_INIC_RST 14
  87. #define GPIO_PIN_BT_RST 15
  88. #define GPIO_NR_PINS 16
  89. /* DMA Channels */
  90. #define DMA_UART_RX 0
  91. #define DMA_UART_TX 1
  92. #define DMA_MLB_RX 2
  93. #define DMA_MLB_TX 3
  94. #define DMA_VIDEO_RX 4
  95. #define DMA_VIDEO_DROP 5
  96. #define DMA_SDHCI_RX 6
  97. #define DMA_SDHCI_TX 7
  98. #define DMA_ETH_RX 8
  99. #define DMA_ETH_TX 9
  100. #endif