dv-bfin_otp.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* Blackfin One-Time Programmable Memory (OTP) model
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. Contributed by Analog Devices, Inc.
  4. This file is part of simulators.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef DV_BFIN_OTP_H
  16. #define DV_BFIN_OTP_H
  17. /* OTP Defined Pages. */
  18. #define FPS00 0x004
  19. #define FPS01 0x005
  20. #define FPS02 0x006
  21. #define FPS03 0x007
  22. #define FPS04 0x008
  23. #define FPS05 0x009
  24. #define FPS06 0x00A
  25. #define FPS07 0x00B
  26. #define FPS08 0x00C
  27. #define FPS09 0x00D
  28. #define FPS10 0x00E
  29. #define FPS11 0x00F
  30. #define CPS00 0x010
  31. #define CPS01 0x011
  32. #define CPS02 0x012
  33. #define CPS03 0x013
  34. #define CPS04 0x014
  35. #define CPS05 0x015
  36. #define CPS06 0x016
  37. #define CPS07 0x017
  38. #define PBS00 0x018
  39. #define PBS01 0x019
  40. #define PBS02 0x01A
  41. #define PBS03 0x01B
  42. #define PUB000 0x01C
  43. #define PUBCRC000 0x0E0
  44. #define PRIV000 0x110
  45. #define PRIVCRC000 0x1E0
  46. /* FPS03 Part values. */
  47. #define FPS03_BF51XF(n) (FPS03_BF##n | 0xF000)
  48. #define FPS03_BF512 0x0200
  49. #define FPS03_BF512F FPS03_BF51XF(512)
  50. #define FPS03_BF514 0x0202
  51. #define FPS03_BF514F FPS03_BF51XF(514)
  52. #define FPS03_BF516 0x0204
  53. #define FPS03_BF516F FPS03_BF51XF(516)
  54. #define FPS03_BF518 0x0206
  55. #define FPS03_BF518F FPS03_BF51XF(518)
  56. #define FPS03_BF52X_C1(n) (FPS03_BF##n | 0x8000)
  57. #define FPS03_BF52X_C2(n) (FPS03_BF##n | 0x4000)
  58. #define FPS03_BF522 0x020A
  59. #define FPS03_BF522_C1 FPS03_BF52X_C1(522)
  60. #define FPS03_BF522_C2 FPS03_BF52X_C2(522)
  61. #define FPS03_BF523 0x020B
  62. #define FPS03_BF523_C1 FPS03_BF52X_C1(523)
  63. #define FPS03_BF523_C2 FPS03_BF52X_C2(523)
  64. #define FPS03_BF524 0x020C
  65. #define FPS03_BF524_C1 FPS03_BF52X_C1(524)
  66. #define FPS03_BF524_C2 FPS03_BF52X_C2(524)
  67. #define FPS03_BF525 0x020D
  68. #define FPS03_BF525_C1 FPS03_BF52X_C1(525)
  69. #define FPS03_BF525_C2 FPS03_BF52X_C2(525)
  70. #define FPS03_BF526 0x020E
  71. #define FPS03_BF526_C1 FPS03_BF52X_C1(526)
  72. #define FPS03_BF526_C2 FPS03_BF52X_C2(526)
  73. #define FPS03_BF527 0x020F
  74. #define FPS03_BF527_C1 FPS03_BF52X_C1(527)
  75. #define FPS03_BF527_C2 FPS03_BF52X_C2(527)
  76. /* OTP_CONTROL masks. */
  77. #define PAGE_ADDR (0x1FF)
  78. #define DO_READ (1 << 14)
  79. #define DO_WRITE (1 << 15)
  80. /* OTP_STATUS masks. */
  81. #define STATUS_DONE (1 << 0)
  82. #define STATUS_ERR (1 << 1)
  83. #endif