omap3-regs.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * (c) 2011 Comelit Group SpA, Luca Ceresoli <luca.ceresoli@comelit.it>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _OMAP3_REGS_H
  7. #define _OMAP3_REGS_H
  8. /*
  9. * Register definitions for OMAP3 processors.
  10. */
  11. /*
  12. * GPMC_CONFIG1 - GPMC_CONFIG7
  13. */
  14. /* Values for GPMC_CONFIG1 - signal control parameters */
  15. #define WRAPBURST (1 << 31)
  16. #define READMULTIPLE (1 << 30)
  17. #define READTYPE (1 << 29)
  18. #define WRITEMULTIPLE (1 << 28)
  19. #define WRITETYPE (1 << 27)
  20. #define CLKACTIVATIONTIME(x) (((x) & 3) << 25)
  21. #define ATTACHEDDEVICEPAGELENGTH(x) (((x) & 3) << 23)
  22. #define WAITREADMONITORING (1 << 22)
  23. #define WAITWRITEMONITORING (1 << 21)
  24. #define WAITMONITORINGTIME(x) (((x) & 3) << 18)
  25. #define WAITPINSELECT(x) (((x) & 3) << 16)
  26. #define DEVICESIZE(x) (((x) & 3) << 12)
  27. #define DEVICESIZE_8BIT DEVICESIZE(0)
  28. #define DEVICESIZE_16BIT DEVICESIZE(1)
  29. #define DEVICETYPE(x) (((x) & 3) << 10)
  30. #define DEVICETYPE_NOR DEVICETYPE(0)
  31. #define DEVICETYPE_NAND DEVICETYPE(2)
  32. #define MUXADDDATA (1 << 9)
  33. #define TIMEPARAGRANULARITY (1 << 4)
  34. #define GPMCFCLKDIVIDER(x) (((x) & 3) << 0)
  35. /* Values for GPMC_CONFIG2 - CS timing */
  36. #define CSWROFFTIME(x) (((x) & 0x1f) << 16)
  37. #define CSRDOFFTIME(x) (((x) & 0x1f) << 8)
  38. #define CSEXTRADELAY (1 << 7)
  39. #define CSONTIME(x) (((x) & 0xf) << 0)
  40. /* Values for GPMC_CONFIG3 - nADV timing */
  41. #define ADVWROFFTIME(x) (((x) & 0x1f) << 16)
  42. #define ADVRDOFFTIME(x) (((x) & 0x1f) << 8)
  43. #define ADVEXTRADELAY (1 << 7)
  44. #define ADVONTIME(x) (((x) & 0xf) << 0)
  45. /* Values for GPMC_CONFIG4 - nWE and nOE timing */
  46. #define WEOFFTIME(x) (((x) & 0x1f) << 24)
  47. #define WEEXTRADELAY (1 << 23)
  48. #define WEONTIME(x) (((x) & 0xf) << 16)
  49. #define OEOFFTIME(x) (((x) & 0x1f) << 8)
  50. #define OEEXTRADELAY (1 << 7)
  51. #define OEONTIME(x) (((x) & 0xf) << 0)
  52. /* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
  53. #define PAGEBURSTACCESSTIME(x) (((x) & 0xf) << 24)
  54. #define RDACCESSTIME(x) (((x) & 0x1f) << 16)
  55. #define WRCYCLETIME(x) (((x) & 0x1f) << 8)
  56. #define RDCYCLETIME(x) (((x) & 0x1f) << 0)
  57. /* Values for GPMC_CONFIG6 - misc timings */
  58. #define WRACCESSTIME(x) (((x) & 0x1f) << 24)
  59. #define WRDATAONADMUXBUS(x) (((x) & 0xf) << 16)
  60. #define CYCLE2CYCLEDELAY(x) (((x) & 0xf) << 8)
  61. #define CYCLE2CYCLESAMECSEN (1 << 7)
  62. #define CYCLE2CYCLEDIFFCSEN (1 << 6)
  63. #define BUSTURNAROUND(x) (((x) & 0xf) << 0)
  64. /* Values for GPMC_CONFIG7 - CS address mapping configuration */
  65. #define MASKADDRESS(x) (((x) & 0xf) << 8)
  66. #define CSVALID (1 << 6)
  67. #define BASEADDRESS(x) (((x) & 0x3f) << 0)
  68. #endif /* _OMAP3_REGS_H */