palmld.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. /** HERE ARE GPIOs **/
  15. /* GPIOs */
  16. #define GPIO_NR_PALMLD_GPIO_RESET 1
  17. #define GPIO_NR_PALMLD_POWER_DETECT 4
  18. #define GPIO_NR_PALMLD_HOTSYNC_BUTTON_N 10
  19. #define GPIO_NR_PALMLD_POWER_SWITCH 12
  20. #define GPIO_NR_PALMLD_EARPHONE_DETECT 13
  21. #define GPIO_NR_PALMLD_LOCK_SWITCH 15
  22. /* SD/MMC */
  23. #define GPIO_NR_PALMLD_SD_DETECT_N 14
  24. #define GPIO_NR_PALMLD_SD_POWER 114
  25. #define GPIO_NR_PALMLD_SD_READONLY 116
  26. /* TOUCHSCREEN */
  27. #define GPIO_NR_PALMLD_WM9712_IRQ 27
  28. /* IRDA */
  29. #define GPIO_NR_PALMLD_IR_DISABLE 108
  30. /* LCD/BACKLIGHT */
  31. #define GPIO_NR_PALMLD_BL_POWER 19
  32. #define GPIO_NR_PALMLD_LCD_POWER 96
  33. /* LCD BORDER */
  34. #define GPIO_NR_PALMLD_BORDER_SWITCH 21
  35. #define GPIO_NR_PALMLD_BORDER_SELECT 22
  36. /* BLUETOOTH */
  37. #define GPIO_NR_PALMLD_BT_POWER 17
  38. #define GPIO_NR_PALMLD_BT_RESET 83
  39. /* PCMCIA (WiFi) */
  40. #define GPIO_NR_PALMLD_PCMCIA_READY 38
  41. #define GPIO_NR_PALMLD_PCMCIA_POWER 36
  42. #define GPIO_NR_PALMLD_PCMCIA_RESET 81
  43. /* LEDs */
  44. #define GPIO_NR_PALMLD_LED_GREEN 52
  45. #define GPIO_NR_PALMLD_LED_AMBER 94
  46. /* IDE */
  47. #define GPIO_NR_PALMLD_IDE_RESET 98
  48. #define GPIO_NR_PALMLD_IDE_PWEN 115
  49. /* USB */
  50. #define GPIO_NR_PALMLD_USB_DETECT_N 3
  51. #define GPIO_NR_PALMLD_USB_READY 86
  52. #define GPIO_NR_PALMLD_USB_RESET 88
  53. #define GPIO_NR_PALMLD_USB_INT 106
  54. #define GPIO_NR_PALMLD_USB_POWER 118
  55. /* 20, 53 and 86 are usb related too */
  56. /* INTERRUPTS */
  57. #define IRQ_GPIO_PALMLD_GPIO_RESET PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_GPIO_RESET)
  58. #define IRQ_GPIO_PALMLD_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_SD_DETECT_N)
  59. #define IRQ_GPIO_PALMLD_WM9712_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_WM9712_IRQ)
  60. #define IRQ_GPIO_PALMLD_IDE_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMLD_IDE_IRQ)
  61. /** HERE ARE INIT VALUES **/
  62. /* IO mappings */
  63. #define PALMLD_USB_PHYS PXA_CS2_PHYS
  64. #define PALMLD_USB_VIRT 0xf0000000
  65. #define PALMLD_USB_SIZE 0x00100000
  66. #define PALMLD_IDE_PHYS 0x20000000
  67. #define PALMLD_IDE_VIRT 0xf1000000
  68. #define PALMLD_IDE_SIZE 0x00100000
  69. #define PALMLD_PHYS_IO_START 0x40000000
  70. #define PALMLD_STR_BASE 0xa0200000
  71. /* BATTERY */
  72. #define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
  73. #define PALMLD_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
  74. #define PALMLD_BAT_MAX_CURRENT 0 /* unknown */
  75. #define PALMLD_BAT_MIN_CURRENT 0 /* unknown */
  76. #define PALMLD_BAT_MAX_CHARGE 1 /* unknown */
  77. #define PALMLD_BAT_MIN_CHARGE 1 /* unknown */
  78. #define PALMLD_MAX_LIFE_MINS 240 /* on-life in minutes */
  79. #define PALMLD_BAT_MEASURE_DELAY (HZ * 1)
  80. /* BACKLIGHT */
  81. #define PALMLD_MAX_INTENSITY 0xFE
  82. #define PALMLD_DEFAULT_INTENSITY 0x7E
  83. #define PALMLD_LIMIT_MASK 0x7F
  84. #define PALMLD_PRESCALER 0x3F
  85. #define PALMLD_PERIOD_NS 3500
  86. #endif