palmtc.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * linux/include/asm-arm/arch-pxa/palmtc-gpio.h
  3. *
  4. * GPIOs and interrupts for Palm Tungsten|C Handheld Computer
  5. *
  6. * Authors: Alex Osborne <bobofdoom@gmail.com>
  7. * Marek Vasut <marek.vasut@gmail.com>
  8. * Holger Bocklet <bitz.email@gmx.net>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. */
  15. #ifndef _INCLUDE_PALMTC_H_
  16. #define _INCLUDE_PALMTC_H_
  17. #include "irqs.h" /* PXA_GPIO_TO_IRQ */
  18. /** HERE ARE GPIOs **/
  19. /* GPIOs */
  20. #define GPIO_NR_PALMTC_EARPHONE_DETECT 2
  21. #define GPIO_NR_PALMTC_CRADLE_DETECT 5
  22. #define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7
  23. /* SD/MMC */
  24. #define GPIO_NR_PALMTC_SD_DETECT_N 12
  25. #define GPIO_NR_PALMTC_SD_POWER 32
  26. #define GPIO_NR_PALMTC_SD_READONLY 54
  27. /* WLAN */
  28. #define GPIO_NR_PALMTC_PCMCIA_READY 13
  29. #define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14
  30. #define GPIO_NR_PALMTC_PCMCIA_POWER1 15
  31. #define GPIO_NR_PALMTC_PCMCIA_POWER2 33
  32. #define GPIO_NR_PALMTC_PCMCIA_POWER3 55
  33. #define GPIO_NR_PALMTC_PCMCIA_RESET 78
  34. /* UDC */
  35. #define GPIO_NR_PALMTC_USB_DETECT_N 4
  36. #define GPIO_NR_PALMTC_USB_POWER 36
  37. /* LCD/BACKLIGHT */
  38. #define GPIO_NR_PALMTC_BL_POWER 16
  39. #define GPIO_NR_PALMTC_LCD_POWER 44
  40. #define GPIO_NR_PALMTC_LCD_BLANK 38
  41. /* UART */
  42. #define GPIO_NR_PALMTC_RS232_POWER 37
  43. /* IRDA */
  44. #define GPIO_NR_PALMTC_IR_DISABLE 45
  45. /* IRQs */
  46. #define IRQ_GPIO_PALMTC_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_SD_DETECT_N)
  47. #define IRQ_GPIO_PALMTC_WLAN_READY PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_WLAN_READY)
  48. /* UCB1400 GPIOs */
  49. #define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00)
  50. #define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01)
  51. #define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03)
  52. #define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05)
  53. #define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07)
  54. /** HERE ARE INIT VALUES **/
  55. #define PALMTC_UCB1400_GPIO_OFFSET 0x80
  56. /* BATTERY */
  57. #define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
  58. #define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
  59. #define PALMTC_BAT_MAX_CURRENT 0 /* unknown */
  60. #define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
  61. #define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
  62. #define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
  63. #define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */
  64. #define PALMTC_BAT_MEASURE_DELAY (HZ * 1)
  65. /* BACKLIGHT */
  66. #define PALMTC_MAX_INTENSITY 0xFE
  67. #define PALMTC_DEFAULT_INTENSITY 0x7E
  68. #define PALMTC_LIMIT_MASK 0x7F
  69. #define PALMTC_PRESCALER 0x3F
  70. #define PALMTC_PERIOD_NS 3500
  71. #endif