mvgpio.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2011
  4. * eInfochips Ltd. <www.einfochips.com>
  5. * Written-by: Ajay Bhargav <contact@8051projects.net>
  6. *
  7. * (C) Copyright 2010
  8. * Marvell Semiconductor <www.marvell.com>
  9. */
  10. #ifndef __MVGPIO_H__
  11. #define __MVGPIO_H__
  12. #include <common.h>
  13. /*
  14. * GPIO Register map for Marvell SOCs
  15. */
  16. struct gpio_reg {
  17. u32 gplr; /* Pin Level Register - 0x0000 */
  18. u32 pad0[2];
  19. u32 gpdr; /* Pin Direction Register - 0x000C */
  20. u32 pad1[2];
  21. u32 gpsr; /* Pin Output Set Register - 0x0018 */
  22. u32 pad2[2];
  23. u32 gpcr; /* Pin Output Clear Register - 0x0024 */
  24. u32 pad3[2];
  25. u32 grer; /* Rising-Edge Detect Enable Register - 0x0030 */
  26. u32 pad4[2];
  27. u32 gfer; /* Falling-Edge Detect Enable Register - 0x003C */
  28. u32 pad5[2];
  29. u32 gedr; /* Edge Detect Status Register - 0x0048 */
  30. u32 pad6[2];
  31. u32 gsdr; /* Bitwise Set of GPIO Direction Register - 0x0054 */
  32. u32 pad7[2];
  33. u32 gcdr; /* Bitwise Clear of GPIO Direction Register - 0x0060 */
  34. u32 pad8[2];
  35. u32 gsrer; /* Bitwise Set of Rising-Edge Detect Enable
  36. Register - 0x006C */
  37. u32 pad9[2];
  38. u32 gcrer; /* Bitwise Clear of Rising-Edge Detect Enable
  39. Register - 0x0078 */
  40. u32 pad10[2];
  41. u32 gsfer; /* Bitwise Set of Falling-Edge Detect Enable
  42. Register - 0x0084 */
  43. u32 pad11[2];
  44. u32 gcfer; /* Bitwise Clear of Falling-Edge Detect Enable
  45. Register - 0x0090 */
  46. u32 pad12[2];
  47. u32 apmask; /* Bitwise Mask of Edge Detect Register - 0x009C */
  48. };
  49. #endif /* __MVGPIO_H__ */