palmtc.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. /** HERE ARE GPIOs **/
  18. /* GPIOs */
  19. #define GPIO_NR_PALMTC_EARPHONE_DETECT 2
  20. #define GPIO_NR_PALMTC_CRADLE_DETECT 5
  21. #define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7
  22. /* SD/MMC */
  23. #define GPIO_NR_PALMTC_SD_DETECT_N 12
  24. #define GPIO_NR_PALMTC_SD_POWER 32
  25. #define GPIO_NR_PALMTC_SD_READONLY 54
  26. /* WLAN */
  27. #define GPIO_NR_PALMTC_PCMCIA_READY 13
  28. #define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14
  29. #define GPIO_NR_PALMTC_PCMCIA_POWER1 15
  30. #define GPIO_NR_PALMTC_PCMCIA_POWER2 33
  31. #define GPIO_NR_PALMTC_PCMCIA_POWER3 55
  32. #define GPIO_NR_PALMTC_PCMCIA_RESET 78
  33. /* UDC */
  34. #define GPIO_NR_PALMTC_USB_DETECT_N 4
  35. #define GPIO_NR_PALMTC_USB_POWER 36
  36. /* LCD/BACKLIGHT */
  37. #define GPIO_NR_PALMTC_BL_POWER 16
  38. #define GPIO_NR_PALMTC_LCD_POWER 44
  39. #define GPIO_NR_PALMTC_LCD_BLANK 38
  40. /* UART */
  41. #define GPIO_NR_PALMTC_RS232_POWER 37
  42. /* IRDA */
  43. #define GPIO_NR_PALMTC_IR_DISABLE 45
  44. /* IRQs */
  45. #define IRQ_GPIO_PALMTC_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_SD_DETECT_N)
  46. #define IRQ_GPIO_PALMTC_WLAN_READY PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_WLAN_READY)
  47. /* UCB1400 GPIOs */
  48. #define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00)
  49. #define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01)
  50. #define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03)
  51. #define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05)
  52. #define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07)
  53. /** HERE ARE INIT VALUES **/
  54. #define PALMTC_UCB1400_GPIO_OFFSET 0x80
  55. /* BATTERY */
  56. #define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
  57. #define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
  58. #define PALMTC_BAT_MAX_CURRENT 0 /* unknown */
  59. #define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
  60. #define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
  61. #define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
  62. #define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */
  63. #define PALMTC_BAT_MEASURE_DELAY (HZ * 1)
  64. /* BACKLIGHT */
  65. #define PALMTC_MAX_INTENSITY 0xFE
  66. #define PALMTC_DEFAULT_INTENSITY 0x7E
  67. #define PALMTC_LIMIT_MASK 0x7F
  68. #define PALMTC_PRESCALER 0x3F
  69. #define PALMTC_PERIOD_NS 3500
  70. #endif