palmld.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * GPIOs and interrupts for Palm LifeDrive Handheld Computer
  3. *
  4. * Authors: Alex Osborne <ato@meshy.org>
  5. * Marek Vasut <marek.vasut@gmail.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. */
  12. #ifndef _INCLUDE_PALMLD_H_
  13. #define _INCLUDE_PALMLD_H_
  14. #include "irqs.h" /* PXA_GPIO_TO_IRQ */
  15. /** HERE ARE GPIOs **/
  16. /* GPIOs */
  17. #define GPIO_NR_PALMLD_GPIO_RESET 1
  18. #define GPIO_NR_PALMLD_POWER_DETECT 4
  19. #define GPIO_NR_PALMLD_HOTSYNC_BUTTON_N 10
  20. #define GPIO_NR_PALMLD_POWER_SWITCH 12
  21. #define GPIO_NR_PALMLD_EARPHONE_DETECT 13
  22. #define GPIO_NR_PALMLD_LOCK_SWITCH 15
  23. /* SD/MMC */
  24. #define GPIO_NR_PALMLD_SD_DETECT_N 14
  25. #define GPIO_NR_PALMLD_SD_POWER 114
  26. #define GPIO_NR_PALMLD_SD_READONLY 116
  27. /* TOUCHSCREEN */
  28. #define GPIO_NR_PALMLD_WM9712_IRQ 27
  29. /* IRDA */
  30. #define GPIO_NR_PALMLD_IR_DISABLE 108
  31. /* LCD/BACKLIGHT */
  32. #define GPIO_NR_PALMLD_BL_POWER 19
  33. #define GPIO_NR_PALMLD_LCD_POWER 96
  34. /* LCD BORDER */
  35. #define GPIO_NR_PALMLD_BORDER_SWITCH 21
  36. #define GPIO_NR_PALMLD_BORDER_SELECT 22
  37. /* BLUETOOTH */
  38. #define GPIO_NR_PALMLD_BT_POWER 17
  39. #define GPIO_NR_PALMLD_BT_RESET 83
  40. /* PCMCIA (WiFi) */
  41. #define GPIO_NR_PALMLD_PCMCIA_READY 38
  42. #define GPIO_NR_PALMLD_PCMCIA_POWER 36
  43. #define GPIO_NR_PALMLD_PCMCIA_RESET 81
  44. /* LEDs */
  45. #define GPIO_NR_PALMLD_LED_GREEN 52
  46. #define GPIO_NR_PALMLD_LED_AMBER 94
  47. /* IDE */
  48. #define GPIO_NR_PALMLD_IDE_RESET 98
  49. #define GPIO_NR_PALMLD_IDE_PWEN 115
  50. /* USB */
  51. #define GPIO_NR_PALMLD_USB_DETECT_N 3
  52. #define GPIO_NR_PALMLD_USB_READY 86
  53. #define GPIO_NR_PALMLD_USB_RESET 88
  54. #define GPIO_NR_PALMLD_USB_INT 106
  55. #define GPIO_NR_PALMLD_USB_POWER 118
  56. /* 20, 53 and 86 are usb related too */
  57. /* INTERRUPTS */
  58. #define IRQ_GPIO_PALMLD_GPIO_RESET PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_GPIO_RESET)
  59. #define IRQ_GPIO_PALMLD_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_SD_DETECT_N)
  60. #define IRQ_GPIO_PALMLD_WM9712_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_WM9712_IRQ)
  61. #define IRQ_GPIO_PALMLD_IDE_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_IDE_IRQ)
  62. /** HERE ARE INIT VALUES **/
  63. /* IO mappings */
  64. #define PALMLD_USB_PHYS PXA_CS2_PHYS
  65. #define PALMLD_USB_VIRT 0xf0000000
  66. #define PALMLD_USB_SIZE 0x00100000
  67. #define PALMLD_IDE_PHYS 0x20000000
  68. #define PALMLD_IDE_VIRT 0xf1000000
  69. #define PALMLD_IDE_SIZE 0x00100000
  70. #define PALMLD_PHYS_IO_START 0x40000000
  71. #define PALMLD_STR_BASE 0xa0200000
  72. /* BATTERY */
  73. #define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
  74. #define PALMLD_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
  75. #define PALMLD_BAT_MAX_CURRENT 0 /* unknown */
  76. #define PALMLD_BAT_MIN_CURRENT 0 /* unknown */
  77. #define PALMLD_BAT_MAX_CHARGE 1 /* unknown */
  78. #define PALMLD_BAT_MIN_CHARGE 1 /* unknown */
  79. #define PALMLD_MAX_LIFE_MINS 240 /* on-life in minutes */
  80. #define PALMLD_BAT_MEASURE_DELAY (HZ * 1)
  81. /* BACKLIGHT */
  82. #define PALMLD_MAX_INTENSITY 0xFE
  83. #define PALMLD_DEFAULT_INTENSITY 0x7E
  84. #define PALMLD_LIMIT_MASK 0x7F
  85. #define PALMLD_PRESCALER 0x3F
  86. #define PALMLD_PERIOD_NS 3500
  87. #endif