palmld.h 2.9 KB

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