omap3-regs.h 2.9 KB

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