palmtc.h 2.3 KB

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