m00389_cvi_memmap_package.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright 2014-2015 Cisco Systems, Inc. and/or its affiliates.
  4. * All rights reserved.
  5. */
  6. #ifndef M00389_CVI_MEMMAP_PACKAGE_H
  7. #define M00389_CVI_MEMMAP_PACKAGE_H
  8. /*******************************************************************
  9. * Register Block
  10. * M00389_CVI_MEMMAP_PACKAGE_VHD_REGMAP
  11. *******************************************************************/
  12. struct m00389_cvi_regmap {
  13. uint32_t control; /* Reg 0x0000, Default=0x0 */
  14. uint32_t frame_width; /* Reg 0x0004, Default=0x10 */
  15. uint32_t frame_height; /* Reg 0x0008, Default=0xc */
  16. uint32_t freewheel_period; /* Reg 0x000c, Default=0x0 */
  17. uint32_t error_color; /* Reg 0x0010, Default=0x0 */
  18. uint32_t status; /* Reg 0x0014 */
  19. };
  20. #define M00389_CVI_REG_CONTROL_OFST 0
  21. #define M00389_CVI_REG_FRAME_WIDTH_OFST 4
  22. #define M00389_CVI_REG_FRAME_HEIGHT_OFST 8
  23. #define M00389_CVI_REG_FREEWHEEL_PERIOD_OFST 12
  24. #define M00389_CVI_REG_ERROR_COLOR_OFST 16
  25. #define M00389_CVI_REG_STATUS_OFST 20
  26. /*******************************************************************
  27. * Bit Mask for register
  28. * M00389_CVI_MEMMAP_PACKAGE_VHD_BITMAP
  29. *******************************************************************/
  30. /* control [2:0] */
  31. #define M00389_CONTROL_BITMAP_ENABLE_OFST (0)
  32. #define M00389_CONTROL_BITMAP_ENABLE_MSK (0x1 << M00389_CONTROL_BITMAP_ENABLE_OFST)
  33. #define M00389_CONTROL_BITMAP_HSYNC_POLARITY_LOW_OFST (1)
  34. #define M00389_CONTROL_BITMAP_HSYNC_POLARITY_LOW_MSK (0x1 << M00389_CONTROL_BITMAP_HSYNC_POLARITY_LOW_OFST)
  35. #define M00389_CONTROL_BITMAP_VSYNC_POLARITY_LOW_OFST (2)
  36. #define M00389_CONTROL_BITMAP_VSYNC_POLARITY_LOW_MSK (0x1 << M00389_CONTROL_BITMAP_VSYNC_POLARITY_LOW_OFST)
  37. /* status [1:0] */
  38. #define M00389_STATUS_BITMAP_LOCK_OFST (0)
  39. #define M00389_STATUS_BITMAP_LOCK_MSK (0x1 << M00389_STATUS_BITMAP_LOCK_OFST)
  40. #define M00389_STATUS_BITMAP_ERROR_OFST (1)
  41. #define M00389_STATUS_BITMAP_ERROR_MSK (0x1 << M00389_STATUS_BITMAP_ERROR_OFST)
  42. #endif /*M00389_CVI_MEMMAP_PACKAGE_H*/