gumstix.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 gumstix F,
  14. this moves to GPIO17 and GPIO37. */
  15. /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
  16. has detected a cable insertion; driven low otherwise. */
  17. #define GPIO_GUMSTIX_USB_GPIOn 35
  18. #define GPIO_GUMSTIX_USB_GPIOx 41
  19. /* usb state change */
  20. #define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
  21. #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
  22. #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
  23. #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
  24. /*
  25. * SD/MMC definitions
  26. */
  27. #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
  28. #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
  29. #define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
  30. /*
  31. * SMC Ethernet definitions
  32. * ETH_RST provides a hardware reset line to the ethernet chip
  33. * ETH is the IRQ line in from the ethernet chip to the PXA
  34. */
  35. #define GPIO_GUMSTIX_ETH0_RST 80
  36. #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
  37. #define GPIO_GUMSTIX_ETH1_RST 52
  38. #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
  39. #define GPIO_GUMSTIX_ETH0 36
  40. #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
  41. #define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
  42. #define GPIO_GUMSTIX_ETH1 27
  43. #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
  44. #define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
  45. /* CF reset line */
  46. #define GPIO8_RESET 8
  47. /* CF slot 0 */
  48. #define GPIO4_nBVD1 4
  49. #define GPIO4_nSTSCHG GPIO4_nBVD1
  50. #define GPIO11_nCD 11
  51. #define GPIO26_PRDY_nBSY 26
  52. #define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG)
  53. #define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO11_nCD)
  54. #define GUMSTIX_S0_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY)
  55. /* CF slot 1 */
  56. #define GPIO18_nBVD1 18
  57. #define GPIO18_nSTSCHG GPIO18_nBVD1
  58. #define GPIO36_nCD 36
  59. #define GPIO27_PRDY_nBSY 27
  60. #define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG)
  61. #define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD)
  62. #define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY)
  63. /* CF GPIO line modes */
  64. #define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
  65. #define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
  66. #define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
  67. #define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
  68. #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
  69. #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
  70. #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
  71. /* for expansion boards that can't be programatically detected */
  72. extern int am200_init(void);
  73. extern int am300_init(void);