balloon3.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * linux/include/asm-arm/arch-pxa/balloon3.h
  3. *
  4. * Authors: Nick Bane and Wookey
  5. * Created: Oct, 2005
  6. * Copyright: Toby Churchill Ltd
  7. * Cribbed from mainstone.c, by Nicholas Pitre
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef ASM_ARCH_BALLOON3_H
  14. #define ASM_ARCH_BALLOON3_H
  15. enum balloon3_features {
  16. BALLOON3_FEATURE_OHCI,
  17. BALLOON3_FEATURE_MMC,
  18. BALLOON3_FEATURE_CF,
  19. BALLOON3_FEATURE_AUDIO,
  20. BALLOON3_FEATURE_TOPPOLY,
  21. };
  22. #define BALLOON3_FPGA_PHYS PXA_CS4_PHYS
  23. #define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */
  24. #define BALLOON3_FPGA_LENGTH 0x01000000
  25. /* FPGA/CPLD registers */
  26. #define BALLOON3_PCMCIA0_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
  27. /* fixme - same for now */
  28. #define BALLOON3_PCMCIA1_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
  29. #define BALLOON3_NANDIO_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000)
  30. /* fpga/cpld interrupt control register */
  31. #define BALLOON3_INT_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e0000C)
  32. #define BALLOON3_NANDIO_CTL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010)
  33. #define BALLOON3_NANDIO_CTL_REG (BALLOON3_FPGA_VIRT + 0x00e00014)
  34. #define BALLOON3_VERSION_REG (BALLOON3_FPGA_VIRT + 0x00e0001c)
  35. #define BALLOON3_SAMOSA_ADDR_REG (BALLOON3_FPGA_VIRT + 0x00c00000)
  36. #define BALLOON3_SAMOSA_DATA_REG (BALLOON3_FPGA_VIRT + 0x00c00004)
  37. #define BALLOON3_SAMOSA_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00c0001c)
  38. /* GPIOs for irqs */
  39. #define BALLOON3_GPIO_AUX_NIRQ (94)
  40. #define BALLOON3_GPIO_CODEC_IRQ (95)
  41. /* Timer and Idle LED locations */
  42. #define BALLOON3_GPIO_LED_NAND (9)
  43. #define BALLOON3_GPIO_LED_IDLE (10)
  44. /* backlight control */
  45. #define BALLOON3_GPIO_RUN_BACKLIGHT (99)
  46. #define BALLOON3_GPIO_S0_CD (105)
  47. /* FPGA Interrupt Mask/Acknowledge Register */
  48. #define BALLOON3_INT_S0_IRQ (1 << 0) /* PCMCIA 0 IRQ */
  49. #define BALLOON3_INT_S0_STSCHG (1 << 1) /* PCMCIA 0 status changed */
  50. /* CF Status Register */
  51. #define BALLOON3_PCMCIA_nIRQ (1 << 0) /* IRQ / ready signal */
  52. #define BALLOON3_PCMCIA_nSTSCHG_BVD1 (1 << 1)
  53. /* VDD sense / card status changed */
  54. /* CF control register (write) */
  55. #define BALLOON3_PCMCIA_RESET (1 << 0) /* Card reset signal */
  56. #define BALLOON3_PCMCIA_ENABLE (1 << 1)
  57. #define BALLOON3_PCMCIA_ADD_ENABLE (1 << 2)
  58. /* CPLD (and FPGA) interface definitions */
  59. #define CPLD_LCD0_DATA_SET 0x00
  60. #define CPLD_LCD0_DATA_CLR 0x10
  61. #define CPLD_LCD0_COMMAND_SET 0x01
  62. #define CPLD_LCD0_COMMAND_CLR 0x11
  63. #define CPLD_LCD1_DATA_SET 0x02
  64. #define CPLD_LCD1_DATA_CLR 0x12
  65. #define CPLD_LCD1_COMMAND_SET 0x03
  66. #define CPLD_LCD1_COMMAND_CLR 0x13
  67. #define CPLD_MISC_SET 0x07
  68. #define CPLD_MISC_CLR 0x17
  69. #define CPLD_MISC_LOON_NRESET_BIT 0
  70. #define CPLD_MISC_LOON_UNSUSP_BIT 1
  71. #define CPLD_MISC_RUN_5V_BIT 2
  72. #define CPLD_MISC_CHG_D0_BIT 3
  73. #define CPLD_MISC_CHG_D1_BIT 4
  74. #define CPLD_MISC_DAC_NCS_BIT 5
  75. #define CPLD_LCD_SET 0x08
  76. #define CPLD_LCD_CLR 0x18
  77. #define CPLD_LCD_BACKLIGHT_EN_0_BIT 0
  78. #define CPLD_LCD_BACKLIGHT_EN_1_BIT 1
  79. #define CPLD_LCD_LED_RED_BIT 4
  80. #define CPLD_LCD_LED_GREEN_BIT 5
  81. #define CPLD_LCD_NRESET_BIT 7
  82. #define CPLD_LCD_RO_SET 0x09
  83. #define CPLD_LCD_RO_CLR 0x19
  84. #define CPLD_LCD_RO_LCD0_nWAIT_BIT 0
  85. #define CPLD_LCD_RO_LCD1_nWAIT_BIT 1
  86. #define CPLD_SERIAL_SET 0x0a
  87. #define CPLD_SERIAL_CLR 0x1a
  88. #define CPLD_SERIAL_GSM_RI_BIT 0
  89. #define CPLD_SERIAL_GSM_CTS_BIT 1
  90. #define CPLD_SERIAL_GSM_DTR_BIT 2
  91. #define CPLD_SERIAL_LPR_CTS_BIT 3
  92. #define CPLD_SERIAL_TC232_CTS_BIT 4
  93. #define CPLD_SERIAL_TC232_DSR_BIT 5
  94. #define CPLD_SROUTING_SET 0x0b
  95. #define CPLD_SROUTING_CLR 0x1b
  96. #define CPLD_SROUTING_MSP430_LPR 0
  97. #define CPLD_SROUTING_MSP430_TC232 1
  98. #define CPLD_SROUTING_MSP430_GSM 2
  99. #define CPLD_SROUTING_LOON_LPR (0 << 4)
  100. #define CPLD_SROUTING_LOON_TC232 (1 << 4)
  101. #define CPLD_SROUTING_LOON_GSM (2 << 4)
  102. #define CPLD_AROUTING_SET 0x0c
  103. #define CPLD_AROUTING_CLR 0x1c
  104. #define CPLD_AROUTING_MIC2PHONE_BIT 0
  105. #define CPLD_AROUTING_PHONE2INT_BIT 1
  106. #define CPLD_AROUTING_PHONE2EXT_BIT 2
  107. #define CPLD_AROUTING_LOONL2INT_BIT 3
  108. #define CPLD_AROUTING_LOONL2EXT_BIT 4
  109. #define CPLD_AROUTING_LOONR2PHONE_BIT 5
  110. #define CPLD_AROUTING_LOONR2INT_BIT 6
  111. #define CPLD_AROUTING_LOONR2EXT_BIT 7
  112. extern int balloon3_has(enum balloon3_features feature);
  113. #endif