gumstix.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. #include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
  9. /* BTRESET - Reset line to Bluetooth module, active low signal. */
  10. #define GPIO_GUMSTIX_BTRESET 7
  11. #define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
  12. /*
  13. GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
  14. interrupt signal for determining cable presence. 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. #define GPIO_GUMSTIX_USB_GPIOn 35
  19. #define GPIO_GUMSTIX_USB_GPIOx 41
  20. /* usb state change */
  21. #define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
  22. #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
  23. #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
  24. #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
  25. /*
  26. * SD/MMC definitions
  27. */
  28. #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
  29. #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
  30. #define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
  31. /*
  32. * SMC Ethernet definitions
  33. * ETH_RST provides a hardware reset line to the ethernet chip
  34. * ETH is the IRQ line in from the ethernet chip to the PXA
  35. */
  36. #define GPIO_GUMSTIX_ETH0_RST 80
  37. #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
  38. #define GPIO_GUMSTIX_ETH1_RST 52
  39. #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
  40. #define GPIO_GUMSTIX_ETH0 36
  41. #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
  42. #define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
  43. #define GPIO_GUMSTIX_ETH1 27
  44. #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
  45. #define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
  46. /* CF reset line */
  47. #define GPIO8_RESET 8
  48. /* CF slot 0 */
  49. #define GPIO4_nBVD1 4
  50. #define GPIO4_nSTSCHG GPIO4_nBVD1
  51. #define GPIO11_nCD 11
  52. #define GPIO26_PRDY_nBSY 26
  53. #define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG)
  54. #define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO11_nCD)
  55. #define GUMSTIX_S0_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY)
  56. /* CF slot 1 */
  57. #define GPIO18_nBVD1 18
  58. #define GPIO18_nSTSCHG GPIO18_nBVD1
  59. #define GPIO36_nCD 36
  60. #define GPIO27_PRDY_nBSY 27
  61. #define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG)
  62. #define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD)
  63. #define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY)
  64. /* CF GPIO line modes */
  65. #define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
  66. #define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
  67. #define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
  68. #define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
  69. #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
  70. #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
  71. #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
  72. /* for expansion boards that can't be programatically detected */
  73. extern int am200_init(void);
  74. extern int am300_init(void);