palmtx.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * GPIOs and interrupts for Palm T|X Handheld Computer
  4. *
  5. * Based on palmld-gpio.h by Alex Osborne
  6. *
  7. * Authors: Marek Vasut <[email protected]>
  8. * Cristiano P. <[email protected]>
  9. * Jan Herman <[email protected]>
  10. */
  11. #ifndef _INCLUDE_PALMTX_H_
  12. #define _INCLUDE_PALMTX_H_
  13. #include "irqs.h" /* PXA_GPIO_TO_IRQ */
  14. /** HERE ARE GPIOs **/
  15. /* GPIOs */
  16. #define GPIO_NR_PALMTX_GPIO_RESET 1
  17. #define GPIO_NR_PALMTX_POWER_DETECT 12 /* 90 */
  18. #define GPIO_NR_PALMTX_HOTSYNC_BUTTON_N 10
  19. #define GPIO_NR_PALMTX_EARPHONE_DETECT 107
  20. /* SD/MMC */
  21. #define GPIO_NR_PALMTX_SD_DETECT_N 14
  22. #define GPIO_NR_PALMTX_SD_POWER 114 /* probably */
  23. #define GPIO_NR_PALMTX_SD_READONLY 115 /* probably */
  24. /* TOUCHSCREEN */
  25. #define GPIO_NR_PALMTX_WM9712_IRQ 27
  26. /* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
  27. #define GPIO_NR_PALMTX_IR_DISABLE 40
  28. /* USB */
  29. #define GPIO_NR_PALMTX_USB_DETECT_N 13
  30. #define GPIO_NR_PALMTX_USB_PULLUP 93
  31. /* LCD/BACKLIGHT */
  32. #define GPIO_NR_PALMTX_BL_POWER 84
  33. #define GPIO_NR_PALMTX_LCD_POWER 96
  34. /* LCD BORDER */
  35. #define GPIO_NR_PALMTX_BORDER_SWITCH 98
  36. #define GPIO_NR_PALMTX_BORDER_SELECT 22
  37. /* BLUETOOTH */
  38. #define GPIO_NR_PALMTX_BT_POWER 17
  39. #define GPIO_NR_PALMTX_BT_RESET 83
  40. /* PCMCIA (WiFi) */
  41. #define GPIO_NR_PALMTX_PCMCIA_POWER1 94
  42. #define GPIO_NR_PALMTX_PCMCIA_POWER2 108
  43. #define GPIO_NR_PALMTX_PCMCIA_RESET 79
  44. #define GPIO_NR_PALMTX_PCMCIA_READY 116
  45. /* NAND Flash ... this GPIO may be incorrect! */
  46. #define GPIO_NR_PALMTX_NAND_BUFFER_DIR 79
  47. /* INTERRUPTS */
  48. #define IRQ_GPIO_PALMTX_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_SD_DETECT_N)
  49. #define IRQ_GPIO_PALMTX_WM9712_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_WM9712_IRQ)
  50. #define IRQ_GPIO_PALMTX_USB_DETECT PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_USB_DETECT)
  51. #define IRQ_GPIO_PALMTX_GPIO_RESET PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_GPIO_RESET)
  52. /** HERE ARE INIT VALUES **/
  53. /* Various addresses */
  54. #define PALMTX_PCMCIA_PHYS 0x28000000
  55. #define PALMTX_PCMCIA_VIRT IOMEM(0xf0000000)
  56. #define PALMTX_PCMCIA_SIZE 0x100000
  57. #define PALMTX_PHYS_RAM_START 0xa0000000
  58. #define PALMTX_PHYS_IO_START 0x40000000
  59. #define PALMTX_STR_BASE 0xa0200000
  60. #define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
  61. #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
  62. #define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24))
  63. #define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25))
  64. #define PALMTX_NAND_ALE_VIRT IOMEM(0xff100000)
  65. #define PALMTX_NAND_CLE_VIRT IOMEM(0xff200000)
  66. /* TOUCHSCREEN */
  67. #define AC97_LINK_FRAME 21
  68. /* BATTERY */
  69. #define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
  70. #define PALMTX_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
  71. #define PALMTX_BAT_MAX_CURRENT 0 /* unknown */
  72. #define PALMTX_BAT_MIN_CURRENT 0 /* unknown */
  73. #define PALMTX_BAT_MAX_CHARGE 1 /* unknown */
  74. #define PALMTX_BAT_MIN_CHARGE 1 /* unknown */
  75. #define PALMTX_MAX_LIFE_MINS 360 /* on-life in minutes */
  76. #define PALMTX_BAT_MEASURE_DELAY (HZ * 1)
  77. /* BACKLIGHT */
  78. #define PALMTX_MAX_INTENSITY 0xFE
  79. #define PALMTX_DEFAULT_INTENSITY 0x7E
  80. #define PALMTX_LIMIT_MASK 0x7F
  81. #define PALMTX_PRESCALER 0x3F
  82. #define PALMTX_PERIOD_NS 3500
  83. #endif