gpio-bank-c.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * Ben Dooks <ben@simtec.co.uk>
  6. * http://armlinux.simtec.co.uk/
  7. *
  8. * GPIO Bank C register and configuration definitions
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #define S3C64XX_GPCCON (S3C64XX_GPC_BASE + 0x00)
  15. #define S3C64XX_GPCDAT (S3C64XX_GPC_BASE + 0x04)
  16. #define S3C64XX_GPCPUD (S3C64XX_GPC_BASE + 0x08)
  17. #define S3C64XX_GPCCONSLP (S3C64XX_GPC_BASE + 0x0c)
  18. #define S3C64XX_GPCPUDSLP (S3C64XX_GPC_BASE + 0x10)
  19. #define S3C64XX_GPC_CONMASK(__gpio) (0xf << ((__gpio) * 4))
  20. #define S3C64XX_GPC_INPUT(__gpio) (0x0 << ((__gpio) * 4))
  21. #define S3C64XX_GPC_OUTPUT(__gpio) (0x1 << ((__gpio) * 4))
  22. #define S3C64XX_GPC0_SPI_MISO0 (0x02 << 0)
  23. #define S3C64XX_GPC0_EINT_G2_0 (0x07 << 0)
  24. #define S3C64XX_GPC1_SPI_CLKO (0x02 << 4)
  25. #define S3C64XX_GPC1_EINT_G2_1 (0x07 << 4)
  26. #define S3C64XX_GPC2_SPI_MOSIO (0x02 << 8)
  27. #define S3C64XX_GPC2_EINT_G2_2 (0x07 << 8)
  28. #define S3C64XX_GPC3_SPI_nCSO (0x02 << 12)
  29. #define S3C64XX_GPC3_EINT_G2_3 (0x07 << 12)
  30. #define S3C64XX_GPC4_SPI_MISO1 (0x02 << 16)
  31. #define S3C64XX_GPC4_MMC2_CMD (0x03 << 16)
  32. #define S3C64XX_GPC4_I2S0_V40_DO (0x05 << 16)
  33. #define S3C64XX_GPC4_EINT_G2_4 (0x07 << 16)
  34. #define S3C64XX_GPC5_SPI_CLK1 (0x02 << 20)
  35. #define S3C64XX_GPC5_MMC2_CLK (0x03 << 20)
  36. #define S3C64XX_GPC5_I2S1_V40_DO (0x05 << 20)
  37. #define S3C64XX_GPC5_EINT_G2_5 (0x07 << 20)
  38. #define S3C64XX_GPC6_SPI_MOSI1 (0x02 << 24)
  39. #define S3C64XX_GPC6_EINT_G2_6 (0x07 << 24)
  40. #define S3C64XX_GPC7_SPI_nCS1 (0x02 << 28)
  41. #define S3C64XX_GPC7_I2S2_V40_DO (0x05 << 28)
  42. #define S3C64XX_GPC7_EINT_G2_7 (0x07 << 28)