gumstix.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * arch/arm/mach-pxa/include/mach/gumstix.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. /* BTRESET - Reset line to Bluetooth module, active low signal. */
  9. #define GPIO_GUMSTIX_BTRESET 7
  10. #define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
  11. /*
  12. GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
  13. interrupt signal for determining cable presence. On the original gumstix,
  14. this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
  15. this moves to GPIO17 and GPIO37. */
  16. /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
  17. has detected a cable insertion; driven low otherwise. */
  18. #ifdef CONFIG_ARCH_GUMSTIX_ORIG
  19. #define GPIO_GUMSTIX_USB_GPIOn 81
  20. #define GPIO_GUMSTIX_USB_GPIOx 83
  21. #else
  22. #define GPIO_GUMSTIX_USB_GPIOn 35
  23. #define GPIO_GUMSTIX_USB_GPIOx 41
  24. #endif
  25. /* usb state change */
  26. #define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
  27. #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
  28. #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
  29. #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
  30. /*
  31. * SD/MMC definitions
  32. */
  33. #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
  34. #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
  35. #define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
  36. /*
  37. * SMC Ethernet definitions
  38. * ETH_RST provides a hardware reset line to the ethernet chip
  39. * ETH is the IRQ line in from the ethernet chip to the PXA
  40. */
  41. #define GPIO_GUMSTIX_ETH0_RST 80
  42. #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
  43. #define GPIO_GUMSTIX_ETH1_RST 52
  44. #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
  45. #define GPIO_GUMSTIX_ETH0 36
  46. #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
  47. #define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0)
  48. #define GPIO_GUMSTIX_ETH1 27
  49. #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
  50. #define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1)
  51. /* CF reset line */
  52. #define GPIO8_RESET 8
  53. /* CF slot 0 */
  54. #define GPIO4_nBVD1 4
  55. #define GPIO4_nSTSCHG GPIO4_nBVD1
  56. #define GPIO11_nCD 11
  57. #define GPIO26_PRDY_nBSY 26
  58. #define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO4_nSTSCHG)
  59. #define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO11_nCD)
  60. #define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO26_PRDY_nBSY)
  61. /* CF slot 1 */
  62. #define GPIO18_nBVD1 18
  63. #define GPIO18_nSTSCHG GPIO18_nBVD1
  64. #define GPIO36_nCD 36
  65. #define GPIO27_PRDY_nBSY 27
  66. #define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO18_nSTSCHG)
  67. #define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO36_nCD)
  68. #define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO27_PRDY_nBSY)
  69. /* CF GPIO line modes */
  70. #define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
  71. #define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
  72. #define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
  73. #define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
  74. #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
  75. #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
  76. #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
  77. /* for expansion boards that can't be programatically detected */
  78. extern int am200_init(void);
  79. extern int am300_init(void);