Browse Source

Linux_SDK_V0.9.5

thead_admin 1 year ago
commit
23b8671032
100 changed files with 57389 additions and 0 deletions
  1. 164 0
      Makefile
  2. 0 0
      README.md
  3. 15 0
      vvcam/.gitignore
  4. 32 0
      vvcam/LICENSE
  5. 4 0
      vvcam/README.md
  6. 191 0
      vvcam/common/viv_video_kevent.h
  7. 77 0
      vvcam/common/vvcsioc.h
  8. 148 0
      vvcam/common/vvctrl.h
  9. 146 0
      vvcam/common/vvdefs.h
  10. 642 0
      vvcam/common/vvnative.c
  11. 95 0
      vvcam/common/vvnative.h
  12. 264 0
      vvcam/common/vvnative_cfg.c
  13. 78 0
      vvcam/common/vvnative_cfg.h
  14. 509 0
      vvcam/common/vvnative_combo.c
  15. 78 0
      vvcam/common/vvnative_combo.h
  16. 265 0
      vvcam/common/vvsensor.h
  17. 204 0
      vvcam/csi/csi_ioctl.c
  18. 154 0
      vvcam/csi/csi_ioctl.h
  19. 322 0
      vvcam/csi/nwl/nwl_core.c
  20. 156 0
      vvcam/csi/nwl/nwl_ioctl.c
  21. 63 0
      vvcam/csi/nwl/nwl_ioctl.h
  22. 97 0
      vvcam/csi/nwl/nwl_regs.h
  23. 335 0
      vvcam/csi/vivcsi_hub.c
  24. 72 0
      vvcam/csi/vivcsi_hub.h
  25. 1127 0
      vvcam/dw200/dw200_ioctl.c
  26. 119 0
      vvcam/dw200/dw200_ioctl.h
  27. 168 0
      vvcam/dw200/dw200_subdev.h
  28. 119 0
      vvcam/dw200/dwe_regs.h
  29. 191 0
      vvcam/dw200/vivdw200_irq_queue.c
  30. 83 0
      vvcam/dw200/vivdw200_irq_queue.h
  31. 322 0
      vvcam/dw200/vse_regs.h
  32. 119 0
      vvcam/dwe/dwe_dev.h
  33. 381 0
      vvcam/dwe/dwe_ioctl.c
  34. 94 0
      vvcam/dwe/dwe_ioctl.h
  35. 183 0
      vvcam/dwe/dwe_isr.c
  36. 104 0
      vvcam/dwe/dwe_regs.h
  37. 110 0
      vvcam/isp/cam_device_buf_defs_common.h
  38. 1105 0
      vvcam/isp/ic_dev.h
  39. 6 0
      vvcam/isp/insmod.sh
  40. 455 0
      vvcam/isp/isp_3dnr.c
  41. 433 0
      vvcam/isp/isp_3dnr2.c
  42. 155 0
      vvcam/isp/isp_compand.c
  43. 432 0
      vvcam/isp/isp_dmsc2.c
  44. 193 0
      vvcam/isp/isp_dpf.c
  45. 186 0
      vvcam/isp/isp_gcmono.c
  46. 259 0
      vvcam/isp/isp_hdr.c
  47. 3688 0
      vvcam/isp/isp_ioctl.c
  48. 436 0
      vvcam/isp/isp_ioctl.h
  49. 239 0
      vvcam/isp/isp_irq_queue.c
  50. 98 0
      vvcam/isp/isp_irq_queue.h
  51. 279 0
      vvcam/isp/isp_isr.c
  52. 626 0
      vvcam/isp/isp_miv1.c
  53. 1213 0
      vvcam/isp/isp_miv2.c
  54. 216 0
      vvcam/isp/isp_rgbgamma.c
  55. 401 0
      vvcam/isp/isp_rgbir.c
  56. 646 0
      vvcam/isp/isp_tdnr3.c
  57. 176 0
      vvcam/isp/isp_types.h
  58. 190 0
      vvcam/isp/isp_version.h
  59. 136 0
      vvcam/isp/isp_wdr.c
  60. 67 0
      vvcam/isp/isp_wdr.h
  61. 502 0
      vvcam/isp/isp_wdr3.c
  62. 515 0
      vvcam/isp/isp_wdr4.c
  63. 10446 0
      vvcam/isp/mrv_all_bits.h
  64. 20364 0
      vvcam/isp/mrv_all_regs.h
  65. 1148 0
      vvcam/isp/mrv_dec_all_regs.h
  66. 24 0
      vvcam/native/Makefile
  67. 66 0
      vvcam/native/Param.mk
  68. 56 0
      vvcam/native/Param_base.mk
  69. 62 0
      vvcam/native/Param_thead_light.mk
  70. 15 0
      vvcam/native/bin/insmod.sh
  71. 13 0
      vvcam/native/bin/rmmod.sh
  72. 23 0
      vvcam/native/csi/Makefile
  73. 23 0
      vvcam/native/csi/Makefilee
  74. 90 0
      vvcam/native/csi/bm_csi_dphy.c
  75. 19 0
      vvcam/native/csi/bm_csi_dphy.h
  76. 331 0
      vvcam/native/csi/bm_csi_driver.c
  77. 155 0
      vvcam/native/csi/bm_csi_hw.c
  78. 66 0
      vvcam/native/csi/bm_csi_hw.h
  79. 39 0
      vvcam/native/csi/bm_csi_ioctl.h
  80. 46 0
      vvcam/native/csi/bm_printk.h
  81. 64 0
      vvcam/native/csi/csi_common.h
  82. 91 0
      vvcam/native/csi/csi_ioctl.c
  83. 143 0
      vvcam/native/csi/csi_ioctl.h
  84. 0 0
      vvcam/native/csi/dphy_gen
  85. 31 0
      vvcam/native/csi/dw-csi-data.h
  86. 391 0
      vvcam/native/csi/dw-csi-plat.c
  87. 146 0
      vvcam/native/csi/dw-csi-plat.h
  88. 673 0
      vvcam/native/csi/dw-csi-sysfs.c
  89. 36 0
      vvcam/native/csi/dw-dphy-data.h
  90. 148 0
      vvcam/native/csi/dw-dphy-plat.c
  91. 622 0
      vvcam/native/csi/dw-dphy-rx.c
  92. 215 0
      vvcam/native/csi/dw-dphy-rx.h
  93. 264 0
      vvcam/native/csi/dw-dphy-sysfs.c
  94. 104 0
      vvcam/native/csi/dw-mipi-csi-pltfrm.h
  95. 590 0
      vvcam/native/csi/dw-mipi-csi.c
  96. 285 0
      vvcam/native/csi/dw-mipi-csi.h
  97. 115 0
      vvcam/native/csi/nwl/nwl_regs.h
  98. 216 0
      vvcam/native/csi/nwl/platform_nwl_csi_driver.c
  99. 367 0
      vvcam/native/csi/vvcam_csi_driver.c
  100. 19 0
      vvcam/native/dec400/Makefile

+ 164 - 0
Makefile

@@ -0,0 +1,164 @@
+##
+ # Copyright (C) 2020 Alibaba Group Holding Limited
+##
+test = $(shell if [ -f "../.param" ]; then echo "exist"; else echo "noexist"; fi)
+ifeq ("$(test)", "exist")
+  include ../.param
+endif
+
+CONFIG_COMPILE_PLATFORM=RISCV
+
+CONFIG_ISP_BUILD_TYPE=DEBUG
+#CONFIG_ISP_BUILD_TYPE=RELEASE
+CONFIG_ISP_VERSION=ISP8000L_V2008
+
+CONFIG_ISP_RY_BUILD_TYPE=DEBUG
+#CONFIG_ISP_RY_BUILD_TYPE=RELEASE
+CONFIG_ISP_RY_VERSION=ISP8000_V2009
+
+
+CONFIG_MAKE_ISP_DRIVER_CMD:= \
+    make -C vvcam/native VERSION_CFG=$(CONFIG_ISP_VERSION) \
+	    KERNEL=$(LINUX_DIR) CROSS=$(CROSS_COMPILE) ARCH=$(ARCH) BOARD_NAME=$(BOARD_NAME)
+
+CONFIG_DW200_CMAKE_CMD:= \
+	cmake -DCMODEL=$(CONFIG_DW200_CMODEL) \
+		-DV4L2=$(CONFIG_DW200_V4L2) \
+		-DARM64_LOCAL_CROSS=OFF ..
+
+CONFIG_DEC400_CMAKE_CMD:= \
+	cmake -Wno-dev ..
+
+
+CONFIG_MAKE_ISP_RY_DRIVER_CMD:= \
+    make -C vvcam_ry/native VERSION_CFG=$(CONFIG_ISP_RY_VERSION) \
+	    KERNEL=$(LINUX_DIR) CROSS=$(CROSS_COMPILE) ARCH=$(ARCH) BOARD_NAME=$(BOARD_NAME)
+
+DIR_ISP_TARGET_BASE=bsp/isp
+DIR_ISP_TARGET_KO  =bsp/isp/ko
+
+DIR_ISP_RY_TARGET_BASE=bsp/isp_ry
+DIR_ISP_RY_TARGET_KO  =bsp/isp_ry/ko
+
+DIR_DW200_TARGET_BASE=bsp/dw200
+
+
+DIR_DEC400_TARGET_BASE=bsp/dec400
+
+MODULE_NAME=ISP
+BUILD_LOG_START="\033[47;30m>>> $(MODULE_NAME) $@ begin\033[0m"
+BUILD_LOG_END  ="\033[47;30m<<< $(MODULE_NAME) $@ end\033[0m"
+
+#
+# Do a parallel build with multiple jobs, based on the number of CPUs online
+# in this system: 'make -j8' on a 8-CPU system, etc.
+#
+# (To override it, run 'make JOBS=1' and similar.)
+#
+ifeq ($(JOBS),)
+  JOBS := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
+  ifeq ($(JOBS),)
+    JOBS := 1
+  endif
+endif
+
+all:    info isp_driver isp_ry_driver\
+		install_local_output install_rootfs
+.PHONY: info isp_driver isp_ry_driver\
+		install_local_output install_rootfs \
+        clean_isp_driver clean_isp_ry_driver \
+        clean_output clean
+
+info:
+	@echo $(BUILD_LOG_START)
+	@echo "  ====== Build Info from repo project ======"
+	@echo "    BUILDROOT_DIR="$(BUILDROOT_DIR)
+	@echo "    CROSS_COMPILE="$(CROSS_COMPILE)
+	@echo "    LINUX_DIR="$(LINUX_DIR)
+	@echo "    ARCH="$(ARCH)
+	@echo "    BOARD_NAME="$(BOARD_NAME)
+	@echo "    KERNEL_ID="$(KERNELVERSION)
+	@echo "    KERNEL_DIR="$(LINUX_DIR)
+	@echo "    INSTALL_DIR_ROOTFS="$(INSTALL_DIR_ROOTFS)
+	@echo "    DIR_MODULE_TOP="$(DIR_MODULE_TOP)
+	@echo "  ====== Build configuration by settings ======"
+	@echo "    COMPILE_PLATFORM="$(CONFIG_COMPILE_PLATFORM)
+	@echo "    JOBS="$(JOBS)
+	@echo "    ISP_BUILD_TYPE="$(CONFIG_ISP_BUILD_TYPE)
+	@echo "    ISP_VERSION="$(CONFIG_ISP_VERSION)
+	@echo "    CMAKE_ISP_DRIVER_CMD=" $(CONFIG_MAKE_ISP_DRIVER_CMD)
+	@echo "    DW200_CMODEL="$(CONFIG_DW200_CMODEL)
+	@echo "    DW200_V4L2="$(CONFIG_DW200_V4L2)
+	@echo "    DW200_BUILD_DIR="$(CONFIG_DW200_BUILD_DIR)
+	@echo "    DW200_CMAKE_CMD="$(CONFIG_DW200_CMAKE_CMD)
+	@echo "    DEC400_BUILD_DIR="$(CONFIG_DEC400_BUILD_DIR)
+	@echo "    DEC400_CMAKE_CMD="$(CONFIG_DEC400_CMAKE_CMD)
+	@echo "    ISP_RY_BUILD_TYPE="$(CONFIG_ISP_RY_BUILD_TYPE)
+	@echo "    ISP_RY_VERSION="$(CONFIG_ISP_RY_VERSION)
+
+	@echo $(BUILD_LOG_END)
+
+isp_driver:
+	@echo $(BUILD_LOG_START)
+	$(CONFIG_MAKE_ISP_DRIVER_CMD)
+	@echo $(BUILD_LOG_END)
+
+clean_isp_driver:
+	@echo $(BUILD_LOG_START)
+	make -C vvcam/native VERSION_CFG=$(CONFIG_ISP_VERSION) clean
+	#make -C vvcam/v4l2 VERSION_CFG=$(CONFIG_ISP_VERSION) clean
+	rm -f vvcam/dw200/.*.o.cmd
+	rm -f vvcam/isp/.*.o.cmd
+	rm -f vvcam/native/bin/*.ko
+	@echo $(BUILD_LOG_END)
+
+isp_ry_driver:
+	@echo $(BUILD_LOG_START)
+	$(CONFIG_MAKE_ISP_RY_DRIVER_CMD)
+	@echo $(BUILD_LOG_END)
+
+clean_isp_ry_driver:
+	@echo $(BUILD_LOG_START)
+	make -C vvcam_ry/native VERSION_CFG=$(CONFIG_ISP_RY_VERSION) clean
+	make -C vvcam_ry/v4l2 VERSION_CFG=$(CONFIG_ISP_RY_VERSION) clean
+	rm -f vvcam_ry/dw200/.*.o.cmd
+	rm -f vvcam_ry/isp/.*.o.cmd
+	rm -f vvcam_ry/native/bin/*.ko
+	@echo $(BUILD_LOG_END)
+
+
+
+
+
+install_local_output: isp_driver isp_ry_driver
+	@echo $(BUILD_LOG_START)
+	# isp driver files
+	mkdir -p ./output/rootfs/$(DIR_ISP_TARGET_KO)
+	chmod +x ./vvcam/native/bin/*.sh
+	cp -f ./vvcam/native/bin/* ./output/rootfs/$(DIR_ISP_TARGET_KO)
+
+	# isp ry driver files
+	mkdir -p ./output/rootfs/$(DIR_ISP_RY_TARGET_KO)
+	chmod +x ./vvcam_ry/native/bin/*.sh
+	cp -f ./vvcam_ry/native/bin/vvcam_isp_ry.ko ./output/rootfs/$(DIR_ISP_TARGET_KO)
+
+install_rootfs: install_local_output
+	@echo $(BUILD_LOG_START)
+#	cp -rf output/rootfs/* $(INSTALL_DIR_ROOTFS)
+	@echo $(BUILD_LOG_END)
+
+clean_output:
+	@echo $(BUILD_LOG_START)
+	rm -rf ./output
+	rm -rf $(INSTALL_DIR_ROOTFS)/$(DIR_ISP_TARGET_BASE)
+	rm -rf $(INSTALL_DIR_ROOTFS)/$(DIR_ISP_RY_TARGET_BASE)
+	rm -rf $(INSTALL_DIR_ROOTFS)/$(DIR_DW200_TARGET_BASE)
+	rm -rf $(INSTALL_DIR_ROOTFS)/$(DIR_DEC400_TARGET_BASE)
+	@echo $(BUILD_LOG_END)
+
+clean_proprietories_include:
+	@echo $(BUILD_LOG_START)
+	@echo $(BUILD_LOG_END)
+
+clean: clean_output clean_isp_driver \
+	clean_isp_ry_driver clean_proprietories_include

+ 0 - 0
README.md


+ 15 - 0
vvcam/.gitignore

@@ -0,0 +1,15 @@
+*.cmd
+*.mod
+*.o
+*.swp
+.vscode/*
+.tmp_versions/*
+Module.symvers
+*.ko
+modules.order
+*mod.c
+*cmd.c
+*.o.d
+*.a
+*.tmp
+.cache.mk

File diff suppressed because it is too large
+ 32 - 0
vvcam/LICENSE


+ 4 - 0
vvcam/README.md

@@ -0,0 +1,4 @@
+# vvcam
+
+ISP8000 vvcam project.
+ISP8000NANO TAG:origin/nxp_4.2.2_rc5

+ 191 - 0
vvcam/common/viv_video_kevent.h

@@ -0,0 +1,191 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VIV_VIDEO_KEVENT_H_
+#define _VIV_VIDEO_KEVENT_H_
+#include <linux/videodev2.h>
+
+#ifndef __KERNEL__
+#include <stdint.h>
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+#endif
+
+enum {
+	VIV_VIDEO_EVENT_MIN = 0,
+	VIV_VIDEO_EVENT_NEW_STREAM,
+	VIV_VIDEO_EVENT_DEL_STREAM,
+	VIV_VIDEO_EVENT_START_STREAM,
+	VIV_VIDEO_EVENT_STOP_STREAM,
+	VIV_VIDEO_EVENT_SET_FMT,
+	VIV_VIDEO_EVENT_SET_CROP,
+	VIV_VIDEO_EVENT_SET_COMPOSE,
+	VIV_VIDEO_EVENT_QUERYCAPS,
+	VIV_VIDEO_EVENT_PASS_JSON,
+	VIV_VIDEO_EVENT_EXTCTRL,
+	VIV_VIDEO_EVENT_EXTCTRL2,
+	VIV_VIDEO_EVENT_SET_CAPSMODE,
+	VIV_VIDEO_EVENT_GET_CAPS_SUPPORTS,
+	VIV_VIDEO_EVENT_CREATE_PIPELINE,
+	VIV_VIDEO_EVENT_QBUF,
+	VIV_VIDEO_EVENT_MAX,
+};
+
+enum {
+	VIV_DWE_EVENT_MIN = VIV_VIDEO_EVENT_MAX + 1,
+	VIV_DWE_EVENT_FRAMEDONE,
+	VIV_DWE_EVENT_MAX,
+};
+
+/* max support to 64 bytes! */
+struct viv_video_event {
+	u32 stream_id;
+	void *file;
+	u64 addr;
+	int buf_index;
+	u64 response;
+	u32 sync;
+};
+
+struct v4l2_user_buffer {
+	u64 addr;
+	int streamid;
+	void *file;
+};
+
+struct viv_rect {
+	__s16 left;
+	__s16 top;
+	__u16 width;
+	__u16 height;
+};
+
+#define VIV_EVENT_BUF_SIZE  (4*1024)
+
+#define VIV_JSON_BUFFER_SIZE  (64*1024)
+struct viv_control_event {
+	/* physical address of json request, fixed size 64K */
+	u64 request;
+	/* physical address of json response fixed size 64K */
+	u64 response;
+	u32 id;
+};
+
+
+struct ext_buf_info {
+	u64 addr;
+	u64 size;
+};
+
+struct vvcam_constant_modeinfo {
+	unsigned index;
+	unsigned w;
+	unsigned h;
+	unsigned fps;
+	unsigned brpat; /*bayer pattern*/
+	unsigned bitw; /*bit width*/
+};
+
+#define CALIBXML_FILE_NAME_SIZE 64
+struct viv_caps_mode_s {
+	int mode;
+	char CalibXmlName[CALIBXML_FILE_NAME_SIZE];
+};
+
+enum viv_caps_hdr_mode_e
+{
+	VIV_CAPS_MODE_LINEAR ,
+	VIV_CAPS_MODE_HDR_STITCH,
+	VIV_CAPS_MODE_HDR_NATIVE,
+};
+
+struct viv_caps_mode_info_s{
+	unsigned int index;
+	unsigned int width;
+	unsigned int height;
+	unsigned int hdr_mode;
+	unsigned int fps;
+};
+
+#define VIV_CAPS_MODE_MAX_COUNT    20
+struct viv_caps_supports{
+	unsigned int count;
+	struct viv_caps_mode_info_s mode[VIV_CAPS_MODE_MAX_COUNT];
+};
+
+#define VIV_VIDEO_ISPIRQ_TYPE	(V4L2_EVENT_PRIVATE_START + 0x0)
+#define VIV_VIDEO_MIIRQ_TYPE	(V4L2_EVENT_PRIVATE_START + 0x1)
+#define VIV_VIDEO_EVENT_TYPE	(V4L2_EVENT_PRIVATE_START + 0x2000)
+#define VIV_DWE_EVENT_TYPE   	(V4L2_EVENT_PRIVATE_START + 0x3000)
+
+#define VIV_VIDEO_EVENT_TIMOUT_MS	5000
+
+#define VIV_VIDIOC_EVENT_COMPLETE		_IOW('V', BASE_VIDIOC_PRIVATE + 100, struct viv_video_event)
+#define VIV_VIDIOC_BUFFER_ALLOC			_IOWR('V', BASE_VIDIOC_PRIVATE + 101, struct ext_buf_info)
+#define VIV_VIDIOC_BUFFER_FREE			_IOWR('V', BASE_VIDIOC_PRIVATE + 102, struct ext_buf_info)
+#define VIV_VIDIOC_CONTROL_EVENT		_IOWR('V', BASE_VIDIOC_PRIVATE + 103, struct viv_control_event)
+#define VIV_VIDIOC_S_STREAMID			_IOW('V', BASE_VIDIOC_PRIVATE + 104, int)
+#define VIV_VIDIOC_BUFDONE				_IOW('V', BASE_VIDIOC_PRIVATE + 105, struct v4l2_user_buffer)
+#define VIV_VIDIOC_QUERY_EXTMEM			_IOWR('V', BASE_VIDIOC_PRIVATE + 106, struct ext_buf_info)
+#define VIV_VIDIOC_S_ENDPOINT			_IOW('V', BASE_VIDIOC_PRIVATE + 107, int)
+#define VIV_VIDIOC_S_MODEINFO			_IOW('V', BASE_VIDIOC_PRIVATE + 108, struct vvcam_constant_modeinfo)
+#define VIV_VIDIOC_S_CAPS_MODE			_IOW('V', BASE_VIDIOC_PRIVATE + 109, struct viv_caps_mode_s)
+#define VIV_VIDIOC_G_CAPS_MODE			_IOWR('V', BASE_VIDIOC_PRIVATE + 110, struct viv_caps_mode_s)
+#define VIV_VIDIOC_EVENT_RESULT	    	_IOWR('V', BASE_VIDIOC_PRIVATE + 111,int)
+#define VIV_VIDIOC_GET_CAPS_SUPPORTS    _IOWR('V', BASE_VIDIOC_PRIVATE + 112,struct viv_caps_supports)
+#define VIV_VIDIOC_SET_CAPS_SUPPORTS    _IOWR('V', BASE_VIDIOC_PRIVATE + 113,struct viv_caps_supports)
+#define VIV_VIDIOC_S_DWECFG				_IOW('V', BASE_VIDIOC_PRIVATE + 114, int)
+#define VIV_VIDIOC_G_DWECFG				_IOR('V', BASE_VIDIOC_PRIVATE + 115, int)
+
+#endif

+ 77 - 0
vvcam/common/vvcsioc.h

@@ -0,0 +1,77 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVCAM_CSIOC_H_
+#define _VVCAM_CSIOC_H_
+#ifdef __KERNEL__
+#include <media/v4l2-subdev.h>
+#else
+#include <linux/videodev2.h>
+#endif
+
+enum {
+	VVCSIOC_RESET = 0x100,
+	VVCSIOC_POWERON,
+	VVCSIOC_POWEROFF,
+	VVCSIOC_STREAMON,
+	VVCSIOC_STREAMOFF,
+	VVCSIOC_S_FMT,
+	VVCSIOC_S_HDR,
+};
+
+struct csi_sam_format {
+	int64_t format;
+	__u32 width;
+	__u32 height;
+};
+
+#endif /* _VVCAM_CSIOC_H_ */

+ 148 - 0
vvcam/common/vvctrl.h

@@ -0,0 +1,148 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVCTRL_H_
+#define _VVCTRL_H_
+
+#include <linux/videodev2.h>
+
+#define VIV_CUSTOM_CID_BASE (V4L2_CID_USER_BASE | 0xf000)
+#define V4L2_CID_VIV_STRING (VIV_CUSTOM_CID_BASE + 0x01)
+#define V4L2_CID_VIV_SENSOR_MODE (VIV_CUSTOM_CID_BASE + 0x02)
+#define V4L2_CID_VIV_SENSOR_RES_W (VIV_CUSTOM_CID_BASE + 0x03)
+#define V4L2_CID_VIV_SENSOR_RES_H (VIV_CUSTOM_CID_BASE + 0x04)
+#define V4L2_CID_VIV_SENSOR_TPG_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x05)
+#define V4L2_CID_VIV_DEWARP_MODE (VIV_CUSTOM_CID_BASE + 0x06)
+#define V4L2_CID_VIV_DEWARP_BYPASS_STATUS (VIV_CUSTOM_CID_BASE + 0x07)
+#define V4L2_CID_VIV_AEC_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x08)
+#define V4L2_CID_VIV_AWB_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x09)
+#define V4L2_CID_VIV_AWB_DAMPING_STATUS (VIV_CUSTOM_CID_BASE + 0x0A)
+#define V4L2_CID_VIV_LSC_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x0B)
+#define V4L2_CID_VIV_CPROC_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x0C)
+#define V4L2_CID_VIV_GAMMA_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x0D)
+#define V4L2_CID_VIV_GAMMA_MODE (VIV_CUSTOM_CID_BASE + 0x0E)
+#define V4L2_CID_VIV_DEMOSAIC_MODE (VIV_CUSTOM_CID_BASE + 0x0F)
+#define V4L2_CID_VIV_FILTER_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x10)
+#define V4L2_CID_VIV_CAC_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x11)
+#define V4L2_CID_VIV_DPCC_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x12)
+#define V4L2_CID_VIV_CNR_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x13)
+#define V4L2_CID_VIV_DPF_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x14)
+#define V4L2_CID_VIV_WDR3_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x15)
+#define V4L2_CID_VIV_AVS_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x16)
+#define V4L2_CID_VIV_2DNR_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x17)
+#define V4L2_CID_VIV_3DNR_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x18)
+#define V4L2_CID_VIV_HDR_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x19)
+#define V4L2_CID_VIV_HDR_MODE (VIV_CUSTOM_CID_BASE + 0x1A)
+#define V4L2_CID_VIV_STITCHING_MODE (VIV_CUSTOM_CID_BASE + 0x1B)
+#define V4L2_CID_VIV_IS_OUT_RES_W (VIV_CUSTOM_CID_BASE + 0x1C)
+#define V4L2_CID_VIV_IS_OUT_RES_H (VIV_CUSTOM_CID_BASE + 0x1D)
+#define V4L2_CID_VIV_MP_OUT_RES_W (VIV_CUSTOM_CID_BASE + 0x1E)
+#define V4L2_CID_VIV_MP_OUT_RES_H (VIV_CUSTOM_CID_BASE + 0x1F)
+#define V4L2_CID_VIV_MP_OUT_FORMAT (VIV_CUSTOM_CID_BASE + 0x20)
+#define V4L2_CID_VIV_PIPELINE_SMP_MODE (VIV_CUSTOM_CID_BASE + 0x21)
+#define V4L2_CID_VIV_PIPELINE_DWE_ENABLED_STATUS (VIV_CUSTOM_CID_BASE + 0x22)
+
+enum v4l2_ctrl_direction {
+	V4L2_CTRL_GET,
+	V4L2_CTRL_SET,
+};
+
+struct v4l2_ctrl_data {
+	struct v4l2_ext_controls ctrls;
+	enum v4l2_ctrl_direction dir;
+	int ret;
+};
+
+#define nextof(ptr, new_type) ((new_type)((ptr) + 1))
+
+#ifdef __KERNEL__
+int viv_gen_g_ctrl(struct v4l2_ctrl *ctrl);
+int viv_gen_s_ctrl(struct v4l2_ctrl *ctrl);
+
+static const struct v4l2_ctrl_ops viv_gen_ctrl_ops = {
+	.g_volatile_ctrl = viv_gen_g_ctrl,
+	.s_ctrl = viv_gen_s_ctrl,
+};
+
+static const struct v4l2_ctrl_config viv_ctrl_sensor_resw = {
+	.ops = &viv_gen_ctrl_ops,
+	.id = V4L2_CID_VIV_SENSOR_RES_W,
+	.name = "sensor.resw",
+	.type = V4L2_CTRL_TYPE_INTEGER,
+	.flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
+	.min = 0,
+	.max = 3840,
+	.def = 1920,
+	.step = 1,
+};
+
+static const struct v4l2_ctrl_config viv_ctrl_sensor_resh = {
+	.ops = &viv_gen_ctrl_ops,
+	.id = V4L2_CID_VIV_SENSOR_RES_H,
+	.name = "sensor.resh",
+	.type = V4L2_CTRL_TYPE_INTEGER,
+	.flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
+	.min = 0,
+	.max = 2160,
+	.def = 1080,
+	.step = 1,
+};
+
+#define create_controls(handler) \
+do { \
+	v4l2_ctrl_new_custom(handler, &viv_ctrl_sensor_resw, NULL); \
+	v4l2_ctrl_new_custom(handler, &viv_ctrl_sensor_resh, NULL); \
+} while (0)
+
+#endif
+
+#endif /* _VVCTRL_H_ */

+ 146 - 0
vvcam/common/vvdefs.h

@@ -0,0 +1,146 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_VVDEFS_H_
+#define _ISP_VVDEFS_H_
+
+#define viv_check_retval(x)\
+	do {\
+		if ((x))\
+			return -EIO;\
+	} while (0)
+
+#ifndef VIV_MEDIA_PIX_FMT
+#define VIV_MEDIA_PIX_FMT
+enum {
+	MEDIA_PIX_FMT_YUV422SP = 0,
+	MEDIA_PIX_FMT_YUV422I,
+	MEDIA_PIX_FMT_YUV420SP,
+	MEDIA_PIX_FMT_YUV444P,
+	MEDIA_PIX_FMT_YUV444I,
+	MEDIA_PIX_FMT_RGB888,
+	MEDIA_PIX_FMT_RGB888P,
+    MEDIA_PIX_FMT_BGR888P,
+	MEDIA_PIX_FMT_RAW8,
+	MEDIA_PIX_FMT_RAW10,
+	MEDIA_PIX_FMT_RAW12,
+};
+#endif
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <stdio.h>
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+
+#define pr_info(...) printf(__VA_ARGS__)
+#define pr_err(...) printf(__VA_ARGS__)
+#define pr_debug(...) printf(__VA_ARGS__)
+#define __user
+#define __iomem
+#else /* __KERNEL__ */
+
+/* if v4l2 */
+#include <linux/clk.h>
+#include <linux/interrupt.h>
+#include <linux/completion.h>
+#include <linux/io.h>
+#include <linux/list.h>
+#include <linux/delay.h>
+#include <media/v4l2-subdev.h>
+#include <linux/platform_device.h>
+
+enum STATE_CODE {
+	STATE_STOPPED = 0,
+	STATE_STREAM_STARTED = 1 << 1,
+	STATE_DRIVER_STARTED = 1 << 2,
+};
+#endif
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+
+#ifndef ALIGN_UP
+#define ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align)-1))
+#endif
+
+#define ISP_COMPAT_NAME "fsl,imx8mp-isp"
+#define DWE_COMPAT_NAME "fsl,imx8mp-dwe"
+
+#define ISP_DEVICE_NAME "vvcam-isp"
+#define DWE_DEVICE_NAME "vvcam-dwe"
+
+#define ISP_PAD_SOURCE      (0)
+#define ISP_PADS_NUM        (1)
+
+#define DWE_PAD_SOURCE      (0)
+#define DWE_PAD_SINK        (1)
+#define DWE_PADS_NUM        (2)
+
+#define RESV_STREAMID_ISP(id)   \
+		((id) ? RESV_STREAMID_ISP1 : RESV_STREAMID_ISP0)
+#define RESV_STREAMID_ISP0      (-2)
+#define RESV_STREAMID_ISP1      (-3)
+#define RESV_STREAMID_DWE       (-4)
+
+#endif /* _ISP_VVDEFS_H_ */

+ 642 - 0
vvcam/common/vvnative.c

@@ -0,0 +1,642 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/module.h>			/* Module support */
+#include <linux/version.h>			/* Kernel version */
+#include <linux/cdev.h>				/* Charactor device support */
+#include <linux/vermagic.h>
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/device.h>
+
+#include <linux/ioctl.h>
+#include <linux/mm.h>
+
+
+#include "vvnative.h"
+#include "vvnative_cfg.h"
+#include "vvnative_combo.h"
+
+#ifdef SENSOR_USE_GPIO_I2C
+#include "soc_i2c.h"
+#endif
+
+#ifndef MODULE_LICENSE
+# define MODULE_LICENSE(x)
+#endif /* MODULE_LICENSE */
+
+#ifndef MODULE_VERSION
+# define MODULE_VERSION(x)
+#endif /* MODULE_VERSION */
+
+#define DRIVER_AUTHOR   "VeriSilicon IPD"
+#define DRIVER_DESC     "Verisilicon ISP driver"
+#define DRIVER_LICENSE  "GPL"
+#define DRIVER_VERSION  "1.0"
+
+
+#ifdef MODULE
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE( DRIVER_LICENSE );
+MODULE_INFO( vermagic, VERMAGIC_STRING);
+#endif /* MODULE */
+
+
+/* vvcam_isp_dev_major: device major number */
+unsigned int vvcam_isp_dev_major = 0;
+module_param(vvcam_isp_dev_major, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcam_isp_dev_major, "vvcam ISP device major number");
+
+/* vvcam_isp_dev_minor: device base(start) minor number */
+unsigned int vvcam_isp_dev_minor = 0;
+module_param(vvcam_isp_dev_minor, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(vvcam_isp_dev_minor, "vvcam ISP device base minor number");
+
+/* vvcam_isp_dev_count: counts */
+unsigned int vvcam_isp_dev_count = VVCAM_ISP_DEVICES;
+module_param(vvcam_isp_dev_count, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcam_isp_dev_count, "vvcam ISP device counts");
+
+
+struct vvcam_isp_dev *vvcam_isp_drv;
+struct vvcam_common *vvcam_drv_common;
+
+static int vvcam_isp_dev_open(struct inode *inode, struct file *file);
+static int vvcam_isp_dev_release(struct inode *inode, struct file *file);
+static long vvcam_isp_dev_ioctl(struct file * pFile, unsigned int cmd, unsigned long arg);
+static int vvcam_isp_dev_mmap(struct file *pFile, struct vm_area_struct *vma);
+static int vvcam_isp_devio_remap(int dev_no);
+static int vvcam_isp_devio_unmap(int dev_no);
+
+long (*vvnative_ioctl[])(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)=
+{
+	vvcam_combo_isp_ioctl,    /*devid0*/
+	vvcam_combo_isp_ioctl,    /*devid1*/
+	vvcam_combo_csi_ioctl,    /*devid2*/
+	vvcam_combo_csi_ioctl,    /*devid3*/
+	vvcam_combo_sensor_ioctl, /*devid4*/
+	vvcam_combo_sensor_ioctl, /*devid5*/
+	vvcam_combo_dwe_ioctl,    /*devid6*/
+	vvcam_combo_vse_ioctl,    /*devid7*/
+	vvcam_combo_soc_ioctl,    /*devid8*/
+};
+
+int (*vvnative_init[])(struct vvcam_isp_dev *vvcam_isp_drv)=
+{
+	vvcam_combo_isp_init,    /*devid0*/
+	vvcam_combo_isp_init,    /*devid1*/
+	vvcam_combo_csi_init,    /*devid2*/
+	vvcam_combo_csi_init,    /*devid3*/
+	vvcam_combo_sensor_init, /*devid4*/
+	vvcam_combo_sensor_init, /*devid5*/
+	vvcam_combo_dwe_init,    /*devid6*/
+	vvcam_combo_vse_init,    /*devid7*/
+	vvcam_combo_soc_init,    /*devid8*/
+};
+
+int (*vvnative_deinit[])(struct vvcam_isp_dev *vvcam_isp_drv)=
+{
+	vvcam_combo_isp_deinit,    /*devid0*/
+	vvcam_combo_isp_deinit,    /*devid1*/
+	vvcam_combo_csi_deinit,    /*devid2*/
+	vvcam_combo_csi_deinit,    /*devid3*/
+	vvcam_combo_sensor_deinit, /*devid4*/
+	vvcam_combo_sensor_deinit, /*devid5*/
+	vvcam_combo_dwe_deinit,    /*devid6*/
+	vvcam_combo_vse_deinit,    /*devid7*/
+	vvcam_combo_soc_deinit,    /*devid8*/
+};
+
+/*TODO:expand dual camera devs*/
+struct file_operations vvcam_isp_fops = {
+	.owner = THIS_MODULE,
+	.open = vvcam_isp_dev_open,
+	.release = vvcam_isp_dev_release,
+	.unlocked_ioctl = vvcam_isp_dev_ioctl,
+	.mmap = vvcam_isp_dev_mmap,
+};
+
+/*On-the-fly debug opitions*/
+char * on_the_fly_str="VIV ISP local debug buffer";
+static void vivdev_dump_buf(unsigned char *out_buf, unsigned char* dump_data, int len, unsigned char * phy_address)
+{
+	int m;
+	int n;
+	char *buf;
+	buf = out_buf;
+	int llength = 0x10;
+	unsigned int udata;
+	sprintf (buf, "Phy Addr: 0x%lx, Va Addr:0x%lx, len:%d\n", (unsigned long)phy_address, dump_data, len);
+	buf += strlen(buf);
+
+	for (m=0; m<len; m++)
+	{
+		if(m%llength == 0)
+		{
+				sprintf(buf, "%04x| ",  m);
+				buf += strlen(buf);
+		}
+
+		if((m%2) == 0){
+			sprintf (buf, " ");
+			buf += strlen(buf);
+		}
+		udata = (unsigned int)(*(dump_data+m));
+		sprintf (buf, "%02x", udata&0xff);
+		buf += strlen(buf);
+
+		if(m%llength == (llength-1))
+		{
+			sprintf (buf, " | ");
+			buf += strlen(buf);
+
+			for (n=llength;n>0;n--)
+			{
+				if ((*(dump_data+m+1-n)>31) && (*(dump_data+m+1-n)<127))
+				{
+					sprintf (buf, "%c", *(dump_data+m+1-n));
+					buf += strlen(buf);
+				}
+				else
+				{
+					sprintf (buf, ".");
+					buf += strlen(buf);
+				}
+			}
+			sprintf (buf, "\n");
+			buf += strlen(buf);
+		}
+	}
+	sprintf (buf, "\n");
+	buf += strlen(buf);
+}
+
+static ssize_t get_vivdev(struct device *dev,
+	struct device_attribute *attr, char *buf)
+{
+	const char * name;
+	char dev_name_perfix[8];
+	int dev_index;
+	int ret;
+	if(NULL == vvcam_drv_common)
+	{
+		pr_info("-->%s Error, null pointer of  vvcam_drv_common\n", __func__);
+		return 0;
+	}
+
+	mutex_lock(&vvcam_drv_common->vvmutex);
+
+	name = dev_name(dev);
+	pr_info("-->%s dev_name name:%s\n", __func__, name);
+	ret = sscanf(name, "%6s%d", dev_name_perfix, &dev_index);
+	pr_info("-->%s sscanf ret:%d, name:%s, id:%d\n", __func__, ret, dev_name_perfix, dev_index);
+
+	ret = sprintf(buf, "%s\n", vvcam_drv_common->viv_buf);
+	mutex_unlock(&vvcam_drv_common->vvmutex);
+
+	return ret;
+}
+
+static ssize_t set_vivdev(struct device *dev,
+	struct device_attribute *attr,
+	const char *buf, size_t len)
+{
+	const char * name;
+	char dev_name_perfix[8];
+	int dev_index;
+
+	unsigned int data;
+	unsigned int addr;
+	unsigned int read_cnt;
+	unsigned char mode;
+	int ret;
+
+	if(NULL == vvcam_drv_common)
+	{
+		pr_info("-->%s Error, null pointer of  vvcam_drv_common\n", __func__);
+		return 0;
+	}
+
+	mutex_lock(&vvcam_drv_common->vvmutex);
+
+	name = dev_name(dev);
+	pr_info("-->%s dev_name name:%s\n", __func__, name);
+	ret = sscanf(name, "%6s%d", dev_name_perfix, &dev_index);
+	pr_info("-->%s sscanf ret:%d, name:%s, id:%d\n", __func__, ret, dev_name_perfix, dev_index);
+
+	ret = sscanf(buf, "%c, 0x%x, 0x%x, 0x%d", &mode, &addr, &data, &read_cnt);
+	if(ret < 3)
+	{
+		sprintf(vvcam_drv_common->viv_buf, "Error input string %s The parameters number:%d, expect format: 'r/w, 0xAddress, 0xData, 0xReadCnt'",
+			buf, ret);
+		pr_info("Error input string %s The parameters number:%d, expect format: 'r/w, 0xAddress, 0xData, 0xReadNumber'",buf, ret);
+		mutex_unlock(&vvcam_drv_common->vvmutex);
+		return len;
+	}
+
+	sprintf(vvcam_drv_common->viv_buf, "init: %s, scanf ret:%d, mode:%c, addr:0x%x, data:0x%x, readcnt:0x%x", buf, ret, mode, addr, data, read_cnt);
+	pr_info("-->%s init: %s, scanf ret:%d, mode:%c, addr:0x%x, data:0x%x, readcnt:0x%x", __func__, buf, ret, mode, addr, data, read_cnt);
+
+	vivdev_dump_buf((unsigned char*)vvcam_drv_common->viv_buf, on_the_fly_str, strlen(on_the_fly_str), 0xaaaa);
+
+	mutex_unlock(&vvcam_drv_common->vvmutex);
+
+	return len;
+}
+
+static DEVICE_ATTR(vivdevio, S_IWUSR|S_IRUSR|S_IRGRP|S_IWGRP|S_IROTH, get_vivdev, set_vivdev);
+
+static int vvcam_isp_dev_open(struct inode *inode, struct file *file)
+{
+
+	int minor = iminor(inode);
+	pr_info("-->%s: ISPdev%d opened\n", __func__, minor);
+
+	mutex_lock(&(vvcam_isp_drv + minor)->vvmutex);
+
+	if((vvcam_isp_drv + minor)->open_cnt >= VVISP_OPEN_LIMITATION)
+	{
+		pr_info("-->%s: ISPdev%d cannot open device\n", __func__, minor);
+		mutex_unlock(&(vvcam_isp_drv + minor)->vvmutex);
+		return -EBUSY;
+	}
+
+	if((vvcam_isp_drv + minor)->initialized == 0)
+	{
+		pr_info("-->%s: ISPdev%d device not initialized\n", __func__, minor);
+		mutex_unlock(&(vvcam_isp_drv + minor)->vvmutex);
+		return -EBUSY;
+	}
+
+	(vvcam_isp_drv + minor)->open_cnt++;
+	pr_info("-->%s: ISPdev%d update open_cnt to %d\n", __func__, minor, (vvcam_isp_drv + minor)->open_cnt);
+	try_module_get(THIS_MODULE);
+	mutex_unlock(&(vvcam_isp_drv + minor)->vvmutex);
+
+	return 0;
+}
+
+
+/* Called when a process closes the device file */
+static int vvcam_isp_dev_release(struct inode *inode, struct file *file)
+{
+	int minor = iminor(inode);
+	pr_info("-->%s: ISPdev%d releaseing...\n", __func__, minor);
+
+	mutex_lock(&(vvcam_isp_drv + minor)->vvmutex);
+
+	if((vvcam_isp_drv + minor)->open_cnt <= 0)
+	{
+		pr_info("-->%s: ISPdev%d internal error\n", __func__, minor);
+		mutex_unlock(&(vvcam_isp_drv + minor)->vvmutex);
+		return -EBUSY;
+	}
+
+	(vvcam_isp_drv + minor)->open_cnt--;
+	module_put(THIS_MODULE);
+
+	mutex_unlock(&(vvcam_isp_drv + minor)->vvmutex);
+
+	return 0;
+}
+
+static long vvcam_isp_dev_ioctl(struct file * pFile, unsigned int cmd, unsigned long arg)
+{
+	long ret;
+	struct inode *inode =pFile->f_mapping->host;
+	int minor = iminor(inode);
+	pr_info("-->%s: ISPdev%d Ioctl runs, cmd:%d, args:%ld...\n", __func__, minor, cmd, arg);
+
+	ret = (*(vvnative_ioctl+minor))(vvcam_isp_drv + minor, cmd, arg);
+
+	return ret;
+};
+
+static int vvcam_isp_dev_mmap(struct file *pFile, struct vm_area_struct *vma)
+{
+	struct inode *inode =pFile->f_mapping->host;
+	int minor = iminor(inode);
+	ulong img_buf_base = vvnative_get_img_buf_base();
+	ulong img_buf_size = vvnative_get_img_buf_size();
+	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
+	unsigned long pfn_start = (img_buf_base >> PAGE_SHIFT) + vma->vm_pgoff;
+	unsigned long size = vma->vm_end - vma->vm_start;
+	int ret = 0;
+
+	if(size > img_buf_size)
+	{
+		size = img_buf_size;
+	}
+	pr_info("-->%s: ISPdev%d mmap runs...\n", __func__, minor);
+	pr_info("-->%s: mmap parameters: phy start:0x%lx, ph size:0x%lx, vm start: 0x%lx, size: 0x%lx, offset, page start: 0x%lx\n",
+	__func__, img_buf_base, img_buf_size, vma->vm_start, size, offset, pfn_start);
+
+	/* Map reserved image buffer memory. */
+	if (remap_pfn_range(vma, vma->vm_start,
+		(img_buf_base >> PAGE_SHIFT),
+		size, vma->vm_page_prot))
+	{
+		pr_err("-->%s: remap_pfn_range error!\n", __func__);
+		pr_info("-->%s: mmap parameters: phy start:0x%lx, ph size:0x%lx, vm start: 0x%lx, size: 0x%lx, offset\n",
+		__func__, img_buf_base, img_buf_size, vma->vm_start, size, offset);
+		return -EIO;
+	}
+
+	return ret;
+};
+
+static int vvcam_isp_devio_remap(int dev_no)
+{
+	void __iomem *addr;
+	ulong reg_base = vvnative_get_reg_base_by_idx(dev_no);
+	ulong reg_size = vvnative_get_reg_size_by_idx(dev_no);
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	(vvcam_isp_drv + dev_no)->phy_address = reg_base;
+	(vvcam_isp_drv + dev_no)->size = reg_size;
+	pr_info("ioremap of dev: %d, phy address:0x%lx, size:0x%lx\n", dev_no, reg_base, reg_size);
+	if((0 == reg_base) ||(0 == reg_size))
+	{
+		(vvcam_isp_drv + dev_no)->base_address = NULL;
+		pr_info("ioremap of dev: %d, phy address is 0\n", dev_no);
+	}else{
+	addr = ioremap(reg_base, reg_size);
+	pr_info("ioremap of dev: %d, address:0x%lx\n", dev_no, (unsigned long)addr);
+	(vvcam_isp_drv + dev_no)->base_address = addr;
+	}
+
+	return 0;
+}
+
+static int vvcam_isp_devio_unmap(int dev_no)
+{
+	if((NULL == vvcam_isp_drv))
+	{
+		pr_err("-->%s: NULL pointer!\n", __func__);
+		return -1;
+	}
+	if(NULL != (vvcam_isp_drv + dev_no)->base_address)
+	{
+		iounmap((vvcam_isp_drv + dev_no)->base_address);
+	}
+	return 0;
+}
+
+/*!
+*******************************************************************************
+** First function called by the OS. This function registers the device and
+** vendor id that this driver handles.
+*/
+int __init vvcam_isp_dev_initialize( void )
+{
+	int result = 0;
+	struct device *dev;
+	dev_t devt;
+	int retval;
+	int dev_idx = 0;
+	struct class *vvisp_class;
+
+	pr_info("-->%s enter\n", __func__);
+	pr_info("-->%s : %d, registerMemBase = 0x%lx, dev number:%d\n", __func__, __LINE__, VVISP0_BASE, VVCAM_ISP_DEVICES);
+
+	/**********************************************************************
+	* register/alloc the device major number and range, if
+	*   major = 0, alloc from kernel to get an available device major number
+	*   major != 0, use the specific value as major number, this value may be invalid
+	**********************************************************************/
+	vvcam_isp_drv = kzalloc(sizeof(struct vvcam_isp_dev) * VVCAM_ISP_DEVICES, GFP_KERNEL);
+	if (!vvcam_isp_drv)
+	{
+		return -ENOMEM;
+	}
+
+	vvcam_drv_common = kzalloc(sizeof(struct vvcam_common), GFP_KERNEL);
+	if (!vvcam_drv_common)
+	{
+		return -ENOMEM;
+	}
+
+	if (0 == vvcam_isp_dev_major)
+	{
+		result = alloc_chrdev_region(&devt, 0, VVCAM_ISP_DEVICES, DRIVER_NAME);
+		if (result)
+		{
+			goto fail_check;
+		}
+		vvcam_isp_dev_major = MAJOR(devt);
+		vvcam_isp_dev_minor = MINOR(devt);
+	}
+	else
+	{
+		devt = MKDEV(vvcam_isp_dev_major, vvcam_isp_dev_minor);
+		result = register_chrdev_region(devt, VVCAM_ISP_DEVICES, DRIVER_NAME);
+		if (result)
+		{
+			result = -EBUSY;
+			goto fail_check;
+		}
+	}
+
+	pr_info("--> vvcam ISP init, major id: %d, minor id: %d\n", MAJOR(devt), MINOR(devt));
+
+	vvisp_class = class_create(THIS_MODULE, DRIVER_NAME);
+	if (IS_ERR(vvisp_class))
+	{
+		pr_info("-->%s : %d,  class_create error!\n", __func__, __LINE__);
+		goto fail_check;
+	}
+
+	dev_idx = 0;
+	for(dev_idx = 0; dev_idx < VVCAM_ISP_DEVICES; dev_idx++)
+	{
+		if(strcmp(vvnative_get_dev_name_by_idx(dev_idx), VVNATIVE_NA) == 0)
+		{
+			pr_info("--> subisp%d is absent, id number:%s, skip..\n", dev_idx, vvnative_get_dev_name_by_idx(dev_idx) );
+			(vvcam_isp_drv + dev_idx)->initialized = 0;
+			continue;
+		}
+
+		(vvcam_isp_drv + dev_idx)->devt =  MKDEV(vvcam_isp_dev_major, vvcam_isp_dev_minor + dev_idx);
+
+		pr_info("--> subisp%d reg, major id: %d, minor id: %d, dev_name:%s\n", dev_idx,
+			MAJOR((vvcam_isp_drv + dev_idx)->devt), MINOR((vvcam_isp_drv + dev_idx)->devt),
+			vvnative_get_dev_name_by_idx(dev_idx));
+
+		cdev_init(&(vvcam_isp_drv + dev_idx)->cdev, &vvcam_isp_fops);
+		(vvcam_isp_drv + dev_idx)->cdev.owner = THIS_MODULE;
+
+		retval = cdev_add(&(vvcam_isp_drv + dev_idx)->cdev, (vvcam_isp_drv + dev_idx)->devt, 1);
+		if (retval)
+		{
+			pr_info("-->%s : %d,  cdev_add error!\n", __func__, __LINE__);
+			goto fail_check;
+		}
+
+		(vvcam_isp_drv + dev_idx)->class = vvisp_class;
+
+		dev = device_create((vvcam_isp_drv + dev_idx)->class, NULL, (vvcam_isp_drv + dev_idx)->devt,
+			(vvcam_isp_drv + dev_idx), "%s%d", vvnative_get_dev_name_by_idx(dev_idx), vvnative_get_dev_idx(dev_idx));
+		if (IS_ERR(dev))
+		{
+			pr_info("-->%s : %d,  device_create error!\n", __func__, __LINE__);
+			class_destroy(vvcam_isp_drv->class);
+			goto fail_check;
+		}
+		pr_info("-->dev create for subisp %s %d done\n", DRIVER_NAME, dev_idx);
+		(vvcam_isp_drv + dev_idx)->dev = dev;
+
+
+		if(sysfs_create_file(&(dev->kobj), &dev_attr_vivdevio.attr)) {
+			pr_info("-->%s : %d,  sysfs_create_file error!\n", __func__, __LINE__);
+			goto fail_check;
+		}
+
+		/* init */
+		mutex_init(&(vvcam_isp_drv + dev_idx)->vvmutex);
+		(vvcam_isp_drv + dev_idx)->open_cnt = 0;
+		(vvcam_isp_drv + dev_idx)->initialized = 1;
+		(vvcam_isp_drv + dev_idx)->dev_idx = vvnative_get_dev_idx(dev_idx);
+
+		result = vvcam_isp_devio_remap(dev_idx);
+		if(result)
+		{
+			pr_err("-->%s: vvcam_isp_devio_remap error!\n", __func__);
+			goto fail_check;
+		}
+
+		/* submodule initialization */
+		result = (*(vvnative_init+dev_idx))(vvcam_isp_drv + dev_idx);
+		if(result)
+		{
+			pr_err("-->%s: vvnative_init error with subdev:%d!\n", __func__, dev_idx);
+			goto fail_check;
+		}
+	}
+
+	/* on-the-fly debug init */
+	mutex_init(&vvcam_drv_common->vvmutex);
+	sprintf(vvcam_drv_common->viv_buf, "vivisp_buf");
+	return result;
+
+fail_check:
+	/* Unregister char driver */
+	pr_info("-->vvcam_isp_dev_initialize error\n");
+	unregister_chrdev_region(devt, VVCAM_ISP_DEVICES);
+	return result;
+}
+
+/*!
+*******************************************************************************
+** Unload the driver module
+*/
+void __exit vvcam_isp_dev_cleanup( void )
+{
+	int result = 0;
+	int dev_idx = 0;
+
+	pr_info("-->%s enter\n", __func__);
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_info("-->%s Internal error, NULL pointer\n", __func__);
+		return;
+	}
+	for(dev_idx = 0; dev_idx < VVCAM_ISP_DEVICES; dev_idx++)
+	{
+		if(0 == (vvcam_isp_drv + dev_idx)->initialized)
+		{
+			continue;
+		}
+
+		/* submodule un-initialization */
+		result = (*(vvnative_deinit+dev_idx))(vvcam_isp_drv + dev_idx);
+		if(result)
+		{
+			pr_err("-->%s: vvnative_deinit error with subdev:%d!\n", __func__, dev_idx);
+		}
+
+		result = vvcam_isp_devio_unmap(dev_idx);
+		if(result)
+		{
+			pr_err("-->%s: vvcam_isp_devio_unmap error!\n", __func__);
+		}
+
+		device_destroy((vvcam_isp_drv + dev_idx)->class, (vvcam_isp_drv + dev_idx)->devt);
+
+		cdev_del(&(vvcam_isp_drv + dev_idx)->cdev);
+		/* remove the char device structure (has been added) */
+
+		unregister_chrdev_region((vvcam_isp_drv + dev_idx)->devt, VVCAM_ISP_DEVICES);
+		(vvcam_isp_drv + dev_idx)->dev = NULL;
+		(vvcam_isp_drv + dev_idx)->open_cnt = 0;
+	}
+
+	class_destroy(vvcam_isp_drv->class);
+	vvcam_isp_drv->class = NULL;
+
+	kfree(vvcam_isp_drv);
+	vvcam_isp_drv = NULL;
+	kfree(vvcam_drv_common);
+	vvcam_drv_common = NULL;
+
+	return;
+}
+
+module_init(vvcam_isp_dev_initialize);
+module_exit(vvcam_isp_dev_cleanup);
+
+MODULE_LICENSE ("GPL");

+ 95 - 0
vvcam/common/vvnative.h

@@ -0,0 +1,95 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVNATIVE_H_
+#define _VVNATIVE_H_
+
+/* #include <linux/ioctl.h> for kernel space */
+/* #include <sys/ioctl.h> for user space */
+
+#define VVISP_OPEN_LIMITATION 1
+#define VVISP_DBG_BUFFER 4096
+
+
+#define IOC_MAGIC  'v'
+#define IOCINIT    _IO(IOC_MAGIC, 0)
+
+struct vvcam_isp_dev {
+	struct device *dev;
+	struct cdev cdev;
+	dev_t devt;
+	int dev_idx;
+
+	struct class *class;
+	int status;
+
+	long phy_address;
+	long size;
+	void __iomem *base_address;
+	int base_range;
+
+	struct mutex vvmutex;
+	int open_cnt;
+	int initialized;
+	void *private_ctx;
+};
+
+struct vvcam_common{
+	struct mutex vvmutex;
+	char viv_buf[VVISP_DBG_BUFFER];
+};
+
+
+
+
+
+#endif // _VVNATIVE_H_

+ 264 - 0
vvcam/common/vvnative_cfg.c

@@ -0,0 +1,264 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/module.h>			/* Module support */
+#include "vvnative_cfg.h"
+
+char vvcam_driver_name [][8]=
+{
+	#ifdef WITH_VVISP  /* devid 0 */
+	VVNATIVE_ISP,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVISP_DUAL  /* devid 1 */
+	VVNATIVE_ISP,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVCSI  /* devid 2 */
+	VVNATIVE_CSI,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVCSI_DUAL  /* devid 3 */
+	VVNATIVE_CSI,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVCAM  /* devid 4 */
+	VVNATIVE_SENSOR,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVCAM_DUAL  /* devid 5 */
+	VVNATIVE_SENSOR,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVDWE  /* devid 6 */
+	VVNATIVE_DWE,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVVSE  /* devid 7 */
+	VVNATIVE_VSE,
+	#else
+	VVNATIVE_NA,
+	#endif
+	#ifdef WITH_VVCTL  /* devid 8 */
+	VVNATIVE_SOC,
+	#else
+	VVNATIVE_NA,
+	#endif
+};
+
+char * vvnative_get_dev_name_by_idx(int devidx)
+{
+	if((devidx > VVCAM_ISP_DEVICES)||(devidx < 0))
+	{
+		return VVNATIVE_NA;
+	}
+	return vvcam_driver_name[devidx];
+}
+
+
+/* Parameters that can be set with 'insmod' */
+/* ISP */
+static ulong vvisp0_reg_base = VVISP0_BASE;
+module_param(vvisp0_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH );
+MODULE_PARM_DESC(vvisp0_reg_base, "VVISP0 Reg Base address of AHB register");
+
+static ulong vvisp1_reg_base = VVISP1_BASE;
+module_param(vvisp1_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH );
+MODULE_PARM_DESC(vvisp1_reg_base, "VVISP1 Reg Base address of AHB register");
+
+static ulong vvisp_reg_size = VVISP_SIZE;
+module_param(vvisp_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvisp_reg_size, "VVISP0/1 Reg address range of AHB register");
+
+/* CSI */
+static ulong vvcsi0_reg_base = VVCSI0_BASE;
+module_param(vvcsi0_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcsi0_reg_base, "VVCSI0 Reg Base address of AHB register");
+
+static ulong vvcsi1_reg_base = VVCSI1_BASE;
+module_param(vvcsi1_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcsi1_reg_base, "VVCSI1 Reg Base address of AHB register");
+
+static ulong vvcsi_reg_size = VVCSI_SIZE;
+module_param(vvcsi_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcsi_reg_size, "VVCSI0/1 Reg address range of AHB register");
+
+/* Sensor */
+static ulong vvcam0_reg_base = VVCAM0_BASE;
+module_param(vvcam0_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcam0_reg_base, "VVCAM0 Reg Base address of AHB register");
+
+static ulong vvcam1_reg_base = VVCAM1_BASE;
+module_param(vvcam1_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcam1_reg_base, "VVCAM1 Reg Base address of AHB register");
+
+static ulong vvcam_reg_size = VVCAM_SIZE;
+module_param(vvcam_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvcam_reg_size, "VVCAM0/1 Reg address range of AHB register");
+
+/* Dwe */
+static ulong vvdwe_reg_base = VVDWE_BASE;
+module_param(vvdwe_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvdwe_reg_base, "VVDWE Reg Base address of AHB register");
+
+static ulong vvdwe_reg_size = VVDWE_SIZE;
+module_param(vvdwe_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvdwe_reg_size, "VVDWE Reg address range of AHB register");
+
+/* Vse */
+static ulong vvvse_reg_base = VVVSE_BASE;
+module_param(vvvse_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvvse_reg_base, "VVVSE Reg Base address of AHB register");
+
+static ulong vvvse_reg_size = VVVSE_SIZE;
+module_param(vvvse_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvvse_reg_size, "VVVSE Reg address range of AHB register");
+
+/* Crtl */
+static ulong vvctl_reg_base = VVCTRL_BASE;
+module_param(vvctl_reg_base, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvctl_reg_base, "VVCTRL Reg Base address of AHB register");
+
+static ulong vvctl_reg_size = VVCTRL_SIZE;
+module_param(vvctl_reg_size, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvctl_reg_size, "VVCTRL Reg address range of AHB register");
+
+
+static ulong vvImgBufBase = 0x10000000;
+module_param(vvImgBufBase, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvImgBufBase, "Base addrss of memory reserved for ISP");
+
+static ulong vvImgBufSize = 0x10000000;
+module_param(vvImgBufSize, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+MODULE_PARM_DESC(vvImgBufSize, "Size of memory reserved for ISP");
+
+
+ulong* reg_base_size_array[] =
+{
+	&vvisp0_reg_base, /* devid 0 */
+	&vvisp_reg_size,
+	&vvisp1_reg_base, /* devid 1 */
+	&vvisp_reg_size,
+	&vvcsi0_reg_base, /* devid 2 */
+	&vvcsi_reg_size,
+	&vvcsi1_reg_base, /* devid 3 */
+	&vvcsi_reg_size,
+	&vvcam0_reg_base, /* devid 4 */
+	&vvcam_reg_size,
+	&vvcam1_reg_base, /* devid 5 */
+	&vvcam_reg_size,
+	&vvdwe_reg_base,  /* devid 6 */
+	&vvdwe_reg_size,
+	&vvvse_reg_base,  /* devid 7 */
+	&vvvse_reg_size,
+	&vvctl_reg_base,  /* devid 8 */
+	&vvctl_reg_size,
+};
+
+ulong vvnative_get_reg_base_by_idx(int devidx)
+{
+	if((devidx > VVCAM_ISP_DEVICES)||(devidx < 0))
+	{
+		return 0;
+	}
+	return *reg_base_size_array[devidx*2];
+}
+
+ulong vvnative_get_reg_size_by_idx(int devidx)
+{
+	if((devidx > VVCAM_ISP_DEVICES)||(devidx < 0))
+	{
+		return 0;
+	}
+	return *reg_base_size_array[devidx*2 + 1];
+}
+
+int reg_dev_idx_array[] =
+{
+	0, /* devid 0 isp0*/
+	1, /* devid 1 isp1 */
+	0, /* devid 2 csi0*/
+	1, /* devid 3 csi1*/
+	0, /* devid 4 cam0*/
+	1, /* devid 5 cam1*/
+	0,  /* devid 6 dwe0*/
+	0,  /* devid 7 vse0*/
+	0,  /* devid 8 ctrl0*/
+};
+
+
+int vvnative_get_dev_idx(int devidx)
+{
+	if((devidx > VVCAM_ISP_DEVICES)||(devidx < 0))
+	{
+		return -1;
+	}
+	return reg_dev_idx_array[devidx];
+}
+
+
+ulong vvnative_get_img_buf_base(void)
+{
+	return vvImgBufBase;
+}
+
+ulong vvnative_get_img_buf_size(void)
+{
+	return vvImgBufSize;
+}

+ 78 - 0
vvcam/common/vvnative_cfg.h

@@ -0,0 +1,78 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVNATIVE_CFG_H_
+#define _VVNATIVE_CFG_H_
+
+
+//#define DRIVER_NAME ""
+#define DRIVER_NAME      "vivisp"
+
+#define VVNATIVE_ISP     "vivisp"
+//#define VVNATIVE_CSI     "vivcsi"
+#define VVNATIVE_CSI     "bm_csi"
+#define VVNATIVE_SENSOR  "vivcam"
+#define VVNATIVE_DWE     "vivdwe"
+#define VVNATIVE_VSE     "vivvse"
+#define VVNATIVE_SOC     "vivsoc"
+#define VVNATIVE_NA      "nondev"
+
+#define VVCAM_ISP_DEVICES          (9)
+
+char * vvnative_get_dev_name_by_idx(int devidx);
+ulong vvnative_get_reg_base_by_idx(int devidx);
+ulong vvnative_get_reg_size_by_idx(int devidx);
+ulong vvnative_get_img_buf_base(void);
+ulong vvnative_get_img_buf_size(void);
+int vvnative_get_dev_idx(int devidx);
+
+#endif // _VVNATIVE_CFG_H_

+ 509 - 0
vvcam/common/vvnative_combo.c

@@ -0,0 +1,509 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/cdev.h>				/* Charactor device support */
+#include <linux/i2c.h>
+
+#include "isp_ioctl.h"
+#include "sensor_ioctl.h"
+#include "csi_ioctl.h"
+#include "soc_ioctl.h"
+#include "dwe_ioctl.h"
+#include "vse_ioctl.h"
+
+
+
+#include "vvnative.h"
+#include "vvnative_combo.h"
+
+/* IOCTL combos */
+long vvcam_combo_isp_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct isp_ic_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: NULL pointer input!\n", __func__);
+		return -1;
+	}
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+	pr_info("-->%s: Ioctl runs, cmd:%d, args:%px...\n", __func__, cmd, args);
+
+	dev = (struct isp_ic_dev *)vvcam_isp_drv->private_ctx;
+	ret = isp_priv_ioctl(dev, cmd, args);
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+
+long vvcam_combo_csi_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct vvcam_csi_dev *dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: NULL pointer input!\n", __func__);
+		return -1;
+	}
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+
+	dev = (struct vvcam_csi_dev *)vvcam_isp_drv->private_ctx;
+	ret = csi_priv_ioctl(dev, cmd, args);
+
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+#if 0
+static struct i2c_board_info sensor_i2c_info =
+{
+	I2C_BOARD_INFO("sensor_ov2775", 0x00),
+};
+
+static void *vvcamGetSensorI2cClient(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	struct i2c_adapter *i2c_adap;
+	static struct i2c_client *i2c_client = NULL;
+	if (i2c_client == NULL)
+	{
+		i2c_adap = i2c_get_adapter(0);
+		i2c_client = i2c_new_device(i2c_adap, &sensor_i2c_info);
+		i2c_put_adapter(i2c_adap);
+	}
+
+	return i2c_client;
+}
+#endif
+
+long vvcam_combo_sensor_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct vvcam_sensor_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: NULL pointer input!\n", __func__);
+		return -1;
+	}
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+	pr_info("-->%s: Ioctl runs, cmd:%d, args:%px...\n", __func__, cmd, args);
+
+	dev = (struct vvcam_sensor_dev *)vvcam_isp_drv->private_ctx;
+	ret = sensor_priv_ioctl(dev, cmd, (void __user *)args);
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+long vvcam_combo_dwe_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct dwe_ic_dev *dev;
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+	pr_info("-->%s: Ioctl runs, cmd:%d, args:%px...\n", __func__, cmd, args);
+
+	dev = (struct dwe_ic_dev *)vvcam_isp_drv->private_ctx;
+	ret = dwe_priv_ioctl(dev, cmd, args);
+
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+long vvcam_combo_vse_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct vse_ic_dev *dev;
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+	pr_info("-->%s: Ioctl runs, cmd:%d, args:%px...\n", __func__, cmd, args);
+
+	dev = (struct vse_ic_dev *)vvcam_isp_drv->private_ctx;
+	ret = vse_priv_ioctl(dev, cmd, args);
+
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+long vvcam_combo_soc_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args)
+{
+	long ret;
+	struct vvcam_soc_dev *dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: NULL pointer input!\n", __func__);
+		return -1;
+	}
+
+	mutex_lock(&vvcam_isp_drv->vvmutex);
+
+	dev = (struct vvcam_soc_dev *)vvcam_isp_drv->private_ctx;
+	ret = soc_priv_ioctl(dev, cmd, (void __user)args);
+
+	mutex_unlock(&vvcam_isp_drv->vvmutex);
+
+	return ret;
+}
+
+/* Submodule init combos */
+int vvcam_combo_isp_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct isp_ic_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct isp_ic_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct isp_ic_dev *)vvcam_isp_drv->private_ctx;
+	dev->base = vvcam_isp_drv->base_address;
+
+	dev->reset = NULL;
+
+	return ret;
+}
+
+int vvcam_combo_csi_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_csi_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct vvcam_csi_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct vvcam_csi_dev *)vvcam_isp_drv->private_ctx;
+
+	dev->base = vvcam_isp_drv->base_address;
+	dev->device_idx = vvcam_isp_drv->dev_idx;
+	ret = vvnative_csi_init(dev);
+	if (ret != 0)
+	{
+		pr_err("-->%s: vvnative_csi_init error!\n", __func__);
+		return -1;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_sensor_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_sensor_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct vvcam_sensor_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct vvcam_sensor_dev *)vvcam_isp_drv->private_ctx;
+	dev->phy_addr   = vvcam_isp_drv->phy_address;
+	dev->reg_size   = vvcam_isp_drv->size;
+	dev->base       = vvcam_isp_drv->base_address;
+	dev->device_idx = vvcam_isp_drv->dev_idx;
+
+	ret = vvnative_sensor_init(dev);
+	if (ret != 0)
+	{
+		pr_err("-->%s: vvnative_sensor_init error!\n", __func__);
+		return -1;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_dwe_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct dwe_ic_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct dwe_ic_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct dwe_ic_dev *)vvcam_isp_drv->private_ctx;
+	dev->base = vvcam_isp_drv->base_address;
+
+	ret = vvnative_dwe_init(dev);
+	if (ret != 0)
+	{
+		pr_err("-->%s: vvnative_dwe_init error!\n", __func__);
+		return -1;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_vse_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vse_ic_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct vse_ic_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct vse_ic_dev *)vvcam_isp_drv->private_ctx;
+	dev->base = vvcam_isp_drv->base_address;
+
+	ret = vvnative_vse_init(dev);
+	if (ret != 0)
+	{
+		pr_err("-->%s: vvnative_vse_init error!\n", __func__);
+		return -1;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_soc_init(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_soc_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	vvcam_isp_drv->private_ctx = kzalloc(sizeof(struct vvcam_soc_dev), GFP_KERNEL);
+	if(NULL == vvcam_isp_drv->private_ctx)
+	{
+		pr_err("-->%s: internal alloc memory error!\n", __func__);
+		return -1;
+	}
+
+	dev = (struct vvcam_soc_dev *)vvcam_isp_drv->private_ctx;
+	dev->base = vvcam_isp_drv->base_address;
+	vvnative_soc_init(dev);
+
+	return ret;
+}
+
+
+
+/* Submodule deinit combos */
+int vvcam_combo_isp_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_csi_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_csi_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		dev = (struct vvcam_csi_dev *)vvcam_isp_drv->private_ctx;
+		vvnative_csi_deinit(dev);
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_sensor_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_sensor_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		dev = (struct vvcam_sensor_dev *)vvcam_isp_drv->private_ctx;
+		vvnative_sensor_deinit(dev);
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_dwe_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct dwe_ic_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		dev = (struct dwe_ic_dev *)vvcam_isp_drv->private_ctx;
+		vvnative_dwe_deinit(dev);
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_vse_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vse_ic_dev * dev;
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		dev = (struct vse_ic_dev *)vvcam_isp_drv->private_ctx;
+		vvnative_vse_deinit(dev);
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}
+
+int vvcam_combo_soc_deinit(struct vvcam_isp_dev *vvcam_isp_drv)
+{
+	int ret = 0;
+	struct vvcam_soc_dev * dev;
+
+	if(NULL == vvcam_isp_drv)
+	{
+		pr_err("-->%s: input NULL pointer!\n", __func__);
+		return -1;
+	}
+
+	if(NULL != vvcam_isp_drv->private_ctx)
+	{
+		dev = (struct vvcam_soc_dev *)vvcam_isp_drv->private_ctx;
+		vvnative_soc_deinit(dev);
+		kzfree(vvcam_isp_drv->private_ctx);
+		vvcam_isp_drv->private_ctx = NULL;
+	}
+
+	return ret;
+}

+ 78 - 0
vvcam/common/vvnative_combo.h

@@ -0,0 +1,78 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVNATIVE_COMBO_H_
+#define _VVNATIVE_COMBO_H_
+
+long vvcam_combo_isp_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+long vvcam_combo_csi_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+long vvcam_combo_sensor_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+long vvcam_combo_dwe_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+long vvcam_combo_vse_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+long vvcam_combo_soc_ioctl(struct vvcam_isp_dev *vvcam_isp_drv,unsigned int cmd, void *args);
+
+int vvcam_combo_isp_init(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_csi_init(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_sensor_init(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_dwe_init(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_vse_init(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_soc_init(struct vvcam_isp_dev *vvcam_isp_drv);
+
+int vvcam_combo_isp_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_csi_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_sensor_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_dwe_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_vse_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+int vvcam_combo_soc_deinit(struct vvcam_isp_dev *vvcam_isp_drv);
+
+#endif
+

+ 265 - 0
vvcam/common/vvsensor.h

@@ -0,0 +1,265 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VVSENSOR_PUBLIC_HEADER_H_
+#define _VVSENSOR_PUBLIC_HEADER_H_
+
+#ifndef __KERNEL__
+#include <stdint.h>
+#else
+#include <linux/uaccess.h>
+#endif
+
+#define VVCAM_SUPPORT_MAX_MODE_COUNT               20
+#define VVCAM_CAP_BUS_INFO_I2C_ADAPTER_NR_POS       8
+
+enum {
+	VVSENSORIOC_RESET = 0x100,
+	VVSENSORIOC_S_CLK,
+	VVSENSORIOC_G_CLK,
+	VVSENSORIOC_S_POWER,
+	VVSENSORIOC_G_POWER,
+	VVSENSORIOC_SENSOR_SCCB_CFG,
+	VVSENSORIOC_FOCUS_SCCB_CFG,
+	VVSENSORIOC_READ_REG,
+	VVSENSORIOC_WRITE_REG,
+	VVSENSORIOC_READ_ARRAY,
+	VVSENSORIOC_WRITE_ARRAY,
+	VVSENSORIOC_AF_READ_REG,
+	VVSENSORIOC_AF_WRITE_REG,
+	VVSENSORIOC_G_MIPI,
+	VVSENSORIOC_G_NAME,
+	VVSENSORIOC_G_RESERVE_ID,
+	VVSENSORIOC_G_CHIP_ID,
+	VVSENSORIOC_S_INIT,
+	VVSENSORIOC_S_STREAM,
+	VVSENSORIOC_S_LONG_EXP,
+	VVSENSORIOC_S_EXP,
+	VVSENSORIOC_S_VSEXP,
+	VVSENSORIOC_S_LONG_GAIN,
+	VVSENSORIOC_S_GAIN,
+	VVSENSORIOC_S_VSGAIN,
+	VVSENSORIOC_S_FRAMESIZE,
+	VVSENSORIOC_ENUM_FRAMESIZES,
+	VVSENSORIOC_S_HDR_MODE,
+	VVSENSORIOC_G_HDR_MODE,
+	VVSENSORIOC_S_FPS,
+	VVSENSORIOC_G_FPS,
+	VVSENSORIOC_S_HDR_RADIO,
+	VVSENSORIOC_G_AE_INFO,
+	VVSENSORIOC_QUERY,
+	VVSENSORIOC_G_SENSOR_MODE,
+	VVSENSORIOC_S_WB,
+	VVSENSORIOC_S_BLC,
+	VVSENSORIOC_G_EXPAND_CURVE,
+	VVSENSORIOC_S_SENSOR_MODE,
+	VVSENSORIOC_MAX,
+};
+
+/* W/R registers */
+struct vvcam_sccb_data {
+	uint32_t addr;
+	uint32_t data;
+};
+
+/* init settings */
+struct vvsensor_reg_value_t {
+	uint16_t addr;
+	uint8_t val;
+	uint8_t mask;
+	uint32_t delay;
+};
+
+/* priv ioctl */
+struct vvsensor_gain_context {
+	uint32_t again;
+	uint32_t dgain;
+};
+
+/* vsi native usage */
+struct vvcam_sccb_cfg_s {
+	uint8_t slave_addr;
+	uint8_t addr_byte;
+	uint8_t data_byte;
+};
+
+struct vvcam_sccb_array {
+	uint32_t count;
+	struct vvcam_sccb_data *sccb_data;
+};
+
+typedef struct vvcam_ae_info_s {
+	uint32_t DefaultFrameLengthLines;
+	uint32_t CurFrameLengthLines;
+	uint32_t one_line_exp_time_ns;
+	uint32_t max_integration_time;
+	uint32_t min_integration_time;
+	uint32_t integration_accuracy;
+	uint32_t max_gain;
+	uint32_t min_gain;
+	uint32_t gain_accuracy;
+	uint32_t cur_fps;
+	uint32_t hdr_radio;
+} vvcam_ae_info_t;
+
+struct sensor_mipi_info {
+	uint32_t mipi_lane;
+	uint32_t sensor_data_bit;
+};
+
+enum sensor_hdr_mode_e
+{
+	SENSOR_MODE_LINEAR ,
+	SENSOR_MODE_HDR_STITCH,
+	SENSOR_MODE_HDR_NATIVE,
+};
+
+enum SENSOR_BAYER_PATTERN_E
+{
+    BAYER_RGGB    = 0,
+    BAYER_GRBG    = 1,
+    BAYER_GBRG    = 2,
+    BAYER_BGGR    = 3,
+    BAYER_BUTT
+};
+
+enum sensor_stitching_mode_e
+{
+	SENSOR_STITCHING_DUAL_DCG        = 0,   /**< dual DCG mode 3x12-bit */
+	SENSOR_STITCHING_3DOL            = 1,   /**< dol3 frame 3x12-bit */
+	SENSOR_STITCHING_LINEBYLINE      = 2,   /**< 3x12-bit line by line without waiting */
+	SENSOR_STITCHING_16BIT_COMPRESS  = 3,   /**< 16-bit compressed data + 12-bit RAW */
+	SENSOR_STITCHING_DUAL_DCG_NOWAIT = 4,   /**< 2x12-bit dual DCG without waiting */
+	SENSOR_STITCHING_2DOL            = 5,   /**< dol2 frame or 1 CG+VS sx12-bit RAW */
+	SENSOR_STITCHING_L_AND_S         = 6,   /**< L+S 2x12-bit RAW */
+	SENSOR_STITCHING_MAX
+
+};
+
+typedef struct sensor_expand_curve_s
+{
+	uint32_t x_bit;
+	uint32_t y_bit;
+	uint8_t expand_px[64];
+	uint32_t expand_x_data[65];
+	uint32_t expand_y_data[65];
+}sensor_expand_curve_t;
+
+typedef struct sensor_data_compress_s
+{
+	uint32_t enable;
+	uint32_t x_bit;
+	uint32_t y_bit;
+}sensor_data_compress_t;
+
+
+typedef struct vvcam_mode_info {
+	uint32_t index;
+	uint32_t width;
+	uint32_t height;
+	uint32_t fps;
+	uint32_t hdr_mode;
+	uint32_t stitching_mode;
+	uint32_t bit_width;
+	sensor_data_compress_t data_compress;
+	uint32_t bayer_pattern;
+	vvcam_ae_info_t ae_info;
+	void *preg_data;
+	uint32_t reg_data_count;
+    uint32_t mipi_phy_freq;
+    uint32_t mipi_line_num;
+} vvcam_mode_info_t;
+
+typedef struct sensor_blc_s
+{
+	uint32_t red;
+	uint32_t gr;
+	uint32_t gb;
+	uint32_t blue;
+}sensor_blc_t;
+
+typedef struct sensor_white_balance_s
+{
+	uint32_t     r_gain;
+	uint32_t     gr_gain;
+	uint32_t     gb_gain;
+	uint32_t     b_gain;
+}sensor_white_balance_t;
+
+typedef struct vvcam_mode_info_array {
+	uint32_t count;
+	struct vvcam_mode_info modes[VVCAM_SUPPORT_MAX_MODE_COUNT];
+} vvcam_mode_info_array_t;
+
+
+#ifdef SENSOR_CROP
+/**************************************
+*Reserved for sensor crop
+***************************************/
+typedef struct sensor_crop_regions_s
+{
+	uint32_t offs_x;
+	uint32_t offs_y;
+	uint32_t width;
+	uint32_t height;
+}sensor_crop_regions_t;
+
+typedef struct sensor_crop_limits_s
+{
+	uint32_t mode_index;
+	sensor_crop_regions_t max_regions;
+	sensor_crop_regions_t min_regions;
+}sensor_crop_limits_t;
+#endif
+
+#endif
+

+ 204 - 0
vvcam/csi/csi_ioctl.c

@@ -0,0 +1,204 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <errno.h>
+
+#define pr_info printf
+#define pr_err printf
+#define copy_from_user(a, b, c) csi_copy_data(a, b, c)
+#define copy_to_user(a, b, c) csi_copy_data(a, b, c)
+#define __user
+#define __iomem
+
+void csi_copy_data(void *dst, void *src, int size)
+{
+	if (dst != src)
+		memcpy(dst, src, size);
+}
+
+#else  // __KERNEL__
+#include <linux/module.h>			/* Module support */
+#include <linux/uaccess.h>
+
+#endif
+
+#include "csi_ioctl.h"
+#include "vivcsi_hub.h"
+
+
+long csi_priv_ioctl(struct vvcam_csi_dev *dev, unsigned int cmd, void *args)
+{
+	int ret = -1;
+
+	if (!dev) {
+		return ret;
+	}
+
+	switch (cmd) {
+	case VVCSI_IOC_S_RESET:
+		ret = vivcsi_hub_reset(dev);
+		break;
+
+	case VVCSI_IOC_S_POWER:
+		copy_from_user(&dev->power_status, args, sizeof(dev->power_status));
+		ret = vivcsi_hub_set_power(dev);
+		break;
+
+	case VVCSI_IOC_G_POWER:
+		ret = vivcsi_hub_get_power(dev);
+		copy_to_user(args, &dev->power_status, sizeof(dev->power_status));
+		break;
+
+	case VVCSI_IOC_S_CLOCK:
+		copy_from_user(&dev->clock, args, sizeof(dev->clock));
+		ret = vivcsi_hub_set_clock(dev);
+		break;
+
+	case VVCSI_IOC_G_CLOCK:
+		ret = vivcsi_hub_get_clock(dev);
+		copy_to_user(args, &dev->clock, sizeof(dev->clock));
+		ret = 0;
+		break;
+
+	case VVCSI_IOC_S_STREAM:
+		copy_from_user(&dev->streaming_enable, args, sizeof(dev->streaming_enable));
+		ret = vivcsi_hub_set_stream_control(dev);
+		break;
+
+	case VVCSI_IOC_G_STREAM:
+		ret = vivcsi_hub_get_stream_control(dev);
+		copy_to_user(args, &dev->streaming_enable, sizeof(dev->streaming_enable));
+		break;
+
+	case VVCSI_IOC_S_FMT:
+		copy_from_user(&dev->csi_format, args, sizeof(dev->csi_format));
+		ret = vivcsi_hub_set_fmt(dev);
+		break;
+
+	case VVCSI_IOC_G_FMT:
+		ret = vivcsi_hub_get_fmt(dev);
+		copy_to_user(args, &dev->csi_format, sizeof(dev->csi_format));
+		break;
+
+	case VVCSI_IOC_S_VC_SELECT:
+		copy_from_user(&dev->csi_vc_select, args, sizeof(dev->csi_vc_select));
+		ret = vivcsi_hub_set_vc_select(dev);
+		break;
+
+	case VVCSI_IOC_G_VC_SELECT:
+		ret = vivcsi_hub_get_vc_select(dev);
+		copy_to_user(args, &dev->csi_vc_select, sizeof(dev->csi_vc_select));
+		break;
+	case VVCSI_IOC_S_LANE_CFG:
+		copy_from_user(&dev->csi_lane_cfg, args, sizeof(dev->csi_lane_cfg));
+		ret = vivcsi_hub_set_csi_lane_cfg(dev);
+		break;
+	default:
+		pr_err("unsupported command %d", cmd);
+		break;
+	}
+
+	return ret;
+}
+
+extern struct vvcam_csi_hardware_function_s nwl_mipi_function;
+
+int vvnative_csi_init(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if (dev ==  NULL)
+	{
+		pr_err("[%s] dev is NULL\n", __func__);
+		return -1;
+	}
+
+	vvcsi_register_hardware(dev,&nwl_mipi_function);
+	if (dev->csi_hard_func.init)
+	{
+		ret = dev->csi_hard_func.init(dev);
+		if (ret < 0)
+		{
+			pr_err("[%s] init failed\n", __func__);
+			return -1;
+		}
+	}
+	return 0;
+}
+
+int vvnative_csi_deinit(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if (dev ==  NULL)
+	{
+		pr_err("[%s] dev is NULL\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.exit)
+	{
+		ret = dev->csi_hard_func.exit(dev);
+		if (ret < 0)
+		{
+			pr_err("[%s] exit failed\n", __func__);
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+

+ 154 - 0
vvcam/csi/csi_ioctl.h

@@ -0,0 +1,154 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _CSI_IOC_H_
+#define _CSI_IOC_H_
+
+#ifndef __KERNEL__
+#include <stdint.h>
+#endif
+#include <linux/ioctl.h>
+
+enum {
+	VVCSI_IOC_S_RESET = _IO('r', 0),
+	VVCSI_IOC_S_POWER,
+	VVCSI_IOC_G_POWER,
+	VVCSI_IOC_S_CLOCK,
+	VVCSI_IOC_G_CLOCK,
+	VVCSI_IOC_S_STREAM,
+	VVCSI_IOC_G_STREAM,
+	VVCSI_IOC_S_FMT,
+	VVCSI_IOC_G_FMT,
+	VVCSI_IOC_S_VC_SELECT,
+	VVCSI_IOC_G_VC_SELECT,
+	VVCSI_IOC_S_LANE_CFG,
+	VVCSI_IOC_S_BIT_SHIFT,
+	VVCSI_IOC_MAX,
+};
+
+struct csi_vc_select_context {
+	uint32_t csi_vc_select_mode;
+	uint32_t vc_channel;
+};
+
+struct csi_format_context {
+	uint32_t format;
+	uint32_t width;
+	uint32_t height;
+};
+
+struct vvcam_csi_hardware_function_s
+{
+	int (*init)(void* dev);
+	int (*exit)(void* dev);
+	int (*reset)(void* dev);
+	int (*set_power)(void* dev);
+	int (*get_power)(void* dev);
+	int (*set_clock)(void* dev);
+	int (*get_clock)(void* dev);
+	int (*set_stream_control)(void* dev);
+	int (*get_stream_control)(void* dev);
+	int (*set_fmt)(void* dev);
+	int (*get_fmt)(void* dev);
+	int (*set_vc_select)(void* dev);
+	int (*get_vc_select)(void* dev);
+	int (*set_lane_cfg)(void* dev);
+};
+
+struct vvcam_csi_lane_cfg
+{
+	uint32_t mipi_lane_num;
+};
+
+struct vvcam_csi_access_s
+{
+	int (*write)(void * ctx, uint32_t address, uint32_t data);
+	int (*read)(void * ctx, uint32_t address, uint32_t *data);
+};
+
+
+#ifdef __KERNEL__
+
+struct vvcam_csi_dev {
+	void __iomem *base;
+	char name[16];
+
+	int present;
+	int device_idx;
+
+	uint32_t power_status;
+	uint32_t clock;
+
+	uint32_t streaming_enable;
+	struct csi_vc_select_context csi_vc_select;
+	struct csi_format_context csi_format;
+	struct vvcam_csi_hardware_function_s csi_hard_func;
+	struct vvcam_csi_access_s  csi_access;
+	struct vvcam_csi_lane_cfg csi_lane_cfg;
+	void * csi_private;
+};
+
+// internal functions
+
+long csi_priv_ioctl(struct vvcam_csi_dev *dev, unsigned int cmd, void *args);
+int vvnative_csi_init(struct vvcam_csi_dev *dev);
+int vvnative_csi_deinit(struct vvcam_csi_dev *dev);
+
+
+
+#else
+//User space connections
+
+
+#endif
+
+#endif  // _CSI_IOC_H_

+ 322 - 0
vvcam/csi/nwl/nwl_core.c

@@ -0,0 +1,322 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/module.h>
+#include <linux/uaccess.h>
+#ifdef ISP8000L_V2008
+#include <linux/io.h>   //Fix thead compile error.
+#endif
+
+#include "nwl_regs.h"
+#include "../csi_ioctl.h"
+
+
+int nwl_register_write(void * dev,unsigned int addr, unsigned int data)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	writel(data, base_addr + addr);
+
+	return 0;
+}
+
+int nwl_register_read(void * dev,unsigned int addr, unsigned int *data)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	*data = readl(base_addr + addr);
+
+	return 0;
+}
+
+
+static int nwl_init(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	nwl_csi_dev->csi_access.write = nwl_register_write;
+	nwl_csi_dev->csi_access.read  = nwl_register_read;
+
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_NUM_LANES, 0x4);
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_LANES_CLK, 0x1);
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_LANES_DATA, 0xF);
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_IGNORE_VC, 0x1);
+
+	if (nwl_csi_dev->device_idx == 0)
+	{
+		nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI0_CTRL, 0x4);
+	}else
+	{
+		nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI1_CTRL, 0x4);
+	}
+
+	return 0;
+}
+
+static int nwl_exit(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_reset(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_power(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_get_power(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_clock(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_get_clock(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_stream_control(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+	u32 clock_status;
+	u32 data_status;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	if (nwl_csi_dev->streaming_enable)
+	{
+		clock_status = 0x01;
+		data_status  = 0xFF;
+	}
+	else
+	{
+		clock_status = 0x00;
+		data_status  = 0x00;
+	}
+
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_LANES_CLK, clock_status);
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_LANES_DATA, data_status);
+	return 0;
+}
+
+static int nwl_get_stream_control(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_fmt(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_get_fmt(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_vc_select(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_get_vc_select(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	return 0;
+}
+
+static int nwl_set_lane_cfg(void * dev)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	nwl_csi_dev->csi_access.write(dev,MRV_MIPICSI_NUM_LANES, nwl_csi_dev->csi_lane_cfg.mipi_lane_num);
+
+	return 0;
+}
+
+struct vvcam_csi_hardware_function_s nwl_mipi_function =
+{
+	.init               = nwl_init,
+	.exit               = nwl_exit,
+	.reset              = nwl_reset,
+	.set_power          = nwl_set_power,
+	.get_power          = nwl_get_power,
+	.set_clock          = nwl_set_clock,
+	.get_clock          = nwl_get_clock,
+	.set_stream_control = nwl_set_stream_control,
+	.get_stream_control = nwl_get_stream_control,
+	.set_fmt            = nwl_set_fmt,
+	.get_fmt            = nwl_get_fmt,
+	.set_vc_select      = nwl_set_vc_select,
+	.get_vc_select      = nwl_get_vc_select,
+	.set_lane_cfg       = nwl_set_lane_cfg,
+};
+
+

+ 156 - 0
vvcam/csi/nwl/nwl_ioctl.c

@@ -0,0 +1,156 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include "nwl_driver.h"
+#endif
+#include "nwl_ioctl.h"
+#include "nwl_regs.h"
+
+#ifndef __KERNEL__
+#include <hal/hal_api.h>
+#include "common_dev.h"
+
+#define NWL_EXTREG_OFFSET 0x308244
+#define NWL_REG_OFFSET 0x300000
+
+static HalHandle_t hal_handle;
+void nwl_ic_set_hal(HalHandle_t hal)
+{
+	hal_handle = hal;
+}
+
+void nwl_write_reg(u32 offset, u32 val)
+{
+	offset += NWL_REG_OFFSET;
+	HalWriteReg(hal_handle, offset, val);
+}
+
+u32 nwl_read_reg(u32 offset)
+{
+	offset += NWL_REG_OFFSET;
+	return HalReadReg(hal_handle, offset);
+}
+
+u32 nwl_write_extreg(u32 offset, u32 val)
+{
+	offset += NWL_EXTREG_OFFSET;
+	return HalReadReg(hal_handle, offset);
+}
+
+int nwl_set_stream(void *dev, int enable)
+{
+	u32 clock_status;
+	u32 data_status;
+
+	nwl_write_reg(MRV_MIPICSI1_NUM_LANES, 0x4);
+
+	if (enable == true) {
+		clock_status = 0x1;
+		data_status = 0xFF;
+	} else {
+		clock_status = 0x0;
+		data_status = 0x0;
+	}
+	nwl_write_reg(MRV_MIPICSI1_LANES_CLK, clock_status);
+	nwl_write_reg(MRV_MIPICSI1_LANES_DATA, data_status);
+
+	return 0;
+}
+
+int nwl_init(void)
+{
+	nwl_write_reg(MRV_MIPICSI1_NUM_LANES, 0x4);
+	nwl_write_reg(MRV_MIPICSI1_LANES_CLK, 0x1);
+	nwl_write_reg(MRV_MIPICSI1_LANES_DATA, 0xF);
+	nwl_write_reg(MRV_MIPICSI1_IGNORE_VC, 0x1);
+	nwl_write_extreg(MRV_MIPICSI1_OUT_SHIFT, 0x4);
+
+	return 0;
+}
+#endif
+
+int nwl_ioc_init(void)
+{
+	nwl_init();
+
+	return 0;
+}
+
+int nwl_ioc_s_stream(void *dev, void *__user args)
+{
+	int enable;
+
+	copy_from_user(&enable, args, sizeof(enable));
+	nwl_set_stream(dev, enable);
+	return 0;
+}
+
+long nwl_priv_ioctl(void *dev, unsigned int cmd, void *args)
+{
+	int ret = -1;
+
+	switch (cmd) {
+	case CSIIOC_INIT:
+		ret = nwl_ioc_init();
+		break;
+	case CSIIOC_S_STREAM:{
+			ret = nwl_ioc_s_stream(dev, args);
+		}
+		break;
+	default:
+		pr_err("Unsupported csi command %d.\n", cmd);
+		break;
+	}
+
+	return ret;
+}

+ 63 - 0
vvcam/csi/nwl/nwl_ioctl.h

@@ -0,0 +1,63 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _NWL_IOC_H_
+#define _NWL_IOC_H_
+
+enum {
+	CSIIOC_INIT = 0,
+	CSIIOC_S_STREAM,
+};
+
+long nwl_priv_ioctl(void *dev, unsigned int cmd, void *args);
+
+#endif /* _NWL_IOC_H_ */

+ 97 - 0
vvcam/csi/nwl/nwl_regs.h

@@ -0,0 +1,97 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _NWL_REGS_H_
+#define _NWL_REGS_H_
+
+/*
+ * MRV_MIPICSI1_NUM_LANES
+ * Config num lanes register [3:0] rw
+ * 0000b - controller off
+ * 0001b - 1 Lane
+ * 0010b - 2 Lanes
+ * 0011b - 3 Lanes
+ * 0100b - 4 Lanes
+ */
+#define MRV_MIPICSI_NUM_LANES 0x0
+
+/*
+ * MRV_MIPICSI1_LANES_CLK
+ * Configure lanes clock [0]
+ * 0b - disable
+ * 1b - enable
+ */
+#define MRV_MIPICSI_LANES_CLK 0x4
+
+/*
+ * MRV_MIPICSI1_LANES_DATA
+ * enable/disable lanes data [7:0]
+ * setting bits to a '1' value enable data lane
+ */
+#define MRV_MIPICSI_LANES_DATA 0x8
+
+/*
+ * MRV_MIPICSI1_IGNORE_VC
+ * enable/disable lanes clock [0]
+ * setting bits to a '1' value enable data value
+ */
+#define MRV_MIPICSI_IGNORE_VC 0x80
+
+/*
+ * MRV_MIPICSI1_OUT_SHIFT
+ * Configure csi_vid_out register
+ */
+
+#define MRV_MIPICSI0_CTRL 0x108240 //0x308240
+#define MRV_MIPICSI1_CTRL 0x8244   //0x308244
+
+#endif /* _NWL_REGS_H_ */

+ 335 - 0
vvcam/csi/vivcsi_hub.c

@@ -0,0 +1,335 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/module.h>
+#include <linux/uaccess.h>
+#include <linux/i2c.h>
+#include "csi_ioctl.h"
+#include "vivcsi_hub.h"
+
+unsigned int vvcsi_register_hardware(struct vvcam_csi_dev *dev, struct vvcam_csi_hardware_function_s *func)
+{
+	int ret = 0;
+	if (func == NULL)
+	{
+		return -1;
+	}
+
+	memcpy(&dev->csi_hard_func,func,sizeof(struct vvcam_csi_hardware_function_s));
+	return 0;
+}
+
+int vivcsi_hub_init(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.init == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.init(dev);
+
+	return ret;
+}
+
+
+int vivcsi_hub_reset(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.reset == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.reset(dev);
+
+	return ret;
+}
+
+
+int vivcsi_hub_set_power(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_power == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_power(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_get_power(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.get_power == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.get_power(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_set_clock(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_clock == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_clock(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_get_clock(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.get_clock == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.get_clock(dev);
+
+	return ret;
+}
+
+
+int vivcsi_hub_set_stream_control(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_stream_control == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_stream_control(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_get_stream_control(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.get_stream_control == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.get_stream_control(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_set_fmt(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_fmt == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_fmt(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_get_fmt(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.get_fmt == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.get_fmt(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_set_vc_select(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_vc_select == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_vc_select(dev);
+
+	return ret;
+}
+
+
+int vivcsi_hub_get_vc_select(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.get_vc_select == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.get_vc_select(dev);
+
+	return ret;
+}
+
+int vivcsi_hub_set_csi_lane_cfg(struct vvcam_csi_dev *dev)
+{
+	int ret = 0;
+	if(NULL == dev)
+	{
+		pr_err("%s:dev is null!\n", __func__);
+		return -1;
+	}
+
+	if (dev->csi_hard_func.set_lane_cfg == NULL)
+	{
+		pr_err("%s:csi_hard_func is NULL!\n", __func__);
+		return -1;
+	}
+
+	ret = dev->csi_hard_func.set_lane_cfg(dev);
+
+	return ret;
+
+}
+

+ 72 - 0
vvcam/csi/vivcsi_hub.h

@@ -0,0 +1,72 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VIVCSI_HUB_H_
+#define _VIVCSI_HUB_H_
+
+unsigned int vvcsi_register_hardware(struct vvcam_csi_dev *dev, struct vvcam_csi_hardware_function_s *func);
+
+int vivcsi_hub_init(struct vvcam_csi_dev *dev);
+int vivcsi_hub_reset(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_power(struct vvcam_csi_dev *dev);
+int vivcsi_hub_get_power(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_clock(struct vvcam_csi_dev *dev);
+int vivcsi_hub_get_clock(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_stream_control(struct vvcam_csi_dev *dev);
+int vivcsi_hub_get_stream_control(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_fmt(struct vvcam_csi_dev *dev);
+int vivcsi_hub_get_fmt(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_vc_select(struct vvcam_csi_dev *dev);
+int vivcsi_hub_get_vc_select(struct vvcam_csi_dev *dev);
+int vivcsi_hub_set_csi_lane_cfg(struct vvcam_csi_dev *dev);
+
+#endif /* _VIVCSI_HUB_H_ */

+ 1127 - 0
vvcam/dw200/dw200_ioctl.c

@@ -0,0 +1,1127 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+//#include "dw200_driver.h"
+#else
+#include <linux/videodev2.h>
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+#include "dw200_ioctl.h"
+#include "dwe_regs.h"
+#include "vse_regs.h"
+#undef ALIGN_UP
+#define ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align)-1))
+
+#ifdef __KERNEL__
+#define dw_info(...)
+#else
+#define dw_info(...)
+#endif
+
+#ifndef __KERNEL__
+#ifdef HAL_CMODEL
+#define DEWARP_REGISTER_OFFSET  0xc00
+#else
+#define DEWARP_REGISTER_OFFSET  0x380000
+#endif
+
+#define DEWARP_REGISTER_CTL	 0x308250
+
+pReadBar g_dw200_read_func;
+pWriteBar g_dw200_write_func;
+
+void dwe_set_func(pReadBar read_func, pWriteBar write_func)
+{
+	g_dw200_read_func = read_func;
+	g_dw200_write_func = write_func;
+}
+
+
+void dwe_write_reg(struct dw200_subdev *dev, u32 offset, u32 val)
+{
+	g_dw200_write_func(DEWARP_REGISTER_OFFSET + offset, val);
+}
+
+u32 dwe_read_reg(struct dw200_subdev *dev, u32 offset)
+{
+	u32 data;
+	g_dw200_read_func(DEWARP_REGISTER_OFFSET + offset, &data);
+	return data;
+}
+
+long dw200_copy_data(void *dst, void *src, int size)
+{
+	if (dst != src)
+		memcpy(dst, src, size);
+	return 0;
+}
+
+void vse_set_func(pVseReadBar read_func, pVseWriteBar write_func)
+{
+	g_dw200_read_func = read_func;
+	g_dw200_write_func = write_func;
+}
+
+void vse_write_reg(struct dw200_subdev *dev, u32 offset, u32 val)
+{
+	g_dw200_write_func(offset, val);
+}
+
+u32 vse_read_reg(struct dw200_subdev *dev, u32 offset)
+{
+	u32 data;
+	g_dw200_read_func(offset, &data);
+	return data;
+}
+#else
+
+void dwe_write_reg(struct dw200_subdev *dev, u32 offset, u32 val)
+{
+    //dw_info("dwe write addr 0x%08x val 0x%08x\n",offset,val);
+	__raw_writel(val, dev->dwe_base + offset);
+}
+
+u32 dwe_read_reg(struct dw200_subdev *dev, u32 offset)
+{
+    u32 val;
+    val=__raw_readl(dev->dwe_base + offset);
+    dw_info("dwe read addr 0x%08x val 0x%08x\n",offset,val);
+    return val;
+}
+
+void vse_write_reg(struct dw200_subdev *dev, u32 offset, u32 val)
+{
+    //dw_info("vse write addr 0x%08x val 0x%08x\n",offset,val);
+	__raw_writel(val, dev->vse_base + offset);
+}
+
+u32 vse_read_reg(struct dw200_subdev *dev, u32 offset)
+{
+    u32 val;
+    return __raw_readl(dev->vse_base + offset);
+    dw_info("vse read addr 0x%08x val 0x%08x\n",offset,val);
+    return val;
+}
+
+#endif
+
+int dwe_reset(struct dw200_subdev *dev)
+{
+	dw_info("enter %s\n", __func__);
+#ifdef DWE_REG_RESET
+	__raw_writel(0, dev->dwe_reset);
+	__raw_writel(1, dev->dwe_reset);
+#endif
+	dwe_write_reg(dev, DEWARP_CTRL, 0x0c);
+	return 0;
+}
+
+int dwe_s_params(struct dw200_subdev *dev)
+{
+	struct dwe_hw_info *info = &dev->dwe_info;
+	u32 reg = 0;
+	u32 reg_y_rbuff_size = ALIGN_UP(info->dst_stride * info->dst_h, 16);
+	u32 vUp = (info->split_v1 & ~0x0F) | 0x0C;
+	u32 vDown = (info->split_v2 & ~0x0F) | 0x0C;
+	u32 hLine = (info->split_h & ~0x0F) | 0x0C;
+	u32 dst_img_width_bn;
+
+	if(info->out_yuvbit)
+		dst_img_width_bn = info->dst_w * 2;
+	else{
+		if(info->out_format == MEDIA_PIX_FMT_YUV422I)
+			dst_img_width_bn = info->dst_w * 2;
+		else
+			dst_img_width_bn = info->dst_w;
+	}
+
+	dw_info("enter %s\n", __func__);
+
+	dwe_write_reg(dev, MAP_LUT_SIZE,
+		      ((info->map_w & 0x7ff) | ((info->map_h & 0x7ff) << 16)));
+	dwe_write_reg(dev, SRC_IMG_SIZE,
+		      ((info->src_w & 0x1fff) |
+		       ((info->src_h & 0x1fff) << 16)));
+	dwe_write_reg(dev, SRC_IMG_STRIDE, info->src_stride);
+
+	dwe_write_reg(dev, DST_IMG_SIZE,
+		      ((info->dst_w & 0x1FFF) |
+		       ((info->dst_h & 0x1FFF) << 16)));
+
+	dwe_write_reg(dev, DST_IMG_WIDTH_BN,
+				((dst_img_width_bn & 0x7FFF) |
+				((dst_img_width_bn & 0x7FFF) << 16)));
+	dwe_write_reg(dev, DST_IMG_STRIDE, info->dst_stride);
+	dwe_write_reg(dev, DST_IMG_Y_SIZE1, reg_y_rbuff_size >> 4);
+	dwe_write_reg(dev, DST_IMG_UV_SIZE1, info->dst_size_uv >> 4);
+	dwe_write_reg(dev, VERTICAL_SPLIT_LINE,
+		      (vUp & 0x1fff) | ((vDown & 0x1fff) << 16));
+	dwe_write_reg(dev, HORIZON_SPLIT_LINE, (hLine & 0x1fff));
+
+	reg = 0x4c808009;
+	reg |= ((info->split_line & 0x1) << 11);
+	reg |= ((info->in_format & 0x3) << 4);
+	reg |= ((info->out_format & 0x3) << 6);
+	reg |= ((info->in_yuvbit & 0x1) << 12);
+	reg |= ((info->out_yuvbit & 0x1) << 13);
+	reg |=
+	    ((info->src_auto_shadow & 0x1) << 8) |
+	    ((info->dst_auto_shadow & 0x1) << 10);
+	reg |= ((info->hand_shake & 0x1) << 9);
+	dwe_write_reg(dev, DEWARP_CTRL, reg);
+
+	dwe_write_reg(dev, BOUNDRY_PIXEL,
+		      (((info->boundary_y & 0xff) << 16) |
+		       ((info->boundary_u & 0xff)
+			<< 8) | (info->boundary_v & 0xff)));
+	dwe_write_reg(dev, SCALE_FACTOR, info->scale_factor);
+	dwe_write_reg(dev, ROI_START,
+		      ((info->roi_x & 0x1fff) |
+		       ((info->roi_y & 0x1fff) << 16)));
+	return 0;
+}
+
+int dwe_enable_bus(struct dw200_subdev *dev, bool enable)
+{
+	u32 reg = dwe_read_reg(dev, BUS_CTRL);
+
+	dw_info("enter %s\n", __func__);
+
+	if (enable) {
+		reg |= DEWRAP_BUS_CTRL_ENABLE_MASK;
+		reg |= DEWRAP_BUS_CTRL_WR_ID_ENABLE_MASK;
+		reg |= DEWRAP_BUS_CTRL_RD_ID_ENABLE_MASK;
+		reg &= ~(0xff << DEWRAP_BUS_CTRL_RD_ID_SHIFT);
+		reg &= ~(0xff << DEWRAP_BUS_CTRL_WR_ID_SHIFT);
+		reg |= (0x0 << DEWRAP_BUS_CTRL_RD_ID_SHIFT); //set read id as 1
+		reg |= (0x0 << DEWRAP_BUS_CTRL_WR_ID_SHIFT); //set write id as 2
+		dwe_write_reg(dev, BUS_CTRL, reg);
+	} else {
+		reg &= ~DEWRAP_BUS_CTRL_ENABLE_MASK;
+		reg &= ~DEWRAP_BUS_CTRL_WR_ID_ENABLE_MASK;
+		reg &= ~DEWRAP_BUS_CTRL_RD_ID_ENABLE_MASK;
+		reg &= ~(0xff << DEWRAP_BUS_CTRL_RD_ID_SHIFT);
+		reg &= ~(0xff << DEWRAP_BUS_CTRL_WR_ID_SHIFT);
+		dwe_write_reg(dev, BUS_CTRL, reg);
+	}
+
+	return 0;
+}
+
+int dwe_disable_irq(struct dw200_subdev *dev)
+{
+	dw_info("enter %s\n", __func__);
+	dwe_write_reg(dev, INTERRUPT_STATUS, INT_RESET_MASK|INT_CLR_MASK);
+	return 0;
+}
+
+int dwe_clear_irq(struct dw200_subdev *dev, u32 mis)
+{
+	u32 interrupt_status;
+
+	dw_info("enter %s\n", __func__);
+	interrupt_status = dwe_read_reg(dev, INTERRUPT_STATUS);
+
+	dwe_write_reg(dev, INTERRUPT_STATUS, mis|interrupt_status);// INT_CLR_MASK);
+	// dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl | 2);
+	// dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl);
+	return 0;
+}
+int dwe_clear_irq_1(struct dw200_subdev *dev)
+{
+	u32 reg_dewarp_ctrl;
+
+	dw_info("enter %s\n", __func__);
+	reg_dewarp_ctrl = dwe_read_reg(dev, DEWARP_CTRL);
+	dwe_write_reg(dev, INTERRUPT_STATUS, INT_CLR_MASK);
+	dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl | 2);
+	dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl);
+	return 0;
+}
+int dwe_read_irq(struct dw200_subdev *dev, u32 * ret)
+{
+	u32 irq = 0;
+
+	irq = dwe_read_reg(dev, INTERRUPT_STATUS);
+	*ret = irq;
+
+	return 0;
+}
+
+int dwe_dequeue_irq(struct dw200_subdev *dev, u32 * ret)
+{
+	vivdw200_mis_t data;
+
+	if (dev == NULL || ret == NULL) {
+		dw_info("wrong input parameter.\n");
+		return -1;
+	}
+	if(0 ==vivdw200_read_circle_queue(&data, &dev->dwe_circle_list)){
+		*ret = data.val;
+	} else {
+		//pr_err("failed to dequeue dwe mis.\n");
+		*ret = 0;
+	}
+	return 0;
+}
+
+int dwe_start_dma_read(struct dw200_subdev *dev, dw_src_addr_t src_addr)
+{
+	struct dwe_hw_info *info = &dev->dwe_info;
+#ifdef DWE_REG_RESET
+	u32 regStart = 1 << 4;
+	u32 reg;
+#endif
+
+	if (src_addr.uv_addr == 0) {
+		u32 reg_y_rbuff_size = ALIGN_UP(info->src_stride * info->src_h, 16);
+		src_addr.uv_addr = (u32) src_addr.y_addr + reg_y_rbuff_size;
+	}
+
+	dw_info("enter %s\n", __func__);
+
+	dwe_write_reg(dev, SRC_IMG_Y_BASE, (src_addr.y_addr) >> 4);
+	dwe_write_reg(dev, SRC_IMG_UV_BASE, (src_addr.uv_addr) >> 4);
+
+#ifdef DWE_REG_RESET
+	reg = __raw_readl(dev->dwe_reset);
+	__raw_writel(reg | regStart, dev->dwe_reset);
+	__raw_writel(reg & ~regStart, dev->dwe_reset);
+#endif
+	return 0;
+}
+
+int dwe_start(struct dw200_subdev *dev)
+{
+    dw_info("enter %s\n", __func__);
+	u32 reg_dewarp_ctrl;
+	reg_dewarp_ctrl = dwe_read_reg(dev, DEWARP_CTRL);
+	dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl | 2);
+	return 0;
+}
+
+int dwe_set_buffer(struct dw200_subdev *dev, u64 addr)
+{
+	struct dwe_hw_info *info = &dev->dwe_info;
+	u32 reg_dst_y_base = (u32) addr;
+	u32 reg_y_rbuff_size = ALIGN_UP(info->dst_stride * info->dst_h, 16);
+	u32 reg_dst_uv_base = reg_dst_y_base + reg_y_rbuff_size;
+
+	dw_info("enter %s\n", __func__);
+	dwe_write_reg(dev, DST_IMG_Y_BASE, (reg_dst_y_base) >> 4);
+	dwe_write_reg(dev, DST_IMG_UV_BASE, (reg_dst_uv_base) >> 4);
+
+	return 0;
+}
+
+int dwe_set_lut(struct dw200_subdev *dev, u64 addr)
+{
+	dwe_write_reg(dev, MAP_LUT_ADDR, ((u32) addr) >> 4);
+	return 0;
+}
+
+int dwe_ioc_qcap(struct dw200_subdev *dev, void *args)
+{
+	struct v4l2_capability *cap = (struct v4l2_capability *)args;
+
+	strcpy((char *)cap->driver, "viv_dw200");
+	return 0;
+}
+
+extern void __iomem *visys_sw_rst;
+void visys_reset(void)
+{
+	u32 val = __raw_readl(visys_sw_rst);
+    __raw_writel( val & ~BIT(31), visys_sw_rst);
+    __raw_writel(val, visys_sw_rst);
+}
+
+int vse_reset(struct dw200_subdev *dev)
+{
+	dw_info("enter %s\n", __func__);
+
+#ifdef VSE_REG_RESET
+	__raw_writel(0, dev->vse_reset);
+	__raw_writel(1, dev->vse_reset);
+#endif
+	vse_write_reg(dev, VSE_REG_CTRL, 0x100);
+	return 0;
+}
+
+void vse_triger_dma_read(struct dw200_subdev *dev)
+{
+	u32 reg = vse_read_reg(dev, VSE_REG_CTRL);
+	REG_SET_BIT(reg, VSE_CONTROL_DMA_FRAME_START_BIT, 1);
+	vse_write_reg(dev, VSE_REG_CTRL, reg);
+	vse_write_reg(dev, VSE_REG_DMA_CTRL, 5);
+}
+
+#define swap(a, b) \
+{ \
+	(a) ^= (b); \
+	(b) ^= (a); \
+	(a) ^= (b); \
+}
+
+void setMIBaseAddress(struct dw200_subdev *dev, u32 width, u32 height,
+		      u32 format,u32 yuvbit, u64 addr, int channel)
+{
+	u32 stride = ALIGN_UP(width*(yuvbit+1), 16);
+	u32 crSize = 0;
+	u32 yBaseAddr = addr;
+	u32 regAddress = VSE_MI_BASE(channel);
+	u32 crBaseAddr = 0;
+	u32 ysize = stride * height;
+	u32 cbSize = ysize;
+	u32 cbBaseAddr = yBaseAddr + ysize;
+
+	if (ysize == 0)
+		return;
+
+	switch (format) {
+	case MEDIA_PIX_FMT_YUV420SP:
+		cbSize /= 2;
+		crSize = 0;
+		break;
+	case MEDIA_PIX_FMT_YUV422SP:
+		break;
+	case MEDIA_PIX_FMT_YUV422I:
+		ysize = ysize * 2;
+		break;
+	case MEDIA_PIX_FMT_YUV444P:
+	case MEDIA_PIX_FMT_RGB888P:
+		crSize = ysize;
+		crBaseAddr = cbBaseAddr + cbSize;
+		break;
+	case MEDIA_PIX_FMT_RGB888:	/* only supoort RGB interleave format.  RGB RGB RGB .. */
+	case MEDIA_PIX_FMT_YUV444I:
+		ysize *= 3;
+		cbSize = 0;
+		cbBaseAddr = 0;
+		break;
+	case MEDIA_PIX_FMT_BGR888P:
+		crSize = ysize;
+		crBaseAddr = cbBaseAddr + cbSize;
+		swap(yBaseAddr, crBaseAddr);
+		break;
+	}
+
+	vse_write_reg(dev, regAddress + VSE_REG_MI_Y_BASE_ADDR_INIT, yBaseAddr);
+	vse_write_reg(dev, regAddress + VSE_REG_MI_Y_SIZE_INIT, ysize);
+	vse_write_reg(dev, regAddress + VSE_REG_MI_CB_BASE_ADDR_INIT,
+		      cbBaseAddr);
+	vse_write_reg(dev, regAddress + VSE_REG_MI_CB_SIZE_INIT, cbSize);
+	vse_write_reg(dev, regAddress + VSE_REG_MI_CR_BASE_ADDR_INIT,
+		      crBaseAddr);
+	vse_write_reg(dev, regAddress + VSE_REG_MI_CR_SIZE_INIT, crSize);
+}
+
+int vse_start_dma_read(struct dw200_subdev *dev, u64 addr)
+{
+	u32 writeFormat = 0;
+	u32 writeString = 0;
+	u32 reg = 0;
+	u32 address = VSE_REG_DMA_FORMAT;
+	u32 width = dev->vse_info.src_w;
+	u32 height = dev->vse_info.src_h;
+	u32 format = dev->vse_info.in_format;
+	u32 yuvbit = dev->vse_info.in_yuvbit;
+	u32 ysize, cbSize;
+	u32 yBaseAddr, cbBaseAddr, crBaseAddr;
+	u32 stride;
+	u32 img_width_bn;
+	if(yuvbit)
+		img_width_bn = width * 2;
+	else{
+		if(format == MEDIA_PIX_FMT_YUV422I){
+			img_width_bn = width * 2;
+			stride = stride * 2;
+		}else
+			img_width_bn = width;
+
+	}
+	switch (format) {
+	case MEDIA_PIX_FMT_YUV422SP:
+		writeFormat = 1;
+		writeString = 0;
+		break;
+	case MEDIA_PIX_FMT_YUV422I:
+		writeFormat = 1;
+		writeString = 1;
+		break;
+	case MEDIA_PIX_FMT_YUV420SP:
+		writeFormat = 0;
+		writeString = 0;
+		break;
+	}
+
+	reg = vse_read_reg(dev, address);
+
+	dw_info("img_width_bn 0x%08x\n", img_width_bn );
+	REG_SET_MASK(reg, VSE_RD_IMG_HSIZE_BN, (img_width_bn & 0x3FFF));
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WORD_ALIGNED, yuvbit);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_FMT_ALIGNED, yuvbit);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_STR, writeString);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_FMT, writeFormat);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_10BIT, yuvbit);
+	dw_info("VSE_REG_DMA_FORMAT reg 0x%08x\n", reg);
+	vse_write_reg(dev, address, reg);
+	stride = ALIGN_UP(width*(yuvbit+1), 16);
+	vse_write_reg(dev, VSE_REG_DMA_Y_PIC_WIDTH, width);
+	vse_write_reg(dev, VSE_REG_DMA_Y_PIC_HEIGHT, height);
+	vse_write_reg(dev, VSE_REG_DMA_Y_PIC_STRIDE, stride);
+	ysize = stride * height;
+	cbSize = ysize;
+	yBaseAddr = addr;
+	cbBaseAddr = yBaseAddr + ysize;
+	crBaseAddr = 0;
+
+	if (format == MEDIA_PIX_FMT_YUV420SP) {
+		cbSize /= 2;
+	} else if (format == MEDIA_PIX_FMT_YUV422I) {
+		cbSize /= 2;
+		crBaseAddr = cbBaseAddr + cbSize;
+	}
+	vse_write_reg(dev, VSE_REG_Y_PIC_START_ADDR, yBaseAddr);
+	vse_write_reg(dev, VSE_REG_CB_PIC_START_ADDR, cbBaseAddr);
+	vse_write_reg(dev, VSE_REG_CR_PIC_START_ADDR, crBaseAddr);
+	vse_triger_dma_read(dev);
+	return 0;
+}
+
+void setFormatConvPack(struct dw200_subdev *dev, u32 enable, int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel) + VSE_REG_FORMAT_CONV_CTRL;
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_ENABLE_PACK, enable);
+	vse_write_reg(dev, address, reg);
+}
+
+void setFormatConvFull(struct dw200_subdev *dev, u32 y_full, u32 cbcr_full,
+		       u32 noco422, int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel) + VSE_REG_FORMAT_CONV_CTRL;
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_Y_FULL, y_full);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_CBCR_FULL, cbcr_full);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_CONFIG_422NOCO, 0);
+	vse_write_reg(dev, address, reg);
+}
+
+static u32 format_conv_map[] = { 2, 2, 1, 3, 3, 6, 6, 6 };
+
+void setFormatConvFormat(struct dw200_subdev *dev, u32 inputFormat,
+			 u32 outputFormat,u32 yuvbit, int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel) + VSE_REG_FORMAT_CONV_CTRL;
+
+	if (inputFormat == MEDIA_PIX_FMT_YUV420SP
+	    && outputFormat == MEDIA_PIX_FMT_YUV420SP) {
+	} else if (inputFormat == MEDIA_PIX_FMT_YUV422SP
+		   && outputFormat == MEDIA_PIX_FMT_YUV420SP) {
+		inputFormat = MEDIA_PIX_FMT_YUV420SP;
+	} else if (inputFormat == MEDIA_PIX_FMT_YUV420SP
+		   && outputFormat != MEDIA_PIX_FMT_YUV420SP) {
+		inputFormat = MEDIA_PIX_FMT_YUV422SP;
+	}
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_OUTPUT_FORMAT,
+		     format_conv_map[outputFormat]);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_INPUT_FORMAT,
+		     format_conv_map[inputFormat]);
+	REG_SET_MASK(reg, VSE_FORMAT_CONV_EXPAND_8TO10_ENABLE,
+		     yuvbit);
+	vse_write_reg(dev, address, reg);
+}
+
+void setInputSize(struct dw200_subdev *dev, u32 width, u32 height)
+{
+	u32 reg = ((height & 0x1FFF) << 16) | (width & 0x1FFF);
+
+	vse_write_reg(dev, VSE_REG_IN_SIZE, reg);
+}
+
+void setCropSize(struct dw200_subdev *dev, u32 left, u32 right, u32 top,
+		 u32 bottom, int channel)
+{
+	u32 hreg = ((right & 0x1FFF) << 16) | (left & 0x1FFF);
+	u32 vreg = ((bottom & 0x1FFF) << 16) | (top & 0x1FFF);
+
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_CROP_XDIR, hreg);
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_CROP_YDIR, vreg);
+}
+
+void updateResizeControl(struct dw200_subdev *dev, u32 reg, int channel)
+{
+	u32 address = VSE_RSZBASE(channel);
+
+	vse_write_reg(dev, address, reg);
+}
+
+void resizeControlAutoUpdate(struct dw200_subdev *dev, u32 autoUpdate,
+			     int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel);
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_AUTO_UPDATE_BIT, autoUpdate);
+	vse_write_reg(dev, address, reg);
+}
+
+void resizeControlConfigUpdate(struct dw200_subdev *dev, u32 configUpdate,
+			       int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel);
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_CONFIG_UPDATE_BIT, configUpdate);
+	vse_write_reg(dev, address, reg);
+}
+
+void resizeControlEnableCrop(struct dw200_subdev *dev, u32 enable, int channel)
+{
+	u32 reg;
+	u32 address = VSE_RSZBASE(channel);
+
+	reg = vse_read_reg(dev, address);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_CROP_ENABLE_BIT, enable);
+	vse_write_reg(dev, address, reg);
+}
+
+void updateVseControl(struct dw200_subdev *dev, u32 inputChannel,
+		      u32 inputFormat, u32 enbalePath0, u32 enbalePath1,
+		      u32 enbalePath2, u32 autoUpdate, u32 configUpdate)
+{
+	u32 reg = 0;
+
+	REG_SET_BIT(reg, VSE_CONTROL_AUTO_UPDATE_BIT, autoUpdate);
+	REG_SET_BIT(reg, VSE_CONTROL_CONFIG_UPDATE_BIT, configUpdate);
+	REG_SET_BIT(reg, VSE_CONTROL_PATH0_ENABLE_BIT, enbalePath0);
+	REG_SET_BIT(reg, VSE_CONTROL_PATH1_ENABLE_BIT, enbalePath1);
+	REG_SET_BIT(reg, VSE_CONTROL_PATH2_ENABLE_BIT, enbalePath2);
+
+	REG_SET_MASK(reg, VSE_CONTROL_INPUT_SELECT, inputChannel);
+	REG_SET_MASK(reg, VSE_CONTROL_INPUT_FORMAT, inputFormat);
+	vse_write_reg(dev, VSE_REG_CTRL, reg);
+    int i;
+    for(i=0 ;i <3; i++){
+	    reg = vse_read_reg(dev,VSE_RSZBASE(i));
+	    REG_SET_BIT(reg, VSE_RESIZE_CONTROL_CONFIG_UPDATE_BIT, 1);
+	    vse_write_reg(dev, VSE_RSZBASE(i), reg);
+    }
+
+	/* BUS ID and BUS CONFIG, hardcode here, user need adjust it on their hardware. */
+	vse_write_reg(dev, 0xa24, 0x01000100);
+	vse_write_reg(dev, 0xa20, 0x001000fa);
+	vse_write_reg(dev, 0xa28, 0x924c5214);
+	vse_write_reg(dev, 0xa30, 0x100000fa);
+	vse_write_reg(dev, 0xa34, 0x01000100);
+	vse_write_reg(dev, 0xa38, 0x924c5214);
+}
+
+void enableMIControl(struct dw200_subdev *dev, u32 enable, int channel)
+{
+	u32 reg = vse_read_reg(dev, VSE_REG_MI_CTRL);
+
+	REG_SET_BIT(reg, channel, enable);
+	REG_SET_BIT(reg, VSE_MI_CONTROL_RDMA_ENABLE_BIT, 1);
+	vse_write_reg(dev, VSE_REG_MI_CTRL, reg);
+}
+
+void setMIBufferInfo(struct dw200_subdev *dev, u32 width, u32 height,
+		     u32 format, u32 is10Bit, u32 aligned, int channel)
+{
+	u32 writeFormat = 0;
+	u32 writeString = 0;
+	u32 reg = 0;
+	u32 address;
+
+	u32 stride = ALIGN_UP(width*(is10Bit+1), 16);
+	u32 size = stride * height;
+
+	switch (format) {
+	case MEDIA_PIX_FMT_YUV422SP:
+		writeFormat = 1;
+		writeString = 0;
+		break;
+	case MEDIA_PIX_FMT_YUV422I:
+		size = size * 2;
+		writeFormat = 1;
+		writeString = 1;
+		break;
+	case MEDIA_PIX_FMT_YUV420SP:
+		writeFormat = 0;
+		writeString = 0;
+		break;
+	case MEDIA_PIX_FMT_YUV444P:
+		writeFormat = 2;
+		writeString = 2;
+		break;
+	case MEDIA_PIX_FMT_YUV444I:
+		writeFormat = 2;
+		writeString = 1;
+		break;
+	case MEDIA_PIX_FMT_RGB888:
+		writeFormat = 2;
+		writeString = 1;
+		break;
+	case MEDIA_PIX_FMT_RGB888P:
+	case MEDIA_PIX_FMT_BGR888P:
+		writeFormat = 2;
+		writeString = 2;
+		break;
+	}
+
+	vse_write_reg(dev, VSE_MI_BASE(channel) + VSE_REG_MI_Y_LENGTH, stride);
+	vse_write_reg(dev, VSE_MI_BASE(channel) + VSE_REG_MI_Y_PIC_WIDTH,
+		      width);
+	vse_write_reg(dev, VSE_MI_BASE(channel) + VSE_REG_MI_Y_PIC_HEIGHT,
+		      height);
+	vse_write_reg(dev, VSE_MI_BASE(channel) + VSE_REG_MI_Y_PIC_SIZE, size);
+
+	address = VSE_MI_BASE(channel) + VSE_REG_MI_FMT;
+	reg = vse_read_reg(dev, address);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WORD_ALIGNED, is10Bit);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_FMT_ALIGNED, is10Bit);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_STR, writeString);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_FMT, writeFormat);
+	REG_SET_MASK(reg, VSE_MI_FORMAT_WR_YUV_10BIT, is10Bit);
+	vse_write_reg(dev, address, reg);
+}
+
+void setMIControlConfig(struct dw200_subdev *dev, u32 enableOffset,
+			u32 enableUpdateBaseAddress, u32 configUpdate, u32 skip,
+			u32 autoUpdate, u32 enablePingpong, int channel)
+{
+	u32 reg = 0;
+
+	REG_SET_BIT(reg, VSE_MI_PATH_INIT_OFFSET_EN_BIT, enableOffset);
+	REG_SET_BIT(reg, VSE_MI_PATH_INIT_BASE_EN_BIT, enableUpdateBaseAddress);
+	REG_SET_BIT(reg, VSE_MI_PATH_CONFIG_UPDATE_BIT, configUpdate);
+	REG_SET_BIT(reg, VSE_MI_PATH_ENABLE_SKIP_BIT, skip);
+	REG_SET_BIT(reg, VSE_MI_PATH_AUTO_UPDATE_BIT, autoUpdate);
+	REG_SET_BIT(reg, VSE_MI_PATH_ENABLE_PINGPONG_BIT, enablePingpong);
+	vse_write_reg(dev, VSE_MI_BASE(channel), reg);
+}
+
+u32 vse_get_scale_factor(int src, int dst)
+{
+	if (dst >= src) {
+		return ((65536 * (src - 1)) / (dst - 1));
+	} else if (dst < src) {
+		return ((65536 * (dst - 1)) / (src - 1)) + 1;
+	}
+	return 0;
+}
+
+void setScaleFactor(struct dw200_subdev *dev, u32 src_w, u32 src_h, u32 dst_w,
+		    u32 dst_h, u32 inputFormat, u32 outputFormat, int channel)
+{
+	bool hyup, vyup, hcup, vcup;
+	u32 scale_factor = vse_get_scale_factor(src_w, dst_w);
+	u32 address = VSE_RSZBASE(channel);
+	u32 reg = vse_read_reg(dev, address);
+
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_SCALE_HY,
+		      scale_factor);
+	scale_factor = vse_get_scale_factor(src_h, dst_h);
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_SCALE_VY,
+		      scale_factor);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_VY_ENABLE_BIT,
+		    ((src_h != dst_h) & 0x01));
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_HY_ENABLE_BIT,
+		    ((src_w != dst_w) & 0x01));
+	hyup = src_w < dst_w;
+	vyup = src_h < dst_h;
+
+	/* Format conv module doesn't support convert other formats to YUV420SP.
+	   doesn't support convert 420SP to other formats too.
+	   so scale down/up cbcr here.
+	 */
+	src_w /= 2;
+	dst_w /= 2;
+	if (inputFormat == MEDIA_PIX_FMT_YUV420SP
+	    && outputFormat == MEDIA_PIX_FMT_YUV420SP) {
+		src_h /= 2;
+		dst_h /= 2;
+	} else if (inputFormat == MEDIA_PIX_FMT_YUV422SP
+		   && outputFormat == MEDIA_PIX_FMT_YUV420SP) {
+		/* scale 422 to 420 */
+		dst_h /= 2;
+	} else if (inputFormat == MEDIA_PIX_FMT_YUV420SP
+		   && outputFormat != MEDIA_PIX_FMT_YUV420SP) {
+		/* scale 420 to 422
+		   cbcr width*2, use input buffer as 422SP */
+		src_h /= 2;
+	}
+
+	hcup = src_w < dst_w;
+	vcup = src_h < dst_h;
+	scale_factor = vse_get_scale_factor(src_w, dst_w);
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_SCALE_HCB,
+		      scale_factor);
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_SCALE_HCR,
+		      scale_factor);
+	scale_factor = vse_get_scale_factor(src_h, dst_h);
+	vse_write_reg(dev, VSE_RSZBASE(channel) + VSE_RSZ_SCALE_VC,
+		      scale_factor);
+
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_VCUP_BIT, vcup);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_VYUP_BIT, vyup);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_HCUP_BIT, hcup);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_HYUP_BIT, hyup);
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_VC_ENABLE_BIT,
+		    (src_h != dst_h));
+	REG_SET_BIT(reg, VSE_RESIZE_CONTROL_SCALE_HC_ENABLE_BIT,
+		    (src_w != dst_w));
+	vse_write_reg(dev, address, reg);
+}
+
+int vse_read_irq(struct dw200_subdev *dev, u32 * ret)
+{
+	// dw_info("enter %s\n", __func__);
+	*ret = vse_read_reg(dev, VSE_REG_MI_MSI);
+	return 0;
+}
+
+int vse_dequeue_irq(struct dw200_subdev *dev, u32 * ret)
+{
+	vivdw200_mis_t data;
+
+	if (dev == NULL || ret == NULL) {
+		dw_info("wrong input parameter.\n");
+		return -1;
+	}
+	if(0 == vivdw200_read_circle_queue(&data, &dev->vse_circle_list)) {
+		*ret = data.val;
+	} else {
+		//pr_err("failed to dequeue vse mis.\n");
+		*ret = 0;
+	}
+	return 0;
+}
+
+int vse_clear_irq(struct dw200_subdev *dev, u32 mis)
+{
+	dw_info("enter %s\n", __func__);
+	vse_write_reg(dev, VSE_REG_MI_ICR, mis);
+	return 0;
+}
+
+int vse_mask_irq(struct dw200_subdev *dev, u32 mask)
+{
+	dw_info("enter %s 0x%08x\n", __func__, mask);
+	vse_write_reg(dev, VSE_REG_MI_IMSC, mask);
+	return 0;
+}
+
+int vse_ioc_qcap(struct dw200_subdev *dev, void *args)
+{
+	struct v4l2_capability *cap = (struct v4l2_capability *)args;
+
+	strcpy((char *)cap->driver, "viv_vse");
+	return 0;
+}
+
+int vse_update_buffers(struct dw200_subdev *dev, u64 * addr)
+{
+	struct vse_params *param = &dev->vse_info;
+	struct vse_mi_settings *mi = param->mi_settings;
+	int i = 0;
+
+	dw_info("enter %s\n", __func__);
+	for (; i < 3; i++) {
+		if (addr[i] != 0) {
+			setMIBaseAddress(dev, mi[i].width, mi[i].height,
+					 mi[i].out_format,mi[i].yuvbit, addr[i], i);
+		}
+	}
+	return 0;
+}
+
+int vse_update_mi_info(struct dw200_subdev *dev)
+{
+	struct vse_params *param = &dev->vse_info;
+	struct vse_mi_settings *mi = param->mi_settings;
+	int i = 0;
+
+	dw_info("enter %s\n", __func__);
+
+	for (; i < 3; i++) {
+		if (!mi[i].enable)
+			continue;
+		setMIBufferInfo(dev, mi[i].width, mi[i].height,
+				mi[i].out_format, mi[i].yuvbit, true, i);
+		enableMIControl(dev, mi[i].enable, i);
+		setMIControlConfig(dev, true, true, true, false, true, false,
+				   i);
+	}
+	return 0;
+}
+
+int vse_s_params(struct dw200_subdev *dev)
+{
+	struct vse_params *param = &dev->vse_info;
+	int i = 0;
+	int input_select = 0;
+	int crop_w, crop_h, scale_w, scale_h;
+	struct vse_crop_size *cropSize;
+	struct vse_size *outputSize;
+
+	dw_info("enter %s\n", __func__);
+	setInputSize(dev, param->src_w, param->src_h);
+
+	for (; i < 3; i++) {
+		if (!param->resize_enable[i])
+			continue;
+		cropSize = &param->crop_size[i];
+		outputSize = &param->out_size[i];
+		crop_w = cropSize->right - cropSize->left + 1;
+		crop_h = cropSize->bottom - cropSize->top + 1;
+		scale_w = param->src_w;
+		scale_h = param->src_h;
+		if (crop_w > 1 && crop_h > 1) {
+			resizeControlEnableCrop(dev, 1, i);
+			setCropSize(dev, cropSize->left, cropSize->right,
+				    cropSize->top, cropSize->bottom, i);
+			scale_w = crop_w;
+			scale_h = crop_h;
+		} else {
+			resizeControlEnableCrop(dev, 0, i);
+		}
+
+		/* ONLY SUPPORT Semiplanar NOW, all enable pack */
+		setFormatConvPack(dev, true, i);
+		setFormatConvFull(dev, true, true, false, i);
+		setFormatConvFormat(dev, param->in_format,
+				    param->format_conv[i].out_format,param->mi_settings[i].yuvbit, i);
+
+		setScaleFactor(dev, scale_w, scale_h, outputSize->width,
+			       outputSize->height, param->in_format,
+			       param->format_conv[i].out_format, i);
+		resizeControlAutoUpdate(dev, 1, i);
+		resizeControlConfigUpdate(dev, 1, i);
+	}
+
+#ifndef HAL_CMODEL
+	input_select = param->input_select;
+#endif
+	updateVseControl(dev, input_select, param->in_format,
+			 param->resize_enable[0],
+			 param->resize_enable[1],
+			 param->resize_enable[2], true, true);
+	return 0;
+}
+
+void dw200_mutex_lock(struct dw200_subdev *dev)
+{
+	mutex_lock(dev->vvmutex);
+}
+
+void dw200_mutex_unlock(struct dw200_subdev *dev)
+{
+	mutex_unlock(dev->vvmutex);
+}
+
+long dw200_priv_ioctl(struct dw200_subdev *dev, unsigned int cmd, void *args)
+{
+	int ret = -1;
+	u64 addr;
+	
+	switch (cmd) {
+	case DWEIOC_RESET:
+		dw_info("DWEIOC_RESET\n");
+		ret = dwe_reset(dev);
+		break;
+	case DWEIOC_S_PARAMS:
+		dw_info("DWEIOC_S_PARAMS\n");
+		viv_check_retval(copy_from_user
+				 (&dev->dwe_info, args, sizeof(dev->dwe_info)));
+		ret = dwe_s_params(dev);
+		break;
+	case DWEIOC_ENABLE_BUS:
+		dw_info("DWEIOC_ENABLE_BUS\n");
+		ret = dwe_enable_bus(dev, 1);
+		break;
+	case DWEIOC_DISABLE_BUS:
+		dw_info("DWEIOC_DISABLE_BUS\n");
+		ret = dwe_enable_bus(dev, 0);
+		break;
+	case DWEIOC_DISABLE_IRQ:
+		dw_info("DWEIOC_DISABLE_IRQ\n");
+		ret = dwe_disable_irq(dev);
+		break;
+	case DWEIOC_CLEAR_IRQ:
+		dw_info("DWEIOC_CLEAR_IRQ\n");
+		 ret = dwe_clear_irq_1(dev);
+		break;
+	case DWEIOC_READ_IRQ:{
+			dw_info("DWEIOC_READ_IRQ\n");
+			u32 irq = 0;
+#ifdef HAL_CMODEL    
+			dwe_read_irq((struct dw200_subdev *)dev, &irq);
+#else
+			ret = dwe_dequeue_irq(dev, &irq);
+#endif
+
+			viv_check_retval(copy_to_user(args, &irq, sizeof(irq)));
+			break;
+		}
+	case DWEIOC_START_DMA_READ:
+		dw_info("DWEIOC_START_DMA_READ\n");
+		;dw_src_addr_t src_addr;
+		viv_check_retval(copy_from_user(&src_addr, args, sizeof(src_addr)));
+		ret = dwe_start_dma_read(dev, src_addr);
+		break;
+	case DWEIOC_SET_BUFFER:
+		dw_info("DWEIOC_SET_BUFFER\n");
+		viv_check_retval(copy_from_user(&addr, args, sizeof(addr)));
+		ret = dwe_set_buffer(dev, addr);
+		break;
+	case DWEIOC_SET_LUT:
+		dw_info("DWEIOC_SET_LUT\n");
+		viv_check_retval(copy_from_user(&addr, args, sizeof(addr)));
+		ret = dwe_set_lut(dev, addr);
+		break;
+	case DWEIOC_START:
+		dw_info("DWEIOC_START\n");
+		ret = dwe_start(dev);
+		break;
+#ifdef __KERNEL__
+	case VIDIOC_QUERYCAP:
+		ret = dwe_ioc_qcap(dev, args);
+		break;
+#endif
+	case VSEIOC_RESET:
+		dw_info("VSEIOC_RESET\n");
+		ret = vse_reset(dev);
+		break;
+	case VSEIOC_S_PARAMS:
+		dw_info("VSEIOC_S_PARAMS\n");
+		viv_check_retval(copy_from_user
+				 (&dev->vse_info, args, sizeof(dev->vse_info)));
+		ret = vse_s_params(dev);
+		break;
+	case VSEIOC_CLEAR_IRQ:
+		dw_info("VSEIOC_CLEAR_IRQ\n");
+		 //ret = vse_clear_irq(dev);
+		  vse_write_reg(dev, VSE_REG_MI_MSI, 0);
+		break;
+	case VSEIOC_READ_IRQ:{
+		dw_info("VSEIOC_READ_IRQ\n");
+			u32 irq = 0;
+#ifdef HAL_CMODEL            
+			vse_read_irq((struct dw200_subdev *)dev, &irq);
+#else
+			ret = vse_dequeue_irq(dev, &irq);
+#endif
+			viv_check_retval(copy_to_user(args, &irq, sizeof(irq)));
+			break;
+		}
+	case VSEIOC_START_DMA_READ:{
+		dw_info("VSEIOC_START_DMA_READ\n");
+			u64 addr;
+			viv_check_retval(copy_from_user
+					 (&addr, args, sizeof(addr)));
+			ret = vse_start_dma_read(dev, addr);
+			break;
+		}
+	case VSEIOC_U_MI_INFO:
+		dw_info("VSEIOC_U_MI_INFO\n");
+		ret = vse_update_mi_info(dev);
+		break;
+	case VSEIOC_U_BUFFER:{
+			dw_info("VSEIOC_U_BUFFER\n");
+			u64 addrs[3];
+			viv_check_retval(copy_from_user
+					 (addrs, args, sizeof(addrs)));
+			vse_update_buffers(dev, addrs);
+			break;
+		}
+	case VSEIOC_MASK_IRQ:{
+			dw_info("VSEIOC_MASK_IRQ\n");
+			u32 mask;
+			viv_check_retval(copy_from_user
+					 (&mask, args, sizeof(mask)));
+			vse_mask_irq(dev, mask);
+			break;
+		}
+	case DW200IOC_LOCK:
+		dw_info("DW200IOC_LOCK\n");
+		dw200_mutex_lock(dev);
+		break;
+	case DW200IOC_UNLOCK:
+		dw_info("DW200IOC_UNLOCK\n");
+		dw200_mutex_unlock(dev);
+		break;
+	case DW200IOC_VISYS_RESET:
+		dw_info("DW200IOC_VISYS_RESET\n");
+		visys_reset();
+		break;
+	default:
+		//pr_err("unsupported dwe command %d", cmd);
+		break;
+	}
+
+	return ret;
+}

+ 119 - 0
vvcam/dw200/dw200_ioctl.h

@@ -0,0 +1,119 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DWE_IOC_H_
+#define _DWE_IOC_H_
+#include "dw200_subdev.h"
+#include "dwe_regs.h"
+#include "vse_regs.h"
+
+enum {
+	DWEIOC_RESET = 0x100,
+	DWEIOC_S_PARAMS,
+	DWEIOC_ENABLE_BUS,
+	DWEIOC_DISABLE_BUS,
+	DWEIOC_DISABLE_IRQ,
+	DWEIOC_CLEAR_IRQ,
+	DWEIOC_READ_IRQ,
+	DWEIOC_START_DMA_READ,
+	DWEIOC_SET_BUFFER,
+	DWEIOC_SET_LUT,
+	DWEIOC_START,
+	// vse
+	VSEIOC_RESET,
+	VSEIOC_S_PARAMS,
+	VSEIOC_U_BUFFER,
+	VSEIOC_U_MI_INFO,
+	VSEIOC_MASK_IRQ,
+	VSEIOC_READ_IRQ,
+	VSEIOC_CLEAR_IRQ,
+	VSEIOC_START_DMA_READ,
+	DW200IOC_LOCK, // 113
+	DW200IOC_UNLOCK,
+	DW200IOC_UPDATECURR,
+	DW200IOC_VISYS_RESET,
+	DW200IOC_GET_RESERVE_ADDR,
+	DW200IOC_RUNTIME_RESUME,
+	DW200IOC_RUNTIME_SUSPEND,
+};
+
+typedef struct dw_src_addr {
+	u64 y_addr;
+	u64 uv_addr;
+} dw_src_addr_t;
+
+long dw200_priv_ioctl(struct dw200_subdev *dev, unsigned int cmd, void *args);
+
+int dwe_reset(struct dw200_subdev *dev);
+int dwe_s_params(struct dw200_subdev *dev);
+int dwe_enable_bus(struct dw200_subdev *dev, bool enable);
+int dwe_disable_irq(struct dw200_subdev *dev);
+int dwe_clear_irq(struct dw200_subdev *dev, u32 mis);
+int dwe_clear_irq_1(struct dw200_subdev *dev);
+
+int dwe_read_irq(struct dw200_subdev *dev, u32 *ret);
+int dwe_start_dma_read(struct dw200_subdev *dev, dw_src_addr_t src_addr);
+int dwe_set_buffer(struct dw200_subdev *dev, u64 addr);
+int dwe_set_lut(struct dw200_subdev *dev, u64 addr);
+
+int vse_reset(struct dw200_subdev *dev);
+int vse_s_params(struct dw200_subdev *dev);
+int vse_update_mi_info(struct dw200_subdev *dev);
+int vse_mask_irq(struct dw200_subdev *dev, u32 mask);
+int vse_clear_irq(struct dw200_subdev *dev, u32 mis);
+int vse_read_irq(struct dw200_subdev *dev, u32 *ret);
+/* dma input pa */
+int vse_start_dma_read(struct dw200_subdev *dev, u64 addr);
+/* mi output pa */
+int vse_update_buffers(struct dw200_subdev *dev, u64 *addr);
+
+#endif // _DWE_IOC_H_

+ 168 - 0
vvcam/dw200/dw200_subdev.h

@@ -0,0 +1,168 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DW200_DEV_H
+#define _DW200_DEV_H
+
+
+#include <vvdefs.h>
+#include "vivdw200_irq_queue.h"
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#include <stdio.h>
+#define copy_from_user(a, b, c) dw200_copy_data(a, b, c)
+#define copy_to_user(a, b, c) dw200_copy_data(a, b, c)
+
+
+typedef void(*pReadBar) (uint32_t bar, uint32_t *data);
+typedef void(*pWriteBar) (uint32_t bar, uint32_t data);
+
+extern void dwe_set_func(pReadBar read_func, pWriteBar write_func);
+//extern void dw200_set_func(cmDW200* pDW200,pDw200ReadBar read_func, pDw200WriteBar write_func);
+
+
+typedef bool(*pVseReadBar) (uint32_t bar, uint32_t * data);
+typedef bool(*pVseWriteBar) (uint32_t bar, uint32_t data);
+
+extern void vse_set_func(pVseReadBar read_func, pVseWriteBar write_func);
+extern long dw200_copy_data(void *dst, void *src, int size);
+#endif
+
+
+typedef enum dw200_input_id {
+	DW200_INPUT_DWE = 0,
+	DW200_INPUT_VSE,
+	DW200_INPUT_MAX
+} dw200_input_id;
+
+typedef enum dw200_output_id {
+	DW200_OUTPUT_DWE = 0,
+	DW200_OUTPUT_VSE0,
+	DW200_OUTPUT_VSE1,
+	DW200_OUTPUT_VSE2,
+	DW200_OUTPUT_MAX
+} dw200_output_id;
+
+struct dwe_hw_info {
+	u32 split_line;
+	u32 scale_factor;
+	u32 in_format;
+	u32 out_format;
+	u32 in_yuvbit;
+	u32 out_yuvbit;
+	u32 hand_shake;
+	u32 roi_x, roi_y;
+	u32 boundary_y, boundary_u, boundary_v;
+	u32 map_w, map_h;
+	u32 src_auto_shadow, dst_auto_shadow;
+	u32 src_w, src_stride, src_h;
+	u32 dst_w, dst_stride, dst_h, dst_size_uv;
+	u32 split_h, split_v1, split_v2;
+};
+
+struct vse_crop_size {
+	u32 left;
+	u32 right;
+	u32 top;
+	u32 bottom;
+};
+
+struct vse_size {
+	u32 width;
+	u32 height;
+};
+
+struct vse_format_conv_settings {
+	u32 in_format;
+	u32 out_format;
+};
+
+struct vse_mi_settings {
+	bool enable;
+	u32 out_format;
+	u32 width;
+	u32 height;
+	u32 yuvbit;
+};
+
+struct vse_params {
+	u32 src_w;
+	u32 src_h;
+	u32 in_format;
+	u32 in_yuvbit;
+	u32 input_select;
+	struct vse_crop_size crop_size[3];
+	struct vse_size out_size[3];
+	struct vse_format_conv_settings format_conv[3];
+	bool resize_enable[3];
+	struct vse_mi_settings mi_settings[3];
+};
+
+struct dw200_subdev {
+	struct dwe_hw_info dwe_info;
+	struct vse_params vse_info;
+	void __iomem *dwe_base;
+	void __iomem *dwe_reset;
+	void __iomem *vse_base;
+	void __iomem *vse_reset;
+	vivdw200_mis_list_t dwe_circle_list;
+	vivdw200_mis_list_t vse_circle_list;
+	struct mutex *vvmutex;
+};
+
+void dwe_write_reg(struct dw200_subdev *dev, u32 offset, u32 val);
+u32 dwe_read_reg(struct dw200_subdev *dev, u32 offset);
+void vse_write_reg(struct dw200_subdev *dev, u32 offset, u32 val);
+u32 vse_read_reg(struct dw200_subdev *dev, u32 offset);
+
+#endif // _DW200_DEV_H

+ 119 - 0
vvcam/dw200/dwe_regs.h

@@ -0,0 +1,119 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DWE_REGS_H_
+#define _DWE_REGS_H_
+
+//#define REGISTER_NUM 100
+#define DEWARP_REGISTER_BASE_ADDR 0x00000C00
+#define DEWARP_CTRL         0x00000004
+#define SWAP_CONTROL        0x00000058
+#define VERTICAL_SPLIT_LINE 0x0000005C
+#define HORIZON_SPLIT_LINE  0x00000060
+#define SCALE_FACTOR        0x00000064
+#define ROI_START           0x00000068
+#define BOUNDRY_PIXEL       0x0000006C
+#define INTERRUPT_STATUS    0x00000070
+
+#define INT_FRAME_DONE      (1 << 0)
+#define INT_ERR_STATUS_MASK  0x000000FE
+#define INT_ERR_STATUS_SHIFT 1
+#define INT_MSK_STATUS_MASK  0x0000FF00
+#define INT_MSK_STATUS_SHIFT 8
+#define INT_FRAME_BUSY       0x00010000
+
+#ifdef HAL_CMODEL
+#define INT_CLR_MASK         0x00007F00
+#else
+#define INT_CLR_MASK         0x00000100
+#endif
+
+#define INT_RESET_MASK       0x01000000
+#define BUS_CTRL             0x00000074
+#define DEWRAP_BUS_CTRL_ENABLE_MASK  (1 << 31)
+#define DEWRAP_BUS_CTRL_RD_ID_ENABLE_MASK  (1 << 30)
+#define DEWRAP_BUS_CTRL_WR_ID_ENABLE_MASK  (1 << 29)
+#define DEWRAP_BUS_CTRL_RD_ID_SHIFT (8)
+#define DEWRAP_BUS_CTRL_WR_ID_SHIFT (16)
+
+
+
+#define BUS_CTRL1                 0x00000078
+#define BUS_TIME_OUT_CYCLE        0x0000007C
+#define MAP_LUT_ADDR              0x00000008
+#define MAP_LUT_SIZE              0x0000000C
+#define SRC_IMG_Y_BASE            0x00000010
+#define SRC_IMG_UV_BASE           0x00000014
+#define SRC_IMG_SIZE              0x00000018
+#define SRC_IMG_STRIDE            0x0000001C
+#define MAP_LUT_ADDR2             0x00000020
+#define MAP_LUT_SIZE2             0x00000024
+#define SRC_IMG_Y_BASE2           0x00000028
+#define SRC_IMG_UV_BASE2          0x0000002C
+#define SRC_IMG_SIZE2             0x00000030
+#define SRC_IMG_STRIDE2           0x00000034
+#define DST_IMG_Y_BASE            0x00000038
+#define DST_IMG_UV_BASE           0x0000003C
+#define DST_IMG_SIZE              0x00000040
+#define DST_IMG_STRIDE            0x00000044
+#define DST_IMG_Y_BASE2           0x00000048
+#define DST_IMG_UV_BASE2          0x0000004C
+#define DST_IMG_SIZE2             0x00000050
+#define DST_IMG_STRIDE2           0x00000054
+#define DST_IMG_Y_SIZE1           0x00000080
+#define DST_IMG_UV_SIZE1          0x00000084
+#define DST_IMG_Y_SIZE2           0x00000088
+#define DST_IMG_UV_SIZE2          0x0000008C
+#define DST_IMG_WIDTH_BN          0x0000009C
+
+
+#endif /* _DWE_REGS_H_ */

+ 191 - 0
vvcam/dw200/vivdw200_irq_queue.c

@@ -0,0 +1,191 @@
+
+#ifdef __KERNEL__
+#include <asm/io.h>
+
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+
+#include <linux/timer.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+#include <linux/interrupt.h>
+#else
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#endif
+#include "vivdw200_irq_queue.h"
+
+#ifdef __KERNEL__
+#define dw_info(...)
+#else
+#define dw_info(...)
+#endif
+
+  //enqueue
+int vivdw200_enqueue(vivdw200_mis_t *data,vivdw200_mis_t* head)
+  {
+#ifdef __KERNEL__
+    vivdw200_mis_t* new_node = (vivdw200_mis_t*)kmalloc(sizeof(vivdw200_mis_t), GFP_KERNEL); //create new node
+
+
+    if (data == NULL || head == NULL) {
+        //dw_info("%s: input wrong parameter\n", __func__);
+        return -1;
+    }
+    new_node->val = data->val;
+
+    dw_info("%s: new_node %px", __func__, new_node);
+    INIT_LIST_HEAD(&new_node->list);
+    list_add_tail(&new_node->list, &head->list);             //append to tail
+ #endif
+    return 0;
+
+  }
+
+  //dequeue && release memory
+int vivdw200_dequeue(vivdw200_mis_t* data, vivdw200_mis_t* head)
+  {
+
+#ifdef __KERNEL__
+    vivdw200_mis_t* entry;
+    if (data == NULL || head == NULL) {
+        //dw_info("%s: input wrong parameter\n", __func__);
+        return -1;
+    }
+    if (list_empty(&head->list)) {
+        //dw_info("%s: There is no node\n", __func__);
+        return -1;
+    }
+
+    entry = list_first_entry(&head->list, vivdw200_mis_t, list);
+    dw_info("%s: entry %px", __func__, entry);
+    data->val = entry->val;
+
+    list_del_init(&entry->list);
+
+    kfree(entry);
+#endif
+    return 0;
+  }
+
+bool vivdw200_is_queue_empty( vivdw200_mis_t* head)
+  {
+#ifdef __KERNEL__
+      return list_empty(&head->list);
+#else 
+      return 0;
+#endif
+  }
+
+int vivdw200_create_circle_queue(vivdw200_mis_list_t* pCList, int number)
+{
+#ifdef __KERNEL__
+  int i;
+  vivdw200_mis_t* pMisNode;
+  if (pCList == NULL || number <= 0) {
+      dw_info("%s: create circle queue failed\n", __func__);
+      return -1;
+  }
+
+  if (pCList->pHead == NULL) {
+
+      pCList->pHead = (vivdw200_mis_t*)kmalloc(sizeof(vivdw200_mis_t), GFP_KERNEL);
+      INIT_LIST_HEAD(&pCList->pHead->list);
+      pCList->pRead = pCList->pHead;
+      pCList->pWrite = pCList->pHead;
+  }
+  dw_info("%s:pHead %px\n", __func__, pCList->pHead);
+  for (i = 0; i < number - 1; i++) {
+      pMisNode = (vivdw200_mis_t*)kmalloc(sizeof(vivdw200_mis_t), GFP_KERNEL);
+      INIT_LIST_HEAD(&pMisNode->list);
+      list_add_tail(&pMisNode->list, &pCList->pHead->list);
+      dw_info("%s:pMisNode %px\n", __func__, pMisNode);
+  }
+
+#endif
+  return 0;
+}
+
+int vivdw200_destroy_circle_queue(vivdw200_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  vivdw200_mis_t* pMisNode;
+  if (pCList == NULL || (pCList->pHead == NULL) ) {
+      dw_info("%s: destroy circle queue failed. pClist %px\n", __func__, pCList);
+      return -1;
+  }
+
+  while(!list_empty(&pCList->pHead->list)) {
+      pMisNode = list_first_entry(&pCList->pHead->list, vivdw200_mis_t, list);
+      dw_info("%s:pMisNode %px\n", __func__, pMisNode);
+      list_del(&pMisNode->list);
+      kfree(pMisNode);
+      pMisNode = NULL;
+  }
+  dw_info("%s:pHead %px\n", __func__, pCList->pHead);
+  kfree(pCList->pHead);
+  pCList->pHead = NULL;
+  pCList->pRead = NULL;
+  pCList->pWrite = NULL;
+#endif
+  return 0;
+}
+
+int vivdw200_read_circle_queue(vivdw200_mis_t* data, vivdw200_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  //vivdw200_mis_t* pReadEntry;
+  if (pCList == NULL) {
+      dw_info("%s: can not read circle queue\n", __func__);
+      return -1;
+  }
+
+  if (pCList->pRead == pCList->pWrite) {
+    dw_info("%s: There is no irq mis data\n", __func__);
+    return -1;
+  }
+  data->val = pCList->pRead->val;
+
+  dw_info("%s: entry %px, msi %08x\n", __func__, pCList->pRead, data->val);
+  /*Get the next entry that link with read entry list*/
+  /*Update read pointer to next entry*/
+  pCList->pRead = list_first_entry(&pCList->pRead->list, vivdw200_mis_t, list);
+
+  //pCList->pRead = pReadEntry;
+
+#endif
+  return 0;
+}
+
+int vivdw200_write_circle_queue(vivdw200_mis_t* data, vivdw200_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  vivdw200_mis_t* pWriteEntry;
+  if (pCList == NULL) {
+      dw_info("%s: can not read circle queue\n", __func__);
+      return -1;
+  }
+
+  pCList->pWrite->val = data->val;
+  dw_info("%s: entry %px, msi %08x\n", __func__,  pCList->pWrite,  data->val);
+  /*get the next write entry pointer that link with the write entry list*/
+  pWriteEntry = list_first_entry(&pCList->pWrite->list, vivdw200_mis_t, list);
+
+  /*Update write pointer to point next entry*/
+  pCList->pWrite = pWriteEntry;
+
+#endif
+  return 0;
+}

+ 83 - 0
vvcam/dw200/vivdw200_irq_queue.h

@@ -0,0 +1,83 @@
+ /****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+ #ifndef _VIVDW200_QUEUE_H_
+ #define _VIVDW200_QUEUE_H_
+#ifdef __KERNEL__
+#include <linux/list.h>
+#endif
+
+typedef struct vivdw200_mis_s {
+	unsigned int val;
+#ifdef __KERNEL__
+  struct list_head list;
+#endif
+}vivdw200_mis_t;
+typedef struct vivdw200_mis_list_s {
+
+  vivdw200_mis_t* pHead;
+  vivdw200_mis_t* pRead;
+  vivdw200_mis_t* pWrite;
+}vivdw200_mis_list_t;
+
+int vivdw200_enqueue(vivdw200_mis_t *data,vivdw200_mis_t* head);
+int vivdw200_dequeue(vivdw200_mis_t* data, vivdw200_mis_t* head);
+bool vivdw200_is_queue_empty( vivdw200_mis_t* head);
+
+#define QUEUE_NODE_COUNT 15
+int vivdw200_create_circle_queue(vivdw200_mis_list_t* pCList, int number);
+int vivdw200_destroy_circle_queue(vivdw200_mis_list_t* pCList);
+
+int vivdw200_read_circle_queue(vivdw200_mis_t* data, vivdw200_mis_list_t* pCList);
+int vivdw200_write_circle_queue(vivdw200_mis_t* data, vivdw200_mis_list_t* pCList);
+
+#endif

+ 322 - 0
vvcam/dw200/vse_regs.h

@@ -0,0 +1,322 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _VSE_REGS_H_
+#define _VSE_REGS_H_
+
+/* product identification */
+#define VSE_REG_ID	0x00000000
+#define VSE_REG_CTRL	0x00000004
+
+#define VSE_CONTROL_ENABLE_RAM_CLK 17
+#define VSE_CONTROL_AUTO_UPDATE_BIT 16
+#define VSE_CONTROL_CONFIG_UPDATE_BIT 15
+#define VSE_CONTROL_DMA_FRAME_START_BIT 14
+#define VSE_CONTROL_INPUT_SELECT_SHIFT 11
+#define VSE_CONTROL_INPUT_SELECT (7 << 11)
+#define VSE_CONTROL_INPUT_FORMAT_SHIFT 9
+#define VSE_CONTROL_INPUT_FORMAT (3 << 9)
+#define VSE_CONTROL_SOFT_RESET_BIT   8
+#define VSE_CONTROL_PATH2_ENABLE_BIT 2
+#define VSE_CONTROL_PATH1_ENABLE_BIT 1
+#define VSE_CONTROL_PATH0_ENABLE_BIT 0
+
+/* input size 28:16 height, 12:0 width */
+#define VSE_REG_IN_SIZE		0x00000008
+#define VSE_REG_CTRL_SHD		0x0000000C
+#define VSE_REG_RSZ0_CTL				  0x00000400
+#define VSE_REG_RSZ1_CTL				  0x00000500
+#define VSE_REG_RSZ2_CTL				  0x00000600
+#define VSE_RSZBASE(c) ((c) == 0 ? VSE_REG_RSZ0_CTL : ((c) == 1 ? VSE_REG_RSZ1_CTL : VSE_REG_RSZ2_CTL))
+#define VSE_RSZ_SCALE_HY		0x00000004
+#define VSE_RSZ_SCALE_HCB		0x00000008
+#define VSE_RSZ_SCALE_HCR		0x0000000C
+#define VSE_RSZ_SCALE_VY		0x00000010
+#define VSE_RSZ_SCALE_VC		0x00000014
+#define VSE_RSZ_PHASE_HY		0x00000018
+#define VSE_RSZ_PHASE_HC		0x0000001C
+#define VSE_RSZ_PHASE_VY		0x00000020
+#define VSE_RSZ_PHASE_VC		0x00000024
+#define VSE_RSZ_SCALE_LUT_ADDR	0x00000028
+#define VSE_RSZ_SCALE_LUT		0x0000002C
+#define VSE_RSZ_CTRL_SHD		0x00000030
+#define VSE_RSZ_SCALE_HY_SHD	0x00000034
+#define VSE_RSZ_SCALE_HCB_SHD	0x00000038
+#define VSE_RSZ_SCALE_HCR_SHD	0x0000003C
+#define VSE_RSZ_SCALE_VY_SHD	0x00000040
+#define VSE_RSZ_SCALE_VC_SHD	0x00000044
+#define VSE_RSZ_PHASE_HY_SHD	0x00000048
+#define VSE_RSZ_PHASE_HC_SHD	0x0000004C
+#define VSE_RSZ_PHASE_VY_SHD	0x00000050
+#define VSE_RSZ_PHASE_VC_SHD	0x00000054
+#define VSE_RSZ_CROP_XDIR		0x00000058
+#define VSE_RSZ_CROP_YDIR		0x0000005C
+#define VSE_RSZ_CROP_XDIR_SHD	0x00000060
+#define VSE_RSZ_CROP_YDIR_SHD	0x00000064
+#define VSE_RSZ_FRAME_RATE		0x00000068
+#define VSE_REG_FORMAT_CONV_CTRL	0x0000006C
+#define VSE_REG_HBLANK_VALUE	0x000001A0
+
+#define VSE_REG_VBLANK_VALUE	0x000001A4
+#define VSE_REG_VSYNC_WIDTH		0x000001A8
+#define VSE_REG_HSYNC_PREAMBLE	0x000001AC
+#define VSE_REG_MI_CTRL				   0x00000800
+#define VSE_REG_MI_CTRL_SHD			   0x00000804
+#define VSE_REG_MI_PATH_0				 0x00000810
+#define VSE_REG_MI_PATH_1				 0x000008b0
+#define VSE_REG_MI_PATH_2				 0x00000950
+#define VSE_MI_BASE(c) ((c) == 0 ? VSE_REG_MI_PATH_0 : ((c) == 1 ? VSE_REG_MI_PATH_1 : VSE_REG_MI_PATH_2))
+#define VSE_REG_MI_FMT					0x00000004
+
+#define VSE_REG_MI_Y_BASE_ADDR_INIT		0x00000014
+#define VSE_REG_MI_Y_SIZE_INIT			0x00000018
+#define VSE_REG_MI_Y_OFFSET_COUNT_INIT	0x0000001C
+#define VSE_REG_MI_Y_LENGTH				0x00000020
+#define VSE_REG_MI_Y_PIC_WIDTH			0x00000024
+#define VSE_REG_MI_Y_PIC_HEIGHT			0x00000028
+#define VSE_REG_MI_Y_PIC_SIZE			0x0000002C
+
+#define VSE_REG_MI_CB_BASE_ADDR_INIT	0x00000030
+#define VSE_REG_MI_CB_SIZE_INIT			0x00000034
+#define VSE_REG_MI_CB_OFFSET_COUNT_INIT	0x00000038
+#define VSE_REG_MI_CR_BASE_ADDR_INIT	0x0000003C
+#define VSE_REG_MI_CR_SIZE_INIT			0x00000040
+#define VSE_REG_MI_CR_OFFSET_COUNT_INIT	0x00000044
+#define VSE_REG_MI_Y_BASE_ADDR_INIT2	0x00000048
+#define VSE_REG_MI_CB_BASE_ADDR_INIT2	0x0000004C
+#define VSE_REG_MI_CR_BASE_ADDR_INIT2	0x00000050
+#define VSE_REG_MI_Y_OFFS_CNT_START		0x00000054
+#define VSE_REG_MI_CB_OFFS_CNT_START	0x00000058
+#define VSE_REG_MI_CR_OFFS_CNT_START	0x0000005C
+#define VSE_REG_MI_Y_BASE_ADDR_SHD		0x00000060
+#define VSE_REG_MI_Y_SIZE_SHD			0x00000064
+#define VSE_REG_MI_Y_OFFS_COUNT_SHD		0x00000068
+#define VSE_REG_MI_CB_BASE_ADDR_SHD		0x0000006C
+#define VSE_REG_MI_CB_SIZE_SHD			0x00000070
+#define VSE_REG_MI_CB_OFFS_COUNT_SHD	0x00000074
+#define VSE_REG_MI_CR_BASE_ADDR_SHD		0x00000078
+#define VSE_REG_MI_CR_SIZE_SHD			0x0000007C
+#define VSE_REG_MI_CR_OFFS_COUNT_SHD	0x00000080
+#define VSE_REG_MI_STATUS_CLR			0x00000084
+#define VSE_REG_MI_CTRL_STATUS			0x00000088
+#define VSE_REG_MI_Y_IRQ_OFFS_INIT		0x0000008C
+#define VSE_REG_MI_Y_IRQ_OFFS_SHD		0x00000090
+#define VSE_REG_DMA_CTRL				   0x000009E8
+#define VSE_REG_DMA_FORMAT				 0x000009EC
+#define VSE_REG_DMA_Y_PIC_WIDTH			0x000009F0
+#define VSE_REG_DMA_Y_PIC_HEIGHT		   0x000009F4
+#define VSE_REG_DMA_Y_PIC_STRIDE		   0x000009F8
+#define VSE_REG_Y_PIC_START_ADDR		   0x000009FC
+#define VSE_REG_CB_PIC_START_ADDR		  0x00000A00
+#define VSE_REG_CR_PIC_START_ADDR		  0x00000A04
+#define VSE_REG_Y_START_ADDR_SHD		   0x00000A08
+#define VSE_REG_CB_START_ADDR_SHD		  0x00000A0C
+#define VSE_REG_CR_START_ADDR_SHD		  0x00000A10
+#define VSE_REG_DMA_STATUS				 0x00000A14
+#define VSE_REG_MI0_BUS_CONFIG			 0x00000A20
+#define VSE_REG_MI0_BUS_ID				 0x00000A24
+#define VSE_REG_MI0_BUS_TIME_OUT		   0x00000A28
+#define VSE_REG_MI0_AXI_STATUS			 0x00000A2C
+
+#define VSE_REG_MI1_BUS_CONFIG			 0x00000A30
+#define VSE_REG_MI1_BUS_ID				 0x00000A34
+#define VSE_REG_MI1_BUS_TIME_OUT		   0x00000A38
+#define VSE_REG_MI1_AXI_STATUS			 0x00000A3C
+
+#define VSE_REG_MI_IMSC					0x00000A40
+#define VSE_REG_MI_IMSC1				   0x00000A44
+#define VSE_REG_MI_ISR					 0x00000A48
+#define VSE_REG_MI_ISR1					0x00000A4C
+#define VSE_REG_MI_MSI					 0x00000A50
+#define VSE_REG_MI_MSI1					0x00000A54
+#define VSE_REG_MI_ICR					 0x00000A58
+#define VSE_REG_MI_ICR1					0x00000A5C
+#define VSE_REG_MI_RIS					 0x00000A60
+#define VSE_REG_MI_RIS1					0x00000A64
+
+#define VSE_FORMAT_CONV_ENABLE_PACK_SHIFT 10
+#define VSE_FORMAT_CONV_ENABLE_PACK (1 << 10)
+#define VSE_FORMAT_CONV_EXPAND_8TO10_METHOD_SHIFT 9
+#define VSE_FORMAT_CONV_EXPAND_8TO10_METHOD (1 << 9)
+#define VSE_FORMAT_CONV_EXPAND_8TO10_ENABLE_SHIFT 8
+#define VSE_FORMAT_CONV_EXPAND_8TO10_ENABLE (1 << 8)
+#define VSE_FORMAT_CONV_CONFIG_422NOCO_SHIFT 7
+#define VSE_FORMAT_CONV_CONFIG_422NOCO (1 << 7)
+#define VSE_FORMAT_CONV_CBCR_FULL_SHIFT 6
+#define VSE_FORMAT_CONV_CBCR_FULL  (1 << 6)
+#define VSE_FORMAT_CONV_Y_FULL_SHIFT 5
+#define VSE_FORMAT_CONV_Y_FULL  (1 << 5)
+#define VSE_FORMAT_CONV_OUTPUT_FORMAT_SHIFT 2
+#define VSE_FORMAT_CONV_OUTPUT_FORMAT  (7 << 2)
+#define VSE_FORMAT_CONV_INPUT_FORMAT_SHIFT 0
+#define VSE_FORMAT_CONV_INPUT_FORMAT  (3)
+
+/* slice of VSE_REG_RSZ0_CTL */
+#define VSE_RESIZE_CONTROL_AUTO_UPDATE_BIT		10
+#define VSE_RESIZE_CONTROL_CONFIG_UPDATE_BIT	9
+#define VSE_RESIZE_CONTROL_CROP_ENABLE_BIT		8
+#define VSE_RESIZE_CONTROL_SCALE_VCUP_BIT		7
+#define VSE_RESIZE_CONTROL_SCALE_VYUP_BIT		6
+#define VSE_RESIZE_CONTROL_SCALE_HCUP_BIT		5
+#define VSE_RESIZE_CONTROL_SCALE_HYUP_BIT		4
+#define VSE_RESIZE_CONTROL_SCALE_VC_ENABLE_BIT	3
+#define VSE_RESIZE_CONTROL_SCALE_VY_ENABLE_BIT	2
+#define VSE_RESIZE_CONTROL_SCALE_HC_ENABLE_BIT	1
+#define VSE_RESIZE_CONTROL_SCALE_HY_ENABLE_BIT	0
+
+/* slice of VSE_REG_MI_FMT */
+#define VSE_RD_IMG_HSIZE_BN_SHIFT    16
+#define VSE_RD_IMG_HSIZE_BN    (0x3fff<<16)
+#define VSE_MI_FORMAT_WA_MSB_EN_SHIFT 10
+#define VSE_MI_FORMAT_WA_MSB_EN (1<<10)
+#define VSE_MI_FORMAT_WORD_ALIGNED_SHIFT 9
+#define VSE_MI_FORMAT_WORD_ALIGNED (1<<9)
+#define VSE_MI_FORMAT_WR_YUV_NVY_SHIFT 7
+#define VSE_MI_FORMAT_WR_YUV_NVY (3 << 7)
+#define VSE_MI_FORMAT_WR_YUV_N21_SHIFT 6
+#define VSE_MI_FORMAT_WR_YUV_N21 (1 << 6)
+#define VSE_MI_FORMAT_WR_FMT_ALIGNED_SHIFT 5
+#define VSE_MI_FORMAT_WR_FMT_ALIGNED (1 << 5)
+#define VSE_MI_FORMAT_WR_YUV_STR_SHIFT 3
+#define VSE_MI_FORMAT_WR_YUV_STR (3 << 3)
+#define VSE_MI_FORMAT_WR_YUV_FMT_SHIFT 1
+#define VSE_MI_FORMAT_WR_YUV_FMT (3 << 1)
+#define VSE_MI_FORMAT_WR_YUV_10BIT_SHIFT 0
+#define VSE_MI_FORMAT_WR_YUV_10BIT (1)
+
+/* slice of VSE_REG_MI_CTRL */
+#define VSE_MI_CONTROL_RDMA_START_BIT		4
+#define VSE_MI_CONTROL_RDMA_ENABLE_BIT		3
+#define VSE_MI_CONTROL_MI2_PATH_ENABLE_BIT	2
+#define VSE_MI_CONTROL_MI1_PATH_ENABLE_BIT	1
+#define VSE_MI_CONTROL_MI0_PATH_ENABLE_BIT	0
+
+/* slice of VSE_REG_MI_PATH */
+#define VSE_MI_PATH_INIT_OFFSET_EN_BIT		5
+#define VSE_MI_PATH_INIT_BASE_EN_BIT		4
+#define VSE_MI_PATH_CONFIG_UPDATE_BIT		3
+#define VSE_MI_PATH_ENABLE_SKIP_BIT			2
+#define VSE_MI_PATH_AUTO_UPDATE_BIT			1
+#define VSE_MI_PATH_ENABLE_PINGPONG_BIT		0
+#define VSE_MI_ISR_STATUS_VSE_AND_DEWARP_ALL_DONE_BIT 14
+#define VSE_MI_ISR_STATUS_FINAL_FRAME_END_BIT         13
+#define VSE_MI_ISR_STATUS_DMA_YCBCR_READY_BIT	12
+#define VSE_MI_ISR_STATUS_WRAP_MI2_CR_BIT		11
+#define VSE_MI_ISR_STATUS_WRAP_MI2_CB_BIT		10
+#define VSE_MI_ISR_STATUS_WRAP_MI2_Y_BIT		9
+#define VSE_MI_ISR_STATUS_WRAP_MI1_CR_BIT		8
+#define VSE_MI_ISR_STATUS_WRAP_MI1_CB_BIT		7
+#define VSE_MI_ISR_STATUS_WRAP_MI1_Y_BIT		6
+#define VSE_MI_ISR_STATUS_WRAP_MI0_CR_BIT		5
+#define VSE_MI_ISR_STATUS_WRAP_MI0_CB_BIT		4
+#define VSE_MI_ISR_STATUS_WRAP_MI0_Y_BIT		3
+#define VSE_MI_ISR_STATUS_MI2_FRAME_END_BIT		2
+#define VSE_MI_ISR_STATUS_MI1_FRAME_END_BIT		1
+#define VSE_MI_ISR_STATUS_MI0_FRAME_END_BIT		0
+#define VSE_MI_MIS_VSE_AND_DEWARP_ALL_DONE_BIT 14
+#define VSE_MI_MIS_FINAL_FRAME_END_BIT         13
+#define VSE_MI_MIS_DMA_YCBCR_READY_BIT	       12
+#define VSE_MI_MIS_WRAP_MI2_CR_BIT		       11
+#define VSE_MI_MIS_WRAP_MI2_CB_BIT		       10
+#define VSE_MI_MIS_WRAP_MI2_Y_BIT		       9
+#define VSE_MI_MIS_WRAP_MI1_CR_BIT		       8
+#define VSE_MI_MIS_WRAP_MI1_CB_BIT		       7
+#define VSE_MI_MIS_WRAP_MI1_Y_BIT		       6
+#define VSE_MI_MIS_WRAP_MI0_CR_BIT		       5
+#define VSE_MI_MIS_WRAP_MI0_CB_BIT		       4
+#define VSE_MI_MIS_WRAP_MI0_Y_BIT		       3
+#define VSE_MI_MIS_MI2_FRAME_END_BIT		   2
+#define VSE_MI_MIS_MI1_FRAME_END_BIT		   1
+#define VSE_MI_MIS_MI0_FRAME_END_BIT		   0
+
+
+#define VSE_MI_ISR_ERROR_MI2_BUS_ERROR_BIT		5
+#define VSE_MI_ISR_ERROR_MI2_BUS_TIMEOUT_BIT	4
+#define VSE_MI_ISR_ERROR_MI1_BUS_ERROR_BIT		3
+#define VSE_MI_ISR_ERROR_MI1_BUS_TIMEOUT_BIT	2
+#define VSE_MI_ISR_ERROR_MI0_BUS_ERROR_BIT		1
+#define VSE_MI_ISR_ERROR_MI0_BUS_TIMEOUT_BIT	0
+
+#define VSE_MI_BUS_CONFIG_WR_SWAP_V_SHIFT   16
+#define VSE_MI_BUS_CONFIG_WR_SWAP_V (0XF << 16)
+#define VSE_MI_BUS_CONFIG_WR_SWAP_U_SHIFT   12
+#define VSE_MI_BUS_CONFIG_WR_SWAP_U (0XF << 12)
+#define VSE_MI_BUS_CONFIG_WR_SWAP_Y_SHIFT   8
+#define VSE_MI_BUS_CONFIG_WR_SWAP_Y (0XF << 8)
+#define VSE_MI_BUS_CONFIG_RD_ISSUE_CAP_SHIFT   6
+#define VSE_MI_BUS_CONFIG_RD_ISSUE_CAP (0X3 << 6)
+#define VSE_MI_BUS_CONFIG_WR_ISSUE_CAP_SHIFT   4
+#define VSE_MI_BUS_CONFIG_WR_ISSUE_CAP (0X3 << 4)
+#define VSE_MI_BUS_CONFIG_RD_BURST_LEN_SHIFT   2
+#define VSE_MI_BUS_CONFIG_RD_BURST_LEN (0X3 << 2)
+#define VSE_MI_BUS_CONFIG_WR_BURST_LEN_SHIFT   0
+#define VSE_MI_BUS_CONFIG_WR_BURST_LEN (0X3 << 0)
+
+#ifndef REG_GET_MASK
+#define REG_GET_MASK(reg, mask)\
+	(((reg) & (mask)) >> (mask##_SHIFT))
+
+#define REG_SET_MASK(reg, mask, value)\
+	{\
+		((reg) = (((reg) & ~(mask)) | (((value) << (mask##_SHIFT)) & (mask))));\
+	}
+
+#define REG_GET_BIT(reg, shift)\
+	(((reg) & 1) >> shift)
+
+#define REG_SET_BIT(reg, shift, value)\
+	{\
+		((reg) = (((reg) & ~(1 << (shift))) | (((value) & 1) << (shift))));\
+	}
+#endif
+
+#endif /* _VSE_REGS_H_ */

+ 119 - 0
vvcam/dwe/dwe_dev.h

@@ -0,0 +1,119 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DWE_DEV_H
+#define _DWE_DEV_H
+
+#include "vvdefs.h"
+
+#ifndef __KERNEL__
+#define copy_from_user(a, b, c) dwe_copy_data(a, b, c)
+#define copy_to_user(a, b, c) dwe_copy_data(a, b, c)
+
+typedef bool(*pReadBar) (uint32_t bar, uint32_t *data);
+typedef bool(*pWriteBar) (uint32_t bar, uint32_t data);
+
+extern void dwe_set_func(pReadBar read_func, pWriteBar write_func);
+extern long dwe_copy_data(void *dst, void *src, int size);
+#endif
+
+#define MAX_DWE_NUM (2)
+#define MAX_CFG_NUM (2)
+
+struct dwe_hw_info {
+	u32 split_line;
+	u32 scale_factor;
+	u32 in_format;
+	u32 out_format;
+	u32 hand_shake;
+	u32 roi_x, roi_y;
+	u32 boundary_y, boundary_u, boundary_v;
+	u32 map_w, map_h;
+	u32 src_auto_shadow, dst_auto_shadow;
+	u32 src_w, src_stride, src_h;
+	u32 dst_w, dst_stride, dst_h, dst_size_uv;
+	u32 split_h, split_v1, split_v2;
+};
+
+enum BUF_ERR_TYPE {
+	BUF_ERR_UNDERFLOW = 1,
+	BUF_ERR_OVERFLOW0 = 1 << 1,
+	BUF_ERR_OVERFLOW1 = 1 << 2,
+	BUF_ERR_NO_DIST_MAP0 = 1 << 3,
+	BUF_ERR_NO_DIST_MAP1 = 1 << 4,
+	BUF_ERR_WRONGSTATE = 1 << 5,
+};
+
+struct dwe_ic_dev {
+	struct dwe_hw_info info[MAX_DWE_NUM][MAX_CFG_NUM];
+	int which[MAX_DWE_NUM];
+	void __iomem *base;
+	void __iomem *reset;
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+	struct vvbuf_ctx *sink_bctx;
+	struct vvbuf_ctx *src_bctx[MAX_DWE_NUM];
+	dma_addr_t dist_map[MAX_DWE_NUM][MAX_CFG_NUM];
+	int *state[MAX_DWE_NUM];
+	int index;
+	struct vb2_dc_buf *src;
+	struct vb2_dc_buf *dst;
+	spinlock_t irqlock;
+	u32 error;
+	int (*get_index)(struct dwe_ic_dev *dev, struct vb2_dc_buf *buf);
+#endif
+
+};
+
+void dwe_write_reg(struct dwe_ic_dev *dev, u32 offset, u32 val);
+u32 dwe_read_reg(struct dwe_ic_dev *dev, u32 offset);
+
+#endif /* _DWE_DEV_H */

+ 381 - 0
vvcam/dwe/dwe_ioctl.c

@@ -0,0 +1,381 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include "dwe_ioctl.h"
+#include "dwe_regs.h"
+#ifndef __KERNEL__
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#ifdef USE_V4L2
+#include <linux/videodev2.h>
+#endif
+#endif
+
+#ifndef __KERNEL__
+#ifdef HAL_CMODEL
+#define DEWARP_REGISTER_OFFSET  0
+#else
+#define DEWARP_REGISTER_OFFSET  0x380000
+#endif
+
+#define DEWARP_REGISTER_CTL	 0x308250
+
+pReadBar g_read_func;
+pWriteBar g_write_func;
+
+void dwe_set_func(pReadBar read_func, pWriteBar write_func)
+{
+	g_read_func = read_func;
+	g_write_func = write_func;
+}
+
+void dwe_write_reg(struct dwe_ic_dev *dev, u32 offset, u32 val)
+{
+	g_write_func(DEWARP_REGISTER_OFFSET + offset, val);
+}
+
+u32 dwe_read_reg(struct dwe_ic_dev *dev, u32 offset)
+{
+	u32 data;
+
+	g_read_func(DEWARP_REGISTER_OFFSET + offset, &data);
+	return data;
+}
+
+void dwe_write_extreg(u32 offset, u32 val)
+{
+	g_write_func(DEWARP_REGISTER_CTL + offset, val);
+}
+
+u32 dwe_read_extreg(u32 offset)
+{
+	u32 data;
+
+	g_read_func(DEWARP_REGISTER_CTL + offset, &data);
+	return data;
+}
+
+long dwe_copy_data(void *dst, void *src, int size)
+{
+	if (dst != src)
+		memcpy(dst, src, size);
+	return 0;
+}
+#else
+void dwe_write_reg(struct dwe_ic_dev *dev, u32 offset, u32 val)
+{
+	__raw_writel(val, dev->base + offset);
+}
+
+u32 dwe_read_reg(struct dwe_ic_dev *dev, u32 offset)
+{
+	return __raw_readl(dev->base + offset);
+}
+#endif
+
+int dwe_reset(struct dwe_ic_dev *dev)
+{
+	pr_debug("enter %s\n", __func__);
+#ifdef DWE_REG_RESET
+	__raw_writel(0, dev->reset);
+	__raw_writel(1, dev->reset);
+#endif
+	dwe_write_reg(dev, DEWARP_CTRL, 0x0c);
+	return 0;
+}
+
+int dwe_s_params(struct dwe_ic_dev *dev, struct dwe_hw_info *info)
+{
+	u32 reg = 0;
+	u32 reg_y_rbuff_size = ALIGN_UP(info->dst_stride * info->dst_h, 16);
+	u32 vUp = (info->split_v1 & ~0x0F) | 0x0C;
+	u32 vDown = (info->split_v2 & ~0x0F) | 0x0C;
+	u32 hLine = (info->split_h & ~0x0F) | 0x0C;
+
+	pr_debug("enter %s\n", __func__);
+
+	dwe_write_reg(dev, MAP_LUT_SIZE,
+		      ((info->map_w & 0x7ff) | ((info->map_h & 0x7ff) << 16)));
+	dwe_write_reg(dev, SRC_IMG_SIZE,
+		      ((info->src_w & 0x1fff) |
+		       ((info->src_h & 0x1fff) << 16)));
+	dwe_write_reg(dev, SRC_IMG_STRIDE, info->src_stride);
+
+	dwe_write_reg(dev, DST_IMG_SIZE,
+		      ((info->dst_w & 0x1FFF) |
+		       ((info->dst_h & 0x1FFF) << 16)));
+	dwe_write_reg(dev, DST_IMG_STRIDE, info->dst_stride);
+	dwe_write_reg(dev, DST_IMG_Y_SIZE1, reg_y_rbuff_size >> 4);
+	dwe_write_reg(dev, DST_IMG_UV_SIZE1, info->dst_size_uv >> 4);
+	dwe_write_reg(dev, VERTICAL_SPLIT_LINE,
+		      (vUp & 0x1fff) | ((vDown & 0x1fff) << 16));
+	dwe_write_reg(dev, HORIZON_SPLIT_LINE, (hLine & 0x1fff));
+
+	reg = 0x4C800001;
+	reg |= ((info->split_line & 0x1) << 11);
+	reg |= ((info->in_format & 0x3) << 4);
+	reg |= ((info->out_format & 0x3) << 6);
+	reg |=
+	    ((info->src_auto_shadow & 0x1) << 8) |
+	    ((info->dst_auto_shadow & 0x1) << 10);
+	reg |= ((info->hand_shake & 0x1) << 9);
+	dwe_write_reg(dev, DEWARP_CTRL, reg);
+
+	dwe_write_reg(dev, BOUNDRY_PIXEL,
+		      (((info->boundary_y & 0xff) << 16) |
+		       ((info->boundary_u & 0xff)
+			<< 8) | (info->boundary_v & 0xff)));
+	dwe_write_reg(dev, SCALE_FACTOR, info->scale_factor);
+	dwe_write_reg(dev, ROI_START,
+		      ((info->roi_x & 0x1fff) |
+		       ((info->roi_y & 0x1fff) << 16)));
+	return 0;
+}
+
+int dwe_enable_bus(struct dwe_ic_dev *dev, bool enable)
+{
+	u32 reg = dwe_read_reg(dev, BUS_CTRL);
+
+	/* pr_debug("enter %s\n", __func__); */
+
+	if (enable) {
+		dwe_write_reg(dev, BUS_CTRL, reg | DEWRAP_BUS_CTRL_ENABLE_MASK);
+	} else {
+		dwe_write_reg(dev, BUS_CTRL,
+			      reg & ~DEWRAP_BUS_CTRL_ENABLE_MASK);
+	}
+
+	return 0;
+}
+
+int dwe_disable_irq(struct dwe_ic_dev *dev)
+{
+	/* pr_debug("enter %s\n", __func__); */
+	dwe_write_reg(dev, INTERRUPT_STATUS, INT_CLR_MASK);
+	return 0;
+}
+
+int dwe_clear_irq(struct dwe_ic_dev *dev)
+{
+	u32 reg_dewarp_ctrl;
+
+	/* pr_debug("enter %s\n", __func__); */
+	reg_dewarp_ctrl = dwe_read_reg(dev, DEWARP_CTRL);
+	dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl | 2);
+	dwe_write_reg(dev, DEWARP_CTRL, reg_dewarp_ctrl);
+	dwe_write_reg(dev, INTERRUPT_STATUS, INT_CLR_MASK | INT_MSK_STATUS_MASK);
+
+	return 0;
+}
+
+int dwe_read_irq(struct dwe_ic_dev *dev, u32 *ret)
+{
+	u32 irq = 0;
+
+	irq = dwe_read_reg(dev, INTERRUPT_STATUS);
+	*ret = irq;
+
+	return 0;
+}
+
+int dwe_start(struct dwe_ic_dev *dev)
+{
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+	dev->src = NULL;
+	dev->dst = NULL;
+	dev->error = BUF_ERR_UNDERFLOW;
+#endif
+	return 0;
+}
+
+int dwe_stop(struct dwe_ic_dev *dev)
+{
+	dwe_enable_bus(dev, 0);
+	dwe_disable_irq(dev);
+	return 0;
+}
+
+int dwe_start_dma_read(struct dwe_ic_dev *dev,
+				struct dwe_hw_info *info, u64 addr)
+{
+#ifdef DWE_REG_RESET
+	u32 regStart = 1 << 4;
+	u32 reg;
+#endif
+	u32 reg_dst_y_base = (u32)addr;
+	u32 reg_y_rbuff_size = ALIGN_UP(info->src_stride * info->src_h, 16);
+	u32 reg_dst_uv_base = reg_dst_y_base + reg_y_rbuff_size;
+
+	/* pr_debug("enter %s\n", __func__); */
+
+	dwe_write_reg(dev, SRC_IMG_Y_BASE, (reg_dst_y_base) >> 4);
+	dwe_write_reg(dev, SRC_IMG_UV_BASE, (reg_dst_uv_base) >> 4);
+
+#ifdef DWE_REG_RESET
+	reg = __raw_readl(dev->reset);
+	__raw_writel(reg | regStart, dev->reset);
+	__raw_writel(reg & ~regStart, dev->reset);
+#endif
+
+	return 0;
+}
+
+int dwe_set_buffer(struct dwe_ic_dev *dev, struct dwe_hw_info *info, u64 addr)
+{
+	u32 reg_dst_y_base = (u32) addr;
+	u32 reg_y_rbuff_size = ALIGN_UP(info->dst_stride * info->dst_h, 16);
+	u32 reg_dst_uv_base = reg_dst_y_base + reg_y_rbuff_size;
+
+	/* pr_debug("enter %s\n", __func__); */
+	dwe_write_reg(dev, DST_IMG_Y_BASE, (reg_dst_y_base) >> 4);
+	dwe_write_reg(dev, DST_IMG_UV_BASE, (reg_dst_uv_base) >> 4);
+
+	return 0;
+}
+
+int dwe_set_lut(struct dwe_ic_dev *dev, u64 addr)
+{
+	dwe_write_reg(dev, MAP_LUT_ADDR, ((u32) addr) >> 4);
+	return 0;
+}
+
+int dwe_ioc_qcap(struct dwe_ic_dev *dev, void __user *args)
+{
+#ifdef __KERNEL__
+	struct v4l2_capability *cap = (struct v4l2_capability *)args;
+
+	strcpy((char *)cap->driver, "viv_dewarp100");
+#endif
+	return 0;
+}
+
+long dwe_priv_ioctl(struct dwe_ic_dev *dev, unsigned int cmd, void __user *args)
+{
+	int ret = -1;
+
+	switch (cmd) {
+	case DWEIOC_RESET:
+		ret = dwe_reset(dev);
+		break;
+	case DWEIOC_S_PARAMS:
+		viv_check_retval(copy_from_user
+				 (&dev->info[0][0], args, sizeof(dev->info[0][0])));
+		ret = dwe_s_params(dev, &dev->info[0][0]);
+		break;
+#ifndef ENABLE_IRQ
+	case DWEIOC_ENABLE_BUS:
+		ret = dwe_enable_bus(dev, 1);
+		break;
+	case DWEIOC_DISABLE_BUS:
+		ret = dwe_enable_bus(dev, 0);
+		break;
+	case DWEIOC_DISABLE_IRQ:
+		ret = dwe_disable_irq(dev);
+		break;
+	case DWEIOC_CLEAR_IRQ:
+		ret = dwe_clear_irq(dev);
+		break;
+#endif
+	case DWEIOC_READ_IRQ: {
+		u32 irq = 0;
+#ifndef ENABLE_IRQ
+		ret = dwe_read_irq(dev, &irq);
+#endif
+		viv_check_retval(copy_to_user(args, &irq, sizeof(irq)));
+		break;
+	}
+	case DWEIOC_START:
+		ret = dwe_start(dev);
+		break;
+	case DWEIOC_STOP:
+		ret = dwe_stop(dev);
+		break;
+	case DWEIOC_START_DMA_READ: {
+#ifndef ENABLE_IRQ
+		u64 addr;
+
+		viv_check_retval(copy_from_user(&addr, args, sizeof(addr)));
+		ret = dwe_start_dma_read(dev, &dev->info[0][0], addr);
+#endif
+		break;
+	}
+	case DWEIOC_SET_BUFFER: {
+#ifndef ENABLE_IRQ
+		u64 addr;
+
+		viv_check_retval(copy_from_user(&addr, args, sizeof(addr)));
+		ret = dwe_set_buffer(dev, &dev->info[0][0], addr);
+#endif
+		break;
+	}
+	case DWEIOC_SET_LUT: {
+		struct lut_info info;
+
+		viv_check_retval(copy_from_user(&info, args, sizeof(info)));
+#ifndef ENABLE_IRQ
+		ret = dwe_set_lut(dev, info.addr);
+#endif
+		break;
+	}
+#ifdef __KERNEL__
+	case VIDIOC_QUERYCAP:
+		ret = dwe_ioc_qcap(dev, args);
+		break;
+#endif
+	default:
+		pr_err("unsupported dwe command %d", cmd);
+		break;
+	}
+
+	return ret;
+}

+ 94 - 0
vvcam/dwe/dwe_ioctl.h

@@ -0,0 +1,94 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DWE_IOC_H_
+#define _DWE_IOC_H_
+#include "dwe_dev.h"
+
+enum {
+	DWEIOC_RESET = 0x100,
+	DWEIOC_S_PARAMS,
+	DWEIOC_ENABLE_BUS,
+	DWEIOC_DISABLE_BUS,
+	DWEIOC_DISABLE_IRQ,
+	DWEIOC_CLEAR_IRQ,
+	DWEIOC_READ_IRQ,
+	DWEIOC_START,
+	DWEIOC_STOP,
+	DWEIOC_START_DMA_READ,
+	DWEIOC_SET_BUFFER,
+	DWEIOC_SET_LUT,
+};
+
+struct lut_info {
+	u32 port;
+	u64 addr;
+};
+
+long dwe_priv_ioctl(struct dwe_ic_dev *dev, unsigned int cmd, void *args);
+
+int dwe_reset(struct dwe_ic_dev *dev);
+int dwe_s_params(struct dwe_ic_dev *dev, struct dwe_hw_info *info);
+int dwe_enable_bus(struct dwe_ic_dev *dev, bool enable);
+int dwe_disable_irq(struct dwe_ic_dev *dev);
+int dwe_clear_irq(struct dwe_ic_dev *dev);
+int dwe_read_irq(struct dwe_ic_dev *dev, u32 *ret);
+int dwe_start_dma_read(struct dwe_ic_dev *dev,
+				struct dwe_hw_info *info, u64 addr);
+int dwe_set_buffer(struct dwe_ic_dev *dev, struct dwe_hw_info *info, u64 addr);
+int dwe_set_lut(struct dwe_ic_dev *dev, u64 addr);
+#ifdef __KERNEL__
+int dwe_on_buf_update(struct dwe_ic_dev *dev);
+irqreturn_t dwe_hw_isr(int irq, void *data);
+void dwe_clear_interrupts(struct dwe_ic_dev *dev);
+#endif
+#endif /* _DWE_IOC_H_ */

+ 183 - 0
vvcam/dwe/dwe_isr.c

@@ -0,0 +1,183 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+# include "dwe_driver.h"
+# include "video/vvbuf.h"
+#endif
+#include "dwe_ioctl.h"
+#include "dwe_regs.h"
+
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+
+static int update_dma_buffer(struct dwe_ic_dev *dev)
+{
+	int no_dist_map_err, overflow_err;
+	int which;
+	u32 dewarp_ctrl;
+
+	dwe_enable_bus(dev, 0);
+	if (dev->dst)
+		return -EBUSY;
+	if (dev->src) {
+		vvbuf_ready(dev->sink_bctx, dev->src->pad, dev->src);
+		dev->src = NULL;
+	}
+	dev->src = vvbuf_try_dqbuf(dev->sink_bctx);
+	if (!dev->src) {
+		dev->error |= BUF_ERR_UNDERFLOW;
+		return -ENOMEM;
+	}
+	dev->error &= ~BUF_ERR_UNDERFLOW;
+	if (!dev->get_index) {
+		dev->error |= BUF_ERR_WRONGSTATE;
+		dev->src = NULL;
+		return -ENXIO;
+	}
+	dev->index = dev->get_index(dev, dev->src);
+	if (dev->index < 0 || dev->index >= MAX_DWE_NUM) {
+		dev->error |= BUF_ERR_WRONGSTATE;
+		dev->src = NULL;
+		return -ENXIO;
+	}
+	dev->error &= ~BUF_ERR_WRONGSTATE;
+	if (!(*dev->state[dev->index] & STATE_DRIVER_STARTED)) {
+		vvbuf_try_dqbuf_done(dev->sink_bctx, dev->src);
+		vvbuf_ready(dev->sink_bctx, dev->src->pad, dev->src);
+		dev->error |= BUF_ERR_UNDERFLOW;
+		dev->src = NULL;
+		return 0;
+	}
+	no_dist_map_err = BUF_ERR_NO_DIST_MAP0 << dev->index;
+	if (!dev->dist_map[dev->index]) {
+		dev->error |= no_dist_map_err;
+		dev->src = NULL;
+		return -ENOMEM;
+	}
+	dev->error &= ~no_dist_map_err;
+	overflow_err = BUF_ERR_OVERFLOW0 << dev->index;
+	dev->dst = vvbuf_try_dqbuf(dev->src_bctx[dev->index]);
+	if (!dev->dst) {
+		if (!(*dev->state[dev->index] & STATE_STREAM_STARTED)) {
+			vvbuf_try_dqbuf_done(dev->sink_bctx, dev->src);
+			vvbuf_ready(dev->sink_bctx, dev->src->pad, dev->src);
+		}
+		dev->error |= overflow_err;
+		dev->src = NULL;
+		return -ENOMEM;
+	}
+	dev->error &= ~overflow_err;
+	vvbuf_try_dqbuf_done(dev->sink_bctx, dev->src);
+	vvbuf_try_dqbuf_done(dev->src_bctx[dev->index], dev->dst);
+	which = dev->which[dev->index];
+	dwe_s_params(dev, &dev->info[dev->index][which]);
+	dwe_set_buffer(dev, &dev->info[dev->index][which], dev->dst->dma);
+	dwe_set_lut(dev, dev->dist_map[dev->index][which]);
+	dwe_start_dma_read(dev, &dev->info[dev->index][which], dev->src->dma);
+	dewarp_ctrl = dwe_read_reg(dev, DEWARP_CTRL);
+	dwe_write_reg(dev, DEWARP_CTRL, dewarp_ctrl | 2);
+	dwe_write_reg(dev, DEWARP_CTRL, dewarp_ctrl);
+	dwe_write_reg(dev, INTERRUPT_STATUS, INT_MSK_STATUS_MASK);
+	dwe_enable_bus(dev, 1);
+	return 0;
+}
+
+int dwe_on_buf_update(struct dwe_ic_dev *dev)
+{
+	int rc = 0;
+	unsigned long flags;
+
+	if (dev) {
+		spin_lock_irqsave(&dev->irqlock, flags);
+		if (dev->error)
+			rc = update_dma_buffer(dev);
+		spin_unlock_irqrestore(&dev->irqlock, flags);
+	}
+	return rc;
+}
+
+void dwe_clear_interrupts(struct dwe_ic_dev *dev)
+{
+	u32 status;
+	u32 clr;
+	status = dwe_read_reg(dev, INTERRUPT_STATUS);
+	clr = (status & 0xFF) << 24;
+	dwe_write_reg(dev, INTERRUPT_STATUS, clr);
+}
+
+irqreturn_t dwe_hw_isr(int irq, void *data)
+{
+	struct dwe_ic_dev *dev = (struct dwe_ic_dev *)data;
+	u32 status;
+	u32 clr;
+	unsigned long flags;
+
+	if (!dev)
+		return IRQ_HANDLED;
+
+	status = dwe_read_reg(dev, INTERRUPT_STATUS);
+	if (status & INT_FRAME_DONE) {
+		clr = (status & 0xFF) << 24;
+		dwe_write_reg(dev, INTERRUPT_STATUS, clr);
+		spin_lock_irqsave(&dev->irqlock, flags);
+		if (dev->dst) {
+			vvbuf_ready(dev->src_bctx[dev->index],
+					dev->dst->pad, dev->dst);
+			dev->dst = NULL;
+		}
+		update_dma_buffer(dev);
+		spin_unlock_irqrestore(&dev->irqlock, flags);
+	}
+	return IRQ_HANDLED;
+}
+
+#endif

+ 104 - 0
vvcam/dwe/dwe_regs.h

@@ -0,0 +1,104 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _DWE_REGS_H_
+#define _DWE_REGS_H_
+
+#define REGISTER_NUM 100
+#define DEWARP_REGISTER_BASE_ADDR 0x00000000
+#define DEWARP_CTRL         0x00000004
+#define SWAP_CONTROL        0x00000058
+#define VERTICAL_SPLIT_LINE 0x0000005C
+#define HORIZON_SPLIT_LINE  0x00000060
+#define SCALE_FACTOR        0x00000064
+#define ROI_START           0x00000068
+#define BOUNDRY_PIXEL       0x0000006C
+#define INTERRUPT_STATUS    0x00000070
+
+#define INT_FRAME_DONE      (1 << 0)
+#define INT_ERR_STATUS_MASK  0x000000FE
+#define INT_ERR_STATUS_SHIFT 1
+#define INT_MSK_STATUS_MASK  0x0000FF00
+#define INT_MSK_STATUS_SHIFT 8
+#define INT_FRAME_BUSY       0x00010000
+#define INT_CLR_MASK         0xFF000000
+#define BUS_CTRL             0x00000074
+#define DEWRAP_BUS_CTRL_ENABLE_MASK  (1 << 31)
+
+#define BUS_CTRL1                 0x00000078
+#define BUS_TIME_OUT_CYCLE        0x0000007C
+#define MAP_LUT_ADDR              0x00000008
+#define MAP_LUT_SIZE              0x0000000C
+#define SRC_IMG_Y_BASE            0x00000010
+#define SRC_IMG_UV_BASE           0x00000014
+#define SRC_IMG_SIZE              0x00000018
+#define SRC_IMG_STRIDE            0x0000001C
+#define MAP_LUT_ADDR2             0x00000020
+#define MAP_LUT_SIZE2             0x00000024
+#define SRC_IMG_Y_BASE2           0x00000028
+#define SRC_IMG_UV_BASE2          0x0000002C
+#define SRC_IMG_SIZE2             0x00000030
+#define SRC_IMG_STRIDE2           0x00000034
+#define DST_IMG_Y_BASE            0x00000038
+#define DST_IMG_UV_BASE           0x0000003C
+#define DST_IMG_SIZE              0x00000040
+#define DST_IMG_STRIDE            0x00000044
+#define DST_IMG_Y_BASE2           0x00000048
+#define DST_IMG_UV_BASE2          0x0000004C
+#define DST_IMG_SIZE2             0x00000050
+#define DST_IMG_STRIDE2           0x00000054
+#define DST_IMG_Y_SIZE1           0x00000080
+#define DST_IMG_UV_SIZE1          0x00000084
+#define DST_IMG_Y_SIZE2           0x00000088
+#define DST_IMG_UV_SIZE2          0x0000008C
+
+#endif /* _DWE_REGS_H_ */

+ 110 - 0
vvcam/isp/cam_device_buf_defs_common.h

@@ -0,0 +1,110 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#ifndef _CAMERA_DEVICE_BUF_DEFS_COMMON_H_
+#define _CAMERA_DEVICE_BUF_DEFS_COMMON_H_
+
+enum {
+	CAMERA_PIX_FMT_YUV422SP = 0,
+	CAMERA_PIX_FMT_YUV422I,
+	CAMERA_PIX_FMT_YUV420SP,
+	CAMERA_PIX_FMT_YUV444,
+	CAMERA_PIX_FMT_RGB888,
+	CAMERA_PIX_FMT_RGB888P,
+};
+
+
+typedef enum _ISPCORE_BUFIO_ID_ {
+	ISPCORE_BUFIO_MP        = 0,
+	ISPCORE_BUFIO_SP1       = 1,
+	ISPCORE_BUFIO_SP2       = 2,
+	ISPCORE_BUFIO_RDI       = 3, //RAW dump interface
+	ISPCORE_BUFIO_META      = 4, //meta sw delivery port
+	ISPCORE_BUFIO_WRITEMAX  = 5,
+	ISPCORE_BUFIO_READ      = 6,
+	ISPCORE_BUFIO_MAX       = 7,
+} ISPCORE_BUFIO_ID;
+
+typedef struct __BufIdentity__ {
+	uint64_t address_usr;    //address in V4l2 application space
+	uint64_t address_daemon; //address in native stack space
+	uint64_t address_kernel; //address in kernel space
+	uint32_t address_reg;    //address set to ispcore register
+	uint32_t buffer_idx;     //buffer index
+	uint32_t buff_size;      //biffer size
+	uint32_t filled;
+	void   *ctx;              //memory handle
+	int width;
+	int height;
+	int format;
+} BufIdentity;
+
+typedef struct ispcore_meta_kernel_s {
+	unsigned int data_kernel;
+} ispcore_meta_kernel_t;
+
+typedef struct ispcore_meta_kernel_dma_s {
+	unsigned int data_kernel_dma;
+} ispcore_meta_kernel_dma_t;
+
+typedef struct ispcore_meta_user_s {
+	unsigned int data_user;
+} ispcore_meta_user_t;
+
+typedef struct ispcore_meta_s {
+	ispcore_meta_kernel_t     kernel_meta;
+	ispcore_meta_kernel_dma_t kernel_meta_dma;
+	ispcore_meta_user_t       user_meta;
+} ispcore_meta_t;
+
+#endif  // _CAMERA_DEVICE_BUF_DEFS_COMMON_H_

+ 1105 - 0
vvcam/isp/ic_dev.h

@@ -0,0 +1,1105 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_DEV_H_
+#define _ISP_DEV_H_
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <errno.h>
+
+#define copy_from_user(a, b, c) isp_copy_data(a, b, c)
+#define copy_to_user(a, b, c) isp_copy_data(a, b, c)
+
+#if defined(HAL_CMODEL) || defined(HAL_ALTERA) || defined ( HAL_LIGHT_FPGA )
+#include <hal/hal_api.h>
+
+void isp_ic_set_hal(HalHandle_t hal);
+#endif
+#endif
+
+#include "isp_irq_queue.h"
+#include "isp_version.h"
+#include "vvdefs.h"
+
+#define REG_ADDR(x)  ((uint32_t)(uintptr_t)&all_regs->x)
+
+#ifdef ISP_MIV1
+#define ISP_BUF_GAP             (1024)
+#elif defined ISP_MIV2
+#define ISP_BUF_GAP             (0)
+#endif
+
+#ifdef ISP_MI_BP
+# define MI_PATH_NUM            (3)
+#else
+# define MI_PATH_NUM            (2)
+#endif
+
+struct isp_reg_t {
+	u32 offset;
+	u32 val;
+};
+
+struct ic_window {
+	u16 x;
+	u16 y;
+	u16 width;
+	u16 height;
+};
+
+struct isp_context {
+	u32 mode;
+	u32 sample_edge;
+	bool hSyncLowPolarity, vSyncLowPolarity;
+	u32 bayer_pattern;
+	u32 sub_sampling;
+	u32 seq_ccir;
+	u32 field_selection;
+	u32 input_selection;
+	u32 latency_fifo;
+	struct ic_window acqWindow;  /**< acquisition window */
+	struct ic_window ofWindow;   /**< output formatter window */
+	struct ic_window isWindow;   /**< image stabilization output window */
+	u32 bypass_mode;
+	u8 demosaic_threshold;
+	u32 stitching_mode;
+};
+
+typedef struct isp_wdr_context
+{
+    bool      enabled;
+    bool   changed;     //the wdr ctrl && reb shift does not have shandow
+                        //register,need to change after frame end irq.
+    u16    LumOffset;
+    u16    RgbOffset;
+    u16    Ym[33];
+    u8     dY[33];
+
+} isp_wdr_context_t;
+
+struct isp_digital_gain_cxt {
+	/* data */
+	bool enable;
+	u16 gain_r;
+	u16 gain_b;
+	u16 gain_gr;
+	u16 gain_gb;
+};
+
+struct isp_mi_data_path_context {
+	bool enable;
+	u32 out_mode;	   /**< output format */
+	u32 in_mode;		/**< input format */
+	u32 data_layout;	/**< layout of data */
+	u32 data_alignMode;	/**< align mode of data */
+	u32 in_width;
+	u32 in_height;
+	u32 out_width;
+	u32 out_height;
+	bool hscale;
+	bool vscale;
+	int pixelformat;
+	bool yuv_bit;
+};
+
+struct isp_dummy_hblank_cxt {
+	u8 bp, fp, w, in_hsize;
+};
+enum MIV2_PATH_ID {
+	ISP_MI_PATH_MP = 0,
+	ISP_MI_PATH_SP,
+	ISP_MI_PATH_SP2_BP,
+#ifdef ISP_MI_MCM_WR
+	ISP_MI_MCM_WR0,
+	ISP_MI_MCM_WR1,
+#endif
+	ISP_MI_PATH_PP,
+
+#ifdef ISP_MI_HDR
+	ISP_MI_HDR_L,
+	ISP_MI_HDR_S,
+	ISP_MI_HDR_VS,
+#endif
+	ISP_MI_PATH_ID_MAX
+};
+
+enum DMA_ID {
+	ISP_MI_DMA_ID_MCM_PP = 0,
+	ISP_MI_DMA_ID_HDR_L,
+	ISP_MI_DMA_ID_HDR_S,
+	ISP_MI_DMA_ID_HDR_VS,
+	ISP_MI_DMA_ID_MAX
+};
+typedef enum start_dma_path_e{
+	ISP_MI_DMA_PATH_MCM_PP = 0,
+	ISP_MI_DMA_PATH_HDR,
+	ISP_MI_DMA_PATH_MAX,
+}start_dma_path_t;
+
+struct isp_mi_context {
+	struct isp_mi_data_path_context path[ISP_MI_PATH_ID_MAX];
+	u32 burst_len;
+};
+
+struct isp_bls_context {
+	bool enabled;
+	u32 mode;
+	u16 a, b, c, d;
+};
+
+struct isp_tpg_userdefine_mode {
+	u16 total, fp, sync, bp, act;
+};
+
+struct isp_tpg_context {
+	bool enabled;
+	u32 image_type;
+	u32 frame_num;
+	u32 bayer_pattern;
+	u32 color_depth;
+	u32 resolution;
+	u16 pixleGap;
+	u16 lineGap;
+	u16 gapStandard;
+	u32 randomSeed;
+	struct isp_tpg_userdefine_mode user_mode_h, user_mode_v;
+};
+
+typedef enum mcm_fmt_e{
+	MCM_FMT_RAW8 = 0,
+	MCM_FMT_RAW10,
+	MCM_FMT_RAW12,
+	MCM_FMT_RAW14,
+	MCM_FMT_RAW16,
+	MCM_FMT_RAW20,
+	MCM_FMT_MAX,
+}mcm_fmt_t;
+
+typedef enum mcm_wr_index_e{
+	MCM_INDEX_WR0 = 0,		//write channel 0
+	MCM_INDEX_WR1,			//write channel 1
+	MCM_INDEX_G2_WR0,			//MCM_G2 writec channel 0
+	MCM_INDEX_G2_WR1,			//MCM_G2 writec channel 1
+	MCM_INDEX_WR_MAX,
+}mcm_wr_fmt_t;
+
+struct isp_mcm_context {
+	bool sensor_mem_bypass;			//0: use sensor latency memory in MCM
+	mcm_fmt_t  wr_fmt[MCM_INDEX_WR_MAX];
+	u8  bypass_switch;                  //Bypass switch 0000: sensor0 bypass  0001:sensor1 bypass .. 1111:sensor15 bypass if any
+	u16 height[MCM_INDEX_WR_MAX];
+	u16 width[MCM_INDEX_WR_MAX];
+    mcm_fmt_t  rd_fmt;
+	u32 hsync_rpeample_ext;
+
+	bool bypass_enable;
+	u32 vsync_blank;
+	u32 vsync_duration;
+	u32 hsync_blank;
+	u32 hsync_preample;
+};
+
+struct isp_mux_context {
+	u32 mp_mux;             /**< main path muxer (vi_mp_mux) */
+	u32 sp_mux;             /**< self path muxer (vi_dma_spmux) */
+	u32 chan_mode;          /**< 1-mp, 2-sp, 4-sp2 */
+	u32 ie_mux;             /**< image effects muxer (vi_dma_iemux) */
+	u32 dma_read_switch;    /**< dma read switch (vi_dma_switch) */
+	u32 if_select;          /**< interface selector (if_select) */
+};
+
+struct isp_awb_context {
+	bool enable;
+	u8 mode;
+	u16 gain_r, gain_gr, gain_gb, gain_b;
+	struct ic_window window;
+	u16 refcb_max_b;
+	u16 refcr_max_r;
+	u16 max_y;
+	u16 max_c_sum;
+	u16 min_y_max_g;
+	u16 min_c;
+};
+
+struct isp_awb_mean {
+	u32 r, g, b;
+	u32 no_white_count;
+};
+
+struct isp_cnr_context {
+	bool enable;
+	u32 line_width;
+	u32 threshold_1;
+	u32 threshold_2;
+};
+
+struct isp_cc_context {
+	u32 lCoeff[9];
+	bool update_curve;
+	bool conv_range_y_full, conv_range_c_full;
+};
+
+struct isp_xtalk_context {
+	u32 lCoeff[9];
+	u32 r, g, b;
+};
+
+struct isp_gamma_out_context {
+	bool enableWB, enableGamma;
+	bool changed;
+	u32 mode;
+	u32 curve[17];
+};
+
+#define CAEMRIC_GRAD_TBL_SIZE 8
+#define CAMERIC_DATA_TBL_SIZE 289
+#define CAMERIC_MAX_LSC_SECTORS 16
+#define CA_CURVE_DATA_TABLE_LEN 65
+
+struct isp_lsc_context {
+	/**< correction values of R color part */
+	u16 r[CAMERIC_DATA_TBL_SIZE];
+	/**< correction values of G (red lines) color part */
+	u16 gr[CAMERIC_DATA_TBL_SIZE];
+	/**< correction values of G (blue lines) color part */
+	u16 gb[CAMERIC_DATA_TBL_SIZE];
+	/**< correction values of B color part */
+	u16 b[CAMERIC_DATA_TBL_SIZE];
+	/**< multiplication factors of x direction */
+	u16 x_grad[CAEMRIC_GRAD_TBL_SIZE];
+	/**< multiplication factors of y direction */
+	u16 y_grad[CAEMRIC_GRAD_TBL_SIZE];
+	/**< sector sizes of x direction */
+	u16 x_size[CAEMRIC_GRAD_TBL_SIZE];
+	/**< sector sizes of y direction */
+	u16 y_size[CAEMRIC_GRAD_TBL_SIZE];
+};
+
+struct isp_dmoi_context {
+	bool enable;
+	uint8_t demoire_area_thr;
+	uint8_t demoire_sat_shrink;
+	uint16_t demoire_r2;
+	uint16_t demoire_r1;
+	uint8_t demoire_t2_shift;
+	uint8_t demoire_t1;
+	uint16_t demoire_edge_r2;
+	uint16_t demoire_edge_r1;
+	uint8_t demoire_edge_t2_shift;
+	uint16_t demoire_edge_t1;
+};
+
+struct isp_shap_context {
+	bool enable;
+	uint16_t sharpen_factor_black;
+	uint16_t sharpen_factor_white;
+	uint16_t sharpen_clip_black;
+	uint16_t sharpen_clip_white;
+	uint16_t sharpen_t4_shift;
+	uint16_t sharpen_t3;
+	uint8_t sharpen_t2_shift;
+	uint16_t sharpen_t1;
+	uint16_t sharpen_r3;
+	uint16_t sharpen_r2;
+	uint16_t sharpen_r1;
+};
+
+struct isp_shap_line_context {
+	bool enable;
+	uint8_t sharpen_line_shift2;
+	uint8_t sharpen_line_shift1;
+	uint16_t sharpen_line_t1;
+	uint16_t sharpen_line_strength;
+	uint16_t sharpen_line_r2;
+	uint16_t sharpen_line_r1;
+};
+
+struct isp_gfilter_context {
+	uint8_t sharpen_size;
+	uint8_t hf_filt_00;
+	uint8_t hf_filt_01;
+	uint8_t hf_filt_02;
+	uint8_t hf_filt_10;
+	uint8_t hf_filt_11;
+	uint8_t hf_filt_12;
+	uint8_t hf_filt_20;
+	uint8_t hf_filt_21;
+	uint8_t hf_filt_22;
+};
+
+struct isp_skin_context {
+	bool enable;
+	uint16_t cb_thr_max_2047;
+	uint16_t cb_thr_min_2047;
+	uint16_t cr_thr_max_2047;
+	uint16_t cr_thr_min_2047;
+	uint16_t y_thr_max_2047;
+	uint16_t y_thr_min_2047;
+};
+
+struct isp_depurple_context {
+	bool enable;
+	bool red_sat, blue_sat;
+	uint8_t depurple_sat_shrink;
+	uint8_t depurple_thr;
+};
+
+struct isp_intp_thr_cxt {
+	u16 intp_dir_thr_min;
+	u16 intp_dir_thr_max;
+};
+
+struct isp_dmsc_context {
+	bool enable;
+	uint8_t demosaic_thr;
+	uint8_t denoise_stren;
+	struct isp_intp_thr_cxt intp;
+	struct isp_dmoi_context demoire;
+	struct isp_shap_context sharpen;
+	struct isp_gfilter_context gFilter;
+	struct isp_shap_line_context sharpenLine;
+	struct isp_skin_context skin;
+	struct isp_depurple_context depurple;
+};
+
+struct isp_ge_context {
+	bool enable;
+	u16 threshold;
+	u16 h_dummy;
+};
+
+struct isp_ca_context {
+	bool enable;
+	u8 mode;
+	u16 lut_x[CA_CURVE_DATA_TABLE_LEN];
+	u16 lut_luma[CA_CURVE_DATA_TABLE_LEN];
+	u16 lut_chroma[CA_CURVE_DATA_TABLE_LEN];
+	u16 lut_shift[CA_CURVE_DATA_TABLE_LEN];
+};
+
+struct isp_buffer_context {
+	u32 type;
+	u32 path;
+	u32 addr_y, addr_cb, addr_cr;
+	u32 size_y, size_cb, size_cr;
+};
+
+struct isp_bp_buffer_context {
+	u32 addr_r;
+	u32 addr_gr;
+	u32 addr_gb;
+	u32 addr_b;
+};
+
+struct isp_dma_context {
+	u32 type;
+	u32 base;
+	u32 width;
+	u32 height;
+	u32 burst_y;
+	u32 burst_c;
+	u8  align;
+	u8 id;
+#ifdef ISP_MI_HDR
+	u8 rd_wr_str;
+#endif
+};
+
+struct isp_dpf_context {
+	bool enable;
+	u32 filter_type;
+	u32 gain_usage;
+	u32 strength_r;
+	u32 strength_g;
+	u32 strength_b;
+	u8 weight_g[6];
+	u8 weight_rb[6];
+	u16 denoise_talbe[17];
+	u32 x_scale;
+	u32 nf_gain_r;
+	u32 nf_gain_gr;
+	u32 nf_gain_gb;
+	u32 nf_gain_b;
+	bool filter_r_off;
+	bool filter_gr_off;
+	bool filter_gb_off;
+	bool filter_b_off;
+};
+
+struct isp_is_context {
+	bool enable;
+	bool update;
+	struct ic_window window;
+	u32 recenter;
+	u32 max_dx, max_dy;
+	u32 displace_x, displace_y;
+};
+
+struct isp_ee_context {
+	bool enable;
+	u8 src_strength;
+	u8 strength;
+	u8 input_sel;
+	u32 y_gain, uv_gain, edge_gain;
+};
+
+struct isp_exp_context {
+	bool enable;
+	u32 mode;
+	struct ic_window window;
+};
+
+struct isp_hist_context {
+	bool enable;
+	u32 mode;
+	u32 step_size;
+	struct ic_window window;
+	u8 weight[25];
+};
+
+struct isp_hist64_context {
+	bool enable;
+	u8 channel;
+	u32 mode;
+	u8 vStepSize;
+	u32 hStepInc;
+	u8 r_coeff, g_coeff, b_coeff;
+	u8 sample_shift;
+	u16  sample_offset;
+	u16 forced_upd_start_line;
+	bool forced_upd;
+	struct ic_window window;
+	u8 weight[25];
+};
+
+struct isp_dpcc_params {
+	u32 line_thresh;
+	u32 line_mad_fac;
+	u32 pg_fac;
+	u32 rnd_thresh;
+	u32 rg_fac;
+};
+
+struct isp_dpcc_context {
+	bool enable;
+	u32 mode;
+	u32 outmode;
+	u32 set_use;
+	u32 methods_set[3];
+	struct isp_dpcc_params params[3];
+	u32 ro_limits;
+	u32 rnd_offs;
+};
+
+struct isp_flt_context {
+	bool enable;
+	bool changed;
+	u32 denoise;
+	u32 sharpen;
+};
+
+struct isp_cac_context {
+	bool enable;
+	u32 hmode, vmode;
+	u32 ab, ar, bb, br, cb, cr;
+	u32 xns, xnf, yns, ynf;
+	u32 hstart, vstart;
+};
+
+/* degamma */
+struct isp_deg_context {
+	bool enable;
+	u8 segment[16];
+	u16 r[17];
+	u16 g[17];
+	u16 b[17];
+};
+
+struct isp_ie_context {
+	bool enable;
+	u32 mode;
+	u32 color_sel;
+	u32 color_thresh;
+	u32 sharpen_factor;
+	u32 sharpen_thresh;
+	int32_t m[9];
+	u32 tint_cr;
+	u32 tint_cb;
+	bool full_range;
+};
+
+struct isp_afm_result {
+	u32 sum_a, sum_b, sum_c;
+	u32 lum_a, lum_b, lum_c;
+};
+
+struct isp_afm_context {
+	bool enable;
+	u32 thresh;
+	struct ic_window window[3];
+	u32 pixCnt[3];
+	bool enableWinId[3];
+	u32 lum_shift;
+	u32 afm_shift;
+	u32 max_pix_cnt;
+};
+
+struct isp_vsm_result {
+	u32 x, y;
+};
+
+struct isp_vsm_context {
+	bool enable;
+	struct ic_window window;
+	u32 h_seg, v_seg;
+};
+
+#ifndef WDR3_BIN
+#define WDR3_BIN 14
+#endif
+struct isp_wdr3_context {
+	bool enable;
+	bool changed;
+	bool inited;
+	u32 strength;
+	u32 max_gain;
+	u32 global_strength;
+	u32 histogram[WDR3_BIN];
+	u32 shift[WDR3_BIN];
+	u32 invert_linear[WDR3_BIN];
+	u32 invert_curve[WDR3_BIN];
+	u32 gamma_pre[WDR3_BIN];
+	u32 gamma_up[WDR3_BIN];
+	u32 gamma_down[WDR3_BIN];
+	u32 entropy[WDR3_BIN];
+	u32 distance_weight[WDR3_BIN];
+	u32 difference_weight[WDR3_BIN];
+};
+
+#ifdef ISP_WDR_V4
+#ifndef WDR4_BIN
+#define WDR4_BIN 20
+#endif
+
+struct isp_wdr4_context {
+	bool enable;
+	bool changed;
+	bool inited;
+	u8 ratioLSVS, ratioLS;
+	u8 drc_bayer_ratio, drc_bayer_ratioLSVS;
+	u32 strength;
+	u32 high_strength;
+	u32 low_strength;
+	u32 low_gain;
+	u32 global_strength;
+	int contrast;
+	u32 flat_strength;
+	u32 flat_threshold;
+	u32 histogram[WDR4_BIN];
+	u32 shift[WDR4_BIN];
+	u32 shift0[WDR4_BIN];
+	u32 invert_linear[WDR4_BIN];
+	u32 invert_curve[WDR4_BIN];
+	u32 gamma_pre[WDR4_BIN];
+	u32 gamma_up[WDR4_BIN];
+	u32 gamma_down[WDR4_BIN];
+	u32 entropy[WDR4_BIN];
+	u32 distance_weight[WDR4_BIN];
+	u32 difference_weight[WDR4_BIN];
+    u32 smooth_invert[WDR4_BIN];
+};
+
+#endif
+#ifndef ISP_AEV2_V2
+#define AEV2_DMA_SIZE 4096
+#else
+#define AEV2_DMA_SIZE (4096 *2)
+#endif
+struct isp_exp2_context {
+	bool enable;
+	struct ic_window window;
+	/* weight; */
+	u8 r, gr, gb, b;
+	u8 input_select;   //00: degamma output, 01: awb_gain output  10: WDR3 output
+	/* write 4096/8192 EXPV2 mean value to dma by MI MP-JDP path. */
+	/* physical address, alloacte by user */
+	u64 pa;
+};
+
+#define ISP_2DNR_SIGMA_BIN 60
+struct isp_2dnr_context {
+	bool enable;
+	u32 pre_gamma;
+	u32 strength;
+	u16 sigma[ISP_2DNR_SIGMA_BIN];
+#if defined(ISP_2DNR_V2) || defined(ISP_2DNR_V4) || defined(ISP_2DNR_V5)
+	u32 sigma_sqr;
+	u32 weight;
+#endif
+#if defined(ISP_2DNR_V4) || defined(ISP_2DNR_V5)
+	u16 str_off;
+	u16 str_max;
+	u8 str_slope;
+#endif
+};
+
+struct isp_3dnr_compress_context {
+	u8 weight_up_y[2];
+	u8 weight_down[4];
+	u8 weight_up[8];
+};
+struct isp_3dnr_context {
+	bool enable;
+	bool update_bin;
+	bool enable_h, enable_v;
+	bool enable_temperal;
+	bool enable_dilate;
+	bool init;
+	u32 spacial_curve[17];
+	u32 temperal_curve[17];
+	u32 strength;
+	u16 motion_factor;
+	u16 delta_factor;
+	/* write full denoise3d reference raw image to dma by MI SP2. */
+	/* physical address, alloacte by user */
+	u64 pa;
+	u32 size;
+	struct isp_3dnr_compress_context compress;
+};
+
+struct isp_3dnr_update {
+	u32 thr_edge_h_inv;
+	u32 thr_edge_v_inv;
+	u32 thr_motion_inv;
+	u32 thr_range_s_inv;
+	u32 range_t_h;
+	u32 range_t_v;
+	u32 range_d;
+	u32 thr_range_t_inv;
+	u32 thr_delta_h_inv;
+	u32 thr_delta_v_inv;
+	u32 thr_delta_t_inv;
+};
+
+#ifdef ISP_3DNR_V3
+#define DENOISE3D_GAMMA_BIN 33
+
+struct isp_tdnr_stats {
+	u32 bg_sum;
+	u32 motion_sum;
+	u32 bg_pixel_cnt;
+	u32 motion_pixel_cnt;
+	u32 frame_avg;
+};
+
+struct isp_tdnr_curve {
+	u16 preGamma_y[DENOISE3D_GAMMA_BIN];
+	u16 invGamma_y[DENOISE3D_GAMMA_BIN];
+};
+
+struct isp_tdnr_buffer {
+    /* write full denoise3d reference raw image to dma by MI SP2. */
+	/* physical address, alloacte by user */
+	u64 pa_refer;
+	u32 size_refer;
+    u64 pa_motion;
+    u32 size_motion;
+};
+
+struct isp_tdnr_context {
+	bool enable;
+	bool enable_inv_gamma;
+	bool enable_pre_gamma;
+	bool enable_motion_erosion;
+	bool enable_motion_converage;
+	bool enable_motion_dilation;
+	bool enable_tnr;
+	bool enable_2dnr;
+	u8  strength;
+	u16 noise_level;
+	u16 noise_mean;
+	u16 noise_threshold;
+	u16 motion_mean;
+	u8  range_h;
+	u8  range_v;
+	u8  dilate_range_h;
+	u8  dilate_range_v;
+	u32 motion_inv_factor;
+	u16 update_factor;
+	u16 motion_update_factor;
+	u16 pre_motion_weight;
+	u16 motion_slope;
+	u16 motion_converage_shift;
+	u16 motion_converage_max;
+	u16 tnr_val_shift_bit;
+	u16 tnr_diff_shift_bit;
+	u16 sad_weight;
+	u16 luma_pixel_val_shift;
+	u16 luma_pixel_slope;
+	u16 luma_pixel_slope_shift;
+	u16 luma_pixel_slope_min;
+	u16 dmy_hblank;
+	u32 fn;
+	struct isp_tdnr_curve curve;
+    struct isp_tdnr_buffer buf;
+
+	u8 frames;  //skip the first frame before  clear reset.
+				//keep the 3dnr enable in register to avoid scrolling screen when repeat enable
+};
+
+#endif
+
+struct isp_hdr_context {
+	bool enable;
+	/* hdr bls */
+	u16 width;
+	u16 height;
+	u8 l_bit_dep, s_bit_dep, vs_bit_dep, ls_bit_dep;
+	u8 weight0, weight1, weight2;
+	u16 start_linear, norm_factor_mul_linear;
+	u16 start_nonlinear, norm_factor_mul_nonlinear;
+	u16 dummy_hblank, out_hblank;
+	u16 out_vblank;
+	u16 long_exp, short_exp, very_short_exp;
+	u16 bls[4];
+	u16 digal_gain[4];
+	u32 reg;
+	/* hdr awb */
+	u32 r, gr, gb, b;
+	/* hdr exp */
+	u32 compress_lut[15];
+	/* long short, very short */
+	u32 ls0, ls1, vs0, vs1;
+	u32 ext_bit;
+	u32 valid_thresh;
+	u32 offset_val;
+	u32 sat_thresh;
+	u32 combine_weight;
+};
+
+struct isp_simp_context {
+	bool enable;
+	u32 x, y;
+	u32 r, g, b;
+	u32 transparency_mode;
+	u32 ref_image;
+};
+
+struct isp_compand_curve_context {
+	bool     enable;
+	bool     update_curve;
+	uint8_t  in_bit;
+	uint8_t  out_bit;
+	uint32_t px[64];
+	uint32_t x_data[63];
+	uint32_t y_data[64];
+};
+
+struct isp_compand_bls_context {
+	uint8_t  bit_width;
+	bool     enable;
+	uint32_t a;
+	uint32_t b;
+	uint32_t c;
+	uint32_t d;
+};
+
+/* COMPAND */
+struct isp_comp_context {
+	bool enable;
+	struct isp_compand_curve_context expand;
+	struct isp_compand_bls_context   bls;
+	struct isp_compand_curve_context compress;
+};
+
+struct isp_cproc_context {
+	bool enable;
+    bool changed;
+	u32 contrast;
+	u32 brightness;
+	u32 saturation;
+	u32 hue;
+	bool y_out_full;
+	bool c_out_full;
+	bool y_in_full;
+};
+
+struct elawb_ellipse_info {
+	u32 x, y;		/* ellipse center */
+	u32 a1, a2, a3, a4;	/* ellipse axis */
+	u32 r_max_sqr;
+};
+
+struct isp_elawb_context {
+	bool enable;
+	u32 id;			/* ellipse id,  1-8,  0 means update all. */
+	struct elawb_ellipse_info info[8];
+	struct ic_window window;
+	u32 r, gr, gb, b;	/* gain */
+};
+
+struct isp_gcmono_data {
+	u8 basePara[1024];
+	u32 px[64];
+	u32 dataX[63];
+	u32 dataY[64];
+};
+
+struct isp_gcmono_context {
+	u32 enable;
+	u32 mode;
+};
+
+struct isp_rgbgamma_data {
+	u32 rgbgc_r_px[64];
+	u32 rgbgc_r_datax[63];
+	u32 rgbgc_r_datay[64];
+	u32 rgbgc_g_px[64];
+	u32 rgbgc_g_datax[63];
+	u32 rgbgc_g_datay[64];
+	u32 rgbgc_b_px[64];
+	u32 rgbgc_b_datax[63];
+	u32 rgbgc_b_datay[64];
+};
+
+struct isp_rgbgamma_context {
+	bool enable;
+};
+
+struct isp_irq_data {
+	uint32_t addr;
+	uint32_t val;
+	uint32_t nop[14];
+};
+
+struct isp_rgbir_bls_context {
+	u16 a;
+	u16 b;
+	u16 c;
+	u16 d;
+};
+
+struct isp_rgbir_rgb_gain_context {
+	u16 r;
+	u16 g;
+	u16 b;
+};
+
+struct isp_rgbir_dpcc_context {
+	u16 median_thr[4];
+	u16 avg_thr[4];
+};
+
+struct isp_rgbir_cc_context {
+	u16 mtx[3][4];
+};
+
+struct isp_rgbir_des_context {
+	u32 ir_px1, ir_py[16];
+	u32 ir_pd[16], l_pd[16];
+	u32 l_px1, l_py[16];
+};
+
+struct isp_rgbir_sharpen_context {
+	u8 sharpen_lvl, middle;
+	u16 thresh_bl0, thresh_bl1;
+	u16 thresh_sh0, thresh_sh1;
+	u8 lum_weight_min, lum_weight_kink, lum_weight_gain;
+};
+
+struct isp_rgbir_ir_dnr_context {
+	u16 ir_sigmaS;
+	u8 winweight[6];
+	u16 width, height;
+};
+struct isp_rgbir_context{
+	bool prefilt_enable, green_filt_mode, green_filt_enable;
+	u8 rgbirPattern, out_rgb_pattern, green_filt_stage1_select;
+	u8 demosaic_threshold;
+	bool part1_enable, part2_enable;
+    bool enable_ir_raw_out;
+
+	struct isp_rgbir_bls_context bls;
+	struct isp_rgbir_rgb_gain_context rgb_gain;
+	struct isp_rgbir_dpcc_context dpcc;
+	struct isp_rgbir_cc_context cc;
+	struct isp_rgbir_des_context des;
+	struct isp_rgbir_sharpen_context sharpen;
+	struct isp_rgbir_ir_dnr_context ir_dnr;
+};
+
+struct isp_crop_context {
+	bool enabled;
+	struct ic_window window;
+};
+
+#if 1 //def ISP_MI_PP_READ
+typedef struct pp_dma_line_entry_s {
+	u32 width;
+	u32 height;
+	u32 stride;
+	u32 buf_size;/**/
+	u32 data_format;
+    u16 entry_line_num;
+	u32 buf_line_num;
+    u64 buf_addr;
+} pp_dma_line_entry_t;
+
+#endif
+
+typedef struct pp_wr_line_entry_s {
+	u16 entry_line_num;
+	u16 buf_line_num;
+	u32 buf_addr;
+	u32 buf_size;
+} pp_wr_line_entry_t;
+
+struct isp_ic_dev {
+	void __iomem *base;
+	void __iomem *reset;
+	int id;
+#ifdef ISP8000NANO_V1802
+	struct regmap *mix_gpr;
+#endif
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+	struct vvbuf_ctx *bctx;
+	struct vb2_dc_buf *mi_buf[MI_PATH_NUM];
+	struct vb2_dc_buf *mi_buf_shd[MI_PATH_NUM];
+	int (*alloc)(struct isp_ic_dev *dev, struct isp_buffer_context *buf);
+	int (*free)(struct isp_ic_dev *dev, struct vb2_dc_buf *buf);
+	int *state;
+#endif
+	void (*post_event)(struct isp_ic_dev *dev, void *data, size_t size);
+
+	struct isp_context ctx;
+	struct isp_digital_gain_cxt dgain;
+	struct isp_bls_context bls;
+	struct isp_tpg_context tpg;
+	struct isp_mcm_context mcm;
+	struct isp_mux_context mux;
+	struct isp_awb_context awb;
+	struct isp_lsc_context lsc;
+	struct isp_gamma_out_context gamma_out;
+	struct isp_xtalk_context xtalk;
+	struct isp_cc_context cc;
+	struct isp_cnr_context cnr;
+	struct isp_is_context is;
+	struct isp_is_context rawis;
+	struct isp_mi_context mi;
+	struct isp_dpf_context dpf;
+	struct isp_ee_context ee;
+	struct isp_exp_context exp;
+	struct isp_hist_context hist;
+#ifdef ISP_HIST64
+	struct isp_hist64_context hist64;
+#endif
+	struct isp_dpcc_context dpcc;
+	struct isp_flt_context flt;
+	struct isp_cac_context cac;
+	struct isp_deg_context deg;
+	struct isp_ie_context ie;
+	struct isp_vsm_context vsm;
+	struct isp_afm_context afm;
+	struct isp_wdr3_context wdr3;
+	struct isp_exp2_context exp2;
+	struct isp_hdr_context hdr;
+	struct isp_exp_context hdrexp;
+	struct isp_hist_context hdrhist;
+	struct isp_2dnr_context dnr2;
+	struct isp_3dnr_context dnr3;
+
+	struct isp_comp_context comp;
+	struct isp_simp_context simp;
+	struct isp_cproc_context cproc;
+	struct isp_elawb_context elawb;
+	struct isp_gcmono_context gcmono;
+	struct isp_rgbgamma_context rgbgamma;
+	struct isp_dmsc_context demosaic;
+	struct isp_ge_context ge;
+	struct isp_ca_context ca;
+	struct isp_dummy_hblank_cxt hblank;
+    isp_wdr_context_t wdr;
+	bool streaming;
+	bool update_lsc_tbl;
+	bool update_gamma_en;
+#ifdef ISP_WDR_V4
+	struct isp_wdr4_context wdr4;
+#endif
+#ifdef ISP_3DNR_V3
+	struct isp_tdnr_context tdnr;
+#endif
+	struct isp_rgbir_context rgbir;
+	u32   isp_mis;
+#ifdef ISP_MI_PP_READ
+	pp_dma_line_entry_t pp_dma_line_entry;
+#endif
+	struct isp_crop_context  crop[ISP_MI_PATH_SP2_BP + 1];
+	pp_wr_line_entry_t pp_write;
+    isp_mis_list_t circle_list;             //The irq circle list
+    long long unsigned int frame_mark_info_addr;
+    long long unsigned int ut_phy_addr;    //for units test
+    void *ut_addr;
+    struct device *device;
+};
+
+struct isp_extmem_info {
+	u64 addr;
+	u64 size;
+};
+
+void isp_write_reg(struct isp_ic_dev *dev, u32 offset, u32 val);
+u32 isp_read_reg(struct isp_ic_dev *dev, u32 offset);
+
+#endif /* _ISP_DEV_H_ */

+ 6 - 0
vvcam/isp/insmod.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+modprobe vivid
+rmmod vivid
+rmmod viv_isp_driver.ko
+insmod viv_isp_driver.ko
+

+ 455 - 0
vvcam/isp/isp_3dnr.c

@@ -0,0 +1,455 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "isp_ioctl.h"
+#include "mrv_all_bits.h"
+
+#include "isp_types.h"
+#ifdef ISP_3DNR
+extern MrvAllRegister_t *all_regs;
+
+
+static void dnr3_hw_init(struct isp_ic_dev *dev)
+{
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 regVal = 0;
+	int i, pos;
+	/* spacial */
+	u32 update_spacial = 900;
+	u32 strength_curve_spacial = 64;
+	u32 thr_edge_v_inv = 1024;
+	u32 thr_edge_h_inv = 1024;
+	u32 thr_range_s_inv = 1024;
+	/* temperal */
+	u32 update_temperal = 1020;
+	u32 strength_curve_temperal = 64;
+	u32 range_t_h = 2;
+	u32 range_t_v = 2;
+	u32 thr_range_t_inv = 41943;
+	u32 thr_motion_inv = 1024;
+	u32 range_d = 1;
+	u32 thr_delta_h_inv = 1023;
+	u32 thr_delta_v_inv = 1023;
+	u32 thr_delta_t_inv = 1023;
+	u32 strength = dnr3->strength;
+	strength = MIN(MAX(strength, 0), 128);
+
+	if (dnr3->init) {  //for 3dnr init
+		u32 isp_denoise3d_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d_ctrl));
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_HORIZONTAL_EN,
+			dnr3->enable_h);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_VERTICAL_EN,
+			dnr3->enable_v);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_TEMPERAL_EN,
+			dnr3->enable_temperal);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_DILATE_EN,
+			dnr3->enable_dilate);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_ENABLE, dnr3->enable);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), isp_denoise3d_ctrl);
+	}
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH_CURVE_SPACIAL,
+		      strength_curve_spacial);
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_H_INV, thr_edge_h_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_h), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH_CURVE_TEMPERAL,
+		      strength_curve_temperal);
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_V_INV, thr_edge_v_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_v), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_S_INV, thr_range_s_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_s), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_H, range_t_h);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_V, range_t_v);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_INV, thr_range_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_t), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_D, range_d);
+	REG_SET_SLICE(regVal, DENOISE3D_MOTION_INV, thr_motion_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_H_INV, thr_delta_h_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_V_INV, thr_delta_v_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_T_INV, thr_delta_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv), regVal);
+	/* spacial */
+
+	for (i = 0; i < 6; i++) {
+		regVal = 0;
+		pos = i * 3;
+		if (i < 5) {
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE0,
+				      dnr3->spacial_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE1,
+				      dnr3->spacial_curve[pos + 1]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE2,
+				      dnr3->spacial_curve[pos + 2]);
+		} else {
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE1,
+				      dnr3->spacial_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE2,
+				      dnr3->spacial_curve[pos + 1]);
+		}
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_curve_s[i]), regVal);
+		regVal = 0;
+		if (i < 5) {
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE0,
+				      dnr3->temperal_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE1,
+				      dnr3->temperal_curve[pos + 1]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE2,
+				      dnr3->temperal_curve[pos + 2]);
+		} else {
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE1,
+				      dnr3->temperal_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE2,
+				      dnr3->temperal_curve[pos + 1]);
+		}
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_curve_t[i]), regVal);
+	}
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_UPDATE_SPACIAL, update_spacial);
+	REG_SET_SLICE(regVal, DENOISE3D_UPDATE_TEMPERAL, update_temperal);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), regVal);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_dummy_hblank), 0x80);
+}
+
+int isp_u_3dnr_strength(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR
+	//pr_err("Not supported 3dnr\n");
+	return -1;
+#else
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 isp_ctrl;
+	u32 isp_denoise3d_strength;
+
+    isp_denoise3d_strength = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+    REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, dnr3->strength);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), isp_denoise3d_strength);
+
+    isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+    REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	return 0;
+#endif
+}
+
+int isp_s_3dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR
+	//pr_err("Not supported 3dnr\n");
+	return -1;
+#else
+    u32 isp_denoise3d_ctrl;
+
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+
+	u32 isp_denoise3d_strength, isp_denoise3d_motion, isp_denoise3d_delta_inv;
+
+	pr_info("enter %s\n", __func__);
+	if (dnr3->update_bin) {
+		dnr3_hw_init(dev);
+	}
+
+	isp_denoise3d_motion =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+        REG_SET_SLICE(isp_denoise3d_motion, DENOISE3D_MOTION_INV, dnr3->motion_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion),
+		      isp_denoise3d_motion);
+	isp_denoise3d_delta_inv =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(isp_denoise3d_delta_inv, DENOISE3D_DELTA_T_INV, dnr3->delta_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv),
+		      isp_denoise3d_delta_inv);
+
+	isp_denoise3d_strength = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+#ifndef NR200
+	if (!dnr3->enable) {
+	    REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, 0);
+	} else {
+	    REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, dnr3->strength);
+		isp_denoise3d_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d_ctrl));
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_ENABLE, dnr3->enable);
+
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), isp_denoise3d_ctrl);
+
+	}
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), isp_denoise3d_strength);
+#else
+   isp_denoise3d_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d_ctrl));
+   REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_ENABLE, dnr3->enable);
+   isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), isp_denoise3d_ctrl);
+
+    u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+    REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+#endif
+	return 0;
+#endif
+}
+
+int isp_s_3dnr_motion(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR
+	pr_err("Not supported 3dnr\n");
+	return -1;
+#else
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 isp_denoise3d_motion;
+	u32 isp_ctrl;
+
+	isp_denoise3d_motion =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+        REG_SET_SLICE(isp_denoise3d_motion, DENOISE3D_MOTION_INV, dnr3->motion_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion),
+		      isp_denoise3d_motion);
+
+    isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+    REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+#endif
+    return 0;
+}
+
+int isp_s_3dnr_delta(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR
+	pr_err("Not supported 3dnr\n");
+	return -1;
+#else
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 isp_denoise3d_delta_inv;
+	u32 isp_ctrl;
+
+	isp_denoise3d_delta_inv =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(isp_denoise3d_delta_inv, DENOISE3D_DELTA_T_INV, dnr3->delta_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv),
+		      isp_denoise3d_delta_inv);
+
+    isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+    REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+#endif
+
+    return 0;
+}
+
+int isp_u_3dnr(struct isp_ic_dev *dev, struct isp_3dnr_update *dnr3_update)
+{
+#ifndef ISP_3DNR
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH, dev->dnr3.strength);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_edge_h));
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_H_INV,
+		      dnr3_update->thr_edge_h_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_h), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_edge_v));
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_V_INV,
+		      dnr3_update->thr_edge_v_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_v), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_range_s));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_S_INV,
+		      dnr3_update->thr_range_s_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_s), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_range_t));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_H, dnr3_update->range_t_h);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_V, dnr3_update->range_t_v);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_INV,
+		      dnr3_update->thr_range_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_t), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_D, dnr3_update->range_d);
+	REG_SET_SLICE(regVal, DENOISE3D_MOTION_INV,
+		      dnr3_update->thr_motion_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_H_INV,
+		      dnr3_update->thr_delta_h_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_V_INV,
+		      dnr3_update->thr_delta_v_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_T_INV,
+		      dnr3_update->thr_delta_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv), regVal);
+
+#ifdef NR200
+    u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+    REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+#endif
+	return 0;
+#endif
+}
+
+int isp_g_3dnr(struct isp_ic_dev *dev, u32 * avg)
+{
+	if (!dev || !avg) {
+		return -EINVAL;
+	}
+	*avg = isp_read_reg(dev, REG_ADDR(isp_denoise3d_average));
+	return 0;
+}
+
+int isp_r_3dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR
+	return -1;
+#else
+	u32 in_width, in_height;
+	u32 size, lval;
+    u32 miv2_sp2_bus_id;
+	u32 miv2_sp2_fmt;
+
+	u32 miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	u32 miv2_imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc));
+	u32 miv2_sp2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_sp2_ctrl));
+
+	//SP2_RAW_PATH_ENABLE is shadow bit, need set SP2_MI_CFG_UPD to update to shadow.
+	//So here config before set SP2_MI_CFG_UPD
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_PATH_ENABLE, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_PATH_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+
+
+#ifndef NR200
+	in_width = isp_read_reg(dev, REG_ADDR(isp_acq_h_size));
+	in_height = isp_read_reg(dev, REG_ADDR(isp_acq_v_size));
+#else
+	in_width = isp_read_reg(dev, REG_ADDR(isp_out_h_size));
+	in_height = isp_read_reg(dev, REG_ADDR(isp_out_v_size));
+#endif
+    lval = (in_width * 12 + 127)/ 128;
+
+    lval <<= 4;
+
+    size = in_height * lval;        //raw12 unaligned
+	//write reference frame config
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_base_ad_init), dev->dnr3.pa);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_size_init), size);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_offs_cnt_init), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_height), in_height);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_size), size);
+
+    miv2_sp2_bus_id = isp_read_reg(dev, REG_ADDR(miv2_sp2_bus_id));
+
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_WR_ID_EN, 1);
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_ID_EN, 1);
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_BURST_LEN, 2); //sp2 rd burst lenghth 16
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_BUS_SW_EN, 1);
+
+    isp_write_reg(dev, REG_ADDR(miv2_sp2_bus_id), miv2_sp2_bus_id);
+
+    miv2_sp2_fmt = isp_read_reg(dev, REG_ADDR(miv2_sp2_fmt));
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_BIT, 2);    //raw12
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_ALIGNED, 0); //unaligned
+
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_BIT, 2);   //raw12
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_ALIGNED, 0); //unaligned
+
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_fmt), miv2_sp2_fmt);
+
+	//read reference frame config
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_start_ad), dev->dnr3.pa);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_lval), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_size), size);
+
+
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_CFG_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_AUTO_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_MI_CFG_UPD, 1);
+
+	/* we successfully programmed a buffer to marvin, so we need
+	 * to enable updateing of base and offset registers */
+	miv2_sp2_ctrl |= (SP2_INIT_BASE_EN_MASK | SP2_INIT_OFFSET_EN_MASK);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_ctrl), miv2_sp2_ctrl);
+
+	miv2_imsc |= SP2_DMA_RAW_READY_MASK;
+	isp_write_reg(dev, REG_ADDR(miv2_imsc), miv2_imsc);
+
+	return 0;
+#endif
+}
+#endif

+ 433 - 0
vvcam/isp/isp_3dnr2.c

@@ -0,0 +1,433 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+#ifdef ISP_3DNR_V2
+
+extern MrvAllRegister_t *all_regs;
+
+static void dnr3_hw_init(struct isp_ic_dev *dev)
+{
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 regVal = 0;
+	int i, pos;
+	/* spacial */
+	u32 update_spacial = 900;
+	u32 strength_curve_spacial = 64;
+	u32 thr_edge_v_inv = 1024;
+	u32 thr_edge_h_inv = 1024;
+	u32 thr_range_s_inv = 1024;
+	/* temperal */
+	u32 update_temperal = 1020;
+	u32 strength_curve_temperal = 64;
+	u32 range_t_h = 1;
+	u32 range_t_v = 1;
+	u32 thr_range_t_inv = 1024;
+	u32 thr_motion_inv = 1024;
+	u32 range_d = 1;
+	u32 thr_delta_h_inv = 1023;
+	u32 thr_delta_v_inv = 1023;
+	u32 thr_delta_t_inv = 1023;
+	u32 strength = dnr3->strength;
+	strength = MIN(MAX(strength, 0), 128);
+
+	if (dnr3->init) {  //for 3dnr init
+		u32 isp_denoise3d_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d_ctrl));
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_READ_REF_EN, 1);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_WRITE_REF_EN, 1);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_HORIZONTAL_EN,
+		dnr3->enable_h);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_VERTICAL_EN,
+		dnr3->enable_v);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_TEMPERAL_EN,
+			dnr3->enable_temperal);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_DILATE_EN,
+			dnr3->enable_dilate);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_ENABLE, dnr3->enable);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), isp_denoise3d_ctrl);
+
+	}
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH_CURVE_SPACIAL,
+		      strength_curve_spacial);
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_H_INV, thr_edge_h_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_h), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH_CURVE_TEMPERAL,
+		      strength_curve_temperal);
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_V_INV, thr_edge_v_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_v), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_S_INV, thr_range_s_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_s), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_H, range_t_h);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_V, range_t_v);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_INV, thr_range_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_t), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_D, range_d);
+	REG_SET_SLICE(regVal, DENOISE3D_MOTION_INV, thr_motion_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_H_INV, thr_delta_h_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_V_INV, thr_delta_v_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_T_INV, thr_delta_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv), regVal);
+	/* spacial */
+
+	for (i = 0; i < 6; i++) {
+		regVal = 0;
+		pos = i * 3;
+		if (i < 5) {
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE0,
+				      dnr3->spacial_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE1,
+				      dnr3->spacial_curve[pos + 1]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE2,
+				      dnr3->spacial_curve[pos + 2]);
+		} else {
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE1,
+				      dnr3->spacial_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_SPACIAL_CURVE2,
+				      dnr3->spacial_curve[pos + 1]);
+		}
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_curve_s[i]), regVal);
+		regVal = 0;
+		if (i < 5) {
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE0,
+				      dnr3->temperal_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE1,
+				      dnr3->temperal_curve[pos + 1]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE2,
+				      dnr3->temperal_curve[pos + 2]);
+		} else {
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE1,
+				      dnr3->temperal_curve[pos + 0]);
+			REG_SET_SLICE(regVal, DENOISE3D_TEMPERAL_CURVE2,
+				      dnr3->temperal_curve[pos + 1]);
+		}
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d_curve_t[i]), regVal);
+	}
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_UPDATE_SPACIAL, update_spacial);
+	REG_SET_SLICE(regVal, DENOISE3D_UPDATE_TEMPERAL, update_temperal);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), regVal);
+}
+
+int isp_s_3dnr_cmp(struct isp_ic_dev *dev) {
+
+	struct isp_3dnr_compress_context *compress = &dev->dnr3.compress;
+
+	u32 isp_denoise3d_weight1 = 0; // isp_read_reg(dev, REG_ADDR(isp_denoise3d_weight1));
+	u32 isp_denoise3d_weight2 = 0; // isp_read_reg(dev, REG_ADDR(isp_denoise3d_weight2));
+	int i = 0;
+	for (i = 0; i < 4; i++) {
+	    isp_denoise3d_weight1 |= (compress->weight_down[i] & DENOISE3D_WEIGHT_MASK) << (3 - i) * 4;
+	}
+	REG_SET_SLICE(isp_denoise3d_weight1, DENOISE3D_WEIGHT_UP_Y0, compress->weight_up_y[0]);
+	REG_SET_SLICE(isp_denoise3d_weight1, DENOISE3D_WEIGHT_UP_Y1, compress->weight_up_y[1]);
+
+	for (i = 0; i < 8; i++) {
+	    isp_denoise3d_weight2 |= (compress->weight_up[i] & DENOISE3D_WEIGHT_MASK) << (7 - i) * 4;
+	}
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_weight1), isp_denoise3d_weight1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_weight2), isp_denoise3d_weight2);
+	return 0;
+}
+
+int isp_s_3dnr(struct isp_ic_dev *dev)
+{
+
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+
+	u32 isp_denoise3d_strength, isp_denoise3d_motion, isp_denoise3d_delta_inv;
+	u32 isp_denoise3d_ctrl;
+
+	pr_info("enter %s\n", __func__);
+	if (dnr3->update_bin) {
+		dnr3_hw_init(dev);
+    }
+
+	isp_denoise3d_strength = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+	if (!dnr3->enable) {
+	    REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, 0);
+	} else {
+	    REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, dnr3->strength);
+	}
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength),
+		      isp_denoise3d_strength);
+
+	isp_denoise3d_motion =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+        REG_SET_SLICE(isp_denoise3d_motion, DENOISE3D_MOTION_INV, dnr3->motion_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion),
+		      isp_denoise3d_motion);
+	isp_denoise3d_delta_inv =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(isp_denoise3d_delta_inv, DENOISE3D_DELTA_T_INV, dnr3->delta_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv),
+		      isp_denoise3d_delta_inv);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_dummy_hblank), 0x80);
+
+
+	isp_denoise3d_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d_ctrl));
+
+    if (dnr3->enable) {
+		isp_s_3dnr_cmp(dev);
+		REG_SET_SLICE(isp_denoise3d_ctrl, DENOISE3D_ENABLE, 1);
+    }
+
+    isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), isp_denoise3d_ctrl);
+
+
+	return 0;
+}
+
+
+int isp_s_3dnr_motion(struct isp_ic_dev *dev)
+{
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32 isp_denoise3d_motion;
+	u32 isp_ctrl;
+
+	isp_denoise3d_motion =
+		isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+	REG_SET_SLICE(isp_denoise3d_motion, DENOISE3D_MOTION_INV, dnr3->motion_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion),
+	isp_denoise3d_motion);
+
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	return 0;
+}
+
+int isp_s_3dnr_delta(struct isp_ic_dev *dev)
+{
+	struct isp_3dnr_context *dnr3 = &dev->dnr3;
+	u32  isp_denoise3d_delta_inv;
+	u32 isp_ctrl;
+
+	isp_denoise3d_delta_inv =
+		isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(isp_denoise3d_delta_inv, DENOISE3D_DELTA_T_INV, dnr3->delta_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv),
+	isp_denoise3d_delta_inv);
+
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	return 0;
+}
+
+int isp_u_3dnr(struct isp_ic_dev *dev, struct isp_3dnr_update *dnr3_update)
+{
+
+	u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+	REG_SET_SLICE(regVal, DENOISE3D_STRENGTH, dev->dnr3.strength);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_edge_h));
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_H_INV,
+		      dnr3_update->thr_edge_h_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_h), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_edge_v));
+	REG_SET_SLICE(regVal, DENOISE3D_THR_EDGE_V_INV,
+		      dnr3_update->thr_edge_v_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_edge_v), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_range_s));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_S_INV,
+		      dnr3_update->thr_range_s_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_s), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_range_t));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_H, dnr3_update->range_t_h);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_V, dnr3_update->range_t_v);
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_T_INV,
+		      dnr3_update->thr_range_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_range_t), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_motion));
+	REG_SET_SLICE(regVal, DENOISE3D_RANGE_D, dnr3_update->range_d);
+	REG_SET_SLICE(regVal, DENOISE3D_MOTION_INV,
+		      dnr3_update->thr_motion_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_motion), regVal);
+	regVal = 0;
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d_delta_inv));
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_H_INV,
+		      dnr3_update->thr_delta_h_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_V_INV,
+		      dnr3_update->thr_delta_v_inv);
+	REG_SET_SLICE(regVal, DENOISE3D_DELTA_T_INV,
+		      dnr3_update->thr_delta_t_inv);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_delta_inv), regVal);
+
+	return 0;
+}
+
+int isp_g_3dnr(struct isp_ic_dev *dev, u32 * avg)
+{
+	if (!dev || !avg) {
+		return -EINVAL;
+	}
+	*avg = isp_read_reg(dev, REG_ADDR(isp_denoise3d_average));
+	return 0;
+}
+
+int isp_u_3dnr_strength(struct isp_ic_dev *dev)
+{
+		uint32_t isp_denoise3d_strength;
+
+		isp_denoise3d_strength = isp_read_reg(dev, REG_ADDR(isp_denoise3d_strength));
+		REG_SET_SLICE(isp_denoise3d_strength, DENOISE3D_STRENGTH, dev->dnr3.strength);
+        isp_write_reg(dev, REG_ADDR(isp_denoise3d_strength), isp_denoise3d_strength);
+		return 0;
+}
+
+
+int isp_r_3dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_3DNR_V2_V1
+	return -1;
+#else
+	u32 in_width, in_height;
+	u32 size, lval;
+    u32 miv2_sp2_bus_id;
+	u32 miv2_sp2_fmt;
+
+	u32 miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	u32 miv2_imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc));
+	u32 miv2_sp2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_sp2_ctrl));
+
+	//SP2_RAW_PATH_ENABLE is shadow bit, need set SP2_MI_CFG_UPD to update to shadow.
+	//So here config before set SP2_MI_CFG_UPD
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_PATH_ENABLE, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_PATH_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+
+	in_width = isp_read_reg(dev, REG_ADDR(isp_out_h_size));
+	in_height = isp_read_reg(dev, REG_ADDR(isp_out_v_size));
+
+    lval = (in_width * 12 + 127)/ 128;
+
+    lval <<= 4;
+
+    size = in_height * lval;        //raw12 unaligned
+	//write reference frame config
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_base_ad_init), dev->dnr3.pa);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_size_init), size);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_offs_cnt_init), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_height), in_height);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_size), size);
+
+    miv2_sp2_bus_id = isp_read_reg(dev, REG_ADDR(miv2_sp2_bus_id));
+
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_WR_ID_EN, 1);
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_ID_EN, 1);
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_BURST_LEN, 2); //sp2 rd burst lenghth 16
+    REG_SET_SLICE(miv2_sp2_bus_id, SP2_BUS_SW_EN, 1);
+
+    isp_write_reg(dev, REG_ADDR(miv2_sp2_bus_id), miv2_sp2_bus_id);
+
+    miv2_sp2_fmt = isp_read_reg(dev, REG_ADDR(miv2_sp2_fmt));
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_BIT, 2);    //raw12
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_ALIGNED, 0); //unaligned
+
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_BIT, 2);   //raw12
+    REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_ALIGNED, 0); //unaligned
+
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_fmt), miv2_sp2_fmt);
+
+	//read reference frame config
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_start_ad), dev->dnr3.pa);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_lval), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_size), size);
+
+
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_CFG_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_AUTO_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_MI_CFG_UPD, 1);
+
+	/* we successfully programmed a buffer to marvin, so we need
+	 * to enable updateing of base and offset registers */
+	miv2_sp2_ctrl |= (SP2_INIT_BASE_EN_MASK | SP2_INIT_OFFSET_EN_MASK);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_ctrl), miv2_sp2_ctrl);
+
+	miv2_imsc |= SP2_DMA_RAW_READY_MASK;
+	isp_write_reg(dev, REG_ADDR(miv2_imsc), miv2_imsc);
+
+	return 0;
+#endif
+}
+#endif

+ 155 - 0
vvcam/isp/isp_compand.c

@@ -0,0 +1,155 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+
+int isp_s_comp(struct isp_ic_dev *dev)
+{
+#ifndef ISP_COMPAND
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_comp_context *comp = &dev->comp;
+	int ri, valr;
+	uint32_t x_data;
+	uint32_t y_data;
+	u32 isp_compand_ctrl = isp_read_reg(dev, REG_ADDR(isp_compand_ctrl));
+
+	/*pr_debug("enter %s\n", __func__);*/
+	if (comp->bls.enable) {
+		isp_write_reg(dev, REG_ADDR(isp_compand_bls_a_fixed), comp->bls.a << (20 - comp->bls.bit_width));
+		isp_write_reg(dev, REG_ADDR(isp_compand_bls_b_fixed), comp->bls.b << (20 - comp->bls.bit_width));
+		isp_write_reg(dev, REG_ADDR(isp_compand_bls_c_fixed), comp->bls.c << (20 - comp->bls.bit_width));
+		isp_write_reg(dev, REG_ADDR(isp_compand_bls_d_fixed), comp->bls.d << (20 - comp->bls.bit_width));
+	}
+
+	if (!comp->enable) {
+		REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_BLS_ENABLE, 0);
+		REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_COMPRESS_ENABLE, 0);
+		REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_EXPAND_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_compand_ctrl), isp_compand_ctrl);
+		return 0;
+	}
+
+	if (comp->expand.enable && comp->expand.update_curve) {
+		for (ri = 0; ri < 10; ri++) {
+			valr = (comp->expand.px[ri * 6 + 0] + (20-comp->expand.in_bit)) |
+			    ((comp->expand.px[ri * 6 + 1] + (20-comp->expand.in_bit)) << 5) |
+			    ((comp->expand.px[ri * 6 + 2] + (20-comp->expand.in_bit)) << 10) |
+			    ((comp->expand.px[ri * 6 + 3] + (20-comp->expand.in_bit)) << 15) |
+			    ((comp->expand.px[ri * 6 + 4] + (20-comp->expand.in_bit)) << 20) |
+			    ((comp->expand.px[ri * 6 + 5] + (20-comp->expand.in_bit)) << 25);
+			isp_write_reg(dev, REG_ADDR(isp_compand_expand_px_0) + ri * 4, valr);
+		}
+		valr = ( comp->expand.px[60] + (20-comp->expand.in_bit)) |
+		       ((comp->expand.px[61] + (20-comp->expand.in_bit)) << 5) |
+		       ((comp->expand.px[62] + (20-comp->expand.in_bit)) << 10) |
+		       ((comp->expand.px[63] + (20-comp->expand.in_bit)) << 15);
+		isp_write_reg(dev, REG_ADDR(isp_compand_expand_px_10), valr);
+
+		isp_write_reg(dev, REG_ADDR(isp_compand_expand_x_addr), 0x0);
+		for (ri = 0; ri < 63; ri++) {
+			x_data = (comp->expand.x_data[ri] << (20 - comp->expand.in_bit));
+			isp_write_reg(dev, REG_ADDR(isp_compand_expand_x_write_data), x_data);
+		}
+
+		isp_write_reg(dev, REG_ADDR(isp_compand_expand_y_addr), 0x0);
+		for (ri = 0; ri < 64; ri++) {
+			y_data = (comp->expand.y_data[ri] << (20 - comp->expand.out_bit));
+			isp_write_reg(dev, REG_ADDR(isp_compand_expand_y_write_data), y_data);
+		}
+
+	}
+
+	if (comp->compress.enable && comp->compress.update_curve) {
+		for (ri = 0; ri < 10; ri++) {
+			valr = comp->compress.px[ri * 6 + 0] |
+			    (comp->compress.px[ri * 6 + 1] << 5) |
+			    (comp->compress.px[ri * 6 + 2] << 10) |
+			    (comp->compress.px[ri * 6 + 3] << 15) |
+			    (comp->compress.px[ri * 6 + 4] << 20) |
+			    (comp->compress.px[ri * 6 + 5] << 25);
+			isp_write_reg(dev, REG_ADDR(isp_compand_compress_px_0) + ri * 4, valr);
+		}
+		valr = comp->compress.px[60] | (comp->compress.px[61] << 5) | (comp->compress.px[62] << 10) | (comp->compress.px[63] << 15);
+		isp_write_reg(dev, REG_ADDR(isp_compand_compress_px_10), valr);
+
+		isp_write_reg(dev, REG_ADDR(isp_compand_compress_x_addr), 0x0);
+		for (ri = 0; ri < 63; ri++) {
+			x_data = (comp->compress.x_data[ri] << (20 - comp->compress.in_bit));
+			isp_write_reg(dev, REG_ADDR(isp_compand_compress_x_write_data), x_data);
+		}
+
+		isp_write_reg(dev, REG_ADDR(isp_compand_compress_y_addr), 0x0);
+		for (ri = 0; ri < 64; ri++) {
+			y_data = (comp->compress.y_data[ri] << (20 - comp->compress.out_bit));
+			isp_write_reg(dev, REG_ADDR(isp_compand_compress_y_write_data), y_data);
+		}
+	}
+
+	REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_BLS_ENABLE, comp->bls.enable);
+	REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_COMPRESS_ENABLE, comp->compress.enable);
+	REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_EXPAND_ENABLE, comp->expand.enable);
+	REG_SET_SLICE(isp_compand_ctrl, COMPAND_CTRL_EXPAND_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_compand_ctrl), isp_compand_ctrl);
+
+	return 0;
+#endif
+}

+ 432 - 0
vvcam/isp/isp_dmsc2.c

@@ -0,0 +1,432 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+#ifdef ISP_DEMOSAIC2
+int isp_enable_dmsc(struct isp_ic_dev *dev)
+{
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+	u32 isp_dmsc_size_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_size_ctrl));
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_BYPASS, 0U);
+	REG_SET_SLICE(isp_dmsc_size_ctrl, ISP_DMSC_IMAGE_H_SIZE,
+		      isp_read_reg(dev, REG_ADDR(isp_acq_h_size)));
+	REG_SET_SLICE(isp_dmsc_size_ctrl, ISP_DMSC_IMAGE_H_BLANK, 0x039c);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_size_ctrl), isp_dmsc_size_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl_shd), isp_dmsc_ctrl);
+	return 0;
+}
+
+int isp_disable_dmsc(struct isp_ic_dev *dev)
+{
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+	isp_dmsc_ctrl = 0;	//clear fpga default bit 3 and 13 to keep the same value with cmodel.
+
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_BYPASS, 1U);
+
+	/*clear the reg default val to keep weith cmodel  */
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_fact), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_clip), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_filt2), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dpul_ctrl), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cb), 0);
+	//isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_a), 0);
+	//isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_c), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dmoi_ctrl), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dmoi_thr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_y), 0);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+	return 0;
+}
+
+int isp_set_dmsc_intp(struct isp_ic_dev *dev)
+{
+	u32 isp_dmsc_intp_thr = isp_read_reg(dev, REG_ADDR(isp_dmsc_intp_thr));
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_dmsc_intp_thr, ISP_DMSC_INTERPLATION_DIR_THR_MAX,
+		      dev->demosaic.intp.intp_dir_thr_max);
+	REG_SET_SLICE(isp_dmsc_intp_thr, ISP_DMSC_INTERPLATION_DIR_THR_MIN,
+		      dev->demosaic.intp.intp_dir_thr_min);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_intp_thr), isp_dmsc_intp_thr);
+	return 0;
+}
+
+int isp_set_dmsc_dmoi(struct isp_ic_dev *dev)
+{
+
+	struct isp_dmoi_context *pDemoire = &dev->demosaic.demoire;
+	u32 isp_dmsc_dmoi_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_dmoi_ctrl));
+	u32 isp_dmsc_dmoi_thr = isp_read_reg(dev, REG_ADDR(isp_dmsc_dmoi_thr));
+	u32 isp_dmsc_dmoi_patn_thr =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_dmoi_patn_thr));
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+
+	pr_info("enter %s\n", __func__);
+
+	if (!pDemoire->enable) {
+		REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_DEMOIRE_ENABLE, 0U);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_dmoi_ctrl, ISP_DMSC_DEMOIRE_AREA_THR,
+		      pDemoire->demoire_area_thr);
+	REG_SET_SLICE(isp_dmsc_dmoi_ctrl, ISP_DMSC_DEMOIRE_SAT_SHRINK,
+		      pDemoire->demoire_sat_shrink);
+	REG_SET_SLICE(isp_dmsc_dmoi_thr, ISP_DMSC_DEMOIRE_R2,
+		      pDemoire->demoire_r2);
+	REG_SET_SLICE(isp_dmsc_dmoi_thr, ISP_DMSC_DEMOIRE_R1,
+		      pDemoire->demoire_r1);
+	REG_SET_SLICE(isp_dmsc_dmoi_thr, ISP_DMSC_DEMOIRE_T2_SHIFT,
+		      pDemoire->demoire_t2_shift);
+	REG_SET_SLICE(isp_dmsc_dmoi_thr, ISP_DMSC_DEMOIRE_T1,
+		      pDemoire->demoire_t1);
+	REG_SET_SLICE(isp_dmsc_dmoi_patn_thr, ISP_DMSC_DEMOIRE_EDGE_R2,
+		      pDemoire->demoire_edge_r2);
+	REG_SET_SLICE(isp_dmsc_dmoi_patn_thr, ISP_DMSC_DEMOIRE_EDGE_R1,
+		      pDemoire->demoire_edge_r1);
+	REG_SET_SLICE(isp_dmsc_dmoi_patn_thr, ISP_DMSC_DEMOIRE_EDGE_T2_SHIFT,
+		      pDemoire->demoire_edge_t2_shift);
+	REG_SET_SLICE(isp_dmsc_dmoi_patn_thr, ISP_DMSC_DEMOIRE_EDGE_T1,
+		      pDemoire->demoire_edge_t1);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dmoi_ctrl), isp_dmsc_dmoi_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dmoi_thr), isp_dmsc_dmoi_thr);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dmoi_patn_thr),
+		      isp_dmsc_dmoi_patn_thr);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_DEMOIRE_ENABLE, 1U);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+	return 0;
+}
+
+int isp_set_dmsc_sharpen(struct isp_ic_dev *dev)
+{
+	struct isp_shap_context *pSharpen = &dev->demosaic.sharpen;
+	u32 isp_dmsc_shap_fact =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_fact));
+	u32 isp_dmsc_shap_clip =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_clip));
+	u32 isp_dmsc_shap_thr = isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_thr));
+	u32 isp_dmsc_shap_ratio =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_ratio));
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+
+	pr_info("enter %s\n", __func__);
+
+	if (!pSharpen->enable) {
+		REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SHARPEN_ENBALE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl_shd), isp_dmsc_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_shap_fact, ISP_DMSC_SHARPEN_FACTOR_BLACK,
+		      pSharpen->sharpen_factor_black);
+	REG_SET_SLICE(isp_dmsc_shap_fact, ISP_DMSC_SHARPEN_FACTOR_WHITE,
+		      pSharpen->sharpen_factor_white);
+	REG_SET_SLICE(isp_dmsc_shap_clip, ISP_DMSC_SHARPEN_CLIP_BLACK,
+		      pSharpen->sharpen_clip_black);
+	REG_SET_SLICE(isp_dmsc_shap_clip, ISP_DMSC_SHARPEN_CLIP_WHITE,
+		      pSharpen->sharpen_clip_white);
+	REG_SET_SLICE(isp_dmsc_shap_thr, ISP_DMSC_SHARPEN_T4_SHIFT,
+		      pSharpen->sharpen_t4_shift);
+	REG_SET_SLICE(isp_dmsc_shap_thr, ISP_DMSC_SHARPEN_T3,
+		      pSharpen->sharpen_t3);
+	REG_SET_SLICE(isp_dmsc_shap_thr, ISP_DMSC_SHARPEN_T2_SHIFT,
+		      pSharpen->sharpen_t2_shift);
+	REG_SET_SLICE(isp_dmsc_shap_thr, ISP_DMSC_SHARPEN_T1,
+		      pSharpen->sharpen_t1);
+	REG_SET_SLICE(isp_dmsc_shap_ratio, ISP_DMSC_SHARPEN_R3,
+		      pSharpen->sharpen_r3);
+	REG_SET_SLICE(isp_dmsc_shap_ratio, ISP_DMSC_SHARPEN_R2,
+		      pSharpen->sharpen_r2);
+	REG_SET_SLICE(isp_dmsc_shap_ratio, ISP_DMSC_SHARPEN_R1,
+		      pSharpen->sharpen_r1);
+
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_fact), isp_dmsc_shap_fact);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_clip), isp_dmsc_shap_clip);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_thr), isp_dmsc_shap_thr);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_ratio), isp_dmsc_shap_ratio);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SHARPEN_ENBALE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	return 0;
+}
+
+int isp_set_dmsc_gfilter(struct isp_ic_dev *dev)
+{
+	struct isp_gfilter_context *pgfilter = &dev->demosaic.gFilter;
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+	u32 isp_dmsc_shap_filt1 =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_filt1));
+	u32 isp_dmsc_shap_filt2 =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_filt2));
+	pr_info("enter %s\n", __func__);
+
+	REG_SET_SLICE(isp_dmsc_shap_filt1, ISP_DMSC_HF_FILT_00,
+		      pgfilter->hf_filt_00);
+	REG_SET_SLICE(isp_dmsc_shap_filt1, ISP_DMSC_HF_FILT_01,
+		      pgfilter->hf_filt_01);
+	REG_SET_SLICE(isp_dmsc_shap_filt1, ISP_DMSC_HF_FILT_02,
+		      pgfilter->hf_filt_02);
+	REG_SET_SLICE(isp_dmsc_shap_filt1, ISP_DMSC_HF_FILT_10,
+		      pgfilter->hf_filt_10);
+	REG_SET_SLICE(isp_dmsc_shap_filt1, ISP_DMSC_HF_FILT_11,
+		      pgfilter->hf_filt_11);
+	REG_SET_SLICE(isp_dmsc_shap_filt2, ISP_DMSC_HF_FILT_12,
+		      pgfilter->hf_filt_12);
+	REG_SET_SLICE(isp_dmsc_shap_filt2, ISP_DMSC_HF_FILT_20,
+		      pgfilter->hf_filt_20);
+	REG_SET_SLICE(isp_dmsc_shap_filt2, ISP_DMSC_HF_FILT_21,
+		      pgfilter->hf_filt_21);
+	REG_SET_SLICE(isp_dmsc_shap_filt2, ISP_DMSC_HF_FILT_22,
+		      pgfilter->hf_filt_22);
+
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_filt1), isp_dmsc_shap_filt1);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_filt2), isp_dmsc_shap_filt2);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SHARPEN_SIZE, pgfilter->sharpen_size);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	return 0;
+}
+
+int isp_set_dmsc_sharpen_line(struct isp_ic_dev *dev)
+{
+	struct isp_shap_line_context *sharpenLine = &dev->demosaic.sharpenLine;
+
+	u32 isp_dmsc_shap_line_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_line_ctrl));
+	u32 isp_dmsc_shap_line_ratio =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_shap_line_ratio));
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+
+	pr_info("enter %s\n", __func__);
+
+	if (!sharpenLine->enable) {
+		REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SHARPEN_LINE_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_shap_line_ctrl, ISP_DMSC_SHARPEN_LINE_SHIFT2,
+		      sharpenLine->sharpen_line_shift2);
+	REG_SET_SLICE(isp_dmsc_shap_line_ctrl, ISP_DMSC_SHARPEN_LINE_SHIFT1,
+		      sharpenLine->sharpen_line_shift1);
+	REG_SET_SLICE(isp_dmsc_shap_line_ctrl, ISP_DMSC_SHARPEN_LINE_T1,
+		      sharpenLine->sharpen_line_t1);
+	REG_SET_SLICE(isp_dmsc_shap_line_ctrl, ISP_DMSC_SHARPEN_LINE_STRENGTH,
+		      sharpenLine->sharpen_line_strength);
+	REG_SET_SLICE(isp_dmsc_shap_line_ratio, ISP_DMSC_SHARPEN_LINE_R2,
+		      sharpenLine->sharpen_line_r2);
+	REG_SET_SLICE(isp_dmsc_shap_line_ratio, ISP_DMSC_SHARPEN_LINE_R1,
+		      sharpenLine->sharpen_line_r1);
+
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_line_ctrl),
+		      isp_dmsc_shap_line_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_shap_line_ratio),
+		      isp_dmsc_shap_line_ratio);
+
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SHARPEN_LINE_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	return 0;
+}
+
+int isp_set_dmsc_cac(struct isp_ic_dev *dev)
+{
+	struct isp_cac_context *cac = &dev->cac;
+	u32 val = 0;
+	u32 isp_dmsc_cac_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_cac_ctrl));
+
+	pr_info("enter %s\n", __func__);
+
+	if (!cac->enable) {
+		REG_SET_SLICE(isp_dmsc_cac_ctrl, MRV_CAC_CAC_EN, 0);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_ctrl),
+			      isp_dmsc_cac_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_cac_ctrl, MRV_CAC_H_CLIP_MODE, cac->hmode);
+	REG_SET_SLICE(isp_dmsc_cac_ctrl, MRV_CAC_V_CLIP_MODE, cac->vmode);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_count_start),
+		      cac->hstart | (cac->vstart << 16));
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_a), cac->ar | (cac->ab << 16));
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_b), cac->br | (cac->bb << 16));
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_c), cac->cr | (cac->cb << 16));
+
+	REG_SET_SLICE(val, MRV_CAC_X_NS, cac->xns);
+	REG_SET_SLICE(val, MRV_CAC_X_NF, cac->xnf);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_x_norm), val);
+	val = 0;
+	REG_SET_SLICE(val, MRV_CAC_Y_NS, cac->yns);
+	REG_SET_SLICE(val, MRV_CAC_Y_NF, cac->ynf);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_y_norm), val);
+	REG_SET_SLICE(isp_dmsc_cac_ctrl, MRV_CAC_CAC_EN, 1);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_cac_ctrl), isp_dmsc_cac_ctrl);
+
+	return 0;
+}
+
+int isp_set_dmsc_depurple(struct isp_ic_dev *dev)
+{
+	struct isp_depurple_context *depurple = &dev->demosaic.depurple;
+	u32 isp_dmsc_dpul_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_dpul_ctrl));
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+
+	pr_info("enter %s\n", __func__);
+	if (!depurple->enable) {
+		REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_DEPURPLE_ENABLE, 0U);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_dpul_ctrl, ISP_DMSC_DEPURPLE_RED_SAT, depurple->red_sat);
+	REG_SET_SLICE(isp_dmsc_dpul_ctrl, ISP_DMSC_DEPURPLE_BLUE_SAT, depurple->blue_sat);
+	REG_SET_SLICE(isp_dmsc_dpul_ctrl, ISP_DMSC_DEPURPLE_SAT_SHRINK,
+		      depurple->depurple_sat_shrink);
+	REG_SET_SLICE(isp_dmsc_dpul_ctrl, ISP_DMSC_DEPURPLE_THR,
+		      depurple->depurple_thr);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_dpul_ctrl), isp_dmsc_dpul_ctrl);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_DEPURPLE_ENABLE, 1U);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	return 0;
+}
+
+int isp_set_dmsc_skin(struct isp_ic_dev *dev)
+{
+	struct isp_skin_context *skin = &dev->demosaic.skin;
+	u32 isp_dmsc_skin_thr_cb =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cb));
+	u32 isp_dmsc_skin_thr_cr =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cr));
+	u32 isp_dmsc_skin_thr_y =
+	    isp_read_reg(dev, REG_ADDR(isp_dmsc_skin_thr_y));
+
+	u32 isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+
+	pr_info("enter %s\n", __func__);
+	if (!skin->enable) {
+		REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SKIN_ENABLE, 0U);
+		isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_dmsc_skin_thr_cb, ISP_DMSC_SKIN_CB_THR_MAX_2047,
+		      skin->cb_thr_max_2047);
+	REG_SET_SLICE(isp_dmsc_skin_thr_cb, ISP_DMSC_SKIN_CB_THR_MIN_2047,
+		      skin->cb_thr_min_2047);
+	REG_SET_SLICE(isp_dmsc_skin_thr_cr, ISP_DMSC_SKIN_CR_THR_MAX_2047,
+		      skin->cr_thr_max_2047);
+	REG_SET_SLICE(isp_dmsc_skin_thr_cr, ISP_DMSC_SKIN_CR_THR_MIN_2047,
+		      skin->cr_thr_min_2047);
+	REG_SET_SLICE(isp_dmsc_skin_thr_y, ISP_DMSC_SKIN_Y_THR_MAX,
+		      skin->y_thr_max_2047);
+	REG_SET_SLICE(isp_dmsc_skin_thr_y, ISP_DMSC_SKIN_Y_THR_MIN,
+		      skin->y_thr_min_2047);
+
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cb),
+		      isp_dmsc_skin_thr_cb);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_cr),
+		      isp_dmsc_skin_thr_cr);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_skin_thr_y), isp_dmsc_skin_thr_y);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_SKIN_ENABLE, 1U);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	return 0;
+}
+
+int isp_s_dmsc(struct isp_ic_dev *dev)
+{
+	u32 isp_dmsc_ctrl;
+	/*Clear the cmodel register default value to match the fpga default value */
+	isp_disable_dmsc(dev);
+
+	isp_dmsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_dmsc_ctrl));
+	pr_info("enter %s\n", __func__);
+	if (!dev->demosaic.enable) {
+		isp_disable_dmsc(dev);
+		return 0;
+	}
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_THR,
+		      dev->demosaic.demosaic_thr);
+	REG_SET_SLICE(isp_dmsc_ctrl, ISP_DEMOSAIC_DENOISE_STRENGTH,
+		      dev->demosaic.denoise_stren);
+	isp_write_reg(dev, REG_ADDR(isp_dmsc_ctrl), isp_dmsc_ctrl);
+
+	isp_set_dmsc_intp(dev);
+	isp_set_dmsc_dmoi(dev);
+	isp_set_dmsc_skin(dev);
+	isp_enable_dmsc(dev);
+	isp_set_dmsc_depurple(dev);
+	isp_set_dmsc_sharpen_line(dev);
+	isp_set_dmsc_sharpen(dev);
+	isp_set_dmsc_gfilter(dev);
+
+	return 0;
+}
+
+#endif

+ 193 - 0
vvcam/isp/isp_dpf.c

@@ -0,0 +1,193 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#else
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+
+int isp_s_dpf(struct isp_ic_dev *dev)
+{
+	struct isp_dpf_context *dpf = &dev->dpf;
+	u32 value;
+	int i = 0;
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	u32 isp_dpf_mode = isp_read_reg(dev, REG_ADDR(isp_dpf_mode));
+
+	//pr_info("enter %s\n", __func__);
+
+	if (!dpf->enable) {
+		isp_write_reg(dev, REG_ADDR(isp_dpf_mode),
+			      isp_dpf_mode & ~MRV_DPF_DPF_ENABLE_MASK);
+		return 0;
+	}
+
+	isp_dpf_mode &=
+	    (MRV_DPF_DPF_ENABLE_MASK | MRV_DPF_NLL_SEGMENTATION_MASK);
+
+	switch (dpf->gain_usage) {
+	case IC_DPF_GAIN_USAGE_DISABLED:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 0);
+		break;
+	case IC_DPF_GAIN_USAGE_NF_GAINS:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 1);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 1);
+		break;
+	case IC_DPF_GAIN_USAGE_LSC_GAINS:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 1);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 0);
+		break;
+	case IC_DPF_GAIN_USAGE_NF_LSC_GAINS:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 1);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 1);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 1);
+		break;
+	case IC_DPF_GAIN_USAGE_AWB_GAINS:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 1);
+		break;
+	case IC_DPF_GAIN_USAGE_AWB_LSC_GAINS:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_USE_NF_GAIN, 0);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_LSC_GAIN_COMP, 1);
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_AWB_GAIN_COMP, 1);
+		break;
+	default:
+		/*pr_err("%s: unsupported gain usage\n", __func__);*/
+		break;
+	}
+
+	switch (dpf->filter_type) {
+	case IC_DPF_RB_FILTERSIZE_13x9:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_RB_FILTER_SIZE, 0U);
+		break;
+	case IC_DPF_RB_FILTERSIZE_9x9:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_RB_FILTER_SIZE, 1U);
+		break;
+	default:
+		/*pr_err
+		    ("%s: unsupported filter kernel size for red/blue pixel\n",
+		     __func__);*/
+		break;
+	}
+
+	REG_SET_SLICE(isp_dpf_mode, MRV_DPF_R_FILTER_OFF, dpf->filter_r_off);
+	REG_SET_SLICE(isp_dpf_mode, MRV_DPF_GR_FILTER_OFF, dpf->filter_gr_off);
+	REG_SET_SLICE(isp_dpf_mode, MRV_DPF_GB_FILTER_OFF, dpf->filter_gb_off);
+	REG_SET_SLICE(isp_dpf_mode, MRV_DPF_B_FILTER_OFF, dpf->filter_b_off);
+	value = 0;
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G1, dpf->weight_g[0]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G2, dpf->weight_g[1]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G3, dpf->weight_g[2]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G4, dpf->weight_g[3]);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_s_weight_g_1_4), value);
+	value = 0;
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G5, dpf->weight_g[4]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_G6, dpf->weight_g[5]);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_s_weight_g_5_6), value);
+	value = 0;
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB1, dpf->weight_rb[0]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB2, dpf->weight_rb[1]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB3, dpf->weight_rb[2]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB4, dpf->weight_rb[3]);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_s_weight_rb_1_4), value);
+	value = 0;
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB5, dpf->weight_rb[4]);
+	REG_SET_SLICE(value, MRV_DPF_S_WEIGHT_RB6, dpf->weight_rb[5]);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_s_weight_rb_5_6), value);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_nf_gain_r), dpf->nf_gain_r);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_nf_gain_gr), dpf->nf_gain_gr);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_nf_gain_gb), dpf->nf_gain_gb);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_nf_gain_b), dpf->nf_gain_b);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_strength_r),
+		      (MRV_DPF_INV_WEIGHT_R_MASK & dpf->strength_r));
+	isp_write_reg(dev, REG_ADDR(isp_dpf_strength_g),
+		      (MRV_DPF_INV_WEIGHT_G_MASK & dpf->strength_g));
+	isp_write_reg(dev, REG_ADDR(isp_dpf_strength_b),
+		      (MRV_DPF_INV_WEIGHT_B_MASK & dpf->strength_b));
+
+	for (i = 0; i < 17; i++) {
+		if (dpf->denoise_talbe[i] <= MRV_DPF_NLL_COEFF_N_MASK) {
+			isp_write_reg(dev,
+				      REG_ADDR(nlf_lookup_table_block_arr[i]),
+				      dpf->denoise_talbe[i]);
+		}
+	}
+
+	switch (dpf->x_scale) {
+	case IC_NLL_SCALE_LINEAR:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_NLL_SEGMENTATION, 0);
+		break;
+	case IC_NLL_SCALE_LOGARITHMIC:
+		REG_SET_SLICE(isp_dpf_mode, MRV_DPF_NLL_SEGMENTATION, 1);
+		break;
+	default:
+		break;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_dpf_mode), isp_dpf_mode);
+	isp_write_reg(dev, REG_ADDR(isp_dpf_mode),
+		      isp_dpf_mode | MRV_DPF_DPF_ENABLE_MASK);
+        REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+        isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	return 0;
+}

+ 186 - 0
vvcam/isp/isp_gcmono.c

@@ -0,0 +1,186 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#else
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+
+int isp_enable_gcmono(struct isp_ic_dev *dev)
+{
+#ifndef ISP_GCMONO
+	pr_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u32 isp_gcmono_ctrl = isp_read_reg(dev, REG_ADDR(isp_gcmono_ctrl));
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_gcmono_ctrl, ISP_GCMONO_CFG_DONE, 1);
+	REG_SET_SLICE(isp_gcmono_ctrl, ISP_GCMONO_SWITCH,
+		      ISP_GCMONO_SWITCH_ENABLE);
+	isp_write_reg(dev, REG_ADDR(isp_gcmono_ctrl), isp_gcmono_ctrl);
+	REG_SET_SLICE(isp_ctrl, ISP_GCMONO_MODE, dev->gcmono.mode);
+	REG_SET_SLICE(isp_ctrl, ISP_GCMONO_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	dev->gcmono.enable = true;
+	return 0;
+#endif
+}
+
+int isp_disable_gcmono(struct isp_ic_dev *dev)
+{
+#ifndef ISP_GCMONO
+	pr_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u32 isp_gcmono_ctrl = isp_read_reg(dev, REG_ADDR(isp_gcmono_ctrl));
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_gcmono_ctrl, ISP_GCMONO_SWITCH,
+		      ISP_GCMONO_SWITCH_DISABLE);
+	isp_write_reg(dev, REG_ADDR(isp_gcmono_ctrl), isp_gcmono_ctrl);
+	REG_SET_SLICE(isp_ctrl, ISP_GCMONO_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	dev->gcmono.enable = false;
+	return 0;
+#endif
+}
+
+#ifdef ISP_GCMONO
+static int isp_s_gcmonopx(struct isp_ic_dev *dev, struct isp_gcmono_data *data)
+{
+	u32 isp_gc_px_reg = REG_ADDR(isp_gcmono_px_0);
+	u32 *p_table = NULL;
+	int i;
+	u32 gc_px_data = 0;
+
+	pr_info("enter %s\n", __func__);
+	p_table = (u32 *)&data->px;
+	for (i = 0; i < 64; i++) {
+		gc_px_data |= (*(p_table + i) << (i % 6 * 5));
+		if (i % 6 == 5 || i == 63) {
+			isp_write_reg(dev, isp_gc_px_reg, gc_px_data);
+			isp_gc_px_reg += 4;
+			gc_px_data = 0;
+		}
+	}
+	return 0;
+}
+#endif
+
+#ifdef ISP_GCMONO
+static int isp_s_gcmonoWriteData(struct isp_ic_dev *dev, u32 *tblX, u32 *tblY)
+{
+	u32 isp_gc_y_data, isp_gc_x_data;
+	// u32 *p_table = NULL;
+	int i;
+	// u32 gc_px_data = 0;
+
+	pr_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(isp_gcmono_y_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_gcmono_x_addr), 0);
+	for (i = 0; i < 64; i++) {
+		isp_gc_y_data = *(tblY + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcmono_y_write_data),
+			      isp_gc_y_data);
+	}
+	for (i = 0; i < 63; i++) {
+		isp_gc_x_data = *(tblX + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcmono_x_write_data),
+			      isp_gc_x_data);
+	}
+	return 0;
+}
+#endif
+
+int isp_s_gcmono(struct isp_ic_dev *dev, struct isp_gcmono_data *data)
+{
+#ifndef ISP_GCMONO
+	pr_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u32 isp_gcmono_ctrl = isp_read_reg(dev, REG_ADDR(isp_gcmono_ctrl));
+	u32 isp_gc_para_base = 0;
+	u8 *p_table = NULL;
+	int i;
+
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_gcmono_ctrl, ISP_GCMONO_SWITCH,
+		      ISP_GCMONO_SWITCH_DISABLE);
+	REG_SET_SLICE(isp_gcmono_ctrl, ISP_GCMONO_CFG_DONE,
+		      ISP_GCMONO_CFG_DONE_SET_CURVE);
+	isp_write_reg(dev, REG_ADDR(isp_gcmono_ctrl), isp_gcmono_ctrl);
+	p_table = (u8 *)&data->basePara;
+	for (i = 0; i < 1024; i++) {
+		isp_gc_para_base |= (*(p_table + i) << (i % 4 * 8));
+		if (i % 4 == 3) {
+			isp_write_reg(dev, REG_ADDR(isp_gcmono_para_base),
+				      isp_gc_para_base);
+			isp_gc_para_base = 0;
+		}
+	}
+	isp_s_gcmonopx(dev, data);
+	isp_s_gcmonoWriteData(dev, data->dataX, data->dataY);
+	if (dev->gcmono.enable) {
+		isp_enable_gcmono(dev);
+	}
+	return 0;
+#endif
+}

+ 259 - 0
vvcam/isp/isp_hdr.c

@@ -0,0 +1,259 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+
+int isp_s_hdr(struct isp_ic_dev *dev)
+{
+	struct isp_hdr_context *hdr = &dev->hdr;
+	u32 isp_stitching_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_stitching_ctrl));
+	u32 val;
+	int i;
+
+	pr_info("enter %s\n", __func__);
+
+	val = 0;
+#if 0
+	REG_SET_SLICE(val, STITCHING_FRAME_WIDTH, hdr->width);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_width), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_FRAME_HEIGHT, hdr->height);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_height), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_L_BIT_DEPTH, hdr->l_bit_dep);
+	REG_SET_SLICE(val, STITCHING_S_BIT_DEPTH, hdr->s_bit_dep);
+	REG_SET_SLICE(val, STITCHING_VS_BIT_DEPTH, hdr->vs_bit_dep);
+	REG_SET_SLICE(val, STITCHING_LS_BIT_DEPTH, hdr->ls_bit_dep);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exposure_bit), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_COLOR_WEIGHT_0, hdr->weight0);
+	REG_SET_SLICE(val, STITCHING_COLOR_WEIGHT_1, hdr->weight1);
+	REG_SET_SLICE(val, STITCHING_COLOR_WEIGHT_2, hdr->weight2);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_color_weight), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_TRANS_RANGE_START_LINEAR,
+		      hdr->start_linear);
+	REG_SET_SLICE(val, STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_LINEAR,
+		      hdr->norm_factor_mul_linear);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_trans_range_linear), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_TRANS_RANGE_START_NONLINEAR,
+		      hdr->start_nonlinear);
+	REG_SET_SLICE(val, STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_NONLINEAR,
+		      hdr->norm_factor_mul_nonlinear);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_trans_range_nonlinear), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_DUMMY_HBLANK, hdr->dummy_hblank);
+	REG_SET_SLICE(val, STITCHING_OUT_HBLANK, hdr->out_hblank);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_out_hblank), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_OUT_VBLANK, hdr->out_vblank);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_out_vblank), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_LONG_EXPOSURE_TIME, hdr->long_exp);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_long_exposure), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_SHORT_EXPOSURE_TIME, hdr->short_exp);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_short_exposure), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_VERY_SHORT_EXPOSURE_TIME,
+		      hdr->very_short_exp);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_very_short_exposure), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_LONG_EXPOSURE_TIME, hdr->long_exp);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_long_exposure), val);
+#endif
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_RATIO_LONG_SHORT_1, hdr->ls1);
+	REG_SET_SLICE(val, STITCHING_RATIO_LONG_SHORT_0, hdr->ls0);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ratio_ls), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_RATIO_VERYSHORT_SHORT_1, hdr->vs1);
+	REG_SET_SLICE(val, STITCHING_RATIO_VERYSHORT_SHORT_0, hdr->vs0);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ratio_vs), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_SHORT_EXTEND_BIT, hdr->ext_bit);
+	REG_SET_SLICE(val, STITCHING_VERYSHORT_VALID_THRESH, hdr->valid_thresh);
+	REG_SET_SLICE(val, STITCHING_VERYSHORT_OFFSET_VAL, hdr->offset_val);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_sat_level), val);
+
+	for (i = 0; i < 5; i++) {
+		val = 0;
+		REG_SET_SLICE(val, STITCHING_COMPRESS_LUT_2,
+			      hdr->compress_lut[i * 3 + 2]);
+		REG_SET_SLICE(val, STITCHING_COMPRESS_LUT_1,
+			      hdr->compress_lut[i * 3 + 1]);
+		REG_SET_SLICE(val, STITCHING_COMPRESS_LUT_0,
+			      hdr->compress_lut[i * 3]);
+		isp_write_reg(dev,
+			      REG_ADDR(isp_stitching_compress_lut_0) + i * 4,
+			      val);
+	}
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_LONG_SAT_THRESH, hdr->sat_thresh);
+	REG_SET_SLICE(val, STITCHING_LONG_SAT_COMBINE_WEIGHT,
+		      hdr->combine_weight);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_long_sat_params), val);
+
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_COMBINE_ENABLE_BIT, 1);
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_CFG_UPD, 1);
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_COMBINATION_MODE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ctrl), 0x4c0221);
+
+	return 0;
+}
+
+int isp_s_hdr_wb(struct isp_ic_dev *dev)
+{
+	struct isp_hdr_context *hdr = &dev->hdr;
+	u32 val = 0;
+	u32 isp_stitching_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_stitching_ctrl));
+
+	pr_info("enter %s\n", __func__);
+	REG_SET_SLICE(val, STITCHING_EXP0_AWB_GAIN_GR, hdr->gr);
+	REG_SET_SLICE(val, STITCHING_EXP0_AWB_GAIN_GB, hdr->gb);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp0_awb_gain_g), val);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp1_awb_gain_g), val);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp2_awb_gain_g), val);
+
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_EXP0_AWB_GAIN_R, hdr->r);
+	REG_SET_SLICE(val, STITCHING_EXP0_AWB_GAIN_B, hdr->b);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp0_awb_gain_rb), val);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp1_awb_gain_rb), val);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_exp2_awb_gain_rb), val);
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ctrl), 0x4c0221);
+
+	return 0;
+}
+
+int isp_s_hdr_bls(struct isp_ic_dev *dev)
+{
+	struct isp_hdr_context *hdr = &dev->hdr;
+	u32 isp_stitching_ctrl =
+	    isp_read_reg(dev, REG_ADDR(isp_stitching_ctrl));
+	u32 val = 0;
+	int i;
+
+	pr_info("enter %s\n", __func__);
+
+	for (i = 0; i < 12; i++) {
+		val = 0;
+		REG_SET_SLICE(val, STITCHING_BLS_EXP_0_A, hdr->bls[i % 4]);
+		isp_write_reg(dev, REG_ADDR(isp_stitching_bls_exp_0_a) + i * 4,
+			      val);
+	}
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ctrl), 0x4c0221);
+
+	return 0;
+}
+
+int isp_enable_hdr(struct isp_ic_dev *dev)
+{
+	u32 addr, isp_stitching_ctrl;
+	u32 dpcl;
+	int val = 0;
+
+	pr_info("enter %s\n", __func__);
+	addr = REG_ADDR(isp_stitching_ctrl);
+	isp_stitching_ctrl = isp_read_reg(dev, addr);
+	REG_SET_SLICE(val, STITCHING_FRAME_WIDTH, dev->ctx.acqWindow.width);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_width), val);
+	val = 0;
+	REG_SET_SLICE(val, STITCHING_FRAME_HEIGHT, dev->ctx.acqWindow.height);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_height), val);
+
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_COMBINE_ENABLE_BIT, 0);
+	isp_write_reg(dev, addr, isp_stitching_ctrl);
+	dpcl = isp_read_reg(dev, REG_ADDR(vi_dpcl));
+	REG_SET_SLICE(dpcl, MRV_IF_SELECT, MRV_IF_SELECT_HDR);
+	isp_write_reg(dev, REG_ADDR(vi_dpcl), dpcl);
+	dev->mux.if_select = MRV_IF_SELECT_HDR;
+	return 0;
+}
+
+int isp_disable_hdr(struct isp_ic_dev *dev)
+{
+	u32 addr, isp_stitching_ctrl = 0;
+
+	pr_info("enter %s\n", __func__);
+	addr = REG_ADDR(isp_stitching_ctrl);
+	isp_stitching_ctrl = isp_read_reg(dev, addr);
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_COMBINE_ENABLE_BIT, 1);
+	isp_write_reg(dev, addr, isp_stitching_ctrl);
+	return 0;
+}

+ 3688 - 0
vvcam/isp/isp_ioctl.c

@@ -0,0 +1,3688 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+/* process public and sample isp command. for complex modules, need new files.*/
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+#include "isp_wdr.h"
+#include <linux/dma-mapping.h>
+#include <linux/dma-buf.h>
+
+#ifdef __KERNEL__
+#include <linux/regmap.h>
+#include <linux/of_reserved_mem.h>
+#endif
+
+#ifdef CONFIG_VSI_ISP_DEBUG
+#define isp_info(fmt, ...)	pr_info(fmt, ##__VA_ARGS__)
+#define isp_debug(fmt, ...)  pr_debug(fmt, ##__VA_ARGS__)
+#define isp_err(fmt, ...)  pr_err(fmt, ##__VA_ARGS__)
+#else
+#define isp_info(fmt, ...)
+#define isp_debug(fmt, ...)
+#define isp_err(fmt, ...)  pr_err(fmt, ##__VA_ARGS__)
+#endif
+
+volatile MrvAllRegister_t *all_regs = NULL;
+
+#ifndef __KERNEL__
+#define ISP_REG_SIZE 0x10000
+static HalHandle_t hal_handle;
+
+void isp_ic_set_hal(HalHandle_t hal)
+{
+	hal_handle = hal;
+}
+
+void isp_write_reg(struct isp_ic_dev *dev, u32 offset, u32 val)
+{
+	//pr_info("%s addr 0x%08x val 0x%08x\n", __func__, offset, val);
+	if (offset >= ISP_REG_SIZE)
+		return;
+	HalWriteReg(hal_handle, offset, val);
+}
+
+u32 isp_read_reg(struct isp_ic_dev *dev, u32 offset)
+{
+	if (offset >= ISP_REG_SIZE)
+		return 0;
+	return HalReadReg(hal_handle, offset);
+}
+
+long isp_copy_data(void *dst, void *src, int size)
+{
+	if (dst != src)
+		memcpy(dst, src, size);
+	return 0;
+}
+#else
+void isp_write_reg(struct isp_ic_dev *dev, u32 offset, u32 val)
+{
+//	  isp_info("%s	addr 0x%08x val 0x%08x\n", __func__, offset, val);
+	if (offset >= ISP_REG_SIZE)
+		return;
+	__raw_writel(val, dev->base + offset);
+	/*isp_info("%s  addr 0x%08x val 0x%08x\n", __func__, offset, val);*/
+}
+
+u32 isp_read_reg(struct isp_ic_dev *dev, u32 offset)
+{
+	u32 val = 0;
+
+	if (offset >= ISP_REG_SIZE)
+		return 0;
+	val = __raw_readl(dev->base + offset);
+	/*isp_info("%s	addr 0x%08x val 0x%08x\n", __func__, offset, val);*/
+	return val;
+}
+#endif
+
+int isp_reset(struct isp_ic_dev *dev)
+{
+	isp_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(vi_ircl), 0xFFFFFFBF);
+#ifdef __KERNEL__
+	mdelay(2);
+#endif
+	isp_write_reg(dev, REG_ADDR(vi_ircl), 0x0);
+	/*clear mis array*/
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), 0x0);  //clear isp_ctrl disable_isp_clk
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_enable_tpg(struct isp_ic_dev *dev)
+{
+	u32 addr, isp_tpg_ctrl;
+
+	isp_info("enter %s\n", __func__);
+	addr = REG_ADDR(isp_tpg_ctrl);
+	isp_tpg_ctrl = isp_read_reg(dev, addr);
+	//REG_SET_SLICE(isp_tpg_ctrl, TPG_FRAME_NUM, 1);//set tpg frame num
+	REG_SET_SLICE(isp_tpg_ctrl, TPG_ENABLE, 1);
+	isp_write_reg(dev, addr, isp_tpg_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_disable_tpg(struct isp_ic_dev *dev)
+{
+	u32 addr, isp_tpg_ctrl;
+
+	isp_info("enter %s\n", __func__);
+	addr = REG_ADDR(isp_tpg_ctrl);
+	isp_tpg_ctrl = isp_read_reg(dev, addr);
+	REG_SET_SLICE(isp_tpg_ctrl, TPG_ENABLE, 0);
+	isp_write_reg(dev, addr, isp_tpg_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_enable_bls(struct isp_ic_dev *dev)
+{
+#ifndef ISP_BLS
+	//isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u32 isp_bls_ctrl = isp_read_reg(dev, REG_ADDR(isp_bls_ctrl));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_bls_ctrl, MRV_BLS_BLS_ENABLE,
+		      MRV_BLS_BLS_ENABLE_PROCESS);
+	isp_write_reg(dev, REG_ADDR(isp_bls_ctrl), isp_bls_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+int isp_disable_bls(struct isp_ic_dev *dev)
+{
+#ifndef ISP_BLS
+	//isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u32 isp_bls_ctrl = isp_read_reg(dev, REG_ADDR(isp_bls_ctrl));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_bls_ctrl, MRV_BLS_BLS_ENABLE,
+		      MRV_BLS_BLS_ENABLE_BYPASS);
+	isp_write_reg(dev, REG_ADDR(isp_bls_ctrl), isp_bls_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+int isp_enable(struct isp_ic_dev *dev)
+{
+	u32 isp_ctrl, isp_imsc;
+
+	isp_info("enter %s\n", __func__);
+	isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	isp_imsc |= (MRV_ISP_IMSC_ISP_OFF_MASK | MRV_ISP_IMSC_FRAME_MASK);
+	isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_INFORM_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	/*Set lsc tbl after isp enable*/
+	if (dev->update_lsc_tbl) {
+		isp_s_lsc_tbl(dev);
+		dev->update_lsc_tbl = false;
+	}
+
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_disable(struct isp_ic_dev *dev)
+{
+	u32 isp_ctrl;
+/* #ifndef ENABLE_IRQ
+ 	u32 isp_imsc;
+ #endif*/
+
+	isp_info("enter %s\n", __func__);
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+/* #ifndef ENABLE_IRQ
+ 	isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+ 	isp_imsc |= (MRV_ISP_IMSC_ISP_OFF_MASK | MRV_ISP_IMSC_FRAME_MASK);
+ 	isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+ #endif*/
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_INFORM_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_isr), MRV_ISP_ISR_ISP_OFF_MASK);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+bool is_isp_enable(struct isp_ic_dev *dev)
+{
+//    isp_info("enter %s\n", __func__);
+    return isp_read_reg(dev, REG_ADDR(isp_ctrl)) & 0x01;
+}
+
+int isp_enable_lsc(struct isp_ic_dev *dev)
+{
+
+	u32 isp_lsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_lsc_ctrl));
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_lsc_ctrl, MRV_LSC_LSC_EN, 1U);
+	isp_write_reg(dev, REG_ADDR(isp_lsc_ctrl), isp_lsc_ctrl);
+
+	{
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_disable_lsc(struct isp_ic_dev *dev)
+{
+	u32 isp_lsc_ctrl = isp_read_reg(dev, REG_ADDR(isp_lsc_ctrl));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_lsc_ctrl, MRV_LSC_LSC_EN, 0U);
+	isp_write_reg(dev, REG_ADDR(isp_lsc_ctrl), isp_lsc_ctrl);
+
+	{
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+#if defined(__KERNEL__) && defined(ISP8000NANO_V1802)
+static int isp_gpr_input_control(struct isp_ic_dev *dev)
+{
+	struct isp_context isp_ctx = *(&dev->ctx);
+	unsigned int fmt_offset = 3;
+	unsigned int isp_dewarp_control_val;
+
+	if (dev->mix_gpr == NULL)
+		return -ENOMEM;
+
+	if (dev->id == 0)
+		fmt_offset = 3;
+	else
+		fmt_offset = 13;
+
+	regmap_read(dev->mix_gpr, 0x138, &isp_dewarp_control_val);
+	if (isp_dewarp_control_val == 0)
+		isp_dewarp_control_val = 0x8d8360;
+
+	switch (isp_ctx.input_selection) {
+	case MRV_ISP_INPUT_SELECTION_12EXT:
+		isp_dewarp_control_val &= ~(0x3f << fmt_offset);
+		isp_dewarp_control_val |= (0x2c << fmt_offset);
+		break;
+	case MRV_ISP_INPUT_SELECTION_10ZERO:
+	case MRV_ISP_INPUT_SELECTION_10MSB:
+		isp_dewarp_control_val &= ~(0x3f << fmt_offset);
+		isp_dewarp_control_val |= (0x2b << fmt_offset);
+		break;
+	case MRV_ISP_INPUT_SELECTION_8ZERO:
+	case MRV_ISP_INPUT_SELECTION_8MSB:
+		isp_dewarp_control_val &= ~(0x3f << fmt_offset);
+		isp_dewarp_control_val |= (0x2a << fmt_offset);
+		break;
+	default:
+		return 0;
+	}
+	regmap_write(dev->mix_gpr, 0x138, isp_dewarp_control_val);
+	return 0;
+}
+#endif
+
+int isp_s_input(struct isp_ic_dev *dev)
+{
+	struct isp_context isp_ctx = *(&dev->ctx);
+	u32 isp_ctrl, isp_acq_prop, isp_demosaic;
+#ifdef ISP_HDR_STITCH
+	u32 isp_stitching_ctrl;
+#endif //ISP_HDR_STITCH
+	isp_info("enter %s\n", __func__);
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_MODE, isp_ctx.mode);
+	isp_acq_prop = isp_read_reg(dev, REG_ADDR(isp_acq_prop));
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_SAMPLE_EDGE, isp_ctx.sample_edge);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_HSYNC_POL,
+		      isp_ctx.hSyncLowPolarity);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_VSYNC_POL,
+		      isp_ctx.vSyncLowPolarity);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_BAYER_PAT, isp_ctx.bayer_pattern);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_CONV_422, isp_ctx.sub_sampling);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_CCIR_SEQ, isp_ctx.seq_ccir);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_FIELD_SELECTION,
+		      isp_ctx.field_selection);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_INPUT_SELECTION,
+		      isp_ctx.input_selection);
+	REG_SET_SLICE(isp_acq_prop, MRV_ISP_LATENCY_FIFO_SELECTION,
+		      isp_ctx.latency_fifo);
+
+	isp_write_reg(dev, REG_ADDR(isp_acq_prop), isp_acq_prop);
+	isp_write_reg(dev, REG_ADDR(isp_acq_h_offs), isp_ctx.acqWindow.x);
+	isp_write_reg(dev, REG_ADDR(isp_acq_v_offs), isp_ctx.acqWindow.y);
+	isp_write_reg(dev, REG_ADDR(isp_acq_h_size), isp_ctx.acqWindow.width);
+	isp_write_reg(dev, REG_ADDR(isp_acq_v_size), isp_ctx.acqWindow.height);
+#ifdef ISP_MI_HDR
+	isp_write_reg(dev, REG_ADDR(isp_hdr_interval), 0x113);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_ret_h_blank), 0x200);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_ret_v_blank), 0x30);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_ret_h_size), isp_ctx.acqWindow.width);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_ret_v_size), isp_ctx.acqWindow.height);
+#endif
+
+	isp_write_reg(dev, REG_ADDR(isp_out_h_offs),
+		      (isp_ctx.ofWindow.x & MRV_ISP_ISP_OUT_H_OFFS_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_out_v_offs),
+		      (isp_ctx.ofWindow.y & MRV_ISP_ISP_OUT_V_OFFS_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_out_h_size),
+		      (isp_ctx.ofWindow.width & MRV_ISP_ISP_OUT_H_SIZE_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_out_v_size),
+		      (isp_ctx.ofWindow.height & MRV_ISP_ISP_OUT_V_SIZE_MASK));
+
+	isp_write_reg(dev, REG_ADDR(isp_is_h_offs),
+		      (isp_ctx.isWindow.x & MRV_IS_IS_H_OFFS_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_is_v_offs),
+		      (isp_ctx.isWindow.y & MRV_IS_IS_V_OFFS_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_is_h_size),
+		      (isp_ctx.isWindow.width & MRV_IS_IS_H_SIZE_MASK));
+	isp_write_reg(dev, REG_ADDR(isp_is_v_size),
+		      (isp_ctx.isWindow.height & MRV_IS_IS_V_SIZE_MASK));
+
+	isp_demosaic = isp_read_reg(dev, REG_ADDR(isp_demosaic));
+	REG_SET_SLICE(isp_demosaic, MRV_ISP_DEMOSAIC_BYPASS,
+		      isp_ctx.bypass_mode);
+	REG_SET_SLICE(isp_demosaic, MRV_ISP_DEMOSAIC_TH,
+		      isp_ctx.demosaic_threshold);
+	isp_write_reg(dev, REG_ADDR(isp_demosaic), isp_demosaic);
+
+#ifdef ISP_HDR_STITCH
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_width), isp_ctx.acqWindow.width);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_frame_height), isp_ctx.acqWindow.height);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_hdr_mode), isp_ctx.stitching_mode);
+	isp_stitching_ctrl = isp_read_reg(dev, REG_ADDR(isp_stitching_ctrl));
+	REG_SET_SLICE(isp_stitching_ctrl, STITCHING_BAYER_PATTERN, isp_ctx.bayer_pattern);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_ctrl), isp_stitching_ctrl);
+#endif
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+#if defined(__KERNEL__) && defined(ISP8000NANO_V1802)
+	isp_gpr_input_control(dev);
+#endif
+
+	return 0;
+}
+
+int isp_s_digital_gain(struct isp_ic_dev *dev)
+{
+	struct isp_digital_gain_cxt dgain = *(&dev->dgain);
+	u32 isp_dgain_rb = isp_read_reg(dev, REG_ADDR(isp_dgain_rb));
+	u32 isp_dgain_g = isp_read_reg(dev, REG_ADDR(isp_dgain_g));
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	if (!dgain.enable) {
+		isp_err("%s, Disable isp digital gain", __func__);
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_DIGITAL_GAIN_EN, 0U);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		return 0;
+	}
+
+	//isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_dgain_rb, ISP_DIGITAL_GAIN_R, dgain.gain_r);
+	REG_SET_SLICE(isp_dgain_rb, ISP_DIGITAL_GAIN_B, dgain.gain_b);
+
+	REG_SET_SLICE(isp_dgain_g, ISP_DIGITAL_GAIN_GR, dgain.gain_gr);
+	REG_SET_SLICE(isp_dgain_g, ISP_DIGITAL_GAIN_GB, dgain.gain_gb);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_DIGITAL_GAIN_EN, 1U);
+
+	isp_write_reg(dev, REG_ADDR(isp_dgain_rb), isp_dgain_rb);
+	isp_write_reg(dev, REG_ADDR(isp_dgain_g), isp_dgain_g);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	//isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_demosaic(struct isp_ic_dev *dev)
+{
+	struct isp_context isp_ctx = *(&dev->ctx);
+	u32 isp_demosaic;
+	isp_info("enter %s\n", __func__);
+	isp_demosaic = isp_read_reg(dev, REG_ADDR(isp_demosaic));
+	REG_SET_SLICE(isp_demosaic, MRV_ISP_DEMOSAIC_BYPASS,
+		      isp_ctx.bypass_mode);
+	REG_SET_SLICE(isp_demosaic, MRV_ISP_DEMOSAIC_TH,
+		      isp_ctx.demosaic_threshold);
+	isp_write_reg(dev, REG_ADDR(isp_demosaic), isp_demosaic);
+	isp_info("exit %s\n", __func__);
+	return 0;;
+}
+
+int isp_s_tpg(struct isp_ic_dev *dev)
+{
+	struct isp_tpg_context tpg = *(&dev->tpg);
+	u32 addr, regVal;
+
+	isp_info("enter %s\n", __func__);
+	addr = REG_ADDR(isp_tpg_ctrl);
+	regVal = isp_read_reg(dev, addr);
+	REG_SET_SLICE(regVal, TPG_IMG_NUM, tpg.image_type);
+	REG_SET_SLICE(regVal, TPG_CFA_PAT, tpg.bayer_pattern);
+	REG_SET_SLICE(regVal, TPG_COLOR_DEPTH, tpg.color_depth);
+	REG_SET_SLICE(regVal, TPG_RESOLUTION, tpg.resolution);
+	REG_SET_SLICE(regVal, TPG_FRAME_NUM, tpg.frame_num);
+	isp_write_reg(dev, addr, regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_PIX_GAP_IN, tpg.pixleGap);
+	REG_SET_SLICE(regVal, TPG_LINE_GAP_IN, tpg.lineGap);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_gap_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_PIX_GAP_STD_IN, tpg.gapStandard);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_gap_std_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_RANDOM_SEED, tpg.randomSeed);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_random_seed), regVal);
+	REG_SET_SLICE(regVal, TPG_HTOTAL_IN, tpg.user_mode_h.total);
+	REG_SET_SLICE(regVal, TPG_VTOTAL_IN, tpg.user_mode_v.total);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_total_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_HACT_IN, tpg.user_mode_h.act);
+	REG_SET_SLICE(regVal, TPG_VACT_IN, tpg.user_mode_v.act);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_act_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_FP_H_IN, tpg.user_mode_h.fp);
+	REG_SET_SLICE(regVal, TPG_FP_V_IN, tpg.user_mode_v.fp);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_fp_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_BP_H_IN, tpg.user_mode_h.bp);
+	REG_SET_SLICE(regVal, TPG_BP_V_IN, tpg.user_mode_v.bp);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_bp_in), regVal);
+	regVal = 0;
+	REG_SET_SLICE(regVal, TPG_HS_W_IN, tpg.user_mode_h.sync);
+	REG_SET_SLICE(regVal, TPG_VS_W_IN, tpg.user_mode_v.sync);
+	isp_write_reg(dev, REG_ADDR(isp_tpg_w_in), regVal);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_mcm_wr(struct isp_ic_dev *dev)
+{
+	struct isp_mcm_context *mcm = &dev->mcm;
+	u32 mcm_ctrl;
+	u32 mcm_hsync_preample_ext;
+	u32 mcm_size, mcm_rd_fmt;
+	int i;
+	isp_info("enter %s\n", __func__);
+
+	mcm_ctrl = isp_read_reg(dev, REG_ADDR(mcm_ctrl));
+	mcm_rd_fmt = isp_read_reg(dev, REG_ADDR(mcm_rd_cfg));
+	mcm_hsync_preample_ext =  isp_read_reg(dev, REG_ADDR(mcm_hsync_preample_ext));
+
+	REG_SET_SLICE(mcm_ctrl, MCM_BYPASS_SWITCH, mcm->bypass_switch);
+	REG_SET_SLICE(mcm_ctrl, MCM_WR0_FMT, mcm->wr_fmt[MCM_INDEX_WR0]);
+	REG_SET_SLICE(mcm_ctrl, MCM_WR1_FMT, mcm->wr_fmt[MCM_INDEX_WR1]);
+	REG_SET_SLICE(mcm_ctrl, MCM_G2_WR0_FMT, mcm->wr_fmt[MCM_INDEX_G2_WR0]);
+	REG_SET_SLICE(mcm_ctrl, MCM_G2_WR1_FMT, mcm->wr_fmt[MCM_INDEX_G2_WR1]);
+	REG_SET_SLICE(mcm_ctrl, MCM_SENSOR_MEM_BYPASS, mcm->sensor_mem_bypass);
+
+	REG_SET_SLICE(mcm_rd_fmt, MCM_RD_FMT, mcm->rd_fmt);
+	REG_SET_SLICE(mcm_hsync_preample_ext, MCM_HSYNC_PREAMPLE_EXT, mcm->hsync_rpeample_ext);
+
+	for (i = MCM_INDEX_WR0 ; i < MCM_INDEX_WR_MAX; i++){
+		REG_SET_SLICE(mcm_size, MCM_HEIGHT0, mcm->height[i]);
+		REG_SET_SLICE(mcm_size, MCM_WIDTH0, mcm->width[i]);
+		isp_write_reg(dev, REG_ADDR(mcm_size0) + i *4, mcm_size);
+	}
+	isp_write_reg(dev, REG_ADDR(mcm_hsync_preample_ext), mcm_hsync_preample_ext);
+	isp_write_reg(dev, REG_ADDR(mcm_rd_cfg), mcm_rd_fmt);
+	isp_write_reg(dev, REG_ADDR(mcm_ctrl), mcm_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+int isp_bypass_mcm(struct isp_ic_dev *dev)
+{
+	struct isp_mcm_context *mcm = &dev->mcm;
+	u32 mcm_ctrl;
+	u32 mcm_retiming0;
+	u32 mcm_retiming1;
+	u32 mcm_wr_retiming0;
+	u32 mcm_wr_retiming1;
+
+	isp_info("enter %s\n", __func__);
+	mcm_ctrl = isp_read_reg(dev, REG_ADDR(mcm_ctrl));
+	mcm_retiming0 = isp_read_reg(dev, REG_ADDR(mcm_retiming0));
+	mcm_retiming1 = isp_read_reg(dev, REG_ADDR(mcm_retiming1));
+
+	mcm_wr_retiming0 = isp_read_reg(dev, REG_ADDR(mcm_wr_retiming0));
+	mcm_wr_retiming1 = isp_read_reg(dev, REG_ADDR(mcm_wr_retiming1));
+
+	if (mcm->bypass_enable) {
+		REG_SET_SLICE(mcm_ctrl, MCM_BYPASS_EN, 1);
+	} else {
+		REG_SET_SLICE(mcm_ctrl, MCM_BYPASS_EN, 0);
+	}
+
+	REG_SET_SLICE(mcm_retiming0, MCM_VSYNC_DURATION, mcm->vsync_duration);
+	REG_SET_SLICE(mcm_retiming0, MCM_VSYNC_BLANK, mcm->vsync_blank);
+	REG_SET_SLICE(mcm_retiming1, MCM_HSYNC_PREAMPLE, mcm->hsync_preample);
+	REG_SET_SLICE(mcm_retiming1, MCM_HSYNC_BLANK, mcm->hsync_blank);
+
+	REG_SET_SLICE(mcm_wr_retiming0, MCM_VSYNC_DURATION, mcm->vsync_duration);
+	REG_SET_SLICE(mcm_wr_retiming0, MCM_VSYNC_BLANK, mcm->vsync_blank);
+	REG_SET_SLICE(mcm_wr_retiming1, MCM_HSYNC_PREAMPLE, mcm->hsync_preample);
+	REG_SET_SLICE(mcm_wr_retiming1, MCM_HSYNC_BLANK, mcm->hsync_blank);
+
+	isp_write_reg(dev, REG_ADDR(mcm_ctrl), mcm_ctrl);
+	isp_write_reg(dev, REG_ADDR(mcm_retiming0), mcm_retiming0); // 0x01042801);//
+	isp_write_reg(dev, REG_ADDR(mcm_retiming1), mcm_retiming1); //0x00008478); //
+	isp_write_reg(dev, REG_ADDR(mcm_wr_retiming0), mcm_wr_retiming0); //0x01042801); //
+	isp_write_reg(dev, REG_ADDR(mcm_wr_retiming1), mcm_wr_retiming1);  //0x000084ec);//
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_mux(struct isp_ic_dev *dev)
+{
+	struct isp_mux_context mux = *(&dev->mux);
+	u32 vi_dpcl;
+
+	isp_info("enter %s\n", __func__);
+	vi_dpcl = isp_read_reg(dev, REG_ADDR(vi_dpcl));
+	REG_SET_SLICE(vi_dpcl, MRV_VI_MP_MUX, mux.mp_mux);
+	REG_SET_SLICE(vi_dpcl, MRV_VI_DMA_SPMUX, mux.sp_mux);
+	REG_SET_SLICE(vi_dpcl, MRV_VI_CHAN_MODE, mux.chan_mode);
+	REG_SET_SLICE(vi_dpcl, MRV_VI_DMA_IEMUX, mux.ie_mux);
+	REG_SET_SLICE(vi_dpcl, MRV_VI_DMA_SWITCH, mux.dma_read_switch);
+	REG_SET_SLICE(vi_dpcl, MRV_IF_SELECT, mux.if_select);
+	isp_write_reg(dev, REG_ADDR(vi_dpcl), vi_dpcl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_bls(struct isp_ic_dev *dev)
+{
+#ifndef ISP_BLS
+	//isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_bls_context bls = *(&dev->bls);
+	u32 isp_bls_ctrl = isp_read_reg(dev, REG_ADDR(isp_bls_ctrl));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_bls_ctrl, MRV_BLS_BLS_MODE, bls.mode);
+	isp_write_reg(dev, REG_ADDR(isp_bls_ctrl), isp_bls_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_bls_a_fixed), bls.a);
+	isp_write_reg(dev, REG_ADDR(isp_bls_b_fixed), bls.b);
+	isp_write_reg(dev, REG_ADDR(isp_bls_c_fixed), bls.c);
+	isp_write_reg(dev, REG_ADDR(isp_bls_d_fixed), bls.d);
+	return 0;
+#endif
+}
+
+int isp_enable_awb(struct isp_ic_dev *dev)
+{
+	u32 isp_awb_prop = isp_read_reg(dev, REG_ADDR(isp_awb_prop));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MODE, MRV_ISP_AWB_MODE_MEAS);
+	isp_write_reg(dev, REG_ADDR(isp_awb_prop), isp_awb_prop);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_AWB_DONE_MASK);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_disable_awb(struct isp_ic_dev *dev)
+{
+	u32 isp_awb_prop = isp_read_reg(dev, REG_ADDR(isp_awb_prop));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MODE, MRV_ISP_AWB_MODE_NOMEAS);
+	isp_write_reg(dev, REG_ADDR(isp_awb_prop), isp_awb_prop);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc & ~MRV_ISP_IMSC_AWB_DONE_MASK);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_awb(struct isp_ic_dev *dev)
+{
+	struct isp_awb_context awb = *(&dev->awb);
+	u32 gain_data = 0;
+	u32 isp_awb_thresh = 0;
+	u32 isp_awb_ref = 0;
+	u32 isp_awb_prop = 0;
+
+	/* isp_info("enter %s\n", __func__); */
+	isp_awb_prop = isp_read_reg(dev, REG_ADDR(isp_awb_prop));
+
+	if (awb.mode == MRV_ISP_AWB_MEAS_MODE_YCBCR) {
+		REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MEAS_MODE,
+			      MRV_ISP_AWB_MEAS_MODE_YCBCR);
+		if (awb.max_y == 0) {
+			REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MAX_EN,
+				      MRV_ISP_AWB_MAX_EN_DISABLE);
+		} else {
+			REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MAX_EN,
+				      MRV_ISP_AWB_MAX_EN_ENABLE);
+		}
+	} else if (awb.mode == MRV_ISP_AWB_MEAS_MODE_RGB) {
+		REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MAX_EN,
+			      MRV_ISP_AWB_MAX_EN_DISABLE);
+		REG_SET_SLICE(isp_awb_prop, MRV_ISP_AWB_MEAS_MODE,
+			      MRV_ISP_AWB_MEAS_MODE_RGB);
+	}
+	isp_write_reg(dev, REG_ADDR(isp_awb_prop), isp_awb_prop);
+
+	REG_SET_SLICE(isp_awb_thresh, MRV_ISP_AWB_MAX_Y, awb.max_y);
+	REG_SET_SLICE(isp_awb_thresh, MRV_ISP_AWB_MIN_Y__MAX_G,
+		      awb.min_y_max_g);
+	REG_SET_SLICE(isp_awb_thresh, MRV_ISP_AWB_MAX_CSUM, awb.max_c_sum);
+	REG_SET_SLICE(isp_awb_thresh, MRV_ISP_AWB_MIN_C, awb.min_c);
+	isp_write_reg(dev, REG_ADDR(isp_awb_thresh), isp_awb_thresh);
+
+	REG_SET_SLICE(isp_awb_ref, MRV_ISP_AWB_REF_CR__MAX_R, awb.refcr_max_r);
+	REG_SET_SLICE(isp_awb_ref, MRV_ISP_AWB_REF_CB__MAX_B, awb.refcb_max_b);
+	isp_write_reg(dev, REG_ADDR(isp_awb_ref), isp_awb_ref);
+	isp_write_reg(dev, REG_ADDR(isp_awb_frames), 0);
+	isp_write_reg(dev, REG_ADDR(isp_awb_h_offs),
+		      (MRV_ISP_AWB_H_OFFS_MASK & awb.window.x));
+	isp_write_reg(dev, REG_ADDR(isp_awb_v_offs),
+		      (MRV_ISP_AWB_V_OFFS_MASK & awb.window.y));
+	isp_write_reg(dev, REG_ADDR(isp_awb_h_size),
+		      (MRV_ISP_AWB_H_SIZE_MASK & awb.window.width));
+	isp_write_reg(dev, REG_ADDR(isp_awb_v_size),
+		      (MRV_ISP_AWB_V_SIZE_MASK & awb.window.height));
+
+	gain_data = 0UL;
+#ifdef ISP_AWB_0410   //This is Gain value component  4 bit int part and 10 bit fractional part
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_R, awb.gain_r << 2);
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_B, awb.gain_b << 2) ;
+#else           //This is Gain value component  2 bit int part and 8 bit fractional part
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_R, awb.gain_r);
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_B, awb.gain_b);
+#endif
+	isp_write_reg(dev, REG_ADDR(isp_awb_gain_rb), gain_data);
+
+	gain_data = 0UL;
+#ifdef ISP_AWB_0410   //This is Gain value component  4 bit int part and 10 bit fractional part
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_GR, awb.gain_gr << 2);
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_GB, awb.gain_gb << 2);
+#else           //This is Gain value component  2 bit int part and 8 bit fractional part
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_GR, awb.gain_gr);
+	REG_SET_SLICE(gain_data, MRV_ISP_AWB_GAIN_GB, awb.gain_gb);
+#endif
+
+	isp_write_reg(dev, REG_ADDR(isp_awb_gain_g), gain_data);
+	return 0;
+}
+
+int isp_s_is(struct isp_ic_dev *dev)
+{
+	struct isp_is_context is = *(&dev->is);
+	u32 isp_is_ctrl;
+	u32 isp_is_displace;
+	u32 isp_ctrl;
+
+	isp_info("enter %s\n", __func__);
+
+	isp_is_ctrl = isp_read_reg(dev, REG_ADDR(isp_is_ctrl));
+
+	if (!is.enable) {
+		REG_SET_SLICE(isp_is_ctrl, MRV_IS_IS_EN, 0);
+		isp_write_reg(dev, REG_ADDR(isp_is_ctrl), isp_is_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_is_ctrl, MRV_IS_IS_EN, 1);
+	isp_write_reg(dev, REG_ADDR(isp_is_h_offs), is.window.x);
+	isp_write_reg(dev, REG_ADDR(isp_is_v_offs), is.window.y);
+	isp_write_reg(dev, REG_ADDR(isp_is_h_size), is.window.width);
+	isp_write_reg(dev, REG_ADDR(isp_is_v_size), is.window.height);
+	isp_write_reg(dev, REG_ADDR(isp_is_recenter),
+		      is.recenter & MRV_IS_IS_RECENTER_MASK);
+	isp_write_reg(dev, REG_ADDR(isp_is_max_dx), is.max_dx);
+	isp_write_reg(dev, REG_ADDR(isp_is_max_dy), is.max_dy);
+	isp_is_displace = isp_read_reg(dev, REG_ADDR(isp_is_displace));
+	REG_SET_SLICE(isp_is_displace, MRV_IS_DX, is.displace_x);
+	REG_SET_SLICE(isp_is_displace, MRV_IS_DY, is.displace_y);
+	isp_write_reg(dev, REG_ADDR(isp_is_displace), isp_is_displace);
+	isp_write_reg(dev, REG_ADDR(isp_is_ctrl), isp_is_ctrl);
+	if (is.update) {
+		isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		is.update = false;
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_raw_is(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RAWIS
+	//isp_err("unsupported funciton: %s\n", __func__);
+	return -EINVAL;
+#else
+	struct isp_is_context rawis = *(&dev->rawis);
+	u32 isp_raw_is_ctrl;
+	u32 isp_raw_is_displace;
+	// u32 isp_ctrl;
+
+	isp_info("enter %s\n", __func__);
+
+	isp_raw_is_ctrl = isp_read_reg(dev, REG_ADDR(isp_raw_is_ctrl));
+
+	if (!rawis.enable) {
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_h_size),
+			      rawis.window.width);
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_v_size),
+			      rawis.window.height);
+
+		REG_SET_SLICE(isp_raw_is_ctrl, MRV_ISP_RAW_IS_EN, 0);
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_ctrl), isp_raw_is_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_raw_is_ctrl, MRV_ISP_RAW_IS_EN, 1);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_h_offs), rawis.window.x);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_v_offs), rawis.window.y);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_h_size), rawis.window.width);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_v_size), rawis.window.height);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_recenter),
+		      rawis.recenter & MRV_IS_IS_RECENTER_MASK);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_max_dx), rawis.max_dx);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_max_dy), rawis.max_dy);
+	isp_raw_is_displace = isp_read_reg(dev, REG_ADDR(isp_raw_is_displace));
+	REG_SET_SLICE(isp_raw_is_displace, MRV_ISP_RAW_IS_DX, rawis.displace_x);
+	REG_SET_SLICE(isp_raw_is_displace, MRV_ISP_RAW_IS_DY, rawis.displace_y);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_displace), isp_raw_is_displace);
+	isp_write_reg(dev, REG_ADDR(isp_raw_is_ctrl), isp_raw_is_ctrl);
+	/*dont update the configuration at the sub module function*/
+#if 0
+	if (rawis.update) {
+		isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_CFG_UPD, 1);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		rawis.update = false;
+	}
+#endif
+	return 0;
+#endif
+}
+
+int isp_s_cnr(struct isp_ic_dev *dev)
+{
+	struct isp_cnr_context *cnr = &dev->cnr;
+	u32 isp_ctrl;
+
+	isp_info("enter %s\n", __func__);
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	if (!cnr->enable) {
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_CNR_EN, 0);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_CNR_EN, 1);
+	isp_write_reg(dev, REG_ADDR(isp_cnr_linesize), cnr->line_width);
+	isp_write_reg(dev, REG_ADDR(isp_cnr_threshold_c1), cnr->threshold_1);
+	isp_write_reg(dev, REG_ADDR(isp_cnr_threshold_c2), cnr->threshold_2);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+void isp_test_bt(struct isp_ic_dev *dev)
+{
+
+	isp_write_reg(dev, 0x00000010, 0x00019f7b);
+	isp_write_reg(dev, 0x00000014, 0x00020000);
+	isp_write_reg(dev, 0x00001200, 0x00000000);
+	isp_write_reg(dev, 0x00001204, 0x01e00280);
+	isp_write_reg(dev, 0x00001208, 0x01e00280);
+	isp_write_reg(dev, 0x00001308, 0x6ce60608);
+	isp_write_reg(dev, 0x00001314, 0x000008c4);
+	isp_write_reg(dev, 0x00001318, 0x00000001);
+	isp_write_reg(dev, 0x0000131c, 0x03a2013b);
+	isp_write_reg(dev, 0x00001320, 0x00000000);
+	isp_write_reg(dev, 0x00001324, 0xc0000000);
+	isp_write_reg(dev, 0x00001328, 0x0004B000);
+	isp_write_reg(dev, 0x0000132c, 0x00000000);
+	isp_write_reg(dev, 0x00001330, 0x00000280);
+	isp_write_reg(dev, 0x00001334, 0x00000280);
+	isp_write_reg(dev, 0x00001338, 0x000001e0);
+	isp_write_reg(dev, 0x0000133c, 0x0004B000);
+	isp_write_reg(dev, 0x00001340, 0xc0040000);
+	isp_write_reg(dev, 0x00001344, 0x0004B000);
+	isp_write_reg(dev, 0x000016c0, 0x07ffffff);
+	isp_write_reg(dev, 0x000005bc, 0x00000003);
+	isp_write_reg(dev, 0x000016c4, 0x052c4e39);
+	isp_write_reg(dev, 0x00000404, 0x00d00018);
+	isp_write_reg(dev, 0x00000410, 0x00000280);
+	isp_write_reg(dev, 0x00000414, 0x000001e0);
+
+	isp_write_reg(dev, 0x00000538, 0x01000100);
+	isp_write_reg(dev, 0x0000053c, 0x02270220);
+	isp_write_reg(dev, 0x0000059c, 0x00000280);
+	isp_write_reg(dev, 0x000005a0, 0x000001e0);
+
+	isp_write_reg(dev, 0x00002310, 0x00000280);
+	isp_write_reg(dev, 0x00002314, 0x000001e0);
+	isp_write_reg(dev, 0x0000295c, 0x00000070);
+	isp_write_reg(dev, 0x00003e00, 0x040128be);
+	isp_write_reg(dev, 0x00003e04, 0x00000000);
+	isp_write_reg(dev, 0x00003e08, 0x00001f08);
+	isp_write_reg(dev, 0x00003e0c, 0x200003ff);
+	isp_write_reg(dev, 0x00003e10, 0x0c968628);
+	isp_write_reg(dev, 0x00003e14, 0x00008008);
+	isp_write_reg(dev, 0x00003e18, 0x007d07d0);
+	isp_write_reg(dev, 0x00003e1c, 0x301a3012);
+	isp_write_reg(dev, 0x00003e20, 0x04010000);
+	isp_write_reg(dev, 0x00003e24, 0x22018000);
+	isp_write_reg(dev, 0x00003e28, 0x00020000);
+	isp_write_reg(dev, 0x00003e2c, 0x0210210a);
+	isp_write_reg(dev, 0x00003e30, 0x00102102);
+	isp_write_reg(dev, 0x00003e34, 0x0000388c);
+	isp_write_reg(dev, 0x00003e38, 0x00000000);
+	isp_write_reg(dev, 0x00003e3c, 0x00000000);
+	isp_write_reg(dev, 0x00003e40, 0x00000000);
+	isp_write_reg(dev, 0x00003e44, 0x00000001);
+	isp_write_reg(dev, 0x00003e48, 0x10001000);
+	isp_write_reg(dev, 0x00003e4c, 0x00000000);
+	isp_write_reg(dev, 0x00003e50, 0x00000000);
+	isp_write_reg(dev, 0x00003e54, 0x00000000);
+	isp_write_reg(dev, 0x00003e58, 0x00080010);
+	isp_write_reg(dev, 0x00003e5c, 0x00080010);
+	isp_write_reg(dev, 0x00003e60, 0x01300280);
+	isp_write_reg(dev, 0x00000018, 0x00001000);
+	isp_write_reg(dev, 0x00001200, 0x00000001); //why
+
+	isp_write_reg(dev, 0x00000418, 0x00000001);
+	isp_write_reg(dev, 0x00000400, 0x80100686);
+	isp_write_reg(dev, 0x00000400, 0x80100097);
+	isp_write_reg(dev, 0x00001300, 0x00000001);
+	isp_write_reg(dev, 0x00001310, 0x00000038);
+	isp_write_reg(dev, 0x000014e4, 0x00000238);
+	isp_write_reg(dev, 0x00001600, 0x0000005c);
+	isp_write_reg(dev, 0x00000704, 0x00c00222);
+	isp_write_reg(dev, 0x00000708, 0x00a001e0);
+	isp_write_reg(dev, 0x0000070c, 0x000a4023);
+	isp_write_reg(dev, 0x00000710, 0x000a401e);
+	isp_write_reg(dev, 0x00000714, 0x000b8001);
+	isp_write_reg(dev, 0x00000718, 0x003540a0);
+	isp_write_reg(dev, 0x0000071c, 0x00000050);
+	isp_write_reg(dev, 0x00000720, 0x3aca095b);
+	isp_write_reg(dev, 0x00000700, 0x00000c42);
+	isp_info("end %s\n", __func__);
+}
+int isp_start_stream(struct isp_ic_dev *dev, u32 numFrames)
+{
+
+	u32 isp_imsc, isp_ctrl;
+
+	isp_info("enter %s\n", __func__);
+#ifdef ISP_PDAF
+	isp_write_reg(dev, 0x5d00, 0x1);
+#endif
+
+	isp_write_reg(dev, REG_ADDR(isp_sh_ctrl), 0x10);
+	isp_write_reg(dev, REG_ADDR(isp_acq_nr_frames),
+		      (MRV_ISP_ACQ_NR_FRAMES_MASK & numFrames));
+	isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	isp_imsc |=
+	    (MRV_ISP_IMSC_ISP_OFF_MASK | MRV_ISP_IMSC_FRAME_MASK |
+	     MRV_ISP_IMSC_FRAME_IN_MASK | MRV_ISP_IMSC_PIC_SIZE_ERR_MASK | MRV_ISP_IMSC_FLASH_ON_MASK);
+	/* isp_imsc |= (MRV_ISP_IMSC_FRAME_MASK | MRV_ISP_IMSC_DATA_LOSS_MASK | MRV_ISP_IMSC_FRAME_IN_MASK); */
+	isp_write_reg(dev, REG_ADDR(isp_icr), 0xFFFFFFFF);
+	isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+    isp_write_reg(dev, 0x00001320, 1);
+    isp_write_reg(dev, 0x00001610, 1);
+#if 0/*add by shenwuyi for live sensor*/
+	isp_write_reg(dev, 0x00000c68, 10);/*fream_rete_ctrl*/
+	isp_write_reg(dev, 0x00002200, 0x00000000); //disable lsc
+	isp_write_reg(dev, 0x000005bc, 0x00000001); //irq_enable
+	isp_write_reg(dev, 0x00000538, 0x01000100); //awb_gain_gr
+	isp_write_reg(dev, 0x0000053c, 0x02270220); //awb_gain_gc
+#endif
+	/*isp_test_bt(dev);*/
+
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_INFORM_ENABLE, 1);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	/*Set lsc tbl after isp enable*/
+	if (dev->update_lsc_tbl) {
+		isp_s_lsc_tbl(dev);
+		dev->update_lsc_tbl = false;
+	}
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_stop_stream(struct isp_ic_dev *dev)
+{
+	isp_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(isp_imsc), 0);
+	isp_disable(dev);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_cc(struct isp_ic_dev *dev)
+{
+	struct isp_cc_context *cc = &dev->cc;
+	u32 isp_ctrl, addr;
+	int i;
+
+	isp_info("enter %s\n", __func__);
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_CSM_Y_RANGE, cc->conv_range_y_full);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_CSM_C_RANGE, cc->conv_range_c_full);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	if (cc->update_curve) {
+		addr = REG_ADDR(isp_cc_coeff_0);
+		for (i = 0; i < 9; i++) {
+			isp_write_reg(dev, addr + i * 4,
+				      MRV_ISP_CC_COEFF_0_MASK & cc->lCoeff[i]);
+		}
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_xtalk(struct isp_ic_dev *dev)
+{
+	struct isp_xtalk_context xtalk = *(&dev->xtalk);
+	int i;
+
+	/* isp_info("enter %s\n", __func__); */
+
+	for (i = 0; i < 9; i++) {
+#ifdef  ISP_CTM_0507                     // Coefficient for cross talk matrix.Use bit 11,Values are 12-bit signed fixed-point numbers with 5 bit integer and 7 bit fractional part, ranging from -16 (0x800) to +15.992 (0x7FF).
+		isp_write_reg(dev, REG_ADDR(cross_talk_coef_block_arr[i]),
+			      MRV_ISP_CT_COEFF_MASK & (xtalk.lCoeff[i] << 1));
+#else                              // Coefficient for cross talk matrix.Values are 11-bit signed fixed-point numbers with 4 bit integer and 7 bit fractional part, ranging from -8 (0x400) to +7.992 (0x3FF).
+		isp_write_reg(dev, REG_ADDR(cross_talk_coef_block_arr[i]),
+			      MRV_ISP_CT_COEFF_MASK & xtalk.lCoeff[i]);
+#endif
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_ct_offset_r),
+		      (MRV_ISP_CT_OFFSET_R_MASK & xtalk.r));
+	isp_write_reg(dev, REG_ADDR(isp_ct_offset_g),
+		      (MRV_ISP_CT_OFFSET_G_MASK & xtalk.g));
+	isp_write_reg(dev, REG_ADDR(isp_ct_offset_b),
+		      (MRV_ISP_CT_OFFSET_B_MASK & xtalk.b));
+	return 0;
+}
+
+int isp_enable_wb(struct isp_ic_dev *dev, bool bEnable)
+{
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	isp_info("enter %s\n", __func__);
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_AWB_ENABLE, bEnable);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_enable_gamma_out(struct isp_ic_dev *dev, bool bEnable)
+{
+	u32 isp_ctrl;
+	struct isp_gamma_out_context *gamma = &dev->gamma_out;
+	isp_info("enter %s\n", __func__);
+	gamma->enableGamma = bEnable;
+	if(gamma->changed || !is_isp_enable(dev))
+	{
+		isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GAMMA_OUT_ENABLE, bEnable);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		gamma->changed = false;
+	} else {
+		gamma->changed = true;
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_gamma_out(struct isp_ic_dev *dev)
+{
+	u32 isp_gamma_out_mode;
+	int i;
+	u32 isp_ctrl;
+	struct isp_gamma_out_context *gamma = &dev->gamma_out;
+	if(gamma->changed || !is_isp_enable(dev)) {
+		isp_gamma_out_mode = isp_read_reg(dev, REG_ADDR(isp_gamma_out_mode));
+		REG_SET_SLICE(isp_gamma_out_mode, MRV_ISP_EQU_SEGM, gamma->mode);
+		isp_write_reg(dev, REG_ADDR(isp_gamma_out_mode), isp_gamma_out_mode);
+
+		for (i = 0; i < 17; i++) {
+			isp_write_reg(dev, REG_ADDR(gamma_out_y_block_arr[i]),
+					  MRV_ISP_ISP_GAMMA_OUT_Y_MASK & gamma->curve[i]);
+		}
+		isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GAMMA_OUT_ENABLE, gamma->enableGamma);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		gamma->changed = false;
+	} else {
+		gamma->changed = true;
+ 	}
+
+	return 0;
+}
+
+int isp_s_lsc_tbl(struct isp_ic_dev *dev)
+{
+	int i, n;
+	u32 isp_ctrl;
+	u32 sram_addr;
+	u32 isp_lsc_status;
+	struct isp_lsc_context *lsc = (&dev->lsc);
+
+    //isp_debug("enter %s\n", __func__);
+
+    /*need to set tbl after isp_ctrl enable In ISP8000NANO_V1802*/
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	/* Enable isp to enable ram clock for write correct table to ram. */
+	if (!(isp_ctrl & 0x01)) {
+        	dev->update_lsc_tbl = true;
+        	return 0;
+	}
+
+	isp_lsc_status = isp_read_reg(dev, REG_ADDR(isp_lsc_status));
+	sram_addr = (isp_lsc_status & 0x2U) ? 0U : 153U;
+	isp_write_reg(dev, REG_ADDR(isp_lsc_r_table_addr), sram_addr);
+	isp_write_reg(dev, REG_ADDR(isp_lsc_gr_table_addr), sram_addr);
+	isp_write_reg(dev, REG_ADDR(isp_lsc_gb_table_addr), sram_addr);
+	isp_write_reg(dev, REG_ADDR(isp_lsc_b_table_addr), sram_addr);
+#ifdef ISP_LSC_V2
+	for (n = 0; n < ((CAMERIC_MAX_LSC_SECTORS + 1) * (CAMERIC_MAX_LSC_SECTORS + 1)); n += CAMERIC_MAX_LSC_SECTORS + 1) {
+		for (i = 0; i < (CAMERIC_MAX_LSC_SECTORS); i += 2) {
+			isp_write_reg(dev, REG_ADDR(isp_lsc_r_table_data),  (lsc->r[n + i] & 0xFFF)  | ((lsc->r[n + i + 1]   & 0xFFF) << 12) | ((lsc->r[n + i] >> 12) << 24)  | ((lsc->r[n + i + 1] >> 12) << 28));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_gr_table_data), (lsc->gr[n + i] & 0xFFF) | ((lsc->gr[n + i + 1]  & 0xFFF) << 12) | ((lsc->gr[n + i] >> 12) << 24) | ((lsc->gr[n + i + 1] >> 12) << 28));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_gb_table_data), (lsc->gb[n + i] & 0xFFF) | ((lsc->gb[n + i + 1]  & 0xFFF) << 12) | ((lsc->gb[n + i] >> 12) << 24) | ((lsc->gb[n + i + 1] >> 12) << 28));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_b_table_data),  (lsc->b[n + i] & 0xFFF)  | ((lsc->b[n + i + 1]   & 0xFFF) << 12) | ((lsc->b[n + i] >> 12) << 24)  | ((lsc->b[n + i + 1] >> 12) << 28));
+		}
+		isp_write_reg(dev, REG_ADDR(isp_lsc_r_table_data),  (lsc->r[n + CAMERIC_MAX_LSC_SECTORS] & 0xFFF)  | ((lsc->r[n + CAMERIC_MAX_LSC_SECTORS] >> 12) << 24));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_gr_table_data), (lsc->gr[n + CAMERIC_MAX_LSC_SECTORS] & 0xFFF) | ((lsc->gr[n + CAMERIC_MAX_LSC_SECTORS] >> 12) << 24));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_gb_table_data), (lsc->gb[n + CAMERIC_MAX_LSC_SECTORS] & 0xFFF) | ((lsc->gb[n + CAMERIC_MAX_LSC_SECTORS] >> 12) << 24));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_b_table_data),  (lsc->b[n + CAMERIC_MAX_LSC_SECTORS] & 0xFFF)  | ((lsc->b[n + CAMERIC_MAX_LSC_SECTORS] >> 12) << 24));
+	}
+#else
+	for (n = 0;
+	     n <
+	     ((CAMERIC_MAX_LSC_SECTORS + 1) * (CAMERIC_MAX_LSC_SECTORS + 1));
+	     n += CAMERIC_MAX_LSC_SECTORS + 1) {
+		/* 17 sectors with 2 values in one DWORD = 9 DWORDs (8 steps + 1 outside loop) */
+		for (i = 0; i < (CAMERIC_MAX_LSC_SECTORS); i += 2) {
+			isp_write_reg(dev, REG_ADDR(isp_lsc_r_table_data),
+				      lsc->r[n +
+					     i] | (lsc->r[n + i + 1] << 12));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_gr_table_data),
+				      lsc->gr[n +
+					      i] | (lsc->gr[n + i + 1] << 12));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_gb_table_data),
+				      lsc->gb[n +
+					      i] | (lsc->gb[n + i + 1] << 12));
+			isp_write_reg(dev, REG_ADDR(isp_lsc_b_table_data),
+				      lsc->b[n +
+					     i] | (lsc->b[n + i + 1] << 12));
+		}
+		isp_write_reg(dev, REG_ADDR(isp_lsc_r_table_data),
+			      lsc->r[n + CAMERIC_MAX_LSC_SECTORS]);
+		isp_write_reg(dev, REG_ADDR(isp_lsc_gr_table_data),
+			      lsc->gr[n + CAMERIC_MAX_LSC_SECTORS]);
+		isp_write_reg(dev, REG_ADDR(isp_lsc_gb_table_data),
+			      lsc->gb[n + CAMERIC_MAX_LSC_SECTORS]);
+		isp_write_reg(dev, REG_ADDR(isp_lsc_b_table_data),
+			      lsc->b[n + CAMERIC_MAX_LSC_SECTORS]);
+	}
+#endif
+	isp_write_reg(dev, REG_ADDR(isp_lsc_table_sel),
+		      (isp_lsc_status & 0x2U) ? 0U : 1U);
+	//isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+
+int isp_s_lsc_sec(struct isp_ic_dev *dev)
+{
+	int i;
+	struct isp_lsc_context *lsc = (&dev->lsc);
+	/* isp_info("enter %s\n", __func__); */
+	for (i = 0; i < CAEMRIC_GRAD_TBL_SIZE; i += 2) {
+		isp_write_reg(dev, REG_ADDR(isp_lsc_xsize_01) + i * 2,
+			      (lsc->x_size[i] & MRV_LSC_Y_SECT_SIZE_0_MASK) |
+			      ((lsc->x_size[i + 1]
+				<< MRV_LSC_X_SECT_SIZE_1_SHIFT)
+			       & MRV_LSC_X_SECT_SIZE_1_MASK));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_ysize_01) + i * 2,
+			      (lsc->y_size[i] & MRV_LSC_Y_SECT_SIZE_0_MASK) |
+			      ((lsc->y_size[i + 1]
+				<< MRV_LSC_Y_SECT_SIZE_1_SHIFT)
+			       & MRV_LSC_Y_SECT_SIZE_1_MASK));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_xgrad_01) + i * 2,
+			      (lsc->x_grad[i] & MRV_LSC_XGRAD_0_MASK) |
+			      ((lsc->x_grad[i + 1]
+				<< MRV_LSC_XGRAD_1_SHIFT)
+			       & MRV_LSC_XGRAD_1_MASK));
+		isp_write_reg(dev, REG_ADDR(isp_lsc_ygrad_01) + i * 2,
+			      (lsc->y_grad[i] & MRV_LSC_YGRAD_0_MASK) |
+			      ((lsc->y_grad[i + 1]
+				<< MRV_LSC_YGRAD_1_SHIFT)
+			       & MRV_LSC_YGRAD_1_MASK));
+	}
+	return 0;
+}
+
+int isp_ioc_read_mis(struct isp_ic_dev *dev, void __user *args)
+{
+	isp_mis_list_t* pCList = &dev->circle_list;
+	isp_mis_t mis_data;
+	u32 ary[2];
+	int ret = -1;
+	ret = isp_irq_read_circle_queue(&mis_data, pCList);
+	if (ret < 0) {
+    	/*isp_info("%s  can not dequeue mis data\n", __func__);*/
+		return ret;
+	}
+
+    /*isp_info("%s  irq src %d val 0x%08x\n", __func__, mis_data.irq_src, mis_data.val);*/
+	ary[0] = mis_data.irq_src;
+	ary[1] = mis_data.val;
+	viv_check_retval(copy_to_user(args, ary, sizeof( ary)));
+	return 0;
+}
+
+static int isp_ioc_read_reg(struct isp_ic_dev *dev, void __user * args)
+{
+	struct isp_reg_t reg;
+
+	viv_check_retval(copy_from_user(&reg, args, sizeof(reg)));
+	reg.val = isp_read_reg(dev, reg.offset);
+	viv_check_retval(copy_to_user(args, &reg, sizeof(reg)));
+	return 0;
+}
+
+static int isp_ioc_write_reg(struct isp_ic_dev *dev, void __user *args)
+{
+	struct isp_reg_t reg;
+
+	viv_check_retval((copy_from_user(&reg, args, sizeof(reg))));
+	isp_write_reg(dev, reg.offset, reg.val);
+	return 0;
+}
+
+int isp_ioc_disable_isp_off(struct isp_ic_dev *dev, void __user *args)
+{
+	u32 isp_imsc;
+
+	isp_info("enter %s\n", __func__);
+	isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	isp_imsc &= ~MRV_ISP_IMSC_ISP_OFF_MASK;
+	isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_g_awbmean(struct isp_ic_dev *dev, struct isp_awb_mean *mean)
+{
+	u32 reg = isp_read_reg(dev, REG_ADDR(isp_awb_mean));
+
+	/* isp_info("enter %s\n", __func__); */
+	mean->g = REG_GET_SLICE(reg, MRV_ISP_AWB_MEAN_Y__G);
+	mean->b = REG_GET_SLICE(reg, MRV_ISP_AWB_MEAN_CB__B);
+	mean->r = REG_GET_SLICE(reg, MRV_ISP_AWB_MEAN_CR__R);
+	mean->no_white_count = isp_read_reg(dev, REG_ADDR(isp_awb_white_cnt));
+
+	return 0;
+}
+
+int isp_s_ee(struct isp_ic_dev *dev)
+{
+#ifndef ISP_EE
+	//isp_err("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	struct isp_ee_context *ee = &dev->ee;
+	u32 isp_ee_ctrl = isp_read_reg(dev, REG_ADDR(isp_ee_ctrl));
+	u32 gain = 0;
+
+	//isp_info("enter %s\n", __func__);
+
+	if (!ee->enable) {
+		isp_write_reg(dev, REG_ADDR(isp_ee_ctrl),
+			      isp_ee_ctrl & ~EE_CTRL_ENABLE_MASK);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_ee_ctrl, EE_CTRL_INPUT_SEL, ee->input_sel);
+	REG_SET_SLICE(isp_ee_ctrl, EE_CTRL_SOURCE_STRENGTH, ee->src_strength);
+	REG_SET_SLICE(isp_ee_ctrl, EE_CTRL_STRENGTH, ee->strength);
+	REG_SET_SLICE(gain, EE_UV_GAIN, ee->uv_gain);
+	REG_SET_SLICE(gain, EE_EDGE_GAIN, ee->edge_gain);
+	isp_write_reg(dev, REG_ADDR(isp_ee_y_gain), ee->y_gain);
+	isp_write_reg(dev, REG_ADDR(isp_ee_uv_gain), gain);
+	isp_write_reg(dev, REG_ADDR(isp_ee_ctrl),
+		      isp_ee_ctrl | EE_CTRL_ENABLE_MASK);
+	//isp_info("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+int isp_s_exp(struct isp_ic_dev *dev)
+{
+	struct isp_exp_context *exp = &dev->exp;
+	u32 isp_exp_ctrl = isp_read_reg(dev, REG_ADDR(isp_exp_ctrl));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!exp->enable) {
+		REG_SET_SLICE(isp_exp_ctrl, MRV_AE_EXP_START, 0);
+		isp_write_reg(dev, REG_ADDR(isp_exp_ctrl), isp_exp_ctrl);
+		isp_write_reg(dev, REG_ADDR(isp_imsc),
+			      isp_imsc & ~MRV_ISP_IMSC_EXP_END_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_exp_h_offset),
+		      (MRV_AE_ISP_EXP_H_OFFSET_MASK & exp->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_exp_v_offset),
+		      (MRV_AE_ISP_EXP_V_OFFSET_MASK & exp->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_exp_h_size),
+		      (MRV_AE_ISP_EXP_H_SIZE_MASK & exp->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_exp_v_size),
+		      (MRV_AE_ISP_EXP_V_SIZE_MASK & exp->window.height));
+#ifdef ISP_AE_SHADOW
+	isp_write_reg(dev, REG_ADDR(isp_exp_h_offset_shd),
+		      (MRV_AE_ISP_EXP_H_OFFSET_MASK & exp->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_exp_v_offset_shd),
+		      (MRV_AE_ISP_EXP_V_OFFSET_MASK & exp->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_exp_h_size_shd),
+		      (MRV_AE_ISP_EXP_H_SIZE_MASK & exp->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_exp_v_size_shd),
+		      (MRV_AE_ISP_EXP_V_SIZE_MASK & exp->window.height));
+#endif
+	REG_SET_SLICE(isp_exp_ctrl, MRV_AE_EXP_MEAS_MODE, exp->mode);
+	REG_SET_SLICE(isp_exp_ctrl, MRV_AE_EXP_START, 1);
+	isp_write_reg(dev, REG_ADDR(isp_exp_ctrl), isp_exp_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_EXP_END_MASK);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_hdrexp(struct isp_ic_dev *dev)
+{
+	struct isp_exp_context *hdrexp = &dev->hdrexp;
+	u32 isp_hdr_exp_conf = isp_read_reg(dev, REG_ADDR(isp_hdr_exp_conf));
+	u32 isp_stitching_imsc = isp_read_reg(dev, REG_ADDR(isp_stitching_imsc));
+
+	pr_info("enter %s\n", __func__);
+	if (!dev->hdrexp.enable) {
+        pr_info("%s, hdr disabled\n",__func__);
+		REG_SET_SLICE(isp_hdr_exp_conf, MRV_HDR_EXP_START, 0);
+		isp_write_reg(dev, REG_ADDR(isp_hdr_exp_conf), isp_hdr_exp_conf);
+		isp_write_reg(dev, REG_ADDR(isp_stitching_imsc), isp_stitching_imsc & ~0x38);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_hdr_exp_h_offset),
+		      (MRV_ISP_HDR_EXP_H_OFFSET_MASK & hdrexp->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_exp_v_offset),
+		      (MRV_ISP_HDR_EXP_V_OFFSET_MASK & hdrexp->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_exp_h_size),
+		      (MRV_ISP_HDR_EXP_H_SIZE_MASK & hdrexp->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_exp_v_size),
+		      (MRV_ISP_HDR_EXP_V_SIZE_MASK & hdrexp->window.height));
+
+	REG_SET_SLICE(isp_hdr_exp_conf, MRV_HDR_EXP_MEAS_MODE, hdrexp->mode);
+	REG_SET_SLICE(isp_hdr_exp_conf, MRV_HDR_EXP_SRC_SEL, 1);  //hardware only support 1
+	REG_SET_SLICE(isp_hdr_exp_conf, MRV_HDR_EXP_START, 1);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_exp_conf), isp_hdr_exp_conf);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_imsc), isp_stitching_imsc | 0x38);
+	return 0;
+}
+
+int isp_g_expmean(struct isp_ic_dev *dev, u8 *mean)
+{
+	int i = 0;
+
+	/* isp_info("enter %s\n", __func__); */
+	if (!dev || !mean)
+		return -EINVAL;
+	for (; i < 25; i++) {
+		mean[i] = isp_read_reg(dev, REG_ADDR(isp_exp_mean_00) + i * 4);
+	}
+
+	return 0;
+}
+
+int isp_g_hdrexpmean(struct isp_ic_dev *dev, u8 * mean)
+{
+	int i = 0;
+
+	pr_info("enter %s\n", __func__);
+	if (!dev || !mean)
+		return -EINVAL;
+	for (; i < 75; i++) {
+		mean[i] = isp_read_reg(dev, REG_ADDR(isp_hdr_exp_statistics[i]));
+	}
+
+	return 0;
+}
+
+#ifdef ISP_HIST256
+#define HIST_BIN_TOTAL 256
+#else
+#define HIST_BIN_TOTAL 16
+#endif
+
+int isp_s_hist(struct isp_ic_dev *dev)
+{
+	struct isp_hist_context *hist = &dev->hist;
+
+#ifdef ISP_HIST256
+	u32 isp_hist256_prop = isp_read_reg(dev, REG_ADDR(isp_hist256_prop));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	int i;
+
+	if (!hist->enable) {
+		REG_SET_SLICE(isp_hist256_prop, MRV_HIST_MODE,
+			      MRV_HIST_MODE_NONE);
+		isp_write_reg(dev, REG_ADDR(isp_hist256_prop),
+			      isp_hist256_prop);
+		//isp_write_reg(dev, REG_ADDR(isp_imsc),
+		//	      isp_imsc & ~MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_hist256_h_offs),
+		      (MRV_HIST_H_OFFSET_MASK & hist->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_hist256_v_offs),
+		      (MRV_HIST_V_OFFSET_MASK & hist->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_hist256_h_size),
+		      (MRV_HIST_H_SIZE_MASK & hist->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_hist256_v_size),
+		      (MRV_HIST_V_SIZE_MASK & hist->window.height));
+
+	for (i = 0; i < 24; i += 4) {
+		isp_write_reg(dev, REG_ADDR(isp_hist256_weight_00to30) + i,
+			      hist->weight[i +
+					   0] | (hist->weight[i +
+							      1] << 8) |
+			      (hist->weight[i + 2] << 16) | (hist->weight[i +
+									  3] <<
+							     24));
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_hist256_weight_44), hist->weight[24]);
+	REG_SET_SLICE(isp_hist256_prop, MRV_HIST_STEPSIZE, hist->step_size);
+	REG_SET_SLICE(isp_hist256_prop, MRV_HIST_MODE, hist->mode);
+	isp_write_reg(dev, REG_ADDR(isp_hist256_prop), isp_hist256_prop);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+#else
+	u32 isp_hist_prop = isp_read_reg(dev, REG_ADDR(isp_hist_prop));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	int i;
+
+	isp_info("enter %s\n", __func__);
+	if (!hist->enable) {
+		REG_SET_SLICE(isp_hist_prop, MRV_HIST_MODE, MRV_HIST_MODE_NONE);
+		isp_write_reg(dev, REG_ADDR(isp_hist_prop), isp_hist_prop);
+		//isp_write_reg(dev, REG_ADDR(isp_imsc),
+		//	      isp_imsc & ~MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_hist_h_offs),
+		      (MRV_HIST_H_OFFSET_MASK & hist->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_hist_v_offs),
+		      (MRV_HIST_V_OFFSET_MASK & hist->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_hist_h_size),
+		      (MRV_HIST_H_SIZE_MASK & hist->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_hist_v_size),
+		      (MRV_HIST_V_SIZE_MASK & hist->window.height));
+
+	for (i = 0; i < 24; i += 4) {
+		isp_write_reg(dev, REG_ADDR(isp_hist_weight_00to30) + i,
+			hist->weight[i + 0] |
+			(hist->weight[i + 1] << 8) |
+			(hist->weight[i + 2] << 16) |
+			(hist->weight[i + 3] << 24));
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_hist_weight_44), hist->weight[24]);
+	REG_SET_SLICE(isp_hist_prop, MRV_HIST_STEPSIZE, hist->step_size);
+	REG_SET_SLICE(isp_hist_prop, MRV_HIST_MODE, hist->mode);
+	isp_write_reg(dev, REG_ADDR(isp_hist_prop), isp_hist_prop);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+	isp_info("exit %s\n", __func__);
+#endif
+	return 0;
+}
+
+int isp_s_hdrhist(struct isp_ic_dev *dev)
+{
+	struct isp_hist_context *hdrhist = &dev->hdrhist;
+	u32 isp_hdr_hist_prop = isp_read_reg(dev, REG_ADDR(isp_hdr_hist_prop));
+	u32 isp_stitching_imsc = isp_read_reg(dev, REG_ADDR(isp_stitching_imsc));
+
+	pr_info("enter %s\n", __func__);
+	if (!dev->hdrhist.enable) {
+		pr_info("%s, hdr disable\n", __func__);
+		REG_SET_SLICE(isp_hdr_hist_prop, MRV_HIST_MODE, MRV_HIST_MODE_NONE);
+		isp_write_reg(dev, REG_ADDR(isp_hdr_hist_prop), isp_hdr_hist_prop);
+		isp_write_reg(dev, REG_ADDR(isp_stitching_imsc),
+			      isp_stitching_imsc & ~0x1c0);
+		return 0;
+	}
+	isp_write_reg(dev, REG_ADDR(isp_hdr_hist_h_offs),
+		      (MRV_HIST_H_OFFSET_MASK & hdrhist->window.x));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_hist_v_offs),
+		      (MRV_HIST_V_OFFSET_MASK & hdrhist->window.y));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_hist_h_size),
+		      (MRV_HIST_H_SIZE_MASK & hdrhist->window.width));
+	isp_write_reg(dev, REG_ADDR(isp_hdr_hist_v_size),
+		      (MRV_HIST_V_SIZE_MASK & hdrhist->window.height));
+
+	REG_SET_SLICE(isp_hdr_hist_prop, MRV_HIST_STEPSIZE, hdrhist->step_size);
+	REG_SET_SLICE(isp_hdr_hist_prop, MRV_HIST_MODE, hdrhist->mode);
+	isp_write_reg(dev, REG_ADDR(isp_hdr_hist_prop), isp_hdr_hist_prop);
+	isp_write_reg(dev, REG_ADDR(isp_stitching_imsc), isp_stitching_imsc | 0x1c0);
+	return 0;
+}
+
+int isp_g_histmean(struct isp_ic_dev *dev, u32 *mean)
+{
+	int i = 0;
+
+	/* isp_info("enter %s\n", __func__); */
+	if (!dev || !mean)
+		return -EINVAL;
+#ifdef ISP_HIST256
+	for (; i < HIST_BIN_TOTAL; i++) {
+		mean[i] = isp_read_reg(dev, REG_ADDR(isp_hist256_bin_n));
+	}
+#else
+	for (; i < HIST_BIN_TOTAL; i++) {
+		mean[i] = isp_read_reg(dev,
+				       REG_ADDR(histogram_measurement_result_arr[i]));
+
+	}
+#endif
+	return 0;
+}
+
+int isp_g_hdrhistmean(struct isp_ic_dev *dev, u32 * mean)
+{
+	int i = 0;
+
+	pr_info("enter %s\n", __func__);
+	if (!dev || !mean)
+		return -EINVAL;
+
+    // size is fixed 48 now, contain 3 channels
+	for (; i < 48; i++) {
+		mean[i] = isp_read_reg(dev, REG_ADDR(isp_hdr_hist_statistics[i]));
+	}
+	return 0;
+}
+
+int isp_s_hist64(struct isp_ic_dev *dev)
+{
+#ifndef ISP_HIST64
+	//pr_err("Not supported hist64 module\n");
+	return -1;
+#else
+	struct isp_hist64_context *hist64 = &dev->hist64;
+
+	u32 isp64_hist_prop = isp_read_reg(dev, REG_ADDR(isp64_hist_prop));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	u32 isp64_hist_subsampling = isp_read_reg(dev, REG_ADDR(isp64_hist_subsampling));
+	u32 isp64_hist_sample_range = isp_read_reg(dev, REG_ADDR(isp64_hist_sample_range));
+
+	u32 isp64_hist_coeff_r = 0, isp64_hist_coeff_g = 0, isp64_hist_coeff_b = 0;
+	int i;
+
+	if (!hist64->enable) {
+		REG_SET_SLICE(isp64_hist_prop, MRV_HIST_MODE,
+			      MRV_HIST_MODE_NONE);
+		isp_write_reg(dev, REG_ADDR(isp64_hist_prop),
+			      isp64_hist_prop);
+		isp_write_reg(dev, REG_ADDR(isp_imsc),
+			      isp_imsc & ~MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+		//isp_write_reg(dev, REG_ADDR(isp64_hist_ctrl),
+		///	      hist64->enable & ~MRV_HIST_UPDATE_ENABLE_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp64_hist_h_offs),
+		      (MRV_HIST_H_OFFSET_MASK & hist64->window.x));
+	isp_write_reg(dev, REG_ADDR(isp64_hist_v_offs),
+		      (MRV_HIST_V_OFFSET_MASK & hist64->window.y));
+	isp_write_reg(dev, REG_ADDR(isp64_hist_h_size),
+		      (MRV_HIST_H_SIZE_MASK & hist64->window.width));
+	isp_write_reg(dev, REG_ADDR(isp64_hist_v_size),
+		      (MRV_HIST_V_SIZE_MASK & hist64->window.height));
+
+	for (i = 0; i < 24; i += 4) {
+		isp_write_reg(dev, REG_ADDR(isp64_hist_weight_00to30) + i,
+			      hist64->weight[i +
+					   0] | (hist64->weight[i +
+							      1] << 8) |
+			      (hist64->weight[i + 2] << 16) | (hist64->weight[i +
+									  3] <<
+							     24));
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp64_hist_weight_44), hist64->weight[24]);
+	REG_SET_SLICE(isp64_hist_prop, MRV_HIST_CHANNEL_SELECT, hist64->channel);
+	REG_SET_SLICE(isp64_hist_prop, MRV_HIST_MODE, hist64->mode);
+
+	REG_SET_SLICE(isp64_hist_subsampling, MRV_HIST_V_STEPSIZE, hist64->vStepSize);
+	REG_SET_SLICE(isp64_hist_subsampling, MRV_HIST_H_STEP_INC, hist64->hStepInc);
+
+	REG_SET_SLICE(isp64_hist_sample_range, MRV_HIST_SAMPLE_OFFSET, hist64->sample_offset);
+	REG_SET_SLICE(isp64_hist_sample_range, MRV_HIST_SAMPLE_SHIFT, hist64->sample_shift);
+
+	REG_SET_SLICE(isp64_hist_coeff_r, MRV_HIST_COEFF_R, hist64->r_coeff);
+	REG_SET_SLICE(isp64_hist_coeff_g, MRV_HIST_COEFF_G, hist64->g_coeff);
+	REG_SET_SLICE(isp64_hist_coeff_b, MRV_HIST_COEFF_B, hist64->b_coeff);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_subsampling), isp64_hist_subsampling);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_sample_range), isp64_hist_sample_range);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_prop), isp64_hist_prop);
+
+	isp_write_reg(dev, REG_ADDR(isp64_hist_coeff_r), isp64_hist_coeff_r);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_coeff_g), isp64_hist_coeff_g);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_coeff_b), isp64_hist_coeff_b);
+
+		isp_write_reg(dev, REG_ADDR(isp64_hist_ctrl),
+			      hist64->enable);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK);
+
+	return 0;
+#endif
+}
+
+#define HIST64_BIN_TOTAL 32
+int isp_g_hist64mean(struct isp_ic_dev *dev, u32 *mean)
+{
+#ifndef ISP_HIST64
+	//pr_err("Not supported hist64 module\n");
+	return -1;
+#else
+	int i = 0;
+
+	 isp_info("enter %s\n", __func__);
+	if (!dev || !mean)
+		return -EINVAL;
+
+	for (; i < HIST64_BIN_TOTAL; i++) {
+		mean[i] = isp_read_reg(dev,
+				       REG_ADDR(isp64_histogram_measurement_result_arr[i]));
+
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+int isp_g_hist64_vstart_status(struct isp_ic_dev *dev, u32 *status)
+{
+#ifndef ISP_HIST64
+	//pr_err("Not supported hist64 module\n");
+	return -1;
+#else
+
+	/* isp_info("enter %s\n", __func__); */
+	if (!dev || !status)
+		return -EINVAL;
+
+	*status = isp_read_reg(dev, REG_ADDR(isp64_hist_vstart_status));
+
+	return 0;
+#endif
+}
+
+int isp_update_hist64(struct isp_ic_dev *dev)
+{
+#ifndef ISP_HIST64
+	//pr_err("Not supported hist64\n");
+	return -1;
+#else
+	struct isp_hist64_context* hist64 =&dev->hist64;
+
+	isp_write_reg(dev, REG_ADDR(isp64_hist_forced_upd_start_line),hist64->forced_upd_start_line);
+	isp_write_reg(dev, REG_ADDR(isp64_hist_forced_update), hist64->forced_upd);
+
+	return 0;
+#endif
+}
+
+int isp_s_ge(struct isp_ic_dev *dev)
+{
+#ifndef ISP_GREENEQUILIBRATE
+	//isp_err("unsupported function %s\n", __func__);
+	return -1;
+#else
+	struct isp_ge_context *ge = &dev->ge;
+	u32 green_equilibrate_ctrl =
+	    isp_read_reg(dev, REG_ADDR(green_equilibrate_ctrl));
+	u32 green_equilibrate_hcnt_dummy = 0;
+
+	isp_info("enter %s\n", __func__);
+
+	if (!ge->enable) {
+		REG_SET_SLICE(green_equilibrate_ctrl,
+			      ISP_GREEN_EQUILIBTATE_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(green_equilibrate_ctrl),
+			      green_equilibrate_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(green_equilibrate_ctrl, ISP_GREEN_EQUILIBTATE_TH,
+		      ge->threshold);
+	REG_SET_SLICE(green_equilibrate_ctrl, ISP_GREEN_EQUILIBTATE_ENABLE, 1);
+	REG_SET_SLICE(green_equilibrate_hcnt_dummy,
+		      ISP_GREEN_EQUILIBTATE_HCNT_DUMMY, ge->h_dummy);
+	isp_write_reg(dev, REG_ADDR(green_equilibrate_ctrl),
+		      green_equilibrate_ctrl);
+	isp_write_reg(dev, REG_ADDR(green_equilibrate_hcnt_dummy),
+		      green_equilibrate_hcnt_dummy);
+	isp_write_reg(dev, REG_ADDR(green_equilibrate_ctrl_shd),
+		      green_equilibrate_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+int isp_s_ca(struct isp_ic_dev *dev)
+{
+#ifndef ISP_CA
+	//isp_err("unsupported function %s\n", __func__);
+	return -1;
+#else
+	struct isp_ca_context *ca = &dev->ca;
+	u32 isp_curve_ctrl = isp_read_reg(dev, REG_ADDR(isp_curve_ctrl));
+	// u32 isp_curve_lut_x_addr = isp_read_reg(dev, REG_ADDR(isp_curve_lut_x_addr));
+	// u32 isp_curve_lut_luma_addr = isp_read_reg(dev, REG_ADDR(isp_curve_lut_luma_addr));
+	// u32 isp_curve_lut_chroma_addr = isp_read_reg(dev, REG_ADDR(isp_curve_lut_chroma_addr));
+	// u32 isp_curve_lut_shift_addr = isp_read_reg(dev, REG_ADDR(isp_curve_lut_shift_addr));
+
+	int i = 0;
+	/*isp_info("enter %s\n", __func__);*/
+	if (!ca->enable) {
+		REG_SET_SLICE(isp_curve_ctrl, ISP_CURVE_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_curve_ctrl), isp_curve_ctrl);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_curve_lut_x_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_curve_lut_luma_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_curve_lut_chroma_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_curve_lut_shift_addr), 0);
+
+	for (i = 0; i < CA_CURVE_DATA_TABLE_LEN; i++) {
+		isp_write_reg(dev, REG_ADDR(isp_curve_lut_x_write_data),
+			      dev->ca.lut_x[i]);
+		isp_write_reg(dev, REG_ADDR(isp_curve_lut_luma_write_data),
+			      dev->ca.lut_luma[i]);
+		isp_write_reg(dev, REG_ADDR(isp_curve_lut_chroma_write_data),
+			      dev->ca.lut_chroma[i]);
+		isp_write_reg(dev, REG_ADDR(isp_curve_lut_shift_write_data),
+			      dev->ca.lut_shift[i]);
+	}
+	REG_SET_SLICE(isp_curve_ctrl, ISP_CURVE_MODE, dev->ca.mode);
+	REG_SET_SLICE(isp_curve_ctrl, ISP_CURVE_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_curve_ctrl), isp_curve_ctrl);
+	/*isp_info("exit %s\n", __func__);*/
+	return 0;
+#endif
+}
+
+int isp_s_dpcc(struct isp_ic_dev *dev)
+{
+	struct isp_dpcc_context *dpcc = &dev->dpcc;
+	const u32 reg_gap = 20;
+	int i;
+	u32 isp_dpcc_mode = isp_read_reg(dev, REG_ADDR(isp_dpcc_mode));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!dpcc->enable) {
+		REG_SET_SLICE(isp_dpcc_mode, MRV_DPCC_ISP_DPCC_ENABLE, 0);
+	} else {
+		REG_SET_SLICE(isp_dpcc_mode, MRV_DPCC_ISP_DPCC_ENABLE, 1);
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_mode), dpcc->mode);
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_output_mode), dpcc->outmode);
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_set_use), dpcc->set_use);
+
+	for (i = 0; i < 3; i++) {
+		isp_write_reg(dev, REG_ADDR(isp_dpcc_methods_set_1) + i * 4,
+			      0x1FFF & dpcc->methods_set[i]);
+		isp_write_reg(dev,
+			      REG_ADDR(isp_dpcc_line_thresh_1) + i * reg_gap,
+			      0xFFFF & dpcc->params[i].line_thresh);
+		isp_write_reg(dev,
+			      REG_ADDR(isp_dpcc_line_mad_fac_1) + i * reg_gap,
+			      0x3F3F & dpcc->params[i].line_mad_fac);
+		isp_write_reg(dev, REG_ADDR(isp_dpcc_pg_fac_1) + i * reg_gap,
+			      0x3F3F & dpcc->params[i].pg_fac);
+		isp_write_reg(dev,
+			      REG_ADDR(isp_dpcc_rnd_thresh_1) + i * reg_gap,
+			      0xFFFF & dpcc->params[i].rnd_thresh);
+		isp_write_reg(dev, REG_ADDR(isp_dpcc_rg_fac_1) + i * reg_gap,
+			      0x3F3F & dpcc->params[i].rg_fac);
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_ro_limits), dpcc->ro_limits);
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_rnd_offs), dpcc->rnd_offs);
+	isp_write_reg(dev, REG_ADDR(isp_dpcc_mode), isp_dpcc_mode);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+
+int isp_s_flt(struct isp_ic_dev *dev)
+{
+	struct flt_denoise_type {
+		u32 thresh_sh0;
+		u32 thresh_sh1;
+		u32 thresh_bl0;
+		u32 thresh_bl1;
+		u32 stage_select;
+		u32 vmode;
+		u32 hmode;
+	};
+
+	struct flt_sharpen_type {
+		u32 fac_sh0;
+		u32 fac_sh1;
+		u32 fac_mid;
+		u32 fac_bl0;
+		u32 fac_bl1;
+	};
+
+	static struct flt_denoise_type denoise_tbl[] = {
+		{0, 0, 0, 0, 6, MRV_FILT_FILT_CHR_V_MODE_STATIC8,
+		 MRV_FILT_FILT_CHR_H_MODE_BYPASS},
+		{18, 33, 8, 2, 6, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{26, 44, 13, 5, 4, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{36, 51, 23, 10, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{41, 67, 26, 15, 3, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{75, 10, 50, 20, 3, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{90, 120, 60, 26, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{120, 150, 80, 51, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{170, 200, 140, 100, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{250, 300, 180, 150, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{1023, 1023, 1023, 1023, 2, MRV_FILT_FILT_CHR_V_MODE_STATIC12,
+		 MRV_FILT_FILT_CHR_H_MODE_DYN_2},
+		{1023, 1023, 1023, 1023, 0, MRV_FILT_FILT_CHR_V_MODE_BYPASS,
+		 MRV_FILT_FILT_CHR_H_MODE_BYPASS},
+	};
+
+	static struct flt_sharpen_type sharpen_tbl[] = {
+		{0x4, 0x4, 0x4, 0x2, 0x0},
+		{0x7, 0x8, 0x6, 0x2, 0x0},
+		{0xA, 0xC, 0x8, 0x4, 0x0},
+		{0xC, 0x10, 0xA, 0x6, 0x2},
+		{0x16, 0x16, 0xC, 0x8, 0x4},
+		{0x14, 0x1B, 0x10, 0xA, 0x4},
+		{0x1A, 0x20, 0x13, 0xC, 0x6},
+		{0x1E, 0x26, 0x17, 0x10, 0x8},
+		{0x24, 0x2C, 0x1D, 0x15, 0x0D},
+		{0x2A, 0x30, 0x22, 0x1A, 0x14},
+		{0x30, 0x3F, 0x28, 0x24, 0x20},
+	};
+
+	//	isp_info("enter %s\n", __func__);
+
+	if(dev->flt.changed || !is_isp_enable(dev))
+	{
+		struct isp_flt_context *flt = &dev->flt;
+		u32 isp_flt_mode = isp_read_reg(dev, REG_ADDR(isp_filt_mode));
+
+		if (!flt->enable) {
+			REG_SET_SLICE(isp_flt_mode, MRV_FILT_FILT_ENABLE, 0);
+			isp_write_reg(dev, REG_ADDR(isp_filt_mode), isp_flt_mode);
+			return 0;
+		}
+
+		if (flt->denoise >= 0) {
+			isp_write_reg(dev, REG_ADDR(isp_filt_thresh_sh0),
+					  denoise_tbl[flt->denoise].thresh_sh0);
+			isp_write_reg(dev, REG_ADDR(isp_filt_thresh_sh1),
+					  denoise_tbl[flt->denoise].thresh_sh1);
+			isp_write_reg(dev, REG_ADDR(isp_filt_thresh_bl0),
+					  denoise_tbl[flt->denoise].thresh_bl0);
+			isp_write_reg(dev, REG_ADDR(isp_filt_thresh_bl1),
+					  denoise_tbl[flt->denoise].thresh_bl1);
+			REG_SET_SLICE(isp_flt_mode, MRV_FILT_STAGE1_SELECT,
+					  denoise_tbl[flt->denoise].stage_select);
+			REG_SET_SLICE(isp_flt_mode, MRV_FILT_FILT_CHR_V_MODE,
+					  denoise_tbl[flt->denoise].vmode);
+			REG_SET_SLICE(isp_flt_mode, MRV_FILT_FILT_CHR_H_MODE,
+					  denoise_tbl[flt->denoise].hmode);
+		}
+
+		if (flt->sharpen >= 0) {
+			isp_write_reg(dev, REG_ADDR(isp_filt_fac_sh0),
+					  sharpen_tbl[flt->sharpen].fac_sh0);
+			isp_write_reg(dev, REG_ADDR(isp_filt_fac_sh1),
+					  sharpen_tbl[flt->sharpen].fac_sh1);
+			isp_write_reg(dev, REG_ADDR(isp_filt_fac_mid),
+					  sharpen_tbl[flt->sharpen].fac_mid);
+			isp_write_reg(dev, REG_ADDR(isp_filt_fac_bl0),
+					  sharpen_tbl[flt->sharpen].fac_bl0);
+			isp_write_reg(dev, REG_ADDR(isp_filt_fac_bl1),
+					  sharpen_tbl[flt->sharpen].fac_bl1);
+		}
+
+		REG_SET_SLICE(isp_flt_mode, MRV_FILT_FILT_MODE,
+				  MRV_FILT_FILT_MODE_DYNAMIC);
+		isp_write_reg(dev, REG_ADDR(isp_filt_mode), isp_flt_mode);
+		REG_SET_SLICE(isp_flt_mode, MRV_FILT_FILT_ENABLE, 1);
+		isp_write_reg(dev, REG_ADDR(isp_filt_mode), isp_flt_mode);
+		isp_write_reg(dev, REG_ADDR(isp_filt_lum_weight), 0x00032040);
+
+        dev->flt.changed = false;
+	} else {
+        dev->flt.changed = true;
+	}
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_cac(struct isp_ic_dev *dev)
+{
+	struct isp_cac_context *cac = &dev->cac;
+	u32 val = 0;
+	u32 isp_cac_ctrl = isp_read_reg(dev, REG_ADDR(isp_cac_ctrl));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!cac->enable) {
+		REG_SET_SLICE(isp_cac_ctrl, MRV_CAC_CAC_EN, 0);
+		isp_write_reg(dev, REG_ADDR(isp_cac_ctrl), isp_cac_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(isp_cac_ctrl, MRV_CAC_H_CLIP_MODE, cac->hmode);
+	REG_SET_SLICE(isp_cac_ctrl, MRV_CAC_V_CLIP_MODE, cac->vmode);
+	isp_write_reg(dev, REG_ADDR(isp_cac_count_start),
+		      cac->hstart | (cac->vstart << 16));
+	isp_write_reg(dev, REG_ADDR(isp_cac_a), cac->ar | (cac->ab << 16));
+	isp_write_reg(dev, REG_ADDR(isp_cac_b), cac->br | (cac->bb << 16));
+	isp_write_reg(dev, REG_ADDR(isp_cac_c), cac->cr | (cac->cb << 16));
+
+	REG_SET_SLICE(val, MRV_CAC_X_NS, cac->xns);
+	REG_SET_SLICE(val, MRV_CAC_X_NF, cac->xnf);
+	isp_write_reg(dev, REG_ADDR(isp_cac_x_norm), val);
+	val = 0;
+	REG_SET_SLICE(val, MRV_CAC_Y_NS, cac->yns);
+	REG_SET_SLICE(val, MRV_CAC_Y_NF, cac->ynf);
+	isp_write_reg(dev, REG_ADDR(isp_cac_y_norm), val);
+	REG_SET_SLICE(isp_cac_ctrl, MRV_CAC_CAC_EN, 1);
+	isp_write_reg(dev, REG_ADDR(isp_cac_ctrl), isp_cac_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_deg(struct isp_ic_dev *dev)
+{
+	struct isp_deg_context *deg = &dev->deg;
+	int i;
+	u32 isp_gamma_dx_lo = 0;
+	u32 isp_gamma_dx_hi = 0;
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!deg->enable) {
+		REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GAMMA_IN_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+		return 0;
+	}
+
+	for (i = 0; i < 8; i++) {
+		isp_gamma_dx_lo |= deg->segment[i] << (i * 4);
+		isp_gamma_dx_hi |= deg->segment[i + 8] << (i * 4);
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_gamma_dx_lo), isp_gamma_dx_lo);
+	isp_write_reg(dev, REG_ADDR(isp_gamma_dx_hi), isp_gamma_dx_hi);
+
+	for (i = 0; i < 17; i++) {
+		isp_write_reg(dev, REG_ADDR(degamma_r_y_block_arr[i]),
+			      deg->r[i]);
+		isp_write_reg(dev, REG_ADDR(degamma_g_y_block_arr[i]),
+			      deg->g[i]);
+		isp_write_reg(dev, REG_ADDR(degamma_b_y_block_arr[i]),
+			      deg->b[i]);
+	}
+
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GAMMA_IN_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+static u32 get_eff_coeff(int decimal)
+{
+	u32 value = 0;
+
+	if (decimal <= -6)
+		value = 15;
+	else if (decimal <= -3)
+		value = 14;
+	else if (decimal == -2)
+		value = 13;
+	else if (decimal == -1)
+		value = 12;
+	else if (decimal == 0)
+		value = 0;
+	else if (decimal == 1)
+		value = 8;
+	else if (decimal == 2)
+		value = 9;
+	else if (decimal < 6)
+		value = 10;
+	else
+		value = 11;
+
+	return value;
+}
+
+int isp_s_ie(struct isp_ic_dev *dev)
+{
+	struct isp_ie_context *ie = &dev->ie;
+	u32 img_eff_ctrl = isp_read_reg(dev, REG_ADDR(img_eff_ctrl));
+	u32 vi_iccl = isp_read_reg(dev, REG_ADDR(vi_iccl));
+	u32 vi_ircl = isp_read_reg(dev, REG_ADDR(vi_ircl));
+	u32 img_eff_tint = isp_read_reg(dev, REG_ADDR(img_eff_tint));
+	u32 img_eff_color_sel = isp_read_reg(dev, REG_ADDR(img_eff_color_sel));
+	u32 mat[9];
+	u32 sharpen = 0;
+	int i;
+
+	isp_info("enter %s\n", __func__);
+
+	REG_SET_SLICE(vi_ircl, MRV_VI_IE_SOFT_RST, 1);
+	isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+
+	if (!ie->enable) {
+		REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_CFG_UPD,
+			      MRV_IMGEFF_CFG_UPD_UPDATE);
+		REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_BYPASS_MODE,
+			      MRV_IMGEFF_BYPASS_MODE_BYPASS);
+		REG_SET_SLICE(vi_iccl, MRV_VI_IE_CLK_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl);
+		isp_write_reg(dev, REG_ADDR(img_eff_ctrl), img_eff_ctrl);
+		return 0;
+	}
+
+	REG_SET_SLICE(vi_ircl, MRV_VI_IE_SOFT_RST, 0);
+	isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+
+	REG_SET_SLICE(vi_iccl, MRV_VI_IE_CLK_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl);
+	REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_EFFECT_MODE, ie->mode);
+	REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_FULL_RANGE, ie->full_range);
+
+	for (i = 0; i < 9; i++)
+		mat[i] = get_eff_coeff(ie->m[i]);
+
+	if (ie->mode == MRV_IMGEFF_EFFECT_MODE_SEPIA) {
+		img_eff_tint = isp_read_reg(dev, REG_ADDR(img_eff_tint));
+		REG_SET_SLICE(img_eff_tint, MRV_IMGEFF_INCR_CR, ie->tint_cr);
+		REG_SET_SLICE(img_eff_tint, MRV_IMGEFF_INCR_CB, ie->tint_cb);
+		isp_write_reg(dev, REG_ADDR(img_eff_tint), img_eff_tint);
+	} else if (ie->mode == MRV_IMGEFF_EFFECT_MODE_COLOR_SEL) {
+		REG_SET_SLICE(img_eff_color_sel, MRV_IMGEFF_COLOR_SELECTION,
+			      ie->color_sel);
+		REG_SET_SLICE(img_eff_color_sel, MRV_IMGEFF_COLOR_THRESHOLD,
+			      ie->color_thresh);
+		isp_write_reg(dev, REG_ADDR(img_eff_color_sel),
+			      img_eff_color_sel);
+	} else if (ie->mode == MRV_IMGEFF_EFFECT_MODE_EMBOSS) {
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_1),
+			      mat[0] | (mat[1] << 4) | (mat[2] << 8) | (mat[3]
+									<< 12));
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_2),
+			      mat[4] | (mat[5] << 4) | (mat[6] << 8) | (mat[7]
+									<< 12));
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_3), mat[8]);
+	} else if (ie->mode == MRV_IMGEFF_EFFECT_MODE_SKETCH ||
+		   ie->mode == MRV_IMGEFF_EFFECT_MODE_SHARPEN) {
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_3),
+			      (mat[0] << 4) | (mat[1] << 8) | (mat[2] << 12));
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_4),
+			      mat[3] | (mat[4] << 4) | (mat[5] << 8) | (mat[6]
+									<< 12));
+		isp_write_reg(dev, REG_ADDR(img_eff_mat_5),
+			      mat[7] | (mat[8] << 4));
+		REG_SET_SLICE(sharpen, MRV_IMGEFF_SHARP_FACTOR,
+			      ie->sharpen_factor);
+		REG_SET_SLICE(sharpen, MRV_IMGEFF_CORING_THR,
+			      ie->sharpen_thresh);
+		isp_write_reg(dev, REG_ADDR(img_eff_sharpen), sharpen);
+	}
+	REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_CFG_UPD,
+		      MRV_IMGEFF_CFG_UPD_UPDATE);
+	REG_SET_SLICE(img_eff_ctrl, MRV_IMGEFF_BYPASS_MODE,
+		      MRV_IMGEFF_BYPASS_MODE_PROCESS);
+	isp_write_reg(dev, REG_ADDR(img_eff_ctrl), img_eff_ctrl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_vsm(struct isp_ic_dev *dev)
+{
+	struct isp_vsm_context *vsm = &dev->vsm;
+	u32 isp_vsm_mode = isp_read_reg(dev, REG_ADDR(isp_vsm_mode));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!vsm->enable) {
+		REG_SET_SLICE(isp_vsm_mode, ISP_VSM_MEAS_EN, 0);
+		REG_SET_SLICE(isp_vsm_mode, ISP_VSM_MEAS_IRQ_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_vsm_mode), isp_vsm_mode);
+		isp_write_reg(dev, REG_ADDR(isp_imsc),
+			      isp_imsc & ~MRV_ISP_IMSC_VSM_END_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(isp_vsm_h_offs), vsm->window.x);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_v_offs), vsm->window.y);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_h_size),
+		      vsm->window.width & 0xFFFFE);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_v_size),
+		      vsm->window.height & 0xFFFFE);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_h_segments), vsm->h_seg);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_v_segments), vsm->v_seg);
+	REG_SET_SLICE(isp_vsm_mode, ISP_VSM_MEAS_EN, 1);
+	REG_SET_SLICE(isp_vsm_mode, ISP_VSM_MEAS_IRQ_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_vsm_mode), isp_vsm_mode);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_VSM_END_MASK);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_g_vsm(struct isp_ic_dev *dev, struct isp_vsm_result *vsm)
+{
+	isp_info("enter %s\n", __func__);
+	vsm->x = isp_read_reg(dev, REG_ADDR(isp_vsm_delta_h));
+	vsm->y = isp_read_reg(dev, REG_ADDR(isp_vsm_delta_v));
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+#if 0
+u32 get_afm_shift(u32 count, u32 thresh)
+{
+	u32 grad = count;
+	u32 shift = 0;
+
+	while (grad > (thresh)) {
+		++shift;
+		grad >>= 1;
+	}
+
+	return shift;
+}
+#endif
+
+int isp_s_afm(struct isp_ic_dev *dev)
+{
+	struct isp_afm_context *afm = &dev->afm;
+	u32 mask =
+	    (MRV_ISP_IMSC_AFM_FIN_MASK | MRV_ISP_IMSC_AFM_LUM_OF_MASK |
+	     MRV_ISP_IMSC_AFM_SUM_OF_MASK);
+
+	u32 shift = 0;
+	int i;
+
+	u32 isp_afm_ctrl = isp_read_reg(dev, REG_ADDR(isp_afm_ctrl));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+
+	isp_info("enter %s\n", __func__);
+
+	if (!afm->enable) {
+		REG_SET_SLICE(isp_afm_ctrl, MRV_AFM_AFM_EN, 0);
+		isp_imsc &= ~mask;
+		isp_write_reg(dev, REG_ADDR(isp_afm_ctrl), isp_afm_ctrl);
+		isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+		return 0;
+	}
+
+	for (i = 0; i < 3; i++) {
+		isp_write_reg(dev, REG_ADDR(isp_afm_lt_a) + i * 8,
+			      (afm->window[i].x << 16) | afm->window[i].y);
+		isp_write_reg(dev, REG_ADDR(isp_afm_rb_a) + i * 8,
+			      ((afm->window[i].x + afm->window[i].width -
+				1) << 16) | ((afm->window[i].y +
+					      afm->window[i].height - 1)));
+	}
+
+	REG_SET_SLICE(shift, MRV_AFM_LUM_VAR_SHIFT, afm->lum_shift);
+	REG_SET_SLICE(shift, MRV_AFM_AFM_VAR_SHIFT, afm->afm_shift);
+	isp_write_reg(dev, REG_ADDR(isp_afm_var_shift), shift);
+	isp_write_reg(dev, REG_ADDR(isp_afm_thres), afm->thresh);
+	REG_SET_SLICE(isp_afm_ctrl, MRV_AFM_AFM_EN, 1);
+	isp_imsc |= mask;
+	isp_write_reg(dev, REG_ADDR(isp_afm_ctrl), isp_afm_ctrl);
+	isp_write_reg(dev, REG_ADDR(isp_imsc), isp_imsc);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_g_afm(struct isp_ic_dev *dev, struct isp_afm_result *afm)
+{
+	isp_debug("enter %s\n", __func__);
+	afm->sum_a = isp_read_reg(dev, REG_ADDR(isp_afm_sum_a));
+	afm->sum_b = isp_read_reg(dev, REG_ADDR(isp_afm_sum_b));
+	afm->sum_c = isp_read_reg(dev, REG_ADDR(isp_afm_sum_c));
+	afm->lum_a = isp_read_reg(dev, REG_ADDR(isp_afm_lum_a));
+	afm->lum_b = isp_read_reg(dev, REG_ADDR(isp_afm_lum_b));
+	afm->lum_c = isp_read_reg(dev, REG_ADDR(isp_afm_lum_c));
+	isp_debug("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_exp2_inputsel(struct isp_ic_dev *dev)
+{
+#ifndef ISP_AEV2
+	pr_err("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	struct isp_exp2_context *exp2 = &dev->exp2;
+	u32 isp_expv2_ctrl = isp_read_reg(dev, REG_ADDR(isp_expv2_ctrl));
+	REG_SET_SLICE(isp_expv2_ctrl, MRV_AE_ISP_EXPV2_INPUT_SELECT, exp2->input_select);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_ctrl), isp_expv2_ctrl);
+	return 0;
+#endif
+}
+
+int isp_s_exp2_sizeratio(struct isp_ic_dev *dev, u32 h_size)
+{
+#ifndef ISP_AEV2
+	pr_err("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	u32 size_inv;
+	size_inv = isp_read_reg(dev, REG_ADDR(isp_expv2_size_invert));
+	REG_SET_SLICE(size_inv, MRV_AE_ISP_EXPV2_SIZE_INVERT_H, h_size);
+    isp_write_reg(dev, REG_ADDR(isp_expv2_size_invert), size_inv);
+	return 0;
+#endif
+}
+
+int isp_s_exp2(struct isp_ic_dev *dev)
+{
+#ifndef ISP_AEV2
+	//isp_err("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	u32 miv2_ctrl, miv2_mp_fmt, miv2_mp_bus_id, miv2_mp_ctrl, miv2_ctrl_shd;
+	struct isp_exp2_context *exp2 = &dev->exp2;
+	u32 isp_expv2_ctrl = isp_read_reg(dev, REG_ADDR(isp_expv2_ctrl));
+	u32 grid_w, grid_h;
+	u32 size, offset, size_inv, weight;
+
+	isp_info("enter %s\n", __func__);
+	grid_w = ((exp2->window.width - 1) >> 6) << 1;
+	grid_h = ((exp2->window.height - 1) >> 6) << 1;
+
+	if (!exp2->enable) {
+		REG_SET_SLICE(isp_expv2_ctrl, MRV_AE_ISP_EXPV2_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_expv2_ctrl), isp_expv2_ctrl);
+		return 0;
+	}
+	size = 0;
+	REG_SET_SLICE(size, MRV_AE_ISP_EXPV2_SIZE_H, grid_w);
+	REG_SET_SLICE(size, MRV_AE_ISP_EXPV2_SIZE_V, grid_h);
+	offset = 0;
+	REG_SET_SLICE(offset, MRV_AE_ISP_EXPV2_OFFSET_H, exp2->window.x);
+	REG_SET_SLICE(offset, MRV_AE_ISP_EXPV2_OFFSET_V, exp2->window.y);
+	size_inv = 0;
+	REG_SET_SLICE(size_inv, MRV_AE_ISP_EXPV2_SIZE_INVERT_H, (65536 + grid_w/2) / grid_w);
+	REG_SET_SLICE(size_inv, MRV_AE_ISP_EXPV2_SIZE_INVERT_V, (65536 + grid_h/2) / grid_h);
+	weight = 0;
+	REG_SET_SLICE(weight, MRV_AE_ISP_EXPV2_PIX_WEIGHT_R, exp2->r)
+    REG_SET_SLICE(weight, MRV_AE_ISP_EXPV2_PIX_WEIGHT_GR, exp2->gr)
+    REG_SET_SLICE(weight, MRV_AE_ISP_EXPV2_PIX_WEIGHT_GB, exp2->gb)
+    REG_SET_SLICE(weight, MRV_AE_ISP_EXPV2_PIX_WEIGHT_B, exp2->b)
+    isp_write_reg(dev, REG_ADDR(isp_expv2_offset), offset);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_size_invert), size_inv);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_size), size);
+#ifdef ISP_AE_SHADOW
+	isp_write_reg(dev, REG_ADDR(isp_expv2_offset_shd), offset);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_size_invert_shd), size_inv);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_size_shd), size);
+#endif
+	isp_write_reg(dev, REG_ADDR(isp_expv2_pixel_weight), weight);
+
+	miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	REG_SET_SLICE(miv2_ctrl, MP_JDP_PATH_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_base_ad_init), dev->exp2.pa);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_size_init), AEV2_DMA_SIZE);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_offs_cnt_init), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_llength), AEV2_DMA_SIZE);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_pic_width), 1024);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_pic_height), 1);
+	isp_write_reg(dev, REG_ADDR(miv2_mp_jdp_pic_size), AEV2_DMA_SIZE);
+
+	REG_SET_SLICE(isp_expv2_ctrl, MRV_AE_ISP_EXPV2_ENABLE, 1);
+	REG_SET_SLICE(isp_expv2_ctrl, MRV_AE_ISP_EXPV2_INPUT_SELECT, exp2->input_select);
+	isp_write_reg(dev, REG_ADDR(isp_expv2_ctrl), isp_expv2_ctrl);
+
+	miv2_ctrl_shd = isp_read_reg(dev, REG_ADDR(miv2_ctrl_shd));
+	if (!(miv2_ctrl_shd && MP_YCBCR_PATH_ENABLE_MASK) && !(miv2_ctrl_shd && MP_RAW_PATH_ENABLE_MASK)) {
+		miv2_mp_fmt = isp_read_reg(dev, REG_ADDR(miv2_mp_fmt));
+#ifdef ISP_AEV2_V2
+		REG_SET_SLICE(miv2_mp_fmt, MP_WR_JDP_DP_BIT, 1);
+#endif
+		REG_SET_SLICE(miv2_mp_fmt, MP_WR_JDP_FMT, 0);
+		isp_write_reg(dev, REG_ADDR(miv2_mp_fmt), miv2_mp_fmt);
+
+		miv2_mp_bus_id = isp_read_reg(dev, REG_ADDR(miv2_mp_bus_id));
+		REG_SET_SLICE(miv2_mp_bus_id, MP_BUS_SW_EN, 1);
+		REG_SET_SLICE(miv2_mp_bus_id, MP_WR_ID_EN, 1);
+		isp_write_reg(dev, REG_ADDR(miv2_mp_bus_id), miv2_mp_bus_id);
+
+		miv2_mp_ctrl = isp_read_reg(dev, REG_ADDR(miv2_mp_ctrl));
+		REG_SET_SLICE(miv2_mp_ctrl, MP_AUTO_UPDATE, 1);
+		REG_SET_SLICE(miv2_mp_ctrl, MP_INIT_BASE_EN, 1);
+		REG_SET_SLICE(miv2_mp_ctrl, MP_INIT_OFFSET_EN, 1);
+		isp_write_reg(dev, REG_ADDR(miv2_mp_ctrl), miv2_mp_ctrl);
+	}
+	isp_info("exit %s\n", __func__);
+
+	return 0;
+#endif
+}
+
+int isp_s_2dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_2DNR
+	//isp_err("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	struct isp_2dnr_context *dnr2 = &dev->dnr2;
+	u32 isp_denoise2d_control =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise2d_control));
+	u32 value, addr, strength;
+	u32 isp_ctrl;
+	int i;
+
+	/*isp_info("enter %s\n", __func__);*/
+
+	if (!dnr2->enable) {
+#ifndef ISP_2DNR_V4
+		REG_SET_SLICE(isp_denoise2d_control, ISP_2DNR_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_denoise2d_control),
+			      isp_denoise2d_control);
+#else
+		value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+		REG_SET_SLICE(value, DENOISE3D_V20_NLM_ENABLE, 0);
+		if((value & DENOISE3D_V20_TNR_ENABLE_MASK) == 0)
+			REG_SET_SLICE(value, DENOISE3D_V20_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl),
+			      value);
+
+#endif
+		return 0;
+	}
+
+	strength = isp_read_reg(dev, REG_ADDR(isp_denoise2d_strength));
+	REG_SET_SLICE(strength, ISP_2DNR_PRGAMMA_STRENGTH, dnr2->pre_gamma);
+	REG_SET_SLICE(strength, ISP_2DNR_STRENGTH, dnr2->strength);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_strength), strength);
+
+	addr = REG_ADDR(isp_denoise2d_sigma_y[0]);
+	for (i = 0; i < 60; i += 5) {
+		value = 0;
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY0, dnr2->sigma[i]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY1, dnr2->sigma[i + 1]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY2A,
+			      dnr2->sigma[i + 2] >> 6);
+		isp_write_reg(dev, addr, value);
+		value = 0;
+		addr += 4;
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY2B,
+			      dnr2->sigma[i + 2] & 0x3f);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY0, dnr2->sigma[i + 3]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY1, dnr2->sigma[i + 4]);
+		isp_write_reg(dev, addr, value);
+		addr += 4;
+	}
+
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	REG_SET_SLICE(isp_denoise2d_control, ISP_2DNR_ENABLE, 1);
+
+#if defined(ISP_2DNR_V2) ||  defined(ISP_2DNR_V4)
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_sigma_sqr), dnr2->sigma_sqr);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_sigma_sqr_shd),
+		      dnr2->sigma_sqr);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_weight_mul_factor),
+		      dnr2->weight);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_weight_mul_factor_shd),
+		      dnr2->weight);
+	/* refer to HW spec for HBLANK */
+	//isp_write_reg(dev, REG_ADDR(isp_denoise2d_dummy_hblank), 0);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_strength_shd), strength);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_control_shd),
+		      isp_denoise2d_control);
+#endif
+
+#ifndef ISP_2DNR_V4
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_control),
+		      isp_denoise2d_control);
+#else
+	value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_blending));
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_OFFSET, dnr2->str_off);
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_MAX, dnr2->str_max);
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_SLOPE, dnr2->str_slope);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_blending), value);
+	value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_ENABLE, 1);
+	REG_SET_SLICE(value, DENOISE3D_V20_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl),
+				value);
+#endif
+	/*isp_info("exit %s\n", __func__);*/
+	return 0;
+#endif
+}
+
+int isp_s_simp(struct isp_ic_dev *dev)
+{
+	struct isp_simp_context *simp = &dev->simp;
+	u32 vi_ircl = isp_read_reg(dev, REG_ADDR(vi_ircl));
+	u32 vi_iccl = isp_read_reg(dev, REG_ADDR(vi_iccl));
+	u32 super_imp_ctrl = isp_read_reg(dev, REG_ADDR(super_imp_ctrl));
+
+	isp_info("enter %s\n", __func__);
+
+	REG_SET_SLICE(vi_ircl, MRV_VI_SIMP_SOFT_RST, 1);
+	isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+
+	if (!simp->enable) {
+		REG_SET_SLICE(vi_iccl, MRV_VI_SIMP_CLK_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl);
+		return 0;
+	}
+
+	REG_SET_SLICE(vi_ircl, MRV_VI_SIMP_SOFT_RST, 0);
+	isp_write_reg(dev, REG_ADDR(super_imp_offset_x), simp->x);
+	isp_write_reg(dev, REG_ADDR(super_imp_offset_y), simp->y);
+	isp_write_reg(dev, REG_ADDR(super_imp_color_y), simp->r);
+	isp_write_reg(dev, REG_ADDR(super_imp_color_cb), simp->g);
+	isp_write_reg(dev, REG_ADDR(super_imp_color_cr), simp->b);
+	REG_SET_SLICE(super_imp_ctrl, MRV_SI_TRANSPARENCY_MODE,
+		      simp->transparency_mode);
+	REG_SET_SLICE(super_imp_ctrl, MRV_SI_REF_IMAGE, simp->ref_image);
+	isp_write_reg(dev, REG_ADDR(super_imp_ctrl), super_imp_ctrl);
+	isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+	REG_SET_SLICE(vi_iccl, MRV_VI_SIMP_CLK_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl);
+	isp_info("exit %s\n", __func__);
+	return 0;
+}
+
+int isp_s_cproc(struct isp_ic_dev *dev)
+{
+	struct isp_cproc_context *cproc = &dev->cproc;
+	u32 vi_iccl = isp_read_reg(dev, REG_ADDR(vi_iccl));
+	u32 cproc_ctrl = isp_read_reg(dev, REG_ADDR(cproc_ctrl));
+
+	//REG_SET_SLICE(vi_ircl, MRV_VI_CP_SOFT_RST, 1);
+	//isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+
+	//if there is no shd register. should update cporc register in isp frame end irq.
+#ifndef ISP_CPROC_SHD
+	if(dev->cproc.changed || !is_isp_enable(dev))
+	{
+#endif
+		/*isp_info("enter %s %d\n", __func__, cproc->enable);*/
+		if (!cproc->enable) {
+			REG_SET_SLICE(cproc_ctrl, MRV_CPROC_CPROC_ENABLE, 0);
+			/*      REG_SET_SLICE(vi_iccl, MRV_VI_CP_CLK_ENABLE, 0); */
+			/*      isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl); */
+			isp_write_reg(dev, REG_ADDR(cproc_ctrl), cproc_ctrl);
+			return 0;
+		}
+
+		//REG_SET_SLICE(vi_ircl, MRV_VI_CP_SOFT_RST, 0);
+		//isp_write_reg(dev, REG_ADDR(vi_ircl), vi_ircl);
+		isp_write_reg(dev, REG_ADDR(cproc_contrast), cproc->contrast);
+		isp_write_reg(dev, REG_ADDR(cproc_brightness), cproc->brightness);
+		isp_write_reg(dev, REG_ADDR(cproc_saturation), cproc->saturation);
+		isp_write_reg(dev, REG_ADDR(cproc_hue), cproc->hue);
+		REG_SET_SLICE(cproc_ctrl, MRV_CPROC_CPROC_ENABLE, 1);
+		REG_SET_SLICE(cproc_ctrl, MRV_CPROC_CPROC_C_OUT_RANGE,
+				cproc->c_out_full);
+		REG_SET_SLICE(cproc_ctrl, MRV_CPROC_CPROC_Y_OUT_RANGE,
+				cproc->y_out_full);
+		REG_SET_SLICE(cproc_ctrl, MRV_CPROC_CPROC_Y_IN_RANGE, cproc->y_in_full);
+		REG_SET_SLICE(vi_iccl, MRV_VI_CP_CLK_ENABLE, 1);
+		isp_write_reg(dev, REG_ADDR(vi_iccl), vi_iccl);
+		isp_write_reg(dev, REG_ADDR(cproc_ctrl), cproc_ctrl);
+
+#ifndef ISP_CPROC_SHD
+		dev->cproc.changed = false;
+	} else {
+        dev->cproc.changed = true;
+	}
+#endif
+	/*isp_info("exit %s\n", __func__);*/
+	return 0;
+}
+
+int isp_s_elawb(struct isp_ic_dev *dev)
+{
+	struct isp_elawb_context *elawb = &dev->elawb;
+	u32 awb_meas_mode = isp_read_reg(dev, REG_ADDR(awb_meas_mode));
+	u32 isp_imsc = isp_read_reg(dev, REG_ADDR(isp_imsc));
+	u32 id = elawb->id;
+	u32 data;
+
+	if (!elawb->enable) {
+		REG_SET_SLICE(awb_meas_mode, ISP_AWB_MEAS_IRQ_ENABLE, 0);
+		REG_SET_SLICE(awb_meas_mode, ISP_AWB_MEAS_EN, 0);
+		isp_write_reg(dev, REG_ADDR(awb_meas_mode), awb_meas_mode);
+		isp_write_reg(dev, REG_ADDR(isp_imsc),
+			      isp_imsc & ~MRV_ISP_IMSC_AWB_DONE_MASK);
+		return 0;
+	}
+
+	isp_write_reg(dev, REG_ADDR(awb_meas_h_offs), elawb->window.x);
+	isp_write_reg(dev, REG_ADDR(awb_meas_v_offs), elawb->window.y);
+	isp_write_reg(dev, REG_ADDR(awb_meas_h_size), elawb->window.width);
+	isp_write_reg(dev, REG_ADDR(awb_meas_v_size), elawb->window.height);
+
+	if (id > 0 && id < 9) {
+		isp_write_reg(dev, REG_ADDR(awb_meas_center[id - 1].x),
+			      elawb->info[id - 1].x);
+		isp_write_reg(dev, REG_ADDR(awb_meas_center[id - 1].y),
+			      elawb->info[id - 1].y);
+		isp_write_reg(dev, REG_ADDR(awb_meas_axis[id - 1].a1),
+			      elawb->info[id - 1].a1);
+		isp_write_reg(dev, REG_ADDR(awb_meas_axis[id - 1].a2),
+			      elawb->info[id - 1].a2);
+		isp_write_reg(dev, REG_ADDR(awb_meas_axis[id - 1].a3),
+			      elawb->info[id - 1].a3);
+		isp_write_reg(dev, REG_ADDR(awb_meas_axis[id - 1].a4),
+			      elawb->info[id - 1].a4);
+		isp_write_reg(dev, REG_ADDR(awb_meas_rmax[id - 1]),
+			      elawb->info[id - 1].r_max_sqr);
+	}
+
+	data = 0;
+	REG_SET_SLICE(data, MRV_ISP_AWB_GAIN_R, elawb->r);
+	REG_SET_SLICE(data, MRV_ISP_AWB_GAIN_B, elawb->b);
+	isp_write_reg(dev, REG_ADDR(isp_awb_gain_rb), data);
+	data = 0;
+	REG_SET_SLICE(data, MRV_ISP_AWB_GAIN_GR, elawb->gr);
+	REG_SET_SLICE(data, MRV_ISP_AWB_GAIN_GB, elawb->gb);
+	isp_write_reg(dev, REG_ADDR(isp_awb_gain_g), data);
+
+	REG_SET_SLICE(awb_meas_mode, ISP_AWB_MEAS_IRQ_ENABLE, 1);
+	REG_SET_SLICE(awb_meas_mode, ISP_AWB_MEAS_EN, 1);
+	isp_write_reg(dev, REG_ADDR(awb_meas_mode), awb_meas_mode);
+	isp_write_reg(dev, REG_ADDR(isp_imsc),
+		      isp_imsc | MRV_ISP_IMSC_AWB_DONE_MASK);
+
+	return 0;
+}
+
+int isp_ioc_qcap(struct isp_ic_dev *dev, void __user *args)
+{
+
+	/* use public VIDIOC_QUERYCAP to query the type of v4l-subdevs. */
+#ifdef __KERNEL__
+#ifndef USE_FPGA
+	struct v4l2_capability *cap = (struct v4l2_capability *)args;
+	strcpy((char *)cap->driver, "viv_isp_subdev");
+	cap->bus_info[0] = (__u8)dev->id;//isp channel id
+#else
+	struct v4l2_capability cap;
+	strcpy((char *)cap.driver, "viv_isp_subdev");
+	cap.bus_info[0] = (__u8)dev->id;//isp channel id
+	isp_info("enter %s viv_isp_subdev\n", __func__);
+	viv_check_retval(copy_to_user
+			 ((struct v4l2_capability *)args, &cap, sizeof(cap)));
+#endif
+#endif
+	return 0;
+}
+
+int isp_ioc_g_status(struct isp_ic_dev *dev, void __user *args)
+{
+	u32 val = 0;
+	/* val = isp_read_reg(REG_ADDR(isp_feature_version)); */
+	viv_check_retval(copy_to_user(args, &val, sizeof(val)));
+	return 0;
+}
+
+static u32 getScaleFactor(u32 src, u32 dst)
+{
+	if (dst > src) {
+		return ((65536 * (src - 1)) / (dst - 1));
+	} else if (dst < src) {
+		return ((65536 * (dst - 1)) / (src - 1)) + 1;
+	}
+	return 65536;
+}
+
+int isp_set_scaling(int id, struct isp_ic_dev *dev, bool stabilization, bool crop)
+{
+	u32 addr, ctrl;
+	u32 iw, ih, ow, oh;
+	u32 inputWidth, inputHeight, outputWidth, outputHeight;
+	u32 scale_hy, scale_hcb, scale_hcr, scale_vy, scale_vc;
+	struct isp_mi_data_path_context *path = &dev->mi.path[id];
+	if (crop)  {		//enabled crop.Do not need to scaler.
+	    isp_info("%s:The crop enabled ,So does not need to do scaler.\n", __func__);
+		return 0;
+	}
+	if (id == IC_MI_PATH_MAIN) {	/* mp */
+		addr = REG_ADDR(mrsz_ctrl);
+	} else if (id == IC_MI_PATH_SELF) {	/* sp */
+		addr = REG_ADDR(srsz_ctrl);
+	} else if (id == IC_MI_PATH_SELF2) {	/* sp2 */
+		addr = REG_ADDR(srsz2_ctrl);
+	} else {
+		return -EFAULT;
+	}
+
+	inputWidth = path->in_width;
+	inputHeight = path->in_height;
+	outputWidth = path->out_width;
+	outputHeight = path->out_height;
+
+	if (stabilization) {	/* enabled image stabilization. */
+		inputWidth = isp_read_reg(dev, REG_ADDR(isp_is_h_size));
+		inputHeight = isp_read_reg(dev, REG_ADDR(isp_is_v_size));
+	}
+
+	ctrl = isp_read_reg(dev, addr);
+	iw = inputWidth / 2;
+	ih = inputHeight;
+	ow = outputWidth / 2;
+	oh = outputHeight;
+
+	switch (path->in_mode) {
+	case IC_MI_DATAMODE_YUV422:
+		oh = outputHeight;
+		break;
+	case IC_MI_DATAMODE_YUV420:
+		oh = outputHeight / 2;	/*  scale cbcr */
+		break;
+	case IC_MI_DATAMODE_YUV444:
+		oh = outputHeight;
+		break;
+	case IC_MI_DATAMODE_RGB888:
+		oh = outputHeight;
+		break;
+	default:
+		return -EFAULT;
+	}
+
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HY_ENABLE,
+		      inputWidth != outputWidth);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VY_ENABLE,
+		      inputHeight != outputHeight);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HY_UP, inputWidth < outputWidth);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VY_UP, inputHeight < outputHeight);
+	scale_hy = getScaleFactor(inputWidth, outputWidth);
+	scale_vy = getScaleFactor(inputHeight, outputHeight);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HC_ENABLE, iw != ow);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VC_ENABLE, ih != oh);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HC_UP, iw < ow);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VC_UP, ih < oh);
+	scale_hcr = getScaleFactor(iw, ow);
+	scale_hcb = getScaleFactor(iw, ow);
+	scale_vc = getScaleFactor(ih, oh);
+
+	/*Need to update immediately*/
+	REG_SET_SLICE(ctrl, MRV_MRSZ_CFG_UPD, 1);
+
+	if (id == IC_MI_PATH_MAIN) {
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_vc), scale_vc);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_vy), scale_vy);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hcr), scale_hcr);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hcb), scale_hcb);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hy), scale_hy);
+		isp_write_reg(dev, REG_ADDR(mrsz_ctrl), ctrl);
+	} else if (id == IC_MI_PATH_SELF) {
+		isp_write_reg(dev, REG_ADDR(srsz_scale_vc), scale_vc);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_vy), scale_vy);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hcr), scale_hcr);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hcb), scale_hcb);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hy), scale_hy);
+		isp_write_reg(dev, REG_ADDR(srsz_ctrl), ctrl);
+	} else if (id == IC_MI_PATH_SELF2) {
+		isp_write_reg(dev, REG_ADDR(srsz2_scale_vc), scale_vc);
+		isp_write_reg(dev, REG_ADDR(srsz2_scale_vy), scale_vy);
+		isp_write_reg(dev, REG_ADDR(srsz2_scale_hcr), scale_hcr);
+		isp_write_reg(dev, REG_ADDR(srsz2_scale_hcb), scale_hcb);
+		isp_write_reg(dev, REG_ADDR(srsz2_scale_hy), scale_hy);
+		isp_write_reg(dev, REG_ADDR(srsz2_ctrl), ctrl);
+	}
+
+	return 0;
+}
+
+typedef struct isp_crop_reg_s {
+	u32 crop_ctrl_addr;
+	u32 crop_x_dir_addr;
+	u32 crop_y_dir_addr;
+} isp_crop_reg_t;
+
+int isp_set_crop(struct isp_ic_dev *dev)
+{
+	long ret = 0;
+	u32 crop_ctrl, crop_x_dir, crop_y_dir;
+	u8 i;
+
+	isp_crop_reg_t crop_reg[ISP_MI_PATH_SP2_BP + 1] = {
+		{
+			REG_ADDR(mrsz_ctrl),
+			REG_ADDR(mrsz_phase_crop_x),
+			REG_ADDR(mrsz_phase_crop_y)
+		},
+		{
+			REG_ADDR(srsz_ctrl),
+			REG_ADDR(srsz_phase_crop_x),
+			REG_ADDR(srsz_phase_crop_y)
+		},
+		{
+			REG_ADDR(srsz2_ctrl),
+			REG_ADDR(srsz2_phase_crop_x),
+			REG_ADDR(srsz2_phase_crop_y)
+		}
+		};
+
+	struct isp_crop_context *crop = dev->crop;
+	for ( i = 0; i <= ISP_MI_PATH_SP2_BP; i++) {
+		 crop_ctrl = isp_read_reg(dev, crop_reg[i].crop_ctrl_addr);
+		 crop_x_dir = isp_read_reg(dev, crop_reg[i].crop_x_dir_addr);
+		 crop_y_dir = isp_read_reg(dev, crop_reg[i].crop_y_dir_addr);
+		 if (!crop[i].enabled) {
+#ifndef ISP8000NANO_BASE
+			REG_SET_SLICE(crop_ctrl, MRV_MRSZ_CROP_ENABLE, 0);
+#endif
+			isp_write_reg(dev, crop_reg[i].crop_ctrl_addr, crop_ctrl);
+			 continue;
+		 }
+		 REG_SET_SLICE(crop_x_dir, MRV_MRSZ_PHASE_H_START, crop[i].window.x);
+		 REG_SET_SLICE(crop_y_dir, MRV_MRSZ_PHASE_V_START, crop[i].window.y);
+		 REG_SET_SLICE(crop_x_dir, MRV_MRSZ_PHASE_H_END, crop[i].window.width + crop[i].window.x - 1);  //x_end = x + width -1
+		 REG_SET_SLICE(crop_y_dir, MRV_MRSZ_PHASE_V_END, crop[i].window.height + crop[i].window.y - 1); //y_end = y + height -1
+
+#ifndef ISP8000NANO_BASE
+			REG_SET_SLICE(crop_ctrl, MRV_MRSZ_CROP_ENABLE, 1);
+		 /*Need to update immediately*/
+		 REG_SET_SLICE(crop_ctrl, MRV_MRSZ_CFG_UPD, 1);
+#endif
+
+		 isp_write_reg(dev, crop_reg[i].crop_x_dir_addr, crop_x_dir);
+		 isp_write_reg(dev, crop_reg[i].crop_y_dir_addr, crop_y_dir);
+		 isp_write_reg(dev, crop_reg[i].crop_ctrl_addr, crop_ctrl);
+
+	}
+	return ret;
+}
+
+int isp_ioc_g_feature(struct isp_ic_dev *dev, void __user *args)
+{
+	u32 val = 0;
+
+#ifdef ISP_EE
+	val |= ISP_EE_SUPPORT;
+#endif
+#ifdef ISP_WDR3
+	val |= ISP_WDR3_SUPPORT;
+#endif
+#ifdef ISP_2DNR
+	val |= ISP_2DNR_SUPPORT;
+#endif
+#ifdef ISP_3DNR
+	val |= ISP_3DNR_SUPPORT;
+#endif
+#ifdef ISP_WDR_V3
+	val |= ISP_WDR3_SUPPORT;
+#endif
+#ifdef ISP_MIV2
+	val |= ISP_MIV2_SUPPORT;
+#endif
+#ifdef ISP_AEV2
+	val |= ISP_AEV2_SUPPORT;
+#endif
+#ifdef ISP_HDR_STITCH
+	val |= ISP_HDR_STITCH_SUPPORT;
+#endif
+	viv_check_retval(copy_to_user(args, &val, sizeof(val)));
+
+	return 0;
+}
+
+int isp_ioc_g_feature_veresion(struct isp_ic_dev *dev, void __user *args)
+{
+	u32 val = 0;
+
+	/* val = isp_read_reg(REG_ADDR(isp_feature_version)); */
+	viv_check_retval(copy_to_user(args, &val, sizeof(val)));
+
+	return 0;
+}
+
+static long isp_get_extmem(struct isp_ic_dev *dev, void __user *args)
+{
+    #define UT_USED_SIZE 0x01000000
+	long ret = 0;
+    struct isp_extmem_info ext_mem;
+
+    dev->ut_addr = dma_alloc_coherent(dev->device, UT_USED_SIZE, &dev->ut_phy_addr, GFP_KERNEL);
+    if (dev->ut_addr != NULL) {
+        ext_mem.addr = dev->ut_phy_addr;
+        ext_mem.size = UT_USED_SIZE;
+    } else {
+        return -1;
+    }
+
+    ret = copy_to_user(args, &ext_mem, sizeof(struct isp_extmem_info));
+
+	return ret;
+}
+
+long isp_priv_ioctl(struct isp_ic_dev *dev, unsigned int cmd, void __user *args)
+{
+	int ret = -1;
+	if (!dev) {
+		return ret;
+	}
+	/*pr_info("[%s:%d]cmd 0x%08x\n", __func__, __LINE__, cmd);*/
+	switch (cmd) {
+	case ISPIOC_RESET:
+		if((ret = isp_mi_stop(dev)) != 0 )
+		{
+			pr_err("[%s:%d]stop mi error before resetting!\n", __func__, __LINE__);
+			break;
+		}
+		if((ret = isp_stop_stream(dev)) != 0)
+		{
+			pr_err("[%s:%d]stop isp stream before resetting!\n", __func__, __LINE__);
+			break;
+		}
+		ret = isp_reset(dev);
+		break;
+
+	case ISPIOC_WRITE_REG:
+		ret = isp_ioc_write_reg(dev, args);
+		break;
+	case ISPIOC_READ_REG:
+		ret = isp_ioc_read_reg(dev, args);
+		break;
+	case ISPIOC_GET_MIS:
+		ret = isp_ioc_read_mis(dev, args);
+		break;
+	case ISPIOC_ENABLE_TPG:
+		ret = isp_enable_tpg(dev);
+		break;
+	case ISPIOC_DISABLE_TPG:
+		ret = isp_disable_tpg(dev);
+		break;
+	case ISPIOC_ENABLE_BLS:
+		ret = isp_enable_bls(dev);
+		break;
+	case ISPIOC_DISABLE_BLS:
+		ret = isp_disable_bls(dev);
+		break;
+	case ISPIOC_START_DMA_READ:
+		ret = isp_ioc_start_dma_read(dev, args);
+		break;
+	case ISPIOC_CFG_DMA:
+		ret = isp_ioc_cfg_dma(dev, args);
+		break;
+	case ISPIOC_MI_STOP:
+		ret = isp_mi_stop(dev);
+		break;
+	case ISPIOC_DISABLE_ISP_OFF:
+		ret = isp_ioc_disable_isp_off(dev, args);
+		break;
+	case ISPIOC_ISP_STOP:
+		ret = isp_stop_stream(dev);
+		if(!ret) {
+			dev->streaming = false;
+		}
+		break;
+	case ISPIOC_ENABLE:
+		ret = isp_enable(dev);
+		break;
+	case ISPIOC_DISABLE:
+		ret = isp_disable(dev);
+		break;
+	case ISPIOC_ISP_STATUS:{
+		bool enable = is_isp_enable(dev);
+		viv_check_retval(copy_to_user
+				 (args, &enable, sizeof(bool)));
+		ret = 0;
+		break;
+		}
+	case ISPIOC_ENABLE_LSC:
+		ret = isp_enable_lsc(dev);
+		break;
+	case ISPIOC_DISABLE_LSC:
+		ret = isp_disable_lsc(dev);
+		break;
+	case ISPIOC_S_DIGITAL_GAIN:
+		viv_check_retval(copy_from_user
+				 (&dev->dgain, args, sizeof(dev->dgain)));
+		ret = isp_s_digital_gain(dev);
+		break;
+#ifdef ISP_DEMOSAIC2
+	case ISPIOC_S_DMSC_INTP:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.intp, args,
+				  sizeof(dev->demosaic.intp)));
+		ret = isp_set_dmsc_intp(dev);
+		break;
+	case ISPIOC_S_DMSC_DMOI:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.demoire, args,
+				  sizeof(dev->demosaic.demoire)));
+		ret = isp_set_dmsc_dmoi(dev);
+		break;
+	case ISPIOC_S_DMSC_SKIN:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.skin, args,
+				  sizeof(dev->demosaic.skin)));
+		ret = isp_set_dmsc_skin(dev);
+		break;
+	case ISPIOC_S_DMSC_SHAP:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.sharpen, args,
+				  sizeof(dev->demosaic.sharpen)));
+		ret = isp_set_dmsc_sharpen(dev);
+		break;
+	case ISPIOC_S_DMSC_SHAP_LINE:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.sharpenLine, args,
+				  sizeof(dev->demosaic.sharpenLine)));
+		ret = isp_set_dmsc_sharpen_line(dev);
+		break;
+	case ISPIOC_S_DMSC_CAC:
+		viv_check_retval(copy_from_user
+				 (&dev->cac, args, sizeof(dev->cac)));
+
+		ret = isp_set_dmsc_cac(dev);
+		break;
+	case ISPIOC_S_DMSC_DEPURPLE:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.depurple, args,
+				  sizeof(dev->demosaic.depurple)));
+		ret = isp_set_dmsc_depurple(dev);
+		break;
+	case ISPIOC_S_DMSC_GFILTER:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic.gFilter, args,
+				  sizeof(dev->demosaic.gFilter)));
+		ret = isp_set_dmsc_gfilter(dev);
+		break;
+	case ISPIOC_S_DMSC:
+		viv_check_retval(copy_from_user
+				 (&dev->demosaic, args, sizeof(dev->demosaic)));
+		ret = isp_s_dmsc(dev);
+		break;
+#endif
+	case ISPIOC_ENABLE_AWB:
+		ret = isp_enable_awb(dev);
+		break;
+	case ISPIOC_DISABLE_AWB:
+		ret = isp_disable_awb(dev);
+		break;
+	case ISPIOC_ENABLE_WB:
+		ret = isp_enable_wb(dev, 1);
+		break;
+	case ISPIOC_DISABLE_WB:
+		ret = isp_enable_wb(dev, 0);
+		break;
+	case ISPIOC_ENABLE_GAMMA_OUT:
+		ret = isp_enable_gamma_out(dev, 1);
+		break;
+	case ISPIOC_DISABLE_GAMMA_OUT:
+		ret = isp_enable_gamma_out(dev, 0);
+		break;
+#if defined(ISP_3DNR) || defined(ISP_3DNR_V2_V1)
+	case ISPIOC_R_3DNR:
+		viv_check_retval(copy_from_user
+				 (&dev->dnr3, args, sizeof(dev->dnr3)));
+		ret = isp_r_3dnr(dev);
+		break;
+#endif
+	case ISPIOC_S_IS:
+		viv_check_retval(copy_from_user
+				 (&dev->is, args, sizeof(dev->is)));
+		ret = isp_s_is(dev);
+		break;
+	case ISPIOC_S_RAW_IS:
+		viv_check_retval(copy_from_user
+				 (&dev->rawis, args, sizeof(dev->rawis)));
+		ret = isp_s_raw_is(dev);
+		break;
+	case ISPIOC_S_CC:
+		viv_check_retval(copy_from_user
+				 (&dev->cc, args, sizeof(dev->cc)));
+		ret = isp_s_cc(dev);
+		break;
+	case ISPIOC_S_EE:
+		viv_check_retval(copy_from_user
+				 (&dev->ee, args, sizeof(dev->ee)));
+		ret = isp_s_ee(dev);
+		break;
+	case ISPIOC_S_IE:
+		viv_check_retval(copy_from_user
+				 (&dev->ie, args, sizeof(dev->ie)));
+		ret = isp_s_ie(dev);
+		break;
+	case ISPIOC_S_TPG:
+		viv_check_retval(copy_from_user
+				 (&dev->tpg, args, sizeof(dev->tpg)));
+		ret = isp_s_tpg(dev);
+		break;
+	case ISPIOC_S_BLS:
+		viv_check_retval(copy_from_user
+				 (&dev->bls, args, sizeof(dev->bls)));
+		ret = isp_s_bls(dev);
+		break;
+	case ISPIOC_BYPASS_MCM:
+		viv_check_retval(copy_from_user
+		(&dev->mcm, args, sizeof(dev->mcm)));
+		ret = isp_bypass_mcm(dev);
+		break;
+	case ISPIOC_S_MCM_WR:
+		viv_check_retval(copy_from_user
+		(&dev->mcm, args, sizeof(dev->mcm)));
+		ret = isp_s_mcm_wr(dev);
+		break;
+	case ISPIOC_S_MUX:
+		viv_check_retval(copy_from_user
+				 (&dev->mux, args, sizeof(dev->mux)));
+		ret = isp_s_mux(dev);
+		break;
+	case ISPIOC_S_AWB:
+		viv_check_retval(copy_from_user
+				 (&dev->awb, args, sizeof(dev->awb)));
+		ret = isp_s_awb(dev);
+		break;
+	case ISPIOC_S_LSC_TBL:
+		viv_check_retval(copy_from_user
+				 (&dev->lsc, args, sizeof(dev->lsc)));
+		ret = isp_s_lsc_tbl(dev);
+		break;
+    case ISPIOC_S_LSC_SEC:
+        viv_check_retval(copy_from_user
+                 (&dev->lsc, args, sizeof(dev->lsc)));
+        ret = isp_s_lsc_sec(dev);
+        break;
+	case ISPIOC_S_DPF:
+		viv_check_retval(copy_from_user
+				 (&dev->dpf, args, sizeof(dev->dpf)));
+		ret = isp_s_dpf(dev);
+		break;
+	case ISPIOC_S_EXP:
+		viv_check_retval(copy_from_user
+				 (&dev->exp, args, sizeof(dev->exp)));
+		ret = isp_s_exp(dev);
+		break;
+	case ISPIOC_S_HDREXP:
+		viv_check_retval(copy_from_user
+				 (&dev->hdrexp, args, sizeof(dev->hdrexp)));
+		ret = isp_s_hdrexp(dev);
+		break;
+	case ISPIOC_S_CNR:
+		viv_check_retval(copy_from_user
+				 (&dev->cnr, args, sizeof(dev->cnr)));
+		ret = isp_s_cnr(dev);
+		break;
+	case ISPIOC_S_FLT:
+	{
+		viv_check_retval(copy_from_user
+				 (&dev->flt, args, sizeof(dev->flt)));
+	    ret = isp_s_flt(dev);
+
+		break;
+	}
+	case ISPIOC_S_CAC:
+		viv_check_retval(copy_from_user
+				 (&dev->cac, args, sizeof(dev->cac)));
+		ret = isp_s_cac(dev);
+		break;
+	case ISPIOC_S_DEG:
+		viv_check_retval(copy_from_user
+				 (&dev->deg, args, sizeof(dev->deg)));
+		ret = isp_s_deg(dev);
+		break;
+	case ISPIOC_S_VSM:
+		viv_check_retval(copy_from_user
+				 (&dev->vsm, args, sizeof(dev->vsm)));
+		ret = isp_s_vsm(dev);
+		break;
+	case ISPIOC_S_AFM:
+		viv_check_retval(copy_from_user
+				 (&dev->afm, args, sizeof(dev->afm)));
+		ret = isp_s_afm(dev);
+		break;
+	case ISPIOC_S_HDR:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		ret = isp_s_hdr(dev);
+		break;
+	case ISPIOC_ENABLE_HDR:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		ret = isp_enable_hdr(dev);
+		break;
+	case ISPIOC_DISABLE_HDR:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		ret = isp_disable_hdr(dev);
+		break;
+	case ISPIOC_S_HIST:
+		viv_check_retval(copy_from_user
+				 (&dev->hist, args, sizeof(dev->hist)));
+		ret = isp_s_hist(dev);
+		break;
+	case ISPIOC_S_HDRHIST:
+		viv_check_retval(copy_from_user
+				 (&dev->hdrhist, args, sizeof(dev->hdrhist)));
+		ret = isp_s_hdrhist(dev);
+		break;
+#ifdef ISP_HIST64
+	case ISPIOC_S_HIST64:
+		viv_check_retval(copy_from_user
+				 (&dev->hist64, args, sizeof(dev->hist64)));
+		ret = isp_s_hist64(dev);
+		break;
+	case ISPIOC_U_HIST64:
+		viv_check_retval(copy_from_user
+				 (&dev->hist64, args, sizeof(dev->hist64)));
+		ret = isp_update_hist64(dev);
+		break;
+#endif
+	case ISPIOC_S_DPCC:
+		viv_check_retval(copy_from_user
+				 (&dev->dpcc, args, sizeof(dev->dpcc)));
+		ret = isp_s_dpcc(dev);
+		break;
+	case ISPIOC_ENABLE_WDR3:
+		ret = isp_enable_wdr3(dev);
+		break;
+	case ISPIOC_DISABLE_WDR3:
+		ret = isp_disable_wdr3(dev);
+		break;
+	case ISPIOC_U_WDR3:
+		viv_check_retval(copy_from_user
+				 (&dev->wdr3, args, sizeof(dev->wdr3)));
+		ret = isp_u_wdr3(dev);
+		break;
+	case ISPIOC_S_WDR3:
+		viv_check_retval(copy_from_user
+				 (&dev->wdr3, args, sizeof(dev->wdr3)));
+		ret = isp_s_wdr3(dev);
+		break;
+#ifdef ISP_WDR_V4
+    case ISPIOC_ENABLE_WDR4:
+        ret = isp_enable_wdr4(dev);
+        break;
+    case ISPIOC_DISABLE_WDR4:
+        ret = isp_disable_wdr4(dev);
+        break;
+    case ISPIOC_U_WDR4:
+        viv_check_retval(copy_from_user
+                 (&dev->wdr4, args, sizeof(dev->wdr4)));
+        ret = isp_u_wdr4(dev);
+        break;
+    case ISPIOC_S_WDR4:
+        viv_check_retval(copy_from_user
+                 (&dev->wdr4, args, sizeof(dev->wdr4)));
+        ret = isp_s_wdr4(dev);
+        break;
+#endif
+	case ISPIOC_S_EXP2:
+		viv_check_retval(copy_from_user
+				 (&dev->exp2, args, sizeof(dev->exp2)));
+		ret = isp_s_exp2(dev);
+		break;
+	case ISPIOC_S_EXP2_INPUTSEL:
+		viv_check_retval(copy_from_user
+			(&dev->exp2.input_select, args,
+			sizeof(dev->exp2.input_select)));
+		ret = isp_s_exp2_inputsel(dev);
+		break;
+	case ISPIOC_S_EXP2_SIZERATIO: {
+		u32 ratio;
+		viv_check_retval(copy_from_user(&ratio, args, sizeof(ratio)));
+		ret = isp_s_exp2_sizeratio(dev, ratio);
+		break;
+	}
+	case ISPIOC_S_2DNR:
+		 viv_check_retval(copy_from_user
+         (&dev->dnr2, args, sizeof(dev->dnr2)));
+		#ifdef ISP_2DNR_V5
+			ret = isp_tdnr_s_2dnr(dev);
+		#else
+			ret = isp_s_2dnr(dev);
+		#endif
+		break;
+	case ISPIOC_S_SIMP:
+		viv_check_retval(copy_from_user
+				 (&dev->simp, args, sizeof(dev->simp)));
+		ret = isp_s_simp(dev);
+		break;
+	case ISPIOC_S_COMP:
+		viv_check_retval(copy_from_user
+				 (&dev->comp, args, sizeof(dev->comp)));
+		ret = isp_s_comp(dev);
+		break;
+	case ISPIOC_S_CPROC:
+		viv_check_retval(copy_from_user
+				 (&dev->cproc, args, sizeof(dev->cproc)));
+		ret = isp_s_cproc(dev);
+		break;
+	case ISPIOC_S_XTALK:
+		viv_check_retval(copy_from_user
+				 (&dev->xtalk, args, sizeof(dev->xtalk)));
+		ret = isp_s_xtalk(dev);
+		break;
+	case ISPIOC_S_ELAWB:
+		viv_check_retval(copy_from_user
+				 (&dev->elawb, args, sizeof(dev->elawb)));
+		ret = isp_s_elawb(dev);
+		break;
+	case ISPIOC_S_INPUT:
+		viv_check_retval(copy_from_user
+				 (&dev->ctx, args, sizeof(dev->ctx)));
+		ret = isp_s_input(dev);
+		break;
+	case ISPIOC_S_DEMOSAIC:
+		viv_check_retval(copy_from_user
+				 (&dev->ctx, args, sizeof(dev->ctx)));
+		ret = isp_s_demosaic(dev);
+		break;
+	case ISPIOC_MI_START:
+		viv_check_retval(copy_from_user
+				 (&dev->mi, args, sizeof(dev->mi)));
+		ret = isp_mi_start(dev);
+		break;
+	case ISPIOC_S_HDR_WB:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		ret = isp_s_hdr_wb(dev);
+		break;
+	case ISPIOC_S_HDR_BLS:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		ret = isp_s_hdr_bls(dev);
+		break;
+	case ISPIOC_S_HDR_DIGITAL_GAIN:
+		viv_check_retval(copy_from_user
+				 (&dev->hdr, args, sizeof(dev->hdr)));
+		//       ret = isp_s_hdr_digal_gain(dev);
+		break;
+	case ISPIOC_S_GAMMA_OUT:{
+			viv_check_retval(copy_from_user
+					 (&dev->gamma_out, args,
+					  sizeof(dev->gamma_out)));
+			ret = isp_s_gamma_out(dev);
+			break;
+		}
+	case ISPIOC_SET_BUFFER:{
+			struct isp_buffer_context buf;
+			viv_check_retval(copy_from_user
+					 (&buf, args, sizeof(buf)));
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+			if (dev->alloc)
+				ret = dev->alloc(dev, &buf);
+#else
+			ret = isp_set_buffer(dev, &buf);
+#endif
+			break;
+		}
+	case ISPIOC_SET_BP_BUFFER:{
+			struct isp_bp_buffer_context buf;
+			viv_check_retval(copy_from_user
+					 (&buf, args, sizeof(buf)));
+			ret = isp_set_bp_buffer(dev, &buf);
+			break;
+		}
+	case ISPIOC_START_CAPTURE:{
+			u32 num;
+			viv_check_retval(copy_from_user
+					 (&num, args, sizeof(num)));
+			ret = isp_start_stream(dev, num);
+			if(!ret) {
+				dev->streaming = true;
+			}
+			break;
+		}
+#if defined(ISP_3DNR_V2) || defined(ISP_3DNR_V2_V1)
+    case ISPIOC_S_3DNR_CMP: {
+        viv_check_retval(
+            copy_from_user(&dev->dnr3.compress, args, sizeof(dev->dnr3.compress)));
+                ret = isp_s_3dnr_cmp(dev);
+        break;
+    }
+#endif
+#if defined(ISP_3DNR) || defined(ISP_3DNR_V2)
+	case ISPIOC_U_3DNR:{
+			struct isp_3dnr_update param;
+			viv_check_retval(copy_from_user
+					 (&param, args, sizeof(param)));
+			ret = isp_u_3dnr(dev, &param);
+			break;
+		}
+	case ISPIOC_S_3DNR:
+		viv_check_retval(copy_from_user
+				 (&dev->dnr3, args, sizeof(dev->dnr3)));
+		ret = isp_s_3dnr(dev);
+		break;
+    case ISPIOC_U_3DNR_STRENGTH: {
+            viv_check_retval(
+                copy_from_user(&dev->dnr3, args, sizeof(dev->dnr3)));
+                   ret = isp_u_3dnr_strength(dev);
+            break;
+        }
+    case ISPIOC_S_3DNR_MOT:{
+        viv_check_retval(copy_from_user
+                 (&dev->dnr3, args, sizeof(dev->dnr3)));
+            ret = isp_s_3dnr_motion(dev);
+            break;
+        }
+    case ISPIOC_S_3DNR_DLT:{
+        viv_check_retval(copy_from_user
+                 (&dev->dnr3, args, sizeof(dev->dnr3)));
+
+            ret = isp_s_3dnr_delta(dev);
+            break;
+        }
+	case ISPIOC_G_3DNR:{
+			u32 avg;
+			ret = isp_g_3dnr(dev, &avg);
+			viv_check_retval(copy_to_user(args, &avg, sizeof(avg)));
+			break;
+		}
+#endif
+	case ISPIOC_G_AWBMEAN:{
+			struct isp_awb_mean mean;
+			ret = isp_g_awbmean(dev, &mean);
+			viv_check_retval(copy_to_user
+					 (args, &mean, sizeof(mean)));
+			break;
+		}
+	case ISPIOC_G_EXPMEAN:{
+			u8 mean[25];
+			ret = isp_g_expmean(dev, mean);
+			viv_check_retval(copy_to_user
+					 (args, mean, sizeof(mean)));
+			break;
+		}
+	case ISPIOC_G_HDREXPMEAN:{
+			u8 mean[75];
+			ret = isp_g_hdrexpmean(dev, mean);
+			viv_check_retval(copy_to_user
+					 (args, mean, sizeof(mean)));
+			break;
+		}
+	case ISPIOC_G_HISTMEAN:{
+			u32 mean[HIST_BIN_TOTAL];
+			ret = isp_g_histmean(dev, mean);
+			viv_check_retval(copy_to_user
+					 (args, mean, sizeof(mean)));
+			break;
+		}
+	case ISPIOC_G_HDRHISTMEAN:{
+			u32 mean[48];
+			ret = isp_g_hdrhistmean(dev, mean);
+			viv_check_retval(copy_to_user
+					 (args, mean, sizeof(mean)));
+			break;
+		}
+#ifdef ISP_HIST64
+	case ISPIOC_G_HIST64MEAN:{
+			u32 mean[HIST64_BIN_TOTAL];
+			ret = isp_g_hist64mean(dev, mean);
+			viv_check_retval(copy_to_user
+					 (args, mean, sizeof(mean)));
+			break;
+		}
+	case ISPIOC_G_HIST64VSTART_STATUS:{
+			u32 status = 0;
+			ret = isp_g_hist64_vstart_status(dev, &status);
+			viv_check_retval(copy_to_user
+					 (args, &status, sizeof(status)));
+			break;
+		}
+#endif
+	case ISPIOC_G_VSM:{
+			struct isp_vsm_result vsm;
+			ret = isp_g_vsm(dev, &vsm);
+			viv_check_retval(copy_to_user(args, &vsm, sizeof(vsm)));
+			break;
+		}
+	case ISPIOC_G_AFM:{
+			struct isp_afm_result afm;
+			ret = isp_g_afm(dev, &afm);
+			viv_check_retval(copy_to_user(args, &afm, sizeof(afm)));
+			break;
+		}
+	case ISPIOC_G_STATUS:
+		ret = isp_ioc_g_status(dev, args);
+		break;
+	case ISPIOC_G_FEATURE:
+		ret = isp_ioc_g_feature(dev, args);
+		break;
+	case ISPIOC_G_FEATURE_VERSION:
+		ret = isp_ioc_g_feature_veresion(dev, args);
+		break;
+    case ISPIOC_WDR_CONFIG:
+		viv_check_retval(copy_from_user
+				 (&dev->wdr, args, sizeof(dev->wdr)));
+        ret = isp_s_wdr(dev);
+        break;
+    case ISPIOC_S_WDR_CURVE:
+		viv_check_retval(copy_from_user
+				 (&dev->wdr, args, sizeof(dev->wdr)));
+        ret = isp_s_wdr_curve(dev);
+        break;
+	case ISPIOC_ENABLE_GCMONO:
+		viv_check_retval(copy_from_user
+				 (&dev->gcmono.mode, args, sizeof(u32)));
+		ret = isp_enable_gcmono(dev);
+		break;
+	case ISPIOC_DISABLE_GCMONO:
+		ret = isp_disable_gcmono(dev);
+		break;
+	case ISPIOC_S_GCMONO:{
+			struct isp_gcmono_data *data;
+#ifdef __KERNEL__
+			data = (struct isp_gcmono_data *)
+			    kmalloc(sizeof(struct isp_gcmono_data), GFP_KERNEL);
+#else
+			data = (struct isp_gcmono_data *)
+			    malloc(sizeof(struct isp_gcmono_data));
+#endif
+			if (data == NULL) {
+				isp_err("%s, malloc mem for rgb gamma failed.", __func__);
+				ret = -1;
+			} else {
+				viv_check_retval(copy_from_user
+						 (data, args,
+						  sizeof(struct
+							 isp_gcmono_data)));
+				ret = isp_s_gcmono(dev, data);
+#ifdef __KERNEL__
+				kfree(data);
+#else
+				free(data);
+#endif
+
+			}
+			break;
+		}
+	case ISPIOC_ENABLE_RGBGAMMA:
+		ret = isp_enable_rgbgamma(dev);
+		break;
+	case ISPIOC_DISABLE_RGBGAMMA:
+		ret = isp_disable_rgbgamma(dev);
+		break;
+	case ISPIOC_S_RGBGAMMA:{
+			struct isp_rgbgamma_data *data;
+#ifdef __KERNEL__
+			data = (struct isp_rgbgamma_data *)
+			    kmalloc(sizeof(struct isp_rgbgamma_data),
+				    GFP_KERNEL);
+#else
+			data = (struct isp_rgbgamma_data *)
+			    malloc(sizeof(struct isp_rgbgamma_data));
+#endif
+			if (data == NULL) {
+				isp_err("%s, malloc mem for rgb gamma failed.", __func__);
+				ret = -1;
+			} else {
+				viv_check_retval(copy_from_user
+						 (data, args,
+						  sizeof(struct
+							 isp_rgbgamma_data)));
+				ret = isp_s_rgbgamma(dev, data);
+#ifdef __KERNEL__
+				kfree(data);
+#else
+				free(data);
+#endif
+			}
+			break;
+		}
+	case ISPIOC_S_GREENEQUILIBRATE:
+		viv_check_retval(copy_from_user
+				 (&dev->ge, args, sizeof(dev->ge)));
+		ret = isp_s_ge(dev);
+		break;
+	case ISPIOC_S_COLOR_ADJUST:
+		viv_check_retval(copy_from_user
+				 (&dev->ca, args, sizeof(dev->ca)));
+		ret = isp_s_ca(dev);
+		break;
+#ifdef __KERNEL__
+	case VIDIOC_QUERYCAP:
+		ret = isp_ioc_qcap(dev, args);
+		break;
+#endif
+	case ISPIOC_G_QUERY_EXTMEM:
+		ret = isp_get_extmem(dev, args);
+		break;
+	case ISPIOC_ENABLE_RGBIR:
+		viv_check_retval(copy_from_user
+				(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_enable_rgbir(dev);
+		break;
+	case ISPIOC_S_RGBIR:
+		viv_check_retval(copy_from_user
+				(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_s_rgbir(dev);
+        break;
+	case ISPIOC_RGBIR_HW_INIT:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_hw_init(dev);
+        break;
+	case ISPIOC_RGBIR_S_IR_DNR:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_ir_dnr(dev);
+        break;
+	case ISPIOC_RGBIR_S_SHARPEN:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_sharpen(dev);
+        break;
+	case ISPIOC_RGBIR_S_DES:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_des(dev);
+        break;
+	case ISPIOC_RGBIR_S_CC_MATRIX:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_cc_matrix(dev);
+        break;
+	case ISPIOC_RGBIR_S_DPCC:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_dpcc(dev);
+        break;
+	case ISPIOC_RGBIR_S_GAIN:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_gain(dev);
+        break;
+	case ISPIOC_RGBIR_S_BLS:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_s_bls(dev);
+        break;
+	case ISPIOC_RGBIR_S_IR_RAW_OUT:
+		viv_check_retval(copy_from_user
+			(&dev->rgbir, args, sizeof(dev->rgbir)));
+		ret = isp_rgbir_out_ir_raw(dev);
+        break;
+	case ISPIOC_S_CROP:
+		viv_check_retval(copy_from_user
+			(&dev->crop, args, sizeof(struct isp_crop_context) * 3));
+		ret = isp_set_crop(dev);
+        break;
+#ifdef ISP_3DNR_V3
+	case ISPIOC_S_TDNR:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr, args, sizeof(dev->tdnr)));
+		ret = isp_s_tdnr(dev);
+		break;
+	case ISPIOC_TDNR_ENABLE:
+		ret = isp_tdnr_enable(dev);
+		break;
+	case ISPIOC_TDNR_DISABLE:
+		ret = isp_tdnr_disable(dev);
+		break;
+	case ISPIOC_TDNR_ENABLE_TDNR:
+		ret = isp_tdnr_enable_tdnr(dev);
+		break;
+	case ISPIOC_TDNR_DISABLE_TDNR:
+		ret = isp_tdnr_disable_tdnr(dev);
+		break;
+	case ISPIOC_TDNR_ENABLE_2DNR:
+		ret = isp_tdnr_enable_2dnr(dev);
+		break;
+	case ISPIOC_TDNR_DISABLE_2DNR:
+		ret = isp_tdnr_disable_2dnr(dev);
+		break;
+	case ISPIOC_S_TDNR_CURVE:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr.curve, args, sizeof(dev->tdnr.curve)));
+		ret = isp_tdnr_cfg_gamma(dev);
+		break;
+	case ISPIOC_G_TDNR: {
+		struct isp_tdnr_stats stats;
+		ret = isp_tdnr_g_stats(dev, &stats);
+		viv_check_retval(copy_to_user(args,  &stats, sizeof(stats)));
+	}
+		break;
+	case ISPIOC_S_TDNR_STRENGTH:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr, args, sizeof(dev->tdnr)));
+		ret = isp_tdnr_set_strength(dev);
+		break;
+	case ISPIOC_U_TDNR_NOISE:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr, args, sizeof(dev->tdnr)));
+		ret = isp_tdnr_u_noise(dev);
+		break;
+	case ISPIOC_U_TDNR_THR:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr, args, sizeof(dev->tdnr)));
+		ret = isp_tdnr_u_thr(dev);
+		break;
+	case ISPIOC_R_TDNR_REFER:
+		ret = isp_r_tdnr_refer(dev);
+		break;
+	case ISPIOC_R_TDNR_MOTION:
+		ret = isp_r_tdnr_motion(dev);
+		break;
+	case ISPIOC_S_TDNR_BUF:
+		viv_check_retval(copy_from_user
+			(&dev->tdnr.buf, args, sizeof(dev->tdnr.buf)));
+		ret = isp_tdnr_s_buf(dev);
+        break;
+#endif
+
+
+#ifdef ISP_MI_PP_WRITE
+    case ISPIOC_GET_PPW_LINE_CNT:
+	{
+		u16 ppw_pic_cnt;
+		ret = isp_get_ppw_pic_cnt(dev, &ppw_pic_cnt);
+        viv_check_retval(copy_to_user
+			(args, &ppw_pic_cnt, sizeof(ppw_pic_cnt)));
+
+        break;
+	}
+    case ISPIOC_SET_PPW_LINE_NUM:
+	{
+    	viv_check_retval(copy_from_user
+			(&dev->pp_write, args, sizeof(dev->pp_write)));
+		ret = isp_set_ppw_line_num(dev);
+        break;
+	}
+#endif
+
+#ifdef ISP_MI_PP_READ
+    case ISPIOC_CFG_DMA_LINE_ENTRY:
+        viv_check_retval(copy_from_user
+			(&dev->pp_dma_line_entry, args, sizeof(dev->pp_dma_line_entry)));
+		ret = isp_cfg_pp_dma_line_entry(dev);
+        break;
+#endif
+    case ISPIOC_GET_FRAME_MASK_INFO_ADDR: {
+        unsigned long addr;
+        addr = dev->frame_mark_info_addr;
+        pr_info("ISPIOC_GET_FRAME_MASK_INFO_ADDR %lx\n", addr);
+        viv_check_retval(copy_to_user(args, &addr, sizeof(addr)));
+        ret = 0;
+    }
+        break;
+
+	default:
+		isp_err("unsupported command %d", cmd);
+		break;
+	}
+	if (cmd != ISPIOC_WRITE_REG)          //frame end isp update shd registers.
+    ISP_GEN_CFG_UPDATE(dev);
+	return ret;
+}
+

+ 436 - 0
vvcam/isp/isp_ioctl.h

@@ -0,0 +1,436 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_IOC_H_
+#define _ISP_IOC_H_
+#include "ic_dev.h"
+#include <linux/ioctl.h>
+enum {
+	ISPIOC_RESET				= 0x100,
+	ISPIOC_WRITE_REG			= 0x101,
+	ISPIOC_READ_REG 			= 0x102,
+	ISPIOC_S_INPUT				= 0x103,
+	ISPIOC_ENABLE				= 0x104,
+	ISPIOC_DISABLE				= 0x105,
+	ISPIOC_ISP_STATUS			= 0x106,
+	ISPIOC_ISP_STOP 			= 0x107,
+	ISPIOC_START_CAPTURE		= 0x108,
+	ISPIOC_DISABLE_ISP_OFF		= 0x109,
+	ISPIOC_SET_BUFFER			= 0x10A,
+	ISPIOC_SET_BP_BUFFER		= 0x10B,
+	ISPIOC_START_DMA_READ		= 0x10C,
+	ISPIOC_MI_START 			= 0x10D,
+	ISPIOC_MI_STOP				= 0x10E,
+	ISPIOC_ENABLE_TPG			= 0x10F,
+	ISPIOC_DISABLE_TPG			= 0x110,
+	ISPIOC_S_TPG				= 0x111,
+	ISPIOC_S_MCM_WR				= 0x112,
+	ISPIOC_ENABLE_BLS			= 0x113,
+	ISPIOC_DISABLE_BLS			= 0x114,
+	ISPIOC_S_BLS				= 0x115,
+	ISPIOC_S_MUX				= 0x116,
+	ISPIOC_ENABLE_AWB			= 0x117,
+	ISPIOC_DISABLE_AWB			= 0x118,
+	ISPIOC_S_AWB				= 0x119,
+	ISPIOC_G_AWBMEAN			= 0x11A,
+	ISPIOC_S_IS 				= 0x11B,
+	ISPIOC_S_RAW_IS 			= 0x11C,
+	ISPIOC_S_CNR				= 0x11D,
+	ISPIOC_S_CC 				= 0x11E,
+	ISPIOC_S_XTALK				= 0x11F,
+	ISPIOC_S_GAMMA_OUT			= 0x120,
+	ISPIOC_ENABLE_LSC			= 0x121,
+	ISPIOC_DISABLE_LSC			= 0x122,
+	ISPIOC_S_LSC_TBL			= 0x123,
+	ISPIOC_S_LSC_SEC			= 0x124,
+	ISPIOC_S_DPF				= 0x125,
+	ISPIOC_S_EE 				= 0x126,
+	ISPIOC_S_EXP				= 0x127,
+	ISPIOC_S_HDREXP				= 0x128,
+	ISPIOC_G_EXPMEAN			= 0x129,
+	ISPIOC_G_HDREXPMEAN			= 0x12A,
+	ISPIOC_S_HIST				= 0x12B,
+	ISPIOC_G_HISTMEAN			= 0x12C,
+	ISPIOC_S_HDRHIST			= 0x12D,
+	ISPIOC_G_HDRHISTMEAN        = 0x12E,
+	ISPIOC_S_HIST64             = 0x12F,
+	ISPIOC_G_HIST64MEAN         = 0x130,
+	ISPIOC_G_HIST64VSTART_STATUS= 0x131,
+	ISPIOC_U_HIST64 			= 0x132,
+	ISPIOC_S_DPCC				= 0x133,
+	ISPIOC_S_FLT				= 0x134,
+	ISPIOC_S_CAC				= 0x135,
+	ISPIOC_S_DEG				= 0x136,
+	ISPIOC_S_AFM				= 0x137,
+	ISPIOC_G_AFM				= 0x138,
+	ISPIOC_S_VSM				= 0x139,
+	ISPIOC_G_VSM				= 0x13A,
+	ISPIOC_S_IE 				= 0x13B,
+	ISPIOC_ENABLE_WDR3			= 0x13C,
+	ISPIOC_DISABLE_WDR3 		= 0x13D,
+	ISPIOC_U_WDR3				= 0x13E,
+	ISPIOC_S_WDR3				= 0x13F,
+	ISPIOC_S_EXP2               = 0x140,
+	ISPIOC_S_EXP2_INPUTSEL      = 0x141,
+	ISPIOC_S_EXP2_SIZERATIO     = 0x142,
+	ISPIOC_S_2DNR				= 0x143,
+	ISPIOC_S_3DNR				= 0x144,
+	ISPIOC_G_3DNR				= 0x145, /* get last avg */
+	ISPIOC_U_3DNR				= 0x146, /* update */
+	ISPIOC_R_3DNR				= 0x147, /* read back 3dnr reference image. */
+	ISPIOC_S_3DNR_CMP			= 0x148, /*config 3dnr compress */
+	ISPIOC_U_3DNR_STRENGTH 		= 0x149,
+	ISPIOC_S_3DNR_MOT			= 0x14A,  /*config 3dnr motion*/
+	ISPIOC_S_3DNR_DLT  			= 0x14B,/*config 3dnr delta*/
+	ISPIOC_S_HDR				= 0x14C,
+	ISPIOC_S_COMP				= 0x14D,
+	ISPIOC_S_CPROC				= 0x14E,
+	ISPIOC_S_SIMP				= 0x14F,
+	ISPIOC_S_ELAWB				= 0x150,
+	ISPIOC_S_HDR_WB 			= 0x151,
+	ISPIOC_S_HDR_BLS			= 0x152,
+	ISPIOC_S_HDR_DIGITAL_GAIN	= 0x153,
+	ISPIOC_ENABLE_WB			= 0x154,
+	ISPIOC_DISABLE_WB			= 0x155,
+	ISPIOC_DISABLE_HDR			= 0x156,
+	ISPIOC_ENABLE_HDR			= 0x157,
+	ISPIOC_ENABLE_GAMMA_OUT 	= 0x158,
+	ISPIOC_DISABLE_GAMMA_OUT	= 0x159,
+	ISPIOC_G_STATUS 			= 0x15A,
+	ISPIOC_G_FEATURE			= 0x15B,
+	ISPIOC_G_FEATURE_VERSION	= 0x15C,
+	ISPIOC_ENABLE_GCMONO		= 0x15D,
+	ISPIOC_DISABLE_GCMONO		= 0x15E,
+	ISPIOC_S_GCMONO 			= 0x15F,
+	ISPIOC_ENABLE_RGBGAMMA		= 0x160,
+	ISPIOC_DISABLE_RGBGAMMA 	= 0x161,
+	ISPIOC_S_RGBGAMMA			= 0x162,
+	ISPIOC_S_DEMOSAIC			= 0x163,
+	ISPIOC_S_DMSC_INTP			= 0x164,
+	ISPIOC_S_DMSC_DMOI			= 0x165,
+	ISPIOC_S_DMSC_SKIN			= 0x166,
+	ISPIOC_S_DMSC_CAC			= 0x167,
+	ISPIOC_S_DMSC_SHAP			= 0x168,
+	ISPIOC_S_DMSC_SHAP_LINE		= 0x169,
+	ISPIOC_S_DMSC_DEPURPLE      = 0x16A,
+	ISPIOC_S_DMSC_GFILTER       = 0x16B,
+	ISPIOC_S_DMSC				= 0x16C,
+	ISPIOC_S_GREENEQUILIBRATE	= 0x16D,
+	ISPIOC_S_COLOR_ADJUST		= 0x16E,
+	ISPIOC_S_DIGITAL_GAIN		= 0x16F,
+	ISPIOC_G_QUERY_EXTMEM		= 0x170,
+#ifdef ISP_WDR_V4
+	ISPIOC_ENABLE_WDR4          = 0x171,
+	ISPIOC_DISABLE_WDR4         = 0x172,
+	ISPIOC_U_WDR4               = 0x173,
+	ISPIOC_S_WDR4               = 0x174,
+#endif
+	ISPIOC_WDR_CONFIG	    	= 0x175,
+	ISPIOC_S_WDR_CURVE	    	= 0x176,
+	ISPIOC_ENABLE_RGBIR	    	= 0x177,
+	ISPIOC_S_RGBIR		    	= 0x178,
+	ISPIOC_RGBIR_HW_INIT		= 0x179,
+	ISPIOC_RGBIR_S_IR_DNR		= 0x17A,
+	ISPIOC_RGBIR_S_SHARPEN		= 0x17B,
+	ISPIOC_RGBIR_S_DES	    	= 0x17C,
+	ISPIOC_RGBIR_S_CC_MATRIX	= 0x17D,
+	ISPIOC_RGBIR_S_DPCC	    	= 0x17E,
+	ISPIOC_RGBIR_S_GAIN	    	= 0x17F,
+	ISPIOC_RGBIR_S_BLS	    	= 0x180,
+	ISPIOC_RGBIR_S_IR_RAW_OUT	= 0x181,
+	ISPIOC_S_TDNR               = 0x182,
+	ISPIOC_TDNR_ENABLE  		= 0x183,
+	ISPIOC_TDNR_DISABLE         = 0x184,
+	ISPIOC_TDNR_ENABLE_TDNR     = 0x185,
+	ISPIOC_TDNR_DISABLE_TDNR    = 0x186,
+	ISPIOC_TDNR_ENABLE_2DNR     = 0x187,
+	ISPIOC_TDNR_DISABLE_2DNR    = 0x188,
+	ISPIOC_S_TDNR_CURVE         = 0x189,
+	ISPIOC_G_TDNR               = 0x18A,
+	ISPIOC_S_TDNR_STRENGTH      = 0x18B,
+	ISPIOC_U_TDNR_NOISE         = 0x18C,
+	ISPIOC_U_TDNR_THR           = 0x18D,
+    ISPIOC_S_TDNR_BUF           = 0x18E,  // refer and motion
+    ISPIOC_R_TDNR_REFER         = 0x18F,
+    ISPIOC_R_TDNR_MOTION        = 0x190,
+	ISPIOC_GET_MIS				= 0x191,
+	ISPIOC_CFG_DMA				= 0x192,
+	ISPIOC_BYPASS_MCM			= 0x193,
+	ISPIOC_SET_PPW_LINE_NUM     = 0x194,
+	ISPIOC_GET_PPW_LINE_CNT     = 0x195,
+	ISPIOC_CFG_DMA_LINE_ENTRY   = 0x196,
+	ISPIOC_S_CROP   			= 0x197,
+    ISPIOC_GET_FRAME_MASK_INFO_ADDR = 0x198,
+};
+
+#define  ISP_GEN_CFG_UPDATE(dev)	{                                \
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));       \
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);			\
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);               \
+	}
+
+#define CONFIG_VSI_ISP_DEBUG 1
+#ifdef CONFIG_VSI_ISP_DEBUG
+#define isp_info(fmt, ...)  pr_info(fmt, ##__VA_ARGS__)
+#define isp_debug(fmt, ...)  pr_debug(fmt, ##__VA_ARGS__)
+#define isp_err(fmt, ...)  pr_err(fmt, ##__VA_ARGS__)
+#else
+#define isp_info(fmt, ...)
+#define isp_debug(fmt, ...)
+#define isp_err(fmt, ...)  pr_err(fmt, ##__VA_ARGS__)
+#endif
+
+#define ISP_REG_GAP 4
+#define MI_QOS 0x44440444
+#define MI_QOS2 0x44
+long isp_priv_ioctl(struct isp_ic_dev *dev, unsigned int cmd, void __user *args);
+long isp_copy_data(void *dst, void *src, int size);
+
+/* internal functions, can called by v4l2 video device and ioctl */
+int isp_reset(struct isp_ic_dev *dev);
+int isp_enable_tpg(struct isp_ic_dev *dev);
+int isp_disable_tpg(struct isp_ic_dev *dev);
+int isp_enable_bls(struct isp_ic_dev *dev);
+int isp_disable_bls(struct isp_ic_dev *dev);
+int isp_enable(struct isp_ic_dev *dev);
+int isp_disable(struct isp_ic_dev *dev);
+bool is_isp_enable(struct isp_ic_dev *dev);
+int isp_enable_lsc(struct isp_ic_dev *dev);
+int isp_disable_lsc(struct isp_ic_dev *dev);
+int isp_s_input(struct isp_ic_dev *dev);
+int isp_s_digital_gain(struct isp_ic_dev *dev);
+int isp_s_demosaic(struct isp_ic_dev *dev);
+int isp_s_tpg(struct isp_ic_dev *dev);
+int isp_s_mcm_wr(struct isp_ic_dev *dev);
+int isp_bypass_mcm(struct isp_ic_dev *dev);
+int isp_s_mux(struct isp_ic_dev *dev);
+int isp_s_bls(struct isp_ic_dev *dev);
+int isp_enable_awb(struct isp_ic_dev *dev);
+int isp_disable_awb(struct isp_ic_dev *dev);
+int isp_s_awb(struct isp_ic_dev *dev);
+int isp_g_awbmean(struct isp_ic_dev *dev, struct isp_awb_mean *mean);
+int isp_s_is(struct isp_ic_dev *dev);
+int isp_s_raw_is(struct isp_ic_dev *dev);
+int isp_s_cnr(struct isp_ic_dev *dev);
+int isp_start_stream(struct isp_ic_dev *dev, u32 framenum);
+int isp_stop_stream(struct isp_ic_dev *dev);
+int isp_s_cc(struct isp_ic_dev *dev);
+int isp_s_xtalk(struct isp_ic_dev *dev);
+int isp_enable_wb(struct isp_ic_dev *dev, bool bEnable);
+int isp_enable_gamma_out(struct isp_ic_dev *dev, bool bEnable);
+int isp_s_gamma_out(struct isp_ic_dev *dev);
+int isp_s_lsc_sec(struct isp_ic_dev *dev);
+int isp_s_lsc_tbl(struct isp_ic_dev *dev);
+int isp_ioc_disable_isp_off(struct isp_ic_dev *dev, void __user *args);
+int isp_s_dpf(struct isp_ic_dev *dev);
+int isp_s_ee(struct isp_ic_dev *dev);
+int isp_s_exp(struct isp_ic_dev *dev);
+int isp_s_hdrexp(struct isp_ic_dev *dev);
+int isp_g_expmean(struct isp_ic_dev *dev, u8 * mean);
+int isp_g_hdrexpmean(struct isp_ic_dev *dev, u8 * mean);
+int isp_s_hist(struct isp_ic_dev *dev);
+int isp_g_histmean(struct isp_ic_dev *dev, u32 * mean);
+int isp_s_hdrhist(struct isp_ic_dev *dev);
+int isp_g_hdrhistmean(struct isp_ic_dev *dev, u32 * mean);
+#ifdef ISP_HIST64
+int isp_s_hist64(struct isp_ic_dev *dev);
+int isp_g_hist64mean(struct isp_ic_dev *dev, u32 *mean);
+int isp_g_hist64_vstart(struct isp_ic_dev *dev, u32 start_line);
+int isp_g_hist64_vstart_status(struct isp_ic_dev *dev, u32 *status);
+int isp_update_hist64(struct isp_ic_dev *dev);
+#endif
+int isp_s_dpcc(struct isp_ic_dev *dev);
+int isp_s_flt(struct isp_ic_dev *dev);
+int isp_s_cac(struct isp_ic_dev *dev);
+int isp_s_deg(struct isp_ic_dev *dev);
+int isp_s_ie(struct isp_ic_dev *dev);
+int isp_s_vsm(struct isp_ic_dev *dev);
+int isp_g_vsm(struct isp_ic_dev *dev, struct isp_vsm_result *vsm);
+int isp_s_afm(struct isp_ic_dev *dev);
+int isp_g_afm(struct isp_ic_dev *dev, struct isp_afm_result *afm);
+int isp_enable_wdr3(struct isp_ic_dev *dev);
+int isp_disable_wdr3(struct isp_ic_dev *dev);
+int isp_u_wdr3(struct isp_ic_dev *dev);
+int isp_s_wdr3(struct isp_ic_dev *dev);
+#ifdef ISP_WDR_V4
+int isp_enable_wdr4(struct isp_ic_dev *dev);
+int isp_disable_wdr4(struct isp_ic_dev *dev);
+int isp_u_wdr4(struct isp_ic_dev *dev);
+int isp_s_wdr4(struct isp_ic_dev *dev);
+#endif
+int isp_s_exp2(struct isp_ic_dev *dev);
+int isp_s_exp2_inputsel(struct isp_ic_dev *dev);
+int isp_s_exp2_sizeratio(struct isp_ic_dev *dev, u32 ratio);
+int isp_s_hdr(struct isp_ic_dev *dev);
+int isp_s_hdr_wb(struct isp_ic_dev *dev);
+int isp_s_hdr_bls(struct isp_ic_dev *dev);
+//int isp_s_hdr_digal_gain(struct isp_ic_dev *dev);
+int isp_enable_hdr(struct isp_ic_dev *dev);
+int isp_disable_hdr(struct isp_ic_dev *dev);
+#ifdef ISP_2DNR_V5
+int isp_tdnr_s_2dnr(struct isp_ic_dev *dev);	
+#else
+int isp_s_2dnr(struct isp_ic_dev *dev);
+#endif
+#if defined(ISP_3DNR) || defined(ISP_3DNR_V2)
+int isp_s_3dnr(struct isp_ic_dev *dev);
+int isp_g_3dnr(struct isp_ic_dev *dev, u32 * avg);
+int isp_u_3dnr(struct isp_ic_dev *dev, struct isp_3dnr_update *dnr3_update);
+int isp_s_3dnr_motion(struct isp_ic_dev *dev);
+int isp_s_3dnr_delta(struct isp_ic_dev *dev);
+#endif
+
+#if defined(ISP_3DNR) || defined(ISP_3DNR_V2_V1)
+int isp_r_3dnr(struct isp_ic_dev *dev);
+#endif
+#ifdef ISP_3DNR_V2
+int isp_s_3dnr_cmp(struct isp_ic_dev *dev);
+#endif
+int isp_u_3dnr_strength(struct isp_ic_dev *dev);
+int isp_s_comp(struct isp_ic_dev *dev);
+int isp_s_simp(struct isp_ic_dev *dev);
+int isp_s_cproc(struct isp_ic_dev *dev);
+int isp_s_elawb(struct isp_ic_dev *dev);
+int isp_ioc_qcap(struct isp_ic_dev *dev, void __user *args);
+int isp_ioc_g_status(struct isp_ic_dev *dev, void __user *args);
+
+int isp_enable_gcmono(struct isp_ic_dev *dev);
+int isp_disable_gcmono(struct isp_ic_dev *dev);
+int isp_s_gcmono(struct isp_ic_dev *dev, struct isp_gcmono_data *data);	/* set curve */
+int isp_enable_rgbgamma(struct isp_ic_dev *dev);
+int isp_disable_rgbgamma(struct isp_ic_dev *dev);
+int isp_s_rgbgamma(struct isp_ic_dev *dev, struct isp_rgbgamma_data *data);
+
+u32 isp_read_mi_irq(struct isp_ic_dev *dev);
+void isp_reset_mi_irq(struct isp_ic_dev *dev, u32 icr);
+
+int isp_ioc_cfg_dma(struct isp_ic_dev *dev, void __user *args);
+int isp_ioc_start_dma_read(struct isp_ic_dev *dev, void __user *args);
+int isp_mi_start(struct isp_ic_dev *dev);
+int isp_mi_stop(struct isp_ic_dev *dev);
+int isp_set_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf);
+int isp_set_bp_buffer(struct isp_ic_dev *dev,
+		      struct isp_bp_buffer_context *buf);
+
+int isp_enable_dmsc(struct isp_ic_dev *dev);
+int isp_disable_dmsc(struct isp_ic_dev *dev);
+int isp_set_dmsc_intp(struct isp_ic_dev *dev);
+int isp_set_dmsc_skin(struct isp_ic_dev *dev);
+int isp_set_dmsc_gfilter(struct isp_ic_dev *dev);
+int isp_set_dmsc_depurple(struct isp_ic_dev *dev);
+int isp_set_dmsc_cac(struct isp_ic_dev *dev);
+int isp_set_dmsc_sharpen(struct isp_ic_dev *dev);
+int isp_set_dmsc_sharpen_line(struct isp_ic_dev *dev);
+int isp_set_dmsc_dmoi(struct isp_ic_dev *dev);
+int isp_s_dmsc(struct isp_ic_dev *dev);
+int isp_s_ge(struct isp_ic_dev *dev);
+int isp_s_ca(struct isp_ic_dev *dev);
+int isp_s_color_adjust(struct isp_ic_dev *dev);
+int isp_config_dummy_hblank(struct isp_ic_dev *dev);
+
+int isp_s_rgbir(struct isp_ic_dev *dev);
+int isp_enable_rgbir(struct isp_ic_dev *dev);
+int isp_rgbir_hw_init(struct isp_ic_dev *dev);
+int isp_rgbir_s_ir_dnr(struct isp_ic_dev *dev);
+int isp_rgbir_s_sharpen(struct isp_ic_dev *dev);
+int isp_rgbir_s_des(struct isp_ic_dev *dev);
+int isp_rgbir_s_cc_matrix(struct isp_ic_dev *dev);
+int isp_rgbir_s_dpcc(struct isp_ic_dev *dev);
+int isp_rgbir_s_gain(struct isp_ic_dev *dev);
+int isp_rgbir_s_bls(struct isp_ic_dev *dev);
+int isp_rgbir_out_ir_raw(struct isp_ic_dev *dev);
+
+#ifdef ISP_3DNR_V3
+int isp_tdnr_cfg_gamma(struct isp_ic_dev *dev);
+int isp_s_tdnr(struct isp_ic_dev *dev);
+int isp_tdnr_set_strength(struct isp_ic_dev *dev);
+int isp_tdnr_set_motion(struct isp_ic_dev *dev);
+int isp_tdnr_enable(struct isp_ic_dev *dev);
+int isp_tdnr_disable(struct isp_ic_dev *dev);
+int isp_tdnr_enable_tdnr(struct isp_ic_dev *dev);
+int isp_tdnr_disable_tdnr(struct isp_ic_dev *dev);
+int isp_tdnr_enable_2dnr(struct isp_ic_dev *dev);
+int isp_tdnr_disable_2dnr(struct isp_ic_dev *dev);
+int isp_tdnr_g_stats(struct isp_ic_dev *dev, struct isp_tdnr_stats *avg);
+int isp_tdnr_u_noise(struct isp_ic_dev *dev);
+int isp_r_tdnr_refer(struct isp_ic_dev *dev);
+int isp_r_tdnr_motion(struct isp_ic_dev *dev);
+int isp_tdnr_u_thr(struct isp_ic_dev *dev);
+int isp_tdnr_s_buf(struct isp_ic_dev *dev);
+#endif
+
+#ifdef ISP_MI_PP_WRITE
+int  isp_set_ppw_line_num(struct isp_ic_dev *dev);
+int  isp_get_ppw_pic_cnt(struct isp_ic_dev *dev, u16* pic_cnt);
+#endif
+
+#ifdef ISP_MI_PP_READ
+int  isp_cfg_pp_dma_line_entry(struct isp_ic_dev *dev);
+#endif
+#ifdef __KERNEL__
+int clean_dma_buffer(struct isp_ic_dev *dev);
+irqreturn_t isp_hw_isr(int irq, void *data);
+void isp_clear_interrupts(struct isp_ic_dev *dev);
+#endif
+/*get irq mis value from store array*/
+u32 isp_read_mis(struct isp_ic_dev *dev, u32 irq_src);
+int isp_ioc_read_mis(struct isp_ic_dev *dev, void __user *args);
+
+/*set scaler*/
+int isp_set_scaling(int id, struct isp_ic_dev *dev, bool stabilization, bool crop);
+int isp_set_crop(struct isp_ic_dev *dev);
+
+
+int isp_ioc_g_feature(struct isp_ic_dev *dev, void __user *args);
+int isp_ioc_g_feature_veresion(struct isp_ic_dev *dev, void __user *args);
+
+#endif /* _ISP_IOC_H_ */

+ 239 - 0
vvcam/isp/isp_irq_queue.c

@@ -0,0 +1,239 @@
+/****************************************************************************
+
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#ifdef __KERNEL__
+#include <asm/io.h>
+
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+
+#include <linux/timer.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+#include <linux/interrupt.h>
+#else
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#endif
+#include "isp_irq_queue.h"
+
+  //enqueue
+int isp_irq_enqueue(isp_mis_t *new,isp_mis_t* head)
+  {
+#ifdef __KERNEL__
+    isp_mis_t* new_node = (isp_mis_t*)kmalloc(sizeof(isp_mis_t), GFP_KERNEL); //create new node
+
+
+    if (new == NULL || head == NULL) {
+        //printk("%s: input wrong parameter\n", __func__);
+        return -1;
+    }
+    new_node->val = new->val;
+    new_node->irq_src = new->irq_src;
+    /*printk("%s: new_node %px irq_src %d", __func__, new_node,  new->irq_src);*/
+    INIT_LIST_HEAD(&new_node->list);
+    list_add_tail(&new_node->list, &head->list);             //append to tail
+ #endif
+    return 0;
+
+  }
+
+  //dequeue && release memory
+int isp_irq_dequeue(isp_mis_t* data, isp_mis_t* head)
+  {
+
+#ifdef __KERNEL__
+    isp_mis_t* entry;
+    if (data == NULL || head == NULL) {
+        //printk("%s: input wrong parameter\n", __func__);
+        return -1;
+    }
+    if (list_empty(&head->list)) {
+        //printk("%s: There is no node\n", __func__);
+        return -1;
+    }
+
+    entry = list_first_entry(&head->list, isp_mis_t, list);
+    /*printk("%s: entry %px irq_src %d", __func__, entry,  entry->irq_src);*/
+    data->val = entry->val;
+    data->irq_src = entry->irq_src;
+    list_del_init(&entry->list);
+
+    kfree(entry);
+#endif
+    return 0;
+  }
+
+bool isp_irq_is_queue_empty( isp_mis_t* head)
+  {
+#ifdef __KERNEL__
+      return list_empty(&head->list);
+#endif
+      return 0;
+  }
+
+int isp_irq_create_circle_queue(isp_mis_list_t* pCList, int number)
+{
+#ifdef __KERNEL__
+  int i;
+  isp_mis_t* pMisNode;
+  if (pCList == NULL || number <= 0) {
+      printk("%s: create circle queue failed\n", __func__);
+      return -1;
+  }
+
+  if (pCList->pHead == NULL) {
+
+      pCList->pHead = (isp_mis_t*)kmalloc(sizeof(isp_mis_t), GFP_KERNEL);
+      INIT_LIST_HEAD(&pCList->pHead->list);
+      pCList->pRead = pCList->pHead;
+      pCList->pWrite = pCList->pHead;
+  }
+  printk("%s:pHead %px\n", __func__, pCList->pHead);
+  for (i = 0; i < number - 1; i++) {
+      pMisNode = (isp_mis_t*)kmalloc(sizeof(isp_mis_t), GFP_KERNEL);
+      INIT_LIST_HEAD(&pMisNode->list);
+      list_add_tail(&pMisNode->list, &pCList->pHead->list);
+      printk("%s:pMisNode %px\n", __func__, pMisNode);
+  }
+
+#endif
+  return 0;
+}
+
+int isp_irq_destroy_circle_queue(isp_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  isp_mis_t* pMisNode;
+  if ((pCList == NULL) || (pCList->pHead == NULL) ) {
+      printk("%s: destroy circle queue failed. pClist %px\n", __func__, pCList);
+      return -1;
+  }
+
+  while(!list_empty(&pCList->pHead->list)) {
+      pMisNode = list_first_entry(&pCList->pHead->list, isp_mis_t, list);
+      printk("%s:pMisNode %px\n", __func__, pMisNode);
+      list_del(&pMisNode->list);
+      kfree(pMisNode);
+      pMisNode = NULL;
+  }
+  printk("%s:pHead %px\n", __func__, pCList->pHead);
+  kfree(pCList->pHead);
+  pCList->pHead = NULL;
+  pCList->pRead = NULL;
+  pCList->pWrite = NULL;
+#endif
+  return 0;
+}
+
+int isp_irq_read_circle_queue(isp_mis_t* data, isp_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  //isp_mis_t* pReadEntry;
+  if (pCList == NULL) {
+      printk("%s: can not read circle queue\n", __func__);
+      return -1;
+  }
+
+  if (pCList->pRead == pCList->pWrite) {
+    /*printk("%s: There is no irq mis data\n", __func__);*/
+    return -1;
+  }
+  data->val = pCList->pRead->val;
+  data->irq_src = pCList->pRead->irq_src;
+  /*printk("%s: entry %px irq_src %d, msi %08x\n", __func__, pCList->pRead,  data->irq_src, data->val);*/
+  /*Get the next entry that link with read entry list*/
+  /*Update read pointer to next entry*/
+  pCList->pRead = list_first_entry(&pCList->pRead->list, isp_mis_t, list);
+
+  //pCList->pRead = pReadEntry;
+
+#endif
+  return 0;
+}
+
+int isp_irq_write_circle_queue(isp_mis_t* data, isp_mis_list_t* pCList)
+{
+#ifdef __KERNEL__
+  isp_mis_t* pWriteEntry;
+  if (pCList == NULL) {
+      printk("%s: can not read circle queue\n", __func__);
+      return -1;
+  }
+
+  pCList->pWrite->val = data->val;
+  pCList->pWrite->irq_src = data->irq_src;
+  /*printk("%s: entry %px irq_src %d, msi %08x\n", __func__,  pCList->pWrite,  data->irq_src, data->val);*/
+  /*get the next write entry pointer that link with the write entry list*/
+  pWriteEntry = list_first_entry(&pCList->pWrite->list, isp_mis_t, list);
+
+  /*Update write pointer to point next entry*/
+  pCList->pWrite = pWriteEntry;
+
+#endif
+  return 0;
+}
+

+ 98 - 0
vvcam/isp/isp_irq_queue.h

@@ -0,0 +1,98 @@
+ /****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_IRQ_QUEUE_H_
+#define _ISP_IRQ_QUEUE_H_
+#ifdef __KERNEL__
+#include <linux/list.h>
+#endif
+//#include "isp_ioctl.h"
+ typedef enum isp_src_e
+{
+    SRC_ISP_IRQ         = 0X0000,
+    SRC_JPE_STATUS_IRQ,
+    SRC_JPE_ERROR_IRQ,
+    SRC_MI_IRQ,
+    SRC_MI1_IRQ,
+    SRC_MI2_IRQ,
+    SRC_MIPI_IRQ,
+    SRC_IRQ_MAX,
+} isp_src_t;
+
+typedef struct isp_mis_s {
+	unsigned int irq_src;
+	unsigned int val;
+#ifdef __KERNEL__
+  struct list_head list;
+#endif
+}isp_mis_t;
+
+typedef struct isp_mis_list_s {
+
+  isp_mis_t* pHead;
+  isp_mis_t* pRead;
+  isp_mis_t* pWrite;
+}isp_mis_list_t;
+
+
+int isp_irq_enqueue(isp_mis_t *new,isp_mis_t* head);
+int isp_irq_dequeue(isp_mis_t* data, isp_mis_t* head);
+bool isp_irq_is_queue_empty( isp_mis_t* head);
+
+#define QUEUE_NODE_COUNT 15
+int isp_irq_create_circle_queue(isp_mis_list_t* pCList, int number);
+int isp_irq_destroy_circle_queue(isp_mis_list_t* pCList);
+
+int isp_irq_read_circle_queue(isp_mis_t* data, isp_mis_list_t* pCList);
+int isp_irq_write_circle_queue(isp_mis_t* data, isp_mis_list_t* pCList);
+
+#endif

+ 279 - 0
vvcam/isp/isp_isr.c

@@ -0,0 +1,279 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef ENABLE_IRQ
+
+#include "isp_ioctl.h"
+#include "isp_types.h"
+#include "mrv_all_bits.h"
+#include "video/vvbuf.h"
+
+extern MrvAllRegister_t *all_regs;
+
+#ifdef CONFIG_VIDEOBUF2_DMA_CONTIG
+static int config_dma_buf(struct isp_mi_data_path_context *path,
+		dma_addr_t dma, struct isp_buffer_context *buf)
+{
+	u32 size = path->out_width * path->out_height;
+
+	buf->addr_y = dma;
+	switch (path->out_mode) {
+	case IC_MI_DATAMODE_YUV444:
+	case IC_MI_DATAMODE_YUV422:
+	case IC_MI_DATAMODE_YUV420:
+		if (path->data_layout == IC_MI_DATASTORAGE_PLANAR) {
+			buf->size_y = size + ISP_BUF_GAP;
+			buf->addr_cb = buf->addr_y + size;
+			buf->size_cb = size + ISP_BUF_GAP;
+			buf->addr_cr = buf->addr_cb + size;
+			buf->size_cr = size + ISP_BUF_GAP;
+		} else if (path->data_layout ==
+				IC_MI_DATASTORAGE_SEMIPLANAR) {
+			buf->size_y = size + ISP_BUF_GAP;
+			buf->addr_cb = buf->addr_y + size;
+			if (path->out_mode == IC_MI_DATAMODE_YUV420)
+				buf->size_cb = (size >> 1) + ISP_BUF_GAP;
+			else
+				buf->size_cb = size + ISP_BUF_GAP;
+		} else if (path->data_layout ==
+				IC_MI_DATASTORAGE_INTERLEAVED) {
+			buf->size_y = (size << 1) + ISP_BUF_GAP;
+		} else
+			return -1;
+		break;
+	case IC_MI_DATAMODE_RAW8:
+		buf->size_y = size + ISP_BUF_GAP;
+		break;
+	case IC_MI_DATAMODE_RAW10:
+	case IC_MI_DATAMODE_RAW12:
+		buf->size_y = (size << 1) + ISP_BUF_GAP;
+		break;
+	default:
+		pr_err("unsupported out mode:%d\n", path->out_mode);
+		return -1;
+	}
+#ifdef ISP_MP_34BIT
+	buf->addr_y  >>= 2;
+	buf->addr_cb >>= 2;
+	buf->addr_cr >>= 2;
+#endif
+	return 0;
+}
+#endif
+
+static int update_dma_buffer(struct isp_ic_dev *dev)
+{
+#ifdef CONFIG_VIDEOBUF2_DMA_CONTIG
+	struct isp_mi_context *mi = &dev->mi;
+	struct vb2_dc_buf *buf = NULL;
+	struct isp_buffer_context dmabuf;
+	int i,dequeued;
+
+	for (i = 0; i < MI_PATH_NUM; ++i) {
+		if (!mi->path[i].enable)
+			continue;
+		if (dev->mi_buf[i]) {
+			vvbuf_ready(dev->bctx, dev->mi_buf[i]->pad,
+					dev->mi_buf[i]);
+			dev->mi_buf[i] = NULL;
+		}
+		if (dev->state && !(*dev->state & STATE_DRIVER_STARTED))
+			continue;
+		dequeued = 1;
+		buf = vvbuf_try_dqbuf(dev->bctx);
+		if (!buf) {
+			buf = dev->mi_buf_shd[i];
+			if (!buf)
+				return -ENOMEM;
+			dev->mi_buf_shd[i] = NULL;
+			dequeued = 0;
+		} else if (dev->mi_buf_shd[i]) {
+			dev->mi_buf[i] = dev->mi_buf_shd[i];
+			dev->mi_buf_shd[i] = NULL;
+		}
+
+		memset(&dmabuf, 0, sizeof(dmabuf));
+		dmabuf.path = i;
+		if (config_dma_buf(&mi->path[i], buf->dma, &dmabuf))
+			continue;
+		isp_set_buffer(dev, &dmabuf);
+		dev->mi_buf_shd[i] = buf;
+		if (dequeued)
+			vvbuf_try_dqbuf_done(dev->bctx, buf);
+	}
+#endif
+	return 0;
+}
+
+int clean_dma_buffer(struct isp_ic_dev *dev)
+{
+#ifdef CONFIG_VIDEOBUF2_DMA_CONTIG
+	int i;
+
+	if (!dev->free)
+		return 0;
+
+	dev->free(dev, NULL);
+
+	for (i = 0; i < MI_PATH_NUM; ++i) {
+		if (dev->mi_buf[i]) {
+			dev->free(dev, dev->mi_buf[i]);
+			dev->mi_buf[i] = NULL;
+		}
+		if (dev->mi_buf_shd[i]) {
+			dev->free(dev, dev->mi_buf_shd[i]);
+			dev->mi_buf_shd[i] = NULL;
+		}
+	}
+#endif
+	return 0;
+}
+
+void isp_clear_interrupts(struct isp_ic_dev *dev)
+{
+	u32 isp_mis, mi_mis;
+
+	isp_mis = isp_read_reg(dev, REG_ADDR(isp_mis));
+	isp_write_reg(dev, REG_ADDR(isp_icr), isp_mis);
+
+#ifdef ISP_MIV1
+	mi_mis = isp_read_reg(dev, REG_ADDR(mi_mis));
+	isp_write_reg(dev, REG_ADDR(mi_icr), mi_mis);
+#elif defined(ISP_MIV2)
+	mi_mis = isp_read_reg(dev, REG_ADDR(miv2_mis));
+	isp_write_reg(dev, REG_ADDR(miv2_icr), mi_mis);
+#else
+	mi_mis = 0;
+#endif
+}
+
+irqreturn_t isp_hw_isr(int irq, void *data)
+{
+	struct isp_ic_dev *dev = (struct isp_ic_dev *)data;
+	static const u32 frameendmask = MRV_MI_MP_FRAME_END_MASK |
+#ifdef ISP_MI_BP
+			MRV_MI_BP_FRAME_END_MASK |
+#endif
+			MRV_MI_SP_FRAME_END_MASK;
+	static const u32 errormask = MRV_MI_WRAP_MP_Y_MASK |
+			MRV_MI_WRAP_MP_CB_MASK |
+			MRV_MI_WRAP_MP_CR_MASK |
+#ifdef ISP_MI_BP
+			MRV_MI_BP_WRAP_R_MASK |
+			MRV_MI_BP_WRAP_GR_MASK |
+			MRV_MI_BP_WRAP_GB_MASK |
+			MRV_MI_BP_WRAP_B_MASK |
+#endif
+			MRV_MI_WRAP_SP_Y_MASK |
+			MRV_MI_WRAP_SP_CB_MASK |
+			MRV_MI_WRAP_SP_CR_MASK |
+			MRV_MI_FILL_MP_Y_MASK;
+	static const u32 fifofullmask = MRV_MI_MP_Y_FIFO_FULL_MASK |
+			MRV_MI_MP_CB_FIFO_FULL_MASK |
+			MRV_MI_MP_CR_FIFO_FULL_MASK |
+			MRV_MI_SP_Y_FIFO_FULL_MASK |
+			MRV_MI_SP_CB_FIFO_FULL_MASK |
+			MRV_MI_SP_CR_FIFO_FULL_MASK;
+	u32 isp_mis, mi_mis, mi_status;
+	struct isp_irq_data irq_data;
+	int rc = 0;
+
+	if (!dev)
+		return IRQ_HANDLED;
+
+	isp_mis = isp_read_reg(dev, REG_ADDR(isp_mis));
+	isp_write_reg(dev, REG_ADDR(isp_icr), isp_mis);
+
+#ifdef ISP_MIV1
+	mi_mis = isp_read_reg(dev, REG_ADDR(mi_mis));
+	isp_write_reg(dev, REG_ADDR(mi_icr), mi_mis);
+#elif defined(ISP_MIV2)
+	mi_mis = isp_read_reg(dev, REG_ADDR(miv2_mis));
+	isp_write_reg(dev, REG_ADDR(miv2_icr), mi_mis);
+#else
+	mi_mis = 0;
+#endif
+
+	mi_status = isp_read_reg(dev, REG_ADDR(mi_status));
+	if (mi_status & fifofullmask) {
+		isp_write_reg(dev, REG_ADDR(mi_status), mi_status);
+		pr_debug("MI FIFO full: 0x%x\n", mi_status);
+	}
+
+	if (mi_mis & errormask)
+		pr_debug("MI mis error: 0x%x\n", mi_mis);
+
+	if (mi_mis & frameendmask)
+		rc = update_dma_buffer(dev);
+
+	if (isp_mis) {
+		if(isp_mis & MRV_ISP_MIS_FRAME_MASK) {
+			if (dev->isp_update_flag & ISP_FLT_UPDATE) {
+ 				isp_s_flt(dev);
+ 				dev->isp_update_flag &= (~ISP_FLT_UPDATE);
+			}
+
+			if (dev->gamma_out.changed) {
+				isp_s_gamma_out(dev);
+			}
+
+		}
+
+		memset(&irq_data, 0, sizeof(irq_data));
+		irq_data.val = isp_mis;
+		if (dev->post_event)
+			dev->post_event(dev, &irq_data, sizeof(irq_data));
+	}
+	return IRQ_HANDLED;
+}
+
+#endif

+ 626 - 0
vvcam/isp/isp_miv1.c

@@ -0,0 +1,626 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+#ifdef ISP_MIV1
+
+extern MrvAllRegister_t *all_regs;
+
+static int getRawBit(u32 type, u32 *bit, u32 *len)
+{
+	*len = 16;
+	switch (type) {
+	case ISP_PICBUF_TYPE_RAW8:
+		*bit = 0;
+		*len = 8;
+		break;
+#if 0				/* normal process,  need pass type from engine. */
+	case ISP_PICBUF_TYPE_RAW10:
+		*bit = 1;
+		break;
+	case ISP_PICBUF_TYPE_RAW12:
+		*bit = 2;
+		break;
+	case ISP_PICBUF_TYPE_RAW14:
+		*bit = 3;
+		break;
+	case ISP_PICBUF_TYPE_RAW16:
+		*bit = 4;
+		break;
+#else /* WA */
+	case ISP_PICBUF_TYPE_RAW10:
+	case ISP_PICBUF_TYPE_RAW12:
+	case ISP_PICBUF_TYPE_RAW14:
+	case ISP_PICBUF_TYPE_RAW16:
+		*bit = 4;
+		break;
+#endif
+	default:
+		pr_err("unsupport raw formt: %d\n", type);
+		return -1;
+	}
+	return 0;
+}
+int isp_ioc_cfg_dma(struct isp_ic_dev *dev, void __user *args)
+{
+	return 0;
+}
+int isp_ioc_start_dma_read(struct isp_ic_dev *dev, void __user *args)
+{
+	struct isp_dma_context dma;
+	u32 mi_dma_ctrl = isp_read_reg(dev, REG_ADDR(mi_dma_ctrl));
+	u32 llength = 0, mcm_rd_fmt_bit = 0;
+	u32 mi_imsc = 0, mcm_fmt = 0;
+
+	pr_info("enter %s\n", __func__);
+	viv_check_retval(copy_from_user(&dma, args, sizeof(dma)));
+
+	REG_SET_SLICE(mi_dma_ctrl, MRV_MI_DMA_BURST_LEN_LUM, dma.burst_y);
+	REG_SET_SLICE(mi_dma_ctrl, MRV_MI_DMA_BURST_LEN_CHROM, dma.burst_c);
+
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_pic_start_ad),
+		      (MRV_MI_DMA_Y_PIC_START_AD_MASK & dma.base));
+	getRawBit(dma.type, &mcm_rd_fmt_bit, &llength);
+
+	llength = dma.width * llength / 8;
+	REG_SET_SLICE(mcm_fmt, MCM_RD_RAW_BIT, mcm_rd_fmt_bit);
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_pic_width),
+		      (MRV_MI_DMA_Y_PIC_WIDTH_MASK & dma.width));
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_llength),
+		      (MRV_MI_DMA_Y_LLENGTH_MASK & llength));
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_pic_size),
+		      (MRV_MI_DMA_Y_PIC_SIZE_MASK & (llength * dma.height)));
+	isp_write_reg(dev, REG_ADDR(mi_dma_cb_pic_start_ad), 0);
+	isp_write_reg(dev, REG_ADDR(mi_dma_cr_pic_start_ad), 0);
+	isp_write_reg(dev, REG_ADDR(mi_dma_ctrl), mi_dma_ctrl);
+
+	isp_write_reg(dev, REG_ADDR(mi_dma_status), 0);
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_raw_fmt), mcm_fmt);
+	isp_write_reg(dev, REG_ADDR(mi_dma_y_raw_lval),
+		      (MRV_MI_DMA_Y_LLENGTH_MASK & llength));
+
+	mi_imsc = isp_read_reg(dev, REG_ADDR(mi_imsc));
+	mi_imsc |= MRV_MI_DMA_READY_MASK;
+
+	isp_write_reg(dev, REG_ADDR(mi_imsc), mi_imsc);
+	isp_write_reg(dev, REG_ADDR(mi_dma_start), MRV_MI_DMA_START_MASK);
+	return 0;
+}
+
+u32 getScaleFactor(u32 src, u32 dst)
+{
+	if (dst > src) {
+		return ((65536 * (src - 1)) / (dst - 1));
+	} else if (dst < src) {
+		return ((65536 * (dst - 1)) / (src - 1)) + 1;
+	}
+	return 65536;
+}
+
+int set_scaling(int id, struct isp_ic_dev *dev, bool stabilization)
+{
+	u32 addr, ctrl;
+	u32 iw, ih, ow, oh;
+	u32 inputWidth, inputHeight, outputWidth, outputHeight;
+	u32 scale_hy, scale_hcb, scale_hcr, scale_vy, scale_vc;
+	struct isp_mi_data_path_context *path = &dev->mi.path[id];
+
+	if (id == IC_MI_PATH_MAIN) {	/* mp */
+		addr = REG_ADDR(mrsz_ctrl);
+	} else if (id == IC_MI_PATH_SELF) {	/* sp */
+		addr = REG_ADDR(srsz_ctrl);
+	} else {
+		return -EINVAL;
+	}
+
+	inputWidth = path->in_width;
+	inputHeight = path->in_height;
+	outputWidth = path->out_width;
+	outputHeight = path->out_height;
+
+	if (stabilization) {	/* enabled image stabilization. */
+		inputWidth = isp_read_reg(dev, REG_ADDR(isp_is_h_size));
+		inputHeight = isp_read_reg(dev, REG_ADDR(isp_is_v_size));
+	}
+
+	ctrl = isp_read_reg(dev, addr);
+	iw = inputWidth / 2;
+	ih = inputHeight;
+	ow = outputWidth / 2;
+	oh = outputHeight;
+
+	switch (path->in_mode) {
+	case IC_MI_DATAMODE_YUV422:
+		oh = outputHeight;
+		break;
+	case IC_MI_DATAMODE_YUV420:
+		oh = outputHeight / 2;	/*  scale cbcr */
+		break;
+	default:
+		return -EFAULT;
+	}
+
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HY_ENABLE,
+		      inputWidth != outputWidth);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VY_ENABLE,
+		      inputHeight != outputHeight);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HY_UP, inputWidth < outputWidth);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VY_UP, inputHeight < outputHeight);
+	scale_hy = getScaleFactor(inputWidth, outputWidth);
+	scale_vy = getScaleFactor(inputHeight, outputHeight);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HC_ENABLE, iw != ow);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VC_ENABLE, ih != oh);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_HC_UP, iw < ow);
+	REG_SET_SLICE(ctrl, MRV_MRSZ_SCALE_VC_UP, ih < oh);
+	scale_hcr = getScaleFactor(iw, ow);
+	scale_hcb = getScaleFactor(iw, ow);
+	scale_vc = getScaleFactor(ih, oh);
+
+	REG_SET_SLICE(ctrl, MRV_MRSZ_AUTO_UPD, 1);
+
+	if (id == IC_MI_PATH_MAIN) {
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_vc), scale_vc);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_vy), scale_vy);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hcr), scale_hcr);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hcb), scale_hcb);
+		isp_write_reg(dev, REG_ADDR(mrsz_scale_hy), scale_hy);
+		isp_write_reg(dev, REG_ADDR(mrsz_ctrl),
+			      ctrl | MRV_MRSZ_CFG_UPD_MASK);
+	} else if (id == IC_MI_PATH_SELF) {
+		isp_write_reg(dev, REG_ADDR(srsz_scale_vc), scale_vc);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_vy), scale_vy);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hcr), scale_hcr);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hcb), scale_hcb);
+		isp_write_reg(dev, REG_ADDR(srsz_scale_hy), scale_hy);
+		isp_write_reg(dev, REG_ADDR(srsz_ctrl),
+			      ctrl | MRV_MRSZ_CFG_UPD_MASK);
+	}
+
+	return 0;
+}
+
+#ifdef ISP_MI_BP
+int isp_bppath_start(struct isp_ic_dev *dev)
+{
+	struct isp_mi_context mi = *(&dev->mi);
+	u32 bp_ctrl = 0, lval = 0;
+	struct isp_mi_data_path_context *path = &mi.path[2];
+	u32 mi_imsc = isp_read_reg(dev, REG_ADDR(mi_imsc));
+	int i;
+
+	pr_info("enter %s\n", __func__);
+	bp_ctrl = 0;
+	lval = path->out_width;
+
+	if (mi.path[2].enable) {
+		bp_ctrl &= ~MRV_MI_BP_WRITE_RAWBIT_MASK;
+
+		if (path->data_alignMode == ISP_MI_DATA_ALIGN_16BIT_MODE) {
+			if ((path->out_mode == IC_MI_DATAMODE_RAW10) ||
+			    (path->out_mode == IC_MI_DATAMODE_RAW12) ||
+			    (path->out_mode == IC_MI_DATAMODE_RAW14)) {
+				lval = (path->out_width + 3) / 4;
+			}
+		} else if (path->data_alignMode ==
+			   ISP_MI_DATA_ALIGN_128BIT_MODE) {
+			if ((path->out_mode == IC_MI_DATAMODE_RAW10)
+			    || (path->out_mode == IC_MI_DATAMODE_RAW12)
+			    || (path->out_mode == IC_MI_DATAMODE_RAW14)) {
+				lval = (path->out_width * 2 + 126) / 128;
+			}
+		} else {
+			if (path->out_mode == IC_MI_DATAMODE_RAW10) {
+				lval = (path->out_width * 10 + 63) / 64;
+			} else if (path->out_mode == IC_MI_DATAMODE_RAW12) {
+				lval = (path->out_width * 12 + 63) / 64;
+			} else if (path->out_mode == IC_MI_DATAMODE_RAW14) {
+				lval = (path->out_width * 14 + 63) / 64;
+			} else if (path->out_mode == IC_MI_DATAMODE_RAW16) {
+				lval = (path->out_width * 16 + 63) / 64;
+			} else {
+				lval = (path->out_width * 8 + 63) / 64;
+			}
+		}
+		lval <<= 3;
+		REG_SET_SLICE(bp_ctrl, BP_WR_RAW_ALIGNED, path->data_alignMode);
+		switch (mi.path[2].out_mode) {
+		case (IC_MI_DATAMODE_RAW8):
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_RAWBIT,
+				      MRV_MI_BP_WRITE_RAWBIT_RAW_8);
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_FORMAT,
+				      MRV_MI_BP_WRITE_INTERLEAVE_FORMAT);
+			break;
+		case (IC_MI_DATAMODE_RAW12):
+			REG_SET_SLICE(bp_ctrl, BP_WR_BYTE_SWAP, 1);
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_RAWBIT,
+				      MRV_MI_BP_WRITE_RAWBIT_RAW_12);
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_FORMAT,
+				      MRV_MI_BP_WRITE_INTERLEAVE_FORMAT);
+			break;
+		case (IC_MI_DATAMODE_RAW10):
+			REG_SET_SLICE(bp_ctrl, BP_WR_BYTE_SWAP, 1);
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_RAWBIT,
+				      MRV_MI_BP_WRITE_RAWBIT_RAW_10);
+			REG_SET_SLICE(bp_ctrl, MRV_MI_BP_WRITE_FORMAT,
+				      MRV_MI_BP_WRITE_INTERLEAVE_FORMAT);
+			break;
+		default:
+			break;
+		}
+		isp_write_reg(dev, REG_ADDR(mi_bp_wr_size_init),
+			      lval * mi.path[2].out_height);
+		isp_write_reg(dev, REG_ADDR(mi_bp_pic_width),
+			      mi.path[2].out_width);
+		isp_write_reg(dev, REG_ADDR(mi_bp_wr_llength), lval);
+		isp_write_reg(dev, REG_ADDR(mi_bp_pic_height),
+			      mi.path[2].out_height);
+		isp_write_reg(dev, REG_ADDR(mi_bp_pic_size),
+			      lval * mi.path[2].out_height);
+		/* enable frame end irq for  bp path */
+		mi_imsc |=
+		    MRV_MI_BP_FRAME_END_MASK | MRV_MI_BP_WRAP_R_MASK |
+		    MRV_MI_BP_WRAP_GR_MASK | MRV_MI_BP_WRAP_GB_MASK |
+		    MRV_MI_BP_WRAP_B_MASK;
+	}
+	if (!dev->rawis.enable) {
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_h_size),
+			      mi.path[2].out_width);
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_v_size),
+			      mi.path[2].out_height);
+		isp_write_reg(dev, REG_ADDR(isp_raw_is_ctrl), 0);
+	}
+	bp_ctrl |= MRV_MI_BP_PATH_ENABLE_MASK;
+	isp_write_reg(dev, REG_ADDR(mi_bp_ctrl), bp_ctrl);
+
+	isp_write_reg(dev, REG_ADDR(mi_imsc), mi_imsc);
+	return 0;
+}
+#endif
+int isp_mi_start(struct isp_ic_dev *dev)
+{
+	struct isp_mi_context mi = *(&dev->mi);
+	u32 mi_init, mi_ctrl, mi_imsc;
+	u32 out_stride;
+	int i;
+	u8 retry = 3;
+
+	pr_info("enter %s\n", __func__);
+
+	isp_write_reg(dev, REG_ADDR(mrsz_ctrl), 0);
+	isp_write_reg(dev, REG_ADDR(mrsz_ctrl_shd), 0);
+
+	for (i = 0; i < 2; i++) {
+		if (mi.path[i].hscale || mi.path[i].vscale) {
+			set_scaling(i, dev, dev->is.enable);
+		}
+	}
+
+	mi_init = 0;
+	mi_ctrl = 0;
+	mi_imsc = 0;
+	if (mi.path[0].enable) {
+		/* remove update enable bits for offset and base registers */
+		mi_init &= ~MRV_MI_MP_OUTPUT_FORMAT_MASK;
+		mi_ctrl &= ~MRV_MI_MP_WRITE_FORMAT_MASK;
+
+		/* config mi_init output format for yuv format */
+		if (mi.path[0].out_mode <= IC_MI_DATAMODE_YUV400)
+			REG_SET_SLICE(mi_init, MRV_MI_MP_OUTPUT_FORMAT,
+				      IC_MI_DATAMODE_YUV400 -
+				      mi.path[0].out_mode);
+		switch (mi.path[0].out_mode) {
+		case (IC_MI_DATAMODE_RAW8):
+			REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+				      MRV_MI_MP_WRITE_FORMAT_RAW_8);
+			REG_SET_SLICE(mi_ctrl, MRV_MI_RAW_ENABLE, 1);
+			REG_SET_SLICE(mi_init, MRV_MI_MP_OUTPUT_FORMAT,
+				      MRV_MI_MP_OUTPUT_FORMAT_RAW8);
+			break;
+		case (IC_MI_DATAMODE_RAW12):
+			REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+				      MRV_MI_MP_WRITE_FORMAT_RAW_12);
+			REG_SET_SLICE(mi_ctrl, MRV_MI_RAW_ENABLE, 1);
+			REG_SET_SLICE(mi_init, MRV_MI_MP_OUTPUT_FORMAT,
+				      MRV_MI_MP_OUTPUT_FORMAT_RAW12);
+			isp_write_reg(dev, REG_ADDR(mi_output_align_format), 1);
+			break;
+		case (IC_MI_DATAMODE_RAW10):
+			REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+				      MRV_MI_MP_WRITE_FORMAT_RAW_12);
+			REG_SET_SLICE(mi_ctrl, MRV_MI_RAW_ENABLE, 1);
+			REG_SET_SLICE(mi_init, MRV_MI_MP_OUTPUT_FORMAT,
+				      MRV_MI_MP_OUTPUT_FORMAT_RAW10);
+			isp_write_reg(dev, REG_ADDR(mi_output_align_format), 1);
+			break;
+		case (IC_MI_DATAMODE_JPEG):
+			REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+				      MRV_MI_MP_WRITE_FORMAT_PLANAR);
+			REG_SET_SLICE(mi_ctrl, MRV_MI_JPEG_ENABLE, 1);
+			break;
+		case (IC_MI_DATAMODE_YUV444):
+		case (IC_MI_DATAMODE_YUV422):
+		case (IC_MI_DATAMODE_YUV420):
+		case (IC_MI_DATAMODE_YUV400):
+			if (mi.path[0].data_layout == IC_MI_DATASTORAGE_PLANAR) {
+				REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+					      MRV_MI_MP_WRITE_FORMAT_PLANAR);
+			} else if (mi.path[0].data_layout ==
+				   IC_MI_DATASTORAGE_SEMIPLANAR) {
+				REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+					      MRV_MI_MP_WRITE_FORMAT_SEMIPLANAR);
+			} else if (mi.path[0].data_layout ==
+				   IC_MI_DATASTORAGE_INTERLEAVED) {
+				REG_SET_SLICE(mi_ctrl, MRV_MI_MP_WRITE_FORMAT,
+					      MRV_MI_MP_WRITE_FORMAT_INTERLEAVED);
+			} else {
+				break;
+			}
+			REG_SET_SLICE(mi_ctrl, MRV_MI_MP_ENABLE, 1);
+			break;
+		default:
+			break;
+		}
+
+		out_stride = mi.path[0].data_layout ==
+		    IC_MI_DATASTORAGE_INTERLEAVED ?
+		    (mi.path[0].out_width * 2) : (mi.path[0].out_width);
+		isp_write_reg(dev, REG_ADDR(mi_mp_y_pic_width), out_stride);
+		isp_write_reg(dev, REG_ADDR(mi_mp_y_llength), out_stride);
+		isp_write_reg(dev, REG_ADDR(mi_mp_y_pic_height),
+			      mi.path[0].out_height);
+		isp_write_reg(dev, REG_ADDR(mi_mp_y_pic_size),
+			      out_stride * mi.path[0].out_height);
+
+		/* workaround to resolve the problem that the mi_mp_y_pic_width can't be written */
+		for(i = 0; i < retry; i++) {
+			if(isp_read_reg(dev, REG_ADDR(mi_mp_y_pic_width)) != out_stride) {
+				isp_write_reg(dev, REG_ADDR(mi_mp_y_pic_width), out_stride);
+			} else {
+				break;
+			}
+		}
+		if(retry == i) {
+			pr_info("%s: update mi_mp_y_pic_width error!\n", __func__);
+		}
+
+		/* enable frame end irq for  main path */
+		mi_imsc |=
+		    (MRV_MI_MP_FRAME_END_MASK | MRV_MI_WRAP_MP_Y_MASK |
+		     MRV_MI_WRAP_MP_CB_MASK | MRV_MI_WRAP_MP_CR_MASK);
+	}
+
+	if (mi.path[1].enable) {
+		/* setup mi for self-path */
+		mi_ctrl &= ~(MRV_MI_SP_WRITE_FORMAT_MASK);
+		REG_SET_SLICE(mi_ctrl, MRV_MI_SP_INPUT_FORMAT,
+			      mi.path[1].in_mode - 1);
+		REG_SET_SLICE(mi_ctrl, MRV_MI_SP_OUTPUT_FORMAT,
+			      mi.path[1].out_mode - 1);
+
+		switch (mi.path[1].out_mode) {
+		case (IC_MI_DATAMODE_RGB888):
+		case (IC_MI_DATAMODE_RGB666):
+		case (IC_MI_DATAMODE_RGB565):
+			REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+				      MRV_MI_SP_WRITE_FORMAT_RGB_INTERLEAVED);
+			break;
+		case (IC_MI_DATAMODE_YUV444):
+		case (IC_MI_DATAMODE_YUV400):
+			if (mi.path[1].data_layout == IC_MI_DATASTORAGE_PLANAR) {
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_PLANAR);
+			}
+			break;
+		case (IC_MI_DATAMODE_YUV422):
+			switch (mi.path[1].data_layout) {
+			case (IC_MI_DATASTORAGE_PLANAR):
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_PLANAR);
+				break;
+			case (IC_MI_DATASTORAGE_SEMIPLANAR):
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_SEMIPLANAR);
+				break;
+			case (IC_MI_DATASTORAGE_INTERLEAVED):
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_INTERLEAVED);
+				break;
+			default:
+				break;
+			}
+			break;
+		case (IC_MI_DATAMODE_YUV420):
+			switch (mi.path[1].data_layout) {
+			case (IC_MI_DATASTORAGE_PLANAR):
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_PLANAR);
+				break;
+			case (IC_MI_DATASTORAGE_SEMIPLANAR):
+				REG_SET_SLICE(mi_ctrl, MRV_MI_SP_WRITE_FORMAT,
+					      MRV_MI_SP_WRITE_FORMAT_SEMIPLANAR);
+				break;
+			default:
+				break;
+			}
+			break;
+		default:
+			break;
+		}
+
+		out_stride = mi.path[1].data_layout ==
+		    IC_MI_DATASTORAGE_INTERLEAVED ?
+		    mi.path[1].out_width * 2 : mi.path[1].out_width;
+		REG_SET_SLICE(mi_ctrl, MRV_MI_SP_ENABLE, 1);
+		isp_write_reg(dev, REG_ADDR(mi_sp_y_pic_width), out_stride);
+		isp_write_reg(dev, REG_ADDR(mi_sp_y_llength), out_stride);
+		isp_write_reg(dev, REG_ADDR(mi_sp_y_pic_height),
+			      mi.path[1].out_height);
+		isp_write_reg(dev, REG_ADDR(mi_sp_y_pic_size),
+			      out_stride * mi.path[1].out_height);
+		/* enable frame end interrupt on self path */
+		mi_imsc |=
+		    (MRV_MI_SP_FRAME_END_MASK | MRV_MI_WRAP_SP_Y_MASK |
+		     MRV_MI_WRAP_SP_CB_MASK | MRV_MI_WRAP_SP_CR_MASK);
+	}
+
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+	for (i = 0; i < MI_PATH_NUM; ++i) {
+		dev->mi_buf[i] = NULL;
+		dev->mi_buf_shd[i] = NULL;
+	}
+	if (dev->state)
+		*dev->state |= STATE_DRIVER_STARTED;
+#endif
+
+	mi_ctrl |= (MRV_MI_INIT_BASE_EN_MASK | MRV_MI_INIT_OFFSET_EN_MASK);
+	REG_SET_SLICE(mi_ctrl, MRV_MI_BURST_LEN_CHROM, mi.burst_len);
+	REG_SET_SLICE(mi_ctrl, MRV_MI_BURST_LEN_LUM, mi.burst_len);
+	isp_write_reg(dev, REG_ADDR(mi_ctrl), mi_ctrl | 0x2000);
+	REG_SET_SLICE(mi_init, MRV_MI_MI_CFG_UPD, 1);
+
+	isp_write_reg(dev, REG_ADDR(mi_imsc), mi_imsc);
+#ifdef ISP_MI_BP
+	isp_bppath_start(dev);
+#endif
+	isp_write_reg(dev, REG_ADDR(mi_init), mi_init);
+	return 0;
+}
+
+int isp_mi_stop(struct isp_ic_dev *dev)
+{
+	u32 mi_ctrl = 0, mi_init = 0;
+	pr_info("enter %s\n", __func__);
+
+	isp_write_reg(dev, REG_ADDR(mi_imsc), 0);
+
+	/* disable mi path */
+	mi_ctrl = isp_read_reg(dev, REG_ADDR(mi_ctrl));
+	REG_SET_SLICE(mi_ctrl, MRV_MI_MP_ENABLE, 0);
+	REG_SET_SLICE(mi_ctrl, MRV_MI_SP_ENABLE, 0);
+	REG_SET_SLICE(mi_ctrl, MRV_MI_JPEG_ENABLE, 0);
+	REG_SET_SLICE(mi_ctrl, MRV_MI_RAW_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(mi_ctrl), mi_ctrl);
+
+	mi_init = isp_read_reg(dev, REG_ADDR(mi_init));
+	REG_SET_SLICE(mi_init, MRV_MI_MI_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(mi_init), mi_init);
+
+#if defined(__KERNEL__) && defined(ENABLE_IRQ)
+	if (dev->state)
+		*dev->state &= ~STATE_DRIVER_STARTED;
+	clean_dma_buffer(dev);
+#endif
+	return 0;
+}
+
+int isp_set_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
+{
+	u32 addr;
+
+	if (!dev || !buf) {
+		pr_err("NULL pointer %s\n", __func__);
+		return -EINVAL;
+	}
+
+	addr = buf->path == 0 ?
+	    REG_ADDR(mi_mp_y_base_ad_init) : REG_ADDR(mi_sp_y_base_ad_init);
+	isp_write_reg(dev, addr, (buf->addr_y & MRV_MI_MP_Y_BASE_AD_INIT_MASK));
+	isp_write_reg(dev, addr + 1 * 4,
+		      (buf->size_y & MRV_MI_MP_Y_SIZE_INIT_MASK));
+	isp_write_reg(dev, addr + 2 * 4, 0);
+	isp_write_reg(dev, addr + 5 * 4,
+		      (buf->addr_cb & MRV_MI_MP_CB_BASE_AD_INIT_MASK));
+	isp_write_reg(dev, addr + 6 * 4,
+		      (buf->size_cb & MRV_MI_MP_CB_SIZE_INIT_MASK));
+	isp_write_reg(dev, addr + 7 * 4, 0);
+	isp_write_reg(dev, addr + 9 * 4,
+		      (buf->addr_cr & MRV_MI_MP_CR_BASE_AD_INIT_MASK));
+	isp_write_reg(dev, addr + 10 * 4,
+		      (buf->size_cr & MRV_MI_MP_CR_SIZE_INIT_MASK));
+	isp_write_reg(dev, addr + 11 * 4, 0);
+
+	return 0;
+}
+
+int isp_set_bp_buffer(struct isp_ic_dev *dev, struct isp_bp_buffer_context *buf)
+{
+#ifndef ISP_MI_BP
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	isp_write_reg(dev, REG_ADDR(mi_bp_r_base_ad_init),
+		      (buf->addr_r & BP_R_BASE_AD_INIT_MASK));
+	isp_write_reg(dev, REG_ADDR(mi_bp_gr_base_ad_init),
+		      (buf->addr_gr & BP_GR_BASE_AD_INIT_MASK));
+
+	isp_write_reg(dev, REG_ADDR(mi_bp_gb_base_ad_init),
+		      (buf->addr_gb & BP_GB_BASE_AD_INIT_MASK));
+	isp_write_reg(dev, REG_ADDR(mi_bp_b_base_ad_init),
+		      (buf->addr_b & BP_B_BASE_AD_INIT_MASK));
+	return 0;
+#endif
+}
+
+u32 isp_read_mi_irq(struct isp_ic_dev * dev)
+{
+	return isp_read_reg(dev, REG_ADDR(mi_mis));
+}
+
+void isp_reset_mi_irq(struct isp_ic_dev *dev, u32 icr)
+{
+	isp_write_reg(dev, REG_ADDR(mi_icr), icr);
+}
+
+#endif

+ 1213 - 0
vvcam/isp/isp_miv2.c

@@ -0,0 +1,1213 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+#ifdef ISP_MIV2
+
+static void mi_set_slice(u32* val, u32 mask, u32 slice);
+extern MrvAllRegister_t *all_regs;
+
+static int getRawBit(u32 type, u32 *bit, u32 *len)
+{
+	*len = 16;
+	switch (type) {
+	case ISP_PICBUF_TYPE_RAW8:
+		*bit = 0;
+		*len = 8;
+		break;
+#if 0				/* normal process,  need pass type from engine. */
+	case ISP_PICBUF_TYPE_RAW10:
+		*bit = 1;
+		break;
+	case ISP_PICBUF_TYPE_RAW12:
+		*bit = 2;
+		break;
+	case ISP_PICBUF_TYPE_RAW14:
+		*bit = 3;
+		break;
+	case ISP_PICBUF_TYPE_RAW16:
+		*bit = 4;
+		break;
+#else /* WA */
+	case ISP_PICBUF_TYPE_RAW10:
+	case ISP_PICBUF_TYPE_RAW12:
+	case ISP_PICBUF_TYPE_RAW14:
+	case ISP_PICBUF_TYPE_RAW16:
+		*bit = 4;
+		break;
+#endif
+	default:
+		pr_err("unsupport raw formt: %d\n", type);
+		return -1;
+	}
+	return 0;
+}
+
+static bool isYuv(int type)
+{
+	return (type == ISP_PICBUF_TYPE_YCbCr444) ||
+	    (type == ISP_PICBUF_TYPE_YCbCr422) ||
+	    (type == ISP_PICBUF_TYPE_YCbCr420) ||
+	    (type == ISP_PICBUF_TYPE_YCbCr400);
+}
+
+static bool isRaw(u32 type)
+{
+	return (type == ISP_PICBUF_TYPE_RAW8) ||
+	    (type == ISP_PICBUF_TYPE_RAW10) ||
+	    (type == ISP_PICBUF_TYPE_RAW12) ||
+	    (type == ISP_PICBUF_TYPE_RAW14) || (type == ISP_PICBUF_TYPE_RAW16);
+
+}
+
+static void set_rgb_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
+{
+	u32 addr = buf->path == 0 ? REG_ADDR(miv2_mp_y_base_ad_init) :
+	    (buf->path ==
+	     1) ? REG_ADDR(miv2_sp1_y_base_ad_init) :
+	    REG_ADDR(miv2_sp2_y_base_ad_init);
+	if (buf->type == ISP_PICBUF_TYPE_RGB888) {
+		isp_write_reg(dev, addr, (buf->addr_y & MP_Y_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 1 * 4,
+			      (buf->size_y & MP_Y_SIZE_MASK));
+		isp_write_reg(dev, addr + 2 * 4, 0);
+		isp_write_reg(dev, addr + 7 * 4,
+			      (buf->addr_cb & MP_CB_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 8 * 4,
+			      (buf->size_cb & MP_CB_SIZE_MASK));
+		isp_write_reg(dev, addr + 9 * 4, 0);
+		isp_write_reg(dev, addr + 10 * 4,
+			      (buf->addr_cr & MP_CR_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 11 * 4,
+			      (buf->size_cr & MP_CR_SIZE_MASK));
+		isp_write_reg(dev, addr + 12 * 4, 0);
+	}
+}
+/*#define PP_LINE_ENTRY*/
+#define PP_LINE_NUM		80*2
+
+static void set_yuv_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
+{
+
+	u32 addr = buf->path == 0 ? REG_ADDR(miv2_mp_y_base_ad_init) :
+			   (buf->path == 1) ? REG_ADDR(miv2_sp1_y_base_ad_init) :
+			   (buf->path == 2) ? REG_ADDR(miv2_sp2_y_base_ad_init) :
+			   REG_ADDR(isp_mi_pp_y_base_ad_init);
+
+	if (isYuv(buf->type)) {
+		isp_write_reg(dev, addr, (buf->addr_y & MP_Y_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 1 * 4,
+			      (buf->size_y & MP_Y_SIZE_MASK));
+		isp_write_reg(dev, addr + 2 * 4, 0);
+		isp_write_reg(dev, addr + 7 * 4,
+			      (buf->addr_cb & MP_CB_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 8 * 4,
+			      (buf->size_cb & MP_CB_SIZE_MASK));
+		isp_write_reg(dev, addr + 9 * 4, 0);
+		isp_write_reg(dev, addr + 10 * 4,
+			      (buf->addr_cr & MP_CR_BASE_AD_MASK));
+		isp_write_reg(dev, addr + 11 * 4,
+			      (buf->size_cr & MP_CR_SIZE_MASK));
+		isp_write_reg(dev, addr + 12 * 4, 0);
+
+
+	}
+}
+
+static void set_raw_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
+{
+	u32 addr = buf->path == ISP_MI_PATH_MP ? REG_ADDR(miv2_mp_raw_base_ad_init) :
+			   (buf->path == ISP_MI_PATH_SP2_BP) ? REG_ADDR(miv2_sp2_raw_base_ad_init) :
+			   (buf->path == ISP_MI_PATH_PP) ?REG_ADDR(isp_mi_pp_y_base_ad_init):
+#ifdef ISP_MI_MCM_WR
+			   (buf->path == ISP_MI_MCM_WR0) ?REG_ADDR(miv2_mcm_raw0_base_ad_init):
+			   (buf->path == ISP_MI_MCM_WR1) ?REG_ADDR(miv2_mcm_raw1_base_ad_init):
+#endif
+#ifdef ISP_MI_HDR
+			   (buf->path == ISP_MI_HDR_L) ?REG_ADDR(isp_mi_hdr_l_base_ad_init):
+			   (buf->path == ISP_MI_HDR_S) ?REG_ADDR(isp_mi_hdr_s_base_ad_init):
+			   (buf->path == ISP_MI_HDR_VS) ?REG_ADDR(isp_mi_hdr_vs_base_ad_init):
+#endif
+				0;
+		uint32_t line_num = isp_read_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_line_num));
+		if ((buf->path == ISP_MI_PATH_PP) && (line_num != 0)) {
+			buf->addr_y = dev->pp_write.buf_addr;
+			buf->size_y = dev->pp_write.buf_size;
+		}
+	/*pr_info("%s path %d type %d addr %08x line_num = %d buf_addr = 0x%x, buf_size = %d\n",
+		__func__, buf->path, buf->type, addr, line_num, buf->addr_y, buf->size_y);*/
+	if (isRaw(buf->type)) {
+		if (addr != 0) {
+			isp_write_reg(dev, addr,
+					(buf->addr_y & MP_RAW_BASE_AD_MASK));
+			isp_write_reg(dev, addr + 4,
+					(buf->size_y & MP_RAW_SIZE_MASK));
+			isp_write_reg(dev, addr + 2 * 4, 0);
+		}
+	}
+
+}
+
+int isp_set_buffer(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
+{
+	if (!dev || !buf) {
+		pr_err("NULL pointer %s\n", __func__);
+		return -1;
+	}
+
+	set_yuv_buffer(dev, buf);
+	set_raw_buffer(dev, buf);
+	set_rgb_buffer(dev, buf);
+	return 0;
+}
+
+static int calc_raw_lval(int width, int out_mode, int align_mode)
+{
+	u32 lval = 0;
+
+	if (align_mode == ISP_MI_DATA_ALIGN_16BIT_MODE) {
+		if ((out_mode == IC_MI_DATAMODE_RAW10) ||
+		    (out_mode == IC_MI_DATAMODE_RAW12) ||
+		    (out_mode == IC_MI_DATAMODE_RAW14)) {
+			lval = (width + 7) / 8;
+		}
+	} else if (align_mode == ISP_MI_DATA_ALIGN_128BIT_MODE) {
+		if (out_mode == IC_MI_DATAMODE_RAW10){
+			lval = (width + 12 - 1)/12;
+		}else if(out_mode == IC_MI_DATAMODE_RAW12){
+			lval = (width + 10 - 1)/10;
+		}else if(out_mode == IC_MI_DATAMODE_RAW14){
+			lval = (width + 9 - 1)/9;
+		}else{
+			lval = (width + 128 - 1)/128;
+		}
+	} else {
+		if (out_mode == IC_MI_DATAMODE_RAW10) {
+			lval = (width * 10 + 127) / 128;
+		} else if (out_mode == IC_MI_DATAMODE_RAW12) {
+			lval = (width * 12 + 127) / 128;
+		} else if (out_mode == IC_MI_DATAMODE_RAW14) {
+			lval = (width * 14 + 127) / 128;
+		} else if (out_mode == IC_MI_DATAMODE_RAW16) {
+			lval = (width * 16 + 127) / 128;
+		} else {
+			lval = (width * 8 + 127) / 128;
+		}
+	}
+
+	return lval;
+}
+
+struct isp_dma_path_context{
+	u32 ctrl_addr;
+	u32 fmt_addr;
+	u32 bus_cfg_addr;
+	u32 bus_id_addr;
+	u32 mi_imsc_addr;
+	u32 rd_fmt_align;
+	u32 rd_raw_bit;
+	u32 rd_cfg_upd;
+	u32 rd_auto_upd;
+	u32 pic_start_addr;
+	u32 pic_width;
+	u32 pic_height;
+	u32 pic_llength;
+	u32 pic_size;
+	u32 pic_lval;
+	u32 path_enable_mask;
+	u32 path_dma_start_mask;
+};
+
+int isp_ioc_cfg_dma(struct isp_ic_dev *dev, void __user *args)
+{
+	u32 llength, miv2_imsc, miv2_ctrl,path_ctrl,path_fmt;
+	struct isp_dma_context dma;
+	//u32 path_bus_cfg;
+	u32 bus_id;
+	u32 path_rd_fmt_bit = 0;
+	u8 id;
+	struct isp_dma_path_context  dma_path_ctx[] =
+#ifndef ISP_MI_PP_READ
+		{{REG_ADDR(miv2_mcm_ctrl), REG_ADDR(miv2_mcm_fmt), REG_ADDR(miv2_mcm_bus_cfg), REG_ADDR(miv2_mcm_bus_id),
+		REG_ADDR(miv2_imsc), MCM_RD_FMT_ALIGNED_MASK, MCM_RD_RAW_BIT_MASK, MCM_RD_CFG_UPD_MASK, MCM_RD_AUTO_UPDATE_MASK, \
+		REG_ADDR(miv2_mcm_dma_raw_pic_start_ad), REG_ADDR(miv2_mcm_dma_raw_pic_width),    0,          \
+		REG_ADDR(miv2_mcm_dma_raw_pic_llength), REG_ADDR(miv2_mcm_dma_raw_pic_size),                \
+		REG_ADDR(miv2_mcm_dma_raw_pic_lval), MCM_RAW_RDMA_PATH_ENABLE_MASK, MCM_RAW_RDMA_START_MASK},
+#ifdef ISP_MI_HDR
+		{REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(miv2_imsc2),               \
+		HDR_RD_RAW_ALIGNED_MASK, HDR_RD_L_BIT_MASK, HDR_RD_RAW_CFG_UPDATE_MASK,HDR_RD_RAW_CFG_UPDATE_MASK,      \
+		REG_ADDR(isp_mi_hdr_dma_l_base_ad_init), REG_ADDR(isp_mi_hdr_dma_pic_width), REG_ADDR(isp_mi_hdr_dma_pic_height),           \
+		REG_ADDR(isp_mi_hdr_dma_l_llength), REG_ADDR(isp_mi_hdr_dma_l_size_init),                \
+		REG_ADDR(isp_mi_hdr_dma_l_lval), 0, HDR_DMA_START_MASK},
+
+		{REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(miv2_imsc2),               \
+		HDR_RD_RAW_ALIGNED_MASK, HDR_RD_S_BIT_MASK, HDR_RD_RAW_CFG_UPDATE_MASK,HDR_RD_RAW_CFG_UPDATE_MASK,      \
+		REG_ADDR(isp_mi_hdr_dma_s_base_ad_init), REG_ADDR(isp_mi_hdr_dma_pic_width), REG_ADDR(isp_mi_hdr_dma_pic_height),       \
+		REG_ADDR(isp_mi_hdr_dma_s_llength), REG_ADDR(isp_mi_hdr_dma_s_size_init),                \
+		REG_ADDR(isp_mi_hdr_dma_s_lval), 0, HDR_DMA_START_MASK},
+
+		{REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(miv2_imsc2),               \
+		HDR_RD_RAW_ALIGNED_MASK, HDR_RD_VS_BIT_MASK, HDR_RD_RAW_CFG_UPDATE_MASK,HDR_RD_RAW_CFG_UPDATE_MASK,      \
+		REG_ADDR(isp_mi_hdr_dma_vs_base_ad_init), REG_ADDR(isp_mi_hdr_pic_width), REG_ADDR(isp_mi_hdr_dma_pic_height),       \
+		REG_ADDR(isp_mi_hdr_dma_vs_llength), REG_ADDR(isp_mi_hdr_dma_vs_size_init),                \
+		REG_ADDR(isp_mi_hdr_dma_vs_lval), 0, HDR_DMA_START_MASK}
+#endif
+		};
+#else
+		{{REG_ADDR(isp_mi_pp_ctrl), REG_ADDR(isp_mi_pp_fmt), 0, 0, REG_ADDR(miv2_imsc2),               \
+		PP_RD_RAW_ALIGNED_MASK, PP_RD_RAW_BIT_MASK, PP_MI_CFG_UPD_MASK, PP_RD_YUV_CFG_UPDATE_MASK,      \
+		REG_ADDR(isp_mi_pp_dma_y_pic_start_ad), REG_ADDR(isp_mi_pp_dma_y_pic_width),      0,        \
+		REG_ADDR(isp_mi_pp_dma_y_pic_llength), REG_ADDR(isp_mi_pp_dma_y_pic_size),                \
+		REG_ADDR(isp_mi_pp_dma_y_pic_lval), 0, PP_DMA_START_MASK}};
+#endif
+	if (dev == NULL || args == NULL) {
+		pr_info("input wrong parameter %s\n", __func__);
+		return -1;
+	}
+
+	pr_info("enter %s\n", __func__);
+
+	viv_check_retval(copy_from_user(&dma, args, sizeof(dma)));
+	id = dma.id;
+	if ( id > ISP_MI_DMA_ID_MAX){
+		pr_info("id config wrong %s\n", __func__);
+		return -1;
+	}
+	path_fmt = isp_read_reg(dev,  dma_path_ctx[id].fmt_addr);
+#ifdef ISP_MI_PP_READ
+	path_fmt |= 0x80000000;
+#endif
+	miv2_imsc = isp_read_reg(dev, dma_path_ctx[id].mi_imsc_addr);
+	miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	path_ctrl = isp_read_reg(dev,  dma_path_ctx[id].ctrl_addr);
+
+	//if ( dma_path_ctx[id].bus_cfg_addr != 0) {
+	//	path_bus_cfg = isp_read_reg(dev,  dma_path_ctx[id].bus_cfg_addr);
+	//}
+	if ( dma_path_ctx[id].bus_id_addr != 0) {
+		bus_id = isp_read_reg(dev,  dma_path_ctx[id].bus_id_addr);
+	}
+
+	if ( dma.align == ISP_MI_DATA_UNALIGN_MODE ) {
+
+		switch(dma.type){
+			case ISP_PICBUF_TYPE_RAW10:
+				llength = calc_raw_lval(dma.width,IC_MI_DATAMODE_RAW10, ISP_MI_DATA_UNALIGN_MODE);
+				mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 1);
+				break;
+			case ISP_PICBUF_TYPE_RAW12:
+				llength = calc_raw_lval(dma.width,IC_MI_DATAMODE_RAW12,ISP_MI_DATA_UNALIGN_MODE);
+				if (id >= ISP_MI_DMA_ID_HDR_L && id <= ISP_MI_DMA_ID_HDR_VS) {
+					mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 0);     //mi dma hdr stitch  raw only support raw12 and raw16
+				} else {
+					mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 2);
+				}
+				break;
+			case ISP_PICBUF_TYPE_RAW14:
+				llength = calc_raw_lval(dma.width,IC_MI_DATAMODE_RAW14, ISP_MI_DATA_UNALIGN_MODE);
+				mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 3);
+				break;
+			case ISP_PICBUF_TYPE_RAW16:
+				llength = calc_raw_lval(dma.width,IC_MI_DATAMODE_RAW16, ISP_MI_DATA_UNALIGN_MODE);
+				if (id >= ISP_MI_DMA_ID_HDR_L && id <= ISP_MI_DMA_ID_HDR_VS) {
+					mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 1);     //mi dma hdr stitch  raw only support raw12 and raw16
+				} else {
+					mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, 4);
+				}
+
+				break;
+			default:
+				return -EFAULT;
+		}
+
+		llength <<= 4;
+		mi_set_slice(&path_fmt, dma_path_ctx[id].rd_fmt_align,  dma.align);
+
+	} else {
+		getRawBit(dma.type, &path_rd_fmt_bit, &llength);        //The old version load all kinds of raw format with raw16 format except raw8
+		llength = dma.width * llength / 8;
+		if (id >= ISP_MI_DMA_ID_HDR_L && id <= ISP_MI_DMA_ID_HDR_VS) {
+			path_rd_fmt_bit = 1;
+		}
+		mi_set_slice(&path_fmt, dma_path_ctx[id].rd_raw_bit, path_rd_fmt_bit);
+	}
+
+/*	if (llength != 8)
+		REG_SET_SLICE(mcm_bus_cfg, MCM_RD_SWAP_RAW, 1);*/
+
+	//path_ctrl |=  PP_RD_YUV_CFG_UPDATE_MASK;  //PP_INIT_OFFSET_EN_MASK | PP_INIT_BASE_EN_MASK |
+	isp_write_reg(dev, dma_path_ctx[id].pic_start_addr, (MCM_DMA_RAW_PIC_START_AD_MASK & dma.base));
+	isp_write_reg(dev,dma_path_ctx[id].pic_width, (MCM_DMA_RAW_PIC_WIDTH_MASK & dma.width));
+
+	if (dma_path_ctx[id].pic_height) {
+		isp_write_reg(dev,dma_path_ctx[id].pic_height, dma.height);
+	}
+
+	isp_write_reg(dev, dma_path_ctx[id].pic_llength, (MCM_DMA_RAW_PIC_LLENGTH_MASK & llength));
+	isp_write_reg(dev,dma_path_ctx[id].pic_size, (MCM_DMA_RAW_PIC_SIZE_MASK & (llength * dma.height)));
+	isp_write_reg(dev, dma_path_ctx[id].pic_lval, (MCM_DMA_RAW_PIC_WIDTH_MASK & llength));
+	isp_write_reg(dev, dma_path_ctx[id].fmt_addr, path_fmt);
+
+	//isp_write_reg(dev, REG_ADDR(miv2_mcm_bus_cfg), path_bus_cfg);
+#ifdef  ISP_MI_PP_READ
+	isp_write_reg(dev, REG_ADDR(mi_pp_dma_y_pic_height),  dma.height);
+	isp_write_reg(dev, REG_ADDR(mi_pp_y_lval_bytes), llength);
+
+    //    isp_write_reg(dev, 0x55c0,  dma.height);
+    //    isp_write_reg(dev, 0x55c4,  dma.height);
+    //    isp_write_reg(dev, 0x55c8,  dma.height);
+    //    isp_write_reg(dev, 0x55cc, llength);
+
+	isp_write_reg(dev, dma_path_ctx[id].mi_imsc_addr, miv2_imsc | PPR_DMA_READY_MASK);	/* enabled pp dma */
+#else
+	isp_write_reg(dev, dma_path_ctx[id].mi_imsc_addr, miv2_imsc | 0x01800025);	/* enabled jdp, sp2_raw, mp_raw, mcm */
+#endif
+
+	if(id == ISP_MI_DMA_ID_MCM_PP) {
+		miv2_ctrl |= (dma_path_ctx[id].path_enable_mask );//| dma_path_ctx[id].path_dma_start_mask);
+		//path_ctrl |= 0xfa;
+		mi_set_slice(&path_ctrl, dma_path_ctx[id].rd_cfg_upd, 1);
+		mi_set_slice(&path_ctrl,  dma_path_ctx[id].rd_auto_upd, 1);
+
+		REG_SET_SLICE(bus_id, MCM_BUS_SW_EN, 1);
+		REG_SET_SLICE(bus_id, MCM_RD_ID_EN, 1);
+		if (dma_path_ctx[id].bus_id_addr) {
+			isp_write_reg(dev, dma_path_ctx[id].bus_id_addr, bus_id);
+		}
+		isp_write_reg(dev,dma_path_ctx[id].ctrl_addr, path_ctrl);
+		isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+#ifdef ISP_MI_HDR
+	} else {
+		REG_SET_SLICE(path_fmt, HDR_RD_STR, dma.rd_wr_str);
+		//config wr str, l,s,vs bit and wr raw aligned same with rd  str,l,s,vs bit and wr  raw aligned
+		path_fmt |= ((path_fmt >> HDR_RD_STR_SHIFT) &0x3ff) ;
+		isp_write_reg(dev, dma_path_ctx[id].fmt_addr, path_fmt);
+
+		/*hdr mi dma path enable in mi hdr ctrl register*/
+		path_ctrl |= (dma_path_ctx[id].path_enable_mask) ; //| dma_path_ctx[id].path_dma_start_mask);
+		REG_SET_SLICE(path_ctrl, HDR_INIT_OFFSET_EN, 1);
+		REG_SET_SLICE(path_ctrl, HDR_INIT_BASE_EN, 1);
+
+		REG_SET_SLICE(bus_id, HDR_BUS_SW_EN, 1);
+		REG_SET_SLICE(bus_id, HDR_RD_ID_EN, 1);
+		if (dma_path_ctx[id].bus_id_addr) {
+			isp_write_reg(dev, dma_path_ctx[id].bus_id_addr, bus_id);
+		}
+		isp_write_reg(dev,dma_path_ctx[id].ctrl_addr, path_ctrl);
+#endif
+	}
+
+
+	return 0;
+
+}
+/* only support read raw */
+int isp_ioc_start_dma_read(struct isp_ic_dev *dev, void __user *args)
+{
+	start_dma_path_t dma_path;
+	 u32 mi_hdr_fmt;
+	 u32 mi_path_ctrl;
+	 u32 mi_hdr_ret_ctrl;
+	 u32 rd_wr_str;
+	if (dev == NULL || args == NULL) {
+		pr_info("input wrong parameter %s\n", __func__);
+		return -1;
+	}
+
+	pr_info("enter %s\n", __func__);
+	viv_check_retval(copy_from_user(&dma_path, args, sizeof(dma_path)));
+	if (dma_path == ISP_MI_DMA_PATH_MCM_PP) {
+#ifndef ISP_MI_PP_READ
+		mi_path_ctrl = isp_read_reg(dev,REG_ADDR(miv2_ctrl));
+		REG_SET_SLICE(mi_path_ctrl, MCM_RAW_RDMA_START, 1);
+		isp_write_reg(dev,REG_ADDR(miv2_ctrl), mi_path_ctrl);
+#else
+		mi_path_ctrl = isp_read_reg(dev,REG_ADDR(miv2_ctrl));
+		REG_SET_SLICE(mi_path_ctrl, PP_DMA_START, 1);
+		isp_write_reg(dev,REG_ADDR(miv2_ctrl), mi_path_ctrl);
+#endif
+	} else if (dma_path == ISP_MI_DMA_PATH_HDR) {
+
+			isp_write_reg(dev, REG_ADDR(isp_mi_hdr_ret_bus_timeo), 0x00000001);   //disable bus time out interrupt
+
+			mi_hdr_ret_ctrl = isp_read_reg(dev,REG_ADDR(isp_hdr_ret_ctrl));
+			REG_SET_SLICE(mi_hdr_ret_ctrl, HDR_RT_VSYNC_POL, 1);
+			REG_SET_SLICE(mi_hdr_ret_ctrl, HDR_RETIMING_ENABLE, 1);
+			REG_SET_SLICE(mi_hdr_ret_ctrl, DUMP_MODE_EN, 1);
+			mi_hdr_fmt = isp_read_reg(dev,REG_ADDR(isp_mi_hdr_fmt));
+			rd_wr_str = (mi_hdr_fmt & HDR_RD_STR_MASK)>>HDR_RD_STR_SHIFT;
+			if (rd_wr_str == 0) {
+				REG_SET_SLICE(mi_hdr_ret_ctrl, EXPOSURE_COUNT, 1);
+			} else if (rd_wr_str == 1|| rd_wr_str == 3) {
+				REG_SET_SLICE(mi_hdr_ret_ctrl, EXPOSURE_COUNT, 2);
+				if (rd_wr_str == 3) {
+					REG_SET_SLICE(mi_hdr_ret_ctrl, L_VS_COMBINING_ENABLE, 1);
+				}
+			} else if (rd_wr_str == 2) {
+				REG_SET_SLICE(mi_hdr_ret_ctrl, EXPOSURE_COUNT, 0);
+			}
+			isp_write_reg(dev, REG_ADDR(isp_mi_hdr_dma_start_by_lines), 0x360);//0x10); //the written lines count of the last appearing frame after which start dma read
+			isp_write_reg(dev,REG_ADDR(isp_hdr_ret_ctrl), mi_hdr_ret_ctrl);
+			mi_path_ctrl = isp_read_reg(dev,REG_ADDR(isp_mi_hdr_ctrl));
+			REG_SET_SLICE(mi_path_ctrl, HDR_RD_RAW_CFG_UPDATE, 1);
+			REG_SET_SLICE(mi_path_ctrl, HDR_RD_RAW_AUTO_UPDATE, 1);
+
+			REG_SET_SLICE(mi_path_ctrl, HDR_DMA_START, 1);
+			isp_write_reg(dev,REG_ADDR(isp_mi_hdr_ctrl), mi_path_ctrl);
+
+	}
+	return 0;
+}
+
+#define PATHNUM  ISP_MI_PATH_ID_MAX// hw related
+
+// only config write bits,  SP2 read bit at 3dnr.c
+// read defined is same as write
+struct miv2_format_bit {
+	u32 nyv, nv12;
+	u32 raw_aligned, yuv_aligned;
+	u32 raw_bit, yuv_str;
+	u32 yuv_fmt, yuv_bit, jdp_fmt;
+};
+
+static struct miv2_format_bit fmt_bit[PATHNUM] = {
+	{
+		.nyv = 3 << 13, .nv12 = 1 << 12,
+		.raw_aligned = 3 << 10,
+		.yuv_aligned = 1 << 9,
+		.raw_bit = 7 << 6,
+		.yuv_str = 3 << 4,
+		.yuv_fmt = 3 << 2,
+		.yuv_bit = 1 << 1,
+		.jdp_fmt = 1,
+	},
+	{
+		.nyv = 3 << 7,
+		.nv12 =  1 << 6,
+		.yuv_aligned = 1 << 5,
+		.yuv_str = 3 << 3,
+		.yuv_fmt = 3 << 1,
+		.yuv_bit = 1,
+	},
+	{
+		.nyv = 3 << 12,
+		.nv12 =  1 << 11,
+		.raw_aligned = 3 << 9,
+		.yuv_aligned = 1 << 8,
+		.raw_bit = 7 << 5,
+		.yuv_str = 3 << 3,
+		.yuv_fmt = 3 << 1,
+		.yuv_bit = 1,
+	},
+#ifdef ISP_MI_MCM_WR
+	{
+		.nyv =  0,
+		.nv12 = 0,
+		.raw_aligned = 3 << 14,
+		.raw_bit = 3 << 4,
+		.yuv_aligned = 0,
+		.yuv_str = 0,
+		.yuv_fmt = 0,
+		.yuv_bit = 0,
+	},
+	{
+		.nyv =  0,
+		.nv12 = 0,
+		.raw_aligned = 3 << 16,
+		.raw_bit = 3 << 8,
+		.yuv_aligned = 0,
+		.yuv_str = 0,
+		.yuv_fmt = 0,
+		.yuv_bit = 0,
+	},
+#endif
+#ifdef ISP_MI_PP_WRITE
+	{
+		.nyv =  3 << 7,
+		.nv12 =   1 << 6,
+		.raw_aligned = 3 << 14,
+		.raw_bit = 7 << 11,
+		.yuv_aligned = 1 << 5,
+		.yuv_str = 3 << 3,
+		.yuv_fmt = 3 << 1,
+		.yuv_bit = 1,
+	},
+#endif
+#ifdef ISP_MI_HDR
+	{
+		.nyv =  0,
+		.nv12 = 0,
+		.raw_aligned = 3 << 8,
+		.raw_bit = 3 << 2,
+		.yuv_aligned = 0,
+		.yuv_str = 0,
+		.yuv_fmt = 0,
+		.yuv_bit = 0,
+	},
+	{
+		.nyv =  0,
+		.nv12 = 0,
+		.raw_aligned = 3 << 8,
+		.raw_bit = 3 << 4,
+		.yuv_aligned = 0,
+		.yuv_str = 0,
+		.yuv_fmt = 0,
+		.yuv_bit = 0,
+	},
+	{
+		.nyv =  0,
+		.nv12 = 0,
+		.raw_aligned = 3 << 8,
+		.raw_bit = 3 << 6,
+		.yuv_aligned = 0,
+		.yuv_str = 0,
+		.yuv_fmt = 0,
+		.yuv_bit = 0,
+	},
+#endif
+};
+
+static u32 bit_shift(u32 i) {
+	u32 shift = 0;
+	while(!(i&1)) {
+		shift++;
+		i >>= 1;
+	}
+	return shift;
+}
+
+void mi_set_slice(u32* val, u32 mask, u32 slice)
+{
+	// mp, sp1, sp2 mcm postpath have different masks.
+	if (mask) {
+		*val &= ~mask;
+		*val |= (slice << bit_shift(mask));
+	}
+}
+
+struct miv2_path_address {
+	u32 bus_cfg_addr;
+	u32 bus_id_addr;
+	u32 bus_timeo_addr;			//axi bus time out waiting ctrl register
+	u32 path_ctrl_addr;
+	u32 format_addr;
+	u32 y_length_addr;
+	u32 raw_llength_addr;
+	u32 raw_pic_width_addr;
+	u32 raw_pic_height_addr;
+	u32 raw_pic_size_addr;
+	u32 ycbcr_enable_bit;
+	u32 raw_enable_bit;
+	u32 format_conv_ctrl;
+	u32 wr_raw_swap_bit;
+};
+
+static void disable_bus_timeo_intr(struct isp_ic_dev *dev, u32 bus_addr)
+{
+	u32 val;
+	pr_info("%s  bus timeo interrupt register addr 0x%08x\n", __func__, bus_addr);
+	val = isp_read_reg(dev, bus_addr);
+	REG_SET_SLICE(val, MP_BUS_TIMEO_INTERRUPT_DISABLE, 1);
+	isp_write_reg(dev, bus_addr, val);
+}
+
+static void set_qos(struct isp_ic_dev *dev)
+{
+	pr_info("isp %s enter\n", __func__);
+
+	isp_write_reg(dev, 0x1308, MI_QOS);
+	isp_write_reg(dev, 0x130C, MI_QOS2);
+	pr_info("isp %s exit\n", __func__);
+}
+
+static void set_data_path(int id, struct isp_mi_data_path_context *path,
+		   struct isp_ic_dev *dev)
+{
+	u32 bus_cfg, bus_id;
+	u32 format;
+	u32 miv2_ctrl;
+	u32 path_ctrl;
+	u32 lval;
+	u32 acq_proc;
+	u32 mcm_bus_cfg = isp_read_reg(dev, REG_ADDR(miv2_mcm_bus_cfg));
+	u32 conv_format_ctrl = 0;
+	u32 y_length_addr;
+	u32 y_llength = 0;
+#ifdef ISP_MI_PP_WRITE
+	u32 isp_ctrl;
+#endif
+	// please take care the register order
+#if 0
+    struct miv2_path_address  path_list[PATHNUM] = {
+		{ 0x1318, 0x131c, 0x1310, 0x1314, 0x1330, 0x13a0, 0x13a4, 0x13a8, 0x13ac, 1, 0x0c6c },
+		{ 0x1434, 0x1438, 0x142c, 0x1430, 0x144c, 0, 0, 0, 8, 0x106c },
+		{ 0x14ec, 0x14f0, 0x14e4, 0x14e8, 0x1504, 0x1574, 0x1578, 0x157c, 0x1580, 0x10, 0x116c },
+	};
+#else
+	//id 0 is mp path;id 1 is sp path;id 2 is sp2 path;
+	//id 3 is post process path write;
+	struct miv2_path_address  path_list[PATHNUM] = {
+		{
+			REG_ADDR(miv2_mp_bus_cfg), REG_ADDR(miv2_mp_bus_id), REG_ADDR(miv2_mp_bus_timeo), REG_ADDR(miv2_mp_ctrl),
+			REG_ADDR(miv2_mp_fmt), REG_ADDR(miv2_mp_y_llength), REG_ADDR(miv2_mp_raw_llength),
+			REG_ADDR(miv2_mp_raw_pic_width), REG_ADDR(miv2_mp_raw_pic_height), REG_ADDR(miv2_mp_raw_pic_size),
+			MP_YCBCR_PATH_ENABLE_MASK, MP_RAW_PATH_ENABLE_MASK, REG_ADDR(mrsz_format_conv_ctrl), MP_WR_SWAP_RAW_MASK
+		},
+		{
+			REG_ADDR(miv2_sp1_bus_cfg), REG_ADDR(miv2_sp1_bus_id), REG_ADDR(miv2_sp1_bus_timeo), REG_ADDR(miv2_sp1_ctrl),
+			REG_ADDR(miv2_sp1_fmt), REG_ADDR(miv2_sp1_y_llength), 0,
+			0, 0, 0,
+			SP1_YCBCR_PATH_ENABLE_MASK, 0, REG_ADDR(srsz_phase_format_conv_ctr), 0,
+		},
+		{
+			REG_ADDR(miv2_sp2_bus_cfg), REG_ADDR(miv2_sp2_bus_id), REG_ADDR(miv2_sp2_bus_timeo), REG_ADDR(miv2_sp2_ctrl),
+			REG_ADDR(miv2_sp2_fmt), REG_ADDR(miv2_sp2_y_llength), REG_ADDR(miv2_sp2_raw_llength),
+			REG_ADDR(miv2_sp2_raw_pic_width), REG_ADDR(miv2_sp2_raw_pic_height), REG_ADDR(miv2_sp2_raw_pic_size),
+			SP2_YCBCR_PATH_ENABLE_MASK, SP2_RAW_PATH_ENABLE_MASK, REG_ADDR(srsz2_phase_format_conv_ctr),
+			SP2_WR_SWAP_RAW_MASK
+		},
+#ifdef ISP_MI_MCM_WR
+		{
+			REG_ADDR(miv2_mcm_bus_cfg), REG_ADDR(miv2_mcm_bus_id), REG_ADDR(miv2_mcm_bus_timeo), REG_ADDR(miv2_mcm_ctrl),
+			REG_ADDR(miv2_mcm_fmt), 0, REG_ADDR(miv2_mcm_raw0_llength),
+			REG_ADDR(miv2_mcm_raw0_pic_width), REG_ADDR(miv2_mcm_raw0_pic_height), REG_ADDR(miv2_mcm_raw0_pic_size),
+			0, MCM_RAW0_PATH_ENABLE_MASK, 0, MCM_WR0_SWAP_RAW_MASK
+		},
+
+		{
+			REG_ADDR(miv2_mcm_bus_cfg), REG_ADDR(miv2_mcm_bus_id), REG_ADDR(miv2_mcm_bus_timeo), REG_ADDR(miv2_mcm_ctrl),
+			REG_ADDR(miv2_mcm_fmt), 0, REG_ADDR(miv2_mcm_raw1_llength),
+			REG_ADDR(miv2_mcm_raw1_pic_width), REG_ADDR(miv2_mcm_raw1_pic_height), REG_ADDR(miv2_mcm_raw1_pic_size),
+			0, MCM_RAW1_PATH_ENABLE_MASK, 0, MCM_WR1_SWAP_RAW_MASK
+		},
+#endif
+		{
+			REG_ADDR(isp_mi_pp_data_swap), REG_ADDR(miv2_sp1_bus_id), REG_ADDR(miv2_sp1_bus_timeo), REG_ADDR(isp_mi_pp_ctrl),
+			REG_ADDR(isp_mi_pp_fmt), REG_ADDR(isp_mi_pp_y_llength), REG_ADDR(mi_pp_y_lval_bytes),
+			REG_ADDR(isp_mi_pp_y_pic_width), REG_ADDR(isp_mi_pp_y_pic_height), REG_ADDR(isp_mi_pp_y_pic_size),
+			PP_WRITE_PATH_ENABLE_MASK, PP_WRITE_PATH_ENABLE_MASK, 0,PP_WR_SWAP_Y_MASK
+		},
+#ifdef ISP_MI_HDR
+		{
+			REG_ADDR(isp_mi_hdr_ret_bus_cfg), REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(isp_mi_hdr_ret_bus_timeo),
+			REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_l_llength),
+			REG_ADDR(isp_mi_hdr_pic_width), REG_ADDR(isp_mi_hdr_pic_height), REG_ADDR(isp_mi_hdr_l_size_init),
+			0, HDR_WR_ENABLE_MASK, 0, HDR_WR_SWAP_RAW_MASK
+		},
+
+		{
+			REG_ADDR(isp_mi_hdr_ret_bus_cfg), REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(isp_mi_hdr_ret_bus_timeo),
+			REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_s_llength),
+			REG_ADDR(isp_mi_hdr_pic_width), REG_ADDR(isp_mi_hdr_pic_height), REG_ADDR(isp_mi_hdr_s_size_init),
+			0, HDR_WR_ENABLE_MASK, 0, HDR_WR_SWAP_RAW_MASK
+		},
+		{
+			REG_ADDR(isp_mi_hdr_ret_bus_cfg), REG_ADDR(isp_mi_hdr_ret_bus_id), REG_ADDR(isp_mi_hdr_ret_bus_timeo),
+			REG_ADDR(isp_mi_hdr_ctrl), REG_ADDR(isp_mi_hdr_fmt), 0, REG_ADDR(isp_mi_hdr_vs_llength),
+			REG_ADDR(isp_mi_hdr_pic_width), REG_ADDR(isp_mi_hdr_pic_height), REG_ADDR(isp_mi_hdr_vs_size_init),
+			0, HDR_WR_ENABLE_MASK, 0, HDR_WR_SWAP_RAW_MASK
+		},
+#endif
+
+	};
+#endif
+
+	if (!path->enable) {
+		disable_bus_timeo_intr(dev, path_list[id].bus_timeo_addr);
+		return;
+	}
+
+
+	if (path->hscale || path->vscale || dev->is.enable) {
+		if (id <= ISP_MI_PATH_SP2_BP)
+			isp_set_scaling(id, dev, dev->is.enable, dev->crop[id].enabled);
+		else
+			isp_set_scaling(id, dev, dev->is.enable, 0);
+
+	}
+
+	miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	if(path_list[id].bus_cfg_addr)
+	bus_cfg = isp_read_reg(dev, path_list[id].bus_cfg_addr);
+	format = isp_read_reg(dev, path_list[id].format_addr);
+	if (path_list[id].format_conv_ctrl) {
+		conv_format_ctrl = isp_read_reg(dev, path_list[id].format_conv_ctrl);
+	}
+	pr_err("mi %s  id %d  fmt_bit[id].raw_bit 0x%08x miv2_ctrl 0x%08x ", __func__, id, path_list[id].raw_enable_bit, miv2_ctrl);
+
+	path_ctrl = isp_read_reg(dev, path_list[id].path_ctrl_addr);
+	switch (path->out_mode) {
+	case IC_MI_DATAMODE_YUV444:
+		mi_set_slice(&format, fmt_bit[id].yuv_fmt, 2);
+		miv2_ctrl |= path_list[id].ycbcr_enable_bit;
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_OUTPUT, 3);
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_INPUT, 2);
+		break;
+	case IC_MI_DATAMODE_YUV422:
+		mi_set_slice(&format, fmt_bit[id].yuv_fmt, 1);
+		miv2_ctrl |= path_list[id].ycbcr_enable_bit;
+		break;
+	case IC_MI_DATAMODE_YUV420:
+		mi_set_slice(&format, fmt_bit[id].yuv_fmt, 0);
+		miv2_ctrl |= path_list[id].ycbcr_enable_bit;
+		break;
+	case IC_MI_DATAMODE_YUV400:
+	case IC_MI_DATAMODE_JPEG:
+		mi_set_slice(&format, fmt_bit[id].jdp_fmt, 1);
+		REG_SET_SLICE(miv2_ctrl, MP_JDP_PATH_ENABLE, 1);
+		break;
+	case IC_MI_DATAMODE_RAW8:
+		mi_set_slice(&format, fmt_bit[id].raw_bit, 0);
+		miv2_ctrl |= path_list[id].raw_enable_bit;
+		break;
+	case IC_MI_DATAMODE_RAW10:
+		mi_set_slice(&format, fmt_bit[id].raw_bit, 1);
+		miv2_ctrl |= path_list[id].raw_enable_bit;
+
+		mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		break;
+	case IC_MI_DATAMODE_RAW12:
+#ifdef ISP_MI_HDR
+		if (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS) {
+			mi_set_slice(&format, fmt_bit[id].raw_bit, 0);
+			path_ctrl |= path_list[id].raw_enable_bit;
+			//mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		}
+#endif
+		if (id <= ISP_MI_PATH_PP) {
+			mi_set_slice(&format, fmt_bit[id].raw_bit, 2);
+			miv2_ctrl |= path_list[id].raw_enable_bit;
+			mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		}
+		break;
+	case IC_MI_DATAMODE_RAW14:
+		mi_set_slice(&format, fmt_bit[id].raw_bit, 3);
+		miv2_ctrl |= path_list[id].raw_enable_bit;
+
+		mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		break;
+	case IC_MI_DATAMODE_RAW16:
+#ifdef ISP_MI_HDR
+		if (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS) {
+			mi_set_slice(&format, fmt_bit[id].raw_bit, 1);
+			path_ctrl |= path_list[id].raw_enable_bit;
+			//mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		}
+#endif
+		if (id <= ISP_MI_PATH_PP) {
+			mi_set_slice(&format, fmt_bit[id].raw_bit, 4);
+			miv2_ctrl |= path_list[id].raw_enable_bit;
+			mi_set_slice(&bus_cfg, path_list[id].wr_raw_swap_bit, 1);
+		}
+		break;
+	case IC_MI_DATAMODE_RGB888:
+		mi_set_slice(&format, fmt_bit[id].yuv_fmt, 2);
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_OUTPUT, 6);
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_INPUT, 2);
+		miv2_ctrl |= path_list[id].ycbcr_enable_bit;
+		break;
+	default:
+		pr_err("mi %s unsupport format: %d", __func__, path->out_mode);
+		return;
+	}
+
+	switch (path->data_layout) {
+	case IC_MI_DATASTORAGE_PLANAR:
+		mi_set_slice(&format, fmt_bit[id].yuv_str, 2);
+		break;
+	case IC_MI_DATASTORAGE_SEMIPLANAR:
+		mi_set_slice(&format, fmt_bit[id].yuv_str, 0);
+		break;
+	case IC_MI_DATASTORAGE_INTERLEAVED:
+		mi_set_slice(&format, fmt_bit[id].yuv_str, 1);
+		break;
+	default:
+		break;
+	}
+
+	mi_set_slice(&format, fmt_bit[id].yuv_bit, path->yuv_bit);
+	if(path->yuv_bit){
+		if(path->data_alignMode){
+			mi_set_slice(&format, fmt_bit[id].yuv_aligned, 1);
+		}else{
+			mi_set_slice(&format, fmt_bit[id].yuv_aligned, 0);
+		}
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_10_ENABLE, 1);
+		REG_SET_SLICE(conv_format_ctrl, MRV_MRSZ_COVERT_10_METHOD, 0);
+	}
+
+	mi_set_slice(&format, fmt_bit[id].raw_aligned, path->data_alignMode);
+	if (id == ISP_MI_PATH_MP) {
+		REG_SET_SLICE(bus_cfg, MP_WR_BURST_LEN, dev->mi.burst_len);
+	} else if (id == ISP_MI_PATH_SP) {
+		REG_SET_SLICE(bus_cfg, SP1_WR_BURST_LEN, dev->mi.burst_len);
+	} else if (id == ISP_MI_PATH_SP2_BP) {
+		REG_SET_SLICE(bus_cfg, SP2_WR_BURST_LEN, dev->mi.burst_len);
+	}
+	REG_SET_SLICE(mcm_bus_cfg, MCM_WR_BURST_LEN, dev->mi.burst_len);
+
+	if(path->yuv_bit){//
+		if(path->data_alignMode){//aligned mode
+			lval = (path->out_width + 12 - 1)/12;
+			//printf("zw debug lval = 0x%x\n",lval);
+		}else{                   //unaligned mode
+			lval = (path->out_width * 10 + 127)/128;
+		}
+		y_llength =lval<<4;
+		//printf("zw debug y_llength = 0x%x\n",y_llength);
+	}else{    //8bit output
+		y_llength = ALIGN_16BYTE(path->out_width);
+    }
+
+	y_length_addr = path_list[id].y_length_addr;
+	if (y_length_addr) {
+		isp_write_reg(dev, y_length_addr, y_llength);
+		isp_write_reg(dev, y_length_addr + 4, path->out_width);
+		isp_write_reg(dev, y_length_addr + 8, path->out_height);
+		isp_write_reg(dev, y_length_addr + 12,
+				y_llength * path->out_height);
+	}
+	// aev2, 3dnr
+	if (id == ISP_MI_PATH_MP) {
+		if (dev->exp2.enable) {
+			REG_SET_SLICE(miv2_ctrl, MP_JDP_PATH_ENABLE, 1);
+#ifdef ISP_AEV2_V2
+			REG_SET_SLICE(format, MP_WR_JDP_DP_BIT, 1);
+#endif
+		} else {
+			REG_SET_SLICE(miv2_ctrl, MP_JDP_PATH_ENABLE, 0);
+		}
+	}
+
+	if ((id == ISP_MI_PATH_MP && (miv2_ctrl & MP_RAW_PATH_ENABLE_MASK))   ||
+		(id == ISP_MI_PATH_SP2_BP && (miv2_ctrl & SP2_RAW_PATH_ENABLE_MASK))
+#ifdef ISP_MI_MCM_WR
+		|| (id == ISP_MI_MCM_WR0 && (miv2_ctrl & MCM_RAW0_PATH_ENABLE_MASK)) ||
+		(id == ISP_MI_MCM_WR1 && (miv2_ctrl & MCM_RAW1_PATH_ENABLE_MASK))
+#endif
+#ifdef ISP_MI_PP_WRITE
+		|| (id == ISP_MI_PATH_PP && ((path->out_mode == IC_MI_DATAMODE_RAW8) ||
+		(path->out_mode == IC_MI_DATAMODE_RAW10) || (path->out_mode == IC_MI_DATAMODE_RAW12) ||
+		(path->out_mode == IC_MI_DATAMODE_RAW14) || (path->out_mode == IC_MI_DATAMODE_RAW16)))
+#endif
+#ifdef ISP_MI_HDR
+		|| (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS)
+#endif
+		) {
+		lval =
+			calc_raw_lval(path->out_width, path->out_mode,
+				  path->data_alignMode);
+		y_llength = lval <<4;
+		isp_write_reg(dev, path_list[id].raw_llength_addr, y_llength);
+		isp_write_reg(dev, path_list[id].raw_pic_width_addr, path->out_width);
+		isp_write_reg(dev, path_list[id].raw_pic_height_addr, path->out_height);
+		isp_write_reg(dev, path_list[id].raw_pic_size_addr, path->out_height * y_llength );
+#ifdef ISP_MI_MCM_WR
+		if (id == ISP_MI_MCM_WR0 || id == ISP_MI_MCM_WR1) {
+			isp_write_reg(dev, REG_ADDR(miv2_mcm_raw0_lval_bytes), y_llength);
+		}
+#endif
+#ifdef ISP_MI_PP_WRITE
+		//ppw line entry mode, llength need to align with 256.
+		//llength is line length, lval is line availble data.
+#if 1/*should check by VV, if align with 256 is needed*/
+		uint32_t line_num = isp_read_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_line_num));
+        /*TODO shenweiyi to enable */
+		// if (line_num != 0) {
+		// 	y_llength = y_llength & 0xff ? (y_llength & 0xffffff00 + 0x100):y_llength;
+		// }
+		pr_info("%s:line_num = %d y_llength = 0x%x\n", __func__, line_num, y_llength);
+		isp_write_reg(dev, REG_ADDR(isp_mi_pp_y_llength), y_llength);
+		isp_write_reg(dev, path_list[id].raw_pic_size_addr, path->out_height * y_llength );
+#else
+		if (id == ISP_MI_PATH_PP) {
+			uint32_t line_num = isp_read_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_line_num));
+			if (line_num != 0) {
+				y_llength = (y_llength & 0xff) ? ((y_llength + 0xff) &(~0xff)):y_llength;
+			}
+			isp_write_reg(dev, REG_ADDR(isp_mi_pp_y_llength), y_llength);
+			isp_write_reg(dev, path_list[id].raw_pic_size_addr, path->out_height * y_llength );
+		}
+#endif
+#endif
+#if defined(ISP_MI_HDR)
+		if (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS)
+		isp_write_reg(dev, path_list[id].raw_llength_addr+4, y_llength);
+#endif
+	}
+
+#ifdef ISP_MI_HDR
+	if (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS) {
+		REG_SET_SLICE(path_ctrl, HDR_MI_CFG_UPD, 1);
+		REG_SET_SLICE(path_ctrl, HDR_AUTO_UPDATE, 1);
+		path_ctrl |= (HDR_INIT_OFFSET_EN_MASK | HDR_INIT_BASE_EN_MASK);
+	}
+#endif
+	if (id <= ISP_MI_PATH_PP) {
+		REG_SET_SLICE(path_ctrl, MP_MI_CFG_UPD, 1);
+		REG_SET_SLICE(path_ctrl, MP_AUTO_UPDATE, 1);
+		//path_ctrl |= 0x05;
+		path_ctrl |= (MP_INIT_BASE_EN_MASK | MP_INIT_OFFSET_EN_MASK);
+	}
+#ifdef ISP_MI_MCM_WR
+	if (id <= ISP_MI_MCM_WR1 && id >= ISP_MI_MCM_WR0) {
+		REG_SET_SLICE(path_ctrl, MCM_WR_CFG_UPD, 1);
+		REG_SET_SLICE(path_ctrl, MCM_WR_AUTO_UPDATE, 1);
+		//path_ctrl |= 0x05;
+		path_ctrl |= (MCM_INIT_BASE_EN_MASK | MCM_INIT_OFFSET_EN_MASK);
+	}
+#endif
+
+	pr_info("%s:path_ctrl 0x%08x\n", __func__, path_ctrl);
+	acq_proc = isp_read_reg(dev, REG_ADDR(isp_acq_prop));
+	isp_write_reg(dev, REG_ADDR(isp_acq_prop),
+		      acq_proc & ~MRV_ISP_LATENCY_FIFO_SELECTION_MASK);
+
+	bus_id = isp_read_reg(dev, path_list[id].bus_id_addr);
+	if (id == ISP_MI_PATH_SP) {
+		bus_id <<= 4;
+	}
+	bus_id |= MP_WR_ID_EN_MASK;
+	if (id == ISP_MI_PATH_SP2_BP) {
+		bus_id |= SP2_BUS_SW_EN_MASK;
+		// REG_SET_SLICE(bus_cfg, SP2_WR_SWAP_Y, 1);
+#ifdef ISP_MI_HDR
+	} else if (id >= ISP_MI_HDR_L && id <= ISP_MI_HDR_VS ) {
+		bus_id |= HDR_BUS_SW_EN_MASK;
+#endif
+	} else  {
+		bus_id |= MP_BUS_SW_EN_MASK;
+	}
+	if (path_list[id].bus_id_addr)
+	isp_write_reg(dev, path_list[id].bus_id_addr, bus_id);
+
+	if (path_list[id].bus_cfg_addr)
+	isp_write_reg(dev, path_list[id].bus_cfg_addr, bus_cfg);
+
+	isp_write_reg(dev, REG_ADDR(miv2_mcm_bus_cfg), mcm_bus_cfg);
+#ifdef ISP_MI_PP_WRITE
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	if (id == ISP_MI_PATH_PP && ((path->out_mode == IC_MI_DATAMODE_RAW8) ||
+		  (path->out_mode == IC_MI_DATAMODE_RAW10) || (path->out_mode == IC_MI_DATAMODE_RAW12) ||
+		  (path->out_mode == IC_MI_DATAMODE_RAW14) || (path->out_mode == IC_MI_DATAMODE_RAW16)))  {  //pp path output raw
+		format |= PP_WR_RAW_SEL_MASK;
+		REG_SET_SLICE(format, PP_WR_RAW_SEL, 1);
+		REG_SET_SLICE(isp_ctrl, PP_WRITE_SEL, 0);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	} else {
+		REG_SET_SLICE(format, PP_WR_RAW_SEL, 0);
+		REG_SET_SLICE(isp_ctrl, PP_WRITE_SEL, 1);
+		isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+#endif
+	isp_write_reg(dev, path_list[id].format_addr, format);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+	isp_write_reg(dev, path_list[id].path_ctrl_addr, path_ctrl);
+
+	/*config qos for isp*/
+	set_qos(dev);
+
+	if (path_list[id].format_conv_ctrl)
+		isp_write_reg(dev, path_list[id].format_conv_ctrl, conv_format_ctrl);
+
+}
+
+int isp_mi_start(struct isp_ic_dev *dev)
+{
+	int i;
+	struct isp_mi_context mi = *(&dev->mi);
+	u32 imsc, miv2_mcm_bus_id;
+	pr_info("enter %s\n", __func__);
+
+	miv2_mcm_bus_id = isp_read_reg(dev, REG_ADDR(miv2_mcm_bus_id));
+	miv2_mcm_bus_id |= MCM_BUS_SW_EN_MASK;
+	isp_write_reg(dev, REG_ADDR(miv2_mcm_bus_id), miv2_mcm_bus_id);
+
+    for (i = 0; i < ISP_MI_PATH_ID_MAX; i++) {
+        set_data_path(i, &mi.path[i], dev);
+    }
+    uint32_t line_num = isp_read_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_line_num));
+
+    imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc));
+    if (line_num == 0) {
+    isp_write_reg(dev, REG_ADDR(miv2_imsc),
+		         imsc | (MP_YCBCR_FRAME_END_MASK | MP_RAW_FRAME_END_MASK |
+			     WRAP_MP_Y_MASK | WRAP_MP_CB_MASK | WRAP_MP_CR_MASK |
+			     WRAP_MP_RAW_MASK | WRAP_MP_JDP_MASK | MCM_RAW0_FRAME_END_MASK |
+			     SP1_YCBCR_FRAME_END_MASK | WRAP_SP1_Y_MASK |MCM_RAW1_FRAME_END_MASK|
+			     WRAP_SP1_CB_MASK | WRAP_SP1_CR_MASK |
+			     SP2_YCBCR_FRAME_END_MASK | WRAP_SP2_Y_MASK |
+			     WRAP_SP2_CB_MASK | WRAP_SP2_CR_MASK |
+                 SP2_RAW_FRAME_END_MASK | MP_JDP_FRAME_END_MASK));
+	} else {
+    isp_write_reg(dev, REG_ADDR(miv2_imsc),
+		         imsc | (MP_YCBCR_FRAME_END_MASK | MP_RAW_FRAME_END_MASK |
+			     WRAP_MP_Y_MASK | WRAP_MP_CB_MASK | WRAP_MP_CR_MASK |
+			     WRAP_MP_RAW_MASK | WRAP_MP_JDP_MASK | MCM_RAW0_FRAME_END_MASK |
+			     MCM_RAW1_FRAME_END_MASK|
+			     SP2_YCBCR_FRAME_END_MASK | WRAP_SP2_Y_MASK |
+			     WRAP_SP2_CB_MASK | WRAP_SP2_CR_MASK |
+                 SP2_RAW_FRAME_END_MASK | MP_JDP_FRAME_END_MASK));
+	}
+
+
+	//isp_write_reg(dev, REG_ADDR(miv2_imsc1), 0x7ffffff);
+	isp_write_reg(dev, REG_ADDR(miv2_imsc1), 0);
+#ifdef ISP_MI_PP_WRITE
+	imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc2));
+    if (line_num == 0) {
+		isp_write_reg(dev, REG_ADDR(miv2_imsc2),
+			      imsc | ( PPW_U_BUF_FULL_MASK | PPW_Y_BUF_FULL_MASK |
+				  PPW_V_BUF_FULL_MASK | PPR_Y_BUF_FULL_MASK | SP2_RAW2_W_BUF_FULL_MASK |
+				  SP2_RAW2_R_BUF_FULL_MASK | HDR_W_BUF_FULL_MASK | HDR_R_BUF_FULL_MASK |
+				  WRAP_SP2_RAW_MASK | WRAP_PPW_CR_MASK | WRAP_PPW_CB_MASK | //WRAP_PPW_Y_MASK |
+				  SP2_RAW2_FRAME_END_MASK | PPW_FRAME_END_MASK | HDR_VS_DMA_READY_MASK |
+	              HDR_S_DMA_READY_MASK | HDR_L_DMA_READY_MASK | HDR_L_DMA_READY_MASK |
+				  WRAP_HDR_VS_MASK | WRAP_HDR_S_MASK | WRAP_HDR_L_MASK | HDR_VS_FRAME_END_MASK |
+				  HDR_S_FRAME_END_MASK | HDR_L_FRAME_END_MASK | MI_RT_BUS_BUSERR_MASK |
+				  MI_RT_BUS_TIMEO_MASK));
+    } else {
+		isp_write_reg(dev, REG_ADDR(miv2_imsc2),
+				  imsc | (SP2_RAW2_W_BUF_FULL_MASK |
+				  SP2_RAW2_R_BUF_FULL_MASK | HDR_W_BUF_FULL_MASK | HDR_R_BUF_FULL_MASK |
+				  WRAP_SP2_RAW_MASK |PPW_FRAME_END_MASK|
+				  SP2_RAW2_FRAME_END_MASK | HDR_VS_DMA_READY_MASK |
+				  HDR_S_DMA_READY_MASK | HDR_L_DMA_READY_MASK | HDR_L_DMA_READY_MASK |
+				  WRAP_HDR_VS_MASK | WRAP_HDR_S_MASK | WRAP_HDR_L_MASK | HDR_VS_FRAME_END_MASK |
+				  HDR_S_FRAME_END_MASK | HDR_L_FRAME_END_MASK | MI_RT_BUS_BUSERR_MASK |
+				  MI_RT_BUS_TIMEO_MASK));
+	}
+#endif
+	isp_write_reg(dev, REG_ADDR(miv2_imsc3),  0x3f);
+	return 0;
+}
+
+int isp_mi_stop(struct isp_ic_dev *dev)
+{
+	pr_info("enter %s\n", __func__);
+#ifdef ISP_MI_PP_WRITE
+	isp_write_reg(dev, REG_ADDR(miv2_imsc2), 0);
+#endif
+	isp_write_reg(dev, REG_ADDR(miv2_imsc3), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_imsc), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_imsc1), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), 0UL);
+	return 0;
+}
+
+u32 isp_read_mi_irq(struct isp_ic_dev *dev)
+{
+	return isp_read_reg(dev, REG_ADDR(miv2_mis));
+}
+
+void isp_reset_mi_irq(struct isp_ic_dev *dev, u32 icr)
+{
+	isp_write_reg(dev, REG_ADDR(miv2_icr), icr);
+}
+
+int isp_set_bp_buffer(struct isp_ic_dev *dev, struct isp_bp_buffer_context *buf)
+{
+	return 0;
+}
+#ifdef ISP_MI_PP_WRITE
+
+int  isp_set_ppw_line_num(struct isp_ic_dev *dev)
+{
+	if (dev == NULL) {
+		pr_err("Wrong input %s\n", __func__);
+		return -1;
+	}
+	pr_info("enter %s\n", __func__);
+
+	isp_write_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_line_num), dev->pp_write.entry_line_num);
+	pr_info("exit %s\n", __func__);
+	return 0;
+}
+int  isp_get_ppw_pic_cnt(struct isp_ic_dev *dev, u16* pic_cnt)
+{
+
+	if (dev == NULL) {
+		pr_err("Wrong input %s\n", __func__);
+		return -1;
+	}
+	pr_info("enter %s\n", __func__);
+	*pic_cnt = isp_read_reg(dev, REG_ADDR(mi_sp1_ppw_ycbcr_entry_pic_cnt));
+	pr_info("exit %s\n", __func__);
+	return 0;
+}
+#endif
+
+#ifdef ISP_MI_PP_READ
+
+int  isp_cfg_pp_dma_line_entry(struct isp_ic_dev *dev)
+{
+	pp_dma_line_entry_t* pp_dam_line_entry = &dev->pp_dma_line_entry;
+	if (dev == NULL) {
+		pr_err("Wrong input %s\n", __func__);
+		return -1;
+	}
+	pr_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(mi_pp_dma_y_entry_line_num), pp_dam_line_entry->entry_line_num);
+	isp_write_reg(dev, REG_ADDR(mi_pp_dma_y_buf_line_num), pp_dam_line_entry->buf_line_num);
+	pr_info("exit %s\n", __func__);
+	return 0;
+}
+#endif
+#endif

+ 216 - 0
vvcam/isp/isp_rgbgamma.c

@@ -0,0 +1,216 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#else
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+
+int isp_enable_rgbgamma(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBGC
+	pr_err("unsupported function %s\n", __func__);
+	return -1;
+#else
+
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	REG_SET_SLICE(isp_ctrl, ISP_RGBGC_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	dev->rgbgamma.enable = true;
+	return 0;
+#endif
+}
+
+int isp_disable_rgbgamma(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBGC
+	pr_err("unsupported function %s\n", __func__);
+	return -1;
+#else
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	REG_SET_SLICE(isp_ctrl, ISP_RGBGC_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	dev->rgbgamma.enable = false;
+	return 0;
+#endif
+}
+
+#ifdef ISP_RGBGC
+static int isp_s_rgbgammapx(struct isp_ic_dev *dev, struct isp_rgbgamma_data *data)
+{
+
+	u32 isp_gc_px_reg = REG_ADDR(isp_gcrgb_r_px_0);
+	u32 *p_table = NULL;
+	int i;
+	u32 gc_px_data = 0;
+
+	p_table = (u32 *)&data->rgbgc_r_px;
+	for (i = 0; i < 64; i++) {
+		gc_px_data |= (*(p_table + i) << (i % 6 * 5));
+		if (i % 6 == 5 || i == 63) {
+			isp_write_reg(dev, isp_gc_px_reg, gc_px_data);
+			isp_gc_px_reg += 4;
+			gc_px_data = 0;
+		}
+	}
+
+	isp_gc_px_reg = REG_ADDR(isp_gcrgb_g_px_0);
+	p_table = (u32 *)&data->rgbgc_g_px;
+	for (i = 0; i < 64; i++) {
+		gc_px_data |= (*(p_table + i) << (i % 6 * 5));
+		if (i % 6 == 5 || i == 63) {
+			isp_write_reg(dev, isp_gc_px_reg, gc_px_data);
+			isp_gc_px_reg += 4;
+			gc_px_data = 0;
+		}
+	}
+	isp_gc_px_reg = REG_ADDR(isp_gcrgb_b_px_0);
+	p_table = (u32 *)&data->rgbgc_b_px;
+	for (i = 0; i < 64; i++) {
+		gc_px_data |= (*(p_table + i) << (i % 6 * 5));
+		if (i % 6 == 5 || i == 63) {
+			isp_write_reg(dev, isp_gc_px_reg, gc_px_data);
+			isp_gc_px_reg += 4;
+			gc_px_data = 0;
+		}
+	}
+   return 0;
+}
+#endif
+
+#ifdef ISP_RGBGC
+static int isp_s_rgbgammaWriteData(struct isp_ic_dev *dev,
+			    struct isp_rgbgamma_data *data)
+{
+	u32 isp_gc_y_data, isp_gc_x_data;
+	int i;
+	u32 *tblX, *tblY;
+
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_r_x_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_r_y_addr), 0);
+
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_g_x_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_g_y_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_b_x_addr), 0);
+	isp_write_reg(dev, REG_ADDR(isp_gcrgb_b_y_addr), 0);
+
+	tblX = data->rgbgc_r_datax;
+	tblY = data->rgbgc_r_datay;
+	for (i = 0; i < 64; i++) {
+		isp_gc_y_data = *(tblY + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_r_y_write_data),
+			      isp_gc_y_data);
+	}
+	for (i = 0; i < 63; i++) {
+		isp_gc_x_data = *(tblX + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_r_x_write_data),
+			      isp_gc_x_data);
+	}
+
+	tblX = data->rgbgc_g_datax;
+	tblY = data->rgbgc_g_datay;
+	for (i = 0; i < 64; i++) {
+		isp_gc_y_data = *(tblY + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_g_y_write_data),
+			      isp_gc_y_data);
+	}
+	for (i = 0; i < 63; i++) {
+		isp_gc_x_data = *(tblX + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_g_x_write_data),
+			      isp_gc_x_data);
+	}
+	tblX = data->rgbgc_b_datax;
+	tblY = data->rgbgc_b_datay;
+	for (i = 0; i < 64; i++) {
+		isp_gc_y_data = *(tblY + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_b_y_write_data),
+			      isp_gc_y_data);
+	}
+	for (i = 0; i < 63; i++) {
+		isp_gc_x_data = *(tblX + i);
+		isp_write_reg(dev, REG_ADDR(isp_gcrgb_b_x_write_data),
+			      isp_gc_x_data);
+	}
+    return 0;
+}
+#endif
+
+int isp_s_rgbgamma(struct isp_ic_dev *dev, struct isp_rgbgamma_data *data)
+{
+#ifndef ISP_RGBGC
+	pr_err("unsupported function %s", __func__);
+	return -1;
+#else
+	u8 ret;
+	u32 isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	REG_SET_SLICE(isp_ctrl, ISP_RGBGC_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+
+	isp_s_rgbgammapx(dev, data);
+	isp_s_rgbgammaWriteData(dev, data);
+	ret = 0;
+	if (dev->rgbgamma.enable) {
+		 ret = isp_enable_rgbgamma(dev);
+	}
+    return ret;
+#endif
+}

+ 401 - 0
vvcam/isp/isp_rgbir.c

@@ -0,0 +1,401 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+extern MrvAllRegister_t *all_regs;
+enum {
+    ISP_RGBIR_OUT_BAT_RGGB = 0,
+    ISP_RGBIR_OUT_BAT_GRBG,
+    ISP_RGBIR_OUT_BAT_GBRG,
+    ISP_RGBIR_OUT_BAT_BGGR
+};
+
+enum {
+    ISP_RGBIR_BAT_BGGIR = 0,
+    ISP_RGBIR_BAT_GRIRG,
+    ISP_RGBIR_BAT_RGGIR,
+    ISP_RGBIR_BAT_GBIRG,
+    ISP_RGBIR_BAT_GIRRG,
+    ISP_RGBIR_BAT_IRGGB,
+    ISP_RGBIR_BAT_GIRBG,
+    ISP_RGBIR_BAT_IRGGR,
+    ISP_RGBIR_BAT_RGIRB,
+    ISP_RGBIR_BAT_GRBIR,
+    ISP_RGBIR_BAT_IRBRG,
+    ISP_RGBIR_BAT_BIRGR,
+    ISP_RGBIR_BAT_BGIRR,
+    ISP_RGBIR_BAT_GBRIR,
+    ISP_RGBIR_BAT_IRRBG,
+    ISP_RGBIR_BAT_RIRGB,
+};
+
+int isp_rgbir_s_bls(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_context rgbir = *(&dev->rgbir);
+    struct isp_rgbir_bls_context* bls = &rgbir.bls;
+	isp_info("enter %s\n", __func__);
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_bls_a), bls->a);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_bls_b), bls->b);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_bls_c), bls->c);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_bls_d), bls->d);
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_gain(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+
+	struct isp_rgbir_context rgbir = *(&dev->rgbir);
+    struct isp_rgbir_rgb_gain_context* rgb_gain = &rgbir.rgb_gain;
+	isp_info("enter %s\n", __func__);
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_gain_r), rgb_gain->r);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_gain_g), rgb_gain->g);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_gain_b), rgb_gain->b);
+
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_dpcc(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_dpcc_context *dpcc = &dev->rgbir.dpcc;
+	int i;
+    u32 isp_pre_filt_dpc_th_r;
+
+	isp_info("enter %s\n", __func__);
+
+	for (i = 0; i < 4; i++) {
+        isp_pre_filt_dpc_th_r = isp_read_reg(dev, REG_ADDR(isp_pre_filt_dpc_th_r) + i * ISP_REG_GAP);
+        REG_SET_SLICE(isp_pre_filt_dpc_th_r, ISP_PRE_FILT_DPC_TH_MED_R, dpcc->median_thr[i]);
+        REG_SET_SLICE(isp_pre_filt_dpc_th_r, ISP_PRE_FILT_DPC_TH_AVG_R, dpcc->avg_thr[i]);
+
+		isp_write_reg(dev, REG_ADDR(isp_pre_filt_dpc_th_r) + i * ISP_REG_GAP, isp_pre_filt_dpc_th_r);
+
+	}
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_cc_matrix(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_cc_context *cc = &dev->rgbir.cc; //cc color correct
+	int i;
+    const u8 reg_gap = 8;
+    u32 isp_pre_filt_cc_00_01;
+	isp_info("enter %s\n", __func__);
+
+	for (i = 0; i < 3; i++) {
+
+        isp_pre_filt_cc_00_01 = isp_read_reg(dev, REG_ADDR(isp_pre_filt_cc_00_01) + i * reg_gap);
+        REG_SET_SLICE(isp_pre_filt_cc_00_01, ISP_PRE_FILT_CC_00, (u32)(cc->mtx[i][0] ));
+        REG_SET_SLICE(isp_pre_filt_cc_00_01, ISP_PRE_FILT_CC_01, (u32)(cc->mtx[i][1] ));
+        isp_write_reg(dev, REG_ADDR(isp_pre_filt_cc_00_01) + i * reg_gap, isp_pre_filt_cc_00_01);
+
+        isp_pre_filt_cc_00_01 = isp_read_reg(dev, REG_ADDR(isp_pre_filt_cc_00_01) + i * reg_gap + ISP_REG_GAP);
+        REG_SET_SLICE(isp_pre_filt_cc_00_01, ISP_PRE_FILT_CC_02, (u32)(cc->mtx[i][2] ));
+        REG_SET_SLICE(isp_pre_filt_cc_00_01, ISP_PRE_FILT_CC_03, (u32)(cc->mtx[i][3] ));
+        isp_write_reg(dev, REG_ADDR(isp_pre_filt_cc_00_01) + (i  * reg_gap) + ISP_REG_GAP, isp_pre_filt_cc_00_01);
+	}
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_des(struct isp_ic_dev *dev)   //de-saturation
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_des_context *des = &dev->rgbir.des; //cc color correct
+	int i;
+    u32 isp_pre_filt_ir_des_pd1; // isp_pre_filt_ir_des_px1, isp_pre_filt_ir_des_py1;
+    u32 isp_pre_filt_l_des_pd1; //  isp_pre_filt_l_des_px1, isp_pre_filt_l_des_py1;
+
+	isp_info("enter %s\n", __func__);
+	//register value
+    for (i = 0 ; i < 4; i++) {
+            isp_pre_filt_ir_des_pd1 = isp_read_reg(dev, REG_ADDR(isp_pre_filt_ir_des_pd1) + i * ISP_REG_GAP);
+            if (i != 3) {
+                isp_pre_filt_ir_des_pd1 = des->ir_pd[i *4] | des->ir_pd[i *4 + 1] << 8 |  des->ir_pd[i * 4 + 2] << 16 |\
+                des->ir_pd[i*4 + 3] << 24;
+            } else {
+                isp_pre_filt_ir_des_pd1 = des->ir_pd[i *4] | des->ir_pd[i *4 + 1] << 8 |  des->ir_pd[i*4 + 2] << 16;
+             }
+            isp_write_reg(dev, REG_ADDR(isp_pre_filt_ir_des_pd1) + i * ISP_REG_GAP, isp_pre_filt_ir_des_pd1);
+    }
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_ir_des_px1), (des->ir_px1 & 0xffff));
+	for (i = 0; i < 8; i++)
+	{
+		isp_write_reg(dev, REG_ADDR(isp_pre_filt_ir_des_py1) + i * ISP_REG_GAP, des->ir_py[i]);
+	}
+
+    for (i = 0 ; i < 4; i++) {
+            isp_pre_filt_l_des_pd1 = isp_read_reg(dev, REG_ADDR(isp_pre_filt_l_des_pd1) + i * ISP_REG_GAP);
+            if (i != 3) {
+                isp_pre_filt_l_des_pd1 = des->l_pd[i *4] | des->l_pd[i*4 + 1] << 8 |  des->l_pd[i*4 + 2] << 16 |\
+                des->l_pd[i*4 + 3] << 24;
+            } else {
+                isp_pre_filt_l_des_pd1 = des->l_pd[i *4] | des->l_pd[i*4 + 1] << 8 |  des->l_pd[i*4+2] << 16;
+             }
+            isp_write_reg(dev, REG_ADDR(isp_pre_filt_l_des_pd1) + i * ISP_REG_GAP, isp_pre_filt_l_des_pd1);
+    }
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_l_des_px1), (des->l_px1 & 0xffff));
+	for ( i = 0; i < 8; i++)
+	{
+		isp_write_reg(dev, REG_ADDR(isp_pre_filt_l_des_py1) + i * 4, des->l_py[i]);
+	}
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_sharpen(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_sharpen_context *sharpen = &dev->rgbir.sharpen;
+     u8 sharpl = sharpen->sharpen_lvl;
+    u32 isp_pre_filt_lum_weight; // isp_pre_filt_thresh_sh0, isp_pre_filt_thresh_sh1;
+	// u32 isp_pre_filt_thresh_bl0, isp_pre_filt_thresh_bl1;
+    // u32  isp_pre_filt_fac_sh0, isp_pre_filt_fac_sh1, isp_pre_filt_fac_mid;
+    // u32  isp_pre_filt_fac_bl0, isp_pre_filt_fac_bl1;
+	const unsigned int sharplevel[5][11] = {
+		{ 0x4, 0x08, 0x0C, 0x10, 0x16, 0x1B, 0x20, 0x26, 0x2C, 0x30, 0x3F },
+		{ 0x4, 0x07, 0x0A, 0x0C, 0x10, 0x14, 0x1A, 0x1E, 0x24, 0x2A, 0x30 },
+		{ 0x4, 0x06, 0x08, 0x0A, 0x0C, 0x10, 0x13, 0x17, 0x1D, 0x22, 0x28 },
+		{ 0x2, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x10, 0x15, 0x1A, 0x24 },
+		{ 0x0, 0x00, 0x00, 0x02, 0x04, 0x04, 0x06, 0x08, 0x0D, 0x14, 0x20 } };
+
+	isp_info("enter %s\n", __func__);
+
+
+	//filter factor sharp
+    isp_pre_filt_lum_weight = isp_read_reg(dev, REG_ADDR(isp_pre_filt_lum_weight));
+
+    REG_SET_SLICE(isp_pre_filt_lum_weight, LUM_WEIGHT_GAIN, sharpen->lum_weight_gain);
+    REG_SET_SLICE(isp_pre_filt_lum_weight, LUM_WEIGHT_KINK, sharpen->lum_weight_kink);
+    REG_SET_SLICE(isp_pre_filt_lum_weight, LUM_WEIGHT_MIN, sharpen->lum_weight_min);
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_lum_weight), isp_pre_filt_lum_weight);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_mid), sharpen->middle);
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_thresh_sh0), sharpen->thresh_sh0);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_thresh_sh1), sharpen->thresh_sh1);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_thresh_bl0), sharpen->thresh_bl0);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_thresh_bl1), sharpen->thresh_bl1);
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_sh1), (unsigned int)(sharplevel[0][sharpl]));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_sh0), (unsigned int)(sharplevel[1][sharpl]));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_mid), (unsigned int)(sharplevel[2][sharpl]));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_bl0), (unsigned int)(sharplevel[3][sharpl]));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_fac_bl1), (unsigned int)(sharplevel[4][sharpl]));
+	return 0;
+#endif
+}
+
+int isp_rgbir_s_ir_dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+    struct isp_rgbir_ir_dnr_context* ir_dnr = &dev->rgbir.ir_dnr;
+	//u16 imgwidth, imgheight;
+	u32 ir_denoise_reg_03;
+	u32 ir_denoise_reg_45;
+
+	ir_denoise_reg_03 = (ir_dnr->winweight[0] | (ir_dnr->winweight[1] << 8) | (ir_dnr->winweight[2] << 16) | (ir_dnr->winweight[3] << 24));
+	ir_denoise_reg_45 = (ir_dnr->winweight[4] | (ir_dnr->winweight[5] << 8));
+
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_ir_denoise_sw_03), (unsigned int)(ir_denoise_reg_03));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_ir_denoise_sw_45), ((unsigned int)(ir_denoise_reg_45) & 0xffff));
+
+	//imgwidth = isp_read_reg(dev, REG_ADDR(isp_out_h_size));
+	//imgheight = isp_read_reg(dev, REG_ADDR(isp_out_v_size));
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_h_size), ir_dnr->width& 0x7fff);
+	isp_write_reg(dev, REG_ADDR(isp_pre_filt_v_size), ir_dnr->height & 0x3fff);
+	return 0;
+#endif
+}
+
+int isp_rgbir_hw_init(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+    u32  isp_pre_filt_ctrl;
+	struct isp_rgbir_context *rgbir = &dev->rgbir;
+    isp_info("enter %s\n", __func__);
+
+    isp_rgbir_s_cc_matrix(dev);
+    isp_rgbir_s_bls(dev);
+    isp_rgbir_s_dpcc(dev);
+    isp_rgbir_s_des(dev);
+    isp_rgbir_s_gain(dev);
+    isp_rgbir_s_ir_dnr(dev);
+    isp_rgbir_s_sharpen(dev);
+
+    isp_pre_filt_ctrl = isp_read_reg(dev, REG_ADDR(isp_pre_filt_ctrl));//pre filt ctrl
+	REG_SET_SLICE(isp_pre_filt_ctrl , ISP_PRE_FILT_ENABLE, rgbir->prefilt_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl , GREEN_FILT_MODE, rgbir->green_filt_mode);
+	REG_SET_SLICE(isp_pre_filt_ctrl , GREEN_FILT_ENABLE, rgbir->green_filt_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl , RGBIR_BAYER_PATTERN, rgbir->rgbirPattern );
+	REG_SET_SLICE(isp_pre_filt_ctrl , OUT_RGB_BAYER_PATTERN, rgbir->out_rgb_pattern);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  STAGE1_SELECT, rgbir->green_filt_stage1_select);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  DEMOSAIC_THRESHOLD, rgbir->demosaic_threshold);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  PART_ONE_ENABLE, rgbir->part1_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  PART_TWO_ENABLE,rgbir->part2_enable);
+
+    isp_write_reg(dev, REG_ADDR(isp_pre_filt_ctrl), (unsigned int)(isp_pre_filt_ctrl));//pre filt ctrl
+	return 0;
+#endif
+}
+
+int isp_enable_rgbir(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_context *rgbir = &dev->rgbir;
+    u32 isp_pre_filt_ctrl;
+    isp_info("enter %s\n", __func__);
+
+    isp_pre_filt_ctrl = isp_read_reg(dev, REG_ADDR(isp_pre_filt_ctrl));//pre filt ctrl
+	REG_SET_SLICE(isp_pre_filt_ctrl , ISP_PRE_FILT_ENABLE, rgbir->prefilt_enable);
+    isp_write_reg(dev, REG_ADDR(isp_pre_filt_ctrl), isp_pre_filt_ctrl);//pre filt ctrl
+	return 0;
+#endif
+}
+
+int isp_rgbir_out_ir_raw(struct isp_ic_dev *dev)
+{
+#ifndef ISP_RGBIR
+	isp_err("unsupported function %s", __func__);
+	return -1;
+#else
+	struct isp_rgbir_context *rgbir = &dev->rgbir;
+	u32 isp_ctrl;
+    isp_info("enter %s\n", __func__);
+
+    isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));//isp ctrl
+	REG_SET_SLICE(isp_ctrl , ISP_IR_RAW_OUT, rgbir->enable_ir_raw_out);
+	REG_SET_SLICE(isp_ctrl , MRV_ISP_ISP_MODE,  MRV_ISP_ISP_MODE_RGB); //there need to config rgb mode.
+    isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);//isp_ctrl
+	return 0;
+#endif
+}
+
+int isp_s_rgbir(struct isp_ic_dev *dev)
+{
+
+#ifndef ISP_WDR_V4
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_rgbir_context *rgbir = &dev->rgbir;
+	u32 isp_pre_filt_ctrl;
+    isp_info("enter %s\n", __func__);
+    isp_rgbir_s_cc_matrix(dev);
+    isp_rgbir_s_bls(dev);
+    isp_rgbir_s_dpcc(dev);
+    isp_rgbir_s_des(dev);
+    isp_rgbir_s_gain(dev);
+    isp_rgbir_s_ir_dnr(dev);
+    isp_rgbir_s_sharpen(dev);
+
+    isp_pre_filt_ctrl = isp_read_reg(dev, REG_ADDR(isp_pre_filt_ctrl));//pre filt ctrl
+	REG_SET_SLICE(isp_pre_filt_ctrl , ISP_PRE_FILT_ENABLE, rgbir->prefilt_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl , GREEN_FILT_MODE, rgbir->green_filt_mode);
+	REG_SET_SLICE(isp_pre_filt_ctrl , GREEN_FILT_ENABLE, rgbir->green_filt_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl , RGBIR_BAYER_PATTERN, rgbir->rgbirPattern );
+	REG_SET_SLICE(isp_pre_filt_ctrl , OUT_RGB_BAYER_PATTERN, rgbir->out_rgb_pattern);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  STAGE1_SELECT, rgbir->green_filt_stage1_select);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  DEMOSAIC_THRESHOLD, rgbir->demosaic_threshold);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  PART_ONE_ENABLE, rgbir->part1_enable);
+	REG_SET_SLICE(isp_pre_filt_ctrl ,  PART_TWO_ENABLE,rgbir->part2_enable);
+
+    isp_write_reg(dev, REG_ADDR(isp_pre_filt_ctrl), (unsigned int)(isp_pre_filt_ctrl));//pre filt ctrl
+	return 0;
+#endif
+}
+
+

+ 646 - 0
vvcam/isp/isp_tdnr3.c

@@ -0,0 +1,646 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "isp_ioctl.h"
+#include "mrv_all_bits.h"
+
+#include "isp_types.h"
+#ifdef ISP_3DNR_V3
+extern MrvAllRegister_t *all_regs;
+
+int isp_tdnr_cfg_gamma(struct isp_ic_dev *dev)
+{
+	//write to regs
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	u32 regVal;
+	u8 bit_width;
+	u8 i;
+	u16 val_a, val_b;
+
+	//const u8 tdnrRegGap = 8;
+	bit_width = 12;
+
+    //pr_info("enter %s\n", __func__);
+
+	for (i = 0; i < DENOISE3D_GAMMA_BIN - 3; i += 5)
+	{
+		val_a = tdnr->curve.preGamma_y[i + 2] >> 6; val_b =  tdnr->curve.preGamma_y[i + 2] & 0x3f;
+		regVal = (val_a << 24) | ((tdnr->curve.preGamma_y[i + 1] & 0xfff) << bit_width) | (tdnr->curve.preGamma_y[i] & 0xfff);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_pregamma_y_0) + (i / 5) *8 , regVal);
+
+		regVal = (val_b << 24) | ((tdnr->curve.preGamma_y[i + 4] & 0xfff) << bit_width) | (tdnr->curve.preGamma_y[i + 3] & 0xfff);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_pregamma_y_1) +  (i / 5 ) *8, regVal);
+	}
+
+	val_a = tdnr->curve.preGamma_y[i + 2] >> 6; val_b = tdnr->curve.preGamma_y[i + 2] & 0x3f;
+	regVal = (val_a << 24) | ((tdnr->curve.preGamma_y[i + 1] & 0xfff) << bit_width) | (tdnr->curve.preGamma_y[i] & 0xfff);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_pregamma_y_12), regVal);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_pregamma_y_13), val_b);
+
+
+	i = 0;
+	for (i = 0; i < DENOISE3D_GAMMA_BIN - 3; i += 5)
+	{
+		val_a = tdnr->curve.invGamma_y[i + 2] >> 6; val_b = tdnr->curve.invGamma_y[i + 2] & 0x3f;
+		regVal = (val_a << 24) | ((tdnr->curve.invGamma_y[i + 1] & 0xfff) << bit_width) | (tdnr->curve.invGamma_y[i] & 0xfff);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_invgamma_y_0) + (i / 5) *8 , regVal);
+
+		regVal = (val_b << 24) | ((tdnr->curve.invGamma_y[i + 4] & 0xfff) << bit_width) | (tdnr->curve.invGamma_y[i + 3] & 0xfff);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_invgamma_y_1) + (i / 5) *8 , regVal);
+	}
+
+	val_a = tdnr->curve.invGamma_y[i + 2] >> 6; val_b = tdnr->curve.invGamma_y[i + 2] & 0x3f;
+	regVal = (val_a << 24) | ((tdnr->curve.invGamma_y[i + 1] & 0xfff) << bit_width) | (tdnr->curve.invGamma_y[i] & 0xfff);
+    isp_write_reg(dev, REG_ADDR(isp_denoise3d2_invgamma_y_12), regVal);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_invgamma_y_13),  val_b);
+	return 0;
+}
+
+int  isp_s_tdnr(struct isp_ic_dev *dev)
+{
+	u32 isp_denoise3d2_ctrl;
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	u32 regVal = 0;
+	/* spacial */
+	u32 strength = tdnr->strength;
+
+    //pr_info("enter %s\n", __func__);
+	strength = MIN(MAX(strength, 0), 128);
+
+	isp_denoise3d2_ctrl = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+#if 0
+	if (!tdnr->enable) {
+			REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_ENABLE, 0);
+			isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), isp_denoise3d2_ctrl);
+			return 0;
+	}
+#endif
+
+#if 1
+	if (dev->tdnr.enable_tnr) {
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), strength);
+	} else {
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), 0);
+		if (dev->tdnr.frames == 2) 
+			return 0 ;
+	}
+#endif
+	//isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), strength);
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_LEVEL, tdnr->noise_level);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_MEAN, tdnr->noise_mean);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_noise), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_LEVEL, tdnr->noise_threshold);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_MEAN, tdnr->motion_mean);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_motion), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_RANGE_H, tdnr->range_h);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_RANGE_V, tdnr->range_v);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_DILATE_RANGE_H, tdnr->dilate_range_h);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_DILATE_RANGE_V, tdnr->dilate_range_v);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_range), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_INV, tdnr->motion_inv_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_motion_inv), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_THR_UPDATE, tdnr->update_factor);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_THR_UPDATE, tdnr->motion_update_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_update), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_PRE_WEIGHT, tdnr->pre_motion_weight);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_SLOPE, tdnr->motion_slope);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_tnr), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_CONV_SHIFT, tdnr->motion_converage_shift);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_CONV_MAX, tdnr->motion_converage_max);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_VAL_SHIFT_BIT, tdnr->tnr_val_shift_bit);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT, tdnr->tnr_diff_shift_bit);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_SAD_WEIGHT, tdnr->sad_weight);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_shift), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_PIXEL_VAL_SHIFT, tdnr->luma_pixel_val_shift);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_PIXEL_SLOP, tdnr->luma_pixel_slope);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_PIXEL_SLOP_SHIFT_BIT, tdnr->luma_pixel_slope_shift);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_PIXEL_SLOP_MIN, tdnr->luma_pixel_slope_min);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_luma), regVal);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_dummy_hblank), 0x63);
+
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_INVGAMMA_EN, tdnr->enable_inv_gamma);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_PREGAMMA_EN, tdnr->enable_pre_gamma);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_ERODE_EN, tdnr->enable_motion_erosion);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_MOTION_CONV_EN, tdnr->enable_motion_converage);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_INV_DGAIN_EN, 0);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_INV_AWB_GAIN_EN, 1);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_COMP_LUMA_EN, 0);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_MOTION_DILATE_ENABLE, tdnr->enable_motion_dilation);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_NLM_ENABLE, dev->tdnr.enable_2dnr);
+	//REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_NLM_ENABLE, 1);
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_TNR_ENABLE, dev->tdnr.enable_tnr);
+
+	if (!dev->tdnr.enable_tnr) {
+		REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_REF_RESET, 1);
+	}
+	REG_SET_SLICE(isp_denoise3d2_ctrl, DENOISE3D_V20_ENABLE, 1);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), isp_denoise3d2_ctrl);
+
+	return 0;
+}
+
+int isp_tdnr_set_strength(struct isp_ic_dev *dev)
+{
+	u32 isp_denoise3d2_strength;
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	//pr_info("enter %s\n", __func__);
+
+	isp_denoise3d2_strength = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_strength));
+	REG_SET_SLICE(isp_denoise3d2_strength, DENOISE3D_V20_TNR_STRENGTH, tdnr->strength);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), isp_denoise3d2_strength);
+
+	return 0;
+}
+
+int isp_tdnr_set_motion(struct isp_ic_dev *dev)
+{
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	u32 isp_denoise3d2_motion_inv;
+	pr_info("enter %s\n", __func__);
+
+	isp_denoise3d2_motion_inv = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_motion_inv));
+	REG_SET_SLICE(isp_denoise3d2_motion_inv, DENOISE3D_V20_MOTION_INV, tdnr->motion_inv_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_motion_inv), isp_denoise3d2_motion_inv);
+
+	return 0;
+}
+
+int isp_tdnr_enable(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+	u32 strength = dev->tdnr.strength;
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(regVal, DENOISE3D_V20_ENABLE, 1);
+	// REG_SET_SLICE(regVal, DENOISE3D_V20_REF_RESET, 1);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);
+
+	strength = MIN(MAX(strength, 0), 128);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), strength); //clear strength
+	dev->tdnr.enable = true;
+
+	return 0;
+}
+
+int isp_tdnr_disable(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	// REG_SET_SLICE(regVal, DENOISE3D_V20_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_strength), 0); //clear strength
+	dev->tdnr.enable = false;
+
+	return 0;
+}
+
+int isp_tdnr_enable_tdnr(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);
+
+	dev->tdnr.enable_tnr= true;
+
+	return 0;
+}
+
+int isp_tdnr_disable_tdnr(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(regVal, DENOISE3D_V20_TNR_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);
+	dev->tdnr.enable = false;
+
+	return 0;
+}
+
+int isp_tdnr_enable_2dnr(struct isp_ic_dev *dev)
+{
+	//u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	/*regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NLM_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);*/
+
+	dev->tdnr.enable_tnr= true;
+
+	return 0;
+}
+
+int isp_tdnr_disable_2dnr(struct isp_ic_dev *dev)
+{
+	//u32 regVal = 0;
+
+	pr_info("enter %s\n", __func__);
+	/*regVal = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NLM_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl), regVal);*/
+	dev->tdnr.enable = false;
+
+	return 0;
+}
+
+
+
+int isp_tdnr_g_stats(struct isp_ic_dev *dev, struct isp_tdnr_stats *stats)
+{
+	//pr_info("enter %s\n", __func__);
+	if (!dev || !stats) {
+		return -EINVAL;
+	}
+
+	stats->bg_sum = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_bg_val_sum));
+	stats->motion_sum = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_mo_val_sum));
+	stats->bg_pixel_cnt = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_bg_cnt));
+	stats->motion_pixel_cnt = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_mo_cnt));
+	stats->frame_avg = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_frame_avg));
+	return 0;
+}
+
+int isp_tdnr_u_noise(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	pr_info("enter %s\n", __func__);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_LEVEL, tdnr->noise_level);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_MEAN, tdnr->noise_mean);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_noise), regVal);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_LEVEL, tdnr->noise_threshold);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_NOISE_MEAN, tdnr->motion_mean);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_motion), regVal);
+
+	return 0;
+
+}
+
+int isp_tdnr_u_thr(struct isp_ic_dev *dev)
+{
+	u32 regVal = 0;
+	struct isp_tdnr_context *tdnr = &dev->tdnr;
+	pr_info("enter %s\n", __func__);
+
+	regVal = 0;
+	REG_SET_SLICE(regVal, DENOISE3D_V20_THR_UPDATE, tdnr->update_factor);
+	REG_SET_SLICE(regVal, DENOISE3D_V20_MOTION_THR_UPDATE, tdnr->motion_update_factor);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_update), regVal);
+
+	return 0;
+
+}
+
+int isp_tdnr_s_buf(struct isp_ic_dev *dev)
+{
+    struct isp_tdnr_buffer* buf = &dev->tdnr.buf;
+    u32 in_width, in_height;
+	u32 size, lval;
+	u32 miv2_sp2_bus_id ;
+	u32 miv2_sp2_fmt;
+	u32 miv2_imsc2;
+
+	u32 miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	u32 miv2_imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc));
+	u32 miv2_sp2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_sp2_ctrl));
+	u32 isp_mi_sp2_raw2_ctrl = isp_read_reg(dev, REG_ADDR(isp_mi_sp2_raw2_ctrl));
+	pr_info("enter %s\n", __func__);
+
+	/*
+
+		ENABLE MIV2 SP2 RAW1 RAW2 WRITE/READ
+
+	*/
+
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_PATH_ENABLE, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_PATH_ENABLE, 1);
+    miv2_ctrl |= 0x00100000;  // sp2_raw2_path_enable
+
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+
+	in_width = isp_read_reg(dev, REG_ADDR(isp_out_h_size));
+	in_height = isp_read_reg(dev, REG_ADDR(isp_out_v_size));
+
+	lval = (in_width * 12 + 127)/ 128;
+	lval <<= 4;
+	size = in_height * lval;  //raw12 unaligned
+	//write reference frame config
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_base_ad_init), buf->pa_refer);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_size_init), size);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_offs_cnt_init), 0);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_height), in_height);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_raw_pic_size), size);
+
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_start_ad), buf->pa_refer);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_llength), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_lval), lval);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_size), size);
+
+	in_width /= 2;
+	in_height /= 2;
+	lval = (in_width); // RAW8 output
+	size = in_height * lval;
+	pr_info("%s 0x%08x\n", __func__, REG_ADDR(isp_mi_sp2_raw2_base_ad_init));
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_base_ad_init), buf->pa_motion);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_size_init), size);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_offs_cnt_init), 0);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_llength), lval);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_pic_height), in_height);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_pic_size), size);
+
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_start_ad), buf->pa_motion);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_width), in_width);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_llength), lval);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_lval), lval);  // align to 128
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_size), size);
+
+#if 0
+	isp_write_reg(dev, 0x5620, buf->pa_motion);
+	isp_write_reg(dev, 0x5624, size);
+	isp_write_reg(dev, 0x5628, 0);
+	isp_write_reg(dev, 0x562c, lval);
+	isp_write_reg(dev, 0x5630, in_width);
+	isp_write_reg(dev, 0x5634, in_height);
+	isp_write_reg(dev, 0x5638, size);
+
+	isp_write_reg(dev, 0x5660, buf->pa_motion);
+	isp_write_reg(dev, 0x5664, in_width);
+	isp_write_reg(dev, 0x5668, lval);
+	isp_write_reg(dev, 0x5680, lval);  // align to 128
+	isp_write_reg(dev, 0x566c, size);
+#endif
+	miv2_sp2_bus_id = isp_read_reg(dev, REG_ADDR(miv2_sp2_bus_id));
+
+	REG_SET_SLICE(miv2_sp2_bus_id, SP2_WR_ID_EN, 1);
+	REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_ID_EN, 1);
+	REG_SET_SLICE(miv2_sp2_bus_id, SP2_RD_BURST_LEN, 2); //sp2 rd burst lenghth 16
+	REG_SET_SLICE(miv2_sp2_bus_id, SP2_BUS_SW_EN, 1);
+
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_bus_id), miv2_sp2_bus_id);
+
+	miv2_sp2_fmt = isp_read_reg(dev, REG_ADDR(miv2_sp2_fmt));
+	REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_BIT, 2);  //raw12
+	REG_SET_SLICE(miv2_sp2_fmt, SP2_WR_RAW_ALIGNED, 0);  //unaligned
+
+	REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_BIT, 2);   //raw12
+	REG_SET_SLICE(miv2_sp2_fmt, SP2_RD_RAW_ALIGNED, 0);  //unaligned
+
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_fmt), miv2_sp2_fmt);
+	isp_write_reg(dev,  REG_ADDR(isp_mi_sp2_raw2_fmt), 0);
+
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_CFG_UPDATE, 1);
+	//REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_AUTO_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_MI_CFG_UPD, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_AUTO_UPDATE, 1);
+
+	miv2_sp2_ctrl |= (SP2_INIT_BASE_EN_MASK | SP2_INIT_OFFSET_EN_MASK);
+	//miv2_sp2_ctrl |= 0x2fa;
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_ctrl), miv2_sp2_ctrl);
+
+	isp_mi_sp2_raw2_ctrl |= 0x23a;
+	isp_write_reg(dev,  REG_ADDR(isp_mi_sp2_raw2_ctrl), isp_mi_sp2_raw2_ctrl);
+	miv2_imsc |= SP2_RAW_FRAME_END_MASK|SP2_DMA_RAW_READY_MASK;
+
+	isp_write_reg(dev, REG_ADDR(miv2_imsc), miv2_imsc);
+	miv2_imsc2 = isp_read_reg(dev, REG_ADDR(miv2_imsc2));
+
+	miv2_imsc2 |= SP2_RAW2_FRAME_END_MASK | SP2_RAW2_DMA_READY_MASK; //0x41000
+	isp_write_reg(dev, REG_ADDR(miv2_imsc2), miv2_imsc2);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d_ctrl), 0x480);
+
+//	isp_write_reg(dev, 0x00000730, 0x00001edf);
+	//isp_write_reg(dev, 0x000014ec, 0x04b30000);
+	//isp_write_reg(dev, 0x000014f0, 0x0807e521);
+	return 0;
+}
+
+int isp_r_tdnr_refer(struct isp_ic_dev *dev)
+{
+	struct isp_tdnr_buffer* buf = &dev->tdnr.buf;
+	u32 miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	u32 miv2_imsc = isp_read_reg(dev, REG_ADDR(miv2_imsc));
+	u32 miv2_sp2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_sp2_ctrl));
+	u32 isp_mi_sp2_raw2_ctrl = isp_read_reg(dev, REG_ADDR(isp_mi_sp2_raw2_ctrl));
+	pr_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_dma_raw_pic_start_ad), buf->pa_refer);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_start_ad), buf->pa_motion);
+
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_CFG_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_RD_RAW_AUTO_UPDATE, 1);
+	REG_SET_SLICE(miv2_sp2_ctrl, SP2_MI_CFG_UPD, 1);
+
+	miv2_sp2_ctrl |= (SP2_INIT_BASE_EN_MASK | SP2_INIT_OFFSET_EN_MASK);
+	miv2_sp2_ctrl |= 0xf0;
+	isp_write_reg(dev, REG_ADDR(miv2_sp2_ctrl), miv2_sp2_ctrl);
+
+	isp_mi_sp2_raw2_ctrl |= 0x238;
+
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_ctrl), isp_mi_sp2_raw2_ctrl);
+
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_PATH_ENABLE, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_START_CON, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW_RDMA_START, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW2_RDMA_START, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW2_RDMA_START_CON, 1);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+
+	miv2_imsc |= SP2_DMA_RAW_READY_MASK;
+	isp_write_reg(dev, REG_ADDR(miv2_imsc), miv2_imsc);
+	return 0;
+}
+
+int isp_r_tdnr_motion(struct isp_ic_dev *dev)
+{
+	struct isp_tdnr_buffer* buf = &dev->tdnr.buf;
+	u32 miv2_ctrl = isp_read_reg(dev, REG_ADDR(miv2_ctrl));
+	u32 isp_mi_sp2_raw2_ctrl = isp_read_reg(dev, REG_ADDR(isp_mi_sp2_raw2_ctrl));
+	pr_info("enter %s\n", __func__);
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_dma_raw2_pic_start_ad), buf->pa_motion);
+
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW2_RDMA_START, 1);
+	REG_SET_SLICE(miv2_ctrl, SP2_RAW2_RDMA_START_CON, 1);
+	isp_write_reg(dev, REG_ADDR(miv2_ctrl), miv2_ctrl);
+
+	isp_mi_sp2_raw2_ctrl |= 0x238;
+	isp_write_reg(dev, REG_ADDR(isp_mi_sp2_raw2_ctrl), isp_mi_sp2_raw2_ctrl);
+
+	return 0;
+}
+
+int isp_tdnr_s_2dnr(struct isp_ic_dev *dev)
+{
+#ifndef ISP_2DNR_V5
+	pr_info("unsupported function: %s\n", __func__);
+	return -EINVAL;
+#else
+	struct isp_2dnr_context *dnr2 = &dev->dnr2;
+	u32 isp_denoise2d_control =
+	    isp_read_reg(dev, REG_ADDR(isp_denoise2d_control));
+	u32 value, addr, strength;
+	u32 isp_ctrl;
+	int i;
+
+	if (!dnr2->enable) {
+        value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+		REG_SET_SLICE(value, DENOISE3D_V20_NLM_ENABLE, 0);
+		if((value & DENOISE3D_V20_TNR_ENABLE_MASK) == 0)
+			REG_SET_SLICE(value, DENOISE3D_V20_ENABLE, 0);
+		isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl),
+			      value);
+		return 0;
+	}
+
+    strength = isp_read_reg(dev, REG_ADDR(isp_denoise2d_strength));
+    REG_SET_SLICE(strength, ISP_2DNR_PRGAMMA_STRENGTH, 1);
+    REG_SET_SLICE(strength, ISP_2DNR_STRENGTH, 0xff);
+
+    isp_write_reg(dev, REG_ADDR(isp_denoise2d_strength), strength);
+	pr_debug("%s: write strength addr =0x%08x value = 0x%08x \n", __func__, REG_ADDR(isp_denoise2d_strength), strength);
+
+	addr = REG_ADDR(isp_denoise2d_sigma_y[0]);
+	for (i = 0; i < 60; i += 5) {
+		value = 0;
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY0, dnr2->sigma[i]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY1, dnr2->sigma[i + 1]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY2A,
+			      dnr2->sigma[i + 2] >> 6);
+		isp_write_reg(dev, addr, value);
+		value = 0;
+		addr += 4;
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY2B,
+			      dnr2->sigma[i + 2] & 0x3f);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY0, dnr2->sigma[i + 3]);
+		REG_SET_SLICE(value, ISP_2DNR_SIGMAY1, dnr2->sigma[i + 4]);
+		isp_write_reg(dev, addr, value);
+		addr += 4;
+	}
+
+	isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	REG_SET_SLICE(isp_denoise2d_control, ISP_2DNR_ENABLE, 1);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_sigma_sqr),  dnr2->sigma_sqr);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_sigma_sqr_shd),
+		       dnr2->sigma_sqr);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_weight_mul_factor),
+		      dnr2->weight);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_weight_mul_factor_shd),
+		      dnr2->weight);
+	/* refer to HW spec for HBLANK */
+	//isp_write_reg(dev, REG_ADDR(isp_denoise2d_dummy_hblank), 0);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_strength_shd), strength);
+	isp_write_reg(dev, REG_ADDR(isp_denoise2d_control_shd),
+		      isp_denoise2d_control);
+
+
+    	value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_blending));
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_OFFSET, dnr2->str_off);
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_MAX, dnr2->str_max);
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_STRENGTH_SLOPE, dnr2->str_slope);
+
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_blending), value);
+	pr_debug("%s:write blending addr = 0x%08x, value = 0x%08x \n", __func__, REG_ADDR(isp_denoise3d2_blending), value);
+	value = isp_read_reg(dev, REG_ADDR(isp_denoise3d2_ctrl));
+	REG_SET_SLICE(value, DENOISE3D_V20_NLM_ENABLE, 1);
+	REG_SET_SLICE(value, DENOISE3D_V20_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_denoise3d2_ctrl),
+				value);
+	pr_debug("%s:write isp_denoise3d2_ctrl addr = 0x%08x, value = 0x%08x \n", __func__, REG_ADDR(isp_denoise3d2_ctrl), value);			
+
+	pr_debug("exit %s\n", __func__);
+	return 0;
+#endif
+}
+
+#endif

+ 176 - 0
vvcam/isp/isp_types.h

@@ -0,0 +1,176 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_TYPES_H_
+#define _ISP_TYPES_H_
+
+enum {
+	IC_MI_PATH_INVALID = -1,		   /**< lower border (only for an internal evaluation) */
+	IC_MI_PATH_MAIN = 0,			   /**< main path index */
+	IC_MI_PATH_SELF = 1,			   /**< self path index */
+	IC_MI_PATH_SELF2 = 2,				   /**< self path index */
+	IC_MI_PATH_MAX						 /**< upper border (only for an internal evaluation) */
+};
+
+enum {
+	IC_MI_DATAMODE_INVALID = 0,		/**< lower border (only for an internal evaluation) */
+	IC_MI_DATAMODE_DISABLED = 1,		/**< disables the path */
+	IC_MI_DATAMODE_JPEG = 2,			/**< data output format is JPEG (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_YUV444 = 3,		/**< data output format is YUV444 */
+	IC_MI_DATAMODE_YUV422 = 4,		/**< data output format is YUV422 */
+	IC_MI_DATAMODE_YUV420 = 5,		/**< data output format is YUV420 */
+	IC_MI_DATAMODE_YUV400 = 6,		/**< data output format is YUV400 */
+	IC_MI_DATAMODE_RGB888 = 7,		/**< data output format is RGB888 (only valid for selpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RGB666 = 8,		/**< data output format is RGB666 (only valid for selpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RGB565 = 9,		/**< data output format is RGB565 (only valid for selpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RAW8 = 10,			/**< data output format is RAW8 (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RAW12 = 11,		   /**< data output format is RAW12 (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_DPCC = 12,			/**< path dumps out the current measured defect pixel table */
+	IC_MI_DATAMODE_RAW10 = 13,		   /**< data output format is RAW10 (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RAW14 = 14,		   /**< data output format is RAW14 (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_RAW16 = 15,		   /**< data output format is RAW16 (only valid for mainpath @ref CamerIcMiPath_e) */
+	IC_MI_DATAMODE_MAX					 /**< upper border (only for an internal evaluation) */
+};
+
+enum {
+	IC_MI_DATASTORAGE_INVALID = 0,		/**< lower border (only for an internal evaluation) */
+	IC_MI_DATASTORAGE_PLANAR = 1,		/**< YUV values are packed together as: YYYY......, UVUVUVUV...... */
+	IC_MI_DATASTORAGE_SEMIPLANAR = 2,	/**< YUV values are packed together as: YUV, YUV, YUV, ...... */
+	IC_MI_DATASTORAGE_INTERLEAVED = 3,	/**< Y values for all pixels are put together, as well as U and V,
+													 like: YYYYYY......, UUUUUUU......., VVVVVV...... */
+	IC_MI_DATASTORAGE_MAX				  /**< upper border (only for an internal evaluation) */
+};
+
+enum {
+	ISP_PICBUF_TYPE_INVALID = 0x00,
+	ISP_PICBUF_TYPE_DATA = 0x08,	/* just some sequential data */
+	ISP_PICBUF_TYPE_RAW8 = 0x10,
+	ISP_PICBUF_TYPE_RAW16 = 0x11,	/* includes: 9..16bits, MSBit aligned, LSByte first! */
+	ISP_PICBUF_TYPE_RAW10 = 0x12,	/* includes: 10bits, MSBit aligned, LSByte first! */
+	ISP_PICBUF_TYPE_RAW12 = 0x13,
+	ISP_PICBUF_TYPE_RAW14 = 0x14,
+	ISP_PICBUF_TYPE_JPEG = 0x20,
+	ISP_PICBUF_TYPE_YCbCr444 = 0x30,
+	ISP_PICBUF_TYPE_YCbCr422 = 0x31,
+	ISP_PICBUF_TYPE_YCbCr420 = 0x32,
+	ISP_PICBUF_TYPE_YCbCr400 = 0x33,
+	ISP_PICBUF_TYPE_YCbCr32 = 0x3f,
+	ISP_PICBUF_TYPE_RGB888 = 0x40,
+	ISP_PICBUF_TYPE_RGB666 = 0x41,	/* R, G & B are LSBit aligned! */
+	ISP_PICBUF_TYPE_RGB565 = 0x42,	/* TODO: don't know the memory layout right now, investigate! */
+	ISP_PICBUF_TYPE_RGB32 = 0x4f,
+	_ISP_PICBUF_TYPE_DUMMY_
+};
+
+enum {
+	ISP_PICBUF_LAYOUT_INVALID = 0,
+	ISP_PICBUF_LAYOUT_COMBINED = 0x10,	/* ISP_PICBUF_TYPE_DATA:        Data: D0 D1 D2... */
+	/* ISP_PICBUF_TYPE_RAW8:          Data: D0 D1 D2... */
+	/* ISP_PICBUF_TYPE_RAW16/10:  Data: D0L D0H D1L D1H... */
+	/* ISP_PICBUF_TYPE_JPEG:          Data: J0 J1 J2... */
+	/* ISP_PICBUF_TYPE_YCbCr444:  Data: Y0 Cb0 Cr0 Y1 Cb1Cr1... */
+	/* ISP_PICBUF_TYPE_YCbCr422:  Data: Y0 Cb0 Y1 Cr0 Y2 Cb1 Y3 Cr1... */
+	/* ISP_PICBUF_TYPE_YCbCr32:   Data: Cr0 Cb0 Y0 A0 Cr1 Cb1 Y1 A1... */
+	/* ISP_PICBUF_TYPE_RGB888:      Data: R0 G0 B0 R1 B2 G1... */
+	/* ISP_PICBUF_TYPE_RGB666:      Data: {00,R0[5:0]} {00,G0[5:0]} {00,B0[5:0]} {00,R1[5:0]} {00,G2[5:0]} {00,B3[5:0]}... */
+	/* ISP_PICBUF_TYPE_RGB565:      Data: {R0[4:0],G0[5:3]} {G0[2:0],B0[4:0]} {R1[4:0],G1[5:3]} {G1[2:0],B1[4:0]}... (is this correct?) */
+	/* ISP_PICBUF_TYPE_RGB32:        Data: B0 G0 R0 A0 B1 G1 R1 A1... */
+	ISP_PICBUF_LAYOUT_BAYER_RGRGGBGB = 0x11,	/* 1st line: RGRG... , 2nd line GBGB... , etc. */
+	ISP_PICBUF_LAYOUT_BAYER_GRGRBGBG = 0x12,	/* 1st line: GRGR... , 2nd line BGBG... , etc. */
+	ISP_PICBUF_LAYOUT_BAYER_GBGBRGRG = 0x13,	/* 1st line: GBGB... , 2nd line RGRG... , etc. */
+	ISP_PICBUF_LAYOUT_BAYER_BGBGGRGR = 0x14,	/* 1st line: BGBG... , 2nd line GRGR... , etc. */
+	ISP_PICBUF_LAYOUT_SEMIPLANAR = 0x20,	/* ISP_PICBUF_TYPE_YCbCr422:  Luma:  Y0 Y1 Y2 Y3... ; Chroma: Cb0 Cr0 Cb1 Cr1... */
+	/* ISP_PICBUF_TYPE_YCbCr420:  Luma:  Y0 Y1 Y2 Y3... ; Chroma: Cb0 Cr0 Cb1 Cr1... */
+	/* ISP_PICBUF_TYPE_YCbCr400:  Luma:  Y0 Y1 Y2 Y3... ; Chroma: not used */
+	ISP_PICBUF_LAYOUT_PLANAR = 0x30,	/* ISP_PICBUF_TYPE_YCbCr444:  Y: Y0 Y1 Y2 Y3...;  Cb: Cb0 Cb1 Cb2 Cb3...; Cr: Cr0 Cr1 Cr2 Cr3... */
+	/* ISP_PICBUF_TYPE_YCbCr422:  Y: Y0 Y1 Y2 Y3...;  Cb: Cb0 Cb1 Cb2 Cb3...; Cr: Cr0 Cr1 Cr2 Cr3... */
+	/* ISP_PICBUF_TYPE_YCbCr420:  Y: Y0 Y1 Y2 Y3...;  Cb: Cb0 Cb1 Cb2 Cb3...; Cr: Cr0 Cr1 Cr2 Cr3... */
+	/* ISP_PICBUF_TYPE_YCbCr400:  Y: Y0 Y1 Y2 Y3...;  Cb: not used;            Cr: not used... */
+	/* ISP_PICBUF_TYPE_RGB888:      R: R0 R1 R2 R3...;  G:  G0 G1 G2 G3...;  B:  B0 B1 B2 B3... */
+	/* ISP_PICBUF_TYPE_RGB666:      R: {00,R0[5:0]}...; G:  {00,G0[5:0]}...;        B:  {00,B0[5:0]}... */
+	_ISP_PICBUF_LAYOUT_DUMMY_
+};
+
+enum {
+	IC_DPF_RB_FILTERSIZE_INVALID = 0,	/**< lower border (only for an internal evaluation) */
+	IC_DPF_RB_FILTERSIZE_9x9 = 1,		/**< red and blue filter kernel size 9x9 (means 5x5 active pixel) */
+	IC_DPF_RB_FILTERSIZE_13x9 = 2,		/**< red and blue filter kernel size 13x9 (means 7x5 active pixel) */
+	IC_DPF_RB_FILTERSIZE_MAX			   /**< upper border (only for an internal evaluation) */
+};
+
+enum {
+	ISP_MI_DATA_ALIGN_MODE_INVALID = -1,
+	ISP_MI_DATA_UNALIGN_MODE = 0,	/* pixel data not aligned. */
+	ISP_MI_DATA_ALIGN_128BIT_MODE = 1,	/* pixel data  aligned with 128 bit. */
+	ISP_MI_DATA_ALIGN_16BIT_MODE = 2,	/* pixel data  aligned with 16 bit. */
+	ISP_MI_DATA_ALIGN_MODE_MAX
+};
+
+enum {
+	IC_DPF_GAIN_USAGE_INVALID = 0,		  /**< lower border (only for an internal evaluation) */
+	IC_DPF_GAIN_USAGE_DISABLED = 1,		 /**< don't use any gains in preprocessing stage */
+	IC_DPF_GAIN_USAGE_NF_GAINS = 2,		 /**< use only the noise function gains  from registers DPF_NF_GAIN_R, ... */
+	IC_DPF_GAIN_USAGE_LSC_GAINS = 3,	/**< use only the gains from LSC module */
+	IC_DPF_GAIN_USAGE_NF_LSC_GAINS = 4,    /**< use the moise function gains and the gains from LSC module */
+	IC_DPF_GAIN_USAGE_AWB_GAINS = 5,	/**< use only the gains from AWB module */
+	IC_DPF_GAIN_USAGE_AWB_LSC_GAINS = 6,   /**< use the gains from AWB and LSC module */
+	IC_DPF_GAIN_USAGE_MAX				  /**< upper border (only for an internal evaluation) */
+};
+
+enum {
+	IC_NLL_SCALE_INVALID = 0,		/**< lower border (only for an internal evaluation) */
+	IC_NLL_SCALE_LINEAR = 1,			/**< use a linear scaling */
+	IC_NLL_SCALE_LOGARITHMIC = 2,		/**< use a logarithmic scaling */
+	IC_NLL_SCALE_MAX					   /**< upper border (only for an internal evaluation) */
+};
+
+#endif /* _ISP_TYPES_H_ */

+ 190 - 0
vvcam/isp/isp_version.h

@@ -0,0 +1,190 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_VERSION_H_
+#define _ISP_VERSION_H_
+
+#define ISP_EE_SUPPORT 1
+#define ISP_2DNR_SUPPORT (1 << 1)
+#define ISP_3DNR_SUPPORT (1 << 2)
+#define ISP_WDR3_SUPPORT (1 << 3)
+#define ISP_MIV2_SUPPORT (1 << 4)
+#define ISP_AEV2_SUPPORT (1 << 5)
+#define ISP_COMPAND_SUPPORT (1 << 6)
+#define ISP_HDR_STITCH_SUPPORT (1 << 7)
+
+
+/*****************************************************************************/
+/**
+ * @brief   HDR module version type
+ */
+/*****************************************************************************/
+#define VSI_ISP_HDR_NOTSUPPORT  0   //!< Not support HDR
+#define VSI_ISP_HDR_V10         1   //!< Version V10
+#define VSI_ISP_HDR_V11         2   //!< Version V11
+#define VSI_ISP_HDR_V12         3   //!< Version V12
+#define VSI_ISP_HDR_V13         4   //!< Version V13
+
+
+/////////////////////////////////////////
+//add Version defines
+/////////////////////////////////////////
+
+/* add Version defines(Mrv_all_regs.h)
+ISP8000L_V2002、ISP8000_V2003、
+ISP8000NANO_V1801、ISP8000NANO_V1802、
+ISP8000_V1901、ISP8000L_V1901、ISP8000L_V1902、
+ISP8000L_V1903、ISP8000L_V1905、ISP8000L_V2001、ISP8000L_V2006
+*/
+#define MRV_IMAGE_EFFECTS_VERSION       1
+#define MRV_SUPER_IMPOSE_VERSION        1
+#define MRV_BLACK_LEVEL_VERSION         1
+#define MRV_AUTO_EXPOSURE_VERSION       1
+#define MRV_AEV2_VERSION                1
+#define MRV_OUTPUT_FORMATTER_VERSION    1
+#define MRV_GAMMA_OUT_VERSION           1
+#define MRV_FLASH_LIGHT_VERSION         1
+#define MRV_SHUTTER_VERSION             1
+#define MRV_MAINPATH_SCALER_VERSION     1
+#define MRV_SELFPATH_SCALER_VERSION     1
+#define MRV_MI_VERSION                  1
+//#define MRV_JPE_VERSION                 1
+#define MRV_SMIA_VERSION                1
+#define MRV_MIPI_VERSION                1
+#define MRV_AUTOFOCUS_VERSION           1
+#define MRV_LSC_VERSION                 1
+#define MRV_IS_VERSION                  1
+#define MRV_HISTOGRAM_VERSION           1
+#define MRV_FILTER_VERSION              1
+#define MRV_CAC_VERSION                 1
+#define MRV_DPF_VERSION                 1
+#define MRV_DPCC_VERSION                1
+#define MRV_WDR_VERSION                 1
+#define MRV_CSM_VERSION                 1
+#define MRV_AWB_VERSION                 1
+#define MRV_ELAWB_VERSION               1
+#define MRV_GAMMA_IN_VERSION            1
+#define MRV_SHUTTER_CTRL_VERSION        1
+#define MRV_CT_VERSION                  1
+#define MRV_COLOR_PROCESSING_VERSION    1
+#define MRV_VSM_VERSION                 1
+#define MRV_CNR_VERSION                 1
+
+#define MRV_WDR2_VERSION                1
+#define MRV_WDR3_VERSION                1
+#define MRV_CMPD_VERSION                1	/* compand */
+#define MRV_TPG_VERSION                 1
+//#define MRV_STITCHING_VERSION           1
+#define MRV_EE_VERSION                  1
+#define MRV_2DNR_VERSION                1
+
+#ifdef ISP_3DNR
+#define MRV_3DNR_VERSION                1
+#endif
+
+#ifdef ISP_GCMONO
+#define MRV_GCMONO_VERSION              1
+#endif
+#ifdef ISP_RGBGC
+#define MRV_RGBGAMMA_VERSION              1
+#endif
+#ifdef ISP_DEC
+#define MRV_DEC_VERSION                 1
+#endif
+#ifdef ISP_DEMOSAIC2
+#define MRV_DEMOSAIC_VERSION            1
+#endif
+#ifdef ISP_GREENEQUILIBRATE
+#define MRV_GREENEQUILIBRATION_VERSION            1
+#endif
+#ifdef ISP_CA
+#define MRV_COLOR_ADJUST_VERSION            1
+#endif
+
+#ifdef ISP_SP2
+#define MRV_SP2_VERSION                 1
+#endif
+
+#ifdef ISP_HDR_STITCH_V2
+#undef MRV_STITCHING_VERSION
+#define MRV_STITCHING_VERSION           2    //1--V11, 2--V12
+
+#elif defined(ISP_HDR_STITCH_V3)
+#undef MRV_STITCHING_VERSION
+#define MRV_STITCHING_VERSION           3    //1--V11, 2--V12 3--V13
+#elif defined(ISP_HDR_STITCH)
+
+#undef MRV_STITCHING_VERSION
+#define MRV_STITCHING_VERSION           1    //1--V11, 2--V12 3--V13
+#endif
+
+#ifdef ISP_3DNR_V2
+#define MRV_3DNR_VERSION                1
+#endif
+
+#ifdef ISP_WDR_V4
+#define MRV_WDR4_VERSION                1
+#endif
+
+#ifdef ISP_3DNR_V3
+#define MRV_TDNR3_VERSION                1
+#endif
+
+#ifdef ISP_RGBIR
+#define MRV_RGBIR_VERSION                1
+#endif
+
+#ifdef ISP_HIST64
+
+#define MRV_HISTOGRAM64_VERSION                1
+#endif
+#endif /* _ISP_VERSION_H_ */

+ 136 - 0
vvcam/isp/isp_wdr.c

@@ -0,0 +1,136 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include "isp_wdr.h"
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+#include "ic_dev.h"
+
+extern MrvAllRegister_t *all_regs;
+
+
+int isp_s_wdr(struct isp_ic_dev *dev)
+{
+    isp_wdr_context_t* wdr = &dev->wdr;
+
+    pr_info(" enter %s\n", __func__);
+
+    /*update wdr configuration  after frame end when isp enable*/
+    if (!is_isp_enable(dev) || wdr->changed) {
+        uint32_t isp_wdr_offset, isp_wdr_ctrl;
+
+        isp_wdr_offset = isp_read_reg(dev, REG_ADDR(isp_wdr_offset));
+        REG_SET_SLICE( isp_wdr_offset, MRV_WDR_LUM_OFFSET, wdr->LumOffset );
+        REG_SET_SLICE( isp_wdr_offset, MRV_WDR_RGB_OFFSET, wdr->RgbOffset );
+    	isp_write_reg(dev, REG_ADDR(isp_wdr_offset), isp_wdr_offset);
+
+        isp_wdr_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr_ctrl));
+    	REG_SET_SLICE(isp_wdr_ctrl, MRV_WDR_ENABLE, wdr->enabled);
+    	isp_write_reg(dev, REG_ADDR(isp_wdr_ctrl), isp_wdr_ctrl);
+        wdr->changed = false;
+    } else {
+        wdr->changed = true;
+    }
+    pr_info(" %s wdr.changed %d \n", __func__, wdr->changed);
+   	return 0;
+}
+
+int isp_s_wdr_curve(struct isp_ic_dev *dev)
+{
+
+    isp_wdr_context_t* wdr = &dev->wdr;
+
+    int i, j;
+    uint32_t dYi = 0U;
+    for ( i=0; i<4; i++ )
+    {
+        for ( j=8; j>0; j-- )
+        {
+            dYi <<= 4;
+            dYi += wdr->dY[ (i*8 + j) ];
+        }
+
+        if (i == 0)
+        {
+
+            isp_write_reg(dev, REG_ADDR(isp_wdr_tonecurve_1), dYi);
+        }
+        else if (i == 1)
+        {
+            isp_write_reg(dev, REG_ADDR(isp_wdr_tonecurve_2), dYi);
+        }
+        else if (i == 2)
+        {
+            isp_write_reg(dev, REG_ADDR(isp_wdr_tonecurve_3), dYi);
+        }
+        else  /* if (i == 3) */
+        {
+            isp_write_reg(dev, REG_ADDR(isp_wdr_tonecurve_4), dYi);
+        }
+    }
+
+    for ( i=0; i<33; i++ )
+    {
+        isp_write_reg(dev, REG_ADDR(wdr_tone_mapping_curve_y_block_arr[i]), wdr->Ym[i]);
+    }
+
+    dYi = 0x00000000;
+
+    isp_write_reg(dev, REG_ADDR(isp_wdr_offset), dYi);
+    isp_write_reg(dev, REG_ADDR(isp_wdr_deltamin), 0x00100000);
+
+    return 0;
+
+}
+
+

+ 67 - 0
vvcam/isp/isp_wdr.h

@@ -0,0 +1,67 @@
+
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _ISP_WDR_H
+#define _ISP_WDR_H
+
+#include "isp_version.h"
+#include "vvdefs.h"
+#include "ic_dev.h"
+
+
+int isp_s_wdr(struct isp_ic_dev *dev);
+int isp_s_wdr_curve(struct isp_ic_dev *dev);
+
+
+#endif
+

+ 502 - 0
vvcam/isp/isp_wdr3.c

@@ -0,0 +1,502 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+#define WDR3_WW						(32)
+#define WDR3_HH						(32)
+#define WDR3_MAX_VALUE				(1023)
+#define WDR3_GAIN_SHIFT				(2)
+#define WDR3_NORMALIZE				(1024)
+#define WDR3_NORMALIZE_SHIFT		(10)
+#ifdef ISP_WDR_V3_20BIT
+#define MODULE_INPUT_BIT_DEPTH		(20)
+#else
+#define MODULE_INPUT_BIT_DEPTH		(12)
+#endif
+#define MODULE_OUTPUT_BIT_DEPTH		(12)
+
+extern MrvAllRegister_t *all_regs;
+
+#ifdef ISP_WDR_V3
+static void wdr3_hw_init(struct isp_ic_dev *dev)
+{
+
+	struct isp_wdr3_context *wdr3 = &dev->wdr3;
+	u32 isp_wdr3_shift_0;
+	u32 isp_wdr3_shift_1;
+
+	u32 width, height;
+	u32 slice_block_area_factor;
+	u32 slice_value_weight[4];
+	u32 slice_pixel_slope_merge;
+	u32 slice_pixel_base_merge;
+	u32 slice_pixel_slope_adjust;
+	u32 slice_pixel_base_adjust;
+	u32 slice_pixel_slope_entropy;
+	u32 slice_pixel_base_entropy;
+	u32 slice_sigma_height;
+	u32 slice_sigma_width;
+	u32 slice_sigma_value;
+	u32 slice_block_width;
+	u32 slice_block_height;
+	u32 isp_wdr3_block_size;
+	u32 isp_wdr3_block_area_factor;
+	u32 isp_wdr3_value_weight;
+	u32 isp_wdr3_pixel_slope;
+	u32 isp_wdr3_entropy_slope;
+	u32 isp_wdr3_sigma_width;
+	u32 isp_wdr3_sigma_height;
+	u32 isp_wdr3_sigma_value;
+	u32 isp_wdr3_block_flag_width;
+	u32 isp_wdr3_block_flag_height;
+	u32 isp_wdr3_strength;
+	u32 width_left;
+	u32 width_count = 0;
+	u32 height_left;
+	u32 height_count = 0;
+	u32 val;
+	bool reg_flag = false;
+	int i, pos;
+
+	pr_info("enter %s\n", __func__);
+
+	width = isp_read_reg(dev, REG_ADDR(isp_acq_h_size));
+	height = isp_read_reg(dev, REG_ADDR(isp_acq_v_size));
+
+	pr_info("wdr3 res: %d %d \n", width, height);
+	/* firware initilization */
+	slice_pixel_slope_merge = 128;
+	slice_pixel_base_merge = 0;
+	slice_pixel_slope_adjust = 128;
+	slice_pixel_base_adjust = 0;
+	slice_pixel_slope_entropy = 204;
+	slice_pixel_base_entropy = 716;
+
+	slice_value_weight[0] = 6;
+	slice_value_weight[1] = 5;
+	slice_value_weight[2] = 5;
+	slice_value_weight[3] = 16;
+
+	slice_block_width = width / WDR3_WW;
+	slice_block_height = height / WDR3_HH;
+	slice_block_area_factor =
+	    WDR3_NORMALIZE * WDR3_NORMALIZE / (slice_block_width *
+					       slice_block_height);
+	slice_sigma_height =
+	    WDR3_NORMALIZE * WDR3_NORMALIZE / slice_block_height;
+	slice_sigma_width = WDR3_NORMALIZE * WDR3_NORMALIZE / slice_block_width;
+	slice_sigma_value = WDR3_NORMALIZE * WDR3_NORMALIZE / WDR3_MAX_VALUE;
+
+	/* block flag configuration */
+	width_left = width - slice_block_width * WDR3_WW;
+	height_left = height - slice_block_height * WDR3_HH;
+	isp_wdr3_block_flag_width = 0;
+	isp_wdr3_block_flag_height = 0;
+
+	for (i = 0, width_count = 0;
+	     (i < WDR3_WW) && (width_count < width_left); i++, width_count++) {
+		isp_wdr3_block_flag_width |= (1 << i);
+	}
+
+	for (i = 0, height_count = 0;
+	     (i < WDR3_HH) && (height_count < height_left);
+	     i++, height_count++) {
+		isp_wdr3_block_flag_height |= (1 << i);
+	}
+
+	slice_pixel_base_adjust += 255;
+	slice_pixel_base_merge += 255;
+
+#ifndef __KERNEL__
+	//NOTE: register isp_wdr3_shift is read-only register on fpga, can not write
+	//NOTE: it is used by cmodel, So it should  be config.
+	u32 slice_pixel_shift;
+	u32 slice_output_shift;
+	u32 isp_wdr3_shift;
+
+	slice_pixel_shift = MODULE_INPUT_BIT_DEPTH - 5;
+	slice_output_shift = MODULE_INPUT_BIT_DEPTH - MODULE_OUTPUT_BIT_DEPTH;
+
+	isp_wdr3_shift = isp_read_reg(dev, REG_ADDR(isp_wdr3_shift));
+	REG_SET_SLICE(isp_wdr3_shift, WDR3_PIXEL_SHIFT_BIT, slice_pixel_shift);
+	REG_SET_SLICE(isp_wdr3_shift, WDR3_OUTPUT_SHIFT_BIT,
+		      slice_output_shift);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_shift), isp_wdr3_shift);
+#endif
+
+	isp_wdr3_block_size = isp_read_reg(dev, REG_ADDR(isp_wdr3_block_size));
+	REG_SET_SLICE(isp_wdr3_block_size, WDR3_BLOCK_WIDTH, slice_block_width);
+	REG_SET_SLICE(isp_wdr3_block_size, WDR3_BLOCK_HEIGHT,
+		      slice_block_height);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_block_size), isp_wdr3_block_size);
+
+	isp_wdr3_block_area_factor =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_block_area_factor));
+	REG_SET_SLICE(isp_wdr3_block_area_factor, WDR3_BLOCK_AREA_INVERSE,
+		      slice_block_area_factor);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_block_area_factor),
+		      isp_wdr3_block_area_factor);
+	isp_wdr3_value_weight =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_value_weight));
+	REG_SET_SLICE(isp_wdr3_value_weight, WDR3_VALUE_WEIGHT_0,
+		      slice_value_weight[0]);
+	REG_SET_SLICE(isp_wdr3_value_weight, WDR3_VALUE_WEIGHT_1,
+		      slice_value_weight[1]);
+	REG_SET_SLICE(isp_wdr3_value_weight, WDR3_VALUE_WEIGHT_2,
+		      slice_value_weight[2]);
+	REG_SET_SLICE(isp_wdr3_value_weight, WDR3_VALUE_WEIGHT_3,
+		      slice_value_weight[3]);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_value_weight),
+		      isp_wdr3_value_weight);
+
+	isp_wdr3_strength = isp_read_reg(dev, REG_ADDR(isp_wdr3_strength));
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_MAXIMUM_GAIN,  wdr3->max_gain);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_GLOBAL_STRENGTH,
+		      wdr3->global_strength);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_LOCAL_STRENGTH,
+		      128);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_TOTAL_STRENGTH, wdr3->strength);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_strength), isp_wdr3_strength);
+
+	isp_wdr3_pixel_slope =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_pixel_slope));
+	REG_SET_SLICE(isp_wdr3_pixel_slope, WDR3_PIXEL_ADJUST_BASE,
+		      slice_pixel_base_adjust);
+	REG_SET_SLICE(isp_wdr3_pixel_slope, WDR3_PIXEL_ADJUST_SLOPE,
+		      slice_pixel_slope_adjust);
+	REG_SET_SLICE(isp_wdr3_pixel_slope, WDR3_PIXEL_MERGE_BASE,
+		      slice_pixel_base_merge);
+	REG_SET_SLICE(isp_wdr3_pixel_slope, WDR3_PIXEL_MERGE_SLOPE,
+		      slice_pixel_slope_merge);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_pixel_slope),
+		      isp_wdr3_pixel_slope);
+
+	isp_wdr3_entropy_slope =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_entropy_slope));
+	REG_SET_SLICE(isp_wdr3_entropy_slope, WDR3_ENTROPY_BASE,
+		      slice_pixel_base_entropy);
+	REG_SET_SLICE(isp_wdr3_entropy_slope, WDR3_ENTROPY_SLOPE,
+		      slice_pixel_slope_entropy);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_entropy_slope),
+		      isp_wdr3_entropy_slope);
+
+	isp_wdr3_sigma_width =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_sigma_width));
+	REG_SET_SLICE(isp_wdr3_sigma_width, WDR3_BILITERAL_WIDTH_SIGMA,
+		      slice_sigma_width);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_sigma_width),
+		      isp_wdr3_sigma_width);
+
+	isp_wdr3_sigma_height =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_sigma_height));
+	REG_SET_SLICE(isp_wdr3_sigma_height, WDR3_BILITERAL_HEIGHT_SIGMA,
+		      slice_sigma_height);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_sigma_height),
+		      isp_wdr3_sigma_height);
+
+	isp_wdr3_sigma_value =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr3_sigma_value));
+	REG_SET_SLICE(isp_wdr3_sigma_value, WDR3_BILITERAL_VALUE_SIGMA,
+		      slice_sigma_value);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_sigma_value),
+		      isp_wdr3_sigma_value);
+
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_block_flag_width),
+		      isp_wdr3_block_flag_width);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_block_flag_height),
+		      isp_wdr3_block_flag_height);
+
+	for (i = 0; i < 5; i++) {
+		reg_flag = i < 4;
+		pos = i * 3;
+		val =
+		    wdr3->histogram[pos] << (reg_flag ?
+					     WDR3_HISTOGRAM_CURVE0_SHIFT :
+					     WDR3_HISTOGRAM_CURVE1_SHIFT);
+		val |=
+		    wdr3->histogram[pos +
+				    1] << (reg_flag ?
+					   WDR3_HISTOGRAM_CURVE1_SHIFT :
+					   WDR3_HISTOGRAM_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_HISTOGRAM_CURVE2,
+				      wdr3->histogram[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_histogram[i]), val);
+
+		val =
+		    wdr3->entropy[pos] << (reg_flag ?
+					   WDR3_ENTROPY_CONVERT0_SHIFT :
+					   WDR3_ENTROPY_CONVERT1_SHIFT);
+		val |=
+		    wdr3->entropy[pos +
+				  1] << (reg_flag ? WDR3_ENTROPY_CONVERT1_SHIFT
+					 : WDR3_ENTROPY_CONVERT2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_ENTROPY_CONVERT2,
+				      wdr3->entropy[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_entropy[i]), val);
+
+		val =
+		    wdr3->gamma_pre[pos] << (reg_flag ?
+					     WDR3_GAMMA_PRE_CURVE0_SHIFT :
+					     WDR3_GAMMA_PRE_CURVE1_SHIFT);
+		val |=
+		    wdr3->gamma_pre[pos +
+				    1] << (reg_flag ?
+					   WDR3_GAMMA_PRE_CURVE1_SHIFT :
+					   WDR3_GAMMA_PRE_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_GAMMA_PRE_CURVE2,
+				      wdr3->gamma_pre[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_gamma_pre[i]), val);
+
+		val =
+		    wdr3->gamma_up[pos] << (reg_flag ?
+					    WDR3_GAMMA_UP_CURVE0_SHIFT :
+					    WDR3_GAMMA_UP_CURVE1_SHIFT);
+		val |=
+		    wdr3->gamma_up[pos +
+				   1] << (reg_flag ? WDR3_GAMMA_UP_CURVE1_SHIFT
+					  : WDR3_GAMMA_UP_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_GAMMA_UP_CURVE2,
+				      wdr3->gamma_up[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_gamma_up[i]), val);
+
+		val =
+		    wdr3->gamma_down[pos] << (reg_flag ?
+					      WDR3_GAMMA_DOWN_CURVE0_SHIFT :
+					      WDR3_GAMMA_DOWN_CURVE1_SHIFT);
+		val |=
+		    wdr3->gamma_down[pos +
+				     1] << (reg_flag ?
+					    WDR3_GAMMA_DOWN_CURVE1_SHIFT :
+					    WDR3_GAMMA_DOWN_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_GAMMA_DOWN_CURVE2,
+				      wdr3->gamma_down[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_gamma_down[i]), val);
+
+		val =
+		    wdr3->distance_weight[pos] << (reg_flag ?
+						   WDR3_DISTANCE_WEIGHT_CURVE0_SHIFT
+						   :
+						   WDR3_DISTANCE_WEIGHT_CURVE1_SHIFT);
+		val |=
+		    wdr3->distance_weight[pos +
+					  1] << (reg_flag ?
+						 WDR3_DISTANCE_WEIGHT_CURVE1_SHIFT
+						 :
+						 WDR3_DISTANCE_WEIGHT_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_DISTANCE_WEIGHT_CURVE2,
+				      wdr3->distance_weight[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_distance_weight[i]), val);
+
+		val =
+		    wdr3->difference_weight[pos] << (reg_flag ?
+						     WDR3_DIFFERENCE_WEIGHT_CURVE0_SHIFT
+						     :
+						     WDR3_DIFFERENCE_WEIGHT_CURVE1_SHIFT);
+		val |=
+		    wdr3->difference_weight[pos +
+					    1] << (reg_flag ?
+						   WDR3_DIFFERENCE_WEIGHT_CURVE1_SHIFT
+						   :
+						   WDR3_DIFFERENCE_WEIGHT_CURVE2_SHIFT);
+		if (reg_flag)
+			REG_SET_SLICE(val, WDR3_DIFFERENCE_WEIGHT_CURVE2,
+				      wdr3->difference_weight[pos + 2]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_difference_weight[i]),
+			      val);
+	}
+
+	for (i = 0; i < 7; i++) {
+		val = 0;
+		REG_SET_SLICE(val, WDR3_GLOBAL_CURVE_INVERT0,
+			      wdr3->invert_curve[i * 2]);
+		REG_SET_SLICE(val, WDR3_GLOBAL_CURVE_INVERT1,
+			      wdr3->invert_curve[i * 2 + 1]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_invert_curve[i]), val);
+		val = 0;
+		REG_SET_SLICE(val, WDR3_LINEAR_CURVE_INVERT0,
+			      wdr3->invert_linear[i * 2]);
+		REG_SET_SLICE(val, WDR3_LINEAR_CURVE_INVERT1,
+			      wdr3->invert_linear[i * 2 + 1]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr3_invert_linear[i]), val);
+	}
+
+	isp_wdr3_shift_0 = 0;
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT0, wdr3->shift[0]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT1, wdr3->shift[1]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT2, wdr3->shift[2]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT3, wdr3->shift[3]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT4, wdr3->shift[4]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT5, wdr3->shift[5]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT6, wdr3->shift[6]);
+	REG_SET_SLICE(isp_wdr3_shift_0, WDR3_HISTOGRAM_SHIFT7, wdr3->shift[7]);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_shift_0), isp_wdr3_shift_0);
+
+	isp_wdr3_shift_1 = 0;
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT8, wdr3->shift[8]);
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT9, wdr3->shift[9]);
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT10,
+		      wdr3->shift[10]);
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT11,
+		      wdr3->shift[11]);
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT12,
+		      wdr3->shift[12]);
+	REG_SET_SLICE(isp_wdr3_shift_1, WDR3_HISTOGRAM_SHIFT13,
+		      wdr3->shift[13]);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_shift_1), isp_wdr3_shift_1);
+
+	{
+	uint32_t isp_wdr3_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr3_ctrl));
+	REG_SET_SLICE(isp_wdr3_ctrl, WDR3_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_ctrl), isp_wdr3_ctrl);
+	}
+}
+#endif
+
+int isp_enable_wdr3(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V3
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_wdr3_context *wdr3 = &dev->wdr3;
+	int32_t isp_wdr3_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr3_ctrl));
+	wdr3->enable = true;
+	REG_SET_SLICE(isp_wdr3_ctrl, WDR3_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_ctrl), isp_wdr3_ctrl);
+
+	{
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+	return 0;
+#endif
+}
+
+int isp_disable_wdr3(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V3
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_wdr3_context *wdr3 = &dev->wdr3;
+	int32_t isp_wdr3_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr3_ctrl));
+	wdr3->enable = false;
+	REG_SET_SLICE(isp_wdr3_ctrl, WDR3_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_ctrl), isp_wdr3_ctrl);
+
+	{
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+	return 0;
+#endif
+}
+
+int isp_u_wdr3(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V3
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	wdr3_hw_init(dev);
+	return 0;
+#endif
+}
+
+int isp_s_wdr3(struct isp_ic_dev *dev)
+{
+
+#ifndef ISP_WDR_V3
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_wdr3_context *wdr3 = &dev->wdr3;
+	u32 isp_wdr3_strength = isp_read_reg(dev, REG_ADDR(isp_wdr3_strength));
+	u32 width = isp_read_reg(dev, REG_ADDR(isp_acq_h_size));
+	u32 height = isp_read_reg(dev, REG_ADDR(isp_acq_v_size));
+	width /= 32;
+	height /= 32;
+
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_MAXIMUM_GAIN, wdr3->max_gain);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_GLOBAL_STRENGTH,
+		      wdr3->global_strength);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_LOCAL_STRENGTH, 128);
+	REG_SET_SLICE(isp_wdr3_strength, WDR3_TOTAL_STRENGTH, wdr3->strength);
+
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_block_size),
+		      width | (height << 9));
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_strength), isp_wdr3_strength);
+	isp_write_reg(dev, REG_ADDR(isp_wdr3_strength_shd), isp_wdr3_strength);	/* cmodel use */
+
+	{
+	uint32_t isp_ctrl = isp_read_reg(dev, REG_ADDR(isp_ctrl));
+	REG_SET_SLICE(isp_ctrl, MRV_ISP_ISP_GEN_CFG_UPD, 1);
+	isp_write_reg(dev, REG_ADDR(isp_ctrl), isp_ctrl);
+	}
+	return 0;
+#endif
+}

+ 515 - 0
vvcam/isp/isp_wdr4.c

@@ -0,0 +1,515 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifdef __KERNEL__
+#include <linux/io.h>
+#include <linux/module.h>
+#endif
+#include "mrv_all_bits.h"
+#include "isp_ioctl.h"
+#include "isp_types.h"
+
+#ifdef ISP_WDR_V4
+#define WDR4_WW						(32)
+#define WDR4_HH						(32)
+#define WDR4_MAX_VALUE				(1048575)
+#define WDR4_GAIN_SHIFT				(2)
+#define WDR4_NORMALIZE				(1024)
+#define WDR4_NORMALIZE_SHIFT		(10)
+#ifdef ISP_WDR_V4_20BIT
+#define MODULE_INPUT_BIT_DEPTH		(20)
+#else
+#define MODULE_INPUT_BIT_DEPTH		(12)
+#endif
+#define MODULE_OUTPUT_BIT_DEPTH		(12)
+
+extern MrvAllRegister_t *all_regs;
+
+static void wdr4_config_curve(struct isp_ic_dev *dev)
+{
+	struct isp_wdr4_context *wdr4 = &dev->wdr4;
+    u32 pos, i , val;
+	//u32 isp_wdr4_shift_0;
+	//u32 isp_wdr4_shift0_0;
+    //initialize the histogram && entropy && gamma_pre && gamma_up && gamma_down && invert_linear
+	for (i = 0; i < 7; i++) {
+        u32  val_high_bit, val_low_bit;
+		pos = i * 3;
+        //get the curve that combined with high && low data
+        val_high_bit = (wdr4->histogram[pos] >> 10) & (0x3ff);
+        val_low_bit = wdr4->histogram[pos] & (0x3ff);
+
+		val = val_low_bit << WDR4_HISTOGRAM_CURVE0_0_SHIFT ;
+		val |= wdr4->histogram[pos +1];
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_histogram_0) + i * 2 * ISP_REG_GAP, val);
+
+		val = val_high_bit << WDR4_HISTOGRAM_CURVE0_0_SHIFT ;
+
+        if (pos + 2 < WDR4_BIN) {
+            val |= wdr4->histogram[pos +2];
+        }
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_histogram_0) + (i *2 + 1) * ISP_REG_GAP, val);
+
+        //get the value that combined with high && low data
+        val_high_bit = (wdr4->gamma_pre[pos] >> 10) & 0x3ff;
+        val_low_bit = (wdr4->gamma_pre[pos]  & 0x3ff) ;
+
+		val = val_low_bit << WDR4_GAMMA_PRE_CURVE0_1_SHIFT ;
+		val |= wdr4->gamma_pre[pos +1];
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_gamma_pre_0) + (i * 2) * ISP_REG_GAP, val);
+
+		val = val_high_bit << WDR4_GAMMA_PRE_CURVE0_1_SHIFT ;
+
+        if (pos + 2 < WDR4_BIN)
+        val |= wdr4->gamma_pre[pos +2];
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_gamma_pre_0) + (i *2 + 1) * ISP_REG_GAP,  val);
+
+
+        //get the value that combined with high && low data
+        val_high_bit = (wdr4->gamma_up[pos] >> 10) & 0x3ff;
+        val_low_bit = (wdr4->gamma_up[pos] & 0x3ff);
+
+		val = val_low_bit <<WDR4_GAMMA_UP_CURVE0_0_SHIFT;
+		val |= wdr4->gamma_up[pos +1];
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_gamma_up_0) + (i * 2) * ISP_REG_GAP, val);
+		val = val_high_bit  <<WDR4_GAMMA_UP_CURVE0_1_SHIFT;
+        if (pos + 2 < WDR4_BIN)
+        val |= wdr4->gamma_up[pos +2];
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_gamma_up_0) + (i *2 + 1) * ISP_REG_GAP,  val);
+
+
+         //get the value that combined with high && low data
+        val_high_bit = (wdr4->invert_linear[pos] >> 9) & 0x1ff;
+        val_low_bit = (wdr4->invert_linear[pos] & 0x1ff);
+
+        val = val_low_bit  << WDR4_LINEAR_CURVE_INVERT0_0_SHIFT;
+        val |= wdr4->invert_linear[pos +1];
+        isp_write_reg(dev, REG_ADDR(isp_wdr4_invert_linear_0) + (i * 2) * ISP_REG_GAP, val);
+        val = val_high_bit << WDR4_LINEAR_CURVE_INVERT0_0_SHIFT;
+        if (pos + 2 < WDR4_BIN)
+        val |= wdr4->invert_linear[pos +2];
+        isp_write_reg(dev, REG_ADDR(isp_wdr4_invert_linear_0) + (i *2 + 1) * ISP_REG_GAP,  val);
+
+		if (pos + 2 < WDR4_BIN) {
+			val = wdr4->entropy[pos] << WDR4_ENTROPY_CONVERT0_SHIFT ;
+			val |= wdr4->entropy[pos +1] <<  WDR4_ENTROPY_CONVERT1_SHIFT;
+
+			val |= wdr4->entropy[pos +2] <<  WDR4_ENTROPY_CONVERT2_SHIFT;
+		} else {     //the lasw two entropy
+			val = wdr4->entropy[pos] << WDR4_ENTROPY_CONVERT18_SHIFT ;
+			val |= wdr4->entropy[pos +1] <<  WDR4_ENTROPY_CONVERT19_SHIFT;
+		}
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_entropy_0) + i * ISP_REG_GAP, val);
+
+		if (pos + 2 < WDR4_BIN)  {
+			val = wdr4->gamma_down[pos] << WDR4_GAMMA_DOWN_CURVE0_SHIFT ;
+			val |= wdr4->gamma_down[pos +1] <<  WDR4_GAMMA_DOWN_CURVE1_SHIFT;
+
+			val |= wdr4->gamma_down[pos +2] <<  WDR4_GAMMA_DOWN_CURVE2_SHIFT;
+		} else {   //the lasw two entropy
+			val = wdr4->gamma_down[pos] << WDR4_GAMMA_DOWN_CURVE18_SHIFT ;
+			val |= wdr4->gamma_down[pos +1] <<  WDR4_GAMMA_DOWN_CURVE19_SHIFT;
+
+		}
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_gamma_down_0) + i * ISP_REG_GAP, val);
+	}
+
+    //config the distance weight && different weight && SMOOTH INVERT
+    for (i = 0 ; i < 5  ; i++) {
+        pos = i * ISP_REG_GAP;
+		val = wdr4->distance_weight[pos] << WDR4_DISTANCE_WEIGHT_CURVE0_SHIFT ;
+		val |= wdr4->distance_weight[pos +1] <<  WDR4_DISTANCE_WEIGHT_CURVE1_SHIFT;
+		val |= wdr4->distance_weight[pos +2] << WDR4_DISTANCE_WEIGHT_CURVE2_SHIFT;
+		val |= wdr4->distance_weight[pos +3] << WDR4_DISTANCE_WEIGHT_CURVE3_SHIFT;
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_distance_weight_0) + i * ISP_REG_GAP, val);
+
+		val = wdr4->difference_weight[pos] << WDR4_DIFFERENCE_WEIGHT_CURVE0_SHIFT ;
+		val |= wdr4->difference_weight[pos +1] <<  WDR4_DIFFERENCE_WEIGHT_CURVE1_SHIFT;
+		val |= wdr4->difference_weight[pos +2] << WDR4_DIFFERENCE_WEIGHT_CURVE2_SHIFT;
+		val |= wdr4->difference_weight[pos +3] << WDR4_DIFFERENCE_WEIGHT_CURVE3_SHIFT;
+
+
+        isp_write_reg(dev, REG_ADDR(isp_wdr4_difference_weight_0) + i * ISP_REG_GAP, val);
+
+
+		val = wdr4->smooth_invert[pos] << WDR4_SMOOTH_INVERT_CURVE0_SHIFT ;
+		val |= wdr4->smooth_invert[pos +1] <<  WDR4_SMOOTH_INVERT_CURVE1_SHIFT;
+		val |= wdr4->smooth_invert[pos +2] << WDR4_SMOOTH_INVERT_CURVE2_SHIFT;
+		val |= wdr4->smooth_invert[pos +3] << WDR4_SMOOTH_INVERT_CURVE3_SHIFT;
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_smooth_invert_0) + i * ISP_REG_GAP, val);
+
+    }
+	for (i = 0; i < 10; i++) {
+		val = 0;
+		REG_SET_SLICE(val, WDR4_GLOBAL_CURVE_INVERT0,
+			      wdr4->invert_curve[i * 2]);
+		REG_SET_SLICE(val, WDR4_GLOBAL_CURVE_INVERT1,
+			      wdr4->invert_curve[i * 2 + 1]);
+		isp_write_reg(dev, REG_ADDR(isp_wdr4_invert_curve_0) + i * ISP_REG_GAP, val);
+
+	}
+
+    for (i = 0 ; i < 4; i++) {
+        val = 0 ;
+        pos = i * 6;
+        if (pos + 3 > WDR4_BIN) {
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT18, wdr4->shift[ pos +0]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT19, wdr4->shift[ pos +1]);
+        } else {
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT0, wdr4->shift[ pos +0]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT1, wdr4->shift[ pos +1]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT2, wdr4->shift[ pos +2]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT3, wdr4->shift[ pos +3]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT4, wdr4->shift[ pos +4]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM_SHIFT5, wdr4->shift[ pos +5]);
+        }
+        isp_write_reg(dev, REG_ADDR(isp_wdr4_shift_0) + i * ISP_REG_GAP,  val);
+
+    }
+
+    for (i = 0 ; i < 3; i++) {
+        val = 0 ;
+        pos = i * 8;
+        if (pos + 5 > WDR4_BIN) {
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT16, wdr4->shift0[ pos +0]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT17, wdr4->shift0[ pos +1]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT18, wdr4->shift0[ pos +2]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT19, wdr4->shift0[ pos +3]);
+        } else {
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT0, wdr4->shift0[ pos +0]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT1, wdr4->shift0[ pos +1]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT2, wdr4->shift0[ pos +2]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT3, wdr4->shift0[ pos +3]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT4, wdr4->shift0[ pos +4]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT5, wdr4->shift0[ pos +5]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT6, wdr4->shift0[ pos +6]);
+            REG_SET_SLICE(val, WDR4_HISTOGRAM0_SHIFT7, wdr4->shift0[ pos +7]);
+        }
+
+        isp_write_reg(dev, REG_ADDR(isp_wdr4_shift0_0) + i * ISP_REG_GAP,  val);
+    }
+
+}
+static void wdr4_hw_init(struct isp_ic_dev *dev)
+{
+	// struct isp_wdr4_context *wdr4 = &dev->wdr4;
+	u32 width, height;
+	u32 slice_sigma_height;
+	u32 slice_sigma_width;
+	u32 slice_sigma_value;
+	u32 slice_block_width;
+	u32 slice_block_height;
+	u32 isp_wdr4_block_size;
+	u32 slice_block_area_inverse;
+	u32 isp_wdr4_value_weight;
+	u32 isp_wdr4_pixel_slope;
+	u32 isp_wdr4_entropy_slope;
+	u32 isp_wdr4_sigma_width;
+	u32 isp_wdr4_sigma_height;
+	u32 isp_wdr4_sigma_value;
+	u32 isp_wdr4_block_flag_width;
+	u32 isp_wdr4_block_flag_height;
+	u32 isp_wdr4_strength;
+	u32 isp_wdr4_block_area_factor;
+	u32 width_left;
+	u32 width_count = 0;
+	u32 height_left;
+	u32 height_count = 0;
+    u32 isp_wdr4_strength_0 = 0, isp_wdr4_strength_1 = 0, isp_wdr4_contrast = 0;
+	int i;
+    u8 isp_wdr4_low_strength, isp_wdr4_high_strength,  isp_wdr4_global_strength;
+    u8  isp_wdr4_local_strength;
+
+	u32 slice_pixel_shift;
+	u32 slice_output_shift;// isp_wdr4_normalize_shift;
+	u32 isp_wdr4_shift;// isp_wdr4_gain_shift_bit;
+	pr_info("enter %s\n", __func__);
+
+	width = isp_read_reg(dev, REG_ADDR(isp_acq_h_size));
+	height = isp_read_reg(dev, REG_ADDR(isp_acq_v_size));
+
+	pr_info("isp_wdr4 res: %d %d \n", width, height);
+	/* firware initilization */
+
+    isp_wdr4_strength = 128;         // valid values: [0,128]; isp_wdr4 will merge original and enhanced image
+                                     // together based on this value.
+                                    // 128: use enhanced image completely; 0: use original image completely
+    isp_wdr4_low_strength = 16;     // Valid values: [0,255]; if hdr off, limit the maximum gain for image enhancement
+                                     // if hdr on, control low light area information. Higher:haver more low light information
+    isp_wdr4_high_strength = 60;     //valid values:[0, 128]: control high light area information. Higher:have more high
+                                     // light information
+    isp_wdr4_global_strength = 128;  // Valid values: [0,128]
+                                     // isp_wdr4 will increase global contrast based on this value.
+                                     // 128: use strongest contrast; 0: on contrast increasing.
+	 isp_wdr4_local_strength = 128;   // valid values: [0,128]
+                                  // wdr4 will increase local contrast based on this value.
+                                  // 128: use strongest contrast; 0: on contrast increasing.
+
+    isp_wdr4_strength_0 = isp_read_reg(dev, REG_ADDR(isp_wdr4_strength_0));
+    REG_SET_SLICE(isp_wdr4_strength_0, WDR4_LOCAL_STRENGTH, isp_wdr4_local_strength);
+    REG_SET_SLICE(isp_wdr4_strength_0, WDR4_GLOBAL_STRENGTH, isp_wdr4_global_strength);
+    REG_SET_SLICE(isp_wdr4_strength_0, WDR4_LOW_STRENGTH, isp_wdr4_low_strength);
+	REG_SET_SLICE(isp_wdr4_strength_0, WDR4_TOTAL_STRENGTH,isp_wdr4_strength);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_0), isp_wdr4_strength_0);
+
+    isp_wdr4_strength_1 = isp_read_reg(dev, REG_ADDR(isp_wdr4_strength_1));
+    REG_SET_SLICE(isp_wdr4_strength_1, WDR4_HIGH_STRENGTH, isp_wdr4_high_strength);
+    REG_SET_SLICE(isp_wdr4_strength_1, WDR4_DRC_BAYER_RATIO, 14);
+    REG_SET_SLICE(isp_wdr4_strength_1, WDR4_DRC_BAYER_RATIOLSVS, 14);
+   	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_1), isp_wdr4_strength_1);
+
+    isp_wdr4_contrast = isp_read_reg(dev, REG_ADDR(isp_wdr4_contrast));
+    REG_SET_SLICE(isp_wdr4_contrast , WDR4_CONTRAST ,0); //valid values:[-1023~1023]:control contrast of image,.higher:image have stronger contrast
+    REG_SET_SLICE(isp_wdr4_contrast , WDR4_FLAT_STRENGTH ,8);//valid values:[0, 19]:adjust flat area. Higher:flat area stretched more strong
+    REG_SET_SLICE(isp_wdr4_contrast , WDR4_FLAT_THR ,1); //valid values:[0, 20]:judge flat region.
+
+    isp_write_reg(dev, REG_ADDR(isp_wdr4_contrast), isp_wdr4_contrast);
+
+    isp_wdr4_pixel_slope = isp_read_reg(dev, REG_ADDR(isp_wdr4_pixel_slope));
+     REG_SET_SLICE(isp_wdr4_pixel_slope , WDR4_PIXEL_MERGE_SLOPE , 128);
+     REG_SET_SLICE(isp_wdr4_pixel_slope , WDR4_PIXEL_MERGE_BASE ,  128);
+     REG_SET_SLICE(isp_wdr4_pixel_slope , WDR4_PIXEL_ADJUST_SLOPE ,128);
+     REG_SET_SLICE(isp_wdr4_pixel_slope , WDR4_PIXEL_ADJUST_BASE , 128);
+
+     isp_write_reg(dev, REG_ADDR(isp_wdr4_pixel_slope), isp_wdr4_pixel_slope);
+
+    isp_wdr4_entropy_slope = isp_read_reg(dev, REG_ADDR(isp_wdr4_entropy_slope));
+     REG_SET_SLICE(isp_wdr4_entropy_slope , WDR4_ENTROPY_SLOPE , 0xc8);
+     REG_SET_SLICE(isp_wdr4_entropy_slope , WDR4_ENTROPY_BASE ,0x02bc);
+     isp_write_reg(dev, REG_ADDR(isp_wdr4_entropy_slope), isp_wdr4_entropy_slope);
+
+	isp_wdr4_value_weight = isp_read_reg(dev, REG_ADDR(isp_wdr4_value_weight));
+	REG_SET_SLICE(isp_wdr4_value_weight , WDR4_VALUE_WEIGHT_0 , 6);
+	REG_SET_SLICE(isp_wdr4_value_weight , WDR4_VALUE_WEIGHT_1 , 5);
+	REG_SET_SLICE(isp_wdr4_value_weight , WDR4_VALUE_WEIGHT_2 , 5);
+	REG_SET_SLICE(isp_wdr4_value_weight , WDR4_VALUE_WEIGHT_3 , 16);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_value_weight), isp_wdr4_value_weight);
+
+	slice_block_width = width / WDR4_WW;
+	slice_block_height = height / WDR4_HH;
+	isp_wdr4_block_size = 0;
+	REG_SET_SLICE(isp_wdr4_block_size, WDR4_BLOCK_WIDTH, slice_block_width);
+	REG_SET_SLICE(isp_wdr4_block_size, WDR4_BLOCK_HEIGHT, slice_block_height);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_size), isp_wdr4_block_size);
+
+	slice_block_area_inverse =
+	    WDR4_NORMALIZE * WDR4_NORMALIZE / (slice_block_width *
+					       slice_block_height);
+	isp_wdr4_block_area_factor = isp_read_reg(dev, REG_ADDR(isp_wdr4_block_area_factor));
+    REG_SET_SLICE(isp_wdr4_block_area_factor, WDR4_BLOCK_AREA_INVERSE, slice_block_area_inverse);
+ 	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_area_factor), isp_wdr4_block_area_factor);
+
+	slice_sigma_height =
+	    WDR4_NORMALIZE * WDR4_NORMALIZE / slice_block_height;
+	slice_sigma_width = WDR4_NORMALIZE * WDR4_NORMALIZE / slice_block_width;
+	slice_sigma_value = WDR4_NORMALIZE  * WDR4_NORMALIZE/ WDR4_MAX_VALUE;
+
+	isp_wdr4_sigma_width =
+	    isp_read_reg(dev, REG_ADDR(isp_wdr4_sigma_width));
+	REG_SET_SLICE(isp_wdr4_sigma_width, WDR4_BILITERAL_WIDTH_SIGMA,
+		      slice_sigma_width);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_sigma_width),
+		      isp_wdr4_sigma_width);
+
+	isp_wdr4_sigma_height = isp_read_reg(dev, REG_ADDR(isp_wdr4_sigma_height));
+	REG_SET_SLICE(isp_wdr4_sigma_height, WDR4_BILITERAL_HEIGHT_SIGMA,
+		      slice_sigma_height);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_sigma_height),
+		      isp_wdr4_sigma_height);
+
+	isp_wdr4_sigma_value = isp_read_reg(dev, REG_ADDR(isp_wdr4_sigma_value));
+	REG_SET_SLICE(isp_wdr4_sigma_value, WDR4_BILITERAL_VALUE_SIGMA,
+		      slice_sigma_value);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_sigma_value),
+		      isp_wdr4_sigma_value);
+
+	/* block flag configuration */
+	width_left = width - slice_block_width * WDR4_WW;
+	height_left = height - slice_block_height * WDR4_HH;
+
+
+    // isp_wdr4_gain_shift_bit = 8;
+    // isp_wdr4_normalize_shift = 10;
+	slice_pixel_shift =  MODULE_INPUT_BIT_DEPTH - 15;
+	slice_output_shift = MODULE_INPUT_BIT_DEPTH - MODULE_OUTPUT_BIT_DEPTH;
+
+
+	isp_wdr4_shift = isp_read_reg(dev, REG_ADDR(isp_wdr4_shift));
+	REG_SET_SLICE(isp_wdr4_shift, WDR4_PIXEL_SHIFT_BIT, slice_pixel_shift);
+	REG_SET_SLICE(isp_wdr4_shift, WDR4_OUTPUT_SHIFT_BIT,
+		      slice_output_shift);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_shift), isp_wdr4_shift);
+
+
+	/* block flag configuration */
+	width_left = width - slice_block_width * WDR4_WW;
+	height_left = height - slice_block_height * WDR4_HH;
+
+	isp_wdr4_block_flag_width = 0;
+	isp_wdr4_block_flag_height = 0;
+
+	for (i = 0, width_count = 0;
+	     (i < WDR4_WW) && (width_count < width_left); i++, width_count++) {
+		isp_wdr4_block_flag_width |= (1 << i);
+	}
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_flag_width), isp_wdr4_block_flag_width);
+
+	for (i = 0, height_count = 0;
+	     (i < WDR4_HH) && (height_count < height_left);
+	     i++, height_count++) {
+		isp_wdr4_block_flag_height |= (1 << i);
+	}
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_flag_height), isp_wdr4_block_flag_height);
+
+	isp_wdr4_block_size = isp_read_reg(dev, REG_ADDR(isp_wdr4_block_size));
+	REG_SET_SLICE(isp_wdr4_block_size, WDR4_BLOCK_WIDTH, slice_block_width);
+	REG_SET_SLICE(isp_wdr4_block_size, WDR4_BLOCK_HEIGHT,
+		      slice_block_height);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_size), isp_wdr4_block_size);
+
+	wdr4_config_curve(dev);
+#if 1
+	{
+	uint32_t isp_wdr4_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr4_ctrl));
+	REG_SET_SLICE(isp_wdr4_ctrl, WDR4_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_ctrl), isp_wdr4_ctrl);
+	}
+#endif
+}
+
+int isp_enable_wdr4(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V4
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	int32_t isp_wdr4_ctrl;
+	struct isp_wdr4_context *wdr4 = &dev->wdr4;
+	isp_read_reg(dev, REG_ADDR(isp_pre_filt_ctrl));
+	isp_read_reg(dev, REG_ADDR(isp_dmsc_cac_y_norm_shd));
+
+	isp_wdr4_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr4_ctrl));
+	wdr4->enable = true;
+	REG_SET_SLICE(isp_wdr4_ctrl, WDR4_ENABLE, 1);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_ctrl), isp_wdr4_ctrl);
+
+	return 0;
+#endif
+}
+
+int isp_disable_wdr4(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V4
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_wdr4_context *wdr4 = &dev->wdr4;
+	int32_t isp_wdr4_ctrl = isp_read_reg(dev, REG_ADDR(isp_wdr4_ctrl));
+	wdr4->enable = false;
+	REG_SET_SLICE(isp_wdr4_ctrl, WDR4_ENABLE, 0);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_ctrl), isp_wdr4_ctrl);
+
+	return 0;
+#endif
+}
+
+int isp_u_wdr4(struct isp_ic_dev *dev)
+{
+#ifndef ISP_WDR_V4
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	wdr4_hw_init(dev);
+	return 0;
+#endif
+}
+
+int isp_s_wdr4(struct isp_ic_dev *dev)
+{
+
+#ifndef ISP_WDR_V4
+	pr_err("unsupported function: %s", __func__);
+	return -EINVAL;
+#else
+	struct isp_wdr4_context *wdr4 = &dev->wdr4;
+	u32 isp_wdr4_strength_0 = isp_read_reg(dev, REG_ADDR(isp_wdr4_strength_0));
+	u32 isp_wdr4_strength_1 = isp_read_reg(dev, REG_ADDR(isp_wdr4_strength_1));
+	u32 isp_wdr4_contrast = isp_read_reg(dev, REG_ADDR(isp_wdr4_contrast));
+	u32 width = isp_read_reg(dev, REG_ADDR(isp_acq_h_size));
+	u32 height = isp_read_reg(dev, REG_ADDR(isp_acq_v_size));
+	width /= 32;
+	height /= 32;
+
+	REG_SET_SLICE(isp_wdr4_strength_0, WDR4_LOW_STRENGTH, wdr4->low_gain);
+	REG_SET_SLICE(isp_wdr4_strength_0, WDR4_GLOBAL_STRENGTH,
+		      wdr4->global_strength);
+	REG_SET_SLICE(isp_wdr4_strength_0, WDR4_LOCAL_STRENGTH, 128);
+	REG_SET_SLICE(isp_wdr4_strength_0, WDR4_TOTAL_STRENGTH, wdr4->strength);
+	REG_SET_SLICE(isp_wdr4_strength_1, WDR4_HIGH_STRENGTH, wdr4->high_strength);
+
+    REG_SET_SLICE(isp_wdr4_contrast , WDR4_CONTRAST, wdr4->contrast); //valid values:[-1023~1023]:control contrast of image,.higher:image have stronger contrast
+	REG_SET_SLICE(isp_wdr4_contrast , WDR4_FLAT_STRENGTH, wdr4->flat_strength);//valid values:[0, 19]:adjust flat area. Higher:flat area stretched more strong
+    REG_SET_SLICE(isp_wdr4_contrast , WDR4_FLAT_THR, wdr4->flat_threshold); //valid values:[0, 20]:judge flat region.
+    isp_write_reg(dev, REG_ADDR(isp_wdr4_contrast), isp_wdr4_contrast);
+
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_block_size),
+		      width | (height << 9));
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_0), isp_wdr4_strength_0);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_1), isp_wdr4_strength_1);
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_0_shd), isp_wdr4_strength_0);	/* cmodel use */
+	isp_write_reg(dev, REG_ADDR(isp_wdr4_strength_1_shd), isp_wdr4_strength_1);	/* cmodel use */
+
+	return 0;
+#endif
+}
+#endif
+

+ 10446 - 0
vvcam/isp/mrv_all_bits.h

@@ -0,0 +1,10446 @@
+/******************************************************************************
+ *
+ * Copyright 2010, Dream Chip Technologies GmbH. All rights reserved.
+ *
+ ****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#ifndef __MRV_ALL_BITS_H__
+#define __MRV_ALL_BITS_H__
+
+/*****************************************************************************/
+/* this includes the registermap generated by SIG-flow                       */
+/*****************************************************************************/
+#ifndef __KERNEL__
+#include <stdint.h>
+#else
+#include <linux/types.h>
+#endif
+#include "mrv_all_regs.h"
+
+/*****************************************************************************/
+/* this includes the hw version information                                  */
+/*****************************************************************************/
+#include "isp_version.h"
+
+/*****************************************************************************/
+/* Marvin Main Control Registers                                             */
+/*****************************************************************************/
+#define ALIGN_16BYTE(width)         (((width) + (0xF - 1)) & (~(0xF - 1)))
+#define ALIGN_32BYTE(width)         (((width) + 31) & (~31))
+
+/*****************************************************************************/
+/**
+ * register: vi_ccl: Data path control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: vi_ccl_dis:*/
+/* Clock Control Logic disable */
+/* 0: processing/cfg-clocks for all marvin sub modules enabled */
+/* 1: processing/cfg-clocks for all marvin sub modules disabled w/o access to ID and VI_CCL register */
+#ifdef MRV_VI_CCL_DIS
+#define MRV_VI_CCL_ENABLE_CLOCKS    0
+#define MRV_VI_CCL_DISABLE_CLOCKS   1
+#endif /* MRV_VI_CCL_DIS */
+
+/*****************************************************************************/
+/**
+ * register: vi_id: Revision identification register (0x0008)
+ *
+ *****************************************************************************/
+/* Slice: rev_id:*/
+/* MARVIN5 revision IDs */
+#ifdef MRV_REV_ID
+#endif /* MRV_REV_ID */
+
+/*****************************************************************************/
+/**
+ * register: vi_iccl: Internal clock  control register (0x0010)
+ *
+ *****************************************************************************/
+ /* Slice: vi_mipi_clk_enable: */
+ /* MIPI interface clock enable */
+ /* 1: processing mode */
+ /* 0: power safe */
+#ifdef MRV_VI_MIPI_CLK_ENABLE
+#endif /* MRV_VI_MIPI_CLK_ENABLE */
+
+/* Slice: vi_smia_clk_enable:*/
+/* SMIA interface clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_SMIA_CLK_ENABLE
+#endif /* MRV_VI_SMIA_CLK_ENABLE */
+
+/* Slice: vi_simp_clk_enable:*/
+/* Superimpose clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_SIMP_CLK_ENABLE
+#endif /* MRV_VI_SIMP_CLK_ENABLE */
+
+/* Slice: vi_ie_clk_enable:*/
+/* Image effect clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_IE_CLK_ENABLE
+#endif /* MRV_VI_IE_CLK_ENABLE */
+
+/* Slice: vi_mi_clk_enable:*/
+/* memory interface clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_MI_CLK_ENABLE
+#endif /* MRV_VI_MI_CLK_ENABLE */
+
+/* Slice: vi_jpeg_clk_enable:*/
+/* JPEG encoder clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_JPEG_CLK_ENABLE
+#endif /* MRV_VI_JPEG_CLK_ENABLE */
+
+/* Slice: vi_srsz_clk_enable:*/
+/* main resize clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_SRSZ_CLK_ENABLE
+#endif /* MRV_VI_SRSZ_CLK_ENABLE */
+
+/* Slice: vi_mrsz_clk_enable:*/
+/* main resize clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_MRSZ_CLK_ENABLE
+#endif /* MRV_VI_MRSZ_CLK_ENABLE */
+
+/* Slice: vi_cp_clk_enable:*/
+/* color processing clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_CP_CLK_ENABLE
+#endif /* MRV_VI_CP_CLK_ENABLE */
+
+/* Slice: vi_isp_clk_enable:*/
+/* isp processing clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#ifdef MRV_VI_ISP_CLK_ENABLE
+#endif /* MRV_VI_ISP_CLK_ENABLE */
+
+/*****************************************************************************/
+/**
+ * register: vi_ircl: Internal reset control register (0x0014)
+ *
+ *****************************************************************************/
+/* Slice: vi_mipi_soft_rst:*/
+/* MIPI Interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_MIPI_SOFT_RST
+#endif /* MRV_VI_MIPI_SOFT_RST */
+
+/* Slice: vi_smia_soft_rst:*/
+/* SMIA Interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_SMIA_SOFT_RST
+#endif /* MRV_VI_SMIA_SOFT_RST */
+
+/* Slice: vi_simp_soft_rst:*/
+/* Superimpose software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_SIMP_SOFT_RST
+#endif /* MRV_VI_SIMP_SOFT_RST */
+
+/* Slice: vi_ie_soft_rst:*/
+/* Image effect software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_IE_SOFT_RST
+#endif /* MRV_VI_IE_SOFT_RST */
+
+/* Slice: vi_marvin_rst:*/
+/* Soft reset of entire marvin */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_MARVIN_RST
+#endif /* MRV_VI_MARVIN_RST */
+
+/* Slice: vi_mi_soft_rst:*/
+/* memory interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_MI_SOFT_RST
+#endif /* MRV_VI_MI_SOFT_RST */
+
+/* Slice: vi_jpeg_soft_rst:*/
+/* JPEG encoder software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_JPEG_SOFT_RST
+#endif /* MRV_VI_JPEG_SOFT_RST */
+
+/* Slice: vi_srsz_soft_rst:*/
+/* Self-picture resize software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_SRSZ_SOFT_RST
+#endif /* MRV_VI_SRSZ_SOFT_RST */
+
+/* Slice: vi_mrsz_soft_rst:*/
+/* Main-picture resize software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_MRSZ_SOFT_RST
+#endif /* MRV_VI_MRSZ_SOFT_RST */
+
+/* Slice: vi_ycs_soft_rst:*/
+/* y/c splitter software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_YCS_SOFT_RST
+#endif /* MRV_VI_YCS_SOFT_RST */
+
+/* Slice: vi_cp_soft_rst:*/
+/* color processing software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_CP_SOFT_RST
+#endif /* MRV_VI_CP_SOFT_RST */
+
+/* Slice: vi_isp_soft_rst:*/
+/* isp software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#ifdef MRV_VI_ISP_SOFT_RST
+#endif /* MRV_VI_ISP_SOFT_RST */
+
+/*****************************************************************************/
+/**
+ * register: vi_dpcl: Data path control register (0x0018)
+ *
+ *****************************************************************************/
+/* Slice: vi_dma_spmux:*/
+/* 0: data from camera interface to self resize */
+/* 1: data from DMA read port to self resize */
+#ifdef MRV_VI_DMA_SPMUX
+#define MRV_VI_DMA_SPMUX_CAM                    0	/* 0: data from camera interface to self resize */
+#define MRV_VI_DMA_SPMUX_DMA                    1	/* 1: data from DMA read port to self resize */
+#endif /* MRV_VI_DMA_SPMUX */
+
+/* Slice: vi_dma_iemux:*/
+/* 0: data from camera interface to image effects */
+/* 1: data from DMA read port to image effects */
+#ifdef MRV_VI_DMA_IEMUX
+#define MRV_VI_DMA_IEMUX_CAM                    0	/* 0: data from camera interface to image effects */
+#define MRV_VI_DMA_IEMUX_DMA                    1	/* 1: data from DMA read port to image effects */
+#endif /* MRV_VI_DMA_IEMUX */
+
+/* Slice: if_select:*/
+/* selects input interface */
+/* 0: parallel interface */
+/* 1: SMIA-interface */
+/* 2: MIPI-interface */
+#ifdef MRV_IF_SELECT
+#define MRV_IF_SELECT_PAR                       0	/* 0: parallel interface */
+#define MRV_IF_SELECT_SMIA                      1	/* 1: SMIA-interface */
+#define MRV_IF_SELECT_MIPI                      2	/* 2: MIPI-interface */
+#define MRV_IF_SELECT_HDR                       3	/* 2: HDR-interface */
+#endif /* MRV_IF_SELECT */
+
+/* Slice: vi_dma_switch:*/
+/* DMA read data path selector */
+/* 0: path to SPMUX */
+/* 1: path to Superimpose */
+/* 2: path to Image Effects */
+/* 3: reserved (for path to JPEG)*/
+/* 4..7: reserved */
+#ifdef MRV_VI_DMA_SWITCH
+#define MRV_VI_DMA_SWITCH_SELF                  0	/* 0: path to SPMUX */
+#define MRV_VI_DMA_SWITCH_SIMP                  1	/* 1: path to Superimpose */
+#define MRV_VI_DMA_SWITCH_IE                    2	/* 2: path to Image Effects */
+#define MRV_VI_DMA_SWITCH_JPG                   3	/* 3: path to JPEG */
+#define MRV_VI_DMA_SWITCH_ISP                   4	/* 4: path to ISP */
+#endif /* MRV_VI_DMA_SWITCH */
+
+/* Slice: vi_chan_mode:*/
+/* Y/C splitter channel mode */
+/* 0: disabled */
+/* 1: main path and raw data mode */
+/* 2: self path mode */
+/* 3: main and self path mode */
+#ifdef MRV_VI_CHAN_MODE
+#define MRV_VI_CHAN_MODE_OFF                    0x00	/* 0: disabled */
+#define MRV_VI_CHAN_MODE_Y                      0xFF	/* not supported */
+#define MRV_VI_CHAN_MODE_MP_RAW                 0x01	/* 1: main path and raw data mode */
+#define MRV_VI_CHAN_MODE_MP                     0x01	/* 1: main path and raw data mode */
+#define MRV_VI_CHAN_MODE_SP                     0x02	/* 2: self path mode */
+#define MRV_VI_CHAN_MODE_MP_SP                  0x03	/* 3: main and self path mode */
+#define MRV_VI_CHAN_MODE_SP2                    0x04	/* 4: self2 path mode */
+#define MRV_VI_CHAN_MODE_MP_SP2                 0x05	/* 5: main and self2 path mode */
+#define MRV_VI_CHAN_MODE_SP_SP2                 0x06	/* 6: self and self2 path mode */
+#define MRV_VI_CHAN_MODE_MP_SP_SP2              0x07	/* 7: main self and self2 path mode */
+
+#endif /* MRV_VI_CHAN_MODE */
+
+/* Slice: vi_mp_mux:*/
+/* data path selector for main path */
+/* 00: reserved (future: data from DMA read port to JPEG encoder)*/
+/* 01: data from main resize to MI, uncompressed */
+/* 10: data from main resize to JPEG encoder */
+/* 11: reserved */
+#ifdef MRV_VI_MP_MUX
+#define MRV_VI_MP_MUX_JPGDIRECT                 0x00	/* 00: reserved (future: data from DMA read port to JPEG encoder) */
+#define MRV_VI_MP_MUX_MP                        0x01	/* 01: data from main resize to MI, uncompressed */
+#define MRV_VI_MP_MUX_RAW                       0x01	/*     (now also used for RAW data bypass) */
+#define MRV_VI_MP_MUX_JPEG                      0x02	/* 10: data from main resize to JPEG encoder */
+#endif /* MRV_VI_MP_MUX */
+
+/*****************************************************************************/
+/* Image Effects Registers                                                   */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/**
+ * register: img_eff_ctrl: Global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: full_range:*/
+/* write 0: pixel value range according to BT.601 */
+/* write 1: YCbCr full range 0...255 */
+#ifdef MRV_IMGEFF_FULL_RANGE
+#define MRV_IMGEFF_FULL_RANGE_FULL      1	/* 1: YCbCr full range 0...255 */
+#define MRV_IMGEFF_FULL_RANGE_BT601     0	/* 0: pixel value range according to BT.601 */
+#endif /* MRV_IMGEFF_FULL_RANGE */
+
+/* Slice: cfg_upd:*/
+/* write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#ifdef MRV_IMGEFF_CFG_UPD
+#define MRV_IMGEFF_CFG_UPD_NOTHING      0	/* 0: nothing happens */
+#define MRV_IMGEFF_CFG_UPD_UPDATE       1	/* 1: update shadow registers */
+#endif /* MRV_IMGEFF_CFG_UPD */
+
+/* Slice: effect_mode:*/
+/* effect mode */
+/* 000: black & white effect (grayscale)*/
+/* 001: negative effect */
+/* 010: sepia effect */
+/* 011: color selection effect */
+/* 100: emboss effect */
+/* 101: sketch effect */
+/* 110: sharpen effect */
+/* 111: reserved */
+#ifdef MRV_IMGEFF_EFFECT_MODE
+#define MRV_IMGEFF_EFFECT_MODE_GRAY      0	/* 000: black & white effect (grayscale) */
+#define MRV_IMGEFF_EFFECT_MODE_NEGATIVE  1	/* 001: negative effect */
+#define MRV_IMGEFF_EFFECT_MODE_SEPIA     2	/* 010: sepia effect */
+#define MRV_IMGEFF_EFFECT_MODE_COLOR_SEL 3	/* 011: color selection effect */
+#define MRV_IMGEFF_EFFECT_MODE_EMBOSS    4	/* 100: emboss effect */
+#define MRV_IMGEFF_EFFECT_MODE_SKETCH    5	/* 101: sketch effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHARPEN   6	/* 110: sharpen effect */
+#endif /* MRV_IMGEFF_EFFECT_MODE */
+
+/* Slice: bypass_mode:*/
+/* bypass mode */
+/* 1: processing is activated */
+/* 0: processing is deactivated, bypass mode is selected */
+#ifdef MRV_IMGEFF_BYPASS_MODE
+#define MRV_IMGEFF_BYPASS_MODE_PROCESS  1	/* 1: processing is activated */
+#define MRV_IMGEFF_BYPASS_MODE_BYPASS   0	/* 0: processing is deactivated, bypass mode is selected */
+#endif /* MRV_IMGEFF_BYPASS_MODE */
+
+/*****************************************************************************/
+/**
+ * register: img_eff_color_sel: Color selection register (for
+ *           color selection effect) (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: color_threshold:*/
+/* Threshold value of the RGB colors for the color selection effect.*/
+#ifdef MRV_IMGEFF_COLOR_THRESHOLD
+#endif /* MRV_IMGEFF_COLOR_THRESHOLD */
+
+/* Slice: color_selection:*/
+/* Defining the maintained color:*/
+/* 000: red green and blue */
+/* 001: blue */
+/* 010: green */
+/* 011: green and blue */
+/* 100: red */
+/* 101: red and blue */
+/* 110: red and green */
+/* 111: red green and blue */
+#ifdef MRV_IMGEFF_COLOR_SELECTION
+#define MRV_IMGEFF_COLOR_SELECTION_RGB  0	/* 000: red green and blue */
+#define MRV_IMGEFF_COLOR_SELECTION_B    1	/* 001: blue */
+#define MRV_IMGEFF_COLOR_SELECTION_G    2	/* 010: green */
+#define MRV_IMGEFF_COLOR_SELECTION_BG   3	/* 011: green and blue */
+#define MRV_IMGEFF_COLOR_SELECTION_R    4	/* 100: red */
+#define MRV_IMGEFF_COLOR_SELECTION_RB   5	/* 101: red and blue */
+#define MRV_IMGEFF_COLOR_SELECTION_RG   6	/* 110: red and green */
+#define MRV_IMGEFF_COLOR_SELECTION_BGR  7	/* 111: red green and blue */
+#endif /* MRV_IMGEFF_COLOR_SELECTION */
+
+/* Slice: emb_coef_21_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_21_EN
+#endif /* MRV_IMGEFF_EMB_COEF_21_EN */
+
+/* Slice: emb_coef_21:*/
+/* second line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_21
+#define MRV_IMGEFF_EMB_COEF_21_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_21_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_21_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_21_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_21_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_21_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_21_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_21_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_21 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_21_4
+#define MRV_IMGEFF_EMB_COEF_21_4_MASK       0x0000F000
+#define MRV_IMGEFF_EMB_COEF_21_4_SHIFT      12
+
+/* Slice: emb_coef_13_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_13_EN
+#endif /* MRV_IMGEFF_EMB_COEF_13_EN */
+
+/* Slice: emb_coef_13:*/
+/* first line, right entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_13
+#define MRV_IMGEFF_EMB_COEF_13_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_13_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_13_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_13_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_13_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_13_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_13_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_13_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_13 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_13_4
+#define MRV_IMGEFF_EMB_COEF_13_4_MASK       0x00000F00
+#define MRV_IMGEFF_EMB_COEF_13_4_SHIFT      8
+
+/* Slice: emb_coef_12_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_12_EN
+#endif /* MRV_IMGEFF_EMB_COEF_12_EN */
+
+/* Slice: emb_coef_12:*/
+/* first line, middle entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_12
+#define MRV_IMGEFF_EMB_COEF_12_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_12_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_12_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_12_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_12_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_12_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_12_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_12_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_12 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_12_4
+#define MRV_IMGEFF_EMB_COEF_12_4_MASK       0x000000F0
+#define MRV_IMGEFF_EMB_COEF_12_4_SHIFT      4
+
+/* Slice: emb_coef_11_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_11_EN
+#define MRV_IMGEFF_EMB_COEF_11_EN_ON        1
+#define MRV_IMGEFF_EMB_COEF_11_EN_OFF       0
+#endif /* MRV_IMGEFF_EMB_COEF_11_EN */
+
+/* Slice: emb_coef_11:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_11
+#define MRV_IMGEFF_EMB_COEF_11_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_11_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_11_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_11_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_11_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_11_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_11_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_11_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_11 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_11_4
+#define MRV_IMGEFF_EMB_COEF_11_4_MASK       0x0000000F
+#define MRV_IMGEFF_EMB_COEF_11_4_SHIFT      0
+
+/* Slice: emb_coef_32_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_32_EN
+#endif /* MRV_IMGEFF_EMB_COEF_32_EN */
+
+/* Slice: emb_coef_32:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_32
+#define MRV_IMGEFF_EMB_COEF_32_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_32_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_32_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_32_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_32_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_32_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_32_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_32_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_32 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_32_4
+#define MRV_IMGEFF_EMB_COEF_32_4_MASK       0x0000F000
+#define MRV_IMGEFF_EMB_COEF_32_4_SHIFT      12
+
+/* Slice: emb_coef_31_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_31_EN
+#endif /* MRV_IMGEFF_EMB_COEF_31_EN */
+
+/* Slice: emb_coef_31:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_31
+#define MRV_IMGEFF_EMB_COEF_31_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_31_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_31_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_31_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_31_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_31_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_31_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_31_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_31 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_31_4
+#define MRV_IMGEFF_EMB_COEF_31_4_MASK       0x00000F00
+#define MRV_IMGEFF_EMB_COEF_31_4_SHIFT      8
+
+/* Slice: emb_coef_23_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_23_EN
+#endif /* MRV_IMGEFF_EMB_COEF_23_EN */
+
+/* Slice: emb_coef_23:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_23
+#define MRV_IMGEFF_EMB_COEF_23_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_23_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_23_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_23_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_23_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_23_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_23_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_23_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_23 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_23_4
+#define MRV_IMGEFF_EMB_COEF_23_4_MASK       0x000000F0
+#define MRV_IMGEFF_EMB_COEF_23_4_SHIFT      4
+
+/* Slice: emb_coef_22_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_22_EN
+#endif /* MRV_IMGEFF_EMB_COEF_22_EN */
+
+/* Slice: emb_coef_22:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_22
+#define MRV_IMGEFF_EMB_COEF_22_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_22_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_22_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_22_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_22_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_22_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_22_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_22_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_22 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_22_4
+#define MRV_IMGEFF_EMB_COEF_22_4_MASK       0x0000000F
+#define MRV_IMGEFF_EMB_COEF_22_4_SHIFT      0
+
+/*****************************************************************************/
+/**
+ * register: img_eff_mat_3: 3x3 matrix coefficients for emboss(3) effect /
+ *           sketch(1) effect (0x0010)
+ *
+ *****************************************************************************/
+/* Slice: sket_coef_13_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_13_EN
+#endif /* MRV_IMGEFF_SKET_COEF_13_EN */
+
+/* Slice: sket_coef_13:*/
+/* first line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_13
+#define MRV_IMGEFF_SKET_COEF_13_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_13_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_13_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_13_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_13_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_13_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_13_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_13_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_13 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_13_4
+#define MRV_IMGEFF_SKET_COEF_13_4_MASK      0x0000F000
+#define MRV_IMGEFF_SKET_COEF_13_4_SHIFT     12
+
+/* Slice: sket_coef_12_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_12_EN
+#endif /* MRV_IMGEFF_SKET_COEF_13_EN */
+
+/* Slice: sket_coef_12:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_12
+#define MRV_IMGEFF_SKET_COEF_12_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_12_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_12_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_12_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_12_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_12_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_12_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_12_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_12 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_12_4
+#define MRV_IMGEFF_SKET_COEF_12_4_MASK      0x00000F00
+#define MRV_IMGEFF_SKET_COEF_12_4_SHIFT     8
+
+/* Slice: sket_coef_11_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_11_EN
+#endif /* MRV_IMGEFF_SKET_COEF_13_EN */
+
+/* Slice: sket_coef_11:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_11
+#define MRV_IMGEFF_SKET_COEF_11_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_11_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_11_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_11_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_11_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_11_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_11_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_11_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_11 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_11_4
+#define MRV_IMGEFF_SKET_COEF_11_4_MASK      0x000000F0
+#define MRV_IMGEFF_SKET_COEF_11_4_SHIFT     4
+
+/* Slice: emb_coef_33_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_EMB_COEF_33_EN
+#endif /* MRV_IMGEFF_EMB_COEF_33_EN */
+
+/* Slice: emb_coef_33:*/
+/* first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_EMB_COEF_3
+#define MRV_IMGEFF_EMB_COEF_33_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_EMB_COEF_33_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_EMB_COEF_33_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_EMB_COEF_33_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_EMB_COEF_33_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_EMB_COEF_33_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_EMB_COEF_33_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_EMB_COEF_33_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_EMB_COEF_33 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_EMB_COEF_33_4
+#define MRV_IMGEFF_EMB_COEF_33_4_MASK       0x0000000F
+#define MRV_IMGEFF_EMB_COEF_33_4_SHIFT      0
+
+/*****************************************************************************/
+/**
+ * register: img_eff_mat_4: 3x3 matrix coefficients for sketch effect (2)
+ *           (0x0014)
+ *
+ *****************************************************************************/
+/* Slice: sket_coef_31_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_31_EN
+#endif /* MRV_IMGEFF_SKET_COEF_31_EN */
+
+/* Slice: sket_coef_31:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_31
+#define MRV_IMGEFF_SKET_COEF_31_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_31_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_31_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_31_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_31_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_31_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_31_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_31_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_31 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_31_4
+#define MRV_IMGEFF_SKET_COEF_31_4_MASK      0x0000F000
+#define MRV_IMGEFF_SKET_COEF_31_4_SHIFT     12
+
+/* Slice: sket_coef_23_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_23_EN
+#endif /* MRV_IMGEFF_SKET_COEF_23_EN */
+
+/* Slice: sket_coef_23:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_23
+#define MRV_IMGEFF_SKET_COEF_23_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_23_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_23_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_23_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_23_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_23_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_23_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_23_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_23 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_23_4
+#define MRV_IMGEFF_SKET_COEF_23_4_MASK      0x00000F00
+#define MRV_IMGEFF_SKET_COEF_23_4_SHIFT     8
+
+/* Slice: sket_coef_22_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_22_EN
+#endif /* MRV_IMGEFF_SKET_COEF_22_EN */
+
+/* Slice: sket_coef_22:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_22
+#define MRV_IMGEFF_SKET_COEF_22_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_22_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_22_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_22_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_22_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_22_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_22_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_22_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_22 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_22_4
+#define MRV_IMGEFF_SKET_COEF_22_4_MASK      0x000000F0
+#define MRV_IMGEFF_SKET_COEF_22_4_SHIFT     4
+
+/* Slice: sket_coef_21_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_21_EN
+#endif /* MRV_IMGEFF_SKET_COEF_21_EN */
+
+/* Slice: sket_coef_21:*/
+/* first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_21
+#define MRV_IMGEFF_SKET_COEF_21_ONE         0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_21_TWO         1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_21_FOUR        2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_21_EIGHT       3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_21_MIN_ONE     4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_21_MIN_TWO     5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_21_MIN_FOUR    6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_21_MIN_EIGHT   8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_21 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_21_4
+#define MRV_IMGEFF_SKET_COEF_21_4_MASK      0x0000000F
+#define MRV_IMGEFF_SKET_COEF_21_4_SHIFT     0
+
+/*****************************************************************************/
+/**
+ * register: img_eff_mat_5: 3x3 matrix coefficients for sketch effect (3)
+ *           (0x0018)
+ *
+ *****************************************************************************/
+/* Slice: sket_coef_33_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_33_EN
+#endif /* MRV_IMGEFF_SKET_COEF_33_EN */
+
+/* Slice: sket_coef_33:*/
+/* third line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_33
+#define MRV_IMGEFF_SKET_COEF_33_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_33_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_33_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_33_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_33_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_33_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_33_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_33_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_33 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_33_4
+#define MRV_IMGEFF_SKET_COEF_33_4_MASK 0x000000F0
+#define MRV_IMGEFF_SKET_COEF_33_4_SHIFT 4
+
+/* Slice: sket_coef_32_en:*/
+/* 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#ifdef MRV_IMGEFF_SKET_COEF_32_EN
+#endif /* MRV_IMGEFF_SKET_COEF_32_EN */
+
+/* Slice: sket_coef_32:*/
+/* third line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+/* coefficients:*/
+/* 000 (1), 001(2), 010(4), 011(8)*/
+/* 100 (-1), 101(-2), 110(-4), 111(-8)*/
+#ifdef MRV_IMGEFF_SKET_COEF_32
+#define MRV_IMGEFF_SKET_COEF_32_ONE          0	/* 000 (1) */
+#define MRV_IMGEFF_SKET_COEF_32_TWO          1	/* 001 (2) */
+#define MRV_IMGEFF_SKET_COEF_32_FOUR         2	/* 010 (4) */
+#define MRV_IMGEFF_SKET_COEF_32_EIGHT        3	/* 011 (8) */
+#define MRV_IMGEFF_SKET_COEF_32_MIN_ONE      4	/* 100 (-1) */
+#define MRV_IMGEFF_SKET_COEF_32_MIN_TWO      5	/* 101 (-2) */
+#define MRV_IMGEFF_SKET_COEF_32_MIN_FOUR     6	/* 110 (-4) */
+#define MRV_IMGEFF_SKET_COEF_32_MIN_EIGHT    8	/* 111 (-8) */
+#endif /* MRV_IMGEFF_SKET_COEF_32 */
+
+/* combination of value and enable bit */
+#define MRV_IMGEFF_SKET_COEF_32_4
+#define MRV_IMGEFF_SKET_COEF_32_4_MASK 0x0000000F
+#define MRV_IMGEFF_SKET_COEF_32_4_SHIFT 0
+
+/* valid for all coeffiecient definitions */
+#define MRV_IMGEFF_COEF
+#define MRV_IMGEFF_COEF_ONE                  0U
+#define MRV_IMGEFF_COEF_TWO                  1U	/* 001: (2) */
+#define MRV_IMGEFF_COEF_FOUR                 2U	/* 010: (4) */
+#define MRV_IMGEFF_COEF_EIGHT                3U	/* 011: (8) */
+#define MRV_IMGEFF_COEF_MIN_ONE              4U	/* 100: (-1) */
+#define MRV_IMGEFF_COEF_MIN_TWO              5U	/* 101: (-2) */
+#define MRV_IMGEFF_COEF_MIN_FOUR             6U	/* 110: (-4) */
+#define MRV_IMGEFF_COEF_MIN_EIGHT            7U	/* 111: (-8) */
+
+#define MRV_IMGEFF_COEF_ON                   1U	/* 1: coefficient enabled */
+#define MRV_IMGEFF_COEF_OFF                  0U	/* 0: coefficient disabled */
+#define MRV_IMGEFF_COEF_SHIFT                3U	/* shift for enable bit */
+
+/*****************************************************************************/
+/**
+ * register: img_eff_tint: Chrominance increment values of a tint
+ *           (used for sepia effect) (0x001c)
+ *
+ *****************************************************************************/
+/* Slice: incr_cr:*/
+/* Cr increment value of a tint. 7 bits for value, 1 sign bit.*/
+/* Default tint is R=162 G=138 B=101, which is used for the sepia effect. See below for the calculation of the entries.*/
+#ifdef MRV_IMGEFF_INCR_CR
+#endif /* MRV_IMGEFF_INCR_CR */
+
+/* Slice: incr_cb:*/
+/* Cb increment value of a tint. 7 bits for value, 1 sign bit.*/
+/* Default tint is R=162 G=138 B=101, which is used for the sepia effect. See below for the calculation of the entries.*/
+#ifdef MRV_IMGEFF_INCR_CB
+#endif /* MRV_IMGEFF_INCR_CB */
+
+/*****************************************************************************/
+/**
+ * register: img_eff_ctrl_shd: Shadow register for control register (0x0020)
+ *
+ *****************************************************************************/
+/* Slice: effect_mode_shd:*/
+/* effect mode */
+/* 000: black & white effect (grayscale)*/
+/* 001: negative effect */
+/* 010: sepia effect */
+/* 011: color selection effect */
+/* 100: emboss effect */
+/* 101: sketch effect */
+/* 110-111: not used */
+#ifdef MRV_IMGEFF_EFFECT_MODE_SHD
+#define MRV_IMGEFF_EFFECT_MODE_SHD_GRAY         0	/* 000: black & white effect (grayscale) */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_NEGATIVE     1	/* 001: negative effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_SEPIA        2	/* 010: sepia effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_COLOR_SEL    3	/* 011: color selection effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_EMBOSS       4	/* 100: emboss effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_SKETCH       5	/* 101: sketch effect */
+#define MRV_IMGEFF_EFFECT_MODE_SHD_SHARPEN      6	/* 110: sharpen effect */
+#endif /* MRV_IMGEFF_EFFECT_MODE_SHD */
+
+/*****************************************************************************/
+/* Super Impose Registers                                                    */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/**
+ * register: super_imp_ctrl: Global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: transparency_mode:*/
+/* transparency mode */
+/* 1: transparency mode disabled */
+/* 0: transparency mode enabled */
+#ifdef MRV_SI_TRANSPARENCY_MODE
+#define MRV_SI_TRANSPARENCY_MODE_DISABLED       1	/* 1: transparency mode disabled */
+#define MRV_SI_TRANSPARENCY_MODE_ENABLED        0	/* 0: transparency mode enabled */
+#endif /* MRV_SI_TRANSPARENCY_MODE */
+
+/* Slice: ref_image:*/
+/* Define the reference image */
+/* 1: superimpose bitmap from main memory */
+/* 0: image from the Image Effect module */
+/* Note: the reference image defines the size of the output image */
+#ifdef MRV_SI_REF_IMAGE
+#define MRV_SI_REF_IMAGE_MEM                    1	/* 1: superimpose bitmap from main memory */
+#define MRV_SI_REF_IMAGE_IE                     0	/* 0: image from the Image Effect module */
+#endif /* MRV_SI_REF_IMAGE */
+
+/* Slice: bypass_mode:*/
+/* bypass mode */
+/* 1: processing is activated */
+/* 0: processing is deactivated, bypass mode is selected */
+#ifdef MRV_SI_BYPASS_MODE
+#define MRV_SI_BYPASS_MODE_PROCESS              1	/* 1: processing is activated */
+#define MRV_SI_BYPASS_MODE_BYPASS               0	/* 0: processing is deactivated, bypass mode is selected */
+#endif /* MRV_IMGEFF_BYPASS_MODE */
+
+/*****************************************************************************/
+/**
+ * register: super_imp_offset_x: Offset x register (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: offset_x:*/
+/* Offset X */
+/* Note: the bit 0 is don't care (write 1 doesn't have any effect, the read access always gives 0)*/
+/* Note: the offset_x is positive and refers to the reference image */
+#ifdef MRV_SI_OFFSET_X
+#endif /*  MRV_SI_OFFSET_X */
+
+/*****************************************************************************/
+/**
+ * register: super_imp_offset_y: Offset y register (0x0008)
+ *
+ *****************************************************************************/
+/* Slice: offset_y:*/
+/* Offset Y */
+/* Note: the offset_y is positive and refers to the reference image */
+#ifdef MRV_SI_OFFSET_Y
+#endif /*  MRV_SI_OFFSET_Y */
+
+/*****************************************************************************/
+/**
+ * register: super_imp_color_y: Y component of transparent key color (0x000c)
+ *
+ *****************************************************************************/
+/* Slice: y_comp:*/
+/* Y component of transparent key color */
+#ifdef MRV_SI_Y_COMP
+#endif /* MRV_SI_Y_COMP */
+
+/*****************************************************************************/
+/**
+ * register: super_imp_color_cb: Cb component of transparent key color (0x0010)
+ *
+ *****************************************************************************/
+/* Slice: cb_comp:*/
+/* Cb component of transparent key color */
+#ifdef MRV_SI_CB_COMP
+#endif /* MRV_SI_CB_COMP */
+
+/*****************************************************************************/
+/**
+ * register: super_imp_color_cr: Cr component of transparent key color (0x0014)
+ *
+ *****************************************************************************/
+/* Slice: cr_comp:*/
+/* Cr component of transparent key color */
+#ifdef MRV_SI_CR_COMP
+#endif /* MRV_SI_CR_COMP */
+
+/*****************************************************************************/
+/* ISP Registers                                                             */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/**
+ * register: isp_ctrl: global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: ISP_DPF_RAW_OUT */
+/*! Slice MRV_ISP_DPF_RAW_OUT:*/
+/*! 0: DPF RAW OUT is disable */
+/*! 1: DPF RAW OUT is enable */
+#ifdef ISP_DPF_RAW
+#ifdef MRV_ISP_DPF_RAW_OUT
+#define MRV_ISP_DPF_RAW_OUT_DISABLE            0	/* 0: DPF raw out is disable */
+#define MRV_ISP_DPF_RAW_OUT_ENABLE             1	/* 1: DPF raw out is enable */
+#endif
+#endif
+/* Slice: ISP_CSM_C_RANGE:*/
+/* Color Space Matrix chrominance clipping range for ISP output */
+/* 0: CbCr range 64..960 (16..240) according to ITU-R BT.601 standard */
+/* 1: full UV range 0..1023 (0..255)*/
+/* Numbers in brackets are for 8 bit resolution.*/
+#ifdef MRV_ISP_ISP_CSM_C_RANGE
+#define MRV_ISP_ISP_CSM_C_RANGE_BT601           0	/* 0: CbCr range 64..960 (16..240) according to ITU-R BT.601 standard */
+#define MRV_ISP_ISP_CSM_C_RANGE_FULL            1	/* 1: full UV range 0..1023 (0..255) */
+#endif /* MRV_ISP_ISP_CSM_C_RANGE */
+
+/* Slice: ISP_CSM_Y_RANGE:*/
+/* Color Space Matrix luminance clipping range for ISP output */
+/* 0: Y range 64..940 (16..235) according to ITU-R BT.601 standard */
+/* 1: full Y range 0..1023 (0..255)*/
+/* Numbers in brackets are for 8 bit resolution.*/
+#ifdef MRV_ISP_ISP_CSM_Y_RANGE
+#define MRV_ISP_ISP_CSM_Y_RANGE_BT601           0	/* 0: Y range 64..940 (16..235) according to ITU-R BT.601 standard */
+#define MRV_ISP_ISP_CSM_Y_RANGE_FULL            1	/* 1: full Y range 0..1023 (0..255) */
+#endif /* MRV_ISP_ISP_CSM_Y_RANGE */
+
+/* Slice: ISP_FLASH_MODE:*/
+/* 0: sensor interface works independently from flash control unit */
+/* 1: one frame is captured when signaled by flash control unit */
+#ifdef MRV_ISP_ISP_FLASH_MODE
+#define MRV_ISP_ISP_FLASH_MODE_INDEP            0	/* 0: sensor interface works independently from flash control unit */
+#define MRV_ISP_ISP_FLASH_MODE_SYNC             1	/* 1: one frame is captured when signaled by flash control unit */
+#endif /* MRV_ISP_ISP_FLASH_MODE */
+
+/* Slice: ISP_GAMMA_OUT_ENABLE:*/
+/* gamma ON/OFF */
+#ifdef MRV_ISP_ISP_GAMMA_OUT_ENABLE
+#endif /* MRV_ISP_ISP_GAMMA_OUT_ENABLE */
+
+/* Slice: ISP_GEN_CFG_UPD:*/
+/* generate vsynced config shadow signal at the output, write only */
+#ifdef MRV_ISP_ISP_GEN_CFG_UPD
+#endif /* MRV_ISP_ISP_GEN_CFG_UPD */
+
+/* Slice: ISP_CFG_UPD:*/
+/* immediate configure internal shadow registers, write only */
+#ifdef MRV_ISP_ISP_CFG_UPD
+#endif /* MRV_ISP_ISP_CFG_UPD */
+
+/* Slice: ISP_AE_ENABLE:*/
+/* auto exposure ON/OFF */
+#ifdef MRV_ISP_ISP_AE_ENABLE
+#endif /* MRV_ISP_ISP_AE_ENABLE */
+
+/* Slice: ISP_AWB_ENABLE:*/
+/* auto white balance ON/OFF */
+#ifdef MRV_ISP_ISP_AWB_ENABLE
+#endif /* MRV_ISP_ISP_AWB_ENABLE */
+
+/* Slice: ISP_GAMMA_IN_ENABLE:*/
+/* Sensor De-gamma ON/OFF */
+#ifdef MRV_ISP_ISP_GAMMA_IN_ENABLE
+#define MRV_ISP_ISP_GAMMA_IN_ENABLE_ON          1U
+#define MRV_ISP_ISP_GAMMA_IN_ENABLE_OFF         0U
+#endif /* MRV_ISP_ISP_GAMMA_IN_ENABLE */
+
+/* Slice: ISP_INFORM_ENABLE:*/
+/* input block ON/OFF (frame-synced on)*/
+#ifdef MRV_ISP_ISP_INFORM_ENABLE
+#endif /* MRV_ISP_ISP_INFORM_ENABLE */
+
+/* Slice: ISP_MODE:*/
+/* 000: RAW picture with BT.601 sync (ISP bypass)*/
+/* 001: ITU-R BT.656 (YUV with embedded sync)*/
+/* 010: ITU-R BT.601 (YUV input with H and Vsync signals)*/
+/* 011: Bayer RGB processing with H and Vsync signals */
+/* 100: data mode (ISP bypass, sync signals interpreted as data enable)*/
+/* 101: Bayer RGB processing with BT.656 synchronization */
+/* 110: RAW picture with ITU-R BT.656 synchronization (ISP bypass)*/
+/* 111: reserved */
+ /**/
+/* Side effect:*/
+/* If RAW, BT.601, BT.656, or data mode is selected, the clock of the */
+/* ISP SRAMs (ISP line buffer, Lens Shading, Bad Pixel) is switched off.*/
+/* Only in Bayer RGB mode the clock to the SRAMs is enabled. This */
+/* further reduces power consumption.*/
+#ifdef MRV_ISP_ISP_MODE
+#define MRV_ISP_ISP_MODE_RAW                    0	/* 000 - RAW picture with BT.601 sync (ISP bypass) */
+#define MRV_ISP_ISP_MODE_656                    1	/* 001 - ITU-R BT.656 (YUV with embedded sync) */
+#define MRV_ISP_ISP_MODE_601                    2	/* 010 - ITU-R BT.601 (YUV input with H and Vsync signals) */
+#define MRV_ISP_ISP_MODE_RGB                    3	/* 011 - Bayer RGB processing with H and Vsync signals */
+#define MRV_ISP_ISP_MODE_DATA                   4	/* 100 - data mode (ISP bypass, sync signals interpreted as data enable) */
+#define MRV_ISP_ISP_MODE_RGB656                 5	/* 101 - Bayer RGB processing with BT.656 synchronization */
+#define MRV_ISP_ISP_MODE_RAW656                 6	/* 110 - RAW picture with ITU-R BT.656 synchronization (ISP bypass) */
+#endif /* MRV_ISP_ISP_MODE */
+/* Slice: ISP_ENABLE:*/
+/* MANUAL ON/OFF (controls output formatter, framesynced)*/
+#ifdef MRV_ISP_ISP_ENABLE
+#endif /* MRV_ISP_ISP_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_acq_prop: ISP acquisition properties (0x0004)
+ *
+ *****************************************************************************/
+#ifdef ISP_DVP_PINMAPPING
+/*! Slice: MRV_ISP_DVP_INPUT_PIN_MAPPING */
+/*! Bit Mapping for LSB to MSP for ISPNano.*/
+/*! 3'b000: normal 12-bit external interface */
+/*! 3'b001: mapping low 10 bit to high 10 bits, append 2 zeros as LSBs.*/
+/*! 3'b010: mapping low 8 bit to high 8 bits, append 4 zeros as LSBs.*/
+/*! 3'b011: mapping middle 8 bit to high 8 bits, append 4 zeros as LSBs.*/
+/*! 3'b100..3'b111: rsvd */
+#ifdef MRV_ISP_DVP_INPUT_PIN_MAPPING
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_12TO12     0
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_L10TOH10   1
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_L8TOH8     2
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_M8TOH8     3
+#endif
+#endif
+/*! Slice: DMA_YUV_SELECTION */
+/*! 0: use align or conversion data for isp_is input */
+/*! 1: use dma yuv read data for isp_is input */
+#ifdef MRV_ISP_DMA_YUV_SELECTION
+#define MRV_ISP_DMA_YUV_SELECTION_ALIGNED_CONV 0
+#define MRV_ISP_DMA_YUV_SELECTION_DMA_YUV      1
+#endif
+/* Slice: LATENCY_FIFO_SELECTION:*/
+/* 0: use input formatter input for latency fifo.*/
+/* 1: use dma rgb read input for latency fifo.*/
+#ifdef MRV_ISP_LATENCY_FIFO_SELECTION
+#define MRV_ISP_LATENCY_FIFO_SELECTION_INPUT_FORMATTER  0
+#define MRV_ISP_LATENCY_FIFO_SELECTION_DMA_READ         1
+#endif /* MRV_ISP_LATENCY_FIFO_SELECTION */
+/* Slice: INPUT_SELECTION:*/
+/* 000: 12Bit external Interface */
+/* 001: 10Bit Interface, append 2 zeroes as LSBs */
+/* 010: 10Bit Interface, append 2 MSBs as LSBs */
+/* 011: 8Bit Interface, append 4 zeroes as LSBs */
+/* 100: 8Bit Interface, append 4 MSBs as LSBs */
+/* 101...111: reserved */
+#ifdef MRV_ISP_INPUT_SELECTION
+#define MRV_ISP_INPUT_SELECTION_12EXT           0	/* 000- 12Bit external Interface */
+#define MRV_ISP_INPUT_SELECTION_10ZERO          1	/* 001- 10Bit Interface, append 2 zeroes as LSBs */
+#define MRV_ISP_INPUT_SELECTION_10MSB           2	/* 010- 10Bit Interface, append 2 MSBs as LSBs */
+#define MRV_ISP_INPUT_SELECTION_8ZERO           3	/* 011- 8Bit Interface, append 4 zeroes as LSBs */
+#define MRV_ISP_INPUT_SELECTION_8MSB            4	/* 100- 8Bit Interface, append 4 MSBs as LSBs */
+#endif /* MRV_ISP_INPUT_SELECTION */
+/* Slice: FIELD_SELECTION:*/
+/* 00: sample all fields (don't care about fields)*/
+/* 01: sample only even fields */
+/* 10: sample only odd fields */
+/* 11: reserved */
+#ifdef MRV_ISP_FIELD_SELECTION
+#define MRV_ISP_FIELD_SELECTION_BOTH            0	/* 00- sample all fields (don't care about fields) */
+#define MRV_ISP_FIELD_SELECTION_EVEN            1	/* 01- sample only even fields */
+#define MRV_ISP_FIELD_SELECTION_ODD             2	/* 10- sample only odd fields */
+#endif /* MRV_ISP_FIELD_SELECTION */
+/* Slice: CCIR_SEQ:*/
+/* 00: YCbYCr */
+/* 01: YCrYCb */
+/* 10: CbYCrY */
+/* 11: CrYCbY */
+#ifdef MRV_ISP_CCIR_SEQ
+#define MRV_ISP_CCIR_SEQ_YCBYCR                 0	/* 00 - YCbYCr */
+#define MRV_ISP_CCIR_SEQ_YCRYCB                 1	/* 01 - YCrYCb */
+#define MRV_ISP_CCIR_SEQ_CBYCRY                 2	/* 10 - CbYCrY */
+#define MRV_ISP_CCIR_SEQ_CRYCBY                 3	/* 11 - CrYCbY */
+#endif /* MRV_ISP_CCIR_SEQ */
+/* Slice: CONV_422:*/
+/* 00- co-sited color subsampling Y0Cb0Cr0 - Y1 */
+/* 01- interleaved color subsampling Y0Cb0 - Y1Cr1 (not recommended)*/
+/* 10- non-cosited color subsampling Y0Cb(0+1)/2 - Y1Cr(0+1)/2 */
+/* 11- reserved */
+#ifdef MRV_ISP_CONV_422
+#define MRV_ISP_CONV_422_CO                     0	/* 00- co-sited color subsampling Y0Cb0Cr0 - Y1 */
+#define MRV_ISP_CONV_422_INTER                  1	/* 01- interleaved color subsampling Y0Cb0 - Y1Cr1 (not recommended) */
+#define MRV_ISP_CONV_422_NONCO                  2	/* 10- non-cosited color subsampling Y0Cb(0+1)/2 - Y1Cr(0+1)/2 */
+#endif /* MRV_ISP_CONV_422 */
+/* Slice: BAYER_PAT:*/
+/* color components from sensor, starting with top left position in sampled frame */
+/* (reprogram with ISP_ACQ_H_OFFS, ISP_ACQ_V_OFFS)*/
+     /**/
+/* 00: first line: RGRG, second line: GBGB, etc.*/
+/* 01: first line: GRGR, second line: BGBG, etc.*/
+/* 10: first line: GBGB, second line: RGRG, etc.*/
+/* 11: first line: BGBG, second line: GRGR, etc.*/
+/* This configuration applies for the black level area after cropping by the input formatter.*/
+#ifdef MRV_ISP_BAYER_PAT
+#define MRV_ISP_BAYER_PAT_RG                    0	/* 00 - first line: RGRG, second line: GBGB, etc. */
+#define MRV_ISP_BAYER_PAT_GR                    1	/* 01 - first line: GRGR, second line: BGBG, etc. */
+#define MRV_ISP_BAYER_PAT_GB                    2	/* 10 - first line: GBGB, second line: RGRG, etc. */
+#define MRV_ISP_BAYER_PAT_BG                    3	/* 11 - first line: BGBG, second line: GRGR, etc. */
+#endif /* MRV_ISP_BAYER_PAT */
+/* Slice: VSYNC_POL:*/
+/* vertical sync polarity */
+/* 0: high active */
+/* 1: low active */
+#ifdef MRV_ISP_VSYNC_POL
+#endif /* MRV_ISP_VSYNC_POL */
+/* Slice: HSYNC_POL:*/
+/* horizontal sync polarity */
+/* 0: high active */
+/* 1: low active */
+#ifdef MRV_ISP_HSYNC_POL
+#endif /* MRV_ISP_HSYNC_POL */
+/* Slice: SAMPLE_EDGE:*/
+/* 0: negative edge sampling */
+/* 1: positive edge sampling */
+#ifdef MRV_ISP_SAMPLE_EDGE
+#endif /* MRV_ISP_SAMPLE_EDGE */
+/*****************************************************************************/
+/**
+ * register: isp_acq_h_offs: horizontal input offset (0x0008)
+ *
+ *****************************************************************************/
+/* Slice: ACQ_H_OFFS:*/
+/* horizontal sample offset in 8-bit samples (yuv: 4 samples=2pix)*/
+#ifdef MRV_ISP_ACQ_H_OFFS
+#endif /* MRV_ISP_ACQ_H_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_acq_v_offs: vertical input offset (0x000c)
+ *
+ *****************************************************************************/
+/* Slice: ACQ_V_OFFS:*/
+/* vertical sample offset in lines */
+#ifdef MRV_ISP_ACQ_V_OFFS
+#endif /* MRV_ISP_ACQ_V_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_acq_h_size: horizontal input size (0x0010)
+ *
+ *****************************************************************************/
+/* Slice: ACQ_H_SIZE:*/
+/* horizontal sample size in 12-bit samples */
+/* YUV input: 2 samples = 1 pixel, else 1 sample = 1 pixel; So in YUV mode ACQ_H_SIZE must be twice as large as horizontal image size */
+/* horizontal image size must always be even exept in raw picture mode; if an odd size is programmed the value will be truncated to even size */
+#ifdef MRV_ISP_ACQ_H_SIZE
+#endif /* MRV_ISP_ACQ_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_acq_v_size: vertical input size (0x0014)
+ *
+ *****************************************************************************/
+/* Slice: ACQ_V_SIZE:*/
+/* vertical sample size in lines */
+#ifdef MRV_ISP_ACQ_V_SIZE
+#endif /* MRV_ISP_ACQ_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_acq_nr_frames: Number of frames to be captured (0x0018)
+ *
+ *****************************************************************************/
+/* Slice: ACQ_NR_FRAMES:*/
+/* number of input frames to be sampled (0 = continuous)*/
+#ifdef MRV_ISP_ACQ_NR_FRAMES
+#endif /* MRV_ISP_ACQ_NR_FRAMES */
+/*****************************************************************************/
+/**
+ * register: isp_gamma_dx_lo: De-Gamma Curve definition lower x increments
+ *           (sampling points) (0x001c)
+ *
+ *****************************************************************************/
+/* Slice: GAMMA_DX_8:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_8
+#endif /* MRV_ISP_GAMMA_DX_8 */
+/* Slice: GAMMA_DX_7:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_7
+#endif /* MRV_ISP_GAMMA_DX_7 */
+/* Slice: GAMMA_DX_6:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_6
+#endif /* MRV_ISP_GAMMA_DX_6 */
+/* Slice: GAMMA_DX_5:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_5
+#endif /* MRV_ISP_GAMMA_DX_5 */
+/* Slice: GAMMA_DX_4:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_4
+#endif /* MRV_ISP_GAMMA_DX_4 */
+/* Slice: GAMMA_DX_3:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_3
+#endif /* MRV_ISP_GAMMA_DX_3 */
+/* Slice: GAMMA_DX_2:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_2
+#endif /* MRV_ISP_GAMMA_DX_2 */
+/* Slice: GAMMA_DX_1:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_1
+#endif /* MRV_ISP_GAMMA_DX_1 */
+/*****************************************************************************/
+/**
+ * register: isp_gamma_dx_hi: De-Gamma Curve definition higher x increments
+ *           (sampling points) (0x0020)
+ *
+ *****************************************************************************/
+/* Slice: GAMMA_DX_16:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_16
+#endif /* MRV_ISP_GAMMA_DX_16 */
+/* Slice: GAMMA_DX_15:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_15
+#endif /* MRV_ISP_GAMMA_DX_15 */
+/* Slice: GAMMA_DX_14:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_14
+#endif /* MRV_ISP_GAMMA_DX_14 */
+/* Slice: GAMMA_DX_13:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_13
+#endif /* MRV_ISP_GAMMA_DX_13 */
+/* Slice: GAMMA_DX_12:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_12
+#endif /* MRV_ISP_GAMMA_DX_12 */
+/* Slice: GAMMA_DX_11:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_11
+#endif /* MRV_ISP_GAMMA_DX_11 */
+/* Slice: GAMMA_DX_10:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_10
+#endif /* MRV_ISP_GAMMA_DX_10 */
+/* Slice: GAMMA_DX_9:*/
+/* gamma curve sample point definition x-axis (input)*/
+#ifdef MRV_ISP_GAMMA_DX_9
+#endif /* MRV_ISP_GAMMA_DX_9 */
+/*****************************************************************************/
+/**
+ * register array: isp_gamma_r_y: De-Gamma Curve definition y red (0x0024+n (n=0..16))
+ *
+ *****************************************************************************/
+/* Slice: GAMMA_R_Y:*/
+/* gamma curve point definition y-axis (output) for red */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that dy is 12-bit signed !)*/
+#ifdef MRV_ISP_GAMMA_R_Y
+#endif /* MRV_ISP_GAMMA_R_Y */
+/*****************************************************************************/
+/**
+ * register array: isp_gamma_g_y: De-Gamma Curve definition y green (0x0068+n (n=0..16))
+ *
+ *****************************************************************************/
+/* Slice: GAMMA_G_Y:*/
+/* gamma curve point definition y-axis (output) for green */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that dy is 12-bit signed !)*/
+#ifdef MRV_ISP_GAMMA_G_Y
+#endif /* MRV_ISP_GAMMA_G_Y */
+/*****************************************************************************/
+/**
+ * register array: isp_gamma_b_y: De-Gamma Curve definition y blue (0x00AC+n (n=0..16))
+ *
+ *****************************************************************************/
+/* Slice: GAMMA_B_Y:*/
+/* gamma curve point definition y-axis (output) for blue */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that dy is 12-bit signed !)*/
+#ifdef MRV_ISP_GAMMA_B_Y
+#endif /* MRV_ISP_GAMMA_B_Y */
+/*****************************************************************************/
+/* ISP Auto White Balance Registers                                          */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_awb_prop: Auto white balance properties (0x0110)
+ *
+ *****************************************************************************/
+/* Slice: AWB_MEAS_MODE:*/
+/* 1: RGB based measurement mode */
+/* 0: near white discrimination mode using YCbCr color space */
+#ifdef MRV_ISP_AWB_MEAS_MODE
+#define MRV_ISP_AWB_MEAS_MODE_RGB               1U	/* 1: RGB based measurement mode */
+#define MRV_ISP_AWB_MEAS_MODE_YCBCR             0U	/* 0: near white discrimination mode using YCbCr color space */
+#endif /* MRV_ISP_AWB_MEAS_MODE */
+/* Slice: AWB_MAX_EN:*/
+/* 1: enable Y_MAX compare */
+/* 0: disable Y_MAX compare */
+/* ignored if RGB measurement mode is enabled */
+#ifdef MRV_ISP_AWB_MAX_EN
+#define MRV_ISP_AWB_MAX_EN_ENABLE               1U	/* 1: enable Y_MAX compare */
+#define MRV_ISP_AWB_MAX_EN_DISABLE              0U	/* 0: disable Y_MAX compare */
+#endif /* MRV_ISP_AWB_MAX_EN */
+/* Slice: AWB_MODE:*/
+/* AWB_MODE(1:0):*/
+/* 11: reserved */
+/* 10: white balance measurement of YCbCr means */
+/* 01: reserved */
+/* 00: manual white balance (gain adjust possible), no measurement */
+#ifdef MRV_ISP_AWB_MODE
+#define MRV_ISP_AWB_MODE_MEAS                   2U	/* 10: white balance measurement of YCbCr or RGB means (dependent on MRV_ISP_AWB_MEAS_MODE) */
+#define MRV_ISP_AWB_MODE_NOMEAS                 0U	/* 00: manual white balance (gain adjust possible), no measurement */
+#endif /* MRV_ISP_AWB_MODE */
+/*****************************************************************************/
+/**
+ * register: isp_awb_h_offs: Auto white balance horizontal offset of measure
+ *           window (0x0114)
+ *
+ *****************************************************************************/
+/* Slice: AWB_H_OFFS:*/
+/* horizontal window offset in pixel */
+#ifdef MRV_ISP_AWB_H_OFFS
+#define MRV_ISP_AWB_H_OFFS_MIN                  0U
+#define MRV_ISP_AWB_H_OFFS_MAX                  (MRV_ISP_AWB_H_OFFS_MASK >> MRV_ISP_AWB_H_OFFS_SHIFT)
+#endif /* MRV_ISP_AWB_H_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_awb_v_offs: Auto white balance vertical offset of measure
+ *           window (0x0118)
+ *
+ *****************************************************************************/
+/* Slice: AWB_V_OFFS:*/
+/* vertical window offset in lines */
+#ifdef MRV_ISP_AWB_V_OFFS
+#define MRV_ISP_AWB_V_OFFS_MIN                  0U
+#define MRV_ISP_AWB_V_OFFS_MAX                  (MRV_ISP_AWB_V_OFFS_MASK >> MRV_ISP_AWB_V_OFFS_SHIFT)
+#endif /* MRV_ISP_AWB_V_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_awb_h_size: Auto white balance horizontal window size (0x011c)
+ *
+ *****************************************************************************/
+/* Slice: AWB_H_SIZE:*/
+/* horizontal measurement window size in pixel */
+#ifdef MRV_ISP_AWB_H_SIZE
+#define MRV_ISP_AWB_H_SIZE_MIN                  0U
+#define MRV_ISP_AWB_H_SIZE_MAX                  (MRV_ISP_AWB_H_SIZE_MASK >> MRV_ISP_AWB_H_SIZE_SHIFT)
+#endif /* MRV_ISP_AWB_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_awb_v_size: Auto white balance vertical window size (0x0120)
+ *
+ *****************************************************************************/
+/* Slice: AWB_V_SIZE:*/
+/* vertical measurement window size in lines */
+#ifdef MRV_ISP_AWB_V_SIZE
+#define MRV_ISP_AWB_V_SIZE_MIN                  0U
+#define MRV_ISP_AWB_V_SIZE_MAX                  (MRV_ISP_AWB_V_SIZE_MASK >> MRV_ISP_AWB_V_SIZE_SHIFT)
+#endif /* MRV_ISP_AWB_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_awb_frames: Auto white balance mean value over multiple frames (0x0124)
+ *
+ *****************************************************************************/
+/* Slice: AWB_FRAMES:*/
+/* number of frames-1 used for mean value calculation (value of 0 means 1 frame, value of 7 means 8 frames)*/
+#ifdef MRV_ISP_AWB_FRAMES
+#endif /* MRV_ISP_AWB_FRAMES */
+/*****************************************************************************/
+/**
+ * register: isp_awb_ref: Auto white balance reference Cb/Cr values (0x0128)
+ *           or maximum red/blue values
+ *
+ *****************************************************************************/
+/* Slice: AWB_REF_CR__MAX_R:*/
+/* - reference Cr value for AWB regulation, target for AWB */
+/* - maximum red value, if RGB measurement mode is selected */
+#ifdef MRV_ISP_AWB_REF_CR__MAX_R
+#endif /* MRV_ISP_AWB_REF_CR__MAX_R */
+/* Slice: AWB_REF_CB__MAX_B:*/
+/* - reference Cb value for AWB regulation, target for AWB */
+/* - maximum blue value, if RGB measurement mode is selected */
+#ifdef MRV_ISP_AWB_REF_CB__MAX_B
+#endif /* MRV_ISP_AWB_REF_CB__MAX_B */
+/*****************************************************************************/
+/**
+ * register: isp_awb_thresh: Auto white balance threshold values (0x012c)
+ *
+ *****************************************************************************/
+/* Slice: AWB_MAX_Y:*/
+/* - Luminance maximum value, only consider pixels with luminance smaller than threshold for the WB measurement (must be enabled by AWB_MODE(2)),*/
+/* - ignored if RGB measurement mode is enabled */
+#ifdef MRV_ISP_AWB_MAX_Y
+#endif /* MRV_ISP_AWB_MAX_Y */
+/* Slice: AWB_MIN_Y__MAX_G:*/
+/* - Luminance minimum value, only consider pixels with luminance greater than threshold for the WB measurement */
+/* - maximum green value, if RGB measurement mode is selected */
+#ifdef MRV_ISP_AWB_MIN_Y__MAX_G
+#endif /* MRV_ISP_AWB_MIN_Y__MAX_G */
+/* Slice: AWB_MAX_CSUM:*/
+/* - Chrominance sum maximum value, only consider pixels with Cb+Cr smaller than threshold for WB measurements */
+/* - ignored if RGB measurement mode is enabled */
+#ifdef MRV_ISP_AWB_MAX_CSUM
+#endif /* MRV_ISP_AWB_MAX_CSUM */
+/* Slice: AWB_MIN_C:*/
+/* - Chrominance minimum value, only consider pixels with Cb/Cr each greater than threshold value for WB measurements */
+/* - ignored if RGB measurement mode is enabled */
+#ifdef MRV_ISP_AWB_MIN_C
+#endif /* MRV_ISP_AWB_MIN_C */
+/*****************************************************************************/
+/**
+ * register: isp_awb_gain_g: Auto white balance gain green (0x0138)
+ *
+ *****************************************************************************/
+/* Slice: AWB_GAIN_GR:*/
+/* gain value for green component in red line 100h = 1 */
+#ifdef MRV_ISP_AWB_GAIN_GR
+#define MRV_ISP_AWB_GAIN_GR_DEFAULT             (0x100U)
+#define MRV_ISP_AWB_GAIN_GR_MAX                 (MRV_ISP_AWB_GAIN_GR_MASK >> MRV_ISP_AWB_GAIN_GR_SHIFT)
+#endif /* MRV_ISP_AWB_GAIN_GR */
+/* Slice: AWB_GAIN_GB:*/
+/* gain value for green component in blue line 100h = 1 */
+#ifdef MRV_ISP_AWB_GAIN_GB
+#define MRV_ISP_AWB_GAIN_GB_DEFAULT             (0x100U)
+#define MRV_ISP_AWB_GAIN_GB_MAX                 (MRV_ISP_AWB_GAIN_GB_MASK >> MRV_ISP_AWB_GAIN_GB_SHIFT)
+#endif /* MRV_ISP_AWB_GAIN_GB */
+/*****************************************************************************/
+/**
+ * register: isp_awb_gain_rb: Auto white balance gain red and blue (0x013c)
+ *
+ *****************************************************************************/
+/* Slice: AWB_GAIN_R:*/
+/* gain value for red component 100h = 1 */
+#ifdef MRV_ISP_AWB_GAIN_R
+#define MRV_ISP_AWB_GAIN_R_DEFAULT              (0x100U)
+#define MRV_ISP_AWB_GAIN_R_MAX                  (MRV_ISP_AWB_GAIN_R_MASK >> MRV_ISP_AWB_GAIN_R_SHIFT)
+#endif /* MRV_ISP_AWB_GAIN_R */
+/* Slice: AWB_GAIN_B:*/
+/* gain value for blue component 100h = 1 */
+#ifdef MRV_ISP_AWB_GAIN_B
+#define MRV_ISP_AWB_GAIN_B_DEFAULT              (0x100U)
+#define MRV_ISP_AWB_GAIN_B_MAX                  (MRV_ISP_AWB_GAIN_B_MASK >> MRV_ISP_AWB_GAIN_B_SHIFT)
+#endif /* MRV_ISP_AWB_GAIN_B */
+/*****************************************************************************/
+/**
+ * register: isp_awb_white_cnt: Auto white balance white pixel count (0x0140)
+ *
+ *****************************************************************************/
+/* Slice: AWB_WHITE_CNT:*/
+/* White pixel count, number of "white pixels" found during last measurement, i.e. pixels included in mean value calculation */
+#ifdef MRV_ISP_AWB_WHITE_CNT
+#endif /* MRV_ISP_AWB_WHITE_CNT */
+/*****************************************************************************/
+/**
+ * register: isp_awb_mean: Auto white balance measured mean value (0x0144)
+ *
+ *****************************************************************************/
+/* Slice: AWB_MEAN_Y_G:*/
+/* - mean value of Y within window and frames */
+/* - mean value of green within window and frames if RGB measurement is enabled */
+#ifdef MRV_ISP_AWB_MEAN_Y__G
+#endif /* MRV_ISP_AWB_MEAN_Y__G */
+/* Slice: AWB_MEAN_CB_B:*/
+/* - mean value of Cb within window and frames */
+/* - mean value of blue within window and frames if RGB measurement is enabled */
+#ifdef MRV_ISP_AWB_MEAN_CB__B
+#endif /* MRV_ISP_AWB_MEAN_CB__B */
+/* Slice: AWB_MEAN_CR_R:*/
+/* - mean value of Cr within window and frames */
+/* - mean value of red within window and frames if RGB measurement is enabled */
+#ifdef MRV_ISP_AWB_MEAN_CR__R
+#endif /* MRV_ISP_AWB_MEAN_CR__R */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_0: Color conversion coefficient 0 (0x0170)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_0:*/
+/* coefficient 0 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_0
+#endif /* MRV_ISP_CC_COEFF_0 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_1: Color conversion coefficient 1 (0x0174)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_1:*/
+/* coefficient 1 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_1
+#endif /* MRV_ISP_CC_COEFF_1 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_2: Color conversion coefficient 2 (0x0178)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_2:*/
+/* coefficient 2 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_2
+#endif /* MRV_ISP_CC_COEFF_2 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_3: Color conversion coefficient 3 (0x017c)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_3:*/
+/* coefficient 3 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_3
+#endif /* MRV_ISP_CC_COEFF_3 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_4: Color conversion coefficient 4 (0x0180)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_4:*/
+/* coefficient 4 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_4
+#endif /* MRV_ISP_CC_COEFF_4 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_5: Color conversion coefficient 5 (0x0184)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_5:*/
+/* coefficient 5 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_5
+#endif /* MRV_ISP_CC_COEFF_5 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_6: Color conversion coefficient 6 (0x0188)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_6:*/
+/* coefficient 6 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_6
+#endif /* MRV_ISP_CC_COEFF_6 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_7: Color conversion coefficient 7 (0x018c)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_7:*/
+/* coefficient 7 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_7
+#endif /* MRV_ISP_CC_COEFF_7 */
+/*****************************************************************************/
+/**
+ * register: isp_cc_coeff_8: Color conversion coefficient 8 (0x0190)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_8:*/
+/* coefficient 8 for color space conversion */
+#ifdef MRV_ISP_CC_COEFF_8
+#endif /* MRV_ISP_CC_COEFF_8 */
+/*****************************************************************************/
+/**
+ * register: isp_out_h_offs: Horizontal offset of output window (0x0194)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_H_OFFS:*/
+/* vertical pic offset in lines */
+#ifdef MRV_ISP_ISP_OUT_H_OFFS
+#endif /* MRV_ISP_ISP_OUT_H_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_out_v_offs: Vertical offset of output window (0x0198)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_V_OFFS:*/
+/* vertical pic offset in lines */
+#ifdef MRV_ISP_ISP_OUT_V_OFFS
+#endif /* MRV_ISP_ISP_OUT_V_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_out_h_size: Output horizontal picture size (0x019c)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_H_SIZE:*/
+/* horizontal picture size in pixel */
+/* if ISP_MODE is set to */
+/* 001: (ITU-R BT.656 YUV),*/
+/* 010: (ITU-R BT.601 YUV),*/
+/* 011: (ITU-R BT.601 Bayer RGB),*/
+/* 101: (ITU-R BT.656 Bayer RGB)*/
+/* only even numbers are accepted, because complete quadruples of YUYV(YCbYCr)*/
+/* are needed for the 422 output. (if an odd size is programmed the value will */
+/* be truncated to an even size)*/
+#ifdef MRV_ISP_ISP_OUT_H_SIZE
+#define MRV_ISP_ISP_OUT_H_SIZE_IS_EVEN(x)       (!(x & 0x01U))	/* check is even value */
+#define MRV_ISP_ISP_OUT_H_SIZE_IS_ODD(x)        (x & 0x01U)	/* check is odd value */
+#endif /* MRV_ISP_ISP_OUT_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_out_v_size: Output vertical picture size (0x01a0)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_V_SIZE:*/
+/* vertical pic size in lines */
+#ifdef MRV_ISP_ISP_OUT_V_SIZE
+#endif /* MRV_ISP_ISP_OUT_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_demosaic: Demosaic parameters (0x000001a4)
+ *
+ *****************************************************************************/
+/* Slice: DEMOSAIC_BYPASS:*/
+/* 0: normal operation for RGB Bayer Pattern input */
+/* 1: demosaicing bypass for Black&White input data */
+#ifdef MRV_ISP_DEMOSAIC_BYPASS
+#define MRV_ISP_DEMOSAIC_MODE_STD               0	/* "0": standard */
+#define MRV_ISP_DEMOSAIC_MODE_ENH               1	/* "1": enhanced mode */
+#endif /* MRV_ISP_DEMOSAIC_BYPASS */
+/* Slice: DEMOSAIC_TH:*/
+/* Threshold for Bayer demosaicing texture detection. This value shifted left */
+/* 4bit is compared with the difference of the vertical and horizontal 12Bit */
+/* wide texture indicators, to decide if the vertical or horizontal texture */
+/* flag must be set.*/
+/* 0xFF: no texture detection */
+/* 0x00: maximum edge sensitivity */
+#ifdef MRV_ISP_DEMOSAIC_TH
+#define MRV_ISP_DEMOSAIC_TH_MAX_TEXTURE_DETECTION   0xFFU	/* 0xFF: no texture detection */
+#define MRV_ISP_DEMOSAIC_TH_MAX_EDGE_SENSITIVITY    0x00U	/* 0x00: maximum edge sensitivity */
+#endif /* MRV_ISP_DEMOSAIC_TH */
+/*****************************************************************************/
+/**
+ * register: isp_flags_shd: Flags (current status) of certain signals and
+ *           Shadow regs for enable signals (0x000001a8)
+ *
+ *****************************************************************************/
+/* Slice: S_HSYNC:*/
+/* state of ISP input port s_hsync, for test purposes */
+#ifdef MRV_ISP_S_HSYNC
+#endif /* MRV_ISP_S_HSYNC */
+/* Slice: S_VSYNC:*/
+/* state of ISP input port s_vsync, for test purposes */
+#ifdef MRV_ISP_S_VSYNC
+#endif /* MRV_ISP_S_VSYNC */
+/* Slice: S_DATA:*/
+/* state of ISP input port s_data, for test purposes */
+#ifdef MRV_ISP_S_DATA
+#endif /* MRV_ISP_S_DATA */
+/* Slice: INFORM_FIELD:*/
+/* current field information */
+/* 0: odd */
+/* 1: even */
+#ifdef MRV_ISP_INFORM_FIELD
+#define MRV_ISP_INFORM_FIELD_ODD                0	/* 0: odd field is sampled */
+#define MRV_ISP_INFORM_FIELD_EVEN               1	/* 1: even field is sampled */
+#endif /* MRV_ISP_INFORM_FIELD */
+/* Slice: INFORM_EN_SHD:*/
+/* Input formatter enable shadow register */
+#ifdef MRV_ISP_INFORM_EN_SHD
+#endif /* MRV_ISP_INFORM_EN_SHD */
+/* Slice: ISP_ENABLE_SHD:*/
+/* ISP enable shadow register */
+/* shows, if ISP currently outputs data (1) or not (0)*/
+#ifdef MRV_ISP_ISP_ENABLE_SHD
+#endif /* MRV_ISP_ISP_ENABLE_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_out_h_offs_shd: current horizontal offset of output window
+ *           (shadow register) (0x000001ac)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_H_OFFS_SHD:*/
+/* current vertical pic offset in lines */
+#ifdef MRV_ISP_ISP_OUT_H_OFFS_SHD
+#endif /* MRV_ISP_ISP_OUT_H_OFFS_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_out_v_offs_shd: current vertical offset of output window
+ *           (shadow register) (0x000001b0)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_V_OFFS_SHD:*/
+/* current vertical pic offset in lines */
+#ifdef MRV_ISP_ISP_OUT_V_OFFS_SHD
+#endif /* MRV_ISP_ISP_OUT_V_OFFS_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_out_h_size_shd: current output horizontal picture size
+ *           (shadow register) (0x000001b4)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_H_SIZE_SHD:*/
+/* current horizontal pic size in pixel */
+#ifdef MRV_ISP_ISP_OUT_H_SIZE_SHD
+#endif /* MRV_ISP_ISP_OUT_H_SIZE_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_out_v_size_shd: current output vertical picture size
+ *           (shadow register) (0x000001b8)
+ *
+ *****************************************************************************/
+/* Slice: ISP_OUT_V_SIZE_SHD:*/
+/* vertical pic size in lines */
+#ifdef MRV_ISP_ISP_OUT_V_SIZE_SHD
+#endif /* MRV_ISP_ISP_OUT_V_SIZE_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_imsc: Interrupt mask (0x000001bc)
+ *
+ *****************************************************************************/
+/*! Slice: IMSC_VSM_END:*/
+/*! enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_VSM_END
+#define MRV_ISP_IMSC_VSM_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_VSM_END */
+/* Slice: IMSC_EXP_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_EXP_END
+#define MRV_ISP_IMSC_EXP_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_EXP_END */
+/* Slice: IMSC_FLASH_CAP:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_FLASH_CAP
+#define MRV_ISP_IMSC_FLASH_CAP_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_FLASH_CAP */
+/* Slice: IMSC_BP_DET:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_BP_DET
+#define MRV_ISP_IMSC_BP_DET_MASK                0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_BP_DET */
+/* Slice: IMSC_HIST_MEASURE_RDY:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_HIST_MEASURE_RDY
+#define MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_HIST_MEASURE_RDY */
+/* Slice: IMSC_AFM_FIN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_AFM_FIN
+#define MRV_ISP_IMSC_AFM_FIN_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !IMSC_AFM_FIN */
+/* Slice: IMSC_AFM_LUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_AFM_LUM_OF
+#define MRV_ISP_IMSC_AFM_LUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_AFM_LUM_OF */
+/* Slice: IMSC_AFM_SUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_AFM_SUM_OF
+#define MRV_ISP_IMSC_AFM_SUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_AFM_SUM_OF */
+/* Slice: IMSC_SHUTTER_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_SHUTTER_OFF
+#define MRV_ISP_IMSC_SHUTTER_OFF_MASK           0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_SHUTTER_OFF */
+/* Slice: IMSC_SHUTTER_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_SHUTTER_ON
+#define MRV_ISP_IMSC_SHUTTER_ON_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_SHUTTER_ON */
+/* Slice: IMSC_FLASH_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_FLASH_OFF
+#define MRV_ISP_IMSC_FLASH_OFF_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_FLASH_OFF */
+/* Slice: IMSC_FLASH_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_FLASH_ON
+#define MRV_ISP_IMSC_FLASH_ON_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_FLASH_ON */
+/* Slice: IMSC_H_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_H_START
+#define MRV_ISP_IMSC_H_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_H_START */
+/* Slice: IMSC_V_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_V_START
+#define MRV_ISP_IMSC_V_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_V_START */
+/* Slice: IMSC_FRAME_IN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_FRAME_IN
+#define MRV_ISP_IMSC_FRAME_IN_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_FRAME_IN */
+/* Slice: IMSC_AWB_DONE:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_AWB_DONE
+#define MRV_ISP_IMSC_AWB_DONE_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_AWB_DONE */
+/* Slice: IMSC_PIC_SIZE_ERR:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_PIC_SIZE_ERR
+#define MRV_ISP_IMSC_PIC_SIZE_ERR_MASK          0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_PIC_SIZE_ERR */
+/* Slice: IMSC_DATA_LOSS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_DATA_LOSS
+#define MRV_ISP_IMSC_DATA_LOSS_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_DATA_LOSS */
+/* Slice: IMSC_FRAME:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_FRAME
+#define MRV_ISP_IMSC_FRAME_MASK                 0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_FRAME */
+/* Slice: IMSC_ISP_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_IMSC_ISP_OFF
+#define MRV_ISP_IMSC_ISP_OFF_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_IMSC_ISP_OFF */
+/* combination of all interrupt lines */
+#define MRV_ISP_IMSC_ALL_IRQS
+#define MRV_ISP_IMSC_ALL_IRQS_MASK \
+(0 \
+	| MRV_ISP_IMSC_VSM_END_MASK \
+	| MRV_ISP_IMSC_EXP_END_MASK \
+	| MRV_ISP_IMSC_FLASH_CAP_MASK \
+	| MRV_ISP_IMSC_BP_DET_MASK \
+	| MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK \
+	| MRV_ISP_IMSC_AFM_FIN_MASK \
+	| MRV_ISP_IMSC_AFM_LUM_OF_MASK \
+	| MRV_ISP_IMSC_AFM_SUM_OF_MASK \
+	| MRV_ISP_IMSC_SHUTTER_OFF_MASK \
+	| MRV_ISP_IMSC_SHUTTER_ON_MASK \
+	| MRV_ISP_IMSC_FLASH_OFF_MASK \
+	| MRV_ISP_IMSC_FLASH_ON_MASK \
+	| MRV_ISP_IMSC_H_START_MASK \
+	| MRV_ISP_IMSC_V_START_MASK \
+	| MRV_ISP_IMSC_FRAME_IN_MASK \
+	| MRV_ISP_IMSC_AWB_DONE_MASK \
+	| MRV_ISP_IMSC_PIC_SIZE_ERR_MASK \
+	| MRV_ISP_IMSC_DATA_LOSS_MASK \
+	| MRV_ISP_IMSC_FRAME_MASK \
+	| MRV_ISP_IMSC_ISP_OFF_MASK \
+)
+#define MRV_ISP_IMSC_ALL_IRQS_SHIFT             0U
+/*****************************************************************************/
+/**
+ * register: isp_ris: Raw interrupt status (0x000001c0)
+ *
+ *****************************************************************************/
+/*! Slice: RIS_VSM_END:*/
+/*! VSM measurement complete */
+#ifndef MRV_ISP_RIS_VSM_END
+#define MRV_ISP_RIS_VSM_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_VSM_END */
+/* Slice: RIS_EXP_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_EXP_END
+#define MRV_ISP_RIS_EXP_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_EXP_END */
+/* Slice: RIS_FLASH_CAP:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_FLASH_CAP
+#define MRV_ISP_RIS_FLASH_CAP_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_FLASH_CAP */
+/* Slice: RIS_BP_DET:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_BP_DET
+#define MRV_ISP_RIS_BP_DET_MASK                0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_BP_DET */
+/* Slice: RIS_HIST_MEASURE_RDY:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_HIST_MEASURE_RDY
+#define MRV_ISP_RIS_HIST_MEASURE_RDY_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_HIST_MEASURE_RDY */
+/* Slice: RIS_AFM_FIN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_AFM_FIN
+#define MRV_ISP_RIS_AFM_FIN_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !RIS_AFM_FIN */
+/* Slice: RIS_AFM_LUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_AFM_LUM_OF
+#define MRV_ISP_RIS_AFM_LUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_AFM_LUM_OF */
+/* Slice: RIS_AFM_SUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_AFM_SUM_OF
+#define MRV_ISP_RIS_AFM_SUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_AFM_SUM_OF */
+/* Slice: RIS_SHUTTER_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_SHUTTER_OFF
+#define MRV_ISP_RIS_SHUTTER_OFF_MASK           0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_SHUTTER_OFF */
+/* Slice: RIS_SHUTTER_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_SHUTTER_ON
+#define MRV_ISP_RIS_SHUTTER_ON_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_SHUTTER_ON */
+/* Slice: RIS_FLASH_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_FLASH_OFF
+#define MRV_ISP_RIS_FLASH_OFF_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_FLASH_OFF */
+/* Slice: RIS_FLASH_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_FLASH_ON
+#define MRV_ISP_RIS_FLASH_ON_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_FLASH_ON */
+/* Slice: RIS_H_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_H_START
+#define MRV_ISP_RIS_H_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_H_START */
+/* Slice: RIS_V_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_V_START
+#define MRV_ISP_RIS_V_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_V_START */
+/* Slice: RIS_FRAME_IN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_FRAME_IN
+#define MRV_ISP_RIS_FRAME_IN_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_FRAME_IN */
+/* Slice: RIS_AWB_DONE:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_AWB_DONE
+#define MRV_ISP_RIS_AWB_DONE_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_AWB_DONE */
+/* Slice: RIS_PIC_SIZE_ERR:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_PIC_SIZE_ERR
+#define MRV_ISP_RIS_PIC_SIZE_ERR_MASK          0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_PIC_SIZE_ERR */
+/* Slice: RIS_DATA_LOSS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_DATA_LOSS
+#define MRV_ISP_RIS_DATA_LOSS_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_DATA_LOSS */
+/* Slice: RIS_FRAME:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_FRAME
+#define MRV_ISP_RIS_FRAME_MASK                 0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_FRAME */
+/* Slice: RIS_ISP_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_RIS_ISP_OFF
+#define MRV_ISP_RIS_ISP_OFF_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_RIS_ISP_OFF */
+/* combination of all interrupt lines */
+#define MRV_ISP_RIS_ALL_IRQS
+#define MRV_ISP_RIS_ALL_IRQS_MASK \
+(0 \
+	| MRV_ISP_RIS_VSM_END_MASK \
+	| MRV_ISP_RIS_EXP_END_MASK \
+	| MRV_ISP_RIS_FLASH_CAP_MASK \
+	| MRV_ISP_RIS_BP_DET_MASK \
+	| MRV_ISP_RIS_HIST_MEASURE_RDY_MASK \
+	| MRV_ISP_RIS_AFM_FIN_MASK \
+	| MRV_ISP_RIS_AFM_LUM_OF_MASK \
+	| MRV_ISP_RIS_AFM_SUM_OF_MASK \
+	| MRV_ISP_RIS_SHUTTER_OFF_MASK \
+	| MRV_ISP_RIS_SHUTTER_ON_MASK \
+	| MRV_ISP_RIS_FLASH_OFF_MASK \
+	| MRV_ISP_RIS_FLASH_ON_MASK \
+	| MRV_ISP_RIS_H_START_MASK \
+	| MRV_ISP_RIS_V_START_MASK \
+	| MRV_ISP_RIS_FRAME_IN_MASK \
+	| MRV_ISP_RIS_AWB_DONE_MASK \
+	| MRV_ISP_RIS_PIC_SIZE_ERR_MASK \
+	| MRV_ISP_RIS_DATA_LOSS_MASK \
+	| MRV_ISP_RIS_FRAME_MASK \
+	| MRV_ISP_RIS_ISP_OFF_MASK \
+)
+#define MRV_ISP_RIS_ALL_IRQS_SHIFT             0U
+/*****************************************************************************/
+/**
+ * register: isp_mis: Masked interrupt status (0x000001c4)
+ *
+ *****************************************************************************/
+/*! Slice: MIS_VSM_END:*/
+/*! VSM measurement complete */
+#ifndef MRV_ISP_MIS_VSM_END
+#define MRV_ISP_MIS_VSM_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_VSM_END_MASK */
+/* Slice: MIS_EXP_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_EXP_END
+#define MRV_ISP_MIS_EXP_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_EXP_END */
+/* Slice: MIS_FLASH_CAP:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_FLASH_CAP
+#define MRV_ISP_MIS_FLASH_CAP_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_FLASH_CAP */
+/* Slice: MIS_BP_DET:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_BP_DET
+#define MRV_ISP_MIS_BP_DET_MASK                0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_BP_DET */
+/* Slice: MIS_HIST_MEASURE_RDY:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_HIST_MEASURE_RDY
+#define MRV_ISP_MIS_HIST_MEASURE_RDY_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_HIST_MEASURE_RDY */
+/* Slice: MIS_AFM_FIN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_AFM_FIN
+#define MRV_ISP_MIS_AFM_FIN_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MIS_AFM_FIN */
+/* Slice: MIS_AFM_LUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_AFM_LUM_OF
+#define MRV_ISP_MIS_AFM_LUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_AFM_LUM_OF */
+/* Slice: MIS_AFM_SUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_AFM_SUM_OF
+#define MRV_ISP_MIS_AFM_SUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_AFM_SUM_OF */
+/* Slice: MIS_SHUTTER_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_SHUTTER_OFF
+#define MRV_ISP_MIS_SHUTTER_OFF_MASK           0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_SHUTTER_OFF */
+/* Slice: MIS_SHUTTER_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_SHUTTER_ON
+#define MRV_ISP_MIS_SHUTTER_ON_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_SHUTTER_ON */
+/* Slice: MIS_FLASH_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_FLASH_OFF
+#define MRV_ISP_MIS_FLASH_OFF_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_FLASH_OFF */
+/* Slice: MIS_FLASH_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_FLASH_ON
+#define MRV_ISP_MIS_FLASH_ON_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_FLASH_ON */
+/* Slice: MIS_H_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_H_START
+#define MRV_ISP_MIS_H_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_H_START */
+/* Slice: MIS_V_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_V_START
+#define MRV_ISP_MIS_V_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_V_START */
+/* Slice: MIS_FRAME_IN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_FRAME_IN
+#define MRV_ISP_MIS_FRAME_IN_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_FRAME_IN */
+/* Slice: MIS_AWB_DONE:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_AWB_DONE
+#define MRV_ISP_MIS_AWB_DONE_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_AWB_DONE */
+/* Slice: MIS_PIC_SIZE_ERR:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_PIC_SIZE_ERR
+#define MRV_ISP_MIS_PIC_SIZE_ERR_MASK          0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_PIC_SIZE_ERR */
+/* Slice: MIS_DATA_LOSS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_DATA_LOSS
+#define MRV_ISP_MIS_DATA_LOSS_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_DATA_LOSS */
+/* Slice: MIS_FRAME:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_FRAME
+#define MRV_ISP_MIS_FRAME_MASK                 0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_FRAME */
+/* Slice: MIS_ISP_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_MIS_ISP_OFF
+#define MRV_ISP_MIS_ISP_OFF_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_MIS_ISP_OFF */
+/* combination of all interrupt lines */
+#define MRV_ISP_MIS_ALL_IRQS
+#define MRV_ISP_MIS_ALL_IRQS_MASK \
+	(0 \
+	| MRV_ISP_MIS_VSM_END_MASK \
+	| MRV_ISP_MIS_EXP_END_MASK \
+	| MRV_ISP_MIS_FLASH_CAP_MASK \
+	| MRV_ISP_MIS_BP_DET_MASK \
+	| MRV_ISP_MIS_HIST_MEASURE_RDY_MASK \
+	| MRV_ISP_MIS_AFM_FIN_MASK \
+	| MRV_ISP_MIS_AFM_LUM_OF_MASK \
+	| MRV_ISP_MIS_AFM_SUM_OF_MASK \
+	| MRV_ISP_MIS_SHUTTER_OFF_MASK \
+	| MRV_ISP_MIS_SHUTTER_ON_MASK \
+	| MRV_ISP_MIS_FLASH_OFF_MASK \
+	| MRV_ISP_MIS_FLASH_ON_MASK \
+	| MRV_ISP_MIS_H_START_MASK \
+	| MRV_ISP_MIS_V_START_MASK \
+	| MRV_ISP_MIS_FRAME_IN_MASK \
+	| MRV_ISP_MIS_AWB_DONE_MASK \
+	| MRV_ISP_MIS_PIC_SIZE_ERR_MASK \
+	| MRV_ISP_MIS_DATA_LOSS_MASK \
+	| MRV_ISP_MIS_FRAME_MASK \
+	| MRV_ISP_MIS_ISP_OFF_MASK \
+	)
+#define MRV_ISP_MIS_ALL_IRQS_SHIFT             0U
+/*****************************************************************************/
+/**
+ * register: isp_icr: Interrupt clear register (0x000001c8)
+ *
+ *****************************************************************************/
+/*! Slice: ICR_VSM_END:*/
+/*! clear interrupt */
+#ifndef MRV_ISP_ICR_VSM_END
+#define MRV_ISP_ICR_VSM_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_VSM_END */
+/* Slice: ICR_EXP_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_EXP_END
+#define MRV_ISP_ICR_EXP_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_EXP_END */
+/* Slice: ICR_FLASH_CAP:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_FLASH_CAP
+#define MRV_ISP_ICR_FLASH_CAP_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_FLASH_CAP */
+/* Slice: ICR_BP_DET:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_BP_DET
+#define MRV_ISP_ICR_BP_DET_MASK                0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_BP_DET */
+/* Slice: ICR_HIST_MEASURE_RDY:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_HIST_MEASURE_RDY
+#define MRV_ISP_ICR_HIST_MEASURE_RDY_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_HIST_MEASURE_RDY */
+/* Slice: ICR_AFM_FIN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_AFM_FIN
+#define MRV_ISP_ICR_AFM_FIN_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !ICR_AFM_FIN */
+/* Slice: ICR_AFM_LUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_AFM_LUM_OF
+#define MRV_ISP_ICR_AFM_LUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_AFM_LUM_OF */
+/* Slice: ICR_AFM_SUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_AFM_SUM_OF
+#define MRV_ISP_ICR_AFM_SUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_AFM_SUM_OF */
+/* Slice: ICR_SHUTTER_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_SHUTTER_OFF
+#define MRV_ISP_ICR_SHUTTER_OFF_MASK           0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_SHUTTER_OFF */
+/* Slice: ICR_SHUTTER_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_SHUTTER_ON
+#define MRV_ISP_ICR_SHUTTER_ON_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_SHUTTER_ON */
+/* Slice: ICR_FLASH_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_FLASH_OFF
+#define MRV_ISP_ICR_FLASH_OFF_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_FLASH_OFF */
+/* Slice: ICR_FLASH_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_FLASH_ON
+#define MRV_ISP_ICR_FLASH_ON_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_FLASH_ON */
+/* Slice: ICR_H_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_H_START
+#define MRV_ISP_ICR_H_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_H_START */
+/* Slice: ICR_V_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_V_START
+#define MRV_ISP_ICR_V_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_V_START */
+/* Slice: ICR_FRAME_IN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_FRAME_IN
+#define MRV_ISP_ICR_FRAME_IN_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_FRAME_IN */
+/* Slice: ICR_AWB_DONE:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_AWB_DONE
+#define MRV_ISP_ICR_AWB_DONE_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_AWB_DONE */
+/* Slice: ICR_PIC_SIZE_ERR:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_PIC_SIZE_ERR
+#define MRV_ISP_ICR_PIC_SIZE_ERR_MASK          0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_PIC_SIZE_ERR */
+/* Slice: ICR_DATA_LOSS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_DATA_LOSS
+#define MRV_ISP_ICR_DATA_LOSS_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_DATA_LOSS */
+/* Slice: ICR_FRAME:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_FRAME
+#define MRV_ISP_ICR_FRAME_MASK                 0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_FRAME */
+/* Slice: ICR_ISP_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ICR_ISP_OFF
+#define MRV_ISP_ICR_ISP_OFF_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ICR_ISP_OFF */
+/* combination of all interrupt lines */
+#define MRV_ISP_ICR_ALL_IRQS
+#define MRV_ISP_ICR_ALL_IRQS_MASK \
+(0	\
+	| MRV_ISP_ICR_VSM_END_MASK \
+	| MRV_ISP_ICR_EXP_END_MASK \
+	| MRV_ISP_ICR_FLASH_CAP_MASK \
+	| MRV_ISP_ICR_BP_DET_MASK \
+	| MRV_ISP_ICR_HIST_MEASURE_RDY_MASK \
+	| MRV_ISP_ICR_AFM_FIN_MASK \
+	| MRV_ISP_ICR_AFM_LUM_OF_MASK \
+	| MRV_ISP_ICR_AFM_SUM_OF_MASK \
+	| MRV_ISP_ICR_SHUTTER_OFF_MASK \
+	| MRV_ISP_ICR_SHUTTER_ON_MASK \
+	| MRV_ISP_ICR_FLASH_OFF_MASK \
+	| MRV_ISP_ICR_FLASH_ON_MASK \
+	| MRV_ISP_ICR_H_START_MASK \
+	| MRV_ISP_ICR_V_START_MASK \
+	| MRV_ISP_ICR_FRAME_IN_MASK \
+	| MRV_ISP_ICR_AWB_DONE_MASK \
+	| MRV_ISP_ICR_PIC_SIZE_ERR_MASK \
+	| MRV_ISP_ICR_DATA_LOSS_MASK \
+	| MRV_ISP_ICR_FRAME_MASK \
+	| MRV_ISP_ICR_ISP_OFF_MASK \
+)
+#define MRV_ISP_ICR_ALL_IRQS_SHIFT             0U
+/*****************************************************************************/
+/**
+ * register: isp_isr: Interrupt set register (0x000001cc)
+ *
+ *****************************************************************************/
+/*! Register: isp_isr: Interrupt set register (0x000001cc)*/
+/*! Slice: ISR_VSM_END:*/
+/*! set interrupt */
+#ifndef MRV_ISP_ISR_VSM_END
+#define MRV_ISP_ISR_VSM_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_VSM_END */
+/* Slice: ISR_EXP_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_EXP_END
+#define MRV_ISP_ISR_EXP_END_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_EXP_END */
+/* Slice: ISR_FLASH_CAP:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_FLASH_CAP
+#define MRV_ISP_ISR_FLASH_CAP_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_FLASH_CAP */
+/* Slice: ISR_BP_DET:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_BP_DET
+#define MRV_ISP_ISR_BP_DET_MASK                0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_BP_DET */
+/* Slice: ISR_HIST_MEASURE_RDY:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_HIST_MEASURE_RDY
+#define MRV_ISP_ISR_HIST_MEASURE_RDY_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_HIST_MEASURE_RDY */
+/* Slice: ISR_AFM_FIN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_AFM_FIN
+#define MRV_ISP_ISR_AFM_FIN_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !ISR_AFM_FIN */
+/* Slice: ISR_AFM_LUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_AFM_LUM_OF
+#define MRV_ISP_ISR_AFM_LUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_AFM_LUM_OF */
+/* Slice: ISR_AFM_SUM_OF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_AFM_SUM_OF
+#define MRV_ISP_ISR_AFM_SUM_OF_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_AFM_SUM_OF */
+/* Slice: ISR_SHUTTER_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_SHUTTER_OFF
+#define MRV_ISP_ISR_SHUTTER_OFF_MASK           0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_SHUTTER_OFF */
+/* Slice: ISR_SHUTTER_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_SHUTTER_ON
+#define MRV_ISP_ISR_SHUTTER_ON_MASK            0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_SHUTTER_ON */
+/* Slice: ISR_FLASH_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_FLASH_OFF
+#define MRV_ISP_ISR_FLASH_OFF_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_FLASH_OFF */
+/* Slice: ISR_FLASH_ON:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_FLASH_ON
+#define MRV_ISP_ISR_FLASH_ON_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_FLASH_ON */
+/* Slice: ISR_H_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_H_START
+#define MRV_ISP_ISR_H_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_H_START */
+/* Slice: ISR_V_START:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_V_START
+#define MRV_ISP_ISR_V_START_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_V_START */
+/* Slice: ISR_FRAME_IN:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_FRAME_IN
+#define MRV_ISP_ISR_FRAME_IN_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_FRAME_IN */
+/* Slice: ISR_AWB_DONE:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_AWB_DONE
+#define MRV_ISP_ISR_AWB_DONE_MASK              0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_AWB_DONE */
+/* Slice: ISR_PIC_SIZE_ERR:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_PIC_SIZE_ERR
+#define MRV_ISP_ISR_PIC_SIZE_ERR_MASK          0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_PIC_SIZE_ERR */
+/* Slice: ISR_DATA_LOSS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_DATA_LOSS
+#define MRV_ISP_ISR_DATA_LOSS_MASK             0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_DATA_LOSS */
+/* Slice: ISR_FRAME:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_FRAME
+#define MRV_ISP_ISR_FRAME_MASK                 0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_FRAME */
+/* Slice: ISR_ISP_OFF:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_ISP_ISR_ISP_OFF
+#define MRV_ISP_ISR_ISP_OFF_MASK               0U	/* make sure, that this mask is defined for the combination mask */
+#endif /* !MRV_ISP_ISR_ISP_OFF */
+/* combination of all interrupt lines */
+#define MRV_ISP_ISR_ALL_IRQS
+#define MRV_ISP_ISR_ALL_IRQS_MASK \
+(0 \
+	| MRV_ISP_ISR_VSM_END_MASK \
+	| MRV_ISP_ISR_EXP_END_MASK \
+	| MRV_ISP_ISR_FLASH_CAP_MASK \
+	| MRV_ISP_ISR_BP_DET_MASK \
+	| MRV_ISP_ISR_HIST_MEASURE_RDY_MASK \
+	| MRV_ISP_ISR_AFM_FIN_MASK \
+	| MRV_ISP_ISR_AFM_LUM_OF_MASK \
+	| MRV_ISP_ISR_AFM_SUM_OF_MASK \
+	| MRV_ISP_ISR_SHUTTER_OFF_MASK \
+	| MRV_ISP_ISR_SHUTTER_ON_MASK \
+	| MRV_ISP_ISR_FLASH_OFF_MASK \
+	| MRV_ISP_ISR_FLASH_ON_MASK \
+	| MRV_ISP_ISR_H_START_MASK \
+	| MRV_ISP_ISR_V_START_MASK \
+	| MRV_ISP_ISR_FRAME_IN_MASK \
+	| MRV_ISP_ISR_AWB_DONE_MASK \
+	| MRV_ISP_ISR_PIC_SIZE_ERR_MASK \
+	| MRV_ISP_ISR_DATA_LOSS_MASK \
+	| MRV_ISP_ISR_FRAME_MASK \
+	| MRV_ISP_ISR_ISP_OFF_MASK \
+)
+#define MRV_ISP_ISR_ALL_IRQS_SHIFT             0U
+/*****************************************************************************/
+/**
+ * register array: isp_ct_coeff: cross-talk configuration register (color
+ *                 correction matrix) (0x03A0 + n*0x4 (n=0..8))
+ *
+ *****************************************************************************/
+/* Slice: ct_coeff:*/
+/* Coefficient n for cross talk matrix.*/
+     /**/
+/* Values are 11-bit signed fixed-point numbers with 4 bit integer and */
+/* 7 bit fractional part, ranging from -8 (0x400) to +7.992 (0x3FF).*/
+/* 0 is reprsented by 0x000 and a coefficient value of 1 as 0x080.*/
+#ifdef MRV_ISP_CT_COEFF
+#define MRV_ISP_CT_COEFF_DEFAULT                0x080U	/* default value */
+#endif /* MRV_ISP_CT_COEFF */
+/*****************************************************************************/
+/**
+ * register: isp_gamma_out_mode: gamma segmentation mode register for output
+ *           gamma (0x000001f4)
+ *
+ *****************************************************************************/
+/* Slice: equ_segm:*/
+/* 0: logarithmic like segmentation of gamma curve (default after reset)*/
+/*   segmentation from 0 to 4095: 64 64 64 64 128 128 128 128 256 256 256 512 512 512 512 512 */
+/* 1: equidistant segmentation (all 16 segments are 256)*/
+#ifdef MRV_ISP_EQU_SEGM
+#define MRV_ISP_EQU_SEGM_LOG                    0	/* 0: logarithmic like segmentation of gamma curve (default after reset) */
+#define MRV_ISP_EQU_SEGM_EQU                    1	/* 1: equidistant segmentation (all 16 segments are 256) */
+#endif /* MRV_ISP_EQU_SEGM */
+/*****************************************************************************/
+/**
+ * register array: isp_gamma_out_y: Gamma Out Curve definition y (0x03F0 + n*0x4 (n=0..16))
+ *
+ *****************************************************************************/
+/* Slice: isp_gamma_out_y:*/
+/* Gamma_out curve point definition y-axis (output) for all color */
+/* components (red, green, blue)*/
+/* RESTRICTION: each Y_n must be in the +511/-512 range compared */
+/* to its predecessor (so that dy is 10-bit signed !)*/
+#ifdef MRV_ISP_ISP_GAMMA_OUT_Y
+#endif /* MRV_ISP_ISP_GAMMA_OUT_Y */
+/*****************************************************************************/
+/**
+ * register: isp_err: ISP error register (0x0000023c)
+ *
+ *****************************************************************************/
+/* Slice: outform_size_err:*/
+/* size error is generated in outmux submodule */
+#ifdef MRV_ISP_OUTFORM_SIZE_ERR
+#endif /* MRV_ISP_OUTFORM_SIZE_ERR */
+/* Slice: is_size_err:*/
+/* size error is generated in image stabilization submodule */
+#ifdef MRV_ISP_IS_SIZE_ERR
+#endif /* MRV_ISP_IS_SIZE_ERR */
+/* Slice: inform_size_err:*/
+/* size error is generated in inform submodule */
+#ifdef MRV_ISP_INFORM_SIZE_ERR
+#endif /* MRV_ISP_INFORM_SIZE_ERR */
+/*****************************************************************************/
+/**
+ * register: isp_err_clr: ISP error clear register (0x00000240)
+ *
+ *****************************************************************************/
+/* Slice: outform_size_err_clr:*/
+/* size error is cleared */
+#ifdef MRV_ISP_OUTFORM_SIZE_ERR_CLR
+#endif /* MRV_ISP_OUTFORM_SIZE_ERR_CLR */
+/* Slice: is_size_err_clr:*/
+/* size error is cleared */
+#ifdef MRV_ISP_IS_SIZE_ERR_CLR
+#endif /* MRV_ISP_IS_SIZE_ERR_CLR */
+/* Slice: inform_size_err_clr:*/
+/* size error is cleared */
+#ifdef MRV_ISP_INFORM_SIZE_ERR_CLR
+#endif /* MRV_ISP_INFORM_SIZE_ERR_CLR */
+/*****************************************************************************/
+/**
+ * register: isp_frame_count: Frame counter (0x00000244)
+ *
+ *****************************************************************************/
+/* Slice: frame_counter:*/
+/* Current frame count of processing */
+#ifdef MRV_ISP_FRAME_COUNTER
+#endif /* MRV_ISP_FRAME_COUNTER */
+/*****************************************************************************/
+/**
+ * register: isp_ct_offset_r: cross-talk offset red (0x00000248)
+ *
+ *****************************************************************************/
+/* Slice: ct_offset_r:*/
+/* Offset red for cross talk matrix. Two's complement integer number ranging */
+/* from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#ifdef MRV_ISP_CT_OFFSET_R
+#define MRV_ISP_CT_OFFSET_R_DEFAULT             0x000U	/* default value */
+#endif /* MRV_ISP_CT_OFFSET_R */
+/*****************************************************************************/
+/**
+ * register: isp_ct_offset_g: cross-talk offset green (0x0000024c)
+ *
+ *****************************************************************************/
+/* Slice: ct_offset_g:*/
+/* Offset green for cross talk matrix. Two's complement integer number ranging */
+/* from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#ifdef MRV_ISP_CT_OFFSET_G
+#define MRV_ISP_CT_OFFSET_G_DEFAULT             0x000U	/* default value */
+#endif /* MRV_ISP_CT_OFFSET_G */
+/*****************************************************************************/
+/**
+ * register: isp_ct_offset_b: cross-talk offset blue (0x00000250)
+ *
+ *****************************************************************************/
+/* Slice: ct_offset_b:*/
+/* Offset blue for cross talk matrix. Two's complement integer number ranging */
+/* from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#ifdef MRV_ISP_CT_OFFSET_B
+#define MRV_ISP_CT_OFFSET_B_DEFAULT             0x000U	/* default value */
+#endif /* MRV_ISP_CT_OFFSET_B */
+/*****************************************************************************/
+/* ISP Flash Module Registers                                                */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_flash_cmd: Flash command (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: preflash_on:*/
+/* preflash on */
+/* 0: no effect */
+/* 1: flash delay counter is started at next trigger event */
+/* No capture event is signaled to the sensor interface block.*/
+#ifdef MRV_FLASH_PREFLASH_ON
+#endif /* MRV_FLASH_PREFLASH_ON */
+/* Slice: flash_on:*/
+/* flash on */
+/* 0: no effect */
+/* 1: flash delay counter is started at next trigger event */
+/* A capture event is signaled to the sensor interface block.*/
+#ifdef MRV_FLASH_FLASH_ON
+#endif /* MRV_FLASH_FLASH_ON */
+/* Slice: prelight_on:*/
+/* prelight on */
+/* 0: prelight is switched off at next trigger event */
+/* 1: prelight is switched on at next trigger event */
+#ifdef MRV_FLASH_PRELIGHT_ON
+#endif /* MRV_FLASH_PRELIGHT_ON */
+/*****************************************************************************/
+/**
+ * register: isp_flash_config: Flash config (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: fl_cap_del:*/
+/* capture delay */
+/* frame number (0 to 15) to be captured after trigger event */
+#ifdef MRV_FLASH_FL_CAP_DEL
+#endif /* MRV_FLASH_FL_CAP_DEL */
+/* Slice: fl_trig_src:*/
+/* trigger source for flash and prelight */
+/* 0: use "vds_vsync" for trigger event (with evaluation of vs_in_edge)*/
+/* 1: use "fl_trig" for trigger event (positive edge)*/
+#ifdef MRV_FLASH_FL_TRIG_SRC
+#define MRV_FLASH_FL_TRIG_SRC_VDS               0	/* 0: use "vds_vsync" for trigger event (with evaluation of vs_in_edge) */
+#define MRV_FLASH_FL_TRIG_SRC_FL                1	/* 1: use "fl_trig" for trigger event (positive edge) */
+#endif /* MRV_FLASH_FL_TRIG_SRC */
+/* Slice: fl_pol:*/
+/* polarity of flash related signals */
+/* 0: flash_trig, prelight_trig are high active */
+/* 1: flash_trig, prelight_trig are low active */
+#ifdef MRV_FLASH_FL_POL
+#define MRV_FLASH_FL_POL_HIGH                   0	/* 0: flash_trig, prelight_trig are high active */
+#define MRV_FLASH_FL_POL_LOW                    1	/* 1: flash_trig, prelight_trig are low active */
+#endif /* MRV_FLASH_FL_POL */
+/* Slice: vs_in_edge:*/
+/* VSYNC edge */
+/* 0: use negative edge of "vds_vsync" if generating a trigger event */
+/* 1: use positive edge of "vds_vsync" if generating a trigger event */
+#ifdef MRV_FLASH_VS_IN_EDGE
+#define MRV_FLASH_VS_IN_EDGE_NEG                0	/* 0: use negative edge of "vds_vsync" if generating a trigger event */
+#define MRV_FLASH_VS_IN_EDGE_POS                1	/* 1: use positive edge of "vds_vsync" if generating a trigger event */
+#endif /* MRV_FLASH_VS_IN_EDGE */
+/* Slice: prelight_mode:*/
+/* prelight mode */
+/* 0: prelight is switched off at begin of flash */
+/* 1: prelight is switched off at end of flash */
+#ifdef MRV_FLASH_PRELIGHT_MODE
+#define MRV_FLASH_PRELIGHT_MODE_OASF            0	/* 0: prelight is switched off at begin of flash */
+#define MRV_FLASH_PRELIGHT_MODE_OAEF            1	/* 1: prelight is switched off at end of flash */
+#endif /* MRV_FLASH_PRELIGHT_MODE */
+/*****************************************************************************/
+/**
+ * register: isp_flash_prediv: Flash Counter Pre-Divider (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: fl_pre_div:*/
+/* pre-divider for flush/preflash counter */
+#ifdef MRV_FLASH_FL_PRE_DIV
+#endif /* MRV_FLASH_FL_PRE_DIV */
+/*****************************************************************************/
+/**
+ * register: isp_flash_delay: Flash Delay (0x000c)
+ *
+ *****************************************************************************/
+/* Slice: fl_delay:*/
+/* counter value for flash/preflash delay */
+/* open_delay   =  (fl_delay + 1) * (fl_pre_div+1) / clk_isp */
+/* fl_delay     =  (open_delay * clk_isp) / (fl_pre_div+1) - 1 */
+#ifdef MRV_FLASH_FL_DELAY
+#endif /* MRV_FLASH_FL_DELAY */
+/*****************************************************************************/
+/**
+ * register: isp_flash_time: Flash time (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: fl_time:*/
+/* counter value for flash/preflash time */
+/* open_time =  (fl_time + 1) * (fl_pre_div+1) / clk_isp */
+/* fl_time =  (open_time * clk_isp) / (fl_pre_div+1) - 1 */
+#ifdef MRV_FLASH_FL_TIME
+#endif /* MRV_FLASH_FL_TIME */
+/*****************************************************************************/
+/**
+ * register: isp_flash_maxp: Maximum value for flash or preflash (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: fl_maxp:*/
+/* maximum period value for flash or preflash */
+/* max. flash/preflash period = 214 * (fl_maxp + 1) / clk_isp */
+/* fl_maxp =  (max_period * clk_isp) / 214  - 1 */
+#ifdef MRV_FLASH_FL_MAXP
+#endif /* MRV_FLASH_FL_MAXP */
+/*****************************************************************************/
+/* ISP Shutter Module Registers                                              */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_sh_ctrl: mechanical shutter control (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: sh_open_pol:*/
+/* shutter_open polarity */
+/* 0: shutter_open is high active */
+/* 1: shutter_open is low active */
+#ifdef MRV_SHUT_SH_OPEN_POL
+#define MRV_SHUT_SH_OPEN_POL_HIGH               0	/* 0: shutter_open is high active */
+#define MRV_SHUT_SH_OPEN_POL_LOW                1	/* 1: shutter_open is low active */
+#endif /* MRV_SHUT_SH_OPEN_POL */
+/* Slice: sh_trig_en:*/
+/* mechanical shutter trigger edge */
+/* 0: use negative edge of trigger signal */
+/* 1: use positive edge of trigger signal */
+#ifdef MRV_SHUT_SH_TRIG_EN
+#define MRV_SHUT_SH_TRIG_EN_NEG                 0	/* 0: use negative edge of trigger signal */
+#define MRV_SHUT_SH_TRIG_EN_POS                 1	/* 1: use positive edge of trigger signal */
+#endif /* MRV_SHUT_SH_TRIG_EN */
+/* Slice: sh_trig_src:*/
+/* mechanical shutter trigger source */
+/* 0: use "vds_vsync" for trigger event */
+/* 1: use "shutter_trig" for trigger event */
+#ifdef MRV_SHUT_SH_TRIG_SRC
+#define MRV_SHUT_SH_TRIG_SRC_VDS                0	/* 0: use "vds_vsync" for trigger event */
+#define MRV_SHUT_SH_TRIG_SRC_SHUT               1	/* 1: use "shutter_trig" for trigger event */
+#endif /* MRV_SHUT_SH_TRIG_SRC */
+/* Slice: sh_rep_en:*/
+/* mechanical shutter repetition enable */
+/* 0: shutter is opened only once */
+/* 1: shutter is opened with the repetition rate of the trigger signal */
+#ifdef MRV_SHUT_SH_REP_EN
+#define MRV_SHUT_SH_REP_EN_ONCE                 0	/* 0: shutter is opened only once */
+#define MRV_SHUT_SH_REP_EN_REP                  1	/* 1: shutter is opened with the repetition rate of the trigger signal */
+#endif /* MRV_SHUT_SH_REP_EN */
+/* Slice: sh_en:*/
+/* mechanical shutter enable */
+/* 0: mechanical shutter function is disabled */
+/* 1: mechanical shutter function is enabled */
+#ifdef MRV_SHUT_SH_EN
+#endif /* MRV_SHUT_SH_EN */
+/*****************************************************************************/
+/**
+ * register: isp_sh_prediv: Mech. Shutter Counter Pre-Divider (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: sh_pre_div:*/
+/* pre-divider for mechanical shutter open_delay and open_time counter */
+#ifdef MRV_SHUT_SH_PRE_DIV
+#endif /* MRV_SHUT_SH_PRE_DIV */
+/*****************************************************************************/
+/**
+ * register: isp_sh_delay: Delay register (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: sh_delay:*/
+/* counter value for delay */
+/* open_delay =  (sh_delay + 1) * (fl_pre_div+1) / clk_isp */
+/* sh_delay =  (open_delay * clk_isp) / (sh_pre_div+1) – 1 */
+#ifdef MRV_SHUT_SH_DELAY
+#endif /* MRV_SHUT_SH_DELAY */
+/*****************************************************************************/
+/**
+ * register: isp_sh_time: Time register (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: sh_time:*/
+/* counter value for time */
+/* open_time =  (sh_time + 1) * (fl_pre_div+1) / clk_isp */
+/* sh_time =  (open_time * clk_isp) / (sh_pre_div+1) - 1 */
+#ifndef MRV_SHUT_SH_TIME
+#endif /* MRV_SHUT_SH_TIME */
+/*****************************************************************************/
+/* Color Processing Module Registers                                         */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: c_proc_ctrl: Global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: cproc_c_out_range:*/
+/* Color processing chrominance pixel clipping range at output */
+/* 0: CbCr_out clipping range 16..240 according to ITU-R BT.601 standard */
+/* 1: full UV_out clipping range 0..255 */
+#ifdef MRV_CPROC_CPROC_C_OUT_RANGE
+#define MRV_CPROC_CPROC_C_OUT_RANGE_BT601       0	/* 0: CbCr_out clipping range 16..240 according to ITU-R BT.601 standard */
+#define MRV_CPROC_CPROC_C_OUT_RANGE_FULL        1	/* 1: full UV_out clipping range 0..255 */
+#endif /* MRV_CPROC_CPROC_C_OUT_RANGE */
+/* Slice: cproc_y_in_range:*/
+/* Color processing luminance input range (offset processing)*/
+/* 0: Y_in range 64..940 according to ITU-R BT.601 standard;*/
+/* offset of 64 will be subtracted from Y_in */
+/* 1: Y_in full range 0..1023;  no offset will be subtracted from Y_in */
+#ifdef MRV_CPROC_CPROC_Y_IN_RANGE
+#define MRV_CPROC_CPROC_Y_IN_RANGE_BT601        0	/* 0: Y_in range 64..940 according to ITU-R BT.601 standard */
+#define MRV_CPROC_CPROC_Y_IN_RANGE_FULL         1	/* 1: Y_in full range 0..1023 */
+#endif /* MRV_CPROC_CPROC_Y_IN_RANGE */
+/* Slice: cproc_y_out_range:*/
+/* Color processing luminance output clipping range */
+/* 0: Y_out clipping range 16..235; offset of 16 is added to Y_out according to ITU-R BT.601 standard */
+/* 1: Y_out clipping range 0..255; no offset is added to Y_out */
+#ifdef MRV_CPROC_CPROC_Y_OUT_RANGE
+#define MRV_CPROC_CPROC_Y_OUT_RANGE_BT601       0	/* 0: Y_out clipping range 16..235; offset of 16 is added to Y_out according to ITU-R BT.601 standard */
+#define MRV_CPROC_CPROC_Y_OUT_RANGE_FULL        1	/* 1: Y_out clipping range 0..255; no offset is added to Y_out */
+#endif /* MRV_CPROC_CPROC_Y_OUT_RANGE */
+/* Slice: cproc_enable:*/
+/* color processing enable */
+/* 0: color processing is bypassed */
+/* 2 * 10 Bit input data are truncated to 2 * 8Bit output data */
+/* 1: color processing is active */
+/* output data are rounded to 2 * 8Bit and clipping is active */
+#ifdef MRV_CPROC_CPROC_ENABLE
+#define MRV_CPROC_CPROC_ENABLE_PROCESS          1	/* 1: processing is activated */
+#define MRV_CPROC_CPROC_ENABLE_BYPASS           0	/* 0: processing is deactivated, bypass mode is selected */
+#endif /* MRV_CPROC_CPROC_ENABLE */
+/*****************************************************************************/
+/**
+ * register: c_proc_contrast: Color Processing contrast register (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: cproc_contrast:*/
+/* contrast adjustment value */
+/* 00H equals x 0.0 */
+/* ...*/
+/* 80H equals x 1.0 */
+/* ...*/
+/* FFH equals x 1.992 */
+#ifdef MRV_CPROC_CPROC_CONTRAST
+#endif /* MRV_CPROC_CPROC_CONTRAST */
+/*****************************************************************************/
+/**
+ * register: c_proc_brightness: Color Processing brightness register (0x0008)
+ *
+ *****************************************************************************/
+/* Slice: cproc_brightness:*/
+/* brightness adjustment value */
+/* 80H equals -128 */
+/* ...*/
+/* 00H equals +0 */
+/* ...*/
+/* 7FH equals +127 */
+#ifdef MRV_CPROC_CPROC_BRIGHTNESS
+#endif /* MRV_CPROC_CPROC_BRIGHTNESS */
+/*****************************************************************************/
+/**
+ * register: c_proc_saturation: Color Processing saturation register (0x000c)
+ *
+ *****************************************************************************/
+/* Slice: cproc_saturation:*/
+/* saturation adjustment value */
+/* 00H equals x 0.0 */
+/* ...*/
+/* 80H equals x 1.0 */
+/* ...*/
+/* FFH equals x 1.992 */
+#ifdef MRV_CPROC_CPROC_SATURATION
+#endif /* MRV_CPROC_CPROC_SATURATION */
+/*****************************************************************************/
+/**
+ * register: c_proc_hue: Color Processing hue register (0x0010)
+ *
+ *****************************************************************************/
+/* Slice: cproc_hue:*/
+/* hue adjustment value */
+/* 80H equals -90 deg */
+/* ...*/
+/* 00H equals 0 deg */
+/* ...*/
+/* 7FH equals +87.188 deg */
+#ifdef MRV_CPROC_CPROC_HUE
+#endif /* MRV_CPROC_CPROC_HUE */
+/*****************************************************************************/
+/* Main Resizer/Scaler Registers                                             */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: mrsz_ctrl: global control register (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: cfg_upd:*/
+/* write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#ifdef MRV_MRSZ_CFG_UPD
+#endif /* MRV_MRSZ_CFG_UPD */
+/* Slice: scale_vc_up:*/
+/* 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_VC_UP
+#define MRV_MRSZ_SCALE_VC_UP_UPSCALE            1	/* 1: vertical chrominance upscaling selected */
+#define MRV_MRSZ_SCALE_VC_UP_DOWNSCALE          0	/* 0: vertical chrominance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_VC_UP */
+/* Slice: scale_vy_up:*/
+/* 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_VY_UP
+#define MRV_MRSZ_SCALE_VY_UP_UPSCALE            1	/* 1: vertical luminance upscaling selected */
+#define MRV_MRSZ_SCALE_VY_UP_DOWNSCALE          0	/* 0: vertical luminance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_VY_UP */
+/* Slice: scale_hc_up:*/
+/* 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_HC_UP
+#define MRV_MRSZ_SCALE_HC_UP_UPSCALE            1	/* 1: horizontal chrominance upscaling selected */
+#define MRV_MRSZ_SCALE_HC_UP_DOWNSCALE          0	/* 0: horizontal chrominance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_HC_UP */
+/* Slice: scale_hy_up:*/
+/* 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_HY_UP
+#define MRV_MRSZ_SCALE_HY_UP_UPSCALE            1	/* 1: horizontal luminance upscaling selected */
+#define MRV_MRSZ_SCALE_HY_UP_DOWNSCALE          0	/* 0: horizontal luminance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_HY_UP */
+/* Slice: scale_vc_enable:*/
+/* 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#ifdef MRV_MRSZ_SCALE_VC_ENABLE
+#define MRV_MRSZ_SCALE_VC_ENABLE_PROCESS        1	/* 1: enable vertical chrominance scaling unit */
+#define MRV_MRSZ_SCALE_VC_ENABLE_BYPASS         0	/* 0: bypass vertical chrominance scaling unit */
+#endif /* MRV_MRSZ_SCALE_VC_ENABLE */
+/* Slice: scale_vy_enable:*/
+/* 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#ifdef MRV_MRSZ_SCALE_VY_ENABLE
+#define MRV_MRSZ_SCALE_VY_ENABLE_PROCESS        1	/* 1: enable vertical luminance scaling unit */
+#define MRV_MRSZ_SCALE_VY_ENABLE_BYPASS         0	/* 0: bypass vertical luminance scaling unit */
+#endif /* MRV_MRSZ_SCALE_VY_ENABLE */
+/* Slice: scale_hc_enable:*/
+/* 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#ifdef MRV_MRSZ_SCALE_HC_ENABLE
+#define MRV_MRSZ_SCALE_HC_ENABLE_PROCESS        1	/* 1: enable horizontal chrominance scaling unit */
+#define MRV_MRSZ_SCALE_HC_ENABLE_BYPASS         0	/* 0: bypass horizontal chrominance scaling unit */
+#endif /* MRV_MRSZ_SCALE_HC_ENABLE */
+/* Slice: scale_hy_enable:*/
+/* 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#ifdef MRV_MRSZ_SCALE_HY_ENABLE
+#define MRV_MRSZ_SCALE_HY_ENABLE_PROCESS        1	/* 1: enable horizontal luminance scaling unit */
+#define MRV_MRSZ_SCALE_HY_ENABLE_BYPASS         0	/* 0: bypass horizontal luminance scaling unit */
+#endif /* MRV_MRSZ_SCALE_HY_ENABLE */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hy: horizontal luminance scale factor register
+ *           (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: scale_hy:*/
+/* This register is set to the horizontal luminance downscale factor or to */
+/* the reciprocal of the horizontal luminance upscale factor */
+#ifdef MRV_MRSZ_SCALE_HY
+#endif /* MRV_MRSZ_SCALE_HY */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hcb: horizontal Cb scale factor register (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcb:*/
+/* This register is set to the horizontal Cb downscale factor or to the */
+/* reciprocal of the horizontal Cb upscale factor */
+#ifdef MRV_MRSZ_SCALE_HCB
+#endif /* MRV_MRSZ_SCALE_HCB */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hcr: horizontal Cr scale factor register (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcr:*/
+/* This register is set to the horizontal Cr downscale factor or to the */
+/* reciprocal of the horizontal Cr upscale factor */
+#ifdef MRV_MRSZ_SCALE_HCR
+#endif /* MRV_MRSZ_SCALE_HCR */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_vy: vertical luminance scale factor register (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: scale_vy:*/
+/* This register is set to the vertical luminance downscale factor or to the */
+/* reciprocal of the vertical luminance upscale factor */
+#ifdef MRV_MRSZ_SCALE_VY
+#endif /* MRV_MRSZ_SCALE_VY */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_vc: vertical chrominance scale factor register (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc:*/
+/* This register is set to the vertical chrominance downscale factor or to the */
+/* reciprocal of the vertical chrominance upscale factor */
+#ifdef MRV_MRSZ_SCALE_VC
+#endif /* MRV_MRSZ_SCALE_VC */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_hy: horizontal luminance phase register (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: phase_hy:*/
+/* This register is set to the horizontal luminance phase offset */
+#ifdef MRV_MRSZ_PHASE_HY
+#endif /* MRV_MRSZ_PHASE_HY */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_hc: horizontal chrominance phase register (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: phase_hc:*/
+/* This register is set to the horizontal chrominance phase offset */
+#ifdef MRV_MRSZ_PHASE_HC
+#endif /* MRV_MRSZ_PHASE_HC */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_vy: vertical luminance phase register (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: phase_vy:*/
+/* This register is set to the vertical luminance phase offset */
+#ifdef MRV_MRSZ_PHASE_VY
+#endif /* MRV_MRSZ_PHASE_VY */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_vc: vertical chrominance phase register (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: phase_vc:*/
+/* This register is set to the vertical chrominance phase offset */
+#ifdef MRV_MRSZ_PHASE_VC
+#endif /* MRV_MRSZ_PHASE_VC */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_lut_addr: Address pointer of up-scaling look up table
+ *           (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: scale_lut_addr:*/
+/* Pointer to entry of lookup table */
+#ifdef MRV_MRSZ_SCALE_LUT_ADDR
+#endif /* MRV_MRSZ_SCALE_LUT_ADDR */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_lut: Entry of up-scaling look up table (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: scale_lut:*/
+/* Entry of lookup table at position scale_lut_addr. The lookup table must be */
+/* filled with appropriate values before the up-scaling functionality can be */
+/* used.*/
+#ifdef MRV_MRSZ_SCALE_LUT
+#endif /* MRV_MRSZ_SCALE_LUT */
+/*****************************************************************************/
+/**
+ * register: mrsz_ctrl_shd: global control shadow register (0x0030)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc_up_shd:*/
+/* 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_VC_UP_SHD
+#define MRV_MRSZ_SCALE_VC_UP_SHD_UPSCALE        1	/* 1: vertical chrominance upscaling selected */
+#define MRV_MRSZ_SCALE_VC_UP_SHD_DOWNSCALE      0	/* 0: vertical chrominance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_VC_UP_SHD */
+/* Slice: scale_vy_up_shd:*/
+/* 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_VY_UP_SHD
+#define MRV_MRSZ_SCALE_VY_UP_SHD_UPSCALE        1	/* 1: vertical luminance upscaling selected */
+#define MRV_MRSZ_SCALE_VY_UP_SHD_DOWNSCALE      0	/* 0: vertical luminance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_VY_UP_SHD */
+/* Slice: scale_hc_up_shd:*/
+/* 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_HC_UP_SHD
+#define MRV_MRSZ_SCALE_HC_UP_SHD_UPSCALE        1	/* 1: horizontal chrominance upscaling selected */
+#define MRV_MRSZ_SCALE_HC_UP_SHD_DOWNSCALE      0	/* 0: horizontal chrominance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_HC_UP_SHD */
+/* Slice: scale_hy_up_shd:*/
+/* 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#ifdef MRV_MRSZ_SCALE_HY_UP_SHD
+#define MRV_MRSZ_SCALE_HY_UP_SHD_UPSCALE        1	/* 1: horizontal luminance upscaling selected */
+#define MRV_MRSZ_SCALE_HY_UP_SHD_DOWNSCALE      0	/* 0: horizontal luminance downscaling selected */
+#endif /* MRV_MRSZ_SCALE_HY_UP_SHD */
+/* Slice: scale_vc_enable_shd:*/
+/* 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#ifdef MRV_MRSZ_SCALE_VC_ENABLE_SHD
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHD_PROCESS    1	/* 1: enable vertical chrominance scaling unit */
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHD_BYPASS     0	/* 0: bypass vertical chrominance scaling unit */
+#endif /* MRV_MRSZ_SCALE_VC_ENABLE_SHD */
+/* Slice: scale_vy_enable_shd:*/
+/* 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#ifdef MRV_MRSZ_SCALE_VY_ENABLE_SHD
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHD_PROCESS    1	/* 1: enable vertical luminance scaling unit */
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHD_BYPASS     0	/* 0: bypass vertical luminance scaling unit */
+#endif /* MRV_MRSZ_SCALE_VY_ENABLE_SHD */
+/* Slice: scale_hc_enable_shd:*/
+/* 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#ifdef MRV_MRSZ_SCALE_HC_ENABLE_SHD
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHD_PROCESS    1	/* 1: enable horizontal chrominance scaling unit */
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHD_BYPASS     0	/* 0: bypass horizontal chrominance scaling unit */
+#endif /* MRV_MRSZ_SCALE_HC_ENABLE_SHD */
+/* Slice: scale_hy_enable_shd:*/
+/* 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#ifdef MRV_MRSZ_SCALE_HY_ENABLE_SHD
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHD_PROCESS    1	/* 1: enable horizontal luminance scaling unit */
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHD_BYPASS     0	/* 0: bypass horizontal luminance scaling unit */
+#endif /* MRV_MRSZ_SCALE_HY_ENABLE_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hy_shd: horizontal luminance scale factor shadow
+ *           register (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: scale_hy_shd:*/
+/* This register is set to the horizontal luminance downscale factor or to the */
+/* reciprocal of the horizontal luminance upscale factor */
+#ifdef MRV_MRSZ_SCALE_HY_SHD
+#endif /* MRV_MRSZ_SCALE_HY_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hcb_shd: horizontal Cb scale factor shadow register
+ *           (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcb_shd:*/
+/* This register is set to the horizontal Cb downscale factor or to the */
+/* reciprocal of the horizontal Cb upscale factor */
+#ifdef MRV_MRSZ_SCALE_HCB_SHD
+#endif /* MRV_MRSZ_SCALE_HCB_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_hcr_shd: horizontal Cr scale factor shadow register
+ *           (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcr_shd:*/
+/* This register is set to the horizontal Cr downscale factor or to the */
+/* reciprocal of the horizontal Cr upscale factor */
+#ifdef MRV_MRSZ_SCALE_HCR_SHD
+#endif /*  MRV_MRSZ_SCALE_HCR_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_vy_shd: vertical luminance scale factor shadow register
+ *           (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: scale_vy_shd:*/
+/* This register is set to the vertical luminance downscale factor or to the */
+/* reciprocal of the vertical luminance upscale factor */
+#ifdef MRV_MRSZ_SCALE_VY_SHD
+#endif /* MRV_MRSZ_SCALE_VY_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_scale_vc_shd: vertical chrominance scale factor shadow
+ *           register (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc_shd:*/
+/* This register is set to the vertical chrominance downscale factor or to */
+/* the reciprocal of the vertical chrominance upscale factor */
+#ifdef MRV_MRSZ_SCALE_VC_SHD
+#endif /* MRV_MRSZ_SCALE_VC_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_hy_shd: horizontal luminance phase shadow register
+ *           (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: phase_hy_shd:*/
+/* This register is set to the horizontal luminance phase offset */
+#ifdef MRV_MRSZ_PHASE_HY_SHD
+#endif /* MRV_MRSZ_PHASE_HY_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_hc_shd: horizontal chrominance phase shadow register
+ *           (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: phase_hc_shd:*/
+/* This register is set to the horizontal chrominance phase offset */
+#ifdef MRV_MRSZ_PHASE_HC_SHD
+#endif /* MRV_MRSZ_PHASE_HC_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_vy_shd: vertical luminance phase shadow register
+ *           (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: phase_vy_shd:*/
+/* This register is set to the vertical luminance phase offset */
+#ifdef MRV_MRSZ_PHASE_VY_SHD
+#endif /* MRV_MRSZ_PHASE_VY_SHD */
+/*****************************************************************************/
+/**
+ * register: mrsz_phase_vc_shd: vertical chrominance phase shadow register
+ *           (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: phase_vc_shd:*/
+/* This register is set to the vertical chrominance phase offset */
+#ifdef MRV_MRSZ_PHASE_VC_SHD
+#endif /* MRV_MRSZ_PHASE_VC_SHD */
+/*****************************************************************************/
+/* Self Resizer/Scaler Registers                                             */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: srsz_ctrl: global control register (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: cfg_upd:*/
+/* write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#ifdef MRV_SRSZ_CFG_UPD
+#endif /* MRV_SRSZ_CFG_UPD */
+/* Slice: scale_vc_up:*/
+/* 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_VC_UP
+#define MRV_SRSZ_SCALE_VC_UP_UPSCALE            1	/* 1: vertical chrominance upscaling selected */
+#define MRV_SRSZ_SCALE_VC_UP_DOWNSCALE          0	/* 0: vertical chrominance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_VC_UP */
+/* Slice: scale_vy_up:*/
+/* 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_VY_UP
+#define MRV_SRSZ_SCALE_VY_UP_UPSCALE            1	/* 1: vertical luminance upscaling selected */
+#define MRV_SRSZ_SCALE_VY_UP_DOWNSCALE          0	/* 0: vertical luminance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_VY_UP */
+/* Slice: scale_hc_up:*/
+/* 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_HC_UP
+#define MRV_SRSZ_SCALE_HC_UP_UPSCALE            1	/* 1: horizontal chrominance upscaling selected */
+#define MRV_SRSZ_SCALE_HC_UP_DOWNSCALE          0	/* 0: horizontal chrominance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_HC_UP */
+/* Slice: scale_hy_up:*/
+/* 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_HY_UP
+#define MRV_SRSZ_SCALE_HY_UP_UPSCALE            1	/* 1: horizontal luminance upscaling selected */
+#define MRV_SRSZ_SCALE_HY_UP_DOWNSCALE          0	/* 0: horizontal luminance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_HY_UP */
+/* Slice: scale_vc_enable:*/
+/* 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#ifdef MRV_SRSZ_SCALE_VC_ENABLE
+#define MRV_SRSZ_SCALE_VC_ENABLE_PROCESS        1	/* 1: enable vertical chrominance scaling unit */
+#define MRV_SRSZ_SCALE_VC_ENABLE_BYPASS         0	/* 0: bypass vertical chrominance scaling unit */
+#endif /* MRV_SRSZ_SCALE_VC_ENABLE */
+/* Slice: scale_vy_enable:*/
+/* 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#ifdef MRV_SRSZ_SCALE_VY_ENABLE
+#define MRV_SRSZ_SCALE_VY_ENABLE_PROCESS        1	/* 1: enable vertical luminance scaling unit */
+#define MRV_SRSZ_SCALE_VY_ENABLE_BYPASS         0	/* 0: bypass vertical luminance scaling unit */
+#endif /* MRV_SRSZ_SCALE_VY_ENABLE */
+/* Slice: scale_hc_enable:*/
+/* 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#ifdef MRV_SRSZ_SCALE_HC_ENABLE
+#define MRV_SRSZ_SCALE_HC_ENABLE_PROCESS        1	/* 1: enable horizontal chrominance scaling unit */
+#define MRV_SRSZ_SCALE_HC_ENABLE_BYPASS         0	/* 0: bypass horizontal chrominance scaling unit */
+#endif /* MRV_SRSZ_SCALE_HC_ENABLE */
+/* Slice: scale_hy_enable:*/
+/* 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#ifdef MRV_SRSZ_SCALE_HY_ENABLE
+#define MRV_SRSZ_SCALE_HY_ENABLE_PROCESS        1	/* 1: enable horizontal luminance scaling unit */
+#define MRV_SRSZ_SCALE_HY_ENABLE_BYPASS         0	/* 0: bypass horizontal luminance scaling unit */
+#endif /* MRV_SRSZ_SCALE_HY_ENABLE */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hy: horizontal luminance scale factor register
+ *           (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: scale_hy:*/
+/* This register is set to the horizontal luminance downscale factor or to */
+/* the reciprocal of the horizontal luminance upscale factor */
+#ifdef MRV_SRSZ_SCALE_HY
+#endif /* MRV_SRSZ_SCALE_HY */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hcb: horizontal Cb scale factor register (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcb:*/
+/* This register is set to the horizontal Cb downscale factor or to the */
+/* reciprocal of the horizontal Cb upscale factor */
+#ifdef MRV_SRSZ_SCALE_HCB
+#endif /* MRV_SRSZ_SCALE_HCB */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hcr: horizontal Cr scale factor register (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcr:*/
+/* This register is set to the horizontal Cr downscale factor or to the */
+/* reciprocal of the horizontal Cr upscale factor */
+#ifdef MRV_SRSZ_SCALE_HCR
+#endif /* MRV_SRSZ_SCALE_HCR */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_vy: vertical luminance scale factor register (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: scale_vy:*/
+/* This register is set to the vertical luminance downscale factor or to the */
+/* reciprocal of the vertical luminance upscale factor */
+#ifdef MRV_SRSZ_SCALE_VY
+#endif /* MRV_SRSZ_SCALE_VY */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_vc: vertical chrominance scale factor register (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc:*/
+/* This register is set to the vertical chrominance downscale factor or to the */
+/* reciprocal of the vertical chrominance upscale factor */
+#ifdef MRV_SRSZ_SCALE_VC
+#endif /* MRV_SRSZ_SCALE_VC */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_hy: horizontal luminance phase register (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: phase_hy:*/
+/* This register is set to the horizontal luminance phase offset */
+#ifdef MRV_SRSZ_PHASE_HY
+#endif /* MRV_SRSZ_PHASE_HY */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_hc: horizontal chrominance phase register (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: phase_hc:*/
+/* This register is set to the horizontal chrominance phase offset */
+#ifdef MRV_SRSZ_PHASE_HC
+#endif /* MRV_SRSZ_PHASE_HC */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_vy: vertical luminance phase register (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: phase_vy:*/
+/* This register is set to the vertical luminance phase offset */
+#ifdef MRV_SRSZ_PHASE_VY
+#endif /* MRV_SRSZ_PHASE_VY */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_vc: vertical chrominance phase register (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: phase_vc:*/
+/* This register is set to the vertical chrominance phase offset */
+#ifdef MRV_SRSZ_PHASE_VC
+#endif /* MRV_SRSZ_PHASE_VC */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_lut_addr: Address pointer of up-scaling look up table
+ *           (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: scale_lut_addr:*/
+/* Pointer to entry of lookup table */
+#ifdef MRV_SRSZ_SCALE_LUT_ADDR
+#endif /* MRV_SRSZ_SCALE_LUT_ADDR */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_lut: Entry of up-scaling look up table (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: scale_lut:*/
+/* Entry of lookup table at position scale_lut_addr. The lookup table must be */
+/* filled with appropriate values before the up-scaling functionality can be */
+/* used.*/
+#ifdef MRV_SRSZ_SCALE_LUT
+#endif /* MRV_SRSZ_SCALE_LUT */
+/*****************************************************************************/
+/**
+ * register: srsz_ctrl_shd: global control shadow register (0x0030)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc_up_shd:*/
+/* 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_VC_UP_SHD
+#define MRV_SRSZ_SCALE_VC_UP_SHD_UPSCALE        1	/* 1: vertical chrominance upscaling selected */
+#define MRV_SRSZ_SCALE_VC_UP_SHD_DOWNSCALE      0	/* 0: vertical chrominance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_VC_UP_SHD */
+/* Slice: scale_vy_up_shd:*/
+/* 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_VY_UP_SHD
+#define MRV_SRSZ_SCALE_VY_UP_SHD_UPSCALE        1	/* 1: vertical luminance upscaling selected */
+#define MRV_SRSZ_SCALE_VY_UP_SHD_DOWNSCALE      0	/* 0: vertical luminance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_VY_UP_SHD */
+/* Slice: scale_hc_up_shd:*/
+/* 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_HC_UP_SHD
+#define MRV_SRSZ_SCALE_HC_UP_SHD_UPSCALE        1	/* 1: horizontal chrominance upscaling selected */
+#define MRV_SRSZ_SCALE_HC_UP_SHD_DOWNSCALE      0	/* 0: horizontal chrominance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_HC_UP_SHD */
+/* Slice: scale_hy_up_shd:*/
+/* 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#ifdef MRV_SRSZ_SCALE_HY_UP_SHD
+#define MRV_SRSZ_SCALE_HY_UP_SHD_UPSCALE        1	/* 1: horizontal luminance upscaling selected */
+#define MRV_SRSZ_SCALE_HY_UP_SHD_DOWNSCALE      0	/* 0: horizontal luminance downscaling selected */
+#endif /* MRV_SRSZ_SCALE_HY_UP_SHD */
+/* Slice: scale_vc_enable_shd:*/
+/* 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#ifdef MRV_SRSZ_SCALE_VC_ENABLE_SHD
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHD_PROCESS    1	/* 1: enable vertical chrominance scaling unit */
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHD_BYPASS     0	/* 0: bypass vertical chrominance scaling unit */
+#endif /* MRV_SRSZ_SCALE_VC_ENABLE_SHD */
+/* Slice: scale_vy_enable_shd:*/
+/* 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#ifdef MRV_SRSZ_SCALE_VY_ENABLE_SHD
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHD_PROCESS    1	/* 1: enable vertical luminance scaling unit */
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHD_BYPASS     0	/* 0: bypass vertical luminance scaling unit */
+#endif /* MRV_SRSZ_SCALE_VY_ENABLE_SHD */
+/* Slice: scale_hc_enable_shd:*/
+/* 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#ifdef MRV_SRSZ_SCALE_HC_ENABLE_SHD
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHD_PROCESS    1	/* 1: enable horizontal chrominance scaling unit */
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHD_BYPASS     0	/* 0: bypass horizontal chrominance scaling unit */
+#endif /* MRV_SRSZ_SCALE_HC_ENABLE_SHD */
+/* Slice: scale_hy_enable_shd:*/
+/* 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#ifdef MRV_SRSZ_SCALE_HY_ENABLE_SHD
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHD_PROCESS    1	/* 1: enable horizontal luminance scaling unit */
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHD_BYPASS     0	/* 0: bypass horizontal luminance scaling unit */
+#endif /* MRV_SRSZ_SCALE_HY_ENABLE_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hy_shd: horizontal luminance scale factor shadow
+ *           register (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: scale_hy_shd:*/
+/* This register is set to the horizontal luminance downscale factor or to the */
+/* reciprocal of the horizontal luminance upscale factor */
+#ifdef MRV_SRSZ_SCALE_HY_SHD
+#endif /* MRV_SRSZ_SCALE_HY_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hcb_shd: horizontal Cb scale factor shadow register
+ *           (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcb_shd:*/
+/* This register is set to the horizontal Cb downscale factor or to the */
+/* reciprocal of the horizontal Cb upscale factor */
+#ifdef MRV_SRSZ_SCALE_HCB_SHD
+#endif /* MRV_SRSZ_SCALE_HCB_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_hcr_shd: horizontal Cr scale factor shadow register
+ *           (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: scale_hcr_shd:*/
+/* This register is set to the horizontal Cr downscale factor or to the */
+/* reciprocal of the horizontal Cr upscale factor */
+#ifdef MRV_SRSZ_SCALE_HCR_SHD
+#endif /*  MRV_SRSZ_SCALE_HCR_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_vy_shd: vertical luminance scale factor shadow register
+ *           (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: scale_vy_shd:*/
+/* This register is set to the vertical luminance downscale factor or to the */
+/* reciprocal of the vertical luminance upscale factor */
+#ifdef MRV_SRSZ_SCALE_VY_SHD
+#endif /* MRV_SRSZ_SCALE_VY_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_scale_vc_shd: vertical chrominance scale factor shadow
+ *           register (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: scale_vc_shd:*/
+/* This register is set to the vertical chrominance downscale factor or to */
+/* the reciprocal of the vertical chrominance upscale factor */
+#ifdef MRV_SRSZ_SCALE_VC_SHD
+#endif /* MRV_SRSZ_SCALE_VC_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_hy_shd: horizontal luminance phase shadow register
+ *           (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: phase_hy_shd:*/
+/* This register is set to the horizontal luminance phase offset */
+#ifdef MRV_SRSZ_PHASE_HY_SHD
+#endif /* MRV_SRSZ_PHASE_HY_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_hc_shd: horizontal chrominance phase shadow register
+ *           (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: phase_hc_shd:*/
+/* This register is set to the horizontal chrominance phase offset */
+#ifdef MRV_SRSZ_PHASE_HC_SHD
+#endif /* MRV_SRSZ_PHASE_HC_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_vy_shd: vertical luminance phase shadow register
+ *           (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: phase_vy_shd:*/
+/* This register is set to the vertical luminance phase offset */
+#ifdef MRV_SRSZ_PHASE_VY_SHD
+#endif /* MRV_SRSZ_PHASE_VY_SHD */
+/*****************************************************************************/
+/**
+ * register: srsz_phase_vc_shd: vertical chrominance phase shadow register
+ *           (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: phase_vc_shd:*/
+/* This register is set to the vertical chrominance phase offset */
+#ifdef MRV_SRSZ_PHASE_VC_SHD
+#endif /* MRV_SRSZ_PHASE_VC_SHD */
+/*****************************************************************************/
+/* Memory Interface Registers                                                */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: mi_ctrl: Global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: sp_output_format:*/
+/* Selects output format of self picture. For possible restrictions see sub-*/
+/* chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+     /**/
+/* 111: reserved */
+/* 110: RGB 888 */
+/* 101: RGB 666 */
+/* 100: RGB 565 */
+     /**/
+/* 011: YCbCr  4:4:4 */
+/* 010: YCbCr  4:2:2 */
+/* 001: YCbCr  4:2:0 */
+/* 000: YCbCr  4:0:0 */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+/* - for RGB output format the SP input format must be YCbCr 4:2:2 */
+#ifdef MRV_MI_SP_OUTPUT_FORMAT
+#define MRV_MI_SP_OUTPUT_FORMAT_RGB888          6	/* 110: RGB 888 */
+#define MRV_MI_SP_OUTPUT_FORMAT_RGB666          5	/* 101: RGB 666 */
+#define MRV_MI_SP_OUTPUT_FORMAT_RGB565          4	/* 100: RGB 565 */
+#define MRV_MI_SP_OUTPUT_FORMAT_YUV444          3	/* 011: YCbCr 4:4:4 */
+#define MRV_MI_SP_OUTPUT_FORMAT_YUV422          2	/* 010: YCbCr 4:2:2 */
+#define MRV_MI_SP_OUTPUT_FORMAT_YUV420          1	/* 001: YCbCr 4:2:0 */
+#define MRV_MI_SP_OUTPUT_FORMAT_YUV400          0	/* 000: YCbCr 4:0:0 */
+#endif /* MRV_MI_SP_OUTPUT_FORMAT */
+/* Slice: sp_input_format:*/
+/* Selects input format of self picture. For possible restrictions see sub-*/
+/* chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+     /**/
+/* 11: YCbCr  4:4:4 */
+/* 10: YCbCr  4:2:2 */
+/* 01: YCbCr  4:2:0 */
+/* 00: YCbCr  4:0:0 */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_INPUT_FORMAT
+#define MRV_MI_SP_INPUT_FORMAT_YUV444           3	/* 11: YCbCr  4:4:4 */
+#define MRV_MI_SP_INPUT_FORMAT_YUV422           2	/* 10: YCbCr  4:2:2 */
+#define MRV_MI_SP_INPUT_FORMAT_YUV420           1	/* 01: YCbCr  4:2:0 */
+#define MRV_MI_SP_INPUT_FORMAT_YUV400           0	/* 00: YCbCr  4:0:0 */
+#endif /* MRV_MI_SP_INPUT_FORMAT */
+/* Slice: sp_write_format:*/
+/* Defines how YCbCr self picture data is written to memory. Ignored if */
+/* RGB conversion is chosen. With RGB conversion active the output format */
+/* is always interleaved.*/
+     /**/
+/* 00: planar */
+/* 01: semi planar, for YCbCr 4:2:x */
+/* 10: interleaved (combined), for YCbCr 4:2:2 only */
+/* 11: reserved */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_WRITE_FORMAT
+#define MRV_MI_SP_WRITE_FORMAT_PLANAR           0	/* 00: planar */
+#define MRV_MI_SP_WRITE_FORMAT_SEMIPLANAR       1	/* 01: semi planar, for YCbCr 4:2:x */
+#define MRV_MI_SP_WRITE_FORMAT_INTERLEAVED      2	/* 10: interleaved (combined), for YCbCr 4:2:2 only */
+#define MRV_MI_SP_WRITE_FORMAT_RGB_INTERLEAVED  0	/* 00: hw expects a 0 in RGB mode */
+#endif /* MRV_MI_SP_WRITE_FORMAT */
+/* Slice: mp_write_format:*/
+/* Defines how YCbCr main picture data is written to memory.*/
+/* Ignored if JPEG data is chosen.*/
+/* In YCbCr mode the following meaning is applicable */
+/* 00: planar */
+/* 01: semi planar, for YCbCr 4:2:x */
+/* 10: interleaved (combined), for YCbCr 4:2:2 only */
+/* 11: reserved */
+/* In RAW data mode the following meaning is applicable */
+/* 00: RAW 8 bit */
+/* 01: reserved */
+/* 10: RAW 12 bit */
+/* 11: reserved */
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the main path.*/
+#ifdef MRV_MI_MP_WRITE_FORMAT
+#define MRV_MI_MP_WRITE_FORMAT_PLANAR           0	/* 00: planar */
+#define MRV_MI_MP_WRITE_FORMAT_SEMIPLANAR       1	/* 01: semi planar, for YCbCr 4:2:x */
+#define MRV_MI_MP_WRITE_FORMAT_INTERLEAVED      2	/* 10: interleaved (combined), for YCbCr 4:2:2 only */
+#define MRV_MI_MP_WRITE_FORMAT_RAW_8            0	/* 0x: RAW 8 bit */
+#define MRV_MI_MP_WRITE_FORMAT_RAW_12           2	/* 1x: RAW 12 bit */
+#endif /* MRV_MI_MP_WRITE_FORMAT */
+/* Slice: bp_write_format:*/
+/* In RAW data mode the following meaning is applicable */
+/* 00: RAW 8 bit */
+/* 01: RAW 10 bit */
+/* 10: RAW 12 bit */
+/* 11: reserved */
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the main path.*/
+#ifdef MRV_MI_BP_WRITE_RAWBIT
+#define MRV_MI_BP_WRITE_RAWBIT_RAW_8            0	/* 0x: RAW 8 bit */
+#define MRV_MI_BP_WRITE_RAWBIT_RAW_10           1	/* 01x: RAW 10 bit */
+#define MRV_MI_BP_WRITE_RAWBIT_RAW_12           2	/* 10x: RAW 12 bit */
+#endif /* MRV_MI_BP_WRITE_RAWBIT */
+/* Slice: init_offset_en:*/
+/* Enables updating of the offset counters shadow registers for */
+/* main and self picture to the programmed register init values.*/
+     /**/
+/* MI_MP/SP_Y/CB/CR_OFFS_CNT_INIT */
+/* -> MI_MP/SP_Y/CB/CR_OFFS_CNT_SHD */
+     /**/
+/* The update will be executed either when a forced software */
+/* update occurs (in register MI_INIT bit cfg_upd = 1) or when */
+/* an automatic config update signal arrives at the MI input port.*/
+/* The latter is split into main and self picture. So only the */
+/* corresponding main/self shadow registers are affected.*/
+/* After a picture skip has been performed init_offset_en selects */
+/* between skip restart and skip init mode (see bit skip in */
+/* register MI_INIT).*/
+#ifdef MRV_MI_INIT_OFFSET_EN
+#endif /* MRV_MI_INIT_OFFSET_EN */
+/* Slice: init_base_en:*/
+/* Enables updating of the base address and buffer size shadow */
+/* registers for main and self picture to the programmed register */
+/* init values.*/
+     /**/
+/* MI_MP/SP_Y/CB/CR_BASE_AD_INIT */
+/* -> MI_MP/SP_Y/CB/CR_BASE_AD_SHD */
+     /**/
+/* MI_MP/SP_Y/CB/CR_SIZE_INIT */
+/* -> MI_MP/SP_Y/CB/CR_SIZE_SHD */
+     /**/
+/* The update will be executed either when a forced software */
+/* update occurs (in register MI_INIT bit cfg_upd = 1) or when */
+/* an automatic config update signal arrives at the MI input port.*/
+/* The latter is split into main and self picture. So only the */
+/* corresponding main/self shadow registers are affected.*/
+#ifdef MRV_MI_INIT_BASE_EN
+#endif /* MRV_MI_INIT_BASE_EN */
+/* Slice: burst_len_chrom:*/
+/* Burst length for Cb or Cr data affecting write port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported. If rotation */
+/* is active, then only 4-beat bursts will be generated in self path,*/
+/* regardless of the setting here.*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the main and self path.*/
+#ifdef MRV_MI_BURST_LEN_CHROM
+#define MRV_MI_BURST_LEN_CHROM_4                0	/* 0: 4-beat bursts */
+#define MRV_MI_BURST_LEN_CHROM_8                1	/* 1: 8-beat bursts */
+#define MRV_MI_BURST_LEN_CHROM_16               2	/* 2: 16-beat bursts */
+#endif /* MRV_MI_BURST_LEN_CHROM */
+/* Slice: burst_len_lum:*/
+/* Burst length for Y, JPEG, or raw data affecting write port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+     /**/
+/* Note: Programmed value becomes effective immediately. So write to */
+/* the register only if no picture data is sent to the main and self path.*/
+#ifdef MRV_MI_BURST_LEN_LUM
+#define MRV_MI_BURST_LEN_LUM_4                  0	/* 0: 4-beat bursts */
+#define MRV_MI_BURST_LEN_LUM_8                  1	/* 1: 8-beat bursts */
+#define MRV_MI_BURST_LEN_LUM_16                 2	/* 2: 16-beat bursts */
+#endif /* MRV_MI_BURST_LEN_LUM */
+/* Slice: last_pixel_sig_en:*/
+/* enables the last pixel signalization */
+/* 1: enabled */
+/* 0: disabled */
+#ifdef MRV_MI_LAST_PIXEL_SIG_EN
+#define MRV_MI_LAST_PIXEL_SIG_EN_ENABLE         1	/* 1: enable last pixel signalization */
+#define MRV_MI_LAST_PIXEL_SIG_EN_DISABLE        0	/* 0: disable last pixel signalization */
+#endif /* MRV_MI_LAST_PIXEL_SIG_EN */
+/* Slice: 422noncosited:*/
+/* Enables self path YCbCr422non-co-sited -> YCbCr444 interpolation */
+/* 1: YCbCr422 data are non_co-sited (Cb and Cr samples */
+/*    are centered between Y samples) so modified interpolation */
+/*    is activated */
+/* 0: YCbCr422 data are co-sited (Y0 Cb0 and Cr0 are */
+/*    sampled at the same position)*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_422NONCOSITED
+#endif /* MRV_MI_422NONCOSITED */
+/* Slice: cbcr_full_range:*/
+/* Enables CbCr full range for self path YCbCr -> RGB conversion */
+/* 1: CbCr have full range (0..255)*/
+/* 0: CbCr have compressed range range (16..240)*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_CBCR_FULL_RANGE
+#endif /* MRV_MI_CBCR_FULL_RANGE */
+/* Slice: y_full_range:*/
+/* Enables Y full range for self path YCbCr -> RGB conversion */
+/* 1: Y has full range (0..255)*/
+/* 0: Y has compressed range (16..235)*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_Y_FULL_RANGE
+#endif /* MRV_MI_Y_FULL_RANGE */
+/* Slice: byte_swap:*/
+/* Enables change of byte order of the 32 bit output word at write port */
+/* 1: byte order is mirrored but the bit order within one byte doesn't */
+/*    change */
+/* 0: no byte mirroring */
+     /**/
+/* Note: Programmed value becomes effective immediately. So write to the */
+/* register only if no picture data is sent to the main and self path.*/
+#ifdef MRV_MI_BYTE_SWAP
+#endif /* MRV_MI_BYTE_SWAP */
+/* Slice: rot:*/
+/* Rotation 90 degree counter clockwise of self picture, only in RGB */
+/* mode. For picture orientation and operation modes see sub-chapter */
+/* "Picture Orientation" in chapter "Self Path Output Programming".*/
+     /**/
+/* For RGB 565 format the line length must be a multiple of 2. There */
+/* are no restrictions for RGB 888/666.*/
+/* 1: enabled */
+/* 0: disabled */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path. In */
+/*   rotation mode only 4-beat bursts are supported for self-path.*/
+#ifdef MRV_MI_ROT
+#endif /* MRV_MI_ROT */
+/* Slice: v_flip:*/
+/* Vertical flipping of self picture. For picture orientation and */
+/* operation modes see sub-chapter "Picture Orientation" in chapter */
+/* "Self Path Output Programming". For Y component the line length */
+/* in 4:2:x planar mode must be a multiple of 8, for all other component */
+/* modes a multiple of 4 and for RGB 565 a multiple of 2. There are */
+/* no restrictions for RGB 888/666.*/
+     /**/
+/* 1: enabled */
+/* 0: disabled */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_V_FLIP
+#endif /* MRV_MI_V_FLIP */
+/* Slice: h_flip:*/
+/* Horizontal flipping of self picture. For picture orientation and */
+/* operation modes see sub-chapter "Picture Orientation" in chapter */
+/* "Self Path Output Programming".*/
+     /**/
+/* For Y component the line length in 4:2:x planar mode must be a */
+/* multiple of 8, for all other component modes a multiple of 4 and */
+/* for RGB 565 a multiple of 2. There are no restrictions for RGB 888/666.*/
+     /**/
+/* 1: enabled */
+/* 0: disabled */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the */
+/*   register only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_H_FLIP
+#endif /* MRV_MI_H_FLIP */
+/* Programmed value becomes effective (visible in shadow register)*/
+/* after a soft reset, a forced software update or an automatic */
+/* config update.  Affects MI_IN and MI_OUT module.*/
+/* Slice: raw_enable:*/
+/* Enables raw data */
+/* Programmed value becomes effective (visible in control shadow register) after a soft reset or a forced software update.*/
+/* Affects MI_IN and MI_OUT module.*/
+#ifndef MRV_MI_RAW_ENABLE
+#define MRV_MI_RAW_ENABLE
+#define MRV_MI_RAW_ENABLE_MASK 0x00000008
+#define MRV_MI_RAW_ENABLE_SHIFT 3
+#endif /* MRV_MI_RAW_ENABLE */
+/* Slice: dpcc_enable:*/
+/* Enables DPCC data */
+/* Programmed value becomes effective (visible in control shadow register) after a soft reset or a forced software.*/
+/* Affects MI_IN and MI_OUT module.*/
+#ifndef MRV_MI_DPCC_ENABLE
+#define MRV_MI_DPCC_ENABLE
+#define MRV_MI_DPCC_ENABLE_MASK 0x0000000C
+#define MRV_MI_DPCC_ENABLE_SHIFT 2
+#endif /* MRV_MI_JPEG_ENABLE */
+/* Slice: jpeg_enable:*/
+/* Enables JPEG data */
+/* Programmed value becomes effective (visible in control shadow register) after a soft reset or a forced software.*/
+/* Affects MI_IN and MI_OUT module.*/
+#ifndef MRV_MI_JPEG_ENABLE
+#define MRV_MI_JPEG_ENABLE
+#define MRV_MI_JPEG_ENABLE_MASK 0x00000004
+#define MRV_MI_JPEG_ENABLE_SHIFT 2
+#endif /* MRV_MI_JPEG_ENABLE */
+/* Slice: sp_enable:*/
+/* Enables self picture data path.*/
+/* Programmed value becomes effective (visible in control shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Affects MI_IN and MI_OUT module.*/
+#ifndef MRV_MI_SP_ENABLE
+#define MRV_MI_SP_ENABLE
+#define MRV_MI_SP_ENABLE_MASK 0x00000002
+#define MRV_MI_SP_ENABLE_SHIFT 1
+#endif /* MRV_MI_SP_ENABLE */
+/* Slice: mp_enable:*/
+/* Enables main picture data path */
+/* Programmed value becomes effective (visible in control shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Affects MI_IN and MI_OUT module.*/
+#ifndef MRV_MI_MP_ENABLE
+#define MRV_MI_MP_ENABLE
+#define MRV_MI_MP_ENABLE_MASK 0x00000001
+#define MRV_MI_MP_ENABLE_SHIFT 0
+#endif /* MRV_MI_MP_ENABLE */
+/* Slice: path_enable:*/
+/* Enables data pathes of MI according to the following table:*/
+     /**/
+/* 0000: disabled, no data is transferred */
+/* 0001: YUV data output, mainpath only (mp_enable only)*/
+/* 0010: self-path only, output data format depending on other settings (sp_enable only)*/
+/* 0011: YUV data output in mainpath and self-path image data active */
+/* 0100: JPEG data output, mainpath only (jpeg_enable only)*/
+/* 0101: not allowed */
+/* 0110: JPEG data output in mainpath and self-path image data active */
+/* 0111: not allowed */
+/* 1000: RAW data output, mainpath only (raw_enable only)*/
+/* 1001: defect pixel data on self-path, image data on mainpath */
+/* 1010: defect pixel data on mainpath, image data on self-path */
+/* 1011: not allowed */
+/* 1100: defect pixel data on self-path, JPEG data on mainpath */
+/* 1101: defect pixel data on mainpath only */
+/* 1110: defect pixel data on self-path only */
+/* 1111: defect pixel data on self-path, RAW data on mainpath */
+#ifdef MRV_MI_PATH_ENABLE
+#endif /* MRV_MI_PATH_ENABLE */
+/*****************************************************************************/
+/**
+ * register: mi_init: Control register for address init and skip function
+ *           (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: mi_cfg_upd:*/
+/* Forced configuration update. Leads to an immediate update of the shadow registers.*/
+/* Depending on the two init enable bits in the MI_CTRL register (init_offset_en and */
+/* init_base_en) the offset counter, base address and buffer size shadow registers */
+/* are also updated.*/
+#ifdef MRV_MI_MI_CFG_UPD
+#endif /* MRV_MI_MI_CFG_UPD */
+/* Slice: mp_output_format:*/
+/* Selects output format of main picture.*/
+/* 1xxx: Reserved */
+/* 0111: RAW10 */
+/* 0110: JPEG */
+/* 0101: RAW8 */
+/* 0100: RAW12 */
+     /**/
+/* 0011: YCbCr  4:4:4 */
+/* 0010: YCbCr  4:2:2 */
+/* 0001: YCbCr  4:2:0 */
+/* 0000: YCbCr  4:0:0 */
+     /**/
+#ifdef MRV_MI_MP_OUTPUT_FORMAT
+#define MRV_MI_MP_OUTPUT_FORMAT_RAW10           7	/* 0111: RAW10 */
+#define MRV_MI_MP_OUTPUT_FORMAT_JPEG            6	/* 0110: JPEG */
+#define MRV_MI_MP_OUTPUT_FORMAT_RAW8            5	/* 0101: RAW8 */
+#define MRV_MI_MP_OUTPUT_FORMAT_RAW12           4	/* 0100: RAW12 */
+#define MRV_MI_MP_OUTPUT_FORMAT_YUV444          3	/* 0011: YCbCr 4:4:4 */
+#define MRV_MI_MP_OUTPUT_FORMAT_YUV422          2	/* 0010: YCbCr 4:2:2 */
+#define MRV_MI_MP_OUTPUT_FORMAT_YUV420          1	/* 0001: YCbCr 4:2:0 */
+#define MRV_MI_MP_OUTPUT_FORMAT_YUV400          0	/* 0000: YCbCr 4:0:0 */
+#endif /* MRV_MI_MP_OUTPUT_FORMAT */
+/* Slice: mi_skip:*/
+/* Skip of current or next starting main picture:*/
+/* Aborts writing of main picture image data of the current frame to RAM (after the */
+/* current burst transmission has been completed). Further main picture data up to */
+/* the end of the current frame are discarded.*/
+     /**/
+/* No further makroblock line interrupt (mblk_line), no wrap around interrupt for */
+/* main picture (wrap_mp_y/cb/cr) and no fill level interrupt (fill_mp_y) are generated.*/
+     /**/
+/* Skip does not affect the generation of the main path frame end interrupt (mp_frame_end).*/
+/* Skip does not affect the processing of self picture and its corresponding interrupts */
+/* namely the self path frame end interrupt (sp_frame_end).*/
+     /**/
+/* The byte counter (register MI_BYTE_CNT) is not affected. It produces the correct */
+/* number of JPEG or RAW data bytes at the end of the current (skipped) frame.*/
+     /**/
+/* After a skip has been performed the offset counter for the main picture at the start */
+/* of the following frame are set depending on the bit init_offset_en in register MI_CTRL:*/
+     /**/
+/* - Skip restart mode (init_offset_en = 0)*/
+/*   The offset counters of the main picture are restarted at the old start values of */
+/*   the previous skipped frame.*/
+     /**/
+/* - Skip init mode (init_offset_en = 1)*/
+/*   The offset counters of the main picture are initialized with the register contents */
+/*   of the offset counter init registers without any additional forced software update */
+/*   or automatic config update.*/
+#ifdef MRV_MI_MI_SKIP
+#endif /* MRV_MI_MI_SKIP */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_base_ad_init: Base address for main picture Y component,
+ *           JPEG or raw data (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_base_ad_init:*/
+/* Base address of main picture Y component ring buffer, JPEG ring buffer or raw */
+/* data ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_BASE_AD_INIT
+#define MRV_MI_MP_Y_BASE_AD_INIT_VALID_MASK     (MRV_MI_MP_Y_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_size_init: Size of main picture Y component, JPEG or raw
+ *           data (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_size_init:*/
+/* Size of main picture Y component ring buffer, JPEG ring buffer or raw data */
+/* ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_SIZE_INIT
+#define MRV_MI_MP_Y_SIZE_INIT_VALID_MASK        (MRV_MI_MP_Y_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_offs_cnt_init: Offset counter init value for main picture
+ *           Y, JPEG or raw data (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_offs_cnt_init:*/
+/* Offset counter init value of main picture Y component ring buffer, JPEG ring */
+/* buffer or raw data ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_OFFS_CNT_INIT
+#define MRV_MI_MP_Y_OFFS_CNT_INIT_VALID_MASK    (MRV_MI_MP_Y_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_offs_cnt_start: Offset counter start value for main picture
+ *           Y, JPEG or raw data (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_offs_cnt_start:*/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (main picture Y component, JPEG or raw data). Updated at */
+/* frame end.*/
+     /**/
+/* Note: A soft reset resets the contents to the reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_OFFS_CNT_START
+#define MRV_MI_MP_Y_OFFS_CNT_START_VALID_MASK   (MRV_MI_MP_Y_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_irq_offs_init: Fill level interrupt offset value for main
+ *           picture Y, JPEG or raw data (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_irq_offs_init:*/
+/* Reaching this programmed value by the current offset counter for addressing */
+/* main picture Y component, JPEG or raw data leads to generation of fill level */
+/* interrupt fill_mp_y.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_IRQ_OFFS_INIT
+#define MRV_MI_MP_Y_IRQ_OFFS_INIT_VALID_MASK    (MRV_MI_MP_Y_IRQ_OFFS_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_IRQ_OFFS_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_base_ad_init: Base address for main picture Cb component
+ *           ring buffer (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_base_ad_init:*/
+/* Base address of main picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or */
+/*       automatic update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_BASE_AD_INIT
+#define MRV_MI_MP_CB_BASE_AD_INIT_VALID_MASK    (MRV_MI_MP_CB_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CB_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_size_init: Size of main picture Cb component ring buffer
+ *           (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_size_init:*/
+/* Size of main picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or */
+/*       automatic update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_SIZE_INIT
+#define MRV_MI_MP_CB_SIZE_INIT_VALID_MASK       (MRV_MI_MP_CB_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CB_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_offs_cnt_init: Offset counter init value for main picture
+ *           Cb component ring buffer (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_offs_cnt_init:*/
+/* Offset counter init value of main picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic */
+/*       update can take effect. Check exceptional handling in skip modes.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_OFFS_CNT_INIT
+#define MRV_MI_MP_CB_OFFS_CNT_INIT_VALID_MASK   (MRV_MI_MP_CB_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CB_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_offs_cnt_start: Offset counter start value for main
+ *           picture Cb component ring buffer (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_offs_cnt_start:*/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (main picture Cb component). Updated at frame end.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_OFFS_CNT_START
+#define MRV_MI_MP_CB_OFFS_CNT_START_VALID_MASK  (MRV_MI_MP_CB_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CB_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_base_ad_init: Base address for main picture Cr component
+ *           ring buffer (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_base_ad_init:*/
+/* Base address of main picture Cr component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_BASE_AD_INIT
+#define MRV_MI_MP_CR_BASE_AD_INIT_VALID_MASK    (MRV_MI_MP_CR_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CR_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_size_init: Size of main picture Cr component ring buffer
+ *           (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_size_init:*/
+/* Size of main picture Cr component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_SIZE_INIT
+#define MRV_MI_MP_CR_SIZE_INIT_VALID_MASK       (MRV_MI_MP_CR_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CR_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_offs_cnt_init: Offset counter init value for main
+ *           picture Cr component ring buffer (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_offs_cnt_init:*/
+/* Offset counter init value of main picture Cr component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect. Check exceptional handling in skip modes.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_OFFS_CNT_INIT
+#define MRV_MI_MP_CR_OFFS_CNT_INIT_VALID_MASK   (MRV_MI_MP_CR_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CR_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_offs_cnt_start: Offset counter start value for main
+ *           picture Cr component ring buffer (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_offs_cnt_start:*/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (main picture Cr component). Updated at frame end.*/
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_OFFS_CNT_START
+#define MRV_MI_MP_CR_OFFS_CNT_START_VALID_MASK  (MRV_MI_MP_CR_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_CR_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_base_ad_init: Base address for self picture Y component
+ *           ring buffer (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_base_ad_init:*/
+/* Base address of self picture Y component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_BASE_AD_INIT
+#define MRV_MI_SP_Y_BASE_AD_INIT_VALID_MASK     (MRV_MI_SP_Y_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_Y_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_size_init: Size of self picture Y component ring buffer
+ *           (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_size_init:*/
+/* Size of self picture Y component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or */
+/*       automatic update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_SIZE_INIT
+#define MRV_MI_SP_Y_SIZE_INIT_VALID_MASK        (MRV_MI_SP_Y_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_Y_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_offs_cnt_init: Offset counter init value for self
+ *           picture Y component ring buffer (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_offs_cnt_init:*/
+/* Offset counter init value of self picture Y component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or */
+/*       automatic update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_OFFS_CNT_INIT
+#define MRV_MI_SP_Y_OFFS_CNT_INIT_VALID_MASK    (MRV_MI_SP_Y_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_Y_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_offs_cnt_start: Offset counter start value for self
+ *           picture Y component ring buffer (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_offs_cnt_start:*/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (self picture Y component). Updated at frame end.*/
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_OFFS_CNT_START
+#define MRV_MI_SP_Y_OFFS_CNT_START_VALID_MASK   (MRV_MI_SP_Y_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_Y_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_llength: Line length of self picture Y component (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_llength:*/
+/* Line length of self picture Y component or RGB picture in pixel, also */
+/* known as line stride.*/
+     /**/
+/* If no line stride is used, line length must match image width.*/
+     /**/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8,*/
+/* for all other component modes a multiple of 4 and for RGB 565 a multiple of 2.*/
+/* There are no restrictions for RGB 888/666.*/
+     /**/
+/* In planar mode the line length of the Cb and Cr component is assumed according */
+/* to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4. In semi */
+/* planar 4:2:x mode the line length of the Cb and Cr component is assumed the */
+/* same size.*/
+     /**/
+/* Note:*/
+/* - Line length always refers to the line length of the output image. This */
+/*   is particularly important when rotating.*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the register */
+/*   only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_Y_LLENGTH
+#define MRV_MI_SP_Y_LLENGTH_VALID_MASK          (MRV_MI_SP_Y_LLENGTH_MASK & ~0x00000000)
+#endif /* MRV_MI_SP_Y_LLENGTH */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_base_ad_init: Base address for self picture Cb component
+ *           ring buffer (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_base_ad_init:*/
+/* Base address of self picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note: Set control bit init_base_en before updating so that a forced or */
+/*       automatic update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_BASE_AD_INIT
+#define MRV_MI_SP_CB_BASE_AD_INIT_VALID_MASK    (MRV_MI_SP_CB_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CB_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_size_init: Size of self picture Cb component ring buffer
+ *           (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_size_init:*/
+/* Size of self picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_SIZE_INIT
+#define MRV_MI_SP_CB_SIZE_INIT_VALID_MASK       (MRV_MI_SP_CB_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CB_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_offs_cnt_init: Offset counter init value for self picture
+ *           Cb component ring buffer (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_offs_cnt_init:*/
+/* Offset counter init value of self picture Cb component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_OFFS_CNT_INIT
+#define MRV_MI_SP_CB_OFFS_CNT_INIT_VALID_MASK   (MRV_MI_SP_CB_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CB_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_offs_cnt_start: Offset counter start value for self
+ *           picture Cb component ring buffer (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_offs_cnt_start:*/
+     /**/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (self picture Cb component). Updated at frame end.*/
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_OFFS_CNT_START
+#define MRV_MI_SP_CB_OFFS_CNT_START_VALID_MASK  (MRV_MI_SP_CB_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CB_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_base_ad_init: Base address for self picture Cr component
+ *           ring buffer (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_base_ad_init:*/
+/* Base address of self picture Cr component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_BASE_AD_INIT
+#define MRV_MI_SP_CR_BASE_AD_INIT_VALID_MASK    (MRV_MI_SP_CR_BASE_AD_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CR_BASE_AD_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_size_init: Size of self picture Cr component ring buffer
+ *           (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_size_init:*/
+/* Size of self picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_SIZE_INIT
+#define MRV_MI_SP_CR_SIZE_INIT_VALID_MASK       (MRV_MI_SP_CR_SIZE_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CR_SIZE_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_offs_cnt_init: Offset counter init value for self
+ *           picture Cr component ring buffer (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_offs_cnt_init:*/
+/* Offset counter init value of self picture Cr component ring buffer.*/
+     /**/
+/* Programmed value becomes effective (visible in corresponding shadow register)*/
+/* after a soft reset, a forced software update or an automatic config update.*/
+     /**/
+/* Note:*/
+/* - Set control bit init_base_en before updating so that a forced or automatic */
+/*   update can take effect.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_OFFS_CNT_INIT
+#define MRV_MI_SP_CR_OFFS_CNT_INIT_VALID_MASK   (MRV_MI_SP_CR_OFFS_CNT_INIT_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CR_OFFS_CNT_INIT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_offs_cnt_start: Offset counter start value for self
+ *           picture Cr component ring buffer (0x0000006c)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_offs_cnt_start:*/
+/* Offset counter value which points to the start address of the previously */
+/* processed picture (self picture Cr component). Updated at frame end.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_OFFS_CNT_START
+#define MRV_MI_SP_CR_OFFS_CNT_START_VALID_MASK  (MRV_MI_SP_CR_OFFS_CNT_START_MASK & ~0x00000007)
+#endif /* MRV_MI_SP_CR_OFFS_CNT_START */
+/*****************************************************************************/
+/**
+ * register: mi_byte_cnt: Counter value of JPEG or RAW data bytes (0x00000070)
+ *
+ *****************************************************************************/
+/* Slice: byte_cnt:*/
+/* Counter value specifies the number of JPEG or RAW data bytes of the last */
+/* transmitted frame. Updated at frame end.*/
+     /**/
+/* A soft reset will set the byte counter to zero.*/
+#ifdef MRV_MI_BYTE_CNT
+#endif /* MRV_MI_BYTE_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_ctrl_shd: global control internal shadow register (0x00000074)
+ *
+ *****************************************************************************/
+/* Slice: path_enable_out:*/
+/* path_enable shadow register for module MI_OUT (former raw_enable_out,*/
+/* jpeg_enable_out, sp_enable_out, mp_enable_out)*/
+#ifdef MRV_MI_PATH_ENABLE_OUT
+#endif /* MRV_MI_PATH_ENABLE_OUT */
+/* Slice: path_enable_in:*/
+/* path_enable shadow register for module MI_IN (former raw_enable_in,*/
+/* jpeg_enable_in, sp_enable_in, mp_enable_in)*/
+#ifdef MRV_MI_PATH_ENABLE_IN
+#endif /* MRV_MI_PATH_ENABLE_IN */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_base_ad_shd: Base address shadow register for main
+ *           picture Y component, JPEG or raw data ring buffer (0x00000078)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_base_ad:*/
+/* Base address of main picture Y component ring buffer, JPEG ring buffer or */
+/* raw data ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_BASE_AD
+#define MRV_MI_MP_Y_BASE_AD_VALID_MASK          (MRV_MI_MP_Y_BASE_AD_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_size_shd: Size shadow register of main picture Y component,
+ *           JPEG or raw data (0x0000007c)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_size:*/
+/* Size of main picture Y component ring buffer, JPEG ring buffer or raw data */
+/* ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_SIZE
+#define MRV_MI_MP_Y_SIZE_VALID_MASK             (MRV_MI_MP_Y_SIZE_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_offs_cnt_shd: Current offset counter of main picture Y
+ *           component, JPEG or raw data ring buffer (0x00000080)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_offs_cnt:*/
+/* Current offset counter of main picture Y component, JPEG or raw data ring */
+/* buffer for address generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_OFFS_CNT
+#define MRV_MI_MP_Y_OFFS_CNT_VALID_MASK         (MRV_MI_MP_Y_OFFS_CNT_MASK & ~0x00000007)
+#endif /* MRV_MI_MP_Y_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_y_irq_offs_shd: Shadow register of fill level interrupt
+ *           offset value for main picture Y component, JPEG or raw data
+ *           (0x00000084)
+ *
+ *****************************************************************************/
+/* Slice: mp_y_irq_offs:*/
+/* Reaching this offset value by the current offset counter for addressing */
+/* main picture Y component, JPEG or raw data leads to generation of fill */
+/* level interrupt fill_mp_y.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_Y_IRQ_OFFS
+#endif /* MRV_MI_MP_Y_IRQ_OFFS */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_base_ad_shd: Base address shadow register for main
+ *           picture Cb component ring buffer (0x00000088)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_base_ad:*/
+/* Base address of main picture Cb component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_BASE_AD
+#endif /* MRV_MI_MP_CB_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_size_shd: Size shadow register of main picture Cb
+ *           component ring buffer (0x0000008c)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_size:*/
+/* Size of main picture Cb component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_SIZE
+#endif /* MRV_MI_MP_CB_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cb_offs_cnt_shd: Current offset counter of main picture Cb
+ *           component ring buffer (0x00000090)
+ *
+ *****************************************************************************/
+/* Slice: mp_cb_offs_cnt:*/
+/* Current offset counter of main picture Cb component ring buffer for address */
+/* generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CB_OFFS_CNT
+#endif /* MRV_MI_MP_CB_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_base_ad_shd: Base address shadow register for main
+ *           picture Cr component ring buffer (0x00000094)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_base_ad:*/
+/* Base address of main picture Cr component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_BASE_AD
+#endif /* MRV_MI_MP_CR_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_size_shd: Size shadow register of main picture Cr
+ *           component ring buffer (0x00000098)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_size:*/
+/* Size of main picture Cr component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_SIZE
+#endif /* MRV_MI_MP_CR_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_mp_cr_offs_cnt_shd: Current offset counter of main picture Cr
+ *           component ring buffer (0x0000009c)
+ *
+ *****************************************************************************/
+/* Slice: mp_cr_offs_cnt:*/
+/* Current offset counter of main picture Cr component ring buffer for */
+/* address generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_MP_CR_OFFS_CNT
+#endif /* MRV_MI_MP_CR_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_base_ad_shd: Base address shadow register for self
+ *           picture Y component ring buffer (0x000000a0)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_base_ad:*/
+/* Base address of self picture Y component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_BASE_AD
+#endif /* MRV_MI_SP_Y_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_size_shd: Size shadow register of self picture Y
+ *           component ring buffer (0x000000a4)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_size:*/
+/* Size of self picture Y component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_SIZE
+#endif /* MRV_MI_SP_Y_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_offs_cnt_shd: Current offset counter of self picture Y
+ *           component ring buffer (0x000000a8)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_offs_cnt:*/
+/* Current offset counter of self picture Y component ring buffer for address generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_Y_OFFS_CNT
+#endif /* MRV_MI_SP_Y_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_base_ad_shd: Base address shadow register for self
+ *           picture Cb component ring buffer (0x000000b0)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_base_ad:*/
+/* Base address of self picture Cb component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_BASE_AD
+#endif /* MRV_MI_SP_CB_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_size_shd: Size shadow register of self picture Cb
+ *           component ring buffer (0x000000b4)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_size:*/
+/* Size of self picture Cb component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_SIZE
+#endif /* MRV_MI_SP_CB_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cb_offs_cnt_shd: Current offset counter of self picture
+ *           Cb component ring buffer (0x000000b8)
+ *
+ *****************************************************************************/
+/* Slice: sp_cb_offs_cnt:*/
+/* Current offset counter of self picture Cb component ring buffer for */
+/* address generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CB_OFFS_CNT
+#endif /* MRV_MI_SP_CB_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_base_ad_shd: Base address shadow register for self
+ *           picture Cr component ring buffer (0x000000bc)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_base_ad:*/
+/* Base address of self picture Cr component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_BASE_AD
+#endif /* MRV_MI_SP_CR_BASE_AD */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_size_shd: Size shadow register of self picture Cr
+ *           component ring buffer (0x000000c0)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_size:*/
+/* Size of self picture Cr component ring buffer.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_SIZE
+#endif /* MRV_MI_SP_CR_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_sp_cr_offs_cnt_shd: Current offset counter of self picture Cr
+ *           component ring buffer (0x000000c4)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_offs_cnt:*/
+/* Current offset counter of self picture Cr component ring buffer for */
+/* address generation */
+     /**/
+/* Note:*/
+/* - Soft reset will reset the contents to reset value.*/
+     /**/
+/* Must be 64-bit aligned (bit 0, bit 1 and bit 2 are hard wired to "000")*/
+#ifdef MRV_MI_SP_CR_OFFS_CNT
+#endif /* MRV_MI_SP_CR_OFFS_CNT */
+/*****************************************************************************/
+/**
+ * register: mi_dma_y_pic_start_ad: Y component image start address (0x000000c8)
+ *
+ *****************************************************************************/
+/* Slice: dma_y_pic_start_ad:*/
+/* Image start address of the y component */
+     /**/
+/* Note:*/
+/* - Must be multiple of 4 in interleaved mode.*/
+#ifdef MRV_MI_DMA_Y_PIC_START_AD
+#endif /* MRV_MI_DMA_Y_PIC_START_AD */
+/*****************************************************************************/
+/**
+ * register: mi_dma_y_pic_width: Y component image width (0x000000cc)
+ *
+ *****************************************************************************/
+/* Slice: dma_y_pic_width:*/
+/* Image width of the Y component in pixel.*/
+     /**/
+/* For YCbCr 4:2:x the image width must be a multiple of 2.*/
+     /**/
+/* In planar mode the image width of the Cb and Cr component is assumed */
+/* according to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4.*/
+     /**/
+/* In semi planar 4:2:x mode the image width of the Cb component (which includes Cr)*/
+/* is assumed the same size.*/
+     /**/
+/* In interleave mode no Cb/Cr image width is used.*/
+#ifdef MRV_MI_DMA_Y_PIC_WIDTH
+#endif /* MRV_MI_DMA_Y_PIC_WIDTH */
+/*****************************************************************************/
+/**
+ * register: mi_dma_y_llength: Y component original line length (0x000000d0)
+ *
+ *****************************************************************************/
+/* Slice: dma_y_llength:*/
+/* Line length of the Y component of the original image in memory */
+     /**/
+/* For an uncropped image, where lines follow each other without offset */
+/* (no line stride), line length must match image width.*/
+     /**/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8,*/
+/* for all other component modes a multiple of 4.*/
+     /**/
+/* In planar mode the line length of the Cb and Cr component is assumed according */
+/* to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4.*/
+     /**/
+/* In semi planar 4:2:x mode the line length of the Cb component (which includes Cr)*/
+/* is assumed the same size.*/
+     /**/
+/* In interleave mode no Cb/Cr line length is used.*/
+#ifdef MRV_MI_DMA_Y_LLENGTH
+#endif /* MRV_MI_DMA_Y_LLENGTH */
+/*****************************************************************************/
+/**
+ * register: mi_dma_y_pic_size: Y component image size (0x000000d4)
+ *
+ *****************************************************************************/
+/* Slice: dma_y_pic_size:*/
+/* Image size of the Y component in pixel which has to be the Y line length */
+/* multiplied by the Y image height (dma_y_llength * dma_y_pic_height).*/
+     /**/
+/* In planar mode the image size of the Cb and Cr component is assumed according */
+/* to the YCbCr format, i.e. a quarter for 4:2:0, half for 4:2:2 and the same */
+/* for 4:4:4.*/
+     /**/
+/* In semi planar mode the image size of the Cb component (which includes Cr)*/
+/* is assumed half for 4:2:0 and the same size for 4:2:2.*/
+     /**/
+/* In interleave mode no Cb/Cr image size is used.*/
+#ifdef MRV_MI_DMA_Y_PIC_SIZE
+#endif /* MRV_MI_DMA_Y_PIC_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_dma_cb_pic_start_ad: Cb component image start address (0x000000d8)
+ *
+ *****************************************************************************/
+/* Slice: dma_cb_pic_start_ad:*/
+/* Image start address of the Cb component */
+     /**/
+/* Note:*/
+/* - Must be multiple of 2 in semi-planar mode.*/
+#ifdef MRV_MI_DMA_CB_PIC_START_AD
+#endif /* MRV_MI_DMA_CB_PIC_START_AD */
+/*****************************************************************************/
+/**
+ * register: mi_dma_cr_pic_start_ad: Cr component image start address (0x000000e8)
+ *
+ *****************************************************************************/
+/* Slice: dma_cr_pic_start_ad:*/
+/* Image start address of the Cr component */
+#ifdef MRV_MI_DMA_CR_PIC_START_AD
+#endif /* MRV_MI_DMA_CR_PIC_START_AD */
+/*****************************************************************************/
+/**
+ * register: mi_imsc: Interrupt Mask Register           (0x000000f8)
+ *           mi_ris : Raw Interrupt Status Register     (0x000000fc)
+ *           mi_mis : Masked Interrupt Status Register  (0x00000100)
+ *           mi_icr : Interrupt Clear Register          (0x00000104)
+ *           mi_isr : Interrupt Set Register            (0x00000108)
+ *
+ *           ('1': interrupt active, '0': interrupt masked)
+ *
+ *****************************************************************************/
+/* Slice: dma_ready:*/
+/* Mask bit for dma ready interrupt */
+#ifndef MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK                   0
+#endif /* MRV_MI_DMA_READY */
+/* Slice: wrap_sp_cr:*/
+/* Mask bit for self picture Cr address wrap interrupt */
+#ifndef MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK                  0
+#endif /* MRV_MI_WRAP_SP_CR */
+/* Slice: wrap_sp_cb:*/
+/* Mask bit for self picture Cb address wrap interrupt */
+#ifndef MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK                  0
+#endif /* MRV_MI_WRAP_SP_CB */
+/* Slice: wrap_sp_y:*/
+/* Mask bit for self picture Y address wrap interrupt */
+#ifndef MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK                   0
+#endif /* MRV_MI_WRAP_SP_Y */
+/* Slice: wrap_mp_cr:*/
+/* Mask bit for main picture Cr address wrap interrupt */
+#ifndef MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK                  0
+#endif /* MRV_MI_WRAP_MP_CR */
+/* Slice: wrap_mp_cb:*/
+/* Mask bit for main picture Cb address wrap interrupt */
+#ifndef MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK                  0
+#endif /* MRV_MI_WRAP_MP_CB */
+/* Slice: wrap_mp_y:*/
+/* Mask bit for main picture Y address wrap interrupt */
+#ifndef MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK                   0
+#endif /* MRV_MI_WRAP_MP_Y */
+/* Slice: fill_mp_y:*/
+/* Mask bit for fill level interrupt of main picture Y,*/
+/* JPEG or raw data */
+#ifndef MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK                   0
+#endif /* MRV_MI_FILL_MP_Y */
+/* Slice: mblk_line:*/
+/* Mask bit for makroblock line interrupt of main picture */
+/* (16 lines of Y, 8 lines of Cb and 8 lines of Cr are written */
+/* into RAM)*/
+#ifndef MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK                   0
+#endif /* MRV_MI_MBLK_LINE */
+/* Slice: sp_frame_end:*/
+/* Mask self picture end of frame interrupt */
+#ifndef MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK                0
+#endif /* MRV_MI_SP_FRAME_END */
+/* Slice: mp_frame_end:*/
+/* Mask main picture end of frame interrupt */
+#ifndef MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK                0
+#endif /* MRV_MI_MP_FRAME_END */
+/* combination of all interrupt lines */
+#define MRV_MI_ALL_IRQS
+#define MRV_MI_ALL_IRQS_MASK \
+(0 \
+	| MRV_MI_DMA_READY_MASK \
+	| MRV_MI_AHB_ERROR_MASK \
+	| MRV_MI_WRAP_SP_CR_MASK \
+	| MRV_MI_WRAP_SP_CB_MASK \
+	| MRV_MI_WRAP_SP_Y_MASK \
+	| MRV_MI_WRAP_MP_CR_MASK \
+	| MRV_MI_WRAP_MP_CB_MASK \
+	| MRV_MI_WRAP_MP_Y_MASK \
+	| MRV_MI_FILL_MP_Y_MASK \
+	| MRV_MI_MBLK_LINE_MASK \
+	| MRV_MI_SP_FRAME_END_MASK \
+	| MRV_MI_DMA_FRAME_END_MASK \
+	| MRV_MI_MP_FRAME_END_MASK \
+)
+#define MRV_MI_ALL_IRQS_SHIFT                   0U
+/*****************************************************************************/
+/**
+ * register: mi_status    : MI Status Register          (0x0000010c)
+ *           mi_status_clr: MI Status Clear Register    (0x00000110)
+ *
+ *****************************************************************************/
+/* Slice: sp_cr_fifo_full:*/
+/* FIFO full flag of Cr FIFO in self path asserted since last clear */
+#ifndef MRV_MI_SP_CR_FIFO_FULL
+#define MRV_MI_SP_CR_FIFO_FULL_MASK             0U
+#endif /* MRV_MI_SP_CR_FIFO_FULL */
+/* Slice: sp_cb_fifo_full:*/
+/* FIFO full flag of Cb FIFO in self path asserted since last clear */
+#ifndef MRV_MI_SP_CB_FIFO_FULL
+#define MRV_MI_SP_CB_FIFO_FULL_MASK             0U
+#endif /* MRV_MI_SP_CB_FIFO_FULL */
+/* Slice: sp_y_fifo_full:*/
+/* FIFO full flag of Y FIFO in self path asserted since last clear */
+#ifndef MRV_MI_SP_Y_FIFO_FULL
+#define MRV_MI_SP_Y_FIFO_FULL_MASK              0U
+#endif /* MRV_MI_SP_Y_FIFO_FULL */
+/* Slice: mp_cr_fifo_full:*/
+/* FIFO full flag of Cr FIFO in main path asserted since last clear */
+#ifndef MRV_MI_MP_CR_FIFO_FULL
+#define MRV_MI_MP_CR_FIFO_FULL_MASK             0U
+#endif /* MRV_MI_MP_CR_FIFO_FULL */
+/* Slice: mp_cb_fifo_full:*/
+/* FIFO full flag of Cb FIFO in main path asserted since last clear */
+#ifndef MRV_MI_MP_CB_FIFO_FULL
+#define MRV_MI_MP_CB_FIFO_FULL_MASK             0U
+#endif /* MRV_MI_MP_CB_FIFO_FULL */
+/* Slice: mp_y_fifo_full:*/
+/* FIFO full flag of Y FIFO in main path asserted since last clear */
+#ifndef MRV_MI_MP_Y_FIFO_FULL
+#define MRV_MI_MP_Y_FIFO_FULL_MASK              0U
+#endif /* MRV_MI_MP_Y_FIFO_FULL */
+/* combination of all MI status lines */
+#define MRV_MI_ALL_STAT
+#define MRV_MI_ALL_STAT_MASK \
+(0 \
+	| MRV_MI_SP_CR_FIFO_FULL_MASK \
+	| MRV_MI_SP_CB_FIFO_FULL_MASK \
+	| MRV_MI_SP_Y_FIFO_FULL_MASK  \
+	| MRV_MI_MP_CR_FIFO_FULL_MASK \
+	| MRV_MI_MP_CB_FIFO_FULL_MASK \
+	| MRV_MI_MP_Y_FIFO_FULL_MASK  \
+)
+#define MRV_MI_ALL_STAT_SHIFT                   0U
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_pic_width: Y component image width (0x00000114)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_pic_width:*/
+/* Image width of the self picture Y component or RGB picture in pixel.*/
+     /**/
+/* For YCbCr 4:2:x and RGB 565 the image width must be a multiple of 2.*/
+/* If no line stride is used but flipping required, the image width must be */
+/* a multiple of 8 for 4:2:x planar or 4 for 4:4:4 planar/4:2:x semi planar.*/
+     /**/
+/* There are no restrictions for RGB 888/666.*/
+     /**/
+/* In planar mode the image width of the Cb and Cr component is assumed according */
+/* to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4.*/
+     /**/
+/* In semi planar 4:2:x mode the image width of the Cb component (which includes Cr)*/
+/* is assumed the same size.*/
+     /**/
+/* In interleave mode no Cb/Cr image width is used.*/
+/* Note:*/
+/* - Image width always refers to the picture width of the output image. This is */
+/*   particularly important when rotating.*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the register */
+/*   only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_Y_PIC_WIDTH
+#endif /* MRV_MI_SP_Y_PIC_WIDTH */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_pic_height: Y component image height (0x00000118)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_pic_height:*/
+/* Image height of the y component or RGB picture in pixel.*/
+     /**/
+/* In planar and semi planar mode the image width of the cb and cr component */
+/* is assumed according to the YCbCr format, i.e. half for 4:2:0 and the same */
+/* for 4:2:2 and 4:4:4.*/
+     /**/
+/* Note:*/
+/* - Image height always refers to the picture height of the output image.*/
+/*   This is particularly important when rotating.*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the register */
+/*   only if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_Y_PIC_HEIGHT
+#endif /* MRV_MI_SP_Y_PIC_HEIGHT */
+/*****************************************************************************/
+/**
+ * register: mi_sp_y_pic_size: Y component image size (0x0000011c)
+ *
+ *****************************************************************************/
+/* Slice: sp_y_pic_size:*/
+/* Image size of the Y component or RGB picture in pixel which has to be the */
+/* Y line length multiplied by the Y image height (sp_y_llength * sp_y_pic_height).*/
+     /**/
+/* In planar mode the image size of the Cb and Cr component is assumed according */
+/* to the YCbCr format, i.e. a quarter for 4:2:0, half for 4:2:2 and the same for */
+/* 4:4:4.*/
+     /**/
+/* In semi planar mode the image size of the Cb and Cr component is assumed half */
+/* for 4:2:0 and the same size for 4:2:2.*/
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the register only */
+/*   if no picture data is sent to the self path.*/
+#ifdef MRV_MI_SP_Y_PIC_SIZE
+#endif /* MRV_MI_SP_Y_PIC_SIZE */
+/*****************************************************************************/
+/**
+ * register: mi_dma_ctrl: DMA control register (0x00000120)
+ *
+ *****************************************************************************/
+/* Slice: dma_rgb_format:*/
+/* Selects RGB Bayer data of read DMA picture */
+     /**/
+/* 00: no DMA RGB Bayer data */
+/* 01: 8 bit RGB Bayer data */
+/* 10: 16 bit RGB Bayer data (12 bit used)*/
+     /**/
+/* bytes are organized MSB first and 4 lower bits of LSB remain unused:*/
+/* byte_even -> bayer[11:4], byte_odd[7:4] -> bayer[3:0]*/
+     /**/
+/* 11: reserved.*/
+#ifdef MRV_MI_DMA_RGB_FORMAT
+#define MRV_MI_DMA_RGB_FORMAT_NO_DATA           0
+#define MRV_MI_DMA_RGB_FORMAT_8BIT_BAYER        1
+#define MRV_MI_DMA_RGB_FORMAT_16BIT_BAYER       2
+#endif /* MRV_MI_DMA_RGB_FORMAT */
+/* Slice: dma_frame_end_disable:*/
+/* Suppresses v_end so that no frame end can be detected by following */
+/* instances. Note: The dma_ready interrupt is raised as usual, but the */
+/* dma_frame_end interrupt will not be generated until v_end has been */
+/* enabled again.*/
+#ifdef MRV_MI_DMA_FRAME_END_DISABLE
+#endif /* MRV_MI_DMA_FRAME_END_DISABLE */
+/* Slice: dma_continuous_en:*/
+/* Enables continuous mode. If set the same frame is read back over and */
+/* over. A start pulse on dma_start is needed only for the first time.*/
+/* To stop continuous mode reset this bit (takes effect after the next */
+/* frame end) or execute a soft reset. This bit is intended to be used */
+/* in conjunction with the Superimpose feature.*/
+#ifdef MRV_MI_DMA_CONTINUOUS_EN
+#endif /* MRV_MI_DMA_CONTINUOUS_EN */
+/* Slice: dma_byte_swap:*/
+/* Enables change of DMA byte order of the 32 bit input word at read port */
+/* 1: byte order is mirrored but the bit order within one byte doesn’t change */
+/* 0: no byte mirroring */
+#ifdef MRV_MI_DMA_BYTE_SWAP
+#endif /* MRV_MI_DMA_BYTE_SWAP */
+/* Slice: dma_inout_format:*/
+/* Selects input/output format of DMA picture.*/
+/* 11: YCbCr  4:4:4 */
+/* 10: YCbCr  4:2:2 */
+/* 01: YCbCr  4:2:0 */
+/* 00: YCbCr  4:0:0 */
+#ifdef MRV_MI_DMA_INOUT_FORMAT
+#define MRV_MI_DMA_INOUT_FORMAT_YUV444          3	/* 11: YCbCr  4:4:4 */
+#define MRV_MI_DMA_INOUT_FORMAT_YUV422          2	/* 10: YCbCr  4:2:2 */
+#define MRV_MI_DMA_INOUT_FORMAT_YUV420          1	/* 01: YCbCr  4:2:0 */
+#define MRV_MI_DMA_INOUT_FORMAT_YUV400          0	/* 00: YCbCr  4:0:0 */
+#endif /* MRV_MI_DMA_INOUT_FORMAT */
+/* Slice: dma_read_format:*/
+/* Defines how YCbCr picture data is read from memory.*/
+/* 00: planar */
+/* 01: semi planar, for YCbCr 4:2:x */
+/* 10: interleaved (combined), for YCbCr 4:2:2 and RGB only */
+/* 11: reserved */
+#ifdef MRV_MI_DMA_READ_FORMAT
+#define MRV_MI_DMA_READ_FORMAT_PLANAR           0	/* 00: planar */
+#define MRV_MI_DMA_READ_FORMAT_SEMIPLANAR       1	/* 01: semi planar, for YCbCr 4:2:x */
+#define MRV_MI_DMA_READ_FORMAT_INTERLEAVED      2	/* 10: interleaved (combined), for YCbCr 4:2:2 only */
+#endif /* MRV_MI_DMA_READ_FORMAT */
+/* Slice: dma_burst_len_chrom:*/
+/* Burst length for Cb or Cr data affecting DMA read port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+#ifdef MRV_MI_DMA_BURST_LEN_CHROM
+#define MRV_MI_DMA_BURST_LEN_CHROM_4            0	/* 0: 4-beat bursts */
+#define MRV_MI_DMA_BURST_LEN_CHROM_8            1	/* 1: 8-beat bursts */
+#define MRV_MI_DMA_BURST_LEN_CHROM_16           2	/* 2: 16-beat bursts */
+#endif /* MRV_MI_DMA_BURST_LEN_CHROM */
+/* Slice: dma_burst_len_lum:*/
+/* Burst length for Y data affecting DMA read port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+#ifdef MRV_MI_DMA_BURST_LEN_LUM
+#define MRV_MI_DMA_BURST_LEN_LUM_4              0	/* 0: 4-beat bursts */
+#define MRV_MI_DMA_BURST_LEN_LUM_8              1	/* 1: 8-beat bursts */
+#define MRV_MI_DMA_BURST_LEN_LUM_16             2	/* 2: 16-beat bursts */
+#endif /* MRV_MI_DMA_BURST_LEN_LUM */
+/*****************************************************************************/
+/**
+ * register: mi_dma_start: DMA start register (0x00000124)
+ *
+ *****************************************************************************/
+/* Slice: dma_start:*/
+/* Enables DMA access. Additionally main or self path has to be enabled separately.*/
+#ifdef MRV_MI_DMA_START
+#endif /* MRV_MI_DMA_START */
+/*****************************************************************************/
+/**
+ * register:  mi_dma_status: DMA status register (0x00000128)
+ *
+ *****************************************************************************/
+/* Slice: dma_active:*/
+/* If set DMA access is active.*/
+#ifdef MRV_MI_DMA_ACTIVE
+#endif /* MRV_MI_DMA_ACTIVE */
+/*****************************************************************************/
+/**
+ * register: mi_pixel_cnt: Counter value for defect pixel list (0x0000012c)
+ *
+ *****************************************************************************/
+/* Slice: pix_cnt:*/
+/* Counter value specifies the number of pixels of the defect pixel list */
+/* generated by DPCC of the last transmitted frame. Updated at frame end.*/
+     /**/
+/* A soft reset will set the counter to zero.*/
+#ifdef MRV_MI_PIX_CNT
+#endif /* MRV_MI_PIX_CNT */
+#ifdef ISP_MI_HANDSHAKE_NANO
+/* Nano handshake */
+/*****************************************************************************/
+/**
+ * register:  isp_handshake_ctrl_0: Nano handshake functions (0x0000014C)
+ *
+ *****************************************************************************/
+    /*! Slice: mp_handshake_en: */
+/*! Enable mp handshake function for MI MP */
+#ifdef MRV_MI_MP_HANDSHK_EN
+#define MRV_MI_MP_HANDSHK_EN_DISABLE    0	/* HANDSHAKE disable */
+#define MRV_MI_MP_HANDSHK_EN_ENABLE     1	/* HANDSHAKE enable, active high */
+#endif
+/*! Slice: mp_handshk_storage_format */
+/*! Define how YCbCr picture data is stored in memory */
+/*! 00: Planar */
+/*! 01: Semi planar, for YCbCr4:2:x */
+/*! 10: Interleaved(combiled), for YCbCr 4:2:2 only or RAW format.*/
+/*! 11: not support */
+#ifdef MRV_MI_MP_HANDSHK_STORAGE_FORMAT
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT_PLANAR        0	/* 00: Planar */
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT_SEMIPLANAR    1	/* 01: Semi-Planar */
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT_INTERLEAVED   2	/* 10: Interleaved */
+#endif
+/*! Slice: mp_handshk_data_format */
+/*! Defines the video format */
+/*! 00: RAW format */
+/*! 01: reserved */
+/*! 10: YUV 422 */
+/*! 11: YUV 420 */
+#ifdef MRV_MI_MP_HANDSHK_DATA_FORMAT
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT_RAW              0	/* 00: raw format */
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT_YUV422           2	/* 10: YUV422 */
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT_YUV420           3	/* 11: YUV420 */
+#endif
+/*! Slice: mp_handshk_slice_size */
+/*! Defines the slice size to generate handshake signals, minus 1 is used */
+#ifdef MRV_MI_MP_HANDSHK_SLICE_SIZE
+#endif
+/*! Slice: mp_handshk_slice_buf_size */
+/*! Defines the circular buffer size in number of defined slices per buffer, minus 1 is used */
+#ifdef MRV_MI_MP_HANDSHK_SLICE_BUF_SIZE
+#endif
+/*! Slice: mp_handshk_ack_count */
+/*! Defines the acknowledage is not received in the defined cycles, it will generate handshake interrupt.*/
+#ifdef MRV_MI_MP_HANDSHK_ACK_COUNT
+#endif
+#endif
+#ifdef ISP_MI_ALIGN_NANO
+/* MI output Alignment */
+/*****************************************************************************/
+/**
+ * register:  mi_output_alignment: Nano MI output alignment (0x0000015C)
+ *
+ *****************************************************************************/
+/* Slice: mp_lsb_alignment:*/
+/*! msb/lsb align for raw 10 and raw 12 formats control */
+/*! 0: MSB aligned for RAW10 and RAW12 formats */
+/*! 1: LSB aligned for RAW10 and RAW12 formats */
+#ifdef MRV_MI_LSB_ALIGNMENT
+#define MRV_MI_LSB_ALIGNMENT_MSB               0	/* MSB aligned for raw 10 and raw 12 formats */
+#define MRV_MI_LSB_ALIGNMENT_LSB               1	/* LSB aligned for raw 10 and raw 12 formats */
+#endif
+#endif
+#ifdef ISP_MI_BYTESWAP
+/*! Slice mp_byte_swap:*/
+/*! swap bytes for ISP Nano */
+/*! bit 0 to swap bytes */
+/*! bit 1 to swap words */
+/*! bit 2 to swap dwords */
+/*! 3'b001: ABCDEFGH => BADCFEHG */
+/*! 3'b000: ABCDEFGH => ABCDEFGH */
+/*! 3'b010: ABCDEFGH => CDABGHEF */
+/*! 3'b011: ABCDEFGH => DCBAHGFE */
+/*! 3'b100: ABCDEFGH => EFGHABCD */
+/*! 3'b101: ABCDEFGH => FEHGBADC */
+/*! 3'b110: ABCDEFGH => GHEFCDAB */
+/*! 3'b111: ABCDEFGH => HGFEDCBA */
+#ifdef MRV_MI_MP_BYTE_SWAP
+#define MRV_MI_MP_BYTE_SWAP_NORMAL           0x0	/* normal mode */
+#define MRV_MI_MP_BYTE_SWAP_BYTE             0x1	/* bit 0 to swap bytes */
+#define MRV_MI_MP_BYTE_SWAP_WORD             0x2	/* bit 1 to swap words */
+#define MRV_MI_MP_BYTE_SWAP_DWORD            0x4	/* bit 2 to swap dwords */
+#endif
+#endif
+#ifdef ISP_MI_FIFO_DEPTH_NANO
+/*****************************************************************************/
+/**
+ * register:  mi_mp_output_fifo_size: Nano MI fifo control (0x00000160)
+ *
+ *****************************************************************************/
+/*! Slice output_fifo_depth:*/
+/*! Select output FIFO depth setting */
+/*! 00: FULL(2KBytes)*/
+/*! 01: HALF(1KBytes)*/
+/*! 10: 1/4(512Bytes)*/
+/*! 11: 1/8(256Bytes)*/
+#ifdef MRV_MI_OUTOUT_FIFO_DEPTH
+#define MRV_MI_OUTOUT_FIFO_DEPTH_FULL     0	/* FULL(2KBytes) */
+#define MRV_MI_OUTOUT_FIFO_DEPTH_HALF     1	/* HALF(1KBytes) */
+#define MRV_MI_OUTOUT_FIFO_DEPTH_1_4      2	/* 1/4(512Bytes) */
+#define MRV_MI_OUTOUT_FIFO_DEPTH_1_8      3	/* 1/8(256Bytes) */
+#endif
+#endif
+/*****************************************************************************/
+/* JPEG Encoder Registers                                                    */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: jpe_gen_header: command to start stream header generation (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: gen_header:*/
+/* "1" = Start command to generate stream header */
+/* auto reset to zero after one clock cycle */
+#ifdef MRV_JPE_GEN_HEADER
+#endif /* MRV_JPE_GEN_HEADER */
+/*****************************************************************************/
+/**
+ * register: jpe_encode: Start command to start JFIF stream encoding (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: encode:*/
+/* "1" = Start command to start JFIF stream encoding;*/
+/* auto reset to zero after one clock cycle.*/
+/* This bit is write-only: reading result is always zero!*/
+#ifdef MRV_JPE_ENCODE
+#endif /* MRV_JPE_ENCODE */
+/*****************************************************************************/
+/**
+ * register: jpe_init: Automatic configuration update (INIT) (0x0008)
+ *
+ *****************************************************************************/
+/* Slice: JP_INIT:*/
+/* "1" = Immediate start of JPEG encoder.*/
+     /**/
+/* This bit has to be set after "Encode" to start the JPEG encoder. The "Encode"*/
+/* command becomes active either with JP_INIT or with the input signal "CFG_UPD".*/
+/* auto reset to zero after one clock cycle !!!*/
+#ifdef MRV_JPE_JP_INIT
+#endif /* MRV_JPE_JP_INIT */
+/*****************************************************************************/
+/**
+ * register: jpe_y_scale_en: Y value scaling control register (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: y_scale_en:*/
+/* Y scale flag */
+/* 1: scaling Y input from [16..235] to [0..255]*/
+/* 0: no Y input scaling */
+#ifdef MRV_JPE_Y_SCALE_EN
+#endif /* MRV_JPE_Y_SCALE_EN */
+/*****************************************************************************/
+/**
+ * register: jpe_cbcr_scale_en: Cb/Cr value scaling control register (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: cbcr_scale_en:*/
+/* Cb/Cr scale flag */
+/* 1: scaling Cb/Cr input from [16..240] to [0..255]*/
+/* 0: no Cb/Cr input scaling */
+#ifdef MRV_JPE_CBCR_SCALE_EN
+#endif /* MRV_JPE_CBCR_SCALE_EN */
+/*****************************************************************************/
+/**
+ * register: jpe_table_flush: header generation debug register (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: table_flush:*/
+/* header generation debug control flag */
+/* (controls transmission of last header bytes if the 64 bit output buffer */
+/*  is not completely filled)*/
+/* 1: immediately transmit last header bytes */
+/* 0: wait for encoded image data to fill output buffer */
+#ifdef MRV_JPE_TABLE_FLUSH
+#endif /* MRV_JPE_TABLE_FLUSH */
+/*****************************************************************************/
+/**
+ * register: jpe_enc_hsize: JPEG codec horizontal image size for encoding
+ *           (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: enc_hsize:*/
+/* JPEG codec horizontal image size for R2B and SGEN blocks */
+#ifdef MRV_JPE_ENC_HSIZE
+#endif /* MRV_JPE_ENC_HSIZE */
+/*****************************************************************************/
+/**
+ * register: jpe_enc_vsize: JPEG codec vertical image size for encoding
+ *           (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: enc_vsize:*/
+/* JPEG codec vertical image size for R2B and SGEN blocks */
+#ifdef MRV_JPE_ENC_VSIZE
+#endif /* MRV_JPE_ENC_VSIZE */
+/*****************************************************************************/
+/**
+ * register: jpe_pic_format: JPEG picture encoding format (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: enc_pic_format:*/
+/* "0:0:1"  = 4:2:2 format */
+/* "1:x:x"  = 4:0:0 format */
+#ifdef MRV_JPE_ENC_PIC_FORMAT
+#define MRV_JPE_ENC_PIC_FORMAT_422              1	/* "0:0:1"  = 4:2:2 format */
+#define MRV_JPE_ENC_PIC_FORMAT_400              4	/* "1:x:x"  = 4:0:0 format */
+#endif /* MRV_JPE_ENC_PIC_FORMAT */
+/*****************************************************************************/
+/**
+ * register: jpe_restart_interval: restart marker insertion register (0x0024)
+ *
+ *****************************************************************************/
+/* Slice: restart_interval:*/
+/* No of MCU in  reset interval via host */
+#ifdef MRV_JPE_RESTART_INTERVAL
+#endif /* MRV_JPE_RESTART_INTERVAL */
+/*****************************************************************************/
+/**
+ * register: jpe_tq_y_select: Q- table selector 0, quant. table for Y
+ *           component (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: tq0_select:*/
+/* "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#ifdef MRV_JPE_TQ0_SELECT
+#endif /* MRV_JPE_TQ0_SELECT */
+/*****************************************************************************/
+/**
+ * register: jpe_tq_u_select: Q- table selector 1, quant. table for U
+ *           component (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: tq1_select:*/
+/* "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#ifdef MRV_JPE_TQ1_SELECT
+#endif /* MRV_JPE_TQ1_SELECT */
+/*****************************************************************************/
+/**
+ * register: jpe_tq_v_select: Q- table selector 2, quant. table for V
+ *           component (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: tq2_select:*/
+/* "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#ifdef MRV_JPE_TQ2_SELECT
+#endif /* MRV_JPE_TQ2_SELECT */
+#define MRV_JPE_TQ_SELECT_TAB3                  3	/* "11": qtable 3 */
+#define MRV_JPE_TQ_SELECT_TAB2                  2	/* "10": qtable 2 */
+#define MRV_JPE_TQ_SELECT_TAB1                  1	/* "01": qtable 1 */
+#define MRV_JPE_TQ_SELECT_TAB0                  0	/* "00": qtable 0 */
+/*****************************************************************************/
+/**
+ * register: jpe_dc_table_select: Huffman table selector for DC values
+ *           (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: dc_table_select_v:*/
+/* "0" = dc table 0; color component 2 (V)*/
+/* "1" = dc table 1; color component 2 (V)*/
+#ifdef MRV_JPE_DC_TABLE_SELECT_V
+#endif /* MRV_JPE_DC_TABLE_SELECT_V */
+/* Slice: dc_table_select_u:*/
+/* "0" = dc table 0; color component 1 (U)*/
+/* "1" = dc table 1; color component 1 (U)*/
+#ifdef MRV_JPE_DC_TABLE_SELECT_U
+#endif /* MRV_JPE_DC_TABLE_SELECT_U */
+/* Slice: dc_table_select_y:*/
+/* "0" = dc table 0; color component 0 (Y)*/
+/* "1" = dc table 1; color component 0 (Y)*/
+#ifdef MRV_JPE_DC_TABLE_SELECT_Y
+#endif /* MRV_JPE_DC_TABLE_SELECT_Y */
+/*****************************************************************************/
+/**
+ * register: jpe_ac_table_select: Huffman table selector for AC values
+ *           (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: ac_table_select_v:*/
+/* "0" = ac table 0; component 2 (V)*/
+/* "1" = ac table 1; component 2 (V)*/
+#ifdef MRV_JPE_AC_TABLE_SELECT_V
+#endif /* MRV_JPE_AC_TABLE_SELECT_V */
+/* Slice: ac_table_select_u:*/
+/* "0" = ac table 0; component 1 (U)*/
+/* "1" = ac table 1; component 1 (U)*/
+#ifdef MRV_JPE_AC_TABLE_SELECT_U
+#endif /* MRV_JPE_AC_TABLE_SELECT_U */
+/* Slice: ac_table_select_y:*/
+/* "0" = ac table 0; component 0 (Y)*/
+/* "1" = ac table 1; component 0 (Y)*/
+#ifdef MRV_JPE_AC_TABLE_SELECT_Y
+#endif /* MRV_JPE_AC_TABLE_SELECT_Y */
+/*****************************************************************************/
+/**
+ * register: jpe_table_data: table programming register (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: table_wdata_h:*/
+/* Table data MSB */
+#ifdef MRV_JPE_TABLE_WDATA_H
+#endif /* MRV_JPE_TABLE_WDATA_H */
+/* Slice: table_wdata_l:*/
+/* Table data LSB */
+#ifdef MRV_JPE_TABLE_WDATA_L
+#endif /* MRV_JPE_TABLE_WDATA_L */
+/*****************************************************************************/
+/**
+ * register: jpe_table_id: table programming select register (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: table_id:*/
+/* select table */
+/* "0000" : Q-table 0 */
+/* "0001" : Q-table 1 */
+/* "0010" : Q-table 2 */
+/* "0011" : Q-table 3 */
+/* "0100" : VLC DC-table 0 */
+/* "0101" : VLC AC-table 0 */
+/* "0110" : VLC DC-table 1 */
+/* "0111" : VLC AC-table 1 */
+/* "1xxx" : reserved for debug */
+#ifdef MRV_JPE_TABLE_ID
+#define MRV_JPE_TABLE_ID_QUANT0                 0	/* "0000" : Q-table 0 */
+#define MRV_JPE_TABLE_ID_QUANT1                 1	/* "0001" : Q-table 1 */
+#define MRV_JPE_TABLE_ID_QUANT2                 2	/* "0010" : Q-table 2 */
+#define MRV_JPE_TABLE_ID_QUANT3                 3	/* "0011" : Q-table 3 */
+#define MRV_JPE_TABLE_ID_VLC_DC0                4	/* "0100" : VLC DC-table 0 */
+#define MRV_JPE_TABLE_ID_VLC_AC0                5	/* "0101" : VLC AC-table 0 */
+#define MRV_JPE_TABLE_ID_VLC_DC1                6	/* "0110" : VLC DC-table 1 */
+#define MRV_JPE_TABLE_ID_VLC_AC1                7	/* "0111" : VLC AC-table 1 */
+#endif /* MRV_JPE_TABLE_ID */
+/*****************************************************************************/
+/**
+ * register: jpe_tac0_len: Huffman AC table 0 length (0x0044)
+ *
+ *****************************************************************************/
+/* Slice: tac0_len:*/
+/* Huffman table length for ac0 table */
+#ifdef MRV_JPE_TAC0_LEN
+#endif /* MRV_JPE_TAC0_LEN */
+/*****************************************************************************/
+/**
+ * register: jpe_tdc0_len: Huffman DC table 0 length (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: tdc0_len:*/
+/* Huffman table length for dc0 table */
+#ifdef MRV_JPE_TDC0_LEN
+#endif /* MRV_JPE_TDC0_LEN */
+/*****************************************************************************/
+/**
+ * register: jpe_tac1_len: Huffman AC table 1 length (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: tac1_len:*/
+/* Huffman table length for ac1 table */
+#ifdef MRV_JPE_TAC1_LEN
+#endif /* MRV_JPE_TAC1_LEN */
+/*****************************************************************************/
+/**
+ * register: jpe_tdc1_len: Huffman DC table 1 length (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: tdc1_len:*/
+/* Huffman table length for dc1 table */
+#ifdef MRV_JPE_TDC1_LEN
+#endif /* MRV_JPE_TDC1_LEN */
+/*****************************************************************************/
+/**
+ * register: jpe_encoder_busy: encoder status flag (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: codec_busy:*/
+/* Bit 0 = "1" : JPEG codec in process */
+#ifdef MRV_JPE_CODEC_BUSY
+#endif /* MRV_JPE_CODEC_BUSY */
+/*****************************************************************************/
+/**
+ * register: jpe_header_mode: header mode definition (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: header_mode:*/
+/* "00" = no header */
+/* "01" = reserved */
+/* "10" = JFIF 1.02 header */
+/* "11" = reserved */
+#ifdef MRV_JPE_HEADER_MODE
+#define MRV_JPE_HEADER_MODE_NONE                0	/* "00" = no APPn header */
+#define MRV_JPE_HEADER_MODE_JFIF                2	/* "10" = JFIF header */
+#endif /* MRV_JPE_HEADER_MODE */
+/*****************************************************************************/
+/**
+ * register: jpe_encode_mode: encode mode (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: encode_mode:*/
+/* Always  "1", because this is the encoder only edition */
+#ifdef MRV_JPE_ENCODE_MODE
+#endif /* MRV_JPE_ENCODE_MODE */
+/*****************************************************************************/
+/**
+ * register: jpe_debug: debug information register (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: deb_bad_table_access:*/
+/* Debug signal only (set if an access to the TABLE_DATA or to the TABLE_ID */
+/* register is performed, when the JPEG_ENCODER is busy. In this case a default */
+/* PVCI Acknowledge is generated. Thus the configuration bus is not blocked)*/
+#ifdef MRV_JPE_DEB_BAD_TABLE_ACCESS
+#endif /* MRV_JPE_DEB_BAD_TABLE_ACCESS */
+/* Slice: deb_vlc_table_busy:*/
+/* Debug signal only (vlc access to huff-tables)*/
+#ifdef MRV_JPE_DEB_VLC_TABLE_BUSY
+#endif /* MRV_JPE_DEB_VLC_TABLE_BUSY */
+/* Slice: deb_r2b_memory_full:*/
+/* Debug signal only (line memory status of r2b)*/
+#ifdef MRV_JPE_DEB_R2B_MEMORY_FULL
+#endif /* MRV_JPE_DEB_R2B_MEMORY_FULL */
+/* Slice: deb_vlc_encode_busy:*/
+/* Debug signal only (vlc encode processing active)*/
+#ifdef MRV_JPE_DEB_VLC_ENCODE_BUSY
+#endif /* MRV_JPE_DEB_VLC_ENCODE_BUSY */
+/* Slice: deb_qiq_table_acc:*/
+/* Debug signal only (QIQ table access)*/
+#ifdef MRV_JPE_DEB_QIQ_TABLE_ACC
+#endif /* MRV_JPE_DEB_QIQ_TABLE_ACC */
+/*****************************************************************************/
+/**
+ * register: jpe_error_imr: JPEG error interrupt mask register          (0x00000068)
+ *           jpe_error_ris: JPEG error raw  interrupt status register   (0x0000006c)
+ *           jpe_error_mis: JPEG error masked interrupt status register (0x00000070)
+ *           jpe_error_icr: JPEG error interrupt set register           (0x00000074)
+ *           jpe_error_isr: JPEG error interrupt clear register         (0x00000078)
+ *
+ *****************************************************************************/
+/* Slice: vlc_table_err:*/
+/* "1" = interrupt is  activated (masked in)*/
+#ifdef MRV_JPE_VLC_TABLE_ERR
+#endif /* MRV_JPE_VLC_TABLE_ERR */
+/* Slice: r2b_IMG_size_err:*/
+/* "1" = interrupt is  activated (masked in)*/
+#ifdef MRV_JPE_R2B_IMG_SIZE_ERR
+#endif /* MRV_JPE_R2B_IMG_SIZE_ERR */
+/* Slice: DCT_ERR:*/
+/* "1" = interrupt is  activated (masked in)*/
+#ifdef MRV_JPE_DCT_ERR
+#endif /* MRV_JPE_DCT_ERR */
+/* Slice: vlc_symbol_err:*/
+/* "1" = interrupt is  activated (masked in)*/
+#ifdef MRV_JPE_VLC_SYMBOL_ERR
+#endif /* MRV_JPE_VLC_SYMBOL_ERR */
+/*****************************************************************************/
+/**
+ * register: jpe_status_imr: JPEG status interrupt mask register            (0x0000007c)
+ *           jpe_status_ris: JPEG status raw interrupt status register      (0x00000080)
+ *           jpe_status_mis: JPEG status masked interrupt status register   (0x00000084)
+ *           jpe_status_icr: JPEG status interrupt clear register           (0x00000088)
+ *           jpe_status_isr: JPEG status interrupt set register             (0x0000008c)
+ *
+ *****************************************************************************/
+/* Slice: gen_header_done:*/
+/* "1" = interrupt is activated (masked in)*/
+#ifdef MRV_JPE_GEN_HEADER_DONE
+#endif /* MRV_JPE_GEN_HEADER_DONE */
+/* Slice: encode_done:*/
+/* "1" = interrupt is activated (masked in)*/
+#ifdef MRV_JPE_ENCODE_DONE
+#endif /* MRV_JPE_ENCODE_DONE */
+/*****************************************************************************/
+/**
+ * register: jpe_config: JPEG configuration register (0x00000090)
+ *
+ *****************************************************************************/
+/* Slice: speedview_en:*/
+/* 1: speed view enabled */
+/* 0: speed view disabled */
+#ifdef MRV_JPE_SPEEDVIEW_EN
+#define MRV_JPE_SPEEDVIEW_EN_DISABLE            0	/* "0": JPEG Stream Encoding according to JPEG standard */
+#define MRV_JPE_SPEEDVIEW_EN_ENABLE             1	/* "1": SpeedView JPEG Stream Encoding enabled */
+#endif /* MRV_JPE_SPEEDVIEW_EN */
+/* Slice: cont_mode:*/
+/* Encoder continous mode */
+/* "00": encoder stops at frame end (corresponds to former behavior)*/
+/* "01": encoder starts automatically to encode the next frame */
+/* "10": unused */
+/* "11": encoder first generates next header and then encodes automatically the next frame */
+/* These settings are checked after encoding one frame. They are not auto-reset by hardware.*/
+#ifdef MRV_JPE_CONT_MODE
+#define MRV_JPE_CONT_MODE_STOP                  0	/* "00": encoder stops at frame end (corresponds to former behavior) */
+#define MRV_JPE_CONT_MODE_NEXT                  1	/* "01": encoder starts automatically to encode the next frame */
+#define MRV_JPE_CONT_MODE_HEADER                3	/* "11": encoder first generates next header and then encodes automatically the next frame */
+#endif /* MRV_JPE_CONT_MODE */
+/*****************************************************************************/
+/* MIPI Registers                                                            */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: mipi_ctrl: global control register (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: S_ENABLE_CLK */
+/* 1: enable sensor clock lane (DEFAULT)*/
+/* 0: disable sensor clock lane */
+#ifdef MRV_MIPI_S_ENABLE_CLK
+#endif /* MRV_MIPI_S_ENABLE_CLK */
+/* Slice: ERR_SOT_SYNC_HS_SKIP:*/
+/* 1: data within the current transmission is skipped if ErrSotSyncHS is detected (default)*/
+/* 0: ErrSotSyncHS does not affect transmission */
+#ifdef MRV_MIPI_ERR_SOT_SYNC_HS_SKIP
+#endif /* MRV_MIPI_ERR_SOT_SYNC_HS_SKIP */
+/* Slice: ERR_SOT_HS_SKIP:*/
+/* 1: data within the current transmission is skipped if ErrSotHS is detected */
+/* 0: ErrSotHS does not affect transmission (default)*/
+#ifdef MRV_MIPI_ERR_SOT_HS_SKIP
+#endif /* MRV_MIPI_ERR_SOT_HS_SKIP */
+/* Slice: NUM_LANES:*/
+/* 00: Lane 1 is used;*/
+/* 01: Lanes 1 and 2 are used;*/
+/* 10: Lanes 1...3 are used;*/
+/* 11: Lanes 1...4 are used */
+#ifdef MRV_MIPI_NUM_LANES
+#define MRV_MIPI_NUM_LANES_1                0	/* 00: Lane 1 is used */
+#define MRV_MIPI_NUM_LANES_2                1	/* 01: Lanes 1 and 2 are used */
+#define MRV_MIPI_NUM_LANES_3                2	/* 10: Lanes 1...3 are used */
+#define MRV_MIPI_NUM_LANES_4                3	/* 11: Lanes 1...4 are used */
+#endif /* MRV_MIPI_NUM_LANES */
+/* Slice: SHUTDOWN_LANE:*/
+/* Shutdown Lane Module. Content of this register is directly connected to the output signal shutdown[n-1:0]*/
+#ifdef MRV_MIPI_SHUTDOWN_LANE
+#define MRV_MIPI_SHUTDOWN_LANE_1            1	/* 0001: shutdown lane 1 */
+#define MRV_MIPI_SHUTDOWN_LANE_2            2	/* 0010: shutdown lane 1 */
+#define MRV_MIPI_SHUTDOWN_LANE_3            4	/* 0100: shutdown lane 1 */
+#define MRV_MIPI_SHUTDOWN_LANE_4            8	/* 1000: shutdown lane 1 */
+#endif /* MRV_MIPI_SHUTDOWN_LANE */
+/* Slice: FLUSH_FIFO:*/
+/* writing '1' resets the write- and read pointers of the additional data fifo.*/
+#ifdef MRV_MIPI_FLUSH_FIFO
+#endif /* MRV_MIPI_FLUSH_FIFO */
+/* Slice: OUTPUT_ENA:*/
+/* 1: output to add data fifo and to output interface is enabled */
+#ifdef MRV_MIPI_OUTPUT_ENA
+#endif /* MRV_MIPI_OUTPUT_ENA */
+/*****************************************************************************/
+/**
+ * register: mipi_status: global status register (0x0004)
+ *
+ *****************************************************************************/
+/* Slice: S_ULP_ACTIVE_NOT_CLK:*/
+/* sensor clock lane is in ULP state. This register is directly connected to the synchronized input signal "s_ulpsactivenotclk"*/
+#ifdef MRV_MIPI_S_ULP_ACTIVE_NOT_CLK
+#endif /* MRV_MIPI_S_ULP_ACTIVE_NOT_CLK */
+/* Slice: S_STOPSTATE_CLK:*/
+/* sensor clock lane is in stopstate. This register is directly connected to the synchronized input signal "s_stopstateclk"*/
+#ifdef MRV_MIPI_S_STOPSTATE_CLK
+#endif /* MRV_MIPI_S_STOPSTATE_CLK */
+/* Slice: STOPSTATE:*/
+/* Lane is in stopstate. This register is directly connected to the synchronized input signal stopstate[n-1:0]*/
+#ifdef MRV_MIPI_STOPSTATE
+#endif /* MRV_MIPI_STOPSTATE */
+/* Slice: ADD_DATA_AVAIL:*/
+/* 1: additional data fifo contains data */
+/* 0: additional data fifo is empty */
+#ifdef MRV_MIPI_ADD_DATA_AVAIL
+#endif /* MRV_MIPI_ADD_DATA_AVAIL */
+/*****************************************************************************/
+/**
+ * register: mipi_imsc: Interrupt mask (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: IMSC_GEN_SHORT_PACK:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_GEN_SHORT_PACK
+#define MRV_MIPI_IMSC_GEN_SHORT_PACK_MASK           0
+#endif /* MRV_MIPI_IMSC_GEN_SHORT_PACK */
+/* Slice: IMSC_ADD_DATA_FILL_LEVEL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL_MASK      0
+#endif /* MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL */
+/* Slice: IMSC_ADD_DATA_OVFLW:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ADD_DATA_OVFLW
+#endif /* MRV_MIPI_IMSC_ADD_DATA_OVFLW */
+/* Slice: IMSC_FRAME_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_FRAME_END
+#define MRV_MIPI_IMSC_FRAME_END_MASK                0
+#endif /* MRV_MIPI_IMSC_ADD_DATA_OVFLW */
+/* Slice: IMSC_ERR_CS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ERR_CS
+#define MRV_MIPI_IMSC_ERR_CS_MASK                   0
+#endif /* MRV_MIPI_IMSC_ERR_CS */
+/* Slice: IMSC_ERR_ECC1:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ERR_ECC1
+#define MRV_MIPI_IMSC_ERR_ECC1_MASK                 0
+#endif /* MRV_MIPI_IMSC_ERR_ECC1 */
+/* Slice: IMSC_ERR_ECC2:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ERR_ECC2
+#define MRV_MIPI_IMSC_ERR_ECC2_MASK                 0
+#endif /* MRV_MIPI_IMSC_ERR_ECC2 */
+/* Slice: IMSC_ERR_PROTOCOL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_IMSC_ERR_PROTOCOL
+#define MRV_MIPI_IMSC_ERR_PROTOCOL_MASK             0
+#endif /* MRV_MIPI_IMSC_ERR_PROTOCOL */
+/* Slice: IMSC_ERR_CONTROL:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_IMSC_ERR_CONTROL
+#define MRV_MIPI_IMSC_ERR_CONTROL_MASK              0
+#endif /* MRV_MIPI_IMSC_ERR_CONTROL */
+/* Slice: IMSC_ERR_EOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_IMSC_ERR_EOT_SYNC
+#define MRV_MIPI_IMSC_ERR_EOT_SYNC_MASK             0
+#endif /* MRV_MIPI_IMSC_ERR_EOT_SYNC */
+/* Slice: IMSC_ERR_SOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_IMSC_ERR_SOT_SYNC
+#define MRV_MIPI_IMSC_ERR_SOT_SYNC_MASK             0
+#endif /* MRV_MIPI_IMSC_ERR_SOT_SYNC */
+/* Slice: IMSC_ERR_SOT:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_IMSC_ERR_SOT
+#define MRV_MIPI_IMSC_ERR_SOT_MASK                  0
+#endif /* MRV_MIPI_IMSC_ERR_SOT */
+/* Slice: IMSC_SYNC_FIFO_OVFLW:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_IMSC_SYNC_FIFO_OVFLW
+#define MRV_MIPI_IMSC_SYNC_FIFO_OVFLW_MASK          0
+#endif /* MRV_MIPI_IMSC_SYNC_FIFO_OVFLW */
+/* combination of all interrupt lines */
+#define MRV_MIPI_IMSC_ALL_IRQS
+#define MRV_MIPI_IMSC_ALL_IRQS_MASK \
+(MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL_MASK \
+	| MRV_MIPI_IMSC_ADD_DATA_OVFLW_MASK \
+	| MRV_MIPI_IMSC_FRAME_END_MASK \
+	| MRV_MIPI_IMSC_ERR_CS_MASK \
+	| MRV_MIPI_IMSC_ERR_ECC1_MASK \
+	| MRV_MIPI_IMSC_ERR_ECC2_MASK \
+	| MRV_MIPI_IMSC_ERR_PROTOCOL_MASK \
+	| MRV_MIPI_IMSC_ERR_CONTROL_MASK \
+	| MRV_MIPI_IMSC_ERR_EOT_SYNC_MASK \
+	| MRV_MIPI_IMSC_ERR_SOT_SYNC_MASK \
+	| MRV_MIPI_IMSC_ERR_SOT_MASK \
+	| MRV_MIPI_IMSC_SYNC_FIFO_OVFLW_MASK \
+)
+#define MRV_MIPI_IMSC_ALL_IRQS_SHIFT                0
+/*****************************************************************************/
+/**
+ * register: mipi_ris: Raw interrupt status (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: RIS_GEN_SHORT_PACK:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_GEN_SHORT_PACK
+#define MRV_MIPI_RIS_GEN_SHORT_PACK_MASK            0
+#endif /* MRV_MIPI_RIS_GEN_SHORT_PACK */
+/* Slice: RIS_ADD_DATA_FILL_LEVEL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL_MASK       0
+#endif /* MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL */
+/* Slice: RIS_ADD_DATA_OVFLW:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ADD_DATA_OVFLW
+#endif /* MRV_MIPI_RIS_ADD_DATA_OVFLW */
+/* Slice: RIS_FRAME_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_FRAME_END
+#define MRV_MIPI_RIS_FRAME_END_MASK                 0
+#endif /* MRV_MIPI_RIS_ADD_DATA_OVFLW */
+/* Slice: RIS_ERR_CS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ERR_CS
+#define MRV_MIPI_RIS_ERR_CS_MASK                    0
+#endif /* MRV_MIPI_RIS_ERR_CS */
+/* Slice: RIS_ERR_ECC1:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ERR_ECC1
+#define MRV_MIPI_RIS_ERR_ECC1_MASK                  0
+#endif /* MRV_MIPI_RIS_ERR_ECC1 */
+/* Slice: RIS_ERR_ECC2:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ERR_ECC2
+#define MRV_MIPI_RIS_ERR_ECC2_MASK                  0
+#endif /* MRV_MIPI_RIS_ERR_ECC2 */
+/* Slice: RIS_ERR_PROTOCOL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_RIS_ERR_PROTOCOL
+#define MRV_MIPI_RIS_ERR_PROTOCOL_MASK              0
+#endif /* MRV_MIPI_RIS_ERR_PROTOCOL */
+/* Slice: RIS_ERR_CONTROL:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_RIS_ERR_CONTROL
+#define MRV_MIPI_RIS_ERR_CONTROL_MASK               0
+#endif /* MRV_MIPI_RIS_ERR_CONTROL */
+/* Slice: RIS_ERR_EOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_RIS_ERR_EOT_SYNC
+#define MRV_MIPI_RIS_ERR_EOT_SYNC_MASK              0
+#endif /* MRV_MIPI_RIS_ERR_EOT_SYNC */
+/* Slice: RIS_ERR_SOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_RIS_ERR_SOT_SYNC
+#define MRV_MIPI_RIS_ERR_SOT_SYNC_MASK              0
+#endif /* MRV_MIPI_RIS_ERR_SOT_SYNC */
+/* Slice: RIS_ERR_SOT:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_RIS_ERR_SOT
+#define MRV_MIPI_RIS_ERR_SOT_MASK                   0
+#endif /* MRV_MIPI_RIS_ERR_SOT */
+/* Slice: RIS_SYNC_FIFO_OVFLW:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_RIS_SYNC_FIFO_OVFLW
+#define MRV_MIPI_RIS_SYNC_FIFO_OVFLW_MASK           0
+#endif /* MRV_MIPI_RIS_SYNC_FIFO_OVFLW */
+/* combination of all interrupt lines */
+#define MRV_MIPI_RIS_ALL_IRQS
+#define MRV_MIPI_RIS_ALL_IRQS_MASK \
+(MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL_MASK \
+	| MRV_MIPI_RIS_ADD_DATA_OVFLW_MASK \
+	| MRV_MIPI_RIS_FRAME_END_MASK \
+	| MRV_MIPI_RIS_ERR_CS_MASK \
+	| MRV_MIPI_RIS_ERR_ECC1_MASK \
+	| MRV_MIPI_RIS_ERR_ECC2_MASK \
+	| MRV_MIPI_RIS_ERR_PROTOCOL_MASK \
+	| MRV_MIPI_RIS_ERR_CONTROL_MASK \
+	| MRV_MIPI_RIS_ERR_EOT_SYNC_MASK \
+	| MRV_MIPI_RIS_ERR_SOT_SYNC_MASK \
+	| MRV_MIPI_RIS_ERR_SOT_MASK \
+	| MRV_MIPI_RIS_SYNC_FIFO_OVFLW_MASK \
+)
+#define MRV_MIPI_RIS_ALL_IRQS_SHIFT                 0
+/*****************************************************************************/
+/**
+ * register: mipi_mis: Masked interrupt status (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: MIS_GEN_SHORT_PACK:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_GEN_SHORT_PACK
+#define MRV_MIPI_MIS_GEN_SHORT_PACK_MASK            0
+#endif /* MRV_MIPI_MIS_GEN_SHORT_PACK */
+/* Slice: MIS_ADD_DATA_FILL_LEVEL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL_MASK       0
+#endif /* MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL */
+/* Slice: MIS_ADD_DATA_OVFLW:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ADD_DATA_OVFLW
+#endif /* MRV_MIPI_MIS_ADD_DATA_OVFLW */
+/* Slice: MIS_FRAME_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_FRAME_END
+#define MRV_MIPI_MIS_FRAME_END_MASK                 0
+#endif /* MRV_MIPI_MIS_ADD_DATA_OVFLW */
+/* Slice: MIS_ERR_CS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ERR_CS
+#define MRV_MIPI_MIS_ERR_CS_MASK                    0
+#endif /* MRV_MIPI_MIS_ERR_CS */
+/* Slice: MIS_ERR_ECC1:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ERR_ECC1
+#define MRV_MIPI_MIS_ERR_ECC1_MASK                  0
+#endif /* MRV_MIPI_MIS_ERR_ECC1 */
+/* Slice: MIS_ERR_ECC2:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ERR_ECC2
+#define MRV_MIPI_MIS_ERR_ECC2_MASK                  0
+#endif /* MRV_MIPI_MIS_ERR_ECC2 */
+/* Slice: MIS_ERR_PROTOCOL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_MIS_ERR_PROTOCOL
+#define MRV_MIPI_MIS_ERR_PROTOCOL_MASK              0
+#endif /* MRV_MIPI_MIS_ERR_PROTOCOL */
+/* Slice: MIS_ERR_CONTROL:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_MIS_ERR_CONTROL
+#define MRV_MIPI_MIS_ERR_CONTROL_MASK               0
+#endif /* MRV_MIPI_MIS_ERR_CONTROL */
+/* Slice: MIS_ERR_EOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_MIS_ERR_EOT_SYNC
+#define MRV_MIPI_MIS_ERR_EOT_SYNC_MASK              0
+#endif /* MRV_MIPI_MIS_ERR_EOT_SYNC */
+/* Slice: MIS_ERR_SOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_MIS_ERR_SOT_SYNC
+#define MRV_MIPI_MIS_ERR_SOT_SYNC_MASK              0
+#endif /* MRV_MIPI_MIS_ERR_SOT_SYNC */
+/* Slice: MIS_ERR_SOT:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_MIS_ERR_SOT
+#define MRV_MIPI_MIS_ERR_SOT_MASK                   0
+#endif /* MRV_MIPI_MIS_ERR_SOT */
+/* Slice: MIS_SYNC_FIFO_OVFLW:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_MIS_SYNC_FIFO_OVFLW
+#define MRV_MIPI_MIS_SYNC_FIFO_OVFLW_MASK           0
+#endif /* MRV_MIPI_MIS_SYNC_FIFO_OVFLW */
+/* combination of all interrupt lines */
+#define MRV_MIPI_MIS_ALL_IRQS
+#define MRV_MIPI_MIS_ALL_IRQS_MASK \
+(MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL_MASK \
+	| MRV_MIPI_MIS_ADD_DATA_OVFLW_MASK \
+	| MRV_MIPI_MIS_FRAME_END_MASK \
+	| MRV_MIPI_MIS_ERR_CS_MASK \
+	| MRV_MIPI_MIS_ERR_ECC1_MASK \
+	| MRV_MIPI_MIS_ERR_ECC2_MASK \
+	| MRV_MIPI_MIS_ERR_PROTOCOL_MASK \
+	| MRV_MIPI_MIS_ERR_CONTROL_MASK \
+	| MRV_MIPI_MIS_ERR_EOT_SYNC_MASK \
+	| MRV_MIPI_MIS_ERR_SOT_SYNC_MASK \
+	| MRV_MIPI_MIS_ERR_SOT_MASK \
+	| MRV_MIPI_MIS_SYNC_FIFO_OVFLW_MASK \
+)
+#define MRV_MIPI_MIS_ALL_IRQS_SHIFT                 0
+/*****************************************************************************/
+/**
+ * register: mipi_icr: Interrupt clear register (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: ICR_GEN_SHORT_PACK:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_GEN_SHORT_PACK
+#define MRV_MIPI_ICR_GEN_SHORT_PACK_MASK            0
+#endif /* MRV_MIPI_ICR_GEN_SHORT_PACK */
+/* Slice: ICR_ADD_DATA_FILL_LEVEL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL_MASK       0
+#endif /* MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL */
+/* Slice: ICR_ADD_DATA_OVFLW:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ADD_DATA_OVFLW
+#endif /* MRV_MIPI_ICR_ADD_DATA_OVFLW */
+/* Slice: ICR_FRAME_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_FRAME_END
+#define MRV_MIPI_ICR_FRAME_END_MASK                 0
+#endif /* MRV_MIPI_ICR_ADD_DATA_OVFLW */
+/* Slice: ICR_ERR_CS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ERR_CS
+#define MRV_MIPI_ICR_ERR_CS_MASK                    0
+#endif /* MRV_MIPI_ICR_ERR_CS */
+/* Slice: ICR_ERR_ECC1:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ERR_ECC1
+#define MRV_MIPI_ICR_ERR_ECC1_MASK                  0
+#endif /* MRV_MIPI_ICR_ERR_ECC1 */
+/* Slice: ICR_ERR_ECC2:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ERR_ECC2
+#define MRV_MIPI_ICR_ERR_ECC2_MASK                  0
+#endif /* MRV_MIPI_ICR_ERR_ECC2 */
+/* Slice: ICR_ERR_PROTOCOL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ICR_ERR_PROTOCOL
+#define MRV_MIPI_ICR_ERR_PROTOCOL_MASK              0
+#endif /* MRV_MIPI_ICR_ERR_PROTOCOL */
+/* Slice: ICR_ERR_CONTROL:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ICR_ERR_CONTROL
+#define MRV_MIPI_ICR_ERR_CONTROL_MASK               0
+#endif /* MRV_MIPI_ICR_ERR_CONTROL */
+/* Slice: ICR_ERR_EOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ICR_ERR_EOT_SYNC
+#define MRV_MIPI_ICR_ERR_EOT_SYNC_MASK              0
+#endif /* MRV_MIPI_ICR_ERR_EOT_SYNC */
+/* Slice: ICR_ERR_SOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ICR_ERR_SOT_SYNC
+#define MRV_MIPI_ICR_ERR_SOT_SYNC_MASK              0
+#endif /* MRV_MIPI_ICR_ERR_SOT_SYNC */
+/* Slice: ICR_ERR_SOT:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ICR_ERR_SOT
+#define MRV_MIPI_ICR_ERR_SOT_MASK                   0
+#endif /* MRV_MIPI_ICR_ERR_SOT */
+/* Slice: ICR_SYNC_FIFO_OVFLW:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ICR_SYNC_FIFO_OVFLW
+#define MRV_MIPI_ICR_SYNC_FIFO_OVFLW_MASK           0
+#endif /* MRV_MIPI_ICR_SYNC_FIFO_OVFLW */
+/* combination of all interrupt lines */
+#define MRV_MIPI_ICR_ALL_IRQS
+#define MRV_MIPI_ICR_ALL_IRQS_MASK \
+(MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL_MASK \
+	| MRV_MIPI_ICR_ADD_DATA_OVFLW_MASK \
+	| MRV_MIPI_ICR_FRAME_END_MASK \
+	| MRV_MIPI_ICR_ERR_CS_MASK \
+	| MRV_MIPI_ICR_ERR_ECC1_MASK \
+	| MRV_MIPI_ICR_ERR_ECC2_MASK \
+	| MRV_MIPI_ICR_ERR_PROTOCOL_MASK \
+	| MRV_MIPI_ICR_ERR_CONTROL_MASK \
+	| MRV_MIPI_ICR_ERR_EOT_SYNC_MASK \
+	| MRV_MIPI_ICR_ERR_SOT_SYNC_MASK \
+	| MRV_MIPI_ICR_ERR_SOT_MASK \
+	| MRV_MIPI_ICR_SYNC_FIFO_OVFLW_MASK \
+)
+#define MRV_MIPI_ICR_ALL_IRQS_SHIFT                 0
+/*****************************************************************************/
+/**
+ * register: mipi_isr: Interrupt set register (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: ISR_GEN_SHORT_PACK:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_GEN_SHORT_PACK
+#define MRV_MIPI_ISR_GEN_SHORT_PACK_MASK            0
+#endif /* MRV_MIPI_ISR_GEN_SHORT_PACK */
+/* Slice: ISR_ADD_DATA_FILL_LEVEL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL_MASK       0
+#endif /* MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL */
+/* Slice: ISR_ADD_DATA_OVFLW:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ADD_DATA_OVFLW
+#endif /* MRV_MIPI_ISR_ADD_DATA_OVFLW */
+/* Slice: ISR_FRAME_END:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_FRAME_END
+#define MRV_MIPI_ISR_FRAME_END_MASK                 0
+#endif /* MRV_MIPI_ISR_ADD_DATA_OVFLW */
+/* Slice: ISR_ERR_CS:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ERR_CS
+#define MRV_MIPI_ISR_ERR_CS_MASK                    0
+#endif /* MRV_MIPI_ISR_ERR_CS */
+/* Slice: ISR_ERR_ECC1:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ERR_ECC1
+#define MRV_MIPI_ISR_ERR_ECC1_MASK                  0
+#endif /* MRV_MIPI_ISR_ERR_ECC1 */
+/* Slice: ISR_ERR_ECC2:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ERR_ECC2
+#define MRV_MIPI_ISR_ERR_ECC2_MASK                  0
+#endif /* MRV_MIPI_ISR_ERR_ECC2 */
+/* Slice: ISR_ERR_PROTOCOL:*/
+/* enable interrupt (1) or mask out (0)*/
+#ifndef MRV_MIPI_ISR_ERR_PROTOCOL
+#define MRV_MIPI_ISR_ERR_PROTOCOL_MASK              0
+#endif /* MRV_MIPI_ISR_ERR_PROTOCOL */
+/* Slice: ISR_ERR_CONTROL:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ISR_ERR_CONTROL
+#define MRV_MIPI_ISR_ERR_CONTROL_MASK               0
+#endif /* MRV_MIPI_ISR_ERR_CONTROL */
+/* Slice: ISR_ERR_EOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ISR_ERR_EOT_SYNC
+#define MRV_MIPI_ISR_ERR_EOT_SYNC_MASK              0
+#endif /* MRV_MIPI_ISR_ERR_EOT_SYNC */
+/* Slice: ISR_ERR_SOT_SYNC:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ISR_ERR_SOT_SYNC
+#define MRV_MIPI_ISR_ERR_SOT_SYNC_MASK              0
+#endif /* MRV_MIPI_ISR_ERR_SOT_SYNC */
+/* Slice: ISR_ERR_SOT:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ISR_ERR_SOT
+#define MRV_MIPI_ISR_ERR_SOT_MASK                   0
+#endif /* MRV_MIPI_ISR_ERR_SOT */
+/* Slice: ISR_SYNC_FIFO_OVFLW:*/
+/* enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#ifndef MRV_MIPI_ISR_SYNC_FIFO_OVFLW
+#define MRV_MIPI_ISR_SYNC_FIFO_OVFLW_MASK           0
+#endif /* MRV_MIPI_ISR_SYNC_FIFO_OVFLW */
+/* combination of all interrupt lines */
+#define MRV_MIPI_ISR_ALL_IRQS
+#define MRV_MIPI_ISR_ALL_IRQS_MASK \
+(MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL_MASK \
+	| MRV_MIPI_ISR_ADD_DATA_OVFLW_MASK \
+	| MRV_MIPI_ISR_FRAME_END_MASK \
+	| MRV_MIPI_ISR_ERR_CS_MASK \
+	| MRV_MIPI_ISR_ERR_ECC1_MASK \
+	| MRV_MIPI_ISR_ERR_ECC2_MASK \
+	| MRV_MIPI_ISR_ERR_PROTOCOL_MASK \
+	| MRV_MIPI_ISR_ERR_CONTROL_MASK \
+	| MRV_MIPI_ISR_ERR_EOT_SYNC_MASK \
+	| MRV_MIPI_ISR_ERR_SOT_SYNC_MASK \
+	| MRV_MIPI_ISR_ERR_SOT_MASK \
+	| MRV_MIPI_ISR_SYNC_FIFO_OVFLW_MASK \
+)
+#define MRV_MIPI_ISR_ALL_IRQS_SHIFT                 0
+/*****************************************************************************/
+/**
+ * register: mipi_cur_data_id: Current Data Identifier (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: VIRTUAL_CHANNEL:*/
+/* virtual channel of currently received packet */
+#ifdef MRV_MIPI_VIRTUAL_CHANNEL
+#endif /* MRV_MIPI_VIRTUAL_CHANNEL */
+/* Slice: DATA_TYPE:*/
+/* data type of currently received packet */
+#ifdef MRV_MIPI_DATA_TYPE
+#endif /* MRV_MIPI_DATA_TYPE */
+/*****************************************************************************/
+/**
+ * register: mipi_img_data_sel: Image Data Selector (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: VIRTUAL_CHANNEL_SEL:*/
+/* virtual channel selector for image data output */
+#ifdef MRV_MIPI_VIRTUAL_CHANNEL_SEL
+#endif /* MRV_MIPI_VIRTUAL_CHANNEL_SEL */
+/* Slice: DATA_TYPE_SEL:*/
+/* data type selector for image data output:*/
+/* 0x08...0x0F: generic short packets */
+/* 0x12: embedded 8-bit data */
+/* 0x18: YUV 420 8-bit */
+/* 0x19: YUV 420 10-bit */
+/* 0x1A: Legacy YUV 420 8-bit */
+/* 0x1C: YUV 420 8-bit (CSPS)*/
+/* 0x1D: YUV 420 10-bit (CSPS)*/
+/* 0x1E: YUV 422 8-bit */
+/* 0x1F: YUV 422 10-bit */
+/* 0x20: RGB 444 */
+/* 0x21: RGB 555 */
+/* 0x22: RGB 565 */
+/* 0x23: RGB 666 */
+/* 0x24: RGB 888 */
+/* 0x28: RAW 6 */
+/* 0x29: RAW 7 */
+/* 0x2A: RAW 8 */
+/* 0x2B: RAW 10 */
+/* 0x2C: RAW 12 */
+/* 0x30...0x37: User Defined Byte-based data */
+#ifdef MRV_MIPI_DATA_TYPE_SEL
+#define MRV_MIPI_DATA_TYPE_SEL_YUV420_8BIT          24	/* 0x18    YUV 420 8-bit */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV420_10BIT         25	/* 0x19    YUV 420 10-bit */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV420_8BIT_LEGACY   26	/* 0x1A    Legacy YUV 420 8-bit */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV420_8BIT_CSPS     28	/* 0x1C    YUV 420 8-bit (CSPS) */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV420_10BIT_CSPS    29	/* 0x1D    YUV 420 10-bit (CSPS) */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV422_8BIT          30	/* 0x1E    YUV 422 8-bit */
+#define MRV_MIPI_DATA_TYPE_SEL_YUV422_10BIT         31	/* 0x1F    YUV 422 10-bit */
+#define MRV_MIPI_DATA_TYPE_SEL_RGB444               32	/* 0x20    RGB 444 */
+#define MRV_MIPI_DATA_TYPE_SEL_RGB555               33	/* 0x21    RGB 555 */
+#define MRV_MIPI_DATA_TYPE_SEL_RGB565               34	/* 0x22    RGB 565 */
+#define MRV_MIPI_DATA_TYPE_SEL_RGB666               35	/* 0x23    RGB 666 */
+#define MRV_MIPI_DATA_TYPE_SEL_RGB888               36	/* 0x24    RGB 888 */
+#define MRV_MIPI_DATA_TYPE_SEL_RAW6                 40	/* 0x28    RAW 6 */
+#define MRV_MIPI_DATA_TYPE_SEL_RAW7                 41	/* 0x29    RAW 7 */
+#define MRV_MIPI_DATA_TYPE_SEL_RAW8                 42	/* 0x2A    RAW 8 */
+#define MRV_MIPI_DATA_TYPE_SEL_RAW10                43	/* 0x2B    RAW 10 */
+#define MRV_MIPI_DATA_TYPE_SEL_RAW12                44	/* 0x2C    RAW 12 */
+#define MRV_MIPI_DATA_TYPE_SEL_USER1                48	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER2                49	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER3                50	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER4                51	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER5                52	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER6                53	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER7                54	/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL_USER8                55	/* 0x30...0x37 User Defined Byte-based data */
+#endif /* MRV_MIPI_DATA_TYPE_SEL */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_sel_1: Additional Data Selector 1 (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_VC_1:*/
+/* virtual channel selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_VC_1
+#endif /* MRV_MIPI_ADD_DATA_VC_1 */
+/* Slice: ADD_DATA_TYPE_1:*/
+/* data type selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_TYPE_1
+#endif /* MRV_MIPI_ADD_DATA_TYPE_1 */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_sel_2: Additional Data Selector 2 (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_VC_2:*/
+/* virtual channel selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_VC_2
+#endif /* MRV_MIPI_ADD_DATA_VC_2 */
+/* Slice: ADD_DATA_TYPE_2:*/
+/* data type selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_TYPE_2
+#endif /* MRV_MIPI_ADD_DATA_TYPE_2 */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_sel_3: Additional Data Selector 3 (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_VC_3:*/
+/* virtual channel selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_VC_3
+#endif /* MRV_MIPI_ADD_DATA_VC_3 */
+/* Slice: ADD_DATA_TYPE_3:*/
+/* data type selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_TYPE_3
+#endif /* MRV_MIPI_ADD_DATA_TYPE_3 */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_sel_4: Additional Data Selector 4 (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_VC_4:*/
+/* virtual channel selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_VC_4
+#endif /* MRV_MIPI_ADD_DATA_VC_4 */
+/* Slice: ADD_DATA_TYPE_4:*/
+/* data type selector for additional data output */
+#ifdef MRV_MIPI_ADD_DATA_TYPE_4
+#endif /* MRV_MIPI_ADD_DATA_TYPE_4 */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_fifo: Additional Data Fifo (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_FIFO:*/
+/* lowest 4 bytes in additional data fifo;*/
+/* reading increments fifo read pointer.*/
+/* First embedded data byte will be written to bits 7:0 of 32-bit data word, second data byte written to 15:8 etc.*/
+#ifdef MRV_MIPI_ADD_DATA_FIFO
+#endif /* MRV_MIPI_ADD_DATA_FIFO */
+/*****************************************************************************/
+/**
+ * register: mipi_add_data_fill_level: additional data fifo fill level
+ *           (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: ADD_DATA_FILL_LEVEL:*/
+/* FIFO level in dwords for triggering the FILL_LEVEL interrupt,*/
+/* must be 32-bit aligned (bit 0 and bit 1 are hard wired to "00")*/
+#ifdef MRV_MIPI_ADD_DATA_FILL_LEVEL
+#endif /* MRV_MIPI_ADD_DATA_FILL_LEVEL */
+/*****************************************************************************/
+/**
+ * register: mipi_compressed_mode: controls processing of compressed raw data
+ *           types (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: predictor_sel:*/
+/* predictor to be used:*/
+/* 0: predictor 1 */
+/* 1: predictor 2 */
+#ifdef MRV_MIPI_PREDICTOR_SEL
+#define MRV_MIPI_PREDICTOR_SEL_1            0	/* 0: predictor 1 */
+#define MRV_MIPI_PREDICTOR_SEL_2            1	/* 1: predictor 2 */
+#endif /* MRV_MIPI_PREDICTOR_SEL */
+/* Slice: MRV_MIPI_COMP_SCHEME:*/
+/* Compressed raw data types */
+/* 000: 12-8-12 */
+/* 001: 12-8-12 */
+/* 010: 12-8-12 */
+/* 011: 10-8-10 */
+/* 100: 10-7-10 */
+/* 101: 10-6-10 */
+#ifdef MRV_MIPI_COMP_SCHEME
+#define MRV_MIPI_COMP_SCHEME_12_8_12        0	/* 000: 12-8-12 */
+#define MRV_MIPI_COMP_SCHEME_12_7_12        1	/* 001: 12-8-12 */
+#define MRV_MIPI_COMP_SCHEME_12_6_12        2	/* 010: 12-8-12 */
+#define MRV_MIPI_COMP_SCHEME_10_8_10        3	/* 011: 10-8-10 */
+#define MRV_MIPI_COMP_SCHEME_10_7_10        4	/* 100: 10-7-10 */
+#define MRV_MIPI_COMP_SCHEME_10_6_10        5	/* 101: 10-6-10 */
+#endif /* MRV_MIPI_COMP_SCHEME */
+/* Slice: compress_en:*/
+/* 1: enable compressed mode processing */
+/* 0: disable compressed mode */
+#ifdef MRV_MIPI_COMPRESS_EN
+#endif /* MRV_MIPI_COMPRESS_EN */
+/*****************************************************************************/
+/* ISP  Image Stabilization Registers                                        */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_is_ctrl: Image Stabilization Control Register (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: is_en:*/
+/* 1: image stabilization switched on */
+/* 0: image stabilization switched off */
+#ifdef MRV_IS_IS_EN
+#define MRV_IS_IS_EN_PROCESS                    1
+#define MRV_IS_IS_EN_BYPASS                     0
+#endif /* MRV_IS_IS_EN */
+/*****************************************************************************/
+/**
+ * register: isp_is_recenter: Recenter register (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: is_recenter:*/
+/*  000: recenter feature switched off */
+/* 1..7: recentering by (cur_h/v_offs-H/V_OFFS)/2^RECENTER */
+#ifdef MRV_IS_IS_RECENTER
+#define MRV_IS_IS_RECENTER_MAX                  (MRV_IS_IS_RECENTER_MASK >> MRV_IS_IS_RECENTER_SHIFT)
+#endif /* MRV_IS_IS_RECENTER */
+/*****************************************************************************/
+/**
+ * register: isp_is_h_offs: Horizontal offset of output window (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: is_h_offs:*/
+/* horizontal picture offset in pixel */
+#ifdef MRV_IS_IS_H_OFFS
+#define MRV_IS_IS_H_OFFS_MAX  (MRV_IS_IS_H_OFFS_MASK >> MRV_IS_IS_H_OFFS_SHIFT)
+#endif /* MRV_IS_IS_H_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_is_v_offs: Vertical offset of output window (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: is_v_offs:*/
+/* vertical picture offset in lines */
+#ifdef MRV_IS_IS_V_OFFS
+#define MRV_IS_IS_V_OFFS_MAX  (MRV_IS_IS_V_OFFS_MASK >> MRV_IS_IS_V_OFFS_SHIFT)
+#endif /* MRV_IS_IS_V_OFFS */
+/*****************************************************************************/
+/**
+ * register: isp_is_h_size: Output horizontal picture size (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: is_h_size:*/
+/* horizontal picture size in pixel */
+/* if ISP_MODE is set to */
+/* 001-(ITU-R BT.656 YUV),*/
+/* 010-(ITU-R BT.601 YUV),*/
+/* 011-(ITU-R BT.601 Bayer RGB),*/
+/* 101-(ITU-R BT.656 Bayer RGB)*/
+/* only even numbers are accepted, because complete quadruples of YUYV(YCbYCr)*/
+/* are needed for the following modules. If an odd size is programmed the value */
+/* will be truncated to even size.*/
+#ifdef MRV_IS_IS_H_SIZE
+#define MRV_IS_IS_H_SIZE_MAX  (MRV_IS_IS_H_SIZE_MASK >> MRV_IS_IS_H_SIZE_SHIFT)
+#endif /* MRV_IS_IS_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_is_v_size: Output vertical picture size (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: is_v_size:*/
+/* vertical picture size in lines */
+#ifdef MRV_IS_IS_V_SIZE
+#define MRV_IS_IS_V_SIZE_MAX  (MRV_IS_IS_V_SIZE_MASK >> MRV_IS_IS_V_SIZE_SHIFT)
+#endif /* MRV_IS_IS_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_is_max_dx: Maximum Horizontal Displacement (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: is_max_dx:*/
+/* maximum allowed accumulated horizontal displacement in pixels */
+#ifdef MRV_IS_IS_MAX_DX
+#define MRV_IS_IS_MAX_DX_MAX                    (MRV_IS_IS_MAX_DX_MASK >> MRV_IS_IS_MAX_DX_SHIFT)
+#endif /* MRV_IS_IS_MAX_DX */
+/*****************************************************************************/
+/**
+ * register: isp_is_max_dy: Maximum Vertical Displacement (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: is_max_dy:*/
+/* maximum allowed accumulated vertical displacement in lines */
+#ifdef MRV_IS_IS_MAX_DY
+#define MRV_IS_IS_MAX_DY_MAX                    (MRV_IS_IS_MAX_DY_MASK >> MRV_IS_IS_MAX_DY_SHIFT)
+#endif /* MRV_IS_IS_MAX_DY */
+/*****************************************************************************/
+/**
+ * register: isp_is_displace: Camera displacement (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: dy:*/
+/* ISP_IS will compensate for vertical camera displacement of DY lines in the next frame */
+#ifdef MRV_IS_DY
+#define MRV_IS_DY_MAX                           0x000007FF
+#define MRV_IS_DY_MIN                           (~MRV_IS_DY_MAX)
+#endif /* MRV_IS_DY */
+/* Slice: dx:*/
+/* ISP_IS will compensate for horizontal camera displacement of DX pixels in the next frame */
+#ifdef MRV_IS_DX
+#define MRV_IS_DX_MAX                           0x000007FF
+#define MRV_IS_DX_MIN                           (~MRV_IS_DX_MAX)
+#endif /* MRV_IS_DX */
+/*****************************************************************************/
+/**
+ * register: isp_is_h_offs_shd: current horizontal offset of output window
+ *           (shadow register) (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: is_h_offs_shd:*/
+/* current horizonatl picture offset in lines */
+#ifdef MRV_IS_IS_H_OFFS_SHD
+#endif /* MRV_IS_IS_H_OFFS_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_is_v_offs_shd: current vertical offset of output window
+ *           (shadow register) (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: is_v_offs_shd:*/
+/* current vertical picture offset in lines */
+#ifdef MRV_IS_IS_V_OFFS_SHD
+#endif /* MRV_IS_IS_V_OFFS_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_is_h_size_shd: current output horizontal picture size
+ *           (shadow register) (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: isp_h_size_shd:*/
+/* current horizontal picture size in pixel */
+#ifdef MRV_IS_ISP_H_SIZE_SHD
+#endif /* MRV_IS_ISP_H_SIZE_SHD */
+/*****************************************************************************/
+/**
+ * register: isp_is_v_size_shd: current output vertical picture size
+ *           (shadow register) (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: isp_v_size_shd:*/
+/* vertical picture size in lines */
+#ifdef MRV_IS_ISP_V_SIZE_SHD
+#endif /* MRV_IS_ISP_V_SIZE_SHD */
+/*****************************************************************************/
+/* ISP Histogram Module Registers                                            */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_hist_prop: Histogram properties (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: stepsize:*/
+/* histogram predivider, process every (stepsize)th pixel, all other pixels are skipped */
+/* 0,1,2: not allowed */
+/* 3: process every third input pixel */
+/* 4: process every fourth input pixel */
+/* ...*/
+/* 7FH: process every 127th pixel */
+#ifdef MRV_HIST_STEPSIZE
+#define MRV_HIST_STEPSIZE_MIN                   0x00000003
+#define MRV_HIST_STEPSIZE_MAX                   0x0000007F
+#endif /* MRV_HIST_STEPSIZE */
+/* Slice: hist_mode:*/
+/* histogram mode, luminance is taken at ISP output before output formatter,*/
+/* RGB is taken at xtalk output */
+     /**/
+/* 7, 6: must not be used */
+/* 5: Y (luminance) histogram */
+/* 4: B histogram */
+/* 3: G histogram */
+/* 2: R histogram */
+/* 1: RGB combined histogram */
+/* 0: disable, no measurements */
+#ifdef MRV_HIST_MODE
+#define MRV_HIST_MODE_MAX                  5	/* because 6 and 7 are reserved */
+#define MRV_HIST_MODE_LUM                  5	/* 5: Y (luminance) histogram */
+#define MRV_HIST_MODE_B                    4	/* 4: B histogram */
+#define MRV_HIST_MODE_G                    3	/* 3: G histogram */
+#define MRV_HIST_MODE_R                    2	/* 2: R histogram */
+#define MRV_HIST_MODE_RGB                  1	/* 1: RGB combined histogram */
+#define MRV_HIST_MODE_NONE                 0	/* 0: disable, no measurements */
+#endif /* MRV_HIST_MODE */
+/*****************************************************************************/
+/**
+ * register: isp_hist_h_offs: Histogram window horizontal offset for first
+ *           window of 25 sub-windows (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: hist_h_offset:*/
+/* Horizontal offset of first window in pixels.*/
+#ifdef MRV_HIST_H_OFFSET
+#endif /* MRV_HIST_H_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_hist_v_offs: Histogram window vertical offset for first
+ *           window of 25 sub-windows (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: hist_v_offset:*/
+/* Vertical offset of first window in pixels.*/
+#ifdef MRV_HIST_V_OFFSET
+#endif /* MRV_HIST_V_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_hist_h_size: Horizontal (sub-)window size (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: hist_h_size:*/
+/* Horizontal size in pixels of one sub-window, if histogram version 3 is implemented.*/
+#ifdef MRV_HIST_H_SIZE
+#endif /* MRV_HIST_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_hist_v_size: Vertical (sub-)window size (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: hist_v_size:*/
+/* Vertical size in lines of one sub-window, if histogram version 3 is implemented.*/
+#ifdef MRV_HIST_V_SIZE
+#endif /* MRV_HIST_V_SIZE */
+/*****************************************************************************/
+/**
+ * register array: isp_hist_bin: histogram measurement result bin
+ *                 (0x028 + n*0x4 (n=0..15))
+ *
+ *****************************************************************************/
+/* Slice: hist_bin_n:*/
+/* measured bin count as 16-bit unsigned integer value plus 4 bit fractional part */
+#ifdef MRV_HIST_BIN_N
+#define MRV_HIST_BIN_N_MAX                 (MRV_HIST_BIN_N_MASK >> MRV_HIST_BIN_N_SHIFT)
+#endif /* MRV_HIST_BIN_N */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_00to30: Weighting factor for sub-windows
+ *           (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_30:*/
+/* weighting factor for sub-window 30 */
+#ifdef MRV_HIST_WEIGHT_30
+#endif /* MRV_HIST_WEIGHT_30 */
+/* Slice: hist_weight_20:*/
+/* weighting factor for sub-window 20 */
+#ifdef MRV_HIST_WEIGHT_20
+#endif /* MRV_HIST_WEIGHT_20 */
+/* Slice: hist_weight_10:*/
+/* weighting factor for sub-window 10 */
+#ifdef MRV_HIST_WEIGHT_10
+#endif /* MRV_HIST_WEIGHT_10 */
+/* Slice: hist_weight_00:*/
+/* weighting factor for sub-window 00 */
+#ifdef MRV_HIST_WEIGHT_00
+#endif /* MRV_HIST_WEIGHT_00 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_40to21: Weighting factor for sub-windows
+ *           (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_21:*/
+/* weighting factor for sub-window 21 */
+#ifdef MRV_HIST_WEIGHT_21
+#endif /* MRV_HIST_WEIGHT_21 */
+/* Slice: hist_weight_11:*/
+/* weighting factor for sub-window 11 */
+#ifdef MRV_HIST_WEIGHT_11
+#endif /* MRV_HIST_WEIGHT_11 */
+/* Slice: hist_weight_01:*/
+/* weighting factor for sub-window 01 */
+#ifdef MRV_HIST_WEIGHT_01
+#endif /* MRV_HIST_WEIGHT_01 */
+/* Slice: hist_weight_40:*/
+/* weighting factor for sub-window 40 */
+#ifdef MRV_HIST_WEIGHT_40
+#endif /* MRV_HIST_WEIGHT_40 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_31to12: Weighting factor for sub-windows
+ *           (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_12:*/
+/* weighting factor for sub-window 12 */
+#ifdef MRV_HIST_WEIGHT_12
+#endif /* MRV_HIST_WEIGHT_12 */
+/* Slice: hist_weight_02:*/
+/* weighting factor for sub-window 02 */
+#ifdef MRV_HIST_WEIGHT_02
+#endif /* MRV_HIST_WEIGHT_02 */
+/* Slice: hist_weight_41:*/
+/* weighting factor for sub-window 41 */
+#ifdef MRV_HIST_WEIGHT_41
+#endif /* MRV_HIST_WEIGHT_41 */
+/* Slice: hist_weight_31:*/
+/* weighting factor for sub-window 31 */
+#ifdef MRV_HIST_WEIGHT_31
+#endif /* MRV_HIST_WEIGHT_31 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_22to03: Weighting factor for sub-windows
+ *           (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_03:*/
+/* weighting factor for sub-window 03 */
+#ifdef MRV_HIST_WEIGHT_03
+#endif /* MRV_HIST_WEIGHT_03 */
+/* Slice: hist_weight_42:*/
+/* weighting factor for sub-window 42 */
+#ifdef MRV_HIST_WEIGHT_42
+#endif /* MRV_HIST_WEIGHT_42 */
+/* Slice: hist_weight_32:*/
+/* weighting factor for sub-window 32 */
+#ifdef MRV_HIST_WEIGHT_32
+#endif /* MRV_HIST_WEIGHT_32 */
+/* Slice: hist_weight_22:*/
+/* weighting factor for sub-window 22 */
+#ifdef MRV_HIST_WEIGHT_22
+#endif /* MRV_HIST_WEIGHT_22 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_13to43: Weighting factor for sub-windows
+ *           (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_43:*/
+/* weighting factor for sub-window 43 */
+#ifdef MRV_HIST_WEIGHT_43
+#endif /* MRV_HIST_WEIGHT_43 */
+/* Slice: hist_weight_33:*/
+/* weighting factor for sub-window 33 */
+#ifdef MRV_HIST_WEIGHT_33
+#endif /* MRV_HIST_WEIGHT_33 */
+/* Slice: hist_weight_23:*/
+/* weighting factor for sub-window 23 */
+#ifdef MRV_HIST_WEIGHT_23
+#endif /* MRV_HIST_WEIGHT_23 */
+/* Slice: hist_weight_13:*/
+/* weighting factor for sub-window 13 */
+#ifdef MRV_HIST_WEIGHT_13
+#endif /* MRV_HIST_WEIGHT_13 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_04to34: Weighting factor for sub-windows
+ *           (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_34:*/
+/* weighting factor for sub-window 34 */
+#ifdef MRV_HIST_WEIGHT_34
+#endif /* MRV_HIST_WEIGHT_34 */
+/* Slice: hist_weight_24:*/
+/* weighting factor for sub-window 24 */
+#ifdef MRV_HIST_WEIGHT_24
+#endif /* MRV_HIST_WEIGHT_24 */
+/* Slice: hist_weight_14:*/
+/* weighting factor for sub-window 14 */
+#ifdef MRV_HIST_WEIGHT_14
+#endif /* MRV_HIST_WEIGHT_14 */
+/* Slice: hist_weight_04:*/
+/* weighting factor for sub-window 04 */
+#ifdef MRV_HIST_WEIGHT_04
+#endif /* MRV_HIST_WEIGHT_04 */
+/*****************************************************************************/
+/**
+ * register: isp_hist_weight_44: Weighting factor for sub-windows (0x0000006c)
+ *
+ *****************************************************************************/
+/* Slice: hist_weight_44:*/
+/* weighting factor for sub-window 44 */
+#ifdef MRV_HIST_WEIGHT_44
+#endif /* MRV_HIST_WEIGHT_44 */
+#define MRV_HIST_WEIGHT_MAX                     0x10
+/*****************************************************************************/
+/* ISP Filter Module Registers                                               */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_filt_mode: mode control register for the filter block
+ *           (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: stage1_select:*/
+/* Green filter stage 1 select (range 0x0...0x8)*/
+/* 0x0 maximum blurring */
+/* 0x4 Default */
+/* 0x7 minimum blurring */
+/* 0x8 filter stage1 bypass */
+/* For a detailed description refer to chapter "ISP Filter Programming" of user manual */
+#ifdef MRV_FILT_STAGE1_SELECT
+#define MRV_FILT_STAGE1_SELECT_MAX_BLUR         0U	/* 0x0 maximum blurring */
+#define MRV_FILT_STAGE1_SELECT_DEFAULT          4U	/* 0x4 Default */
+#define MRV_FILT_STAGE1_SELECT_MIN_BLUR         7U	/* 0x7 minimum blurring */
+#define MRV_FILT_STAGE1_SELECT_BYPASS           8U	/* 0x8 filter stage1 bypass */
+#endif /* MRV_FILT_STAGE1_SELECT */
+/* Slice: filt_chr_h_mode:*/
+/* Chroma filter horizontal mode */
+/* 00 horizontal chroma filter bypass */
+/* 01 horizontal chroma filter 1 static mask = [10 12 10]*/
+/* 10 horizontal chroma filter 2 (dynamic blur1)*/
+/* 11 horizontal chroma filter 3 (dynamic blur2) Default */
+#ifdef MRV_FILT_FILT_CHR_H_MODE
+#define MRV_FILT_FILT_CHR_H_MODE_BYPASS         0U	/* 00 horizontal chroma filter bypass */
+#define MRV_FILT_FILT_CHR_H_MODE_STATIC         1U	/* 01 horizontal chroma filter 1 static mask = [10 12 10] */
+#define MRV_FILT_FILT_CHR_H_MODE_DYN_1          2U	/* 10 horizontal chroma filter 2 (dynamic blur1) */
+#define MRV_FILT_FILT_CHR_H_MODE_DYN_2          3U	/* 11 horizontal chroma filter 3 (dynamic blur2) Default */
+#endif /* MRV_FILT_FILT_CHR_H_MODE */
+/* Slice: filt_chr_v_mode:*/
+/* Chroma filter vertical mode */
+/* 00 vertical chroma filter bypass */
+/* 01 vertical chroma filter 1 static [8 16 8]*/
+/* 10 vertical chroma filter 2 static [10 12 10]*/
+/* 11 vertical chroma filter 3 static [12 8 12] Default */
+#ifdef MRV_FILT_FILT_CHR_V_MODE
+#define MRV_FILT_FILT_CHR_V_MODE_BYPASS         0U	/* 00 vertical chroma filter bypass */
+#define MRV_FILT_FILT_CHR_V_MODE_STATIC8        1U	/* 01 vertical chroma filter 1 static [8 16 8] */
+#define MRV_FILT_FILT_CHR_V_MODE_STATIC10       2U	/* 10 vertical chroma filter 2 static [10 12 10] */
+#define MRV_FILT_FILT_CHR_V_MODE_STATIC12       3U	/* 11 vertical chroma filter 3 static [12 8 12] Default */
+#endif /* MRV_FILT_FILT_CHR_V_MODE */
+/* Slice: filt_mode:*/
+/* 0 green filter static mode (active filter factor = FILT_FAC_MID)*/
+/* 1 dynamic noise reduction/sharpen Default */
+#ifdef MRV_FILT_FILT_MODE
+#define MRV_FILT_FILT_MODE_STATIC               0U	/* 0 green filter static mode (active filter factor = FILT_FAC_MID) */
+#define MRV_FILT_FILT_MODE_DYNAMIC              1U	/* 1 dynamic noise reduction/sharpen Default */
+#endif /* MRV_FILT_FILT_MODE */
+/* Slice: filt_enable:*/
+/* 1 enable filter */
+/* 0 bypass filter Default */
+#ifdef MRV_FILT_FILT_ENABLE
+#define MRV_FILT_FILT_ENABLE_PROCESS            1U
+#define MRV_FILT_FILT_ENABLE_BYPASS             0U
+#endif /* MRV_FILT_FILT_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_filt_thresh_bl0: Blurring threshold 0 (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: filt_thresh_bl0:*/
+/* If filt_thresh_bl1 < sum_grad < filt_thresh_bl0 then filt_fac_bl0 is selected */
+#ifdef MRV_FILT_FILT_THRESH_BL0
+#endif /* MRV_FILT_FILT_THRESH_BL0 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_thresh_bl1: Blurring threshold 1 (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: filt_thresh_bl1:*/
+/* If sum_grad < filt_thresh_bl1 then filt_fac_bl1 is selected */
+#ifdef MRV_FILT_FILT_THRESH_BL1
+#endif /* MRV_FILT_FILT_THRESH_BL1 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_thresh_sh0: Sharpening threshold 0 (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: filt_thresh_sh0:*/
+/* If filt_thresh_sh0 < sum_grad < filt_thresh_sh1 then filt_thresh_sh0 is selected */
+#ifdef MRV_FILT_FILT_THRESH_SH0
+#endif /* MRV_FILT_FILT_THRESH_SH0 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_thresh_sh1: Sharpening threshold 1 (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: filt_thresh_sh1:*/
+/* If filt_thresh_sh1 < sum_grad then filt_thresh_sh1 is selected */
+#ifdef MRV_FILT_FILT_THRESH_SH1
+#endif /* MRV_FILT_FILT_THRESH_SH1 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_lum_weight: Parameters for luminance weight function
+ *           (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: lum_weight_gain:*/
+/* Gain select of luminance weight function */
+#ifdef MRV_FILT_LUM_WEIGHT_GAIN
+#endif /* MRV_FILT_LUM_WEIGHT_GAIN */
+/* Slice: lum_weight_kink:*/
+/* Kink position of luminance weight function */
+#ifdef MRV_FILT_LUM_WEIGHT_KINK
+#endif /* MRV_FILT_LUM_WEIGHT_KINK */
+/* Slice: lum_weight_min:*/
+/* Minimum value of luminance weight function */
+#ifdef MRV_FILT_LUM_WEIGHT_MIN
+#endif /* MRV_FILT_LUM_WEIGHT_MIN */
+/*****************************************************************************/
+/**
+ * register: isp_filt_fac_sh1: filter factor sharp1 (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: filt_fac_sh1:*/
+/* Filter factor for sharp1 level */
+#ifdef MRV_FILT_FILT_FAC_SH1
+#endif /* MRV_FILT_FILT_FAC_SH1 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_fac_sh0: filter factor sharp0 (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: filt_fac_sh0:*/
+/* Filter factor for sharp0 level */
+#ifdef MRV_FILT_FILT_FAC_SH0
+#endif /* MRV_FILT_FILT_FAC_SH0 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_fac_mid: filter factor middle (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: filt_fac_mid:*/
+/* Filter factor for mid level and for static filter mode */
+#ifdef MRV_FILT_FILT_FAC_MID
+#endif /* MRV_FILT_FILT_FAC_MID */
+/*****************************************************************************/
+/**
+ * register: isp_filt_fac_bl0: Parameter for blur 0 filter (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: filt_fac_bl0:*/
+/* Filter factor for blur 0 level */
+#ifdef MRV_FILT_FILT_FAC_BL0
+#endif /* MRV_FILT_FILT_FAC_BL0 */
+/*****************************************************************************/
+/**
+ * register: isp_filt_fac_bl1: Parameter for blur 1 filter (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: filt_fac_bl1:*/
+/* Filter factor for blur 1 level (max blur)*/
+#ifdef MRV_FILT_FILT_FAC_BL1
+#endif /* MRV_FILT_FILT_FAC_BL1 */
+/*****************************************************************************/
+/* ISP Auto Focus Measurement Registers                                      */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_afm_ctrl: This is the control register for AF measurement
+ *           unit (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: afm_en:*/
+/* AF measurement enable */
+/* 0: AF measurement is disabled */
+/* 1: AF measurement is enabled */
+/* Writing a 1 to this register starts a new measurement and resets the afm_fin (measurement finished) interrupt to 0.*/
+/* As long as the afm_en is 1, the AFM unit calculates new sharpness values for each frame.*/
+#ifdef MRV_AFM_AFM_EN
+#define MRV_AFM_AFM_EN_ENABLE           1	/* 1: enable AF measurment */
+#define MRV_AFM_AFM_EN_DISABLE          0	/* 0: processing is deactivated, bypass mode is selected */
+#endif /* MRV_AFM_AFM_EN */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lt_a: Top Left corner of measure window A (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: a_h_l:*/
+/* first pixel of window A (horizontal left row), value must be greater or equal 5 */
+#ifdef MRV_AFM_A_H_L
+#define MRV_AFM_A_H_L_MIN                       (5U)
+#define MRV_AFM_A_H_L_MAX   (MRV_AFM_A_H_L_MASK >> MRV_AFM_A_H_L_SHIFT)
+#endif /* MRV_AFM_A_H_L */
+/* Slice: a_v_t:*/
+/* first line of window A (vertical top line), value must be greater or equal 2 */
+#ifdef MRV_AFM_A_V_T
+#define MRV_AFM_A_V_T_MIN                       (2U)
+#define MRV_AFM_A_V_T_MAX   (MRV_AFM_A_V_T_MASK >> MRV_AFM_A_V_T_SHIFT)
+#endif /* MRV_AFM_A_V_T */
+/*****************************************************************************/
+/**
+ * register: isp_afm_rb_a: Bottom right corner of measure window A (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: a_h_r:*/
+/* last pixel of window A (horizontal right row)*/
+#ifdef MRV_AFM_A_H_R
+#define MRV_AFM_A_H_R_MIN                       (5U)
+#define MRV_AFM_A_H_R_MAX   (MRV_AFM_A_H_R_MASK >> MRV_AFM_A_H_R_SHIFT)
+#endif /* MRV_AFM_A_H_R */
+/* Slice: a_v_b:*/
+/* last line of window A (vertical bottom line), value must be lower than */
+/* (number of lines -2)*/
+#ifdef MRV_AFM_A_V_B
+#define MRV_AFM_A_V_B_MIN                       (2U)
+#define MRV_AFM_A_V_B_MAX   (MRV_AFM_A_V_B_MASK >> MRV_AFM_A_V_B_SHIFT)
+#endif /* MRV_AFM_A_V_B */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lt_b: Top left corner of measure window B (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: b_h_l:*/
+/* first pixel of window B (horizontal left row), value must be greater or equal 5 */
+#ifdef MRV_AFM_B_H_L
+#define MRV_AFM_B_H_L_MIN                       (5U)
+#define MRV_AFM_B_H_L_MAX   (MRV_AFM_B_H_L_MASK >> MRV_AFM_B_H_L_SHIFT)
+#endif /* MRV_AFM_B_H_L */
+/* Slice: b_v_t:*/
+/* first line of window B (vertical top line), value must be greater or equal 2 */
+#ifdef MRV_AFM_B_V_T
+#define MRV_AFM_B_V_T_MIN                       (2U)
+#define MRV_AFM_B_V_T_MAX   (MRV_AFM_B_V_T_MASK >> MRV_AFM_B_V_T_SHIFT)
+#endif /* MRV_AFM_B_V_T */
+/*****************************************************************************/
+/**
+ * register: isp_afm_rb_b: Bottom right corner of measure window B (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: b_h_r:*/
+/* last pixel of window B (horizontal right row)*/
+#ifdef MRV_AFM_B_H_R
+#define MRV_AFM_B_H_R_MIN                       (5U)
+#define MRV_AFM_B_H_R_MAX   (MRV_AFM_B_H_R_MASK >> MRV_AFM_B_H_R_SHIFT)
+#endif /* MRV_AFM_B_H_R */
+/* Slice: b_v_b:*/
+/* last line of window B (vertical bottom line), value must be lower than */
+/* (number of lines -2)*/
+#ifdef MRV_AFM_B_V_B
+#define MRV_AFM_B_V_B_MIN                       (2U)
+#define MRV_AFM_B_V_B_MAX   (MRV_AFM_B_V_B_MASK >> MRV_AFM_B_V_B_SHIFT)
+#endif /* MRV_AFM_B_V_B */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lt_c: Top left corner of measure window C (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: c_h_l:*/
+/* first pixel of window C (horizontal left row), value must be greater or equal 5 */
+#ifdef MRV_AFM_C_H_L
+#define MRV_AFM_C_H_L_MIN                       (5U)
+#define MRV_AFM_C_H_L_MAX   (MRV_AFM_C_H_L_MASK >> MRV_AFM_C_H_L_SHIFT)
+#endif /* MRV_AFM_C_H_L */
+/* Slice: c_v_t:*/
+/* first line of window C (vertical top line), value must be greater or equal 2 */
+#ifdef MRV_AFM_C_V_T
+#define MRV_AFM_C_V_T_MIN                       (2U)
+#define MRV_AFM_C_V_T_MAX   (MRV_AFM_C_V_T_MASK >> MRV_AFM_C_V_T_SHIFT)
+#endif /* MRV_AFM_C_V_T */
+/*****************************************************************************/
+/**
+ * register: isp_afm_rb_c: Bottom right corner of measure window C (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: c_h_r:*/
+/* last pixel of window C (horizontal right row)*/
+#ifdef MRV_AFM_C_H_R
+#define MRV_AFM_C_H_R_MIN                       (5U)
+#define MRV_AFM_C_H_R_MAX   (MRV_AFM_C_H_R_MASK >> MRV_AFM_C_H_R_SHIFT)
+#endif /* MRV_AFM_C_H_R */
+/* Slice: c_v_b:*/
+/* last line of window C (vertical bottom line), value must be lower than */
+/* (number of lines -2)*/
+#ifdef MRV_AFM_C_V_B
+#define MRV_AFM_C_V_B_MIN                       (2U)
+#define MRV_AFM_C_V_B_MAX   (MRV_AFM_C_V_B_MASK >> MRV_AFM_C_V_B_SHIFT)
+#endif /* MRV_AFM_C_V_B */
+/*****************************************************************************/
+/**
+ * register: isp_afm_thres: Threshold register (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: afm_thres:*/
+/* AF measurement threshold */
+/* This register defines a threshold which can be used for minimizing the */
+/* influence of noise in the measurement result.*/
+#ifdef MRV_AFM_AFM_THRES
+#endif /* MRV_AFM_AFM_THRES */
+/*****************************************************************************/
+/**
+ * register: isp_afm_var_shift: Variable shift register (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: lum_var_shift:*/
+/* variable shift for luminance summation */
+/* The lum_var_shift defines the number of bits for the shift operation of the */
+/* value of the current pixel before summation. The shift operation is used to */
+/* avoid a luminance sum overflow.*/
+#ifdef MRV_AFM_LUM_VAR_SHIFT
+#endif /* MRV_AFM_LUM_VAR_SHIFT */
+/* Slice: afm_var_shift:*/
+/* variable shift for AF measurement */
+/* The afm_var_shift defines the number of bits for the shift operation at the */
+/* end of the calculation chain. The shift operation is used to avoid an AF */
+/* measurement sum overflow.*/
+#ifdef MRV_AFM_AFM_VAR_SHIFT
+#endif /* MRV_AFM_AFM_VAR_SHIFT */
+/*****************************************************************************/
+/**
+ * register: isp_afm_sum_a: Sharpness Value Status Register of Window A (0x0024)
+ *
+ *****************************************************************************/
+/* Slice: afm_sum_a:*/
+/* sharpness value of window A */
+#ifdef MRV_AFM_AFM_SUM_A
+#endif /* MRV_AFM_AFM_SUM_A */
+/*****************************************************************************/
+/**
+ * register: isp_afm_sum_b: Sharpness Value Status Register of Window B (0x0028)
+ *
+ *****************************************************************************/
+/* Slice: afm_sum_b:*/
+/* sharpness value of window B */
+#ifdef MRV_AFM_AFM_SUM_B
+#endif /* MRV_AFM_AFM_SUM_B */
+/*****************************************************************************/
+/**
+ * register: isp_afm_sum_c: Sharpness Value Status Register of Window C (0x002c)
+ *
+ *****************************************************************************/
+/* Slice: afm_sum_c:*/
+/* sharpness value of window C */
+#ifdef MRV_AFM_AFM_SUM_C
+#endif /* MRV_AFM_AFM_SUM_C */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lum_a: Luminance Value Status Register of Window A (0x0030)
+ *
+ *****************************************************************************/
+/* Slice: afm_lum_a:*/
+/* luminance value of window A */
+#ifdef MRV_AFM_AFM_LUM_A
+#endif /* MRV_AFM_AFM_LUM_A */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lum_b: Luminance Value Status Register of Window B (0x0034)
+ *
+ *****************************************************************************/
+/* Slice: afm_lum_b:*/
+/* luminance value of window B */
+#ifdef MRV_AFM_AFM_LUM_B
+#endif /* MRV_AFM_AFM_LUM_B */
+/*****************************************************************************/
+/**
+ * register: isp_afm_lum_c: Luminance Value Status Register of Window C (0x0038)
+ *
+ *****************************************************************************/
+/* Slice: afm_lum_c:*/
+/* luminance value of window C */
+#ifdef MRV_AFM_AFM_LUM_C
+#endif /* MRV_AFM_AFM_LUM_C */
+/*****************************************************************************/
+/* ISP Lens Shade Correction Registers                                       */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ctrl: Lens shade control (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: lsc_en:*/
+/* 0: activation request for lens shading correction */
+/* 1: deactivation reqeust for lens shading correction */
+/* Activation/Deactivation is object of a shadowing mechnism. The current */
+/* status is visible at ISP_LSC_STATUS::lsc_enable_status */
+#ifdef MRV_LSC_LSC_EN
+#define MRV_LSC_LSC_EN_ENABLE                   1U
+#define MRV_LSC_LSC_EN_DISABLE                  0U
+#endif /* MRV_LSC_LSC_EN */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_r_table_addr: Table RAM Address for red component (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: r_ram_addr:*/
+/* table address in RAM for samples of the R color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+/* Valid addresses are in the range 0 to 152 for Bank0 and 153 to 305 for Bank1 */
+/* (if available).*/
+#ifdef MRV_LSC_R_RAM_ADDR
+#define MRV_LSC_R_RAM_ADDR_MIN_BANK0            (0x00000000U)
+#define MRV_LSC_R_RAM_ADDR_MAX_BANK0            (0x00000098U)
+#define MRV_LSC_R_RAM_ADDR_MIN_BANK1            (0x00000099U)
+#define MRV_LSC_R_RAM_ADDR_MAX_BANK1            (0x00000132U)
+#endif /* MRV_LSC_R_RAM_ADDR */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_gr_table_addr: Table RAM Address for green (red) component
+ *           (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: gr_ram_addr:*/
+/* table address in RAM for samples of the G_R color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+/* Valid addresses are in the range 0 to 152 for Bank0 and 153 to 305 for Bank1 */
+/* (if available).*/
+#ifdef MRV_LSC_GR_RAM_ADDR
+#define MRV_LSC_GR_RAM_ADDR_MIN_BANK0           (0x00000000U)
+#define MRV_LSC_GR_RAM_ADDR_MAX_BANK0           (0x00000098U)
+#define MRV_LSC_GR_RAM_ADDR_MIN_BANK1           (0x00000099U)
+#define MRV_LSC_GR_RAM_ADDR_MAX_BANK1           (0x00000131U)
+#endif /* MRV_LSC_GR_RAM_ADDR */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_b_table_addr: Table RAM Address for blue component
+ *           (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: b_ram_addr:*/
+/* table address in RAM for samples of the B color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+/* Valid addresses are in the range 0 to 152 for Bank0 and 153 to 305 for Bank1 */
+/* (if available).*/
+#ifdef MRV_LSC_B_RAM_ADDR
+#define MRV_LSC_B_RAM_ADDR_MIN_BANK0            (0x00000000U)
+#define MRV_LSC_B_RAM_ADDR_MAX_BANK0            (0x00000098U)
+#define MRV_LSC_B_RAM_ADDR_MIN_BANK1            (0x00000099U)
+#define MRV_LSC_B_RAM_ADDR_MAX_BANK1            (0x00000132U)
+#endif /* MRV_LSC_B_RAM_ADDR */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_gb_table_addr: Table RAM Address for green (blue) component
+ *           (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: gb_ram_addr:*/
+/* table address in RAM for samples of the G_B color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+/* Valid addresses are in the range 0 to 152 for Bank0 and 153 to 305 for Bank1 */
+/* (if available).*/
+#ifdef MRV_LSC_GB_RAM_ADDR
+#define MRV_LSC_GB_RAM_ADDR_MIN_BANK0           (0x00000000U)
+#define MRV_LSC_GB_RAM_ADDR_MAX_BANK0           (0x00000098U)
+#define MRV_LSC_GB_RAM_ADDR_MIN_BANK1           (0x00000099U)
+#define MRV_LSC_GB_RAM_ADDR_MAX_BANK1           (0x00000132U)
+#endif /* MRV_LSC_GB_RAM_ADDR */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_r_table_data: Sample table red (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: r_sample_1:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_R_SAMPLE_1
+#endif /* MRV_LSC_R_SAMPLE_1 */
+/* Slice: r_sample_0:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_R_SAMPLE_0
+#endif /* MRV_LSC_R_SAMPLE_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_gr_table_data: Sample table green (red) (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: gr_sample_1:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_GR_SAMPLE_1
+#endif /* MRV_LSC_GR_SAMPLE_1 */
+/* Slice: gr_sample_0:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_GR_SAMPLE_0
+#endif /* MRV_LSC_GR_SAMPLE_0 */
+/*****************************************************************************/
+/**
+ * register: Register: isp_lsc_b_table_data: Sample table blue (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: b_sample_1:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_B_SAMPLE_1
+#endif /* MRV_LSC_B_SAMPLE_1 */
+/* Slice: b_sample_0:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_B_SAMPLE_0
+#endif /* MRV_LSC_B_SAMPLE_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_gb_table_data: Sample table green (blue) (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: gb_sample_1:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_GB_SAMPLE_1
+#endif /* MRV_LSC_GB_SAMPLE_1 */
+/* Slice: gb_sample_0:*/
+/* correction factor at sample point (fixed point number: 2 bits integer with */
+/* 10-bit fractional part, range 1..3.999)*/
+#ifdef MRV_LSC_GB_SAMPLE_0
+#endif /* MRV_LSC_GB_SAMPLE_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xgrad_01: Gradient table x (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: xgrad_1:*/
+/* factor for x-gradient calculation of sector 1 */
+#ifdef MRV_LSC_XGRAD_1
+#endif /* MRV_LSC_XGRAD_1 */
+/* Slice: xgrad_0:*/
+/* factor for x-gradient calculation of sector 0 */
+#ifdef MRV_LSC_XGRAD_0
+#endif /* MRV_LSC_XGRAD_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xgrad_23: Gradient table x (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: xgrad_3:*/
+/* factor for x-gradient calculation of sector 3 */
+#ifdef MRV_LSC_XGRAD_3
+#endif /* MRV_LSC_XGRAD_3 */
+/* Slice: xgrad_2:*/
+/* factor for x-gradient calculation of sector 2 */
+#ifdef MRV_LSC_XGRAD_2
+#endif /* MRV_LSC_XGRAD_2 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xgrad_45: Gradient table x (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: xgrad_5:*/
+/* factor for x-gradient calculation of sector 5 */
+#ifdef MRV_LSC_XGRAD_5
+#endif /* MRV_LSC_XGRAD_5 */
+/* Slice: xgrad_4:*/
+/* factor for x-gradient calculation of sector 4 */
+#ifdef MRV_LSC_XGRAD_4
+#endif /* MRV_LSC_XGRAD_4 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xgrad_67: Gradient table x (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: xgrad_7:*/
+/* factor for x-gradient calculation of sector 7 */
+#ifdef MRV_LSC_XGRAD_7
+#endif /* MRV_LSC_XGRAD_7 */
+/* Slice: xgrad_6:*/
+/* factor for x-gradient calculation of sector 6 */
+#ifdef MRV_LSC_XGRAD_6
+#endif /* MRV_LSC_XGRAD_6 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ygrad_01: Gradient table y (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: ygrad_1:*/
+/* factor for y-gradient calculation of sector 1 */
+#ifdef MRV_LSC_YGRAD_1
+#endif /* MRV_LSC_YGRAD_1 */
+/* Slice: ygrad_0:*/
+/* factor for y-gradient calculation of sector 0 */
+#ifdef MRV_LSC_YGRAD_0
+#endif /* MRV_LSC_YGRAD_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ygrad_23: Gradient table y (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: ygrad_3:*/
+/* factor for y-gradient calculation of sector 3 */
+#ifdef MRV_LSC_YGRAD_3
+#endif /* MRV_LSC_YGRAD_3 */
+/* Slice: ygrad_2:*/
+/* factor for y-gradient calculation of sector 2 */
+#ifdef MRV_LSC_YGRAD_2
+#endif /* MRV_LSC_YGRAD_2 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ygrad_45: Gradient table y (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: ygrad_5:*/
+/* factor for y-gradient calculation of sector 5 */
+#ifdef MRV_LSC_YGRAD_5
+#endif /* MRV_LSC_YGRAD_5 */
+/* Slice: ygrad_4:*/
+/* factor for y-gradient calculation of sector 4 */
+#ifdef MRV_LSC_YGRAD_4
+#endif /* MRV_LSC_YGRAD_4 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ygrad_67: Gradient table y (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: ygrad_7:*/
+/* factor for y-gradient calculation of sector 7 */
+#ifdef MRV_LSC_YGRAD_7
+#endif /* MRV_LSC_YGRAD_7 */
+/* Slice: ygrad_6:*/
+/* factor for y-gradient calculation of sector 6 */
+#ifdef MRV_LSC_YGRAD_6
+#endif /* MRV_LSC_YGRAD_6 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xsize_01: Size table (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: x_sect_size_1:*/
+/* sector size 1 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_1
+#endif /* MRV_LSC_X_SECT_SIZE_1 */
+/* Slice: x_sect_size_0:*/
+/* sector size 0 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_0
+#endif /* MRV_LSC_X_SECT_SIZE_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xsize_23: Size table (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: x_sect_size_3:*/
+/* sector size 3 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_3
+#endif /* MRV_LSC_X_SECT_SIZE_3 */
+/* Slice: x_sect_size_2:*/
+/* sector size 2 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_2
+#endif /* MRV_LSC_X_SECT_SIZE_2 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xsize_45: Size table (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: x_sect_size_5:*/
+/* sector size 5 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_5
+#endif /* MRV_LSC_X_SECT_SIZE_5 */
+/* Slice: x_sect_size_4:*/
+/* sector size 4in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_4
+#endif /* MRV_LSC_X_SECT_SIZE_4 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_xsize_67: Size table (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: x_sect_size_7:*/
+/* sector size 7 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_7
+#endif /* MRV_LSC_X_SECT_SIZE_7 */
+/* Slice: x_sect_size_6:*/
+/* sector size 6 in x-direction */
+#ifdef MRV_LSC_X_SECT_SIZE_6
+#endif /* MRV_LSC_X_SECT_SIZE_6 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ysize_01: Size table (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: y_sect_size_1:*/
+/* sector size 1 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_1
+#endif /* MRV_LSC_Y_SECT_SIZE_1 */
+/* Slice: y_sect_size_0:*/
+/* sector size 0 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_0
+#endif /* MRV_LSC_Y_SECT_SIZE_0 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ysize_23: Size table (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: y_sect_size_3:*/
+/* sector size 3 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_3
+#endif /* MRV_LSC_Y_SECT_SIZE_3 */
+/* Slice: y_sect_size_2:*/
+/* sector size 2 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_2
+#endif /* MRV_LSC_Y_SECT_SIZE_2 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ysize_45: Size table (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: y_sect_size_5:*/
+/* sector size 5 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_5
+#endif /* MRV_LSC_Y_SECT_SIZE_5 */
+/* Slice: y_sect_size_4:*/
+/* sector size 4 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_4
+#endif /* MRV_LSC_Y_SECT_SIZE_4 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_ysize_67: Size table (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: y_sect_size_7:*/
+/* sector size 7 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_7
+#endif /* MRV_LSC_Y_SECT_SIZE_7 */
+/* Slice: y_sect_size_6:*/
+/* sector size 6 in y-direction */
+#ifdef MRV_LSC_Y_SECT_SIZE_6
+#endif /* MRV_LSC_Y_SECT_SIZE_6 */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_table_sel: Lens shade table set selection (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: table_sel:*/
+/* 0: next active tables set is table set 0.*/
+/* 1: next active tables set is table set 1.*/
+/* Table selection is object of a shadowing mechnism. The current status is */
+/* visible at ISP_LSC_STATUS::active_table.*/
+#ifdef MRV_LSC_TABLE_SEL
+#define MRV_LSC_TABLE_SEL_BANK0                 (0U)
+#define MRV_LSC_TABLE_SEL_BANK1                 (1U)
+#endif /* MRV_LSC_TABLE_SEL */
+/*****************************************************************************/
+/**
+ * register: isp_lsc_status: Lens shade status (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: active_table:*/
+/* 0: currently active tables set is table set 0 */
+/* 1: currently active tables set is table set 1 */
+#ifdef MRV_LSC_ACTIVE_TABLE
+#define MRV_LSC_ACTIVE_TABLE_BANK0              (0U)
+#define MRV_LSC_ACTIVE_TABLE_BANK1              (1U)
+#endif /* MRV_LSC_ACTIVE_TABLE */
+/* Slice: lsc_en_status:*/
+/* 0: lens shading correction is currently off */
+/* 1: lens shading correction is currently on */
+#ifdef MRV_LSC_LSC_EN_STATUS
+#endif /* MRV_LSC_LSC_EN_STATUS */
+/*****************************************************************************/
+/* ISP Chromatic Aberration Correction Registers                             */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_cac_ctrl: Control register for chromatic aberration
+ *           correction (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: h_clip_mode:*/
+/* Defines the maximum red/blue pixel shift in horizontal direction at pixel */
+/* positions, that require a larger displacement, the maximum shift value is */
+/* used instead (vector clipping)*/
+     /**/
+/* 0: Set horizontal vector clipping to +/-4 pixel displacement (Default)*/
+/* 1: Set horizontal vector clipping to +/-4 or +/-5 pixel displacement */
+/*    depending on pixel position inside the Bayer raster (dynamic switching */
+/*    between +/-4 and +/-5)*/
+#ifdef MRV_CAC_H_CLIP_MODE
+#define MRV_CAC_H_CLIP_MODE_FIX4            0	/* 0: Set horizontal vector clipping */
+    /*    to +/-4 pixel displacement (Default) */
+#define MRV_CAC_H_CLIP_MODE_DYN5            1	/* 1: Set horizontal vector clipping */
+    /*    to +/-4 or +/-5 pixel displacement depending on */
+    /*    pixel position inside the Bayer raster */
+    /*    (dynamic switching between +/-4 and +/-5) */
+#endif /* MRV_CAC_H_CLIP_MODE */
+/* Slice: v_clip_mode:*/
+/* Defines the maximum red/blue pixel shift in vertical direction */
+/* 00: Set vertical vector clipping to +/-2 pixel ; fix filter_enable (Default)*/
+/* 01: Set vertical vector clipping to +/-3 pixel; dynamic filter_enable for */
+/*     chroma low pass filter */
+/* 10: Set vertical vector clipping +/-3 or +/-4 pixel displacement depending */
+/*     on pixel position inside the Bayer raster (dynamic switching between +/-3 and +/-4)*/
+/* 11: reserved */
+#ifdef MRV_CAC_V_CLIP_MODE
+#define MRV_CAC_V_CLIP_MODE_FIX2            0	/* 00: Set vertical vector clipping to +/-2 pixel; */
+    /*     fix filter_enable (Default) */
+#define MRV_CAC_V_CLIP_MODE_FIX3            1	/* 01: Set vertical vector clipping to +/-3 pixel; */
+    /*     dynamic filter_enable for chroma low pass filter */
+#define MRV_CAC_V_CLIP_MODE_DYN4            2	/* 10: Set vertical vector clipping +/-3 or +/-4 pixel */
+    /*     displacement depending on pixel position inside */
+    /*     the Bayer raster (dynamic switching between +/-3 and +/-4) */
+#endif /* MRV_CAC_V_CLIP_MODE */
+/* Slice: cac_en:*/
+/* 0: chromatic aberration correction off */
+/* 1: chromatic aberration correction on */
+#ifdef MRV_CAC_CAC_EN
+#define MRV_CAC_CAC_EN_PROCESS                  1
+#define MRV_CAC_CAC_EN_BYPASS                   0
+#endif /* MRV_CAC_CAC_EN */
+/*****************************************************************************/
+/**
+ * register: isp_cac_count_start: Preload values for CAC pixel and line
+ *           counter (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: v_count_start:*/
+/* 12 bit v_count preload value (range 4095 ... 1) of the vertical CAC line */
+/* counter. Before frame start v_count has to be preloaded with */
+/* (v_size/2 + v_center_offset), with v_size the image height and v_center_offset */
+/* the vertical distance between image center and optical center.*/
+     /**/
+/* After frame start the v_count decrements with every line until a value of zero */
+/* is reached for the line in the optical center. Than the v_sign bit toggles and */
+/* the v_counter decrements with every line until end of frame.*/
+#ifdef MRV_CAC_V_COUNT_START
+#define MRV_CAC_V_COUNT_START_MIN               1
+#define MRV_CAC_V_COUNT_START_MAX               (MRV_CAC_V_COUNT_START_MASK >> MRV_CAC_V_COUNT_START_SHIFT)
+#endif /* MRV_CAC_V_COUNT_START */
+/* Slice: h_count_start:*/
+/* 12 bit h_count preload value (range 4095 .. 1) of the horizontal CAC pixel */
+/* counter. Before line start h_count has to be preloaded with (h_size/2 + h_center_offset),*/
+/* with h_size the image width and h_center_offset the horizontal distance between image */
+/* center and optical center.*/
+     /**/
+/* After line start the h_count decrements with every pixel until a value of zero is */
+/* reached for the column in the optical center. Than the h_sign bit toggles and the */
+/* h_counter increments with every pixel until end of line.*/
+#ifdef MRV_CAC_H_COUNT_START
+#define MRV_CAC_H_COUNT_START_MIN               1
+#define MRV_CAC_H_COUNT_START_MAX               (MRV_CAC_H_COUNT_START_MASK >> MRV_CAC_H_COUNT_START_SHIFT)
+#endif /* MRV_CAC_H_COUNT_START */
+/*****************************************************************************/
+/**
+ * register: isp_cac_a: Linear Parameters for radial shift calculation (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: A_Blue:*/
+/* Parameter A_Blue for radial blue shift calculation, according to */
+/* (A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_A_BLUE
+#define MRV_CAC_A_BLUE_MAX                      (MRV_CAC_A_BLUE_MASK >> (MRV_CAC_A_BLUE_SHIFT))
+#define MRV_CAC_A_BLUE_MIN                      0
+#endif /* MRV_CAC_A_BLUE */
+/* Slice: A_Red:*/
+/* Parameter A_Red for radial red shift calculation, according to */
+/* (A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_A_RED
+#define MRV_CAC_A_RED_MAX                       (MRV_CAC_A_RED_MASK >> (MRV_CAC_A_RED_SHIFT))
+#define MRV_CAC_A_RED_MIN                      0
+#endif /* MRV_CAC_A_RED */
+/*****************************************************************************/
+/**
+ * register: isp_cac_b: Square Parameters for radial shift calculation (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: B_Blue:*/
+/* Parameter B_Blue for radial blue shift calculation, according to */
+/* (A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_B_BLUE
+#define MRV_CAC_B_BLUE_MAX                      (MRV_CAC_B_BLUE_MASK >> (MRV_CAC_B_BLUE_SHIFT))
+#define MRV_CAC_B_BLUE_MIN                     0
+#endif /* MRV_CAC_B_BLUE */
+/* Slice: B_Red:*/
+/* Parameter B_Red for radial red shift calculation, according to */
+/* (A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_B_RED
+#define MRV_CAC_B_RED_MAX                       (MRV_CAC_B_RED_MASK >> (MRV_CAC_B_RED_SHIFT))
+#define MRV_CAC_B_RED_MIN                      0
+#endif /* MRV_CAC_B_RED */
+/*****************************************************************************/
+/**
+ * register: isp_cac_c: Cubical Parameters for radial shift calculation (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: C_Blue:*/
+/* Parameter C_Blue for radial blue shift calculation, according to */
+/* (A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_C_BLUE
+#define MRV_CAC_C_BLUE_MAX                      (MRV_CAC_C_BLUE_MASK >> (MRV_CAC_C_BLUE_SHIFT))
+#define MRV_CAC_C_BLUE_MIN                       0
+#endif /* MRV_CAC_C_BLUE */
+/* Slice: C_Red:*/
+/* Parameter C_Red for radial red shift calculation, according to */
+/* (A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and */
+/* value range from -16 up to 15.9375.*/
+#ifdef MRV_CAC_C_RED
+#define MRV_CAC_C_RED_MAX                       (MRV_CAC_C_RED_MASK >> (MRV_CAC_C_RED_SHIFT))
+#define MRV_CAC_C_RED_MIN                      0
+#endif /* MRV_CAC_C_RED */
+/*****************************************************************************/
+/**
+ * register: isp_cac_x_norm: Normalization parameters for calculation of image
+ *           coordinate x_d relative to optical center (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: x_ns:*/
+/* Horizontal normalization shift parameter x_ns (4 bit unsigned integer)*/
+/* in equation x_d[7:0] = (((h_count <% 4) %> x_ns) * x_nf) >> 5 */
+#ifdef MRV_CAC_X_NS
+#define MRV_CAC_X_NS_MIN                        0
+#define MRV_CAC_X_NS_MAX                        (MRV_CAC_X_NS_MASK >> MRV_CAC_X_NS_SHIFT)
+#endif /* MRV_CAC_X_NS */
+/* Slice: x_nf:*/
+/* Horizontal scaling or normalization factor x_nf (5 bit unsigned integer)*/
+/* range 0 .. 31 in equation x_d[7:0] = (((h_count <% 4) %> x_ns) * x_nf) >> 5 */
+#ifdef MRV_CAC_X_NF
+#define MRV_CAC_X_NF_MIN                        0
+#define MRV_CAC_X_NF_MAX                        31
+#endif /* MRV_CAC_X_NF */
+/*****************************************************************************/
+/**
+ * register: isp_cac_y_norm: Normalization parameters for calculation of image
+ *           coordinate y_d relative to optical center (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: y_ns:*/
+/* Vertical normalization shift parameter y_ns (4 bit unsigned integer)*/
+/* in equation y_d[7:0] = (((v_count <% 4) %> y_ns) * y_nf) >> 5 */
+#ifdef MRV_CAC_Y_NS
+#define MRV_CAC_Y_NS_MIN                        0
+#define MRV_CAC_Y_NS_MAX                        (MRV_CAC_Y_NS_MASK >> MRV_CAC_Y_NS_SHIFT)
+#endif /* MRV_CAC_Y_NS */
+/* Slice: y_nf:*/
+/* Vertical scaling or normalization factor y_nf (5 bit unsigned integer)*/
+/* range 0 .. 31 in equation y_d[7:0] = (((v_count <% 4) %> y_ns) * y_nf) >> 5 */
+#ifdef MRV_CAC_Y_NF
+#define MRV_CAC_Y_NF_MIN                        0
+#define MRV_CAC_Y_NF_MAX                        31
+#endif /* MRV_CAC_Y_NF */
+/*****************************************************************************/
+/* ISP Exposure Measurement Registers                                        */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_exp_ctrl: Exposure control (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: exp_meas_mode:*/
+/* '1' luminance calculation according to Y=(R+G+B) x 0.332 (85/256)*/
+/* '0' luminance calculation according to Y=16+0.25R+0.5G+0.1094B */
+#ifdef MRV_AE_EXP_MEAS_MODE
+#define MRV_AE_EXP_MEAS_MODE_1                  1	/* '1' luminance calculation according to Y=(R+G+B) x 0.332 (85/256) */
+#define MRV_AE_EXP_MEAS_MODE_0                  0	/* '0' luminance calculation according to Y=16+0.25R+0.5G+0.1094B */
+#endif /* MRV_AE_EXP_MEAS_MODE */
+/* Slice: autostop:*/
+/* '1' stop measuring after a complete frame */
+/* '0' continous measurement */
+#ifdef MRV_AE_AUTOSTOP
+#define MRV_AE_AUTOSTOP_STOP_MEASURING          1	/* stop measuring after a complete frame */
+#define MRV_AE_AUTOSTOP_CONTINOUS_MEASURING     0	/* don't stop measurement, continoue with next frame */
+#endif /* MRV_AE_AUTOSTOP */
+/* Slice: exp_start:*/
+/* '1' start measuring a frame. The exp block will reset this bit and halt */
+/* after completing one frame, if bit "autostop" is set to '1'.*/
+#ifdef MRV_AE_EXP_START
+#define MRV_AE_EXP_START_PROCESS                1	/* 1: processing is activated */
+#define MRV_AE_EXP_START_BYPASS                 0	/* 0: processing is deactivated, bypass mode is selected */
+#endif /* MRV_AE_EXP_START */
+/*****************************************************************************/
+/**
+ * register: isp_exp_h_offset: Horizontal offset for first block (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_h_offset:*/
+/* Horizontal offset of first block in pixels.*/
+/* 0 <= value <= 3920 */
+#ifdef MRV_AE_ISP_EXP_H_OFFSET
+#define MRV_AE_ISP_EXP_H_OFFSET_MIN             0x00000000
+#define MRV_AE_ISP_EXP_H_OFFSET_MAX             0x00000F50	/* 4096-176 */
+#endif /* MRV_AE_ISP_EXP_H_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_exp_v_offset: Vertical offset for first block (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_v_offset:*/
+/* Vertical offset of first block in pixels.*/
+/* 0 <= value <= 1806 */
+#ifdef MRV_AE_ISP_EXP_V_OFFSET
+#define MRV_AE_ISP_EXP_V_OFFSET_MIN             0x00000000
+#define MRV_AE_ISP_EXP_V_OFFSET_MAX             0x00000B74	/* 3072-140 */
+#endif /* MRV_AE_ISP_EXP_V_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_exp_h_size: Horizontal size of one block (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_h_size:*/
+/* Horizontal size in pixels of one block.*/
+/* 35 <= value <= 516 */
+#ifdef MRV_AE_ISP_EXP_H_SIZE
+#define MRV_AE_ISP_EXP_H_SIZE_MIN               0x00000023
+#define MRV_AE_ISP_EXP_H_SIZE_MAX               0x00000333
+#endif /* MRV_AE_ISP_EXP_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_exp_v_size: Vertical size of one block (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_v_size:*/
+/* Vertical size in pixels of one block.*/
+/* 28 <= value <= 390 */
+#ifdef MRV_AE_ISP_EXP_V_SIZE
+#define MRV_AE_ISP_EXP_V_SIZE_VALID_MASK        (MRV_AE_ISP_EXP_V_SIZE_MASK & ~0x00000001)
+#define MRV_AE_ISP_EXP_V_SIZE_MIN               0x0000001C
+#define MRV_AE_ISP_EXP_V_SIZE_MAX               0x00000266
+#endif /* MRV_AE_ISP_EXP_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_00: Mean luminance value of block 00 (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_00:*/
+/* Mean luminance value of block 00 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_00
+#endif /* MRV_AE_ISP_EXP_MEAN_00 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_10: Mean luminance value of block 10 (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_10:*/
+/* Mean luminance value of block 10 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_10
+#endif /* MRV_AE_ISP_EXP_MEAN_10 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_20: Mean luminance value of block 20 (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_20:*/
+/* Mean luminance value of block 20 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_20
+#endif /* MRV_AE_ISP_EXP_MEAN_20 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_30: Mean luminance value of block 30 (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_30:*/
+/* Mean luminance value of block 30 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_30
+#endif /* MRV_AE_ISP_EXP_MEAN_30 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_40: Mean luminance value of block 40 (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_40:*/
+/* Mean luminance value of block 40 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_40
+#endif /* MRV_AE_ISP_EXP_MEAN_40 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_01: Mean luminance value of block 01 (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_01:*/
+/* Mean luminance value of block 01 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_01
+#endif /* MRV_AE_ISP_EXP_MEAN_01 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_11: Mean luminance value of block 11 (0x0000002c)
+ *
+ *****************************************************************************/
+/* Register: isp_exp_mean_11: Mean luminance value of block 11 (0x0000002c)*/
+/* Slice: isp_exp_mean_11:*/
+/* Mean luminance value of block 11 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_11
+#endif /* MRV_AE_ISP_EXP_MEAN_11 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_21: Mean luminance value of block 21 (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_21:*/
+/* Mean luminance value of block 21 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_21
+#endif /* MRV_AE_ISP_EXP_MEAN_21 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_31: Mean luminance value of block 31 (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_31:*/
+/* Mean luminance value of block 31 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_31
+#endif /* MRV_AE_ISP_EXP_MEAN_31 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_41: Mean luminance value of block 41 (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_41:*/
+/* Mean luminance value of block 41 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_41
+#endif /* MRV_AE_ISP_EXP_MEAN_41 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_02: Mean luminance value of block 02 (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_02:*/
+/* Mean luminance value of block 02 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_02
+#endif /* MRV_AE_ISP_EXP_MEAN_02 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_12: Mean luminance value of block 12 (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_12:*/
+/* Mean luminance value of block 12 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_12
+#endif /* MRV_AE_ISP_EXP_MEAN_12 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_22: Mean luminance value of block 22 (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_22:*/
+/* Mean luminance value of block 22 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_22
+#endif /* MRV_AE_ISP_EXP_MEAN_22 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_32: Mean luminance value of block 32 (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_32:*/
+/* Mean luminance value of block 32 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_32
+#endif /* MRV_AE_ISP_EXP_MEAN_32 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_42: Mean luminance value of block 42 (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_42:*/
+/* Mean luminance value of block 42 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_42
+#endif /* MRV_AE_ISP_EXP_MEAN_42 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_03: Mean luminance value of block 03 (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_03:*/
+/* Mean luminance value of block 03 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_03
+#endif /* MRV_AE_ISP_EXP_MEAN_03 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_13: Mean luminance value of block 13 (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_13:*/
+/* Mean luminance value of block 13 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_13
+#endif /* MRV_AE_ISP_EXP_MEAN_13 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_23: Mean luminance value of block 23 (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_23:*/
+/* Mean luminance value of block 23 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_23
+#endif /* MRV_AE_ISP_EXP_MEAN_23 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_33: Mean luminance value of block 33 (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_33:*/
+/* Mean luminance value of block 33 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_33
+#endif /* MRV_AE_ISP_EXP_MEAN_33 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_43: Mean luminance value of block 43 (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_43:*/
+/* Mean luminance value of block 43 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_43
+#endif /* MRV_AE_ISP_EXP_MEAN_43 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_04: Mean luminance value of block 04 (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_04:*/
+/* Mean luminance value of block 04 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_04
+#endif /* MRV_AE_ISP_EXP_MEAN_04 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_14: Mean luminance value of block 14 (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_14:*/
+/* Mean luminance value of block 14 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_14
+#endif /* MRV_AE_ISP_EXP_MEAN_14 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_24: Mean luminance value of block 24 (0x0000006c)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_24:*/
+/* Mean luminance value of block 24 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_24
+#endif /* MRV_AE_ISP_EXP_MEAN_24 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_34: Mean luminance value of block 34 (0x00000070)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_34:*/
+/* Mean luminance value of block 34 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_34
+#endif /* MRV_AE_ISP_EXP_MEAN_34 */
+/*****************************************************************************/
+/**
+ * register: isp_exp_mean_44: Mean luminance value of block 44 (0x00000074)
+ *
+ *****************************************************************************/
+/* Slice: isp_exp_mean_44:*/
+/* Mean luminance value of block 44 (x,y)*/
+#ifdef MRV_AE_ISP_EXP_MEAN_44
+#endif /* MRV_AE_ISP_EXP_MEAN_44 */
+/*****************************************************************************/
+/* ISP Black Level Subtraction Registers                                     */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_bls_ctrl: global control register (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: WINDOW_ENABLE:*/
+/* 0: no measuring is performed */
+/* 1: only window 1 is measured */
+/* 2: only window 2 is measured */
+/* 3: both windows are measured */
+#ifdef MRV_BLS_WINDOW_ENABLE
+#define MRV_BLS_WINDOW_ENABLE_NONE              0U	/* 0: no measuring is performed */
+#define MRV_BLS_WINDOW_ENABLE_WND1              1U	/* 1: only window 1 is measured */
+#define MRV_BLS_WINDOW_ENABLE_WND2              2U	/* 2: only window 2 is measured */
+#define MRV_BLS_WINDOW_ENABLE_BOTH              3U	/* 3: both windows are measured */
+#define MRV_BLS_WINDOW_ENABLE_WND1_MASK         0x00000004U
+#define MRV_BLS_WINDOW_ENABLE_WND1_SHIFT        2U
+#define MRV_BLS_WINDOW_ENABLE_WND2_MASK         0x00000008U
+#define MRV_BLS_WINDOW_ENABLE_WND2_SHIFT        3U
+#endif /* MRV_BLS_WINDOW_ENABLE */
+/* Slice: BLS_MODE:*/
+/* 1: subtract measured values */
+/* 0: subtract fixed values */
+#ifdef MRV_BLS_BLS_MODE
+#define MRV_BLS_BLS_MODE_MEAS                   1U	/* 1: subtract measured values */
+#define MRV_BLS_BLS_MODE_FIX                    0U	/* 0: subtract fixed values */
+#endif /* MRV_BLS_BLS_MODE */
+/* Slice: BLS_ENABLE:*/
+/* 1: black level subtraction is enabled */
+/* 0: bypass the black level processing */
+#ifdef MRV_BLS_BLS_ENABLE
+#define MRV_BLS_BLS_ENABLE_PROCESS              1U	/* 1: black level subtraction is enabled */
+#define MRV_BLS_BLS_ENABLE_BYPASS               0U	/* 0: bypass the black level processing */
+#endif /* MRV_BLS_BLS_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_bls_samples: samples register (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: BLS_SAMPLES:*/
+/* This number to the power of two gives the number of measure samples for */
+/* each Bayer position. Range 0x00: 2^0=1  to  0x12: 2^18=262144. This number */
+/* is also the divider for the accumulator for each Bayer position.*/
+     /**/
+/* The accumulation will be stopped, if the number of measured pixels for the */
+/* current Bayer position is equal to the number of samples.*/
+     /**/
+/* The measure windows must be positioned that way that the number of included */
+/* pixels of each Bayer position included by both windows is equal or greater */
+/* than the number of measure samples calculated by 2^BLS_SAMPLES !*/
+     /**/
+/* NOTE:*/
+/* - The number of pixels of one Bayer position is 1/4 of the number of all */
+/*   Pixels included by the measure windows.*/
+#ifdef MRV_BLS_BLS_SAMPLES
+#define MRV_BLS_BLS_SAMPLES_MAX                 (0x00000014U)	/* maximum is 2^20 = 1048576 */
+#endif /* MRV_BLS_BLS_SAMPLES */
+/*****************************************************************************/
+/**
+ * register: isp_bls_h1_start: window 1 horizontal start (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: BLS_H1_START:*/
+/* Black pixel window 1 horizontal start position */
+#ifdef MRV_BLS_BLS_H1_START
+#define MRV_BLS_BLS_H1_START_MAX                (MRV_BLS_BLS_H1_START_MASK >> MRV_BLS_BLS_H1_START_SHIFT)
+#endif /* MRV_BLS_BLS_H1_START */
+/*****************************************************************************/
+/**
+ * register: isp_bls_h1_stop: window 1 horizontal stop (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: BLS_H1_STOP:*/
+/* Black pixel window 1 horizontal stop position */
+#ifdef MRV_BLS_BLS_H1_STOP
+#define MRV_BLS_BLS_H1_STOP_MAX                (MRV_BLS_BLS_H1_STOP_MASK >> MRV_BLS_BLS_H1_STOP_SHIFT)
+#endif /* MRV_BLS_BLS_H1_STOP */
+/*****************************************************************************/
+/**
+ * register: isp_bls_v1_start: window 1 vertical start (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: BLS_V1_START:*/
+/* Black pixel window 1 vertical start position */
+#ifdef MRV_BLS_BLS_V1_START
+#define MRV_BLS_BLS_V1_START_MAX                (MRV_BLS_BLS_V1_START_MASK >> MRV_BLS_BLS_V1_START_SHIFT)
+#endif /* MRV_BLS_BLS_V1_START */
+/*****************************************************************************/
+/**
+ * register: isp_bls_v1_stop: window 1 vertical stop (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: BLS_V1_STOP:*/
+/* Black pixel window 1 vertical stop position */
+#ifdef MRV_BLS_BLS_V1_STOP
+#define MRV_BLS_BLS_V1_STOP_MAX                 (MRV_BLS_BLS_V1_STOP_MASK >> MRV_BLS_BLS_V1_STOP_SHIFT)
+#endif /* MRV_BLS_BLS_V1_STOP */
+/*****************************************************************************/
+/**
+ * register: isp_bls_h2_start: window 2 horizontal start (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: BLS_H2_START:*/
+/* Black pixel window 2 horizontal start position */
+#ifdef MRV_BLS_BLS_H2_START
+#define MRV_BLS_BLS_H2_START_MAX                (MRV_BLS_BLS_H2_START_MASK >> MRV_BLS_BLS_H2_START_SHIFT)
+#endif /* MRV_BLS_BLS_H2_START */
+/*****************************************************************************/
+/**
+ * register: isp_bls_h2_stop: window 2 horizontal stop (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: BLS_H2_STOP:*/
+/* Black pixel window 2 horizontal stop position */
+#ifdef MRV_BLS_BLS_H2_STOP
+#define MRV_BLS_BLS_H2_STOP_MAX                 (MRV_BLS_BLS_H2_STOP_MASK >> MRV_BLS_BLS_H2_STOP_SHIFT)
+#endif /* MRV_BLS_BLS_H2_STOP */
+/*****************************************************************************/
+/**
+ * register: isp_bls_v2_start: window 2 vertical start (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: BLS_V2_START:*/
+/* Black pixel window 2 vertical start position */
+#ifdef MRV_BLS_BLS_V2_START
+#define MRV_BLS_BLS_V2_START_MAX                (MRV_BLS_BLS_V2_START_MASK >> MRV_BLS_BLS_V2_START_SHIFT)
+#endif /* MRV_BLS_BLS_V2_START */
+/*****************************************************************************/
+/**
+ * register: isp_bls_v2_stop: window 2 vertical stop (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: BLS_V2_STOP:*/
+/* Black pixel window 2 vertical stop position */
+#ifdef MRV_BLS_BLS_V2_STOP
+#define MRV_BLS_BLS_V2_STOP_MAX                 (MRV_BLS_BLS_V2_STOP_MASK >> MRV_BLS_BLS_V2_STOP_SHIFT)
+#endif /* MRV_BLS_BLS_V2_STOP */
+/*****************************************************************************/
+/**
+ * register: isp_bls_a_fixed: fixed black level A (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: BLS_A_FIXED:*/
+/* Fixed black level for A pixels – signed */
+/* two's complement, value range from -4096 to +4095,*/
+/* a positive value will be subtracted from the pixel values */
+#ifdef MRV_BLS_BLS_A_FIXED
+#endif /* MRV_BLS_BLS_A_FIXED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_b_fixed: fixed black level B (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: BLS_B_FIXED:*/
+/* Fixed black level for B pixels – signed */
+/* two's complement, value range from -4096 to +4095 */
+#ifdef MRV_BLS_BLS_B_FIXED
+#endif /* MRV_BLS_BLS_B_FIXED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_c_fixed: fixed black level C (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: BLS_C_FIXED:*/
+/* Fixed black level for C pixels – signed */
+/* two's complement, value range from -4096 to +4095 */
+#ifdef MRV_BLS_BLS_C_FIXED
+#endif /* MRV_BLS_BLS_C_FIXED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_d_fixed: fixed black level D (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: BLS_D_FIXED:*/
+/* Fixed black level for D pixels  - signed */
+/* two's complement, value range from -4096 to +4095 */
+#ifdef MRV_BLS_BLS_D_FIXED
+#endif /* MRV_BLS_BLS_D_FIXED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_a_measured: measured black level A (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: BLS_A_MEASURED:*/
+/* Measured black level for A pixels */
+#ifdef MRV_BLS_BLS_A_MEASURED
+#endif /* MRV_BLS_BLS_A_MEASURED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_b_measured: measured black level B (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: BLS_B_MEASURED:*/
+/* Measured black level for B pixels */
+#ifdef MRV_BLS_BLS_B_MEASURED
+#endif /* MRV_BLS_BLS_B_MEASURED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_c_measured: measured black level C (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: BLS_C_MEASURED:*/
+/* Measured black level for C pixels */
+#ifdef MRV_BLS_BLS_C_MEASURED
+#endif /* MRV_BLS_BLS_C_MEASURED */
+/*****************************************************************************/
+/**
+ * register: isp_bls_d_measured: measured black level D (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: BLS_D_MEASURED:*/
+/* Measured black level for D pixels */
+#ifdef MRV_BLS_BLS_D_MEASURED
+#endif /* MRV_BLS_BLS_D_MEASURED */
+/*****************************************************************************/
+/* ISP Denoising Pre-Filter Registers                                        */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_dpf_mode: Mode control for Denoising Pre-Filter block
+ *           (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: USE_NF_GAIN:*/
+/* 1: dpf_nf_gain's will be used */
+/* 0: external AWB gains will be used  *Default**/
+#ifdef MRV_DPF_USE_NF_GAIN
+#endif /* MRV_DPF_USE_NF_GAIN */
+/* Slice: LSC_GAIN_COMP:*/
+/* 1: LSC gain will be processed */
+/* 0: LSC gain will not be processed  *Default**/
+#ifdef MRV_DPF_LSC_GAIN_COMP
+#endif /* MRV_DPF_LSC_GAIN_COMP */
+/* Slice: AWB_GAIN_COMP:*/
+/* 1: AWB gain or internal dpf_nf_gain will be processed */
+/* 0: AWB gain or internal dpf_nf_gain will not be processed  *Default**/
+#ifdef MRV_DPF_AWB_GAIN_COMP
+#endif /* MRV_DPF_AWB_GAIN_COMP */
+/* Slice: NLL_SEGMENTATION:*/
+/* 1: optimized logarithmic like segmentation for Noise Level Lookup (NLL)*/
+/* 0: equidistant segmentation for NLL  *Default**/
+#ifdef MRV_DPF_NLL_SEGMENTATION
+#endif /* MRV_DPF_NLL_SEGMENTATION */
+/* Slice: RB_FILTER_SIZE:*/
+/* 1: Red and Blue filter kernel size of 9x9 (5x5 active) pixels */
+/* 0: Wide Red and Blue filter kernel size of 13x9 (7x5 active) pixels  *Default**/
+#ifdef MRV_DPF_RB_FILTER_SIZE
+#endif /* MRV_DPF_RB_FILTER_SIZE */
+/* Slice: R_FILTER_OFF:*/
+/* 1: disable filter processing for red pixels (R)*/
+/* 0: filter R pixels  *Default**/
+#ifdef MRV_DPF_R_FILTER_OFF
+#endif /* MRV_DPF_R_FILTER_OFF */
+/* Slice: GR_FILTER_OFF:*/
+/* 1: disable filter processing for green pixels in green/red lines (GR)*/
+/* 0: filter GR pixels  *Default**/
+#ifdef MRV_DPF_GR_FILTER_OFF
+#endif /* MRV_DPF_GR_FILTER_OFF */
+/* Slice: GB_FILTER_OFF:*/
+/* 1: disable filter processing for green pixels in green/blue lines (GB)*/
+/* 0: filter GB pixels  *Default**/
+#ifdef MRV_DPF_GB_FILTER_OFF
+#endif /* MRV_DPF_GB_FILTER_OFF */
+/* Slice: B_FILTER_OFF:*/
+/* 1: disable filter processing for blue pixels (B)*/
+/* 0: filter B pixels  *Default**/
+#ifdef MRV_DPF_B_FILTER_OFF
+#endif /* MRV_DPF_B_FILTER_OFF */
+/* Slice: DPF_ENABLE:*/
+/* 1: enable dpf */
+/* 0: bypass dpf  *Default**/
+#ifdef MRV_DPF_DPF_ENABLE
+#endif /* MRV_DPF_DPF_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_strength_r: filter strength of the RED filter (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: INV_WEIGHT_R:*/
+/* Filter strength of the filter is determined by weight. Default is a */
+/* weight of 1. A higher weight increases the filter strength. In this */
+/* register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/*  weight=0.251    -> 255, weight=0.5 -> 128,*/
+/*  weight=1        -> 64 *default**/
+/*  weight=1.25     -> 51, weight=1.5 -> 42,*/
+/*  weight=1.75     -> 37, weight=2 -> 32 */
+#ifdef MRV_DPF_INV_WEIGHT_R
+#endif /* MRV_DPF_INV_WEIGHT_R */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_strength_g: filter strength of the GREEN filter (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: INV_WEIGHT_G:*/
+/* Filter strength of the filter is determined by weight. Default is a */
+/* weight of 1. A higher weight increases the filter strength. In this */
+/* register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/*  weight=0.251    -> 255, weight=0.5 -> 128,*/
+/*  weight=1        -> 64 *default**/
+/*  weight=1.25     -> 51, weight=1.5 -> 42,*/
+/*  weight=1.75     -> 37, weight=2 -> 32 */
+#ifdef MRV_DPF_INV_WEIGHT_G
+#endif /* MRV_DPF_INV_WEIGHT_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_strength_b: filter strength of the BLUE filter (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: INV_WEIGHT_B:*/
+/* Filter strength of the filter is determined by weight. Default is a */
+/* weight of 1. A higher weight increases the filter strength. In this */
+/* register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/*  weight=0.251    -> 255, weight=0.5 -> 128,*/
+/*  weight=1        -> 64 *default**/
+/*  weight=1.25     -> 51, weight=1.5 -> 42,*/
+/*  weight=1.75     -> 37, weight=2 -> 32 */
+#ifdef MRV_DPF_INV_WEIGHT_B
+#endif /* MRV_DPF_INV_WEIGHT_B */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_s_weight_g_1_4: Spatial Weights green channel 1 2 3 4
+ *           (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: S_WEIGHT_G4:*/
+/* Filter Coefficient green channel S_WEIGHT_G4 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G4
+#endif /* MRV_DPF_S_WEIGHT_G4 */
+/* Slice: S_WEIGHT_G3:*/
+/* Filter Coefficient green channel S_WEIGHT_G3 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G3
+#endif /* MRV_DPF_S_WEIGHT_G3 */
+/* Slice: S_WEIGHT_G2:*/
+/* Filter Coefficient green channel S_WEIGHT_G2 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G2
+#endif /* MRV_DPF_S_WEIGHT_G2 */
+/* Slice: S_WEIGHT_G1:*/
+/* Filter Coefficient green channel S_WEIGHT_G1 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G1
+#endif /* MRV_DPF_S_WEIGHT_G1 */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_s_weight_g_5_6: Spatial Weights green channel 5 6
+ *           (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: S_WEIGHT_G6:*/
+/* Filter Coefficient green channel S_WEIGHT_G6 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G6
+#endif /* MRV_DPF_S_WEIGHT_G6 */
+/* Slice: S_WEIGHT_G5:*/
+/* Filter Coefficient green channel S_WEIGHT_G5 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_G5
+#endif /* MRV_DPF_S_WEIGHT_G5 */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_s_weight_rb_1_4: Spatial Weights red/blue channels 1 2 3 4
+ *           (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: S_WEIGHT_RB4:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB4 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB4
+#endif /* MRV_DPF_S_WEIGHT_RB4 */
+/* Slice: S_WEIGHT_RB3:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB3 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB3
+#endif /* MRV_DPF_S_WEIGHT_RB3 */
+/* Slice: S_WEIGHT_RB2:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB2 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB2
+#endif /* MRV_DPF_S_WEIGHT_RB2 */
+/* Slice: S_WEIGHT_RB1:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB1 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB1
+#endif /* MRV_DPF_S_WEIGHT_RB1 */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_s_weight_rb_5_6: Spatial Weights red/blue channels 5 6
+ *           (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: S_WEIGHT_RB6:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB6 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB6
+#endif /* MRV_DPF_S_WEIGHT_RB6 */
+/* Slice: S_WEIGHT_RB5:*/
+/* Filter Coefficient red/blue channels S_WEIGHT_RB5 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#ifdef MRV_DPF_S_WEIGHT_RB5
+#endif /* MRV_DPF_S_WEIGHT_RB5 */
+/*****************************************************************************/
+/**
+ * register array: isp_dpf_nll_coeff: Noise Level Lookup Coefficient
+ *                 (0x0040 + n*0x4 (n=0..16))
+ *
+ *****************************************************************************/
+/* Slice: nll_coeff_n:*/
+/* Noise Level Lookup Table Coefficient nll_coeff_n */
+/* 10 bit unsigned, value range 1/1024 to 1023/1024 (*Default*)*/
+#ifdef MRV_DPF_NLL_COEFF_N
+#endif /* MRV_DPF_NLL_COEFF_N */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_nf_gain_r: noise function gain for red pixels (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: DPF_NF_GAIN_R:*/
+/* Noise Function (NF) Gain that replaces the AWB gain for red pixels.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#ifdef MRV_DPF_DPF_NF_GAIN_R
+#endif /* MRV_DPF_DPF_NF_GAIN_R */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_nf_gain_gr: noise function gain for green in red pixels
+ *           (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: DPF_NF_GAIN_GR:*/
+/* Noise Function (NF) Gain that replaces the AWB gain for green pixels in a */
+/* red line.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#ifdef MRV_DPF_DPF_NF_GAIN_GR
+#endif /* MRV_DPF_DPF_NF_GAIN_GR */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_nf_gain_gb: noise function gain for green in blue pixels
+ *           (0x0000006c)
+ *
+ *****************************************************************************/
+/* Slice: DPF_NF_GAIN_GB:*/
+/* Noise Function (NF) Gain that replaces the AWB gain for green pixels in a */
+/* blue line.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#ifdef MRV_DPF_DPF_NF_GAIN_GB
+#endif /* MRV_DPF_DPF_NF_GAIN_GB */
+/*****************************************************************************/
+/**
+ * register: isp_dpf_nf_gain_b: noise function gain for blue pixels (0x00000070)
+ *
+ *****************************************************************************/
+/* Slice: DPF_NF_GAIN_B:*/
+/* Noise Function (NF) Gain that replaces the AWB gain for blue pixels.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#ifdef MRV_DPF_DPF_NF_GAIN_B
+#endif /* MRV_DPF_DPF_NF_GAIN_B */
+/*****************************************************************************/
+/* ISP Defect Pixel Cluster Correction Registers                             */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_mode: mode control for DPCC block (0x0000)
+ *
+ *****************************************************************************/
+/* Slice: STAGE1_ENABLE:*/
+/* 1: enable  stage1 *Default**/
+/* 0: bypass  stage1 */
+#ifdef MRV_DPCC_STAGE1_ENABLE
+#endif /* MRV_DPCC_STAGE1_ENABLE */
+/* Slice: GRAYSCALE_MODE:*/
+/* 1: enable gray scale data input from black and white sensors (without color filter array)*/
+/* 0: BAYER DATA INPUT  *Default**/
+#ifdef MRV_DPCC_GRAYSCALE_MODE
+#endif /* MRV_DPCC_GRAYSCALE_MODE */
+/* Slice: ISP_DPCC_enable:*/
+/* 1: enable DPCC */
+/* 0: bypass DPCC  *Default**/
+#ifdef MRV_DPCC_ISP_DPCC_ENABLE
+#endif /* MRV_DPCC_ISP_DPCC_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_output_mode: interpolation mode for correction unit
+ *           (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: STAGE1_RB_3x3:*/
+/* 1: stage1 red/blue 9 pixel (3x3) output median */
+/* 0: stage1 red/blue 4 or 5 pixel output median  *Default**/
+#ifdef MRV_DPCC_STAGE1_RB_3X3
+#endif /* MRV_DPCC_STAGE1_RB_3X3 */
+/* Slice: STAGE1_G_3x3:*/
+/* 1: stage1 green 9 pixel (3x3) output median */
+/* 0: stage1 green 4 or 5 pixel output median  *Default**/
+#ifdef MRV_DPCC_STAGE1_G_3X3
+#endif /* MRV_DPCC_STAGE1_G_3X3 */
+/* Slice: STAGE1_INCL_RB_CENTER:*/
+/* 1: stage1 include center pixel for red/blue output median 2x2+1 */
+/* *Default* 0: stage1 do not include center pixel for red/blue output median 2x2 */
+#ifdef MRV_DPCC_STAGE1_INCL_RB_CENTER
+#endif /* MRV_DPCC_STAGE1_INCL_RB_CENTER */
+/* Slice: STAGE1_INCL_GREEN_CENTER:*/
+/* 1: stage1 include center pixel for green output median 2x2+1 *Default**/
+/* 0: stage1 do not include center pixel for green output median 2x2 */
+#ifdef MRV_DPCC_STAGE1_INCL_GREEN_CENTER
+#endif /* MRV_DPCC_STAGE1_INCL_GREEN_CENTER */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_set_use: DPCC methods set usage for detection
+ *           (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: STAGE1_USE_FIX_SET:*/
+/* 1: stage1 use hard coded methods set *Default**/
+/* 0: stage1 do not use hard coded methods set */
+#ifdef MRV_DPCC_STAGE1_USE_FIX_SET
+#endif /* MRV_DPCC_STAGE1_USE_FIX_SET */
+/* Slice: STAGE1_USE_SET_3:*/
+/* 1: stage1 use methods set 3 */
+/* 0: stage1 do not use methods set 3 *Default**/
+#ifdef MRV_DPCC_STAGE1_USE_SET_3
+#endif /* MRV_DPCC_STAGE1_USE_SET_3 */
+/* Slice: STAGE1_USE_SET_2:*/
+/* 1: stage1 use methods set 2 */
+/* 0: stage1 do not use methods set 2 *Default**/
+#ifdef MRV_DPCC_STAGE1_USE_SET_2
+#endif /* MRV_DPCC_STAGE1_USE_SET_2 */
+/* Slice: STAGE1_USE_SET_1:*/
+/* 1: stage1 use methods set 1  *Default**/
+/* 0: stage1 do not use methods set 1 */
+#ifdef MRV_DPCC_STAGE1_USE_SET_1
+#endif /* MRV_DPCC_STAGE1_USE_SET_1 */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_methods_set_1: Methods enable bits for SET_1
+ *           (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: RG_RED_BLUE1_ENABLE:*/
+/* 1: enable Rank Gradient check for red_blue  *Default**/
+/* 0: bypass Rank Gradient check for red_blue */
+#ifdef MRV_DPCC_RG_RED_BLUE1_ENABLE
+#endif /* MRV_DPCC_RG_RED_BLUE1_ENABLE */
+/* Slice: RND_RED_BLUE1_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for red_blue  *Default**/
+/* 0: bypass Rank Neighbor Difference check for red_blue */
+#ifdef MRV_DPCC_RND_RED_BLUE1_ENABLE
+#endif /* MRV_DPCC_RND_RED_BLUE1_ENABLE */
+/* Slice: RO_RED_BLUE1_ENABLE:*/
+/* 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#ifdef MRV_DPCC_RO_RED_BLUE1_ENABLE
+#endif /* MRV_DPCC_RO_RED_BLUE1_ENABLE */
+/* Slice: LC_RED_BLUE1_ENABLE:*/
+/* 1: enable Line check for red_blue *Default**/
+/* 0: bypass Line check for red_blue */
+#ifdef MRV_DPCC_LC_RED_BLUE1_ENABLE
+#endif /* MRV_DPCC_LC_RED_BLUE1_ENABLE */
+/* Slice: PG_RED_BLUE1_ENABLE:*/
+/* 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#ifdef MRV_DPCC_PG_RED_BLUE1_ENABLE
+#endif /* MRV_DPCC_PG_RED_BLUE1_ENABLE */
+/* Slice: RG_GREEN1_ENABLE:*/
+/* 1: enable Rank Gradient check for green  *Default**/
+/* 0: bypass Rank Gradient check for green */
+#ifdef MRV_DPCC_RG_GREEN1_ENABLE
+#endif /* MRV_DPCC_RG_GREEN1_ENABLE */
+/* Slice: RND_GREEN1_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for green  *Default**/
+/* 0: bypass Rank Neighbor Difference check for green */
+#ifdef MRV_DPCC_RND_GREEN1_ENABLE
+#endif /* MRV_DPCC_RND_GREEN1_ENABLE */
+/* Slice: RO_GREEN1_ENABLE:*/
+/* 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#ifdef MRV_DPCC_RO_GREEN1_ENABLE
+#endif /* MRV_DPCC_RO_GREEN1_ENABLE */
+/* Slice: LC_GREEN1_ENABLE:*/
+/* 1: enable Line check for green *Default**/
+/* 0: bypass Line check for green */
+#ifdef MRV_DPCC_LC_GREEN1_ENABLE
+#endif /* MRV_DPCC_LC_GREEN1_ENABLE */
+/* Slice: PG_GREEN1_ENABLE:*/
+/* 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#ifdef MRV_DPCC_PG_GREEN1_ENABLE
+#endif /* MRV_DPCC_PG_GREEN1_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_methods_set_2: Methods enable bits for SET_2
+ *           (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: RG_RED_BLUE2_ENABLE:*/
+/* 1: enable Rank Gradient check for red_blue  *Default**/
+/* 0: bypass Rank Gradient check for red_blue */
+#ifdef MRV_DPCC_RG_RED_BLUE2_ENABLE
+#endif /* MRV_DPCC_RG_RED_BLUE2_ENABLE */
+/* Slice: RND_RED_BLUE2_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for red_blue  *Default**/
+/* 0: bypass Rank Neighbor Difference check for red_blue */
+#ifdef MRV_DPCC_RND_RED_BLUE2_ENABLE
+#endif /* MRV_DPCC_RND_RED_BLUE2_ENABLE */
+/* Slice: RO_RED_BLUE2_ENABLE:*/
+/* 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#ifdef MRV_DPCC_RO_RED_BLUE2_ENABLE
+#endif /* MRV_DPCC_RO_RED_BLUE2_ENABLE */
+/* Slice: LC_RED_BLUE2_ENABLE:*/
+/* 1: enable Line check for red_blue *Default**/
+/* 0: bypass Line check for red_blue */
+#ifdef MRV_DPCC_LC_RED_BLUE2_ENABLE
+#endif /* MRV_DPCC_LC_RED_BLUE2_ENABLE */
+/* Slice: PG_RED_BLUE2_ENABLE:*/
+/* 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#ifdef MRV_DPCC_PG_RED_BLUE2_ENABLE
+#endif /* MRV_DPCC_PG_RED_BLUE2_ENABLE */
+/* Slice: RG_GREEN2_ENABLE:*/
+/* 1: enable Rank Gradient check for green  *Default**/
+/* 0: bypass Rank Gradient check for green */
+#ifdef MRV_DPCC_RG_GREEN2_ENABLE
+#endif /* MRV_DPCC_RG_GREEN2_ENABLE */
+/* Slice: RND_GREEN2_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for green  *Default**/
+/* 0: bypass Rank Neighbor Difference check for green */
+#ifdef MRV_DPCC_RND_GREEN2_ENABLE
+#endif /* MRV_DPCC_RND_GREEN2_ENABLE */
+/* Slice: RO_GREEN2_ENABLE:*/
+/* 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#ifdef MRV_DPCC_RO_GREEN2_ENABLE
+#endif /* MRV_DPCC_RO_GREEN2_ENABLE */
+/* Slice: LC_GREEN2_ENABLE:*/
+/* 1: enable Line check for green *Default**/
+/* 0: bypass Line check for green */
+#ifdef MRV_DPCC_LC_GREEN2_ENABLE
+#endif /* MRV_DPCC_LC_GREEN2_ENABLE */
+/* Slice: PG_GREEN2_ENABLE:*/
+/* 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#ifdef MRV_DPCC_PG_GREEN2_ENABLE
+#endif /* MRV_DPCC_PG_GREEN2_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_methods_set_3: Methods enable bits for SET_3
+ *           (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: RG_RED_BLUE3_ENABLE:*/
+/* 1: enable Rank Gradient check for red_blue  *Default**/
+/* 0: bypass Rank Gradient check for red_blue */
+#ifdef MRV_DPCC_RG_RED_BLUE3_ENABLE
+#endif /* MRV_DPCC_RG_RED_BLUE3_ENABLE */
+/* Slice: RND_RED_BLUE3_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for red_blue  *Default**/
+/* 0: bypass Rank Neighbor Difference check for red_blue */
+#ifdef MRV_DPCC_RND_RED_BLUE3_ENABLE
+#endif /* MRV_DPCC_RND_RED_BLUE3_ENABLE */
+/* Slice: RO_RED_BLUE3_ENABLE:*/
+/* 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#ifdef MRV_DPCC_RO_RED_BLUE3_ENABLE
+#endif /* MRV_DPCC_RO_RED_BLUE3_ENABLE */
+/* Slice: LC_RED_BLUE3_ENABLE:*/
+/* 1: enable Line check for red_blue *Default**/
+/* 0: bypass Line check for red_blue */
+#ifdef MRV_DPCC_LC_RED_BLUE3_ENABLE
+#endif /* MRV_DPCC_LC_RED_BLUE3_ENABLE */
+/* Slice: PG_RED_BLUE3_ENABLE:*/
+/* 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#ifdef MRV_DPCC_PG_RED_BLUE3_ENABLE
+#endif /* MRV_DPCC_PG_RED_BLUE3_ENABLE */
+/* Slice: RG_GREEN3_ENABLE:*/
+/* 1: enable Rank Gradient check for green  *Default**/
+/* 0: bypass Rank Gradient check for green */
+#ifdef MRV_DPCC_RG_GREEN3_ENABLE
+#endif /* MRV_DPCC_RG_GREEN3_ENABLE */
+/* Slice: RND_GREEN3_ENABLE:*/
+/* 1: enable Rank Neighbor Difference check for green  *Default**/
+/* 0: bypass Rank Neighbor Difference check for green */
+#ifdef MRV_DPCC_RND_GREEN3_ENABLE
+#endif /* MRV_DPCC_RND_GREEN3_ENABLE */
+/* Slice: RO_GREEN3_ENABLE:*/
+/* 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#ifdef MRV_DPCC_RO_GREEN3_ENABLE
+#endif /* MRV_DPCC_RO_GREEN3_ENABLE */
+/* Slice: LC_GREEN3_ENABLE:*/
+/* 1: enable Line check for green *Default**/
+/* 0: bypass Line check for green */
+#ifdef MRV_DPCC_LC_GREEN3_ENABLE
+#endif /* MRV_DPCC_LC_GREEN3_ENABLE */
+/* Slice: PG_GREEN3_ENABLE:*/
+/* 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#ifdef MRV_DPCC_PG_GREEN3_ENABLE
+#endif /* MRV_DPCC_PG_GREEN3_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_thresh_1: Line threshold SET_1 (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: LINE_THR_1_RB:*/
+/* line threshold for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_THR_1_RB
+#endif /* MRV_DPCC_LINE_THR_1_RB */
+/* Slice: LINE_THR_1_G:*/
+/* line threshold for set 1 green */
+#ifdef MRV_DPCC_LINE_THR_1_G
+#endif /* MRV_DPCC_LINE_THR_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_mad_fac_1: Mean Absolute Difference (MAD) factor
+ *           for Line check set 1 (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: LINE_MAD_FAC_1_RB:*/
+/* line MAD factor for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_MAD_FAC_1_RB
+#endif /* MRV_DPCC_LINE_MAD_FAC_1_RB */
+/* Slice: LINE_MAD_FAC_1_G:*/
+/* line MAD factor for set 1 green */
+#ifdef MRV_DPCC_LINE_MAD_FAC_1_G
+#endif /* MRV_DPCC_LINE_MAD_FAC_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_pg_fac_1: Peak gradient factor for set 1 (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: PG_FAC_1_RB:*/
+/* Peak gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_PG_FAC_1_RB
+#endif /* MRV_DPCC_PG_FAC_1_RB */
+/* Slice: PG_FAC_1_G:*/
+/* Peak gradient factor for set 1 green */
+#ifdef MRV_DPCC_PG_FAC_1_G
+#endif /* MRV_DPCC_PG_FAC_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rnd_thresh_1: Rank Neighbor Difference threshold for
+ *           set 1 (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: RND_THR_1_RB:*/
+/* Rank Neighbor Difference threshold for set 1 red/blue */
+#ifdef MRV_DPCC_RND_THR_1_RB
+#endif /* MRV_DPCC_RND_THR_1_RB */
+/* Slice: RND_THR_1_G:*/
+/* Rank Neighbor Difference threshold for set 1 green */
+#ifdef MRV_DPCC_RND_THR_1_G
+#endif /* MRV_DPCC_RND_THR_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rg_fac_1: Rank gradient factor for set 1 (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: RG_FAC_1_RB:*/
+/* Rank gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_RG_FAC_1_RB
+#endif /* MRV_DPCC_RG_FAC_1_RB */
+/* Slice: RG_FAC_1_G:*/
+/* Rank gradient factor for set 1 green */
+#ifdef MRV_DPCC_RG_FAC_1_G
+#endif /* MRV_DPCC_RG_FAC_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_thresh_2: Line threshold SET_2 (0x0000002C)
+ *
+ *****************************************************************************/
+/* Slice: LINE_THR_2_RB:*/
+/* line threshold for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_THR_2_RB
+#endif /* MRV_DPCC_LINE_THR_2_RB */
+/* Slice: LINE_THR_2_G:*/
+/* line threshold for set 1 green */
+#ifdef MRV_DPCC_LINE_THR_2_G
+#endif /* MRV_DPCC_LINE_THR_2_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_mad_fac_2: Mean Absolute Difference (MAD) factor
+ *           for Line check set 1 (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: LINE_MAD_FAC_2_RB:*/
+/* line MAD factor for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_MAD_FAC_2_RB
+#endif /* MRV_DPCC_LINE_MAD_FAC_2_RB */
+/* Slice: LINE_MAD_FAC_2_G:*/
+/* line MAD factor for set 1 green */
+#ifdef MRV_DPCC_LINE_MAD_FAC_2_G
+#endif /* MRV_DPCC_LINE_MAD_FAC_2_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_pg_fac_2: Peak gradient factor for set 1 (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: PG_FAC_2_RB:*/
+/* Peak gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_PG_FAC_2_RB
+#endif /* MRV_DPCC_PG_FAC_2_RB */
+/* Slice: PG_FAC_2_G:*/
+/* Peak gradient factor for set 1 green */
+#ifdef MRV_DPCC_PG_FAC_2_G
+#endif /* MRV_DPCC_PG_FAC_2_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rnd_thresh_2: Rank Neighbor Difference threshold for
+ *           set 1 (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: RND_THR_2_RB:*/
+/* Rank Neighbor Difference threshold for set 1 red/blue */
+#ifdef MRV_DPCC_RND_THR_2_RB
+#endif /* MRV_DPCC_RND_THR_2_RB */
+/* Slice: RND_THR_2_G:*/
+/* Rank Neighbor Difference threshold for set 1 green */
+#ifdef MRV_DPCC_RND_THR_2_G
+#endif /* MRV_DPCC_RND_THR_2_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rg_fac_2: Rank gradient factor for set 1 (0x0000003C)
+ *
+ *****************************************************************************/
+/* Slice: RG_FAC_2_RB:*/
+/* Rank gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_RG_FAC_2_RB
+#endif /* MRV_DPCC_RG_FAC_2_RB */
+/* Slice: RG_FAC_2_G:*/
+/* Rank gradient factor for set 1 green */
+#ifdef MRV_DPCC_RG_FAC_2_G
+#endif /* MRV_DPCC_RG_FAC_2_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_thresh_3: Line threshold SET_3 (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: LINE_THR_3_RB:*/
+/* line threshold for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_THR_3_RB
+#endif /* MRV_DPCC_LINE_THR_3_RB */
+/* Slice: LINE_THR_3_G:*/
+/* line threshold for set 1 green */
+#ifdef MRV_DPCC_LINE_THR_3_G
+#endif /* MRV_DPCC_LINE_THR_3_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_line_mad_fac_3: Mean Absolute Difference (MAD) factor
+ *           for Line check set 1 (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: LINE_MAD_FAC_3_RB:*/
+/* line MAD factor for set 1 red/blue */
+#ifdef MRV_DPCC_LINE_MAD_FAC_3_RB
+#endif /* MRV_DPCC_LINE_MAD_FAC_3_RB */
+/* Slice: LINE_MAD_FAC_3_G:*/
+/* line MAD factor for set 1 green */
+#ifdef MRV_DPCC_LINE_MAD_FAC_3_G
+#endif /* MRV_DPCC_LINE_MAD_FAC_3_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_pg_fac_3: Peak gradient factor for set 1 (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: PG_FAC_3_RB:*/
+/* Peak gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_PG_FAC_3_RB
+#endif /* MRV_DPCC_PG_FAC_3_RB */
+/* Slice: PG_FAC_3_G:*/
+/* Peak gradient factor for set 1 green */
+#ifdef MRV_DPCC_PG_FAC_3_G
+#endif /* MRV_DPCC_PG_FAC_3_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rnd_thresh_3: Rank Neighbor Difference threshold for
+ *           set 1 (0x0000004C)
+ *
+ *****************************************************************************/
+/* Slice: RND_THR_3_RB:*/
+/* Rank Neighbor Difference threshold for set 1 red/blue */
+#ifdef MRV_DPCC_RND_THR_3_RB
+#endif /* MRV_DPCC_RND_THR_3_RB */
+/* Slice: RND_THR_3_G:*/
+/* Rank Neighbor Difference threshold for set 1 green */
+#ifdef MRV_DPCC_RND_THR_3_G
+#endif /* MRV_DPCC_RND_THR_3_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rg_fac_3: Rank gradient factor for set 1 (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: RG_FAC_3_RB:*/
+/* Rank gradient factor for set 1 red/blue */
+#ifdef MRV_DPCC_RG_FAC_3_RB
+#endif /* MRV_DPCC_RG_FAC_3_RB */
+/* Slice: RG_FAC_3_G:*/
+/* Rank gradient factor for set 1 green */
+#ifdef MRV_DPCC_RG_FAC_3_G
+#endif /* MRV_DPCC_RG_FAC_3_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_ro_limits: Rank Order Limits (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: RO_LIM_3_RB:*/
+/* Rank order limit for set 3 red/blue */
+#ifdef MRV_DPCC_RO_LIM_3_RB
+#endif /* MRV_DPCC_RO_LIM_3_RB */
+/* Slice: RO_LIM_3_G:*/
+/* Rank order limit for set 3 green */
+#ifdef MRV_DPCC_RO_LIM_3_G
+#endif /* MRV_DPCC_RO_LIM_3_G */
+/* Slice: RO_LIM_2_RB:*/
+/* Rank order limit for set 2 red/blue */
+#ifdef MRV_DPCC_RO_LIM_2_RB
+#endif /* MRV_DPCC_RO_LIM_2_RB */
+/* Slice: RO_LIM_2_G:*/
+/* Rank order limit for set 2 green */
+#ifdef MRV_DPCC_RO_LIM_2_G
+#endif /* MRV_DPCC_RO_LIM_2_G */
+/* Slice: RO_LIM_1_RB:*/
+/* Rank order limit for set 1 red/blue */
+#ifdef MRV_DPCC_RO_LIM_1_RB
+#endif /* MRV_DPCC_RO_LIM_1_RB */
+/* Slice: RO_LIM_1_G:*/
+/* Rank order limit for set 1 green */
+#ifdef MRV_DPCC_RO_LIM_1_G
+#endif /* MRV_DPCC_RO_LIM_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_rnd_offs: Differential Rank Offsets for Rank Neighbor
+ *           Difference (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: RND_OFFS_3_RB:*/
+/* Rank Offset to Neighbor for set 3 red/blue */
+#ifdef MRV_DPCC_RND_OFFS_3_RB
+#endif /* MRV_DPCC_RND_OFFS_3_RB */
+/* Slice: RND_OFFS_3_G:*/
+/* Rank Offset to Neighbor for set 3 green */
+#ifdef MRV_DPCC_RND_OFFS_3_G
+#endif /* MRV_DPCC_RND_OFFS_3_G */
+/* Slice: RND_OFFS_2_RB:*/
+/* Rank Offset to Neighbor for set 2 red/blue */
+#ifdef MRV_DPCC_RND_OFFS_2_RB
+#endif /* MRV_DPCC_RND_OFFS_2_RB */
+/* Slice: RND_OFFS_2_G:*/
+/* Rank Offset to Neighbor for set 2 green */
+#ifdef MRV_DPCC_RND_OFFS_2_G
+#endif /* MRV_DPCC_RND_OFFS_2_G */
+/* Slice: RND_OFFS_1_RB:*/
+/* Rank Offset to Neighbor for set 1 red/blue */
+#ifdef MRV_DPCC_RND_OFFS_1_RB
+#endif /* MRV_DPCC_RND_OFFS_1_RB */
+/* Slice: RND_OFFS_1_G:*/
+/* Rank Offset to Neighbor for set 1 green */
+#ifdef MRV_DPCC_RND_OFFS_1_G
+#endif /* MRV_DPCC_RND_OFFS_1_G */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_bpt_ctrl: bad pixel table settings (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: BPT_RB_3x3:*/
+/* 1: if BPT active red/blue 9 pixel (3x3) output median */
+/* 0: if BPT active red/blue 4 or 5 pixel output median  *Default**/
+#ifdef MRV_DPCC_BPT_RB_3X3
+#endif /* MRV_DPCC_BPT_RB_3X3 */
+/* Slice: BPT_G_3x3:*/
+/* 1: if BPT active green 9 pixel (3x3) output median */
+/* 0: if BPT active green 4 or 5 pixel output median  *Default**/
+#ifdef MRV_DPCC_BPT_G_3X3
+#endif /* MRV_DPCC_BPT_G_3X3 */
+/* Slice: BPT_INCL_RB_CENTER:*/
+/* 1: if BPT active include center pixel for red/blue output median 2x2+1 */
+/* 0: if BPT active do not include center pixel for red/blue output median 2x2 *Default**/
+#ifdef MRV_DPCC_BPT_INCL_RB_CENTER
+#endif /* MRV_DPCC_BPT_INCL_RB_CENTER */
+/* Slice: BPT_INCL_GREEN_CENTER:*/
+/* 1: if BPT active include center pixel for green output median 2x2+1 */
+/* 0: if BPT active do not include center pixel for green output median 2x2 *Default**/
+#ifdef MRV_DPCC_BPT_INCL_GREEN_CENTER
+#endif /* MRV_DPCC_BPT_INCL_GREEN_CENTER */
+/* Slice: BPT_USE_FIX_SET:*/
+/* 1: for BPT write use hard coded methods set */
+/* 0: for BPT write do not use hard coded methods set *Default**/
+#ifdef MRV_DPCC_BPT_USE_FIX_SET
+#endif /* MRV_DPCC_BPT_USE_FIX_SET */
+/* Slice: BPT_USE_SET_3:*/
+/* 1: for BPT write use methods set 3 */
+/* 0: for BPT write do not use methods set 3 *Default**/
+#ifdef MRV_DPCC_BPT_USE_SET_3
+#endif /* MRV_DPCC_BPT_USE_SET_3 */
+/* Slice: BPT_USE_SET_2:*/
+/* 1: for BPT write use methods set 2 */
+/* 0: for BPT write do not use methods set 2 *Default**/
+#ifdef MRV_DPCC_BPT_USE_SET_2
+#endif /* MRV_DPCC_BPT_USE_SET_2 */
+/* Slice: BPT_USE_SET_1:*/
+/* 1: for BPT write use methods set 1 */
+/* 0: for BPT write do not use methods set 1 *Default**/
+#ifdef MRV_DPCC_BPT_USE_SET_1
+#endif /* MRV_DPCC_BPT_USE_SET_1 */
+/* Slice: bpt_cor_en:*/
+/* table based correction enable */
+/* 1: table based correction is enabled */
+/* 0: table based correction is disabled */
+#ifdef MRV_DPCC_BPT_COR_EN
+#endif /* MRV_DPCC_BPT_COR_EN */
+/* Slice: bpt_det_en:*/
+/* Bad pixel detection write enable */
+/* 1: bad pixel detection write to memory is enabled */
+/* 0: bad pixel detection write to memory is disabled */
+#ifdef MRV_DPCC_BPT_DET_EN
+#endif /* MRV_DPCC_BPT_DET_EN */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_bpt_addr: TABLE Start Address for table-based correction
+ *           algorithm (0x00000064)
+ *
+ *****************************************************************************/
+/* Slice: bp_table_addr:*/
+/* Table RAM start address for read or write operations. The address counter */
+/* is incremented at each read or write access to the data register (auto-*/
+/* increment mechanism).*/
+#ifdef MRV_DPCC_BP_TABLE_ADDR
+#endif /* MRV_DPCC_BP_TABLE_ADDR */
+/*****************************************************************************/
+/**
+ * register: isp_dpcc_bpt_data: TABLE DATA register for read and write access
+ *           of table RAM (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: bpt_v_addr:*/
+/* Bad Pixel vertical address (pixel position)*/
+#ifdef MRV_DPCC_BPT_V_ADDR
+#endif /* MRV_DPCC_BPT_V_ADDR */
+/* Slice: bpt_h_addr:*/
+/* Bad Pixel horizontal address (pixel position)*/
+#ifdef MRV_DPCC_BPT_H_ADDR
+#endif /* MRV_DPCC_BPT_H_ADDR */
+/*****************************************************************************/
+/* ISP Wide Dynamic Range                                                    */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: isp_wdr_ctrl: Control Bits for Wide Dynamic Range Unit (0x00000000)
+ *
+ *****************************************************************************/
+/* Slice: WDR_RGB_FACTOR:*/
+/* rgb_factor defines how much influence the RGBmax approach has in comparison */
+/* to Y. The illumination reference Iref is calculated according to the following */
+/* formula:*/
+     /**/
+/* Iref = (WDR_RGB_FACTOR * RGBYmax_tr + (8 - WDR_RGB_FACTOR) * Y) / 8 */
+     /**/
+/* So, rgb_factor = 0 means that the standard approach is used. Use of this */
+/* factor requires that Iref has been selected, see WDR_USE_IREF.*/
+     /**/
+/* Value range of rgb_factor: 0...8 */
+#ifdef MRV_WDR_RGB_FACTOR
+#endif /* MRV_WDR_RGB_FACTOR */
+/* Slice: WDR_DISABLE_TRANSIENT:*/
+/* 1: disable transient between Y and RGBY_max */
+/* 0: calculate transient between Y and RGBY_max (for noise reduction) *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#ifdef MRV_WDR_DISABLE_TRANSIENT
+#endif /* MRV_WDR_DISABLE_TRANSIENT */
+/* Slice: WDR_USE_RGB7_8:*/
+/* 1: decrease RGBmax by 7/8 (for noise reduction)*/
+/* 0: do not modify RGBmax *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#ifdef MRV_WDR_USE_RGB7_8
+#endif /* MRV_WDR_USE_RGB7_8 */
+/* Slice: WDR_USE_Y9_8:*/
+/* 1: use R G B and Y*9/8 for maximum value calculation (for noise reduction)*/
+/* 0: only use R G B for maximum value calculation (RGBYmax approach)  *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#ifdef MRV_WDR_USE_Y9_8
+#endif /* MRV_WDR_USE_Y9_8 */
+/* Slice: WDR_USE_IREF:*/
+/* 1: use Iref (Illumination reference) instead of Y for ToneMapping and Gain calculation */
+/* 0: use Y for ToneMapping and Gain calculation  *Default**/
+/* Iref is calculated according to the following formula:*/
+/* Iref = (WDR_RGB_FACTOR * RGBmax_tr + (8 - WDR_RGB_FACTOR) * Y) / 8 */
+#ifdef MRV_WDR_USE_IREF
+#endif /* MRV_WDR_USE_IREF */
+/* Slice: WDR_CR_MAPPING_DISABLE:*/
+/* 1: disable (bypass) Chrominance Mapping */
+/* 0: enable Chrominance Mapping  *Default**/
+/* requires that Luminance/chrominance color space has been selected */
+#ifdef MRV_WDR_CR_MAPPING_DISABLE
+#endif /* MRV_WDR_CR_MAPPING_DISABLE */
+/* Slice: WDR_COLOR_SPACE_SELECT:*/
+/* 1: R, G, B color space */
+/* 0: Luminance/Chrominance color space  *Default**/
+#ifdef MRV_WDR_COLOR_SPACE_SELECT
+#endif /* MRV_WDR_COLOR_SPACE_SELECT */
+/* Slice: WDR_ENABLE:*/
+/* 1: enable WDR */
+/* 0: bypass WDR  *Default**/
+#ifdef MRV_WDR_ENABLE
+#endif /* MRV_WDR_ENABLE */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_tonecurve_1: Tone Curve sample points dYn definition
+ *           (part 1) (0x00000004)
+ *
+ *           isp_wdr_tonecurve_1_shd: Tone Curve sample points dYn definition
+ *           shadow register (part 1) (0x000000a0)
+ *
+ *****************************************************************************/
+/* Slice: WDR_dY8:*/
+/* Tone curve sample point definition dY8 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY8
+#endif /* MRV_WDR_DY8 */
+/* Slice: WDR_dY7:*/
+/* Tone curve sample point definition dY7 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY7
+#endif /* MRV_WDR_DY7 */
+/* Slice: WDR_dY6:*/
+/* Tone curve sample point definition dY6 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY6
+#endif /* MRV_WDR_DY6 */
+/* Slice: WDR_dY5:*/
+/* Tone curve sample point definition dY5 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY5
+#endif /* MRV_WDR_DY5 */
+/* Slice: WDR_dY4:*/
+/* Tone curve sample point definition dY4 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY4
+#endif /* MRV_WDR_DY4 */
+/* Slice: WDR_dY3:*/
+/* Tone curve sample point definition dY3 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY3
+#endif /* MRV_WDR_DY3 */
+/* Slice: WDR_dY2:*/
+/* Tone curve sample point definition dY2 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY2
+#endif /* MRV_WDR_DY2 */
+/* Slice: WDR_dY1:*/
+/* Tone curve sample point definition dY1 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY1
+#endif /* MRV_WDR_DY1 */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_tonecurve_2: Tone Curve sample points dYn definition
+ *           (part 2) (0x00000008)
+ *
+ *           isp_wdr_tonecurve_2_shd: Tone Curve sample points dYn definition
+ *           shadow register (part 2) (0x000000a4)
+ *
+ *****************************************************************************/
+/* Slice: WDR_dY16:*/
+/* Tone curve sample point definition dY16 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY16
+#endif /* MRV_WDR_DY16 */
+/* Slice: WDR_dY15:*/
+/* Tone curve sample point definition dY15 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY15
+#endif /* MRV_WDR_DY15 */
+/* Slice: WDR_dY14:*/
+/* Tone curve sample point definition dY14 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY14
+#endif /* MRV_WDR_DY14 */
+/* Slice: WDR_dY13:*/
+/* Tone curve sample point definition dY13 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY13
+#endif /* MRV_WDR_DY13 */
+/* Slice: WDR_dY12:*/
+/* Tone curve sample point definition dY12 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY12
+#endif /* MRV_WDR_DY12 */
+/* Slice: WDR_dY11:*/
+/* Tone curve sample point definition dY11 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY11
+#endif /* MRV_WDR_DY11 */
+/* Slice: WDR_dY10:*/
+/* Tone curve sample point definition dY10 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY10
+#endif /* MRV_WDR_DY10 */
+/* Slice: WDR_dY9:*/
+/* Tone curve sample point definition dY9 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY9
+#endif /* MRV_WDR_DY9 */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_tonecurve_3: Tone Curve sample points dYn definition
+ *           (part 3) (0x0000000c)
+ *
+ *           isp_wdr_tonecurve_3_shd: Tone Curve sample points dYn definition
+ *           shadow register (part 3) (0x000000a8)
+ *
+ *****************************************************************************/
+/* Slice: WDR_dY24:*/
+/* Tone curve sample point definition dY24 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY24
+#endif /* MRV_WDR_DY24 */
+/* Slice: WDR_dY23:*/
+/* Tone curve sample point definition dY23 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY23
+#endif /* MRV_WDR_DY23 */
+/* Slice: WDR_dY22:*/
+/* Tone curve sample point definition dY22 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY22
+#endif /* MRV_WDR_DY22 */
+/* Slice: WDR_dY21:*/
+/* Tone curve sample point definition dY21 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY21
+#endif /* MRV_WDR_DY21 */
+/* Slice: WDR_dY20:*/
+/* Tone curve sample point definition dY20 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY20
+#endif /* MRV_WDR_DY20 */
+/* Slice: WDR_dY19:*/
+/* Tone curve sample point definition dY19 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY19
+#endif /* MRV_WDR_DY19 */
+/* Slice: WDR_dY18:*/
+/* Tone curve sample point definition dY18 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY18
+#endif /* MRV_WDR_DY18 */
+/* Slice: WDR_dY17:*/
+/* Tone curve sample point definition dY17 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY17
+#endif /* MRV_WDR_DY17 */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_tonecurve_4: Tone Curve sample points dYn definition
+ *           (part 4) (0x00000010)
+ *
+ *           isp_wdr_tonecurve_4_shd: Tone Curve sample points dYn definition
+ *           shadow register(part 4) (0x000000ac)
+ *
+ *****************************************************************************/
+/* Slice: WDR_dY32:*/
+/* Tone curve sample point definition dY32 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY32
+#endif /* MRV_WDR_DY32 */
+/* Slice: WDR_dY31:*/
+/* Tone curve sample point definition dY31 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY31
+#endif /* MRV_WDR_DY31 */
+/* Slice: WDR_dY30:*/
+/* Tone curve sample point definition dY30 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY30
+#endif /* MRV_WDR_DY30 */
+/* Slice: WDR_dY29:*/
+/* Tone curve sample point definition dY29 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY29
+#endif /* MRV_WDR_DY29 */
+/* Slice: WDR_dY28:*/
+/* Tone curve sample point definition dY28 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY28
+#endif /* MRV_WDR_DY28 */
+/* Slice: WDR_dY27:*/
+/* Tone curve sample point definition dY27 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY27
+#endif /* MRV_WDR_DY27 */
+/* Slice: WDR_dY26:*/
+/* Tone curve sample point definition dY26 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY26
+#endif /* MRV_WDR_DY26 */
+/* Slice: WDR_dY25:*/
+/* Tone curve sample point definition dY25 on the horizontal axis (input)*/
+#ifdef MRV_WDR_DY25
+#endif /* MRV_WDR_DY25 */
+/*****************************************************************************/
+/**
+ * register array: isp_wdr_tonecurve_ym: Tonemapping curve coefficient Ym_
+ *                 (0x0028 + n*0x4 (n=0..32))
+ *
+ *****************************************************************************/
+/* Slice: tonecurve_ym_n:*/
+/* Tone curve value definition y-axis (output) of WDR unit */
+#ifdef MRV_WDR_TONECURVE_YM_N
+#endif /* MRV_WDR_TONECURVE_YM_N */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_offset: Offset values for RGB path (0x00000098)
+ *
+ *****************************************************************************/
+/* Slice: LUM_OFFSET:*/
+/* Luminance Offset value (a) for RGB operation mode */
+/* unsigned 12 bit value */
+#ifdef MRV_WDR_LUM_OFFSET
+#endif /* MRV_WDR_LUM_OFFSET */
+/* Slice: RGB_OFFSET:*/
+/* RGB Offset value (b) for RGB operation mode */
+/* unsigned 12 bit value */
+#ifdef MRV_WDR_RGB_OFFSET
+#endif /* MRV_WDR_RGB_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_wdr_deltamin: DeltaMin Threshold and Strength factor (0x0000009c)
+ *
+ *****************************************************************************/
+/* Slice: DMIN_STRENGTH:*/
+/* strength factor for DMIN */
+/* unsigned 5 bit value, range 0x00...0x10 */
+#ifdef MRV_WDR_DMIN_STRENGTH
+#endif /* MRV_WDR_DMIN_STRENGTH */
+/* Slice: DMIN_THRESH:*/
+/* Lower threshold for deltaMin value */
+/* unsigned 12 bit value */
+#ifdef MRV_WDR_DMIN_THRESH
+#endif /* MRV_WDR_DMIN_THRESH */
+/*****************************************************************************/
+/**
+ * register array: isp_wdr_tonecurve_ym_shd: Tonemapping curve coefficient
+ *                 shadow register (0x0160 + n*0x4 (n=0..32))
+ *
+ *****************************************************************************/
+/* Slice: tonecurve_ym_n_shd:*/
+/* Tone curve value definition y-axis (output) of WDR unit */
+/* shadow register.*/
+#ifdef MRV_WDR_TONECURVE_YM_N_SHD
+#endif /* MRV_WDR_TONECURVE_YM_N_SHD */
+/*****************************************************************************/
+/* ISP Elliptic Auto White Balance Registers                                 */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: awb_meas_mode: AWB Measure Mode (0x00000000)
+ *
+ *****************************************************************************/
+/*! Register: awb_meas_mode: AWB Measure Mode (0x00000000)*/
+/*! Slice: AWB_union_e5_and_e8:*/
+/*! unite ellipse 5 with ellipse 8. Accu and count for ellipse 8.*/
+#ifdef ISP_AWB_UNION_E5_AND_E8
+#define ISP_AWB_UNION_E5_AND_E8_ON              1	/* 1: enable unite ellipse 5 with ellipse 8 */
+#define ISP_AWB_UNION_E5_AND_E8_OFF             0	/* 0: disable unite ellipse 5 with ellipse 8 */
+#endif /* ISP_AWB_UNION_E5_AND_E8 */
+/*! Slice: AWB_union_e5_and_e7:*/
+/*! unite ellipse 5 with ellipse 7. Accu and count for ellipse 7.*/
+#ifdef ISP_AWB_UNION_E5_AND_E7
+#define ISP_AWB_UNION_E5_AND_E7_ON              1	/* 1: enable unite ellipse 5 with ellipse 7 */
+#define ISP_AWB_UNION_E5_AND_E7_OFF             0	/* 0: disable unite ellipse 5 with ellipse 7 */
+#endif /* ISP_AWB_UNION_E5_AND_E7 */
+/*! Slice: AWB_union_e5_and_e6:*/
+/*! unite ellipse 5 with ellipse 6. Accu and count for ellipse 6.*/
+#ifdef ISP_AWB_UNION_E5_AND_E6
+#define ISP_AWB_UNION_E5_AND_E6_ON              1	/* 1: enable unite ellipse 5 with ellipse 6 */
+#define ISP_AWB_UNION_E5_AND_E6_OFF             0	/* 0: disable unite ellipse 5 with ellipse 6 */
+#endif /* ISP_AWB_UNION_E5_AND_E6 */
+/*! Slice: AWB_union_e1_and_e4:*/
+/*! unite ellipse 1 with ellipse 4. Accu and count for ellipse 4.*/
+#ifdef ISP_AWB_UNION_E1_AND_E4
+#define ISP_AWB_UNION_E1_AND_E4_ON              1	/* 1: enable unite ellipse 1 with ellipse 4 */
+#define ISP_AWB_UNION_E1_AND_E4_OFF             0	/* 0: disable unite ellipse 1 with ellipse 4 */
+#endif /* ISP_AWB_UNION_E1_AND_E4 */
+/*! Slice: AWB_union_e1_and_e3:*/
+/*! unite ellipse 1 with ellipse 3. Accu and count for ellipse 3.*/
+#ifdef ISP_AWB_UNION_E1_AND_E3
+#define ISP_AWB_UNION_E1_AND_E3_ON              1	/* 1: enable unite ellipse 1 with ellipse 3 */
+#define ISP_AWB_UNION_E1_AND_E3_OFF             0	/* 0: disable unite ellipse 1 with ellipse 3 */
+#endif /* ISP_AWB_UNION_E1_AND_E3 */
+/*! Slice: AWB_union_e1_and_e2:*/
+/*! unite ellipse 1 with ellipse 2. Accu and count for ellipse 2.*/
+#ifdef ISP_AWB_UNION_E1_AND_E2
+#define ISP_AWB_UNION_E1_AND_E2_ON              1	/* 1: enable unite ellipse 1 with ellipse 2 */
+#define ISP_AWB_UNION_E1_AND_E2_OFF             0	/* 0: disable unite ellipse 1 with ellipse 2 */
+#endif /* ISP_AWB_UNION_E1_AND_E2 */
+/*! Slice: AWB_meas_chrom_switch:*/
+/*! Accumulates Q1 and Q2 chromaticies instead of R, G, B color signals. Results are written on AWB_ACCU registers as well.*/
+#ifdef ISP_AWB_MEAS_CHROM_SWITCH
+#define ISP_AWB_MEAS_CHROM_SWITCH_ON              1	/* 1: accumulates Q1 and Q2 chromaticies */
+#define ISP_AWB_MEAS_CHROM_SWITCH_OFF             0	/* 0: accumulates R, G, B color signals */
+#endif /* ISP_AWB_MEAS_CHROM_SWITCH */
+/* Slice: AWB_meas_irq_enable:*/
+/* AWB measure done IRQ enable.*/
+#ifdef ISP_AWB_MEAS_IRQ_ENABLE
+#define ISP_AWB_MEAS_IRQ_ENABLE_ON              1	/* 1: enable measuring done irq */
+#define ISP_AWB_MEAS_IRQ_ENABLE_OFF             0	/* 0: enable measuring done irq */
+#endif /* ISP_AWB_MEAS_IRQ_ENABLE */
+/* Slice: AWB_pre_filt_en:*/
+/* median pre filter enable.*/
+#ifdef ISP_AWB_PRE_FILT_EN
+#define ISP_AWB_PRE_FILT_EN_ON                  1	/* 1: enable median pre filter */
+#define ISP_AWB_PRE_FILT_EN_OFF                 0	/* 0: disable median pre filter */
+#endif /* ISP_AWB_PRE_FILT_EN */
+/* Slice: AWB_meas_en:*/
+/* enable measure.*/
+#ifdef ISP_AWB_MEAS_EN
+#define ISP_AWB_MEAS_EN_ON                      1	/* 1: enable measuring */
+#define ISP_AWB_MEAS_EN_OFF                     0	/* 0: disable measuring */
+#endif /* ISP_AWB_MEAS_EN */
+/*****************************************************************************/
+/**
+ * register: awb_meas_h_offs: AWB window horizontal offset (0x00000004)
+ *
+ *****************************************************************************/
+/* Slice: AWB_h_offset:*/
+/* Horizontal offset in pixels.*/
+#ifdef ISP_AWB_H_OFFSET
+#define ISP_AWB_H_OFFSET_MIN                    0U
+#define ISP_AWB_H_OFFSET_MAX                    (ISP_AWB_H_OFFSET_MASK >> ISP_AWB_H_OFFSET_SHIFT)
+#endif /* ISP_AWB_H_OFFSET */
+/*****************************************************************************/
+/**
+ * register: awb_meas_v_offs: AWB window vertical offset (0x00000008)
+ *
+ *****************************************************************************/
+/* Slice: AWB_v_offset:*/
+/* Vertical offset in pixels.*/
+#ifdef ISP_AWB_V_OFFSET
+#define ISP_AWB_V_OFFSET_MIN                    0U
+#define ISP_AWB_V_OFFSET_MAX                    (ISP_AWB_V_OFFSET_MASK >> ISP_AWB_V_OFFSET_SHIFT)
+#endif /* ISP_AWB_V_OFFSET */
+/*****************************************************************************/
+/**
+ * register: awb_meas_h_size: Horizontal window size (0x0000000c)
+ *
+ *****************************************************************************/
+/* Slice: AWB_h_size:*/
+/* Horizontal size in pixels.*/
+#ifdef ISP_AWB_H_SIZE
+#define ISP_AWB_H_SIZE_MIN                      0U
+#define ISP_AWB_H_SIZE_MAX                      (ISP_AWB_H_SIZE_MASK >> ISP_AWB_H_SIZE_SHIFT)
+#endif /* ISP_AWB_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: awb_meas_v_size: Vertical window size (0x00000010)
+ *
+ *****************************************************************************/
+/* Slice: AWB_v_size:*/
+/* Vertical size.*/
+#ifdef ISP_AWB_V_SIZE
+#define ISP_AWB_V_SIZE_MIN                      0U
+#define ISP_AWB_V_SIZE_MAX                      (ISP_AWB_V_SIZE_MASK >> ISP_AWB_V_SIZE_SHIFT)
+#endif /* ISP_AWB_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: awb_meas_r_min_max: Min Max Compare Red (0x00000014)
+ *
+ *****************************************************************************/
+/* Slice: r_max:*/
+/* max red value */
+#ifdef ISP_AWB_R_MAX
+#endif /* ISP_AWB_R_MAX */
+/* Slice: r_min:*/
+/* min red value */
+#ifdef ISP_AWB_R_MIN
+#endif /* ISP_AWB_R_MIN */
+/*****************************************************************************/
+/**
+ * register: awb_meas_g_min_max: Min Max Compare Green (0x00000018)
+ *
+ *****************************************************************************/
+/* Slice: g_max:*/
+/* max green value */
+#ifdef ISP_AWB_G_MAX
+#endif /* ISP_AWB_G_MAX */
+/* Slice: g_min:*/
+/* min green value */
+#ifdef ISP_AWB_G_MIN
+#endif /* ISP_AWB_G_MIN */
+/*****************************************************************************/
+/**
+ * register: awb_meas_b_min_max: Min Max Compare Blue (0x0000001c)
+ *
+ *****************************************************************************/
+/* Slice: b_max:*/
+/* max blue value */
+#ifdef ISP_AWB_B_MAX
+#endif /* ISP_AWB_B_MAX */
+/*! Slice: b_min:*/
+/*! min blue value */
+#ifdef ISP_AWB_B_MIN
+#endif /* ISP_AWB_B_MIN */
+/*****************************************************************************/
+/**
+ * register: awb_meas_divider_min: Min Compare Divider (0x00000020)
+ *
+ *****************************************************************************/
+/* Slice: div_min:*/
+/* min divider value unsigned integer with 10 fractional Bits range 0 to 0.999 */
+#ifdef ISP_AWB_DIV_MIN
+#endif /* ISP_AWB_DIV_MIN */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_0: Color conversion coefficient 0 (0x00000024)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_0:*/
+/* coefficient 0 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_0
+#endif /* ISP_AWB_CC_COEFF_0 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_1: Color conversion coefficient 1 (0x00000028)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_1:*/
+/* coefficient 1 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_1
+#endif /* ISP_AWB_CC_COEFF_1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_2: Color conversion coefficient 2 (0x0000002c)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_2:*/
+/* coefficient 2 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_2
+#endif /* ISP_AWB_CC_COEFF_2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_3: Color conversion coefficient 3 (0x00000030)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_3:*/
+/* coefficient 3 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_3
+#endif /* ISP_AWB_CC_COEFF_3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_4: Color conversion coefficient 4 (0x00000034)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_4:*/
+/* coefficient 4 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_4
+#endif /* ISP_AWB_CC_COEFF_4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_5: Color conversion coefficient 5 (0x00000038)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_5:*/
+/* coefficient 5 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_5
+#endif /* ISP_AWB_CC_COEFF_5 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_6: Color conversion coefficient 6 (0x0000003c)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_6:*/
+/* coefficient 6 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_6
+#endif /* ISP_AWB_CC_COEFF_6 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_7: Color conversion coefficient 7 (0x00000040)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_7:*/
+/* coefficient 7 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_7
+#endif /* ISP_AWB_CC_COEFF_7 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_csc_coeff_8: Color conversion coefficient 8 (0x00000044)
+ *
+ *****************************************************************************/
+/* Slice: cc_coeff_8:*/
+/* coefficient 8 for color space conversion */
+#ifdef ISP_AWB_CC_COEFF_8
+#endif /* ISP_AWB_CC_COEFF_8 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_cen_x: Ellipse 1 Center X (0x00000048)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_cen_x:*/
+/* Ellipse 1 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP1_CEN_X
+#endif /* ISP_AWB_ELLIP1_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_cen_y: Ellipse 1 Center Y (0x0000004c)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_cen_y:*/
+/* Ellipse 1 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP1_CEN_Y
+#endif /* ISP_AWB_ELLIP1_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_cen_x: Ellipse 2 Center X (0x00000050)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_cen_x:*/
+/* Ellipse 2 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP2_CEN_X
+#endif /* ISP_AWB_ELLIP2_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_cen_y: Ellipse 2 Center Y (0x00000054)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_cen_y:*/
+/* Ellipse 2 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP2_CEN_Y
+#endif /* ISP_AWB_ELLIP2_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_cen_x: Ellipse 3 Center X (0x00000058)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_cen_x:*/
+/* Ellipse 3 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP3_CEN_X
+#endif /* ISP_AWB_ELLIP3_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_cen_y: Ellipse 3 Center Y (0x0000005c)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_cen_y:*/
+/* Ellipse 3 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP3_CEN_Y
+#endif /* ISP_AWB_ELLIP3_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_cen_x: Ellipse 4 Center X (0x00000060)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_cen_x:*/
+/* Ellipse 4 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP4_CEN_X
+#endif /* ISP_AWB_ELLIP4_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_cen_y: Ellipse 4 Center Y (0x00000064)
+ *
+ *****************************************************************************/
+/* Register: awb_meas_ellip4_cen_y: Ellipse 4 Center Y (0x00000064)*/
+/* Slice: ellip4_cen_y:*/
+/* Ellipse 4 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP4_CEN_Y
+#endif /* ISP_AWB_ELLIP4_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_cen_x: Ellipse 5 Center X (0x00000068)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_cen_x:*/
+/* Ellipse 5 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP5_CEN_X
+#endif /* ISP_AWB_ELLIP5_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_cen_y: Ellipse 5 Center Y (0x0000006c)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_cen_y:*/
+/* Ellipse 5 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP5_CEN_Y
+#endif /* ISP_AWB_ELLIP5_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_cen_x: Ellipse 6 Center X (0x00000070)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_cen_x:*/
+/* Ellipse 6 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP6_CEN_X
+#endif /* ISP_AWB_ELLIP6_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_cen_y: Ellipse 6 Center Y (0x00000074)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_cen_y:*/
+/* Ellipse 6 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP6_CEN_Y
+#endif /* ISP_AWB_ELLIP6_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_cen_x: Ellipse 7 Center X (0x00000078)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_cen_x:*/
+/* Ellipse 7 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP7_CEN_X
+#endif /* ISP_AWB_ELLIP7_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_cen_y: Ellipse 7 Center Y (0x0000007c)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_cen_y:*/
+/* Ellipse 7 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP7_CEN_Y
+#endif /* ISP_AWB_ELLIP7_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_cen_x: Ellipse 8 Center X (0x00000080)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_cen_x:*/
+/* Ellipse 8 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP8_CEN_X
+#endif /* ISP_AWB_ELLIP8_CEN_X */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_cen_y: Ellipse 8 Center Y (0x00000084)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_cen_y:*/
+/* Ellipse 8 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#ifdef ISP_AWB_ELLIP8_CEN_Y
+#endif /* ISP_AWB_ELLIP8_CEN_Y */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_a1: Ellipse 1 coefficient a1 (0x00000088)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_a1:*/
+/* Ellipse 1 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP1_A1
+#endif /* ISP_AWB_ELLIP1_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_a2: Ellipse 1 coefficient a2 (0x0000008c)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_a2:*/
+/* Ellipse 1 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP1_A2
+#endif /* ISP_AWB_ELLIP1_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_a3: Ellipse 1 coefficient a3 (0x00000090)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_a3:*/
+/* Ellipse 1 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP1_A3
+#endif /* ISP_AWB_ELLIP1_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_a4: Ellipse 1 coefficient a4 (0x00000094)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_a4:*/
+/* Ellipse 1 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP1_A4
+#endif /* ISP_AWB_ELLIP1_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_a1: Ellipse 2 coefficient a1 (0x00000098)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP2_A1
+#endif /* ISP_AWB_ELLIP2_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_a2: Ellipse 2 coefficient a2 (0x0000009c)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP2_A2
+#endif /* ISP_AWB_ELLIP2_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_a3: Ellipse 2 coefficient a3 (0x000000a0)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP2_A3
+#endif /* ISP_AWB_ELLIP2_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_a4: Ellipse 2 coefficient a4 (0x000000a4)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP2_A4
+#endif /* ISP_AWB_ELLIP2_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_a1: Ellipse 3 coefficient a1 (0x000000a8)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP3_A1
+#endif /* ISP_AWB_ELLIP3_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_a2: Ellipse 3 coefficient a2 (0x000000ac)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP3_A2
+#endif /* ISP_AWB_ELLIP3_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_a3: Ellipse 3 coefficient a3 (0x000000b0)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP3_A3
+#endif /* ISP_AWB_ELLIP3_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_a4: Ellipse 3 coefficient a4 (0x000000b4)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP3_A4
+#endif /* ISP_AWB_ELLIP3_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_a1: Ellipse 4 coefficient a1 (0x000000b8)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP4_A1
+#endif /* ISP_AWB_ELLIP4_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_a2: Ellipse 4 coefficient a2 (0x000000bc)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP4_A2
+#endif /* ISP_AWB_ELLIP4_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_a3: Ellipse 4 coefficient a3 (0x000000c0)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP4_A3
+#endif /* ISP_AWB_ELLIP4_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_a4: Ellipse 4 coefficient a4 (0x000000c4)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP4_A4
+#endif /* ISP_AWB_ELLIP4_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_a1: Ellipse 5 coefficient a1 (0x000000c8)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP5_A1
+#endif /* ISP_AWB_ELLIP5_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_a2: Ellipse 5 coefficient a2 (0x000000cc)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP5_A2
+#endif /* ISP_AWB_ELLIP5_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_a3: Ellipse 5 coefficient a3 (0x000000d0)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP5_A3
+#endif /* ISP_AWB_ELLIP5_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_a4: Ellipse 5 coefficient a4 (0x000000d4)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP5_A4
+#endif /* ISP_AWB_ELLIP5_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_a1: Ellipse 6 coefficient a1 (0x000000d8)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP6_A1
+#endif /* ISP_AWB_ELLIP6_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_a2: Ellipse 6 coefficient a2 (0x000000dc)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP6_A2
+#endif /* ISP_AWB_ELLIP6_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_a3: Ellipse 6 coefficient a3 (0x000000e0)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP6_A3
+#endif /* ISP_AWB_ELLIP6_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_a4: Ellipse 6 coefficient a4 (0x000000e4)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP6_A4
+#endif /* ISP_AWB_ELLIP6_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_a1: Ellipse 7 coefficient a1 (0x000000e8)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP7_A1
+#endif /* ISP_AWB_ELLIP7_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_a2: Ellipse 7 coefficient a2 (0x000000ec)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP7_A2
+#endif /* ISP_AWB_ELLIP7_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_a3: Ellipse 7 coefficient a3 (0x000000f0)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP7_A3
+#endif /* ISP_AWB_ELLIP7_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_a4: Ellipse 7 coefficient a4 (0x000000f4)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP7_A4
+#endif /* ISP_AWB_ELLIP7_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_a1: Ellipse 8 coefficient a1 (0x000000f8)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_a1:*/
+/* Ellipse 2 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP8_A1
+#endif /* ISP_AWB_ELLIP8_A1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_a2: Ellipse 8 coefficient a2 (0x000000fc)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_a2:*/
+/* Ellipse 2 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP8_A2
+#endif /* ISP_AWB_ELLIP8_A2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_a3: Ellipse 8 coefficient a3 (0x00000100)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_a3:*/
+/* Ellipse 2 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#ifdef ISP_AWB_ELLIP8_A3
+#endif /* ISP_AWB_ELLIP8_A3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_a4: Ellipse 8 coefficient a4 (0x00000104)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_a4:*/
+/* Ellipse 2 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#ifdef ISP_AWB_ELLIP8_A4
+#endif /* ISP_AWB_ELLIP8_A4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip1_rmax: Ellipse 1 r_max (0x00000108)
+ *
+ *****************************************************************************/
+/* Slice: ellip1_rmax:*/
+/* Ellipse 1 max radius square compare value */
+#ifdef ISP_AWB_ELLIP1_RMAX
+#endif /* ISP_AWB_ELLIP1_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip2_rmax: Ellipse 2 r_max (0x0000010c)
+ *
+ *****************************************************************************/
+/* Slice: ellip2_rmax:*/
+/* Ellipse 2 max radius square compare value */
+#ifdef ISP_AWB_ELLIP2_RMAX
+#endif /* ISP_AWB_ELLIP2_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip3_rmax: Ellipse 3 r_max (0x00000110)
+ *
+ *****************************************************************************/
+/* Slice: ellip3_rmax:*/
+/* Ellipse 3 max radius square compare value */
+#ifdef ISP_AWB_ELLIP3_RMAX
+#endif /* ISP_AWB_ELLIP3_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip4_rmax: Ellipse 4 r_max (0x00000114)
+ *
+ *****************************************************************************/
+/* Slice: ellip4_rmax:*/
+/* Ellipse 4 max radius square compare value */
+#ifdef ISP_AWB_ELLIP4_RMAX
+#endif /* ISP_AWB_ELLIP4_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip5_rmax: Ellipse 5 r_max (0x00000118)
+ *
+ *****************************************************************************/
+/* Slice: ellip5_rmax:*/
+/* Ellipse 5 max radius square compare value */
+#ifdef ISP_AWB_ELLIP5_RMAX
+#endif /* ISP_AWB_ELLIP5_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip6_rmax: Ellipse 6 r_max (0x0000011c)
+ *
+ *****************************************************************************/
+/* Slice: ellip6_rmax:*/
+/* Ellipse 6 max radius square compare value */
+#ifdef ISP_AWB_ELLIP6_RMAX
+#endif /* ISP_AWB_ELLIP6_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip7_rmax: Ellipse 7 r_max (0x00000120)
+ *
+ *****************************************************************************/
+/* Slice: ellip7_rmax:*/
+/* Ellipse 7 max radius square compare value */
+#ifdef ISP_AWB_ELLIP7_RMAX
+#endif /* ISP_AWB_ELLIP7_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_ellip8_rmax: Ellipse 8 r_max (0x00000124)
+ *
+ *****************************************************************************/
+/* Slice: ellip8_rmax:*/
+/* Ellipse 8 max radius square compare value */
+#ifdef ISP_AWB_ELLIP8_RMAX
+#endif /* ISP_AWB_ELLIP8_RMAX */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_1: AWB Counter 1 (0x00000128)
+ *
+ *****************************************************************************/
+/* Slice: count_1:*/
+/* counted Pixels of Ellipse 1 */
+#ifdef ISP_AWB_COUNT_1
+#endif /* ISP_AWB_COUNT_1 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_2: AWB Counter 2 (0x0000012c)
+ *
+ *****************************************************************************/
+/* Slice: count_2:*/
+/* counted Pixels of Ellipse 2 */
+#ifdef ISP_AWB_COUNT_2
+#endif /* ISP_AWB_COUNT_2 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_3: AWB Counter 3 (0x00000130)
+ *
+ *****************************************************************************/
+/* Slice: count_3:*/
+/* counted Pixels of Ellipse 3 */
+#ifdef ISP_AWB_COUNT_3
+#endif /* ISP_AWB_COUNT_3 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_4: AWB Counter 4 (0x00000134)
+ *
+ *****************************************************************************/
+/* Slice: count_4:*/
+/* counted Pixels of Ellipse 4 */
+#ifdef ISP_AWB_COUNT_4
+#endif /* ISP_AWB_COUNT_4 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_5: AWB Counter 5 (0x00000138)
+ *
+ *****************************************************************************/
+/* Slice: count_5:*/
+/* counted Pixels of Ellipse 5 */
+#ifdef ISP_AWB_COUNT_5
+#endif /* ISP_AWB_COUNT_5 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_6: AWB Counter 6 (0x0000013c)
+ *
+ *****************************************************************************/
+/* Slice: count_6:*/
+/* counted Pixels of Ellipse 6 */
+#ifdef ISP_AWB_COUNT_6
+#endif /* ISP_AWB_COUNT_6 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_7: AWB Counter 7 (0x00000140)
+ *
+ *****************************************************************************/
+/* Slice: count_7:*/
+/* counted Pixels of Ellipse 7 */
+#ifdef ISP_AWB_COUNT_7
+#endif /* ISP_AWB_COUNT_7 */
+/*****************************************************************************/
+/**
+ * register: awb_meas_counter_8: AWB Counter 8 (0x00000144)
+ *
+ *****************************************************************************/
+/* Slice: count_8:*/
+/* counted Pixels of Ellipse 8 */
+#ifdef ISP_AWB_COUNT_8
+#endif /* ISP_AWB_COUNT_8 */
+/*****************************************************************************/
+/**
+ * register array: awb_meas_accu: AWB Accu Read (0x298 + n*0x4 (n=0..23))
+ *
+ *****************************************************************************/
+/* Slice: read_accu:*/
+/* measured sum[34:3] of RGB values.*/
+#ifdef ISP_AWB_READ_ACCU
+#endif /* ISP_AWB_READ_ACCU */
+#ifdef EE_CTRL_ENABLE
+#define EE_CTRL_ENABLE_SET 1
+#define EE_CTRL_ENABLE_CLEAR 0
+#endif
+/*****************************************************************************/
+/**
+ * register array: awb_meas_accu: AWB Accu Read (0x298 + n*0x4 (n=0..23))
+ *
+ *****************************************************************************/
+/* Slice: read_accu:*/
+/* measured sum[34:3] of RGB values.*/
+#ifdef ISP_VSM_DELTA_H
+#endif /* ISP_AWB_READ_ACCU */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_h_offs: VSM window horizontal offset
+ *
+ *****************************************************************************/
+/* Slice: vsm_h_offset:*/
+/* Horizontal offset in pixels.*/
+#ifdef ISP_VSM_H_OFFSET
+#define ISP_VSM_H_OFFSET_MAX (ISP_VSM_H_OFFSET_MASK >> ISP_VSM_H_OFFSET_SHIFT)
+#endif /* ISP_VSM_H_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_v_offs: VSM window vertical offset
+ *
+ *****************************************************************************/
+/* Slice: vsm_v_offset:*/
+/* Vertical offset in pixels.*/
+#ifdef ISP_VSM_V_OFFSET
+#define ISP_VSM_V_OFFSET_MAX (ISP_VSM_V_OFFSET_MASK >> ISP_VSM_V_OFFSET_SHIFT)
+#endif /* ISP_VSM_V_OFFSET */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_h_size: Horizontal measure window size
+ *
+ *****************************************************************************/
+/* Slice: vsm_h_size:*/
+/* Horizontal size in pixels..*/
+#ifdef ISP_VSM_H_SIZE
+/* note: do not apply shift, since bit 0 is only excluded to get even values */
+#define ISP_VSM_H_SIZE_MAX ISP_VSM_H_SIZE_MASK
+#endif /* ISP_VSM_H_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_v_size: Vertical measure window size
+ *
+ *****************************************************************************/
+/* Slice: vsm_v_size:*/
+/* Vertical size in pixels.*/
+#ifdef ISP_VSM_V_SIZE
+/* note: do not apply shift, since bit 0 is only excluded to get even values */
+#define ISP_VSM_V_SIZE_MAX ISP_VSM_V_SIZE_MASK
+#endif /* ISP_VSM_V_SIZE */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_h_segments: Iteration 1 horizontal segments
+ *
+ *****************************************************************************/
+/* Slice: vsm_h_segments:*/
+/* number of 16 point wide segments enclosed by the first iteration sample */
+/* points in horizontal direction. Range: 1 ... 128 */
+#ifdef ISP_VSM_H_SEGMENTS
+#define ISP_VSM_H_SEGMENTS_MIN   1
+#define ISP_VSM_H_SEGMENTS_MAX 128
+#endif /* ISP_VSM_H_SEGMENTS */
+/*****************************************************************************/
+/**
+ * register: isp_vsm_v_segments: Iteration 1 vertical segments
+ *
+ *****************************************************************************/
+/* Slice: vsm_v_segments:*/
+/* number of 16 point wide segments enclosed by the first iteration sample */
+/* points in vertical direction. Range: 1 ... 128 */
+/* Note: number of 1st iteration sample points = vsm_v_segments + 1.*/
+/* vsm_v_segments must be equal or smaller than vsm_h_segments.*/
+#ifdef ISP_VSM_V_SEGMENTS
+#define ISP_VSM_V_SEGMENTS_MIN   1
+#define ISP_VSM_V_SEGMENTS_MAX 128
+#endif /* ISP_VSM_V_SEGMENTS */
+#ifdef ISP_GCMONO
+/*****************************************************************************/
+/**
+ * register: isp_gcmono_ctrl: gcmono enable and lut table cfg
+ *
+ *****************************************************************************/
+/*! Slice: mono_gc_enable */
+/*! Control of gamma correction for mono sensor RAW data */
+/*! 1'b0: disable GC and enter bypass mode */
+/*! 1'b1: enable GC mode */
+#ifdef ISP_GCMONO_SWITCH
+#define ISP_GCMONO_SWITCH_DISABLE 0	/* 0: disable GC */
+#define ISP_GCMONO_SWITCH_ENABLE  1	/* 1: enable GC */
+#endif
+/*! Slice: mono_gc_cfg_done */
+/*! To notify the ISP HW the LUT configuration is done, ready to use, active high.*/
+/*! Writing ZERO reset teh internal read/write pointer and also indicates that the LUT can be configured or read from CPU.*/
+#ifdef ISP_GCMONO_CFG_DONE
+#define ISP_GCMONO_CFG_DONE_CURVE_READY     1	/* 1: notify ISP HW LUT configuration is done */
+#define ISP_GCMONO_CFG_DONE_SET_CURVE       0	/* 0: Write ZERO reset the internal pointer and can cfg LUT. */
+#endif
+#ifdef ISP_GCMONO_PARA_BASE
+#endif
+#endif
+/*****************************************************************************/
+/* MIV2 Registers                                                            */
+/*****************************************************************************/
+/*****************************************************************************/
+/**
+ * register: miv2_mp_fmt: main path pixel format control register (0x1314)
+ *
+ *****************************************************************************/
+// Slice: MP_WR_JDP_FMT
+// 1: JPEG
+// 0: DPCC
+#ifdef MP_WR_JDP_FMT
+#define MIV2_MP_WRITE_FORMAT_DPCC			0	//DPCC
+#define MIV2_MP_WRITE_FORMAT_JPEG			1	//JPEG
+#endif /* MP_WR_JDP_FMT */
+// Slice: MP_WR_YUV_BIT:
+// 1: 10bit YUV/RGB
+// 0: 8bit YUV/RGB
+#ifdef MP_WR_YUV_BIT
+#define MIV2_MP_WRITE_FORMAT_8BIT			0	//8bit YUV/RGB
+#define MIV2_MP_WRITE_FORMAT_10BIT			1	//10bit YUV/RGB
+#endif /* MP_WR_YUV_BIT */
+// Slice: MP_WR_YUV_FMT:
+#ifdef MP_WR_YUV_FMT
+#define MIV2_MP_WRITE_FORMAT_YUV420         0	// 00: YUV420
+#define MIV2_MP_WRITE_FORMAT_YUV422         1	// 01: YUV422
+#define MIV2_MP_WRITE_FORMAT_YUV444         2	// 10: YUV444
+#endif /* MP_WR_YUV_FMT */
+// Slice: MP_WR_YUV_STR:
+#ifdef MP_WR_YUV_STR
+#define MIV2_MP_WRITE_STRIDE_SEMIPLANAR     0	// 00: YUV/RGB SemiPlanar
+#define MIV2_MP_WRITE_STRIDE_INTERLEAVE     1	// 01: YUV Interleave, RGB Raster
+#define MIV2_MP_WRITE_STRIDE_PLANAR         2	// 10: YUV/RGB Planar
+#endif /* MP_WR_YUV_STR */
+// Slice: MP_WR_RAW_BIT:
+#ifdef MP_WR_RAW_BIT
+#define MIV2_MP_WRITE_FORMAT_RAW8          	0	// 000: RAW8
+#define MIV2_MP_WRITE_FORMAT_RAW10         	1	// 001: RAW10
+#define MIV2_MP_WRITE_FORMAT_RAW12          2	// 010: RAW12
+#define MIV2_MP_WRITE_FORMAT_RAW14         	3	// 011: RAW14
+#define MIV2_MP_WRITE_FORMAT_RAW16          4	// 100: RAW16
+#define MIV2_MP_WRITE_FORMAT_RAW20         	5	// 101: RAW20
+#endif /* MP_WR_RAW_BIT */
+// Slice: MP_WR_YUV_ALIGNED
+// 1: aligned
+// 0: unaligned
+#ifdef MP_WR_YUV_ALIGNED
+#define MIV2_MP_WRITE_YUV_UNALIGNED			0	//unaligned
+#define MIV2_MP_WRITE_YUV_ALIGNED			1	//aligned
+#endif /* MP_WR_YUV_ALIGNED */
+// Slice: MP_WR_RAW_ALIGNED:
+#ifdef MP_WR_RAW_ALIGNED
+#define MIV2_MP_WRITE_RAW_UNALIGNED     	0	// 00: unaligned
+#define MIV2_MP_WRITE_RAW_ALIGNED_MODE1     1	// 01: aligned mode1
+#define MIV2_MP_WRITE_RAW_ALIGNED_MODE2     2	// 10: aligned mode2
+#endif /* MP_WR_RAW_ALIGNED */
+// Slice: MP_WR_YUV_NV21
+// 1: Put U before V
+// 0: Put V before U
+#ifdef MP_WR_YUV_NV21
+#define MIV2_MP_WRITE_YUV_NV21_UV			0	//Put U before V
+#define MIV2_MP_WRITE_YUV_NV21_VU			1	//Put V before U
+#endif /* MP_WR_YUV_NV21 */
+// Slice: MP_WR_YUV_NVY:
+#ifdef MP_WR_YUV_NVY
+#define MIV2_MP_WRITE_YUV_NVY_YC1C2     	0	// 00: Put Y first => YC1C2
+#define MIV2_MP_WRITE_YUV_NVY_C1YC2     	1	// 01: Put Y second => C1YC2
+#define MIV2_MP_WRITE_YUV_NVY_C1C2Y	     	2	// 10: Put Y Third => C1C2Y
+#endif /* MP_WR_YUV_NVY */
+// =========================================================================================
+#ifdef ISP_DEMOSAIC_DENOISE_STRENGTH
+#define ISP_DEMOSAIC_DENOISE_STRENGTH_MIN   0
+#define ISP_DEMOSAIC_DENOISE_STRENGTH_MAX 32
+#endif
+#ifdef ISP_DEMOSAIC_SHARPEN_SIZE
+#define ISP_DEMOSAIC_SHARPEN_SIZE_MIN   0
+#define ISP_DEMOSAIC_SHARPEN_SIZE_MAX 16
+#endif
+#ifdef ISP_DMSC_DEMOIRE_AREA_THR
+#define ISP_DMSC_DEMOIRE_AREA_THR_MIN   0
+#define ISP_DMSC_DEMOIRE_AREA_THR_MAX 32
+#endif
+#ifdef ISP_DMSC_DEMOIRE_SAT_SHRINK
+#define ISP_DMSC_DEMOIRE_SAT_SHRINK_MIN   0
+#define ISP_DMSC_DEMOIRE_SAT_SHRINK_MAX 32
+#endif
+#ifdef ISP_DMSC_SHARPEN_T4_SHIFT
+#define ISP_DMSC_SHARPEN_SHIFT_MIN   0
+#define ISP_DMSC_SHARPEN_SHIFT_MAX 11
+#endif
+#ifdef ISP_DMSC_SHARPEN_LINE_SHIFT1
+#define ISP_DMSC_SHARPEN_LINE_SHIFT1_MIN   0
+#define ISP_DMSC_SHARPEN_LINE_SHIFT1_MAX   10
+#endif
+#ifdef ISP_DMSC_HF_FILT_00
+#define ISP_DMSC_HF_FILT_MIN   0
+#define ISP_DMSC_HF_FILT_MAX 34
+#endif
+#ifdef ISP_DMSC_CBCR_MODE
+#define ISP_DMSC_CBCR_MODE_MIN   0
+#define ISP_DMSC_CBCR_MODE_MAX 3
+#endif
+#ifdef ISP_DMSC_DEPURPLE_SAT_SHRINK
+#define ISP_DMSC_DEPURPLE_SAT_SHRINK_MIN 0
+#define ISP_DMSC_DEPURPLE_SAT_SHRINK_MAX 8
+#endif
+#ifdef ISP_DMSC_X_NF
+#define ISP_DMSC_X_NF_MIN   0
+#define ISP_DMSC_X_NF_MAX 31
+#endif
+#ifdef ISP_DMSC_X_NS
+#define ISP_DMSC_X_NS_MIN   0
+#define ISP_DMSC_X_NS_MAX 15
+#endif
+#ifdef ISP_DMSC_Y_NF
+#define ISP_DMSC_Y_NF_MIN   0
+#define ISP_DMSC_Y_NF_MAX 31
+#endif
+#ifdef ISP_DMSC_Y_NS
+#define ISP_DMSC_Y_NS_MIN   0
+#define ISP_DMSC_Y_NS_MAX 15
+#endif
+/* =========================================================================================*/
+/*! returns the value of slice \a name from register or variable \a reg
+ * \note "parameter" \a reg could be a hardware register or a (32bit) variable, but not a pointer! \n
+ *       each slice (specified as "parameter" \a name) requires two \#defines: \n
+ *        - <tt>\<name\>_MASK  </tt>: defines the mask to use on register side
+ *        - <tt>\<name\>_SHIFT </tt>: defines the shift value to use (left on write, right on read)
+ */
+#define REG_GET_SLICE(reg, name) \
+    (((reg) & (name##_MASK)) >> (name##_SHIFT))
+/* =========================================================================================*/
+/*! writes the value \a value into slice \a name of register or variable \a reg
+ * \note "parameter" \a reg could be a hardware register or a (32bit) variable, but not a pointer! \n
+ *       each slice (specified as "parameter" \a name) requires two \#defines: \n
+ *        - <tt>\<name\>_MASK  </tt>: defines the mask to use on register side
+ *        - <tt>\<name\>_SHIFT </tt>: defines the shift value to use (left on write, right on read)
+ */
+#define REG_SET_SLICE(reg, name, value) \
+    { \
+	((reg) = (((reg) & ~(name##_MASK)) | (((value) << (name##_SHIFT)) & (name##_MASK))));\
+    }
+#endif /* __MRV_ALL_BITS_H__ */

+ 20364 - 0
vvcam/isp/mrv_all_regs.h

@@ -0,0 +1,20364 @@
+/*****************************************************************************
+ *
+ * Copyright 2013, Dream Chip Technologies GmbH. All rights reserved.
+ *
+ ****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+/*
+* NOTE: This file is automaticaly generated by sig of theflow Rev.: 1.1_dev_koehler.
+*       Modifications can be lost.
+*
+*****************************************************************************/
+/**
+*-----------------------------------------------------------------------------
+* $HeadURL$
+* $Author$
+* $Rev$
+* $Date$
+*-----------------------------------------------------------------------------
+* @file mrv_all_regs.h
+*
+* <pre>
+*
+* Description:
+*   This header file exports the module register structure and masks.
+*	It should not be included directly by your driver/application, it will be
+*   exported by the <TOP>_regs_io.h header file.
+*
+* </pre>
+*/
+/*****************************************************************************/
+
+#ifndef _MRV_ALL_REGS_H
+#define _MRV_ALL_REGS_H
+
+/* Definitions of block register sizes */
+#define DEGAMMA_R_Y_BLOCK_ARR_SIZE 17
+#define DEGAMMA_G_Y_BLOCK_ARR_SIZE 17
+#define DEGAMMA_B_Y_BLOCK_ARR_SIZE 17
+#define CROSS_TALK_COEF_BLOCK_ARR_SIZE 9
+#define GAMMA_OUT_Y_BLOCK_ARR_SIZE 17
+#define HISTOGRAM_MEASUREMENT_RESULT_ARR_SIZE 16
+#define NLF_LOOKUP_TABLE_BLOCK_ARR_SIZE 17
+#define WDR_TONE_MAPPING_CURVE_Y_BLOCK_ARR_SIZE 33
+#define WDR_TONE_MAPPING_CURVE_Y_SHD_BLOCK_ARR_SIZE 33
+#define AWB_MEAS_ACCU_ARR_SIZE 24
+#define ISP64_HISTOGRAM_MEASUREMENT_RESULT_ARR_SIZE 32
+#define ISP_HDREXP_MEASUREMENT_RESULT_ARR_SIZE 25
+
+/*! degamma_r_y_block register layout */
+typedef struct {
+	uint32_t isp_gamma_r_y;	/*!< De-Gamma Curve definition y red (rw) MRV_ISP_BASE + 0x448 + (n*0x4) (n=0..16) */
+} degamma_r_y_block_t;
+
+/*! degamma_g_y_block register layout */
+typedef struct {
+	uint32_t isp_gamma_g_y;	/*!< De-Gamma Curve definition y green (rw) MRV_ISP_BASE + 0x490 + (n*0x4) (n=0..16) */
+} degamma_g_y_block_t;
+
+/*! degamma_b_y_block register layout */
+typedef struct {
+	uint32_t isp_gamma_b_y;	/*!< De-Gamma Curve definition y blue (rw) MRV_ISP_BASE + 0x4D8 + (n*0x4) (n=0..16) */
+} degamma_b_y_block_t;
+
+/*! cross_talk_coef_block register layout */
+typedef struct {
+	uint32_t isp_ct_coeff;	/*!< cross-talk configuration register (color correction matrix) (rw) MRV_ISP_BASE + 0x7A0 + (n*0x4) (n=0..8) */
+} cross_talk_coef_block_t;
+
+/*! gamma_out_y_block register layout */
+typedef struct {
+	uint32_t isp_gamma_out_y;	/*!< Gamma Out Curve definition y_ (rw) MRV_ISP_BASE + 0x7F0 + (n*0x4) (n=0..16) */
+} gamma_out_y_block_t;
+
+/*! histogram_measurement_result register layout */
+typedef struct {
+	uint32_t isp_hist_bin;	/*!< histogram measurement result bin (r) MRV_HIST_BASE + 0x2428 + (n*0x4) (n=0..15) */
+} histogram_measurement_result_t;
+
+/*! nlf_lookup_table_block register layout */
+typedef struct {
+	uint32_t isp_dpf_nll_coeff;	/*!< Noise Level Lookup Coefficient (rw) MRV_DPF_BASE + 0x2840 + (n*0x4) (n=0..16) */
+} nlf_lookup_table_block_t;
+
+/*! wdr_tone_mapping_curve_y_block register layout */
+typedef struct {
+	uint32_t isp_wdr_tonecurve_ym;	/*!< Tonemapping curve coefficient Ym_ (rw) MRV_WDR_BASE + 0x2A28 + (n*0x4) (n=0..32) */
+} wdr_tone_mapping_curve_y_block_t;
+
+/*! wdr_tone_mapping_curve_y_shd_block register layout */
+typedef struct {
+	uint32_t isp_wdr_tonecurve_ym_shd;	/*!< Tonemapping curve coefficient shadow register (r) MRV_WDR_BASE + 0x2B60 + (n*0x4) (n=0..32) */
+} wdr_tone_mapping_curve_y_shd_block_t;
+
+/*! AWB_MEAS_ACCU register layout */
+typedef struct {
+	uint32_t awb_meas_accu;	/*!< AWB Accu Read (r) ISP_AWB_BASE + 0x2E90 + (n*0x4) (n=0..23) */
+} AWB_MEAS_ACCU_t;
+
+/*! isp64_histogram_measurement_result register layout */
+typedef struct {
+	uint32_t isp64_hist_bin;	/*!< histogram measurement result bin (sh_r) MRV_HIST_BASE + 0x2EA8 + (n*0x4) (n=0..31) */
+} isp64_histogram_measurement_result_t;
+
+typedef struct {
+	uint32_t x, y;
+} elawb_ellipse_pt;
+
+typedef struct {
+	uint32_t a1, a2, a3, a4;
+} elawb_ellipse_axis;
+
+/*! MrvAll Register layout */
+typedef struct {
+	uint32_t vi_ccl;	/*!< Clock control register (rw) MRV_BASE + 0x00000000 */
+	uint32_t _notused_0[(0x00000008 - 0x00000004) / 4];	/* gap in address space */
+	uint32_t vi_id;		/*!< Revision identification register (r) MRV_BASE + 0x00000008 */
+	uint32_t _notused_1[(0x00000010 - 0x0000000c) / 4];	/* gap in address space */
+	uint32_t vi_iccl;	/*!< Internal clock  control register (rw) MRV_BASE + 0x00000010 */
+	uint32_t vi_ircl;	/*!< Internal reset control register (rw) MRV_BASE + 0x00000014 */
+	uint32_t vi_dpcl;	/*!< Data path control register (rw) MRV_BASE + 0x00000018 */
+	uint32_t _notused_2[(0x00000200 - 0x0000001c) / 4];	/* gap in address space */
+	uint32_t img_eff_ctrl;	/*!< Global control register (rw) MRV_IMGEFF_BASE + 0x00000000 */
+	uint32_t img_eff_color_sel;	/*!< Color selection register (for color selection effect) (rw) MRV_IMGEFF_BASE + 0x00000004 */
+	uint32_t img_eff_mat_1;	/*!< 3x3 matrix coefficients for emboss effect (1) (rw) MRV_IMGEFF_BASE + 0x00000008 */
+	uint32_t img_eff_mat_2;	/*!< 3x3 matrix coefficients for emboss effect (2) (rw) MRV_IMGEFF_BASE + 0x0000000c */
+	uint32_t img_eff_mat_3;	/*!< 3x3 matrix coefficients for emboss(3) effect / sketch/sharpen(1) effect (rw) MRV_IMGEFF_BASE + 0x00000010 */
+	uint32_t img_eff_mat_4;	/*!< 3x3 matrix coefficients for sketch/sharpen effect (2) (rw) MRV_IMGEFF_BASE + 0x00000014 */
+	uint32_t img_eff_mat_5;	/*!< 3x3 matrix coefficients for sketch/sharpen effect (3) (rw) MRV_IMGEFF_BASE + 0x00000018 */
+	uint32_t img_eff_tint;	/*!< Chrominance increment values of a tint (used for sepia effect) (rw) MRV_IMGEFF_BASE + 0x0000001c */
+	uint32_t img_eff_ctrl_shd;	/*!< Shadow register for control register (r) MRV_IMGEFF_BASE + 0x00000020 */
+	uint32_t img_eff_sharpen;	/*!< Factor and threshold for sharpen effect (rw) MRV_IMGEFF_BASE + 0x00000024 */
+	uint32_t _notused_3[(0x00000300 - 0x00000228) / 4];	/* gap in address space */
+	uint32_t super_imp_ctrl;	/*!< Global control register (rw) MRV_SI_BASE + 0x00000000 */
+	uint32_t super_imp_offset_x;	/*!< Offset x register (rw) MRV_SI_BASE + 0x00000004 */
+	uint32_t super_imp_offset_y;	/*!< Offset y register (rw) MRV_SI_BASE + 0x00000008 */
+	uint32_t super_imp_color_y;	/*!< Y component of transparent key color (rw) MRV_SI_BASE + 0x0000000c */
+	uint32_t super_imp_color_cb;	/*!< Cb component of transparent key color (rw) MRV_SI_BASE + 0x00000010 */
+	uint32_t super_imp_color_cr;	/*!< Cr component of transparent key color (rw) MRV_SI_BASE + 0x00000014 */
+	uint32_t _notused_4[(0x00000400 - 0x00000318) / 4];	/* gap in address space */
+	uint32_t isp_ctrl;	/*!< global control register (rw) MRV_ISP_BASE + 0x00000000 */
+	uint32_t isp_acq_prop;	/*!< ISP acquisition properties (rw) MRV_ISP_BASE + 0x00000004 */
+	uint32_t isp_acq_h_offs;	/*!< horizontal input offset (rw) MRV_ISP_BASE + 0x00000008 */
+	uint32_t isp_acq_v_offs;	/*!< vertical input offset (rw) MRV_ISP_BASE + 0x0000000c */
+	uint32_t isp_acq_h_size;	/*!< horizontal input size (rw) MRV_ISP_BASE + 0x00000010 */
+	uint32_t isp_acq_v_size;	/*!< vertical input size (rw) MRV_ISP_BASE + 0x00000014 */
+	uint32_t isp_acq_nr_frames;	/*!< Number of frames to be captured (rw) MRV_ISP_BASE + 0x00000018 */
+	uint32_t isp_gamma_dx_lo;	/*!< De-Gamma Curve definition lower x increments (sampling points) (rw) MRV_ISP_BASE + 0x0000001c */
+	uint32_t isp_gamma_dx_hi;	/*!< De-Gamma Curve definition higher x increments (sampling points) (rw) MRV_ISP_BASE + 0x00000020 */
+	degamma_r_y_block_t degamma_r_y_block_arr[DEGAMMA_R_Y_BLOCK_ARR_SIZE];	/*!< degamma_r_y_block MRV_ISP_BASE + 36 + (n*0x4) (n=0..16) */
+	degamma_g_y_block_t degamma_g_y_block_arr[DEGAMMA_G_Y_BLOCK_ARR_SIZE];	/*!< degamma_g_y_block MRV_ISP_BASE + 104 + (n*0x4) (n=0..16) */
+	degamma_b_y_block_t degamma_b_y_block_arr[DEGAMMA_B_Y_BLOCK_ARR_SIZE];	/*!< degamma_b_y_block MRV_ISP_BASE + 172 + (n*0x4) (n=0..16) */
+	uint32_t isp_dgain_rb;	/*!<  (rw) MRV_ISP_BASE + 0x000000f0 */
+	uint32_t isp_dgain_g;	/*!< (rw) MRV_ISP_BASE + 0x000000f4 */
+	uint32_t _notused_5[(0x00000510 - 0x000004f8) / 4];	/* gap in address space */
+	uint32_t isp_awb_prop;	/*!< Auto white balance properties (rw) MRV_ISP_BASE + 0x00000110 */
+	uint32_t isp_awb_h_offs;	/*!< Auto white balance horizontal offset of measure window (rw) MRV_ISP_BASE + 0x00000114 */
+	uint32_t isp_awb_v_offs;	/*!< Auto white balance vertical offset of measure window (rw) MRV_ISP_BASE + 0x00000118 */
+	uint32_t isp_awb_h_size;	/*!< Auto white balance horizontal window size (rw) MRV_ISP_BASE + 0x0000011c */
+	uint32_t isp_awb_v_size;	/*!< Auto white balance vertical window size (rw) MRV_ISP_BASE + 0x00000120 */
+	uint32_t isp_awb_frames;	/*!< Auto white balance mean value over multiple frames (rw) MRV_ISP_BASE + 0x00000124 */
+	uint32_t isp_awb_ref;	/*!< Auto white balance reference Cb/Cr values (rw) MRV_ISP_BASE + 0x00000128 */
+	uint32_t isp_awb_thresh;	/*!< Auto white balance threshold values (rw) MRV_ISP_BASE + 0x0000012c */
+	uint32_t _notused_6[(0x00000538 - 0x00000530) / 4];	/* gap in address space */
+	uint32_t isp_awb_gain_g;	/*!< Auto white balance gain green (rw) MRV_ISP_BASE + 0x00000138 */
+	uint32_t isp_awb_gain_rb;	/*!< Auto white balance gain red and blue (rw) MRV_ISP_BASE + 0x0000013c */
+	uint32_t isp_awb_white_cnt;	/*!< Auto white balance white pixel count (r) MRV_ISP_BASE + 0x00000140 */
+	uint32_t isp_awb_mean;	/*!< Auto white balance measured mean value (r) MRV_ISP_BASE + 0x00000144 */
+	uint32_t _notused_7[(0x00000570 - 0x00000548) / 4];	/* gap in address space */
+	uint32_t isp_cc_coeff_0;	/*!< Color conversion coefficient 0 (rw) MRV_ISP_BASE + 0x00000170 */
+	uint32_t isp_cc_coeff_1;	/*!< Color conversion coefficient 1 (rw) MRV_ISP_BASE + 0x00000174 */
+	uint32_t isp_cc_coeff_2;	/*!< Color conversion coefficient 2 (rw) MRV_ISP_BASE + 0x00000178 */
+	uint32_t isp_cc_coeff_3;	/*!< Color conversion coefficient 3 (rw) MRV_ISP_BASE + 0x0000017c */
+	uint32_t isp_cc_coeff_4;	/*!< Color conversion coefficient 4 (rw) MRV_ISP_BASE + 0x00000180 */
+	uint32_t isp_cc_coeff_5;	/*!< Color conversion coefficient 5 (rw) MRV_ISP_BASE + 0x00000184 */
+	uint32_t isp_cc_coeff_6;	/*!< Color conversion coefficient 6 (rw) MRV_ISP_BASE + 0x00000188 */
+	uint32_t isp_cc_coeff_7;	/*!< Color conversion coefficient 7 (rw) MRV_ISP_BASE + 0x0000018c */
+	uint32_t isp_cc_coeff_8;	/*!< Color conversion coefficient 8 (rw) MRV_ISP_BASE + 0x00000190 */
+	uint32_t isp_out_h_offs;	/*!< Horizontal offset of output window (rw) MRV_ISP_BASE + 0x00000194 */
+	uint32_t isp_out_v_offs;	/*!< Vertical offset of output window (rw) MRV_ISP_BASE + 0x00000198 */
+	uint32_t isp_out_h_size;	/*!< Output horizontal picture size (rw) MRV_ISP_BASE + 0x0000019c */
+	uint32_t isp_out_v_size;	/*!< Output vertical picture size (rw) MRV_ISP_BASE + 0x000001a0 */
+	uint32_t isp_demosaic;	/*!< Demosaic parameters (rw) MRV_ISP_BASE + 0x000001a4 */
+	uint32_t isp_flags_shd;	/*!< Flags (current status) of certain signals and Shadow regs for enable signals (r) MRV_ISP_BASE + 0x000001a8 */
+	uint32_t isp_out_h_offs_shd;	/*!< current horizontal offset of output window (shadow register) (r) MRV_ISP_BASE + 0x000001ac */
+	uint32_t isp_out_v_offs_shd;	/*!< current vertical offset of output window (shadow register) (r) MRV_ISP_BASE + 0x000001b0 */
+	uint32_t isp_out_h_size_shd;	/*!< current output horizontal picture size (shadow register) (r) MRV_ISP_BASE + 0x000001b4 */
+	uint32_t isp_out_v_size_shd;	/*!< current output vertical picture size (shadow register) (r) MRV_ISP_BASE + 0x000001b8 */
+	uint32_t isp_imsc;	/*!< Interrupt mask (rw) MRV_ISP_BASE + 0x000001bc */
+	uint32_t isp_ris;	/*!< Raw interrupt status (r) MRV_ISP_BASE + 0x000001c0 */
+	uint32_t isp_mis;	/*!< Masked interrupt status (r) MRV_ISP_BASE + 0x000001c4 */
+	uint32_t isp_icr;	/*!< Interrupt clear register (w) MRV_ISP_BASE + 0x000001c8 */
+	uint32_t isp_isr;	/*!< Interrupt set register (w) MRV_ISP_BASE + 0x000001cc */
+	cross_talk_coef_block_t cross_talk_coef_block_arr[CROSS_TALK_COEF_BLOCK_ARR_SIZE];	/*!< cross_talk_coef_block MRV_ISP_BASE + 464 + (n*0x4) (n=0..8) */
+	uint32_t isp_gamma_out_mode;	/*!< gamma segmentation mode register for output gamma (rw) MRV_ISP_BASE + 0x000001f4 */
+	gamma_out_y_block_t gamma_out_y_block_arr[GAMMA_OUT_Y_BLOCK_ARR_SIZE];	/*!< gamma_out_y_block MRV_ISP_BASE + 504 + (n*0x4) (n=0..16) */
+	uint32_t isp_err;	/*!< ISP error register (r) MRV_ISP_BASE + 0x0000023c */
+	uint32_t isp_err_clr;	/*!< ISP error clear register (w) MRV_ISP_BASE + 0x00000240 */
+	uint32_t isp_frame_count;	/*!< Frame counter (r) MRV_ISP_BASE + 0x00000244 */
+	uint32_t isp_ct_offset_r;	/*!< cross-talk offset red (rw) MRV_ISP_BASE + 0x00000248 */
+	uint32_t isp_ct_offset_g;	/*!< cross-talk offset green (rw) MRV_ISP_BASE + 0x0000024c */
+	uint32_t isp_ct_offset_b;	/*!< cross-talk offset blue (rw) MRV_ISP_BASE + 0x00000250 */
+	uint32_t isp_cnr_linesize;	/*!< chroma noise reduction line size (rw) MRV_ISP_BASE + 0x00000254 */
+	uint32_t isp_cnr_threshold_c1;	/*!< chroma noise reduction C1 Threshold (rw) MRV_ISP_BASE + 0x00000258 */
+	uint32_t isp_cnr_threshold_c2;	/*!< chroma noise reduction C2 Threshold (rw) MRV_ISP_BASE + 0x0000025c */
+	uint32_t isp_flash_cmd;	/*!< Flash command (w) MRV_FLASH_BASE + 0x00000000 */
+	uint32_t isp_flash_config;	/*!< Flash config (rw) MRV_FLASH_BASE + 0x00000004 */
+	uint32_t isp_flash_prediv;	/*!< Flash Counter Pre-Divider (rw) MRV_FLASH_BASE + 0x00000008 */
+	uint32_t isp_flash_delay;	/*!< Flash Delay (rw) MRV_FLASH_BASE + 0x0000000c */
+	uint32_t isp_flash_time;	/*!< Flash time (rw) MRV_FLASH_BASE + 0x00000010 */
+	uint32_t isp_flash_maxp;	/*!< Maximum value for flash or preflash (rw) MRV_FLASH_BASE + 0x00000014 */
+	uint32_t _notused_8[(0x00000680 - 0x00000678) / 4];	/* gap in address space */
+	uint32_t isp_sh_ctrl;	/*!< mechanical shutter control (rw) MRV_SHUT_BASE + 0x00000000 */
+	uint32_t isp_sh_prediv;	/*!< Mech. Shutter Counter Pre-Divider (rw) MRV_SHUT_BASE + 0x00000004 */
+	uint32_t isp_sh_delay;	/*!< Delay register (rw) MRV_SHUT_BASE + 0x00000008 */
+	uint32_t isp_sh_time;	/*!< Time register (rw) MRV_SHUT_BASE + 0x0000000c */
+
+	/* TPG */
+	uint32_t _notused_pre_tpg[(0x00000700 - 0x00000690) / 4];	/* gap in address space */
+
+	uint32_t isp_tpg_ctrl;	/*!<(rw), 0x00000700 */
+	uint32_t isp_tpg_total_in;	/*!<(rw), 0x00000704 */
+	uint32_t isp_tpg_act_in;	/*!<(rw), 0x00000708 */
+	uint32_t isp_tpg_fp_in;	/*!<(rw), 0x0000070C */
+	uint32_t isp_tpg_bp_in;	/*!<(rw), 0x00000710 */
+	uint32_t isp_tpg_w_in;	/*!<(rw), 0x00000714 */
+	uint32_t isp_tpg_gap_in;	/*!<(rw), 0x00000718 */
+	uint32_t isp_tpg_gap_std_in;	/*!<(rw), 0x0000071C */
+	uint32_t isp_tpg_random_seed;	/*!<(rw), 0x00000720 */
+	uint32_t _notused_mid_tpg1[(0x00000730 - 0x00000724) / 4];	/* gap in address space */
+	uint32_t isp_vsync_delay;	/*!<(rw), 0x00000730 */
+	uint32_t _notused_mid_tpg2[(0x00000750 - 0x00000734) / 4];	/* gap in address space */
+	uint32_t green_equilibrate_ctrl;	/*!<(rw), 0x00000750 */
+	uint32_t green_equilibrate_hcnt_dummy;	/*!<(rw), 0x00000754 */
+	uint32_t green_equilibrate_ctrl_shd;	/*!<(rw), 0x00000758 */
+
+	uint32_t _notused_after_tpg[(0x00000800 - 0x0000075c) / 4];	/* gap in address space */
+	/* uint32_t _notused_9[(0x00000800-0x00000690)/4];  gap in address space */
+
+	uint32_t cproc_ctrl;	/*!< Global control register (rw) MRV_CPROC_BASE + 0x00000000 */
+	uint32_t cproc_contrast;	/*!< Color Processing contrast register (rw) MRV_CPROC_BASE + 0x00000004 */
+	uint32_t cproc_brightness;	/*!< Color Processing brightness register (rw) MRV_CPROC_BASE + 0x00000008 */
+	uint32_t cproc_saturation;	/*!< Color Processing saturation register (rw) MRV_CPROC_BASE + 0x0000000c */
+	uint32_t cproc_hue;	/*!< Color Processing hue register (rw) MRV_CPROC_BASE + 0x00000010 */
+#ifdef ISP_RGBGC
+	uint32_t _notused_10_0[(0x00000900 - 0x00000814) / 4];	/* gap in address space */
+	uint32_t isp_gcrgb_r_px_0;	/*!<Gamma Correction for rgb register 0x00000900 */
+	uint32_t isp_gcrgb_r_px_1;	/*!<Gamma Correction for rgb register 0x00000904 */
+	uint32_t isp_gcrgb_r_px_2;	/*!<Gamma Correction for rgb register 0x00000908 */
+	uint32_t isp_gcrgb_r_px_3;	/*!<Gamma Correction for rgb register 0x0000090C */
+	uint32_t isp_gcrgb_r_px_4;	/*!<Gamma Correction for rgb register 0x00000910 */
+	uint32_t isp_gcrgb_r_px_5;	/*!<Gamma Correction for rgb register 0x00000914 */
+	uint32_t isp_gcrgb_r_px_6;	/*!<Gamma Correction for rgb register 0x00000918 */
+	uint32_t isp_gcrgb_r_px_7;	/*!<Gamma Correction for rgb register 0x0000091C */
+	uint32_t isp_gcrgb_r_px_8;	/*!<Gamma Correction for rgb register 0x00000920 */
+	uint32_t isp_gcrgb_r_px_9;	/*!<Gamma Correction for rgb register 0x00000924 */
+	uint32_t isp_gcrgb_r_px_10;	/*!<Gamma Correction for rgb register 0x00000928 */
+	uint32_t isp_gcrgb_r_y_addr;	/*!<Gamma Correction for rgb register 0x0000092C */
+	uint32_t isp_gcrgb_r_y_write_data;	/*!<Gamma Correction for rgb register 0x00000930 */
+	uint32_t isp_gcrgb_r_x_addr;	/*!<Gamma Correction for rgb register 0x00000934 */
+	uint32_t isp_gcrgb_r_x_write_data;	/*!<Gamma Correction for rgb register 0x00000938 */
+	uint32_t _notused_10_1;	/* gap in address space */
+	uint32_t isp_gcrgb_g_px_0;	/*!<Gamma Correction for rgb register 0x00000940 */
+	uint32_t isp_gcrgb_g_px_1;	/*!<Gamma Correction for rgb register 0x00000944 */
+	uint32_t isp_gcrgb_g_px_2;	/*!<Gamma Correction for rgb register 0x00000948 */
+	uint32_t isp_gcrgb_g_px_3;	/*!<Gamma Correction for rgb register 0x0000094C */
+	uint32_t isp_gcrgb_g_px_4;	/*!<Gamma Correction for rgb register 0x00000950 */
+	uint32_t isp_gcrgb_g_px_5;	/*!<Gamma Correction for rgb register 0x00000954 */
+	uint32_t isp_gcrgb_g_px_6;	/*!<Gamma Correction for rgb register 0x00000958 */
+	uint32_t isp_gcrgb_g_px_7;	/*!<Gamma Correction for rgb register 0x0000095C */
+	uint32_t isp_gcrgb_g_px_8;	/*!<Gamma Correction for rgb register 0x00000960 */
+	uint32_t isp_gcrgb_g_px_9;	/*!<Gamma Correction for rgb register 0x00000964 */
+	uint32_t isp_gcrgb_g_px_10;	/*!<Gamma Correction for rgb register 0x00000968 */
+	uint32_t isp_gcrgb_g_y_addr;	/*!<Gamma Correction for rgb register 0x0000096C */
+	uint32_t isp_gcrgb_g_y_write_data;	/*!<Gamma Correction for rgb register 0x00000970 */
+	uint32_t isp_gcrgb_g_x_addr;	/*!<Gamma Correction for rgb register 0x00000974 */
+	uint32_t isp_gcrgb_g_x_write_data;	/*!<Gamma Correction for rgb register 0x00000978 */
+	uint32_t _notused_10_2;	/* gap in address space */
+	uint32_t isp_gcrgb_b_px_0;	/*!<Gamma Correction for rgb register 0x00000980 */
+	uint32_t isp_gcrgb_b_px_1;	/*!<Gamma Correction for rgb register 0x00000984 */
+	uint32_t isp_gcrgb_b_px_2;	/*!<Gamma Correction for rgb register 0x00000988 */
+	uint32_t isp_gcrgb_b_px_3;	/*!<Gamma Correction for rgb register 0x0000098C */
+	uint32_t isp_gcrgb_b_px_4;	/*!<Gamma Correction for rgb register 0x00000990 */
+	uint32_t isp_gcrgb_b_px_5;	/*!<Gamma Correction for rgb register 0x00000994 */
+	uint32_t isp_gcrgb_b_px_6;	/*!<Gamma Correction for rgb register 0x00000998 */
+	uint32_t isp_gcrgb_b_px_7;	/*!<Gamma Correction for rgb register 0x0000099C */
+	uint32_t isp_gcrgb_b_px_8;	/*!<Gamma Correction for rgb register 0x000009A0 */
+	uint32_t isp_gcrgb_b_px_9;	/*!<Gamma Correction for rgb register 0x000009A4 */
+	uint32_t isp_gcrgb_b_px_10;	/*!<Gamma Correction for rgb register 0x000009A8 */
+	uint32_t isp_gcrgb_b_y_addr;	/*!<Gamma Correction for rgb register 0x000009AC */
+	uint32_t isp_gcrgb_b_y_write_data;	/*!<Gamma Correction for rgb register 0x000009B0 */
+	uint32_t isp_gcrgb_b_x_addr;	/*!<Gamma Correction for rgb register 0x000009B4 */
+	uint32_t isp_gcrgb_b_x_write_data;	/*!<Gamma Correction for rgb register 0x000009B8 */
+
+	uint32_t _notused_10[(0x00000c00 - 0x000009bc) / 4];	/* gap in address space */
+
+#else
+	uint32_t _notused_10[(0x00000c00 - 0x00000814) / 4];	/* gap in address space */
+#endif
+	uint32_t mrsz_ctrl;	/*!< global control register (rw) MRV_MRSZ_BASE + 0x00000000 */
+	uint32_t mrsz_scale_hy;	/*!< horizontal luminance scale factor register (rw) MRV_MRSZ_BASE + 0x00000004 */
+	uint32_t mrsz_scale_hcb;	/*!< horizontal Cb scale factor register (rw) MRV_MRSZ_BASE + 0x00000008 */
+	uint32_t mrsz_scale_hcr;	/*!< horizontal Cr scale factor register (rw) MRV_MRSZ_BASE + 0x0000000c */
+	uint32_t mrsz_scale_vy;	/*!< vertical luminance scale factor register (rw) MRV_MRSZ_BASE + 0x00000010 */
+	uint32_t mrsz_scale_vc;	/*!< vertical chrominance scale factor register (rw) MRV_MRSZ_BASE + 0x00000014 */
+	uint32_t mrsz_phase_hy;	/*!< horizontal luminance phase register (rw) MRV_MRSZ_BASE + 0x00000018 */
+	uint32_t mrsz_phase_hc;	/*!< horizontal chrominance phase register (rw) MRV_MRSZ_BASE + 0x0000001c */
+	uint32_t mrsz_phase_vy;	/*!< vertical luminance phase register (rw) MRV_MRSZ_BASE + 0x00000020 */
+	uint32_t mrsz_phase_vc;	/*!< vertical chrominance phase register (rw) MRV_MRSZ_BASE + 0x00000024 */
+	uint32_t mrsz_scale_lut_addr;	/*!< Address pointer of up-scaling look up table (rw) MRV_MRSZ_BASE + 0x00000028 */
+	uint32_t mrsz_scale_lut;	/*!< Entry of up-scaling look up table (rw) MRV_MRSZ_BASE + 0x0000002c */
+	uint32_t mrsz_ctrl_shd;	/*!< global control shadow register (r) MRV_MRSZ_BASE + 0x00000030 */
+	uint32_t mrsz_scale_hy_shd;	/*!< horizontal luminance scale factor shadow register (r) MRV_MRSZ_BASE + 0x00000034 */
+	uint32_t mrsz_scale_hcb_shd;	/*!< horizontal Cb scale factor shadow register (r) MRV_MRSZ_BASE + 0x00000038 */
+	uint32_t mrsz_scale_hcr_shd;	/*!< horizontal Cr scale factor shadow register (r) MRV_MRSZ_BASE + 0x0000003c */
+	uint32_t mrsz_scale_vy_shd;	/*!< vertical luminance scale factor shadow register (r) MRV_MRSZ_BASE + 0x00000040 */
+	uint32_t mrsz_scale_vc_shd;	/*!< vertical chrominance scale factor shadow register (r) MRV_MRSZ_BASE + 0x00000044 */
+	uint32_t mrsz_phase_hy_shd;	/*!< horizontal luminance phase shadow register (r) MRV_MRSZ_BASE + 0x00000048 */
+	uint32_t mrsz_phase_hc_shd;	/*!< horizontal chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000004c */
+	uint32_t mrsz_phase_vy_shd;	/*!< vertical luminance phase shadow register (r) MRV_MRSZ_BASE + 0x00000050 */
+	uint32_t mrsz_phase_vc_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000054 */
+	uint32_t mrsz_phase_crop_x;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000058 */
+	uint32_t mrsz_phase_crop_y;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000005c */
+	uint32_t mrsz_phase_crop_x_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000060 */
+	uint32_t mrsz_phase_crop_y_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000064 */
+	uint32_t mrsz_phase_frame_rate;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000068 */
+	uint32_t mrsz_format_conv_ctrl;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000006c */
+	uint32_t _notused_11_0[(0x00001000 - 0x00000c70) / 4];	/* gap in address space */
+	uint32_t srsz_ctrl;	/*!< global control register (rw) MRV_SRSZ_BASE + 0x00000000 */
+	uint32_t srsz_scale_hy;	/*!< horizontal luminance scale factor register (rw) MRV_SRSZ_BASE + 0x00000004 */
+	uint32_t srsz_scale_hcb;	/*!< horizontal chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x00000008 */
+	uint32_t srsz_scale_hcr;	/*!< horizontal chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x0000000c */
+	uint32_t srsz_scale_vy;	/*!< vertical luminance scale factor register (rw) MRV_SRSZ_BASE + 0x00000010 */
+	uint32_t srsz_scale_vc;	/*!< vertical chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x00000014 */
+	uint32_t srsz_phase_hy;	/*!< horizontal luminance phase register (rw) MRV_SRSZ_BASE + 0x00000018 */
+	uint32_t srsz_phase_hc;	/*!< horizontal chrominance phase register (rw) MRV_SRSZ_BASE + 0x0000001c */
+	uint32_t srsz_phase_vy;	/*!< vertical luminance phase register (rw) MRV_SRSZ_BASE + 0x00000020 */
+	uint32_t srsz_phase_vc;	/*!< vertical chrominance phase register (rw) MRV_SRSZ_BASE + 0x00000024 */
+	uint32_t srsz_scale_lut_addr;	/*!< Address pointer of up-scaling look up table (rw) MRV_SRSZ_BASE + 0x00000028 */
+	uint32_t srsz_scale_lut;	/*!< Entry of up-scaling look up table (rw) MRV_SRSZ_BASE + 0x0000002c */
+	uint32_t srsz_ctrl_shd;	/*!< global control shadow register (r) MRV_SRSZ_BASE + 0x00000030 */
+	uint32_t srsz_scale_hy_shd;	/*!< horizontal luminance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000034 */
+	uint32_t srsz_scale_hcb_shd;	/*!< horizontal Cb scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000038 */
+	uint32_t srsz_scale_hcr_shd;	/*!< horizontal Cr scale factor shadow register (r) MRV_SRSZ_BASE + 0x0000003c */
+	uint32_t srsz_scale_vy_shd;	/*!< vertical luminance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000040 */
+	uint32_t srsz_scale_vc_shd;	/*!< vertical chrominance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000044 */
+	uint32_t srsz_phase_hy_shd;	/*!< horizontal luminance phase shadow register (r) MRV_SRSZ_BASE + 0x00000048 */
+	uint32_t srsz_phase_hc_shd;	/*!< horizontal chrominance phase shadow register (r) MRV_SRSZ_BASE + 0x0000004c */
+	uint32_t srsz_phase_vy_shd;	/*!< vertical luminance phase shadow register (r) MRV_SRSZ_BASE + 0x00000050 */
+	uint32_t srsz_phase_vc_shd;	/*!< vertical chrominance phase shadow register (r) MRV_SRSZ_BASE + 0x00000054 */
+	uint32_t srsz_phase_crop_x;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000058 */
+	uint32_t srsz_phase_crop_y;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000005c */
+	uint32_t srsz_phase_crop_x_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000060 */
+	uint32_t srsz_phase_crop_y_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000064 */
+	uint32_t srsz_phase_frame_rate;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000068 */
+	uint32_t srsz_phase_format_conv_ctr;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000006c */
+	uint32_t _notused_11_1[(0x00001100 - 0x00001070) / 4];	/* gap in address space */
+	uint32_t srsz2_ctrl;	/*!< global control register (rw) MRV_SRSZ_BASE + 0x00000000 */
+	uint32_t srsz2_scale_hy;	/*!< horizontal luminance scale factor register (rw) MRV_SRSZ_BASE + 0x00000004 */
+	uint32_t srsz2_scale_hcb;	/*!< horizontal chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x00000008 */
+	uint32_t srsz2_scale_hcr;	/*!< horizontal chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x0000000c */
+	uint32_t srsz2_scale_vy;	/*!< vertical luminance scale factor register (rw) MRV_SRSZ_BASE + 0x00000010 */
+	uint32_t srsz2_scale_vc;	/*!< vertical chrominance scale factor register (rw) MRV_SRSZ_BASE + 0x00000014 */
+	uint32_t srsz2_phase_hy;	/*!< horizontal luminance phase register (rw) MRV_SRSZ_BASE + 0x00000018 */
+	uint32_t srsz2_phase_hc;	/*!< horizontal chrominance phase register (rw) MRV_SRSZ_BASE + 0x0000001c */
+	uint32_t srsz2_phase_vy;	/*!< vertical luminance phase register (rw) MRV_SRSZ_BASE + 0x00000020 */
+	uint32_t srsz2_phase_vc;	/*!< vertical chrominance phase register (rw) MRV_SRSZ_BASE + 0x00000024 */
+	uint32_t srsz2_scale_lut_addr;	/*!< Address pointer of up-scaling look up table (rw) MRV_SRSZ_BASE + 0x00000028 */
+	uint32_t srsz2_scale_lut;	/*!< Entry of up-scaling look up table (rw) MRV_SRSZ_BASE + 0x0000002c */
+	uint32_t srsz2_ctrl_shd;	/*!< global control shadow register (r) MRV_SRSZ_BASE + 0x00000030 */
+	uint32_t srsz2_scale_hy_shd;	/*!< horizontal luminance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000034 */
+	uint32_t srsz2_scale_hcb_shd;	/*!< horizontal Cb scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000038 */
+	uint32_t srsz2_scale_hcr_shd;	/*!< horizontal Cr scale factor shadow register (r) MRV_SRSZ_BASE + 0x0000003c */
+	uint32_t srsz2_scale_vy_shd;	/*!< vertical luminance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000040 */
+	uint32_t srsz2_scale_vc_shd;	/*!< vertical chrominance scale factor shadow register (r) MRV_SRSZ_BASE + 0x00000044 */
+	uint32_t srsz2_phase_hy_shd;	/*!< horizontal luminance phase shadow register (r) MRV_SRSZ_BASE + 0x00000048 */
+	uint32_t srsz2_phase_hc_shd;	/*!< horizontal chrominance phase shadow register (r) MRV_SRSZ_BASE + 0x0000004c */
+	uint32_t srsz2_phase_vy_shd;	/*!< vertical luminance phase shadow register (r) MRV_SRSZ_BASE + 0x00000050 */
+	uint32_t srsz2_phase_vc_shd;	/*!< vertical chrominance phase shadow register (r) MRV_SRSZ_BASE + 0x00000054 */
+	uint32_t srsz2_phase_crop_x;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000058 */
+	uint32_t srsz2_phase_crop_y;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000005c */
+	uint32_t srsz2_phase_crop_x_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000060 */
+	uint32_t srsz2_phase_crop_y_shd;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000064 */
+	uint32_t srsz2_phase_frame_rate;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x00000068 */
+	uint32_t srsz2_phase_format_conv_ctr;	/*!< vertical chrominance phase shadow register (r) MRV_MRSZ_BASE + 0x0000006c */
+
+	uint32_t _notused_11_2[(0x00001200 - 0x00001170) / 4];	/* gap in address space */
+	uint32_t mcm_ctrl;	/*!<(rw), (0x00001200) */
+	uint32_t mcm_size0;	/*!<(rw), (0x00001204) */
+	uint32_t mcm_size1;	/*!<(rw), (0x00001208) */
+	uint32_t mcm_g2_size0;	/*!<(rw), (0x0000120c) */
+	uint32_t mcm_g2_size1;	/*!<(rw), (0x00001210) */
+	uint32_t _notused_11_3[(0x00001280 - 0x00001214) / 4];	/* gap in address space */
+	uint32_t mcm_rd_cfg;	/*!<(rw), (0x00001280) */
+	uint32_t mcm_retiming0;	/*!<(rw), (0x00001284) */
+	uint32_t mcm_retiming1;	/*!<(rw), (0x00001288) */
+	uint32_t mcm_hsync_preample_ext;	/*!<(rw), (0x0000128c) */
+	uint32_t mcm_wr_retiming0;	/*!<(rw), (0x00001290) */
+	uint32_t mcm_wr_retiming1;	/*!<(rw), (0x00001294) */
+
+#ifdef ISP_MIV1
+	uint32_t _notused_12[(0x00001400 - 0x00001298) / 4];	/* gap in address space */
+	uint32_t mi_ctrl;	/*!< Global control register (rw) MRV_MI_BASE + 0x00000000 */
+	uint32_t mi_init;	/*!< Control register for address init and skip function (w) MRV_MI_BASE + 0x00000004 */
+	uint32_t mi_mp_y_base_ad_init;	/*!< Base address for main picture Y component, JPEG or raw data (rw) MRV_MI_BASE + 0x00000008 */
+	uint32_t mi_mp_y_size_init;	/*!< Size of main picture Y component, JPEG or raw data (rw) MRV_MI_BASE + 0x0000000c */
+	uint32_t mi_mp_y_offs_cnt_init;	/*!< Offset counter init value for main picture Y, JPEG or raw data (rw) MRV_MI_BASE + 0x00000010 */
+	uint32_t mi_mp_y_offs_cnt_start;	/*!< Offset counter start value for main picture Y, JPEG or raw data (r) MRV_MI_BASE + 0x00000014 */
+	uint32_t mi_mp_y_irq_offs_init;	/*!< Fill level interrupt offset value for main picture Y, JPEG or raw data (rw) MRV_MI_BASE + 0x00000018 */
+	uint32_t mi_mp_cb_base_ad_init;	/*!< Base address for main picture Cb component ring buffer (rw) MRV_MI_BASE + 0x0000001c */
+	uint32_t mi_mp_cb_size_init;	/*!< Size of main picture Cb component ring buffer (rw) MRV_MI_BASE + 0x00000020 */
+	uint32_t mi_mp_cb_offs_cnt_init;	/*!< Offset counter init value for main picture Cb component ring buffer (rw) MRV_MI_BASE + 0x00000024 */
+	uint32_t mi_mp_cb_offs_cnt_start;	/*!< Offset counter start value for main picture Cb component ring buffer (r) MRV_MI_BASE + 0x00000028 */
+	uint32_t mi_mp_cr_base_ad_init;	/*!< Base address for main picture Cr component ring buffer (rw) MRV_MI_BASE + 0x0000002c */
+	uint32_t mi_mp_cr_size_init;	/*!< Size of main picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000030 */
+	uint32_t mi_mp_cr_offs_cnt_init;	/*!< Offset counter init value for main picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000034 */
+	uint32_t mi_mp_cr_offs_cnt_start;	/*!< Offset counter start value for main picture Cr component ring buffer (r) MRV_MI_BASE + 0x00000038 */
+	uint32_t mi_sp_y_base_ad_init;	/*!< Base address for self picture Y component ring buffer (rw) MRV_MI_BASE + 0x0000003c */
+	uint32_t mi_sp_y_size_init;	/*!< Size of self picture Y component ring buffer (rw) MRV_MI_BASE + 0x00000040 */
+	uint32_t mi_sp_y_offs_cnt_init;	/*!< Offset counter init value for self picture Y component ring buffer (rw) MRV_MI_BASE + 0x00000044 */
+	uint32_t mi_sp_y_offs_cnt_start;	/*!< Offset counter start value for self picture Y component ring buffer (r) MRV_MI_BASE + 0x00000048 */
+	uint32_t mi_sp_y_llength;	/*!< Line length of self picture Y component (rw) MRV_MI_BASE + 0x0000004c */
+	uint32_t mi_sp_cb_base_ad_init;	/*!< Base address for self picture Cb component ring buffer (rw) MRV_MI_BASE + 0x00000050 */
+	uint32_t mi_sp_cb_size_init;	/*!< Size of self picture Cb component ring buffer (rw) MRV_MI_BASE + 0x00000054 */
+	uint32_t mi_sp_cb_offs_cnt_init;	/*!< Offset counter init value for self picture Cb component ring buffer (rw) MRV_MI_BASE + 0x00000058 */
+	uint32_t mi_sp_cb_offs_cnt_start;	/*!< Offset counter start value for self picture Cb component ring buffer (r) MRV_MI_BASE + 0x0000005c */
+	uint32_t mi_sp_cr_base_ad_init;	/*!< Base address for self picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000060 */
+	uint32_t mi_sp_cr_size_init;	/*!< Size of self picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000064 */
+	uint32_t mi_sp_cr_offs_cnt_init;	/*!< Offset counter init value for self picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000068 */
+	uint32_t mi_sp_cr_offs_cnt_start;	/*!< Offset counter start value for self picture Cr component ring buffer (r) MRV_MI_BASE + 0x0000006c */
+	uint32_t mi_byte_cnt;	/*!< Counter value of JPEG or RAW data bytes (r) MRV_MI_BASE + 0x00000070 */
+	uint32_t mi_ctrl_shd;	/*!< global control internal shadow register (r) MRV_MI_BASE + 0x00000074 */
+	uint32_t mi_mp_y_base_ad_shd;	/*!< Base address shadow register for main picture Y component, JPEG or raw data ring buffer (r) MRV_MI_BASE + 0x00000078 */
+	uint32_t mi_mp_y_size_shd;	/*!< Size shadow register of main picture Y component, JPEG or raw data (r) MRV_MI_BASE + 0x0000007c */
+	uint32_t mi_mp_y_offs_cnt_shd;	/*!< Current offset counter of main picture Y component, JPEG or raw data ring buffer (r) MRV_MI_BASE + 0x00000080 */
+	uint32_t mi_mp_y_irq_offs_shd;	/*!< Shadow register of fill level interrupt offset value for main picture Y component, JPEG or raw data (r) MRV_MI_BASE + 0x00000084 */
+	uint32_t mi_mp_cb_base_ad_shd;	/*!< Base address shadow register for main picture Cb component ring buffer (r) MRV_MI_BASE + 0x00000088 */
+	uint32_t mi_mp_cb_size_shd;	/*!< Size shadow register of main picture Cb component ring buffer (r) MRV_MI_BASE + 0x0000008c */
+	uint32_t mi_mp_cb_offs_cnt_shd;	/*!< Current offset counter of main picture Cb component ring buffer (r) MRV_MI_BASE + 0x00000090 */
+	uint32_t mi_mp_cr_base_ad_shd;	/*!< Base address shadow register for main picture Cr component ring buffer (r) MRV_MI_BASE + 0x00000094 */
+	uint32_t mi_mp_cr_size_shd;	/*!< Size shadow register of main picture Cr component ring buffer (r) MRV_MI_BASE + 0x00000098 */
+	uint32_t mi_mp_cr_offs_cnt_shd;	/*!< Current offset counter of main picture Cr component ring buffer (r) MRV_MI_BASE + 0x0000009c */
+	uint32_t mi_sp_y_base_ad_shd;	/*!< Base address shadow register for self picture Y component ring buffer (r) MRV_MI_BASE + 0x000000a0 */
+	uint32_t mi_sp_y_size_shd;	/*!< Size shadow register of self picture Y component ring buffer (r) MRV_MI_BASE + 0x000000a4 */
+	uint32_t mi_sp_y_offs_cnt_shd;	/*!< Current offset counter of self picture Y component ring buffer (r) MRV_MI_BASE + 0x000000a8 */
+	uint32_t _notused_13[(0x000014b0 - 0x000014ac) / 4];	/* gap in address space */
+	uint32_t mi_sp_cb_base_ad_shd;	/*!< Base address shadow register for self picture Cb component ring buffer (r) MRV_MI_BASE + 0x000000b0 */
+	uint32_t mi_sp_cb_size_shd;	/*!< Size shadow register of self picture Cb component ring buffer (r) MRV_MI_BASE + 0x000000b4 */
+	uint32_t mi_sp_cb_offs_cnt_shd;	/*!< Current offset counter of self picture Cb component ring buffer (r) MRV_MI_BASE + 0x000000b8 */
+	uint32_t mi_sp_cr_base_ad_shd;	/*!< Base address shadow register for self picture Cr component ring buffer (r) MRV_MI_BASE + 0x000000bc */
+	uint32_t mi_sp_cr_size_shd;	/*!< Size shadow register of self picture Cr component ring buffer (r) MRV_MI_BASE + 0x000000c0 */
+	uint32_t mi_sp_cr_offs_cnt_shd;	/*!< Current offset counter of self picture Cr component ring buffer (r) MRV_MI_BASE + 0x000000c4 */
+	uint32_t mi_dma_y_pic_start_ad;	/*!< Y component image start address (rw) MRV_MI_BASE + 0x000000c8 */
+	uint32_t mi_dma_y_pic_width;	/*!< Y component image width (rw) MRV_MI_BASE + 0x000000cc */
+	uint32_t mi_dma_y_llength;	/*!< Y component original line length (rw) MRV_MI_BASE + 0x000000d0 */
+	uint32_t mi_dma_y_pic_size;	/*!< Y component image size (rw) MRV_MI_BASE + 0x000000d4 */
+	uint32_t mi_dma_cb_pic_start_ad;	/*!< Cb component image start address (rw) MRV_MI_BASE + 0x000000d8 */
+	uint32_t _notused_14[(0x000014e8 - 0x000014dc) / 4];	/* gap in address space */
+	uint32_t mi_dma_cr_pic_start_ad;	/*!< Cr component image start address (rw) MRV_MI_BASE + 0x000000e8 */
+	uint32_t _notused_15[(0x000014f8 - 0x000014ec) / 4];	/* gap in address space */
+	uint32_t mi_imsc;	/*!< Interrupt Mask (‘1’: interrupt active, ‘0’: interrupt masked) (rw) MRV_MI_BASE + 0x000000f8 */
+	uint32_t mi_ris;	/*!< Raw Interrupt Status (r) MRV_MI_BASE + 0x000000fc */
+	uint32_t mi_mis;	/*!< Masked Interrupt Status (r) MRV_MI_BASE + 0x00000100 */
+	uint32_t mi_icr;	/*!< Interrupt Clear Register (w) MRV_MI_BASE + 0x00000104 */
+	uint32_t mi_isr;	/*!< Interrupt Set Register (w) MRV_MI_BASE + 0x00000108 */
+	uint32_t mi_status;	/*!< MI Status Register (r) MRV_MI_BASE + 0x0000010c */
+	uint32_t mi_status_clr;	/*!< MI Status Clear Register (w) MRV_MI_BASE + 0x00000110 */
+	uint32_t mi_sp_y_pic_width;	/*!< Y component image width (rw) MRV_MI_BASE + 0x00000114 */
+	uint32_t mi_sp_y_pic_height;	/*!< Y component image height (rw) MRV_MI_BASE + 0x00000118 */
+	uint32_t mi_sp_y_pic_size;	/*!< Y component image size (rw) MRV_MI_BASE + 0x0000011c */
+	uint32_t mi_dma_ctrl;	/*!< DMA control register (rw) MRV_MI_BASE + 0x00000120 */
+	uint32_t mi_dma_start;	/*!< DMA start register (w) MRV_MI_BASE + 0x00000124 */
+	uint32_t mi_dma_status;	/*!< DMA status register (r) MRV_MI_BASE + 0x00000128 */
+	uint32_t mi_pixel_cnt;	/*!< Counter value for defect pixel list (r) MRV_MI_BASE + 0x0000012c */
+	uint32_t mi_mp_y_base_ad_init2;	/*!< Base address 2 (ping pong) for main picture Y component, JPEG or raw data (rw) MRV_MI_BASE + 0x00000130 */
+	uint32_t mi_mp_cb_base_ad_init2;	/*!< Base address 2 (pingpong) for main picture Cb component (rw) MRV_MI_BASE + 0x00000134 */
+	uint32_t mi_mp_cr_base_ad_init2;	/*!< Base address 2 (pingpong) for main picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000138 */
+	uint32_t mi_sp_y_base_ad_init2;	/*!< Base address 2 (ping pong) for main picture Y component, JPEG or raw data (rw) MRV_MI_BASE + 0x0000013c */
+	uint32_t mi_sp_cb_base_ad_init2;	/*!< Base address 2 (pingpong) for main picture Cb component (rw) MRV_MI_BASE + 0x00000140 */
+	uint32_t mi_sp_cr_base_ad_init2;	/*!< Base address 2 (pingpong) for main picture Cr component ring buffer (rw) MRV_MI_BASE + 0x00000144 */
+	uint32_t mi_reserved_1;	/*!< MI_RESERVED_1 (rw) MRV_MI_BASE + 0x00000148 */
+#ifdef ISP_MI_HANDSHAKE_NANO
+	uint32_t mi_mp_handshake;	/*!< MI mp handshake control for Nano handshake, (rw) MRV_MI_BASE + 0x0000014C */
+#else
+	uint32_t mi_reserved_1_1;	/*!< MI_RESERVED_1 (rw) MRV_MI_BASE + 0x0000014c */
+#endif
+	uint32_t mi_mp_y_llength;	/*!< MI mp y llength for Nano handshake, (rw) MRV_MI_BASE + 0x00000150 */
+	uint32_t mi_mp_y_slice_offset;	/*!< MI mp y slice offset for Nano handshake, (rw) MRV_MI_BASE + 0x00000154 */
+	uint32_t mi_mp_c_slice_offset;	/*!< MI mp c slice offset for Nano handshare, (rw) MRV_MI_BASE + 0x00000158 */
+	uint32_t mi_output_align_format;	/*!< MI output byte swap and LSB alignment control for Nano, (rw) MRV_MI_BASE + 0x0000015C */
+	uint32_t mi_mp_output_fifo_size;	/*!< MI mp output fifo control for Nano, (rw) MRV_MI_BASE + 0x00000160 */
+	uint32_t mi_mp_y_pic_width;	/*!< MI mp y width pix for Nano handshake, (rw) MRV_MI_BASE + 0x00000164 */
+	uint32_t mi_mp_y_pic_height;	/*!< MI mp y height pix for Nano handshake, (rw) MRV_MI_BASE + 0x00000168 */
+	uint32_t mi_mp_y_pic_size;	/*!< MI mp y pix size for Nano handshare, (rw) MRV_MI_BASE + 0x0000016C */
+
+#ifdef ISP_MI_BP
+	uint32_t _notused_16_0[(0x00001580 - 0x00001570) / 4];
+	uint32_t mi_bp_ctrl;	/*!<(rw), (0x00001580) */
+	uint32_t mi_bp_r_base_ad_shd;	/*!<(rw), (0x00001584) */
+	uint32_t mi_bp_gr_base_ad_shd;	/*!<(rw), (0x00001588) */
+	uint32_t mi_bp_gb_base_ad_shd;	/*!<(rw), (0x0000158C) */
+	uint32_t mi_bp_b_base_ad_shd;	/*!<(rw), (0x00001590) */
+	uint32_t mi_bp_r_offs_cnt_shd;	/*!<(rw), (0x00001594) */
+	uint32_t mi_bp_gr_offs_cnt_shd;	/*!<(rw), (0x00001598) */
+	uint32_t mi_bp_gb_offs_cnt_shd;	/*!<(rw), (0x0000159C) */
+	uint32_t mi_bp_b_offs_cnt_shd;	/*!<(rw), (0x000015A0) */
+	uint32_t mi_bp_wr_offs_cnt_init;	/*!<(rw), (0x000015A4) */
+	uint32_t mi_bp_wr_irq_offs_shd;	/*!<(rw), (0x000015A8) */
+	uint32_t mi_bp_wr_irq_offs_init;	/*!<(rw), (0x000015AC) */
+	uint32_t mi_bp_wr_size_shd;	/*!<(rw), (0x000015B0) */
+	uint32_t mi_bp_wr_size_init;	/*!<(rw), (0x000015B4) */
+	uint32_t mi_bp_wr_llength;	/*!<(rw), (0x000015B8) */
+	uint32_t mi_bp_pic_width;	/*!<(rw), (0x000015BC) */
+	uint32_t mi_bp_pic_height;	/*!<(rw), (0x000015C0) */
+	uint32_t mi_bp_pic_size;	/*!<(rw), (0x000015C4) */
+	uint32_t mi_bp_r_offs_cnt_start;	/*!<(rw), (0x000015C8) */
+	uint32_t mi_bp_gr_offs_cnt_start;	/*!<(rw), (0x000015CC) */
+	uint32_t mi_bp_gb_offs_cnt_start;	/*!<(rw), (0x000015D0) */
+	uint32_t mi_bp_b_offs_cnt_start;	/*!<(rw), (0x000015D4) */
+	uint32_t mi_bp_r_base_ad_init;	/*!<(rw), (0x000015D8) */
+	uint32_t mi_bp_gr_base_ad_init;	/*!<(rw), (0x000015DC) */
+	uint32_t mi_bp_gb_base_ad_init;	/*!<(rw), (0x000015E0) */
+	uint32_t mi_bp_b_base_ad_init;	/*!<(rw), (0x000015E4) */
+#else
+	uint32_t _notused_16[(0x000015e8 - 0x00001570) / 4];	/* gap in address space */
+#endif
+	uint32_t mi_dma_y_raw_fmt;	/*!<(rw), (0x000015E8) */
+	uint32_t mi_dma_y_raw_lval;	/*!<(rw), (0x000015EC) */
+	uint32_t _notused_16_1[(0x00001800 - 0x000015f0) / 4];	/* gap in address space */
+
+#elif defined (ISP_MIV2)
+
+	uint32_t _notused_12[(0x00001300 - 0x00001298) / 4];	/* gap in address space */
+	uint32_t miv2_ctrl;	/*!<(rw), (0x00001300) */
+	uint32_t miv2_ctrl_shd;	/*!<(rw), (0x00001304) */
+	uint32_t _notused_13[(0x00001310 - 0x00001308) / 4];	/* gap in address space */
+	uint32_t miv2_mp_ctrl;	/*!<(rw), (0x00001310) */
+	uint32_t miv2_mp_fmt;	/*!<(rw), (0x00001314) */
+	uint32_t miv2_mp_bus_cfg;	/*!<(rw), (0x00001318) */
+	uint32_t miv2_mp_bus_id;	/*!<(rw), (0x0000131c) */
+	uint32_t miv2_mp_bus_timeo;	/*!<(rw), (0x00001320) */
+	uint32_t miv2_mp_y_base_ad_init;	/*!<(rw), (0x00001324) */
+	uint32_t miv2_mp_y_size_init;	/*!<(rw), (0x00001328) */
+	uint32_t miv2_mp_y_offs_cnt_init;	/*!<(rw), (0x0000132c) */
+	uint32_t miv2_mp_y_llength;	/*!<(rw), (0x00001330) */
+	uint32_t miv2_mp_y_pic_width;	/*!<(rw), (0x00001334) */
+	uint32_t miv2_mp_y_pic_height;	/*!<(rw), (0x00001338) */
+	uint32_t miv2_mp_y_pic_size;	/*!<(rw), (0x0000133c) */
+	uint32_t miv2_mp_cb_base_ad_init;	/*!<(rw), (0x00001340) */
+	uint32_t miv2_mp_cb_size_init;	/*!<(rw), (0x00001344) */
+	uint32_t miv2_mp_cb_offs_cnt_init;	/*!<(rw), (0x00001348) */
+	uint32_t miv2_mp_cr_base_ad_init;	/*!<(rw), (0x0000134c) */
+	uint32_t miv2_mp_cr_size_init;	/*!<(rw), (0x00001350) */
+	uint32_t miv2_mp_cr_offs_cnt_init;	/*!<(rw), (0x00001354) */
+	uint32_t miv2_mp_y_base_ad_init2;	/*!<(rw), (0x00001358) */
+	uint32_t miv2_mp_cb_base_ad_init2;	/*!<(rw), (0x0000135c) */
+	uint32_t miv2_mp_cr_base_ad_init2;	/*!<(rw), (0x00001360) */
+	uint32_t miv2_mp_y_offs_cnt_start;	/*!<(ro), (0x00001364) */
+	uint32_t miv2_mp_cb_offs_cnt_start;	/*!<(ro), (0x00001368) */
+	uint32_t miv2_mp_cr_offs_cnt_start;	/*!<(ro), (0x0000136c) */
+	uint32_t miv2_mp_y_base_ad_shd;	/*!<(ro), (0x00001370) */
+	uint32_t miv2_mp_y_size_shd;	/*!<(ro), (0x00001374) */
+	uint32_t miv2_mp_y_offs_cnt_shd;	/*!<(ro), (0x00001378) */
+	uint32_t miv2_mp_cb_base_ad_shd;	/*!<(ro), (0x0000137c) */
+	uint32_t miv2_mp_cb_size_shd;	/*!<(ro), (0x00001380) */
+	uint32_t miv2_mp_cb_offs_cnt_shd;	/*!<(ro), (0x00001384) */
+	uint32_t miv2_mp_cr_base_ad_shd;	/*!<(ro), (0x00001388) */
+	uint32_t miv2_mp_cr_size_shd;	/*!<(ro), (0x0000138c) */
+	uint32_t miv2_mp_cr_offs_cnt_shd;	/*!<(ro), (0x00001390) */
+	uint32_t miv2_mp_raw_base_ad_init;	/*!<(rw), (0x00001394) */
+	uint32_t miv2_mp_raw_size_init;	/*!<(rw), (0x00001398) */
+	uint32_t miv2_mp_raw_offs_cnt_init;	/*!<(rw), (0x0000139c) */
+	uint32_t miv2_mp_raw_llength;	/*!<(rw), (0x000013a0) */
+	uint32_t miv2_mp_raw_pic_width;	/*!<(rw), (0x000013a4) */
+	uint32_t miv2_mp_raw_pic_height;	/*!<(rw), (0x000013a8) */
+	uint32_t miv2_mp_raw_pic_size;	/*!<(rw), (0x000013ac) */
+	uint32_t miv2_mp_raw_offs_cnt_start;	/*!<(ro), (0x000013b0) */
+	uint32_t miv2_mp_raw_base_ad_shd;	/*!<(ro), (0x000013b4) */
+	uint32_t miv2_mp_raw_size_shd;	/*!<(ro), (0x000013b8) */
+	uint32_t miv2_mp_raw_offs_cnt_shd;	/*!<(ro), (0x000013bc) */
+	uint32_t miv2_mp_jdp_base_ad_init;	/*!<(rw), (0x000013c0) */
+	uint32_t miv2_mp_jdp_size_init;	/*!<(rw), (0x000013c4) */
+	uint32_t miv2_mp_jdp_offs_cnt_init;	/*!<(rw), (0x000013c8) */
+	uint32_t miv2_mp_jdp_llength;	/*!<(rw), (0x000013cc) */
+	uint32_t miv2_mp_jdp_pic_width;	/*!<(rw), (0x000013d0) */
+	uint32_t miv2_mp_jdp_pic_height;	/*!<(rw), (0x000013d4) */
+	uint32_t miv2_mp_jdp_pic_size;	/*!<(rw), (0x000013d8) */
+	uint32_t miv2_mp_jdp_offs_cnt_start;	/*!<(ro), (0x000013dc) */
+	uint32_t miv2_mp_jdp_base_ad_shd;	/*!<(ro), (0x000013e0) */
+	uint32_t miv2_mp_jdp_size_shd;	/*!<(ro), (0x000013e4) */
+	uint32_t miv2_mp_jdp_offs_cnt_shd;	/*!<(ro), (0x000013e8) */
+	uint32_t miv2_mp_status_clr;	/*!<(rw), (0x000013ec) */
+	uint32_t miv2_mp_ctrl_status;	/*!<(ro), (0x000013f0) */
+	uint32_t miv2_mp_axi_status;	/*!<(ro), (0x000013f4) */
+	uint32_t miv2_mp_raw_byte_cnt_status;	/*!<(rw), (0x000013f8) */
+	uint32_t miv2_mp_jdp_byte_cnt_status;	/*!<(rw), (0x000013fc) */
+	uint32_t miv2_mp_dp_byte_cnt_status;	/*!<(rw), (0x00001400) */
+	uint32_t _notused_14[(0x0000142c - 0x00001404) / 4];	/* gap in address space */
+	uint32_t miv2_sp1_ctrl;	/*!<(rw), (0x0000142c) */
+	uint32_t miv2_sp1_fmt;	/*!<(rw), (0x00001430) */
+	uint32_t miv2_sp1_bus_cfg;	/*!<(rw), (0x00001434) */
+	uint32_t miv2_sp1_bus_id;	/*!<(rw), (0x00001438) */
+	uint32_t miv2_sp1_bus_timeo;	/*!<(rw), (0x0000143c) */
+	uint32_t miv2_sp1_y_base_ad_init;	/*!<(rw), (0x00001440) */
+	uint32_t miv2_sp1_y_size_init;	/*!<(rw), (0x00001444) */
+	uint32_t miv2_sp1_y_offs_cnt_init;	/*!<(rw), (0x00001448) */
+	uint32_t miv2_sp1_y_llength;	/*!<(rw), (0x0000144c) */
+	uint32_t miv2_sp1_y_pic_width;	/*!<(rw), (0x00001450) */
+	uint32_t miv2_sp1_y_pic_height;	/*!<(rw), (0x00001454) */
+	uint32_t miv2_sp1_y_pic_size;	/*!<(rw), (0x00001458) */
+	uint32_t miv2_sp1_cb_base_ad_init;	/*!<(rw), (0x0000145c) */
+	uint32_t miv2_sp1_cb_size_init;	/*!<(rw), (0x00001460) */
+	uint32_t miv2_sp1_cb_offs_cnt_init;	/*!<(rw), (0x00001464) */
+	uint32_t miv2_sp1_cr_base_ad_init;	/*!<(rw), (0x00001468) */
+	uint32_t miv2_sp1_cr_size_init;	/*!<(rw), (0x0000146c) */
+	uint32_t miv2_sp1_cr_offs_cnt_init;	/*!<(rw), (0x00001470) */
+	uint32_t miv2_sp1_y_base_ad_init2;	/*!<(rw), (0x00001474) */
+	uint32_t miv2_sp1_cb_base_ad_init2;	/*!<(rw), (0x00001478) */
+	uint32_t miv2_sp1_cr_base_ad_init2;	/*!<(rw), (0x0000147c) */
+	uint32_t miv2_sp1_y_offs_cnt_start;	/*!<(ro), (0x00001480) */
+	uint32_t miv2_sp1_cb_offs_cnt_start;	/*!<(ro), (0x00001484) */
+	uint32_t miv2_sp1_cr_offs_cnt_start;	/*!<(ro), (0x00001488) */
+	uint32_t miv2_sp1_y_base_ad_shd;	/*!<(ro), (0x0000148c) */
+	uint32_t miv2_sp1_y_size_shd;	/*!<(ro), (0x00001490) */
+	uint32_t miv2_sp1_y_offs_cnt_shd;	/*!<(ro), (0x00001494) */
+	uint32_t miv2_sp1_cb_base_ad_shd;	/*!<(ro), (0x00001498) */
+	uint32_t miv2_sp1_cb_size_shd;	/*!<(ro), (0x0000149c) */
+	uint32_t miv2_sp1_cb_offs_cnt_shd;	/*!<(ro), (0x000014a0) */
+	uint32_t miv2_sp1_cr_base_ad_shd;	/*!<(ro), (0x000014a4) */
+	uint32_t miv2_sp1_cr_size_shd;	/*!<(ro), (0x000014a8) */
+	uint32_t miv2_sp1_cr_offs_cnt_shd;	/*!<(ro), (0x000014ac) */
+	uint32_t miv2_sp1_status_clr;	/*!<(rw), (0x000014b0) */
+	uint32_t miv2_sp1_ctrl_status;	/*!<(ro), (0x000014b4) */
+	uint32_t miv2_sp1_axi_status;	/*!<(ro), (0x000014b8) */
+	uint32_t _notused_15[(0x000014e4 - 0x000014bc) / 4];	/* gap in address space */
+	uint32_t miv2_sp2_ctrl;	/*!<(rw), (0x000014e4) */
+	uint32_t miv2_sp2_fmt;	/*!<(rw), (0x000014e8) */
+	uint32_t miv2_sp2_bus_cfg;	/*!<(rw), (0x000014ec) */
+	uint32_t miv2_sp2_bus_id;	/*!<(rw), (0x000014f0) */
+	uint32_t miv2_sp2_bus_timeo;	/*!<(rw), (0x000014f4) */
+	uint32_t miv2_sp2_y_base_ad_init;	/*!<(rw), (0x000014f8) */
+	uint32_t miv2_sp2_y_size_init;	/*!<(rw), (0x000014fc) */
+	uint32_t miv2_sp2_y_offs_cnt_init;	/*!<(rw), (0x00001500) */
+	uint32_t miv2_sp2_y_llength;	/*!<(rw), (0x00001504) */
+	uint32_t miv2_sp2_y_pic_width;	/*!<(rw), (0x00001508) */
+	uint32_t miv2_sp2_y_pic_height;	/*!<(rw), (0x0000150c) */
+	uint32_t miv2_sp2_y_pic_size;	/*!<(rw), (0x00001510) */
+	uint32_t miv2_sp2_cb_base_ad_init;	/*!<(rw), (0x00001514) */
+	uint32_t miv2_sp2_cb_size_init;	/*!<(rw), (0x00001518) */
+	uint32_t miv2_sp2_cb_offs_cnt_init;	/*!<(rw), (0x0000151c) */
+	uint32_t miv2_sp2_cr_base_ad_init;	/*!<(rw), (0x00001520) */
+	uint32_t miv2_sp2_cr_size_init;	/*!<(rw), (0x00001524) */
+	uint32_t miv2_sp2_cr_offs_cnt_init;	/*!<(rw), (0x00001528) */
+	uint32_t miv2_sp2_y_base_ad_init2;	/*!<(rw), (0x0000152c) */
+	uint32_t miv2_sp2_cb_base_ad_init2;	/*!<(rw), (0x00001530) */
+	uint32_t miv2_sp2_cr_base_ad_init2;	/*!<(rw), (0x00001534) */
+	uint32_t miv2_sp2_y_offs_cnt_start;	/*!<(ro), (0x00001538) */
+	uint32_t miv2_sp2_cb_offs_cnt_start;	/*!<(ro), (0x0000153c) */
+	uint32_t miv2_sp2_cr_offs_cnt_start;	/*!<(ro), (0x00001540) */
+	uint32_t miv2_sp2_y_base_ad_shd;	/*!<(ro), (0x00001544) */
+	uint32_t miv2_sp2_y_size_shd;	/*!<(ro), (0x00001548) */
+	uint32_t miv2_sp2_y_offs_cnt_shd;	/*!<(ro), (0x0000154c) */
+	uint32_t miv2_sp2_cb_base_ad_shd;	/*!<(ro), (0x00001550) */
+	uint32_t miv2_sp2_cb_size_shd;	/*!<(ro), (0x00001554) */
+	uint32_t miv2_sp2_cb_offs_cnt_shd;	/*!<(ro), (0x00001558) */
+	uint32_t miv2_sp2_cr_base_ad_shd;	/*!<(ro), (0x0000155c) */
+	uint32_t miv2_sp2_cr_size_shd;	/*!<(ro), (0x00001560) */
+	uint32_t miv2_sp2_cr_offs_cnt_shd;	/*!<(ro), (0x00001564) */
+	uint32_t miv2_sp2_raw_base_ad_init;	/*!<(rw), (0x00001568) */
+	uint32_t miv2_sp2_raw_size_init;	/*!<(rw), (0x0000156c) */
+	uint32_t miv2_sp2_raw_offs_cnt_init;	/*!<(rw), (0x00001570) */
+	uint32_t miv2_sp2_raw_llength;	/*!<(rw), (0x00001574) */
+	uint32_t miv2_sp2_raw_pic_width;	/*!<(rw), (0x00001578) */
+	uint32_t miv2_sp2_raw_pic_height;	/*!<(rw), (0x0000157c) */
+	uint32_t miv2_sp2_raw_pic_size;	/*!<(rw), (0x00001580) */
+	uint32_t miv2_sp2_raw_offs_cnt_start;	/*!<(ro), (0x00001584) */
+	uint32_t _notused_16_0[(0x0000158c - 0x00001588) / 4];	/* gap in address space */
+	uint32_t miv2_sp2_raw_base_ad_shd;	/*!<(ro), (0x0000158c) */
+	uint32_t miv2_sp2_raw_size_shd;	/*!<(ro), (0x00001590) */
+	uint32_t miv2_sp2_raw_offs_cnt_shd;	/*!<(ro), (0x00001594) */
+	uint32_t miv2_sp2_dma_y_pic_start_ad;	/*!<(rw), (0x00001598) */
+	uint32_t miv2_sp2_dma_y_pic_width;	/*!<(rw), (0x0000159c) */
+	uint32_t miv2_sp2_dma_y_pic_llength;	/*!<(rw), (0x000015a0) */
+	uint32_t miv2_sp2_dma_y_pic_size;	/*!<(rw), (0x000015a4) */
+	uint32_t miv2_sp2_dma_cb_pic_start_ad;	/*!<(rw), (0x000015a8) */
+	uint32_t miv2_sp2_dma_cr_pic_start_ad;	/*!<(rw), (0x000015ac) */
+	uint32_t miv2_sp2_dma_y_pic_start_ad_shd;	/*!<(ro), (0x000015b0) */
+	uint32_t miv2_sp2_dma_cb_pic_start_ad_shd;	/*!<(ro), (0x000015b4) */
+	uint32_t miv2_sp2_dma_cr_pic_start_ad_shd;	/*!<(ro), (0x000015b8) */
+	uint32_t miv2_sp2_dma_raw_pic_start_ad;	/*!<(rw), (0x000015bc) */
+	uint32_t miv2_sp2_dma_raw_pic_width;	/*!<(rw), (0x000015c0) */
+	uint32_t miv2_sp2_dma_raw_pic_llength;	/*!<(rw), (0x000015c4) */
+	uint32_t miv2_sp2_dma_raw_pic_size;	/*!<(rw), (0x000015c8) */
+	uint32_t miv2_sp2_dma_raw_pic_start_ad_shd;	/*!<(ro), (0x000015cc) */
+	uint32_t miv2_sp2_status_clr;	/*!<(rw), (0x000015d0) */
+	uint32_t miv2_sp2_ctrl_status;	/*!<(ro), (0x000015d4) */
+	uint32_t miv2_sp2_axi_status;	/*!<(ro), (0x000015d8) */
+	uint32_t miv2_sp2_dma_yuv_status;	/*!<(ro), (0x000015dc) */
+	uint32_t miv2_sp2_dma_raw_status;	/*!<(ro), (0x000015e0) */
+	uint32_t miv2_sp2_dma_y_pic_lval;	/*!<(rw), (0x000015e4) */
+	uint32_t _notused_16_1[(0x000015ec - 0x000015e8) / 4];	/* gap in address space */
+	uint32_t miv2_sp2_dma_raw_pic_lval;	/*!<(rw), (0x000015ec) */
+	uint32_t _notused_16_2[(0x00001600 - 0x000015f0) / 4];	/* gap in address space */
+	uint32_t miv2_mcm_ctrl;	/*!<(rw), (0x00001600) */
+	uint32_t miv2_mcm_fmt;	/*!<(rw), (0x00001604) */
+	uint32_t miv2_mcm_bus_cfg;	/*!<(rw), (0x00001608) */
+	uint32_t miv2_mcm_bus_id;	/*!<(rw), (0x0000160c) */
+	uint32_t miv2_mcm_bus_timeo;	/*!<(rw), (0x00001610) */
+	uint32_t miv2_mcm_raw0_base_ad_init;	/*!<(rw), (0x00001614) */
+	uint32_t miv2_mcm_raw0_size_init;	/*!<(rw), (0x00001618) */
+	uint32_t miv2_mcm_raw0_offs_cnt_init;	/*!<(rw), (0x0000161c) */
+	uint32_t miv2_mcm_raw0_llength;	/*!<(rw), (0x00001620) */
+	uint32_t miv2_mcm_raw0_pic_width;	/*!<(rw), (0x00001624) */
+	uint32_t miv2_mcm_raw0_pic_height;	/*!<(rw), (0x00001628) */
+	uint32_t miv2_mcm_raw0_pic_size;	/*!<(rw), (0x0000162c) */
+	uint32_t miv2_mcm_raw0_offs_cnt_start;	/*!<(ro), (0x00001630) */
+	uint32_t miv2_mcm_raw0_base_ad_shd;	/*!<(ro), (0x00001634) */
+	uint32_t miv2_mcm_raw0_size_shd;	/*!<(ro), (0x00001638) */
+	uint32_t miv2_mcm_raw0_offs_cnt_shd;	/*!<(ro), (0x0000163c) */
+	uint32_t miv2_mcm_raw1_base_ad_init;	/*!<(rw), (0x00001640) */
+	uint32_t miv2_mcm_raw1_size_init;	/*!<(rw), (0x00001644) */
+	uint32_t miv2_mcm_raw1_offs_cnt_init;	/*!<(rw), (0x00001648) */
+	uint32_t miv2_mcm_raw1_llength;	/*!<(rw), (0x0000164c) */
+	uint32_t miv2_mcm_raw1_pic_width;	/*!<(rw), (0x00001650) */
+	uint32_t miv2_mcm_raw1_pic_height;	/*!<(rw), (0x00001654) */
+	uint32_t miv2_mcm_raw1_pic_size;	/*!<(rw), (0x00001658) */
+	uint32_t miv2_mcm_raw1_offs_cnt_start;	/*!<(ro), (0x0000165c) */
+	uint32_t miv2_mcm_raw1_base_ad_shd;	/*!<(ro), (0x00001660) */
+	uint32_t miv2_mcm_raw1_size_shd;	/*!<(ro), (0x00001664) */
+	uint32_t miv2_mcm_raw1_offs_cnt_shd;	/*!<(ro), (0x00001668) */
+	uint32_t miv2_mcm_dma_raw_pic_start_ad;	/*!<(rw), (0x0000166c) */
+	uint32_t miv2_mcm_dma_raw_pic_width;	/*!<(rw), (0x00001670) */
+	uint32_t miv2_mcm_dma_raw_pic_llength;	/*!<(rw), (0x00001674) */
+	uint32_t miv2_mcm_dma_raw_pic_size;	/*!<(rw), (0x00001678) */
+	uint32_t miv2_mcm_dma_raw_pic_start_ad_shd;	/*!<(ro), (0x0000167c) */
+	uint32_t miv2_mcm_status_clr;	/*!<(rw), (0x00001680) */
+	uint32_t miv2_mcm_ctrl_status;	/*!<(ro), (0x00001684) */
+	uint32_t miv2_mcm_axi_status;	/*!<(ro), (0x00001688) */
+	uint32_t miv2_mcm_dma_status;	/*!<(ro), (0x0000168c) */
+	uint32_t miv2_mcm_dma_raw_pic_lval;	/*!<(ro), (0x00001690) */
+	uint32_t miv2_mcm_raw0_lval_bytes;	/*!<(ro), (0x00001694) */
+	uint32_t _notused_16_3[(0x000016c0 - 0x00001698) / 4];	/* gap in address space */
+	uint32_t miv2_imsc;	/*!<(rw), (0x000016c0) */
+	uint32_t miv2_imsc1;	/*!<(rw), (0x000016c4) */
+	uint32_t miv2_isr;	/*!<(rw), (0x000016c8) */
+	uint32_t miv2_isr1;	/*!<(rw), (0x000016cc) */
+	uint32_t miv2_mis;	/*!<(rw), (0x000016d0) */
+	uint32_t miv2_mis1;	/*!<(rw), (0x000016d4) */
+	uint32_t miv2_icr;	/*!<(rw), (0x000016d8) */
+	uint32_t miv2_icr1;	/*!<(rw), (0x000016dc) */
+	uint32_t miv2_ris;	/*!<(rw), (0x000016e0) */
+	uint32_t miv2_ris1;	/*!<(rw), (0x000016e4) */
+	uint32_t miv2_imsc2; /*!<(rw), (0x000016e8) */
+	uint32_t miv2_isr2; /*!<(rw), (0x000016ec) */
+	uint32_t miv2_mis2; /*!<(rw), (0x000016f0) */
+	uint32_t miv2_icr2; /*!<(rw), (0x000016f4) */
+	uint32_t miv2_ris2; /*!<(rw), (0x000016f8) */
+	 uint32_t _notused_16_4;
+	uint32_t miv2_mp_y_irq_offs_init;	/*!<(rw), (0x00001700) */
+	uint32_t miv2_mp_jdp_irq_offs_init;	/*!<(rw), (0x00001704) */
+	uint32_t miv2_mp_raw_irq_offs_init;	/*!<(rw), (0x00001708) */
+	uint32_t miv2_sp1_y_irq_offs_init;	/*!<(rw), (0x0000170c) */
+	uint32_t miv2_sp2_y_irq_offs_init;	/*!<(rw), (0x00001710) */
+	uint32_t miv2_sp2_raw_irq_offs_init;	/*!<(rw), (0x00001714) */
+	uint32_t miv2_mcm_raw0_irq_offs_init;	/*!<(rw), (0x00001718) */
+	uint32_t miv2_mcm_raw1_irq_offs_init;	/*!<(rw), (0x0000171c) */
+	uint32_t miv2_mp_y_irq_offs_shd;	/*!<(ro), (0x00001720) */
+	uint32_t miv2_mp_jdp_irq_offs_shd;	/*!<(ro), (0x00001724) */
+	uint32_t miv2_mp_raw_irq_offs_shd;	/*!<(ro), (0x00001728) */
+	uint32_t miv2_sp1_y_irq_offs_shd;	/*!<(ro), (0x0000172c) */
+	uint32_t miv2_sp2_y_irq_offs_shd;	/*!<(ro), (0x00001730) */
+	uint32_t miv2_sp2_raw_irq_offs_shd;	/*!<(ro), (0x00001734) */
+	uint32_t miv2_mcm_raw0_irq_offs_shd;	/*!<(ro), (0x00001738) */
+	uint32_t miv2_mcm_raw1_irq_offs_shd;	/*!<(ro), (0x0000173c) */
+
+	uint32_t _notused_16[(0x00001800 - 0x00001740) / 4];	/* gap in address space */
+#endif
+	uint32_t jpe_gen_header;	/*!< command to start stream header generation (w) MRV_JPE_BASE + 0x00000000 */
+	uint32_t jpe_encode;	/*!< Start command to start JFIF stream encoding (w) MRV_JPE_BASE + 0x00000004 */
+	uint32_t jpe_init;	/*!< Automatic configuration update (INIT) (w) MRV_JPE_BASE + 0x00000008 */
+	uint32_t jpe_y_scale_en;	/*!< Y value scaling control register (rw) MRV_JPE_BASE + 0x0000000c */
+	uint32_t jpe_cbcr_scale_en;	/*!< Cb/Cr value scaling control register (rw) MRV_JPE_BASE + 0x00000010 */
+	uint32_t jpe_table_flush;	/*!< header generation debug register (rw) MRV_JPE_BASE + 0x00000014 */
+	uint32_t jpe_enc_hsize;	/*!< JPEG codec horizontal image size for encoding (rw) MRV_JPE_BASE + 0x00000018 */
+	uint32_t jpe_enc_vsize;	/*!< JPEG codec vertical image size for encoding (rw) MRV_JPE_BASE + 0x0000001c */
+	uint32_t jpe_pic_format;	/*!< JPEG picture encoding format (rw) MRV_JPE_BASE + 0x00000020 */
+	uint32_t jpe_restart_interval;	/*!< restart marker insertion register (rw) MRV_JPE_BASE + 0x00000024 */
+	uint32_t jpe_tq_y_select;	/*!< Q- table selector 0, quant. table for Y component (rw) MRV_JPE_BASE + 0x00000028 */
+	uint32_t jpe_tq_u_select;	/*!< Q- table selector 1, quant. table for U component (rw) MRV_JPE_BASE + 0x0000002c */
+	uint32_t jpe_tq_v_select;	/*!< Q- table selector 2, quant. table for V component (rw) MRV_JPE_BASE + 0x00000030 */
+	uint32_t jpe_dc_table_select;	/*!< Huffman table selector for DC values (r) MRV_JPE_BASE + 0x00000034 */
+	uint32_t jpe_ac_table_select;	/*!< Huffman table selector for AC values (r) MRV_JPE_BASE + 0x00000038 */
+	uint32_t jpe_table_data;	/*!< table programming register (w) MRV_JPE_BASE + 0x0000003c */
+	uint32_t jpe_table_id;	/*!< table programming select register (rw) MRV_JPE_BASE + 0x00000040 */
+	uint32_t jpe_tac0_len;	/*!< Huffman AC table 0 length (rw) MRV_JPE_BASE + 0x00000044 */
+	uint32_t jpe_tdc0_len;	/*!< Huffman DC table 0 length (rw) MRV_JPE_BASE + 0x00000048 */
+	uint32_t jpe_tac1_len;	/*!< Huffman AC table 1 length (rw) MRV_JPE_BASE + 0x0000004c */
+	uint32_t jpe_tdc1_len;	/*!< Huffman DC table 1 length (rw) MRV_JPE_BASE + 0x00000050 */
+	uint32_t _notused_17[(0x00001858 - 0x00001854) / 4];	/* gap in address space */
+	uint32_t jpe_encoder_busy;	/*!< encoder status flag (r) MRV_JPE_BASE + 0x00000058 */
+	uint32_t jpe_header_mode;	/*!< header mode definition (rw) MRV_JPE_BASE + 0x0000005c */
+	uint32_t jpe_encode_mode;	/*!< encode mode (r) MRV_JPE_BASE + 0x00000060 */
+	uint32_t jpe_debug;	/*!< debug information register (r) MRV_JPE_BASE + 0x00000064 */
+	uint32_t jpe_error_imr;	/*!< JPEG error interrupt mask register (rw) MRV_JPE_BASE + 0x00000068 */
+	uint32_t jpe_error_ris;	/*!< JPEG error raw  interrupt status register (r) MRV_JPE_BASE + 0x0000006c */
+	uint32_t jpe_error_mis;	/*!< JPEG error masked interrupt status register (r) MRV_JPE_BASE + 0x00000070 */
+	uint32_t jpe_error_icr;	/*!< JPEG error interrupt set register (w) MRV_JPE_BASE + 0x00000074 */
+	uint32_t jpe_error_isr;	/*!< JPEG error interrupt clear register (w) MRV_JPE_BASE + 0x00000078 */
+	uint32_t jpe_status_imr;	/*!< JPEG status interrupt mask register (rw) MRV_JPE_BASE + 0x0000007c */
+	uint32_t jpe_status_ris;	/*!< JPEG status raw interrupt status register (r) MRV_JPE_BASE + 0x00000080 */
+	uint32_t jpe_status_mis;	/*!< JPEG status masked interrupt status register (r) MRV_JPE_BASE + 0x00000084 */
+	uint32_t jpe_status_icr;	/*!< JPEG status interrupt clear register (w) MRV_JPE_BASE + 0x00000088 */
+	uint32_t jpe_status_isr;	/*!< JPEG status interrupt set register (w) MRV_JPE_BASE + 0x0000008c */
+	uint32_t jpe_config;	/*!< JPEG configuration register (rw) MRV_JPE_BASE + 0x00000090 */
+	uint32_t _notused_18[(0x00001a00 - 0x00001894) / 4];	/* gap in address space */
+	uint32_t smia_ctrl;	/*!< global control register (rw) MRV_SMIA_BASE + 0x00000000 */
+	uint32_t smia_status;	/*!< global status register (r) MRV_SMIA_BASE + 0x00000004 */
+	uint32_t smia_imsc;	/*!< Interrupt mask (rw) MRV_SMIA_BASE + 0x00000008 */
+	uint32_t smia_ris;	/*!< Raw interrupt status (r) MRV_SMIA_BASE + 0x0000000c */
+	uint32_t smia_mis;	/*!< Masked interrupt status (r) MRV_SMIA_BASE + 0x00000010 */
+	uint32_t smia_icr;	/*!< Interrupt clear register (w) MRV_SMIA_BASE + 0x00000014 */
+	uint32_t smia_isr;	/*!< Interrupt set register (w) MRV_SMIA_BASE + 0x00000018 */
+	uint32_t smia_data_format_sel;	/*!< data format selector register (rw) MRV_SMIA_BASE + 0x0000001c */
+	uint32_t smia_sof_emb_data_lines;	/*!< start of frame embedded data lines register (rw) MRV_SMIA_BASE + 0x00000020 */
+	uint32_t smia_emb_hstart;	/*!< embedded data hstart register (rw) MRV_SMIA_BASE + 0x00000024 */
+	uint32_t smia_emb_hsize;	/*!< embedded data hsize register (rw) MRV_SMIA_BASE + 0x00000028 */
+	uint32_t smia_emb_vstart;	/*!< embedded data vstart register (rw) MRV_SMIA_BASE + 0x0000002c */
+	uint32_t smia_num_lines;	/*!< image data lines register (rw) MRV_SMIA_BASE + 0x00000030 */
+	uint32_t smia_emb_data_fifo;	/*!< Embedded Data Fifo (r) MRV_SMIA_BASE + 0x00000034 */
+	uint32_t smia_fifo_fill_level;	/*!< Embedded Data FIFO Fill Level (rw) MRV_SMIA_BASE + 0x00000038 */
+	uint32_t _notused_19[(0x00001c00 - 0x00001a3c) / 4];	/* gap in address space */
+	uint32_t mipi_ctrl;	/*!< global control register (rw) MRV_MIPI_BASE + 0x00000000 */
+	uint32_t mipi_status;	/*!< global status register (r) MRV_MIPI_BASE + 0x00000004 */
+	uint32_t mipi_imsc;	/*!< Interrupt mask (rw) MRV_MIPI_BASE + 0x00000008 */
+	uint32_t mipi_ris;	/*!< Raw interrupt status (r) MRV_MIPI_BASE + 0x0000000c */
+	uint32_t mipi_mis;	/*!< Masked interrupt status (r) MRV_MIPI_BASE + 0x00000010 */
+	uint32_t mipi_icr;	/*!< Interrupt clear register (w) MRV_MIPI_BASE + 0x00000014 */
+	uint32_t mipi_isr;	/*!< Interrupt set register (w) MRV_MIPI_BASE + 0x00000018 */
+	uint32_t mipi_cur_data_id;	/*!< Current Data Identifier (r) MRV_MIPI_BASE + 0x0000001c */
+	uint32_t mipi_img_data_sel;	/*!< Image Data Selector (rw) MRV_MIPI_BASE + 0x00000020 */
+	uint32_t mipi_add_data_sel_1;	/*!< Additional Data Selector 1 (rw) MRV_MIPI_BASE + 0x00000024 */
+	uint32_t mipi_add_data_sel_2;	/*!< Additional Data Selector 2 (rw) MRV_MIPI_BASE + 0x00000028 */
+	uint32_t mipi_add_data_sel_3;	/*!< Additional Data Selector 3 (rw) MRV_MIPI_BASE + 0x0000002c */
+	uint32_t mipi_add_data_sel_4;	/*!< Additional Data Selector 4 (rw) MRV_MIPI_BASE + 0x00000030 */
+	uint32_t mipi_add_data_fifo;	/*!< Additional Data Fifo (r) MRV_MIPI_BASE + 0x00000034 */
+	uint32_t mipi_add_data_fill_level;	/*!< Additional Data FIFO Fill Level (rw) MRV_MIPI_BASE + 0x00000038 */
+	uint32_t mipi_compressed_mode;	/*!< controls processing of compressed raw data types (rw) MRV_MIPI_BASE + 0x0000003c */
+	uint32_t mipi_frame;	/*!< frame number from frame start and frame end short packets (r) MRV_MIPI_BASE + 0x00000040 */
+	uint32_t mipi_gen_short_dt;	/*!< data type flags for received generic short packets (r) MRV_MIPI_BASE + 0x00000044 */
+	uint32_t mipi_gen_short_8_9;	/*!< data field for generic short packets of data type 0x8 and 0x9 (r) MRV_MIPI_BASE + 0x00000048 */
+	uint32_t mipi_gen_short_a_b;	/*!< data field for generic short packets of data type 0xA and 0xB (r) MRV_MIPI_BASE + 0x0000004c */
+	uint32_t mipi_gen_short_c_d;	/*!< data field for generic short packets of data type 0xC and 0xD (r) MRV_MIPI_BASE + 0x00000050 */
+	uint32_t mipi_gen_short_e_f;	/*!< data field for generic short packets of data type 0xE and 0xF (r) MRV_MIPI_BASE + 0x00000054 */
+	uint32_t _notused_21[(0x00002000 - 0x00001c58) / 4];	/* gap in address space */
+	uint32_t isp_afm_ctrl;	/*!< This is the control register for AF measurement unit (rw) MRV_AFM_BASE + 0x00000000 */
+	uint32_t isp_afm_lt_a;	/*!< Top Left corner of measure window A (rw) MRV_AFM_BASE + 0x00000004 */
+	uint32_t isp_afm_rb_a;	/*!< Bottom right corner of measure window A (rw) MRV_AFM_BASE + 0x00000008 */
+	uint32_t isp_afm_lt_b;	/*!< Top left corner of measure window B (rw) MRV_AFM_BASE + 0x0000000c */
+	uint32_t isp_afm_rb_b;	/*!< Bottom right corner of measure window B (rw) MRV_AFM_BASE + 0x00000010 */
+	uint32_t isp_afm_lt_c;	/*!< Top left corner of measure window C (rw) MRV_AFM_BASE + 0x00000014 */
+	uint32_t isp_afm_rb_c;	/*!< Bottom right corner of measure window C (rw) MRV_AFM_BASE + 0x00000018 */
+	uint32_t isp_afm_thres;	/*!< Threshold register (rw) MRV_AFM_BASE + 0x0000001c */
+	uint32_t isp_afm_var_shift;	/*!< Variable shift register (rw) MRV_AFM_BASE + 0x00000020 */
+	uint32_t isp_afm_sum_a;	/*!< Sharpness Value Status Register of Window A (r) MRV_AFM_BASE + 0x00000024 */
+	uint32_t isp_afm_sum_b;	/*!< Sharpness Value Status Register of Window B (r) MRV_AFM_BASE + 0x00000028 */
+	uint32_t isp_afm_sum_c;	/*!< Sharpness Value Status Register of Window C (r) MRV_AFM_BASE + 0x0000002c */
+	uint32_t isp_afm_lum_a;	/*!< Luminance Value Status Register of Window A (r) MRV_AFM_BASE + 0x00000030 */
+	uint32_t isp_afm_lum_b;	/*!< Luminance Value Status Register of Window B (r) MRV_AFM_BASE + 0x00000034 */
+	uint32_t isp_afm_lum_c;	/*!< Luminance Value Status Register of Window C (r) MRV_AFM_BASE + 0x00000038 */
+#ifdef ISP_HIST256
+	uint32_t _notused_22_0[(0x00002100 - 0x0000203c) / 4];	/* gap in address space */
+	uint32_t isp_hist256_prop;	/*!< Register of  hist 256, address 0x00002100 */
+	uint32_t isp_hist256_h_offs;	/*!< Register of  hist 256, address 0x00002104 */
+	uint32_t isp_hist256_v_offs;	/*!< Register of  hist 256, address 0x00002108 */
+	uint32_t isp_hist256_h_size;	/*!< Register of  hist 256, address 0x0000210c */
+	uint32_t isp_hist256_v_size;	/*!< Register of  hist 256, address 0x00002110 */
+	uint32_t isp_hist256_bin_n;	/*!< Register of  hist 256, address 0x00002114 */
+	uint32_t _notused_22_1[(0x00002154 - 0x00002118) / 4];	/* gap in address space */
+	uint32_t isp_hist256_weight_00to30;	/*!< Register of  hist 256, address 0x00002154 */
+	uint32_t isp_hist256_weight_40to21;	/*!< Register of  hist 256, address 0x00002158 */
+	uint32_t isp_hist256_weight_31to12;	/*!< Register of  hist 256, address 0x0000215C */
+	uint32_t isp_hist256_weight_22to03;	/*!< Register of  hist 256, address 0x00002160 */
+	uint32_t isp_hist256_weight_13to43;	/*!< Register of  hist 256, address 0x00002164 */
+	uint32_t isp_hist256_weight_04to34;	/*!< Register of  hist 256, address 0x00002168; */
+	uint32_t isp_hist256_weight_44;	/*!< Register of  hist 256, address 0x0000216C */
+	uint32_t _notused_22[(0x00002200 - 0x00002170) / 4];	/* gap in address space */
+#else
+	uint32_t _notused_22[(0x00002200 - 0x0000203c) / 4];	/* gap in address space */
+#endif
+	uint32_t isp_lsc_ctrl;	/*!< Lens shade control (rw) MRV_LSC_BASE + 0x00000000 */
+	uint32_t isp_lsc_r_table_addr;	/*!< Table RAM Address for red component (rwhh) MRV_LSC_BASE + 0x00000004 */
+	uint32_t isp_lsc_gr_table_addr;	/*!< Table RAM Address for green (red) component (rwhh) MRV_LSC_BASE + 0x00000008 */
+	uint32_t isp_lsc_b_table_addr;	/*!< Table RAM Address for blue component (rwhh) MRV_LSC_BASE + 0x0000000c */
+	uint32_t isp_lsc_gb_table_addr;	/*!< Table RAM Address for green (blue) component (rwhh) MRV_LSC_BASE + 0x00000010 */
+	uint32_t isp_lsc_r_table_data;	/*!< Sample table red (rw) MRV_LSC_BASE + 0x00000014 */
+	uint32_t isp_lsc_gr_table_data;	/*!< Sample table green (red) (rw) MRV_LSC_BASE + 0x00000018 */
+	uint32_t isp_lsc_b_table_data;	/*!< Sample table blue (rw) MRV_LSC_BASE + 0x0000001c */
+	uint32_t isp_lsc_gb_table_data;	/*!< Sample table green (blue) (rw) MRV_LSC_BASE + 0x00000020 */
+	uint32_t isp_lsc_xgrad_01;	/*!< Gradient table x (rw) MRV_LSC_BASE + 0x00000024 */
+	uint32_t isp_lsc_xgrad_23;	/*!< Gradient table x (rw) MRV_LSC_BASE + 0x00000028 */
+	uint32_t isp_lsc_xgrad_45;	/*!< Gradient table x (rw) MRV_LSC_BASE + 0x0000002c */
+	uint32_t isp_lsc_xgrad_67;	/*!< Gradient table x (rw) MRV_LSC_BASE + 0x00000030 */
+	uint32_t isp_lsc_ygrad_01;	/*!< Gradient table y (rw) MRV_LSC_BASE + 0x00000034 */
+	uint32_t isp_lsc_ygrad_23;	/*!< Gradient table y (rw) MRV_LSC_BASE + 0x00000038 */
+	uint32_t isp_lsc_ygrad_45;	/*!< Gradient table y (rw) MRV_LSC_BASE + 0x0000003c */
+	uint32_t isp_lsc_ygrad_67;	/*!< Gradient table y (rw) MRV_LSC_BASE + 0x00000040 */
+	uint32_t isp_lsc_xsize_01;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000044 */
+	uint32_t isp_lsc_xsize_23;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000048 */
+	uint32_t isp_lsc_xsize_45;	/*!< Size table (rw) MRV_LSC_BASE + 0x0000004c */
+	uint32_t isp_lsc_xsize_67;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000050 */
+	uint32_t isp_lsc_ysize_01;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000054 */
+	uint32_t isp_lsc_ysize_23;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000058 */
+	uint32_t isp_lsc_ysize_45;	/*!< Size table (rw) MRV_LSC_BASE + 0x0000005c */
+	uint32_t isp_lsc_ysize_67;	/*!< Size table (rw) MRV_LSC_BASE + 0x00000060 */
+	uint32_t isp_lsc_table_sel;	/*!< Lens shade table set selection (rw) MRV_LSC_BASE + 0x00000064 */
+	uint32_t isp_lsc_status;	/*!< Lens shade status (r) MRV_LSC_BASE + 0x00000068 */
+	uint32_t _notused_23[(0x00002300 - 0x0000226c) / 4];	/* gap in address space */
+	uint32_t isp_is_ctrl;	/*!< Image Stabilization Control Register (rw) MRV_IS_BASE + 0x00000000 */
+	uint32_t isp_is_recenter;	/*!< Recenter register (rw) MRV_IS_BASE + 0x00000004 */
+	uint32_t isp_is_h_offs;	/*!< Horizontal offset of output window (rw) MRV_IS_BASE + 0x00000008 */
+	uint32_t isp_is_v_offs;	/*!< Vertical offset of output window (rw) MRV_IS_BASE + 0x0000000c */
+	uint32_t isp_is_h_size;	/*!< Output horizontal picture size (rw) MRV_IS_BASE + 0x00000010 */
+	uint32_t isp_is_v_size;	/*!< Output vertical picture size (rw) MRV_IS_BASE + 0x00000014 */
+	uint32_t isp_is_max_dx;	/*!< Maximum Horizontal Displacement (rw) MRV_IS_BASE + 0x00000018 */
+	uint32_t isp_is_max_dy;	/*!< Maximum Vertical Displacement (rw) MRV_IS_BASE + 0x0000001c */
+	uint32_t isp_is_displace;	/*!< Camera displacement (rw) MRV_IS_BASE + 0x00000020 */
+	uint32_t isp_is_h_offs_shd;	/*!< current horizontal offset of output window (shadow register) (r) MRV_IS_BASE + 0x00000024 */
+	uint32_t isp_is_v_offs_shd;	/*!< current vertical offset of output window (shadow register) (r) MRV_IS_BASE + 0x00000028 */
+	uint32_t isp_is_h_size_shd;	/*!< current output horizontal picture size (shadow register) (r) MRV_IS_BASE + 0x0000002c */
+	uint32_t isp_is_v_size_shd;	/*!< current output vertical picture size (shadow register) (r) MRV_IS_BASE + 0x00000030 */
+#ifdef ISP_RAWIS
+	uint32_t _notused_23_1[(0x00002340 - 0x00002334) / 4];	/* gap in address space */
+	uint32_t isp_raw_is_ctrl;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002340 */
+	uint32_t isp_raw_is_recenter;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002344 */
+	uint32_t isp_raw_is_h_offs;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002348 */
+	uint32_t isp_raw_is_v_offs;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x0000234c */
+	uint32_t isp_raw_is_h_size;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002350 */
+	uint32_t isp_raw_is_v_size;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002354 */
+	uint32_t isp_raw_is_max_dx;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002358 */
+	uint32_t isp_raw_is_max_dy;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x0000235c */
+	uint32_t isp_raw_is_displace;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002360 */
+	uint32_t isp_raw_is_h_offs_shd;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002364 */
+	uint32_t isp_raw_is_v_offs_shd;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002368 */
+	uint32_t isp_raw_is_h_size_shd;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x0000236c */
+	uint32_t isp_raw_is_v_size_shd;	/*!< current output vertical picture size shadow register r MRV_IS_BASE0x00002370 */
+	uint32_t _notused_24[(0x00002400 - 0x00002374) / 4];	/* gap in address space */
+#else
+	uint32_t _notused_24[(0x00002400 - 0x00002334) / 4];	/* gap in address space */
+#endif
+	uint32_t isp_hist_prop;	/*!< Histogram properties (rw) MRV_HIST_BASE + 0x00000000 */
+	uint32_t isp_hist_h_offs;	/*!< Histogram window horizontal offset for first window of 25 sub-windows (rw) MRV_HIST_BASE + 0x00000004 */
+	uint32_t isp_hist_v_offs;	/*!< Histogram window vertical offset for first window of 25 sub-windows (rw) MRV_HIST_BASE + 0x00000008 */
+	uint32_t isp_hist_h_size;	/*!< Horizontal (sub-)window size (rw) MRV_HIST_BASE + 0x0000000c */
+	uint32_t isp_hist_v_size;	/*!< Vertical (sub-)window size (rw) MRV_HIST_BASE + 0x00000010 */
+	histogram_measurement_result_t histogram_measurement_result_arr[HISTOGRAM_MEASUREMENT_RESULT_ARR_SIZE];	/*!< histogram_measurement_result MRV_HIST_BASE + 20 + (n*0x4) (n=0..15) */
+	uint32_t isp_hist_weight_00to30;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x00000054 */
+	uint32_t isp_hist_weight_40to21;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x00000058 */
+	uint32_t isp_hist_weight_31to12;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x0000005c */
+	uint32_t isp_hist_weight_22to03;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x00000060 */
+	uint32_t isp_hist_weight_13to43;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x00000064 */
+	uint32_t isp_hist_weight_04to34;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x00000068 */
+	uint32_t isp_hist_weight_44;	/*!< Weighting factor for sub-windows (rw) MRV_HIST_BASE + 0x0000006c */
+	uint32_t _notused_25[(0x00002500 - 0x00002470) / 4];	/* gap in address space */
+	uint32_t isp_filt_mode;	/*!< mode control register for the filter block (rw) MRV_FILT_BASE + 0x00000000 */
+	uint32_t _notused_26[(0x00002528 - 0x00002504) / 4];	/* gap in address space */
+	uint32_t isp_filt_thresh_bl0;	/*!< Blurring threshold 0 (rw) MRV_FILT_BASE + 0x00000028 */
+	uint32_t isp_filt_thresh_bl1;	/*!< Blurring threshold 1 (rw) MRV_FILT_BASE + 0x0000002c */
+	uint32_t isp_filt_thresh_sh0;	/*!< Sharpening threshold 0 (rw) MRV_FILT_BASE + 0x00000030 */
+	uint32_t isp_filt_thresh_sh1;	/*!< Sharpening threshold 1 (rw) MRV_FILT_BASE + 0x00000034 */
+	uint32_t isp_filt_lum_weight;	/*!< Parameters for luminance weight function (rw) MRV_FILT_BASE + 0x00000038 */
+	uint32_t isp_filt_fac_sh1;	/*!< filter factor sharp1 (rw) MRV_FILT_BASE + 0x0000003c */
+	uint32_t isp_filt_fac_sh0;	/*!< filter factor sharp0 (rw) MRV_FILT_BASE + 0x00000040 */
+	uint32_t isp_filt_fac_mid;	/*!< filter factor middle (rw) MRV_FILT_BASE + 0x00000044 */
+	uint32_t isp_filt_fac_bl0;	/*!< Parameter for blur 0 filter (rw) MRV_FILT_BASE + 0x00000048 */
+	uint32_t isp_filt_fac_bl1;	/*!< Parameter for blur 1 filter (rw) MRV_FILT_BASE + 0x0000004c */
+	uint32_t _notused_27[(0x00002580 - 0x00002550) / 4];	/* gap in address space */
+	uint32_t isp_cac_ctrl;	/*!< Control register for chromatic aberration correction (rw) MRV_CAC_BASE + 0x00000000 */
+	uint32_t isp_cac_count_start;	/*!< Preload values for CAC pixel and line counter (rw) MRV_CAC_BASE + 0x00000004 */
+	uint32_t isp_cac_a;	/*!< Linear Parameters for radial shift calculation (rw) MRV_CAC_BASE + 0x00000008 */
+	uint32_t isp_cac_b;	/*!< Square Parameters for radial shift calculation (rw) MRV_CAC_BASE + 0x0000000c */
+	uint32_t isp_cac_c;	/*!< Cubical Parameters for radial shift calculation (rw) MRV_CAC_BASE + 0x00000010 */
+	uint32_t isp_cac_x_norm;	/*!< Normalization parameters for calculation of image coordinate x_d relative to optical center (rw) MRV_CAC_BASE + 0x00000014 */
+	uint32_t isp_cac_y_norm;	/*!< Normalization parameters for calculation of image coordinate y_d relative to optical center (rw) MRV_CAC_BASE + 0x00000018 */
+	uint32_t _notused_28[(0x00002600 - 0x0000259c) / 4];	/* gap in address space */
+	uint32_t isp_exp_ctrl;	/*!< Exposure control (rw) MRV_AE_BASE + 0x00000000 */
+	uint32_t isp_exp_h_offset;	/*!< Horizontal offset for first block (rw) MRV_AE_BASE + 0x00000004 */
+	uint32_t isp_exp_v_offset;	/*!< Vertical offset for first block (rw) MRV_AE_BASE + 0x00000008 */
+	uint32_t isp_exp_h_size;	/*!< Horizontal size of one block (rw) MRV_AE_BASE + 0x0000000c */
+	uint32_t isp_exp_v_size;	/*!< Vertical size of one block (rw) MRV_AE_BASE + 0x00000010 */
+	uint32_t isp_exp_mean_00;	/*!< Mean luminance value of block 00 (r) MRV_AE_BASE + 0x00000014 */
+	uint32_t isp_exp_mean_10;	/*!< Mean luminance value of block 10 (r) MRV_AE_BASE + 0x00000018 */
+	uint32_t isp_exp_mean_20;	/*!< Mean luminance value of block 20 (r) MRV_AE_BASE + 0x0000001c */
+	uint32_t isp_exp_mean_30;	/*!< Mean luminance value of block 30 (r) MRV_AE_BASE + 0x00000020 */
+	uint32_t isp_exp_mean_40;	/*!< Mean luminance value of block 40 (r) MRV_AE_BASE + 0x00000024 */
+	uint32_t isp_exp_mean_01;	/*!< Mean luminance value of block 01 (r) MRV_AE_BASE + 0x00000028 */
+	uint32_t isp_exp_mean_11;	/*!< Mean luminance value of block 11 (r) MRV_AE_BASE + 0x0000002c */
+	uint32_t isp_exp_mean_21;	/*!< Mean luminance value of block 21 (r) MRV_AE_BASE + 0x00000030 */
+	uint32_t isp_exp_mean_31;	/*!< Mean luminance value of block 31 (r) MRV_AE_BASE + 0x00000034 */
+	uint32_t isp_exp_mean_41;	/*!< Mean luminance value of block 41 (r) MRV_AE_BASE + 0x00000038 */
+	uint32_t isp_exp_mean_02;	/*!< Mean luminance value of block 02 (r) MRV_AE_BASE + 0x0000003c */
+	uint32_t isp_exp_mean_12;	/*!< Mean luminance value of block 12 (r) MRV_AE_BASE + 0x00000040 */
+	uint32_t isp_exp_mean_22;	/*!< Mean luminance value of block 22 (r) MRV_AE_BASE + 0x00000044 */
+	uint32_t isp_exp_mean_32;	/*!< Mean luminance value of block 32 (r) MRV_AE_BASE + 0x00000048 */
+	uint32_t isp_exp_mean_42;	/*!< Mean luminance value of block 42 (r) MRV_AE_BASE + 0x0000004c */
+	uint32_t isp_exp_mean_03;	/*!< Mean luminance value of block 03 (r) MRV_AE_BASE + 0x00000050 */
+	uint32_t isp_exp_mean_13;	/*!< Mean luminance value of block 13 (r) MRV_AE_BASE + 0x00000054 */
+	uint32_t isp_exp_mean_23;	/*!< Mean luminance value of block 23 (r) MRV_AE_BASE + 0x00000058 */
+	uint32_t isp_exp_mean_33;	/*!< Mean luminance value of block 33 (r) MRV_AE_BASE + 0x0000005c */
+	uint32_t isp_exp_mean_43;	/*!< Mean luminance value of block 43 (r) MRV_AE_BASE + 0x00000060 */
+	uint32_t isp_exp_mean_04;	/*!< Mean luminance value of block 04 (r) MRV_AE_BASE + 0x00000064 */
+	uint32_t isp_exp_mean_14;	/*!< Mean luminance value of block 14 (r) MRV_AE_BASE + 0x00000068 */
+	uint32_t isp_exp_mean_24;	/*!< Mean luminance value of block 24 (r) MRV_AE_BASE + 0x0000006c */
+	uint32_t isp_exp_mean_34;	/*!< Mean luminance value of block 34 (r) MRV_AE_BASE + 0x00000070 */
+	uint32_t isp_exp_mean_44;	/*!< Mean luminance value of block 44 (r) MRV_AE_BASE + 0x00000074 */
+#ifdef ISP_AE_SHADOW
+	uint32_t isp_exp_h_offset_shd;	/*!< Mean luminance value of block 44 (r) MRV_AE_BASE + 0x00000078 */
+	uint32_t isp_exp_v_offset_shd;	/*!< Mean luminance value of block 44 (r) MRV_AE_BASE + 0x0000007C */
+	uint32_t isp_exp_h_size_shd;	/*!< Mean luminance value of block 44 (r) MRV_AE_BASE + 0x00000080 */
+	uint32_t isp_exp_v_size_shd;	/*!< Mean luminance value of block 44 (r) MRV_AE_BASE + 0x00000084 */
+	uint32_t _notused_isp_exp[(0x000026A0 - 0x00002688) / 4];
+	uint32_t isp_expv2_ctrl;	/* 0x000026A0; */
+	uint32_t isp_expv2_offset;	/* 0x000026A4; */
+	uint32_t isp_expv2_size;	/* 0x000026A8; */
+	uint32_t isp_expv2_size_invert;	/* 0x000026AC; */
+	uint32_t isp_expv2_pixel_weight;	/* 0x000026B0; */
+	uint32_t isp_expv2_offset_shd;	/* 0x000026B4; */
+	uint32_t isp_expv2_size_shd;	/* 0x000026B8; */
+	uint32_t isp_expv2_size_invert_shd;	/* 0x000026BC; */
+	uint32_t _notused_29[(0x00002700 - 0x000026C0) / 4];	/* gap in address space */
+#else
+	uint32_t _notused_isp_exp[(0x00002680 - 0x00002678) / 4];
+	uint32_t isp_expv2_ctrl;	/* 0x00002680; */
+	uint32_t isp_expv2_offset;	/* 0x00002684; */
+	uint32_t isp_expv2_size;	/* 0x00002688; */
+	uint32_t isp_expv2_size_invert;	/* 0x0000268c; */
+	uint32_t isp_expv2_pixel_weight;	/* 0x00002690; */
+	uint32_t _notused_29[(0x00002700 - 0x00002694) / 4];	/* gap in address space */
+#endif
+	uint32_t isp_bls_ctrl;	/*!< global control register (rw) MRV_BLS_BASE + 0x00000000 */
+	uint32_t isp_bls_samples;	/*!< samples register (rw) MRV_BLS_BASE + 0x00000004 */
+	uint32_t isp_bls_h1_start;	/*!< window 1 horizontal start (rw) MRV_BLS_BASE + 0x00000008 */
+	uint32_t isp_bls_h1_stop;	/*!< window 1 horizontal stop (rw) MRV_BLS_BASE + 0x0000000c */
+	uint32_t isp_bls_v1_start;	/*!< window 1 vertical start (rw) MRV_BLS_BASE + 0x00000010 */
+	uint32_t isp_bls_v1_stop;	/*!< window 1 vertical stop (rw) MRV_BLS_BASE + 0x00000014 */
+	uint32_t isp_bls_h2_start;	/*!< window 2 horizontal start (rw) MRV_BLS_BASE + 0x00000018 */
+	uint32_t isp_bls_h2_stop;	/*!< window 2 horizontal stop (rw) MRV_BLS_BASE + 0x0000001c */
+	uint32_t isp_bls_v2_start;	/*!< window 2 vertical start (rw) MRV_BLS_BASE + 0x00000020 */
+	uint32_t isp_bls_v2_stop;	/*!< window 2 vertical stop (rw) MRV_BLS_BASE + 0x00000024 */
+	uint32_t isp_bls_a_fixed;	/*!< fixed black level A (rw) MRV_BLS_BASE + 0x00000028 */
+	uint32_t isp_bls_b_fixed;	/*!< fixed black level B (rw) MRV_BLS_BASE + 0x0000002c */
+	uint32_t isp_bls_c_fixed;	/*!< fixed black level C (rw) MRV_BLS_BASE + 0x00000030 */
+	uint32_t isp_bls_d_fixed;	/*!< fixed black level D (rw) MRV_BLS_BASE + 0x00000034 */
+	uint32_t isp_bls_a_measured;	/*!< measured black level A (r) MRV_BLS_BASE + 0x00000038 */
+	uint32_t isp_bls_b_measured;	/*!< measured black level B (r) MRV_BLS_BASE + 0x0000003c */
+	uint32_t isp_bls_c_measured;	/*!< measured black level C (r) MRV_BLS_BASE + 0x00000040 */
+	uint32_t isp_bls_d_measured;	/*!< measured black level D (r) MRV_BLS_BASE + 0x00000044 */
+	uint32_t _notused_30[(0x00002800 - 0x00002748) / 4];	/* gap in address space */
+	uint32_t isp_dpf_mode;	/*!< Mode control for Denoising Pre-Filter block (rw) MRV_DPF_BASE + 0x00000000 */
+	uint32_t isp_dpf_strength_r;	/*!< filter strength of the RED filter (rw) MRV_DPF_BASE + 0x00000004 */
+	uint32_t isp_dpf_strength_g;	/*!< filter strength of the GREEN filter (rw) MRV_DPF_BASE + 0x00000008 */
+	uint32_t isp_dpf_strength_b;	/*!< filter strength of the BLUE filter (rw) MRV_DPF_BASE + 0x0000000c */
+	uint32_t isp_dpf_s_weight_g_1_4;	/*!< Spatial Weights green channel 1 2 3 4 (rw) MRV_DPF_BASE + 0x00000010 */
+	uint32_t isp_dpf_s_weight_g_5_6;	/*!< Spatial Weights green channel 5 6 (rw) MRV_DPF_BASE + 0x00000014 */
+	uint32_t isp_dpf_s_weight_rb_1_4;	/*!< Spatial Weights red/blue channels 1 2 3 4 (rw) MRV_DPF_BASE + 0x00000018 */
+	uint32_t isp_dpf_s_weight_rb_5_6;	/*!< Spatial Weights red/blue channels 5 6 (rw) MRV_DPF_BASE + 0x0000001c */
+	nlf_lookup_table_block_t nlf_lookup_table_block_arr[NLF_LOOKUP_TABLE_BLOCK_ARR_SIZE];	/*!< nlf_lookup_table_block MRV_DPF_BASE + 32 + (n*0x4) (n=0..16) */
+	uint32_t isp_dpf_nf_gain_r;	/*!< noise function gain for red pixels (rw) MRV_DPF_BASE + 0x00000064 */
+	uint32_t isp_dpf_nf_gain_gr;	/*!< noise function gain for green in red pixels (rw) MRV_DPF_BASE + 0x00000068 */
+	uint32_t isp_dpf_nf_gain_gb;	/*!< noise function gain for green in blue pixels (rw) MRV_DPF_BASE + 0x0000006c */
+	uint32_t isp_dpf_nf_gain_b;	/*!< noise function gain for blue pixels (rw) MRV_DPF_BASE + 0x00000070 */
+	uint32_t _notused_31[(0x00002900 - 0x00002874) / 4];	/* gap in address space */
+	uint32_t isp_dpcc_mode;	/*!< Mode control for DPCC detection unit (rw) MRV_DPCC_BASE + 0x00000000 */
+	uint32_t isp_dpcc_output_mode;	/*!< Interpolation mode for correction unit (rw) MRV_DPCC_BASE + 0x00000004 */
+	uint32_t isp_dpcc_set_use;	/*!< DPCC methods set usage for detection (rw) MRV_DPCC_BASE + 0x00000008 */
+	uint32_t isp_dpcc_methods_set_1;	/*!< Methods enable bits for SET_1 (rw) MRV_DPCC_BASE + 0x0000000c */
+	uint32_t isp_dpcc_methods_set_2;	/*!< Methods enable bits for SET_2 (rw) MRV_DPCC_BASE + 0x00000010 */
+	uint32_t isp_dpcc_methods_set_3;	/*!< Methods enable bits for SET_3 (rw) MRV_DPCC_BASE + 0x00000014 */
+	uint32_t isp_dpcc_line_thresh_1;	/*!< Line threshold SET_1 (rw) MRV_DPCC_BASE + 0x00000018 */
+	uint32_t isp_dpcc_line_mad_fac_1;	/*!< Mean Absolute Difference (MAD) factor for Line check set 1 (rw) MRV_DPCC_BASE + 0x0000001c */
+	uint32_t isp_dpcc_pg_fac_1;	/*!< Peak gradient factor for set 1 (rw) MRV_DPCC_BASE + 0x00000020 */
+	uint32_t isp_dpcc_rnd_thresh_1;	/*!< Rank Neighbor Difference threshold for set 1 (rw) MRV_DPCC_BASE + 0x00000024 */
+	uint32_t isp_dpcc_rg_fac_1;	/*!< Rank gradient factor for set 1 (rw) MRV_DPCC_BASE + 0x00000028 */
+	uint32_t isp_dpcc_line_thresh_2;	/*!< Line threshold set 2 (rw) MRV_DPCC_BASE + 0x0000002c */
+	uint32_t isp_dpcc_line_mad_fac_2;	/*!< Mean Absolute Difference (MAD) factor for Line check set 2 (rw) MRV_DPCC_BASE + 0x00000030 */
+	uint32_t isp_dpcc_pg_fac_2;	/*!< Peak gradient factor for set 2 (rw) MRV_DPCC_BASE + 0x00000034 */
+	uint32_t isp_dpcc_rnd_thresh_2;	/*!< Rank Neighbor Difference threshold for set 2 (rw) MRV_DPCC_BASE + 0x00000038 */
+	uint32_t isp_dpcc_rg_fac_2;	/*!< Rank gradient factor for set 2 (rw) MRV_DPCC_BASE + 0x0000003c */
+	uint32_t isp_dpcc_line_thresh_3;	/*!< Line threshold set 3 (rw) MRV_DPCC_BASE + 0x00000040 */
+	uint32_t isp_dpcc_line_mad_fac_3;	/*!< Mean Absolute Difference (MAD) factor for Line check set 3 (rw) MRV_DPCC_BASE + 0x00000044 */
+	uint32_t isp_dpcc_pg_fac_3;	/*!< Peak gradient factor for set 3 (rw) MRV_DPCC_BASE + 0x00000048 */
+	uint32_t isp_dpcc_rnd_thresh_3;	/*!< Rank Neighbor Difference threshold for set 3 (rw) MRV_DPCC_BASE + 0x0000004c */
+	uint32_t isp_dpcc_rg_fac_3;	/*!< Rank gradient factor for set 3 (rw) MRV_DPCC_BASE + 0x00000050 */
+	uint32_t isp_dpcc_ro_limits;	/*!< Rank Order Limits (rw) MRV_DPCC_BASE + 0x00000054 */
+	uint32_t isp_dpcc_rnd_offs;	/*!< Differential Rank Offsets for Rank Neighbor Difference (rw) MRV_DPCC_BASE + 0x00000058 */
+	uint32_t isp_dpcc_bpt_ctrl;	/*!< bad pixel table settings (rw) MRV_DPCC_BASE + 0x0000005c */
+	uint32_t isp_dpcc_bpt_number;	/*!< Number of entries for bad pixel table (table based correction) (rw) MRV_DPCC_BASE + 0x00000060 */
+	uint32_t isp_dpcc_bpt_addr;	/*!< TABLE Start Address for table-based correction algorithm (rwhh) MRV_DPCC_BASE + 0x00000064 */
+	uint32_t isp_dpcc_bpt_data;	/*!< TABLE DATA register for read and write access of table RAM (rwhh) MRV_DPCC_BASE + 0x00000068 */
+	uint32_t _notused_32[(0x00002a00 - 0x0000296c) / 4];	/* gap in address space */
+	uint32_t isp_wdr_ctrl;	/*!< Control Bits for Wide Dynamic Range Unit (rw) MRV_WDR_BASE + 0x00000000 */
+	uint32_t isp_wdr_tonecurve_1;	/*!< Tone Curve sample points dYn definition (part 1) (rw) MRV_WDR_BASE + 0x00000004 */
+	uint32_t isp_wdr_tonecurve_2;	/*!< Tone Curve sample points dYn definition (part 2) (rw) MRV_WDR_BASE + 0x00000008 */
+	uint32_t isp_wdr_tonecurve_3;	/*!< Tone Curve sample points dYn definition (part 3) (rw) MRV_WDR_BASE + 0x0000000c */
+	uint32_t isp_wdr_tonecurve_4;	/*!< Tone Curve sample points dYn definition (part 4) (rw) MRV_WDR_BASE + 0x00000010 */
+	wdr_tone_mapping_curve_y_block_t wdr_tone_mapping_curve_y_block_arr[WDR_TONE_MAPPING_CURVE_Y_BLOCK_ARR_SIZE];	/*!< wdr_tone_mapping_curve_y_block MRV_WDR_BASE + 20 + (n*0x4) (n=0..32) */
+	uint32_t isp_wdr_offset;	/*!< Offset values for RGB path (rw) MRV_WDR_BASE + 0x00000098 */
+	uint32_t isp_wdr_deltamin;	/*!< DeltaMin Threshold and Strength factor (rw) MRV_WDR_BASE + 0x0000009c */
+	uint32_t isp_wdr_tonecurve_1_shd;	/*!< Tone Curve sample points dYn definition shadow register (part 1) (r) MRV_WDR_BASE + 0x000000a0 */
+	uint32_t isp_wdr_tonecurve_2_shd;	/*!< Tone Curve sample points dYn definition shadow register (part 2) (r) MRV_WDR_BASE + 0x000000a4 */
+	uint32_t isp_wdr_tonecurve_3_shd;	/*!< Tone Curve sample points dYn definition shadow register (part 3) (r) MRV_WDR_BASE + 0x000000a8 */
+	uint32_t isp_wdr_tonecurve_4_shd;	/*!< Tone Curve sample points dYn definition shadow register(part 4) (r) MRV_WDR_BASE + 0x000000ac */
+	wdr_tone_mapping_curve_y_shd_block_t wdr_tone_mapping_curve_y_shd_block_arr[WDR_TONE_MAPPING_CURVE_Y_SHD_BLOCK_ARR_SIZE];	/*!< wdr_tone_mapping_curve_y_shd_block MRV_WDR_BASE + 176 + (n*0x4) (n=0..32) */
+	uint32_t _notused_33[(0x00002c00 - 0x00002b34) / 4];	/* gap in address space */
+	uint32_t awb_meas_mode;	/*!< AWB Measure Mode (rw) ISP_AWB_BASE + 0x00000000 */
+	uint32_t awb_meas_h_offs;	/*!< AWB window horizontal offset (rw) ISP_AWB_BASE + 0x00000004 */
+	uint32_t awb_meas_v_offs;	/*!< AWB window vertical offset (rw) ISP_AWB_BASE + 0x00000008 */
+	uint32_t awb_meas_h_size;	/*!< Horizontal window size (rw) ISP_AWB_BASE + 0x0000000c */
+	uint32_t awb_meas_v_size;	/*!< Vertical window size (rw) ISP_AWB_BASE + 0x00000010 */
+	uint32_t awb_meas_r_min_max;	/*!< Min Max Compare Red (rw) ISP_AWB_BASE + 0x00000014 */
+	uint32_t awb_meas_g_min_max;	/*!< Min Max Compare Green (rw) ISP_AWB_BASE + 0x00000018 */
+	uint32_t awb_meas_b_min_max;	/*!< Min Max Compare Blue (rw) ISP_AWB_BASE + 0x0000001c */
+	uint32_t awb_meas_divider_min;	/*!< Min Compare Divider (rw) ISP_AWB_BASE + 0x00000020 */
+	uint32_t awb_meas_csc_coeff[9];	/*!< Color conversion coefficient 0 (rw) ISP_AWB_BASE + 0x00000024 */
+	elawb_ellipse_pt awb_meas_center[8];	/*!< Ellipse 1 Center X (rw) ISP_AWB_BASE + 0x00000048 */
+	elawb_ellipse_axis awb_meas_axis[8];	/*!< Ellipse 1 coefficient a1 (rw) ISP_AWB_BASE + 0x00000088 */
+	uint32_t awb_meas_rmax[8];	/*!< Ellipse 1 r_max (rw) ISP_AWB_BASE + 0x00000108 */
+	uint32_t awb_meas_counter[8];	/*!< AWB Counter 1 (r) ISP_AWB_BASE + 0x00000128 */
+	AWB_MEAS_ACCU_t AWB_MEAS_ACCU_arr[AWB_MEAS_ACCU_ARR_SIZE];	/*!< AWB_MEAS_ACCU ISP_AWB_BASE + 328 + (n*0x4) (n=0..23) */
+	uint32_t _notused_34[(0x00002e00 - 0x00002da8) / 4];	/* gap in address space */
+	uint32_t isp64_hist_ctrl;	/*!< Histogram control (rw) MRV_HIST_BASE + 0x00000000 */
+	uint32_t isp64_hist_prop;	/*!< Histogram properties (sh_rw) MRV_HIST_BASE + 0x00000004 */
+	uint32_t isp64_hist_subsampling;	/*!< Subsampling properties (sh_rw) MRV_HIST_BASE + 0x00000008 */
+	uint32_t isp64_hist_coeff_r;	/*!< Color conversion coefficient for red (sh_rw) MRV_HIST_BASE + 0x0000000c */
+	uint32_t isp64_hist_coeff_g;	/*!< Color conversion coefficient for green (sh_rw) MRV_HIST_BASE + 0x00000010 */
+	uint32_t isp64_hist_coeff_b;	/*!< Color conversion coefficient for blue (sh_rw) MRV_HIST_BASE + 0x00000014 */
+	uint32_t isp64_hist_h_offs;	/*!< Histogram window horizontal offset for first window of 25 sub-windows (sh_rw) MRV_HIST_BASE + 0x00000018 */
+	uint32_t isp64_hist_v_offs;	/*!< Histogram window vertical offset for first window of 25 sub-windows (sh_rw) MRV_HIST_BASE + 0x0000001c */
+	uint32_t isp64_hist_h_size;	/*!< Horizontal (sub-)window size (sh_rw) MRV_HIST_BASE + 0x00000020 */
+	uint32_t isp64_hist_v_size;	/*!< Vertical (sub-)window size (sh_rw) MRV_HIST_BASE + 0x00000024 */
+	uint32_t isp64_hist_sample_range;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000028 */
+	uint32_t isp64_hist_weight_00to30;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x0000002c */
+	uint32_t isp64_hist_weight_40to21;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000030 */
+	uint32_t isp64_hist_weight_31to12;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000034 */
+	uint32_t isp64_hist_weight_22to03;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000038 */
+	uint32_t isp64_hist_weight_13to43;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x0000003c */
+	uint32_t isp64_hist_weight_04to34;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000040 */
+	uint32_t isp64_hist_weight_44;	/*!< Weighting factor for sub-windows (sh_rw) MRV_HIST_BASE + 0x00000044 */
+	uint32_t isp64_hist_forced_upd_start_line;	/*!< Forced update start line limit (rw) MRV_HIST_BASE + 0x00000048 */
+	uint32_t isp64_hist_forced_update;	/*!< Histogram forced update (w) MRV_HIST_BASE + 0x0000004c */
+	uint32_t isp64_hist_vstart_status;	/*!< Forced update start line status (sh_r) MRV_HIST_BASE + 0x00000050 */
+	isp64_histogram_measurement_result_t isp64_histogram_measurement_result_arr[ISP64_HISTOGRAM_MEASUREMENT_RESULT_ARR_SIZE];	/*!< isp64_histogram_measurement_result MRV_HIST_BASE + 84 + (n*0x4) (n=0..31) */
+	uint32_t _notused_35[(0x00002f00 - 0x00002ed4) / 4];	/* gap in address space */
+	uint32_t isp_vsm_mode;	/*!< VS Measure Mode (rw) ISP_VSM_BASE + 0x00000000 */
+	uint32_t isp_vsm_h_offs;	/*!< VSM window horizontal offset (rw) ISP_VSM_BASE + 0x00000004 */
+	uint32_t isp_vsm_v_offs;	/*!< VSM window vertical offset (rw) ISP_VSM_BASE + 0x00000008 */
+	uint32_t isp_vsm_h_size;	/*!< Horizontal measure window size (rw) ISP_VSM_BASE + 0x0000000c */
+	uint32_t isp_vsm_v_size;	/*!< Vertical measure window size (rw) ISP_VSM_BASE + 0x00000010 */
+	uint32_t isp_vsm_h_segments;	/*!< Iteration 1 horizontal segments (rw) ISP_VSM_BASE + 0x00000014 */
+	uint32_t isp_vsm_v_segments;	/*!< Iteration 1 vertical segments (rw) ISP_VSM_BASE + 0x00000018 */
+	uint32_t isp_vsm_delta_h;	/*!< estimated horizontal displacement (r) ISP_VSM_BASE + 0x0000001c */
+	uint32_t isp_vsm_delta_v;	/*!< estimated vertical displacement (r) ISP_VSM_BASE + 0x00000020 */
+	uint32_t _notused_36[(0x00003000 - 0x00002f24) / 4];	/* gap in address space */
+#ifdef ISP_GCMONO
+	uint32_t isp_gcmono_ctrl;	/*!< GCMONO CTRL for ISP Nano MRV_GCMONO_BASE + 0x00000000 */
+	uint32_t isp_gcmono_para_base;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE + 0x00000004 */
+	uint32_t _notused_37_0[(0x00003040 - 0x00003008) / 4];	/* gap in address space */
+	uint32_t isp_gcmono_px_0;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003040 */
+	uint32_t isp_gcmono_px_1;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003044 */
+	uint32_t isp_gcmono_px_2;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003048 */
+	uint32_t isp_gcmono_px_3;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x0000304C */
+	uint32_t isp_gcmono_px_4;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003050 */
+	uint32_t isp_gcmono_px_5;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003054 */
+	uint32_t isp_gcmono_px_6;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003058 */
+	uint32_t isp_gcmono_px_7;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x0000305C */
+	uint32_t isp_gcmono_px_8;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003060 */
+	uint32_t isp_gcmono_px_9;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003064 */
+	uint32_t isp_gcmono_px_10;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003068 */
+	uint32_t isp_gcmono_y_addr;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x0000306C */
+	uint32_t isp_gcmono_y_write_data;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003070 */
+	uint32_t isp_gcmono_x_addr;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003074 */
+	uint32_t isp_gcmono_x_write_data;	/*!< GCMONO curve lut base for ISP Nano MRV_GCMONO_BASE +0x00003078 */
+	uint32_t _notused_37_1[(0x00003100 - 0x0000307c) / 4];	/* gap in address space */
+#else
+	uint32_t _notused_37[(0x00003100 - 0x00003000) / 4];	/* gap in address space */
+#endif
+
+	/* WDR2 */
+	uint32_t isp_wdr2_ctrl;	/*!<(rw), 0x00003100 */
+	uint32_t isp_wdr2_blk_siz;	/*!<(rw), 0x00003104 */
+	uint32_t isp_wdr2_color_weight;	/*!<(rw), 0x00003108 */
+	uint32_t isp_wdr2_blt_sigma;	/*!<(rw), 0x0000310C */
+	uint32_t isp_wdr2_blt_kernel_0;	/*!<(rw), 0x00003110 */
+	uint32_t isp_wdr2_blt_kernel_1;	/*!<(rw), 0x00003114 */
+	uint32_t isp_wdr2_vol_shift_bit;	/*!<(rw), 0x00003118 */
+	uint32_t isp_wdr2_bin_dist_0;	/*!<(rw), 0x0000311C */
+	uint32_t isp_wdr2_bin_dist_1;	/*!<(rw), 0x00003120 */
+	uint32_t isp_wdr2_bin_dist_2;	/*!<(rw), 0x00003124 */
+	uint32_t isp_wdr2_bin_dist_3;	/*!<(rw), 0x00003128 */
+	uint32_t isp_wdr2_hist_norm_fac;	/*!<(rw), 0x0000312C */
+
+	uint32_t _notused_38[(0x00003138 - 0x00003130) / 4];	/* gap in address space */
+
+	uint32_t isp_wdr2_pre_gamma_lut;	/*!<(rw), 0x00003138 */
+	uint32_t isp_wdr2_pre_gamma_write_data;	/*!<(rw), 0x0000313C */
+	uint32_t isp_wdr2_tone_curve_lut;	/*!<(rw), 0x00003140 */
+	uint32_t isp_wdr2_tone_curve_write_data;	/*!<(rw), 0x00003144 */
+	uint32_t isp_wdr2_merge_coeff_lut;	/*!<(rw), 0x00003148 */
+	uint32_t isp_wdr2_merge_coeff_write_data;	/*!<(rw), 0x0000314C */
+	uint32_t isp_wdr2_pre_gamma_cx_0;	/*!<(rw), 0x00003150 */
+	uint32_t isp_wdr2_pre_gamma_cx_1;	/*!<(rw), 0x00003154 */
+	uint32_t isp_wdr2_pre_gamma_cx_2;	/*!<(rw), 0x00003158 */
+	uint32_t isp_wdr2_pre_gamma_cx_3;	/*!<(rw), 0x0000315C */
+	uint32_t isp_wdr2_pre_gamma_cx_4;	/*!<(rw), 0x00003160 */
+	uint32_t isp_wdr2_pre_gamma_cx_5;	/*!<(rw), 0x00003164 */
+	uint32_t isp_wdr2_pre_gamma_cx_6;	/*!<(rw), 0x00003168 */
+	uint32_t isp_wdr2_pre_gamma_cx_7;	/*!<(rw), 0x0000316C */
+	uint32_t isp_wdr2_pre_gamma_cx_8;	/*!<(rw), 0x00003170 */
+	uint32_t isp_wdr2_pre_gamma_cx_9;	/*!<(rw), 0x00003174 */
+	uint32_t isp_wdr2_pre_gamma_cx_10;	/*!<(rw), 0x00003178 */
+	uint32_t isp_wdr2_tone_curve_cx_0;	/*!<(rw), 0x0000317C */
+	uint32_t isp_wdr2_tone_curve_cx_1;	/*!<(rw), 0x00003180 */
+	uint32_t isp_wdr2_tone_curve_cx_2;	/*!<(rw), 0x00003184 */
+	uint32_t isp_wdr2_tone_curve_cx_3;	/*!<(rw), 0x00003188 */
+	uint32_t isp_wdr2_merge_coeff_cx_0;	/*!<(rw), 0x0000318C */
+	uint32_t isp_wdr2_merge_coeff_cx_1;	/*!<(rw), 0x00003190 */
+
+	uint32_t _notused_39[(0x000031A8 - 0x00003194) / 4];	/* gap in address space */
+
+	uint32_t isp_wdr2_max_gain_cx;	/*!<(rw), 0x000031A8 */
+	uint32_t isp_wdr2_max_gain_slope_0;	/*!<(rw), 0x000031AC */
+	uint32_t isp_wdr2_max_gain_slope_1;	/*!<(rw), 0x000031B0 */
+	uint32_t isp_wdr2_max_gain_slope_2;	/*!<(rw), 0x000031B4 */
+	uint32_t isp_wdr2_max_gain_cy_0;	/*!<(rw), 0x000031B8 */
+	uint32_t isp_wdr2_max_gain_cy_1;	/*!<(rw), 0x000031BC */
+	uint32_t isp_wdr2_max_gain_cy_2;	/*!<(rw), 0x000031C0 */
+	uint32_t isp_wdr2_norm_factor_mul_0;	/*!<(rw), 0x000031C4 */
+	uint32_t isp_wdr2_norm_factor_mul_1;	/*!<(rw), 0x000031C8 */
+	uint32_t isp_wdr2_norm_factor_shift_bit_0;	/*!<(rw), 0x000031CC */
+	uint32_t isp_wdr2_norm_factor_shift_bit_1;	/*!<(rw), 0x000031D0 */
+	uint32_t isp_wdr2_bin_range_0;	/*!<(rw), 0x000031D4 */
+	uint32_t isp_wdr2_bin_range_1;	/*!<(rw), 0x000031D8 */
+	uint32_t isp_wdr2_bin_range_2;	/*!<(rw), 0x000031DC */
+	uint32_t isp_wdr2_bin_range_3;	/*!<(rw), 0x000031E0 */
+	uint32_t isp_wdr2_hist_data_0;	/*!<(ro), 0x000031E4 */
+	uint32_t isp_wdr2_hist_data_1;	/*!<(ro), 0x000031E8 */
+
+	uint32_t _notused_40[(0x00003200 - 0x000031EC) / 4];	/* gap in address space */
+
+	/* Compand */
+	uint32_t isp_compand_ctrl;	/*!<(rw), 0x00003200 */
+	uint32_t isp_compand_bls_a_fixed;	/*!<(rw), 0x00003204 */
+	uint32_t isp_compand_bls_b_fixed;	/*!<(rw), 0x00003208 */
+	uint32_t isp_compand_bls_c_fixed;	/*!<(rw), 0x0000320C */
+	uint32_t isp_compand_bls_d_fixed;	/*!<(rw), 0x00003210 */
+	uint32_t isp_compand_expand_px_0;	/*!<(rw), 0x00003214 */
+	uint32_t isp_compand_expand_px_1;	/*!<(rw), 0x00003218 */
+	uint32_t isp_compand_expand_px_2;	/*!<(rw), 0x0000321C */
+	uint32_t isp_compand_expand_px_3;	/*!<(rw), 0x00003220 */
+	uint32_t isp_compand_expand_px_4;	/*!<(rw), 0x00003224 */
+	uint32_t isp_compand_expand_px_5;	/*!<(rw), 0x00003228 */
+	uint32_t isp_compand_expand_px_6;	/*!<(rw), 0x0000322C */
+	uint32_t isp_compand_expand_px_7;	/*!<(rw), 0x00003230 */
+	uint32_t isp_compand_expand_px_8;	/*!<(rw), 0x00003234 */
+	uint32_t isp_compand_expand_px_9;	/*!<(rw), 0x00003238 */
+	uint32_t isp_compand_expand_px_10;	/*!<(rw), 0x0000323C */
+	uint32_t isp_compand_compress_px_0;	/*!<(rw), 0x00003240 */
+	uint32_t isp_compand_compress_px_1;	/*!<(rw), 0x00003244 */
+	uint32_t isp_compand_compress_px_2;	/*!<(rw), 0x00003248 */
+	uint32_t isp_compand_compress_px_3;	/*!<(rw), 0x0000324C */
+	uint32_t isp_compand_compress_px_4;	/*!<(rw), 0x00003250 */
+	uint32_t isp_compand_compress_px_5;	/*!<(rw), 0x00003254 */
+	uint32_t isp_compand_compress_px_6;	/*!<(rw), 0x00003258 */
+	uint32_t isp_compand_compress_px_7;	/*!<(rw), 0x0000325C */
+	uint32_t isp_compand_compress_px_8;	/*!<(rw), 0x00003260 */
+	uint32_t isp_compand_compress_px_9;	/*!<(rw), 0x00003264 */
+	uint32_t isp_compand_compress_px_10;	/*!<(rw), 0x00003268 */
+	uint32_t isp_compand_expand_y_addr;	/*!<(rw), 0x0000326C */
+	uint32_t isp_compand_expand_y_write_data;	/*!<(rw), 0x00003270 */
+	uint32_t isp_compand_compress_y_addr;	/*!<(rw), 0x00003274 */
+	uint32_t isp_compand_compress_y_write_data;	/*!<(rw), 0x00003278 */
+	uint32_t isp_compand_expand_x_addr;	/*!<(rw), 0x0000327C */
+	uint32_t isp_compand_expand_x_write_data;	/*!<(rw), 0x00003280 */
+	uint32_t isp_compand_compress_x_addr;	/*!<(rw), 0x00003284 */
+	uint32_t isp_compand_compress_x_write_data;	/*!<(rw), 0x00003288 */
+
+	uint32_t _notused_41[(0x00003300 - 0x0000328C) / 4];	/* gap in address space */
+
+	uint32_t isp_stitching_ctrl;	/*!<(rw), 0x00003300 */
+	uint32_t isp_stitching_frame_width;	/*!<(rw), 0x00003304 */
+	uint32_t isp_stitching_frame_height;	/*!<(rw), 0x00003308 */
+	uint32_t isp_stitching_exposure_bit;	/*!<(rw), 0x0000330C */
+	uint32_t isp_stitching_color_weight;	/*!<(rw), 0x00003310 */
+	uint32_t isp_stitching_bls_exp_0_a;	/*!<(rw), 0x00003314 */
+	uint32_t isp_stitching_bls_exp_0_b;	/*!<(rw), 0x00003318 */
+	uint32_t isp_stitching_bls_exp_0_c;	/*!<(rw), 0x0000331C */
+	uint32_t isp_stitching_bls_exp_0_d;	/*!<(rw), 0x00003320 */
+	uint32_t isp_stitching_bls_exp_1_a;	/*!<(rw), 0x00003324 */
+	uint32_t isp_stitching_bls_exp_1_b;	/*!<(rw), 0x00003328 */
+	uint32_t isp_stitching_bls_exp_1_c;	/*!<(rw), 0x0000332C */
+	uint32_t isp_stitching_bls_exp_1_d;	/*!<(rw), 0x00003330 */
+	uint32_t isp_stitching_bls_exp_2_a;	/*!<(rw), 0x00003334 */
+	uint32_t isp_stitching_bls_exp_2_b;	/*!<(rw), 0x00003338 */
+	uint32_t isp_stitching_bls_exp_2_c;	/*!<(rw), 0x0000333C */
+	uint32_t isp_stitching_bls_exp_2_d;	/*!<(rw), 0x00003340 */
+	uint32_t isp_stitching_ratio_ls;	/*!<(rw), 0x00003344 */
+	uint32_t isp_stitching_ratio_vs;	/*!<(rw), 0x00003348 */
+	uint32_t isp_stitching_ratio_ls_shd;	/*!<(ro), 0x0000334C */
+	uint32_t isp_stitching_ratio_vs_shd;	/*!<(ro), 0x00003350 */
+	uint32_t isp_stitching_trans_range_linear;	/*!<(rw), 0x00003354 */
+	uint32_t isp_stitching_trans_range_nonlinear;	/*!<(rw), 0x00003358 */
+	uint32_t isp_stitching_sat_level;	/*!<(rw), 0x0000335C */
+	uint32_t isp_stitching_long_exposure;	/*!<(rw), 0x00003360 */
+	uint32_t isp_stitching_short_exposure;	/*!<(rw), 0x00003364 */
+	uint32_t isp_stitching_very_short_exposure;	/*!<(rw), 0x00003368 */
+	uint32_t isp_stitching_hdr_mode;	/*!<(rw), 0x0000336C */
+	uint32_t isp_stitching_out_hblank;	/*!<(rw), 0x00003370 */
+	uint32_t isp_stitching_out_vblank;	/*!<(rw), 0x00003374 */
+	uint32_t isp_stitching_interrupt_status;	/*!<(rw), 0x00003378 */
+	uint32_t isp_stitching_compress_x0;	/*!<(rw), 0x0000337c */
+	uint32_t isp_stitching_compress_x0_shd;	/*!<(rw), 0x00003380 */
+	uint32_t isp_stitching_exposure_mean_0;	/*!<(rw), 0x00003384 */
+	uint32_t isp_stitching_exposure_mean_1;	/*!<(rw), 0x00003388 */
+
+	uint32_t _notused_42[(0x000033A0 - 0x0000338C) / 4];	/* gap in address space */
+
+	uint32_t isp_stitching_compress_lut_0;	/*!<(rw), 0x000033A0 */
+	uint32_t isp_stitching_compress_lut_1;	/*!<(rw), 0x000033A4 */
+	uint32_t isp_stitching_compress_lut_2;	/*!<(rw), 0x000033A8 */
+	uint32_t isp_stitching_compress_lut_3;	/*!<(rw), 0x000033AC */
+	uint32_t isp_stitching_compress_lut_4;	/*!<(rw), 0x000033B0 */
+	/* uint32_t isp_stitching_compress_lut_shd_0;      //!<(ro), 0x000033B4 */
+	/* uint32_t isp_stitching_compress_lut_shd_1;      //!<(ro), 0x000033B8 */
+	/* uint32_t isp_stitching_compress_lut_shd_2;      //!<(ro), 0x000033BC */
+	/* uint32_t isp_stitching_compress_lut_shd_3;      //!<(ro), 0x000033C0 */
+	/* uint32_t isp_stitching_compress_lut_shd_4;      //!<(ro), 0x000033C4 */
+
+	uint32_t _notused_43[(0x000033C8 - 0x000033B4) / 4];	/* gap in address space */
+
+	uint32_t isp_stitching_exp0_awb_gain_g;	/*!<(ro), 0x000033C8 */
+	uint32_t isp_stitching_exp0_awb_gain_rb;	/*!<(ro), 0x000033CC */
+	uint32_t isp_stitching_exp1_awb_gain_g;	/*!<(ro), 0x000033D0 */
+	uint32_t isp_stitching_exp1_awb_gain_rb;	/*!<(ro), 0x000033D4 */
+	uint32_t isp_stitching_exp2_awb_gain_g;	/*!<(ro), 0x000033D8 */
+	uint32_t isp_stitching_exp2_awb_gain_rb;	/*!<(ro), 0x000033DC */
+	uint32_t isp_stitching_long_sat_params;	/*!<(ro), 0x000033E0 */
+	uint32_t isp_stitching_imsc;	/*!<(rw), 0x000033e4 */
+	uint32_t isp_stitching_ris;	/*!<(ro), 0x000033e8 */
+	uint32_t isp_stitching_mis;	/*!<(ro), 0x000033ec */
+	uint32_t isp_stitching_icr;	/*!<(wo), 0x000033f0 */
+	uint32_t isp_stitching_isr;	/*!<(wo), 0x000033f4 */
+	uint32_t isp_stitching_bls_exp_out_0;	/*!<(rw), 0x000033f8 */
+	uint32_t isp_stitching_bls_exp_out_1;	/*!<(rw), 0x000033fc */
+	uint32_t _notused_44[(0x00003500 - 0x00003400) / 4];	/* gap in address space */
+
+	/* WDR3 */
+	uint32_t isp_wdr3_ctrl;	/*!<(rw), 0x00003500 */
+	uint32_t isp_wdr3_shift;	/*!<(rw), 0x00003504 */
+	uint32_t isp_wdr3_block_size;	/*!<(rw), 0x00003508 */
+	uint32_t isp_wdr3_block_area_factor;	/*!<(rw), 0x0000350C */
+	uint32_t isp_wdr3_value_weight;	/*!<(rw), 0x00003510 */
+	uint32_t isp_wdr3_strength;	/*!<(rw), 0x00003514 */
+	uint32_t isp_wdr3_pixel_slope;	/*!<(rw), 0x00003518 */
+	uint32_t isp_wdr3_entropy_slope;	/*!<(rw), 0x0000351C */
+	uint32_t isp_wdr3_sigma_width;	/*!<(rw), 0x00003520 */
+	uint32_t isp_wdr3_sigma_height;	/*!<(rw), 0x00003524 */
+	uint32_t isp_wdr3_sigma_value;	/*!<(rw), 0x00003528 */
+	uint32_t isp_wdr3_block_flag_width;	/*!<(rw), 0x0000352C */
+	uint32_t isp_wdr3_block_flag_height;	/*!<(rw), 0x00003530 */
+	uint32_t isp_wdr3_frame_average;	/*!<(ro), 0x00003534 */
+	uint32_t isp_wdr3_frame_std;	/*!<(ro), 0x00003538 */
+	uint32_t isp_wdr3_histogram[5];	/*!<(rw), 0x0000353C */
+	uint32_t isp_wdr3_entropy[5];	/*!<(rw), 0x00003550 */
+	uint32_t isp_wdr3_gamma_pre[5];	/*!<(rw), 0x00003564 */
+	uint32_t isp_wdr3_gamma_up[5];	/*!<(rw), 0x00003578 */
+	uint32_t isp_wdr3_gamma_down[5];	/*!<(rw), 0x0000358C */
+	uint32_t isp_wdr3_distance_weight[5];	/*!<(rw), 0x000035A0 */
+	uint32_t isp_wdr3_difference_weight[5];	/*!<(rw), 0x000035B4 */
+	uint32_t isp_wdr3_invert_curve[7];	/*!<(rw), 0x000035C8 */
+	uint32_t isp_wdr3_invert_linear[7];	/*!<(rw), 0x000035E4 */
+	uint32_t isp_wdr3_shift_0;	/*!<(rw), 0x00003600 */
+	uint32_t isp_wdr3_shift_1;	/*!<(rw), 0x00003604 */
+	uint32_t isp_wdr3_strength_shd;	/*!<(ro), 0x00003608 */
+	uint32_t isp_wdr3_pixel_slope_shd;	/*!<(ro), 0x0000360C */
+	uint32_t isp_wdr3_entropy_slope_shd;	/*!<(ro), 0x00003610 */
+	uint32_t _notused_44_3dnr[(0x00003700 - 0x00003614) / 4];	/* gap in address space */
+	/* 3DNR */
+	uint32_t isp_denoise3d_ctrl;	/* 0x00003700 */
+	uint32_t isp_denoise3d_strength;	/* 0x00003704 */
+	uint32_t isp_denoise3d_edge_h;	/* 0x00003708 */
+	uint32_t isp_denoise3d_edge_v;	/* 0x0000370C */
+	uint32_t isp_denoise3d_range_s;	/* 0x00003710 */
+	uint32_t isp_denoise3d_range_t;	/* 0x00003714 */
+	uint32_t isp_denoise3d_motion;	/* 0x00003718 */
+	uint32_t isp_denoise3d_delta_inv;	/* 0x0000371C */
+	uint32_t isp_denoise3d_curve_s[6];	/* 0x00003720 */
+	uint32_t isp_denoise3d_curve_t[6];	/* 0x00003738 */
+	uint32_t isp_denoise3d_average;	/* 0x00003750 */
+	uint32_t isp_denoise3d_strength_shd;	/* 0x00003754 */
+	uint32_t isp_denoise3d_edge_h_shd;	/* 0x00003758 */
+	uint32_t isp_denoise3d_edge_v_shd;	/* 0x0000375C */
+	uint32_t isp_denoise3d_range_s_shd;	/* 0x00003760 */
+	uint32_t isp_denoise3d_range_t_shd;	/* 0x00003764 */
+	uint32_t isp_denoise3d_motion_shd;	/* 0x00003768 */
+	uint32_t isp_denoise3d_delta_inv_shd;	/* 0x0000376C */
+	uint32_t isp_denoise3d_dummy_hblank;	/* 0x00003770 */
+	uint32_t isp_denoise3d_ctrl_shd;	/* ro 0x00003774 */
+	uint32_t isp_denoise3d_weight1;	/* rw 0x00003778 */
+	uint32_t isp_denoise3d_weight2;	/* rw 0x0000377c */
+	uint32_t isp_denoise3d_weight1_shd;	/* rw 0x00003780 */
+	uint32_t isp_denoise3d_weight2_shd;	/* rw 0x00003784 */
+
+	uint32_t _notused_45[(0x00003900 - 0x00003788) / 4];	/* gap in address space */
+
+	uint32_t isp_ee_ctrl;	/*!<(rw), 0x00003900 */
+	uint32_t isp_ee_y_gain;	/*!<(rw), 0x00003904 */
+	uint32_t isp_ee_uv_gain;	/*!<(ro), 0x00003908 */
+	uint32_t isp_ee_ctrl_shd;	/*!<(ro), 0x0000390C */
+	uint32_t isp_ee_y_gain_shd;	/*!<(ro), 0x00003910 */
+	uint32_t isp_ee_uv_gain_shd;	/*!<(ro), 0x00003914 */
+	uint32_t isp_ee_dummy_hblank;	/*!<(rw), 0x00003918 */
+	uint32_t isp_curve_ctrl;	/*!<(rw), 0x0000391c */
+	uint32_t isp_curve_lut_x_addr;	/*!<(rw), 0x00003920 */
+	uint32_t isp_curve_lut_x_write_data;	/*!<(rw), 0x00003924 */
+	uint32_t isp_curve_lut_luma_addr;	/*!<(rw), 0x00003928 */
+	uint32_t isp_curve_lut_luma_write_data;	/*!<(rw), 0x0000392c */
+	uint32_t isp_curve_lut_chroma_addr;	/*!<(rw), 0x00003930 */
+	uint32_t isp_curve_lut_chroma_write_data;	/*!<(rw), 0x00003934 */
+	uint32_t isp_curve_lut_shift_addr;	/*!<(rw), 0x00003938 */
+	uint32_t isp_curve_lut_shift_write_data;	/*!<(rw), 0x0000393c */
+	uint32_t isp_curve_ctrl_shd;	/*!<(ro), 0x00003940 */
+	uint32_t isp_curve_lut_luma_addr_shd;	/*!<(ro), 0x00003944 */
+	uint32_t isp_curve_lut_luma_write_data_shd;	/*!<(ro), 0x00003948 */
+	uint32_t isp_curve_lut_chroma_addr_shd;	/*!<(ro), 0x0000394c */
+	uint32_t isp_curve_lut_chroma_write_data_shd;	/*!<(ro), 0x00003950 */
+	uint32_t isp_curve_lut_shift_addr_shd;	/*!<(ro), 0x00003954 */
+	uint32_t isp_curve_lut_shift_write_data_shd;	/*!<(ro), 0x00003958 */
+
+	uint32_t _notused_46[(0x00003A00 - 0x0000395c) / 4];	/* gap in address space */
+	uint32_t isp_denoise2d_control;	/*!<(rw), 0x00003A00 */
+	uint32_t isp_denoise2d_strength;	/*!<(rw), 0x00003A04 */
+	uint32_t isp_denoise2d_sigma_y[24];	/*!<(rw), 0x00003A08 */
+	uint32_t isp_denoise2d_sigma_y_shd[24];	/*!<(ro), 0x00003A68 */
+#if defined(ISP_2DNR_V2) || defined(ISP_2DNR_V4) || defined(ISP_2DNR_V5)
+	uint32_t isp_denoise2d_control_shd;	/*!<(ro), 0x00003AC8 */
+	uint32_t isp_denoise2d_strength_shd;	/*!<(ro), 0x00003ACC */
+	uint32_t isp_denoise2d_sigma_sqr;	/*!<(rw), 0x00003AD0 */
+	uint32_t isp_denoise2d_weight_mul_factor;	/*!<(rw), 0x00003AD4 */
+	uint32_t isp_denoise2d_sigma_sqr_shd;	/*!<(rw), 0x00003AD8 */
+	uint32_t isp_denoise2d_weight_mul_factor_shd;	/*!<(rw), 0x00003ADC */
+	uint32_t isp_denoise2d_dummy_hblank;	/*!<(rw), 0x00003AE0 */
+	uint32_t isp_denoise2d_motionless_control_curve; /*!<(rw), 0x00003ae4 */
+	uint32_t isp_denoise2d_motion_inv; /*!<(rw), 0x00003ae8 */
+	uint32_t isp_denoise3d2_blending; /*!<(rw), 0x00003aec */
+	uint32_t isp_denoise3d2_blending_shd; /*!<(ro), 0x00003af0 */
+	uint32_t _notused_47[(0x00003B00 - 0x00003af4) / 4];	// gap in address space
+#else
+	uint32_t _notused_47[(0x00003B00 - 0x00003ac8) / 4];	// gap in address space
+#endif
+
+	uint32_t isp_hdr_hist_prop;	/*!< Histogram properties (rw) MRV_HIST_BASE + 0x00000000 */
+	uint32_t isp_hdr_hist_h_offs;	/*!< Histogram window horizontal offset for first window of 25 sub-windows (rw) MRV_HIST_BASE + 0x00000004 */
+	uint32_t isp_hdr_hist_v_offs;	/*!< Histogram window vertical offset for first window of 25 sub-windows (rw) MRV_HIST_BASE + 0x00000008 */
+	uint32_t isp_hdr_hist_h_size;	/*!< Horizontal (sub-)window size (rw) MRV_HIST_BASE + 0x0000000c */
+	uint32_t isp_hdr_hist_v_size;	/*!< Vertical (sub-)window size (rw) MRV_HIST_BASE + 0x00000010 */
+	uint32_t isp_hdr_hist_statistics[48];  /*! 16 x 3 channels l/s/vs */
+	uint32_t _notused_48 [(0x00003C00 - 0x00003BD4) / 4];  // gap in address space
+	uint32_t isp_hdr_exp_conf;  //!<(rw), 0x00003C00
+	uint32_t isp_hdr_exp_h_offset;  //!<(rw), 0x00003C04
+	uint32_t isp_hdr_exp_v_offset;  //!<(rw), 0x00003C08
+	uint32_t isp_hdr_exp_h_size;  //!<(rw), 0x00003C0C
+	uint32_t isp_hdr_exp_v_size;  //!<(rw), 0x00003C10
+	uint32_t isp_hdr_exp_statistics[75];	 /*! 25 x 3 channels l/s/vs */
+	uint32_t isp_hdr_exp_h_offset_shd;  //!<(ro), 0x00003D40
+	uint32_t isp_hdr_exp_v_offset_shd;  //!<(ro), 0x00003D44
+	uint32_t isp_hdr_exp_h_size_shd;  //!<(ro), 0x00003D48
+	uint32_t isp_hdr_exp_v_size_shd;  //!<(ro), 0x00003D4C
+	uint32_t _notused_49[(0x00003E00 - 0x00003d50) / 4];
+	uint32_t isp_dmsc_ctrl;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000000
+	uint32_t isp_dmsc_intp_thr;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000004
+	uint32_t isp_dmsc_dmoi_ctrl;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000008
+	uint32_t isp_dmsc_dmoi_thr;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000000c
+	uint32_t isp_dmsc_dmoi_patn_thr;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000010
+	uint32_t isp_dmsc_shap_fact;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000014
+	uint32_t isp_dmsc_shap_clip;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000018
+	uint32_t isp_dmsc_shap_thr;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000001c
+	uint32_t isp_dmsc_shap_ratio;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000020
+	uint32_t isp_dmsc_shap_line_ctrl;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000024
+	uint32_t isp_dmsc_shap_line_ratio;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000028
+	uint32_t isp_dmsc_shap_filt1;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000002c
+	uint32_t isp_dmsc_shap_filt2;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000030
+	uint32_t isp_dmsc_dpul_ctrl;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000034
+	uint32_t isp_dmsc_skin_thr_cb;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000038
+	uint32_t isp_dmsc_skin_thr_cr;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000003c
+	uint32_t isp_dmsc_skin_thr_y;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000040
+	uint32_t isp_dmsc_cac_ctrl;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000044
+	uint32_t isp_dmsc_cac_count_start;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000048
+	uint32_t isp_dmsc_cac_a;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000004C
+	uint32_t isp_dmsc_cac_b;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000050
+	uint32_t isp_dmsc_cac_c;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000054
+	uint32_t isp_dmsc_cac_x_norm;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x00000058
+	uint32_t isp_dmsc_cac_y_norm;	//!< demosaic V20 (rw) ISP_DEMOSAIC_BASE + 0x0000005C
+	uint32_t isp_dmsc_size_ctrl;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000060
+	uint32_t isp_dmsc_ctrl_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000064
+	uint32_t isp_dmsc_shap_fact_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000068
+	uint32_t isp_dmsc_shap_clip_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x0000006c
+	uint32_t isp_dmsc_dpul_ctrl_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000070
+	uint32_t isp_dmsc_cac_ctrl_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000074
+	uint32_t isp_dmsc_cac_count_start_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000078
+	uint32_t isp_dmsc_cac_a_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x0000007c
+	uint32_t isp_dmsc_cac_b_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000080
+	uint32_t isp_dmsc_cac_c_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000084
+	uint32_t isp_dmsc_cac_x_norm_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x00000088
+	uint32_t isp_dmsc_cac_y_norm_shd;	//!< demosaic V20 (r) ISP_DEMOSAIC_BASE + 0x0000008c
+
+	uint32_t _notused_50[(0x00004000 - 0x00003e90) / 4];
+    uint32_t isp_pre_filt_ctrl;     //!< isp_pre_file_base_addres + 0x0000
+    uint32_t isp_pre_filt_bls_a;     //!< isp_pre_file_base_addres + 0x0004
+    uint32_t isp_pre_filt_bls_b;     //!< isp_pre_file_base_addres + 0x0008
+    uint32_t isp_pre_filt_bls_c;     //!< isp_pre_file_base_addres + 0x000c
+    uint32_t isp_pre_filt_bls_d;     //!< isp_pre_file_base_addres + 0x0010
+    uint32_t isp_pre_filt_gain_r;     //!< isp_pre_file_base_addres + 0x0014
+    uint32_t isp_pre_filt_gain_g;     //!< isp_pre_file_base_addres + 0x0018
+    uint32_t isp_pre_filt_gain_b;     //!< isp_pre_file_base_addres + 0x001c
+    uint32_t isp_pre_filt_dpc_th_r;     //!< isp_pre_file_base_addres + 0x0020
+    uint32_t isp_pre_filt_dpc_th_g;     //!< isp_pre_file_base_addres + 0x0024
+    uint32_t isp_pre_filt_dpc_th_b;     //!< isp_pre_file_base_addres + 0x0028
+    uint32_t isp_pre_filt_dpc_th_ir;     //!< isp_pre_file_base_addres + 0x002c
+    uint32_t isp_pre_filt_cc_00_01;     //!< isp_pre_file_base_addres + 0x0030
+    uint32_t isp_pre_filt_cc_02_03;     //!< isp_pre_file_base_addres + 0x0034
+    uint32_t isp_pre_filt_cc_10_11;     //!< isp_pre_file_base_addres + 0x0038
+    uint32_t isp_pre_filt_cc_12_13;     //!< isp_pre_file_base_addres + 0x003c
+    uint32_t isp_pre_filt_cc_20_21;     //!< isp_pre_file_base_addres + 0x0040
+    uint32_t isp_pre_filt_cc_22_23;     //!< isp_pre_file_base_addres + 0x0044
+    uint32_t isp_pre_filt_cc_00_01_shd;     //!< isp_pre_file_base_addres + 0x0048
+    uint32_t isp_pre_filt_cc_02_03_shd;     //!< isp_pre_file_base_addres + 0x004c
+    uint32_t isp_pre_filt_cc_10_11_shd;     //!< isp_pre_file_base_addres + 0x0050
+    uint32_t isp_pre_filt_cc_12_13_shd;     //!< isp_pre_file_base_addres + 0x0054
+    uint32_t isp_pre_filt_cc_20_21_shd;     //!< isp_pre_file_base_addres + 0x0058
+    uint32_t isp_pre_filt_cc_22_23_shd;     //!< isp_pre_file_base_addres + 0x05c
+    uint32_t isp_pre_filt_ir_des_px1;     //!< isp_pre_file_base_addres + 0x0060
+    uint32_t _notused_51[(0x00004080 - 0x00004064) / 4];
+    uint32_t isp_pre_filt_ir_des_py1;     //!< isp_pre_file_base_addres + 0x0080
+    uint32_t isp_pre_filt_ir_des_py2;     //!< isp_pre_file_base_addres + 0x0084
+    uint32_t isp_pre_filt_ir_des_py3;     //!< isp_pre_file_base_addres + 0x0088
+    uint32_t isp_pre_filt_ir_des_py4;     //!< isp_pre_file_base_addres + 0x008c
+    uint32_t isp_pre_filt_ir_des_py5;     //!< isp_pre_file_base_addres + 0x0090
+    uint32_t isp_pre_filt_ir_des_py6;     //!< isp_pre_file_base_addres + 0x0094
+    uint32_t isp_pre_filt_ir_des_py7;     //!< isp_pre_file_base_addres + 0x0098
+    uint32_t isp_pre_filt_ir_des_py8;     //!< isp_pre_file_base_addres + 0x009c
+    uint32_t isp_pre_filt_ir_des_pd1;     //!< isp_pre_file_base_addres + 0x00a0
+    uint32_t isp_pre_filt_ir_des_pd2;     //!< isp_pre_file_base_addres + 0x00a4
+    uint32_t isp_pre_filt_ir_des_pd3;     //!< isp_pre_file_base_addres + 0x00a8
+    uint32_t isp_pre_filt_ir_des_pd4;     //!< isp_pre_file_base_addres + 0x00ac
+    uint32_t isp_pre_filt_l_des_px1;     //!< isp_pre_file_base_addres + 0x00b0
+    uint32_t _notused_52[(0x000040d0 - 0x000040b4) / 4];
+    uint32_t isp_pre_filt_l_des_py1;     //!< isp_pre_file_base_addres + 0x00d0
+    uint32_t isp_pre_filt_l_des_py2;     //!< isp_pre_file_base_addres + 0x00d4
+    uint32_t isp_pre_filt_l_des_py3;     //!< isp_pre_file_base_addres + 0x00d8
+    uint32_t isp_pre_filt_l_des_py4;     //!< isp_pre_file_base_addres + 0x00dc
+    uint32_t isp_pre_filt_l_des_py5;     //!< isp_pre_file_base_addres + 0x00e0
+    uint32_t isp_pre_filt_l_des_py6;     //!< isp_pre_file_base_addres + 0x00e4
+    uint32_t isp_pre_filt_l_des_py7;     //!< isp_pre_file_base_addres + 0x00e8
+    uint32_t isp_pre_filt_l_des_py8;     //!< isp_pre_file_base_addres + 0x00ec
+    uint32_t isp_pre_filt_l_des_pd1;     //!< isp_pre_file_base_addres + 0x00f0
+    uint32_t isp_pre_filt_l_des_pd2;     //!< isp_pre_file_base_addres + 0x00f4
+    uint32_t isp_pre_filt_l_des_pd3;     //!< isp_pre_file_base_addres + 0x00f8
+    uint32_t isp_pre_filt_l_des_pd4;     //!< isp_pre_file_base_addres + 0x00fc
+    uint32_t isp_pre_filt_thresh_bl0;     //!< isp_pre_file_base_addres + 0x0100
+    uint32_t isp_pre_filt_thresh_bl1;     //!< isp_pre_file_base_addres + 0x0104
+    uint32_t isp_pre_filt_thresh_sh0;     //!< isp_pre_file_base_addres + 0x0108
+    uint32_t isp_pre_filt_thresh_sh1;     //!< isp_pre_file_base_addres + 0x010c
+    uint32_t isp_pre_filt_lum_weight;     //!< isp_pre_file_base_addres + 0x0110
+    uint32_t isp_pre_filt_fac_sh1;     //!< isp_pre_file_base_addres + 0x0114
+    uint32_t isp_pre_filt_fac_sh0;     //!< isp_pre_file_base_addres + 0x0118
+    uint32_t isp_pre_filt_fac_mid;     //!< isp_pre_file_base_addres + 0x011c
+    uint32_t isp_pre_filt_fac_bl0;     //!< isp_pre_file_base_addres + 0x0120
+    uint32_t isp_pre_filt_fac_bl1;     //!< isp_pre_file_base_addres + 0x0124
+    uint32_t isp_pre_filt_ir_denoise_sw_03;     //!< isp_pre_file_base_addres + 0x0128
+    uint32_t isp_pre_filt_ir_denoise_sw_45;     //!< isp_pre_file_base_addres + 0x012c
+    uint32_t isp_pre_filt_h_size;     //!< isp_pre_file_base_addres + 0x0130
+    uint32_t isp_pre_filt_v_size;     //!< isp_pre_file_base_addres + 0x0134
+    uint32_t isp_pre_filt_dmy_hblank;     //!< isp_pre_file_base_addres + 0x0138
+    uint32_t isp_pre_filt_ctrl_shd;     //!< isp_pre_file_base_addres + 0x013c
+
+    uint32_t _notused_53[(0x00005100 - 0x00004140) / 4];
+    uint32_t isp_wdr4_ctrl ;        //!<isp_wdr4_base_addr + 0x000,
+    uint32_t isp_wdr4_shift ;        //!<isp_wdr4_base_addr + 0x004,
+    uint32_t isp_wdr4_block_size ;        //!<isp_wdr4_base_addr + 0x008,
+    uint32_t isp_wdr4_block_area_factor ;        //!<isp_wdr4_base_addr + 0x00c,
+    uint32_t isp_wdr4_value_weight ;        //!<isp_wdr4_base_addr + 0x010,
+    uint32_t isp_wdr4_strength_0 ;        //!<isp_wdr4_base_addr + 0x014,
+    uint32_t isp_wdr4_strength_1 ;        //!<isp_wdr4_base_addr + 0x018,
+    uint32_t isp_wdr4_contrast ;        //!<isp_wdr4_base_addr + 0x01c,
+    uint32_t isp_wdr4_pixel_slope ;        //!<isp_wdr4_base_addr + 0x020,
+    uint32_t isp_wdr4_entropy_slope ;        //!<isp_wdr4_base_addr + 0x024,
+    uint32_t isp_wdr4_sigma_width ;        //!<isp_wdr4_base_addr + 0x028,
+    uint32_t isp_wdr4_sigma_height ;        //!<isp_wdr4_base_addr + 0x02c,
+    uint32_t isp_wdr4_sigma_value ;        //!<isp_wdr4_base_addr + 0x030,
+    uint32_t isp_wdr4_block_flag_width ;        //!<isp_wdr4_base_addr + 0x034,
+    uint32_t isp_wdr4_block_flag_height ;        //!<isp_wdr4_base_addr + 0x038,
+    uint32_t isp_wdr4_frame_average ;        //!<isp_wdr4_base_addr + 0x03c,
+    uint32_t isp_wdr4_frame_std ;        //!<isp_wdr4_base_addr + 0x040,
+    uint32_t isp_wdr4_histogram_0 ;        //!<isp_wdr4_base_addr + 0x044,
+    uint32_t isp_wdr4_histogram_1 ;        //!<isp_wdr4_base_addr + 0x048,
+    uint32_t isp_wdr4_histogram_2 ;        //!<isp_wdr4_base_addr + 0x04c,
+    uint32_t isp_wdr4_histogram_3 ;        //!<isp_wdr4_base_addr + 0x050,
+    uint32_t isp_wdr4_histogram_4 ;        //!<isp_wdr4_base_addr + 0x054,
+    uint32_t isp_wdr4_histogram_5 ;        //!<isp_wdr4_base_addr + 0x058,
+    uint32_t isp_wdr4_histogram_6 ;        //!<isp_wdr4_base_addr + 0x05c,
+    uint32_t isp_wdr4_histogram_7 ;        //!<isp_wdr4_base_addr + 0x060,
+    uint32_t isp_wdr4_histogram_8 ;        //!<isp_wdr4_base_addr + 0x064,
+    uint32_t isp_wdr4_histogram_9 ;        //!<isp_wdr4_base_addr + 0x068,
+    uint32_t isp_wdr4_histogram_10 ;        //!<isp_wdr4_base_addr + 0x06c,
+    uint32_t isp_wdr4_histogram_11 ;        //!<isp_wdr4_base_addr + 0x070,
+    uint32_t isp_wdr4_histogram_12 ;        //!<isp_wdr4_base_addr + 0x074,
+    uint32_t isp_wdr4_histogram_13 ;        //!<isp_wdr4_base_addr + 0x078,
+    uint32_t isp_wdr4_entropy_0 ;        //!<isp_wdr4_base_addr + 0x07c,
+    uint32_t isp_wdr4_entropy_1 ;        //!<isp_wdr4_base_addr + 0x080,
+    uint32_t isp_wdr4_entropy_2 ;        //!<isp_wdr4_base_addr + 0x084,
+    uint32_t isp_wdr4_entropy_3 ;        //!<isp_wdr4_base_addr + 0x088,
+    uint32_t isp_wdr4_entropy_4 ;        //!<isp_wdr4_base_addr + 0x08c,
+    uint32_t isp_wdr4_entropy_5 ;        //!<isp_wdr4_base_addr + 0x090,
+    uint32_t isp_wdr4_entropy_6 ;        //!<isp_wdr4_base_addr + 0x094,
+    uint32_t isp_wdr4_gamma_pre_0 ;        //!<isp_wdr4_base_addr + 0x098,
+    uint32_t isp_wdr4_gamma_pre_1 ;        //!<isp_wdr4_base_addr + 0x09c,
+    uint32_t isp_wdr4_gamma_pre_2 ;        //!<isp_wdr4_base_addr + 0x0a0,
+    uint32_t isp_wdr4_gamma_pre_3 ;        //!<isp_wdr4_base_addr + 0x0a4,
+    uint32_t isp_wdr4_gamma_pre_4 ;        //!<isp_wdr4_base_addr + 0x0a8,
+    uint32_t isp_wdr4_gamma_pre_5 ;        //!<isp_wdr4_base_addr + 0x0ac,
+    uint32_t isp_wdr4_gamma_pre_6 ;        //!<isp_wdr4_base_addr + 0x0b0,
+    uint32_t isp_wdr4_gamma_pre_7 ;        //!<isp_wdr4_base_addr + 0x0b4,
+    uint32_t isp_wdr4_gamma_pre_8 ;        //!<isp_wdr4_base_addr + 0x0b8,
+    uint32_t isp_wdr4_gamma_pre_9 ;        //!<isp_wdr4_base_addr + 0x0bc,
+    uint32_t isp_wdr4_gamma_pre_10 ;        //!<isp_wdr4_base_addr + 0x0c0,
+    uint32_t isp_wdr4_gamma_pre_11 ;        //!<isp_wdr4_base_addr + 0x0c4,
+    uint32_t isp_wdr4_gamma_pre_12 ;        //!<isp_wdr4_base_addr + 0x0c8,
+    uint32_t isp_wdr4_gamma_pre_13 ;        //!<isp_wdr4_base_addr + 0x0cc,
+    uint32_t isp_wdr4_gamma_up_0 ;        //!<isp_wdr4_base_addr + 0x0d0,
+    uint32_t isp_wdr4_gamma_up_1 ;        //!<isp_wdr4_base_addr + 0x0d4,
+    uint32_t isp_wdr4_gamma_up_2 ;        //!<isp_wdr4_base_addr + 0x0d8,
+    uint32_t isp_wdr4_gamma_up_3 ;        //!<isp_wdr4_base_addr + 0x0dc,
+    uint32_t isp_wdr4_gamma_up_4 ;        //!<isp_wdr4_base_addr + 0x0e0,
+    uint32_t isp_wdr4_gamma_up_5 ;        //!<isp_wdr4_base_addr + 0x0e4,
+    uint32_t isp_wdr4_gamma_up_6 ;        //!<isp_wdr4_base_addr + 0x0e8,
+    uint32_t isp_wdr4_gamma_up_7 ;        //!<isp_wdr4_base_addr + 0x0ec,
+    uint32_t isp_wdr4_gamma_up_8 ;        //!<isp_wdr4_base_addr + 0x0f0,
+    uint32_t isp_wdr4_gamma_up_9 ;        //!<isp_wdr4_base_addr + 0x0f4,
+    uint32_t isp_wdr4_gamma_up_10 ;        //!<isp_wdr4_base_addr + 0x0f8,
+    uint32_t isp_wdr4_gamma_up_11 ;        //!<isp_wdr4_base_addr + 0x0fc,
+    uint32_t isp_wdr4_gamma_up_12 ;        //!<isp_wdr4_base_addr + 0x100,
+    uint32_t isp_wdr4_gamma_up_13 ;        //!<isp_wdr4_base_addr + 0x104,
+    uint32_t isp_wdr4_gamma_down_0 ;        //!<isp_wdr4_base_addr + 0x108,
+    uint32_t isp_wdr4_gamma_down_1 ;        //!<isp_wdr4_base_addr + 0x10c,
+    uint32_t isp_wdr4_gamma_down_2 ;        //!<isp_wdr4_base_addr + 0x110,
+    uint32_t isp_wdr4_gamma_down_3 ;        //!<isp_wdr4_base_addr + 0x114,
+    uint32_t isp_wdr4_gamma_down_4 ;        //!<isp_wdr4_base_addr + 0x118,
+    uint32_t isp_wdr4_gamma_down_5 ;        //!<isp_wdr4_base_addr + 0x11c,
+    uint32_t isp_wdr4_gamma_down_6 ;        //!<isp_wdr4_base_addr + 0x120,
+    uint32_t isp_wdr4_distance_weight_0 ;        //!<isp_wdr4_base_addr + 0x124,
+    uint32_t isp_wdr4_distance_weight_1 ;        //!<isp_wdr4_base_addr + 0x128,
+    uint32_t isp_wdr4_distance_weight_2 ;        //!<isp_wdr4_base_addr + 0x12c,
+    uint32_t isp_wdr4_distance_weight_3 ;        //!<isp_wdr4_base_addr + 0x130,
+    uint32_t isp_wdr4_distance_weight_4 ;        //!<isp_wdr4_base_addr + 0x134,
+    uint32_t isp_wdr4_difference_weight_0 ;        //!<isp_wdr4_base_addr + 0x138,
+    uint32_t isp_wdr4_difference_weight_1 ;        //!<isp_wdr4_base_addr + 0x13c,
+    uint32_t isp_wdr4_difference_weight_2 ;        //!<isp_wdr4_base_addr + 0x140,
+    uint32_t isp_wdr4_difference_weight_3 ;        //!<isp_wdr4_base_addr + 0x144,
+    uint32_t isp_wdr4_difference_weight_4 ;        //!<isp_wdr4_base_addr + 0x148,
+    uint32_t isp_wdr4_invert_curve_0 ;        //!<isp_wdr4_base_addr + 0x14c,
+    uint32_t isp_wdr4_invert_curve_1 ;        //!<isp_wdr4_base_addr + 0x150,
+    uint32_t isp_wdr4_invert_curve_2 ;        //!<isp_wdr4_base_addr + 0x154,
+    uint32_t isp_wdr4_invert_curve_3 ;        //!<isp_wdr4_base_addr + 0x158,
+    uint32_t isp_wdr4_invert_curve_4 ;        //!<isp_wdr4_base_addr + 0x15c,
+    uint32_t isp_wdr4_invert_curve_5 ;        //!<isp_wdr4_base_addr + 0x160,
+    uint32_t isp_wdr4_invert_curve_6 ;        //!<isp_wdr4_base_addr + 0x164,
+    uint32_t isp_wdr4_invert_curve_7 ;        //!<isp_wdr4_base_addr + 0x168,
+    uint32_t isp_wdr4_invert_curve_8 ;        //!<isp_wdr4_base_addr + 0x16c,
+    uint32_t isp_wdr4_invert_curve_9 ;        //!<isp_wdr4_base_addr + 0x170,
+    uint32_t isp_wdr4_invert_linear_0 ;        //!<isp_wdr4_base_addr + 0x174,
+    uint32_t isp_wdr4_invert_linear_1 ;        //!<isp_wdr4_base_addr + 0x178,
+    uint32_t isp_wdr4_invert_linear_2 ;        //!<isp_wdr4_base_addr + 0x17c,
+    uint32_t isp_wdr4_invert_linear_3 ;        //!<isp_wdr4_base_addr + 0x180,
+    uint32_t isp_wdr4_invert_linear_4 ;        //!<isp_wdr4_base_addr + 0x184,
+    uint32_t isp_wdr4_invert_linear_5 ;        //!<isp_wdr4_base_addr + 0x188,
+    uint32_t isp_wdr4_invert_linear_6 ;        //!<isp_wdr4_base_addr + 0x18c,
+    uint32_t isp_wdr4_invert_linear_7 ;        //!<isp_wdr4_base_addr + 0x190,
+    uint32_t isp_wdr4_invert_linear_8 ;        //!<isp_wdr4_base_addr + 0x194,
+    uint32_t isp_wdr4_invert_linear_9 ;        //!<isp_wdr4_base_addr + 0x198,
+    uint32_t isp_wdr4_invert_linear_10 ;        //!<isp_wdr4_base_addr + 0x19c,
+    uint32_t isp_wdr4_invert_linear_11 ;        //!<isp_wdr4_base_addr + 0x1a0,
+    uint32_t isp_wdr4_invert_linear_12 ;        //!<isp_wdr4_base_addr + 0x1a4,
+    uint32_t isp_wdr4_invert_linear_13 ;        //!<isp_wdr4_base_addr + 0x1a8,
+    uint32_t isp_wdr4_smooth_invert_0 ;        //!<isp_wdr4_base_addr + 0x1ac,
+    uint32_t isp_wdr4_smooth_invert_1 ;        //!<isp_wdr4_base_addr + 0x1b0,
+    uint32_t isp_wdr4_smooth_invert_2 ;        //!<isp_wdr4_base_addr + 0x1b4,
+    uint32_t isp_wdr4_smooth_invert_3 ;        //!<isp_wdr4_base_addr + 0x1b8,
+    uint32_t isp_wdr4_smooth_invert_4 ;        //!<isp_wdr4_base_addr + 0x1bc,
+    uint32_t isp_wdr4_shift_0 ;        //!<isp_wdr4_base_addr + 0x1c0,
+    uint32_t isp_wdr4_shift_1 ;        //!<isp_wdr4_base_addr + 0x1c4,
+    uint32_t isp_wdr4_shift_2 ;        //!<isp_wdr4_base_addr + 0x1c8,
+    uint32_t isp_wdr4_shift_3 ;        //!<isp_wdr4_base_addr + 0x1cc,
+    uint32_t isp_wdr4_shift0_0 ;        //!<isp_wdr4_base_addr + 0x1d0,
+    uint32_t isp_wdr4_shift0_1 ;        //!<isp_wdr4_base_addr + 0x1d4,
+    uint32_t isp_wdr4_shift0_2 ;        //!<isp_wdr4_base_addr + 0x1d8,
+    uint32_t isp_wdr4_strength_0_shd ;        //!<isp_wdr4_base_addr + 0x1dc,
+    uint32_t isp_wdr4_strength_1_shd ;        //!<isp_wdr4_base_addr + 0x1e0,
+    uint32_t isp_wdr4_contrast_shd ;        //!<isp_wdr4_base_addr + 0x1e4,
+    uint32_t isp_wdr4_pixel_slope_shd ;        //!<isp_wdr4_base_addr + 0x1e8,
+    uint32_t isp_wdr4_entropy_slope_shd ;        //!<isp_wdr4_base_addr + 0x1ec,
+
+    uint32_t _notused_54[(0x00005300 - 0x000052f0) / 4];
+    uint32_t isp_denoise3d2_ctrl;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0000,//0x00005300
+    uint32_t isp_denoise3d2_strength;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0004,//0x00005304
+    uint32_t isp_denoise3d2_noise;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0008,//0x00005308
+    uint32_t isp_denoise3d2_motion;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x000c,//0x0000530c
+    uint32_t isp_denoise3d2_range;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0010,//0x00005310
+    uint32_t isp_denoise3d2_motion_inv;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0014,//0x00005314
+    uint32_t isp_denoise3d2_update;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0018,//0x00005318
+    uint32_t isp_denoise3d2_tnr;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x001c,//0x0000531c
+    uint32_t isp_denoise3d2_shift;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0020,//0x00005320
+    uint32_t isp_denoise3d2_luma;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0024,//0x00005324
+    uint32_t isp_denoise3d2_ctrl_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0028,//0x00005328
+    uint32_t isp_denoise3d2_strength_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x002c,//0x0000532c
+    uint32_t isp_denoise3d2_noise_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0030,//0x00005330
+    uint32_t isp_denoise3d2_motion_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0034,//0x00005334
+    uint32_t isp_denoise3d2_range_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x00038,//0x00005338
+    uint32_t isp_denoise3d2_motion_inv_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x003c,//0x0000533c
+    uint32_t isp_denoise3d2_update_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0040,//0x00005340
+    uint32_t isp_denoise3d2_tnr_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0044,//0x00005344
+    uint32_t isp_denoise3d2_shift_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0048,//0x00005348
+    uint32_t isp_denoise3d2_luma_shd;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x004c,//0x0000534c
+    uint32_t isp_denoise3d2_bg_val_sum;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0050,//0x00005350
+    uint32_t isp_denoise3d2_mo_val_sum;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0054,//0x00005354
+    uint32_t isp_denoise3d2_bg_cnt;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0058,//0x00005358
+    uint32_t isp_denoise3d2_mo_cnt;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x005c,//0x0000535c
+    uint32_t isp_denoise3d2_frame_avg;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0060,//0x00005360
+    uint32_t isp_denoise3d2_dummy_hblank;        //!< denoise3d V2  isp_denoise3d2_base_addr+0x0060,//0x00005364
+    uint32_t _notused_54_1[(0x00005400 - 0x00005368) / 4];
+    uint32_t isp_denoise3d2_pregamma_y_0;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0000,//0x00005400
+    uint32_t isp_denoise3d2_pregamma_y_1;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0004,//0x00005404
+    uint32_t isp_denoise3d2_pregamma_y_2;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0008,//0x00005408
+    uint32_t isp_denoise3d2_pregamma_y_3;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x000c,//0x0000540c
+    uint32_t isp_denoise3d2_pregamma_y_4;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0010,//0x00005410
+    uint32_t isp_denoise3d2_pregamma_y_5;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0014,//0x00005414
+    uint32_t isp_denoise3d2_pregamma_y_6;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0018,//0x00005418
+    uint32_t isp_denoise3d2_pregamma_y_7;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x001c,//0x0000541c
+    uint32_t isp_denoise3d2_pregamma_y_8;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0020,//0x00005420
+    uint32_t isp_denoise3d2_pregamma_y_9;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0024,//0x00005424
+    uint32_t isp_denoise3d2_pregamma_y_10;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0028,//0x00005428
+    uint32_t isp_denoise3d2_pregamma_y_11;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x002c,//0x0000542c
+    uint32_t isp_denoise3d2_pregamma_y_12;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0030,//0x00005430
+    uint32_t isp_denoise3d2_pregamma_y_13;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0034,//0x00005434
+    uint32_t isp_denoise3d2_pregamma_y_0_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0038,//0x00005438
+    uint32_t isp_denoise3d2_pregamma_y_1_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x003c,//0x0000543c
+    uint32_t isp_denoise3d2_pregamma_y_2_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0040,//0x00005440
+    uint32_t isp_denoise3d2_pregamma_y_3_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0044,//0x00005444
+    uint32_t isp_denoise3d2_pregamma_y_4_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0048,//0x00005448
+    uint32_t isp_denoise3d2_pregamma_y_5_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x004c,//0x0000544c
+    uint32_t isp_denoise3d2_pregamma_y_6_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0050,//0x00005450
+    uint32_t isp_denoise3d2_pregamma_y_7_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0054,//0x00005454
+    uint32_t isp_denoise3d2_pregamma_y_8_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0058,//0x00005458
+    uint32_t isp_denoise3d2_pregamma_y_9_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x005c,//0x0000545c
+    uint32_t isp_denoise3d2_pregamma_y_10_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0060,//0x00005460
+    uint32_t isp_denoise3d2_pregamma_y_11_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0064,//0x00005464
+    uint32_t isp_denoise3d2_pregamma_y_12_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0068,//0x00005468
+    uint32_t isp_denoise3d2_pregamma_y_13_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x006c,//0x0000546c
+    uint32_t isp_denoise3d2_invgamma_y_0;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0070,//0x00005470
+    uint32_t isp_denoise3d2_invgamma_y_1;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0074,//0x00005474
+    uint32_t isp_denoise3d2_invgamma_y_2;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0078,//0x00005478
+    uint32_t isp_denoise3d2_invgamma_y_3;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x007c,//0x0000547c
+    uint32_t isp_denoise3d2_invgamma_y_4;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0080,//0x00005480
+    uint32_t isp_denoise3d2_invgamma_y_5;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0084,//0x00005484
+    uint32_t isp_denoise3d2_invgamma_y_6;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0088,//0x00005488
+    uint32_t isp_denoise3d2_invgamma_y_7;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x008c,//0x0000548c
+    uint32_t isp_denoise3d2_invgamma_y_8;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0090,//0x00005490
+    uint32_t isp_denoise3d2_invgamma_y_9;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0094,//0x00005494
+    uint32_t isp_denoise3d2_invgamma_y_10;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x0098,//0x00005498
+    uint32_t isp_denoise3d2_invgamma_y_11;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x009c,//0x0000549c
+    uint32_t isp_denoise3d2_invgamma_y_12;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00a0,//0x000054a0
+    uint32_t isp_denoise3d2_invgamma_y_13;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00a4,//0x000054a4
+    uint32_t isp_denoise3d2_invgamma_y_0_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00a8,//0x000054a8
+    uint32_t isp_denoise3d2_invgamma_y_1_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00ac,//0x000054ac
+    uint32_t isp_denoise3d2_invgamma_y_2_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00b0,//0x000054b0
+    uint32_t isp_denoise3d2_invgamma_y_3_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00b4,//0x000054b4
+    uint32_t isp_denoise3d2_invgamma_y_4_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00b8,//0x000054b8
+    uint32_t isp_denoise3d2_invgamma_y_5_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00bc,//0x000054bc
+    uint32_t isp_denoise3d2_invgamma_y_6_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00c0,//0x000054c0
+    uint32_t isp_denoise3d2_invgamma_y_7_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00c4,//0x000054c4
+    uint32_t isp_denoise3d2_invgamma_y_8_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00c8,//0x000054c8
+    uint32_t isp_denoise3d2_invgamma_y_9_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00cc,//0x000054cc
+    uint32_t isp_denoise3d2_invgamma_y_10_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00d0,//0x000054d0
+    uint32_t isp_denoise3d2_invgamma_y_11_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00d4,//0x000054d4
+    uint32_t isp_denoise3d2_invgamma_y_12_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00d8,//0x000054d8
+    uint32_t isp_denoise3d2_invgamma_y_13_shd;        //!< denoise3d V2  isp_denoise3d2_curve_base_addr+0x00dc,//0x000054dc
+
+    uint32_t _notused_55[(0x00005500 - 0x000054e0) / 4];
+    uint32_t isp_mi_pp_ctrl;        //!<0x00 isp_mi_pp_base
+    uint32_t isp_mi_pp_fmt;        //!<0x04 isp_mi_pp_base
+    uint32_t isp_mi_pp_data_swap;        //!<0x08 isp_mi_pp_base
+	uint32_t _notused_55_1[(0x00005520 - 0x0000550c) / 4];
+    uint32_t isp_mi_pp_y_base_ad_init;        //!<0x20 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_size_init;        //!<0x24 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_offs_cnt_init;        //!<0x28 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_llength;        //!<0x2c isp_mi_pp_base
+    uint32_t isp_mi_pp_y_pic_width;        //!<0x30 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_pic_height;        //!<0x34 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_pic_size;        //!<0x38 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_base_ad_init;        //!<0x3c isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_size_init;        //!<0x40 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_offs_cnt_init;        //!<0x44 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_base_ad_init;        //!<0x48 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_size_init;        //!<0x4c isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_offs_cnt_init;        //!<0x50 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_base_ad_init2;        //!<0x54 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_base_ad_init2;        //!<0x58 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_base_ad_init2;        //!<0x5c isp_mi_pp_base
+    uint32_t isp_mi_pp_y_offs_cnt_start;        //!<0x60 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_offs_cnt_start;        //!<0x64 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_offs_cnt_start;        //!<0x68 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_base_ad_shd;        //!<0x6c isp_mi_pp_base
+    uint32_t isp_mi_pp_y_size_shd;        //!<0x70 isp_mi_pp_base
+    uint32_t isp_mi_pp_y_offs_cnt_shd;        //!<0x74 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_base_ad_shd;        //!<0x78 isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_size_shd;        //!<0x7c isp_mi_pp_base
+    uint32_t isp_mi_pp_cb_offs_cnt_shd;        //!<0x80 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_base_ad_shd;        //!<0x84 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_size_shd;        //!<0x88 isp_mi_pp_base
+    uint32_t isp_mi_pp_cr_offs_cnt_shd;        //!<0x8c isp_mi_pp_base
+	uint32_t _notused_55_2[(0x00005598 - 0x00005590) / 4];
+    uint32_t isp_mi_pp_dma_y_pic_start_ad;        //!<0x98 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_y_pic_width;        //!<0x9c isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_y_pic_llength;        //!<0xa0 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_y_pic_size;        //!<0xa4 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_cb_pic_start_ad;        //!<0xa8 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_cr_pic_start_ad;        //!<0xac isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_y_pic_start_ad_shd;        //!<0xb0 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_cb_pic_start_ad_shd;        //!<0xb4 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_cr_pic_start_ad_shd;        //!<0xb8 isp_mi_pp_base
+    uint32_t isp_mi_pp_dma_y_pic_lval;        //!<0xbc isp_mi_pp_base
+
+	uint32_t mi_pp_dma_y_entry_line_num;
+	uint32_t mi_pp_dma_y_buf_line_num;
+	uint32_t mi_pp_dma_y_pic_height;
+	uint32_t mi_pp_y_lval_bytes;
+	uint32_t _notused_56[(0x00005600 - 0x000055d0) / 4];
+    uint32_t isp_mi_sp2_raw2_ctrl;        //!<0x00 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_fmt;        //!<0x04 isp_mi_sp2_raw2_base
+    uint32_t _notused_56_2[(0x00005620 - 0x00005608) / 4];
+    uint32_t isp_mi_sp2_raw2_base_ad_init;        //!<0x20 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_size_init;        //!<0x24 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_offs_cnt_init;        //!<0x28 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_llength;        //!<0x2c isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_pic_width;        //!<0x30 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_pic_height;        //!<0x34 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_pic_size;        //!<0x38 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_offs_cnt_start;        //!<0x3c isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_base_ad_shd;        //!<0x40 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_size_shd;        //!<0x44 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_raw2_offs_cnt_shd;        //!<0x48 isp_mi_sp2_raw2_base
+    uint32_t _notused_56_3[(0x00005660 - 0x0000564c) / 4];
+    uint32_t isp_mi_sp2_dma_raw2_pic_start_ad;        //!<0x60 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_width;        //!<0x64 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_llength;        //!<0x68 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_size;        //!<0x6c isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_start_ad_shd;        //!<0x70 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_width_shd;        //!<0x74 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_llength_shd;        //!<0x78 isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_size_shd;        //!<0x7c isp_mi_sp2_raw2_base
+    uint32_t isp_mi_sp2_dma_raw2_pic_lval;        //!<0x80 isp_mi_sp2_raw2_base
+
+	uint32_t mi_sp2_dma_raw2_pic_lval_shd;
+    uint32_t _notused_56_4[(0x00005690 - 0x00005688) / 4];
+	uint32_t mi_mp_ycbcr_entry_line_num;
+	uint32_t mi_mp_ycbcr_entry_pic_cnt;
+	uint32_t mi_mp_ycbcr_entry_y_cnt;
+	uint32_t mi_mp_ycbcr_entry_cb_cnt;
+	uint32_t mi_mp_ycbcr_entry_cr_cnt;
+	uint32_t mi_mp_raw_entry_line_num;
+	uint32_t mi_mp_raw_entry_pic_cnt;
+	uint32_t mi_sp1_ppw_ycbcr_entry_line_num;
+	uint32_t mi_sp1_ppw_ycbcr_entry_pic_cnt;
+	uint32_t mi_mcm_raw0_entry_line_num;
+	uint32_t mi_mcm_raw0_entry_pic_cnt;
+    uint32_t _notused_56_5[(0x000056d0 - 0x000056bc) / 4];
+	uint32_t miv2_imsc3;
+	uint32_t miv2_isr3;
+	uint32_t miv2_mis3;
+	uint32_t miv2_icr3;
+	uint32_t miv2_ris3;
+
+    uint32_t _notused_57[(0x00005700 - 0x000056e4) / 4];
+    uint32_t isp_mi_hdr_ctrl;        //!<0x00 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_fmt;        //!<0x04 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_dma_start_by_lines;        //!<0x08 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_ret_bus_cfg;        //!<0x0c isp_mi_hdr_base
+    uint32_t isp_mi_hdr_ret_bus_id;        //!<0x10 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_ret_bus_timeo;        //!<0x14 isp_mi_hdr_base
+    uint32_t _notused_57_2[(0x00005720 - 0x00005718) / 4];
+    uint32_t isp_mi_hdr_pic_width;        //!<0x20 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_pic_height;        //!<0x24 isp_mi_hdr_base
+    uint32_t _notused_57_3[(0x00005740 - 0x00005728) / 4];
+    uint32_t isp_mi_hdr_l_base_ad_init;        //!<0x40 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_size_init;        //!<0x44 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_offs_cnt_init;        //!<0x48 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_llength;        //!<0x4c isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_pic_lval;        //!<0x50 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_irq_offs_init;        //!<0x54 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_offs_cnt_start;        //!<0x58 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_base_ad_shd;        //!<0x5c isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_size_shd;        //!<0x60 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_offs_cnt_shd;        //!<0x64 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_l_irq_offs_shd;        //!<0x68 isp_mi_hdr_base
+    uint32_t _notused_57_4[(0x00005780 - 0x0000576c) / 4];
+    uint32_t isp_mi_hdr_s_base_ad_init;        //!<0x80 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_size_init;        //!<0x84 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_offs_cnt_init;        //!<0x88 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_llength;        //!<0x8c isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_pic_lval;        //!<0x90 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_irq_offs_init;        //!<0x94 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_offs_cnt_start;        //!<0x98 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_base_ad_shd;        //!<0x9c isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_size_shd;        //!<0xa0 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_offs_cnt_shd;        //!<0xa4 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_s_irq_offs_shd;        //!<0xa8 isp_mi_hdr_base
+    uint32_t _notused_57_5[(0x000057c0 - 0x000057ac) / 4];
+    uint32_t isp_mi_hdr_vs_base_ad_init;        //!<0xc0 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_size_init;        //!<0xc4 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_offs_cnt_init;        //!<0xc8 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_llength;        //!<0xcc isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_pic_lval;        //!<0xd0 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_irq_offs_init;        //!<0xd4 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_offs_cnt_start;        //!<0xd8 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_base_ad_shd;        //!<0xdc isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_size_shd;        //!<0xe0 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_offs_cnt_shd;        //!<0xe4 isp_mi_hdr_base
+    uint32_t isp_mi_hdr_vs_irq_offs_shd;        //!<0xe8 isp_mi_hdr_base
+    uint32_t _notused_58[(0x00005800 - 0x000057ec) / 4];
+    uint32_t isp_mi_hdr_dma_pic_width;        //!<0x00 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_pic_height;        //!<0x04 isp_mi_hdr_dma_base
+	uint32_t _notused_58_1[(0x00005820 - 0x00005808) / 4];
+    uint32_t isp_mi_hdr_dma_l_base_ad_init;        //!<0x20 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_l_size_init;        //!<0x24 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_l_llength;        //!<0x28 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_l_lval;        //!<0x2c isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_l_base_ad_shd;        //!<0x30 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_l_size_shd;        //!<0x34 isp_mi_hdr_dma_base
+	uint32_t _notused_58_2[(0x00005850 - 0x00005838) / 4];
+    uint32_t isp_mi_hdr_dma_s_base_ad_init;        //!<0x50 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_s_size_init;        //!<0x54 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_s_llength;        //!<0x58 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_s_lval;        //!<0x5c isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_s_base_ad_shd;        //!<0x60 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_s_size_shd;        //!<0x64 isp_mi_hdr_dma_base
+	uint32_t _notused_58_3[(0x00005880 - 0x00005868) / 4];
+    uint32_t isp_mi_hdr_dma_vs_base_ad_init;        //!<0x80 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_vs_size_init;        //!<0x84 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_vs_llength;        //!<0x88 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_vs_lval;        //!<0x8c isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_vs_base_ad_shd;        //!<0x90 isp_mi_hdr_dma_base
+    uint32_t isp_mi_hdr_dma_vs_size_shd;        //!<0x94 isp_mi_hdr_dma_base
+	uint32_t _notused_58_4[(0x00005900 - 0x00005898) / 4];
+    uint32_t isp_hdr_ret_ctrl;        //!<0x00 isp_hdr_ret_base
+    uint32_t isp_hdr_interval;        //!<0x04 isp_hdr_ret_base
+    uint32_t isp_hdr_ret_h_blank;        //!<0x08 isp_hdr_ret_h_blank
+    uint32_t isp_hdr_ret_v_blank;        //!<0x0c isp_hdr_ret_v_blank
+    uint32_t isp_hdr_ret_h_size;        //!<0x010 isp_hdr_ret_h_size
+    uint32_t isp_hdr_ret_v_size;        //!<0x014 isp_hdr_ret_v_size
+} MrvAllRegister_t;
+
+/* - MASK AND SHIFT MARCOS ----------------------------------------------------------*/
+
+/*! Register: vi_ccl: Clock control register (0x00000000)*/
+/*! Slice: vi_ccl_dis:*/
+/*! Clock Control Logic disable */
+/* 0: processing/cfg-clocks for all marvin sub modules enabled */
+/* 1: processing/cfg-clocks for all marvin sub modules disabled w/o access to ID and VI_CCL register */
+#define MRV_VI_CCL_DIS
+#define MRV_VI_CCL_DIS_MASK 0x00000004U
+#define MRV_VI_CCL_DIS_SHIFT 2U
+/*! Slice: vi_ccl_dis_status:*/
+/*! Status of vi_ccl[2] bit (copy of vi_ccl[2])*/
+#define MRV_VI_CCL_DIS_STATUS
+#define MRV_VI_CCL_DIS_STATUS_MASK 0x00000002U
+#define MRV_VI_CCL_DIS_STATUS_SHIFT 1U
+
+/*! Register: vi_id: Revision identification register (0x00000008)*/
+/*! Slice: rev_id:*/
+/*! MARVIN5 revision IDs:*/
+/* M5_v1 id =  0x0015'3010  release 1.0 */
+/* M5_v1 id =  0x1015'3010  release 1.1 */
+/* M5_v2 id =  0x0025'3010 */
+/* M5_v2 id =  0x0075'3010  release 2.0 (full feature set)*/
+/* M5_v3 id =  0x0035'3010 */
+/* M5_v3 id =  0x2035'3010  with bug fixes in MIPI, MI, LSC */
+/* M5_v4 id =  0x0045'3010 */
+/* M5_v4 id =  0x1045'3010  with bug fixes in MIPI, MI, LSC */
+/* M5_v6 id =  0x0055'3010 */
+/* M5_v7 id =  0x0065'3010 */
+/* M12_v1 id (Rel. 1.0) = 0x0015'3017 */
+/* M12_v1 id (Rel. 1.2) = 0x1015'3017 */
+/* M12_v1 id (Rel. 2.0) = 0x2015'3017 */
+/* M12_v1 id (Rel. 2.1) = 0x3015'3017 */
+/* M12_v2 id = 0x0025'3017 */
+/* M12_v3 id (Rel. 1.0) = 0x0065'3017 */
+/* M12_v3 id (Rel. 1.1) = 0x1065'3017 */
+/* M14_v1 id (Rel. 1.0) = 0x0075'3017 */
+/* M14_v1 id (Rel. 1.1) = 0x1075'3017 */
+/* M14_v2 id (Rel. 1.0) = 0x0085'3017 */
+/* M18_v1 id = 0x0035'3017 (MarvinBase)*/
+/* M20_v1 id (Rel. 1.0) = 0x0055'3017 */
+/* M20_v1 id (Rel. 1.1) = 0x1055'3017 */
+/* M20_v1 id (Rel. 1.2) = 0x2055'3017 */
+/* M20_v2 id (Rel. 1.0) = 0x0095'3017 */
+/* M64_v1 id = 0x0045'3017 */
+#define MRV_REV_ID
+#define MRV_REV_ID_MASK 0xFFFFFFFFU
+#define MRV_REV_ID_SHIFT 0U
+
+/*! Register: vi_iccl: Internal clock  control register (0x00000010)*/
+/*! Slice: vi_mipi_clk_enable:*/
+/*! MIPI interface clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_MIPI_CLK_ENABLE
+#define MRV_VI_MIPI_CLK_ENABLE_MASK 0x00000800U
+#define MRV_VI_MIPI_CLK_ENABLE_SHIFT 11U
+/*! Slice: vi_smia_clk_enable:*/
+/*! SMIA interface clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_SMIA_CLK_ENABLE
+#define MRV_VI_SMIA_CLK_ENABLE_MASK 0x00000400U
+#define MRV_VI_SMIA_CLK_ENABLE_SHIFT 10U
+/*! Slice: vi_simp_clk_enable:*/
+/*! Superimpose clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_SIMP_CLK_ENABLE
+#define MRV_VI_SIMP_CLK_ENABLE_MASK 0x00000200U
+#define MRV_VI_SIMP_CLK_ENABLE_SHIFT 9U
+/*! Slice: vi_ie_clk_enable:*/
+/*! Image effect clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_IE_CLK_ENABLE
+#define MRV_VI_IE_CLK_ENABLE_MASK 0x00000100U
+#define MRV_VI_IE_CLK_ENABLE_SHIFT 8U
+/*! Slice: vi_mi_clk_enable:*/
+/*! memory interface clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_MI_CLK_ENABLE
+#define MRV_VI_MI_CLK_ENABLE_MASK 0x00000040U
+#define MRV_VI_MI_CLK_ENABLE_SHIFT 6U
+/*! Slice: vi_jpeg_clk_enable:*/
+/*! JPEG encoder clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_JPEG_CLK_ENABLE
+#define MRV_VI_JPEG_CLK_ENABLE_MASK 0x00000020U
+#define MRV_VI_JPEG_CLK_ENABLE_SHIFT 5U
+/*! Slice: vi_srsz_clk_enable:*/
+/*! self picture resize clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_SRSZ_CLK_ENABLE
+#define MRV_VI_SRSZ_CLK_ENABLE_MASK 0x00000010U
+#define MRV_VI_SRSZ_CLK_ENABLE_SHIFT 4U
+/*! Slice: vi_mrsz_clk_enable:*/
+/*! main picture resize clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_MRSZ_CLK_ENABLE
+#define MRV_VI_MRSZ_CLK_ENABLE_MASK 0x00000008U
+#define MRV_VI_MRSZ_CLK_ENABLE_SHIFT 3U
+/*! Slice: vi_cp_clk_enable:*/
+/*! color processing clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_CP_CLK_ENABLE
+#define MRV_VI_CP_CLK_ENABLE_MASK 0x00000002U
+#define MRV_VI_CP_CLK_ENABLE_SHIFT 1U
+/*! Slice: vi_isp_clk_enable:*/
+/*! isp processing clock enable */
+/* 1: processing mode */
+/* 0: power safe */
+#define MRV_VI_ISP_CLK_ENABLE
+#define MRV_VI_ISP_CLK_ENABLE_MASK 0x00000001U
+#define MRV_VI_ISP_CLK_ENABLE_SHIFT 0U
+
+/*! Register: vi_ircl: Internal reset control register (0x00000014)*/
+/*! Slice: vi_mipi_soft_rst:*/
+/*! MIPI Interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_MIPI_SOFT_RST
+#define MRV_VI_MIPI_SOFT_RST_MASK 0x00000800U
+#define MRV_VI_MIPI_SOFT_RST_SHIFT 11U
+/*! Slice: vi_smia_soft_rst:*/
+/*! SMIA Interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_SMIA_SOFT_RST
+#define MRV_VI_SMIA_SOFT_RST_MASK 0x00000400U
+#define MRV_VI_SMIA_SOFT_RST_SHIFT 10U
+/*! Slice: vi_simp_soft_rst:*/
+/*! Superimpose software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_SIMP_SOFT_RST
+#define MRV_VI_SIMP_SOFT_RST_MASK 0x00000200U
+#define MRV_VI_SIMP_SOFT_RST_SHIFT 9U
+/*! Slice: vi_ie_soft_rst:*/
+/*! Image effect software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_IE_SOFT_RST
+#define MRV_VI_IE_SOFT_RST_MASK 0x00000100U
+#define MRV_VI_IE_SOFT_RST_SHIFT 8U
+/*! Slice: vi_marvin_rst:*/
+/*! hardware reset of entire marvin */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_MARVIN_RST
+#define MRV_VI_MARVIN_RST_MASK 0x00000080U
+#define MRV_VI_MARVIN_RST_SHIFT 7U
+/*! Slice: vi_mi_soft_rst:*/
+/*! memory interface software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_MI_SOFT_RST
+#define MRV_VI_MI_SOFT_RST_MASK 0x00000040U
+#define MRV_VI_MI_SOFT_RST_SHIFT 6U
+/*! Slice: vi_jpeg_soft_rst:*/
+/*! JPEG encoder software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_JPEG_SOFT_RST
+#define MRV_VI_JPEG_SOFT_RST_MASK 0x00000020U
+#define MRV_VI_JPEG_SOFT_RST_SHIFT 5U
+/*! Slice: vi_srsz_soft_rst:*/
+/*! Self-picture resize software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_SRSZ_SOFT_RST
+#define MRV_VI_SRSZ_SOFT_RST_MASK 0x00000010U
+#define MRV_VI_SRSZ_SOFT_RST_SHIFT 4U
+/*! Slice: vi_mrsz_soft_rst:*/
+/*! Main-picture resize software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_MRSZ_SOFT_RST
+#define MRV_VI_MRSZ_SOFT_RST_MASK 0x00000008U
+#define MRV_VI_MRSZ_SOFT_RST_SHIFT 3U
+/*! Slice: vi_ycs_soft_rst:*/
+/*! y/c splitter software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_YCS_SOFT_RST
+#define MRV_VI_YCS_SOFT_RST_MASK 0x00000004U
+#define MRV_VI_YCS_SOFT_RST_SHIFT 2U
+/*! Slice: vi_cp_soft_rst:*/
+/*! color processing software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_CP_SOFT_RST
+#define MRV_VI_CP_SOFT_RST_MASK 0x00000002U
+#define MRV_VI_CP_SOFT_RST_SHIFT 1U
+/*! Slice: vi_isp_soft_rst:*/
+/*! isp software reset */
+/* 0: processing mode */
+/* 1: reset state */
+#define MRV_VI_ISP_SOFT_RST
+#define MRV_VI_ISP_SOFT_RST_MASK 0x00000001U
+#define MRV_VI_ISP_SOFT_RST_SHIFT 0U
+
+/*! Register: vi_dpcl: Data path control register (0x00000018)*/
+/*! Slice: vi_dma_spmux:*/
+/*! 0: data from camera interface to self resize */
+/* 1: data from DMA read port to self resize */
+#define MRV_VI_DMA_SPMUX
+#define MRV_VI_DMA_SPMUX_MASK 0x00000800U
+#define MRV_VI_DMA_SPMUX_SHIFT 11U
+/*! Slice: vi_dma_iemux:*/
+/*! 0: data from camera interface to image effects */
+/* 1: data from DMA read port to image effects */
+#define MRV_VI_DMA_IEMUX
+#define MRV_VI_DMA_IEMUX_MASK 0x00000400U
+#define MRV_VI_DMA_IEMUX_SHIFT 10U
+/*! Slice: if_select:*/
+/*! selects input interface */
+/* 0: parallel interface */
+/* 1: SMIA-interface */
+/* 2: MIPI-interface */
+/* 3: HDR-interface */
+#define MRV_IF_SELECT
+#define MRV_IF_SELECT_MASK 0x00000300U
+#define MRV_IF_SELECT_SHIFT 8U
+/*! Slice: vi_dma_switch:*/
+/*! DMA read data path selector */
+/* 0: path to SPMUX */
+/* 1: path to Superimpose */
+/* 2: path to Image Effects */
+/* 3: path to JPEG encoder */
+/* 4: path to ISP Bayer RGB */
+/* 5..7: reserved */
+#define MRV_VI_DMA_SWITCH
+#define MRV_VI_DMA_SWITCH_MASK 0x00000070U
+#define MRV_VI_DMA_SWITCH_SHIFT 4U
+/*! Slice: vi_chan_mode:*/
+/*! Y/C splitter channel mode */
+/* 0: disabled */
+/* 1: main path and raw data mode */
+/* 2: self path mode */
+/* 3: main and self path mode */
+#define MRV_VI_CHAN_MODE
+#ifdef ISPVI_EXPAND_CHAN
+#define MRV_VI_CHAN_MODE_MASK 0x00007000U
+#define MRV_VI_CHAN_MODE_SHIFT 12U
+#else
+#define MRV_VI_CHAN_MODE_MASK 0x0000000CU
+#define MRV_VI_CHAN_MODE_SHIFT 2U
+#endif
+/*! Slice: vi_mp_mux:*/
+/*! data path selector for main path */
+/* 00: data from DMA read port to JPEG encoder */
+/* 01: data from main resize to MI, uncompressed */
+/* 10: data from main resize to JPEG encoder */
+/* 11: reserved */
+#define MRV_VI_MP_MUX
+#define MRV_VI_MP_MUX_MASK 0x00000003U
+#define MRV_VI_MP_MUX_SHIFT 0U
+
+#define MRV_VI_DPCL_STRM_MUX
+#define MRV_VI_DPCL_STRM_MUX_MASK 0x00040000U
+#define MRV_VI_DPCL_STRM_MUX_SHIFT 18U
+
+/*! Register: img_eff_ctrl: Global control register (0x00000000)*/
+/*! Slice: full_range:*/
+/*! '0': pixel value range according to BT.601 */
+/* '1': YCbCr full range 0...255 */
+#define MRV_IMGEFF_FULL_RANGE
+#define MRV_IMGEFF_FULL_RANGE_MASK 0x00000020U
+#define MRV_IMGEFF_FULL_RANGE_SHIFT 5U
+/*! Slice: cfg_upd:*/
+/*! write '0': nothing happens */
+/* write '1': update shadow registers */
+/* read: always '0'*/
+#define MRV_IMGEFF_CFG_UPD
+#define MRV_IMGEFF_CFG_UPD_MASK 0x00000010U
+#define MRV_IMGEFF_CFG_UPD_SHIFT 4U
+/*! Slice: effect_mode:*/
+/*! effect mode */
+/* 000: black & white effect (grayscale)*/
+/* 001: negative */
+/* 010: sepia effect */
+/* 011: color selection effect */
+/* 100: emboss effect */
+/* 101: sketch effect */
+/* 110: sharpen effect */
+/* 111: reserved */
+#define MRV_IMGEFF_EFFECT_MODE
+#define MRV_IMGEFF_EFFECT_MODE_MASK 0x0000000EU
+#define MRV_IMGEFF_EFFECT_MODE_SHIFT 1U
+/*! Slice: bypass_mode:*/
+/*! bypass mode */
+/* 1: processing is activated */
+/* 0: processing is deactivated, bypass mode is selected */
+#define MRV_IMGEFF_BYPASS_MODE
+#define MRV_IMGEFF_BYPASS_MODE_MASK 0x00000001U
+#define MRV_IMGEFF_BYPASS_MODE_SHIFT 0U
+
+/*! Register: img_eff_color_sel: Color selection register (for color selection effect) (0x00000004)*/
+/*! Slice: color_threshold:*/
+/*! Threshold value of the RGB colors for the color selection effect.*/
+#define MRV_IMGEFF_COLOR_THRESHOLD
+#define MRV_IMGEFF_COLOR_THRESHOLD_MASK 0x0000FF00U
+#define MRV_IMGEFF_COLOR_THRESHOLD_SHIFT 8U
+/*! Slice: color_selection:*/
+/*! Defining the maintained color:*/
+/* 000: red green and blue */
+/* 001: blue */
+/* 010: green */
+/* 011: green and blue */
+/* 100: red */
+/* 101: red and blue */
+/* 110: red and green */
+/* 111: red green and blue */
+#define MRV_IMGEFF_COLOR_SELECTION
+#define MRV_IMGEFF_COLOR_SELECTION_MASK 0x00000007U
+#define MRV_IMGEFF_COLOR_SELECTION_SHIFT 0U
+
+/*! Register: img_eff_mat_1: 3x3 matrix coefficients for emboss effect (1) (0x00000008)*/
+/*! Slice: emb_coef_21_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_21_EN
+#define MRV_IMGEFF_EMB_COEF_21_EN_MASK 0x00008000U
+#define MRV_IMGEFF_EMB_COEF_21_EN_SHIFT 15U
+/*! Slice: emb_coef_21:*/
+/*! second line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_21
+#define MRV_IMGEFF_EMB_COEF_21_MASK 0x00007000U
+#define MRV_IMGEFF_EMB_COEF_21_SHIFT 12U
+/*! Slice: emb_coef_13_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_13_EN
+#define MRV_IMGEFF_EMB_COEF_13_EN_MASK 0x00000800U
+#define MRV_IMGEFF_EMB_COEF_13_EN_SHIFT 11U
+/*! Slice: emb_coef_13:*/
+/*! first line, right entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_13
+#define MRV_IMGEFF_EMB_COEF_13_MASK 0x00000700U
+#define MRV_IMGEFF_EMB_COEF_13_SHIFT 8U
+/*! Slice: emb_coef_12_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_12_EN
+#define MRV_IMGEFF_EMB_COEF_12_EN_MASK 0x00000080U
+#define MRV_IMGEFF_EMB_COEF_12_EN_SHIFT 7U
+/*! Slice: emb_coef_12:*/
+/*! first line, middle entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_12
+#define MRV_IMGEFF_EMB_COEF_12_MASK 0x00000070U
+#define MRV_IMGEFF_EMB_COEF_12_SHIFT 4U
+/*! Slice: emb_coef_11_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_11_EN
+#define MRV_IMGEFF_EMB_COEF_11_EN_MASK 0x00000008U
+#define MRV_IMGEFF_EMB_COEF_11_EN_SHIFT 3U
+/*! Slice: emb_coef_11:*/
+/*! first line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_11
+#define MRV_IMGEFF_EMB_COEF_11_MASK 0x00000007U
+#define MRV_IMGEFF_EMB_COEF_11_SHIFT 0U
+
+/*! Register: img_eff_mat_2: 3x3 matrix coefficients for emboss effect (2) (0x0000000c)*/
+/*! Slice: emb_coef_32_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_32_EN
+#define MRV_IMGEFF_EMB_COEF_32_EN_MASK 0x00008000U
+#define MRV_IMGEFF_EMB_COEF_32_EN_SHIFT 15U
+/*! Slice: emb_coef_32:*/
+/*! third line, middle entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_32
+#define MRV_IMGEFF_EMB_COEF_32_MASK 0x00007000U
+#define MRV_IMGEFF_EMB_COEF_32_SHIFT 12U
+/*! Slice: emb_coef_31_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_31_EN
+#define MRV_IMGEFF_EMB_COEF_31_EN_MASK 0x00000800U
+#define MRV_IMGEFF_EMB_COEF_31_EN_SHIFT 11U
+/*! Slice: emb_coef_31:*/
+/*! third line, left entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_31
+#define MRV_IMGEFF_EMB_COEF_31_MASK 0x00000700U
+#define MRV_IMGEFF_EMB_COEF_31_SHIFT 8U
+/*! Slice: emb_coef_23_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_23_EN
+#define MRV_IMGEFF_EMB_COEF_23_EN_MASK 0x00000080U
+#define MRV_IMGEFF_EMB_COEF_23_EN_SHIFT 7U
+/*! Slice: emb_coef_23:*/
+/*! second line, right entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_23
+#define MRV_IMGEFF_EMB_COEF_23_MASK 0x00000070U
+#define MRV_IMGEFF_EMB_COEF_23_SHIFT 4U
+/*! Slice: emb_coef_22_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_22_EN
+#define MRV_IMGEFF_EMB_COEF_22_EN_MASK 0x00000008U
+#define MRV_IMGEFF_EMB_COEF_22_EN_SHIFT 3U
+/*! Slice: emb_coef_22:*/
+/*! second line, middle entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_22
+#define MRV_IMGEFF_EMB_COEF_22_MASK 0x00000007U
+#define MRV_IMGEFF_EMB_COEF_22_SHIFT 0U
+
+/*! Register: img_eff_mat_3: 3x3 matrix coefficients for emboss(3) effect / sketch/sharpen(1) effect (0x00000010)*/
+/*! Slice: sket_coef_13_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_13_EN
+#define MRV_IMGEFF_SKET_COEF_13_EN_MASK 0x00008000U
+#define MRV_IMGEFF_SKET_COEF_13_EN_SHIFT 15U
+/*! Slice: sket_coef_13:*/
+/*! first line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_13
+#define MRV_IMGEFF_SKET_COEF_13_MASK 0x00007000U
+#define MRV_IMGEFF_SKET_COEF_13_SHIFT 12U
+/*! Slice: sket_coef_12_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_12_EN
+#define MRV_IMGEFF_SKET_COEF_12_EN_MASK 0x00000800U
+#define MRV_IMGEFF_SKET_COEF_12_EN_SHIFT 11U
+/*! Slice: sket_coef_12:*/
+/*! first line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_12
+#define MRV_IMGEFF_SKET_COEF_12_MASK 0x00000700U
+#define MRV_IMGEFF_SKET_COEF_12_SHIFT 8U
+/*! Slice: sket_coef_11_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_11_EN
+#define MRV_IMGEFF_SKET_COEF_11_EN_MASK 0x00000080U
+#define MRV_IMGEFF_SKET_COEF_11_EN_SHIFT 7U
+/*! Slice: sket_coef_11:*/
+/*! first line, left entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_11
+#define MRV_IMGEFF_SKET_COEF_11_MASK 0x00000070U
+#define MRV_IMGEFF_SKET_COEF_11_SHIFT 4U
+/*! Slice: emb_coef_33_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_EMB_COEF_33_EN
+#define MRV_IMGEFF_EMB_COEF_33_EN_MASK 0x00000008U
+#define MRV_IMGEFF_EMB_COEF_33_EN_SHIFT 3U
+/*! Slice: emb_coef_33:*/
+/*! third line, right entry of 3x3 emboss effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_EMB_COEF_33
+#define MRV_IMGEFF_EMB_COEF_33_MASK 0x00000007U
+#define MRV_IMGEFF_EMB_COEF_33_SHIFT 0U
+
+/*! Register: img_eff_mat_4: 3x3 matrix coefficients for sketch/sharpen effect (2) (0x00000014)*/
+/*! Slice: sket_coef_31_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_31_EN
+#define MRV_IMGEFF_SKET_COEF_31_EN_MASK 0x00008000U
+#define MRV_IMGEFF_SKET_COEF_31_EN_SHIFT 15U
+/*! Slice: sket_coef_31:*/
+/*! third line, left entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_31
+#define MRV_IMGEFF_SKET_COEF_31_MASK 0x00007000U
+#define MRV_IMGEFF_SKET_COEF_31_SHIFT 12U
+/*! Slice: sket_coef_23_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_23_EN
+#define MRV_IMGEFF_SKET_COEF_23_EN_MASK 0x00000800U
+#define MRV_IMGEFF_SKET_COEF_23_EN_SHIFT 11U
+/*! Slice: sket_coef_23:*/
+/*! second line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_23
+#define MRV_IMGEFF_SKET_COEF_23_MASK 0x00000700U
+#define MRV_IMGEFF_SKET_COEF_23_SHIFT 8U
+/*! Slice: sket_coef_22_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_22_EN
+#define MRV_IMGEFF_SKET_COEF_22_EN_MASK 0x00000080U
+#define MRV_IMGEFF_SKET_COEF_22_EN_SHIFT 7U
+/*! Slice: sket_coef_22:*/
+/*! second line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_22
+#define MRV_IMGEFF_SKET_COEF_22_MASK 0x00000070U
+#define MRV_IMGEFF_SKET_COEF_22_SHIFT 4U
+/*! Slice: sket_coef_21_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_21_EN
+#define MRV_IMGEFF_SKET_COEF_21_EN_MASK 0x00000008U
+#define MRV_IMGEFF_SKET_COEF_21_EN_SHIFT 3U
+/*! Slice: sket_coef_21:*/
+/*! second line, left entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_21
+#define MRV_IMGEFF_SKET_COEF_21_MASK 0x00000007U
+#define MRV_IMGEFF_SKET_COEF_21_SHIFT 0U
+
+/*! Register: img_eff_mat_5: 3x3 matrix coefficients for sketch/sharpen effect (3) (0x00000018)*/
+/*! Slice: sket_coef_33_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_33_EN
+#define MRV_IMGEFF_SKET_COEF_33_EN_MASK 0x00000080U
+#define MRV_IMGEFF_SKET_COEF_33_EN_SHIFT 7U
+/*! Slice: sket_coef_33:*/
+/*! third line, right entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_33
+#define MRV_IMGEFF_SKET_COEF_33_MASK 0x00000070U
+#define MRV_IMGEFF_SKET_COEF_33_SHIFT 4U
+/*! Slice: sket_coef_32_en:*/
+/*! 0: entry not used (coefficient is zero)*/
+/* 1: entry used */
+#define MRV_IMGEFF_SKET_COEF_32_EN
+#define MRV_IMGEFF_SKET_COEF_32_EN_MASK 0x00000008U
+#define MRV_IMGEFF_SKET_COEF_32_EN_SHIFT 3U
+/*! Slice: sket_coef_32:*/
+/*! third line, middle entry of 3x3 sketch effect matrix, 2 bit for coefficient, one sign bit.*/
+#define MRV_IMGEFF_SKET_COEF_32
+#define MRV_IMGEFF_SKET_COEF_32_MASK 0x00000007U
+#define MRV_IMGEFF_SKET_COEF_32_SHIFT 0U
+
+/*! Register: img_eff_tint: Chrominance increment values of a tint (used for sepia effect) (0x0000001c)*/
+/*! Slice: incr_cr:*/
+/*! Cr increment value of a tint. 7 bits for value, 1 sign bit.*/
+/* Default tint is R=162 G=138 B=101, which is used for the sepia effect. See below for the calculation of the entries.*/
+#define MRV_IMGEFF_INCR_CR
+#define MRV_IMGEFF_INCR_CR_MASK 0x0000FF00U
+#define MRV_IMGEFF_INCR_CR_SHIFT 8U
+/*! Slice: incr_cb:*/
+/*! Cb increment value of a tint. 7 bits for value, 1 sign bit.*/
+/* Default tint is R=162 G=138 B=101, which is used for the sepia effect. See below for the calculation of the entries.*/
+#define MRV_IMGEFF_INCR_CB
+#define MRV_IMGEFF_INCR_CB_MASK 0x000000FFU
+#define MRV_IMGEFF_INCR_CB_SHIFT 0U
+
+/*! Register: img_eff_ctrl_shd: Shadow register for control register (0x00000020)*/
+/*! Slice: effect_mode_shd:*/
+/*! effect mode */
+/* 000: black & white effect (grayscale)*/
+/* 001: negative */
+/* 010: sepia effect */
+/* 011: color selection effect */
+/* 100: emboss effect */
+/* 101: sketch effect */
+/* 110: sharpen effect */
+/* 111: reserved */
+#define MRV_IMGEFF_EFFECT_MODE_SHD
+#define MRV_IMGEFF_EFFECT_MODE_SHD_MASK 0x0000000EU
+#define MRV_IMGEFF_EFFECT_MODE_SHD_SHIFT 1U
+
+/*! Register: img_eff_sharpen: Factor and threshold for sharpen effect (0x00000024)*/
+/*! Slice: sharp_factor:*/
+/*! 6Bit Factor for sharpening function. Value range is from 0x0 to 0x3F. High value means strong sharpening. The resulting factors are for example:*/
+/* 0x00 =	0 (no sharpen effect like bypass)*/
+/* 0x01 =	0.25 */
+/* 0x02 =	0.5 */
+/* 0x03 =	0.75 */
+/* 0x04 =	1.0 */
+/* 0x05 =	1.25 */
+/* 0x06 =	1.5 */
+/* 0x08 =	2.0 */
+/* 0x0A =	2.5 */
+/* 0x0C =	3.0 */
+/* 0x10 =	4.0 */
+/* 0x18 =	6.0 */
+/* 0x20 =	8.0 */
+/* 0x30 =	12.0 */
+/* 0x3F =	15.75 */
+#define MRV_IMGEFF_SHARP_FACTOR
+#define MRV_IMGEFF_SHARP_FACTOR_MASK 0x00003F00U
+#define MRV_IMGEFF_SHARP_FACTOR_SHIFT 8U
+/*! Slice: coring_thr:*/
+/*! Threshold for coring function. This value is used to avoid amplifying noise too much by suppressing sharpening for small gradients. Higher value means less sharpening for smooth edges.  Threshold zero means no coring, so all gradients are treated the same. Threshold 255 means nearly no sharpening. An absolute value for the highpass signal is defined here. The highpass signal is truncated at the defined level.*/
+#define MRV_IMGEFF_CORING_THR
+#define MRV_IMGEFF_CORING_THR_MASK 0x000000FFU
+#define MRV_IMGEFF_CORING_THR_SHIFT 0U
+
+/*! Register: super_imp_ctrl: Global control register (0x00000000)*/
+/*! Slice: transparency_mode:*/
+/*! transparency mode */
+/* 1: transparency mode disabled */
+/* 0: transparency mode enabled */
+#define MRV_SI_TRANSPARENCY_MODE
+#define MRV_SI_TRANSPARENCY_MODE_MASK 0x00000004U
+#define MRV_SI_TRANSPARENCY_MODE_SHIFT 2U
+/*! Slice: ref_image:*/
+/*! define the reference image */
+/* 1: superimpose bitmap from main memory */
+/* 0: image from the Image Effect module */
+/* Note: the reference image defines the size of the output image */
+#define MRV_SI_REF_IMAGE
+#define MRV_SI_REF_IMAGE_MASK 0x00000002U
+#define MRV_SI_REF_IMAGE_SHIFT 1U
+/*! Slice: bypass_mode:*/
+/*! Bypass mode */
+/* 0: bypass mode */
+/* 1: normal operation */
+/* Note: in the bypass mode the data stream from Image Effect is transmitted to MUX module without overlaying */
+#define MRV_SI_BYPASS_MODE
+#define MRV_SI_BYPASS_MODE_MASK 0x00000001U
+#define MRV_SI_BYPASS_MODE_SHIFT 0U
+
+/*! Register: super_imp_offset_x: Offset x register (0x00000004)*/
+/*! Slice: offset_x:*/
+/*! Offset X */
+/* Note: the bit 0 is don’t care (write 1 doesn’t have any effect, the read access always gives ‘0’)*/
+/* Note: the offset_x is positive and refers to the reference image */
+#define MRV_SI_OFFSET_X
+#define MRV_SI_OFFSET_X_MASK 0x00003FFEU
+#define MRV_SI_OFFSET_X_SHIFT 1U
+
+/*! Register: super_imp_offset_y: Offset y register (0x00000008)*/
+/*! Slice: offset_y:*/
+/*! Offset Y */
+/* Note: the offset_y is positive and refers to the reference image */
+#define MRV_SI_OFFSET_Y
+#define MRV_SI_OFFSET_Y_MASK 0x00003FFFU
+#define MRV_SI_OFFSET_Y_SHIFT 0U
+
+/*! Register: super_imp_color_y: Y component of transparent key color (0x0000000c)*/
+/*! Slice: y_comp:*/
+/*! Y component of transparent key color */
+#define MRV_SI_Y_COMP
+#define MRV_SI_Y_COMP_MASK 0x000000FFU
+#define MRV_SI_Y_COMP_SHIFT 0U
+
+/*! Register: super_imp_color_cb: Cb component of transparent key color (0x00000010)*/
+/*! Slice: cb_comp:*/
+/*! Cb component of transparent key color */
+#define MRV_SI_CB_COMP
+#define MRV_SI_CB_COMP_MASK 0x000000FFU
+#define MRV_SI_CB_COMP_SHIFT 0U
+
+/*! Register: super_imp_color_cr: Cr component of transparent key color (0x00000014)*/
+/*! Slice: cr_comp:*/
+/*! Cr component of transparent key color */
+#define MRV_SI_CR_COMP
+#define MRV_SI_CR_COMP_MASK 0x000000FFU
+#define MRV_SI_CR_COMP_SHIFT 0U
+
+/*! Register: isp_ctrl: global control register (0x00000000)*/
+#ifdef ISP_RGBIR
+/*! Slice ISP_IR_RAW_OUT:*/
+/*! 0: RGBIR IR RAW OUT is disable */
+/*! 1: RGBIR IR RAW OUT is enable */
+#define ISP_IR_RAW_OUT
+#define ISP_IR_RAW_OUT_MASK 0x000400000U
+#define ISP_IR_RAW_OUT_SHIFT 22U
+#endif
+
+/*! Slice PP_WRITE_SEL:*/
+/*! 0: select yuv output */
+/*! 1: select raw output */
+#define PP_WRITE_SEL
+#define PP_WRITE_SEL_MASK 0x1 << 23
+#define PP_WRITE_SEL_SHIFT 23U
+
+#ifdef ISP_DPF_RAW
+/*! Slice MRV_ISP_DPF_RAW_OUT:*/
+/*! 0: DPF RAW OUT is disable */
+/*! 1: DPF RAW OUT is enable */
+#define MRV_ISP_DPF_RAW_OUT
+#define MRV_ISP_DPF_RAW_OUT_MASK 0x00040000U
+#define MRV_ISP_DPF_RAW_OUT_SHIFT 18U
+#endif
+
+/*! Slice: digi_gain_EN:*/
+/*! 0:  is disbaled */
+/* 1:  is enabled.*/
+#define MRV_ISP_DIGITAL_GAIN_EN
+#define MRV_ISP_DIGITAL_GAIN_EN_MASK 0x00080000U
+#define MRV_ISP_DIGITAL_GAIN_EN_SHIFT 19U
+
+/*! Slice: CNR_EN:*/
+/*! 0: CNR is disbaled */
+/* 1: CNR is enabled.*/
+#define MRV_ISP_CNR_EN
+#define MRV_ISP_CNR_EN_MASK 0x00020000U
+#define MRV_ISP_CNR_EN_SHIFT 17U
+/*! Slice: CTRL_RESERVED_1:*/
+/*! reserved */
+#define MRV_ISP_CTRL_RESERVED_1
+#define MRV_ISP_CTRL_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_CTRL_RESERVED_1_SHIFT 16U
+/*! Slice: CTRL_RESERVED_2:*/
+/*! reserved */
+#define MRV_ISP_CTRL_RESERVED_2
+#define MRV_ISP_CTRL_RESERVED_2_MASK 0x00008000U
+#define MRV_ISP_CTRL_RESERVED_2_SHIFT 15U
+/*! Slice: ISP_CSM_C_RANGE:*/
+/*! Color Space Matrix chrominance clipping range for ISP output */
+/* 0: CbCr range 64..960 (16..240) according to ITU-R BT.601 standard */
+/* 1: full UV range 0..1023 ( 0..255)*/
+/* Numbers in brackets are for 8 bit resolution.*/
+/* This bit also configures the YCbCr sequence align block accordingly.*/
+#define MRV_ISP_ISP_CSM_C_RANGE
+#define MRV_ISP_ISP_CSM_C_RANGE_MASK 0x00004000U
+#define MRV_ISP_ISP_CSM_C_RANGE_SHIFT 14U
+/*! Slice: ISP_CSM_Y_RANGE:*/
+/*! Color Space Matrix luminance clipping range for ISP output */
+/* 0: Y range 64..940 (16..235) according to ITU-R BT.601 standard */
+/* 1: full Y range 0..1023 ( 0..255)*/
+/* Numbers in brackets are for 8 bit resolution.*/
+/* This bit also configures the YCbCr sequence align block accordingly.*/
+#define MRV_ISP_ISP_CSM_Y_RANGE
+#define MRV_ISP_ISP_CSM_Y_RANGE_MASK 0x00002000U
+#define MRV_ISP_ISP_CSM_Y_RANGE_SHIFT 13U
+/*! Slice: ISP_FLASH_MODE:*/
+/*! 0: sensor interface works independently from flash control unit */
+/* 1: one frame is captured when signaled by flash control unit */
+#define MRV_ISP_ISP_FLASH_MODE
+#define MRV_ISP_ISP_FLASH_MODE_MASK 0x00001000U
+#define MRV_ISP_ISP_FLASH_MODE_SHIFT 12U
+/*! Slice: ISP_GAMMA_OUT_ENABLE:*/
+/*! gamma ON/OFF */
+#define MRV_ISP_ISP_GAMMA_OUT_ENABLE
+#define MRV_ISP_ISP_GAMMA_OUT_ENABLE_MASK 0x00000800U
+#define MRV_ISP_ISP_GAMMA_OUT_ENABLE_SHIFT 11U
+/*! Slice: ISP_GEN_CFG_UPD:*/
+/*! 1: generate frame synchronous configuration signal at the output of ISP for shadow registers of the following processing modules, write only */
+#define MRV_ISP_ISP_GEN_CFG_UPD
+#define MRV_ISP_ISP_GEN_CFG_UPD_MASK 0x00000400U
+#define MRV_ISP_ISP_GEN_CFG_UPD_SHIFT 10U
+/*! Slice: ISP_CFG_UPD:*/
+/*! 1: immediately configure (update) shadow registers, write only */
+#define MRV_ISP_ISP_CFG_UPD
+#define MRV_ISP_ISP_CFG_UPD_MASK 0x00000200U
+#define MRV_ISP_ISP_CFG_UPD_SHIFT 9U
+/*! Slice: ISP_CFG_UPD_PERMANENT:*/
+/*! 1: permanent configure (update) shadow registers on frame end.*/
+#define MRV_ISP_ISP_CFG_UPD_PERMANENT
+#define MRV_ISP_ISP_CFG_UPD_PERMANENT_MASK 0x00000100U
+#define MRV_ISP_ISP_CFG_UPD_PERMANENT_SHIFT 8U
+/*! Slice: ISP_AWB_ENABLE:*/
+/*! auto white balance ON/OFF */
+#define MRV_ISP_ISP_AWB_ENABLE
+#define MRV_ISP_ISP_AWB_ENABLE_MASK 0x00000080U
+#define MRV_ISP_ISP_AWB_ENABLE_SHIFT 7U
+/*! Slice: ISP_GAMMA_IN_ENABLE:*/
+/*! Sensor De-gamma ON/OFF */
+#define MRV_ISP_ISP_GAMMA_IN_ENABLE
+#define MRV_ISP_ISP_GAMMA_IN_ENABLE_MASK 0x00000040U
+#define MRV_ISP_ISP_GAMMA_IN_ENABLE_SHIFT 6U
+/*! Slice: ISP_INFORM_ENABLE:*/
+/*! 1: input formatter enabled */
+/* 0: input formatter disabled */
+/* The ISP input formatter is enabled or disabled by this bit immediately, but always starts or stops acquisition frame synchronously.*/
+#define MRV_ISP_ISP_INFORM_ENABLE
+#define MRV_ISP_ISP_INFORM_ENABLE_MASK 0x00000010U
+#define MRV_ISP_ISP_INFORM_ENABLE_SHIFT 4U
+/*! Slice: ISP_MODE:*/
+/*! 000 - RAW picture with BT.601 sync (ISP bypass)*/
+/* 001 - ITU-R BT.656 (YUV with embedded sync)*/
+/* 010 - ITU-R BT.601 (YUV input with H and Vsync signals)*/
+/* 011 - Bayer RGB processing with H and Vsync signals */
+/* 100 - data mode (ISP bypass, sync signals interpreted as data enable)*/
+/* 101 - Bayer RGB processing with BT.656 synchronization */
+/* 110 - RAW picture with ITU-R BT.656 synchronization (ISP bypass)*/
+/* 111 - reserved */
+ /**/
+/* Side effect:*/
+/* If RAW, BT.601, BT.656, or data mode is selected, the clock of the ISP SRAMs (ISP line buffer, Lens Shading, Bad Pixel) is switched off. Only in Bayer RGB mode the clock to the SRAMs is enabled. This further reduces power consumption.*/
+#define MRV_ISP_ISP_MODE
+#define MRV_ISP_ISP_MODE_MASK 0x0000000EU
+#define MRV_ISP_ISP_MODE_SHIFT 1U
+/*! Slice: ISP_ENABLE:*/
+/*! 1: ISP data output enabled */
+/* 0: ISP data output disabled */
+/* Controls output formatter frame synchronously, if isp_gen_cfg_upd is used to activate this bit. For immediate update isp_cfg_upd must be used.*/
+#define MRV_ISP_ISP_ENABLE
+#define MRV_ISP_ISP_ENABLE_MASK 0x00000001U
+#define MRV_ISP_ISP_ENABLE_SHIFT 0U
+/*! Register: isp_acq_prop: ISP acquisition properties (0x00000004)*/
+#ifdef ISP_DVP_PINMAPPING
+/*! Slice: MRV_ISP_DVP_INPUT_PIN_MAPPING */
+/*! Bit Mapping for LSB to MSP for ISPNano.*/
+/*! 3'b000: normal 12-bit external interface */
+/*! 3'b001: mapping low 10 bit to high 10 bits, append 2 zeros as LSBs.*/
+/*! 3'b010: mapping low 8 bit to high 8 bits, append 4 zeros as LSBs.*/
+/*! 3'b011: mapping middle 8 bit to high 8 bits, append 4 zeros as LSBs.*/
+/*! 3'b100..3'b111: rsvd */
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_MASK 0x000E0000U
+#define MRV_ISP_DVP_INPUT_PIN_MAPPING_SHIFT 17U
+#endif
+/*! Slice: DMA_YUV_SELECTION */
+/*! 0: use align or conversion data for isp_is input */
+/*! 1: use dma yuv read data for isp_is input */
+#define MRV_ISP_DMA_YUV_SELECTION
+#define MRV_ISP_DMA_YUV_SELECTION_MASK 0x00010000U
+#define MRV_ISP_DMA_YUV_SELECTION_SHIFT 16U
+/*! Slice: LATENCY_FIFO_SELECTION:*/
+/*! 0: use input formatter input for latency fifo.*/
+/* 1: use dma rgb read input for latency fifo.*/
+#define MRV_ISP_LATENCY_FIFO_SELECTION
+#define MRV_ISP_LATENCY_FIFO_SELECTION_MASK 0x00008000U
+#define MRV_ISP_LATENCY_FIFO_SELECTION_SHIFT 15U
+/*! Slice: INPUT_SELECTION:*/
+/*! 000- 12Bit external Interface */
+/* 001- 10Bit Interface, append 2 zeroes as LSBs */
+/* 010- 10Bit Interface, append 2 MSBs as LSBs */
+/* 011- 8Bit Interface, append 4 zeroes as LSBs */
+/* 100- 8Bit Interface, append 4 MSBs as LSBs */
+/* 101...111 reserved */
+#define MRV_ISP_INPUT_SELECTION
+#define MRV_ISP_INPUT_SELECTION_MASK 0x00007000U
+#define MRV_ISP_INPUT_SELECTION_SHIFT 12U
+/*! Slice: FIELD_INV:*/
+/*! 1: swap odd and even fields */
+/* 0: do not swap fields */
+#define MRV_ISP_FIELD_INV
+#define MRV_ISP_FIELD_INV_MASK 0x00000800U
+#define MRV_ISP_FIELD_INV_SHIFT 11U
+/*! Slice: FIELD_SELECTION:*/
+/*! 00- sample all fields (don�t care about fields)*/
+/* 01- sample only even fields */
+/* 10- sample only odd fields */
+/* 11- reserved */
+#define MRV_ISP_FIELD_SELECTION
+#define MRV_ISP_FIELD_SELECTION_MASK 0x00000600U
+#define MRV_ISP_FIELD_SELECTION_SHIFT 9U
+/*! Slice: CCIR_SEQ:*/
+/*! 00- YCbYCr */
+/* 01- YCrYCb */
+/* 10- CbYCrY */
+/* 11- CrYCbY */
+#define MRV_ISP_CCIR_SEQ
+#define MRV_ISP_CCIR_SEQ_MASK 0x00000180U
+#define MRV_ISP_CCIR_SEQ_SHIFT 7U
+/*! Slice: CONV_422:*/
+/*! 00- co-sited color subsampling Y0Cb0Cr0 – Y1 */
+/* 01- interleaved color subsampling Y0Cb0 – Y1Cr1 (not recommended)*/
+/* 10- non-cosited color subsampling Y0Cb(0+1)/2 – Y1Cr(0+1)/2 */
+/* 11- reserved */
+#define MRV_ISP_CONV_422
+#define MRV_ISP_CONV_422_MASK 0x00000060U
+#define MRV_ISP_CONV_422_SHIFT 5U
+/*! Slice: BAYER_PAT:*/
+/*! color components from sensor, starting with top left position in sampled frame (reprogram with ISP_ACQ_H_OFFS, ISP_ACQ_V_OFFS)*/
+/* 00- first line: RGRG..., second line: GBGB..., etc.*/
+/* 01- first line: GRGR..., second line: BGBG..., etc.*/
+/* 10- first line: GBGB..., second line: RGRG..., etc.*/
+/* 11- first line: BGBG..., second line: GRGR..., etc.*/
+/* This configuration applies for the black level area after cropping by the input formatter.*/
+#define MRV_ISP_BAYER_PAT
+#define MRV_ISP_BAYER_PAT_MASK 0x00000018U
+#define MRV_ISP_BAYER_PAT_SHIFT 3U
+/*! Slice: VSYNC_POL:*/
+/*! vertical sync polarity */
+/* 0: high active */
+/* 1: low active */
+#define MRV_ISP_VSYNC_POL
+#define MRV_ISP_VSYNC_POL_MASK 0x00000004U
+#define MRV_ISP_VSYNC_POL_SHIFT 2U
+/*! Slice: HSYNC_POL:*/
+/*! horizontal sync polarity */
+/* 0: high active */
+/* 1: low active */
+#define MRV_ISP_HSYNC_POL
+#define MRV_ISP_HSYNC_POL_MASK 0x00000002U
+#define MRV_ISP_HSYNC_POL_SHIFT 1U
+/*! Slice: SAMPLE_EDGE:*/
+/*! 0- negative edge sampling */
+/* 1- positive edge sampling */
+#define MRV_ISP_SAMPLE_EDGE
+#define MRV_ISP_SAMPLE_EDGE_MASK 0x00000001U
+#define MRV_ISP_SAMPLE_EDGE_SHIFT 0U
+/*! Register: isp_acq_h_offs: horizontal input offset (0x00000008)*/
+/*! Slice: ACQ_H_OFFS:*/
+/*! horizontal sample offset in 8-bit samples (yuv: 4 samples=2pix)*/
+#define MRV_ISP_ACQ_H_OFFS
+#define MRV_ISP_ACQ_H_OFFS_MASK 0x00007FFFU
+#define MRV_ISP_ACQ_H_OFFS_SHIFT 0U
+/*! Register: isp_acq_v_offs: vertical input offset (0x0000000c)*/
+/*! Slice: ACQ_V_OFFS:*/
+/*! vertical sample offset in lines */
+#define MRV_ISP_ACQ_V_OFFS
+#define MRV_ISP_ACQ_V_OFFS_MASK 0x00003FFFU
+#define MRV_ISP_ACQ_V_OFFS_SHIFT 0U
+/*! Register: isp_acq_h_size: horizontal input size (0x00000010)*/
+/*! Slice: ACQ_H_SIZE:*/
+/*! horizontal sample size in 12-bit samples */
+/* YUV input: 2 samples = 1 pixel, else 1 sample = 1 pixel; So in YUV mode ACQ_H_SIZE must be twice as large as horizontal image size */
+/* horizontal image size must always be even exept in raw picture mode; if an odd size is programmed the value will be truncated to even size */
+#define MRV_ISP_ACQ_H_SIZE
+#define MRV_ISP_ACQ_H_SIZE_MASK 0x00007FFFU
+#define MRV_ISP_ACQ_H_SIZE_SHIFT 0U
+/*! Register: isp_acq_v_size: vertical input size (0x00000014)*/
+/*! Slice: ACQ_V_SIZE:*/
+/*! vertical sample size in lines */
+#define MRV_ISP_ACQ_V_SIZE
+#define MRV_ISP_ACQ_V_SIZE_MASK 0x00003FFFU
+#define MRV_ISP_ACQ_V_SIZE_SHIFT 0U
+/*! Register: isp_acq_nr_frames: Number of frames to be captured (0x00000018)*/
+/*! Slice: ACQ_NR_FRAMES:*/
+/*! number of input frames to be sampled ( 0 = continuous )*/
+#define MRV_ISP_ACQ_NR_FRAMES
+#define MRV_ISP_ACQ_NR_FRAMES_MASK 0x000003FFU
+#define MRV_ISP_ACQ_NR_FRAMES_SHIFT 0U
+/*! Register: isp_gamma_dx_lo: De-Gamma Curve definition lower x increments (sampling points) (0x0000001c)*/
+/*! Slice: GAMMA_DX_8:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_8
+#define MRV_ISP_GAMMA_DX_8_MASK 0x70000000U
+#define MRV_ISP_GAMMA_DX_8_SHIFT 28U
+/*! Slice: GAMMA_DX_7:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_7
+#define MRV_ISP_GAMMA_DX_7_MASK 0x07000000U
+#define MRV_ISP_GAMMA_DX_7_SHIFT 24U
+/*! Slice: GAMMA_DX_6:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_6
+#define MRV_ISP_GAMMA_DX_6_MASK 0x00700000U
+#define MRV_ISP_GAMMA_DX_6_SHIFT 20U
+/*! Slice: GAMMA_DX_5:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_5
+#define MRV_ISP_GAMMA_DX_5_MASK 0x00070000U
+#define MRV_ISP_GAMMA_DX_5_SHIFT 16U
+/*! Slice: GAMMA_DX_4:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_4
+#define MRV_ISP_GAMMA_DX_4_MASK 0x00007000U
+#define MRV_ISP_GAMMA_DX_4_SHIFT 12U
+/*! Slice: GAMMA_DX_3:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_3
+#define MRV_ISP_GAMMA_DX_3_MASK 0x00000700U
+#define MRV_ISP_GAMMA_DX_3_SHIFT 8U
+/*! Slice: GAMMA_DX_2:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_2
+#define MRV_ISP_GAMMA_DX_2_MASK 0x00000070U
+#define MRV_ISP_GAMMA_DX_2_SHIFT 4U
+/*! Slice: GAMMA_DX_1:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_1
+#define MRV_ISP_GAMMA_DX_1_MASK 0x00000007U
+#define MRV_ISP_GAMMA_DX_1_SHIFT 0U
+/*! Register: isp_gamma_dx_hi: De-Gamma Curve definition higher x increments (sampling points) (0x00000020)*/
+/*! Slice: GAMMA_DX_16:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_16
+#define MRV_ISP_GAMMA_DX_16_MASK 0x70000000U
+#define MRV_ISP_GAMMA_DX_16_SHIFT 28U
+/*! Slice: GAMMA_DX_15:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_15
+#define MRV_ISP_GAMMA_DX_15_MASK 0x07000000U
+#define MRV_ISP_GAMMA_DX_15_SHIFT 24U
+/*! Slice: GAMMA_DX_14:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_14
+#define MRV_ISP_GAMMA_DX_14_MASK 0x00700000U
+#define MRV_ISP_GAMMA_DX_14_SHIFT 20U
+/*! Slice: GAMMA_DX_13:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_13
+#define MRV_ISP_GAMMA_DX_13_MASK 0x00070000U
+#define MRV_ISP_GAMMA_DX_13_SHIFT 16U
+/*! Slice: GAMMA_DX_12:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_12
+#define MRV_ISP_GAMMA_DX_12_MASK 0x00007000U
+#define MRV_ISP_GAMMA_DX_12_SHIFT 12U
+/*! Slice: GAMMA_DX_11:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_11
+#define MRV_ISP_GAMMA_DX_11_MASK 0x00000700U
+#define MRV_ISP_GAMMA_DX_11_SHIFT 8U
+/*! Slice: GAMMA_DX_10:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_10
+#define MRV_ISP_GAMMA_DX_10_MASK 0x00000070U
+#define MRV_ISP_GAMMA_DX_10_SHIFT 4U
+/*! Slice: GAMMA_DX_9:*/
+/*! gamma curve sample point definition x-axis (input)*/
+#define MRV_ISP_GAMMA_DX_9
+#define MRV_ISP_GAMMA_DX_9_MASK 0x00000007U
+#define MRV_ISP_GAMMA_DX_9_SHIFT 0U
+/*! Register array: isp_gamma_r_y: De-Gamma Curve definition y red (0x0048 + n*0x4 (n=0..16))*/
+/*! Slice: GAMMA_R_Y:*/
+/* gamma curve point definition y-axis (output) for red */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that the difference between successive Y values is 12-bit signed !)*/
+#define MRV_ISP_GAMMA_R_Y
+#define MRV_ISP_GAMMA_R_Y_MASK 0x00000FFFU
+#define MRV_ISP_GAMMA_R_Y_SHIFT 0U
+/*! Register array: isp_gamma_g_y: De-Gamma Curve definition y green (0x0090 + n*0x4 (n=0..16))*/
+/*! Slice: GAMMA_G_Y:*/
+/* gamma curve point definition y-axis (output) for green */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that the difference between successive Y values is 12-bit signed !)*/
+#define MRV_ISP_GAMMA_G_Y
+#define MRV_ISP_GAMMA_G_Y_MASK 0x00000FFFU
+#define MRV_ISP_GAMMA_G_Y_SHIFT 0U
+/*! Register array: isp_gamma_b_y: De-Gamma Curve definition y blue (0x00D8 + n*0x4 (n=0..16))*/
+/*! Slice: GAMMA_B_Y:*/
+/* gamma curve point definition y-axis (output) for blue */
+/* RESTRICTION: each Y must be in the +2047/-2048 range compared to its predecessor (so that the difference between successive Y values is 12-bit signed !)*/
+#define MRV_ISP_GAMMA_B_Y
+#define MRV_ISP_GAMMA_B_Y_MASK 0x00000FFFU
+#define MRV_ISP_GAMMA_B_Y_SHIFT 0U
+/*! Register: isp_awb_prop: Auto white balance properties (0x00000110)*/
+/*! Slice: AWB_MEAS_MODE:*/
+/*! 1: RGB based measurement mode */
+/* 0: near white discrimination mode using YCbCr color space */
+#define MRV_ISP_AWB_MEAS_MODE
+#define MRV_ISP_AWB_MEAS_MODE_MASK 0x80000000U
+#define MRV_ISP_AWB_MEAS_MODE_SHIFT 31U
+/*! Slice: AWB_MAX_EN:*/
+/*! 1: enable Y_MAX compare */
+/* 0: disable Y_MAX compare */
+/* Not valid in RGB measurement mode.*/
+#define MRV_ISP_AWB_MAX_EN
+#define MRV_ISP_AWB_MAX_EN_MASK 0x00000004U
+#define MRV_ISP_AWB_MAX_EN_SHIFT 2U
+/*! Slice: AWB_MODE:*/
+/*! AWB_MODE(1:0):*/
+/* 11: reserved */
+/* 10: measurement of YCbCr means (AWB_MEAS_MODE = 0) or RGB means (AWB_MEAS_MODE = 1)*/
+/* 01: reserved */
+/* 00: no measurement */
+#define MRV_ISP_AWB_MODE
+#define MRV_ISP_AWB_MODE_MASK 0x00000003U
+#define MRV_ISP_AWB_MODE_SHIFT 0U
+/*! Register: isp_awb_h_offs: Auto white balance horizontal offset of measure window (0x00000114)*/
+/*! Slice: AWB_H_OFFS:*/
+/*! horizontal window offset in pixel */
+#define MRV_ISP_AWB_H_OFFS
+#define MRV_ISP_AWB_H_OFFS_MASK 0x00001FFFU
+#define MRV_ISP_AWB_H_OFFS_SHIFT 0U
+/*! Register: isp_awb_v_offs: Auto white balance vertical offset of measure window (0x00000118)*/
+/*! Slice: AWB_V_OFFS:*/
+/*! vertical window offset in lines */
+#define MRV_ISP_AWB_V_OFFS
+#define MRV_ISP_AWB_V_OFFS_MASK 0x00001FFFU
+#define MRV_ISP_AWB_V_OFFS_SHIFT 0U
+/*! Register: isp_awb_h_size: Auto white balance horizontal window size (0x0000011c)*/
+/*! Slice: AWB_H_SIZE:*/
+/*! horizontal measurement window size in pixel */
+#define MRV_ISP_AWB_H_SIZE
+#define MRV_ISP_AWB_H_SIZE_MASK 0x00003FFFU
+#define MRV_ISP_AWB_H_SIZE_SHIFT 0U
+/*! Register: isp_awb_v_size: Auto white balance vertical window size (0x00000120)*/
+/*! Slice: AWB_V_SIZE:*/
+/*! vertical measurement window size in lines */
+#define MRV_ISP_AWB_V_SIZE
+#define MRV_ISP_AWB_V_SIZE_MASK 0x00003FFFU
+#define MRV_ISP_AWB_V_SIZE_SHIFT 0U
+/*! Register: isp_awb_frames: Auto white balance mean value over multiple frames (0x00000124)*/
+/*! Slice: AWB_FRAMES:*/
+/*! number of frames-1 used for mean value calculation (value of 0 means 1 frame, value of 7 means 8 frames)*/
+#define MRV_ISP_AWB_FRAMES
+#define MRV_ISP_AWB_FRAMES_MASK 0x00000007U
+#define MRV_ISP_AWB_FRAMES_SHIFT 0U
+/*! Register: isp_awb_ref: Auto white balance reference Cb/Cr values (0x00000128)*/
+/*! Slice: AWB_REF_CR__MAX_R:*/
+/*! - reference Cr value for AWB regulation, target for AWB */
+/* - maximum red value, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_REF_CR__MAX_R
+#define MRV_ISP_AWB_REF_CR__MAX_R_MASK 0x0000FF00U
+#define MRV_ISP_AWB_REF_CR__MAX_R_SHIFT 8U
+/*! Slice: AWB_REF_CB__MAX_B:*/
+/*! - reference Cb value for AWB regulation, target for AWB */
+/* - maximum blue value, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_REF_CB__MAX_B
+#define MRV_ISP_AWB_REF_CB__MAX_B_MASK 0x000000FFU
+#define MRV_ISP_AWB_REF_CB__MAX_B_SHIFT 0U
+/*! Register: isp_awb_thresh: Auto white balance threshold values (0x0000012c)*/
+/*! Slice: AWB_MAX_Y:*/
+/*! Luminance maximum value, only consider pixels with luminance smaller than threshold for the WB measurement (must be enabled by register AWB_MODE bit AWB_MAX_EN). Not valid for RGB measurement mode.*/
+#define MRV_ISP_AWB_MAX_Y
+#define MRV_ISP_AWB_MAX_Y_MASK 0xFF000000U
+#define MRV_ISP_AWB_MAX_Y_SHIFT 24U
+/*! Slice: AWB_MIN_Y__MAX_G:*/
+/*! - Luminance minimum value, only consider pixels with luminance greater than threshold for the WB measurement */
+/* - maximum green value, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_MIN_Y__MAX_G
+#define MRV_ISP_AWB_MIN_Y__MAX_G_MASK 0x00FF0000U
+#define MRV_ISP_AWB_MIN_Y__MAX_G_SHIFT 16U
+/*! Slice: AWB_MAX_CSUM:*/
+/*! Chrominance sum maximum value, only consider pixels with Cb+Cr smaller than threshold for WB measurements */
+#define MRV_ISP_AWB_MAX_CSUM
+#define MRV_ISP_AWB_MAX_CSUM_MASK 0x0000FF00U
+#define MRV_ISP_AWB_MAX_CSUM_SHIFT 8U
+/*! Slice: AWB_MIN_C:*/
+/*! Chrominance minimum value, only consider pixels with Cb/Cr each greater than threshold value for WB measurements */
+#define MRV_ISP_AWB_MIN_C
+#define MRV_ISP_AWB_MIN_C_MASK 0x000000FFU
+#define MRV_ISP_AWB_MIN_C_SHIFT 0U
+
+#ifdef  ISP_AWB_0410 //This is Gain value component  4 bit int part and 10 bit fractional part
+/*! Register: isp_awb_gain_g: Auto white balance gain green (0x00000138)*/
+/*! Slice: AWB_GAIN_GR:*/
+/*! gain value for green component in red line 1000h = 1, unsigned integer value, range 0 to 16 with 10 bit fractional part */
+#define MRV_ISP_AWB_GAIN_GR
+#define MRV_ISP_AWB_GAIN_GR_MASK 0x3FFF0000U
+#define MRV_ISP_AWB_GAIN_GR_SHIFT 16U
+/*! Slice: AWB_GAIN_GB:*/
+/*! gain value for green component in blue line 1000h = 1, unsigned integer value, range 0 to 16 with 10 bit fractional part */
+#define MRV_ISP_AWB_GAIN_GB
+#define MRV_ISP_AWB_GAIN_GB_MASK 0x00003FFFU
+#define MRV_ISP_AWB_GAIN_GB_SHIFT 0U
+/*! Register: isp_awb_gain_rb: Auto white balance gain red and blue (0x0000013c)*/
+/*! Slice: AWB_GAIN_R:*/
+/*! gain value for red component 1000h = 1, unsigned integer value, range 0 to 16 with 10 bit fractional part */
+#define MRV_ISP_AWB_GAIN_R
+#define MRV_ISP_AWB_GAIN_R_MASK 0x3FFF0000U
+#define MRV_ISP_AWB_GAIN_R_SHIFT 16U
+/*! Slice: AWB_GAIN_B:*/
+/*! gain value for blue component 1000h = 1, unsigned integer value, range 0 to 16 with 10 bit fractional part */
+#define MRV_ISP_AWB_GAIN_B
+#define MRV_ISP_AWB_GAIN_B_MASK 0x00003FFFU
+#define MRV_ISP_AWB_GAIN_B_SHIFT 0U
+#else//This is Gain value component  2 bit int part and 8 bit fractional part
+/*! Register: isp_awb_gain_g: Auto white balance gain green (0x00000138)*/
+/*! Slice: AWB_GAIN_GR:*/
+/*! gain value for green component in red line 100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part */
+#define MRV_ISP_AWB_GAIN_GR
+#define MRV_ISP_AWB_GAIN_GR_MASK 0x03FF0000U
+#define MRV_ISP_AWB_GAIN_GR_SHIFT 16U
+/*! Slice: AWB_GAIN_GB:*/
+/*! gain value for green component in blue line 100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part */
+#define MRV_ISP_AWB_GAIN_GB
+#define MRV_ISP_AWB_GAIN_GB_MASK 0x000003FFU
+#define MRV_ISP_AWB_GAIN_GB_SHIFT 0U
+/*! Register: isp_awb_gain_rb: Auto white balance gain red and blue (0x0000013c)*/
+/*! Slice: AWB_GAIN_R:*/
+/*! gain value for red component 100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part */
+#define MRV_ISP_AWB_GAIN_R
+#define MRV_ISP_AWB_GAIN_R_MASK 0x03FF0000U
+#define MRV_ISP_AWB_GAIN_R_SHIFT 16U
+/*! Slice: AWB_GAIN_B:*/
+/*! gain value for blue component 100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part */
+#define MRV_ISP_AWB_GAIN_B
+#define MRV_ISP_AWB_GAIN_B_MASK 0x000003FFU
+#define MRV_ISP_AWB_GAIN_B_SHIFT 0U
+#endif
+/*! Register: isp_awb_white_cnt: Auto white balance white pixel count (0x00000140)*/
+/*! Slice: AWB_WHITE_CNT:*/
+/*! White pixel count, number of "white pixels" found during last measurement, i.e. pixels included in mean value calculation */
+#define MRV_ISP_AWB_WHITE_CNT
+#define MRV_ISP_AWB_WHITE_CNT_MASK 0x03FFFFFFU
+#define MRV_ISP_AWB_WHITE_CNT_SHIFT 0U
+/*! Register: isp_awb_mean: Auto white balance measured mean value (0x00000144)*/
+/*! Slice: AWB_MEAN_Y__G:*/
+/*! - mean value of Y within window and frames */
+/* - mean value of green, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_MEAN_Y__G
+#define MRV_ISP_AWB_MEAN_Y__G_MASK 0x00FF0000U
+#define MRV_ISP_AWB_MEAN_Y__G_SHIFT 16U
+/*! Slice: AWB_MEAN_CB__B:*/
+/*! - mean value of Cb within window and frames */
+/* - mean value of blue, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_MEAN_CB__B
+#define MRV_ISP_AWB_MEAN_CB__B_MASK 0x0000FF00U
+#define MRV_ISP_AWB_MEAN_CB__B_SHIFT 8U
+/*! Slice: AWB_MEAN_CR__R:*/
+/*! - mean value of Cr within window and frames */
+/* - mean value of red, if RGB measurement mode is selected */
+#define MRV_ISP_AWB_MEAN_CR__R
+#define MRV_ISP_AWB_MEAN_CR__R_MASK 0x000000FFU
+#define MRV_ISP_AWB_MEAN_CR__R_SHIFT 0U
+/*! Register: isp_cc_coeff_0: Color conversion coefficient 0 (0x00000170)*/
+/*! Slice: cc_coeff_0:*/
+/*! coefficient 0 for color space conversion */
+#define MRV_ISP_CC_COEFF_0
+#define MRV_ISP_CC_COEFF_0_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_0_SHIFT 0U
+/*! Register: isp_cc_coeff_1: Color conversion coefficient 1 (0x00000174)*/
+/*! Slice: cc_coeff_1:*/
+/*! coefficient 1 for color space conversion */
+#define MRV_ISP_CC_COEFF_1
+#define MRV_ISP_CC_COEFF_1_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_1_SHIFT 0U
+/*! Register: isp_cc_coeff_2: Color conversion coefficient 2 (0x00000178)*/
+/*! Slice: cc_coeff_2:*/
+/*! coefficient 2 for color space conversion */
+#define MRV_ISP_CC_COEFF_2
+#define MRV_ISP_CC_COEFF_2_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_2_SHIFT 0U
+/*! Register: isp_cc_coeff_3: Color conversion coefficient 3 (0x0000017c)*/
+/*! Slice: cc_coeff_3:*/
+/*! coefficient 3 for color space conversion */
+#define MRV_ISP_CC_COEFF_3
+#define MRV_ISP_CC_COEFF_3_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_3_SHIFT 0U
+/*! Register: isp_cc_coeff_4: Color conversion coefficient 4 (0x00000180)*/
+/*! Slice: cc_coeff_4:*/
+/*! coefficient 4 for color space conversion */
+#define MRV_ISP_CC_COEFF_4
+#define MRV_ISP_CC_COEFF_4_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_4_SHIFT 0U
+/*! Register: isp_cc_coeff_5: Color conversion coefficient 5 (0x00000184)*/
+/*! Slice: cc_coeff_5:*/
+/*! coefficient 5 for color space conversion */
+#define MRV_ISP_CC_COEFF_5
+#define MRV_ISP_CC_COEFF_5_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_5_SHIFT 0U
+/*! Register: isp_cc_coeff_6: Color conversion coefficient 6 (0x00000188)*/
+/*! Slice: cc_coeff_6:*/
+/*! coefficient 6 for color space conversion */
+#define MRV_ISP_CC_COEFF_6
+#define MRV_ISP_CC_COEFF_6_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_6_SHIFT 0U
+/*! Register: isp_cc_coeff_7: Color conversion coefficient 7 (0x0000018c)*/
+/*! Slice: cc_coeff_7:*/
+/*! coefficient 7 for color space conversion */
+#define MRV_ISP_CC_COEFF_7
+#define MRV_ISP_CC_COEFF_7_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_7_SHIFT 0U
+/*! Register: isp_cc_coeff_8: Color conversion coefficient 8 (0x00000190)*/
+/*! Slice: cc_coeff_8:*/
+/*! coefficient 8 for color space conversion */
+#define MRV_ISP_CC_COEFF_8
+#define MRV_ISP_CC_COEFF_8_MASK 0x000001FFU
+#define MRV_ISP_CC_COEFF_8_SHIFT 0U
+/*! Register: isp_out_h_offs: Horizontal offset of output window (0x00000194)*/
+/*! Slice: ISP_OUT_H_OFFS:*/
+/*! vertical pic offset in lines */
+#define MRV_ISP_ISP_OUT_H_OFFS
+#define MRV_ISP_ISP_OUT_H_OFFS_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_H_OFFS_SHIFT 0U
+/*! Register: isp_out_v_offs: Vertical offset of output window (0x00000198)*/
+/*! Slice: ISP_OUT_V_OFFS:*/
+/*! vertical pic offset in lines */
+#define MRV_ISP_ISP_OUT_V_OFFS
+#define MRV_ISP_ISP_OUT_V_OFFS_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_V_OFFS_SHIFT 0U
+/*! Register: isp_out_h_size: Output horizontal picture size (0x0000019c)*/
+/*! Slice: ISP_OUT_H_SIZE:*/
+/*! horizontal picture size in pixel */
+/* if ISP_MODE is set to */
+/* 001-(ITU-R BT.656 YUV),*/
+/* 010-( ITU-R BT.601 YUV),*/
+/* 011-( ITU-R BT.601 Bayer RGB),*/
+/* 101-( ITU-R BT.656 Bayer RGB)*/
+/* only even numbers are accepted, because complete quadruples of YUYV(YCbYCr) are needed for the 422 output. (if an odd size is programmed the value will be truncated to even size)*/
+#define MRV_ISP_ISP_OUT_H_SIZE
+#define MRV_ISP_ISP_OUT_H_SIZE_MASK 0x00007FFFU
+#define MRV_ISP_ISP_OUT_H_SIZE_SHIFT 0U
+/*! Register: isp_out_v_size: Output vertical picture size (0x000001a0)*/
+/*! Slice: ISP_OUT_V_SIZE:*/
+/*! vertical pic size in lines */
+#define MRV_ISP_ISP_OUT_V_SIZE
+#define MRV_ISP_ISP_OUT_V_SIZE_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_V_SIZE_SHIFT 0U
+/*! Register: isp_demosaic: Demosaic parameters (0x000001a4)*/
+/*! Slice: DEMOSAIC_BYPASS:*/
+/*! 0: normal operation for RGB Bayer Pattern input */
+/* 1: demosaicing bypass for Black&White input data */
+#define MRV_ISP_DEMOSAIC_BYPASS
+#define MRV_ISP_DEMOSAIC_BYPASS_MASK 0x00000400U
+#define MRV_ISP_DEMOSAIC_BYPASS_SHIFT 10U
+/*! Slice: DEMOSAIC_TH:*/
+/*! Threshold for Bayer demosaicing texture detection. This value shifted left 4bit is compared with the difference of the vertical and horizontal 12Bit wide texture indicators, to decide if the vertical or horizontal texture flag must be set.*/
+/* 0xFF: no texture detection */
+/* 0x00: maximum edge sensitivity */
+#define MRV_ISP_DEMOSAIC_TH
+#define MRV_ISP_DEMOSAIC_TH_MASK 0x000000FFU
+#define MRV_ISP_DEMOSAIC_TH_SHIFT 0U
+/*! Register: isp_flags_shd: Flags (current status) of certain signals and Shadow regs for enable signals (0x000001a8)*/
+/*! Slice: S_HSYNC:*/
+/*! state of ISP input port s_hsync, for test purposes */
+#define MRV_ISP_S_HSYNC
+#define MRV_ISP_S_HSYNC_MASK 0x80000000U
+#define MRV_ISP_S_HSYNC_SHIFT 31U
+/*! Slice: S_VSYNC:*/
+/*! state of ISP input port s_vsync, for test purposes */
+#define MRV_ISP_S_VSYNC
+#define MRV_ISP_S_VSYNC_MASK 0x40000000U
+#define MRV_ISP_S_VSYNC_SHIFT 30U
+/*! Slice: S_DATA:*/
+/*! state of ISP input port s_data, for test purposes */
+#define MRV_ISP_S_DATA
+#define MRV_ISP_S_DATA_MASK 0x0FFF0000U
+#define MRV_ISP_S_DATA_SHIFT 16U
+/*! Slice: INFORM_FIELD:*/
+/*! current field information (0=odd, 1=even)*/
+#define MRV_ISP_INFORM_FIELD
+#define MRV_ISP_INFORM_FIELD_MASK 0x00000004U
+#define MRV_ISP_INFORM_FIELD_SHIFT 2U
+/*! Slice: ISP_INFORM_ENABLE_SHD:*/
+/*! Input formatter enable shadow register */
+#define MRV_ISP_ISP_INFORM_ENABLE_SHD
+#define MRV_ISP_ISP_INFORM_ENABLE_SHD_MASK 0x00000002U
+#define MRV_ISP_ISP_INFORM_ENABLE_SHD_SHIFT 1U
+/*! Slice: ISP_ENABLE_SHD:*/
+/*! ISP enable shadow register */
+/* shows, if ISP currently outputs data (1) or not (0)*/
+#define MRV_ISP_ISP_ENABLE_SHD
+#define MRV_ISP_ISP_ENABLE_SHD_MASK 0x00000001U
+#define MRV_ISP_ISP_ENABLE_SHD_SHIFT 0U
+/*! Register: isp_out_h_offs_shd: current horizontal offset of output window (shadow register) (0x000001ac)*/
+/*! Slice: ISP_OUT_H_OFFS_SHD:*/
+/*! current vertical pic offset in lines */
+#define MRV_ISP_ISP_OUT_H_OFFS_SHD
+#define MRV_ISP_ISP_OUT_H_OFFS_SHD_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_H_OFFS_SHD_SHIFT 0U
+/*! Register: isp_out_v_offs_shd: current vertical offset of output window (shadow register) (0x000001b0)*/
+/*! Slice: ISP_OUT_V_OFFS_SHD:*/
+/*! current vertical pic offset in lines */
+#define MRV_ISP_ISP_OUT_V_OFFS_SHD
+#define MRV_ISP_ISP_OUT_V_OFFS_SHD_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_V_OFFS_SHD_SHIFT 0U
+/*! Register: isp_out_h_size_shd: current output horizontal picture size (shadow register) (0x000001b4)*/
+/*! Slice: ISP_OUT_H_SIZE_SHD:*/
+/*! current horizontal pic size in pixel */
+#define MRV_ISP_ISP_OUT_H_SIZE_SHD
+#define MRV_ISP_ISP_OUT_H_SIZE_SHD_MASK 0x00007FFFU
+#define MRV_ISP_ISP_OUT_H_SIZE_SHD_SHIFT 0U
+/*! Register: isp_out_v_size_shd: current output vertical picture size (shadow register) (0x000001b8)*/
+/*! Slice: ISP_OUT_V_SIZE_SHD:*/
+/*! vertical pic size in lines */
+#define MRV_ISP_ISP_OUT_V_SIZE_SHD
+#define MRV_ISP_ISP_OUT_V_SIZE_SHD_MASK 0x00003FFFU
+#define MRV_ISP_ISP_OUT_V_SIZE_SHD_SHIFT 0U
+/*! Register: isp_imsc: Interrupt mask (0x000001bc)*/
+/*! Slice: IMSC_VSM_END:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_VSM_END
+#define MRV_ISP_IMSC_VSM_END_MASK 0x00080000U
+#define MRV_ISP_IMSC_VSM_END_SHIFT 19U
+/*! Slice: IMSC_EXP_END:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_EXP_END
+#define MRV_ISP_IMSC_EXP_END_MASK 0x00040000U
+#define MRV_ISP_IMSC_EXP_END_SHIFT 18U
+/*! Slice: IMSC_FLASH_CAP:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_FLASH_CAP
+#define MRV_ISP_IMSC_FLASH_CAP_MASK 0x00020000U
+#define MRV_ISP_IMSC_FLASH_CAP_SHIFT 17U
+/*! Slice: IMSC_RESERVED_1:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_RESERVED_1
+#define MRV_ISP_IMSC_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_IMSC_RESERVED_1_SHIFT 16U
+/*! Slice: IMSC_HIST_MEASURE_RDY:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_HIST_MEASURE_RDY
+#define MRV_ISP_IMSC_HIST_MEASURE_RDY_MASK 0x00008000U
+#define MRV_ISP_IMSC_HIST_MEASURE_RDY_SHIFT 15U
+/*! Slice: IMSC_AFM_FIN:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_AFM_FIN
+#define MRV_ISP_IMSC_AFM_FIN_MASK 0x00004000U
+#define MRV_ISP_IMSC_AFM_FIN_SHIFT 14U
+/*! Slice: IMSC_AFM_LUM_OF:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_AFM_LUM_OF
+#define MRV_ISP_IMSC_AFM_LUM_OF_MASK 0x00002000U
+#define MRV_ISP_IMSC_AFM_LUM_OF_SHIFT 13U
+/*! Slice: IMSC_AFM_SUM_OF:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_AFM_SUM_OF
+#define MRV_ISP_IMSC_AFM_SUM_OF_MASK 0x00001000U
+#define MRV_ISP_IMSC_AFM_SUM_OF_SHIFT 12U
+/*! Slice: IMSC_SHUTTER_OFF:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_SHUTTER_OFF
+#define MRV_ISP_IMSC_SHUTTER_OFF_MASK 0x00000800U
+#define MRV_ISP_IMSC_SHUTTER_OFF_SHIFT 11U
+/*! Slice: IMSC_SHUTTER_ON:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_SHUTTER_ON
+#define MRV_ISP_IMSC_SHUTTER_ON_MASK 0x00000400U
+#define MRV_ISP_IMSC_SHUTTER_ON_SHIFT 10U
+/*! Slice: IMSC_FLASH_OFF:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_FLASH_OFF
+#define MRV_ISP_IMSC_FLASH_OFF_MASK 0x00000200U
+#define MRV_ISP_IMSC_FLASH_OFF_SHIFT 9U
+/*! Slice: IMSC_FLASH_ON:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_FLASH_ON
+#define MRV_ISP_IMSC_FLASH_ON_MASK 0x00000100U
+#define MRV_ISP_IMSC_FLASH_ON_SHIFT 8U
+/*! Slice: IMSC_H_START:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_H_START
+#define MRV_ISP_IMSC_H_START_MASK 0x00000080U
+#define MRV_ISP_IMSC_H_START_SHIFT 7U
+/*! Slice: IMSC_V_START:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_V_START
+#define MRV_ISP_IMSC_V_START_MASK 0x00000040U
+#define MRV_ISP_IMSC_V_START_SHIFT 6U
+/*! Slice: IMSC_FRAME_IN:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_FRAME_IN
+#define MRV_ISP_IMSC_FRAME_IN_MASK 0x00000020U
+#define MRV_ISP_IMSC_FRAME_IN_SHIFT 5U
+/*! Slice: IMSC_AWB_DONE:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_AWB_DONE
+#define MRV_ISP_IMSC_AWB_DONE_MASK 0x00000010U
+#define MRV_ISP_IMSC_AWB_DONE_SHIFT 4U
+/*! Slice: IMSC_PIC_SIZE_ERR:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_PIC_SIZE_ERR
+#define MRV_ISP_IMSC_PIC_SIZE_ERR_MASK 0x00000008U
+#define MRV_ISP_IMSC_PIC_SIZE_ERR_SHIFT 3U
+/*! Slice: IMSC_DATA_LOSS:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_DATA_LOSS
+#define MRV_ISP_IMSC_DATA_LOSS_MASK 0x00000004U
+#define MRV_ISP_IMSC_DATA_LOSS_SHIFT 2U
+/*! Slice: IMSC_FRAME:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_FRAME
+#define MRV_ISP_IMSC_FRAME_MASK 0x00000002U
+#define MRV_ISP_IMSC_FRAME_SHIFT 1U
+/*! Slice: IMSC_ISP_OFF:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_ISP_IMSC_ISP_OFF
+#define MRV_ISP_IMSC_ISP_OFF_MASK 0x00000001U
+#define MRV_ISP_IMSC_ISP_OFF_SHIFT 0U
+/*! Register: isp_ris: Raw interrupt status (0x000001c0)*/
+/*! Slice: RIS_VSM_END:*/
+/*! VSM measurement complete */
+#define MRV_ISP_RIS_VSM_END
+#define MRV_ISP_RIS_VSM_END_MASK 0x00080000U
+#define MRV_ISP_RIS_VSM_END_SHIFT 19U
+/*! Slice: RIS_EXP_END:*/
+/*! Exposure measurement complete */
+#define MRV_ISP_RIS_EXP_END
+#define MRV_ISP_RIS_EXP_END_MASK 0x00040000U
+#define MRV_ISP_RIS_EXP_END_SHIFT 18U
+/*! Slice: RIS_FLASH_CAP:*/
+/*! Signaling captured frame */
+#define MRV_ISP_RIS_FLASH_CAP
+#define MRV_ISP_RIS_FLASH_CAP_MASK 0x00020000U
+#define MRV_ISP_RIS_FLASH_CAP_SHIFT 17U
+/*! Slice: RIS_RESERVED_1:*/
+/*! reserved */
+#define MRV_ISP_RIS_RESERVED_1
+#define MRV_ISP_RIS_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_RIS_RESERVED_1_SHIFT 16U
+/*! Slice: RIS_HIST_MEASURE_RDY:*/
+/*! Histogram measurement ready. (old or new histogram measurement)*/
+#define MRV_ISP_RIS_HIST_MEASURE_RDY
+#define MRV_ISP_RIS_HIST_MEASURE_RDY_MASK 0x00008000U
+#define MRV_ISP_RIS_HIST_MEASURE_RDY_SHIFT 15U
+/*! Slice: RIS_AFM_FIN:*/
+/*! AF measurement finished: this interrupt is set when the first complete frame is calculated after enabling the AF measurement */
+#define MRV_ISP_RIS_AFM_FIN
+#define MRV_ISP_RIS_AFM_FIN_MASK 0x00004000U
+#define MRV_ISP_RIS_AFM_FIN_SHIFT 14U
+/*! Slice: RIS_AFM_LUM_OF:*/
+/*! Auto focus luminance overflow */
+#define MRV_ISP_RIS_AFM_LUM_OF
+#define MRV_ISP_RIS_AFM_LUM_OF_MASK 0x00002000U
+#define MRV_ISP_RIS_AFM_LUM_OF_SHIFT 13U
+/*! Slice: RIS_AFM_SUM_OF:*/
+/*! Auto focus sum overflow */
+#define MRV_ISP_RIS_AFM_SUM_OF
+#define MRV_ISP_RIS_AFM_SUM_OF_MASK 0x00001000U
+#define MRV_ISP_RIS_AFM_SUM_OF_SHIFT 12U
+/*! Slice: RIS_SHUTTER_OFF:*/
+/*! Mechanical shutter is switched off */
+#define MRV_ISP_RIS_SHUTTER_OFF
+#define MRV_ISP_RIS_SHUTTER_OFF_MASK 0x00000800U
+#define MRV_ISP_RIS_SHUTTER_OFF_SHIFT 11U
+/*! Slice: RIS_SHUTTER_ON:*/
+/*! Mechanical shutter is switched on */
+#define MRV_ISP_RIS_SHUTTER_ON
+#define MRV_ISP_RIS_SHUTTER_ON_MASK 0x00000400U
+#define MRV_ISP_RIS_SHUTTER_ON_SHIFT 10U
+/*! Slice: RIS_FLASH_OFF:*/
+/*! Flash light is switched off */
+#define MRV_ISP_RIS_FLASH_OFF
+#define MRV_ISP_RIS_FLASH_OFF_MASK 0x00000200U
+#define MRV_ISP_RIS_FLASH_OFF_SHIFT 9U
+/*! Slice: RIS_FLASH_ON:*/
+/*! Flash light is switched on */
+#define MRV_ISP_RIS_FLASH_ON
+#define MRV_ISP_RIS_FLASH_ON_MASK 0x00000100U
+#define MRV_ISP_RIS_FLASH_ON_SHIFT 8U
+/*! Slice: RIS_H_START:*/
+/*! Start edge of h_sync */
+#define MRV_ISP_RIS_H_START
+#define MRV_ISP_RIS_H_START_MASK 0x00000080U
+#define MRV_ISP_RIS_H_START_SHIFT 7U
+/*! Slice: RIS_V_START:*/
+/*! Start edge of v_sync */
+#define MRV_ISP_RIS_V_START
+#define MRV_ISP_RIS_V_START_MASK 0x00000040U
+#define MRV_ISP_RIS_V_START_SHIFT 6U
+/*! Slice: RIS_FRAME_IN:*/
+/*! sampled input frame is complete */
+#define MRV_ISP_RIS_FRAME_IN
+#define MRV_ISP_RIS_FRAME_IN_MASK 0x00000020U
+#define MRV_ISP_RIS_FRAME_IN_SHIFT 5U
+/*! Slice: RIS_AWB_DONE:*/
+/*! White balancing measurement cycle is complete, results can be read out */
+#define MRV_ISP_RIS_AWB_DONE
+#define MRV_ISP_RIS_AWB_DONE_MASK 0x00000010U
+#define MRV_ISP_RIS_AWB_DONE_SHIFT 4U
+/*! Slice: RIS_PIC_SIZE_ERR:*/
+/*! pic size violation occurred, programming seems wrong */
+#define MRV_ISP_RIS_PIC_SIZE_ERR
+#define MRV_ISP_RIS_PIC_SIZE_ERR_MASK 0x00000008U
+#define MRV_ISP_RIS_PIC_SIZE_ERR_SHIFT 3U
+/*! Slice: RIS_DATA_LOSS:*/
+/*! loss of data occurred within a line, processing failure */
+#define MRV_ISP_RIS_DATA_LOSS
+#define MRV_ISP_RIS_DATA_LOSS_MASK 0x00000004U
+#define MRV_ISP_RIS_DATA_LOSS_SHIFT 2U
+/*! Slice: RIS_FRAME:*/
+/*! frame was completely put out */
+#define MRV_ISP_RIS_FRAME
+#define MRV_ISP_RIS_FRAME_MASK 0x00000002U
+#define MRV_ISP_RIS_FRAME_SHIFT 1U
+/*! Slice: RIS_ISP_OFF:*/
+/*! isp output was disabled (vsynced) due to f_cnt reached or manual */
+#define MRV_ISP_RIS_ISP_OFF
+#define MRV_ISP_RIS_ISP_OFF_MASK 0x00000001U
+#define MRV_ISP_RIS_ISP_OFF_SHIFT 0U
+/*! Register: isp_mis: Masked interrupt status (0x000001c4)*/
+/*! Slice: MIS_VSM_END:*/
+/*! VSM measurement complete */
+#define MRV_ISP_MIS_VSM_END
+#define MRV_ISP_MIS_VSM_END_MASK 0x00080000U
+#define MRV_ISP_MIS_VSM_END_SHIFT 19U
+/*! Slice: MIS_EXP_END:*/
+/*! Exposure measurement complete */
+#define MRV_ISP_MIS_EXP_END
+#define MRV_ISP_MIS_EXP_END_MASK 0x00040000U
+#define MRV_ISP_MIS_EXP_END_SHIFT 18U
+/*! Slice: MIS_FLASH_CAP:*/
+/*! Captured is frame is detected */
+#define MRV_ISP_MIS_FLASH_CAP
+#define MRV_ISP_MIS_FLASH_CAP_MASK 0x00020000U
+#define MRV_ISP_MIS_FLASH_CAP_SHIFT 17U
+/*! Slice: MIS_RESERVED_1:*/
+/*! reserved */
+#define MRV_ISP_MIS_RESERVED_1
+#define MRV_ISP_MIS_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_MIS_RESERVED_1_SHIFT 16U
+/*! Slice: MIS_HIST_MEASURE_RDY:*/
+/*! Histogram measurement ready. (old or new histogram measurement)*/
+#define MRV_ISP_MIS_HIST_MEASURE_RDY
+#define MRV_ISP_MIS_HIST_MEASURE_RDY_MASK 0x00008000U
+#define MRV_ISP_MIS_HIST_MEASURE_RDY_SHIFT 15U
+/*! Slice: MIS_AFM_FIN:*/
+/*! AF measurement finished: this interrupt is set when the first complete frame is calculated after enabling the AF measurement */
+#define MRV_ISP_MIS_AFM_FIN
+#define MRV_ISP_MIS_AFM_FIN_MASK 0x00004000U
+#define MRV_ISP_MIS_AFM_FIN_SHIFT 14U
+/*! Slice: MIS_AFM_LUM_OF:*/
+/*! Luminance overflow */
+#define MRV_ISP_MIS_AFM_LUM_OF
+#define MRV_ISP_MIS_AFM_LUM_OF_MASK 0x00002000U
+#define MRV_ISP_MIS_AFM_LUM_OF_SHIFT 13U
+/*! Slice: MIS_AFM_SUM_OF:*/
+/*! Sum overflow */
+#define MRV_ISP_MIS_AFM_SUM_OF
+#define MRV_ISP_MIS_AFM_SUM_OF_MASK 0x00001000U
+#define MRV_ISP_MIS_AFM_SUM_OF_SHIFT 12U
+/*! Slice: MIS_SHUTTER_OFF:*/
+/*! Mechanical shutter is switched off */
+#define MRV_ISP_MIS_SHUTTER_OFF
+#define MRV_ISP_MIS_SHUTTER_OFF_MASK 0x00000800U
+#define MRV_ISP_MIS_SHUTTER_OFF_SHIFT 11U
+/*! Slice: MIS_SHUTTER_ON:*/
+/*! Mechanical shutter is switched on */
+#define MRV_ISP_MIS_SHUTTER_ON
+#define MRV_ISP_MIS_SHUTTER_ON_MASK 0x00000400U
+#define MRV_ISP_MIS_SHUTTER_ON_SHIFT 10U
+/*! Slice: MIS_FLASH_OFF:*/
+/*! Flash light is switched off */
+#define MRV_ISP_MIS_FLASH_OFF
+#define MRV_ISP_MIS_FLASH_OFF_MASK 0x00000200U
+#define MRV_ISP_MIS_FLASH_OFF_SHIFT 9U
+/*! Slice: MIS_FLASH_ON:*/
+/*! Flash light is switched on */
+#define MRV_ISP_MIS_FLASH_ON
+#define MRV_ISP_MIS_FLASH_ON_MASK 0x00000100U
+#define MRV_ISP_MIS_FLASH_ON_SHIFT 8U
+/*! Slice: MIS_H_START:*/
+/*! Start edge of h_sync */
+#define MRV_ISP_MIS_H_START
+#define MRV_ISP_MIS_H_START_MASK 0x00000080U
+#define MRV_ISP_MIS_H_START_SHIFT 7U
+/*! Slice: MIS_V_START:*/
+/*! Start edge of v_sync */
+#define MRV_ISP_MIS_V_START
+#define MRV_ISP_MIS_V_START_MASK 0x00000040U
+#define MRV_ISP_MIS_V_START_SHIFT 6U
+/*! Slice: MIS_FRAME_IN:*/
+/*! sampled input frame is complete */
+#define MRV_ISP_MIS_FRAME_IN
+#define MRV_ISP_MIS_FRAME_IN_MASK 0x00000020U
+#define MRV_ISP_MIS_FRAME_IN_SHIFT 5U
+/*! Slice: MIS_AWB_DONE:*/
+/*! White balancing measurement cycle is complete, results can be read out */
+#define MRV_ISP_MIS_AWB_DONE
+#define MRV_ISP_MIS_AWB_DONE_MASK 0x00000010U
+#define MRV_ISP_MIS_AWB_DONE_SHIFT 4U
+/*! Slice: MIS_PIC_SIZE_ERR:*/
+/*! pic size violation occurred, programming seems wrong */
+#define MRV_ISP_MIS_PIC_SIZE_ERR
+#define MRV_ISP_MIS_PIC_SIZE_ERR_MASK 0x00000008U
+#define MRV_ISP_MIS_PIC_SIZE_ERR_SHIFT 3U
+/*! Slice: MIS_DATA_LOSS:*/
+/*! loss of data occurred within a line, processing failure */
+#define MRV_ISP_MIS_DATA_LOSS
+#define MRV_ISP_MIS_DATA_LOSS_MASK 0x00000004U
+#define MRV_ISP_MIS_DATA_LOSS_SHIFT 2U
+/*! Slice: MIS_FRAME:*/
+/*! frame was completely put out */
+#define MRV_ISP_MIS_FRAME
+#define MRV_ISP_MIS_FRAME_MASK 0x00000002U
+#define MRV_ISP_MIS_FRAME_SHIFT 1U
+/*! Slice: MIS_ISP_OFF:*/
+/*! isp was turned off (vsynced) due to f_cnt reached or manual */
+#define MRV_ISP_MIS_ISP_OFF
+#define MRV_ISP_MIS_ISP_OFF_MASK 0x00000001U
+#define MRV_ISP_MIS_ISP_OFF_SHIFT 0U
+/*! Register: isp_icr: Interrupt clear register (0x000001c8)*/
+/*! Slice: ICR_VSM_END:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_VSM_END
+#define MRV_ISP_ICR_VSM_END_MASK 0x00080000U
+#define MRV_ISP_ICR_VSM_END_SHIFT 19U
+/*! Slice: ICR_EXP_END:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_EXP_END
+#define MRV_ISP_ICR_EXP_END_MASK 0x00040000U
+#define MRV_ISP_ICR_EXP_END_SHIFT 18U
+/*! Slice: ICR_FLASH_CAP:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_FLASH_CAP
+#define MRV_ISP_ICR_FLASH_CAP_MASK 0x00020000U
+#define MRV_ISP_ICR_FLASH_CAP_SHIFT 17U
+/*! Slice: ICR_RESERVED_1:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_RESERVED_1
+#define MRV_ISP_ICR_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_ICR_RESERVED_1_SHIFT 16U
+/*! Slice: ICR_HIST_MEASURE_RDY:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_HIST_MEASURE_RDY
+#define MRV_ISP_ICR_HIST_MEASURE_RDY_MASK 0x00008000U
+#define MRV_ISP_ICR_HIST_MEASURE_RDY_SHIFT 15U
+/*! Slice: ICR_AFM_FIN:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_AFM_FIN
+#define MRV_ISP_ICR_AFM_FIN_MASK 0x00004000U
+#define MRV_ISP_ICR_AFM_FIN_SHIFT 14U
+/*! Slice: ICR_AFM_LUM_OF:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_AFM_LUM_OF
+#define MRV_ISP_ICR_AFM_LUM_OF_MASK 0x00002000U
+#define MRV_ISP_ICR_AFM_LUM_OF_SHIFT 13U
+/*! Slice: ICR_AFM_SUM_OF:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_AFM_SUM_OF
+#define MRV_ISP_ICR_AFM_SUM_OF_MASK 0x00001000U
+#define MRV_ISP_ICR_AFM_SUM_OF_SHIFT 12U
+/*! Slice: ICR_SHUTTER_OFF:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_SHUTTER_OFF
+#define MRV_ISP_ICR_SHUTTER_OFF_MASK 0x00000800U
+#define MRV_ISP_ICR_SHUTTER_OFF_SHIFT 11U
+/*! Slice: ICR_SHUTTER_ON:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_SHUTTER_ON
+#define MRV_ISP_ICR_SHUTTER_ON_MASK 0x00000400U
+#define MRV_ISP_ICR_SHUTTER_ON_SHIFT 10U
+/*! Slice: ICR_FLASH_OFF:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_FLASH_OFF
+#define MRV_ISP_ICR_FLASH_OFF_MASK 0x00000200U
+#define MRV_ISP_ICR_FLASH_OFF_SHIFT 9U
+/*! Slice: ICR_FLASH_ON:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_FLASH_ON
+#define MRV_ISP_ICR_FLASH_ON_MASK 0x00000100U
+#define MRV_ISP_ICR_FLASH_ON_SHIFT 8U
+/*! Slice: ICR_H_START:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_H_START
+#define MRV_ISP_ICR_H_START_MASK 0x00000080U
+#define MRV_ISP_ICR_H_START_SHIFT 7U
+/*! Slice: ICR_V_START:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_V_START
+#define MRV_ISP_ICR_V_START_MASK 0x00000040U
+#define MRV_ISP_ICR_V_START_SHIFT 6U
+/*! Slice: ICR_FRAME_IN:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_FRAME_IN
+#define MRV_ISP_ICR_FRAME_IN_MASK 0x00000020U
+#define MRV_ISP_ICR_FRAME_IN_SHIFT 5U
+/*! Slice: ICR_AWB_DONE:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_AWB_DONE
+#define MRV_ISP_ICR_AWB_DONE_MASK 0x00000010U
+#define MRV_ISP_ICR_AWB_DONE_SHIFT 4U
+/*! Slice: ICR_PIC_SIZE_ERR:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_PIC_SIZE_ERR
+#define MRV_ISP_ICR_PIC_SIZE_ERR_MASK 0x00000008U
+#define MRV_ISP_ICR_PIC_SIZE_ERR_SHIFT 3U
+/*! Slice: ICR_DATA_LOSS:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_DATA_LOSS
+#define MRV_ISP_ICR_DATA_LOSS_MASK 0x00000004U
+#define MRV_ISP_ICR_DATA_LOSS_SHIFT 2U
+/*! Slice: ICR_FRAME:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_FRAME
+#define MRV_ISP_ICR_FRAME_MASK 0x00000002U
+#define MRV_ISP_ICR_FRAME_SHIFT 1U
+/*! Slice: ICR_ISP_OFF:*/
+/*! clear interrupt */
+#define MRV_ISP_ICR_ISP_OFF
+#define MRV_ISP_ICR_ISP_OFF_MASK 0x00000001U
+#define MRV_ISP_ICR_ISP_OFF_SHIFT 0U
+/*! Register: isp_isr: Interrupt set register (0x000001cc)*/
+/*! Slice: ISR_VSM_END:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_VSM_END
+#define MRV_ISP_ISR_VSM_END_MASK 0x00080000U
+#define MRV_ISP_ISR_VSM_END_SHIFT 19U
+/*! Slice: ISR_EXP_END:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_EXP_END
+#define MRV_ISP_ISR_EXP_END_MASK 0x00040000U
+#define MRV_ISP_ISR_EXP_END_SHIFT 18U
+/*! Slice: ISR_FLASH_CAP:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_FLASH_CAP
+#define MRV_ISP_ISR_FLASH_CAP_MASK 0x00020000U
+#define MRV_ISP_ISR_FLASH_CAP_SHIFT 17U
+/*! Slice: ISR_RESERVED_1:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_RESERVED_1
+#define MRV_ISP_ISR_RESERVED_1_MASK 0x00010000U
+#define MRV_ISP_ISR_RESERVED_1_SHIFT 16U
+/*! Slice: ISR_HIST_MEASURE_RDY:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_HIST_MEASURE_RDY
+#define MRV_ISP_ISR_HIST_MEASURE_RDY_MASK 0x00008000U
+#define MRV_ISP_ISR_HIST_MEASURE_RDY_SHIFT 15U
+/*! Slice: ISR_AFM_FIN:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_AFM_FIN
+#define MRV_ISP_ISR_AFM_FIN_MASK 0x00004000U
+#define MRV_ISP_ISR_AFM_FIN_SHIFT 14U
+/*! Slice: ISR_AFM_LUM_OF:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_AFM_LUM_OF
+#define MRV_ISP_ISR_AFM_LUM_OF_MASK 0x00002000U
+#define MRV_ISP_ISR_AFM_LUM_OF_SHIFT 13U
+/*! Slice: ISR_AFM_SUM_OF:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_AFM_SUM_OF
+#define MRV_ISP_ISR_AFM_SUM_OF_MASK 0x00001000U
+#define MRV_ISP_ISR_AFM_SUM_OF_SHIFT 12U
+/*! Slice: ISR_SHUTTER_OFF:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_SHUTTER_OFF
+#define MRV_ISP_ISR_SHUTTER_OFF_MASK 0x00000800U
+#define MRV_ISP_ISR_SHUTTER_OFF_SHIFT 11U
+/*! Slice: ISR_SHUTTER_ON:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_SHUTTER_ON
+#define MRV_ISP_ISR_SHUTTER_ON_MASK 0x00000400U
+#define MRV_ISP_ISR_SHUTTER_ON_SHIFT 10U
+/*! Slice: ISR_FLASH_OFF:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_FLASH_OFF
+#define MRV_ISP_ISR_FLASH_OFF_MASK 0x00000200U
+#define MRV_ISP_ISR_FLASH_OFF_SHIFT 9U
+/*! Slice: ISR_FLASH_ON:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_FLASH_ON
+#define MRV_ISP_ISR_FLASH_ON_MASK 0x00000100U
+#define MRV_ISP_ISR_FLASH_ON_SHIFT 8U
+/*! Slice: ISR_H_START:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_H_START
+#define MRV_ISP_ISR_H_START_MASK 0x00000080U
+#define MRV_ISP_ISR_H_START_SHIFT 7U
+/*! Slice: ISR_V_START:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_V_START
+#define MRV_ISP_ISR_V_START_MASK 0x00000040U
+#define MRV_ISP_ISR_V_START_SHIFT 6U
+/*! Slice: ISR_FRAME_IN:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_FRAME_IN
+#define MRV_ISP_ISR_FRAME_IN_MASK 0x00000020U
+#define MRV_ISP_ISR_FRAME_IN_SHIFT 5U
+/*! Slice: ISR_AWB_DONE:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_AWB_DONE
+#define MRV_ISP_ISR_AWB_DONE_MASK 0x00000010U
+#define MRV_ISP_ISR_AWB_DONE_SHIFT 4U
+/*! Slice: ISR_PIC_SIZE_ERR:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_PIC_SIZE_ERR
+#define MRV_ISP_ISR_PIC_SIZE_ERR_MASK 0x00000008U
+#define MRV_ISP_ISR_PIC_SIZE_ERR_SHIFT 3U
+/*! Slice: ISR_DATA_LOSS:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_DATA_LOSS
+#define MRV_ISP_ISR_DATA_LOSS_MASK 0x00000004U
+#define MRV_ISP_ISR_DATA_LOSS_SHIFT 2U
+/*! Slice: ISR_FRAME:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_FRAME
+#define MRV_ISP_ISR_FRAME_MASK 0x00000002U
+#define MRV_ISP_ISR_FRAME_SHIFT 1U
+/*! Slice: ISR_ISP_OFF:*/
+/*! set interrupt */
+#define MRV_ISP_ISR_ISP_OFF
+#define MRV_ISP_ISR_ISP_OFF_MASK 0x00000001U
+#define MRV_ISP_ISR_ISP_OFF_SHIFT 0U
+
+#ifdef  ISP_CTM_0507                     // Coefficient for cross talk matrix.Use bit 11,Values are 12-bit signed fixed-point numbers with 5 bit integer and 7 bit fractional part, ranging from -16 (0x800) to +15.992 (0x7FF). 
+/*! Register array: isp_ct_coeff: cross-talk configuration register (color correction matrix) (0x03A0 + n*0x4 (n=0..8))*/
+/*! Slice: ct_coeff:*/
+/* Coefficient n for cross talk matrix.*/
+     /**/
+/* Values are 11-bit signed fixed-point numbers with 4 bit integer and 7 bit fractional part,*/
+/* ranging from -16 (0x800) to +15.992 (0x7FF). */
+#define MRV_ISP_CT_COEFF
+#define MRV_ISP_CT_COEFF_MASK 0x00000FFFU
+#define MRV_ISP_CT_COEFF_SHIFT 0U
+
+#else                              // Coefficient for cross talk matrix.Values are 11-bit signed fixed-point numbers with 4 bit integer and 7 bit fractional part, ranging from -8 (0x400) to +7.992 (0x3FF). 
+/*! Register array: isp_ct_coeff: cross-talk configuration register (color correction matrix) (0x03A0 + n*0x4 (n=0..8))*/
+/*! Slice: ct_coeff:*/
+/* Coefficient n for cross talk matrix.*/
+     /**/
+/* Values are 11-bit signed fixed-point numbers with 4 bit integer and 7 bit fractional part,*/
+/* ranging from -8 (0x400) to +7.992 (0x3FF). 0 is reprsented by 0x000 and a coefficient value of 1 as 0x080.*/
+#define MRV_ISP_CT_COEFF
+#define MRV_ISP_CT_COEFF_MASK 0x000007FFU
+#define MRV_ISP_CT_COEFF_SHIFT 0U
+#endif //CTM_0507
+/*! Register: isp_gamma_out_mode: gamma segmentation mode register for output gamma (0x000001f4)*/
+/*! Slice: equ_segm:*/
+/*! 0: logarithmic like segmentation of gamma curve (default after reset)*/
+/*   segmentation from 0 to 4095: 64 64 64 64 128 128 128 128 256 256 256 512 512 512 512 512 */
+/* 1: equidistant segmentation (all 16 segments are 256 )*/
+#define MRV_ISP_EQU_SEGM
+#define MRV_ISP_EQU_SEGM_MASK 0x00000001U
+#define MRV_ISP_EQU_SEGM_SHIFT 0U
+/*! Register array: isp_gamma_out_y: Gamma Out Curve definition y_ (0x03F0 + n*0x4 (n=0..16))*/
+/*! Slice: isp_gamma_out_y:*/
+/* Gamma_out curve point definition y-axis (output) for all color components (red,green,blue)*/
+/* RESTRICTION: The difference between two Y_n (dy = Y_n - Y_n-1) is restricted to +511/-512 (10 bit signed)!*/
+#define MRV_ISP_ISP_GAMMA_OUT_Y
+#define MRV_ISP_ISP_GAMMA_OUT_Y_MASK 0x000003FFU
+#define MRV_ISP_ISP_GAMMA_OUT_Y_SHIFT 0U
+/*! Register: isp_err: ISP error register (0x0000023c)*/
+/*! Slice: outform_size_err:*/
+/*! size error is generated in outmux submodule */
+#define MRV_ISP_OUTFORM_SIZE_ERR
+#define MRV_ISP_OUTFORM_SIZE_ERR_MASK 0x00000004U
+#define MRV_ISP_OUTFORM_SIZE_ERR_SHIFT 2U
+/*! Slice: is_size_err:*/
+/*! size error is generated in image stabilization submodule */
+#define MRV_ISP_IS_SIZE_ERR
+#define MRV_ISP_IS_SIZE_ERR_MASK 0x00000002U
+#define MRV_ISP_IS_SIZE_ERR_SHIFT 1U
+#ifdef ISP_RAWIS
+/*! Register: isp_raw_is_ctrl: Raw Image Stabilization Control Register (0x00000000)*/
+/*! Slice: is_en:*/
+/*! 1: image stabilization switched on */
+/* 0: image stabilization switched off */
+#define MRV_ISP_RAW_IS_EN
+#define MRV_ISP_RAW_IS_EN_MASK 0x00000001U
+#define MRV_ISP_RAW_IS_EN_SHIFT 0U
+/*! Register: isp_raw_is_recenter: Recenter register (0x00000004)*/
+/*! Slice: is_recenter:*/
+/*! 000: recenter feature switched off */
+/* 1..7: recentering by (cur_h/v_offs-H/V_OFFS)/2^RECENTER */
+#define MRV_ISP_RAW_IS_RECENTER
+#define MRV_ISP_RAW_IS_RECENTER_MASK 0x00000007U
+#define MRV_ISP_RAW_IS_RECENTER_SHIFT 0U
+/*! Register: isp_raw_is_h_offs: Horizontal offset of output window (0x00000008)*/
+/*! Slice: is_h_offs:*/
+/*! horizontal picture offset in pixel */
+#define MRV_ISP_RAW_IS_H_OFFS
+#define MRV_ISP_RAW_IS_H_OFFS_MASK 0x00001FFFU
+#define MRV_ISP_RAW_IS_H_OFFS_SHIFT 0U
+/*! Register: isp_raw_is_v_offs: Vertical offset of output window (0x0000000c)*/
+/*! Slice: is_v_offs:*/
+/*! vertical picture offset in lines */
+#define MRV_ISP_RAW_IS_V_OFFS
+#define MRV_ISP_RAW_IS_V_OFFS_MASK 0x00000FFFU
+#define MRV_ISP_RAW_IS_V_OFFS_SHIFT 0U
+/*! Register: isp_raw_is_h_size: Output horizontal picture size (0x00000010)*/
+/*! Slice: is_h_size:*/
+/*! horizontal picture size in pixel */
+/* if ISP_MODE is set to */
+/* 001-(ITU-R BT.656 YUV),*/
+/* 010-( ITU-R BT.601 YUV),*/
+/* 011-( ITU-R BT.601 Bayer RGB),*/
+/* 101-( ITU-R BT.656 Bayer RGB)*/
+/* only even numbers are accepted, because complete quadruples of YUYV(YCbYCr) are needed for the following modules. If an odd size is programmed the value will be truncated to even size.*/
+#define MRV_ISP_RAW_IS_H_SIZE
+#define MRV_ISP_RAW_IS_H_SIZE_MASK 0x00001FFFU
+#define MRV_ISP_RAW_IS_H_SIZE_SHIFT 0U
+/*! Register: isp_raw_is_v_size: Output vertical picture size (0x00000014)*/
+/*! Slice: is_v_size:*/
+/*! vertical picture size in lines */
+#define MRV_ISP_RAW_IS_V_SIZE
+#define MRV_ISP_RAW_IS_V_SIZE_MASK 0x00000FFFU
+#define MRV_ISP_RAW_IS_V_SIZE_SHIFT 0U
+/*! Register: isp_raw_is_max_dx: Maximum Horizontal Displacement (0x00000018)*/
+/*! Slice: is_max_dx:*/
+/*! maximum allowed accumulated horizontal displacement in pixels */
+#define MRV_ISP_RAW_IS_MAX_DX
+#define MRV_ISP_RAW_IS_MAX_DX_MASK 0x00000FFFU
+#define MRV_ISP_RAW_IS_MAX_DX_SHIFT 0U
+/*! Register: isp_raw_is_max_dy: Maximum Vertical Displacement (0x0000001c)*/
+/*! Slice: is_max_dy:*/
+/*! maximum allowed accumulated vertical displacement in lines */
+#define MRV_ISP_RAW_IS_MAX_DY
+#define MRV_ISP_RAW_IS_MAX_DY_MASK 0x00000FFFU
+#define MRV_ISP_RAW_IS_MAX_DY_SHIFT 0U
+/*! Register: isp_raw_is_displace: Camera displacement (0x00000020)*/
+/*! Slice: dy:*/
+/*! ISP_RAW_IS will compensate for vertical camera displacement of DY lines in the next frame */
+#define MRV_ISP_RAW_IS_DY
+#define MRV_ISP_RAW_IS_DY_MASK 0x0FFF0000U
+#define MRV_ISP_RAW_IS_DY_SHIFT 16U
+/*! Slice: dx:*/
+/*! ISP_RAW_IS will compensate for horizontal camera displacement of DX pixels in the next frame */
+#define MRV_ISP_RAW_IS_DX
+#define MRV_ISP_RAW_IS_DX_MASK 0x00000FFFU
+#define MRV_ISP_RAW_IS_DX_SHIFT 0U
+#endif
+/*! Slice: inform_size_err:*/
+/*! size error is generated in inform submodule */
+#define MRV_ISP_INFORM_SIZE_ERR
+#define MRV_ISP_INFORM_SIZE_ERR_MASK 0x00000001U
+#define MRV_ISP_INFORM_SIZE_ERR_SHIFT 0U
+/*! Register: isp_err_clr: ISP error clear register (0x00000240)*/
+/*! Slice: outform_size_err_clr:*/
+/*! size error is cleared */
+#define MRV_ISP_OUTFORM_SIZE_ERR_CLR
+#define MRV_ISP_OUTFORM_SIZE_ERR_CLR_MASK 0x00000004U
+#define MRV_ISP_OUTFORM_SIZE_ERR_CLR_SHIFT 2U
+/*! Slice: is_size_err_clr:*/
+/*! size error is cleared */
+#define MRV_ISP_IS_SIZE_ERR_CLR
+#define MRV_ISP_IS_SIZE_ERR_CLR_MASK 0x00000002U
+#define MRV_ISP_IS_SIZE_ERR_CLR_SHIFT 1U
+/*! Slice: inform_size_err_clr:*/
+/*! size error is cleared */
+#define MRV_ISP_INFORM_SIZE_ERR_CLR
+#define MRV_ISP_INFORM_SIZE_ERR_CLR_MASK 0x00000001U
+#define MRV_ISP_INFORM_SIZE_ERR_CLR_SHIFT 0U
+/*! Register: isp_frame_count: Frame counter (0x00000244)*/
+/*! Slice: frame_counter:*/
+/*! Current frame count of processing */
+#define MRV_ISP_FRAME_COUNTER
+#define MRV_ISP_FRAME_COUNTER_MASK 0x000003FFU
+#define MRV_ISP_FRAME_COUNTER_SHIFT 0U
+/*! Register: isp_ct_offset_r: cross-talk offset red (0x00000248)*/
+/*! Slice: ct_offset_r:*/
+/*! Offset red for cross talk matrix. Two's complement integer number ranging from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#define MRV_ISP_CT_OFFSET_R
+#define MRV_ISP_CT_OFFSET_R_MASK 0x00000FFFU
+#define MRV_ISP_CT_OFFSET_R_SHIFT 0U
+/*! Register: isp_ct_offset_g: cross-talk offset green (0x0000024c)*/
+/*! Slice: ct_offset_g:*/
+/*! Offset green for cross talk matrix. Two's complement integer number ranging from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#define MRV_ISP_CT_OFFSET_G
+#define MRV_ISP_CT_OFFSET_G_MASK 0x00000FFFU
+#define MRV_ISP_CT_OFFSET_G_SHIFT 0U
+/*! Register: isp_ct_offset_b: cross-talk offset blue (0x00000250)*/
+/*! Slice: ct_offset_b:*/
+/*! Offset blue for cross talk matrix. Two's complement integer number ranging from -2048 (0x800) to 2047 (0x7FF). 0 is represented as 0x000.*/
+#define MRV_ISP_CT_OFFSET_B
+#define MRV_ISP_CT_OFFSET_B_MASK 0x00000FFFU
+#define MRV_ISP_CT_OFFSET_B_SHIFT 0U
+/*! Register: isp_cnr_linesize: chroma noise reduction line size (0x00000254)*/
+/*! Slice: cnr_linesize:*/
+/*! horizontal image size for chroma noise reduction */
+#define MRV_ISP_CNR_LINESIZE
+#define MRV_ISP_CNR_LINESIZE_MASK 0x00003FFFU
+#define MRV_ISP_CNR_LINESIZE_SHIFT 0U
+/*! Register: isp_cnr_threshold_c1: chroma noise reduction C1 Threshold (0x00000258)*/
+/*! Slice: cnr_threshold_c1:*/
+/*! Avoid filtering at edges for C1 by using low threshold values for C1 chroma noise filtering.*/
+/* 0: No filtering */
+/* 32767: all samples are filtered.*/
+#define MRV_ISP_CNR_THRESHOLD_C1
+#define MRV_ISP_CNR_THRESHOLD_C1_MASK 0x00007FFFU
+#define MRV_ISP_CNR_THRESHOLD_C1_SHIFT 0U
+/*! Register: isp_cnr_threshold_c2: chroma noise reduction C2 Threshold (0x0000025c)*/
+/*! Slice: cnr_threshold_c2:*/
+/*! Avoid filtering at edges for C2 by using low threshold values for C2 chroma noise filtering.*/
+/* 0: No filtering */
+/* 32767: all samples are filtered.*/
+#define MRV_ISP_CNR_THRESHOLD_C2
+#define MRV_ISP_CNR_THRESHOLD_C2_MASK 0x00007FFFU
+#define MRV_ISP_CNR_THRESHOLD_C2_SHIFT 0U
+/*! Register: isp_flash_cmd: Flash command (0x00000000)*/
+/*! Slice: preflash_on:*/
+/*! preflash on */
+/* 0: no effect */
+/* 1: flash delay counter is started at next trigger event */
+/* No capture event is signaled to the sensor interface block.*/
+#define MRV_FLASH_PREFLASH_ON
+#define MRV_FLASH_PREFLASH_ON_MASK 0x00000004U
+#define MRV_FLASH_PREFLASH_ON_SHIFT 2U
+/*! Slice: flash_on:*/
+/*! flash on */
+/* 0: no effect */
+/* 1: flash delay counter is started at next trigger event */
+/* A capture event is signaled to the sensor interface block.*/
+#define MRV_FLASH_FLASH_ON
+#define MRV_FLASH_FLASH_ON_MASK 0x00000002U
+#define MRV_FLASH_FLASH_ON_SHIFT 1U
+/*! Slice: prelight_on:*/
+/*! prelight on */
+/* 0: prelight is switched off at next trigger event */
+/* 1: prelight is switched on at next trigger event */
+#define MRV_FLASH_PRELIGHT_ON
+#define MRV_FLASH_PRELIGHT_ON_MASK 0x00000001U
+#define MRV_FLASH_PRELIGHT_ON_SHIFT 0U
+/*! Register: isp_flash_config: Flash config (0x00000004)*/
+/*! Slice: fl_cap_del:*/
+/*! capture delay */
+/* frame number (0 to 15) to be captured after trigger event */
+#define MRV_FLASH_FL_CAP_DEL
+#define MRV_FLASH_FL_CAP_DEL_MASK 0x000000F0U
+#define MRV_FLASH_FL_CAP_DEL_SHIFT 4U
+/*! Slice: fl_trig_src:*/
+/*! trigger source for flash and prelight */
+/* 0: use “vds_vsync” for trigger event (with evaluation of vs_in_edge)*/
+/* 1: use “fl_trig” for trigger event (positive edge)*/
+#define MRV_FLASH_FL_TRIG_SRC
+#define MRV_FLASH_FL_TRIG_SRC_MASK 0x00000008U
+#define MRV_FLASH_FL_TRIG_SRC_SHIFT 3U
+/*! Slice: fl_pol:*/
+/*! polarity of flash related signals */
+/* 0: flash_trig, prelight_trig are high active */
+/* 1: flash_trig, prelight_trig are low active */
+#define MRV_FLASH_FL_POL
+#define MRV_FLASH_FL_POL_MASK 0x00000004U
+#define MRV_FLASH_FL_POL_SHIFT 2U
+/*! Slice: vs_in_edge:*/
+/*! VSYNC edge */
+/* 0: use negative edge of “vds_vsync” if generating a trigger event */
+/* 1: use positive edge of “vds_vsync” if generating a trigger event */
+#define MRV_FLASH_VS_IN_EDGE
+#define MRV_FLASH_VS_IN_EDGE_MASK 0x00000002U
+#define MRV_FLASH_VS_IN_EDGE_SHIFT 1U
+/*! Slice: prelight_mode:*/
+/*! prelight mode */
+/* 0: prelight is switched off at begin of flash */
+/* 1: prelight is switched off at end of flash */
+#define MRV_FLASH_PRELIGHT_MODE
+#define MRV_FLASH_PRELIGHT_MODE_MASK 0x00000001U
+#define MRV_FLASH_PRELIGHT_MODE_SHIFT 0U
+/*! Register: isp_flash_prediv: Flash Counter Pre-Divider (0x00000008)*/
+/*! Slice: fl_pre_div:*/
+/*! pre-divider for flush/preflash counter */
+#define MRV_FLASH_FL_PRE_DIV
+#define MRV_FLASH_FL_PRE_DIV_MASK 0x000003FFU
+#define MRV_FLASH_FL_PRE_DIV_SHIFT 0U
+/*! Register: isp_flash_delay: Flash Delay (0x0000000c)*/
+/*! Slice: fl_delay:*/
+/*! counter value for flash/preflash delay */
+/* open_delay =  (fl_delay + 1) * (fl_pre_div+1) / clk_isp */
+/* fl_delay =  (open_delay * clk_isp) / (fl_pre_div+1) - 1 */
+#define MRV_FLASH_FL_DELAY
+#define MRV_FLASH_FL_DELAY_MASK 0x0003FFFFU
+#define MRV_FLASH_FL_DELAY_SHIFT 0U
+/*! Register: isp_flash_time: Flash time (0x00000010)*/
+/*! Slice: fl_time:*/
+/*! counter value for flash/preflash time */
+/* open_time =  (fl_time + 1) * (fl_pre_div+1) / clk_isp */
+/* fl_time =  (open_time * clk_isp) / (fl_pre_div+1) - 1 */
+#define MRV_FLASH_FL_TIME
+#define MRV_FLASH_FL_TIME_MASK 0x0003FFFFU
+#define MRV_FLASH_FL_TIME_SHIFT 0U
+/*! Register: isp_flash_maxp: Maximum value for flash or preflash (0x00000014)*/
+/*! Slice: fl_maxp:*/
+/*! maximum period value for flash or preflash */
+/* max. flash/preflash period = 214 * (fl_maxp + 1) / clk_isp */
+/* fl_maxp =  (max_period * clk_isp) / 214  - 1 */
+#define MRV_FLASH_FL_MAXP
+#define MRV_FLASH_FL_MAXP_MASK 0x0000FFFFU
+#define MRV_FLASH_FL_MAXP_SHIFT 0U
+/*! Register: isp_sh_ctrl: mechanical shutter control (0x00000000)*/
+/*! Slice: sh_open_pol:*/
+/*! shutter_open polarity */
+/* 0: shutter_open is high active */
+/* 1: shutter_open is low active */
+#define MRV_SHUT_SH_OPEN_POL
+#define MRV_SHUT_SH_OPEN_POL_MASK 0x00000010U
+#define MRV_SHUT_SH_OPEN_POL_SHIFT 4U
+/*! Slice: sh_trig_en:*/
+/*! mechanical shutter trigger edge */
+/* 0: use negative edge of trigger signal */
+/* 1: use positive edge of trigger signal */
+#define MRV_SHUT_SH_TRIG_EN
+#define MRV_SHUT_SH_TRIG_EN_MASK 0x00000008U
+#define MRV_SHUT_SH_TRIG_EN_SHIFT 3U
+/*! Slice: sh_trig_src:*/
+/*! mechanical shutter trigger source */
+/* 0: use “vds_vsync” for trigger event */
+/* 1: use “shutter_trig” for trigger event */
+#define MRV_SHUT_SH_TRIG_SRC
+#define MRV_SHUT_SH_TRIG_SRC_MASK 0x00000004U
+#define MRV_SHUT_SH_TRIG_SRC_SHIFT 2U
+/*! Slice: sh_rep_en:*/
+/*! mechanical shutter repetition enable */
+/* 0: shutter is opened only once */
+/* 1: shutter is opened with the repetition rate of the trigger signal */
+#define MRV_SHUT_SH_REP_EN
+#define MRV_SHUT_SH_REP_EN_MASK 0x00000002U
+#define MRV_SHUT_SH_REP_EN_SHIFT 1U
+/*! Slice: sh_en:*/
+/*! mechanical shutter enable */
+/* 0: mechanical shutter function is disabled */
+/* 1: mechanical shutter function is enabled */
+#define MRV_SHUT_SH_EN
+#define MRV_SHUT_SH_EN_MASK 0x00000001U
+#define MRV_SHUT_SH_EN_SHIFT 0U
+/*! Register: isp_sh_prediv: Mech. Shutter Counter Pre-Divider (0x00000004)*/
+/*! Slice: sh_pre_div:*/
+/*! pre-divider for mechanical shutter open_delay and open_time counter */
+#define MRV_SHUT_SH_PRE_DIV
+#define MRV_SHUT_SH_PRE_DIV_MASK 0x000003FFU
+#define MRV_SHUT_SH_PRE_DIV_SHIFT 0U
+/*! Register: isp_sh_delay: Delay register (0x00000008)*/
+/*! Slice: sh_delay:*/
+/*! counter value for delay */
+/* open_delay =  (sh_delay + 1) * (fl_pre_div+1) / clk_isp */
+/* sh_delay =  (open_delay * clk_isp) / (sh_pre_div+1) – 1 */
+#define MRV_SHUT_SH_DELAY
+#define MRV_SHUT_SH_DELAY_MASK 0x000FFFFFU
+#define MRV_SHUT_SH_DELAY_SHIFT 0U
+/*! Register: isp_sh_time: Time register (0x0000000c)*/
+/*! Slice: sh_time:*/
+/*! counter value for time */
+/* open_time =  (sh_time + 1) * (fl_pre_div+1) / clk_isp */
+/* sh_time =  (open_time * clk_isp) / (sh_pre_div+1) - 1 */
+#define MRV_SHUT_SH_TIME
+#define MRV_SHUT_SH_TIME_MASK 0x000FFFFFU
+#define MRV_SHUT_SH_TIME_SHIFT 0U
+/*! Register: cproc_ctrl: Global control register (0x00000000)*/
+/*! Slice: cproc_c_out_range:*/
+/*! Color processing chrominance pixel clipping range at output */
+/* 0: CbCr_out clipping range 16..240 according to ITU-R BT.601 standard */
+/* 1: full UV_out clipping range 0..255 */
+#define MRV_CPROC_CPROC_C_OUT_RANGE
+#define MRV_CPROC_CPROC_C_OUT_RANGE_MASK 0x00000008U
+#define MRV_CPROC_CPROC_C_OUT_RANGE_SHIFT 3U
+/*! Slice: cproc_y_in_range:*/
+/*! Color processing luminance input range (offset processing)*/
+/* 0: Y_in range 64..940 according to ITU-R BT.601 standard;*/
+/* offset of 64 will be subtracted from Y_in */
+/* 1: Y_in full range 0..1023;  no offset will be subtracted from Y_in */
+#define MRV_CPROC_CPROC_Y_IN_RANGE
+#define MRV_CPROC_CPROC_Y_IN_RANGE_MASK 0x00000004U
+#define MRV_CPROC_CPROC_Y_IN_RANGE_SHIFT 2U
+/*! Slice: cproc_y_out_range:*/
+/*! Color processing luminance output clipping range */
+/* 0: Y_out clipping range 16..235; offset of 16 is added to Y_out according to ITU-R BT.601 standard */
+/* 1: Y_out clipping range 0..255; no offset is added to Y_out */
+#define MRV_CPROC_CPROC_Y_OUT_RANGE
+#define MRV_CPROC_CPROC_Y_OUT_RANGE_MASK 0x00000002U
+#define MRV_CPROC_CPROC_Y_OUT_RANGE_SHIFT 1U
+/*! Slice: cproc_enable:*/
+/*! color processing enable */
+/* 0: color processing is bypassed */
+/* 2 * 10 Bit input data are truncated to 2 * 8Bit output data */
+/* 1: color processing is active */
+/* output data are rounded to 2 * 8Bit and clipping is active */
+#define MRV_CPROC_CPROC_ENABLE
+#define MRV_CPROC_CPROC_ENABLE_MASK 0x00000001U
+#define MRV_CPROC_CPROC_ENABLE_SHIFT 0U
+/*! Register: cproc_contrast: Color Processing contrast register (0x00000004)*/
+/*! Slice: cproc_contrast:*/
+/*! contrast adjustment value */
+/* 00H equals x 0.0 */
+/* …*/
+/* 80H equals x 1.0 */
+/* …*/
+/* FFH equals x 1.992 */
+#define MRV_CPROC_CPROC_CONTRAST
+#define MRV_CPROC_CPROC_CONTRAST_MASK 0x000000FFU
+#define MRV_CPROC_CPROC_CONTRAST_SHIFT 0U
+/*! Register: cproc_brightness: Color Processing brightness register (0x00000008)*/
+/*! Slice: cproc_brightness:*/
+/*! brightness adjustment value */
+/* 80H equals -128 */
+/* …*/
+/* 00H equals +0 */
+/* …*/
+/* 7FH equals +127 */
+#define MRV_CPROC_CPROC_BRIGHTNESS
+#define MRV_CPROC_CPROC_BRIGHTNESS_MASK 0x000000FFU
+#define MRV_CPROC_CPROC_BRIGHTNESS_SHIFT 0U
+/*! Register: cproc_saturation: Color Processing saturation register (0x0000000c)*/
+/*! Slice: cproc_saturation:*/
+/*! saturation adjustment value */
+/* 00H equals x 0.0 */
+/* …*/
+/* 80H equals x 1.0 */
+/* …*/
+/* FFH equals x 1.992 */
+#define MRV_CPROC_CPROC_SATURATION
+#define MRV_CPROC_CPROC_SATURATION_MASK 0x000000FFU
+#define MRV_CPROC_CPROC_SATURATION_SHIFT 0U
+/*! Register: cproc_hue: Color Processing hue register (0x00000010)*/
+/*! Slice: cproc_hue:*/
+/*! hue adjustment value */
+/* 80H equals -90 deg */
+/* …*/
+/* 00H equals 0 deg */
+/* …*/
+/* 7FH equals +87.188 deg */
+#define MRV_CPROC_CPROC_HUE
+#define MRV_CPROC_CPROC_HUE_MASK 0x000000FFU
+#define MRV_CPROC_CPROC_HUE_SHIFT 0U
+#ifdef ISP8000NANO_BASE
+/*! Register: mrsz_ctrl: global control register (0x00000000)*/
+/*! Slice: auto_upd:*/
+/*! 1: automatic register update at frame end enabled.*/
+/* 0: automatic register update at frame end disabled.*/
+#define MRV_MRSZ_AUTO_UPD
+#define MRV_MRSZ_AUTO_UPD_MASK 0x00000200U
+#define MRV_MRSZ_AUTO_UPD_SHIFT 9U
+/*! Slice: cfg_upd:*/
+/*! write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#define MRV_MRSZ_CFG_UPD
+#define MRV_MRSZ_CFG_UPD_MASK 0x00000100U
+#define MRV_MRSZ_CFG_UPD_SHIFT 8U
+#else
+/*! Register: mrsz_ctrl: global control register (0x00000000)*/
+/*! Slice: auto_upd:*/
+/*! 1: automatic register update at frame end enabled.*/
+/* 0: automatic register update at frame end disabled.*/
+#define MRV_MRSZ_AUTO_UPD
+#define MRV_MRSZ_AUTO_UPD_MASK 0x00000400U
+#define MRV_MRSZ_AUTO_UPD_SHIFT 10U
+/*! Slice: cfg_upd:*/
+/*! write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#define MRV_MRSZ_CFG_UPD
+#define MRV_MRSZ_CFG_UPD_MASK 0x00000200U
+#define MRV_MRSZ_CFG_UPD_SHIFT 9U
+/*! Slice: crop_enable:*/
+#define MRV_MRSZ_CROP_ENABLE
+#define MRV_MRSZ_CROP_ENABLE_MASK 0x00000100U
+#define MRV_MRSZ_CROP_ENABLE_SHIFT 8U
+#endif
+/*! Slice: scale_vc_up:*/
+/*! 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#define MRV_MRSZ_SCALE_VC_UP
+#define MRV_MRSZ_SCALE_VC_UP_MASK 0x00000080U
+#define MRV_MRSZ_SCALE_VC_UP_SHIFT 7U
+/*! Slice: scale_vy_up:*/
+/*! 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#define MRV_MRSZ_SCALE_VY_UP
+#define MRV_MRSZ_SCALE_VY_UP_MASK 0x00000040U
+#define MRV_MRSZ_SCALE_VY_UP_SHIFT 6U
+/*! Slice: scale_hc_up:*/
+/*! 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#define MRV_MRSZ_SCALE_HC_UP
+#define MRV_MRSZ_SCALE_HC_UP_MASK 0x00000020U
+#define MRV_MRSZ_SCALE_HC_UP_SHIFT 5U
+/*! Slice: scale_hy_up:*/
+/*! 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#define MRV_MRSZ_SCALE_HY_UP
+#define MRV_MRSZ_SCALE_HY_UP_MASK 0x00000010U
+#define MRV_MRSZ_SCALE_HY_UP_SHIFT 4U
+/*! Slice: scale_vc_enable:*/
+/*! 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#define MRV_MRSZ_SCALE_VC_ENABLE
+#define MRV_MRSZ_SCALE_VC_ENABLE_MASK 0x00000008U
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHIFT 3U
+/*! Slice: scale_vy_enable:*/
+/*! 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#define MRV_MRSZ_SCALE_VY_ENABLE
+#define MRV_MRSZ_SCALE_VY_ENABLE_MASK 0x00000004U
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHIFT 2U
+/*! Slice: scale_hc_enable:*/
+/*! 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#define MRV_MRSZ_SCALE_HC_ENABLE
+#define MRV_MRSZ_SCALE_HC_ENABLE_MASK 0x00000002U
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHIFT 1U
+/*! Slice: scale_hy_enable:*/
+/*! 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#define MRV_MRSZ_SCALE_HY_ENABLE
+#define MRV_MRSZ_SCALE_HY_ENABLE_MASK 0x00000001U
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHIFT 0U
+/*! Register: mrsz_scale_hy: horizontal luminance scale factor register (0x00000004)*/
+/*! Slice: scale_hy:*/
+/*! This register is set to the horizontal luminance downscale factor or to the reciprocal of the horizontal luminance upscale factor */
+#define MRV_MRSZ_SCALE_HY
+#define MRV_MRSZ_SCALE_HY_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HY_SHIFT 0U
+/*! Register: mrsz_scale_hcb: horizontal Cb scale factor register (0x00000008)*/
+/*! Slice: scale_hcb:*/
+/*! This register is set to the horizontal Cb downscale factor or to the reciprocal of the horizontal Cb upscale factor */
+#define MRV_MRSZ_SCALE_HCB
+#define MRV_MRSZ_SCALE_HCB_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HCB_SHIFT 0U
+/*! Register: mrsz_scale_hcr: horizontal Cr scale factor register (0x0000000c)*/
+/*! Slice: scale_hcr:*/
+/*! This register is set to the horizontal Cr downscale factor or to the reciprocal of the horizontal Cr upscale factor */
+#define MRV_MRSZ_SCALE_HCR
+#define MRV_MRSZ_SCALE_HCR_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HCR_SHIFT 0U
+/*! Register: mrsz_scale_vy: vertical luminance scale factor register (0x00000010)*/
+/*! Slice: scale_vy:*/
+/*! This register is set to the vertical luminance downscale factor or to the reciprocal of the vertical luminance upscale factor */
+#define MRV_MRSZ_SCALE_VY
+#define MRV_MRSZ_SCALE_VY_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_VY_SHIFT 0U
+/*! Register: mrsz_scale_vc: vertical chrominance scale factor register (0x00000014)*/
+/*! Slice: scale_vc:*/
+/*! This register is set to the vertical chrominance downscale factor or to the reciprocal of the vertical chrominance upscale factor */
+#define MRV_MRSZ_SCALE_VC
+#define MRV_MRSZ_SCALE_VC_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_VC_SHIFT 0U
+/*! Register: mrsz_phase_hy: horizontal luminance phase register (0x00000018)*/
+/*! Slice: phase_hy:*/
+/*! This register is set to the horizontal luminance phase offset */
+#define MRV_MRSZ_PHASE_HY
+#define MRV_MRSZ_PHASE_HY_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_HY_SHIFT 0U
+/*! Register: mrsz_phase_hc: horizontal chrominance phase register (0x0000001c)*/
+/*! Slice: phase_hc:*/
+/*! This register is set to the horizontal chrominance phase offset */
+#define MRV_MRSZ_PHASE_HC
+#define MRV_MRSZ_PHASE_HC_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_HC_SHIFT 0U
+/*! Register: mrsz_phase_vy: vertical luminance phase register (0x00000020)*/
+/*! Slice: phase_vy:*/
+/*! This register is set to the vertical luminance phase offset */
+#define MRV_MRSZ_PHASE_VY
+#define MRV_MRSZ_PHASE_VY_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_VY_SHIFT 0U
+/*! Register: mrsz_phase_vc: vertical chrominance phase register (0x00000024)*/
+/*! Slice: phase_vc:*/
+/*! This register is set to the vertical chrominance phase offset */
+#define MRV_MRSZ_PHASE_VC
+#define MRV_MRSZ_PHASE_VC_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_VC_SHIFT 0U
+/*! Register: mrsz_scale_lut_addr: Address pointer of up-scaling look up table (0x00000028)*/
+/*! Slice: scale_lut_addr:*/
+/*! Pointer to entry of lookup table */
+#define MRV_MRSZ_SCALE_LUT_ADDR
+#define MRV_MRSZ_SCALE_LUT_ADDR_MASK 0x0000003FU
+#define MRV_MRSZ_SCALE_LUT_ADDR_SHIFT 0U
+/*! Register: mrsz_scale_lut: Entry of up-scaling look up table (0x0000002c)*/
+/*! Slice: scale_lut:*/
+/*! Entry of lookup table at position scale_lut_addr. The lookup table must be filled with appropriate values before the up-scaling functionality can be used.*/
+#define MRV_MRSZ_SCALE_LUT
+#define MRV_MRSZ_SCALE_LUT_MASK 0x0000003FU
+#define MRV_MRSZ_SCALE_LUT_SHIFT 0U
+/*! Register: mrsz_ctrl_shd: global control shadow register (0x00000030)*/
+/*! Slice: scale_vc_up_shd:*/
+/*! 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#define MRV_MRSZ_SCALE_VC_UP_SHD
+#define MRV_MRSZ_SCALE_VC_UP_SHD_MASK 0x00000080U
+#define MRV_MRSZ_SCALE_VC_UP_SHD_SHIFT 7U
+/*! Slice: scale_vy_up_shd:*/
+/*! 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#define MRV_MRSZ_SCALE_VY_UP_SHD
+#define MRV_MRSZ_SCALE_VY_UP_SHD_MASK 0x00000040U
+#define MRV_MRSZ_SCALE_VY_UP_SHD_SHIFT 6U
+/*! Slice: scale_hc_up_shd:*/
+/*! 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#define MRV_MRSZ_SCALE_HC_UP_SHD
+#define MRV_MRSZ_SCALE_HC_UP_SHD_MASK 0x00000020U
+#define MRV_MRSZ_SCALE_HC_UP_SHD_SHIFT 5U
+/*! Slice: scale_hy_up_shd:*/
+/*! 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#define MRV_MRSZ_SCALE_HY_UP_SHD
+#define MRV_MRSZ_SCALE_HY_UP_SHD_MASK 0x00000010U
+#define MRV_MRSZ_SCALE_HY_UP_SHD_SHIFT 4U
+/*! Slice: scale_vc_enable_shd:*/
+/*! 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHD
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHD_MASK 0x00000008U
+#define MRV_MRSZ_SCALE_VC_ENABLE_SHD_SHIFT 3U
+/*! Slice: scale_vy_enable_shd:*/
+/*! 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHD
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHD_MASK 0x00000004U
+#define MRV_MRSZ_SCALE_VY_ENABLE_SHD_SHIFT 2U
+/*! Slice: scale_hc_enable_shd:*/
+/*! 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHD
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHD_MASK 0x00000002U
+#define MRV_MRSZ_SCALE_HC_ENABLE_SHD_SHIFT 1U
+/*! Slice: scale_hy_enable_shd:*/
+/*! 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHD
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHD_MASK 0x00000001U
+#define MRV_MRSZ_SCALE_HY_ENABLE_SHD_SHIFT 0U
+/*! Register: mrsz_scale_hy_shd: horizontal luminance scale factor shadow register (0x00000034)*/
+/*! Slice: scale_hy_shd:*/
+/*! This register is set to the horizontal luminance downscale factor or to the reciprocal of the horizontal luminance upscale factor */
+#define MRV_MRSZ_SCALE_HY_SHD
+#define MRV_MRSZ_SCALE_HY_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HY_SHD_SHIFT 0U
+/*! Register: mrsz_scale_hcb_shd: horizontal Cb scale factor shadow register (0x00000038)*/
+/*! Slice: scale_hcb_shd:*/
+/*! This register is set to the horizontal Cb downscale factor or to the reciprocal of the horizontal Cb upscale factor */
+#define MRV_MRSZ_SCALE_HCB_SHD
+#define MRV_MRSZ_SCALE_HCB_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HCB_SHD_SHIFT 0U
+/*! Register: mrsz_scale_hcr_shd: horizontal Cr scale factor shadow register (0x0000003c)*/
+/*! Slice: scale_hcr_shd:*/
+/*! This register is set to the horizontal Cr downscale factor or to the reciprocal of the horizontal Cr upscale factor */
+#define MRV_MRSZ_SCALE_HCR_SHD
+#define MRV_MRSZ_SCALE_HCR_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_HCR_SHD_SHIFT 0U
+/*! Register: mrsz_scale_vy_shd: vertical luminance scale factor shadow register (0x00000040)*/
+/*! Slice: scale_vy_shd:*/
+/*! This register is set to the vertical luminance downscale factor or to the reciprocal of the vertical luminance upscale factor */
+#define MRV_MRSZ_SCALE_VY_SHD
+#define MRV_MRSZ_SCALE_VY_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_VY_SHD_SHIFT 0U
+/*! Register: mrsz_scale_vc_shd: vertical chrominance scale factor shadow register (0x00000044)*/
+/*! Slice: scale_vc_shd:*/
+/*! This register is set to the vertical chrominance downscale factor or to the reciprocal of the vertical chrominance upscale factor */
+#define MRV_MRSZ_SCALE_VC_SHD
+#define MRV_MRSZ_SCALE_VC_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_SCALE_VC_SHD_SHIFT 0U
+/*! Register: mrsz_phase_hy_shd: horizontal luminance phase shadow register (0x00000048)*/
+/*! Slice: phase_hy_shd:*/
+/*! This register is set to the horizontal luminance phase offset */
+#define MRV_MRSZ_PHASE_HY_SHD
+#define MRV_MRSZ_PHASE_HY_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_HY_SHD_SHIFT 0U
+/*! Register: mrsz_phase_hc_shd: horizontal chrominance phase shadow register (0x0000004c)*/
+/*! Slice: phase_hc_shd:*/
+/*! This register is set to the horizontal chrominance phase offset */
+#define MRV_MRSZ_PHASE_HC_SHD
+#define MRV_MRSZ_PHASE_HC_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_HC_SHD_SHIFT 0U
+/*! Register: mrsz_phase_vy_shd: vertical luminance phase shadow register (0x00000050)*/
+/*! Slice: phase_vy_shd:*/
+/*! This register is set to the vertical luminance phase offset */
+#define MRV_MRSZ_PHASE_VY_SHD
+#define MRV_MRSZ_PHASE_VY_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_VY_SHD_SHIFT 0U
+
+/*! Register: mrsz_phase_crop_x_dir: Crop range in x direction register (0x00000058)*/
+/*! Slice: crop_h_start:*/
+/*! This slice is Selected picture start pixel position in the x-direction. */
+#define MRV_MRSZ_PHASE_H_START
+#define MRV_MRSZ_PHASE_H_START_MASK 0x00001FFFU
+#define MRV_MRSZ_PHASE_H_START_SHIFT 0U
+
+/*! Register: mrsz_phase_crop_x_dir: Crop range in x direction register (0x00000058)*/
+/*! Slice: crop_h_end:*/
+/*! This slice is Selected picture end pixel position in the x-direction.. */
+#define MRV_MRSZ_PHASE_H_END
+#define MRV_MRSZ_PHASE_H_END_MASK 0x1fff0000U
+#define MRV_MRSZ_PHASE_H_END_SHIFT 16U
+
+/*! Register: mrsz_phase_crop_y_dir: Crop range in y direction register (0x0000005c)*/
+/*! Slice: crop_y_start:*/
+/*! This slice is Selected picture start pixel position in the y-direction. */
+#define MRV_MRSZ_PHASE_V_START
+#define MRV_MRSZ_PHASE_V_START_MASK 0x00001FFFU
+#define MRV_MRSZ_PHASE_V_START_SHIFT 0U
+
+/*! Register: mrsz_phase_crop_y_dir: Crop range in y direction register (0x0000005c)*/
+/*! Slice: crop_v_end:*/
+/*! This slice is Selected picture end pixel position in the v-direction.. */
+#define MRV_MRSZ_PHASE_V_END
+#define MRV_MRSZ_PHASE_V_END_MASK 0x1fff0000U
+#define MRV_MRSZ_PHASE_V_END_SHIFT 16U
+
+
+/*! Register: mrsz_phase_vc_shd: vertical chrominance phase shadow register (0x00000054)*/
+/*! Slice: phase_vc_shd:*/
+/*! This register is set to the vertical chrominance phase offset */
+#define MRV_MRSZ_PHASE_VC_SHD
+#define MRV_MRSZ_PHASE_VC_SHD_MASK 0x0000FFFFU
+#define MRV_MRSZ_PHASE_VC_SHD_SHIFT 0U
+#define MRV_MRSZ_COVERT_OUTPUT
+#define MRV_MRSZ_COVERT_OUTPUT_MASK 0x0000001CU
+#define MRV_MRSZ_COVERT_OUTPUT_SHIFT 2U
+#define MRV_MRSZ_COVERT_INPUT
+#define MRV_MRSZ_COVERT_INPUT_MASK 0x00000003U
+#define MRV_MRSZ_COVERT_INPUT_SHIFT 0U
+#define MRV_MRSZ_COVERT_10_ENABLE
+#define MRV_MRSZ_COVERT_10_ENABLE_MASK  0X00000100U
+#define MRV_MRSZ_COVERT_10_ENABLE_SHIFT 8U
+#define MRV_MRSZ_COVERT_10_METHOD
+#define MRV_MRSZ_COVERT_10_METHOD_MASK  0X00000200U
+#define MRV_MRSZ_COVERT_10_METHOD_SHIFT 9U
+#define MRV_MRSZ_COVERT_PACK_FORMAT
+#define MRV_MRSZ_COVERT_PACK_FORMAT_MASK 0x00000400U
+#define MRV_MRSZ_COVERT_PACK_FORMAT_SHIFT 10U
+/*! Register: srsz_ctrl: global control register (0x00000000)*/
+/*! Slice: auto_upd:*/
+/*! 1: automatic register update at frame end enabled.*/
+/* 0: automatic register update at frame end disabled.*/
+#define MRV_SRSZ_AUTO_UPD
+#define MRV_SRSZ_AUTO_UPD_MASK 0x00000200U
+#define MRV_SRSZ_AUTO_UPD_SHIFT 9U
+/*! Slice: cfg_upd:*/
+/*! write 0: nothing happens */
+/* write 1: update shadow registers */
+/* read: always 0 */
+#define MRV_SRSZ_CFG_UPD
+#define MRV_SRSZ_CFG_UPD_MASK 0x00000100U
+#define MRV_SRSZ_CFG_UPD_SHIFT 8U
+/*! Slice: scale_vc_up:*/
+/*! 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#define MRV_SRSZ_SCALE_VC_UP
+#define MRV_SRSZ_SCALE_VC_UP_MASK 0x00000080U
+#define MRV_SRSZ_SCALE_VC_UP_SHIFT 7U
+/*! Slice: scale_vy_up:*/
+/*! 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#define MRV_SRSZ_SCALE_VY_UP
+#define MRV_SRSZ_SCALE_VY_UP_MASK 0x00000040U
+#define MRV_SRSZ_SCALE_VY_UP_SHIFT 6U
+/*! Slice: scale_hc_up:*/
+/*! 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#define MRV_SRSZ_SCALE_HC_UP
+#define MRV_SRSZ_SCALE_HC_UP_MASK 0x00000020U
+#define MRV_SRSZ_SCALE_HC_UP_SHIFT 5U
+/*! Slice: scale_hy_up:*/
+/*! 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#define MRV_SRSZ_SCALE_HY_UP
+#define MRV_SRSZ_SCALE_HY_UP_MASK 0x00000010U
+#define MRV_SRSZ_SCALE_HY_UP_SHIFT 4U
+/*! Slice: scale_vc_enable:*/
+/*! 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#define MRV_SRSZ_SCALE_VC_ENABLE
+#define MRV_SRSZ_SCALE_VC_ENABLE_MASK 0x00000008U
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHIFT 3U
+/*! Slice: scale_vy_enable:*/
+/*! 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#define MRV_SRSZ_SCALE_VY_ENABLE
+#define MRV_SRSZ_SCALE_VY_ENABLE_MASK 0x00000004U
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHIFT 2U
+/*! Slice: scale_hc_enable:*/
+/*! 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#define MRV_SRSZ_SCALE_HC_ENABLE
+#define MRV_SRSZ_SCALE_HC_ENABLE_MASK 0x00000002U
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHIFT 1U
+/*! Slice: scale_hy_enable:*/
+/*! 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#define MRV_SRSZ_SCALE_HY_ENABLE
+#define MRV_SRSZ_SCALE_HY_ENABLE_MASK 0x00000001U
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHIFT 0U
+/*! Register: srsz_scale_hy: horizontal luminance scale factor register (0x00000004)*/
+/*! Slice: scale_hy:*/
+/*! This register is set to the horizontal luminance downscale factor or to the reciprocal of the horizontal luminance upscale factor */
+#define MRV_SRSZ_SCALE_HY
+#define MRV_SRSZ_SCALE_HY_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HY_SHIFT 0U
+/*! Register: srsz_scale_hcb: horizontal chrominance scale factor register (0x00000008)*/
+/*! Slice: scale_hcb:*/
+/*! This register is set to the horizontal Cb downscale factor or to the reciprocal of the horizontal Cb upscale factor */
+#define MRV_SRSZ_SCALE_HCB
+#define MRV_SRSZ_SCALE_HCB_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HCB_SHIFT 0U
+/*! Register: srsz_scale_hcr: horizontal chrominance scale factor register (0x0000000c)*/
+/*! Slice: scale_hcr:*/
+/*! This register is set to the horizontal Cr downscale factor or to the reciprocal of the horizontal Cr upscale factor */
+#define MRV_SRSZ_SCALE_HCR
+#define MRV_SRSZ_SCALE_HCR_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HCR_SHIFT 0U
+/*! Register: srsz_scale_vy: vertical luminance scale factor register (0x00000010)*/
+/*! Slice: scale_vy:*/
+/*! This register is set to the vertical luminance downscale factor or to the reciprocal of the vertical luminance upscale factor */
+#define MRV_SRSZ_SCALE_VY
+#define MRV_SRSZ_SCALE_VY_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_VY_SHIFT 0U
+/*! Register: srsz_scale_vc: vertical chrominance scale factor register (0x00000014)*/
+/*! Slice: scale_vc:*/
+/*! This register is set to the vertical chrominance downscale factor or to the reciprocal of the vertical chrominance upscale factor */
+#define MRV_SRSZ_SCALE_VC
+#define MRV_SRSZ_SCALE_VC_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_VC_SHIFT 0U
+/*! Register: srsz_phase_hy: horizontal luminance phase register (0x00000018)*/
+/*! Slice: phase_hy:*/
+/*! This register is set to the horizontal luminance phase offset */
+#define MRV_SRSZ_PHASE_HY
+#define MRV_SRSZ_PHASE_HY_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_HY_SHIFT 0U
+/*! Register: srsz_phase_hc: horizontal chrominance phase register (0x0000001c)*/
+/*! Slice: phase_hc:*/
+/*! This register is set to the horizontal chrominance phase offset */
+#define MRV_SRSZ_PHASE_HC
+#define MRV_SRSZ_PHASE_HC_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_HC_SHIFT 0U
+/*! Register: srsz_phase_vy: vertical luminance phase register (0x00000020)*/
+/*! Slice: phase_vy:*/
+/*! This register is set to the vertical luminance phase offset */
+#define MRV_SRSZ_PHASE_VY
+#define MRV_SRSZ_PHASE_VY_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_VY_SHIFT 0U
+/*! Register: srsz_phase_vc: vertical chrominance phase register (0x00000024)*/
+/*! Slice: phase_vc:*/
+/*! This register is set to the vertical chrominance phase offset */
+#define MRV_SRSZ_PHASE_VC
+#define MRV_SRSZ_PHASE_VC_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_VC_SHIFT 0U
+/*! Register: srsz_scale_lut_addr: Address pointer of up-scaling look up table (0x00000028)*/
+/*! Slice: scale_lut_addr:*/
+/*! Pointer to entry of lookup table */
+#define MRV_SRSZ_SCALE_LUT_ADDR
+#define MRV_SRSZ_SCALE_LUT_ADDR_MASK 0x0000003FU
+#define MRV_SRSZ_SCALE_LUT_ADDR_SHIFT 0U
+/*! Register: srsz_scale_lut: Entry of up-scaling look up table (0x0000002c)*/
+/*! Slice: scale_lut:*/
+/*! Entry of lookup table at position scale_lut_addr. The lookup table must be filled with appropriate values before the up-scaling functionality can be used.*/
+#define MRV_SRSZ_SCALE_LUT
+#define MRV_SRSZ_SCALE_LUT_MASK 0x0000003FU
+#define MRV_SRSZ_SCALE_LUT_SHIFT 0U
+/*! Register: srsz_ctrl_shd: global control shadow register (0x00000030)*/
+/*! Slice: scale_vc_up_shd:*/
+/*! 1: vertical chrominance upscaling selected */
+/* 0: vertical chrominance downscaling selected */
+#define MRV_SRSZ_SCALE_VC_UP_SHD
+#define MRV_SRSZ_SCALE_VC_UP_SHD_MASK 0x00000080U
+#define MRV_SRSZ_SCALE_VC_UP_SHD_SHIFT 7U
+/*! Slice: scale_vy_up_shd:*/
+/*! 1: vertical luminance upscaling selected */
+/* 0: vertical luminance downscaling selected */
+#define MRV_SRSZ_SCALE_VY_UP_SHD
+#define MRV_SRSZ_SCALE_VY_UP_SHD_MASK 0x00000040U
+#define MRV_SRSZ_SCALE_VY_UP_SHD_SHIFT 6U
+/*! Slice: scale_hc_up_shd:*/
+/*! 1: horizontal chrominance upscaling selected */
+/* 0: horizontal chrominance downscaling selected */
+#define MRV_SRSZ_SCALE_HC_UP_SHD
+#define MRV_SRSZ_SCALE_HC_UP_SHD_MASK 0x00000020U
+#define MRV_SRSZ_SCALE_HC_UP_SHD_SHIFT 5U
+/*! Slice: scale_hy_up_shd:*/
+/*! 1: horizontal luminance upscaling selected */
+/* 0: horizontal luminance downscaling selected */
+#define MRV_SRSZ_SCALE_HY_UP_SHD
+#define MRV_SRSZ_SCALE_HY_UP_SHD_MASK 0x00000010U
+#define MRV_SRSZ_SCALE_HY_UP_SHD_SHIFT 4U
+/*! Slice: scale_vc_enable_shd:*/
+/*! 0: bypass vertical chrominance scaling unit */
+/* 1: enable vertical chrominance scaling unit */
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHD
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHD_MASK 0x00000008U
+#define MRV_SRSZ_SCALE_VC_ENABLE_SHD_SHIFT 3U
+/*! Slice: scale_vy_enable_shd:*/
+/*! 0: bypass vertical luminance scaling unit */
+/* 1: enable vertical luminance scaling unit */
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHD
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHD_MASK 0x00000004U
+#define MRV_SRSZ_SCALE_VY_ENABLE_SHD_SHIFT 2U
+/*! Slice: scale_hc_enable_shd:*/
+/*! 0: bypass horizontal chrominance scaling unit */
+/* 1: enable horizontal chrominance scaling unit */
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHD
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHD_MASK 0x00000002U
+#define MRV_SRSZ_SCALE_HC_ENABLE_SHD_SHIFT 1U
+/*! Slice: scale_hy_enable_shd:*/
+/*! 0: bypass horizontal luminance scaling unit */
+/* 1: enable horizontal luminance scaling unit */
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHD
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHD_MASK 0x00000001U
+#define MRV_SRSZ_SCALE_HY_ENABLE_SHD_SHIFT 0U
+/*! Register: srsz_scale_hy_shd: horizontal luminance scale factor shadow register (0x00000034)*/
+/*! Slice: scale_hy_shd:*/
+/*! This register is set to the horizontal luminance downscale factor or to the reciprocal of the horizontal luminance upscale factor */
+#define MRV_SRSZ_SCALE_HY_SHD
+#define MRV_SRSZ_SCALE_HY_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HY_SHD_SHIFT 0U
+/*! Register: srsz_scale_hcb_shd: horizontal Cb scale factor shadow register (0x00000038)*/
+/*! Slice: scale_hcb_shd:*/
+/*! This register is set to the horizontal Cb downscale factor or to the reciprocal of the horizontal Cb upscale factor */
+#define MRV_SRSZ_SCALE_HCB_SHD
+#define MRV_SRSZ_SCALE_HCB_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HCB_SHD_SHIFT 0U
+/*! Register: srsz_scale_hcr_shd: horizontal Cr scale factor shadow register (0x0000003c)*/
+/*! Slice: scale_hcr_shd:*/
+/*! This register is set to the horizontal r downscale factor or to the reciprocal of the horizontal r upscale factor */
+#define MRV_SRSZ_SCALE_HCR_SHD
+#define MRV_SRSZ_SCALE_HCR_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_HCR_SHD_SHIFT 0U
+/*! Register: srsz_scale_vy_shd: vertical luminance scale factor shadow register (0x00000040)*/
+/*! Slice: scale_vy_shd:*/
+/*! This register is set to the vertical luminance downscale factor or to the reciprocal of the vertical luminance upscale factor */
+#define MRV_SRSZ_SCALE_VY_SHD
+#define MRV_SRSZ_SCALE_VY_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_VY_SHD_SHIFT 0U
+/*! Register: srsz_scale_vc_shd: vertical chrominance scale factor shadow register (0x00000044)*/
+/*! Slice: scale_vc_shd:*/
+/*! This register is set to the vertical chrominance downscale factor or to the reciprocal of the vertical chrominance upscale factor */
+#define MRV_SRSZ_SCALE_VC_SHD
+#define MRV_SRSZ_SCALE_VC_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_SCALE_VC_SHD_SHIFT 0U
+/*! Register: srsz_phase_hy_shd: horizontal luminance phase shadow register (0x00000048)*/
+/*! Slice: phase_hy_shd:*/
+/*! This register is set to the horizontal luminance phase offset */
+#define MRV_SRSZ_PHASE_HY_SHD
+#define MRV_SRSZ_PHASE_HY_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_HY_SHD_SHIFT 0U
+/*! Register: srsz_phase_hc_shd: horizontal chrominance phase shadow register (0x0000004c)*/
+/*! Slice: phase_hc_shd:*/
+/*! This register is set to the horizontal chrominance phase offset */
+#define MRV_SRSZ_PHASE_HC_SHD
+#define MRV_SRSZ_PHASE_HC_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_HC_SHD_SHIFT 0U
+/*! Register: srsz_phase_vy_shd: vertical luminance phase shadow register (0x00000050)*/
+/*! Slice: phase_vy_shd:*/
+/*! This register is set to the vertical luminance phase offset */
+#define MRV_SRSZ_PHASE_VY_SHD
+#define MRV_SRSZ_PHASE_VY_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_VY_SHD_SHIFT 0U
+/*! Register: srsz_phase_vc_shd: vertical chrominance phase shadow register (0x00000054)*/
+/*! Slice: phase_vc_shd:*/
+/*! This register is set to the vertical chrominance phase offset */
+#define MRV_SRSZ_PHASE_VC_SHD
+#define MRV_SRSZ_PHASE_VC_SHD_MASK 0x0000FFFFU
+#define MRV_SRSZ_PHASE_VC_SHD_SHIFT 0U
+/*! Register: mi_ctrl: Global control register (0x00000000)*/
+/*! Slice: sp_output_format:*/
+/*! Selects output format of self picture. For possible restrictions see sub-chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+     /**/
+/* 111: reserved */
+/* 110: RGB 888 */
+/* 101: RGB 666 */
+/* 100: RGB 565 */
+     /**/
+/* 011: YCbCr  4:4:4 */
+/* 010: YCbCr  4:2:2 */
+/* 001: YCbCr  4:2:0 */
+/* 000: YCbCr  4:0:0 */
+     /**/
+/* Note:*/
+/* - Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+/* - for RGB output format the SP input format must be YCbCr 4:2:2 */
+#define MRV_MI_SP_OUTPUT_FORMAT
+#define MRV_MI_SP_OUTPUT_FORMAT_MASK 0x70000000U
+#define MRV_MI_SP_OUTPUT_FORMAT_SHIFT 28U
+/*! Slice: sp_input_format:*/
+/*! Selects input format of self picture. For possible restrictions see sub-chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+     /**/
+/* 11: YCbCr  4:4:4 */
+/* 10: YCbCr  4:2:2 */
+/* 01: YCbCr  4:2:0 */
+/* 00: YCbCr  4:0:0 */
+     /**/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_INPUT_FORMAT
+#define MRV_MI_SP_INPUT_FORMAT_MASK 0x0C000000U
+#define MRV_MI_SP_INPUT_FORMAT_SHIFT 26U
+/*! Slice: sp_write_format:*/
+/*! defines how YCbCr self picture data is written to memory.*/
+/* Must be set to 00 if RGB conversion is active. Note that with RGB conversion active the output format is always interleaved.*/
+     /**/
+/* 00:	planar */
+/* 01:	semi planar, for YCbCr 4:2:x */
+/* 10:	interleaved (combined), for YCbCr 4:2:2 only */
+/* 11:	reserved */
+     /**/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_WRITE_FORMAT
+#define MRV_MI_SP_WRITE_FORMAT_MASK 0x03000000U
+#define MRV_MI_SP_WRITE_FORMAT_SHIFT 24U
+/*! Slice: mp_write_format:*/
+/*! Defines how YCbCr main picture data is written to memory. Ignored if JPEG data is chosen.*/
+/* In YCbCr mode the following meaning is applicable */
+/* 00:	planar */
+/* 01:	semi planar, for YCbCr 4:2:x */
+/* 10:	interleaved (combined), for YCbCr 4:2:2 only */
+/* 11:	reserved */
+/* In RAW data mode the following meaning is applicable */
+/* 00:	RAW 8 bit */
+/* 01:	reserved */
+/* 10:	RAW 12 bit */
+/* 11:	reserved */
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the main path.*/
+#define MRV_MI_MP_WRITE_FORMAT
+#define MRV_MI_MP_WRITE_FORMAT_MASK 0x00C00000U
+#define MRV_MI_MP_WRITE_FORMAT_SHIFT 22U
+/*! Slice: init_offset_en:*/
+/*! Enables updating of the offset counters shadow registers for main and self picture to the programmed register init values.*/
+/* MI_MP/SP_Y/CB/CR_OFFS_CNT_INIT */
+/* -> MI_MP/SP_Y/CB/CR_OFFS_CNT_SHD */
+/* The update will be executed either when a forced software update occurs (in register MI_INIT bit cfg_upd = 1) or when an automatic config update signal arrives at the MI input port. The latter is split into main and self picture. So only the corresponding main/self shadow registers are affected.*/
+/* After a picture skip has been performed init_offset_en selects between skip restart and skip init mode (see bit skip in register MI_INIT).*/
+#define MRV_MI_INIT_OFFSET_EN
+#define MRV_MI_INIT_OFFSET_EN_MASK 0x00200000U
+#define MRV_MI_INIT_OFFSET_EN_SHIFT 21U
+/*! Slice: init_base_en:*/
+/*! Enables updating of the base address and buffer size shadow registers for main and self picture to the programmed register init values.*/
+/* MI_MP/SP_Y/CB/CR_BASE_AD_INIT */
+/* -> MI_MP/SP_Y/CB/CR_BASE_AD_SHD */
+/* MI_MP/SP_Y/CB/CR_SIZE_INIT */
+/* -> MI_MP/SP_Y/CB/CR_SIZE_SHD */
+/* The update will be executed either when a forced software update occurs (in register MI_INIT bit cfg_upd = 1) or when an automatic config update signal arrives at the MI input port. The latter is split into main and self picture. So only the corresponding main/self shadow registers are affected.*/
+#define MRV_MI_INIT_BASE_EN
+#define MRV_MI_INIT_BASE_EN_MASK 0x00100000U
+#define MRV_MI_INIT_BASE_EN_SHIFT 20U
+/*! Slice: burst_len_chrom:*/
+/*! Burst length for Cb or Cr data affecting write port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported. If rotation is active, then only 4-beat bursts will be generated in self path, regardless of the setting here.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the main and self path.*/
+#define MRV_MI_BURST_LEN_CHROM
+#define MRV_MI_BURST_LEN_CHROM_MASK 0x000C0000U
+#define MRV_MI_BURST_LEN_CHROM_SHIFT 18U
+/*! Slice: burst_len_lum:*/
+/*! Burst length for Y, JPEG, or raw data affecting write port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the main and self path.*/
+#define MRV_MI_BURST_LEN_LUM
+#define MRV_MI_BURST_LEN_LUM_MASK 0x00030000U
+#define MRV_MI_BURST_LEN_LUM_SHIFT 16U
+/*! Slice: last_pixel_sig_en:*/
+/*! enables the last pixel signalization */
+/* 1: enabled */
+/* 0: disabled */
+#define MRV_MI_LAST_PIXEL_SIG_EN
+#define MRV_MI_LAST_PIXEL_SIG_EN_MASK 0x00008000U
+#define MRV_MI_LAST_PIXEL_SIG_EN_SHIFT 15U
+/*! Slice: sp_auto_update:*/
+/*! automatic update of configuration registers for self path at frame end.*/
+/* 1: enabled */
+/* 0: disabled */
+#define MRV_MI_SP_AUTO_UPDATE
+#define MRV_MI_SP_AUTO_UPDATE_MASK 0x00004000U
+#define MRV_MI_SP_AUTO_UPDATE_SHIFT 14U
+/*! Slice: mp_auto_update:*/
+/*! automatic update of configuration registers for main path at frame end.*/
+/* 1: enabled */
+/* 0: disabled */
+#define MRV_MI_MP_AUTO_UPDATE
+#define MRV_MI_MP_AUTO_UPDATE_MASK 0x00002000U
+#define MRV_MI_MP_AUTO_UPDATE_SHIFT 13U
+/*! Slice: sp_pingpong_enable:*/
+/*! pingpong  mode of configuration registers for self path at frame end.*/
+/* 1: enabled */
+/* 0: disabled */
+#define MRV_MI_SP_PINGPONG_ENABLE
+#define MRV_MI_SP_PINGPONG_ENABLE_MASK 0x00001000U
+#define MRV_MI_SP_PINGPONG_ENABLE_SHIFT 12U
+/*! Slice: mp_pingpong_enable:*/
+/*! pingpong  mode of configuration registers for main path at frame end.*/
+/* 1: enabled */
+/* 0: disabled */
+#define MRV_MI_MP_PINGPONG_ENABLE
+#define MRV_MI_MP_PINGPONG_ENABLE_MASK 0x00000800U
+#define MRV_MI_MP_PINGPONG_ENABLE_SHIFT 11U
+/*! Slice: 422noncosited:*/
+/*! Enables self path YCbCr422non-co-sited -> YCbCr444 interpolation */
+/* (M5_v6, M5_v7 only)*/
+/* 1: YCbCr422 data are non_co-sited (Cb and Cr samples are centered between Y samples) so modified interpolation is activated */
+/* 0: YCbCr422 data are co-sited (Y0 Cb0 and Cr0 are sampled at the same position)*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_422NONCOSITED
+#define MRV_MI_422NONCOSITED_MASK 0x00000400U
+#define MRV_MI_422NONCOSITED_SHIFT 10U
+/*! Slice: cbcr_full_range:*/
+/*! Enables CbCr full range for self path YCbCr -> RGB conversion */
+/* (M5_v6, M5_v7 only)*/
+/* 1: CbCr have full range (0..255)*/
+/* 0: CbCr have compressed range range (16..240)*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_CBCR_FULL_RANGE
+#define MRV_MI_CBCR_FULL_RANGE_MASK 0x00000200U
+#define MRV_MI_CBCR_FULL_RANGE_SHIFT 9U
+/*! Slice: y_full_range:*/
+/*! Enables Y full range for self path YCbCr -> RGB conversion */
+/* (M5_v6, M5_v7 only)*/
+/* 1: Y has full range (0..255)*/
+/* 0: Y has compressed range (16..235)*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_Y_FULL_RANGE
+#define MRV_MI_Y_FULL_RANGE_MASK 0x00000100U
+#define MRV_MI_Y_FULL_RANGE_SHIFT 8U
+/*! Slice: byte_swap:*/
+/*! Enables change of byte order of the 32 bit output word at write port */
+/* 1: byte order is mirrored but the bit order within one byte doesn’t change */
+/* 0: no byte mirroring */
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the main and self path.*/
+#define MRV_MI_BYTE_SWAP
+#define MRV_MI_BYTE_SWAP_MASK 0x00000080U
+#define MRV_MI_BYTE_SWAP_SHIFT 7U
+/*! Slice: rot:*/
+/*! Rotation 90 degree counter clockwise of self picture, only in RGB mode. For picture orientation and operation modes see sub-chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+/* For RGB 565 format the line length must be a multiple of 2. There are no restrictions for RGB 888/666.*/
+/* 1: enabled */
+/* 0: disabled */
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path. In rotation mode only 4-beat bursts are supported for self-path.*/
+#define MRV_MI_ROT
+#define MRV_MI_ROT_MASK 0x00000040U
+#define MRV_MI_ROT_SHIFT 6U
+/*! Slice: v_flip:*/
+/*! Vertical flipping of self picture. For picture orientation and operation modes see sub-chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8, for all other component modes a multiple of 4 and for RGB 565 a multiple of 2. There are no restrictions for RGB 888/666.*/
+/* 1: enabled */
+/* 0: disabled */
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_V_FLIP
+#define MRV_MI_V_FLIP_MASK 0x00000020U
+#define MRV_MI_V_FLIP_SHIFT 5U
+/*! Slice: h_flip:*/
+/*! Horizontal flipping of self picture. For picture orientation and operation modes see sub-chapter "Picture Orientation" in chapter "Self Path Output Programming".*/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8, for all other component modes a multiple of 4 and for RGB 565 a multiple of 2. There are no restrictions for RGB 888/666.*/
+/* 1: enabled */
+/* 0: disabled */
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_H_FLIP
+#define MRV_MI_H_FLIP_MASK 0x00000010U
+#define MRV_MI_H_FLIP_SHIFT 4U
+/*! Slice: path_enable:*/
+/*! Enables data pathes of MI according to the following table:*/
+     /**/
+/* 0000: disabled, no data is transferred */
+/* 0001: YUV data output, mainpath only (mp_enable only)*/
+/* 0010: self-path only, output data format depending on other settings (sp_enable only)*/
+/* 0011: YUV data output in mainpath and self-path image data active */
+/* 0100: JPEG data output, mainpath only (jpeg_enable only)*/
+/* 0101: not allowed */
+/* 0110: JPEG data output in mainpath and self-path image data active */
+/* 0111: not allowed */
+/* 1000: RAW data output, mainpath only (raw_enable only)*/
+/* 1001: defect pixel data on self-path, image data on mainpath */
+/* 1010: defect pixel data on mainpath, image data on self-path */
+/* 1011: not allowed */
+/* 1100: defect pixel data on self-path, JPEG data on mainpath */
+/* 1101: defect pixel data on mainpath only */
+/* 1110: defect pixel data on self-path only */
+/* 1111: defect pixel data on self-path, RAW data on mainpath */
+     /**/
+/* Programmed value becomes effective (visible in shadow register) after a soft reset, a forced software update or an automatic config update.  Affects MI_IN and MI_OUT module.*/
+#define MRV_MI_PATH_ENABLE
+#define MRV_MI_PATH_ENABLE_MASK 0x0000000FU
+#define MRV_MI_PATH_ENABLE_SHIFT 0U
+/*! Register: mi_init: Control register for address init and skip function (0x00000004)*/
+/*! Slice: mi_output_format */
+#define MRV_MI_MP_OUTPUT_FORMAT
+#define MRV_MI_MP_OUTPUT_FORMAT_MASK 0x000001E0U
+#define MRV_MI_MP_OUTPUT_FORMAT_SHIFT 5U
+/*! Slice: mi_cfg_upd:*/
+/*! Forced configuration update. Leads to an immediate update of the shadow registers.*/
+/* Depending on the two init enable bits in the MI_CTRL register (init_offset_en and init_base_en) the offset counter, base address and buffer size shadow registers are also updated.*/
+#define MRV_MI_MI_CFG_UPD
+#define MRV_MI_MI_CFG_UPD_MASK 0x00000010U
+#define MRV_MI_MI_CFG_UPD_SHIFT 4U
+/*! Slice: mi_skip:*/
+/*! Skip of current or next starting main picture:*/
+/* Aborts writing of main picture image data of the current frame to RAM (after the current burst transmission has been completed). Further main picture data up to the end of the current frame are discarded.*/
+     /**/
+/* No further makroblock line interrupt (mblk_line), no wrap around interrupt for main picture (wrap_mp_y/cb/cr) and no fill level interrupt (fill_mp_y) are generated.*/
+     /**/
+/* Skip does not affect the generation of the main path frame end interrupt (mp_frame_end).*/
+/* Skip does not affect the processing of self picture and its corresponding interrupts namely the self path frame end interrupt (sp_frame_end).*/
+     /**/
+/* The byte counter (register MI_BYTE_CNT) is not affected. It produces the correct number of JPEG or RAW data bytes at the end of the current (skipped) frame.*/
+     /**/
+/* After a skip has been performed the offset counter for the main picture at the start of the following frame are set depending on the bit init_offset_en in register MI_CTRL:*/
+     /**/
+/* - Skip restart mode (init_offset_en = 0)*/
+/* The offset counters of the main picture are restarted at the old start values of the previous skipped frame.*/
+     /**/
+/* - Skip init mode (init_offset_en = 1)*/
+/* The offset counters of the main picture are initialized with the register contents of the offset counter init registers without any additional forced software update or automatic config update.*/
+#define MRV_MI_MI_SKIP
+#define MRV_MI_MI_SKIP_MASK 0x00000004U
+#define MRV_MI_MI_SKIP_SHIFT 2U
+/*! Register: mi_mp_y_base_ad_init: Base address for main picture Y component, JPEG or raw data (0x00000008)*/
+/*! Slice: mp_y_base_ad_init:*/
+/*! Base address of main picture Y component ring buffer, JPEG ring buffer or raw data ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+#ifdef ISP_MP_34BIT
+#define MRV_MI_MP_Y_BASE_AD_INIT
+#define MRV_MI_MP_Y_BASE_AD_INIT_MASK 0xFFFFFFFEU
+#define MRV_MI_MP_Y_BASE_AD_INIT_SHIFT 1U
+#else
+#define MRV_MI_MP_Y_BASE_AD_INIT
+#define MRV_MI_MP_Y_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_Y_BASE_AD_INIT_SHIFT 3U
+#endif
+/*! Register: mi_mp_y_size_init: Size of main picture Y component, JPEG or raw data (0x0000000c)*/
+/*! Slice: mp_y_size_init:*/
+/*! Size of main picture Y component ring buffer, JPEG ring buffer or raw data ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+#define MRV_MI_MP_Y_SIZE_INIT
+#define MRV_MI_MP_Y_SIZE_INIT_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_SIZE_INIT_SHIFT 3U
+/*! Register: mi_mp_y_offs_cnt_init: Offset counter init value for main picture Y, JPEG or raw data (0x00000010)*/
+/*! Slice: mp_y_offs_cnt_init:*/
+/*! Offset counter init value of main picture Y component ring buffer, JPEG ring buffer or raw data ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+#define MRV_MI_MP_Y_OFFS_CNT_INIT
+#define MRV_MI_MP_Y_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_mp_y_offs_cnt_start: Offset counter start value for main picture Y, JPEG or raw data (0x00000014)*/
+/*! Slice: mp_y_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (main picture Y component, JPEG or raw data). Updated at frame end.*/
+/* Note: A soft reset resets the contents to the reset value.*/
+#define MRV_MI_MP_Y_OFFS_CNT_START
+#define MRV_MI_MP_Y_OFFS_CNT_START_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_mp_y_irq_offs_init: Fill level interrupt offset value for main picture Y, JPEG or raw data (0x00000018)*/
+/*! Slice: mp_y_irq_offs_init:*/
+/*! Reaching this programmed value by the current offset counter for addressing main picture Y component, JPEG or raw data leads to generation of fill level interrupt fill_mp_y.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+#define MRV_MI_MP_Y_IRQ_OFFS_INIT
+#define MRV_MI_MP_Y_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: mi_mp_cb_base_ad_init: Base address for main picture Cb component ring buffer (0x0000001c)*/
+/*! Slice: mp_cb_base_ad_init:*/
+/*! Base address of main picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#ifdef ISP_MP_34BIT
+#define MRV_MI_MP_CB_BASE_AD_INIT
+#define MRV_MI_MP_CB_BASE_AD_INIT_MASK 0xFFFFFFFEU
+#define MRV_MI_MP_CB_BASE_AD_INIT_SHIFT 1U
+#else
+#define MRV_MI_MP_CB_BASE_AD_INIT
+#define MRV_MI_MP_CB_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CB_BASE_AD_INIT_SHIFT 3U
+#endif
+/*! Register: mi_mp_cb_size_init: Size of main picture Cb component ring buffer (0x00000020)*/
+/*! Slice: mp_cb_size_init:*/
+/*! Size of main picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_MP_CB_SIZE_INIT
+#define MRV_MI_MP_CB_SIZE_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CB_SIZE_INIT_SHIFT 3U
+/*! Register: mi_mp_cb_offs_cnt_init: Offset counter init value for main picture Cb component ring buffer (0x00000024)*/
+/*! Slice: mp_cb_offs_cnt_init:*/
+/*! Offset counter init value of main picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect. Check exceptional handling in skip modes.*/
+#define MRV_MI_MP_CB_OFFS_CNT_INIT
+#define MRV_MI_MP_CB_OFFS_CNT_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CB_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_mp_cb_offs_cnt_start: Offset counter start value for main picture Cb component ring buffer (0x00000028)*/
+/*! Slice: mp_cb_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (main picture Cb component). Updated at frame end.*/
+#define MRV_MI_MP_CB_OFFS_CNT_START
+#define MRV_MI_MP_CB_OFFS_CNT_START_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CB_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_mp_cr_base_ad_init: Base address for main picture Cr component ring buffer (0x0000002c)*/
+/*! Slice: mp_cr_base_ad_init:*/
+/*! Base address of main picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#ifdef ISP_MP_34BIT
+#define MRV_MI_MP_CR_BASE_AD_INIT
+#define MRV_MI_MP_CR_BASE_AD_INIT_MASK 0xFFFFFFFEU
+#define MRV_MI_MP_CR_BASE_AD_INIT_SHIFT 1U
+#else
+#define MRV_MI_MP_CR_BASE_AD_INIT
+#define MRV_MI_MP_CR_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CR_BASE_AD_INIT_SHIFT 3U
+#endif
+/*! Register: mi_mp_cr_size_init: Size of main picture Cr component ring buffer (0x00000030)*/
+/*! Slice: mp_cr_size_init:*/
+/*! Size of main picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_MP_CR_SIZE_INIT
+#define MRV_MI_MP_CR_SIZE_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CR_SIZE_INIT_SHIFT 3U
+/*! Register: mi_mp_cr_offs_cnt_init: Offset counter init value for main picture Cr component ring buffer (0x00000034)*/
+/*! Slice: mp_cr_offs_cnt_init:*/
+/*! Offset counter init value of main picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect. Check exceptional handling in skip modes.*/
+#define MRV_MI_MP_CR_OFFS_CNT_INIT
+#define MRV_MI_MP_CR_OFFS_CNT_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CR_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_mp_cr_offs_cnt_start: Offset counter start value for main picture Cr component ring buffer (0x00000038)*/
+/*! Slice: mp_cr_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (main picture Cr component). Updated at frame end.*/
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_MP_CR_OFFS_CNT_START
+#define MRV_MI_MP_CR_OFFS_CNT_START_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CR_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_sp_y_base_ad_init: Base address for self picture Y component ring buffer (0x0000003c)*/
+/*! Slice: sp_y_base_ad_init:*/
+/*! Base address of self picture Y component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_Y_BASE_AD_INIT
+#define MRV_MI_SP_Y_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_Y_BASE_AD_INIT_SHIFT 3U
+/*! Register: mi_sp_y_size_init: Size of self picture Y component ring buffer (0x00000040)*/
+/*! Slice: sp_y_size_init:*/
+/*! Size of self picture Y component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_Y_SIZE_INIT
+#define MRV_MI_SP_Y_SIZE_INIT_MASK 0x1FFFFFF8U
+#define MRV_MI_SP_Y_SIZE_INIT_SHIFT 3U
+/*! Register: mi_sp_y_offs_cnt_init: Offset counter init value for self picture Y component ring buffer (0x00000044)*/
+/*! Slice: sp_y_offs_cnt_init:*/
+/*! Offset counter init value of self picture Y component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_Y_OFFS_CNT_INIT
+#define MRV_MI_SP_Y_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define MRV_MI_SP_Y_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_sp_y_offs_cnt_start: Offset counter start value for self picture Y component ring buffer (0x00000048)*/
+/*! Slice: sp_y_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (self picture Y component). Updated at frame end.*/
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_SP_Y_OFFS_CNT_START
+#define MRV_MI_SP_Y_OFFS_CNT_START_MASK 0x1FFFFFF8U
+#define MRV_MI_SP_Y_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_sp_y_llength: Line length of self picture Y component (0x0000004c)*/
+/*! Slice: sp_y_llength:*/
+/*! Line length of self picture Y component or RGB picture in pixel, also known as line stride.*/
+/* If no line stride is used, line length must match image width.*/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8, for all other component modes a multiple of 4 and for RGB 565 a multiple of 2. There are no restrictions for RGB 888/666.*/
+/* In planar mode the line length of the Cb and Cr component is assumed according to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4. In semi planar 4:2:x mode the line length of the Cb and Cr component is assumed the same size.*/
+/* Note: Line length always refers to the line length of the output image. This is particularly important when rotating.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_Y_LLENGTH
+#define MRV_MI_SP_Y_LLENGTH_MASK 0x00007FFFU
+#define MRV_MI_SP_Y_LLENGTH_SHIFT 0U
+/*! Register: mi_sp_cb_base_ad_init: Base address for self picture Cb component ring buffer (0x00000050)*/
+/*! Slice: sp_cb_base_ad_init:*/
+/*! Base address of self picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CB_BASE_AD_INIT
+#define MRV_MI_SP_CB_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CB_BASE_AD_INIT_SHIFT 3U
+/*! Register: mi_sp_cb_size_init: Size of self picture Cb component ring buffer (0x00000054)*/
+/*! Slice: sp_cb_size_init:*/
+/*! Size of self picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CB_SIZE_INIT
+#define MRV_MI_SP_CB_SIZE_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CB_SIZE_INIT_SHIFT 3U
+/*! Register: mi_sp_cb_offs_cnt_init: Offset counter init value for self picture Cb component ring buffer (0x00000058)*/
+/*! Slice: sp_cb_offs_cnt_init:*/
+/*! Offset counter init value of self picture Cb component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CB_OFFS_CNT_INIT
+#define MRV_MI_SP_CB_OFFS_CNT_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CB_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_sp_cb_offs_cnt_start: Offset counter start value for self picture Cb component ring buffer (0x0000005c)*/
+/*! Slice: sp_cb_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (self picture Cb component). Updated at frame end.*/
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_SP_CB_OFFS_CNT_START
+#define MRV_MI_SP_CB_OFFS_CNT_START_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CB_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_sp_cr_base_ad_init: Base address for self picture Cr component ring buffer (0x00000060)*/
+/*! Slice: sp_cr_base_ad_init:*/
+/*! Base address of self picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CR_BASE_AD_INIT
+#define MRV_MI_SP_CR_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CR_BASE_AD_INIT_SHIFT 3U
+/*! Register: mi_sp_cr_size_init: Size of self picture Cr component ring buffer (0x00000064)*/
+/*! Slice: sp_cr_size_init:*/
+/*! Size of self picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CR_SIZE_INIT
+#define MRV_MI_SP_CR_SIZE_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CR_SIZE_INIT_SHIFT 3U
+/*! Register: mi_sp_cr_offs_cnt_init: Offset counter init value for self picture Cr component ring buffer (0x00000068)*/
+/*! Slice: sp_cr_offs_cnt_init:*/
+/*! Offset counter init value of self picture Cr component ring buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CR_OFFS_CNT_INIT
+#define MRV_MI_SP_CR_OFFS_CNT_INIT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CR_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: mi_sp_cr_offs_cnt_start: Offset counter start value for self picture Cr component ring buffer (0x0000006c)*/
+/*! Slice: sp_cr_offs_cnt_start:*/
+/*! Offset counter value which points to the start address of the previously processed picture (self picture Cr component). Updated at frame end.*/
+#define MRV_MI_SP_CR_OFFS_CNT_START
+#define MRV_MI_SP_CR_OFFS_CNT_START_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CR_OFFS_CNT_START_SHIFT 3U
+/*! Register: mi_byte_cnt: Counter value of JPEG or RAW data bytes (0x00000070)*/
+/*! Slice: byte_cnt:*/
+/*! Counter value specifies the number of JPEG or RAW data bytes of the last transmitted frame. Updated at frame end.*/
+/* A soft reset will set the byte counter to zero.*/
+#define MRV_MI_BYTE_CNT
+#define MRV_MI_BYTE_CNT_MASK 0x0FFFFFFFU
+#define MRV_MI_BYTE_CNT_SHIFT 0U
+/*! Register: mi_ctrl_shd: global control internal shadow register (0x00000074)*/
+/*! Slice: path_enable_out:*/
+/*! path_enable shadow register for module MI_OUT (former raw_enable_out, jpeg_enable_out, sp_enable_out, mp_enable_out)*/
+#define MRV_MI_PATH_ENABLE_OUT
+#define MRV_MI_PATH_ENABLE_OUT_MASK 0x000F0000U
+#define MRV_MI_PATH_ENABLE_OUT_SHIFT 16U
+/*! Slice: path_enable_in:*/
+/*! path_enable shadow register for module MI_IN (former raw_enable_in, jpeg_enable_in, sp_enable_in, mp_enable_in)*/
+#define MRV_MI_PATH_ENABLE_IN
+#define MRV_MI_PATH_ENABLE_IN_MASK 0x0000000FU
+#define MRV_MI_PATH_ENABLE_IN_SHIFT 0U
+/*! Register: mi_mp_y_base_ad_shd: Base address shadow register for main picture Y component, JPEG or raw data ring buffer (0x00000078)*/
+/*! Slice: mp_y_base_ad:*/
+/*! Base address of main picture Y component ring buffer, JPEG ring buffer or raw data ring buffer.*/
+#define MRV_MI_MP_Y_BASE_AD
+#define MRV_MI_MP_Y_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_Y_BASE_AD_SHIFT 3U
+/*! Register: mi_mp_y_size_shd: Size shadow register of main picture Y component, JPEG or raw data (0x0000007c)*/
+/*! Slice: mp_y_size:*/
+/*! Size of main picture Y component ring buffer, JPEG ring buffer or raw data ring buffer.*/
+#define MRV_MI_MP_Y_SIZE
+#define MRV_MI_MP_Y_SIZE_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_SIZE_SHIFT 3U
+/*! Register: mi_mp_y_offs_cnt_shd: Current offset counter of main picture Y component, JPEG or raw data ring buffer (0x00000080)*/
+/*! Slice: mp_y_offs_cnt:*/
+/*! Current offset counter of main picture Y component, JPEG or raw data ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_MP_Y_OFFS_CNT
+#define MRV_MI_MP_Y_OFFS_CNT_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_OFFS_CNT_SHIFT 3U
+/*! Register: mi_mp_y_irq_offs_shd: Shadow register of fill level interrupt offset value for main picture Y component, JPEG or raw data (0x00000084)*/
+/*! Slice: mp_y_irq_offs:*/
+/*! Reaching this offset value by the current offset counter for addressing main picture Y component, JPEG or raw data leads to generation of fill level interrupt fill_mp_y.*/
+#define MRV_MI_MP_Y_IRQ_OFFS
+#define MRV_MI_MP_Y_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MRV_MI_MP_Y_IRQ_OFFS_SHIFT 3U
+/*! Register: mi_mp_cb_base_ad_shd: Base address shadow register for main picture Cb component ring buffer (0x00000088)*/
+/*! Slice: mp_cb_base_ad:*/
+/*! Base address of main picture Cb component ring buffer.*/
+#define MRV_MI_MP_CB_BASE_AD
+#define MRV_MI_MP_CB_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CB_BASE_AD_SHIFT 3U
+/*! Register: mi_mp_cb_size_shd: Size shadow register of main picture Cb component ring buffer (0x0000008c)*/
+/*! Slice: mp_cb_size:*/
+/*! Size of main picture Cb component ring buffer.*/
+#define MRV_MI_MP_CB_SIZE
+#define MRV_MI_MP_CB_SIZE_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CB_SIZE_SHIFT 3U
+/*! Register: mi_mp_cb_offs_cnt_shd: Current offset counter of main picture Cb component ring buffer (0x00000090)*/
+/*! Slice: mp_cb_offs_cnt:*/
+/*! Current offset counter of main picture Cb component ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_MP_CB_OFFS_CNT
+#define MRV_MI_MP_CB_OFFS_CNT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CB_OFFS_CNT_SHIFT 3U
+/*! Register: mi_mp_cr_base_ad_shd: Base address shadow register for main picture Cr component ring buffer (0x00000094)*/
+/*! Slice: mp_cr_base_ad:*/
+/*! Base address of main picture Cr component ring buffer.*/
+#define MRV_MI_MP_CR_BASE_AD
+#define MRV_MI_MP_CR_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CR_BASE_AD_SHIFT 3U
+/*! Register: mi_mp_cr_size_shd: Size shadow register of main picture Cr component ring buffer (0x00000098)*/
+/*! Slice: mp_cr_size:*/
+/*! Size of main picture Cr component ring buffer.*/
+#define MRV_MI_MP_CR_SIZE
+#define MRV_MI_MP_CR_SIZE_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CR_SIZE_SHIFT 3U
+/*! Register: mi_mp_cr_offs_cnt_shd: Current offset counter of main picture Cr component ring buffer (0x0000009c)*/
+/*! Slice: mp_cr_offs_cnt:*/
+/*! Current offset counter of main picture Cr component ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_MP_CR_OFFS_CNT
+#define MRV_MI_MP_CR_OFFS_CNT_MASK 0x0FFFFFF8U
+#define MRV_MI_MP_CR_OFFS_CNT_SHIFT 3U
+/*! Register: mi_sp_y_base_ad_shd: Base address shadow register for self picture Y component ring buffer (0x000000a0)*/
+/*! Slice: sp_y_base_ad:*/
+/*! Base address of self picture Y component ring buffer.*/
+#define MRV_MI_SP_Y_BASE_AD
+#define MRV_MI_SP_Y_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_Y_BASE_AD_SHIFT 3U
+/*! Register: mi_sp_y_size_shd: Size shadow register of self picture Y component ring buffer (0x000000a4)*/
+/*! Slice: sp_y_size:*/
+/*! Size of self picture Y component ring buffer.*/
+#define MRV_MI_SP_Y_SIZE
+#define MRV_MI_SP_Y_SIZE_MASK 0x1FFFFFF8U
+#define MRV_MI_SP_Y_SIZE_SHIFT 3U
+/*! Register: mi_sp_y_offs_cnt_shd: Current offset counter of self picture Y component ring buffer (0x000000a8)*/
+/*! Slice: sp_y_offs_cnt:*/
+/*! Current offset counter of self picture Y component ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_SP_Y_OFFS_CNT
+#define MRV_MI_SP_Y_OFFS_CNT_MASK 0x1FFFFFF8U
+#define MRV_MI_SP_Y_OFFS_CNT_SHIFT 3U
+/*! Register: mi_sp_cb_base_ad_shd: Base address shadow register for self picture Cb component ring buffer (0x000000b0)*/
+/*! Slice: sp_cb_base_ad:*/
+/*! Base address of self picture Cb component ring buffer.*/
+#define MRV_MI_SP_CB_BASE_AD
+#define MRV_MI_SP_CB_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CB_BASE_AD_SHIFT 3U
+/*! Register: mi_sp_cb_size_shd: Size shadow register of self picture Cb component ring buffer (0x000000b4)*/
+/*! Slice: sp_cb_size:*/
+/*! Size of self picture Cb component ring buffer.*/
+#define MRV_MI_SP_CB_SIZE
+#define MRV_MI_SP_CB_SIZE_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CB_SIZE_SHIFT 3U
+/*! Register: mi_sp_cb_offs_cnt_shd: Current offset counter of self picture Cb component ring buffer (0x000000b8)*/
+/*! Slice: sp_cb_offs_cnt:*/
+/*! Current offset counter of self picture Cb component ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_SP_CB_OFFS_CNT
+#define MRV_MI_SP_CB_OFFS_CNT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CB_OFFS_CNT_SHIFT 3U
+/*! Register: mi_sp_cr_base_ad_shd: Base address shadow register for self picture Cr component ring buffer (0x000000bc)*/
+/*! Slice: sp_cr_base_ad:*/
+/*! Base address of self picture Cr component ring buffer.*/
+#define MRV_MI_SP_CR_BASE_AD
+#define MRV_MI_SP_CR_BASE_AD_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CR_BASE_AD_SHIFT 3U
+/*! Register: mi_sp_cr_size_shd: Size shadow register of self picture Cr component ring buffer (0x000000c0)*/
+/*! Slice: sp_cr_size:*/
+/*! Size of self picture Cr component ring buffer.*/
+#define MRV_MI_SP_CR_SIZE
+#define MRV_MI_SP_CR_SIZE_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CR_SIZE_SHIFT 3U
+/*! Register: mi_sp_cr_offs_cnt_shd: Current offset counter of self picture Cr component ring buffer (0x000000c4)*/
+/*! Slice: sp_cr_offs_cnt:*/
+/*! Current offset counter of self picture Cr component ring buffer for address generation */
+/* Note: Soft reset will reset the contents to reset value.*/
+#define MRV_MI_SP_CR_OFFS_CNT
+#define MRV_MI_SP_CR_OFFS_CNT_MASK 0x0FFFFFF8U
+#define MRV_MI_SP_CR_OFFS_CNT_SHIFT 3U
+/*! Register: mi_dma_y_pic_start_ad: Y component image start address (0x000000c8)*/
+/*! Slice: dma_y_pic_start_ad:*/
+/*! Image start address of the y component */
+/* Note: Must be multiple of 4 in interleaved mode.*/
+#define MRV_MI_DMA_Y_PIC_START_AD
+#define MRV_MI_DMA_Y_PIC_START_AD_MASK 0xFFFFFFFFU
+#define MRV_MI_DMA_Y_PIC_START_AD_SHIFT 0U
+/*! Register: mi_dma_y_pic_width: Y component image width (0x000000cc)*/
+/*! Slice: dma_y_pic_width:*/
+/*! Image width of the Y component in pixel.*/
+/* For YCbCr 4:2:x the image width must be a multiple of 2.*/
+/* In planar mode the image width of the Cb and Cr component is assumed according to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4. In semi planar 4:2:x mode the image width of the Cb component (which includes Cr) is assumed the same size. In interleave mode no Cb/Cr image width is used.*/
+#define MRV_MI_DMA_Y_PIC_WIDTH
+#define MRV_MI_DMA_Y_PIC_WIDTH_MASK 0x00007FFFU
+#define MRV_MI_DMA_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: mi_dma_y_llength: Y component original line length (0x000000d0)*/
+/*! Slice: dma_y_llength:*/
+/*! Line length of the Y component of the original image in memory */
+/* For an uncropped image, where lines follow each other without offset (no line stride), line length must match image width.*/
+/* For Y component the line length in 4:2:x planar mode must be a multiple of 8, for all other component modes a multiple of 4.*/
+/* In planar mode the line length of the Cb and Cr component is assumed according to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4. In semi planar 4:2:x mode the line length of the Cb component (which includes Cr) is assumed the same size. In interleave mode no Cb/Cr line length is used.*/
+#define MRV_MI_DMA_Y_LLENGTH
+#define MRV_MI_DMA_Y_LLENGTH_MASK 0x00007FFFU
+#define MRV_MI_DMA_Y_LLENGTH_SHIFT 0U
+/*! Register: mi_dma_y_pic_size: Y component image size (0x000000d4)*/
+/*! Slice: dma_y_pic_size:*/
+/*! Image size of the Y component in pixel which has to be the Y line length multiplied by the Y image height (dma_y_llength * dma_y_pic_height).*/
+/* In planar mode the image size of the Cb and Cr component is assumed according to the YCbCr format, i.e. a quarter for 4:2:0, half for 4:2:2 and the same for 4:4:4. In semi planar mode the image size of the Cb component (which includes Cr) is assumed half for 4:2:0 and the same size for 4:2:2. In interleave mode no Cb/Cr image size is used.*/
+#define MRV_MI_DMA_Y_PIC_SIZE
+#define MRV_MI_DMA_Y_PIC_SIZE_MASK 0x0FFFFFFFU
+#define MRV_MI_DMA_Y_PIC_SIZE_SHIFT 0U
+/*! Register: mi_dma_cb_pic_start_ad: Cb component image start address (0x000000d8)*/
+/*! Slice: dma_cb_pic_start_ad:*/
+/*! Image start address of the Cb component */
+/* Note: Must be multiple of 2 in semi-planar mode.*/
+#define MRV_MI_DMA_CB_PIC_START_AD
+#define MRV_MI_DMA_CB_PIC_START_AD_MASK 0xFFFFFFFFU
+#define MRV_MI_DMA_CB_PIC_START_AD_SHIFT 0U
+/*! Register: mi_dma_cr_pic_start_ad: Cr component image start address (0x000000e8)*/
+/*! Slice: dma_cr_pic_start_ad:*/
+/*! Image start address of the Cr component */
+#define MRV_MI_DMA_CR_PIC_START_AD
+#define MRV_MI_DMA_CR_PIC_START_AD_MASK 0xFFFFFFFFU
+#define MRV_MI_DMA_CR_PIC_START_AD_SHIFT 0U
+/*! Register: mi_imsc: Interrupt Mask (‘1’: interrupt active, ‘0’: interrupt masked) (0x000000f8)*/
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Slice mp_handshk_int:*/
+/*! Mask bit for mp handshake interrupt */
+#define MRV_MI_MP_HANDSHK_INT
+#define MRV_MI_MP_HANDSHK_INT_MASK 0x00001000U
+#define MRV_MI_MP_HANDSHK_INT_SHIFT 12U
+#endif
+/*! Slice: dma_ready:*/
+/*! Mask bit for dma ready interrupt */
+#define MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK 0x00000800U
+#define MRV_MI_DMA_READY_SHIFT 11U
+/*! Slice: wrap_sp_cr:*/
+/*! Mask bit for self picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK 0x00000200U
+#define MRV_MI_WRAP_SP_CR_SHIFT 9U
+/*! Slice: wrap_sp_cb:*/
+/*! Mask bit for self picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK 0x00000100U
+#define MRV_MI_WRAP_SP_CB_SHIFT 8U
+/*! Slice: wrap_sp_y:*/
+/*! Mask bit for self picture Y address wrap interrupt */
+#define MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK 0x00000080U
+#define MRV_MI_WRAP_SP_Y_SHIFT 7U
+/*! Slice: wrap_mp_cr:*/
+/*! Mask bit for main picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK 0x00000040U
+#define MRV_MI_WRAP_MP_CR_SHIFT 6U
+/*! Slice: wrap_mp_cb:*/
+/*! Mask bit for main picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK 0x00000020U
+#define MRV_MI_WRAP_MP_CB_SHIFT 5U
+/*! Slice: wrap_mp_y:*/
+/*! Mask bit for main picture Y address wrap interrupt */
+#define MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK 0x00000010U
+#define MRV_MI_WRAP_MP_Y_SHIFT 4U
+/*! Slice: fill_mp_y:*/
+/*! Mask bit for fill level interrupt of main picture Y, JPEG or raw data */
+#define MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK 0x00000008U
+#define MRV_MI_FILL_MP_Y_SHIFT 3U
+/*! Slice: mblk_line:*/
+/*! Mask bit for makroblock line interrupt of main picture (16 lines of Y, 8 lines of Cb and 8 lines of Cr are written into RAM)*/
+#define MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK 0x00000004U
+#define MRV_MI_MBLK_LINE_SHIFT 2U
+/*! Slice: sp_frame_end:*/
+/*! Mask self picture end of frame interrupt */
+#define MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK 0x00000002U
+#define MRV_MI_SP_FRAME_END_SHIFT 1U
+/*! Slice: mp_frame_end:*/
+/*! Mask main picture end of frame interrupt */
+#define MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK 0x00000001U
+#define MRV_MI_MP_FRAME_END_SHIFT 0U
+/*! Register: mi_ris: Raw Interrupt Status (0x000000fc)*/
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Slice mp_handshk_int:*/
+/*! Raw status of mp handshake interrupt */
+#define MRV_MI_MP_HANDSHK_INT
+#define MRV_MI_MP_HANDSHK_INT_MASK 0x00001000U
+#define MRV_MI_MP_HANDSHK_INT_SHIFT 12U
+#endif
+/*! Slice: dma_ready:*/
+/*! Raw status of dma ready interrupt */
+#define MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK 0x00000800U
+#define MRV_MI_DMA_READY_SHIFT 11U
+/*! Slice: wrap_sp_cr:*/
+/*! Raw status of self picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK 0x00000200U
+#define MRV_MI_WRAP_SP_CR_SHIFT 9U
+/*! Slice: wrap_sp_cb:*/
+/*! Raw status of self picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK 0x00000100U
+#define MRV_MI_WRAP_SP_CB_SHIFT 8U
+/*! Slice: wrap_sp_y:*/
+/*! Raw status of self picture Y address wrap interrupt */
+#define MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK 0x00000080U
+#define MRV_MI_WRAP_SP_Y_SHIFT 7U
+/*! Slice: wrap_mp_cr:*/
+/*! Raw status of main picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK 0x00000040U
+#define MRV_MI_WRAP_MP_CR_SHIFT 6U
+/*! Slice: wrap_mp_cb:*/
+/*! Raw status of main picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK 0x00000020U
+#define MRV_MI_WRAP_MP_CB_SHIFT 5U
+/*! Slice: wrap_mp_y:*/
+/*! Raw status of main picture Y address wrap interrupt */
+#define MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK 0x00000010U
+#define MRV_MI_WRAP_MP_Y_SHIFT 4U
+/*! Slice: fill_mp_y:*/
+/*! Raw status of fill level interrupt of main picture Y, JPEG or raw data */
+#define MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK 0x00000008U
+#define MRV_MI_FILL_MP_Y_SHIFT 3U
+/*! Slice: mblk_line:*/
+/*! Raw status of makroblock line interrupt of main picture (16 lines of Y, 8 lines of Cb and 8 lines of Cr are written into RAM, valid only for planar and semi-planar mode)*/
+#define MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK 0x00000004U
+#define MRV_MI_MBLK_LINE_SHIFT 2U
+/*! Slice: sp_frame_end:*/
+/*! Raw status of self picture end of frame interrupt */
+#define MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK 0x00000002U
+#define MRV_MI_SP_FRAME_END_SHIFT 1U
+/*! Slice: mp_frame_end:*/
+/*! Raw status of main picture end of frame interrupt */
+#define MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK 0x00000001U
+#define MRV_MI_MP_FRAME_END_SHIFT 0U
+#ifdef ISP_MI_BP
+/*! Slice: bp_frame_end:*/
+/*! Raw status of bp picture end of frame interrupt */
+#define MRV_MI_BP_FRAME_END
+#define MRV_MI_BP_FRAME_END_MASK 0x00004000U
+#define MRV_MI_BP_FRAME_END_SHIFT 14U
+/*! Slice: bp_wr_raw_aligned:*/
+#define BP_WR_RAW_ALIGNED
+#define BP_WR_RAW_ALIGNED_MASK 0x000000c0U
+#define BP_WR_RAW_ALIGNED_SHIFT 6U
+/*! Slice: bp_wr_byte_swap:*/
+#define BP_WR_BYTE_SWAP
+#define BP_WR_BYTE_SWAP_MASK 0x00007000U
+#define BP_WR_BYTE_SWAP_SHIFT 12U
+/*! Slice: bp_fill_r */
+#define MRV_MI_BP_FILL_R
+#define MRV_MI_BP_FILL_R_MASK 0x00008000U
+#define MRV_MI_BP_FILL_R_SHIFT 15U
+/*! Slice: wrap_bp_r:*/
+#define MRV_MI_BP_WRAP_R
+#define MRV_MI_BP_WRAP_R_MASK 0x00010000U
+#define MRV_MI_BP_WRAP_R_SHIFT 16U
+/*! Slice: wrap_bp_r:*/
+#define MRV_MI_BP_WRAP_R
+#define MRV_MI_BP_WRAP_R_MASK 0x00010000U
+#define MRV_MI_BP_WRAP_R_SHIFT 16U
+/*! Slice: wrap_bp_gr:*/
+#define MRV_MI_BP_WRAP_GR
+#define MRV_MI_BP_WRAP_GR_MASK 0x00020000U
+#define MRV_MI_BP_WRAP_GR_SHIFT 17U
+/*! Slice: wrap_bp_gb:*/
+#define MRV_MI_BP_WRAP_GB
+#define MRV_MI_BP_WRAP_GB_MASK 0x00040000U
+#define MRV_MI_BP_WRAP_GB_SHIFT 18U
+/*! Slice: wrap_bp_b:*/
+#define MRV_MI_BP_WRAP_B
+#define MRV_MI_BP_WRAP_B_MASK 0x00080000U
+#define MRV_MI_BP_WRAP_B_SHIFT 19U
+/*! Register: miv1_bp_r_base_ad_init (0x000015d8)*/
+/*! Slice: bp_r_base_ad_init:*/
+#define BP_R_BASE_AD_INIT
+#define BP_R_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define BP_R_BASE_AD_INIT_SHIFT 3U
+/*! Register: miv1_bp_gr_base_ad_init (0x000015dc)*/
+/*! Slice: bp_gr_base_ad_init:*/
+#define BP_GR_BASE_AD_INIT
+#define BP_GR_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define BP_GR_BASE_AD_INIT_SHIFT 3U
+/*! Register: miv1_bp_gb_base_ad_init (0x000015e0)*/
+/*! Slice: bp_gb_base_ad_init:*/
+#define BP_GB_BASE_AD_INIT
+#define BP_GB_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define BP_GB_BASE_AD_INIT_SHIFT 3U
+/*! Register: miv1_bp_b_base_ad_init (0x000015e4)*/
+/*! Slice: bp_b_base_ad_init:*/
+#define BP_B_BASE_AD_INIT
+#define BP_B_BASE_AD_INIT_MASK 0xFFFFFFF8U
+#define BP_B_BASE_AD_INIT_SHIFT 3U
+/*! Register: miv1_bp_r_offs_cnt_init (0x000015c8)*/
+/*! Slice: bp_r_offs_cnt_init:*/
+#define BP_R_OFFS_CNT_INIT
+#define BP_R_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define BP_R_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: miv1_bp_gr_offs_cnt_init (0x000015cc)*/
+/*! Slice: bp_gr_offs_cnt_init:*/
+#define BP_GR_OFFS_CNT_INIT
+#define BP_GR_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define BP_GR_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: miv1_bp_gb_offs_cnt_init (0x000015d0)*/
+/*! Slice: bp_gb_offs_cnt_init:*/
+#define BP_GB_OFFS_CNT_INIT
+#define BP_GB_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define BP_GB_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: miv1_bp_b_offs_cnt_init (0x000015d4)*/
+/*! Slice: bp_b_offs_cnt_init:*/
+#define BP_B_OFFS_CNT_INIT
+#define BP_B_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define BP_B_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: miv1_bp_wr_offs_cnt_init (0x000015A4)*/
+/*! Slice: mi_bp_wr_offs_cnt_init:*/
+#define BP_PIC_WR_OFFS_CNT_INIT
+#define BP_PIC_WR_OFFS_CNT_INIT_MASK 0x1FFFFFF8U
+#define BP_PIC_WR_OFFS_CNT_INIT_SHIFT 3U
+/*! Register: miv1_bp_wr_irq_offs_init (0x000015AC)*/
+/*! Slice: mi_bp_wr_irq_offs_init:*/
+#define BP_PIC_IRQ_OFFS_INIT
+#define BP_PIC_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define BP_PIC_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv1_bp_wr_size_init (0x000015B4)*/
+/*! Slice: mi_bp_wr_size_init:*/
+#define BP_PIC_WR_SIZE_INIT
+#define BP_PIC_WR_SIZE_INIT_MASK 0x1FFFFFF8U
+#define BP_PIC_WR_SIZE_INIT_SHIFT 3U
+/*! Register: miv1_bp_pic_width (0x000015bc)*/
+/*! Slice: bp_pic_width:*/
+#define BP_PIC_WIDTH
+#define BP_PIC_WIDTH_MASK 0x4FFFU
+#define BP_PIC_WIDTH_SHIFT 0U
+/*! Register: miv1_bp_pic_height (0x000015c0)*/
+/*! Slice: bp_pic_height:*/
+#define BP_PIC_HEIGHT
+#define BP_PIC_HEIGHT_MASK 0x4FFFU
+#define BP_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv1_bp_pic_size (0x000015c4)*/
+/*! Slice: bp_pic_size:*/
+#define BP_PIC_SIZE
+#define BP_PIC_SIZE_MASK 0x1FFFFFFU
+#define BP_PIC_SIZE_SHIFT 0U
+#endif
+/*! Register: mi_mis: Masked Interrupt Status (0x00000100)*/
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Slice mp_handshk_int:*/
+/*! Masked status for mp handshake interrupt */
+#define MRV_MI_MP_HANDSHK_INT
+#define MRV_MI_MP_HANDSHK_INT_MASK 0x00001000U
+#define MRV_MI_MP_HANDSHK_INT_SHIFT 12U
+#endif
+/*! Slice: dma_ready:*/
+/*! Masked status of dma ready interrupt */
+#define MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK 0x00000800U
+#define MRV_MI_DMA_READY_SHIFT 11U
+/*! Slice: wrap_sp_cr:*/
+/*! Masked status of self picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK 0x00000200U
+#define MRV_MI_WRAP_SP_CR_SHIFT 9U
+/*! Slice: wrap_sp_cb:*/
+/*! Masked status of self picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK 0x00000100U
+#define MRV_MI_WRAP_SP_CB_SHIFT 8U
+/*! Slice: wrap_sp_y:*/
+/*! Masked status of self picture Y address wrap interrupt */
+#define MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK 0x00000080U
+#define MRV_MI_WRAP_SP_Y_SHIFT 7U
+/*! Slice: wrap_mp_cr:*/
+/*! Masked status of main picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK 0x00000040U
+#define MRV_MI_WRAP_MP_CR_SHIFT 6U
+/*! Slice: wrap_mp_cb:*/
+/*! Masked status of main picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK 0x00000020U
+#define MRV_MI_WRAP_MP_CB_SHIFT 5U
+/*! Slice: wrap_mp_y:*/
+/*! Masked status of main picture Y address wrap interrupt */
+#define MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK 0x00000010U
+#define MRV_MI_WRAP_MP_Y_SHIFT 4U
+/*! Slice: fill_mp_y:*/
+/*! Masked status of fill level interrupt of main picture Y, JPEG or raw data */
+#define MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK 0x00000008U
+#define MRV_MI_FILL_MP_Y_SHIFT 3U
+/*! Slice: mblk_line:*/
+/*! Masked status of makroblock line interrupt of main picture (16 lines of Y, 8 lines of Cb and 8 lines of Cr are written into RAM, valid only for planar and semi-planar mode)*/
+#define MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK 0x00000004U
+#define MRV_MI_MBLK_LINE_SHIFT 2U
+/*! Slice: sp_frame_end:*/
+/*! Masked status of self picture end of frame interrupt */
+#define MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK 0x00000002U
+#define MRV_MI_SP_FRAME_END_SHIFT 1U
+/*! Slice: mp_frame_end:*/
+/*! Masked status of main picture end of frame interrupt */
+#define MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK 0x00000001U
+#define MRV_MI_MP_FRAME_END_SHIFT 0U
+/*! Register: mi_icr: Interrupt Clear Register (0x00000104)*/
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Slice mp_handshk_int:*/
+/*! clear mp handshake interrupt */
+#define MRV_MI_MP_HANDSHK_INT
+#define MRV_MI_MP_HANDSHK_INT_MASK 0x00001000U
+#define MRV_MI_MP_HANDSHK_INT_SHIFT 12U
+#endif
+/*! Slice: dma_ready:*/
+/*! Clear dma ready interrupt */
+#define MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK 0x00000800U
+#define MRV_MI_DMA_READY_SHIFT 11U
+/*! Slice: wrap_sp_cr:*/
+/*! Clear self picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK 0x00000200U
+#define MRV_MI_WRAP_SP_CR_SHIFT 9U
+/*! Slice: wrap_sp_cb:*/
+/*! Clear self picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK 0x00000100U
+#define MRV_MI_WRAP_SP_CB_SHIFT 8U
+/*! Slice: wrap_sp_y:*/
+/*! Clear self picture Y address wrap interrupt */
+#define MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK 0x00000080U
+#define MRV_MI_WRAP_SP_Y_SHIFT 7U
+/*! Slice: wrap_mp_cr:*/
+/*! Clear main picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK 0x00000040U
+#define MRV_MI_WRAP_MP_CR_SHIFT 6U
+/*! Slice: wrap_mp_cb:*/
+/*! Clear main picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK 0x00000020U
+#define MRV_MI_WRAP_MP_CB_SHIFT 5U
+/*! Slice: wrap_mp_y:*/
+/*! Clear main picture Y address wrap interrupt */
+#define MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK 0x00000010U
+#define MRV_MI_WRAP_MP_Y_SHIFT 4U
+/*! Slice: fill_mp_y:*/
+/*! Clear fill level interrupt */
+#define MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK 0x00000008U
+#define MRV_MI_FILL_MP_Y_SHIFT 3U
+/*! Slice: mblk_line:*/
+/*! Clear makroblock line interrupt */
+#define MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK 0x00000004U
+#define MRV_MI_MBLK_LINE_SHIFT 2U
+/*! Slice: sp_frame_end:*/
+/*! Clear self picture end of frame interrupt */
+#define MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK 0x00000002U
+#define MRV_MI_SP_FRAME_END_SHIFT 1U
+/*! Slice: mp_frame_end:*/
+/*! Clear main picture end of frame interrupt */
+#define MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK 0x00000001U
+#define MRV_MI_MP_FRAME_END_SHIFT 0U
+/*! Register: mi_isr: Interrupt Set Register (0x00000108)*/
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Slice mp_handshk_int:*/
+/*! Set mp handshake interrupt */
+#define MRV_MI_MP_HANDSHK_INT
+#define MRV_MI_MP_HANDSHK_INT_MASK 0x00001000U
+#define MRV_MI_MP_HANDSHK_INT_SHIFT 12U
+#endif
+/*! Slice: dma_ready:*/
+/*! Set dma ready interrupt */
+#define MRV_MI_DMA_READY
+#define MRV_MI_DMA_READY_MASK 0x00000800U
+#define MRV_MI_DMA_READY_SHIFT 11U
+/*! Slice: wrap_sp_cr:*/
+/*! Set self picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_SP_CR
+#define MRV_MI_WRAP_SP_CR_MASK 0x00000200U
+#define MRV_MI_WRAP_SP_CR_SHIFT 9U
+/*! Slice: wrap_sp_cb:*/
+/*! Set self picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_SP_CB
+#define MRV_MI_WRAP_SP_CB_MASK 0x00000100U
+#define MRV_MI_WRAP_SP_CB_SHIFT 8U
+/*! Slice: wrap_sp_y:*/
+/*! Set self picture Y address wrap interrupt */
+#define MRV_MI_WRAP_SP_Y
+#define MRV_MI_WRAP_SP_Y_MASK 0x00000080U
+#define MRV_MI_WRAP_SP_Y_SHIFT 7U
+/*! Slice: wrap_mp_cr:*/
+/*! Set main picture Cr address wrap interrupt */
+#define MRV_MI_WRAP_MP_CR
+#define MRV_MI_WRAP_MP_CR_MASK 0x00000040U
+#define MRV_MI_WRAP_MP_CR_SHIFT 6U
+/*! Slice: wrap_mp_cb:*/
+/*! Set main picture Cb address wrap interrupt */
+#define MRV_MI_WRAP_MP_CB
+#define MRV_MI_WRAP_MP_CB_MASK 0x00000020U
+#define MRV_MI_WRAP_MP_CB_SHIFT 5U
+/*! Slice: wrap_mp_y:*/
+/*! Set main picture Y address wrap interrupt */
+#define MRV_MI_WRAP_MP_Y
+#define MRV_MI_WRAP_MP_Y_MASK 0x00000010U
+#define MRV_MI_WRAP_MP_Y_SHIFT 4U
+/*! Slice: fill_mp_y:*/
+/*! Set fill level interrupt */
+#define MRV_MI_FILL_MP_Y
+#define MRV_MI_FILL_MP_Y_MASK 0x00000008U
+#define MRV_MI_FILL_MP_Y_SHIFT 3U
+/*! Slice: mblk_line:*/
+/*! Set makroblock line interrupt */
+#define MRV_MI_MBLK_LINE
+#define MRV_MI_MBLK_LINE_MASK 0x00000004U
+#define MRV_MI_MBLK_LINE_SHIFT 2U
+/*! Slice: sp_frame_end:*/
+/*! Set self picture end of frame interrupt */
+#define MRV_MI_SP_FRAME_END
+#define MRV_MI_SP_FRAME_END_MASK 0x00000002U
+#define MRV_MI_SP_FRAME_END_SHIFT 1U
+/*! Slice: mp_frame_end:*/
+/*! Set main picture end of frame interrupt */
+#define MRV_MI_MP_FRAME_END
+#define MRV_MI_MP_FRAME_END_MASK 0x00000001U
+#define MRV_MI_MP_FRAME_END_SHIFT 0U
+/*! Register: mi_status: MI Status Register (0x0000010c)*/
+/*! Slice: sp_cr_fifo_full:*/
+/*! FIFO full flag of Cr FIFO in self path asserted since last clear */
+#define MRV_MI_SP_CR_FIFO_FULL
+#define MRV_MI_SP_CR_FIFO_FULL_MASK 0x00000040U
+#define MRV_MI_SP_CR_FIFO_FULL_SHIFT 6U
+/*! Slice: sp_cb_fifo_full:*/
+/*! FIFO full flag of Cb FIFO in self path asserted since last clear */
+#define MRV_MI_SP_CB_FIFO_FULL
+#define MRV_MI_SP_CB_FIFO_FULL_MASK 0x00000020U
+#define MRV_MI_SP_CB_FIFO_FULL_SHIFT 5U
+/*! Slice: sp_y_fifo_full:*/
+/*! FIFO full flag of Y FIFO in self path asserted since last clear */
+#define MRV_MI_SP_Y_FIFO_FULL
+#define MRV_MI_SP_Y_FIFO_FULL_MASK 0x00000010U
+#define MRV_MI_SP_Y_FIFO_FULL_SHIFT 4U
+/*! Slice: mp_cr_fifo_full:*/
+/*! FIFO full flag of Cr FIFO in main path asserted since last clear */
+#define MRV_MI_MP_CR_FIFO_FULL
+#define MRV_MI_MP_CR_FIFO_FULL_MASK 0x00000004U
+#define MRV_MI_MP_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: mp_cb_fifo_full:*/
+/*! FIFO full flag of Cb FIFO in main path asserted since last clear */
+#define MRV_MI_MP_CB_FIFO_FULL
+#define MRV_MI_MP_CB_FIFO_FULL_MASK 0x00000002U
+#define MRV_MI_MP_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: mp_y_fifo_full:*/
+/*! FIFO full flag of Y FIFO in main path asserted since last clear */
+#define MRV_MI_MP_Y_FIFO_FULL
+#define MRV_MI_MP_Y_FIFO_FULL_MASK 0x00000001U
+#define MRV_MI_MP_Y_FIFO_FULL_SHIFT 0U
+/*! Register: mi_status_clr: MI Status Clear Register (0x00000110)*/
+/*! Slice: sp_cr_fifo_full:*/
+/*! Clear status of Cr FIFO full flag in self path */
+#define MRV_MI_SP_CR_FIFO_FULL
+#define MRV_MI_SP_CR_FIFO_FULL_MASK 0x00000040U
+#define MRV_MI_SP_CR_FIFO_FULL_SHIFT 6U
+/*! Slice: sp_cb_fifo_full:*/
+/*! Clear status of Cb FIFO full flag in self path */
+#define MRV_MI_SP_CB_FIFO_FULL
+#define MRV_MI_SP_CB_FIFO_FULL_MASK 0x00000020U
+#define MRV_MI_SP_CB_FIFO_FULL_SHIFT 5U
+/*! Slice: sp_y_fifo_full:*/
+/*! Clear status of Y FIFO full flag in self path */
+#define MRV_MI_SP_Y_FIFO_FULL
+#define MRV_MI_SP_Y_FIFO_FULL_MASK 0x00000010U
+#define MRV_MI_SP_Y_FIFO_FULL_SHIFT 4U
+/*! Slice: mp_cr_fifo_full:*/
+/*! Clear status of Cr FIFO full flag in main path */
+#define MRV_MI_MP_CR_FIFO_FULL
+#define MRV_MI_MP_CR_FIFO_FULL_MASK 0x00000004U
+#define MRV_MI_MP_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: mp_cb_fifo_full:*/
+/*! Clear status of Cb FIFO full flag in main path */
+#define MRV_MI_MP_CB_FIFO_FULL
+#define MRV_MI_MP_CB_FIFO_FULL_MASK 0x00000002U
+#define MRV_MI_MP_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: mp_y_fifo_full:*/
+/*! Clear status of Y FIFO full flag in main path */
+#define MRV_MI_MP_Y_FIFO_FULL
+#define MRV_MI_MP_Y_FIFO_FULL_MASK 0x00000001U
+#define MRV_MI_MP_Y_FIFO_FULL_SHIFT 0U
+/*! Register: mi_sp_y_pic_width: Y component image width (0x00000114)*/
+/*! Slice: sp_y_pic_width:*/
+/*! Image width of the self picture Y component or RGB picture in pixel.*/
+/* For YCbCr 4:2:x and RGB 565 the image width must be a multiple of 2. If no line stride is used but flipping required, the image width must be a multiple of 8 for 4:2:x planar or 4 for 4:4:4 planar/4:2:x semi planar. There are no restrictions for RGB 888/666.*/
+/* In planar mode the image width of the Cb and Cr component is assumed according to the YCbCr format, i.e. half for 4:2:x and the same size for 4:4:4. In semi planar 4:2:x mode the image width of the Cb component (which includes Cr) is assumed the same size. In interleave mode no Cb/Cr image width is used.*/
+/* Note: Image width always refers to the picture width of the output image. This is particularly important when rotating.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_Y_PIC_WIDTH
+#define MRV_MI_SP_Y_PIC_WIDTH_MASK 0x00007FFFU
+#define MRV_MI_SP_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: mi_sp_y_pic_height: Y component image height (0x00000118)*/
+/*! Slice: sp_y_pic_height:*/
+/*! Image height of the y component or RGB picture in pixel.*/
+/* In planar and semi planar mode the image width of the cb and cr component is assumed according to the YCbCr format, i.e. half for 4:2:0 and the same for 4:2:2 and 4:4:4.*/
+/* Note: Image height always refers to the picture height of the output image. This is particularly important when rotating.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_Y_PIC_HEIGHT
+#define MRV_MI_SP_Y_PIC_HEIGHT_MASK 0x00007FFFU
+#define MRV_MI_SP_Y_PIC_HEIGHT_SHIFT 0U
+/*! Register: mi_sp_y_pic_size: Y component image size (0x0000011c)*/
+/*! Slice: sp_y_pic_size:*/
+/*! Image size of the Y component or RGB picture in pixel which has to be the Y line length multiplied by the Y image height (sp_y_llength * sp_y_pic_height).*/
+/* In planar mode the image size of the Cb and Cr component is assumed according to the YCbCr format, i.e. a quarter for 4:2:0, half for 4:2:2 and the same for 4:4:4. In semi planar mode the image size of the Cb and Cr component is assumed half for 4:2:0 and the same size for 4:2:2.*/
+/* Note: Programmed value becomes effective immediately. So write to the register only if no picture data is sent to the self path.*/
+#define MRV_MI_SP_Y_PIC_SIZE
+#define MRV_MI_SP_Y_PIC_SIZE_MASK 0x01FFFFFFU
+#define MRV_MI_SP_Y_PIC_SIZE_SHIFT 0U
+/*! Register: mi_dma_ctrl: DMA control register (0x00000120)*/
+/*! Slice: dma_rgb_format:*/
+/*! Selects RGB Bayer data of read DMA picture */
+/* 00: no DMA RGB Bayer data */
+/* 01: 8 bit RGB Bayer data */
+/* 10: 16 bit RGB Bayer data (12 bit used)*/
+/* bytes are organized MSB first and 4 lower bits of LSB remain unused:*/
+/* byte_even -> bayer[11:4], byte_odd[7:4] -> bayer[3:0]*/
+/* 11: reserved.*/
+#define MRV_MI_DMA_RGB_FORMAT
+#define MRV_MI_DMA_RGB_FORMAT_MASK 0x00003000U
+#define MRV_MI_DMA_RGB_FORMAT_SHIFT 12U
+/*! Slice: dma_frame_end_disable:*/
+/*! Suppresses v_end so that no frame end can be detected by following instances. Note: The dma_ready interrupt is raised as usual, but the dma_frame_end interrupt will not be generated until v_end has been enabled again.*/
+#define MRV_MI_DMA_FRAME_END_DISABLE
+#define MRV_MI_DMA_FRAME_END_DISABLE_MASK 0x00000400U
+#define MRV_MI_DMA_FRAME_END_DISABLE_SHIFT 10U
+/*! Slice: dma_continuous_en:*/
+/*! Enables continuous mode. If set the same frame is read back over and over. A start pulse on dma_start is needed only for the first time. To stop continuous mode reset this bit (takes effect after the next frame end) or execute a soft reset. This bit is intended to be used in conjunction with the Superimpose feature.*/
+#define MRV_MI_DMA_CONTINUOUS_EN
+#define MRV_MI_DMA_CONTINUOUS_EN_MASK 0x00000200U
+#define MRV_MI_DMA_CONTINUOUS_EN_SHIFT 9U
+/*! Slice: dma_byte_swap:*/
+/*! Enables change of DMA byte order of the 32 bit input word at read port */
+/* 1: byte order is mirrored but the bit order within one byte doesn’t change */
+/* 0: no byte mirroring */
+#define MRV_MI_DMA_BYTE_SWAP
+#define MRV_MI_DMA_BYTE_SWAP_MASK 0x00000100U
+#define MRV_MI_DMA_BYTE_SWAP_SHIFT 8U
+/*! Slice: dma_inout_format:*/
+/*! Selects input/output format of DMA picture.*/
+/* 11: YCbCr  4:4:4 */
+/* 10: YCbCr  4:2:2 */
+/* 01: YCbCr  4:2:0 */
+/* 00: YCbCr  4:0:0 */
+#define MRV_MI_DMA_INOUT_FORMAT
+#define MRV_MI_DMA_INOUT_FORMAT_MASK 0x000000C0U
+#define MRV_MI_DMA_INOUT_FORMAT_SHIFT 6U
+/*! Slice: dma_read_format:*/
+/*! Defines how YCbCr picture data is read from memory.*/
+/* 00: planar */
+/* 01: semi planar, for YCbCr 4:2:x */
+/* 10: interleaved (combined), for YCbCr 4:2:2 and RGB only */
+/* 11: reserved */
+#define MRV_MI_DMA_READ_FORMAT
+#define MRV_MI_DMA_READ_FORMAT_MASK 0x00000030U
+#define MRV_MI_DMA_READ_FORMAT_SHIFT 4U
+/*! Slice: dma_burst_len_chrom:*/
+/*! Burst length for Cb or Cr data affecting DMA read port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+#define MRV_MI_DMA_BURST_LEN_CHROM
+#define MRV_MI_DMA_BURST_LEN_CHROM_MASK 0x0000000CU
+#define MRV_MI_DMA_BURST_LEN_CHROM_SHIFT 2U
+/*! Slice: dma_burst_len_lum:*/
+/*! Burst length for Y data affecting DMA read port.*/
+/* 00: 4-beat bursts */
+/* 01: 8-beat bursts */
+/* 10: 16-beat bursts */
+/* 11: reserved */
+/* Ignored if 8- or 16-beat bursts are not supported.*/
+#define MRV_MI_DMA_BURST_LEN_LUM
+#define MRV_MI_DMA_BURST_LEN_LUM_MASK 0x00000003U
+#define MRV_MI_DMA_BURST_LEN_LUM_SHIFT 0U
+/*! Register: mi_dma_start: DMA start register (0x00000124)*/
+/*! Slice: dma_start:*/
+/*! Enables DMA access. Additionally main or self path has to be enabled separately.*/
+#define MRV_MI_DMA_START
+#define MRV_MI_DMA_START_MASK 0x00000001U
+#define MRV_MI_DMA_START_SHIFT 0U
+/*! Register: mi_dma_status: DMA status register (0x00000128)*/
+/*! Slice: dma_active:*/
+/*! If set DMA access is active.*/
+#define MRV_MI_DMA_ACTIVE
+#define MRV_MI_DMA_ACTIVE_MASK 0x00000001U
+#define MRV_MI_DMA_ACTIVE_SHIFT 0U
+/*! Register: mi_pixel_cnt: Counter value for defect pixel list (0x0000012c)*/
+/*! Slice: pix_cnt:*/
+/*! Counter value specifies the number of pixels of the defect pixel list generated by DPCC of the last transmitted frame. Updated at frame end.*/
+/* A soft reset will set the counter to zero.*/
+#define MRV_MI_PIX_CNT
+#define MRV_MI_PIX_CNT_MASK 0x0FFFFFFFU
+#define MRV_MI_PIX_CNT_SHIFT 0U
+/*! Register: mi_mp_y_base_ad_init2: Base address 2 (ping pong) for main picture Y component, JPEG or raw data (0x00000130)*/
+/*! Slice: mp_y_base_ad_init2:*/
+/*! 2nd ping pong base address of main picture Y component buffer, JPEG buffer or raw data buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_MP_Y_BASE_AD_INIT2
+#define MRV_MI_MP_Y_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_Y_BASE_AD_INIT2_SHIFT 3U
+/*! Register: mi_mp_cb_base_ad_init2: Base address 2 (pingpong) for main picture Cb component (0x00000134)*/
+/*! Slice: mp_cb_base_ad_init2:*/
+/*! 2nd ping pong base address of main picture Cb component buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_MP_CB_BASE_AD_INIT2
+#define MRV_MI_MP_CB_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CB_BASE_AD_INIT2_SHIFT 3U
+/*! Register: mi_mp_cr_base_ad_init2: Base address 2 (pingpong) for main picture Cr component ring buffer (0x00000138)*/
+/*! Slice: mp_cr_base_ad_init2:*/
+/*! 2nd ping pong Base address of main picture Cr component buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_MP_CR_BASE_AD_INIT2
+#define MRV_MI_MP_CR_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_CR_BASE_AD_INIT2_SHIFT 3U
+/*! Register: mi_sp_y_base_ad_init2: Base address 2 (ping pong) for main picture Y component, JPEG or raw data (0x0000013c)*/
+/*! Slice: sp_y_base_ad_init2:*/
+/*! 2nd ping pong base address of main picture Y component buffer, JPEG buffer or raw data buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_Y_BASE_AD_INIT2
+#define MRV_MI_SP_Y_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_Y_BASE_AD_INIT2_SHIFT 3U
+/*! Register: mi_sp_cb_base_ad_init2: Base address 2 (pingpong) for main picture Cb component (0x00000140)*/
+/*! Slice: sp_cb_base_ad_init2:*/
+/*! 2nd ping pong base address of main picture Cb component buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CB_BASE_AD_INIT2
+#define MRV_MI_SP_CB_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CB_BASE_AD_INIT2_SHIFT 3U
+/*! Register: mi_sp_cr_base_ad_init2: Base address 2 (pingpong) for main picture Cr component ring buffer (0x00000144)*/
+/*! Slice: sp_cr_base_ad_init2:*/
+/*! 2nd ping pong Base address of main picture Cr component buffer.*/
+/* Programmed value becomes effective (visible in corresponding shadow register) after a soft reset, a forced software update or an automatic config update.*/
+/* Note: Set control bit init_base_en before updating so that a forced or automatic update can take effect.*/
+#define MRV_MI_SP_CR_BASE_AD_INIT2
+#define MRV_MI_SP_CR_BASE_AD_INIT2_MASK 0xFFFFFFF8U
+#define MRV_MI_SP_CR_BASE_AD_INIT2_SHIFT 3U
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Nano handshake */
+/*! Register: isp_handshake_ctrl_0: IspNano handshake functions (0x0000014C)*/
+/*! Slice: mp_handshake_en:*/
+/*! Enable mp handshake function for MI MP */
+#define MRV_MI_MP_HANDSHK_EN
+#define MRV_MI_MP_HANDSHK_EN_MASK  0x00000001U
+#define MRV_MI_MP_HANDSHK_EN_SHIFT 0U
+/*! Slice: mp_handshk_storage_format */
+/*! Define how YCbCr picture data is stored in memory */
+/*! 00: Planar */
+/*! 01: Semi planar, for YCbCr4:2:x */
+/*! 10: Interleaved(combiled), for YCbCr 4:2:2 only or RAW format.*/
+/*! 11: not support */
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT_MASK 0x00000006U
+#define MRV_MI_MP_HANDSHK_STORAGE_FORMAT_SHIFT 1U
+/*! Slice: mp_handshk_data_format */
+/*! Defines the video format */
+/*! 00: RAW format */
+/*! 01: reserved */
+/*! 10: YUV 422 */
+/*! 11: YUV 420 */
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT_MASK 0x00000018U
+#define MRV_MI_MP_HANDSHK_DATA_FORMAT_SHIFT 3U
+/*! Slice: mp_handshk_slice_size */
+/*! Defines the slice size to generate handshake signals, minus 1 is used */
+#define MRV_MI_MP_HANDSHK_SLICE_SIZE
+#define MRV_MI_MP_HANDSHK_SLICE_SIZE_MASK 0x00001FE0U
+#define MRV_MI_MP_HANDSHK_SLICE_SIZE_SHIFT 5U
+/*! Slice: mp_handshk_slice_buf_size */
+/*! Defines the circular buffer size in number of defined slices per buffer, minus 1 is used */
+#define MRV_MI_MP_HANDSHK_SLICE_BUF_SIZE
+#define MRV_MI_MP_HANDSHK_SLICE_BUF_SIZE_MASK 0x001FE000U
+#define MRV_MI_MP_HANDSHK_SLICE_BUF_SIZE_SHIFT 13U
+/*! Slice: mp_handshk_ack_count */
+/*! Defines the acknowledage is not received in the defined cycles, it will generate handshake interrupt.*/
+#define MRV_MI_MP_HANDSHK_ACK_COUNT
+#define MRV_MI_MP_HANDSHK_ACK_COUNT_MASK 0x1FE00000U
+#define MRV_MI_MP_HANDSHK_ACK_COUNT_SHIFT 21U
+/*! Register: isp_handshake_mp_y_llength: IspNano handshake y_llength (0x00000150)*/
+/*! Slice: mp_y_llength, line length of main picture Y component or RGB picture in pixel.*/
+/*!     Also knows as line stride, if no line stride is used, the line length must match image width.*/
+#define MRV_MI_MP_HANDSHK_Y_LLENGTH
+#define MRV_MI_MP_HANDSHK_Y_LLENGTH_MASK 0x00007FFFU
+#define MRV_MI_MP_HANDSHK_Y_LLENGTH_SHIFT 0U
+/*! Register: isp_handshake_y_slice_offset: IspNano handshake y slice offset (0x00000154)*/
+/*! Slice: mp_y_slice_offset defines the offset bewteen two successive Y slice input buffers in bytes.*/
+#define MRV_MI_MP_HANDSHK_Y_SLICE_OFFSET
+#define MRV_MI_MP_HANDSHK_Y_SLICE_OFFSET_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_HANDSHK_Y_SLICE_OFFSET_SHIFT 0U
+/*! Register: isp_handshake_c_slice_offset: ISPNano handshake c slice offset (ox00000158)*/
+/*! Slice: mp_c_slice_offset defines the offset between two successive Cb/Cr slice input buffers in bytes.*/
+#define MRV_MI_MP_HANDSHK_C_SLICE_OFFSET
+#define MRV_MI_MP_HANDSHK_C_SLICE_OFFSET_MASK 0xFFFFFFF8U
+#define MRV_MI_MP_HANDSHK_C_SLICE_OFFSET_SHIFT 0U
+#endif
+#ifdef ISP_MI_ALIGN_NANO
+/*! Register mi_output_align_format for isp nano: (0x0000015C)*/
+/*! Slice mp_lsb_alignment:*/
+/*! msb/lsb align for raw 10 and raw 12 formats control */
+/*! 0: MSB aligned for RAW10 and RAW12 formats */
+/*! 1: LSB aligned for RAW10 and RAW12 formats */
+#define MRV_MI_LSB_ALIGNMENT
+#define MRV_MI_LSB_ALIGNMENT_MASK 0x00000001U
+#define MRV_MI_LSB_ALIGNMENT_SHIFT 0U
+#endif
+#ifdef ISP_MI_BYTESWAP
+/*! Slice mp_byte_swap:*/
+/*! swap bytes for ISP Nano */
+/*! bit 0 to swap bytes */
+/*! bit 1 to swap words */
+/*! bit 2 to swap dwords */
+/*! 3'b001: ABCDEFGH => BADCFEHG */
+/*! 3'b000: ABCDEFGH => ABCDEFGH */
+/*! 3'b010: ABCDEFGH => CDABGHEF */
+/*! 3'b011: ABCDEFGH => DCBAHGFE */
+/*! 3'b100: ABCDEFGH => EFGHABCD */
+/*! 3'b101: ABCDEFGH => FEHGBADC */
+/*! 3'b110: ABCDEFGH => GHEFCDAB */
+/*! 3'b111: ABCDEFGH => HGFEDCBA */
+#define MRV_MI_MP_BYTE_SWAP
+#define MRV_MI_MP_BYTE_SWAP_MASK 0x0000000EU
+#define MRV_MI_MP_BYTE_SWAP_SHIFT 1U
+#endif
+#ifdef ISP_MI_FIFO_DEPTH_NANO
+/*! Register mi_mp_output_fifo_size for isp nano: (0x00000160)*/
+/*! Slice output_fifo_depth:*/
+/*! Select output FIFO depth setting */
+/*! 00: FULL(2KBytes)*/
+/*! 01: HALF(1KBytes)*/
+/*! 10: 1/4(512Bytes)*/
+/*! 11: 1/8(256Bytes)*/
+#define MRV_MI_OUTOUT_FIFO_DEPTH
+#define MRV_MI_OUTOUT_FIFO_DEPTH_MASK 0x00000003U
+#define MRV_MI_OUTOUT_FIFO_DEPTH_SHIFT 0U
+#endif
+#ifdef ISP_MI_HANDSHAKE_NANO
+/*! Register mi_mp_y_pic_width: IspNano handshake mp_y_pic_width (0x00000164)*/
+/*! Slice mi_mp_y_pic_width:*/
+/*! Image width of the main picture Y component in pixel.*/
+#define MRV_MI_MP_HANDSHK_Y_PIC_WIDTH
+#define MRV_MI_MP_HANDSHK_Y_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MRV_MI_MP_HANDSHK_Y_PIC_WIDTH_SHIFT 0U
+/*! Register mi_mp_y_pic_height: IspNano handshake mp_y_pic_height (0x00000168)*/
+/*! Slice mi_mp_y_pic_height:*/
+/*! Image height of the main picture Y component in pixel.*/
+#define MRV_MI_MP_HANDSHK_Y_PIC_HEIGHT
+#define MRV_MI_MP_HANDSHK_Y_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MRV_MI_MP_HANDSHK_Y_PIC_HEIGHT_SHIFT 0U
+/*! Register mi_mp_y_pic_size: IspNano handshake mp_y_pic_size (0x0000016C)*/
+/*! Slice mi_mp_y_pic_size */
+/*! Image size of the Y component in pixel which has to be the Y line length multipled by */
+/*! the Y image height(mp_y_llength*mp_y_pic_height)*/
+#define MRV_MI_MP_HANDSHK_Y_PIC_ZISE
+#define MRV_MI_MP_HANDSHK_Y_PIC_ZISE_MASK 0xFFFFFFFFU
+#define MRV_MI_MP_HANDSHK_Y_PIC_ZISE_SHIFT 0U
+#endif
+/*! Register: jpe_gen_header: command to start stream header generation (0x00000000)*/
+/*! Slice: gen_header:*/
+/*! "1" = Start command to generate stream header;*/
+/* auto reset to zero after one clock cycle */
+#define MRV_JPE_GEN_HEADER
+#define MRV_JPE_GEN_HEADER_MASK 0x00000001U
+#define MRV_JPE_GEN_HEADER_SHIFT 0U
+/*! Register: jpe_encode: Start command to start JFIF stream encoding (0x00000004)*/
+/*! Slice: encode:*/
+/*! "1" = Start command to start JFIF stream encoding;*/
+/* auto reset to zero after one clock cycle.*/
+/* This bit is write-only: reading result is always zero!*/
+#define MRV_JPE_ENCODE
+#define MRV_JPE_ENCODE_MASK 0x00000001U
+#define MRV_JPE_ENCODE_SHIFT 0U
+/*! Register: jpe_init: Automatic configuration update (INIT) (0x00000008)*/
+/*! Slice: JP_INIT:*/
+/*! "1" = Immediate start of JPEG encoder.*/
+/* This bit has to be set after "Encode" to start the JPEG encoder. The "Encode" command becomes active either with JP_INIT or with the input signal "CFG_UPD".*/
+/* auto reset to zero after one clock cycle !!!*/
+#define MRV_JPE_JP_INIT
+#define MRV_JPE_JP_INIT_MASK 0x00000001U
+#define MRV_JPE_JP_INIT_SHIFT 0U
+/*! Register: jpe_y_scale_en: Y value scaling control register (0x0000000c)*/
+/*! Slice: y_scale_en:*/
+/*! Y scale flag */
+/* 1: scaling Y input from[16..235] to[0..255]*/
+/* 0: no Y input scaling */
+#define MRV_JPE_Y_SCALE_EN
+#define MRV_JPE_Y_SCALE_EN_MASK 0x00000001U
+#define MRV_JPE_Y_SCALE_EN_SHIFT 0U
+/*! Register: jpe_cbcr_scale_en: Cb/Cr value scaling control register (0x00000010)*/
+/*! Slice: cbcr_scale_en:*/
+/*! Cb/Cr scale flag */
+/* 1: scaling Cb/Cr input from[16..240] to[0..255]*/
+/* 0: no Cb/Cr input scaling */
+#define MRV_JPE_CBCR_SCALE_EN
+#define MRV_JPE_CBCR_SCALE_EN_MASK 0x00000001U
+#define MRV_JPE_CBCR_SCALE_EN_SHIFT 0U
+/*! Register: jpe_table_flush: header generation debug register (0x00000014)*/
+/*! Slice: table_flush:*/
+/*! header generation debug control flag */
+/* (controls transmission of last header bytes if the 64 bit output buffer is not completely filled)*/
+/* 1: immediately transmit last header bytes */
+/* 0: wait for encoded image data to fill output buffer */
+#define MRV_JPE_TABLE_FLUSH
+#define MRV_JPE_TABLE_FLUSH_MASK 0x00000001U
+#define MRV_JPE_TABLE_FLUSH_SHIFT 0U
+/*! Register: jpe_enc_hsize: JPEG codec horizontal image size for encoding (0x00000018)*/
+/*! Slice: enc_hsize:*/
+/*! JPEG codec horizontal image size for R2B and SGEN blocks.*/
+/* Note: If the active camerIC version does not support 64 megapixel only those bits will be used which are required and the respective most significant bits will be ignored. Example: 5MP camerIC uses only bits[12:0] and ignores bits[14:13].*/
+#define MRV_JPE_ENC_HSIZE
+#define MRV_JPE_ENC_HSIZE_MASK 0x00007FFFU
+#define MRV_JPE_ENC_HSIZE_SHIFT 0U
+/*! Register: jpe_enc_vsize: JPEG codec vertical image size for encoding (0x0000001c)*/
+/*! Slice: enc_vsize:*/
+/*! JPEG codec vertical image size for R2B and SGEN blocks */
+#define MRV_JPE_ENC_VSIZE
+#define MRV_JPE_ENC_VSIZE_MASK 0x00003FFFU
+#define MRV_JPE_ENC_VSIZE_SHIFT 0U
+/*! Register: jpe_pic_format: JPEG picture encoding format (0x00000020)*/
+/*! Slice: enc_pic_format:*/
+/*! "0:0:1"  = 4:2:2 format */
+/* "1:x:x"  = 4:0:0 format */
+#define MRV_JPE_ENC_PIC_FORMAT
+#define MRV_JPE_ENC_PIC_FORMAT_MASK 0x00000007U
+#define MRV_JPE_ENC_PIC_FORMAT_SHIFT 0U
+/*! Register: jpe_restart_interval: restart marker insertion register (0x00000024)*/
+/*! Slice: restart_interval:*/
+/*! No of MCU in  reset interval via host */
+#define MRV_JPE_RESTART_INTERVAL
+#define MRV_JPE_RESTART_INTERVAL_MASK 0x0000FFFFU
+#define MRV_JPE_RESTART_INTERVAL_SHIFT 0U
+/*! Register: jpe_tq_y_select: Q- table selector 0, quant. table for Y component (0x00000028)*/
+/*! Slice: tq0_select:*/
+/*! "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#define MRV_JPE_TQ0_SELECT
+#define MRV_JPE_TQ0_SELECT_MASK 0x00000003U
+#define MRV_JPE_TQ0_SELECT_SHIFT 0U
+/*! Register: jpe_tq_u_select: Q- table selector 1, quant. table for U component (0x0000002c)*/
+/*! Slice: tq1_select:*/
+/*! "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#define MRV_JPE_TQ1_SELECT
+#define MRV_JPE_TQ1_SELECT_MASK 0x00000003U
+#define MRV_JPE_TQ1_SELECT_SHIFT 0U
+/*! Register: jpe_tq_v_select: Q- table selector 2, quant. table for V component (0x00000030)*/
+/*! Slice: tq2_select:*/
+/*! "00" = qtable 0 */
+/* "01" = qtable 1 */
+/* "10" = qtable 2 */
+/* "11" = qtable 3 */
+#define MRV_JPE_TQ2_SELECT
+#define MRV_JPE_TQ2_SELECT_MASK 0x00000003U
+#define MRV_JPE_TQ2_SELECT_SHIFT 0U
+/*! Register: jpe_dc_table_select: Huffman table selector for DC values (0x00000034)*/
+/*! Slice: dc_table_select_v:*/
+/*! "0" = dc table 0; color component 2 (V)*/
+/* "1" = dc table 1; color component 2 (V)*/
+#define MRV_JPE_DC_TABLE_SELECT_V
+#define MRV_JPE_DC_TABLE_SELECT_V_MASK 0x00000004U
+#define MRV_JPE_DC_TABLE_SELECT_V_SHIFT 2U
+/*! Slice: dc_table_select_u:*/
+/*! "0" = dc table 0; color component 1 (U)*/
+/* "1" = dc table 1; color component 1 (U)*/
+#define MRV_JPE_DC_TABLE_SELECT_U
+#define MRV_JPE_DC_TABLE_SELECT_U_MASK 0x00000002U
+#define MRV_JPE_DC_TABLE_SELECT_U_SHIFT 1U
+/*! Slice: dc_table_select_y:*/
+/*! "0" = dc table 0; color component 0 (Y)*/
+/* "1" = dc table 1; color component 0 (Y)*/
+#define MRV_JPE_DC_TABLE_SELECT_Y
+#define MRV_JPE_DC_TABLE_SELECT_Y_MASK 0x00000001U
+#define MRV_JPE_DC_TABLE_SELECT_Y_SHIFT 0U
+/*! Register: jpe_ac_table_select: Huffman table selector for AC values (0x00000038)*/
+/*! Slice: ac_table_select_v:*/
+/*! "0" = ac table 0; component 2 (V)*/
+/* "1" = ac table 1; component 2 (V)*/
+#define MRV_JPE_AC_TABLE_SELECT_V
+#define MRV_JPE_AC_TABLE_SELECT_V_MASK 0x00000004U
+#define MRV_JPE_AC_TABLE_SELECT_V_SHIFT 2U
+/*! Slice: ac_table_select_u:*/
+/*! "0" = ac table 0; component 1 (U)*/
+/* "1" = ac table 1; component 1 (U)*/
+#define MRV_JPE_AC_TABLE_SELECT_U
+#define MRV_JPE_AC_TABLE_SELECT_U_MASK 0x00000002U
+#define MRV_JPE_AC_TABLE_SELECT_U_SHIFT 1U
+/*! Slice: ac_table_select_y:*/
+/*! "0" = ac table 0; component 0 (Y)*/
+/* "1" = ac table 1; component 0 (Y)*/
+#define MRV_JPE_AC_TABLE_SELECT_Y
+#define MRV_JPE_AC_TABLE_SELECT_Y_MASK 0x00000001U
+#define MRV_JPE_AC_TABLE_SELECT_Y_SHIFT 0U
+/*! Register: jpe_table_data: table programming register (0x0000003c)*/
+/*! Slice: table_wdata_h:*/
+/*! Table data MSB */
+#define MRV_JPE_TABLE_WDATA_H
+#define MRV_JPE_TABLE_WDATA_H_MASK 0x0000FF00U
+#define MRV_JPE_TABLE_WDATA_H_SHIFT 8U
+/*! Slice: table_wdata_l:*/
+/*! Table data LSB */
+#define MRV_JPE_TABLE_WDATA_L
+#define MRV_JPE_TABLE_WDATA_L_MASK 0x000000FFU
+#define MRV_JPE_TABLE_WDATA_L_SHIFT 0U
+/*! Register: jpe_table_id: table programming select register (0x00000040)*/
+/*! Slice: table_id:*/
+/*! select table */
+/* "0000" : Q-table 0 */
+/* "0001" : Q-table 1 */
+/* "0010" : Q-table 2 */
+/* "0011" : Q-table 3 */
+/* "0100" : VLC DC-table 0 */
+/* "0101" : VLC AC-table 0 */
+/* "0110" : VLC DC-table 1 */
+/* "0111" : VLC AC-table 1 */
+/* "1xxx" : reserved for debug */
+#define MRV_JPE_TABLE_ID
+#define MRV_JPE_TABLE_ID_MASK 0x0000000FU
+#define MRV_JPE_TABLE_ID_SHIFT 0U
+/*! Register: jpe_tac0_len: Huffman AC table 0 length (0x00000044)*/
+/*! Slice: tac0_len:*/
+/*! Huffman table length for ac0 table */
+#define MRV_JPE_TAC0_LEN
+#define MRV_JPE_TAC0_LEN_MASK 0x000000FFU
+#define MRV_JPE_TAC0_LEN_SHIFT 0U
+/*! Register: jpe_tdc0_len: Huffman DC table 0 length (0x00000048)*/
+/*! Slice: tdc0_len:*/
+/*! Huffman table length for dc0 table */
+#define MRV_JPE_TDC0_LEN
+#define MRV_JPE_TDC0_LEN_MASK 0x000000FFU
+#define MRV_JPE_TDC0_LEN_SHIFT 0U
+/*! Register: jpe_tac1_len: Huffman AC table 1 length (0x0000004c)*/
+/*! Slice: tac1_len:*/
+/*! Huffman table length for ac1 table */
+#define MRV_JPE_TAC1_LEN
+#define MRV_JPE_TAC1_LEN_MASK 0x000000FFU
+#define MRV_JPE_TAC1_LEN_SHIFT 0U
+/*! Register: jpe_tdc1_len: Huffman DC table 1 length (0x00000050)*/
+/*! Slice: tdc1_len:*/
+/*! Huffman table length for dc1 table */
+#define MRV_JPE_TDC1_LEN
+#define MRV_JPE_TDC1_LEN_MASK 0x000000FFU
+#define MRV_JPE_TDC1_LEN_SHIFT 0U
+/*! Register: jpe_encoder_busy: encoder status flag (0x00000058)*/
+/*! Slice: codec_busy:*/
+/*! Bit 0 = "1" : JPEG codec in process */
+#define MRV_JPE_CODEC_BUSY
+#define MRV_JPE_CODEC_BUSY_MASK 0x00000001U
+#define MRV_JPE_CODEC_BUSY_SHIFT 0U
+/*! Register: jpe_header_mode: header mode definition (0x0000005c)*/
+/*! Slice: header_mode:*/
+/*! "00" = no header */
+/* "01" = reserved */
+/* "10" = JFIF 1.02 header */
+/* "11" = reserved */
+#define MRV_JPE_HEADER_MODE
+#define MRV_JPE_HEADER_MODE_MASK 0x00000003U
+#define MRV_JPE_HEADER_MODE_SHIFT 0U
+/*! Register: jpe_encode_mode: encode mode (0x00000060)*/
+/*! Slice: encode_mode:*/
+/*! Always  "1", because this is the encoder only edition */
+#define MRV_JPE_ENCODE_MODE
+#define MRV_JPE_ENCODE_MODE_MASK 0x00000001U
+#define MRV_JPE_ENCODE_MODE_SHIFT 0U
+/*! Register: jpe_debug: debug information register (0x00000064)*/
+/*! Slice: deb_bad_table_access:*/
+/*! Debug signal only (set if an access to the TABLE_DATA or to the TABLE_ID register is performed, when the JPEG_ENCODER is busy. In this case a default PVCI Acknowledge is generated. Thus the configuration bus is not blocked)*/
+#define MRV_JPE_DEB_BAD_TABLE_ACCESS
+#define MRV_JPE_DEB_BAD_TABLE_ACCESS_MASK 0x00000100U
+#define MRV_JPE_DEB_BAD_TABLE_ACCESS_SHIFT 8U
+/*! Slice: deb_vlc_table_busy:*/
+/*! Debug signal only (vlc access to huff-tables)*/
+#define MRV_JPE_DEB_VLC_TABLE_BUSY
+#define MRV_JPE_DEB_VLC_TABLE_BUSY_MASK 0x00000020U
+#define MRV_JPE_DEB_VLC_TABLE_BUSY_SHIFT 5U
+/*! Slice: deb_r2b_memory_full:*/
+/*! Debug signal only (line memory status of r2b)*/
+#define MRV_JPE_DEB_R2B_MEMORY_FULL
+#define MRV_JPE_DEB_R2B_MEMORY_FULL_MASK 0x00000010U
+#define MRV_JPE_DEB_R2B_MEMORY_FULL_SHIFT 4U
+/*! Slice: deb_vlc_encode_busy:*/
+/*! Debug signal only (vlc encode processing active)*/
+#define MRV_JPE_DEB_VLC_ENCODE_BUSY
+#define MRV_JPE_DEB_VLC_ENCODE_BUSY_MASK 0x00000008U
+#define MRV_JPE_DEB_VLC_ENCODE_BUSY_SHIFT 3U
+/*! Slice: deb_qiq_table_acc:*/
+/*! Debug signal only (QIQ table access)*/
+#define MRV_JPE_DEB_QIQ_TABLE_ACC
+#define MRV_JPE_DEB_QIQ_TABLE_ACC_MASK 0x00000004U
+#define MRV_JPE_DEB_QIQ_TABLE_ACC_SHIFT 2U
+/*! Register: jpe_error_imr: JPEG error interrupt mask register (0x00000068)*/
+/*! Slice: vlc_table_err:*/
+/*! "1" = interrupt is  activated (masked in)*/
+#define MRV_JPE_VLC_TABLE_ERR
+#define MRV_JPE_VLC_TABLE_ERR_MASK 0x00000400U
+#define MRV_JPE_VLC_TABLE_ERR_SHIFT 10U
+/*! Slice: r2b_IMG_size_err:*/
+/*! "1" = interrupt is  activated (masked in)*/
+#define MRV_JPE_R2B_IMG_SIZE_ERR
+#define MRV_JPE_R2B_IMG_SIZE_ERR_MASK 0x00000200U
+#define MRV_JPE_R2B_IMG_SIZE_ERR_SHIFT 9U
+/*! Slice: DCT_ERR:*/
+/*! "1" = interrupt is  activated (masked in)*/
+#define MRV_JPE_DCT_ERR
+#define MRV_JPE_DCT_ERR_MASK 0x00000080U
+#define MRV_JPE_DCT_ERR_SHIFT 7U
+/*! Slice: vlc_symbol_err:*/
+/*! "1" = interrupt is  activated (masked in)*/
+#define MRV_JPE_VLC_SYMBOL_ERR
+#define MRV_JPE_VLC_SYMBOL_ERR_MASK 0x00000010U
+#define MRV_JPE_VLC_SYMBOL_ERR_SHIFT 4U
+/*! Register: jpe_error_ris: JPEG error raw  interrupt status register (0x0000006c)*/
+/*! Slice: vlc_table_err:*/
+/*! "1" = illegal table detected */
+#define MRV_JPE_VLC_TABLE_ERR
+#define MRV_JPE_VLC_TABLE_ERR_MASK 0x00000400U
+#define MRV_JPE_VLC_TABLE_ERR_SHIFT 10U
+/*! Slice: r2b_IMG_size_err:*/
+/*! "1" = mismatch of predefined h_size and v_size values with calculated values (encode mode)*/
+#define MRV_JPE_R2B_IMG_SIZE_ERR
+#define MRV_JPE_R2B_IMG_SIZE_ERR_MASK 0x00000200U
+#define MRV_JPE_R2B_IMG_SIZE_ERR_SHIFT 9U
+/*! Slice: DCT_ERR:*/
+/*! "1" =  block start mismatch */
+#define MRV_JPE_DCT_ERR
+#define MRV_JPE_DCT_ERR_MASK 0x00000080U
+#define MRV_JPE_DCT_ERR_SHIFT 7U
+/*! Slice: vlc_symbol_err:*/
+/*! "1" = illegal symbol detected (encoding)*/
+#define MRV_JPE_VLC_SYMBOL_ERR
+#define MRV_JPE_VLC_SYMBOL_ERR_MASK 0x00000010U
+#define MRV_JPE_VLC_SYMBOL_ERR_SHIFT 4U
+/*! Register: jpe_error_mis: JPEG error masked interrupt status register (0x00000070)*/
+/*! Slice: vlc_table_err:*/
+/*! "1" = illegal table detected */
+#define MRV_JPE_VLC_TABLE_ERR
+#define MRV_JPE_VLC_TABLE_ERR_MASK 0x00000400U
+#define MRV_JPE_VLC_TABLE_ERR_SHIFT 10U
+/*! Slice: r2b_IMG_size_err:*/
+/*! "1" = mismatch of predefined h_size and v_size values with calculated values (encode mode)*/
+#define MRV_JPE_R2B_IMG_SIZE_ERR
+#define MRV_JPE_R2B_IMG_SIZE_ERR_MASK 0x00000200U
+#define MRV_JPE_R2B_IMG_SIZE_ERR_SHIFT 9U
+/*! Slice: DCT_ERR:*/
+/*! "1" =  block start mismatch */
+#define MRV_JPE_DCT_ERR
+#define MRV_JPE_DCT_ERR_MASK 0x00000080U
+#define MRV_JPE_DCT_ERR_SHIFT 7U
+/*! Slice: vlc_symbol_err:*/
+/*! "1" = illegal symbol detected (encoding)*/
+#define MRV_JPE_VLC_SYMBOL_ERR
+#define MRV_JPE_VLC_SYMBOL_ERR_MASK 0x00000010U
+#define MRV_JPE_VLC_SYMBOL_ERR_SHIFT 4U
+/*! Register: jpe_error_icr: JPEG error interrupt set register (0x00000074)*/
+/*! Slice: vlc_table_err:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_VLC_TABLE_ERR
+#define MRV_JPE_VLC_TABLE_ERR_MASK 0x00000400U
+#define MRV_JPE_VLC_TABLE_ERR_SHIFT 10U
+/*! Slice: r2b_IMG_size_err:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_R2B_IMG_SIZE_ERR
+#define MRV_JPE_R2B_IMG_SIZE_ERR_MASK 0x00000200U
+#define MRV_JPE_R2B_IMG_SIZE_ERR_SHIFT 9U
+/*! Slice: DCT_ERR:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_DCT_ERR
+#define MRV_JPE_DCT_ERR_MASK 0x00000080U
+#define MRV_JPE_DCT_ERR_SHIFT 7U
+/*! Slice: vlc_symbol_err:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_VLC_SYMBOL_ERR
+#define MRV_JPE_VLC_SYMBOL_ERR_MASK 0x00000010U
+#define MRV_JPE_VLC_SYMBOL_ERR_SHIFT 4U
+/*! Register: jpe_error_isr: JPEG error interrupt clear register (0x00000078)*/
+/*! Slice: vlc_table_err:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_VLC_TABLE_ERR
+#define MRV_JPE_VLC_TABLE_ERR_MASK 0x00000400U
+#define MRV_JPE_VLC_TABLE_ERR_SHIFT 10U
+/*! Slice: r2b_IMG_size_err:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_R2B_IMG_SIZE_ERR
+#define MRV_JPE_R2B_IMG_SIZE_ERR_MASK 0x00000200U
+#define MRV_JPE_R2B_IMG_SIZE_ERR_SHIFT 9U
+/*! Slice: dct_err:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_DCT_ERR
+#define MRV_JPE_DCT_ERR_MASK 0x00000080U
+#define MRV_JPE_DCT_ERR_SHIFT 7U
+/*! Slice: vlc_symbol_err:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_VLC_SYMBOL_ERR
+#define MRV_JPE_VLC_SYMBOL_ERR_MASK 0x00000010U
+#define MRV_JPE_VLC_SYMBOL_ERR_SHIFT 4U
+/*! Register: jpe_status_imr: JPEG status interrupt mask register (0x0000007c)*/
+/*! Slice: gen_header_done:*/
+/*! "1" = interrupt is activated (masked in)*/
+#define MRV_JPE_GEN_HEADER_DONE
+#define MRV_JPE_GEN_HEADER_DONE_MASK 0x00000020U
+#define MRV_JPE_GEN_HEADER_DONE_SHIFT 5U
+/*! Slice: encode_done:*/
+/*! "1" = interrupt is activated (masked in)*/
+#define MRV_JPE_ENCODE_DONE
+#define MRV_JPE_ENCODE_DONE_MASK 0x00000010U
+#define MRV_JPE_ENCODE_DONE_SHIFT 4U
+/*! Register: jpe_status_ris: JPEG status raw interrupt status register (0x00000080)*/
+/*! Slice: gen_header_done:*/
+/*! "1" = Stream header generation finished */
+#define MRV_JPE_GEN_HEADER_DONE
+#define MRV_JPE_GEN_HEADER_DONE_MASK 0x00000020U
+#define MRV_JPE_GEN_HEADER_DONE_SHIFT 5U
+/*! Slice: encode_done:*/
+/*! "1" = Encode processing finished */
+#define MRV_JPE_ENCODE_DONE
+#define MRV_JPE_ENCODE_DONE_MASK 0x00000010U
+#define MRV_JPE_ENCODE_DONE_SHIFT 4U
+/*! Register: jpe_status_mis: JPEG status masked interrupt status register (0x00000084)*/
+/*! Slice: gen_header_done:*/
+/*! "1" = Stream header generation finished */
+#define MRV_JPE_GEN_HEADER_DONE
+#define MRV_JPE_GEN_HEADER_DONE_MASK 0x00000020U
+#define MRV_JPE_GEN_HEADER_DONE_SHIFT 5U
+/*! Slice: encode_done:*/
+/*! "1" = Encode processing finished */
+#define MRV_JPE_ENCODE_DONE
+#define MRV_JPE_ENCODE_DONE_MASK 0x00000010U
+#define MRV_JPE_ENCODE_DONE_SHIFT 4U
+/*! Register: jpe_status_icr: JPEG status interrupt clear register (0x00000088)*/
+/*! Slice: gen_header_done:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_GEN_HEADER_DONE
+#define MRV_JPE_GEN_HEADER_DONE_MASK 0x00000020U
+#define MRV_JPE_GEN_HEADER_DONE_SHIFT 5U
+/*! Slice: encode_done:*/
+/*! "1" = clear status bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_ENCODE_DONE
+#define MRV_JPE_ENCODE_DONE_MASK 0x00000010U
+#define MRV_JPE_ENCODE_DONE_SHIFT 4U
+/*! Register: jpe_status_isr: JPEG status interrupt set register (0x0000008c)*/
+/*! Slice: gen_header_done:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_GEN_HEADER_DONE
+#define MRV_JPE_GEN_HEADER_DONE_MASK 0x00000020U
+#define MRV_JPE_GEN_HEADER_DONE_SHIFT 5U
+/*! Slice: encode_done:*/
+/*! "1" = set error bit, bit is reset to zero after 1 clk */
+#define MRV_JPE_ENCODE_DONE
+#define MRV_JPE_ENCODE_DONE_MASK 0x00000010U
+#define MRV_JPE_ENCODE_DONE_SHIFT 4U
+/*! Register: jpe_config: JPEG configuration register (0x00000090)*/
+/*! Slice: speedview_en:*/
+/*! 1: speed view enabled */
+/* 0: speed view disabled */
+#define MRV_JPE_SPEEDVIEW_EN
+#define MRV_JPE_SPEEDVIEW_EN_MASK 0x00000010U
+#define MRV_JPE_SPEEDVIEW_EN_SHIFT 4U
+/*! Slice: cont_mode:*/
+/*! Encoder continous mode */
+/* "00": encoder stops at frame end (corresponds to former behavior)*/
+/* "01": encoder starts automatically to encode the next frame */
+/* "10": unused */
+/* "11": encoder first generates next header and then encodes automatically the next frame */
+/* These settings are checked after encoding one frame. They are not auto-reset by hardware.*/
+#define MRV_JPE_CONT_MODE
+#define MRV_JPE_CONT_MODE_MASK 0x00000003U
+#define MRV_JPE_CONT_MODE_SHIFT 0U
+/*! Register: smia_ctrl: global control register (0x00000000)*/
+/*! Slice: DMA_CHANNEL_SEL:*/
+/*! DMA channel selector for image data output */
+#define MRV_SMIA_DMA_CHANNEL_SEL
+#define MRV_SMIA_DMA_CHANNEL_SEL_MASK 0x00000700U
+#define MRV_SMIA_DMA_CHANNEL_SEL_SHIFT 8U
+/*! Slice: SHUTDOWN_LANE:*/
+/*! Shutdown Lane Module. Content of this register is directly connected to the output signal shutdown */
+#define MRV_SMIA_SHUTDOWN_LANE
+#define MRV_SMIA_SHUTDOWN_LANE_MASK 0x00000008U
+#define MRV_SMIA_SHUTDOWN_LANE_SHIFT 3U
+/*! Slice: CFG_UPD_ENA:*/
+/*! enables generation of cfg_upd signal at frame end */
+#define MRV_SMIA_CFG_UPD_ENA
+#define MRV_SMIA_CFG_UPD_ENA_MASK 0x00000004U
+#define MRV_SMIA_CFG_UPD_ENA_SHIFT 2U
+/*! Slice: FLUSH_FIFO:*/
+/*! writing '1' resets the write- and read pointers of the embedded data fifo.*/
+#define MRV_SMIA_FLUSH_FIFO
+#define MRV_SMIA_FLUSH_FIFO_MASK 0x00000002U
+#define MRV_SMIA_FLUSH_FIFO_SHIFT 1U
+/*! Slice: OUTPUT_ENA:*/
+/*! '1': transmission to alomics output interface is enabled */
+/* '0': transmission is disabled */
+#define MRV_SMIA_OUTPUT_ENA
+#define MRV_SMIA_OUTPUT_ENA_MASK 0x00000001U
+#define MRV_SMIA_OUTPUT_ENA_SHIFT 0U
+/*! Register: smia_status: global status register (0x00000004)*/
+/*! Slice: DMA_CHANNEL:*/
+/*! DMA channel of currently received packet */
+#define MRV_SMIA_DMA_CHANNEL
+#define MRV_SMIA_DMA_CHANNEL_MASK 0x00000700U
+#define MRV_SMIA_DMA_CHANNEL_SHIFT 8U
+/*! Slice: EMB_DATA_AVAIL:*/
+/*! 1: embedded data fifo not empty */
+#define MRV_SMIA_EMB_DATA_AVAIL
+#define MRV_SMIA_EMB_DATA_AVAIL_MASK 0x00000001U
+#define MRV_SMIA_EMB_DATA_AVAIL_SHIFT 0U
+/*! Register: smia_imsc: Interrupt mask (0x00000008)*/
+/*! Slice: IMSC_FIFO_FILL_LEVEL:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_FIFO_FILL_LEVEL
+#define MRV_SMIA_IMSC_FIFO_FILL_LEVEL_MASK 0x00000020U
+#define MRV_SMIA_IMSC_FIFO_FILL_LEVEL_SHIFT 5U
+/*! Slice: IMSC_SYNC_FIFO_OVFLW:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_SYNC_FIFO_OVFLW
+#define MRV_SMIA_IMSC_SYNC_FIFO_OVFLW_MASK 0x00000010U
+#define MRV_SMIA_IMSC_SYNC_FIFO_OVFLW_SHIFT 4U
+/*! Slice: IMSC_ERR_CS:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_ERR_CS
+#define MRV_SMIA_IMSC_ERR_CS_MASK 0x00000008U
+#define MRV_SMIA_IMSC_ERR_CS_SHIFT 3U
+/*! Slice: IMSC_ERR_PROTOCOL:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_ERR_PROTOCOL
+#define MRV_SMIA_IMSC_ERR_PROTOCOL_MASK 0x00000004U
+#define MRV_SMIA_IMSC_ERR_PROTOCOL_SHIFT 2U
+/*! Slice: IMSC_EMB_DATA_OVFLW:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_EMB_DATA_OVFLW
+#define MRV_SMIA_IMSC_EMB_DATA_OVFLW_MASK 0x00000002U
+#define MRV_SMIA_IMSC_EMB_DATA_OVFLW_SHIFT 1U
+/*! Slice: IMSC_FRAME_END:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_SMIA_IMSC_FRAME_END
+#define MRV_SMIA_IMSC_FRAME_END_MASK 0x00000001U
+#define MRV_SMIA_IMSC_FRAME_END_SHIFT 0U
+/*! Register: smia_ris: Raw interrupt status (0x0000000c)*/
+/*! Slice: RIS_FIFO_FILL_LEVEL:*/
+/*! Programmed fill level was reached; will be raised as long as the fill level is greater the programmed value */
+#define MRV_SMIA_RIS_FIFO_FILL_LEVEL
+#define MRV_SMIA_RIS_FIFO_FILL_LEVEL_MASK 0x00000020U
+#define MRV_SMIA_RIS_FIFO_FILL_LEVEL_SHIFT 5U
+/*! Slice: RIS_SYNC_FIFO_OVFLW:*/
+/*! Sync fifo overflow error */
+#define MRV_SMIA_RIS_SYNC_FIFO_OVFLW
+#define MRV_SMIA_RIS_SYNC_FIFO_OVFLW_MASK 0x00000010U
+#define MRV_SMIA_RIS_SYNC_FIFO_OVFLW_SHIFT 4U
+/*! Slice: RIS_ERR_CS:*/
+/*! Checksum error */
+#define MRV_SMIA_RIS_ERR_CS
+#define MRV_SMIA_RIS_ERR_CS_MASK 0x00000008U
+#define MRV_SMIA_RIS_ERR_CS_SHIFT 3U
+/*! Slice: RIS_ERR_PROTOCOL:*/
+/*! Protocol error */
+#define MRV_SMIA_RIS_ERR_PROTOCOL
+#define MRV_SMIA_RIS_ERR_PROTOCOL_MASK 0x00000004U
+#define MRV_SMIA_RIS_ERR_PROTOCOL_SHIFT 2U
+/*! Slice: RIS_EMB_DATA_OVFLW:*/
+/*! Embedded data fifo overflow error */
+#define MRV_SMIA_RIS_EMB_DATA_OVFLW
+#define MRV_SMIA_RIS_EMB_DATA_OVFLW_MASK 0x00000002U
+#define MRV_SMIA_RIS_EMB_DATA_OVFLW_SHIFT 1U
+/*! Slice: RIS_FRAME_END:*/
+/*! Frame end reached */
+#define MRV_SMIA_RIS_FRAME_END
+#define MRV_SMIA_RIS_FRAME_END_MASK 0x00000001U
+#define MRV_SMIA_RIS_FRAME_END_SHIFT 0U
+/*! Register: smia_mis: Masked interrupt status (0x00000010)*/
+/*! Slice: MIS_FIFO_FILL_LEVEL:*/
+/*! Programmed fill level was reached; will be raised as long as the fill level is greater the programmed value */
+#define MRV_SMIA_MIS_FIFO_FILL_LEVEL
+#define MRV_SMIA_MIS_FIFO_FILL_LEVEL_MASK 0x00000020U
+#define MRV_SMIA_MIS_FIFO_FILL_LEVEL_SHIFT 5U
+/*! Slice: MIS_SYNC_FIFO_OVFLW:*/
+/*! Sync fifo overflow error */
+#define MRV_SMIA_MIS_SYNC_FIFO_OVFLW
+#define MRV_SMIA_MIS_SYNC_FIFO_OVFLW_MASK 0x00000010U
+#define MRV_SMIA_MIS_SYNC_FIFO_OVFLW_SHIFT 4U
+/*! Slice: MIS_ERR_CS:*/
+/*! Checksum error */
+#define MRV_SMIA_MIS_ERR_CS
+#define MRV_SMIA_MIS_ERR_CS_MASK 0x00000008U
+#define MRV_SMIA_MIS_ERR_CS_SHIFT 3U
+/*! Slice: MIS_ERR_PROTOCOL:*/
+/*! Protocol error */
+#define MRV_SMIA_MIS_ERR_PROTOCOL
+#define MRV_SMIA_MIS_ERR_PROTOCOL_MASK 0x00000004U
+#define MRV_SMIA_MIS_ERR_PROTOCOL_SHIFT 2U
+/*! Slice: MIS_EMB_DATA_OVFLW:*/
+/*! Embedded data fifo overflow error */
+#define MRV_SMIA_MIS_EMB_DATA_OVFLW
+#define MRV_SMIA_MIS_EMB_DATA_OVFLW_MASK 0x00000002U
+#define MRV_SMIA_MIS_EMB_DATA_OVFLW_SHIFT 1U
+/*! Slice: MIS_FRAME_END:*/
+/*! Frame end reached */
+#define MRV_SMIA_MIS_FRAME_END
+#define MRV_SMIA_MIS_FRAME_END_MASK 0x00000001U
+#define MRV_SMIA_MIS_FRAME_END_SHIFT 0U
+/*! Register: smia_icr: Interrupt clear register (0x00000014)*/
+/*! Slice: ICR_FIFO_FILL_LEVEL:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_FIFO_FILL_LEVEL
+#define MRV_SMIA_ICR_FIFO_FILL_LEVEL_MASK 0x00000020U
+#define MRV_SMIA_ICR_FIFO_FILL_LEVEL_SHIFT 5U
+/*! Slice: ICR_SYNC_FIFO_OVFLW:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_SYNC_FIFO_OVFLW
+#define MRV_SMIA_ICR_SYNC_FIFO_OVFLW_MASK 0x00000010U
+#define MRV_SMIA_ICR_SYNC_FIFO_OVFLW_SHIFT 4U
+/*! Slice: ICR_ERR_CS:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_ERR_CS
+#define MRV_SMIA_ICR_ERR_CS_MASK 0x00000008U
+#define MRV_SMIA_ICR_ERR_CS_SHIFT 3U
+/*! Slice: ICR_ERR_PROTOCOL:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_ERR_PROTOCOL
+#define MRV_SMIA_ICR_ERR_PROTOCOL_MASK 0x00000004U
+#define MRV_SMIA_ICR_ERR_PROTOCOL_SHIFT 2U
+/*! Slice: ICR_EMB_DATA_OVFLW:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_EMB_DATA_OVFLW
+#define MRV_SMIA_ICR_EMB_DATA_OVFLW_MASK 0x00000002U
+#define MRV_SMIA_ICR_EMB_DATA_OVFLW_SHIFT 1U
+/*! Slice: ICR_FRAME_END:*/
+/*! Write '1': clear interrupt; Write '0': no effect */
+#define MRV_SMIA_ICR_FRAME_END
+#define MRV_SMIA_ICR_FRAME_END_MASK 0x00000001U
+#define MRV_SMIA_ICR_FRAME_END_SHIFT 0U
+/*! Register: smia_isr: Interrupt set register (0x00000018)*/
+/*! Slice: ISR_FIFO_FILL_LEVEL:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_FIFO_FILL_LEVEL
+#define MRV_SMIA_ISR_FIFO_FILL_LEVEL_MASK 0x00000020U
+#define MRV_SMIA_ISR_FIFO_FILL_LEVEL_SHIFT 5U
+/*! Slice: ISR_SYNC_FIFO_OVFLW:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_SYNC_FIFO_OVFLW
+#define MRV_SMIA_ISR_SYNC_FIFO_OVFLW_MASK 0x00000010U
+#define MRV_SMIA_ISR_SYNC_FIFO_OVFLW_SHIFT 4U
+/*! Slice: ISR_ERR_CS:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_ERR_CS
+#define MRV_SMIA_ISR_ERR_CS_MASK 0x00000008U
+#define MRV_SMIA_ISR_ERR_CS_SHIFT 3U
+/*! Slice: ISR_ERR_PROTOCOL:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_ERR_PROTOCOL
+#define MRV_SMIA_ISR_ERR_PROTOCOL_MASK 0x00000004U
+#define MRV_SMIA_ISR_ERR_PROTOCOL_SHIFT 2U
+/*! Slice: ISR_EMB_DATA_OVFLW:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_EMB_DATA_OVFLW
+#define MRV_SMIA_ISR_EMB_DATA_OVFLW_MASK 0x00000002U
+#define MRV_SMIA_ISR_EMB_DATA_OVFLW_SHIFT 1U
+/*! Slice: ISR_FRAME_END:*/
+/*! Write '1': set interrupt; Write '0': no effect */
+#define MRV_SMIA_ISR_FRAME_END
+#define MRV_SMIA_ISR_FRAME_END_MASK 0x00000001U
+#define MRV_SMIA_ISR_FRAME_END_SHIFT 0U
+/*! Register: smia_data_format_sel: data format selector register (0x0000001c)*/
+/*! Slice: DATA_FORMAT_SEL:*/
+/*! data format selector:*/
+/* 0x0: YUV 422 */
+/* 0x1: YUV 420 */
+/* 0x4: RGB 444 */
+/* 0x5: RGB 565 */
+/* 0x6: RGB 888 */
+/* 0x8: RAW 6 */
+/* 0x9: RAW 7 */
+/* 0xA: RAW 8 */
+/* 0xB: RAW 10 */
+/* 0xC: RAW 12 */
+/* 0xD: RAW 8-bit to 10-bit decompression */
+/* 0xF: compressed */
+/* 0x2, 0x3, 0x7, 0xE: reserved, no output */
+#define MRV_SMIA_DATA_FORMAT_SEL
+#define MRV_SMIA_DATA_FORMAT_SEL_MASK 0x0000000FU
+#define MRV_SMIA_DATA_FORMAT_SEL_SHIFT 0U
+/*! Register: smia_sof_emb_data_lines: start of frame embedded data lines register (0x00000020)*/
+/*! Slice: SOF_EMB_DATA_LINES:*/
+/*! number of embedded data lines at frame start */
+#define MRV_SMIA_SOF_EMB_DATA_LINES
+#define MRV_SMIA_SOF_EMB_DATA_LINES_MASK 0x00000007U
+#define MRV_SMIA_SOF_EMB_DATA_LINES_SHIFT 0U
+/*! Register: smia_emb_hstart: embedded data hstart register (0x00000024)*/
+/*! Slice: EMB_HSTART:*/
+/*! horizontal start position of captured embedded data.*/
+/* Must be 32-bit aligned (bit 0 and bit 1 are hard wired to "00")*/
+#define MRV_SMIA_EMB_HSTART
+#define MRV_SMIA_EMB_HSTART_MASK 0x00007FFCU
+#define MRV_SMIA_EMB_HSTART_SHIFT 2U
+/*! Register: smia_emb_hsize: embedded data hsize register (0x00000028)*/
+/*! Slice: EMB_HSIZE:*/
+/*! number of captured embedded data dwords per line */
+/* '0' means no capturing of embedded data.*/
+/* Must be 32-bit aligned (bit 0 and bit 1 are hard wired to "00")*/
+#define MRV_SMIA_EMB_HSIZE
+#define MRV_SMIA_EMB_HSIZE_MASK 0x00007FFCU
+#define MRV_SMIA_EMB_HSIZE_SHIFT 2U
+/*! Register: smia_emb_vstart: embedded data vstart register (0x0000002c)*/
+/*! Slice: EMB_VSTART:*/
+/*! start line of embedded data extraction.*/
+/* '0' means no capturing of embedded data */
+#define MRV_SMIA_EMB_VSTART
+#define MRV_SMIA_EMB_VSTART_MASK 0x00003FFFU
+#define MRV_SMIA_EMB_VSTART_SHIFT 0U
+/*! Register: smia_num_lines: image data lines register (0x00000030)*/
+/*! Slice: NUM_LINES:*/
+/*! number of image data lines per frame */
+#define MRV_SMIA_NUM_LINES
+#define MRV_SMIA_NUM_LINES_MASK 0x00003FFFU
+#define MRV_SMIA_NUM_LINES_SHIFT 0U
+/*! Register: smia_emb_data_fifo: Embedded Data Fifo (0x00000034)*/
+/*! Slice: EMB_DATA_FIFO:*/
+/*! lowest 4 bytes in embedded data fifo;*/
+/* reading increments fifo read pointer.*/
+/* First embedded data byte will be written to bits 7:0 of 32-bit data word, second data byte written to 15:8 etc.*/
+#define MRV_SMIA_EMB_DATA_FIFO
+#define MRV_SMIA_EMB_DATA_FIFO_MASK 0xFFFFFFFFU
+#define MRV_SMIA_EMB_DATA_FIFO_SHIFT 0U
+/*! Register: smia_fifo_fill_level: Embedded Data FIFO Fill Level (0x00000038)*/
+/*! Slice: FIFO_FILL_LEVEL:*/
+/*! FIFO level in dwords for triggering the fill level interrupt.*/
+/* Must be 32-bit aligned (bit 0 and bit 1 are hard wired to "00")*/
+#define MRV_SMIA_FIFO_FILL_LEVEL
+#define MRV_SMIA_FIFO_FILL_LEVEL_MASK 0x000003FFU
+#define MRV_SMIA_FIFO_FILL_LEVEL_SHIFT 0U
+/*! Register: mipi_ctrl: global control register (0x00000000)*/
+/*! Slice: S_ENABLE_CLK:*/
+/*! Sensor clock lane enable signal. This register is directly connected to the output port "s_enableclk".*/
+/* '1': enable sensor clock lane (DEFAULT)*/
+/* '0': disable sensor clock lane */
+#define MRV_MIPI_S_ENABLE_CLK
+#define MRV_MIPI_S_ENABLE_CLK_MASK 0x00040000U
+#define MRV_MIPI_S_ENABLE_CLK_SHIFT 18U
+/*! Slice: ERR_SOT_SYNC_HS_SKIP:*/
+/*! 1: data within the current transmission is skipped if ErrSotSyncHS is detected (default)*/
+/* 0: ErrSotSyncHS does not affect transmission */
+#define MRV_MIPI_ERR_SOT_SYNC_HS_SKIP
+#define MRV_MIPI_ERR_SOT_SYNC_HS_SKIP_MASK 0x00020000U
+#define MRV_MIPI_ERR_SOT_SYNC_HS_SKIP_SHIFT 17U
+/*! Slice: ERR_SOT_HS_SKIP:*/
+/*! 1: data within the current transmission is skipped if ErrSotHS is detected */
+/* 0: ErrSotHS does not affect transmission (default)*/
+#define MRV_MIPI_ERR_SOT_HS_SKIP
+#define MRV_MIPI_ERR_SOT_HS_SKIP_MASK 0x00010000U
+#define MRV_MIPI_ERR_SOT_HS_SKIP_SHIFT 16U
+/*! Slice: NUM_LANES:*/
+/*! 00: Lane 1 is used */
+/* 01: Lanes 1 and 2 are used */
+/* 10: Lanes 1, 2 and 3 are used */
+/* 11: Lanes 1, 2, 3 and 4 are used (default)*/
+#define MRV_MIPI_NUM_LANES
+#define MRV_MIPI_NUM_LANES_MASK 0x00003000U
+#define MRV_MIPI_NUM_LANES_SHIFT 12U
+/*! Slice: SHUTDOWN_LANE:*/
+/*! Shutdown Lane Module. Content of this register is directly connected to the output signal shutdown[n-1:0] where n denotes the lane number 1..4 */
+#define MRV_MIPI_SHUTDOWN_LANE
+#define MRV_MIPI_SHUTDOWN_LANE_MASK 0x00000F00U
+#define MRV_MIPI_SHUTDOWN_LANE_SHIFT 8U
+/*! Slice: FLUSH_FIFO:*/
+/*! writing '1' resets the write- and read pointers of the additional data fifo, reading returns the status of the flush_fifo bit. This bit must be reset by software.*/
+#define MRV_MIPI_FLUSH_FIFO
+#define MRV_MIPI_FLUSH_FIFO_MASK 0x00000002U
+#define MRV_MIPI_FLUSH_FIFO_SHIFT 1U
+/*! Slice: OUTPUT_ENA:*/
+/*! 1: output to add data fifo and to output interface is enabled */
+/* 0: output is disabled */
+#define MRV_MIPI_OUTPUT_ENA
+#define MRV_MIPI_OUTPUT_ENA_MASK 0x00000001U
+#define MRV_MIPI_OUTPUT_ENA_SHIFT 0U
+/*! Register: mipi_status: global status register (0x00000004)*/
+/*! Slice: S_ULP_ACTIVE_NOT_CLK:*/
+/*! sensor clock lane is in ULP state. This register is directly connected to the synchronized input signal "s_ulpsactivenotclk"*/
+#define MRV_MIPI_S_ULP_ACTIVE_NOT_CLK
+#define MRV_MIPI_S_ULP_ACTIVE_NOT_CLK_MASK 0x00002000U
+#define MRV_MIPI_S_ULP_ACTIVE_NOT_CLK_SHIFT 13U
+/*! Slice: S_STOPSTATE_CLK:*/
+/*! sensor clock lane is in stopstate. This register is directly connected to the synchronized input signal "s_stopstateclk"*/
+#define MRV_MIPI_S_STOPSTATE_CLK
+#define MRV_MIPI_S_STOPSTATE_CLK_MASK 0x00001000U
+#define MRV_MIPI_S_STOPSTATE_CLK_SHIFT 12U
+/*! Slice: STOPSTATE:*/
+/*! Data Lane is in stopstate. This register is directly connected to the synchronized input signal stopstate[n-1:0] where n denotes the lane number 1..4 */
+#define MRV_MIPI_STOPSTATE
+#define MRV_MIPI_STOPSTATE_MASK 0x00000F00U
+#define MRV_MIPI_STOPSTATE_SHIFT 8U
+/*! Slice: ADD_DATA_AVAIL:*/
+/*! 1: additional data fifo contains data */
+/* 0: additional data fifo is empty */
+#define MRV_MIPI_ADD_DATA_AVAIL
+#define MRV_MIPI_ADD_DATA_AVAIL_MASK 0x00000001U
+#define MRV_MIPI_ADD_DATA_AVAIL_SHIFT 0U
+/*! Register: mipi_imsc: Interrupt mask (0x00000008)*/
+/*! Slice: IMSC_GEN_SHORT_PACK:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_GEN_SHORT_PACK
+#define MRV_MIPI_IMSC_GEN_SHORT_PACK_MASK 0x08000000U
+#define MRV_MIPI_IMSC_GEN_SHORT_PACK_SHIFT 27U
+/*! Slice: IMSC_ADD_DATA_FILL_LEVEL:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL_MASK 0x04000000U
+#define MRV_MIPI_IMSC_ADD_DATA_FILL_LEVEL_SHIFT 26U
+/*! Slice: IMSC_ADD_DATA_OVFLW:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ADD_DATA_OVFLW
+#define MRV_MIPI_IMSC_ADD_DATA_OVFLW_MASK 0x02000000U
+#define MRV_MIPI_IMSC_ADD_DATA_OVFLW_SHIFT 25U
+/*! Slice: IMSC_FRAME_END:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_FRAME_END
+#define MRV_MIPI_IMSC_FRAME_END_MASK 0x01000000U
+#define MRV_MIPI_IMSC_FRAME_END_SHIFT 24U
+/*! Slice: IMSC_ERR_CS:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ERR_CS
+#define MRV_MIPI_IMSC_ERR_CS_MASK 0x00800000U
+#define MRV_MIPI_IMSC_ERR_CS_SHIFT 23U
+/*! Slice: IMSC_ERR_ECC1:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ERR_ECC1
+#define MRV_MIPI_IMSC_ERR_ECC1_MASK 0x00400000U
+#define MRV_MIPI_IMSC_ERR_ECC1_SHIFT 22U
+/*! Slice: IMSC_ERR_ECC2:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ERR_ECC2
+#define MRV_MIPI_IMSC_ERR_ECC2_MASK 0x00200000U
+#define MRV_MIPI_IMSC_ERR_ECC2_SHIFT 21U
+/*! Slice: IMSC_ERR_PROTOCOL:*/
+/*! enable interrupt (1) or mask out (0)*/
+#define MRV_MIPI_IMSC_ERR_PROTOCOL
+#define MRV_MIPI_IMSC_ERR_PROTOCOL_MASK 0x00100000U
+#define MRV_MIPI_IMSC_ERR_PROTOCOL_SHIFT 20U
+/*! Slice: IMSC_ERR_CONTROL:*/
+/*! enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#define MRV_MIPI_IMSC_ERR_CONTROL
+#define MRV_MIPI_IMSC_ERR_CONTROL_MASK 0x000F0000U
+#define MRV_MIPI_IMSC_ERR_CONTROL_SHIFT 16U
+/*! Slice: IMSC_ERR_EOT_SYNC:*/
+/*! enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#define MRV_MIPI_IMSC_ERR_EOT_SYNC
+#define MRV_MIPI_IMSC_ERR_EOT_SYNC_MASK 0x0000F000U
+#define MRV_MIPI_IMSC_ERR_EOT_SYNC_SHIFT 12U
+/*! Slice: IMSC_ERR_SOT_SYNC:*/
+/*! enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#define MRV_MIPI_IMSC_ERR_SOT_SYNC
+#define MRV_MIPI_IMSC_ERR_SOT_SYNC_MASK 0x00000F00U
+#define MRV_MIPI_IMSC_ERR_SOT_SYNC_SHIFT 8U
+/*! Slice: IMSC_ERR_SOT:*/
+/*! enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#define MRV_MIPI_IMSC_ERR_SOT
+#define MRV_MIPI_IMSC_ERR_SOT_MASK 0x000000F0U
+#define MRV_MIPI_IMSC_ERR_SOT_SHIFT 4U
+/*! Slice: IMSC_SYNC_FIFO_OVFLW:*/
+/*! enable interrupt (1) or mask out (0) (one bit for each lane)*/
+#define MRV_MIPI_IMSC_SYNC_FIFO_OVFLW
+#define MRV_MIPI_IMSC_SYNC_FIFO_OVFLW_MASK 0x0000000FU
+#define MRV_MIPI_IMSC_SYNC_FIFO_OVFLW_SHIFT 0U
+/*! Register: mipi_ris: Raw interrupt status (0x0000000c)*/
+/*! Slice: RIS_GEN_SHORT_PACK:*/
+/*! generic short packet was received (only available in version 2 of MIPI interface)*/
+     /**/
+/* When this interrupt is cleared, all the bits of the MIPI_GEN_SHORT_DT status register are cleared as well; Setting of this interrupt via MIPI_ISR register will set all the bits of the MIPI_GEN_SHORT_DT register.*/
+#define MRV_MIPI_RIS_GEN_SHORT_PACK
+#define MRV_MIPI_RIS_GEN_SHORT_PACK_MASK 0x08000000U
+#define MRV_MIPI_RIS_GEN_SHORT_PACK_SHIFT 27U
+/*! Slice: RIS_ADD_DATA_FILL_LEVEL:*/
+/*! Programmed fill level was reached; will be raised as long as the fill level is greater than the programmed value */
+#define MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL_MASK 0x04000000U
+#define MRV_MIPI_RIS_ADD_DATA_FILL_LEVEL_SHIFT 26U
+/*! Slice: RIS_ADD_DATA_OVFLW:*/
+/*! additional data fifo overflow occurred */
+#define MRV_MIPI_RIS_ADD_DATA_OVFLW
+#define MRV_MIPI_RIS_ADD_DATA_OVFLW_MASK 0x02000000U
+#define MRV_MIPI_RIS_ADD_DATA_OVFLW_SHIFT 25U
+/*! Slice: RIS_FRAME_END:*/
+/*! frame end send to output interface */
+#define MRV_MIPI_RIS_FRAME_END
+#define MRV_MIPI_RIS_FRAME_END_MASK 0x01000000U
+#define MRV_MIPI_RIS_FRAME_END_SHIFT 24U
+/*! Slice: RIS_ERR_CS:*/
+/*! checksum error occurred */
+#define MRV_MIPI_RIS_ERR_CS
+#define MRV_MIPI_RIS_ERR_CS_MASK 0x00800000U
+#define MRV_MIPI_RIS_ERR_CS_SHIFT 23U
+/*! Slice: RIS_ERR_ECC1:*/
+/*! 1-bit ecc error occurred */
+#define MRV_MIPI_RIS_ERR_ECC1
+#define MRV_MIPI_RIS_ERR_ECC1_MASK 0x00400000U
+#define MRV_MIPI_RIS_ERR_ECC1_SHIFT 22U
+/*! Slice: RIS_ERR_ECC2:*/
+/*! 2-bit ecc error occurred */
+#define MRV_MIPI_RIS_ERR_ECC2
+#define MRV_MIPI_RIS_ERR_ECC2_MASK 0x00200000U
+#define MRV_MIPI_RIS_ERR_ECC2_SHIFT 21U
+/*! Slice: RIS_ERR_PROTOCOL:*/
+/*! packet start detected within current packet */
+#define MRV_MIPI_RIS_ERR_PROTOCOL
+#define MRV_MIPI_RIS_ERR_PROTOCOL_MASK 0x00100000U
+#define MRV_MIPI_RIS_ERR_PROTOCOL_SHIFT 20U
+/*! Slice: RIS_ERR_CONTROL:*/
+/*! PPI interface control error occured, one bit for each lane */
+#define MRV_MIPI_RIS_ERR_CONTROL
+#define MRV_MIPI_RIS_ERR_CONTROL_MASK 0x000F0000U
+#define MRV_MIPI_RIS_ERR_CONTROL_SHIFT 16U
+/*! Slice: RIS_ERR_EOT_SYNC:*/
+/*! PPI interface eot sync error occured, one bit for each lane */
+#define MRV_MIPI_RIS_ERR_EOT_SYNC
+#define MRV_MIPI_RIS_ERR_EOT_SYNC_MASK 0x0000F000U
+#define MRV_MIPI_RIS_ERR_EOT_SYNC_SHIFT 12U
+/*! Slice: RIS_ERR_SOT_SYNC:*/
+/*! PPI interface sot sync error occured, one bit for each lane */
+#define MRV_MIPI_RIS_ERR_SOT_SYNC
+#define MRV_MIPI_RIS_ERR_SOT_SYNC_MASK 0x00000F00U
+#define MRV_MIPI_RIS_ERR_SOT_SYNC_SHIFT 8U
+/*! Slice: RIS_ERR_SOT:*/
+/*! PPI interface sot error occured, one bit for each lane */
+#define MRV_MIPI_RIS_ERR_SOT
+#define MRV_MIPI_RIS_ERR_SOT_MASK 0x000000F0U
+#define MRV_MIPI_RIS_ERR_SOT_SHIFT 4U
+/*! Slice: RIS_SYNC_FIFO_OVFLW:*/
+/*! synchronization fifo overflow occurred, one bit for each lane */
+#define MRV_MIPI_RIS_SYNC_FIFO_OVFLW
+#define MRV_MIPI_RIS_SYNC_FIFO_OVFLW_MASK 0x0000000FU
+#define MRV_MIPI_RIS_SYNC_FIFO_OVFLW_SHIFT 0U
+/*! Register: mipi_mis: Masked interrupt status (0x00000010)*/
+/*! Slice: MIS_GEN_SHORT_PACK:*/
+/*! generic short packet was received (only available in version 2 of MIPI interface)*/
+#define MRV_MIPI_MIS_GEN_SHORT_PACK
+#define MRV_MIPI_MIS_GEN_SHORT_PACK_MASK 0x08000000U
+#define MRV_MIPI_MIS_GEN_SHORT_PACK_SHIFT 27U
+/*! Slice: MIS_ADD_DATA_FILL_LEVEL:*/
+/*! Programmed fill level was reached; will be raised as long as the fill level is greater the programmed value */
+#define MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL_MASK 0x04000000U
+#define MRV_MIPI_MIS_ADD_DATA_FILL_LEVEL_SHIFT 26U
+/*! Slice: MIS_ADD_DATA_OVFLW:*/
+/*! additional data fifo overflow */
+#define MRV_MIPI_MIS_ADD_DATA_OVFLW
+#define MRV_MIPI_MIS_ADD_DATA_OVFLW_MASK 0x02000000U
+#define MRV_MIPI_MIS_ADD_DATA_OVFLW_SHIFT 25U
+/*! Slice: MIS_FRAME_END:*/
+/*! frame end send to output interface */
+#define MRV_MIPI_MIS_FRAME_END
+#define MRV_MIPI_MIS_FRAME_END_MASK 0x01000000U
+#define MRV_MIPI_MIS_FRAME_END_SHIFT 24U
+/*! Slice: MIS_ERR_CS:*/
+/*! checksum error occurred */
+#define MRV_MIPI_MIS_ERR_CS
+#define MRV_MIPI_MIS_ERR_CS_MASK 0x00800000U
+#define MRV_MIPI_MIS_ERR_CS_SHIFT 23U
+/*! Slice: MIS_ERR_ECC1:*/
+/*! 1-bit ecc error occurred */
+#define MRV_MIPI_MIS_ERR_ECC1
+#define MRV_MIPI_MIS_ERR_ECC1_MASK 0x00400000U
+#define MRV_MIPI_MIS_ERR_ECC1_SHIFT 22U
+/*! Slice: MIS_ERR_ECC2:*/
+/*! 2-bit ecc error occurred */
+#define MRV_MIPI_MIS_ERR_ECC2
+#define MRV_MIPI_MIS_ERR_ECC2_MASK 0x00200000U
+#define MRV_MIPI_MIS_ERR_ECC2_SHIFT 21U
+/*! Slice: MIS_ERR_PROTOCOL:*/
+/*! packet start detected within current packet */
+#define MRV_MIPI_MIS_ERR_PROTOCOL
+#define MRV_MIPI_MIS_ERR_PROTOCOL_MASK 0x00100000U
+#define MRV_MIPI_MIS_ERR_PROTOCOL_SHIFT 20U
+/*! Slice: MIS_ERR_CONTROL:*/
+/*! PPI interface control error occured, one bit for each lane */
+#define MRV_MIPI_MIS_ERR_CONTROL
+#define MRV_MIPI_MIS_ERR_CONTROL_MASK 0x000F0000U
+#define MRV_MIPI_MIS_ERR_CONTROL_SHIFT 16U
+/*! Slice: MIS_ERR_EOT_SYNC:*/
+/*! PPI interface eot sync error occured, one bit for each lane */
+#define MRV_MIPI_MIS_ERR_EOT_SYNC
+#define MRV_MIPI_MIS_ERR_EOT_SYNC_MASK 0x0000F000U
+#define MRV_MIPI_MIS_ERR_EOT_SYNC_SHIFT 12U
+/*! Slice: MIS_ERR_SOT_SYNC:*/
+/*! PPI interface sot sync error occured, one bit for each lane */
+#define MRV_MIPI_MIS_ERR_SOT_SYNC
+#define MRV_MIPI_MIS_ERR_SOT_SYNC_MASK 0x00000F00U
+#define MRV_MIPI_MIS_ERR_SOT_SYNC_SHIFT 8U
+/*! Slice: MIS_ERR_SOT:*/
+/*! PPI interface sot error occured, one bit for each lane */
+#define MRV_MIPI_MIS_ERR_SOT
+#define MRV_MIPI_MIS_ERR_SOT_MASK 0x000000F0U
+#define MRV_MIPI_MIS_ERR_SOT_SHIFT 4U
+/*! Slice: MIS_SYNC_FIFO_OVFLW:*/
+/*! synchronization fifo overflow occurred, one bit for each lane */
+#define MRV_MIPI_MIS_SYNC_FIFO_OVFLW
+#define MRV_MIPI_MIS_SYNC_FIFO_OVFLW_MASK 0x0000000FU
+#define MRV_MIPI_MIS_SYNC_FIFO_OVFLW_SHIFT 0U
+/*! Register: mipi_icr: Interrupt clear register (0x00000014)*/
+/*! Slice: ICR_GEN_SHORT_PACK:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_GEN_SHORT_PACK
+#define MRV_MIPI_ICR_GEN_SHORT_PACK_MASK 0x08000000U
+#define MRV_MIPI_ICR_GEN_SHORT_PACK_SHIFT 27U
+/*! Slice: ICR_ADD_DATA_FILL_LEVEL:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL_MASK 0x04000000U
+#define MRV_MIPI_ICR_ADD_DATA_FILL_LEVEL_SHIFT 26U
+/*! Slice: ICR_ADD_DATA_OVFLW:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ADD_DATA_OVFLW
+#define MRV_MIPI_ICR_ADD_DATA_OVFLW_MASK 0x02000000U
+#define MRV_MIPI_ICR_ADD_DATA_OVFLW_SHIFT 25U
+/*! Slice: ICR_FRAME_END:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_FRAME_END
+#define MRV_MIPI_ICR_FRAME_END_MASK 0x01000000U
+#define MRV_MIPI_ICR_FRAME_END_SHIFT 24U
+/*! Slice: ICR_ERR_CS:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ERR_CS
+#define MRV_MIPI_ICR_ERR_CS_MASK 0x00800000U
+#define MRV_MIPI_ICR_ERR_CS_SHIFT 23U
+/*! Slice: ICR_ERR_ECC1:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ERR_ECC1
+#define MRV_MIPI_ICR_ERR_ECC1_MASK 0x00400000U
+#define MRV_MIPI_ICR_ERR_ECC1_SHIFT 22U
+/*! Slice: ICR_ERR_ECC2:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ERR_ECC2
+#define MRV_MIPI_ICR_ERR_ECC2_MASK 0x00200000U
+#define MRV_MIPI_ICR_ERR_ECC2_SHIFT 21U
+/*! Slice: ICR_ERR_PROTOCOL:*/
+/*! 1: clear register; 0: nothing happens */
+#define MRV_MIPI_ICR_ERR_PROTOCOL
+#define MRV_MIPI_ICR_ERR_PROTOCOL_MASK 0x00100000U
+#define MRV_MIPI_ICR_ERR_PROTOCOL_SHIFT 20U
+/*! Slice: ICR_ERR_CONTROL:*/
+/*! 1: clear register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ICR_ERR_CONTROL
+#define MRV_MIPI_ICR_ERR_CONTROL_MASK 0x000F0000U
+#define MRV_MIPI_ICR_ERR_CONTROL_SHIFT 16U
+/*! Slice: ICR_ERR_EOT_SYNC:*/
+/*! 1: clear register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ICR_ERR_EOT_SYNC
+#define MRV_MIPI_ICR_ERR_EOT_SYNC_MASK 0x0000F000U
+#define MRV_MIPI_ICR_ERR_EOT_SYNC_SHIFT 12U
+/*! Slice: ICR_ERR_SOT_SYNC:*/
+/*! 1: clear register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ICR_ERR_SOT_SYNC
+#define MRV_MIPI_ICR_ERR_SOT_SYNC_MASK 0x00000F00U
+#define MRV_MIPI_ICR_ERR_SOT_SYNC_SHIFT 8U
+/*! Slice: ICR_ERR_SOT:*/
+/*! 1: clear register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ICR_ERR_SOT
+#define MRV_MIPI_ICR_ERR_SOT_MASK 0x000000F0U
+#define MRV_MIPI_ICR_ERR_SOT_SHIFT 4U
+/*! Slice: ICR_SYNC_FIFO_OVFLW:*/
+/*! 1: clear register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ICR_SYNC_FIFO_OVFLW
+#define MRV_MIPI_ICR_SYNC_FIFO_OVFLW_MASK 0x0000000FU
+#define MRV_MIPI_ICR_SYNC_FIFO_OVFLW_SHIFT 0U
+/*! Register: mipi_isr: Interrupt set register (0x00000018)*/
+/*! Slice: ISR_GEN_SHORT_PACK:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_GEN_SHORT_PACK
+#define MRV_MIPI_ISR_GEN_SHORT_PACK_MASK 0x08000000U
+#define MRV_MIPI_ISR_GEN_SHORT_PACK_SHIFT 27U
+/*! Slice: ISR_ADD_DATA_FILL_LEVEL:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL_MASK 0x04000000U
+#define MRV_MIPI_ISR_ADD_DATA_FILL_LEVEL_SHIFT 26U
+/*! Slice: ISR_ADD_DATA_OVFLW:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ADD_DATA_OVFLW
+#define MRV_MIPI_ISR_ADD_DATA_OVFLW_MASK 0x02000000U
+#define MRV_MIPI_ISR_ADD_DATA_OVFLW_SHIFT 25U
+/*! Slice: ISR_FRAME_END:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_FRAME_END
+#define MRV_MIPI_ISR_FRAME_END_MASK 0x01000000U
+#define MRV_MIPI_ISR_FRAME_END_SHIFT 24U
+/*! Slice: ISR_ERR_CS:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ERR_CS
+#define MRV_MIPI_ISR_ERR_CS_MASK 0x00800000U
+#define MRV_MIPI_ISR_ERR_CS_SHIFT 23U
+/*! Slice: ISR_ERR_ECC1:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ERR_ECC1
+#define MRV_MIPI_ISR_ERR_ECC1_MASK 0x00400000U
+#define MRV_MIPI_ISR_ERR_ECC1_SHIFT 22U
+/*! Slice: ISR_ERR_ECC2:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ERR_ECC2
+#define MRV_MIPI_ISR_ERR_ECC2_MASK 0x00200000U
+#define MRV_MIPI_ISR_ERR_ECC2_SHIFT 21U
+/*! Slice: ISR_ERR_PROTOCOL:*/
+/*! 1: set register; 0: nothing happens */
+#define MRV_MIPI_ISR_ERR_PROTOCOL
+#define MRV_MIPI_ISR_ERR_PROTOCOL_MASK 0x00100000U
+#define MRV_MIPI_ISR_ERR_PROTOCOL_SHIFT 20U
+/*! Slice: ISR_ERR_CONTROL:*/
+/*! 1: set register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ISR_ERR_CONTROL
+#define MRV_MIPI_ISR_ERR_CONTROL_MASK 0x000F0000U
+#define MRV_MIPI_ISR_ERR_CONTROL_SHIFT 16U
+/*! Slice: ISR_ERR_EOT_SYNC:*/
+/*! 1: set register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ISR_ERR_EOT_SYNC
+#define MRV_MIPI_ISR_ERR_EOT_SYNC_MASK 0x0000F000U
+#define MRV_MIPI_ISR_ERR_EOT_SYNC_SHIFT 12U
+/*! Slice: ISR_ERR_SOT_SYNC:*/
+/*! 1: set register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ISR_ERR_SOT_SYNC
+#define MRV_MIPI_ISR_ERR_SOT_SYNC_MASK 0x00000F00U
+#define MRV_MIPI_ISR_ERR_SOT_SYNC_SHIFT 8U
+/*! Slice: ISR_ERR_SOT:*/
+/*! 1: set register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ISR_ERR_SOT
+#define MRV_MIPI_ISR_ERR_SOT_MASK 0x000000F0U
+#define MRV_MIPI_ISR_ERR_SOT_SHIFT 4U
+/*! Slice: ISR_SYNC_FIFO_OVFLW:*/
+/*! 1: set register; 0: nothing happens (one bit for each lane)*/
+#define MRV_MIPI_ISR_SYNC_FIFO_OVFLW
+#define MRV_MIPI_ISR_SYNC_FIFO_OVFLW_MASK 0x0000000FU
+#define MRV_MIPI_ISR_SYNC_FIFO_OVFLW_SHIFT 0U
+/*! Register: mipi_cur_data_id: Current Data Identifier (0x0000001c)*/
+/*! Slice: VIRTUAL_CHANNEL:*/
+/*! virtual channel of currently received packet */
+#define MRV_MIPI_VIRTUAL_CHANNEL
+#define MRV_MIPI_VIRTUAL_CHANNEL_MASK 0x000000C0U
+#define MRV_MIPI_VIRTUAL_CHANNEL_SHIFT 6U
+/*! Slice: DATA_TYPE:*/
+/*! data type of currently received packet */
+#define MRV_MIPI_DATA_TYPE
+#define MRV_MIPI_DATA_TYPE_MASK 0x0000003FU
+#define MRV_MIPI_DATA_TYPE_SHIFT 0U
+/*! Register: mipi_img_data_sel: Image Data Selector (0x00000020)*/
+/*! Slice: VIRTUAL_CHANNEL_SEL:*/
+/*! virtual channel selector for image data output */
+#define MRV_MIPI_VIRTUAL_CHANNEL_SEL
+#define MRV_MIPI_VIRTUAL_CHANNEL_SEL_MASK 0x000000C0U
+#define MRV_MIPI_VIRTUAL_CHANNEL_SEL_SHIFT 6U
+/*! Slice: DATA_TYPE_SEL:*/
+/*! data type selector for image data output:*/
+/* 0x08...0x0F generic short packets */
+/* 0x12	embedded 8-bit data */
+/* 0x18	YUV 420 8-bit */
+/* 0x19	YUV 420 10-bit */
+/* 0x1A	Legacy YUV 420 8-bit */
+/* 0x1C	YUV 420 8-bit (CSPS)*/
+/* 0x1D	YUV 420 10-bit (CSPS)*/
+/* 0x1E	YUV 422 8-bit */
+/* 0x1F	YUV 422 10-bit */
+/* 0x20	RGB 444 */
+/* 0x21	RGB 555 */
+/* 0x22	RGB 565 */
+/* 0x23	RGB 666 */
+/* 0x24	RGB 888 */
+/* 0x28	RAW 6 */
+/* 0x29	RAW 7 */
+/* 0x2A	RAW 8 */
+/* 0x2B	RAW 10 */
+/* 0x2C	RAW 12 */
+/* 0x30...0x37 User Defined Byte-based data */
+#define MRV_MIPI_DATA_TYPE_SEL
+#define MRV_MIPI_DATA_TYPE_SEL_MASK 0x0000003FU
+#define MRV_MIPI_DATA_TYPE_SEL_SHIFT 0U
+/*! Register: mipi_add_data_sel_1: Additional Data Selector 1 (0x00000024)*/
+/*! Slice: ADD_DATA_VC_1:*/
+/*! virtual channel selector for additional data output */
+#define MRV_MIPI_ADD_DATA_VC_1
+#define MRV_MIPI_ADD_DATA_VC_1_MASK 0x000000C0U
+#define MRV_MIPI_ADD_DATA_VC_1_SHIFT 6U
+/*! Slice: ADD_DATA_TYPE_1:*/
+/*! data type selector for additional data output */
+#define MRV_MIPI_ADD_DATA_TYPE_1
+#define MRV_MIPI_ADD_DATA_TYPE_1_MASK 0x0000003FU
+#define MRV_MIPI_ADD_DATA_TYPE_1_SHIFT 0U
+/*! Register: mipi_add_data_sel_2: Additional Data Selector 2 (0x00000028)*/
+/*! Slice: ADD_DATA_VC_2:*/
+/*! virtual channel selector for additional data output */
+#define MRV_MIPI_ADD_DATA_VC_2
+#define MRV_MIPI_ADD_DATA_VC_2_MASK 0x000000C0U
+#define MRV_MIPI_ADD_DATA_VC_2_SHIFT 6U
+/*! Slice: ADD_DATA_TYPE_2:*/
+/*! data type selector for additional data output */
+#define MRV_MIPI_ADD_DATA_TYPE_2
+#define MRV_MIPI_ADD_DATA_TYPE_2_MASK 0x0000003FU
+#define MRV_MIPI_ADD_DATA_TYPE_2_SHIFT 0U
+/*! Register: mipi_add_data_sel_3: Additional Data Selector 3 (0x0000002c)*/
+/*! Slice: ADD_DATA_VC_3:*/
+/*! virtual channel selector for additional data output */
+#define MRV_MIPI_ADD_DATA_VC_3
+#define MRV_MIPI_ADD_DATA_VC_3_MASK 0x000000C0U
+#define MRV_MIPI_ADD_DATA_VC_3_SHIFT 6U
+/*! Slice: ADD_DATA_TYPE_3:*/
+/*! data type selector for additional data output */
+#define MRV_MIPI_ADD_DATA_TYPE_3
+#define MRV_MIPI_ADD_DATA_TYPE_3_MASK 0x0000003FU
+#define MRV_MIPI_ADD_DATA_TYPE_3_SHIFT 0U
+/*! Register: mipi_add_data_sel_4: Additional Data Selector 4 (0x00000030)*/
+/*! Slice: ADD_DATA_VC_4:*/
+/*! virtual channel selector for additional data output */
+#define MRV_MIPI_ADD_DATA_VC_4
+#define MRV_MIPI_ADD_DATA_VC_4_MASK 0x000000C0U
+#define MRV_MIPI_ADD_DATA_VC_4_SHIFT 6U
+/*! Slice: ADD_DATA_TYPE_4:*/
+/*! data type selector for additional data output */
+#define MRV_MIPI_ADD_DATA_TYPE_4
+#define MRV_MIPI_ADD_DATA_TYPE_4_MASK 0x0000003FU
+#define MRV_MIPI_ADD_DATA_TYPE_4_SHIFT 0U
+/*! Register: mipi_add_data_fifo: Additional Data Fifo (0x00000034)*/
+/*! Slice: ADD_DATA_FIFO:*/
+/*! lowest 4 bytes in additional data fifo;*/
+/* reading increments fifo read pointer.*/
+/* First embedded data byte will be written to bits 7:0 of 32-bit data word, second data byte written to 15:8 etc.*/
+#define MRV_MIPI_ADD_DATA_FIFO
+#define MRV_MIPI_ADD_DATA_FIFO_MASK 0xFFFFFFFFU
+#define MRV_MIPI_ADD_DATA_FIFO_SHIFT 0U
+/*! Register: mipi_add_data_fill_level: Additional Data FIFO Fill Level (0x00000038)*/
+/*! Slice: ADD_DATA_FILL_LEVEL:*/
+/*! FIFO level in dwords for triggering the FILL_LEVEL interrupt,*/
+/* must be 32-bit aligned (bit 0 and bit 1 are hard wired to "00")*/
+#define MRV_MIPI_ADD_DATA_FILL_LEVEL
+#define MRV_MIPI_ADD_DATA_FILL_LEVEL_MASK 0x00001FFFU
+#define MRV_MIPI_ADD_DATA_FILL_LEVEL_SHIFT 0U
+/*! Register: mipi_compressed_mode: controls processing of compressed raw data types (0x0000003c)*/
+/*! Slice: predictor_sel:*/
+/*! predictor to be used:*/
+/* 0: predictor 1 */
+/* 1: predictor 2 */
+#define MRV_MIPI_PREDICTOR_SEL
+#define MRV_MIPI_PREDICTOR_SEL_MASK 0x00000100U
+#define MRV_MIPI_PREDICTOR_SEL_SHIFT 8U
+/*! Slice: comp_scheme:*/
+/*! data compression scheme:*/
+/* 0: 12–8–12 */
+/* 1: 12–7–12 */
+/* 2: 12–6–12 */
+/* 3: 10–8–10 */
+/* 4: 10–7–10 */
+/* 5: 10–6–10 */
+/* 6..7: reserved */
+#define MRV_MIPI_COMP_SCHEME
+#define MRV_MIPI_COMP_SCHEME_MASK 0x00000070U
+#define MRV_MIPI_COMP_SCHEME_SHIFT 4U
+/*! Slice: compress_en:*/
+/*! 1: enable compressed mode processing */
+/* 0: disable compressed mode */
+#define MRV_MIPI_COMPRESS_EN
+#define MRV_MIPI_COMPRESS_EN_MASK 0x00000001U
+#define MRV_MIPI_COMPRESS_EN_SHIFT 0U
+/*! Register: mipi_frame: frame number from frame start and frame end short packets (0x00000040)*/
+/*! Slice: frame_number_fe:*/
+/*! 16 bit frame number from Frame End (FE) short packet */
+#define MRV_MIPI_FRAME_NUMBER_FE
+#define MRV_MIPI_FRAME_NUMBER_FE_MASK 0xFFFF0000U
+#define MRV_MIPI_FRAME_NUMBER_FE_SHIFT 16U
+/*! Slice: frame_number_fs:*/
+/*! 16 bit frame number from Frame Start (FS) short packet */
+#define MRV_MIPI_FRAME_NUMBER_FS
+#define MRV_MIPI_FRAME_NUMBER_FS_MASK 0x0000FFFFU
+#define MRV_MIPI_FRAME_NUMBER_FS_SHIFT 0U
+/*! Register: mipi_gen_short_dt: data type flags for received generic short packets (0x00000044)*/
+/*! Slice: GEN_SHORT_DT_0xF:*/
+/*! 1: generic short packet of data type 0xF received */
+/* 0: data type 0xF not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XF
+#define MRV_MIPI_GEN_SHORT_DT_0XF_MASK 0x00000080U
+#define MRV_MIPI_GEN_SHORT_DT_0XF_SHIFT 7U
+/*! Slice: GEN_SHORT_DT_0xE:*/
+/*! 1: generic short packet of data type 0xE received */
+/* 0: data type 0xE not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XE
+#define MRV_MIPI_GEN_SHORT_DT_0XE_MASK 0x00000040U
+#define MRV_MIPI_GEN_SHORT_DT_0XE_SHIFT 6U
+/*! Slice: GEN_SHORT_DT_0xD:*/
+/*! 1: generic short packet of data type 0xD received */
+/* 0: data type 0xD not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XD
+#define MRV_MIPI_GEN_SHORT_DT_0XD_MASK 0x00000020U
+#define MRV_MIPI_GEN_SHORT_DT_0XD_SHIFT 5U
+/*! Slice: GEN_SHORT_DT_0xC:*/
+/*! 1: generic short packet of data type 0xC received */
+/* 0: data type 0xC not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XC
+#define MRV_MIPI_GEN_SHORT_DT_0XC_MASK 0x00000010U
+#define MRV_MIPI_GEN_SHORT_DT_0XC_SHIFT 4U
+/*! Slice: GEN_SHORT_DT_0xB:*/
+/*! 1: generic short packet of data type 0xB received */
+/* 0: data type 0xB not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XB
+#define MRV_MIPI_GEN_SHORT_DT_0XB_MASK 0x00000008U
+#define MRV_MIPI_GEN_SHORT_DT_0XB_SHIFT 3U
+/*! Slice: GEN_SHORT_DT_0xA:*/
+/*! 1: generic short packet of data type 0xA received */
+/* 0: data type 0xA not received */
+#define MRV_MIPI_GEN_SHORT_DT_0XA
+#define MRV_MIPI_GEN_SHORT_DT_0XA_MASK 0x00000004U
+#define MRV_MIPI_GEN_SHORT_DT_0XA_SHIFT 2U
+/*! Slice: GEN_SHORT_DT_0x9:*/
+/*! 1: generic short packet of data type 0x9 received */
+/* 0: data type 0x9 not received */
+#define MRV_MIPI_GEN_SHORT_DT_0X9
+#define MRV_MIPI_GEN_SHORT_DT_0X9_MASK 0x00000002U
+#define MRV_MIPI_GEN_SHORT_DT_0X9_SHIFT 1U
+/*! Slice: GEN_SHORT_DT_0x8:*/
+/*! 1: generic short packet of data type 0x8 received */
+/* 0: data type 0x8 not received */
+#define MRV_MIPI_GEN_SHORT_DT_0X8
+#define MRV_MIPI_GEN_SHORT_DT_0X8_MASK 0x00000001U
+#define MRV_MIPI_GEN_SHORT_DT_0X8_SHIFT 0U
+/*! Register: mipi_gen_short_8_9: data field for generic short packets of data type 0x8 and 0x9 (0x00000048)*/
+/*! Slice: data_field_9:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0x9 */
+#define MRV_MIPI_DATA_FIELD_9
+#define MRV_MIPI_DATA_FIELD_9_MASK 0xFFFF0000U
+#define MRV_MIPI_DATA_FIELD_9_SHIFT 16U
+/*! Slice: data_field_8:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0x8 */
+#define MRV_MIPI_DATA_FIELD_8
+#define MRV_MIPI_DATA_FIELD_8_MASK 0x0000FFFFU
+#define MRV_MIPI_DATA_FIELD_8_SHIFT 0U
+/*! Register: mipi_gen_short_a_b: data field for generic short packets of data type 0xA and 0xB (0x0000004c)*/
+/*! Slice: data_field_B:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xB */
+#define MRV_MIPI_DATA_FIELD_B
+#define MRV_MIPI_DATA_FIELD_B_MASK 0xFFFF0000U
+#define MRV_MIPI_DATA_FIELD_B_SHIFT 16U
+/*! Slice: data_field_A:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xA */
+#define MRV_MIPI_DATA_FIELD_A
+#define MRV_MIPI_DATA_FIELD_A_MASK 0x0000FFFFU
+#define MRV_MIPI_DATA_FIELD_A_SHIFT 0U
+/*! Register: mipi_gen_short_c_d: data field for generic short packets of data type 0xC and 0xD (0x00000050)*/
+/*! Slice: data_field_D:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xD */
+#define MRV_MIPI_DATA_FIELD_D
+#define MRV_MIPI_DATA_FIELD_D_MASK 0xFFFF0000U
+#define MRV_MIPI_DATA_FIELD_D_SHIFT 16U
+/*! Slice: data_field_C:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xC */
+#define MRV_MIPI_DATA_FIELD_C
+#define MRV_MIPI_DATA_FIELD_C_MASK 0x0000FFFFU
+#define MRV_MIPI_DATA_FIELD_C_SHIFT 0U
+/*! Register: mipi_gen_short_e_f: data field for generic short packets of data type 0xE and 0xF (0x00000054)*/
+/*! Slice: data_field_F:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xF */
+#define MRV_MIPI_DATA_FIELD_F
+#define MRV_MIPI_DATA_FIELD_F_MASK 0xFFFF0000U
+#define MRV_MIPI_DATA_FIELD_F_SHIFT 16U
+/*! Slice: data_field_E:*/
+/*! 16 bit user defined data field from last generic short packet of data type 0xE */
+#define MRV_MIPI_DATA_FIELD_E
+#define MRV_MIPI_DATA_FIELD_E_MASK 0x0000FFFFU
+#define MRV_MIPI_DATA_FIELD_E_SHIFT 0U
+/*! Register: isp_afm_ctrl: This is the control register for AF measurement unit (0x00000000)*/
+/*! Slice: afm_en:*/
+/*! AF measurement enable */
+/* 0: AF measurement is disabled */
+/* 1: AF measurement is enabled */
+/* Writing a 1 to this register starts a new measurement and resets the afm_fin (measurement finished) interrupt to 0.*/
+/* As long as the afm_en is 1, the AFM unit calculates new sharpness values for each frame.*/
+#define MRV_AFM_AFM_EN
+#define MRV_AFM_AFM_EN_MASK 0x00000001U
+#define MRV_AFM_AFM_EN_SHIFT 0U
+/*! Register: isp_afm_lt_a: Top Left corner of measure window A (0x00000004)*/
+/*! Slice: a_h_l:*/
+/*! first pixel of window A (horizontal left row), value must be greater or equal 5 */
+#define MRV_AFM_A_H_L
+#define MRV_AFM_A_H_L_MASK 0x1FFF0000U
+#define MRV_AFM_A_H_L_SHIFT 16U
+/*! Slice: a_v_t:*/
+/*! first line of window A (vertical top line), value must be greater or equal 2 */
+#define MRV_AFM_A_V_T
+#define MRV_AFM_A_V_T_MASK 0x00001FFFU
+#define MRV_AFM_A_V_T_SHIFT 0U
+/*! Register: isp_afm_rb_a: Bottom right corner of measure window A (0x00000008)*/
+/*! Slice: a_h_r:*/
+/*! last pixel of window A (horizontal right row)*/
+#define MRV_AFM_A_H_R
+#define MRV_AFM_A_H_R_MASK 0x1FFF0000U
+#define MRV_AFM_A_H_R_SHIFT 16U
+/*! Slice: a_v_b:*/
+/*! last line of window A (vertical bottom line), value must be lower than (number of lines – 2)*/
+#define MRV_AFM_A_V_B
+#define MRV_AFM_A_V_B_MASK 0x00001FFFU
+#define MRV_AFM_A_V_B_SHIFT 0U
+/*! Register: isp_afm_lt_b: Top left corner of measure window B (0x0000000c)*/
+/*! Slice: b_h_l:*/
+/*! first pixel of window B (horizontal left row), value must be greater or equal 5 */
+#define MRV_AFM_B_H_L
+#define MRV_AFM_B_H_L_MASK 0x1FFF0000U
+#define MRV_AFM_B_H_L_SHIFT 16U
+/*! Slice: b_v_t:*/
+/*! first line of window B (vertical top line), value must be greater or equal 2 */
+#define MRV_AFM_B_V_T
+#define MRV_AFM_B_V_T_MASK 0x00001FFFU
+#define MRV_AFM_B_V_T_SHIFT 0U
+/*! Register: isp_afm_rb_b: Bottom right corner of measure window B (0x00000010)*/
+/*! Slice: b_h_r:*/
+/*! last pixel of window B (horizontal right row)*/
+#define MRV_AFM_B_H_R
+#define MRV_AFM_B_H_R_MASK 0x1FFF0000U
+#define MRV_AFM_B_H_R_SHIFT 16U
+/*! Slice: b_v_b:*/
+/*! last line of window B (vertical bottom line), value must be lower than (number of lines – 2)*/
+#define MRV_AFM_B_V_B
+#define MRV_AFM_B_V_B_MASK 0x00001FFFU
+#define MRV_AFM_B_V_B_SHIFT 0U
+/*! Register: isp_afm_lt_c: Top left corner of measure window C (0x00000014)*/
+/*! Slice: c_h_l:*/
+/*! first pixel of window C (horizontal left row), value must be greater or equal 5 */
+#define MRV_AFM_C_H_L
+#define MRV_AFM_C_H_L_MASK 0x1FFF0000U
+#define MRV_AFM_C_H_L_SHIFT 16U
+/*! Slice: c_v_t:*/
+/*! first line of window C (vertical top line), value must be greater or equal 2 */
+#define MRV_AFM_C_V_T
+#define MRV_AFM_C_V_T_MASK 0x00001FFFU
+#define MRV_AFM_C_V_T_SHIFT 0U
+/*! Register: isp_afm_rb_c: Bottom right corner of measure window C (0x00000018)*/
+/*! Slice: c_h_r:*/
+/*! last pixel of window C (horizontal right row)*/
+#define MRV_AFM_C_H_R
+#define MRV_AFM_C_H_R_MASK 0x1FFF0000U
+#define MRV_AFM_C_H_R_SHIFT 16U
+/*! Slice: c_v_b:*/
+/*! last line of window C (vertical bottom line), value must be lower than (number of lines – 2)*/
+#define MRV_AFM_C_V_B
+#define MRV_AFM_C_V_B_MASK 0x00001FFFU
+#define MRV_AFM_C_V_B_SHIFT 0U
+/*! Register: isp_afm_thres: Threshold register (0x0000001c)*/
+/*! Slice: afm_thres:*/
+/*! AF measurement threshold */
+/* This register defines a threshold which can be used for minimizing the influence of noise in the measurement result.*/
+#define MRV_AFM_AFM_THRES
+#define MRV_AFM_AFM_THRES_MASK 0x0000FFFFU
+#define MRV_AFM_AFM_THRES_SHIFT 0U
+/*! Register: isp_afm_var_shift: Variable shift register (0x00000020)*/
+/*! Slice: lum_var_shift:*/
+/*! variable shift for luminance summation */
+/* The lum_var_shift defines the number of bits for the shift operation of the value of the current pixel before summation. The shift operation is used to avoid a luminance sum overflow.*/
+#define MRV_AFM_LUM_VAR_SHIFT
+#define MRV_AFM_LUM_VAR_SHIFT_MASK 0x00070000U
+#define MRV_AFM_LUM_VAR_SHIFT_SHIFT 16U
+/*! Slice: afm_var_shift:*/
+/*! variable shift for AF measurement */
+/* The afm_var_shift defines the number of bits for the shift operation at the end of the calculation chain. The shift operation is used to avoid an AF measurement sum overflow.*/
+#define MRV_AFM_AFM_VAR_SHIFT
+#define MRV_AFM_AFM_VAR_SHIFT_MASK 0x00000007U
+#define MRV_AFM_AFM_VAR_SHIFT_SHIFT 0U
+/*! Register: isp_afm_sum_a: Sharpness Value Status Register of Window A (0x00000024)*/
+/*! Slice: afm_sum_a:*/
+/*! sharpness value of window A */
+#define MRV_AFM_AFM_SUM_A
+#define MRV_AFM_AFM_SUM_A_MASK 0xFFFFFFFFU
+#define MRV_AFM_AFM_SUM_A_SHIFT 0U
+/*! Register: isp_afm_sum_b: Sharpness Value Status Register of Window B (0x00000028)*/
+/*! Slice: afm_sum_b:*/
+/*! sharpness value of window B */
+#define MRV_AFM_AFM_SUM_B
+#define MRV_AFM_AFM_SUM_B_MASK 0xFFFFFFFFU
+#define MRV_AFM_AFM_SUM_B_SHIFT 0U
+/*! Register: isp_afm_sum_c: Sharpness Value Status Register of Window C (0x0000002c)*/
+/*! Slice: afm_sum_c:*/
+/*! sharpness value of window C */
+#define MRV_AFM_AFM_SUM_C
+#define MRV_AFM_AFM_SUM_C_MASK 0xFFFFFFFFU
+#define MRV_AFM_AFM_SUM_C_SHIFT 0U
+/*! Register: isp_afm_lum_a: Luminance Value Status Register of Window A (0x00000030)*/
+/*! Slice: afm_lum_a:*/
+/*! luminance value of window A */
+#define MRV_AFM_AFM_LUM_A
+#define MRV_AFM_AFM_LUM_A_MASK 0x00FFFFFFU
+#define MRV_AFM_AFM_LUM_A_SHIFT 0U
+/*! Register: isp_afm_lum_b: Luminance Value Status Register of Window B (0x00000034)*/
+/*! Slice: afm_lum_b:*/
+/*! luminance value of window B */
+#define MRV_AFM_AFM_LUM_B
+#define MRV_AFM_AFM_LUM_B_MASK 0x00FFFFFFU
+#define MRV_AFM_AFM_LUM_B_SHIFT 0U
+/*! Register: isp_afm_lum_c: Luminance Value Status Register of Window C (0x00000038)*/
+/*! Slice: afm_lum_c:*/
+/*! luminance value of window C */
+#define MRV_AFM_AFM_LUM_C
+#define MRV_AFM_AFM_LUM_C_MASK 0x00FFFFFFU
+#define MRV_AFM_AFM_LUM_C_SHIFT 0U
+/*! Register: isp_lsc_ctrl: Lens shade control (0x00000000)*/
+/*! Slice: lsc_en:*/
+/*! 0: activation request for lens shading correction */
+/* 1: deactivation reqeust for lens shading correction */
+/* Activation/Deactivation is object of a shadowing mechnism. The current status is visible at ISP_LSC_STATUS::lsc_enable_status */
+#define MRV_LSC_LSC_EN
+#define MRV_LSC_LSC_EN_MASK 0x00000001U
+#define MRV_LSC_LSC_EN_SHIFT 0U
+/*! Register: isp_lsc_r_table_addr: Table RAM Address for red component (0x00000004)*/
+/*! Slice: r_ram_addr:*/
+/*! table address in RAM for samples of the R color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+/* Valid addresses are in the range 0 to 152.*/
+#define MRV_LSC_R_RAM_ADDR
+#define MRV_LSC_R_RAM_ADDR_MASK 0x000001FFU
+#define MRV_LSC_R_RAM_ADDR_SHIFT 0U
+/*! Register: isp_lsc_gr_table_addr: Table RAM Address for green (red) component (0x00000008)*/
+/*! Slice: gr_ram_addr:*/
+/*! table address in RAM for samples of the G_R color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+#define MRV_LSC_GR_RAM_ADDR
+#define MRV_LSC_GR_RAM_ADDR_MASK 0x000001FFU
+#define MRV_LSC_GR_RAM_ADDR_SHIFT 0U
+/*! Register: isp_lsc_b_table_addr: Table RAM Address for blue component (0x0000000c)*/
+/*! Slice: b_ram_addr:*/
+/*! table address in RAM for samples of the B color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+#define MRV_LSC_B_RAM_ADDR
+#define MRV_LSC_B_RAM_ADDR_MASK 0x000001FFU
+#define MRV_LSC_B_RAM_ADDR_SHIFT 0U
+/*! Register: isp_lsc_gb_table_addr: Table RAM Address for green (blue) component (0x00000010)*/
+/*! Slice: gb_ram_addr:*/
+/*! table address in RAM for samples of the G_B color component.*/
+/* Will be automatically incremented by each read or write access to the table.*/
+#define MRV_LSC_GB_RAM_ADDR
+#define MRV_LSC_GB_RAM_ADDR_MASK 0x000001FFU
+#define MRV_LSC_GB_RAM_ADDR_SHIFT 0U
+/*! Register: isp_lsc_r_table_data: Sample table red (0x00000014)*/
+/*! Slice: r_sample_1:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_R_SAMPLE_1
+#define MRV_LSC_R_SAMPLE_1_MASK 0x00FFF000U
+#define MRV_LSC_R_SAMPLE_1_SHIFT 12U
+/*! Slice: r_sample_0:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_R_SAMPLE_0
+#define MRV_LSC_R_SAMPLE_0_MASK 0x00000FFFU
+#define MRV_LSC_R_SAMPLE_0_SHIFT 0U
+/*! Register: isp_lsc_gr_table_data: Sample table green (red) (0x00000018)*/
+/*! Slice: gr_sample_1:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_GR_SAMPLE_1
+#define MRV_LSC_GR_SAMPLE_1_MASK 0x00FFF000U
+#define MRV_LSC_GR_SAMPLE_1_SHIFT 12U
+/*! Slice: gr_sample_0:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_GR_SAMPLE_0
+#define MRV_LSC_GR_SAMPLE_0_MASK 0x00000FFFU
+#define MRV_LSC_GR_SAMPLE_0_SHIFT 0U
+/*! Register: isp_lsc_b_table_data: Sample table blue (0x0000001c)*/
+/*! Slice: b_sample_1:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_B_SAMPLE_1
+#define MRV_LSC_B_SAMPLE_1_MASK 0x00FFF000U
+#define MRV_LSC_B_SAMPLE_1_SHIFT 12U
+/*! Slice: b_sample_0:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_B_SAMPLE_0
+#define MRV_LSC_B_SAMPLE_0_MASK 0x00000FFFU
+#define MRV_LSC_B_SAMPLE_0_SHIFT 0U
+/*! Register: isp_lsc_gb_table_data: Sample table green (blue) (0x00000020)*/
+/*! Slice: gb_sample_1:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_GB_SAMPLE_1
+#define MRV_LSC_GB_SAMPLE_1_MASK 0x00FFF000U
+#define MRV_LSC_GB_SAMPLE_1_SHIFT 12U
+/*! Slice: gb_sample_0:*/
+/*! correction factor at sample point (fixed point number: 2 bits integer with 10-bit fractional part, range 1..3.999)*/
+#define MRV_LSC_GB_SAMPLE_0
+#define MRV_LSC_GB_SAMPLE_0_MASK 0x00000FFFU
+#define MRV_LSC_GB_SAMPLE_0_SHIFT 0U
+/*! Register: isp_lsc_xgrad_01: Gradient table x (0x00000024)*/
+/*! Slice: xgrad_1:*/
+/*! factor for x-gradient calculation of sector 1 */
+#define MRV_LSC_XGRAD_1
+#define MRV_LSC_XGRAD_1_MASK 0x0FFF0000U
+#define MRV_LSC_XGRAD_1_SHIFT 16U
+/*! Slice: xgrad_0:*/
+/*! factor for x-gradient calculation of sector 0 */
+#define MRV_LSC_XGRAD_0
+#define MRV_LSC_XGRAD_0_MASK 0x00000FFFU
+#define MRV_LSC_XGRAD_0_SHIFT 0U
+/*! Register: isp_lsc_xgrad_23: Gradient table x (0x00000028)*/
+/*! Slice: xgrad_3:*/
+/*! factor for x-gradient calculation of sector 3 */
+#define MRV_LSC_XGRAD_3
+#define MRV_LSC_XGRAD_3_MASK 0x0FFF0000U
+#define MRV_LSC_XGRAD_3_SHIFT 16U
+/*! Slice: xgrad_2:*/
+/*! factor for x-gradient calculation of sector 2 */
+#define MRV_LSC_XGRAD_2
+#define MRV_LSC_XGRAD_2_MASK 0x00000FFFU
+#define MRV_LSC_XGRAD_2_SHIFT 0U
+/*! Register: isp_lsc_xgrad_45: Gradient table x (0x0000002c)*/
+/*! Slice: xgrad_5:*/
+/*! factor for x-gradient calculation of sector 5 */
+#define MRV_LSC_XGRAD_5
+#define MRV_LSC_XGRAD_5_MASK 0x0FFF0000U
+#define MRV_LSC_XGRAD_5_SHIFT 16U
+/*! Slice: xgrad_4:*/
+/*! factor for x-gradient calculation of sector 4 */
+#define MRV_LSC_XGRAD_4
+#define MRV_LSC_XGRAD_4_MASK 0x00000FFFU
+#define MRV_LSC_XGRAD_4_SHIFT 0U
+/*! Register: isp_lsc_xgrad_67: Gradient table x (0x00000030)*/
+/*! Slice: xgrad_7:*/
+/*! factor for x-gradient calculation of sector 7 */
+#define MRV_LSC_XGRAD_7
+#define MRV_LSC_XGRAD_7_MASK 0x0FFF0000U
+#define MRV_LSC_XGRAD_7_SHIFT 16U
+/*! Slice: xgrad_6:*/
+/*! factor for x-gradient calculation of sector 6 */
+#define MRV_LSC_XGRAD_6
+#define MRV_LSC_XGRAD_6_MASK 0x00000FFFU
+#define MRV_LSC_XGRAD_6_SHIFT 0U
+/*! Register: isp_lsc_ygrad_01: Gradient table y (0x00000034)*/
+/*! Slice: ygrad_1:*/
+/*! factor for y-gradient calculation of sector 1 */
+#define MRV_LSC_YGRAD_1
+#define MRV_LSC_YGRAD_1_MASK 0x0FFF0000U
+#define MRV_LSC_YGRAD_1_SHIFT 16U
+/*! Slice: ygrad_0:*/
+/*! factor for y-gradient calculation of sector 0 */
+#define MRV_LSC_YGRAD_0
+#define MRV_LSC_YGRAD_0_MASK 0x00000FFFU
+#define MRV_LSC_YGRAD_0_SHIFT 0U
+/*! Register: isp_lsc_ygrad_23: Gradient table y (0x00000038)*/
+/*! Slice: ygrad_3:*/
+/*! factor for y-gradient calculation of sector 3 */
+#define MRV_LSC_YGRAD_3
+#define MRV_LSC_YGRAD_3_MASK 0x0FFF0000U
+#define MRV_LSC_YGRAD_3_SHIFT 16U
+/*! Slice: ygrad_2:*/
+/*! factor for y-gradient calculation of sector 2 */
+#define MRV_LSC_YGRAD_2
+#define MRV_LSC_YGRAD_2_MASK 0x00000FFFU
+#define MRV_LSC_YGRAD_2_SHIFT 0U
+/*! Register: isp_lsc_ygrad_45: Gradient table y (0x0000003c)*/
+/*! Slice: ygrad_5:*/
+/*! factor for y-gradient calculation of sector 5 */
+#define MRV_LSC_YGRAD_5
+#define MRV_LSC_YGRAD_5_MASK 0x0FFF0000U
+#define MRV_LSC_YGRAD_5_SHIFT 16U
+/*! Slice: ygrad_4:*/
+/*! factor for y-gradient calculation of sector 4 */
+#define MRV_LSC_YGRAD_4
+#define MRV_LSC_YGRAD_4_MASK 0x00000FFFU
+#define MRV_LSC_YGRAD_4_SHIFT 0U
+/*! Register: isp_lsc_ygrad_67: Gradient table y (0x00000040)*/
+/*! Slice: ygrad_7:*/
+/*! factor for y-gradient calculation of sector 7 */
+#define MRV_LSC_YGRAD_7
+#define MRV_LSC_YGRAD_7_MASK 0x0FFF0000U
+#define MRV_LSC_YGRAD_7_SHIFT 16U
+/*! Slice: ygrad_6:*/
+/*! factor for y-gradient calculation of sector 6 */
+#define MRV_LSC_YGRAD_6
+#define MRV_LSC_YGRAD_6_MASK 0x00000FFFU
+#define MRV_LSC_YGRAD_6_SHIFT 0U
+/*! Register: isp_lsc_xsize_01: Size table (0x00000044)*/
+/*! Slice: x_sect_size_1:*/
+/*! sector size 1 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_1
+#define MRV_LSC_X_SECT_SIZE_1_MASK 0x03FF0000U
+#define MRV_LSC_X_SECT_SIZE_1_SHIFT 16U
+/*! Slice: x_sect_size_0:*/
+/*! sector size 0 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_0
+#define MRV_LSC_X_SECT_SIZE_0_MASK 0x000003FFU
+#define MRV_LSC_X_SECT_SIZE_0_SHIFT 0U
+/*! Register: isp_lsc_xsize_23: Size table (0x00000048)*/
+/*! Slice: x_sect_size_3:*/
+/*! sector size 3 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_3
+#define MRV_LSC_X_SECT_SIZE_3_MASK 0x03FF0000U
+#define MRV_LSC_X_SECT_SIZE_3_SHIFT 16U
+/*! Slice: x_sect_size_2:*/
+/*! sector size 2 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_2
+#define MRV_LSC_X_SECT_SIZE_2_MASK 0x000003FFU
+#define MRV_LSC_X_SECT_SIZE_2_SHIFT 0U
+/*! Register: isp_lsc_xsize_45: Size table (0x0000004c)*/
+/*! Slice: x_sect_size_5:*/
+/*! sector size 5 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_5
+#define MRV_LSC_X_SECT_SIZE_5_MASK 0x03FF0000U
+#define MRV_LSC_X_SECT_SIZE_5_SHIFT 16U
+/*! Slice: x_sect_size_4:*/
+/*! sector size 4in x-direction */
+#define MRV_LSC_X_SECT_SIZE_4
+#define MRV_LSC_X_SECT_SIZE_4_MASK 0x000003FFU
+#define MRV_LSC_X_SECT_SIZE_4_SHIFT 0U
+/*! Register: isp_lsc_xsize_67: Size table (0x00000050)*/
+/*! Slice: x_sect_size_7:*/
+/*! sector size 7 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_7
+#define MRV_LSC_X_SECT_SIZE_7_MASK 0x03FF0000U
+#define MRV_LSC_X_SECT_SIZE_7_SHIFT 16U
+/*! Slice: x_sect_size_6:*/
+/*! sector size 6 in x-direction */
+#define MRV_LSC_X_SECT_SIZE_6
+#define MRV_LSC_X_SECT_SIZE_6_MASK 0x000003FFU
+#define MRV_LSC_X_SECT_SIZE_6_SHIFT 0U
+/*! Register: isp_lsc_ysize_01: Size table (0x00000054)*/
+/*! Slice: y_sect_size_1:*/
+/*! sector size 1 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_1
+#define MRV_LSC_Y_SECT_SIZE_1_MASK 0x03FF0000U
+#define MRV_LSC_Y_SECT_SIZE_1_SHIFT 16U
+/*! Slice: y_sect_size_0:*/
+/*! sector size 0 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_0
+#define MRV_LSC_Y_SECT_SIZE_0_MASK 0x000003FFU
+#define MRV_LSC_Y_SECT_SIZE_0_SHIFT 0U
+/*! Register: isp_lsc_ysize_23: Size table (0x00000058)*/
+/*! Slice: y_sect_size_3:*/
+/*! sector size 3 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_3
+#define MRV_LSC_Y_SECT_SIZE_3_MASK 0x03FF0000U
+#define MRV_LSC_Y_SECT_SIZE_3_SHIFT 16U
+/*! Slice: y_sect_size_2:*/
+/*! sector size 2 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_2
+#define MRV_LSC_Y_SECT_SIZE_2_MASK 0x000003FFU
+#define MRV_LSC_Y_SECT_SIZE_2_SHIFT 0U
+/*! Register: isp_lsc_ysize_45: Size table (0x0000005c)*/
+/*! Slice: y_sect_size_5:*/
+/*! sector size 5 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_5
+#define MRV_LSC_Y_SECT_SIZE_5_MASK 0x03FF0000U
+#define MRV_LSC_Y_SECT_SIZE_5_SHIFT 16U
+/*! Slice: y_sect_size_4:*/
+/*! sector size 4 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_4
+#define MRV_LSC_Y_SECT_SIZE_4_MASK 0x000003FFU
+#define MRV_LSC_Y_SECT_SIZE_4_SHIFT 0U
+/*! Register: isp_lsc_ysize_67: Size table (0x00000060)*/
+/*! Slice: y_sect_size_7:*/
+/*! sector size 7 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_7
+#define MRV_LSC_Y_SECT_SIZE_7_MASK 0x03FF0000U
+#define MRV_LSC_Y_SECT_SIZE_7_SHIFT 16U
+/*! Slice: y_sect_size_6:*/
+/*! sector size 6 in y-direction */
+#define MRV_LSC_Y_SECT_SIZE_6
+#define MRV_LSC_Y_SECT_SIZE_6_MASK 0x000003FFU
+#define MRV_LSC_Y_SECT_SIZE_6_SHIFT 0U
+/*! Register: isp_lsc_table_sel: Lens shade table set selection (0x00000064)*/
+/*! Slice: table_sel:*/
+/*! 0: next active tables set is table set 0.*/
+/* 1: next active tables set is table set 1.*/
+/* Table selection is object of a shadowing mechnism. The current status is visible at ISP_LSC_STATUS::active_table.*/
+#define MRV_LSC_TABLE_SEL
+#define MRV_LSC_TABLE_SEL_MASK 0x00000001U
+#define MRV_LSC_TABLE_SEL_SHIFT 0U
+/*! Register: isp_lsc_status: Lens shade status (0x00000068)*/
+/*! Slice: active_table:*/
+/*! 0: currently active tables set is table set 0 */
+/* 1: currently active tables set is table set 1 */
+#define MRV_LSC_ACTIVE_TABLE
+#define MRV_LSC_ACTIVE_TABLE_MASK 0x00000002U
+#define MRV_LSC_ACTIVE_TABLE_SHIFT 1U
+/*! Slice: lsc_en_status:*/
+/*! 0: lens shading correction is currently off */
+/* 1: lens shading correction is currently on */
+#define MRV_LSC_LSC_EN_STATUS
+#define MRV_LSC_LSC_EN_STATUS_MASK 0x00000001U
+#define MRV_LSC_LSC_EN_STATUS_SHIFT 0U
+/*! Register: isp_is_ctrl: Image Stabilization Control Register (0x00000000)*/
+/*! Slice: is_en:*/
+/*! 1: image stabilization switched on */
+/* 0: image stabilization switched off */
+#define MRV_IS_IS_EN
+#define MRV_IS_IS_EN_MASK 0x00000001U
+#define MRV_IS_IS_EN_SHIFT 0U
+/*! Register: isp_is_recenter: Recenter register (0x00000004)*/
+/*! Slice: is_recenter:*/
+/*! 000: recenter feature switched off */
+/* 1..7: recentering by (cur_h/v_offs-H/V_OFFS)/2^RECENTER */
+#define MRV_IS_IS_RECENTER
+#define MRV_IS_IS_RECENTER_MASK 0x00000007U
+#define MRV_IS_IS_RECENTER_SHIFT 0U
+/*! Register: isp_is_h_offs: Horizontal offset of output window (0x00000008)*/
+/*! Slice: is_h_offs:*/
+/*! horizontal picture offset in pixel */
+#define MRV_IS_IS_H_OFFS
+#define MRV_IS_IS_H_OFFS_MASK 0x00003FFFU
+#define MRV_IS_IS_H_OFFS_SHIFT 0U
+/*! Register: isp_is_v_offs: Vertical offset of output window (0x0000000c)*/
+/*! Slice: is_v_offs:*/
+/*! vertical picture offset in lines */
+#define MRV_IS_IS_V_OFFS
+#define MRV_IS_IS_V_OFFS_MASK 0x00003FFFU
+#define MRV_IS_IS_V_OFFS_SHIFT 0U
+/*! Register: isp_is_h_size: Output horizontal picture size (0x00000010)*/
+/*! Slice: is_h_size:*/
+/*! horizontal picture size in pixel */
+/* if ISP_MODE is set to */
+/* 001-(ITU-R BT.656 YUV),*/
+/* 010-( ITU-R BT.601 YUV),*/
+/* 011-( ITU-R BT.601 Bayer RGB),*/
+/* 101-( ITU-R BT.656 Bayer RGB)*/
+/* only even numbers are accepted, because complete quadruples of YUYV(YCbYCr) are needed for the following modules. If an odd size is programmed the value will be truncated to even size.*/
+#define MRV_IS_IS_H_SIZE
+#define MRV_IS_IS_H_SIZE_MASK 0x00003FFFU
+#define MRV_IS_IS_H_SIZE_SHIFT 0U
+/*! Register: isp_is_v_size: Output vertical picture size (0x00000014)*/
+/*! Slice: is_v_size:*/
+/*! vertical picture size in lines */
+#define MRV_IS_IS_V_SIZE
+#define MRV_IS_IS_V_SIZE_MASK 0x00003FFFU
+#define MRV_IS_IS_V_SIZE_SHIFT 0U
+/*! Register: isp_is_max_dx: Maximum Horizontal Displacement (0x00000018)*/
+/*! Slice: is_max_dx:*/
+/*! maximum allowed accumulated horizontal displacement in pixels */
+#define MRV_IS_IS_MAX_DX
+#define MRV_IS_IS_MAX_DX_MASK 0x00001FFFU
+#define MRV_IS_IS_MAX_DX_SHIFT 0U
+/*! Register: isp_is_max_dy: Maximum Vertical Displacement (0x0000001c)*/
+/*! Slice: is_max_dy:*/
+/*! maximum allowed accumulated vertical displacement in lines */
+#define MRV_IS_IS_MAX_DY
+#define MRV_IS_IS_MAX_DY_MASK 0x00001FFFU
+#define MRV_IS_IS_MAX_DY_SHIFT 0U
+/*! Register: isp_is_displace: Camera displacement (0x00000020)*/
+/*! Slice: dy:*/
+/*! ISP_IS will compensate for vertical camera displacement of DY lines in the next frame */
+#define MRV_IS_DY
+#define MRV_IS_DY_MASK 0x1FFF0000U
+#define MRV_IS_DY_SHIFT 16U
+/*! Slice: dx:*/
+/*! ISP_IS will compensate for horizontal camera displacement of DX pixels in the next frame */
+#define MRV_IS_DX
+#define MRV_IS_DX_MASK 0x00001FFFU
+#define MRV_IS_DX_SHIFT 0U
+/*! Register: isp_is_h_offs_shd: current horizontal offset of output window (shadow register) (0x00000024)*/
+/*! Slice: is_h_offs_shd:*/
+/*! current horizonatl picture offset in lines */
+#define MRV_IS_IS_H_OFFS_SHD
+#define MRV_IS_IS_H_OFFS_SHD_MASK 0x00003FFFU
+#define MRV_IS_IS_H_OFFS_SHD_SHIFT 0U
+/*! Register: isp_is_v_offs_shd: current vertical offset of output window (shadow register) (0x00000028)*/
+/*! Slice: is_v_offs_shd:*/
+/*! current vertical picture offset in lines */
+#define MRV_IS_IS_V_OFFS_SHD
+#define MRV_IS_IS_V_OFFS_SHD_MASK 0x00003FFFU
+#define MRV_IS_IS_V_OFFS_SHD_SHIFT 0U
+/*! Register: isp_is_h_size_shd: current output horizontal picture size (shadow register) (0x0000002c)*/
+/*! Slice: isp_h_size_shd:*/
+/*! current horizontal picture size in pixel */
+#define MRV_IS_ISP_H_SIZE_SHD
+#define MRV_IS_ISP_H_SIZE_SHD_MASK 0x00003FFFU
+#define MRV_IS_ISP_H_SIZE_SHD_SHIFT 0U
+/*! Register: isp_is_v_size_shd: current output vertical picture size (shadow register) (0x00000030)*/
+/*! Slice: isp_v_size_shd:*/
+/*! vertical picture size in lines */
+#define MRV_IS_ISP_V_SIZE_SHD
+#define MRV_IS_ISP_V_SIZE_SHD_MASK 0x00003FFFU
+#define MRV_IS_ISP_V_SIZE_SHD_SHIFT 0U
+/*! Register: isp_hist_prop: Histogram properties (0x00000000)*/
+/*! Slice: stepsize:*/
+/*! histogram predivider, process every (stepsize)th pixel, all other pixels are skipped */
+/* 0,1,2: not allowed */
+/* 3: process every third input pixel */
+/* 4: process every fourth input pixel */
+/* ...*/
+/* 7FH: process every 127th pixel */
+#define MRV_HIST_STEPSIZE
+#define MRV_HIST_STEPSIZE_MASK 0x000003F8U
+#define MRV_HIST_STEPSIZE_SHIFT 3U
+/*! Slice: hist_mode:*/
+/*! histogram mode, luminance is taken at ISP output before output formatter, RGB is taken at xtalk output */
+/* 7, 6: must not be used */
+/* 5: Y (luminance) histogram */
+/* 4: B histogram */
+/* 3: G histogram */
+/* 2: R histogram */
+/* 1: RGB combined histogram */
+/* 0: disable, no measurements */
+#define MRV_HIST_MODE
+#define MRV_HIST_MODE_MASK 0x00000007U
+#define MRV_HIST_MODE_SHIFT 0U
+/*! Register: isp_hist_h_offs: Histogram window horizontal offset for first window of 25 sub-windows (0x00000004)*/
+/*! Slice: hist_h_offset:*/
+/*! Horizontal offset of first window in pixels.*/
+#define MRV_HIST_H_OFFSET
+#define MRV_HIST_H_OFFSET_MASK 0x00001FFFU
+#define MRV_HIST_H_OFFSET_SHIFT 0U
+/*! Register: isp_hist_v_offs: Histogram window vertical offset for first window of 25 sub-windows (0x00000008)*/
+/*! Slice: hist_v_offset:*/
+/*! Vertical offset of first window in pixels.*/
+#define MRV_HIST_V_OFFSET
+#define MRV_HIST_V_OFFSET_MASK 0x00001FFFU
+#define MRV_HIST_V_OFFSET_SHIFT 0U
+/*! Register: isp_hist_h_size: Horizontal (sub-)window size (0x0000000c)*/
+/*! Slice: hist_h_size:*/
+/*! Horizontal size in pixels of one sub-window, if histogram version 3 is implemented.*/
+#define MRV_HIST_H_SIZE
+#define MRV_HIST_H_SIZE_MASK 0x000007FFU
+#define MRV_HIST_H_SIZE_SHIFT 0U
+/*! Register: isp_hist_v_size: Vertical (sub-)window size (0x00000010)*/
+/*! Slice: hist_v_size:*/
+/*! Vertical size in lines of one sub-window, if histogram version 3 is implemented.*/
+#define MRV_HIST_V_SIZE
+#define MRV_HIST_V_SIZE_MASK 0x000007FFU
+#define MRV_HIST_V_SIZE_SHIFT 0U
+#ifndef ISP_HIST256
+/*! Register array: isp_hist_bin: histogram measurement result bin (0x028 + n*0x4 (n=0..15))*/
+/*! Slice: hist_bin_n:*/
+/* measured bin count as 16-bit unsigned integer value plus 4 bit fractional part */
+#define MRV_HIST_BIN_N
+#define MRV_HIST_BIN_N_MASK 0x000FFFFFU
+#define MRV_HIST_BIN_N_SHIFT 0U
+#else
+/*! Register array: isp_hist_bin: histogram measurement result bin (0x028 + n*0x4 (n=0..15))*/
+/*! Slice: hist_bin_n:*/
+/* measured bin count as 26-bit unsigned integer value plus 4 bit fractional part */
+#define MRV_HIST_BIN_N
+#define MRV_HIST_BIN_N_MASK 0x3FFFFFFFU
+#define MRV_HIST_BIN_N_SHIFT 0U
+#endif
+/*! Register: isp_hist_weight_00to30: Weighting factor for sub-windows (0x00000054)*/
+/*! Slice: hist_weight_30:*/
+/*! weighting factor for sub-window 30 */
+#define MRV_HIST_WEIGHT_30
+#define MRV_HIST_WEIGHT_30_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_30_SHIFT 24U
+/*! Slice: hist_weight_20:*/
+/*! weighting factor for sub-window 20 */
+#define MRV_HIST_WEIGHT_20
+#define MRV_HIST_WEIGHT_20_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_20_SHIFT 16U
+/*! Slice: hist_weight_10:*/
+/*! weighting factor for sub-window 10 */
+#define MRV_HIST_WEIGHT_10
+#define MRV_HIST_WEIGHT_10_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_10_SHIFT 8U
+/*! Slice: hist_weight_00:*/
+/*! weighting factor for sub-window 00 */
+#define MRV_HIST_WEIGHT_00
+#define MRV_HIST_WEIGHT_00_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_00_SHIFT 0U
+/*! Register: isp_hist_weight_40to21: Weighting factor for sub-windows (0x00000058)*/
+/*! Slice: hist_weight_21:*/
+/*! weighting factor for sub-window 21 */
+#define MRV_HIST_WEIGHT_21
+#define MRV_HIST_WEIGHT_21_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_21_SHIFT 24U
+/*! Slice: hist_weight_11:*/
+/*! weighting factor for sub-window 11 */
+#define MRV_HIST_WEIGHT_11
+#define MRV_HIST_WEIGHT_11_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_11_SHIFT 16U
+/*! Slice: hist_weight_01:*/
+/*! weighting factor for sub-window 01 */
+#define MRV_HIST_WEIGHT_01
+#define MRV_HIST_WEIGHT_01_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_01_SHIFT 8U
+/*! Slice: hist_weight_40:*/
+/*! weighting factor for sub-window 40 */
+#define MRV_HIST_WEIGHT_40
+#define MRV_HIST_WEIGHT_40_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_40_SHIFT 0U
+/*! Register: isp_hist_weight_31to12: Weighting factor for sub-windows (0x0000005c)*/
+/*! Slice: hist_weight_12:*/
+/*! weighting factor for sub-window 12 */
+#define MRV_HIST_WEIGHT_12
+#define MRV_HIST_WEIGHT_12_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_12_SHIFT 24U
+/*! Slice: hist_weight_02:*/
+/*! weighting factor for sub-window 02 */
+#define MRV_HIST_WEIGHT_02
+#define MRV_HIST_WEIGHT_02_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_02_SHIFT 16U
+/*! Slice: hist_weight_41:*/
+/*! weighting factor for sub-window 41 */
+#define MRV_HIST_WEIGHT_41
+#define MRV_HIST_WEIGHT_41_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_41_SHIFT 8U
+/*! Slice: hist_weight_31:*/
+/*! weighting factor for sub-window 31 */
+#define MRV_HIST_WEIGHT_31
+#define MRV_HIST_WEIGHT_31_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_31_SHIFT 0U
+/*! Register: isp_hist_weight_22to03: Weighting factor for sub-windows (0x00000060)*/
+/*! Slice: hist_weight_03:*/
+/*! weighting factor for sub-window 03 */
+#define MRV_HIST_WEIGHT_03
+#define MRV_HIST_WEIGHT_03_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_03_SHIFT 24U
+/*! Slice: hist_weight_42:*/
+/*! weighting factor for sub-window 42 */
+#define MRV_HIST_WEIGHT_42
+#define MRV_HIST_WEIGHT_42_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_42_SHIFT 16U
+/*! Slice: hist_weight_32:*/
+/*! weighting factor for sub-window 32 */
+#define MRV_HIST_WEIGHT_32
+#define MRV_HIST_WEIGHT_32_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_32_SHIFT 8U
+/*! Slice: hist_weight_22:*/
+/*! weighting factor for sub-window 22 */
+#define MRV_HIST_WEIGHT_22
+#define MRV_HIST_WEIGHT_22_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_22_SHIFT 0U
+/*! Register: isp_hist_weight_13to43: Weighting factor for sub-windows (0x00000064)*/
+/*! Slice: hist_weight_43:*/
+/*! weighting factor for sub-window 43 */
+#define MRV_HIST_WEIGHT_43
+#define MRV_HIST_WEIGHT_43_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_43_SHIFT 24U
+/*! Slice: hist_weight_33:*/
+/*! weighting factor for sub-window 33 */
+#define MRV_HIST_WEIGHT_33
+#define MRV_HIST_WEIGHT_33_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_33_SHIFT 16U
+/*! Slice: hist_weight_23:*/
+/*! weighting factor for sub-window 23 */
+#define MRV_HIST_WEIGHT_23
+#define MRV_HIST_WEIGHT_23_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_23_SHIFT 8U
+/*! Slice: hist_weight_13:*/
+/*! weighting factor for sub-window 13 */
+#define MRV_HIST_WEIGHT_13
+#define MRV_HIST_WEIGHT_13_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_13_SHIFT 0U
+/*! Register: isp_hist_weight_04to34: Weighting factor for sub-windows (0x00000068)*/
+/*! Slice: hist_weight_34:*/
+/*! weighting factor for sub-window 34 */
+#define MRV_HIST_WEIGHT_34
+#define MRV_HIST_WEIGHT_34_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_34_SHIFT 24U
+/*! Slice: hist_weight_24:*/
+/*! weighting factor for sub-window 24 */
+#define MRV_HIST_WEIGHT_24
+#define MRV_HIST_WEIGHT_24_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_24_SHIFT 16U
+/*! Slice: hist_weight_14:*/
+/*! weighting factor for sub-window 14 */
+#define MRV_HIST_WEIGHT_14
+#define MRV_HIST_WEIGHT_14_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_14_SHIFT 8U
+/*! Slice: hist_weight_04:*/
+/*! weighting factor for sub-window 04 */
+#define MRV_HIST_WEIGHT_04
+#define MRV_HIST_WEIGHT_04_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_04_SHIFT 0U
+/*! Register: isp_hist_weight_44: Weighting factor for sub-windows (0x0000006c)*/
+/*! Slice: hist_weight_44:*/
+/*! weighting factor for sub-window 44 */
+#define MRV_HIST_WEIGHT_44
+#define MRV_HIST_WEIGHT_44_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_44_SHIFT 0U
+/*! Register: isp_filt_mode: mode control register for the filter block (0x00000000)*/
+/*! Slice: stage1_select:*/
+/*! Green filter stage 1 select (range 0x0...0x8)*/
+/* 0x0 maximum blurring */
+/* 0x4 Default */
+/* 0x7 minimum blurring */
+/* 0x8 filter stage1 bypass */
+/* For a detailed description refer to chapter "ISP Filter Programming" of user manual */
+#define MRV_FILT_STAGE1_SELECT
+#define MRV_FILT_STAGE1_SELECT_MASK 0x00000F00U
+#define MRV_FILT_STAGE1_SELECT_SHIFT 8U
+/*! Slice: filt_chr_h_mode:*/
+/*! Chroma filter horizontal mode */
+/* 00 horizontal chroma filter bypass */
+/* 01 horizontal chroma filter 1 static mask =[10 12 10]*/
+/* 10 horizontal chroma filter 2 (dynamic blur1)*/
+/* 11 horizontal chroma filter 3 (dynamic blur2) Default */
+#define MRV_FILT_FILT_CHR_H_MODE
+#define MRV_FILT_FILT_CHR_H_MODE_MASK 0x000000C0U
+#define MRV_FILT_FILT_CHR_H_MODE_SHIFT 6U
+/*! Slice: filt_chr_v_mode:*/
+/*! Chroma filter vertical mode */
+/* 00 vertical chroma filter bypass */
+/* 01 vertical chroma filter 1 static[8 16 8]*/
+/* 10 vertical chroma filter 2 static[10 12 10]*/
+/* 11 vertical chroma filter 3 static[12 8 12] Default */
+#define MRV_FILT_FILT_CHR_V_MODE
+#define MRV_FILT_FILT_CHR_V_MODE_MASK 0x00000030U
+#define MRV_FILT_FILT_CHR_V_MODE_SHIFT 4U
+/*! Slice: filt_mode:*/
+/*! 0 green filter static mode (active filter factor = FILT_FAC_MID)*/
+/* 1 dynamic noise reduction/sharpen Default */
+#define MRV_FILT_FILT_MODE
+#define MRV_FILT_FILT_MODE_MASK 0x00000002U
+#define MRV_FILT_FILT_MODE_SHIFT 1U
+/*! Slice: filt_enable:*/
+/*! 1 enable filter */
+/* 0 bypass filter Default */
+#define MRV_FILT_FILT_ENABLE
+#define MRV_FILT_FILT_ENABLE_MASK 0x00000001U
+#define MRV_FILT_FILT_ENABLE_SHIFT 0U
+/*! Register: isp_filt_thresh_bl0: Blurring threshold 0 (0x00000028)*/
+/*! Slice: filt_thresh_bl0:*/
+/*! If filt_thresh_bl1 < sum_grad < filt_thresh_bl0 then filt_fac_bl0 is selected */
+#define MRV_FILT_FILT_THRESH_BL0
+#define MRV_FILT_FILT_THRESH_BL0_MASK 0x000003FFU
+#define MRV_FILT_FILT_THRESH_BL0_SHIFT 0U
+/*! Register: isp_filt_thresh_bl1: Blurring threshold 1 (0x0000002c)*/
+/*! Slice: filt_thresh_bl1:*/
+/*! If sum_grad < filt_thresh_bl1 then filt_fac_bl1 is selected */
+#define MRV_FILT_FILT_THRESH_BL1
+#define MRV_FILT_FILT_THRESH_BL1_MASK 0x000003FFU
+#define MRV_FILT_FILT_THRESH_BL1_SHIFT 0U
+/*! Register: isp_filt_thresh_sh0: Sharpening threshold 0 (0x00000030)*/
+/*! Slice: filt_thresh_sh0:*/
+/*! If filt_thresh_sh0 < sum_grad < filt_thresh_sh1 then filt_thresh_sh0 is selected */
+#define MRV_FILT_FILT_THRESH_SH0
+#define MRV_FILT_FILT_THRESH_SH0_MASK 0x000003FFU
+#define MRV_FILT_FILT_THRESH_SH0_SHIFT 0U
+/*! Register: isp_filt_thresh_sh1: Sharpening threshold 1 (0x00000034)*/
+/*! Slice: filt_thresh_sh1:*/
+/*! If filt_thresh_sh1 < sum_grad then filt_thresh_sh1 is selected */
+#define MRV_FILT_FILT_THRESH_SH1
+#define MRV_FILT_FILT_THRESH_SH1_MASK 0x000003FFU
+#define MRV_FILT_FILT_THRESH_SH1_SHIFT 0U
+/*! Register: isp_filt_lum_weight: Parameters for luminance weight function (0x00000038)*/
+/*! Slice: lum_weight_gain:*/
+/*! Gain select of luminance weight function */
+#define MRV_FILT_LUM_WEIGHT_GAIN
+#define MRV_FILT_LUM_WEIGHT_GAIN_MASK 0x00070000U
+#define MRV_FILT_LUM_WEIGHT_GAIN_SHIFT 16U
+/*! Slice: lum_weight_kink:*/
+/*! Kink position of luminance weight function */
+#define MRV_FILT_LUM_WEIGHT_KINK
+#define MRV_FILT_LUM_WEIGHT_KINK_MASK 0x0000FF00U
+#define MRV_FILT_LUM_WEIGHT_KINK_SHIFT 8U
+/*! Slice: lum_weight_min:*/
+/*! Minimum value of luminance weight function */
+#define MRV_FILT_LUM_WEIGHT_MIN
+#define MRV_FILT_LUM_WEIGHT_MIN_MASK 0x000000FFU
+#define MRV_FILT_LUM_WEIGHT_MIN_SHIFT 0U
+/*! Register: isp_filt_fac_sh1: filter factor sharp1 (0x0000003c)*/
+/*! Slice: filt_fac_sh1:*/
+/*! Filter factor for sharp1 level */
+#define MRV_FILT_FILT_FAC_SH1
+#define MRV_FILT_FILT_FAC_SH1_MASK 0x0000003FU
+#define MRV_FILT_FILT_FAC_SH1_SHIFT 0U
+/*! Register: isp_filt_fac_sh0: filter factor sharp0 (0x00000040)*/
+/*! Slice: filt_fac_sh0:*/
+/*! Filter factor for sharp0 level */
+#define MRV_FILT_FILT_FAC_SH0
+#define MRV_FILT_FILT_FAC_SH0_MASK 0x0000003FU
+#define MRV_FILT_FILT_FAC_SH0_SHIFT 0U
+/*! Register: isp_filt_fac_mid: filter factor middle (0x00000044)*/
+/*! Slice: filt_fac_mid:*/
+/*! Filter factor for mid level and for static filter mode */
+#define MRV_FILT_FILT_FAC_MID
+#define MRV_FILT_FILT_FAC_MID_MASK 0x0000003FU
+#define MRV_FILT_FILT_FAC_MID_SHIFT 0U
+/*! Register: isp_filt_fac_bl0: Parameter for blur 0 filter (0x00000048)*/
+/*! Slice: filt_fac_bl0:*/
+/*! Filter factor for blur 0 level */
+#define MRV_FILT_FILT_FAC_BL0
+#define MRV_FILT_FILT_FAC_BL0_MASK 0x0000003FU
+#define MRV_FILT_FILT_FAC_BL0_SHIFT 0U
+/*! Register: isp_filt_fac_bl1: Parameter for blur 1 filter (0x0000004c)*/
+/*! Slice: filt_fac_bl1:*/
+/*! Filter factor for blur 1 level (max blur)*/
+#define MRV_FILT_FILT_FAC_BL1
+#define MRV_FILT_FILT_FAC_BL1_MASK 0x0000003FU
+#define MRV_FILT_FILT_FAC_BL1_SHIFT 0U
+/*! Register: isp_cac_ctrl: Control register for chromatic aberration correction (0x00000000)*/
+/*! Slice: h_clip_mode:*/
+/*! Defines the maximum red/blue pixel shift in horizontal direction At pixel positions, that require a larger displacement, the maximum shift value is used instead (vector clipping)*/
+/* 0: Set horizontal vector clipping to +/-4 pixel displacement (Default)*/
+/* 1: Set horizontal vector clipping to +/-4 or +/-5 pixel displacement depending on pixel position inside the Bayer raster (dynamic switching between +/-4 and +/-5)*/
+#define MRV_CAC_H_CLIP_MODE
+#define MRV_CAC_H_CLIP_MODE_MASK 0x00000008U
+#define MRV_CAC_H_CLIP_MODE_SHIFT 3U
+/*! Slice: v_clip_mode:*/
+/*! Defines the maximum red/blue pixel shift in vertical direction */
+/* 00: Set vertical vector clipping to +/-2 pixel ; fix filter_enable (Default)*/
+/* 01: Set vertical vector clipping to +/-3 pixel; dynamic filter_enable for chroma low pass filter */
+/* 10: Set vertical vector clipping +/-3 or +/-4 pixel displacement depending on pixel position inside the Bayer raster (dynamic switching between +/-3 and +/-4)*/
+/* 11: reserved */
+#define MRV_CAC_V_CLIP_MODE
+#define MRV_CAC_V_CLIP_MODE_MASK 0x00000006U
+#define MRV_CAC_V_CLIP_MODE_SHIFT 1U
+/*! Slice: cac_en:*/
+/*! 0: chromatic aberration correction off */
+/* 1: chromatic aberration correction on */
+#define MRV_CAC_CAC_EN
+#define MRV_CAC_CAC_EN_MASK 0x00000001U
+#define MRV_CAC_CAC_EN_SHIFT 0U
+/*! Register: isp_cac_count_start: Preload values for CAC pixel and line counter (0x00000004)*/
+/*! Slice: v_count_start:*/
+/*! 13 bit v_count preload value (range 8191 ... 1) of the vertical CAC line counter. Before frame start v_count has to be preloaded with (v_size/2 + v_center_offset), with */
+/* v_size the image height and */
+/* v_center_offset the vertical distance between image center and optical center.*/
+     /**/
+/* After frame start the v_count decrements with every line until a value of zero is reached for the line in the optical center. Than the v_sign bit toggles and the v_counter decrements with every line until end of frame.*/
+#define MRV_CAC_V_COUNT_START
+#define MRV_CAC_V_COUNT_START_MASK 0x1FFF0000U
+#define MRV_CAC_V_COUNT_START_SHIFT 16U
+/*! Slice: h_count_start:*/
+/*! 13 bit h_count preload value (range 8191 .. 1) of the horizontal CAC pixel counter. Before line start h_count has to be preloaded with (h_size/2 + h_center_offset), with */
+/* h_size the image width and */
+/* h_center_offset the horizontal distance between image center and optical center.*/
+     /**/
+/* After line start the h_count decrements with every pixel until a value of zero is reached for the column in the optical center. Than the h_sign bit toggles and the h_counter increments with every pixel until end of line.*/
+#define MRV_CAC_H_COUNT_START
+#define MRV_CAC_H_COUNT_START_MASK 0x00001FFFU
+#define MRV_CAC_H_COUNT_START_SHIFT 0U
+/*! Register: isp_cac_a: Linear Parameters for radial shift calculation (0x00000008)*/
+/*! Slice: A_Blue:*/
+/*! Parameter A_Blue for radial blue shift calculation, according to */
+/*(A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_A_BLUE
+#define MRV_CAC_A_BLUE_MASK 0x01FF0000U
+#define MRV_CAC_A_BLUE_SHIFT 16U
+/*! Slice: A_Red:*/
+/*! Parameter A_Red for radial red shift calculation, according to */
+/*(A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_A_RED
+#define MRV_CAC_A_RED_MASK 0x000001FFU
+#define MRV_CAC_A_RED_SHIFT 0U
+/*! Register: isp_cac_b: Square Parameters for radial shift calculation (0x0000000c)*/
+/*! Slice: B_Blue:*/
+/*! Parameter B_Blue for radial blue shift calculation, according to */
+/*(A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_B_BLUE
+#define MRV_CAC_B_BLUE_MASK 0x01FF0000U
+#define MRV_CAC_B_BLUE_SHIFT 16U
+/*! Slice: B_Red:*/
+/*! Parameter B_Red for radial red shift calculation, according to */
+/*(A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_B_RED
+#define MRV_CAC_B_RED_MASK 0x000001FFU
+#define MRV_CAC_B_RED_SHIFT 0U
+/*! Register: isp_cac_c: Cubical Parameters for radial shift calculation (0x00000010)*/
+/*! Slice: C_Blue:*/
+/*! Parameter C_Blue for radial blue shift calculation, according to */
+/*(A_Blue * r  + B_Blue * r^2 + C_Blue * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_C_BLUE
+#define MRV_CAC_C_BLUE_MASK 0x01FF0000U
+#define MRV_CAC_C_BLUE_SHIFT 16U
+/*! Slice: C_Red:*/
+/*! Parameter C_Red for radial red shift calculation, according to */
+/*(A_Red * r + B_Red * r^2 + C_Red * r^3).*/
+/* It is a 9 bit twos complement integer with 4 fractional digits value and value range from -16 up to 15.9375.*/
+#define MRV_CAC_C_RED
+#define MRV_CAC_C_RED_MASK 0x000001FFU
+#define MRV_CAC_C_RED_SHIFT 0U
+/*! Register: isp_cac_x_norm: Normalization parameters for calculation of image coordinate x_d relative to optical center (0x00000014)*/
+/*! Slice: x_ns:*/
+/*! Horizontal normalization shift parameter x_ns (4 bit unsigned integer) in equation */
+/* x_d[7:0] = (((h_count <% 4) %> x_ns) * x_nf) >> 5 */
+#define MRV_CAC_X_NS
+#define MRV_CAC_X_NS_MASK 0x000F0000U
+#define MRV_CAC_X_NS_SHIFT 16U
+/*! Slice: x_nf:*/
+/*! Horizontal scaling or normalization factor x_nf (5 bit unsigned integer) range 0 .. 31 in equation */
+/* x_d[7:0] = (((h_count <% 4) %> x_ns) * x_nf) >> 5 */
+#define MRV_CAC_X_NF
+#define MRV_CAC_X_NF_MASK 0x0000001FU
+#define MRV_CAC_X_NF_SHIFT 0U
+/*! Register: isp_cac_y_norm: Normalization parameters for calculation of image coordinate y_d relative to optical center (0x00000018)*/
+/*! Slice: y_ns:*/
+/*! Vertical normalization shift parameter y_ns (4 bit unsigned integer) in equation */
+/* y_d[7:0] = (((v_count <% 4) %> y_ns) * y_nf) >> 5 */
+#define MRV_CAC_Y_NS
+#define MRV_CAC_Y_NS_MASK 0x000F0000U
+#define MRV_CAC_Y_NS_SHIFT 16U
+/*! Slice: y_nf:*/
+/*! Vertical scaling or normalization factor y_nf (5 bit unsigned integer) range 0 .. 31 in equation */
+/* y_d[7:0] = (((v_count <% 4) %> y_ns) * y_nf) >> 5 */
+#define MRV_CAC_Y_NF
+#define MRV_CAC_Y_NF_MASK 0x0000001FU
+#define MRV_CAC_Y_NF_SHIFT 0U
+/*! Register: isp_exp_ctrl: Exposure control (0x00000000)*/
+/*! Slice: exp_meas_mode:*/
+/*! '1' luminance calculation according to */
+/* Y=(R+G+B) x 0.332 (85/256)*/
+/* '0' luminance calculation according to Y=16+0.25R+0.5G+0.1094B */
+#define MRV_AE_EXP_MEAS_MODE
+#define MRV_AE_EXP_MEAS_MODE_MASK 0x80000000U
+#define MRV_AE_EXP_MEAS_MODE_SHIFT 31U
+/*! Slice: autostop:*/
+/*! '1' stop measuring after a complete frame */
+/* '0' continous measurement */
+#define MRV_AE_AUTOSTOP
+#define MRV_AE_AUTOSTOP_MASK 0x00000002U
+#define MRV_AE_AUTOSTOP_SHIFT 1U
+/*! Slice: exp_start:*/
+/*! '1' start measuring a frame. The exp block will reset this bit and halt after completing one frame, if bit "autostop" is set to '1'.*/
+#define MRV_AE_EXP_START
+#define MRV_AE_EXP_START_MASK 0x00000001U
+#define MRV_AE_EXP_START_SHIFT 0U
+/*! Register: isp_exp_h_offset: Horizontal offset for first block (0x00000004)*/
+/*! Slice: isp_exp_h_offset:*/
+/*! Horizontal offset of first block in pixels.*/
+/* 0 <= value <= 2424 */
+#define MRV_AE_ISP_EXP_H_OFFSET
+#define MRV_AE_ISP_EXP_H_OFFSET_MASK 0x00001FFFU
+#define MRV_AE_ISP_EXP_H_OFFSET_SHIFT 0U
+/*! Register: isp_exp_v_offset: Vertical offset for first block (0x00000008)*/
+/*! Slice: isp_exp_v_offset:*/
+/*! Vertical offset of first block in pixels.*/
+/* 0 <= value <= 1806 */
+#define MRV_AE_ISP_EXP_V_OFFSET
+#define MRV_AE_ISP_EXP_V_OFFSET_MASK 0x00001FFFU
+#define MRV_AE_ISP_EXP_V_OFFSET_SHIFT 0U
+/*! Register: isp_exp_h_size: Horizontal size of one block (0x0000000c)*/
+/*! Slice: isp_exp_h_size:*/
+/*! Horizontal size in pixels of one block.*/
+/* 35 <= value <= 516 */
+#define MRV_AE_ISP_EXP_H_SIZE
+#define MRV_AE_ISP_EXP_H_SIZE_MASK 0x000007FFU
+#define MRV_AE_ISP_EXP_H_SIZE_SHIFT 0U
+/*! Register: isp_exp_v_size: Vertical size of one block (0x00000010)*/
+/*! Slice: isp_exp_v_size:*/
+/*! Vertical size in pixels of one block.*/
+/* 28 <= value <= 390 */
+#define MRV_AE_ISP_EXP_V_SIZE
+#define MRV_AE_ISP_EXP_V_SIZE_MASK 0x000007FEU
+#define MRV_AE_ISP_EXP_V_SIZE_SHIFT 0U
+/*! Register: isp_exp_mean_00: Mean luminance value of block 00 (0x00000014)*/
+/*! Slice: isp_exp_mean_00:*/
+/*! Mean luminance value of block 00 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_00
+#define MRV_AE_ISP_EXP_MEAN_00_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_00_SHIFT 0U
+/*! Register: isp_exp_mean_10: Mean luminance value of block 10 (0x00000018)*/
+/*! Slice: isp_exp_mean_10:*/
+/*! Mean luminance value of block 10 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_10
+#define MRV_AE_ISP_EXP_MEAN_10_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_10_SHIFT 0U
+/*! Register: isp_exp_mean_20: Mean luminance value of block 20 (0x0000001c)*/
+/*! Slice: isp_exp_mean_20:*/
+/*! Mean luminance value of block 20 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_20
+#define MRV_AE_ISP_EXP_MEAN_20_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_20_SHIFT 0U
+/*! Register: isp_exp_mean_30: Mean luminance value of block 30 (0x00000020)*/
+/*! Slice: isp_exp_mean_30:*/
+/*! Mean luminance value of block 30 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_30
+#define MRV_AE_ISP_EXP_MEAN_30_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_30_SHIFT 0U
+/*! Register: isp_exp_mean_40: Mean luminance value of block 40 (0x00000024)*/
+/*! Slice: isp_exp_mean_40:*/
+/*! Mean luminance value of block 40 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_40
+#define MRV_AE_ISP_EXP_MEAN_40_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_40_SHIFT 0U
+/*! Register: isp_exp_mean_01: Mean luminance value of block 01 (0x00000028)*/
+/*! Slice: isp_exp_mean_01:*/
+/*! Mean luminance value of block 01 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_01
+#define MRV_AE_ISP_EXP_MEAN_01_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_01_SHIFT 0U
+/*! Register: isp_exp_mean_11: Mean luminance value of block 11 (0x0000002c)*/
+/*! Slice: isp_exp_mean_11:*/
+/*! Mean luminance value of block 11 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_11
+#define MRV_AE_ISP_EXP_MEAN_11_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_11_SHIFT 0U
+/*! Register: isp_exp_mean_21: Mean luminance value of block 21 (0x00000030)*/
+/*! Slice: isp_exp_mean_21:*/
+/*! Mean luminance value of block 21 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_21
+#define MRV_AE_ISP_EXP_MEAN_21_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_21_SHIFT 0U
+/*! Register: isp_exp_mean_31: Mean luminance value of block 31 (0x00000034)*/
+/*! Slice: isp_exp_mean_31:*/
+/*! Mean luminance value of block 31 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_31
+#define MRV_AE_ISP_EXP_MEAN_31_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_31_SHIFT 0U
+/*! Register: isp_exp_mean_41: Mean luminance value of block 41 (0x00000038)*/
+/*! Slice: isp_exp_mean_41:*/
+/*! Mean luminance value of block 41 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_41
+#define MRV_AE_ISP_EXP_MEAN_41_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_41_SHIFT 0U
+/*! Register: isp_exp_mean_02: Mean luminance value of block 02 (0x0000003c)*/
+/*! Slice: isp_exp_mean_02:*/
+/*! Mean luminance value of block 02 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_02
+#define MRV_AE_ISP_EXP_MEAN_02_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_02_SHIFT 0U
+/*! Register: isp_exp_mean_12: Mean luminance value of block 12 (0x00000040)*/
+/*! Slice: isp_exp_mean_12:*/
+/*! Mean luminance value of block 12 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_12
+#define MRV_AE_ISP_EXP_MEAN_12_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_12_SHIFT 0U
+/*! Register: isp_exp_mean_22: Mean luminance value of block 22 (0x00000044)*/
+/*! Slice: isp_exp_mean_22:*/
+/*! Mean luminance value of block 22 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_22
+#define MRV_AE_ISP_EXP_MEAN_22_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_22_SHIFT 0U
+/*! Register: isp_exp_mean_32: Mean luminance value of block 32 (0x00000048)*/
+/*! Slice: isp_exp_mean_32:*/
+/*! Mean luminance value of block 32 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_32
+#define MRV_AE_ISP_EXP_MEAN_32_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_32_SHIFT 0U
+/*! Register: isp_exp_mean_42: Mean luminance value of block 42 (0x0000004c)*/
+/*! Slice: isp_exp_mean_42:*/
+/*! Mean luminance value of block 42 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_42
+#define MRV_AE_ISP_EXP_MEAN_42_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_42_SHIFT 0U
+/*! Register: isp_exp_mean_03: Mean luminance value of block 03 (0x00000050)*/
+/*! Slice: isp_exp_mean_03:*/
+/*! Mean luminance value of block 03 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_03
+#define MRV_AE_ISP_EXP_MEAN_03_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_03_SHIFT 0U
+/*! Register: isp_exp_mean_13: Mean luminance value of block 13 (0x00000054)*/
+/*! Slice: isp_exp_mean_13:*/
+/*! Mean luminance value of block 13 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_13
+#define MRV_AE_ISP_EXP_MEAN_13_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_13_SHIFT 0U
+/*! Register: isp_exp_mean_23: Mean luminance value of block 23 (0x00000058)*/
+/*! Slice: isp_exp_mean_23:*/
+/*! Mean luminance value of block 23 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_23
+#define MRV_AE_ISP_EXP_MEAN_23_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_23_SHIFT 0U
+/*! Register: isp_exp_mean_33: Mean luminance value of block 33 (0x0000005c)*/
+/*! Slice: isp_exp_mean_33:*/
+/*! Mean luminance value of block 33 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_33
+#define MRV_AE_ISP_EXP_MEAN_33_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_33_SHIFT 0U
+/*! Register: isp_exp_mean_43: Mean luminance value of block 43 (0x00000060)*/
+/*! Slice: isp_exp_mean_43:*/
+/*! Mean luminance value of block 43 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_43
+#define MRV_AE_ISP_EXP_MEAN_43_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_43_SHIFT 0U
+/*! Register: isp_exp_mean_04: Mean luminance value of block 04 (0x00000064)*/
+/*! Slice: isp_exp_mean_04:*/
+/*! Mean luminance value of block 04 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_04
+#define MRV_AE_ISP_EXP_MEAN_04_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_04_SHIFT 0U
+/*! Register: isp_exp_mean_14: Mean luminance value of block 14 (0x00000068)*/
+/*! Slice: isp_exp_mean_14:*/
+/*! Mean luminance value of block 14 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_14
+#define MRV_AE_ISP_EXP_MEAN_14_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_14_SHIFT 0U
+/*! Register: isp_exp_mean_24: Mean luminance value of block 24 (0x0000006c)*/
+/*! Slice: isp_exp_mean_24:*/
+/*! Mean luminance value of block 24 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_24
+#define MRV_AE_ISP_EXP_MEAN_24_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_24_SHIFT 0U
+/*! Register: isp_exp_mean_34: Mean luminance value of block 34 (0x00000070)*/
+/*! Slice: isp_exp_mean_34:*/
+/*! Mean luminance value of block 34 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_34
+#define MRV_AE_ISP_EXP_MEAN_34_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_34_SHIFT 0U
+/*! Register: isp_exp_mean_44: Mean luminance value of block 44 (0x00000074)*/
+/*! Slice: isp_exp_mean_44:*/
+/*! Mean luminance value of block 44 (x,y)*/
+#define MRV_AE_ISP_EXP_MEAN_44
+#define MRV_AE_ISP_EXP_MEAN_44_MASK 0x000000FFU
+#define MRV_AE_ISP_EXP_MEAN_44_SHIFT 0U
+/*! Register: isp_expv2_ctrl: (0x00002680)*/
+/*! Slice: isp_expv2_ctrl:*/
+#define MRV_AE_ISP_EXPV2_INPUT_SELECT
+#define MRV_AE_ISP_EXPV2_INPUT_SELECT_MASK 0x0000000CU
+#define MRV_AE_ISP_EXPV2_INPUT_SELECT_SHIFT 2U
+#define MRV_AE_ISP_EXPV2_AUTO_STOP
+#define MRV_AE_ISP_EXPV2_AUTO_STOP_MASK 0x00000002U
+#define MRV_AE_ISP_EXPV2_AUTO_STOP_SHIFT 1U
+#define MRV_AE_ISP_EXPV2_ENABLE
+#define MRV_AE_ISP_EXPV2_ENABLE_MASK 0x00000001U
+#define MRV_AE_ISP_EXPV2_ENABLE_SHIFT 0U
+/*! Register: isp_expv2_offset: (0x00002684)*/
+/*! Slice: isp_expv2_offset:*/
+#define MRV_AE_ISP_EXPV2_OFFSET_V
+#define MRV_AE_ISP_EXPV2_OFFSET_V_MASK 0x1FFF0000U
+#define MRV_AE_ISP_EXPV2_OFFSET_V_SHIFT 16U
+#define MRV_AE_ISP_EXPV2_OFFSET_H
+#define MRV_AE_ISP_EXPV2_OFFSET_H_MASK 0x00001FFFU
+#define MRV_AE_ISP_EXPV2_OFFSET_H_SHIFT 0
+/*! Register: isp_expv2_size: (0x00002688)*/
+/*! Slice: isp_expv2_size:*/
+#define MRV_AE_ISP_EXPV2_SIZE_V
+#define MRV_AE_ISP_EXPV2_SIZE_V_MASK 0x01FF0000U
+#define MRV_AE_ISP_EXPV2_SIZE_V_SHIFT 16U
+#define MRV_AE_ISP_EXPV2_SIZE_H
+#define MRV_AE_ISP_EXPV2_SIZE_H_MASK 0x000001FFU
+#define MRV_AE_ISP_EXPV2_SIZE_H_SHIFT 0U
+/*! Register: isp_expv2_size_invert: (0x0000268c)*/
+/*! Slice: isp_expv2_size_invert:*/
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_V
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_V_MASK 0xFFFF0000U
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_V_SHIFT 16U
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_H
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_H_MASK 0x0000FFFFU
+#define MRV_AE_ISP_EXPV2_SIZE_INVERT_H_SHIFT 0U
+/*! Register: isp_expv2_pixel_weight: (0x00002690)*/
+/*! Slice: isp_expv2_pixel_weight:*/
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_R
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_R_MASK 0x3F000000U
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_R_SHIFT 24U
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GR
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GR_MASK 0x003F0000U
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GR_SHIFT 16
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GB
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GB_MASK 0x00003F00U
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_GB_SHIFT 8U
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_B
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_B_MASK 0x0000003FU
+#define MRV_AE_ISP_EXPV2_PIX_WEIGHT_B_SHIFT 0U
+/*! Register: isp_bls_ctrl: global control register (0x00000000)*/
+/*! Slice: WINDOW_ENABLE:*/
+/*! 0: no measuring is performed */
+/* 1: only window 1 is measured */
+/* 2: only window 2 is measured */
+/* 3: both windows are measured */
+#define MRV_BLS_WINDOW_ENABLE
+#define MRV_BLS_WINDOW_ENABLE_MASK 0x0000000CU
+#define MRV_BLS_WINDOW_ENABLE_SHIFT 2U
+/*! Slice: BLS_MODE:*/
+/*! 1: subtract measured values */
+/* 0: subtract fixed values */
+#define MRV_BLS_BLS_MODE
+#define MRV_BLS_BLS_MODE_MASK 0x00000002U
+#define MRV_BLS_BLS_MODE_SHIFT 1U
+/*! Slice: BLS_ENABLE:*/
+/*! 1: black level subtraction is enabled */
+/* 0: bypass the black level processing */
+#define MRV_BLS_BLS_ENABLE
+#define MRV_BLS_BLS_ENABLE_MASK 0x00000001U
+#define MRV_BLS_BLS_ENABLE_SHIFT 0U
+/*! Register: isp_bls_samples: samples register (0x00000004)*/
+/*! Slice: BLS_SAMPLES:*/
+/*! This number to the power of two gives the number of measure samples for each Bayer position. Range 0x00: 2^0=1  to  0x12: 2^18=262144. This number is also the divider for the accumulator for each Bayer position.*/
+/* The accumulation will be stopped, if the number of measured pixels for the current Bayer position is equal to the number of samples.*/
+/* The measure windows must be positioned that way that the number of included pixels of each Bayer position included by both windows is equal or greater than the number of measure samples calculated by 2^BLS_SAMPLES !*/
+/* NOTE: The number of pixels of one Bayer position is 1/4 of the number of all Pixels included by the measure windows.*/
+#define MRV_BLS_BLS_SAMPLES
+#define MRV_BLS_BLS_SAMPLES_MASK 0x0000001FU
+#define MRV_BLS_BLS_SAMPLES_SHIFT 0U
+/*! Register: isp_bls_h1_start: window 1 horizontal start (0x00000008)*/
+/*! Slice: BLS_H1_START:*/
+/*! Black pixel window 1 horizontal start position */
+#define MRV_BLS_BLS_H1_START
+#define MRV_BLS_BLS_H1_START_MASK 0x00003FFFU
+#define MRV_BLS_BLS_H1_START_SHIFT 0U
+/*! Register: isp_bls_h1_stop: window 1 horizontal stop (0x0000000c)*/
+/*! Slice: BLS_H1_STOP:*/
+/*! Black pixel window 1 horizontal stop position */
+#define MRV_BLS_BLS_H1_STOP
+#define MRV_BLS_BLS_H1_STOP_MASK 0x00003FFFU
+#define MRV_BLS_BLS_H1_STOP_SHIFT 0U
+/*! Register: isp_bls_v1_start: window 1 vertical start (0x00000010)*/
+/*! Slice: BLS_V1_START:*/
+/*! Black pixel window 1 vertical start position */
+#define MRV_BLS_BLS_V1_START
+#define MRV_BLS_BLS_V1_START_MASK 0x00003FFFU
+#define MRV_BLS_BLS_V1_START_SHIFT 0U
+/*! Register: isp_bls_v1_stop: window 1 vertical stop (0x00000014)*/
+/*! Slice: BLS_V1_STOP:*/
+/*! Black pixel window 1 vertical stop position */
+#define MRV_BLS_BLS_V1_STOP
+#define MRV_BLS_BLS_V1_STOP_MASK 0x00003FFFU
+#define MRV_BLS_BLS_V1_STOP_SHIFT 0U
+/*! Register: isp_bls_h2_start: window 2 horizontal start (0x00000018)*/
+/*! Slice: BLS_H2_START:*/
+/*! Black pixel window 2 horizontal start position */
+#define MRV_BLS_BLS_H2_START
+#define MRV_BLS_BLS_H2_START_MASK 0x00003FFFU
+#define MRV_BLS_BLS_H2_START_SHIFT 0U
+/*! Register: isp_bls_h2_stop: window 2 horizontal stop (0x0000001c)*/
+/*! Slice: BLS_H2_STOP:*/
+/*! Black pixel window 2 horizontal stop position */
+#define MRV_BLS_BLS_H2_STOP
+#define MRV_BLS_BLS_H2_STOP_MASK 0x00003FFFU
+#define MRV_BLS_BLS_H2_STOP_SHIFT 0U
+/*! Register: isp_bls_v2_start: window 2 vertical start (0x00000020)*/
+/*! Slice: BLS_V2_START:*/
+/*! Black pixel window 2 vertical start position */
+#define MRV_BLS_BLS_V2_START
+#define MRV_BLS_BLS_V2_START_MASK 0x00003FFFU
+#define MRV_BLS_BLS_V2_START_SHIFT 0U
+/*! Register: isp_bls_v2_stop: window 2 vertical stop (0x00000024)*/
+/*! Slice: BLS_V2_STOP:*/
+/*! Black pixel window 2 vertical stop position */
+#define MRV_BLS_BLS_V2_STOP
+#define MRV_BLS_BLS_V2_STOP_MASK 0x00003FFFU
+#define MRV_BLS_BLS_V2_STOP_SHIFT 0U
+/*! Register: isp_bls_a_fixed: fixed black level A (0x00000028)*/
+/*! Slice: BLS_A_FIXED:*/
+/*! Fixed black level for A pixels – signed */
+/* two's complement, value range from -4096 to +4095,*/
+/* a positive value will be subtracted from the pixel values */
+#define MRV_BLS_BLS_A_FIXED
+#define MRV_BLS_BLS_A_FIXED_MASK 0x00001FFFU
+#define MRV_BLS_BLS_A_FIXED_SHIFT 0U
+/*! Register: isp_bls_b_fixed: fixed black level B (0x0000002c)*/
+/*! Slice: BLS_B_FIXED:*/
+/*! Fixed black level for B pixels – signed */
+/* two's complement, value range from -4096 to +4095 */
+#define MRV_BLS_BLS_B_FIXED
+#define MRV_BLS_BLS_B_FIXED_MASK 0x00001FFFU
+#define MRV_BLS_BLS_B_FIXED_SHIFT 0U
+/*! Register: isp_bls_c_fixed: fixed black level C (0x00000030)*/
+/*! Slice: BLS_C_FIXED:*/
+/*! Fixed black level for C pixels – signed */
+/* two's complement, value range from -4096 to +4095 */
+#define MRV_BLS_BLS_C_FIXED
+#define MRV_BLS_BLS_C_FIXED_MASK 0x00001FFFU
+#define MRV_BLS_BLS_C_FIXED_SHIFT 0U
+/*! Register: isp_bls_d_fixed: fixed black level D (0x00000034)*/
+/*! Slice: BLS_D_FIXED:*/
+/*! Fixed black level for D pixels  - signed */
+/* two's complement, value range from -4096 to +4095 */
+#define MRV_BLS_BLS_D_FIXED
+#define MRV_BLS_BLS_D_FIXED_MASK 0x00001FFFU
+#define MRV_BLS_BLS_D_FIXED_SHIFT 0U
+/*! Register: isp_bls_a_measured: measured black level A (0x00000038)*/
+/*! Slice: BLS_A_MEASURED:*/
+/*! Measured black level for A pixels */
+#define MRV_BLS_BLS_A_MEASURED
+#define MRV_BLS_BLS_A_MEASURED_MASK 0x00000FFFU
+#define MRV_BLS_BLS_A_MEASURED_SHIFT 0U
+/*! Register: isp_bls_b_measured: measured black level B (0x0000003c)*/
+/*! Slice: BLS_B_MEASURED:*/
+/*! Measured black level for B pixels */
+#define MRV_BLS_BLS_B_MEASURED
+#define MRV_BLS_BLS_B_MEASURED_MASK 0x00000FFFU
+#define MRV_BLS_BLS_B_MEASURED_SHIFT 0U
+/*! Register: isp_bls_c_measured: measured black level C (0x00000040)*/
+/*! Slice: BLS_C_MEASURED:*/
+/*! Measured black level for C pixels */
+#define MRV_BLS_BLS_C_MEASURED
+#define MRV_BLS_BLS_C_MEASURED_MASK 0x00000FFFU
+#define MRV_BLS_BLS_C_MEASURED_SHIFT 0U
+/*! Register: isp_bls_d_measured: measured black level D (0x00000044)*/
+/*! Slice: BLS_D_MEASURED:*/
+/*! Measured black level for D pixels */
+#define MRV_BLS_BLS_D_MEASURED
+#define MRV_BLS_BLS_D_MEASURED_MASK 0x00000FFFU
+#define MRV_BLS_BLS_D_MEASURED_SHIFT 0U
+/*! Register: isp_dpf_mode: Mode control for Denoising Pre-Filter block (0x00000000)*/
+/*! Slice: USE_NF_GAIN:*/
+/*! 1: DPF_NF_GAINs will be used.*/
+/* 0: DPF_NF_GAINs will not be used.  *Default**/
+#define MRV_DPF_USE_NF_GAIN
+#define MRV_DPF_USE_NF_GAIN_MASK 0x00000200U
+#define MRV_DPF_USE_NF_GAIN_SHIFT 9U
+/*! Slice: LSC_GAIN_COMP:*/
+/*! 1: LSC gain will be processed */
+/* 0: LSC gain will not be processed. Use LSC gain factor of 1.  *Default**/
+#define MRV_DPF_LSC_GAIN_COMP
+#define MRV_DPF_LSC_GAIN_COMP_MASK 0x00000100U
+#define MRV_DPF_LSC_GAIN_COMP_SHIFT 8U
+/*! Slice: AWB_GAIN_COMP:*/
+/*! Only relevant when use_nf_gain == 0 && ISP_CTRL::ISP_AWB_ENABLE ==1 */
+/* 1: ISP_AWB gains will be processed */
+/* 0: ISP_AWB gains will not be processed. Use AWB gain factor of 1.  *Default**/
+#define MRV_DPF_AWB_GAIN_COMP
+#define MRV_DPF_AWB_GAIN_COMP_MASK 0x00000080U
+#define MRV_DPF_AWB_GAIN_COMP_SHIFT 7U
+/*! Slice: NLL_SEGMENTATION:*/
+/*! 1: optimized logarithmic like segmentation for Noise Level Lookup (NLL)*/
+/* 0: equidistant segmentation for NLL  *Default**/
+#define MRV_DPF_NLL_SEGMENTATION
+#define MRV_DPF_NLL_SEGMENTATION_MASK 0x00000040U
+#define MRV_DPF_NLL_SEGMENTATION_SHIFT 6U
+/*! Slice: RB_FILTER_SIZE:*/
+/*! 1: Red and Blue filter kernel size of 9x9 (5x5 active) pixels */
+/* 0: Wide Red and Blue filter kernel size of 13x9 (7x5 active) pixels  *Default**/
+#define MRV_DPF_RB_FILTER_SIZE
+#define MRV_DPF_RB_FILTER_SIZE_MASK 0x00000020U
+#define MRV_DPF_RB_FILTER_SIZE_SHIFT 5U
+/*! Slice: R_FILTER_OFF:*/
+/*! 1: disable filter processing for red pixels (R)*/
+/* 0: filter R pixels  *Default**/
+#define MRV_DPF_R_FILTER_OFF
+#define MRV_DPF_R_FILTER_OFF_MASK 0x00000010U
+#define MRV_DPF_R_FILTER_OFF_SHIFT 4U
+/*! Slice: GR_FILTER_OFF:*/
+/*! 1: disable filter processing for green pixels in green/red lines (GR)*/
+/* 0: filter GR pixels  *Default**/
+#define MRV_DPF_GR_FILTER_OFF
+#define MRV_DPF_GR_FILTER_OFF_MASK 0x00000008U
+#define MRV_DPF_GR_FILTER_OFF_SHIFT 3U
+/*! Slice: GB_FILTER_OFF:*/
+/*! 1: disable filter processing for green pixels in green/blue lines (GB)*/
+/* 0: filter GB pixels  *Default**/
+#define MRV_DPF_GB_FILTER_OFF
+#define MRV_DPF_GB_FILTER_OFF_MASK 0x00000004U
+#define MRV_DPF_GB_FILTER_OFF_SHIFT 2U
+/*! Slice: B_FILTER_OFF:*/
+/*! 1: disable filter processing for blue pixels (B)*/
+/* 0: filter B pixels  *Default**/
+#define MRV_DPF_B_FILTER_OFF
+#define MRV_DPF_B_FILTER_OFF_MASK 0x00000002U
+#define MRV_DPF_B_FILTER_OFF_SHIFT 1U
+/*! Slice: DPF_ENABLE:*/
+/*! 1: enable dpf */
+/* 0: bypass dpf  *Default**/
+#define MRV_DPF_DPF_ENABLE
+#define MRV_DPF_DPF_ENABLE_MASK 0x00000001U
+#define MRV_DPF_DPF_ENABLE_SHIFT 0U
+/*! Register: isp_dpf_strength_r: filter strength of the RED filter (0x00000004)*/
+/*! Slice: INV_WEIGHT_R:*/
+/*! Filter strength of the filter is determined by weight. Default is a weight of 1. A higher weight increases the filter strength. In this register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/* weight=0.251 -> 255, weight=0.5 -> 128,*/
+/* weight=1 -> 64 *default**/
+/* weight=1.25  -> 51, weight=1.5 -> 42,*/
+/* weight=1.75 -> 37, weight=2 -> 32 */
+#define MRV_DPF_INV_WEIGHT_R
+#define MRV_DPF_INV_WEIGHT_R_MASK 0x000000FFU
+#define MRV_DPF_INV_WEIGHT_R_SHIFT 0U
+/*! Register: isp_dpf_strength_g: filter strength of the GREEN filter (0x00000008)*/
+/*! Slice: INV_WEIGHT_G:*/
+/*! Filter strength of the filter is determined by weight. Default is a weight of 1. A higher weight increases the filter strength. In this register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/* weight=0.251 -> 255, weight=0.5 -> 128,*/
+/* weight=1 -> 64 *default**/
+/* weight=1.25  -> 51, weight=1.5 -> 42,*/
+/* weight=1.75 -> 37, weight=2 -> 32 */
+#define MRV_DPF_INV_WEIGHT_G
+#define MRV_DPF_INV_WEIGHT_G_MASK 0x000000FFU
+#define MRV_DPF_INV_WEIGHT_G_SHIFT 0U
+/*! Register: isp_dpf_strength_b: filter strength of the BLUE filter (0x0000000c)*/
+/*! Slice: INV_WEIGHT_B:*/
+/*! Filter strength of the filter is determined by weight. Default is a weight of 1. A higher weight increases the filter strength. In this register the unsigned 8 bit value 64/weight is stored.*/
+     /**/
+/* The following values show examples:*/
+/* weight=0.251 -> 255, weight=0.5 -> 128,*/
+/* weight=1 -> 64 *default**/
+/* weight=1.25  -> 51, weight=1.5 -> 42,*/
+/* weight=1.75 -> 37, weight=2 -> 32 */
+#define MRV_DPF_INV_WEIGHT_B
+#define MRV_DPF_INV_WEIGHT_B_MASK 0x000000FFU
+#define MRV_DPF_INV_WEIGHT_B_SHIFT 0U
+/*! Register: isp_dpf_s_weight_g_1_4: Spatial Weights green channel 1 2 3 4 (0x00000010)*/
+/*! Slice: S_WEIGHT_G4:*/
+/*! Filter Coefficient green channel S_WEIGHT_G4 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G4
+#define MRV_DPF_S_WEIGHT_G4_MASK 0x1F000000U
+#define MRV_DPF_S_WEIGHT_G4_SHIFT 24U
+/*! Slice: S_WEIGHT_G3:*/
+/*! Filter Coefficient green channel S_WEIGHT_G3 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G3
+#define MRV_DPF_S_WEIGHT_G3_MASK 0x001F0000U
+#define MRV_DPF_S_WEIGHT_G3_SHIFT 16U
+/*! Slice: S_WEIGHT_G2:*/
+/*! Filter Coefficient green channel S_WEIGHT_G2 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G2
+#define MRV_DPF_S_WEIGHT_G2_MASK 0x00001F00U
+#define MRV_DPF_S_WEIGHT_G2_SHIFT 8U
+/*! Slice: S_WEIGHT_G1:*/
+/*! Filter Coefficient green channel S_WEIGHT_G1 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G1
+#define MRV_DPF_S_WEIGHT_G1_MASK 0x0000001FU
+#define MRV_DPF_S_WEIGHT_G1_SHIFT 0U
+/*! Register: isp_dpf_s_weight_g_5_6: Spatial Weights green channel 5 6 (0x00000014)*/
+/*! Slice: S_WEIGHT_G6:*/
+/*! Filter Coefficient green channel S_WEIGHT_G6 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G6
+#define MRV_DPF_S_WEIGHT_G6_MASK 0x00001F00U
+#define MRV_DPF_S_WEIGHT_G6_SHIFT 8U
+/*! Slice: S_WEIGHT_G5:*/
+/*! Filter Coefficient green channel S_WEIGHT_G5 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_G5
+#define MRV_DPF_S_WEIGHT_G5_MASK 0x0000001FU
+#define MRV_DPF_S_WEIGHT_G5_SHIFT 0U
+/*! Register: isp_dpf_s_weight_rb_1_4: Spatial Weights red/blue channels 1 2 3 4 (0x00000018)*/
+/*! Slice: S_WEIGHT_RB4:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB4 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB4
+#define MRV_DPF_S_WEIGHT_RB4_MASK 0x1F000000U
+#define MRV_DPF_S_WEIGHT_RB4_SHIFT 24U
+/*! Slice: S_WEIGHT_RB3:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB3 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB3
+#define MRV_DPF_S_WEIGHT_RB3_MASK 0x001F0000U
+#define MRV_DPF_S_WEIGHT_RB3_SHIFT 16U
+/*! Slice: S_WEIGHT_RB2:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB2 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB2
+#define MRV_DPF_S_WEIGHT_RB2_MASK 0x00001F00U
+#define MRV_DPF_S_WEIGHT_RB2_SHIFT 8U
+/*! Slice: S_WEIGHT_RB1:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB1 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB1
+#define MRV_DPF_S_WEIGHT_RB1_MASK 0x0000001FU
+#define MRV_DPF_S_WEIGHT_RB1_SHIFT 0U
+/*! Register: isp_dpf_s_weight_rb_5_6: Spatial Weights red/blue channels 5 6 (0x0000001c)*/
+/*! Slice: S_WEIGHT_RB6:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB6 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB6
+#define MRV_DPF_S_WEIGHT_RB6_MASK 0x00001F00U
+#define MRV_DPF_S_WEIGHT_RB6_SHIFT 8U
+/*! Slice: S_WEIGHT_RB5:*/
+/*! Filter Coefficient red/blue channels S_WEIGHT_RB5 */
+/* 5 bit unsigned, value range 1/16 to 16/16 */
+/* Default value is 16/16 (*Default*)*/
+#define MRV_DPF_S_WEIGHT_RB5
+#define MRV_DPF_S_WEIGHT_RB5_MASK 0x0000001FU
+#define MRV_DPF_S_WEIGHT_RB5_SHIFT 0U
+/*! Register array: isp_dpf_nll_coeff: Noise Level Lookup Coefficient (0x0040 + n*0x4 (n=0..16))*/
+/*! Slice: nll_coeff_n:*/
+/* Noise Level Lookup Table Coefficient nll_coeff_n */
+/* 10 bit unsigned, value range 1/1024 to 1023/1024 (*Default*)*/
+#define MRV_DPF_NLL_COEFF_N
+#define MRV_DPF_NLL_COEFF_N_MASK 0x000003FFU
+#define MRV_DPF_NLL_COEFF_N_SHIFT 0U
+/*! Register: isp_dpf_nf_gain_r: noise function gain for red pixels (0x00000064)*/
+/*! Slice: DPF_NF_GAIN_R:*/
+/*! Noise Function (NF) Gain that replaces the AWB gain for red pixels.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#define MRV_DPF_DPF_NF_GAIN_R
+#define MRV_DPF_DPF_NF_GAIN_R_MASK 0x00000FFFU
+#define MRV_DPF_DPF_NF_GAIN_R_SHIFT 0U
+/*! Register: isp_dpf_nf_gain_gr: noise function gain for green in red pixels (0x00000068)*/
+/*! Slice: DPF_NF_GAIN_GR:*/
+/*! Noise Function (NF) Gain that replaces the AWB gain for green pixels in a red line.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#define MRV_DPF_DPF_NF_GAIN_GR
+#define MRV_DPF_DPF_NF_GAIN_GR_MASK 0x00000FFFU
+#define MRV_DPF_DPF_NF_GAIN_GR_SHIFT 0U
+/*! Register: isp_dpf_nf_gain_gb: noise function gain for green in blue pixels (0x0000006c)*/
+/*! Slice: DPF_NF_GAIN_GB:*/
+/*! Noise Function (NF) Gain that replaces the AWB gain for green pixels in a blue line.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#define MRV_DPF_DPF_NF_GAIN_GB
+#define MRV_DPF_DPF_NF_GAIN_GB_MASK 0x00000FFFU
+#define MRV_DPF_DPF_NF_GAIN_GB_SHIFT 0U
+/*! Register: isp_dpf_nf_gain_b: noise function gain for blue pixels (0x00000070)*/
+/*! Slice: DPF_NF_GAIN_B:*/
+/*! Noise Function (NF) Gain that replaces the AWB gain for blue pixels.*/
+/* 12 bit unsigned integer format: gain=1 -> 0x100 */
+#define MRV_DPF_DPF_NF_GAIN_B
+#define MRV_DPF_DPF_NF_GAIN_B_MASK 0x00000FFFU
+#define MRV_DPF_DPF_NF_GAIN_B_SHIFT 0U
+/*! Register: isp_dpcc_mode: Mode control for DPCC detection unit (0x00000000)*/
+/*! Slice: STAGE1_ENABLE:*/
+/*! 1: enable  stage1 *Default**/
+/* 0: bypass  stage1 */
+#define MRV_DPCC_STAGE1_ENABLE
+#define MRV_DPCC_STAGE1_ENABLE_MASK 0x00000004U
+#define MRV_DPCC_STAGE1_ENABLE_SHIFT 2U
+/*! Slice: GRAYSCALE_MODE:*/
+/*! 1: enable gray scale data input from black and white sensors (without color filter array)*/
+/* 0: BAYER DATA INPUT  *Default**/
+#define MRV_DPCC_GRAYSCALE_MODE
+#define MRV_DPCC_GRAYSCALE_MODE_MASK 0x00000002U
+#define MRV_DPCC_GRAYSCALE_MODE_SHIFT 1U
+/*! Slice: ISP_DPCC_enable:*/
+/*! 1: enable DPCC */
+/* 0: bypass DPCC  *Default**/
+#define MRV_DPCC_ISP_DPCC_ENABLE
+#define MRV_DPCC_ISP_DPCC_ENABLE_MASK 0x00000001U
+#define MRV_DPCC_ISP_DPCC_ENABLE_SHIFT 0U
+/*! Register: isp_dpcc_output_mode: Interpolation mode for correction unit (0x00000004)*/
+/*! Slice: STAGE1_RB_3x3:*/
+/*! 1: stage1 red/blue 9 pixel (3x3) output median */
+/* 0: stage1 red/blue 4 or 5 pixel output median  *Default**/
+#define MRV_DPCC_STAGE1_RB_3X3
+#define MRV_DPCC_STAGE1_RB_3X3_MASK 0x00000008U
+#define MRV_DPCC_STAGE1_RB_3X3_SHIFT 3U
+/*! Slice: STAGE1_G_3x3:*/
+/*! 1: stage1 green 9 pixel (3x3) output median */
+/* 0: stage1 green 4 or 5 pixel output median  *Default**/
+#define MRV_DPCC_STAGE1_G_3X3
+#define MRV_DPCC_STAGE1_G_3X3_MASK 0x00000004U
+#define MRV_DPCC_STAGE1_G_3X3_SHIFT 2U
+/*! Slice: STAGE1_INCL_RB_CENTER:*/
+/*! 1: stage1 include center pixel for red/blue output median 2x2+1 */
+/* *Default* 0: stage1 do not include center pixel for red/blue output median 2x2 */
+#define MRV_DPCC_STAGE1_INCL_RB_CENTER
+#define MRV_DPCC_STAGE1_INCL_RB_CENTER_MASK 0x00000002U
+#define MRV_DPCC_STAGE1_INCL_RB_CENTER_SHIFT 1U
+/*! Slice: STAGE1_INCL_GREEN_CENTER:*/
+/*! 1: stage1 include center pixel for green output median 2x2+1 *Default**/
+/* 0: stage1 do not include center pixel for green output median 2x2 */
+#define MRV_DPCC_STAGE1_INCL_GREEN_CENTER
+#define MRV_DPCC_STAGE1_INCL_GREEN_CENTER_MASK 0x00000001U
+#define MRV_DPCC_STAGE1_INCL_GREEN_CENTER_SHIFT 0U
+/*! Register: isp_dpcc_set_use: DPCC methods set usage for detection (0x00000008)*/
+/*! Slice: STAGE1_USE_FIX_SET:*/
+/*! 1: stage1 use hard coded methods set *Default**/
+/* 0: stage1 do not use hard coded methods set */
+#define MRV_DPCC_STAGE1_USE_FIX_SET
+#define MRV_DPCC_STAGE1_USE_FIX_SET_MASK 0x00000008U
+#define MRV_DPCC_STAGE1_USE_FIX_SET_SHIFT 3U
+/*! Slice: STAGE1_USE_SET_3:*/
+/*! 1: stage1 use methods set 3 */
+/* 0: stage1 do not use methods set 3 *Default**/
+#define MRV_DPCC_STAGE1_USE_SET_3
+#define MRV_DPCC_STAGE1_USE_SET_3_MASK 0x00000004U
+#define MRV_DPCC_STAGE1_USE_SET_3_SHIFT 2U
+/*! Slice: STAGE1_USE_SET_2:*/
+/*! 1: stage1 use methods set 2 */
+/* 0: stage1 do not use methods set 2 *Default**/
+#define MRV_DPCC_STAGE1_USE_SET_2
+#define MRV_DPCC_STAGE1_USE_SET_2_MASK 0x00000002U
+#define MRV_DPCC_STAGE1_USE_SET_2_SHIFT 1U
+/*! Slice: STAGE1_USE_SET_1:*/
+/*! 1: stage1 use methods set 1  *Default**/
+/* 0: stage1 do not use methods set 1 */
+#define MRV_DPCC_STAGE1_USE_SET_1
+#define MRV_DPCC_STAGE1_USE_SET_1_MASK 0x00000001U
+#define MRV_DPCC_STAGE1_USE_SET_1_SHIFT 0U
+/*! Register: isp_dpcc_methods_set_1: Methods enable bits for SET_1 (0x0000000c)*/
+/*! Slice: RG_RED_BLUE1_ENABLE:*/
+/*! 1: enable Rank Gradient check for red_blue  *Default**/
+/* 0: bypass Rank Gradient check for red_blue */
+#define MRV_DPCC_RG_RED_BLUE1_ENABLE
+#define MRV_DPCC_RG_RED_BLUE1_ENABLE_MASK 0x00001000U
+#define MRV_DPCC_RG_RED_BLUE1_ENABLE_SHIFT 12U
+/*! Slice: RND_RED_BLUE1_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for red_blue  *Default**/
+/* 0: bypass Rank Neighbor Difference check for red_blue */
+#define MRV_DPCC_RND_RED_BLUE1_ENABLE
+#define MRV_DPCC_RND_RED_BLUE1_ENABLE_MASK 0x00000800U
+#define MRV_DPCC_RND_RED_BLUE1_ENABLE_SHIFT 11U
+/*! Slice: RO_RED_BLUE1_ENABLE:*/
+/*! 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#define MRV_DPCC_RO_RED_BLUE1_ENABLE
+#define MRV_DPCC_RO_RED_BLUE1_ENABLE_MASK 0x00000400U
+#define MRV_DPCC_RO_RED_BLUE1_ENABLE_SHIFT 10U
+/*! Slice: LC_RED_BLUE1_ENABLE:*/
+/*! 1: enable Line check for red_blue *Default**/
+/* 0: bypass Line check for red_blue */
+#define MRV_DPCC_LC_RED_BLUE1_ENABLE
+#define MRV_DPCC_LC_RED_BLUE1_ENABLE_MASK 0x00000200U
+#define MRV_DPCC_LC_RED_BLUE1_ENABLE_SHIFT 9U
+/*! Slice: PG_RED_BLUE1_ENABLE:*/
+/*! 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#define MRV_DPCC_PG_RED_BLUE1_ENABLE
+#define MRV_DPCC_PG_RED_BLUE1_ENABLE_MASK 0x00000100U
+#define MRV_DPCC_PG_RED_BLUE1_ENABLE_SHIFT 8U
+/*! Slice: RG_GREEN1_ENABLE:*/
+/*! 1: enable Rank Gradient check for green  *Default**/
+/* 0: bypass Rank Gradient check for green */
+#define MRV_DPCC_RG_GREEN1_ENABLE
+#define MRV_DPCC_RG_GREEN1_ENABLE_MASK 0x00000010U
+#define MRV_DPCC_RG_GREEN1_ENABLE_SHIFT 4U
+/*! Slice: RND_GREEN1_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for green  *Default**/
+/* 0: bypass Rank Neighbor Difference check for green */
+#define MRV_DPCC_RND_GREEN1_ENABLE
+#define MRV_DPCC_RND_GREEN1_ENABLE_MASK 0x00000008U
+#define MRV_DPCC_RND_GREEN1_ENABLE_SHIFT 3U
+/*! Slice: RO_GREEN1_ENABLE:*/
+/*! 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#define MRV_DPCC_RO_GREEN1_ENABLE
+#define MRV_DPCC_RO_GREEN1_ENABLE_MASK 0x00000004U
+#define MRV_DPCC_RO_GREEN1_ENABLE_SHIFT 2U
+/*! Slice: LC_GREEN1_ENABLE:*/
+/*! 1: enable Line check for green *Default**/
+/* 0: bypass Line check for green */
+#define MRV_DPCC_LC_GREEN1_ENABLE
+#define MRV_DPCC_LC_GREEN1_ENABLE_MASK 0x00000002U
+#define MRV_DPCC_LC_GREEN1_ENABLE_SHIFT 1U
+/*! Slice: PG_GREEN1_ENABLE:*/
+/*! 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#define MRV_DPCC_PG_GREEN1_ENABLE
+#define MRV_DPCC_PG_GREEN1_ENABLE_MASK 0x00000001U
+#define MRV_DPCC_PG_GREEN1_ENABLE_SHIFT 0U
+/*! Register: isp_dpcc_methods_set_2: Methods enable bits for SET_2 (0x00000010)*/
+/*! Slice: RG_RED_BLUE2_ENABLE:*/
+/*! 1: enable Rank Gradient check for red_blue  *Default**/
+/* 0: bypass Rank Gradient check for red_blue */
+#define MRV_DPCC_RG_RED_BLUE2_ENABLE
+#define MRV_DPCC_RG_RED_BLUE2_ENABLE_MASK 0x00001000U
+#define MRV_DPCC_RG_RED_BLUE2_ENABLE_SHIFT 12U
+/*! Slice: RND_RED_BLUE2_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for red_blue  *Default**/
+/* 0: bypass Rank Neighbor Difference check for red_blue */
+#define MRV_DPCC_RND_RED_BLUE2_ENABLE
+#define MRV_DPCC_RND_RED_BLUE2_ENABLE_MASK 0x00000800U
+#define MRV_DPCC_RND_RED_BLUE2_ENABLE_SHIFT 11U
+/*! Slice: RO_RED_BLUE2_ENABLE:*/
+/*! 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#define MRV_DPCC_RO_RED_BLUE2_ENABLE
+#define MRV_DPCC_RO_RED_BLUE2_ENABLE_MASK 0x00000400U
+#define MRV_DPCC_RO_RED_BLUE2_ENABLE_SHIFT 10U
+/*! Slice: LC_RED_BLUE2_ENABLE:*/
+/*! 1: enable Line check for red_blue */
+/* 0: bypass Line check for red_blue  *Default**/
+#define MRV_DPCC_LC_RED_BLUE2_ENABLE
+#define MRV_DPCC_LC_RED_BLUE2_ENABLE_MASK 0x00000200U
+#define MRV_DPCC_LC_RED_BLUE2_ENABLE_SHIFT 9U
+/*! Slice: PG_RED_BLUE2_ENABLE:*/
+/*! 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#define MRV_DPCC_PG_RED_BLUE2_ENABLE
+#define MRV_DPCC_PG_RED_BLUE2_ENABLE_MASK 0x00000100U
+#define MRV_DPCC_PG_RED_BLUE2_ENABLE_SHIFT 8U
+/*! Slice: RG_GREEN2_ENABLE:*/
+/*! 1: enable Rank Gradient check for green  *Default**/
+/* 0: bypass Rank Gradient check for green */
+#define MRV_DPCC_RG_GREEN2_ENABLE
+#define MRV_DPCC_RG_GREEN2_ENABLE_MASK 0x00000010U
+#define MRV_DPCC_RG_GREEN2_ENABLE_SHIFT 4U
+/*! Slice: RND_GREEN2_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for green  *Default**/
+/* 0: bypass Rank Neighbor Difference check for green */
+#define MRV_DPCC_RND_GREEN2_ENABLE
+#define MRV_DPCC_RND_GREEN2_ENABLE_MASK 0x00000008U
+#define MRV_DPCC_RND_GREEN2_ENABLE_SHIFT 3U
+/*! Slice: RO_GREEN2_ENABLE:*/
+/*! 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#define MRV_DPCC_RO_GREEN2_ENABLE
+#define MRV_DPCC_RO_GREEN2_ENABLE_MASK 0x00000004U
+#define MRV_DPCC_RO_GREEN2_ENABLE_SHIFT 2U
+/*! Slice: LC_GREEN2_ENABLE:*/
+/*! 1: enable Line check for green */
+/* 0: bypass Line check for green  *Default**/
+#define MRV_DPCC_LC_GREEN2_ENABLE
+#define MRV_DPCC_LC_GREEN2_ENABLE_MASK 0x00000002U
+#define MRV_DPCC_LC_GREEN2_ENABLE_SHIFT 1U
+/*! Slice: PG_GREEN2_ENABLE:*/
+/*! 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#define MRV_DPCC_PG_GREEN2_ENABLE
+#define MRV_DPCC_PG_GREEN2_ENABLE_MASK 0x00000001U
+#define MRV_DPCC_PG_GREEN2_ENABLE_SHIFT 0U
+/*! Register: isp_dpcc_methods_set_3: Methods enable bits for SET_3 (0x00000014)*/
+/*! Slice: RG_RED_BLUE3_ENABLE:*/
+/*! 1: enable Rank Gradient check for red_blue */
+/* 0: bypass Rank Gradient check for red_blue  *Default**/
+#define MRV_DPCC_RG_RED_BLUE3_ENABLE
+#define MRV_DPCC_RG_RED_BLUE3_ENABLE_MASK 0x00001000U
+#define MRV_DPCC_RG_RED_BLUE3_ENABLE_SHIFT 12U
+/*! Slice: RND_RED_BLUE3_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for red_blue */
+/* 0: bypass Rank Neighbor Difference check for red_blue  *Default**/
+#define MRV_DPCC_RND_RED_BLUE3_ENABLE
+#define MRV_DPCC_RND_RED_BLUE3_ENABLE_MASK 0x00000800U
+#define MRV_DPCC_RND_RED_BLUE3_ENABLE_SHIFT 11U
+/*! Slice: RO_RED_BLUE3_ENABLE:*/
+/*! 1: enable Rank Order check for red_blue  *Default**/
+/* 0: bypass Rank Order check for red_blue */
+#define MRV_DPCC_RO_RED_BLUE3_ENABLE
+#define MRV_DPCC_RO_RED_BLUE3_ENABLE_MASK 0x00000400U
+#define MRV_DPCC_RO_RED_BLUE3_ENABLE_SHIFT 10U
+/*! Slice: LC_RED_BLUE3_ENABLE:*/
+/*! 1: enable Line check for red_blue  *Default**/
+/* 0: bypass Line check for red_blue */
+#define MRV_DPCC_LC_RED_BLUE3_ENABLE
+#define MRV_DPCC_LC_RED_BLUE3_ENABLE_MASK 0x00000200U
+#define MRV_DPCC_LC_RED_BLUE3_ENABLE_SHIFT 9U
+/*! Slice: PG_RED_BLUE3_ENABLE:*/
+/*! 1: enable Peak Gradient check for red_blue  *Default**/
+/* 0: bypass Peak Gradient check for red_blue */
+#define MRV_DPCC_PG_RED_BLUE3_ENABLE
+#define MRV_DPCC_PG_RED_BLUE3_ENABLE_MASK 0x00000100U
+#define MRV_DPCC_PG_RED_BLUE3_ENABLE_SHIFT 8U
+/*! Slice: RG_GREEN3_ENABLE:*/
+/*! 1: enable Rank Gradient check for green */
+/* 0: bypass Rank Gradient check for green  *Default**/
+#define MRV_DPCC_RG_GREEN3_ENABLE
+#define MRV_DPCC_RG_GREEN3_ENABLE_MASK 0x00000010U
+#define MRV_DPCC_RG_GREEN3_ENABLE_SHIFT 4U
+/*! Slice: RND_GREEN3_ENABLE:*/
+/*! 1: enable Rank Neighbor Difference check for green */
+/* 0: bypass Rank Neighbor Difference check for green  *Default**/
+#define MRV_DPCC_RND_GREEN3_ENABLE
+#define MRV_DPCC_RND_GREEN3_ENABLE_MASK 0x00000008U
+#define MRV_DPCC_RND_GREEN3_ENABLE_SHIFT 3U
+/*! Slice: RO_GREEN3_ENABLE:*/
+/*! 1: enable Rank Order check for green  *Default**/
+/* 0: bypass Rank Order check for green */
+#define MRV_DPCC_RO_GREEN3_ENABLE
+#define MRV_DPCC_RO_GREEN3_ENABLE_MASK 0x00000004U
+#define MRV_DPCC_RO_GREEN3_ENABLE_SHIFT 2U
+/*! Slice: LC_GREEN3_ENABLE:*/
+/*! 1: enable Line check for green  *Default**/
+/* 0: bypass Line check for green */
+#define MRV_DPCC_LC_GREEN3_ENABLE
+#define MRV_DPCC_LC_GREEN3_ENABLE_MASK 0x00000002U
+#define MRV_DPCC_LC_GREEN3_ENABLE_SHIFT 1U
+/*! Slice: PG_GREEN3_ENABLE:*/
+/*! 1: enable Peak Gradient check for green  *Default**/
+/* 0: bypass Peak Gradient check for green */
+#define MRV_DPCC_PG_GREEN3_ENABLE
+#define MRV_DPCC_PG_GREEN3_ENABLE_MASK 0x00000001U
+#define MRV_DPCC_PG_GREEN3_ENABLE_SHIFT 0U
+/*! Register: isp_dpcc_line_thresh_1: Line threshold SET_1 (0x00000018)*/
+/*! Slice: LINE_THR_1_RB:*/
+/*! line threshold for set 1 red/blue */
+#define MRV_DPCC_LINE_THR_1_RB
+#define MRV_DPCC_LINE_THR_1_RB_MASK 0x0000FF00U
+#define MRV_DPCC_LINE_THR_1_RB_SHIFT 8U
+/*! Slice: LINE_THR_1_G:*/
+/*! line threshold for set 1 green */
+#define MRV_DPCC_LINE_THR_1_G
+#define MRV_DPCC_LINE_THR_1_G_MASK 0x000000FFU
+#define MRV_DPCC_LINE_THR_1_G_SHIFT 0U
+/*! Register: isp_dpcc_line_mad_fac_1: Mean Absolute Difference (MAD) factor for Line check set 1 (0x0000001c)*/
+/*! Slice: LINE_MAD_FAC_1_RB:*/
+/*! line MAD factor for set 1 red/blue */
+#define MRV_DPCC_LINE_MAD_FAC_1_RB
+#define MRV_DPCC_LINE_MAD_FAC_1_RB_MASK 0x00003F00U
+#define MRV_DPCC_LINE_MAD_FAC_1_RB_SHIFT 8U
+/*! Slice: LINE_MAD_FAC_1_G:*/
+/*! line MAD factor for set 1 green */
+#define MRV_DPCC_LINE_MAD_FAC_1_G
+#define MRV_DPCC_LINE_MAD_FAC_1_G_MASK 0x0000003FU
+#define MRV_DPCC_LINE_MAD_FAC_1_G_SHIFT 0U
+/*! Register: isp_dpcc_pg_fac_1: Peak gradient factor for set 1 (0x00000020)*/
+/*! Slice: PG_FAC_1_RB:*/
+/*! Peak gradient factor for set 1 red/blue */
+#define MRV_DPCC_PG_FAC_1_RB
+#define MRV_DPCC_PG_FAC_1_RB_MASK 0x00003F00U
+#define MRV_DPCC_PG_FAC_1_RB_SHIFT 8U
+/*! Slice: PG_FAC_1_G:*/
+/*! Peak gradient factor for set 1 green */
+#define MRV_DPCC_PG_FAC_1_G
+#define MRV_DPCC_PG_FAC_1_G_MASK 0x0000003FU
+#define MRV_DPCC_PG_FAC_1_G_SHIFT 0U
+/*! Register: isp_dpcc_rnd_thresh_1: Rank Neighbor Difference threshold for set 1 (0x00000024)*/
+/*! Slice: RND_THR_1_RB:*/
+/*! Rank Neighbor Difference threshold for set 1 red/blue */
+#define MRV_DPCC_RND_THR_1_RB
+#define MRV_DPCC_RND_THR_1_RB_MASK 0x0000FF00U
+#define MRV_DPCC_RND_THR_1_RB_SHIFT 8U
+/*! Slice: RND_THR_1_G:*/
+/*! Rank Neighbor Difference threshold for set 1 green */
+#define MRV_DPCC_RND_THR_1_G
+#define MRV_DPCC_RND_THR_1_G_MASK 0x000000FFU
+#define MRV_DPCC_RND_THR_1_G_SHIFT 0U
+/*! Register: isp_dpcc_rg_fac_1: Rank gradient factor for set 1 (0x00000028)*/
+/*! Slice: RG_FAC_1_RB:*/
+/*! Rank gradient factor for set 1 red/blue */
+#define MRV_DPCC_RG_FAC_1_RB
+#define MRV_DPCC_RG_FAC_1_RB_MASK 0x00003F00U
+#define MRV_DPCC_RG_FAC_1_RB_SHIFT 8U
+/*! Slice: RG_FAC_1_G:*/
+/*! Rank gradient factor for set 1 green */
+#define MRV_DPCC_RG_FAC_1_G
+#define MRV_DPCC_RG_FAC_1_G_MASK 0x0000003FU
+#define MRV_DPCC_RG_FAC_1_G_SHIFT 0U
+/*! Register: isp_dpcc_line_thresh_2: Line threshold set 2 (0x0000002c)*/
+/*! Slice: LINE_THR_2_RB:*/
+/*! line threshold for set 2 red/blue */
+#define MRV_DPCC_LINE_THR_2_RB
+#define MRV_DPCC_LINE_THR_2_RB_MASK 0x0000FF00U
+#define MRV_DPCC_LINE_THR_2_RB_SHIFT 8U
+/*! Slice: LINE_THR_2_G:*/
+/*! line threshold for set 2 green */
+#define MRV_DPCC_LINE_THR_2_G
+#define MRV_DPCC_LINE_THR_2_G_MASK 0x000000FFU
+#define MRV_DPCC_LINE_THR_2_G_SHIFT 0U
+/*! Register: isp_dpcc_line_mad_fac_2: Mean Absolute Difference (MAD) factor for Line check set 2 (0x00000030)*/
+/*! Slice: LINE_MAD_FAC_2_RB:*/
+/*! line MAD factor for set 2 red/blue */
+#define MRV_DPCC_LINE_MAD_FAC_2_RB
+#define MRV_DPCC_LINE_MAD_FAC_2_RB_MASK 0x00003F00U
+#define MRV_DPCC_LINE_MAD_FAC_2_RB_SHIFT 8U
+/*! Slice: LINE_MAD_FAC_2_G:*/
+/*! line MAD factor for set 2 green */
+#define MRV_DPCC_LINE_MAD_FAC_2_G
+#define MRV_DPCC_LINE_MAD_FAC_2_G_MASK 0x0000003FU
+#define MRV_DPCC_LINE_MAD_FAC_2_G_SHIFT 0U
+/*! Register: isp_dpcc_pg_fac_2: Peak gradient factor for set 2 (0x00000034)*/
+/*! Slice: PG_FAC_2_RB:*/
+/*! Peak gradient factor for set 2 red/blue */
+#define MRV_DPCC_PG_FAC_2_RB
+#define MRV_DPCC_PG_FAC_2_RB_MASK 0x00003F00U
+#define MRV_DPCC_PG_FAC_2_RB_SHIFT 8U
+/*! Slice: PG_FAC_2_G:*/
+/*! Peak gradient factor for set 2 green */
+#define MRV_DPCC_PG_FAC_2_G
+#define MRV_DPCC_PG_FAC_2_G_MASK 0x0000003FU
+#define MRV_DPCC_PG_FAC_2_G_SHIFT 0U
+/*! Register: isp_dpcc_rnd_thresh_2: Rank Neighbor Difference threshold for set 2 (0x00000038)*/
+/*! Slice: RND_THR_2_RB:*/
+/*! Rank Neighbor Difference threshold for set 2 red/blue */
+#define MRV_DPCC_RND_THR_2_RB
+#define MRV_DPCC_RND_THR_2_RB_MASK 0x0000FF00U
+#define MRV_DPCC_RND_THR_2_RB_SHIFT 8U
+/*! Slice: RND_THR_2_G:*/
+/*! Rank Neighbor Difference threshold for set 2 green */
+#define MRV_DPCC_RND_THR_2_G
+#define MRV_DPCC_RND_THR_2_G_MASK 0x000000FFU
+#define MRV_DPCC_RND_THR_2_G_SHIFT 0U
+/*! Register: isp_dpcc_rg_fac_2: Rank gradient factor for set 2 (0x0000003c)*/
+/*! Slice: RG_FAC_2_RB:*/
+/*! Rank gradient factor for set 2 red/blue */
+#define MRV_DPCC_RG_FAC_2_RB
+#define MRV_DPCC_RG_FAC_2_RB_MASK 0x00003F00U
+#define MRV_DPCC_RG_FAC_2_RB_SHIFT 8U
+/*! Slice: RG_FAC_2_G:*/
+/*! Rank gradient factor for set 2 green */
+#define MRV_DPCC_RG_FAC_2_G
+#define MRV_DPCC_RG_FAC_2_G_MASK 0x0000003FU
+#define MRV_DPCC_RG_FAC_2_G_SHIFT 0U
+/*! Register: isp_dpcc_line_thresh_3: Line threshold set 3 (0x00000040)*/
+/*! Slice: LINE_THR_3_RB:*/
+/*! line threshold for set 3 red/blue */
+#define MRV_DPCC_LINE_THR_3_RB
+#define MRV_DPCC_LINE_THR_3_RB_MASK 0x0000FF00U
+#define MRV_DPCC_LINE_THR_3_RB_SHIFT 8U
+/*! Slice: LINE_THR_3_G:*/
+/*! line threshold for set 3 green */
+#define MRV_DPCC_LINE_THR_3_G
+#define MRV_DPCC_LINE_THR_3_G_MASK 0x000000FFU
+#define MRV_DPCC_LINE_THR_3_G_SHIFT 0U
+/*! Register: isp_dpcc_line_mad_fac_3: Mean Absolute Difference (MAD) factor for Line check set 3 (0x00000044)*/
+/*! Slice: LINE_MAD_FAC_3_RB:*/
+/*! line MAD factor for set 3 red/blue */
+#define MRV_DPCC_LINE_MAD_FAC_3_RB
+#define MRV_DPCC_LINE_MAD_FAC_3_RB_MASK 0x00003F00U
+#define MRV_DPCC_LINE_MAD_FAC_3_RB_SHIFT 8U
+/*! Slice: LINE_MAD_FAC_3_G:*/
+/*! line MAD factor for set 3 green */
+#define MRV_DPCC_LINE_MAD_FAC_3_G
+#define MRV_DPCC_LINE_MAD_FAC_3_G_MASK 0x0000003FU
+#define MRV_DPCC_LINE_MAD_FAC_3_G_SHIFT 0U
+/*! Register: isp_dpcc_pg_fac_3: Peak gradient factor for set 3 (0x00000048)*/
+/*! Slice: PG_FAC_3_RB:*/
+/*! Peak gradient factor for set 3 red/blue */
+#define MRV_DPCC_PG_FAC_3_RB
+#define MRV_DPCC_PG_FAC_3_RB_MASK 0x00003F00U
+#define MRV_DPCC_PG_FAC_3_RB_SHIFT 8U
+/*! Slice: PG_FAC_3_G:*/
+/*! Peak gradient factor for set 3 green */
+#define MRV_DPCC_PG_FAC_3_G
+#define MRV_DPCC_PG_FAC_3_G_MASK 0x0000003FU
+#define MRV_DPCC_PG_FAC_3_G_SHIFT 0U
+/*! Register: isp_dpcc_rnd_thresh_3: Rank Neighbor Difference threshold for set 3 (0x0000004c)*/
+/*! Slice: RND_THR_3_RB:*/
+/*! Rank Neighbor Difference threshold for set 3 red/blue */
+#define MRV_DPCC_RND_THR_3_RB
+#define MRV_DPCC_RND_THR_3_RB_MASK 0x0000FF00U
+#define MRV_DPCC_RND_THR_3_RB_SHIFT 8U
+/*! Slice: RND_THR_3_G:*/
+/*! Rank Neighbor Difference threshold for set 3 green */
+#define MRV_DPCC_RND_THR_3_G
+#define MRV_DPCC_RND_THR_3_G_MASK 0x000000FFU
+#define MRV_DPCC_RND_THR_3_G_SHIFT 0U
+/*! Register: isp_dpcc_rg_fac_3: Rank gradient factor for set 3 (0x00000050)*/
+/*! Slice: RG_FAC_3_RB:*/
+/*! Rank gradient factor for set 3 red/blue */
+#define MRV_DPCC_RG_FAC_3_RB
+#define MRV_DPCC_RG_FAC_3_RB_MASK 0x00003F00U
+#define MRV_DPCC_RG_FAC_3_RB_SHIFT 8U
+/*! Slice: RG_FAC_3_G:*/
+/*! Rank gradient factor for set 3 green */
+#define MRV_DPCC_RG_FAC_3_G
+#define MRV_DPCC_RG_FAC_3_G_MASK 0x0000003FU
+#define MRV_DPCC_RG_FAC_3_G_SHIFT 0U
+/*! Register: isp_dpcc_ro_limits: Rank Order Limits (0x00000054)*/
+/*! Slice: RO_LIM_3_RB:*/
+/*! Rank order limit for set 3 red/blue */
+#define MRV_DPCC_RO_LIM_3_RB
+#define MRV_DPCC_RO_LIM_3_RB_MASK 0x00000C00U
+#define MRV_DPCC_RO_LIM_3_RB_SHIFT 10U
+/*! Slice: RO_LIM_3_G:*/
+/*! Rank order limit for set 3 green */
+#define MRV_DPCC_RO_LIM_3_G
+#define MRV_DPCC_RO_LIM_3_G_MASK 0x00000300U
+#define MRV_DPCC_RO_LIM_3_G_SHIFT 8U
+/*! Slice: RO_LIM_2_RB:*/
+/*! Rank order limit for set 2 red/blue */
+#define MRV_DPCC_RO_LIM_2_RB
+#define MRV_DPCC_RO_LIM_2_RB_MASK 0x000000C0U
+#define MRV_DPCC_RO_LIM_2_RB_SHIFT 6U
+/*! Slice: RO_LIM_2_G:*/
+/*! Rank order limit for set 2 green */
+#define MRV_DPCC_RO_LIM_2_G
+#define MRV_DPCC_RO_LIM_2_G_MASK 0x00000030U
+#define MRV_DPCC_RO_LIM_2_G_SHIFT 4U
+/*! Slice: RO_LIM_1_RB:*/
+/*! Rank order limit for set 1 red/blue */
+#define MRV_DPCC_RO_LIM_1_RB
+#define MRV_DPCC_RO_LIM_1_RB_MASK 0x0000000CU
+#define MRV_DPCC_RO_LIM_1_RB_SHIFT 2U
+/*! Slice: RO_LIM_1_G:*/
+/*! Rank order limit for set 1 green */
+#define MRV_DPCC_RO_LIM_1_G
+#define MRV_DPCC_RO_LIM_1_G_MASK 0x00000003U
+#define MRV_DPCC_RO_LIM_1_G_SHIFT 0U
+/*! Register: isp_dpcc_rnd_offs: Differential Rank Offsets for Rank Neighbor Difference (0x00000058)*/
+/*! Slice: RND_OFFS_3_RB:*/
+/*! Rank Offset to Neighbor for set 3 red/blue */
+#define MRV_DPCC_RND_OFFS_3_RB
+#define MRV_DPCC_RND_OFFS_3_RB_MASK 0x00000C00U
+#define MRV_DPCC_RND_OFFS_3_RB_SHIFT 10U
+/*! Slice: RND_OFFS_3_G:*/
+/*! Rank Offset to Neighbor for set 3 green */
+#define MRV_DPCC_RND_OFFS_3_G
+#define MRV_DPCC_RND_OFFS_3_G_MASK 0x00000300U
+#define MRV_DPCC_RND_OFFS_3_G_SHIFT 8U
+/*! Slice: RND_OFFS_2_RB:*/
+/*! Rank Offset to Neighbor for set 2 red/blue */
+#define MRV_DPCC_RND_OFFS_2_RB
+#define MRV_DPCC_RND_OFFS_2_RB_MASK 0x000000C0U
+#define MRV_DPCC_RND_OFFS_2_RB_SHIFT 6U
+/*! Slice: RND_OFFS_2_G:*/
+/*! Rank Offset to Neighbor for set 2 green */
+#define MRV_DPCC_RND_OFFS_2_G
+#define MRV_DPCC_RND_OFFS_2_G_MASK 0x00000030U
+#define MRV_DPCC_RND_OFFS_2_G_SHIFT 4U
+/*! Slice: RND_OFFS_1_RB:*/
+/*! Rank Offset to Neighbor for set 1 red/blue */
+#define MRV_DPCC_RND_OFFS_1_RB
+#define MRV_DPCC_RND_OFFS_1_RB_MASK 0x0000000CU
+#define MRV_DPCC_RND_OFFS_1_RB_SHIFT 2U
+/*! Slice: RND_OFFS_1_G:*/
+/*! Rank Offset to Neighbor for set 1 green */
+#define MRV_DPCC_RND_OFFS_1_G
+#define MRV_DPCC_RND_OFFS_1_G_MASK 0x00000003U
+#define MRV_DPCC_RND_OFFS_1_G_SHIFT 0U
+/*! Register: isp_dpcc_bpt_ctrl: bad pixel table settings (0x0000005c)*/
+/*! Slice: BPT_RB_3x3:*/
+/*! 1: if BPT active red/blue 9 pixel (3x3) output median */
+/* 0: if BPT active red/blue 4 or 5 pixel output median  *Default**/
+#define MRV_DPCC_BPT_RB_3X3
+#define MRV_DPCC_BPT_RB_3X3_MASK 0x00000800U
+#define MRV_DPCC_BPT_RB_3X3_SHIFT 11U
+/*! Slice: BPT_G_3x3:*/
+/*! 1: if BPT active green 9 pixel (3x3) output median */
+/* 0: if BPT active green 4 or 5 pixel output median  *Default**/
+#define MRV_DPCC_BPT_G_3X3
+#define MRV_DPCC_BPT_G_3X3_MASK 0x00000400U
+#define MRV_DPCC_BPT_G_3X3_SHIFT 10U
+/*! Slice: BPT_INCL_RB_CENTER:*/
+/*! 1: if BPT active include center pixel for red/blue output median 2x2+1 */
+/* 0: if BPT active do not include center pixel for red/blue output median 2x2 *Default**/
+#define MRV_DPCC_BPT_INCL_RB_CENTER
+#define MRV_DPCC_BPT_INCL_RB_CENTER_MASK 0x00000200U
+#define MRV_DPCC_BPT_INCL_RB_CENTER_SHIFT 9U
+/*! Slice: BPT_INCL_GREEN_CENTER:*/
+/*! 1: if BPT active include center pixel for green output median 2x2+1 */
+/* 0: if BPT active do not include center pixel for green output median 2x2 *Default**/
+#define MRV_DPCC_BPT_INCL_GREEN_CENTER
+#define MRV_DPCC_BPT_INCL_GREEN_CENTER_MASK 0x00000100U
+#define MRV_DPCC_BPT_INCL_GREEN_CENTER_SHIFT 8U
+/*! Slice: BPT_USE_FIX_SET:*/
+/*! 1: for BPT write use hard coded methods set */
+/* 0: for BPT write do not use hard coded methods set *Default**/
+#define MRV_DPCC_BPT_USE_FIX_SET
+#define MRV_DPCC_BPT_USE_FIX_SET_MASK 0x00000080U
+#define MRV_DPCC_BPT_USE_FIX_SET_SHIFT 7U
+/*! Slice: BPT_USE_SET_3:*/
+/*! 1: for BPT write use methods set 3 */
+/* 0: for BPT write do not use methods set 3 *Default**/
+#define MRV_DPCC_BPT_USE_SET_3
+#define MRV_DPCC_BPT_USE_SET_3_MASK 0x00000040U
+#define MRV_DPCC_BPT_USE_SET_3_SHIFT 6U
+/*! Slice: BPT_USE_SET_2:*/
+/*! 1: for BPT write use methods set 2 */
+/* 0: for BPT write do not use methods set 2 *Default**/
+#define MRV_DPCC_BPT_USE_SET_2
+#define MRV_DPCC_BPT_USE_SET_2_MASK 0x00000020U
+#define MRV_DPCC_BPT_USE_SET_2_SHIFT 5U
+/*! Slice: BPT_USE_SET_1:*/
+/*! 1: for BPT write use methods set 1 */
+/* 0: for BPT write do not use methods set 1 *Default**/
+#define MRV_DPCC_BPT_USE_SET_1
+#define MRV_DPCC_BPT_USE_SET_1_MASK 0x00000010U
+#define MRV_DPCC_BPT_USE_SET_1_SHIFT 4U
+/*! Slice: bpt_cor_en:*/
+/*! table based correction enable */
+/* 1: table based correction is enabled */
+/* 0: table based correction is disabled */
+#define MRV_DPCC_BPT_COR_EN
+#define MRV_DPCC_BPT_COR_EN_MASK 0x00000002U
+#define MRV_DPCC_BPT_COR_EN_SHIFT 1U
+/*! Slice: bpt_det_en:*/
+/*! Bad pixel detection write enable */
+/* 1: bad pixel detection write to memory is enabled */
+/* 0: bad pixel detection write to memory is disabled */
+#define MRV_DPCC_BPT_DET_EN
+#define MRV_DPCC_BPT_DET_EN_MASK 0x00000001U
+#define MRV_DPCC_BPT_DET_EN_SHIFT 0U
+/*! Register: isp_dpcc_bpt_number: Number of entries for bad pixel table (table based correction) (0x00000060)*/
+/*! Slice: bp_number:*/
+/*! Number of current Bad Pixel entries in bad pixel table (BPT)*/
+#define MRV_DPCC_BP_NUMBER
+#define MRV_DPCC_BP_NUMBER_MASK 0x00000FFFU
+#define MRV_DPCC_BP_NUMBER_SHIFT 0U
+/*! Register: isp_dpcc_bpt_addr: TABLE Start Address for table-based correction algorithm (0x00000064)*/
+/*! Slice: bp_table_addr:*/
+/*! Table RAM start address for read or write operations. The address counter is incremented at each read or write access to the data register (auto-increment mechanism).*/
+#define MRV_DPCC_BP_TABLE_ADDR
+#define MRV_DPCC_BP_TABLE_ADDR_MASK 0x000007FFU
+#define MRV_DPCC_BP_TABLE_ADDR_SHIFT 0U
+/*! Register: isp_dpcc_bpt_data: TABLE DATA register for read and write access of table RAM (0x00000068)*/
+/*! Slice: bpt_v_addr:*/
+/*! Bad Pixel vertical address (pixel position)*/
+#define MRV_DPCC_BPT_V_ADDR
+#define MRV_DPCC_BPT_V_ADDR_MASK 0x0FFF0000U
+#define MRV_DPCC_BPT_V_ADDR_SHIFT 16U
+/*! Slice: bpt_h_addr:*/
+/*! Bad Pixel horizontal address (pixel position)*/
+#define MRV_DPCC_BPT_H_ADDR
+#define MRV_DPCC_BPT_H_ADDR_MASK 0x00001FFFU
+#define MRV_DPCC_BPT_H_ADDR_SHIFT 0U
+/*! Register: isp_wdr_ctrl: Control Bits for Wide Dynamic Range Unit (0x00000000)*/
+/*! Slice: WDR_RGB_FACTOR:*/
+/*! rgb_factor defines how much influence the RGBmax approach has in comparison to Y. The illumination reference Iref is calculated according to the following formula:*/
+/* Iref = (WDR_RGB_FACTOR * RGBYmax_tr + (8 - WDR_RGB_FACTOR) * Y) / 8 */
+/* So, rgb_factor = 0 means that the standard approach is used. Use of this factor requires that Iref has been selected, see WDR_USE_IREF.*/
+/* Value range of rgb_factor: 0...8 */
+#define MRV_WDR_RGB_FACTOR
+#define MRV_WDR_RGB_FACTOR_MASK 0x00000F00U
+#define MRV_WDR_RGB_FACTOR_SHIFT 8U
+/*! Slice: WDR_DISABLE_TRANSIENT:*/
+/*! 1: disable transient between Y and RGBY_max */
+/* 0: calculate transient between Y and RGBY_max (for noise reduction) *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#define MRV_WDR_DISABLE_TRANSIENT
+#define MRV_WDR_DISABLE_TRANSIENT_MASK 0x00000040U
+#define MRV_WDR_DISABLE_TRANSIENT_SHIFT 6U
+/*! Slice: WDR_USE_RGB7_8:*/
+/*! 1: decrease RGBmax by 7/8 (for noise reduction)*/
+/* 0: do not modify RGBmax *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#define MRV_WDR_USE_RGB7_8
+#define MRV_WDR_USE_RGB7_8_MASK 0x00000020U
+#define MRV_WDR_USE_RGB7_8_SHIFT 5U
+/*! Slice: WDR_USE_Y9_8:*/
+/*! 1: use R G B and Y*9/8 for maximum value calculation (for noise reduction)*/
+/* 0: only use R G B for maximum value calculation (RGBYmax approach)  *Default**/
+/* Use of this bit requires that Iref has been selected, see WDR_USE_IREF.*/
+#define MRV_WDR_USE_Y9_8
+#define MRV_WDR_USE_Y9_8_MASK 0x00000010U
+#define MRV_WDR_USE_Y9_8_SHIFT 4U
+/*! Slice: WDR_USE_IREF:*/
+/*! 1: use Iref (Illumination reference) instead of Y for ToneMapping and Gain calculation */
+/* 0: use Y for ToneMapping and Gain calculation  *Default**/
+/* Iref is calculated according to the following formula:*/
+/* Iref = (WDR_RGB_FACTOR * RGBmax_tr + (8 - WDR_RGB_FACTOR) * Y) / 8 */
+#define MRV_WDR_USE_IREF
+#define MRV_WDR_USE_IREF_MASK 0x00000008U
+#define MRV_WDR_USE_IREF_SHIFT 3U
+/*! Slice: WDR_CR_MAPPING_DISABLE:*/
+/*! 1: disable (bypass) Chrominance Mapping */
+/* 0: enable Chrominance Mapping  *Default**/
+/* requires that Luminance/chrominance color space has been selected */
+#define MRV_WDR_CR_MAPPING_DISABLE
+#define MRV_WDR_CR_MAPPING_DISABLE_MASK 0x00000004U
+#define MRV_WDR_CR_MAPPING_DISABLE_SHIFT 2U
+/*! Slice: WDR_COLOR_SPACE_SELECT:*/
+/*! 1: R, G, B color space */
+/* 0: Luminance/Chrominance color space  *Default**/
+#define MRV_WDR_COLOR_SPACE_SELECT
+#define MRV_WDR_COLOR_SPACE_SELECT_MASK 0x00000002U
+#define MRV_WDR_COLOR_SPACE_SELECT_SHIFT 1U
+/*! Slice: WDR_ENABLE:*/
+/*! 1: enable WDR */
+/* 0: bypass WDR  *Default**/
+#define MRV_WDR_ENABLE
+#define MRV_WDR_ENABLE_MASK 0x00000001U
+#define MRV_WDR_ENABLE_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_1: Tone Curve sample points dYn definition (part 1) (0x00000004)*/
+/*! Slice: WDR_dY8:*/
+/*! Tone curve sample point definition dY8 on the horizontal axis (input)*/
+#define MRV_WDR_DY8
+#define MRV_WDR_DY8_MASK 0x70000000U
+#define MRV_WDR_DY8_SHIFT 28U
+/*! Slice: WDR_dY7:*/
+/*! Tone curve sample point definition dY7 on the horizontal axis (input)*/
+#define MRV_WDR_DY7
+#define MRV_WDR_DY7_MASK 0x07000000U
+#define MRV_WDR_DY7_SHIFT 24U
+/*! Slice: WDR_dY6:*/
+/*! Tone curve sample point definition dY6 on the horizontal axis (input)*/
+#define MRV_WDR_DY6
+#define MRV_WDR_DY6_MASK 0x00700000U
+#define MRV_WDR_DY6_SHIFT 20U
+/*! Slice: WDR_dY5:*/
+/*! Tone curve sample point definition dY5 on the horizontal axis (input)*/
+#define MRV_WDR_DY5
+#define MRV_WDR_DY5_MASK 0x00070000U
+#define MRV_WDR_DY5_SHIFT 16U
+/*! Slice: WDR_dY4:*/
+/*! Tone curve sample point definition dY4 on the horizontal axis (input)*/
+#define MRV_WDR_DY4
+#define MRV_WDR_DY4_MASK 0x00007000U
+#define MRV_WDR_DY4_SHIFT 12U
+/*! Slice: WDR_dY3:*/
+/*! Tone curve sample point definition dY3 on the horizontal axis (input)*/
+#define MRV_WDR_DY3
+#define MRV_WDR_DY3_MASK 0x00000700U
+#define MRV_WDR_DY3_SHIFT 8U
+/*! Slice: WDR_dY2:*/
+/*! Tone curve sample point definition dY2 on the horizontal axis (input)*/
+#define MRV_WDR_DY2
+#define MRV_WDR_DY2_MASK 0x00000070U
+#define MRV_WDR_DY2_SHIFT 4U
+/*! Slice: WDR_dY1:*/
+/*! Tone curve sample point definition dY1 on the horizontal axis (input)*/
+#define MRV_WDR_DY1
+#define MRV_WDR_DY1_MASK 0x00000007U
+#define MRV_WDR_DY1_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_2: Tone Curve sample points dYn definition (part 2) (0x00000008)*/
+/*! Slice: WDR_dY16:*/
+/*! Tone curve sample point definition dY16 on the horizontal axis (input)*/
+#define MRV_WDR_DY16
+#define MRV_WDR_DY16_MASK 0x70000000U
+#define MRV_WDR_DY16_SHIFT 28U
+/*! Slice: WDR_dY15:*/
+/*! Tone curve sample point definition dY15 on the horizontal axis (input)*/
+#define MRV_WDR_DY15
+#define MRV_WDR_DY15_MASK 0x07000000U
+#define MRV_WDR_DY15_SHIFT 24U
+/*! Slice: WDR_dY14:*/
+/*! Tone curve sample point definition dY14 on the horizontal axis (input)*/
+#define MRV_WDR_DY14
+#define MRV_WDR_DY14_MASK 0x00700000U
+#define MRV_WDR_DY14_SHIFT 20U
+/*! Slice: WDR_dY13:*/
+/*! Tone curve sample point definition dY13 on the horizontal axis (input)*/
+#define MRV_WDR_DY13
+#define MRV_WDR_DY13_MASK 0x00070000U
+#define MRV_WDR_DY13_SHIFT 16U
+/*! Slice: WDR_dY12:*/
+/*! Tone curve sample point definition dY12 on the horizontal axis (input)*/
+#define MRV_WDR_DY12
+#define MRV_WDR_DY12_MASK 0x00007000U
+#define MRV_WDR_DY12_SHIFT 12U
+/*! Slice: WDR_dY11:*/
+/*! Tone curve sample point definition dY11 on the horizontal axis (input)*/
+#define MRV_WDR_DY11
+#define MRV_WDR_DY11_MASK 0x00000700U
+#define MRV_WDR_DY11_SHIFT 8U
+/*! Slice: WDR_dY10:*/
+/*! Tone curve sample point definition dY10 on the horizontal axis (input)*/
+#define MRV_WDR_DY10
+#define MRV_WDR_DY10_MASK 0x00000070U
+#define MRV_WDR_DY10_SHIFT 4U
+/*! Slice: WDR_dY9:*/
+/*! Tone curve sample point definition dY9 on the horizontal axis (input)*/
+#define MRV_WDR_DY9
+#define MRV_WDR_DY9_MASK 0x00000007U
+#define MRV_WDR_DY9_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_3: Tone Curve sample points dYn definition (part 3) (0x0000000c)*/
+/*! Slice: WDR_dY24:*/
+/*! Tone curve sample point definition dY24 on the horizontal axis (input)*/
+#define MRV_WDR_DY24
+#define MRV_WDR_DY24_MASK 0x70000000U
+#define MRV_WDR_DY24_SHIFT 28U
+/*! Slice: WDR_dY23:*/
+/*! Tone curve sample point definition dY23 on the horizontal axis (input)*/
+#define MRV_WDR_DY23
+#define MRV_WDR_DY23_MASK 0x07000000U
+#define MRV_WDR_DY23_SHIFT 24U
+/*! Slice: WDR_dY22:*/
+/*! Tone curve sample point definition dY22 on the horizontal axis (input)*/
+#define MRV_WDR_DY22
+#define MRV_WDR_DY22_MASK 0x00700000U
+#define MRV_WDR_DY22_SHIFT 20U
+/*! Slice: WDR_dY21:*/
+/*! Tone curve sample point definition dY21 on the horizontal axis (input)*/
+#define MRV_WDR_DY21
+#define MRV_WDR_DY21_MASK 0x00070000U
+#define MRV_WDR_DY21_SHIFT 16U
+/*! Slice: WDR_dY20:*/
+/*! Tone curve sample point definition dY20 on the horizontal axis (input)*/
+#define MRV_WDR_DY20
+#define MRV_WDR_DY20_MASK 0x00007000U
+#define MRV_WDR_DY20_SHIFT 12U
+/*! Slice: WDR_dY19:*/
+/*! Tone curve sample point definition dY19 on the horizontal axis (input)*/
+#define MRV_WDR_DY19
+#define MRV_WDR_DY19_MASK 0x00000700U
+#define MRV_WDR_DY19_SHIFT 8U
+/*! Slice: WDR_dY18:*/
+/*! Tone curve sample point definition dY18 on the horizontal axis (input)*/
+#define MRV_WDR_DY18
+#define MRV_WDR_DY18_MASK 0x00000070U
+#define MRV_WDR_DY18_SHIFT 4U
+/*! Slice: WDR_dY17:*/
+/*! Tone curve sample point definition dY17 on the horizontal axis (input)*/
+#define MRV_WDR_DY17
+#define MRV_WDR_DY17_MASK 0x00000007U
+#define MRV_WDR_DY17_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_4: Tone Curve sample points dYn definition (part 4) (0x00000010)*/
+/*! Slice: WDR_dY32:*/
+/*! Tone curve sample point definition dY32 on the horizontal axis (input)*/
+#define MRV_WDR_DY32
+#define MRV_WDR_DY32_MASK 0x70000000U
+#define MRV_WDR_DY32_SHIFT 28U
+/*! Slice: WDR_dY31:*/
+/*! Tone curve sample point definition dY31 on the horizontal axis (input)*/
+#define MRV_WDR_DY31
+#define MRV_WDR_DY31_MASK 0x07000000U
+#define MRV_WDR_DY31_SHIFT 24U
+/*! Slice: WDR_dY30:*/
+/*! Tone curve sample point definition dY30 on the horizontal axis (input)*/
+#define MRV_WDR_DY30
+#define MRV_WDR_DY30_MASK 0x00700000U
+#define MRV_WDR_DY30_SHIFT 20U
+/*! Slice: WDR_dY29:*/
+/*! Tone curve sample point definition dY29 on the horizontal axis (input)*/
+#define MRV_WDR_DY29
+#define MRV_WDR_DY29_MASK 0x00070000U
+#define MRV_WDR_DY29_SHIFT 16U
+/*! Slice: WDR_dY28:*/
+/*! Tone curve sample point definition dY28 on the horizontal axis (input)*/
+#define MRV_WDR_DY28
+#define MRV_WDR_DY28_MASK 0x00007000U
+#define MRV_WDR_DY28_SHIFT 12U
+/*! Slice: WDR_dY27:*/
+/*! Tone curve sample point definition dY27 on the horizontal axis (input)*/
+#define MRV_WDR_DY27
+#define MRV_WDR_DY27_MASK 0x00000700U
+#define MRV_WDR_DY27_SHIFT 8U
+/*! Slice: WDR_dY26:*/
+/*! Tone curve sample point definition dY26 on the horizontal axis (input)*/
+#define MRV_WDR_DY26
+#define MRV_WDR_DY26_MASK 0x00000070U
+#define MRV_WDR_DY26_SHIFT 4U
+/*! Slice: WDR_dY25:*/
+/*! Tone curve sample point definition dY25 on the horizontal axis (input)*/
+#define MRV_WDR_DY25
+#define MRV_WDR_DY25_MASK 0x00000007U
+#define MRV_WDR_DY25_SHIFT 0U
+/*! Register array: isp_wdr_tonecurve_ym: Tonemapping curve coefficient Ym_ (0x0028 + n*0x4 (n=0..32))*/
+/*! Slice: tonecurve_ym_n:*/
+/* Tone curve value definition y-axis (output) of WDR unit */
+#define MRV_WDR_TONECURVE_YM_N
+#define MRV_WDR_TONECURVE_YM_N_MASK 0x00001FFFU
+#define MRV_WDR_TONECURVE_YM_N_SHIFT 0U
+/*! Register: isp_wdr_offset: Offset values for RGB path (0x00000098)*/
+/*! Slice: LUM_OFFSET:*/
+/*! Luminance Offset value (a) for RGB operation mode */
+/* unsigned 12 bit value */
+#define MRV_WDR_LUM_OFFSET
+#define MRV_WDR_LUM_OFFSET_MASK 0x0FFF0000U
+#define MRV_WDR_LUM_OFFSET_SHIFT 16U
+/*! Slice: RGB_OFFSET:*/
+/*! RGB Offset value (b) for RGB operation mode */
+/* unsigned 12 bit value */
+#define MRV_WDR_RGB_OFFSET
+#define MRV_WDR_RGB_OFFSET_MASK 0x00000FFFU
+#define MRV_WDR_RGB_OFFSET_SHIFT 0U
+/*! Register: isp_wdr_deltamin: DeltaMin Threshold and Strength factor (0x0000009c)*/
+/*! Slice: DMIN_STRENGTH:*/
+/*! strength factor for DMIN */
+/* unsigned 5 bit value, range 0x00...0x10 */
+#define MRV_WDR_DMIN_STRENGTH
+#define MRV_WDR_DMIN_STRENGTH_MASK 0x001F0000U
+#define MRV_WDR_DMIN_STRENGTH_SHIFT 16U
+/*! Slice: DMIN_THRESH:*/
+/*! Lower threshold for deltaMin value */
+/* unsigned 12 bit value */
+#define MRV_WDR_DMIN_THRESH
+#define MRV_WDR_DMIN_THRESH_MASK 0x00000FFFU
+#define MRV_WDR_DMIN_THRESH_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_1_shd: Tone Curve sample points dYn definition shadow register (part 1) (0x000000a0)*/
+/*! Slice: WDR_dY8:*/
+/*! Tone curve sample point definition dY8 on the horizontal axis (input)*/
+#define MRV_WDR_DY8
+#define MRV_WDR_DY8_MASK 0x70000000U
+#define MRV_WDR_DY8_SHIFT 28U
+/*! Slice: WDR_dY7:*/
+/*! Tone curve sample point definition dY7 on the horizontal axis (input)*/
+#define MRV_WDR_DY7
+#define MRV_WDR_DY7_MASK 0x07000000U
+#define MRV_WDR_DY7_SHIFT 24U
+/*! Slice: WDR_dY6:*/
+/*! Tone curve sample point definition dY6 on the horizontal axis (input)*/
+#define MRV_WDR_DY6
+#define MRV_WDR_DY6_MASK 0x00700000U
+#define MRV_WDR_DY6_SHIFT 20U
+/*! Slice: WDR_dY5:*/
+/*! Tone curve sample point definition dY5 on the horizontal axis (input)*/
+#define MRV_WDR_DY5
+#define MRV_WDR_DY5_MASK 0x00070000U
+#define MRV_WDR_DY5_SHIFT 16U
+/*! Slice: WDR_dY4:*/
+/*! Tone curve sample point definition dY4 on the horizontal axis (input)*/
+#define MRV_WDR_DY4
+#define MRV_WDR_DY4_MASK 0x00007000U
+#define MRV_WDR_DY4_SHIFT 12U
+/*! Slice: WDR_dY3:*/
+/*! Tone curve sample point definition dY3 on the horizontal axis (input)*/
+#define MRV_WDR_DY3
+#define MRV_WDR_DY3_MASK 0x00000700U
+#define MRV_WDR_DY3_SHIFT 8U
+/*! Slice: WDR_dY2:*/
+/*! Tone curve sample point definition dY2 on the horizontal axis (input)*/
+#define MRV_WDR_DY2
+#define MRV_WDR_DY2_MASK 0x00000070U
+#define MRV_WDR_DY2_SHIFT 4U
+/*! Slice: WDR_dY1:*/
+/*! Tone curve sample point definition dY1 on the horizontal axis (input)*/
+#define MRV_WDR_DY1
+#define MRV_WDR_DY1_MASK 0x00000007U
+#define MRV_WDR_DY1_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_2_shd: Tone Curve sample points dYn definition shadow register (part 2) (0x000000a4)*/
+/*! Slice: WDR_dY16:*/
+/*! Tone curve sample point definition dY16 on the horizontal axis (input)*/
+#define MRV_WDR_DY16
+#define MRV_WDR_DY16_MASK 0x70000000U
+#define MRV_WDR_DY16_SHIFT 28U
+/*! Slice: WDR_dY15:*/
+/*! Tone curve sample point definition dY15 on the horizontal axis (input)*/
+#define MRV_WDR_DY15
+#define MRV_WDR_DY15_MASK 0x07000000U
+#define MRV_WDR_DY15_SHIFT 24U
+/*! Slice: WDR_dY14:*/
+/*! Tone curve sample point definition dY14 on the horizontal axis (input)*/
+#define MRV_WDR_DY14
+#define MRV_WDR_DY14_MASK 0x00700000U
+#define MRV_WDR_DY14_SHIFT 20U
+/*! Slice: WDR_dY13:*/
+/*! Tone curve sample point definition dY13 on the horizontal axis (input)*/
+#define MRV_WDR_DY13
+#define MRV_WDR_DY13_MASK 0x00070000U
+#define MRV_WDR_DY13_SHIFT 16U
+/*! Slice: WDR_dY12:*/
+/*! Tone curve sample point definition dY12 on the horizontal axis (input)*/
+#define MRV_WDR_DY12
+#define MRV_WDR_DY12_MASK 0x00007000U
+#define MRV_WDR_DY12_SHIFT 12U
+/*! Slice: WDR_dY11:*/
+/*! Tone curve sample point definition dY11 on the horizontal axis (input)*/
+#define MRV_WDR_DY11
+#define MRV_WDR_DY11_MASK 0x00000700U
+#define MRV_WDR_DY11_SHIFT 8U
+/*! Slice: WDR_dY10:*/
+/*! Tone curve sample point definition dY10 on the horizontal axis (input)*/
+#define MRV_WDR_DY10
+#define MRV_WDR_DY10_MASK 0x00000070U
+#define MRV_WDR_DY10_SHIFT 4U
+/*! Slice: WDR_dY9:*/
+/*! Tone curve sample point definition dY9 on the horizontal axis (input)*/
+#define MRV_WDR_DY9
+#define MRV_WDR_DY9_MASK 0x00000007U
+#define MRV_WDR_DY9_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_3_shd: Tone Curve sample points dYn definition shadow register (part 3) (0x000000a8)*/
+/*! Slice: WDR_dY24:*/
+/*! Tone curve sample point definition dY24 on the horizontal axis (input)*/
+#define MRV_WDR_DY24
+#define MRV_WDR_DY24_MASK 0x70000000U
+#define MRV_WDR_DY24_SHIFT 28U
+/*! Slice: WDR_dY23:*/
+/*! Tone curve sample point definition dY23 on the horizontal axis (input)*/
+#define MRV_WDR_DY23
+#define MRV_WDR_DY23_MASK 0x07000000U
+#define MRV_WDR_DY23_SHIFT 24U
+/*! Slice: WDR_dY22:*/
+/*! Tone curve sample point definition dY22 on the horizontal axis (input)*/
+#define MRV_WDR_DY22
+#define MRV_WDR_DY22_MASK 0x00700000U
+#define MRV_WDR_DY22_SHIFT 20U
+/*! Slice: WDR_dY21:*/
+/*! Tone curve sample point definition dY21 on the horizontal axis (input)*/
+#define MRV_WDR_DY21
+#define MRV_WDR_DY21_MASK 0x00070000U
+#define MRV_WDR_DY21_SHIFT 16U
+/*! Slice: WDR_dY20:*/
+/*! Tone curve sample point definition dY20 on the horizontal axis (input)*/
+#define MRV_WDR_DY20
+#define MRV_WDR_DY20_MASK 0x00007000U
+#define MRV_WDR_DY20_SHIFT 12U
+/*! Slice: WDR_dY19:*/
+/*! Tone curve sample point definition dY19 on the horizontal axis (input)*/
+#define MRV_WDR_DY19
+#define MRV_WDR_DY19_MASK 0x00000700U
+#define MRV_WDR_DY19_SHIFT 8U
+/*! Slice: WDR_dY18:*/
+/*! Tone curve sample point definition dY18 on the horizontal axis (input)*/
+#define MRV_WDR_DY18
+#define MRV_WDR_DY18_MASK 0x00000070U
+#define MRV_WDR_DY18_SHIFT 4U
+/*! Slice: WDR_dY17:*/
+/*! Tone curve sample point definition dY17 on the horizontal axis (input)*/
+#define MRV_WDR_DY17
+#define MRV_WDR_DY17_MASK 0x00000007U
+#define MRV_WDR_DY17_SHIFT 0U
+/*! Register: isp_wdr_tonecurve_4_shd: Tone Curve sample points dYn definition shadow register(part 4) (0x000000ac)*/
+/*! Slice: WDR_dY32:*/
+/*! Tone curve sample point definition dY32 on the horizontal axis (input)*/
+#define MRV_WDR_DY32
+#define MRV_WDR_DY32_MASK 0x70000000U
+#define MRV_WDR_DY32_SHIFT 28U
+/*! Slice: WDR_dY31:*/
+/*! Tone curve sample point definition dY31 on the horizontal axis (input)*/
+#define MRV_WDR_DY31
+#define MRV_WDR_DY31_MASK 0x07000000U
+#define MRV_WDR_DY31_SHIFT 24U
+/*! Slice: WDR_dY30:*/
+/*! Tone curve sample point definition dY30 on the horizontal axis (input)*/
+#define MRV_WDR_DY30
+#define MRV_WDR_DY30_MASK 0x00700000U
+#define MRV_WDR_DY30_SHIFT 20U
+/*! Slice: WDR_dY29:*/
+/*! Tone curve sample point definition dY29 on the horizontal axis (input)*/
+#define MRV_WDR_DY29
+#define MRV_WDR_DY29_MASK 0x00070000U
+#define MRV_WDR_DY29_SHIFT 16U
+/*! Slice: WDR_dY28:*/
+/*! Tone curve sample point definition dY28 on the horizontal axis (input)*/
+#define MRV_WDR_DY28
+#define MRV_WDR_DY28_MASK 0x00007000U
+#define MRV_WDR_DY28_SHIFT 12U
+/*! Slice: WDR_dY27:*/
+/*! Tone curve sample point definition dY27 on the horizontal axis (input)*/
+#define MRV_WDR_DY27
+#define MRV_WDR_DY27_MASK 0x00000700U
+#define MRV_WDR_DY27_SHIFT 8U
+/*! Slice: WDR_dY26:*/
+/*! Tone curve sample point definition dY26 on the horizontal axis (input)*/
+#define MRV_WDR_DY26
+#define MRV_WDR_DY26_MASK 0x00000070U
+#define MRV_WDR_DY26_SHIFT 4U
+/*! Slice: WDR_dY25:*/
+/*! Tone curve sample point definition dY25 on the horizontal axis (input)*/
+#define MRV_WDR_DY25
+#define MRV_WDR_DY25_MASK 0x00000007U
+#define MRV_WDR_DY25_SHIFT 0U
+/*! Register array: isp_wdr_tonecurve_ym_shd: Tonemapping curve coefficient shadow register (0x0160 + n*0x4 (n=0..32))*/
+/*! Slice: tonecurve_ym_n_shd:*/
+/* Tone curve value definition y-axis (output) of WDR unit */
+/* shadow register.*/
+#define MRV_WDR_TONECURVE_YM_N_SHD
+#define MRV_WDR_TONECURVE_YM_N_SHD_MASK 0x00001FFFU
+#define MRV_WDR_TONECURVE_YM_N_SHD_SHIFT 0U
+/*! Register: awb_meas_mode: AWB Measure Mode (0x00000000)*/
+/*! Slice: AWB_union_e5_and_e8:*/
+/*! unite ellipse 5 with ellipse 8. Accu and count for ellipse 8.*/
+#define ISP_AWB_UNION_E5_AND_E8
+#define ISP_AWB_UNION_E5_AND_E8_MASK 0x00000200U
+#define ISP_AWB_UNION_E5_AND_E8_SHIFT 9U
+/*! Slice: AWB_union_e5_and_e7:*/
+/*! unite ellipse 5 with ellipse 7. Accu and count for ellipse 7.*/
+#define ISP_AWB_UNION_E5_AND_E7
+#define ISP_AWB_UNION_E5_AND_E7_MASK 0x00000100U
+#define ISP_AWB_UNION_E5_AND_E7_SHIFT 8U
+/*! Slice: AWB_union_e5_and_e6:*/
+/*! unite ellipse 5 with ellipse 6. Accu and count for ellipse 6.*/
+#define ISP_AWB_UNION_E5_AND_E6
+#define ISP_AWB_UNION_E5_AND_E6_MASK 0x00000080U
+#define ISP_AWB_UNION_E5_AND_E6_SHIFT 7U
+/*! Slice: AWB_union_e1_and_e4:*/
+/*! unite ellipse 1 with ellipse 4. Accu and count for ellipse 4.*/
+#define ISP_AWB_UNION_E1_AND_E4
+#define ISP_AWB_UNION_E1_AND_E4_MASK 0x00000040U
+#define ISP_AWB_UNION_E1_AND_E4_SHIFT 6U
+/*! Slice: AWB_union_e1_and_e3:*/
+/*! unite ellipse 1 with ellipse 3. Accu and count for ellipse 3.*/
+#define ISP_AWB_UNION_E1_AND_E3
+#define ISP_AWB_UNION_E1_AND_E3_MASK 0x00000020U
+#define ISP_AWB_UNION_E1_AND_E3_SHIFT 5U
+/*! Slice: AWB_union_e1_and_e2:*/
+/*! unite ellipse 1 with ellipse 2. Accu and count for ellipse 2.*/
+#define ISP_AWB_UNION_E1_AND_E2
+#define ISP_AWB_UNION_E1_AND_E2_MASK 0x00000010U
+#define ISP_AWB_UNION_E1_AND_E2_SHIFT 4U
+/*! Slice: AWB_meas_chrom_switch:*/
+/*! Accumulates Q1 and Q2 chromaticies instead of R, G, B color signals. Results are written on AWB_ACCU registers as well.*/
+#define ISP_AWB_MEAS_CHROM_SWITCH
+#define ISP_AWB_MEAS_CHROM_SWITCH_MASK 0x00000008U
+#define ISP_AWB_MEAS_CHROM_SWITCH_SHIFT 3U
+/*! Slice: AWB_meas_irq_enable:*/
+/*! AWB measure done IRQ enable.*/
+#define ISP_AWB_MEAS_IRQ_ENABLE
+#define ISP_AWB_MEAS_IRQ_ENABLE_MASK 0x00000004U
+#define ISP_AWB_MEAS_IRQ_ENABLE_SHIFT 2U
+/*! Slice: AWB_pre_filt_en:*/
+/*! median pre filter enable.*/
+#define ISP_AWB_PRE_FILT_EN
+#define ISP_AWB_PRE_FILT_EN_MASK 0x00000002U
+#define ISP_AWB_PRE_FILT_EN_SHIFT 1U
+/*! Slice: AWB_meas_en:*/
+/*! enable measure.*/
+#define ISP_AWB_MEAS_EN
+#define ISP_AWB_MEAS_EN_MASK 0x00000001U
+#define ISP_AWB_MEAS_EN_SHIFT 0U
+/*! Register: awb_meas_h_offs: AWB window horizontal offset (0x00000004)*/
+/*! Slice: AWB_h_offset:*/
+/*! Horizontal offset in pixels.*/
+#define ISP_AWB_H_OFFSET
+#define ISP_AWB_H_OFFSET_MASK 0x00001FFFU
+#define ISP_AWB_H_OFFSET_SHIFT 0U
+/*! Register: awb_meas_v_offs: AWB window vertical offset (0x00000008)*/
+/*! Slice: AWB_v_offset:*/
+/*! Vertical offset in pixels.*/
+#define ISP_AWB_V_OFFSET
+#define ISP_AWB_V_OFFSET_MASK 0x00001FFFU
+#define ISP_AWB_V_OFFSET_SHIFT 0U
+/*! Register: awb_meas_h_size: Horizontal window size (0x0000000c)*/
+/*! Slice: AWB_h_size:*/
+/*! Horizontal size in pixels.*/
+#define ISP_AWB_H_SIZE
+#define ISP_AWB_H_SIZE_MASK 0x00003FFFU
+#define ISP_AWB_H_SIZE_SHIFT 0U
+/*! Register: awb_meas_v_size: Vertical window size (0x00000010)*/
+/*! Slice: AWB_v_size:*/
+/*! Vertical size.*/
+#define ISP_AWB_V_SIZE
+#define ISP_AWB_V_SIZE_MASK 0x00003FFFU
+#define ISP_AWB_V_SIZE_SHIFT 0U
+/*! Register: awb_meas_r_min_max: Min Max Compare Red (0x00000014)*/
+/*! Slice: r_max:*/
+/*! max red value */
+#define ISP_AWB_R_MAX
+#define ISP_AWB_R_MAX_MASK 0x0000FF00U
+#define ISP_AWB_R_MAX_SHIFT 8U
+/*! Slice: r_min:*/
+/*! min red value */
+#define ISP_AWB_R_MIN
+#define ISP_AWB_R_MIN_MASK 0x000000FFU
+#define ISP_AWB_R_MIN_SHIFT 0U
+/*! Register: awb_meas_g_min_max: Min Max Compare Green (0x00000018)*/
+/*! Slice: g_max:*/
+/*! max green value */
+#define ISP_AWB_G_MAX
+#define ISP_AWB_G_MAX_MASK 0x0000FF00U
+#define ISP_AWB_G_MAX_SHIFT 8U
+/*! Slice: g_min:*/
+/*! min green value */
+#define ISP_AWB_G_MIN
+#define ISP_AWB_G_MIN_MASK 0x000000FFU
+#define ISP_AWB_G_MIN_SHIFT 0U
+/*! Register: awb_meas_b_min_max: Min Max Compare Blue (0x0000001c)*/
+/*! Slice: b_max:*/
+/*! max blue value */
+#define ISP_AWB_B_MAX
+#define ISP_AWB_B_MAX_MASK 0x0000FF00U
+#define ISP_AWB_B_MAX_SHIFT 8U
+/*! Slice: b_min:*/
+/*! min blue value */
+#define ISP_AWB_B_MIN
+#define ISP_AWB_B_MIN_MASK 0x000000FFU
+#define ISP_AWB_B_MIN_SHIFT 0U
+/*! Register: awb_meas_divider_min: Min Compare Divider (0x00000020)*/
+/*! Slice: div_min:*/
+/*! min divider value unsigned integer with 10 fractional Bits range 0 to 0.999 */
+#define ISP_AWB_DIV_MIN
+#define ISP_AWB_DIV_MIN_MASK 0x000003FFU
+#define ISP_AWB_DIV_MIN_SHIFT 0U
+/*! Register: awb_meas_csc_coeff_0: Color conversion coefficient 0 (0x00000024)*/
+/*! Slice: cc_coeff_0:*/
+/*! coefficient 0 for color space conversion */
+#define ISP_AWB_CC_COEFF_0
+#define ISP_AWB_CC_COEFF_0_MASK 0x000007FFU
+#define ISP_AWB_CC_COEFF_0_SHIFT 0U
+/*! Register: awb_meas_ellip1_cen_x: Ellipse 1 Center X (0x00000048)*/
+/*! Slice: ellip1_cen_x:*/
+/*! Ellipse 1 Center X signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#define ISP_AWB_ELLIP1_CEN_X
+#define ISP_AWB_ELLIP1_CEN_X_MASK 0x000003FFU
+#define ISP_AWB_ELLIP1_CEN_X_SHIFT 0U
+/*! Register: awb_meas_ellip1_cen_y: Ellipse 1 Center Y (0x0000004c)*/
+/*! Slice: ellip1_cen_y:*/
+/*! Ellipse 1 Center Y signed integer value with 9 bit fractional part, range -1 to 0.998 */
+#define ISP_AWB_ELLIP1_CEN_Y
+#define ISP_AWB_ELLIP1_CEN_Y_MASK 0x000003FFU
+#define ISP_AWB_ELLIP1_CEN_Y_SHIFT 0U
+/*! Register: awb_meas_ellip1_a1: Ellipse 1 coefficient a1 (0x00000088)*/
+/*! Slice: ellip1_a1:*/
+/*! Ellipse 1 Coefficient a1 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#define ISP_AWB_ELLIP1_A1
+#define ISP_AWB_ELLIP1_A1_MASK 0x00000FFFU
+#define ISP_AWB_ELLIP1_A1_SHIFT 0U
+/*! Register: awb_meas_ellip1_a2: Ellipse 1 coefficient a2 (0x0000008c)*/
+/*! Slice: ellip1_a2:*/
+/*! Ellipse 1 Coefficient a2 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#define ISP_AWB_ELLIP1_A2
+#define ISP_AWB_ELLIP1_A2_MASK 0x000001FFU
+#define ISP_AWB_ELLIP1_A2_SHIFT 0U
+/*! Register: awb_meas_ellip1_a3: Ellipse 1 coefficient a3 (0x00000090)*/
+/*! Slice: ellip1_a3:*/
+/*! Ellipse 1 Coefficient a3 signed integer value with 8 bit fractional part, range -7.996 to 7.996 */
+#define ISP_AWB_ELLIP1_A3
+#define ISP_AWB_ELLIP1_A3_MASK 0x00000FFFU
+#define ISP_AWB_ELLIP1_A3_SHIFT 0U
+/*! Register: awb_meas_ellip1_a4: Ellipse 1 coefficient a4 (0x00000094)*/
+/*! Slice: ellip1_a4:*/
+/*! Ellipse 1 Coefficient a4 signed integer value with 8 bit fractional part, range -1 to 0.996 */
+#define ISP_AWB_ELLIP1_A4
+#define ISP_AWB_ELLIP1_A4_MASK 0x000001FFU
+#define ISP_AWB_ELLIP1_A4_SHIFT 0U
+/*! Register: awb_meas_ellip1_rmax: Ellipse 1 r_max (0x00000108)*/
+/*! Slice: ellip1_rmax:*/
+/*! Ellipse 1 max radius square compare value */
+#define ISP_AWB_ELLIP1_RMAX
+#define ISP_AWB_ELLIP1_RMAX_MASK 0x00FFFFFFU
+#define ISP_AWB_ELLIP1_RMAX_SHIFT 0U
+/*! Register: awb_meas_counter_1: AWB Counter 1 (0x00000128)*/
+/*! Slice: count_1:*/
+/*! counted Pixels of Ellipse 1 */
+#define ISP_AWB_COUNT_1
+#define ISP_AWB_COUNT_1_MASK 0x00FFFFFFU
+#define ISP_AWB_COUNT_1_SHIFT 0U
+/*! Register array: awb_meas_accu: AWB Accu Read (0x290 + n*0x4 (n=0..23))*/
+/*! Slice: read_accu:*/
+/* measured sum[34:3] of RGB values.*/
+#define ISP_AWB_READ_ACCU
+#define ISP_AWB_READ_ACCU_MASK 0xFFFFFFFFU
+#define ISP_AWB_READ_ACCU_SHIFT 0U
+/*! Register: isp64_hist_ctrl: Histogram control (0x00000000)*/
+/*! Slice: hist_update_enable:*/
+/*! 0: automatic register update at end of measuement ot frame denied */
+/* 1: automatic register update at end of measuement ot frame enabled.*/
+#define MRV_HIST_UPDATE_ENABLE
+#define MRV_HIST_UPDATE_ENABLE_MASK 0x00000001U
+#define MRV_HIST_UPDATE_ENABLE_SHIFT 0U
+/*! Register: isp64_hist_prop: Histogram properties (0x00000004)*/
+/*! Slice: channel_select:*/
+/*! select 1 out of max. 8 input channels */
+/* 7: channel 7 */
+/* 6: channel 6 */
+/* 5: channel 5 */
+/* 4: channel 4 */
+/* 3: channel 3 */
+/* 2: channel 2 */
+/* 1: channel 1 */
+/* 0: channel 0 */
+/* The channels might be RGB or Bayer channels. Each channel provides 3 subchannels for tranfer the RGB component data. However if the channel operates in bayer mode only subchannel 0 is used transferring the interleaved bayer pattern data. Check with top level specification to discover the channel type.*/
+#define MRV_HIST_CHANNEL_SELECT
+#define MRV_HIST_CHANNEL_SELECT_MASK 0x00000038U
+#define MRV_HIST_CHANNEL_SELECT_SHIFT 3U
+/*! Slice: hist_mode:*/
+/*! histogram mode (RGB/Bayer)*/
+/* 7, 6: reserved */
+/* 5: bayer Gb histogram */
+/* 4: bayer B histogram */
+/* 3: bayer Gr histogram */
+/* 2: bayer R histogram */
+/* 1: Y/R/G/B histogram controlled via coefficients coeff_r/g/b */
+/* 0: disable, no measurements */
+/* With histogram mode 1 all three subchannels are used. Modes 2...5 use only th subchannel 0 which transfers the bayer pattern data. Check with top level specification to discover the channel type.*/
+#define MRV_HIST_MODE
+#define MRV_HIST_MODE_MASK 0x00000007U
+#define MRV_HIST_MODE_SHIFT 0U
+/*! Register: isp64_hist_subsampling: Subsampling properties (0x00000008)*/
+/*! Slice: v_stepsize:*/
+/*! histogram veritcal predivider, process every (stepsize)th line, all other lines are skipped */
+/* RGB mode:*/
+/* 0: not allowed */
+/* 1: process every input line */
+/* 2: process every second line */
+/* 3: process every third input line */
+/* 4: process every fourth input line */
+/* ...*/
+/* 7FH: process every 127th line */
+/* Bayer mode:*/
+/* 0: not allowed */
+/* 1: process every second input line */
+/* 2: process every fourth line */
+/* 3: process every sixth input line */
+/* 4: process every eighth input line */
+/* ...*/
+/* 7FH: process every 254th line */
+/* In bayer mode vertical subsampling will start at the 1st input line which contain the bayer component selected in ISP64_HIST_PROP::hist_mode.*/
+#define MRV_HIST_V_STEPSIZE
+#define MRV_HIST_V_STEPSIZE_MASK 0x7F000000U
+#define MRV_HIST_V_STEPSIZE_SHIFT 24U
+/*! Slice: h_step_inc:*/
+/*! horizontal subsampling step counter increment.*/
+/* In RGB mode the subsampling counter cnt is incremented by h_step_inc with every input pixel (cnt %= cnt + h_step_inc). A valid subsampling position is reached when cnt would result in a value %= 2^16. In this case the new counter value is cnt = cnt + h_step_inc - 2^16. For example if every incoming pixel shall be selected configure h_step_inc = 2^16.*/
+/* In Bayer mode the behaviour is similar but for the fact that cnt is only incremented for pixels which belong to the bayer component selected in ISP64_HIST_PROP::hist_mode.*/
+#define MRV_HIST_H_STEP_INC
+#define MRV_HIST_H_STEP_INC_MASK 0x0001FFFFU
+#define MRV_HIST_H_STEP_INC_SHIFT 0U
+/*! Register: isp64_hist_coeff_r: Color conversion coefficient for red (0x0000000c)*/
+/*! Slice: coeff_r:*/
+/*! coefficient for red for weighted component sum: out_sample = coeff_r * red + coeff_g*green + coeff_b * blue.*/
+#define MRV_HIST_COEFF_R
+#define MRV_HIST_COEFF_R_MASK 0x000000FFU
+#define MRV_HIST_COEFF_R_SHIFT 0U
+/*! Register: isp64_hist_coeff_g: Color conversion coefficient for green (0x00000010)*/
+/*! Slice: coeff_g:*/
+/*! coefficient for green for weighted component sum: out_sample = coeff_r * red + coeff_g*green + coeff_b * blue.*/
+#define MRV_HIST_COEFF_G
+#define MRV_HIST_COEFF_G_MASK 0x000000FFU
+#define MRV_HIST_COEFF_G_SHIFT 0U
+/*! Register: isp64_hist_coeff_b: Color conversion coefficient for blue (0x00000014)*/
+/*! Slice: coeff_b:*/
+/*! coefficient for blue for weighted component sum: out_sample = coeff_r * red + coeff_g*green + coeff_b * blue.*/
+#define MRV_HIST_COEFF_B
+#define MRV_HIST_COEFF_B_MASK 0x000000FFU
+#define MRV_HIST_COEFF_B_SHIFT 0U
+/*! Register: isp64_hist_h_offs: Histogram window horizontal offset for first window of 25 sub-windows (0x00000018)*/
+/*! Slice: hist_h_offset:*/
+/*! Horizontal offset of first window in pixels.*/
+#define MRV_HIST_H_OFFSET
+#define MRV_HIST_H_OFFSET_MASK 0x00001FFFU
+#define MRV_HIST_H_OFFSET_SHIFT 0U
+/*! Register: isp64_hist_v_offs: Histogram window vertical offset for first window of 25 sub-windows (0x0000001c)*/
+/*! Slice: hist_v_offset:*/
+/*! Vertical offset of first window in pixels.*/
+#define MRV_HIST_V_OFFSET
+#define MRV_HIST_V_OFFSET_MASK 0x00001FFFU
+#define MRV_HIST_V_OFFSET_SHIFT 0U
+/*! Register: isp64_hist_h_size: Horizontal (sub-)window size (0x00000020)*/
+/*! Slice: hist_h_size:*/
+/*! Horizontal size in pixels of one sub-window.*/
+#define MRV_HIST_H_SIZE
+#define MRV_HIST_H_SIZE_MASK 0x000007FFU
+#define MRV_HIST_H_SIZE_SHIFT 0U
+/*! Register: isp64_hist_v_size: Vertical (sub-)window size (0x00000024)*/
+/*! Slice: hist_v_size:*/
+/*! Vertical size in lines of one sub-window.*/
+#define MRV_HIST_V_SIZE
+#define MRV_HIST_V_SIZE_MASK 0x000007FFU
+#define MRV_HIST_V_SIZE_SHIFT 0U
+/*! Register: isp64_hist_sample_range: Weighting factor for sub-windows (0x00000028)*/
+/*! Slice: sample_shift:*/
+/*! sample (left) shift will be executed after offset subtraction and prior to histogram evaluation */
+#define MRV_HIST_SAMPLE_SHIFT
+#define MRV_HIST_SAMPLE_SHIFT_MASK 0x00070000U
+#define MRV_HIST_SAMPLE_SHIFT_SHIFT 16U
+/*! Slice: sample_offset:*/
+/*! sample offset will be subtracted from input sample prior to shift and histogram evaluation */
+#define MRV_HIST_SAMPLE_OFFSET
+#define MRV_HIST_SAMPLE_OFFSET_MASK 0x00000FFFU
+#define MRV_HIST_SAMPLE_OFFSET_SHIFT 0U
+/*! Register: isp64_hist_weight_00to30: Weighting factor for sub-windows (0x0000002c)*/
+/*! Slice: hist_weight_30:*/
+/*! weighting factor for sub-window 30 */
+#define MRV_HIST_WEIGHT_30
+#define MRV_HIST_WEIGHT_30_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_30_SHIFT 24U
+/*! Slice: hist_weight_20:*/
+/*! weighting factor for sub-window 20 */
+#define MRV_HIST_WEIGHT_20
+#define MRV_HIST_WEIGHT_20_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_20_SHIFT 16U
+/*! Slice: hist_weight_10:*/
+/*! weighting factor for sub-window 10 */
+#define MRV_HIST_WEIGHT_10
+#define MRV_HIST_WEIGHT_10_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_10_SHIFT 8U
+/*! Slice: hist_weight_00:*/
+/*! weighting factor for sub-window 00 */
+#define MRV_HIST_WEIGHT_00
+#define MRV_HIST_WEIGHT_00_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_00_SHIFT 0U
+/*! Register: isp64_hist_weight_40to21: Weighting factor for sub-windows (0x00000030)*/
+/*! Slice: hist_weight_21:*/
+/*! weighting factor for sub-window 21 */
+#define MRV_HIST_WEIGHT_21
+#define MRV_HIST_WEIGHT_21_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_21_SHIFT 24U
+/*! Slice: hist_weight_11:*/
+/*! weighting factor for sub-window 11 */
+#define MRV_HIST_WEIGHT_11
+#define MRV_HIST_WEIGHT_11_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_11_SHIFT 16U
+/*! Slice: hist_weight_01:*/
+/*! weighting factor for sub-window 01 */
+#define MRV_HIST_WEIGHT_01
+#define MRV_HIST_WEIGHT_01_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_01_SHIFT 8U
+/*! Slice: hist_weight_40:*/
+/*! weighting factor for sub-window 40 */
+#define MRV_HIST_WEIGHT_40
+#define MRV_HIST_WEIGHT_40_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_40_SHIFT 0U
+/*! Register: isp64_hist_weight_31to12: Weighting factor for sub-windows (0x00000034)*/
+/*! Slice: hist_weight_12:*/
+/*! weighting factor for sub-window 12 */
+#define MRV_HIST_WEIGHT_12
+#define MRV_HIST_WEIGHT_12_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_12_SHIFT 24U
+/*! Slice: hist_weight_02:*/
+/*! weighting factor for sub-window 02 */
+#define MRV_HIST_WEIGHT_02
+#define MRV_HIST_WEIGHT_02_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_02_SHIFT 16U
+/*! Slice: hist_weight_41:*/
+/*! weighting factor for sub-window 41 */
+#define MRV_HIST_WEIGHT_41
+#define MRV_HIST_WEIGHT_41_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_41_SHIFT 8U
+/*! Slice: hist_weight_31:*/
+/*! weighting factor for sub-window 31 */
+#define MRV_HIST_WEIGHT_31
+#define MRV_HIST_WEIGHT_31_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_31_SHIFT 0U
+/*! Register: isp64_hist_weight_22to03: Weighting factor for sub-windows (0x00000038)*/
+/*! Slice: hist_weight_03:*/
+/*! weighting factor for sub-window 03 */
+#define MRV_HIST_WEIGHT_03
+#define MRV_HIST_WEIGHT_03_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_03_SHIFT 24U
+/*! Slice: hist_weight_42:*/
+/*! weighting factor for sub-window 42 */
+#define MRV_HIST_WEIGHT_42
+#define MRV_HIST_WEIGHT_42_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_42_SHIFT 16U
+/*! Slice: hist_weight_32:*/
+/*! weighting factor for sub-window 32 */
+#define MRV_HIST_WEIGHT_32
+#define MRV_HIST_WEIGHT_32_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_32_SHIFT 8U
+/*! Slice: hist_weight_22:*/
+/*! weighting factor for sub-window 22 */
+#define MRV_HIST_WEIGHT_22
+#define MRV_HIST_WEIGHT_22_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_22_SHIFT 0U
+/*! Register: isp64_hist_weight_13to43: Weighting factor for sub-windows (0x0000003c)*/
+/*! Slice: hist_weight_43:*/
+/*! weighting factor for sub-window 43 */
+#define MRV_HIST_WEIGHT_43
+#define MRV_HIST_WEIGHT_43_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_43_SHIFT 24U
+/*! Slice: hist_weight_33:*/
+/*! weighting factor for sub-window 33 */
+#define MRV_HIST_WEIGHT_33
+#define MRV_HIST_WEIGHT_33_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_33_SHIFT 16U
+/*! Slice: hist_weight_23:*/
+/*! weighting factor for sub-window 23 */
+#define MRV_HIST_WEIGHT_23
+#define MRV_HIST_WEIGHT_23_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_23_SHIFT 8U
+/*! Slice: hist_weight_13:*/
+/*! weighting factor for sub-window 13 */
+#define MRV_HIST_WEIGHT_13
+#define MRV_HIST_WEIGHT_13_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_13_SHIFT 0U
+/*! Register: isp64_hist_weight_04to34: Weighting factor for sub-windows (0x00000040)*/
+/*! Slice: hist_weight_34:*/
+/*! weighting factor for sub-window 34 */
+#define MRV_HIST_WEIGHT_34
+#define MRV_HIST_WEIGHT_34_MASK 0x1F000000U
+#define MRV_HIST_WEIGHT_34_SHIFT 24U
+/*! Slice: hist_weight_24:*/
+/*! weighting factor for sub-window 24 */
+#define MRV_HIST_WEIGHT_24
+#define MRV_HIST_WEIGHT_24_MASK 0x001F0000U
+#define MRV_HIST_WEIGHT_24_SHIFT 16U
+/*! Slice: hist_weight_14:*/
+/*! weighting factor for sub-window 14 */
+#define MRV_HIST_WEIGHT_14
+#define MRV_HIST_WEIGHT_14_MASK 0x00001F00U
+#define MRV_HIST_WEIGHT_14_SHIFT 8U
+/*! Slice: hist_weight_04:*/
+/*! weighting factor for sub-window 04 */
+#define MRV_HIST_WEIGHT_04
+#define MRV_HIST_WEIGHT_04_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_04_SHIFT 0U
+/*! Register: isp64_hist_weight_44: Weighting factor for sub-windows (0x00000044)*/
+/*! Slice: hist_weight_44:*/
+/*! weighting factor for sub-window 44 */
+#define MRV_HIST_WEIGHT_44
+#define MRV_HIST_WEIGHT_44_MASK 0x0000001FU
+#define MRV_HIST_WEIGHT_44_SHIFT 0U
+/*! Register: isp64_hist_forced_upd_start_line: Forced update start line limit (0x00000048)*/
+/*! Slice: forced_upd_start_line:*/
+/*! start line for histogram calculation in case of forced update. histogram is started as soon as current line < forced_upd_start_line. Used start line will be given in ISP64_HIST_VSTART_STATUS.*/
+#define MRV_HIST_FORCED_UPD_START_LINE
+#define MRV_HIST_FORCED_UPD_START_LINE_MASK 0x00001FFFU
+#define MRV_HIST_FORCED_UPD_START_LINE_SHIFT 0U
+/*! Register: isp64_hist_forced_update: Histogram forced update (0x0000004c)*/
+/*! Slice: forced_upd:*/
+/*! 0: no effect */
+/* 1: forcing register update.*/
+#define MRV_HIST_FORCED_UPD
+#define MRV_HIST_FORCED_UPD_MASK 0x00000001U
+#define MRV_HIST_FORCED_UPD_SHIFT 0U
+/*! Register: isp64_hist_vstart_status: Forced update start line status (0x00000050)*/
+/*! Slice: hist_vstart_status:*/
+/*! start line for histogram. Important in case of backward switching because 1st histogram after switch might not cover the complete image.*/
+#define MRV_HIST_VSTART_STATUS
+#define MRV_HIST_VSTART_STATUS_MASK 0x00001FFFU
+#define MRV_HIST_VSTART_STATUS_SHIFT 0U
+/*! Register array: isp64_hist_bin: histogram measurement result bin (0x0A8 + n*0x4 (n=0..31))*/
+/*! Slice: hist_bin:*/
+/* measured bin count as 16-bit unsigned integer value plus 4 bit fractional part */
+#define MRV_HIST_BIN
+#define MRV_HIST_BIN_MASK 0x000FFFFFU
+#define MRV_HIST_BIN_SHIFT 0U
+/*! Register: isp_vsm_mode: VS Measure Mode (0x00000000)*/
+/*! Slice: vsm_meas_irq_enable:*/
+/*! 1: VS measure done IRQ enable.*/
+#define ISP_VSM_MEAS_IRQ_ENABLE
+#define ISP_VSM_MEAS_IRQ_ENABLE_MASK 0x00000002U
+#define ISP_VSM_MEAS_IRQ_ENABLE_SHIFT 1U
+/*! Slice: vsm_meas_en:*/
+/*! 1: enable measure.*/
+#define ISP_VSM_MEAS_EN
+#define ISP_VSM_MEAS_EN_MASK 0x00000001U
+#define ISP_VSM_MEAS_EN_SHIFT 0U
+/*! Register: isp_vsm_h_offs: VSM window horizontal offset (0x00000004)*/
+/*! Slice: vsm_h_offset:*/
+/*! Horizontal offset in pixels.*/
+#define ISP_VSM_H_OFFSET
+#define ISP_VSM_H_OFFSET_MASK 0x00001FFFU
+#define ISP_VSM_H_OFFSET_SHIFT 0U
+/*! Register: isp_vsm_v_offs: VSM window vertical offset (0x00000008)*/
+/*! Slice: vsm_v_offset:*/
+/*! Vertical offset in pixels.*/
+#define ISP_VSM_V_OFFSET
+#define ISP_VSM_V_OFFSET_MASK 0x00001FFFU
+#define ISP_VSM_V_OFFSET_SHIFT 0U
+/*! Register: isp_vsm_h_size: Horizontal measure window size (0x0000000c)*/
+/*! Slice: vsm_h_size:*/
+/*! Horizontal size in pixels. Range 64..1920 */
+#define ISP_VSM_H_SIZE
+#define ISP_VSM_H_SIZE_MASK 0x00000780U
+#define ISP_VSM_H_SIZE_SHIFT 1U
+/*! Register: isp_vsm_v_size: Vertical measure window size (0x00000010)*/
+/*! Slice: vsm_v_size:*/
+/*! Vertical size. Range 64..1088 */
+#define ISP_VSM_V_SIZE
+#define ISP_VSM_V_SIZE_MASK 0x00000440U
+#define ISP_VSM_V_SIZE_SHIFT 1U
+/*! Register: isp_vsm_h_segments: Iteration 1 horizontal segments (0x00000014)*/
+/*! Slice: vsm_h_segments:*/
+/*! number of 16 point wide segments enclosed by the first iteration sample points in horizontal direction. Range: 1 ... 128 */
+#define ISP_VSM_H_SEGMENTS
+#define ISP_VSM_H_SEGMENTS_MASK 0x000000FFU
+#define ISP_VSM_H_SEGMENTS_SHIFT 0U
+/*! Register: isp_vsm_v_segments: Iteration 1 vertical segments (0x00000018)*/
+/*! Slice: vsm_v_segments:*/
+/*! number of 16 point wide segments enclosed by the first iteration sample points in vertical direction. Range: 1 ... 128 */
+#define ISP_VSM_V_SEGMENTS
+#define ISP_VSM_V_SEGMENTS_MASK 0x000000FFU
+#define ISP_VSM_V_SEGMENTS_SHIFT 0U
+/*! Register: isp_vsm_delta_h: estimated horizontal displacement (0x0000001c)*/
+/*! Slice: delta_h:*/
+/*! estimated horizontal displacement 12Bit two's complement. positive values indicate a displacement of the image from right to left (camera turns right)*/
+#define ISP_VSM_DELTA_H
+#define ISP_VSM_DELTA_H_MASK 0x00000FFFU
+#define ISP_VSM_DELTA_H_SHIFT 0U
+/*! Register: isp_vsm_delta_v: estimated vertical displacement (0x00000020)*/
+/*! Slice: delta_v:*/
+/*! estimated vertical displacement 12Bit two's complement. positive values indicate a displacement of the image from bottom to top (camera turns down)*/
+#define ISP_VSM_DELTA_V
+#define ISP_VSM_DELTA_V_MASK 0x00000FFFU
+#define ISP_VSM_DELTA_V_SHIFT 0U
+#ifdef ISP_RGBGC
+/*! Register: isp_ctrl:isp control register (0x00000400)*/
+/*! Slice: rgb_gc_enable */
+/*! Control of rgb gamma correction */
+/*! 1'b0: disable rgb GC bypass mode */
+/*! 1'b1: enable rgb GC mode */
+#define ISP_RGBGC_ENABLE
+#define ISP_RGBGC_ENABLE_MASK  0x00000800U
+#define ISP_RGBGC_ENABLE_SHIFT 11U
+#endif
+#ifdef ISP_GCMONO
+/*! Register: isp_ctrl:isp control register (0x00000400)*/
+/*! Slice: mono_gc_enable */
+/*! Control of gamma correction for mono sensor RAW data */
+/*! 1'b0: disable GC bypass mode */
+/*! 1'b1: enable GC mode */
+#define ISP_GCMONO_ENABLE
+#define ISP_GCMONO_ENABLE_MASK  0x00080000U
+#define ISP_GCMONO_ENABLE_SHIFT 19U
+/*! Register: isp_ctrl:isp control register (0x00000400)*/
+/*! Slice: mono_gc_mode */
+/*! Control of gamma correction for mono sensor RAW data mode */
+/*! 1'b0: 0: 10->8 */
+/*! 1'b1: 12->10 */
+#define ISP_GCMONO_MODE
+#define ISP_GCMONO_MODE_MASK  0x00100000U
+#define ISP_GCMONO_MODE_SHIFT 20
+/*! Register: isp_gcmono_ctrl: GC Mono control register (0x00000000)*/
+/*! Slice: mono_gc_enable */
+/*! Control of gamma correction for mono sensor RAW data */
+/*! 1'b0: disable GC bypass mode */
+/*! 1'b1: enable GC mode */
+#define ISP_GCMONO_SWITCH
+#define ISP_GCMONO_SWITCH_MASK  0x00000001U
+#define ISP_GCMONO_SWITCH_SHIFT 0U
+/*! Slice: mono_gc_cfg_done */
+/*! To notify the ISP HW the LUT configuration is done, ready to use, active high.*/
+/*! Writing ZERO reset teh internal read/write pointer and also indicates that the LUT can be configured or read from CPU.*/
+#define ISP_GCMONO_CFG_DONE
+#define ISP_GCMONO_CFG_DONE_MASK  0x00000002U
+#define ISP_GCMONO_CFG_DONE_SHIFT 1U
+/*! Register: isp_gcmono_para_base: GC Mono Gamma LUT for mono sensor (0x00000004)*/
+/*! Slice: Base address of Gamma LUT for mono sensor, when AHB slave writes/reads this register address continuously, it means it will start to */
+/*!   write or read the LUT.*/
+#define ISP_GCMONO_PARA_BASE
+#define ISP_GCMONO_PARA_BASE_MASK 0xFFFFFFFFU
+#define ISP_GCMONO_PARA_BASE_SHIFT 0U
+#endif
+/*! Register: isp_wdr2_ctrl   (0x00003100)*/
+/*! Slice: wdr2_soft_reset_flag:*/
+#define  WDR2_SOFT_RESET_FLAG
+#define  WDR2_SOFT_RESET_FLAG_MASK 0x00000004U
+#define  WDR2_SOFT_RESET_FLAG_SHIFT 2U
+/*! Slice: wdr2_mono_input:*/
+#define  WDR2_MONO_INPUT
+#define  WDR2_MONO_INPUT_MASK 0x00000002U
+#define  WDR2_MONO_INPUT_SHIFT 1U
+/*! Slice: wdr2_enable:*/
+#define  WDR2_ENABLE
+#define  WDR2_ENABLE_MASK 0x00000001U
+#define  WDR2_ENABLE_SHIFT 0U
+/*! Register: isp_wdr2_blk_siz  (0x00003104)*/
+/*! Slice: hist_block_width:*/
+#define  HIST_BLOCK_WIDTH
+#define  HIST_BLOCK_WIDTH_MASK 0x000FFC00U
+#define  HIST_BLOCK_WIDTH_SHIFT 10U
+/*! Slice: hist_block_height:*/
+#define  HIST_BLOCK_HEIGHT
+#define  HIST_BLOCK_HEIGHT_MASK 0x000003FFU
+#define  HIST_BLOCK_HEIGHT_SHIFT 0U
+/*! Register: isp_wdr2_color_weight   (0x00003108)*/
+/*! Slice: wdr2_color_weight_2:*/
+#define  WDR2_COLOR_WEIGHT_2
+#define  WDR2_COLOR_WEIGHT_2_MASK 0x00FF0000U
+#define  WDR2_COLOR_WEIGHT_2_SHIFT 16U
+/*! Slice: wdr2_color_weight_1:*/
+#define  WDR2_COLOR_WEIGHT_1
+#define  WDR2_COLOR_WEIGHT_1_MASK 0x0000FF00U
+#define  WDR2_COLOR_WEIGHT_1_SHIFT 8U
+/*! Slice: wdr2_color_weight_0:*/
+#define  WDR2_COLOR_WEIGHT_0
+#define  WDR2_COLOR_WEIGHT_0_MASK 0x000000FFU
+#define  WDR2_COLOR_WEIGHT_0_SHIFT 0U
+/*! Register: isp_wdr2_blt_sigma  (0x0000310C)*/
+/*! Slice: wdr2_blt_range_sigma:*/
+#define  WDR2_BLT_RANGE_SIGMA
+#define  WDR2_BLT_RANGE_SIGMA_MASK 0x000FFC00U
+#define  WDR2_BLT_RANGE_SIGMA_SHIFT 10U
+/*! Slice: wdr2_blt_spatial_sigma:*/
+#define  WDR2_BLT_SPATIAL_SIGMA
+#define  WDR2_BLT_SPATIAL_SIGMA_MASK 0x000003FFU
+#define  WDR2_BLT_SPATIAL_SIGMA_SHIFT 0U
+/*! Register: isp_wdr2_blt_kernel_0  (0x00003110)*/
+/*! Slice: wdr2_blt_kernel_c:*/
+#define  WDR2_BLT_KERNEL_C
+#define  WDR2_BLT_KERNEL_C_MASK 0x00FF0000U
+#define  WDR2_BLT_KERNEL_C_SHIFT 16U
+/*! Slice: wdr2_blt_kernel_b:*/
+#define  WDR2_BLT_KERNEL_B
+#define  WDR2_BLT_KERNEL_B_MASK 0x0000FF00U
+#define  WDR2_BLT_KERNEL_B_SHIFT 8U
+/*! Slice: wdr2_blt_kernel_a:*/
+#define  WDR2_BLT_KERNEL_A
+#define  WDR2_BLT_KERNEL_A_MASK 0x000000FFU
+#define  WDR2_BLT_KERNEL_A_SHIFT 0U
+/*! Register: isp_wdr2_blt_kernel_1  (0x00003114)*/
+/*! Slice: wdr2_blt_kernel_f:*/
+#define  WDR2_BLT_KERNEL_F
+#define  WDR2_BLT_KERNEL_F_MASK 0x00FF0000U
+#define  WDR2_BLT_KERNEL_F_SHIFT 16U
+/*! Slice: wdr2_blt_kernel_e:*/
+#define  WDR2_BLT_KERNEL_E
+#define  WDR2_BLT_KERNEL_E_MASK 0x0000FF00U
+#define  WDR2_BLT_KERNEL_E_SHIFT 8U
+/*! Slice: wdr2_blt_kernel_d:*/
+#define  WDR2_BLT_KERNEL_D
+#define  WDR2_BLT_KERNEL_D_MASK 0x000000FFU
+#define  WDR2_BLT_KERNEL_D_SHIFT 0U
+/*! Register: isp_wdr2_vol_shift_bit  (0x00003118)*/
+/*! Slice: wdr2_vol_shift_bit:*/
+#define  WDR2_VOL_SHIFT_BIT
+#define  WDR2_VOL_SHIFT_BIT_MASK 0x0000001FU
+#define  WDR2_VOL_SHIFT_BIT_SHIFT 0U
+/*! Register: isp_wdr2_bin_dist_0  (0x0000311C)*/
+/*! Slice: wdr2_bin_dist_1:*/
+#define  WDR2_BIN_DIST_1
+#define  WDR2_BIN_DIST_1_MASK 0x0FFF0000U
+#define  WDR2_BIN_DIST_1_SHIFT 16U
+/*! Slice: wdr2_bin_dist_0:*/
+#define  WDR2_BIN_DIST_0
+#define  WDR2_BIN_DIST_0_MASK 0x00000FFFU
+#define  WDR2_BIN_DIST_0_SHIFT 0U
+/*! Register: isp_wdr2_bin_dist_1  (0x00003120)*/
+/*! Slice: wdr2_bin_dist_3:*/
+#define  WDR2_BIN_DIST_3
+#define  WDR2_BIN_DIST_3_MASK 0x0FFF0000U
+#define  WDR2_BIN_DIST_3_SHIFT 16U
+/*! Slice: wdr2_bin_dist_2:*/
+#define  WDR2_BIN_DIST_2
+#define  WDR2_BIN_DIST_2_MASK 0x00000FFFU
+#define  WDR2_BIN_DIST_2_SHIFT 0U
+/*! Register: isp_wdr2_bin_dist_2  (0x00003124)*/
+/*! Slice: wdr2_bin_dist_5:*/
+#define  WDR2_BIN_DIST_5
+#define  WDR2_BIN_DIST_5_MASK 0x0FFF0000U
+#define  WDR2_BIN_DIST_5_SHIFT 16U
+/*! Slice: wdr2_bin_dist_4:*/
+#define  WDR2_BIN_DIST_4
+#define  WDR2_BIN_DIST_4_MASK 0x00000FFFU
+#define  WDR2_BIN_DIST_4_SHIFT 0U
+/*! Register: isp_wdr2_bin_dist_3  (0x00003128)*/
+/*! Slice: wdr2_bin_dist_7:*/
+#define  WDR2_BIN_DIST_7
+#define  WDR2_BIN_DIST_7_MASK 0x0FFF0000U
+#define  WDR2_BIN_DIST_7_SHIFT 16U
+/*! Slice: wdr2_bin_dist_6:*/
+#define  WDR2_BIN_DIST_6
+#define  WDR2_BIN_DIST_6_MASK 0x00000FFFU
+#define  WDR2_BIN_DIST_6_SHIFT 0U
+/*! Register: isp_wdr2_hist_norm_fac  (0x0000312C)*/
+/*! Slice: wdr2_hist_norm_shift_bit:*/
+#define  WDR2_HIST_NORM_SHIFT_BIT
+#define  WDR2_HIST_NORM_SHIFT_BIT_MASK 0x0FFF0000U
+#define  WDR2_HIST_NORM_SHIFT_BIT_SHIFT 16U
+/*! Slice: wdr2_hist_norm_mul:*/
+#define  WDR2_HIST_NORM_MUL
+#define  WDR2_HIST_NORM_MUL_MASK 0x00000FFFU
+#define  WDR2_HIST_NORM_MUL_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_lut  (0x00003138)*/
+/*! Slice: wdr2_pre_gamma_lut:*/
+#define  WDR2_PRE_GAMMA_LUT
+#define  WDR2_PRE_GAMMA_LUT_MASK 0xFFFFFFFFU
+#define  WDR2_PRE_GAMMA_LUT_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_write_data  (0x0000313C)*/
+/*! Slice: wdr2_pre_gamma_write_data:*/
+#define  WDR2_PRE_GAMMA_WRITE_DATA
+#define  WDR2_PRE_GAMMA_WRITE_DATA_MASK 0x00000FFFU
+#define  WDR2_PRE_GAMMA_WRITE_DATA_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_lut  (0x00003140)*/
+/*! Slice: wdr2_tone_curve_lut:*/
+#define  WDR2_TONE_CURVE_LUT
+#define  WDR2_TONE_CURVE_LUT_MASK 0xFFFFFFFFU
+#define  WDR2_TONE_CURVE_LUT_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_write_data  (0x00003144)*/
+/*! Slice: wdr2_tone_curve_write_data:*/
+#define  WDR2_TONE_CURVE_WRITE_DATA
+#define  WDR2_TONE_CURVE_WRITE_DATA_MASK 0x00000FFFU
+#define  WDR2_TONE_CURVE_WRITE_DATA_SHIFT 0U
+/*! Register: isp_wdr2_merge_coeff_lut  (0x00003148)*/
+/*! Slice: wdr2_merge_coeff_lut:*/
+#define  WDR2_MERGE_COEFF_LUT
+#define  WDR2_MERGE_COEFF_LUT_MASK 0xFFFFFFFFU
+#define  WDR2_MERGE_COEFF_LUT_SHIFT 0U
+/*! Register: isp_wdr2_merge_coeff_write_data  (0x0000314C)*/
+/*! Slice: wdr2_merge_coeff_write_data:*/
+#define  WDR2_MERGE_COEFF_WRITE_DATA
+#define  WDR2_MERGE_COEFF_WRITE_DATA_MASK 0x000000FFU
+#define  WDR2_MERGE_COEFF_WRITE_DATA_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_0  (0x00003150)*/
+/*! Slice: wdr2_pre_gamma_cx_5:*/
+#define  WDR2_PRE_GAMMA_CX_5
+#define  WDR2_PRE_GAMMA_CX_5_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_5_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_4:*/
+#define  WDR2_PRE_GAMMA_CX_4
+#define  WDR2_PRE_GAMMA_CX_4_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_4_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_3:*/
+#define  WDR2_PRE_GAMMA_CX_3
+#define  WDR2_PRE_GAMMA_CX_3_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_3_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_2:*/
+#define  WDR2_PRE_GAMMA_CX_2
+#define  WDR2_PRE_GAMMA_CX_2_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_2_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_1:*/
+#define  WDR2_PRE_GAMMA_CX_1
+#define  WDR2_PRE_GAMMA_CX_1_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_1_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_0:*/
+#define  WDR2_PRE_GAMMA_CX_0
+#define  WDR2_PRE_GAMMA_CX_0_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_0_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_1  (0x00003154)*/
+/*! Slice: wdr2_pre_gamma_cx_11:*/
+#define  WDR2_PRE_GAMMA_CX_11
+#define  WDR2_PRE_GAMMA_CX_11_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_11_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_10:*/
+#define  WDR2_PRE_GAMMA_CX_10
+#define  WDR2_PRE_GAMMA_CX_10_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_10_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_9:*/
+#define  WDR2_PRE_GAMMA_CX_9
+#define  WDR2_PRE_GAMMA_CX_9_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_9_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_8:*/
+#define  WDR2_PRE_GAMMA_CX_8
+#define  WDR2_PRE_GAMMA_CX_8_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_8_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_7:*/
+#define  WDR2_PRE_GAMMA_CX_7
+#define  WDR2_PRE_GAMMA_CX_7_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_7_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_6:*/
+#define  WDR2_PRE_GAMMA_CX_6
+#define  WDR2_PRE_GAMMA_CX_6_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_6_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_2  (0x00003158)*/
+/*! Slice: wdr2_pre_gamma_cx_17:*/
+#define  WDR2_PRE_GAMMA_CX_17
+#define  WDR2_PRE_GAMMA_CX_17_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_17_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_16:*/
+#define  WDR2_PRE_GAMMA_CX_16
+#define  WDR2_PRE_GAMMA_CX_16_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_16_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_15:*/
+#define  WDR2_PRE_GAMMA_CX_15
+#define  WDR2_PRE_GAMMA_CX_15_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_15_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_14:*/
+#define  WDR2_PRE_GAMMA_CX_14
+#define  WDR2_PRE_GAMMA_CX_14_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_14_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_13:*/
+#define  WDR2_PRE_GAMMA_CX_13
+#define  WDR2_PRE_GAMMA_CX_13_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_13_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_12:*/
+#define  WDR2_PRE_GAMMA_CX_12
+#define  WDR2_PRE_GAMMA_CX_12_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_12_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_3  (0x0000315C)*/
+/*! Slice: wdr2_pre_gamma_cx_23:*/
+#define  WDR2_PRE_GAMMA_CX_23
+#define  WDR2_PRE_GAMMA_CX_23_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_23_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_22:*/
+#define  WDR2_PRE_GAMMA_CX_22
+#define  WDR2_PRE_GAMMA_CX_22_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_22_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_21:*/
+#define  WDR2_PRE_GAMMA_CX_21
+#define  WDR2_PRE_GAMMA_CX_21_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_21_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_20:*/
+#define  WDR2_PRE_GAMMA_CX_20
+#define  WDR2_PRE_GAMMA_CX_20_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_20_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_19:*/
+#define  WDR2_PRE_GAMMA_CX_19
+#define  WDR2_PRE_GAMMA_CX_19_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_19_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_18:*/
+#define  WDR2_PRE_GAMMA_CX_18
+#define  WDR2_PRE_GAMMA_CX_18_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_18_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_4  (0x00003160)*/
+/*! Slice: wdr2_pre_gamma_cx_29:*/
+#define  WDR2_PRE_GAMMA_CX_29
+#define  WDR2_PRE_GAMMA_CX_29_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_29_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_28:*/
+#define  WDR2_PRE_GAMMA_CX_28
+#define  WDR2_PRE_GAMMA_CX_28_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_28_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_27:*/
+#define  WDR2_PRE_GAMMA_CX_27
+#define  WDR2_PRE_GAMMA_CX_27_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_27_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_26:*/
+#define  WDR2_PRE_GAMMA_CX_26
+#define  WDR2_PRE_GAMMA_CX_26_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_26_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_25:*/
+#define  WDR2_PRE_GAMMA_CX_25
+#define  WDR2_PRE_GAMMA_CX_25_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_25_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_24:*/
+#define  WDR2_PRE_GAMMA_CX_24
+#define  WDR2_PRE_GAMMA_CX_24_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_24_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_5  (0x00003164)*/
+/*! Slice: wdr2_pre_gamma_cx_35:*/
+#define  WDR2_PRE_GAMMA_CX_35
+#define  WDR2_PRE_GAMMA_CX_35_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_35_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_34:*/
+#define  WDR2_PRE_GAMMA_CX_34
+#define  WDR2_PRE_GAMMA_CX_34_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_34_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_33:*/
+#define  WDR2_PRE_GAMMA_CX_33
+#define  WDR2_PRE_GAMMA_CX_33_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_33_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_32:*/
+#define  WDR2_PRE_GAMMA_CX_32
+#define  WDR2_PRE_GAMMA_CX_32_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_32_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_31:*/
+#define  WDR2_PRE_GAMMA_CX_31
+#define  WDR2_PRE_GAMMA_CX_31_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_31_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_30:*/
+#define  WDR2_PRE_GAMMA_CX_30
+#define  WDR2_PRE_GAMMA_CX_30_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_30_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_6  (0x00003168)*/
+/*! Slice: wdr2_pre_gamma_cx_41:*/
+#define  WDR2_PRE_GAMMA_CX_41
+#define  WDR2_PRE_GAMMA_CX_41_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_41_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_40:*/
+#define  WDR2_PRE_GAMMA_CX_40
+#define  WDR2_PRE_GAMMA_CX_40_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_40_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_39:*/
+#define  WDR2_PRE_GAMMA_CX_39
+#define  WDR2_PRE_GAMMA_CX_39_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_39_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_38:*/
+#define  WDR2_PRE_GAMMA_CX_38
+#define  WDR2_PRE_GAMMA_CX_38_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_38_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_37:*/
+#define  WDR2_PRE_GAMMA_CX_37
+#define  WDR2_PRE_GAMMA_CX_37_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_37_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_36:*/
+#define  WDR2_PRE_GAMMA_CX_36
+#define  WDR2_PRE_GAMMA_CX_36_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_36_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_7  (0x0000316C)*/
+/*! Slice: wdr2_pre_gamma_cx_47:*/
+#define  WDR2_PRE_GAMMA_CX_47
+#define  WDR2_PRE_GAMMA_CX_47_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_47_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_46:*/
+#define  WDR2_PRE_GAMMA_CX_46
+#define  WDR2_PRE_GAMMA_CX_46_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_46_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_45:*/
+#define  WDR2_PRE_GAMMA_CX_45
+#define  WDR2_PRE_GAMMA_CX_45_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_45_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_44:*/
+#define  WDR2_PRE_GAMMA_CX_44
+#define  WDR2_PRE_GAMMA_CX_44_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_44_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_43:*/
+#define  WDR2_PRE_GAMMA_CX_43
+#define  WDR2_PRE_GAMMA_CX_43_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_43_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_42:*/
+#define  WDR2_PRE_GAMMA_CX_42
+#define  WDR2_PRE_GAMMA_CX_42_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_42_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_8  (0x00003170)*/
+/*! Slice: wdr2_pre_gamma_cx_53:*/
+#define  WDR2_PRE_GAMMA_CX_53
+#define  WDR2_PRE_GAMMA_CX_53_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_53_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_52:*/
+#define  WDR2_PRE_GAMMA_CX_52
+#define  WDR2_PRE_GAMMA_CX_52_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_52_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_51:*/
+#define  WDR2_PRE_GAMMA_CX_51
+#define  WDR2_PRE_GAMMA_CX_51_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_51_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_50:*/
+#define  WDR2_PRE_GAMMA_CX_50
+#define  WDR2_PRE_GAMMA_CX_50_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_50_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_49:*/
+#define  WDR2_PRE_GAMMA_CX_49
+#define  WDR2_PRE_GAMMA_CX_49_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_49_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_48:*/
+#define  WDR2_PRE_GAMMA_CX_48
+#define  WDR2_PRE_GAMMA_CX_48_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_48_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_9  (0x00003174)*/
+/*! Slice: wdr2_pre_gamma_cx_59:*/
+#define  WDR2_PRE_GAMMA_CX_59
+#define  WDR2_PRE_GAMMA_CX_59_MASK 0x3E000000U
+#define  WDR2_PRE_GAMMA_CX_59_SHIFT 25U
+/*! Slice: wdr2_pre_gamma_cx_58:*/
+#define  WDR2_PRE_GAMMA_CX_58
+#define  WDR2_PRE_GAMMA_CX_58_MASK 0x01F00000U
+#define  WDR2_PRE_GAMMA_CX_58_SHIFT 20U
+/*! Slice: wdr2_pre_gamma_cx_57:*/
+#define  WDR2_PRE_GAMMA_CX_57
+#define  WDR2_PRE_GAMMA_CX_57_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_57_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_56:*/
+#define  WDR2_PRE_GAMMA_CX_56
+#define  WDR2_PRE_GAMMA_CX_56_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_56_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_55:*/
+#define  WDR2_PRE_GAMMA_CX_55
+#define  WDR2_PRE_GAMMA_CX_55_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_55_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_54:*/
+#define  WDR2_PRE_GAMMA_CX_54
+#define  WDR2_PRE_GAMMA_CX_54_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_54_SHIFT 0U
+/*! Register: isp_wdr2_pre_gamma_cx_10  (0x00003178)*/
+/*! Slice: wdr2_pre_gamma_cx_63:*/
+#define  WDR2_PRE_GAMMA_CX_63
+#define  WDR2_PRE_GAMMA_CX_63_MASK 0x000F8000U
+#define  WDR2_PRE_GAMMA_CX_63_SHIFT 15U
+/*! Slice: wdr2_pre_gamma_cx_62:*/
+#define  WDR2_PRE_GAMMA_CX_62
+#define  WDR2_PRE_GAMMA_CX_62_MASK 0x00007C00U
+#define  WDR2_PRE_GAMMA_CX_62_SHIFT 10U
+/*! Slice: wdr2_pre_gamma_cx_61:*/
+#define  WDR2_PRE_GAMMA_CX_61
+#define  WDR2_PRE_GAMMA_CX_61_MASK 0x000003E0U
+#define  WDR2_PRE_GAMMA_CX_61_SHIFT 5U
+/*! Slice: wdr2_pre_gamma_cx_60:*/
+#define  WDR2_PRE_GAMMA_CX_60
+#define  WDR2_PRE_GAMMA_CX_60_MASK 0x0000001FU
+#define  WDR2_PRE_GAMMA_CX_60_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_cx_0  (0x0000317C)*/
+/*! Slice: wdr2_tone_curve_cx_7:*/
+#define  WDR2_TONE_CURVE_CX_7
+#define  WDR2_TONE_CURVE_CX_7_MASK 0xF0000000U
+#define  WDR2_TONE_CURVE_CX_7_SHIFT 28U
+/*! Slice: wdr2_tone_curve_cx_6:*/
+#define  WDR2_TONE_CURVE_CX_6
+#define  WDR2_TONE_CURVE_CX_6_MASK 0x0F000000U
+#define  WDR2_TONE_CURVE_CX_6_SHIFT 24U
+/*! Slice: wdr2_tone_curve_cx_5:*/
+#define  WDR2_TONE_CURVE_CX_5
+#define  WDR2_TONE_CURVE_CX_5_MASK 0x00F00000U
+#define  WDR2_TONE_CURVE_CX_5_SHIFT 20U
+/*! Slice: wdr2_tone_curve_cx_4:*/
+#define  WDR2_TONE_CURVE_CX_4
+#define  WDR2_TONE_CURVE_CX_4_MASK 0x000F0000U
+#define  WDR2_TONE_CURVE_CX_4_SHIFT 16U
+/*! Slice: wdr2_tone_curve_cx_3:*/
+#define  WDR2_TONE_CURVE_CX_3
+#define  WDR2_TONE_CURVE_CX_3_MASK 0x0000F000U
+#define  WDR2_TONE_CURVE_CX_3_SHIFT 12U
+/*! Slice: wdr2_tone_curve_cx_2:*/
+#define  WDR2_TONE_CURVE_CX_2
+#define  WDR2_TONE_CURVE_CX_2_MASK 0x00000F00U
+#define  WDR2_TONE_CURVE_CX_2_SHIFT 8U
+/*! Slice: wdr2_tone_curve_cx_1:*/
+#define  WDR2_TONE_CURVE_CX_1
+#define  WDR2_TONE_CURVE_CX_1_MASK 0x000000F0U
+#define  WDR2_TONE_CURVE_CX_1_SHIFT 4U
+/*! Slice: wdr2_tone_curve_cx_0:*/
+#define  WDR2_TONE_CURVE_CX_0
+#define  WDR2_TONE_CURVE_CX_0_MASK 0x0000000FU
+#define  WDR2_TONE_CURVE_CX_0_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_cx_1  (0x00003180)*/
+/*! Slice: wdr2_tone_curve_cx_15:*/
+#define  WDR2_TONE_CURVE_CX_15
+#define  WDR2_TONE_CURVE_CX_15_MASK 0xF0000000U
+#define  WDR2_TONE_CURVE_CX_15_SHIFT 28U
+/*! Slice: wdr2_tone_curve_cx_14:*/
+#define  WDR2_TONE_CURVE_CX_14
+#define  WDR2_TONE_CURVE_CX_14_MASK 0x0F000000U
+#define  WDR2_TONE_CURVE_CX_14_SHIFT 24U
+/*! Slice: wdr2_tone_curve_cx_13:*/
+#define  WDR2_TONE_CURVE_CX_13
+#define  WDR2_TONE_CURVE_CX_13_MASK 0x00F00000U
+#define  WDR2_TONE_CURVE_CX_13_SHIFT 20U
+/*! Slice: wdr2_tone_curve_cx_12:*/
+#define  WDR2_TONE_CURVE_CX_12
+#define  WDR2_TONE_CURVE_CX_12_MASK 0x000F0000U
+#define  WDR2_TONE_CURVE_CX_12_SHIFT 16U
+/*! Slice: wdr2_tone_curve_cx_11:*/
+#define  WDR2_TONE_CURVE_CX_11
+#define  WDR2_TONE_CURVE_CX_11_MASK 0x0000F000U
+#define  WDR2_TONE_CURVE_CX_11_SHIFT 12U
+/*! Slice: wdr2_tone_curve_cx_10:*/
+#define  WDR2_TONE_CURVE_CX_10
+#define  WDR2_TONE_CURVE_CX_10_MASK 0x00000F00U
+#define  WDR2_TONE_CURVE_CX_10_SHIFT 8U
+/*! Slice: wdr2_tone_curve_cx_9:*/
+#define  WDR2_TONE_CURVE_CX_9
+#define  WDR2_TONE_CURVE_CX_9_MASK 0x000000F0U
+#define  WDR2_TONE_CURVE_CX_9_SHIFT 4U
+/*! Slice: wdr2_tone_curve_cx_8:*/
+#define  WDR2_TONE_CURVE_CX_8
+#define  WDR2_TONE_CURVE_CX_8_MASK 0x0000000FU
+#define  WDR2_TONE_CURVE_CX_8_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_cx_2  (0x00003184)*/
+/*! Slice: wdr2_tone_curve_cx_23:*/
+#define  WDR2_TONE_CURVE_CX_23
+#define  WDR2_TONE_CURVE_CX_23_MASK 0xF0000000U
+#define  WDR2_TONE_CURVE_CX_23_SHIFT 28U
+/*! Slice: wdr2_tone_curve_cx_22:*/
+#define  WDR2_TONE_CURVE_CX_22
+#define  WDR2_TONE_CURVE_CX_22_MASK 0x0F000000U
+#define  WDR2_TONE_CURVE_CX_22_SHIFT 24U
+/*! Slice: wdr2_tone_curve_cx_21:*/
+#define  WDR2_TONE_CURVE_CX_21
+#define  WDR2_TONE_CURVE_CX_21_MASK 0x00F00000U
+#define  WDR2_TONE_CURVE_CX_21_SHIFT 20U
+/*! Slice: wdr2_tone_curve_cx_20:*/
+#define  WDR2_TONE_CURVE_CX_20
+#define  WDR2_TONE_CURVE_CX_20_MASK 0x000F0000U
+#define  WDR2_TONE_CURVE_CX_20_SHIFT 16U
+/*! Slice: wdr2_tone_curve_cx_19:*/
+#define  WDR2_TONE_CURVE_CX_19
+#define  WDR2_TONE_CURVE_CX_19_MASK 0x0000F000U
+#define  WDR2_TONE_CURVE_CX_19_SHIFT 12U
+/*! Slice: wdr2_tone_curve_cx_18:*/
+#define  WDR2_TONE_CURVE_CX_18
+#define  WDR2_TONE_CURVE_CX_18_MASK 0x00000F00U
+#define  WDR2_TONE_CURVE_CX_18_SHIFT 8U
+/*! Slice: wdr2_tone_curve_cx_17:*/
+#define  WDR2_TONE_CURVE_CX_17
+#define  WDR2_TONE_CURVE_CX_17_MASK 0x000000F0U
+#define  WDR2_TONE_CURVE_CX_17_SHIFT 4U
+/*! Slice: wdr2_tone_curve_cx_16:*/
+#define  WDR2_TONE_CURVE_CX_16
+#define  WDR2_TONE_CURVE_CX_16_MASK 0x0000000FU
+#define  WDR2_TONE_CURVE_CX_16_SHIFT 0U
+/*! Register: isp_wdr2_tone_curve_cx_3  (0x00003188)*/
+/*! Slice: wdr2_tone_curve_cx_31:*/
+#define  WDR2_TONE_CURVE_CX_31
+#define  WDR2_TONE_CURVE_CX_31_MASK 0xF0000000U
+#define  WDR2_TONE_CURVE_CX_31_SHIFT 28U
+/*! Slice: wdr2_tone_curve_cx_30:*/
+#define  WDR2_TONE_CURVE_CX_30
+#define  WDR2_TONE_CURVE_CX_30_MASK 0x0F000000U
+#define  WDR2_TONE_CURVE_CX_30_SHIFT 24U
+/*! Slice: wdr2_tone_curve_cx_29:*/
+#define  WDR2_TONE_CURVE_CX_29
+#define  WDR2_TONE_CURVE_CX_29_MASK 0x00F00000U
+#define  WDR2_TONE_CURVE_CX_29_SHIFT 20U
+/*! Slice: wdr2_tone_curve_cx_28:*/
+#define  WDR2_TONE_CURVE_CX_28
+#define  WDR2_TONE_CURVE_CX_28_MASK 0x000F0000U
+#define  WDR2_TONE_CURVE_CX_28_SHIFT 16U
+/*! Slice: wdr2_tone_curve_cx_27:*/
+#define  WDR2_TONE_CURVE_CX_27
+#define  WDR2_TONE_CURVE_CX_27_MASK 0x0000F000U
+#define  WDR2_TONE_CURVE_CX_27_SHIFT 12U
+/*! Slice: wdr2_tone_curve_cx_26:*/
+#define  WDR2_TONE_CURVE_CX_26
+#define  WDR2_TONE_CURVE_CX_26_MASK 0x00000F00U
+#define  WDR2_TONE_CURVE_CX_26_SHIFT 8U
+/*! Slice: wdr2_tone_curve_cx_25:*/
+#define  WDR2_TONE_CURVE_CX_25
+#define  WDR2_TONE_CURVE_CX_25_MASK 0x000000F0U
+#define  WDR2_TONE_CURVE_CX_25_SHIFT 4U
+/*! Slice: wdr2_tone_curve_cx_24:*/
+#define  WDR2_TONE_CURVE_CX_24
+#define  WDR2_TONE_CURVE_CX_24_MASK 0x0000000FU
+#define  WDR2_TONE_CURVE_CX_24_SHIFT 0U
+/*! Register: isp_wdr2_merge_coeff_cx_0  (0x0000318C)*/
+/*! Slice: wdr2_merge_coeff_cx_7:*/
+#define  WDR2_MERGE_COEFF_CX_7
+#define  WDR2_MERGE_COEFF_CX_7_MASK 0xF0000000U
+#define  WDR2_MERGE_COEFF_CX_7_SHIFT 28U
+/*! Slice: wdr2_merge_coeff_cx_6:*/
+#define  WDR2_MERGE_COEFF_CX_6
+#define  WDR2_MERGE_COEFF_CX_6_MASK 0x0F000000U
+#define  WDR2_MERGE_COEFF_CX_6_SHIFT 24U
+/*! Slice: wdr2_merge_coeff_cx_5:*/
+#define  WDR2_MERGE_COEFF_CX_5
+#define  WDR2_MERGE_COEFF_CX_5_MASK 0x00F00000U
+#define  WDR2_MERGE_COEFF_CX_5_SHIFT 20U
+/*! Slice: wdr2_merge_coeff_cx_4:*/
+#define  WDR2_MERGE_COEFF_CX_4
+#define  WDR2_MERGE_COEFF_CX_4_MASK 0x000F0000U
+#define  WDR2_MERGE_COEFF_CX_4_SHIFT 16U
+/*! Slice: wdr2_merge_coeff_cx_3:*/
+#define  WDR2_MERGE_COEFF_CX_3
+#define  WDR2_MERGE_COEFF_CX_3_MASK 0x0000F000U
+#define  WDR2_MERGE_COEFF_CX_3_SHIFT 12U
+/*! Slice: wdr2_merge_coeff_cx_2:*/
+#define  WDR2_MERGE_COEFF_CX_2
+#define  WDR2_MERGE_COEFF_CX_2_MASK 0x00000F00U
+#define  WDR2_MERGE_COEFF_CX_2_SHIFT 8U
+/*! Slice: wdr2_merge_coeff_cx_1:*/
+#define  WDR2_MERGE_COEFF_CX_1
+#define  WDR2_MERGE_COEFF_CX_1_MASK 0x000000F0U
+#define  WDR2_MERGE_COEFF_CX_1_SHIFT 4U
+/*! Slice: wdr2_merge_coeff_cx_0:*/
+#define  WDR2_MERGE_COEFF_CX_0
+#define  WDR2_MERGE_COEFF_CX_0_MASK 0x0000000FU
+#define  WDR2_MERGE_COEFF_CX_0_SHIFT 0U
+/*! Register: isp_wdr2_merge_coeff_cx_1  (0x00003190)*/
+/*! Slice: wdr2_merge_coeff_cx_15:*/
+#define  WDR2_MERGE_COEFF_CX_15
+#define  WDR2_MERGE_COEFF_CX_15_MASK 0xF0000000U
+#define  WDR2_MERGE_COEFF_CX_15_SHIFT 28U
+/*! Slice: wdr2_merge_coeff_cx_14:*/
+#define  WDR2_MERGE_COEFF_CX_14
+#define  WDR2_MERGE_COEFF_CX_14_MASK 0x0F000000U
+#define  WDR2_MERGE_COEFF_CX_14_SHIFT 24U
+/*! Slice: wdr2_merge_coeff_cx_13:*/
+#define  WDR2_MERGE_COEFF_CX_13
+#define  WDR2_MERGE_COEFF_CX_13_MASK 0x00F00000U
+#define  WDR2_MERGE_COEFF_CX_13_SHIFT 20U
+/*! Slice: wdr2_merge_coeff_cx_12:*/
+#define  WDR2_MERGE_COEFF_CX_12
+#define  WDR2_MERGE_COEFF_CX_12_MASK 0x000F0000U
+#define  WDR2_MERGE_COEFF_CX_12_SHIFT 16U
+/*! Slice: wdr2_merge_coeff_cx_11:*/
+#define  WDR2_MERGE_COEFF_CX_11
+#define  WDR2_MERGE_COEFF_CX_11_MASK 0x0000F000U
+#define  WDR2_MERGE_COEFF_CX_11_SHIFT 12U
+/*! Slice: wdr2_merge_coeff_cx_10:*/
+#define  WDR2_MERGE_COEFF_CX_10
+#define  WDR2_MERGE_COEFF_CX_10_MASK 0x00000F00U
+#define  WDR2_MERGE_COEFF_CX_10_SHIFT 8U
+/*! Slice: wdr2_merge_coeff_cx_9:*/
+#define  WDR2_MERGE_COEFF_CX_9
+#define  WDR2_MERGE_COEFF_CX_9_MASK 0x000000F0U
+#define  WDR2_MERGE_COEFF_CX_9_SHIFT 4U
+/*! Slice: wdr2_merge_coeff_cx_8:*/
+#define  WDR2_MERGE_COEFF_CX_8
+#define  WDR2_MERGE_COEFF_CX_8_MASK 0x0000000FU
+#define  WDR2_MERGE_COEFF_CX_8_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_cx  (0x000031A8)*/
+/*! Slice: wdr2_max_gain_cx_4:*/
+#define  WDR2_MAX_GAIN_CX_4
+#define  WDR2_MAX_GAIN_CX_4_MASK 0xFF000000U
+#define  WDR2_MAX_GAIN_CX_4_SHIFT 24U
+/*! Slice: wdr2_max_gain_cx_3:*/
+#define  WDR2_MAX_GAIN_CX_3
+#define  WDR2_MAX_GAIN_CX_3_MASK 0x00FF0000U
+#define  WDR2_MAX_GAIN_CX_3_SHIFT 16U
+/*! Slice: wdr2_max_gain_cx_2:*/
+#define  WDR2_MAX_GAIN_CX_2
+#define  WDR2_MAX_GAIN_CX_2_MASK 0x0000FF00U
+#define  WDR2_MAX_GAIN_CX_2_SHIFT 8U
+/*! Slice: wdr2_max_gain_cx_1:*/
+#define  WDR2_MAX_GAIN_CX_1
+#define  WDR2_MAX_GAIN_CX_1_MASK 0x000000FFU
+#define  WDR2_MAX_GAIN_CX_1_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_slope_0  (0x000031AC)*/
+/*! Slice: wdr2_max_gain_slope_1:*/
+#define  WDR2_MAX_GAIN_SLOPE_1
+#define  WDR2_MAX_GAIN_SLOPE_1_MASK 0x0FFF0000U
+#define  WDR2_MAX_GAIN_SLOPE_1_SHIFT 16U
+/*! Slice: wdr2_max_gain_slope_0:*/
+#define  WDR2_MAX_GAIN_SLOPE_0
+#define  WDR2_MAX_GAIN_SLOPE_0_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_SLOPE_0_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_slope_1  (0x000031B0)*/
+/*! Slice: wdr2_max_gain_slope_3:*/
+#define  WDR2_MAX_GAIN_SLOPE_3
+#define  WDR2_MAX_GAIN_SLOPE_3_MASK 0x0FFF0000U
+#define  WDR2_MAX_GAIN_SLOPE_3_SHIFT 16U
+/*! Slice: wdr2_max_gain_slope_2:*/
+#define  WDR2_MAX_GAIN_SLOPE_2
+#define  WDR2_MAX_GAIN_SLOPE_2_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_SLOPE_2_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_slope_2  (0x000031B4)*/
+/*! Slice: wdr2_max_gain_slope_4:*/
+#define  WDR2_MAX_GAIN_SLOPE_4
+#define  WDR2_MAX_GAIN_SLOPE_4_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_SLOPE_4_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_cy_0  (0x000031B8)*/
+/*! Slice: wdr2_max_gain_cy_1:*/
+#define  WDR2_MAX_GAIN_CY_1
+#define  WDR2_MAX_GAIN_CY_1_MASK 0x0FFF0000U
+#define  WDR2_MAX_GAIN_CY_1_SHIFT 16U
+/*! Slice: wdr2_max_gain_cy_0:*/
+#define  WDR2_MAX_GAIN_CY_0
+#define  WDR2_MAX_GAIN_CY_0_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_CY_0_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_cy_1  (0x000031BC)*/
+/*! Slice: wdr2_max_gain_cy_3:*/
+#define  WDR2_MAX_GAIN_CY_3
+#define  WDR2_MAX_GAIN_CY_3_MASK 0x0FFF0000U
+#define  WDR2_MAX_GAIN_CY_3_SHIFT 16U
+/*! Slice: wdr2_max_gain_cy_2:*/
+#define  WDR2_MAX_GAIN_CY_2
+#define  WDR2_MAX_GAIN_CY_2_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_CY_2_SHIFT 0U
+/*! Register: isp_wdr2_max_gain_cy_2  (0x000031C0)*/
+/*! Slice: wdr2_max_gain_cy_5:*/
+#define  WDR2_MAX_GAIN_CY_5
+#define  WDR2_MAX_GAIN_CY_5_MASK 0x0FFF0000U
+#define  WDR2_MAX_GAIN_CY_5_SHIFT 16U
+/*! Slice: wdr2_max_gain_cy_4:*/
+#define  WDR2_MAX_GAIN_CY_4
+#define  WDR2_MAX_GAIN_CY_4_MASK 0x00000FFFU
+#define  WDR2_MAX_GAIN_CY_4_SHIFT 0U
+/*! Register: isp_wdr2_norm_factor_mul_0  (0x000031C4)*/
+/*! Slice: wdr2_norm_factor_mul_3:*/
+#define  WDR2_NORM_FACTOR_MUL_3
+#define  WDR2_NORM_FACTOR_MUL_3_MASK 0xFF000000U
+#define  WDR2_NORM_FACTOR_MUL_3_SHIFT 24U
+/*! Slice: wdr2_norm_factor_mul_2:*/
+#define  WDR2_NORM_FACTOR_MUL_2
+#define  WDR2_NORM_FACTOR_MUL_2_MASK 0x00FF0000U
+#define  WDR2_NORM_FACTOR_MUL_2_SHIFT 16U
+/*! Slice: wdr2_norm_factor_mul_1:*/
+#define  WDR2_NORM_FACTOR_MUL_1
+#define  WDR2_NORM_FACTOR_MUL_1_MASK 0x0000FF00U
+#define  WDR2_NORM_FACTOR_MUL_1_SHIFT 8U
+/*! Slice: wdr2_norm_factor_mul_0:*/
+#define  WDR2_NORM_FACTOR_MUL_0
+#define  WDR2_NORM_FACTOR_MUL_0_MASK 0x000000FFU
+#define  WDR2_NORM_FACTOR_MUL_0_SHIFT 0U
+/*! Register: isp_wdr2_norm_factor_mul_1  (0x000031C8)*/
+/*! Slice: wdr2_norm_factor_mul_7:*/
+#define  WDR2_NORM_FACTOR_MUL_7
+#define  WDR2_NORM_FACTOR_MUL_7_MASK 0xFF000000U
+#define  WDR2_NORM_FACTOR_MUL_7_SHIFT 24U
+/*! Slice: wdr2_norm_factor_mul_6:*/
+#define  WDR2_NORM_FACTOR_MUL_6
+#define  WDR2_NORM_FACTOR_MUL_6_MASK 0x00FF0000U
+#define  WDR2_NORM_FACTOR_MUL_6_SHIFT 16U
+/*! Slice: wdr2_norm_factor_mul_5:*/
+#define  WDR2_NORM_FACTOR_MUL_5
+#define  WDR2_NORM_FACTOR_MUL_5_MASK 0x0000FF00U
+#define  WDR2_NORM_FACTOR_MUL_5_SHIFT 8U
+/*! Slice: wdr2_norm_factor_mul_4:*/
+#define  WDR2_NORM_FACTOR_MUL_4
+#define  WDR2_NORM_FACTOR_MUL_4_MASK 0x000000FFU
+#define  WDR2_NORM_FACTOR_MUL_4_SHIFT 0U
+/*! Register: isp_wdr2_norm_factor_shift_bit_0  (0x000031CC)*/
+/*! Slice: wdr2_norm_factor_shift_bit_3:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_3
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_3_MASK 0xFF000000U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_3_SHIFT 24U
+/*! Slice: wdr2_norm_factor_shift_bit_2:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_2
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_2_MASK 0x00FF0000U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_2_SHIFT 16U
+/*! Slice: wdr2_norm_factor_shift_bit_1:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_1
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_1_MASK 0x0000FF00U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_1_SHIFT 8U
+/*! Slice: wdr2_norm_factor_shift_bit_0:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_0
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_0_MASK 0x000000FFU
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_0_SHIFT 0U
+/*! Register: isp_wdr2_norm_factor_shift_bit_1  (0x000031D0)*/
+/*! Slice: wdr2_norm_factor_shift_bit_7:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_7
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_7_MASK 0xFF000000U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_7_SHIFT 24U
+/*! Slice: wdr2_norm_factor_shift_bit_6:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_6
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_6_MASK 0x00FF0000U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_6_SHIFT 16U
+/*! Slice: wdr2_norm_factor_shift_bit_5:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_5
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_5_MASK 0x0000FF00U
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_5_SHIFT 8U
+/*! Slice: wdr2_norm_factor_shift_bit_4:*/
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_4
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_4_MASK 0x000000FFU
+#define  WDR2_NORM_FACTOR_SHIFT_BIT_4_SHIFT 0U
+/*! Register: isp_wdr2_bin_range_0  (0x000031D4)*/
+/*! Slice: wdr2_bin_range_2:*/
+#define  WDR2_BIN_RANGE_2
+#define  WDR2_BIN_RANGE_2_MASK 0x0FFF0000U
+#define  WDR2_BIN_RANGE_2_SHIFT 16U
+/*! Slice: wdr2_bin_range_1:*/
+#define  WDR2_BIN_RANGE_1
+#define  WDR2_BIN_RANGE_1_MASK 0x00000FFFU
+#define  WDR2_BIN_RANGE_1_SHIFT 0U
+/*! Register: isp_wdr2_bin_range_1  (0x000031D8)*/
+/*! Slice: wdr2_bin_range_4:*/
+#define  WDR2_BIN_RANGE_4
+#define  WDR2_BIN_RANGE_4_MASK 0x0FFF0000U
+#define  WDR2_BIN_RANGE_4_SHIFT 16U
+/*! Slice: wdr2_bin_range_3:*/
+#define  WDR2_BIN_RANGE_3
+#define  WDR2_BIN_RANGE_3_MASK 0x00000FFFU
+#define  WDR2_BIN_RANGE_3_SHIFT 0U
+/*! Register: isp_wdr2_bin_range_2  (0x000031DC)*/
+/*! Slice: wdr2_bin_range_6:*/
+#define  WDR2_BIN_RANGE_6
+#define  WDR2_BIN_RANGE_6_MASK 0x0FFF0000U
+#define  WDR2_BIN_RANGE_6_SHIFT 16U
+/*! Slice: wdr2_bin_range_5:*/
+#define  WDR2_BIN_RANGE_5
+#define  WDR2_BIN_RANGE_5_MASK 0x00000FFFU
+#define  WDR2_BIN_RANGE_5_SHIFT 0U
+/*! Register: isp_wdr2_bin_range_3  (0x000031E0)*/
+/*! Slice: wdr2_bin_range_8:*/
+#define  WDR2_BIN_RANGE_8
+#define  WDR2_BIN_RANGE_8_MASK 0x0FFF0000U
+#define  WDR2_BIN_RANGE_8_SHIFT 16U
+/*! Slice: wdr2_bin_range_7:*/
+#define  WDR2_BIN_RANGE_7
+#define  WDR2_BIN_RANGE_7_MASK 0x00000FFFU
+#define  WDR2_BIN_RANGE_7_SHIFT 0U
+/*! Register: isp_wdr2_hist_data_0  (0x000031E4)*/
+/*! Slice: wdr2_hist_data_3:*/
+#define  WDR2_HIST_DATA_3
+#define  WDR2_HIST_DATA_3_MASK 0xFF000000U
+#define  WDR2_HIST_DATA_3_SHIFT 24U
+/*! Slice: wdr2_hist_data_2:*/
+#define  WDR2_HIST_DATA_2
+#define  WDR2_HIST_DATA_2_MASK 0x00FF0000U
+#define  WDR2_HIST_DATA_2_SHIFT 16U
+/*! Slice: wdr2_hist_data_1:*/
+#define  WDR2_HIST_DATA_1
+#define  WDR2_HIST_DATA_1_MASK 0x0000FF00U
+#define  WDR2_HIST_DATA_1_SHIFT 8U
+/*! Slice: wdr2_hist_data_0:*/
+#define  WDR2_HIST_DATA_0
+#define  WDR2_HIST_DATA_0_MASK 0x000000FFU
+#define  WDR2_HIST_DATA_0_SHIFT 0U
+/*! Register: isp_wdr2_hist_data_1  (0x000031E8)*/
+/*! Slice: wdr2_hist_data_7:*/
+#define  WDR2_HIST_DATA_7
+#define  WDR2_HIST_DATA_7_MASK 0xFF000000U
+#define  WDR2_HIST_DATA_7_SHIFT 24U
+/*! Slice: wdr2_hist_data_6:*/
+#define  WDR2_HIST_DATA_6
+#define  WDR2_HIST_DATA_6_MASK 0x00FF0000U
+#define  WDR2_HIST_DATA_6_SHIFT 16U
+/*! Slice: wdr2_hist_data_5:*/
+#define  WDR2_HIST_DATA_5
+#define  WDR2_HIST_DATA_5_MASK 0x0000FF00U
+#define  WDR2_HIST_DATA_5_SHIFT 8U
+/*! Slice: wdr2_hist_data_4:*/
+#define  WDR2_HIST_DATA_4
+#define  WDR2_HIST_DATA_4_MASK 0x000000FFU
+#define  WDR2_HIST_DATA_4_SHIFT 0U
+/*! Register: isp_compand_ctrl  (0x00003200)*/
+/*! Slice: compand_ctrl_bls_enable:*/
+#define  COMPAND_CTRL_BLS_ENABLE
+#define  COMPAND_CTRL_BLS_ENABLE_MASK 0x00000008U
+#define  COMPAND_CTRL_BLS_ENABLE_SHIFT 3U
+/*! Slice: compand_ctrl_soft_reset_flag:*/
+#define  COMPAND_CTRL_SOFT_RESET_FLAG
+#define  COMPAND_CTRL_SOFT_RESET_FLAG_MASK 0x00000004U
+#define  COMPAND_CTRL_SOFT_RESET_FLAG_SHIFT 2U
+/*! Slice: compand_ctrl_compress_enable:*/
+#define  COMPAND_CTRL_COMPRESS_ENABLE
+#define  COMPAND_CTRL_COMPRESS_ENABLE_MASK 0x00000002U
+#define  COMPAND_CTRL_COMPRESS_ENABLE_SHIFT 1U
+/*! Slice: compand_ctrl_expand_enable:*/
+#define  COMPAND_CTRL_EXPAND_ENABLE
+#define  COMPAND_CTRL_EXPAND_ENABLE_MASK 0x00000001U
+#define  COMPAND_CTRL_EXPAND_ENABLE_SHIFT 0U
+/*! Register: isp_compand_bls_a_fixed  (0x00003204)*/
+/*! Slice: compand_bls_a_fixed:*/
+#define  COMPAND_BLS_A_FIXED
+#define  COMPAND_BLS_A_FIXED_MASK 0x001FFFFFU
+#define  COMPAND_BLS_A_FIXED_SHIFT 0U
+/*! Register: isp_compand_bls_b_fixed  (0x00003208)*/
+/*! Slice: compand_bls_b_fixed:*/
+#define  COMPAND_BLS_B_FIXED
+#define  COMPAND_BLS_B_FIXED_MASK 0x001FFFFFU
+#define  COMPAND_BLS_B_FIXED_SHIFT 0U
+/*! Register: isp_compand_bls_c_fixed  (0x0000320C)*/
+/*! Slice: compand_bls_c_fixed:*/
+#define  COMPAND_BLS_C_FIXED
+#define  COMPAND_BLS_C_FIXED_MASK 0x001FFFFFU
+#define  COMPAND_BLS_C_FIXED_SHIFT 0U
+/*! Register: isp_compand_bls_d_fixed  (0x00003210)*/
+/*! Slice: compand_bls_d_fixed:*/
+#define  COMPAND_BLS_D_FIXED
+#define  COMPAND_BLS_D_FIXED_MASK 0x001FFFFFU
+#define  COMPAND_BLS_D_FIXED_SHIFT 0U
+/*! Register: isp_compand_expand_px_0  (0x00003214)*/
+/*! Slice: compand_expand_px_5:*/
+#define  COMPAND_EXPAND_PX_5
+#define  COMPAND_EXPAND_PX_5_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_5_SHIFT 25U
+/*! Slice: compand_expand_px_4:*/
+#define  COMPAND_EXPAND_PX_4
+#define  COMPAND_EXPAND_PX_4_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_4_SHIFT 20U
+/*! Slice: compand_expand_px_3:*/
+#define  COMPAND_EXPAND_PX_3
+#define  COMPAND_EXPAND_PX_3_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_3_SHIFT 15U
+/*! Slice: compand_expand_px_2:*/
+#define  COMPAND_EXPAND_PX_2
+#define  COMPAND_EXPAND_PX_2_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_2_SHIFT 10U
+/*! Slice: compand_expand_px_1:*/
+#define  COMPAND_EXPAND_PX_1
+#define  COMPAND_EXPAND_PX_1_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_1_SHIFT 5U
+/*! Slice: compand_expand_px_0:*/
+#define  COMPAND_EXPAND_PX_0
+#define  COMPAND_EXPAND_PX_0_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_0_SHIFT 0U
+/*! Register: isp_compand_expand_px_1  (0x00003218)*/
+/*! Slice: compand_expand_px_11:*/
+#define  COMPAND_EXPAND_PX_11
+#define  COMPAND_EXPAND_PX_11_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_11_SHIFT 25U
+/*! Slice: compand_expand_px_10:*/
+#define  COMPAND_EXPAND_PX_10
+#define  COMPAND_EXPAND_PX_10_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_10_SHIFT 20U
+/*! Slice: compand_expand_px_9:*/
+#define  COMPAND_EXPAND_PX_9
+#define  COMPAND_EXPAND_PX_9_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_9_SHIFT 15U
+/*! Slice: compand_expand_px_8:*/
+#define  COMPAND_EXPAND_PX_8
+#define  COMPAND_EXPAND_PX_8_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_8_SHIFT 10U
+/*! Slice: compand_expand_px_7:*/
+#define  COMPAND_EXPAND_PX_7
+#define  COMPAND_EXPAND_PX_7_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_7_SHIFT 5U
+/*! Slice: compand_expand_px_6:*/
+#define  COMPAND_EXPAND_PX_6
+#define  COMPAND_EXPAND_PX_6_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_6_SHIFT 0U
+/*! Register: isp_compand_expand_px_2  (0x0000321C)*/
+/*! Slice: compand_expand_px_17:*/
+#define  COMPAND_EXPAND_PX_17
+#define  COMPAND_EXPAND_PX_17_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_17_SHIFT 25U
+/*! Slice: compand_expand_px_16:*/
+#define  COMPAND_EXPAND_PX_16
+#define  COMPAND_EXPAND_PX_16_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_16_SHIFT 20U
+/*! Slice: compand_expand_px_15:*/
+#define  COMPAND_EXPAND_PX_15
+#define  COMPAND_EXPAND_PX_15_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_15_SHIFT 15U
+/*! Slice: compand_expand_px_14:*/
+#define  COMPAND_EXPAND_PX_14
+#define  COMPAND_EXPAND_PX_14_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_14_SHIFT 10U
+/*! Slice: compand_expand_px_13:*/
+#define  COMPAND_EXPAND_PX_13
+#define  COMPAND_EXPAND_PX_13_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_13_SHIFT 5U
+/*! Slice: compand_expand_px_12:*/
+#define  COMPAND_EXPAND_PX_12
+#define  COMPAND_EXPAND_PX_12_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_12_SHIFT 0U
+/*! Register: isp_compand_expand_px_3  (0x00003220)*/
+/*! Slice: compand_expand_px_23:*/
+#define  COMPAND_EXPAND_PX_23
+#define  COMPAND_EXPAND_PX_23_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_23_SHIFT 25U
+/*! Slice: compand_expand_px_22:*/
+#define  COMPAND_EXPAND_PX_22
+#define  COMPAND_EXPAND_PX_22_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_22_SHIFT 20U
+/*! Slice: compand_expand_px_21:*/
+#define  COMPAND_EXPAND_PX_21
+#define  COMPAND_EXPAND_PX_21_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_21_SHIFT 15U
+/*! Slice: compand_expand_px_20:*/
+#define  COMPAND_EXPAND_PX_20
+#define  COMPAND_EXPAND_PX_20_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_20_SHIFT 10U
+/*! Slice: compand_expand_px_19:*/
+#define  COMPAND_EXPAND_PX_19
+#define  COMPAND_EXPAND_PX_19_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_19_SHIFT 5U
+/*! Slice: compand_expand_px_18:*/
+#define  COMPAND_EXPAND_PX_18
+#define  COMPAND_EXPAND_PX_18_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_18_SHIFT 0U
+/*! Register: isp_compand_expand_px_4  (0x00003224)*/
+/*! Slice: compand_expand_px_29:*/
+#define  COMPAND_EXPAND_PX_29
+#define  COMPAND_EXPAND_PX_29_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_29_SHIFT 25U
+/*! Slice: compand_expand_px_28:*/
+#define  COMPAND_EXPAND_PX_28
+#define  COMPAND_EXPAND_PX_28_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_28_SHIFT 20U
+/*! Slice: compand_expand_px_27:*/
+#define  COMPAND_EXPAND_PX_27
+#define  COMPAND_EXPAND_PX_27_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_27_SHIFT 15U
+/*! Slice: compand_expand_px_26:*/
+#define  COMPAND_EXPAND_PX_26
+#define  COMPAND_EXPAND_PX_26_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_26_SHIFT 10U
+/*! Slice: compand_expand_px_25:*/
+#define  COMPAND_EXPAND_PX_25
+#define  COMPAND_EXPAND_PX_25_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_25_SHIFT 5U
+/*! Slice: compand_expand_px_24:*/
+#define  COMPAND_EXPAND_PX_24
+#define  COMPAND_EXPAND_PX_24_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_24_SHIFT 0U
+/*! Register: isp_compand_expand_px_5  (0x00003228)*/
+/*! Slice: compand_expand_px_35:*/
+#define  COMPAND_EXPAND_PX_35
+#define  COMPAND_EXPAND_PX_35_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_35_SHIFT 25U
+/*! Slice: compand_expand_px_34:*/
+#define  COMPAND_EXPAND_PX_34
+#define  COMPAND_EXPAND_PX_34_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_34_SHIFT 20U
+/*! Slice: compand_expand_px_33:*/
+#define  COMPAND_EXPAND_PX_33
+#define  COMPAND_EXPAND_PX_33_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_33_SHIFT 15U
+/*! Slice: compand_expand_px_32:*/
+#define  COMPAND_EXPAND_PX_32
+#define  COMPAND_EXPAND_PX_32_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_32_SHIFT 10U
+/*! Slice: compand_expand_px_31:*/
+#define  COMPAND_EXPAND_PX_31
+#define  COMPAND_EXPAND_PX_31_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_31_SHIFT 5U
+/*! Slice: compand_expand_px_30:*/
+#define  COMPAND_EXPAND_PX_30
+#define  COMPAND_EXPAND_PX_30_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_30_SHIFT 0U
+/*! Register: isp_compand_expand_px_6  (0x0000322C)*/
+/*! Slice: compand_expand_px_41:*/
+#define  COMPAND_EXPAND_PX_41
+#define  COMPAND_EXPAND_PX_41_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_41_SHIFT 25U
+/*! Slice: compand_expand_px_40:*/
+#define  COMPAND_EXPAND_PX_40
+#define  COMPAND_EXPAND_PX_40_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_40_SHIFT 20U
+/*! Slice: compand_expand_px_39:*/
+#define  COMPAND_EXPAND_PX_39
+#define  COMPAND_EXPAND_PX_39_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_39_SHIFT 15U
+/*! Slice: compand_expand_px_38:*/
+#define  COMPAND_EXPAND_PX_38
+#define  COMPAND_EXPAND_PX_38_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_38_SHIFT 10U
+/*! Slice: compand_expand_px_37:*/
+#define  COMPAND_EXPAND_PX_37
+#define  COMPAND_EXPAND_PX_37_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_37_SHIFT 5U
+/*! Slice: compand_expand_px_36:*/
+#define  COMPAND_EXPAND_PX_36
+#define  COMPAND_EXPAND_PX_36_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_36_SHIFT 0U
+/*! Register: isp_compand_expand_px_7  (0x00003230)*/
+/*! Slice: compand_expand_px_47:*/
+#define  COMPAND_EXPAND_PX_47
+#define  COMPAND_EXPAND_PX_47_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_47_SHIFT 25U
+/*! Slice: compand_expand_px_46:*/
+#define  COMPAND_EXPAND_PX_46
+#define  COMPAND_EXPAND_PX_46_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_46_SHIFT 20U
+/*! Slice: compand_expand_px_45:*/
+#define  COMPAND_EXPAND_PX_45
+#define  COMPAND_EXPAND_PX_45_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_45_SHIFT 15U
+/*! Slice: compand_expand_px_44:*/
+#define  COMPAND_EXPAND_PX_44
+#define  COMPAND_EXPAND_PX_44_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_44_SHIFT 10U
+/*! Slice: compand_expand_px_43:*/
+#define  COMPAND_EXPAND_PX_43
+#define  COMPAND_EXPAND_PX_43_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_43_SHIFT 5U
+/*! Slice: compand_expand_px_42:*/
+#define  COMPAND_EXPAND_PX_42
+#define  COMPAND_EXPAND_PX_42_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_42_SHIFT 0U
+/*! Register: isp_compand_expand_px_8  (0x00003234)*/
+/*! Slice: compand_expand_px_53:*/
+#define  COMPAND_EXPAND_PX_53
+#define  COMPAND_EXPAND_PX_53_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_53_SHIFT 25U
+/*! Slice: compand_expand_px_52:*/
+#define  COMPAND_EXPAND_PX_52
+#define  COMPAND_EXPAND_PX_52_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_52_SHIFT 20U
+/*! Slice: compand_expand_px_51:*/
+#define  COMPAND_EXPAND_PX_51
+#define  COMPAND_EXPAND_PX_51_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_51_SHIFT 15U
+/*! Slice: compand_expand_px_50:*/
+#define  COMPAND_EXPAND_PX_50
+#define  COMPAND_EXPAND_PX_50_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_50_SHIFT 10U
+/*! Slice: compand_expand_px_49:*/
+#define  COMPAND_EXPAND_PX_49
+#define  COMPAND_EXPAND_PX_49_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_49_SHIFT 5U
+/*! Slice: compand_expand_px_48:*/
+#define  COMPAND_EXPAND_PX_48
+#define  COMPAND_EXPAND_PX_48_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_48_SHIFT 0U
+/*! Register: isp_compand_expand_px_9  (0x00003238)*/
+/*! Slice: compand_expand_px_59:*/
+#define  COMPAND_EXPAND_PX_59
+#define  COMPAND_EXPAND_PX_59_MASK 0x3E000000U
+#define  COMPAND_EXPAND_PX_59_SHIFT 25U
+/*! Slice: compand_expand_px_58:*/
+#define  COMPAND_EXPAND_PX_58
+#define  COMPAND_EXPAND_PX_58_MASK 0x01F00000U
+#define  COMPAND_EXPAND_PX_58_SHIFT 20U
+/*! Slice: compand_expand_px_57:*/
+#define  COMPAND_EXPAND_PX_57
+#define  COMPAND_EXPAND_PX_57_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_57_SHIFT 15U
+/*! Slice: compand_expand_px_56:*/
+#define  COMPAND_EXPAND_PX_56
+#define  COMPAND_EXPAND_PX_56_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_56_SHIFT 10U
+/*! Slice: compand_expand_px_55:*/
+#define  COMPAND_EXPAND_PX_55
+#define  COMPAND_EXPAND_PX_55_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_55_SHIFT 5U
+/*! Slice: compand_expand_px_54:*/
+#define  COMPAND_EXPAND_PX_54
+#define  COMPAND_EXPAND_PX_54_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_54_SHIFT 0U
+/*! Register: isp_compand_expand_px_10  (0x0000323C)*/
+/*! Slice: compand_expand_px_63:*/
+#define  COMPAND_EXPAND_PX_63
+#define  COMPAND_EXPAND_PX_63_MASK 0x000F8000U
+#define  COMPAND_EXPAND_PX_63_SHIFT 15U
+/*! Slice: compand_expand_px_62:*/
+#define  COMPAND_EXPAND_PX_62
+#define  COMPAND_EXPAND_PX_62_MASK 0x00007C00U
+#define  COMPAND_EXPAND_PX_62_SHIFT 10U
+/*! Slice: compand_expand_px_61:*/
+#define  COMPAND_EXPAND_PX_61
+#define  COMPAND_EXPAND_PX_61_MASK 0x000003E0U
+#define  COMPAND_EXPAND_PX_61_SHIFT 5U
+/*! Slice: compand_expand_px_60:*/
+#define  COMPAND_EXPAND_PX_60
+#define  COMPAND_EXPAND_PX_60_MASK 0x0000001FU
+#define  COMPAND_EXPAND_PX_60_SHIFT 0U
+/*! Register: isp_compand_compress_px_0  (0x00003240)*/
+/*! Slice: compand_compress_px_5:*/
+#define  COMPAND_COMPRESS_PX_5
+#define  COMPAND_COMPRESS_PX_5_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_5_SHIFT 25U
+/*! Slice: compand_compress_px_4:*/
+#define  COMPAND_COMPRESS_PX_4
+#define  COMPAND_COMPRESS_PX_4_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_4_SHIFT 20U
+/*! Slice: compand_compress_px_3:*/
+#define  COMPAND_COMPRESS_PX_3
+#define  COMPAND_COMPRESS_PX_3_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_3_SHIFT 15U
+/*! Slice: compand_compress_px_2:*/
+#define  COMPAND_COMPRESS_PX_2
+#define  COMPAND_COMPRESS_PX_2_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_2_SHIFT 10U
+/*! Slice: compand_compress_px_1:*/
+#define  COMPAND_COMPRESS_PX_1
+#define  COMPAND_COMPRESS_PX_1_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_1_SHIFT 5U
+/*! Slice: compand_compress_px_0:*/
+#define  COMPAND_COMPRESS_PX_0
+#define  COMPAND_COMPRESS_PX_0_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_0_SHIFT 0U
+/*! Register: isp_compand_compress_px_1  (0x00003244)*/
+/*! Slice: compand_compress_px_11:*/
+#define  COMPAND_COMPRESS_PX_11
+#define  COMPAND_COMPRESS_PX_11_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_11_SHIFT 25U
+/*! Slice: compand_compress_px_10:*/
+#define  COMPAND_COMPRESS_PX_10
+#define  COMPAND_COMPRESS_PX_10_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_10_SHIFT 20U
+/*! Slice: compand_compress_px_9:*/
+#define  COMPAND_COMPRESS_PX_9
+#define  COMPAND_COMPRESS_PX_9_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_9_SHIFT 15U
+/*! Slice: compand_compress_px_8:*/
+#define  COMPAND_COMPRESS_PX_8
+#define  COMPAND_COMPRESS_PX_8_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_8_SHIFT 10U
+/*! Slice: compand_compress_px_7:*/
+#define  COMPAND_COMPRESS_PX_7
+#define  COMPAND_COMPRESS_PX_7_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_7_SHIFT 5U
+/*! Slice: compand_compress_px_6:*/
+#define  COMPAND_COMPRESS_PX_6
+#define  COMPAND_COMPRESS_PX_6_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_6_SHIFT 0U
+/*! Register: isp_compand_compress_px_2  (0x00003248)*/
+/*! Slice: compand_compress_px_17:*/
+#define  COMPAND_COMPRESS_PX_17
+#define  COMPAND_COMPRESS_PX_17_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_17_SHIFT 25U
+/*! Slice: compand_compress_px_16:*/
+#define  COMPAND_COMPRESS_PX_16
+#define  COMPAND_COMPRESS_PX_16_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_16_SHIFT 20U
+/*! Slice: compand_compress_px_15:*/
+#define  COMPAND_COMPRESS_PX_15
+#define  COMPAND_COMPRESS_PX_15_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_15_SHIFT 15U
+/*! Slice: compand_compress_px_14:*/
+#define  COMPAND_COMPRESS_PX_14
+#define  COMPAND_COMPRESS_PX_14_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_14_SHIFT 10U
+/*! Slice: compand_compress_px_13:*/
+#define  COMPAND_COMPRESS_PX_13
+#define  COMPAND_COMPRESS_PX_13_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_13_SHIFT 5U
+/*! Slice: compand_compress_px_12:*/
+#define  COMPAND_COMPRESS_PX_12
+#define  COMPAND_COMPRESS_PX_12_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_12_SHIFT 0U
+/*! Register: isp_compand_compress_px_3  (0x0000324C)*/
+/*! Slice: compand_compress_px_23:*/
+#define  COMPAND_COMPRESS_PX_23
+#define  COMPAND_COMPRESS_PX_23_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_23_SHIFT 25U
+/*! Slice: compand_compress_px_22:*/
+#define  COMPAND_COMPRESS_PX_22
+#define  COMPAND_COMPRESS_PX_22_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_22_SHIFT 20U
+/*! Slice: compand_compress_px_21:*/
+#define  COMPAND_COMPRESS_PX_21
+#define  COMPAND_COMPRESS_PX_21_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_21_SHIFT 15U
+/*! Slice: compand_compress_px_20:*/
+#define  COMPAND_COMPRESS_PX_20
+#define  COMPAND_COMPRESS_PX_20_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_20_SHIFT 10U
+/*! Slice: compand_compress_px_19:*/
+#define  COMPAND_COMPRESS_PX_19
+#define  COMPAND_COMPRESS_PX_19_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_19_SHIFT 5U
+/*! Slice: compand_compress_px_18:*/
+#define  COMPAND_COMPRESS_PX_18
+#define  COMPAND_COMPRESS_PX_18_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_18_SHIFT 0U
+/*! Register: isp_compand_compress_px_4  (0x00003250)*/
+/*! Slice: compand_compress_px_29:*/
+#define  COMPAND_COMPRESS_PX_29
+#define  COMPAND_COMPRESS_PX_29_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_29_SHIFT 25U
+/*! Slice: compand_compress_px_28:*/
+#define  COMPAND_COMPRESS_PX_28
+#define  COMPAND_COMPRESS_PX_28_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_28_SHIFT 20U
+/*! Slice: compand_compress_px_27:*/
+#define  COMPAND_COMPRESS_PX_27
+#define  COMPAND_COMPRESS_PX_27_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_27_SHIFT 15U
+/*! Slice: compand_compress_px_26:*/
+#define  COMPAND_COMPRESS_PX_26
+#define  COMPAND_COMPRESS_PX_26_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_26_SHIFT 10U
+/*! Slice: compand_compress_px_25:*/
+#define  COMPAND_COMPRESS_PX_25
+#define  COMPAND_COMPRESS_PX_25_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_25_SHIFT 5U
+/*! Slice: compand_compress_px_24:*/
+#define  COMPAND_COMPRESS_PX_24
+#define  COMPAND_COMPRESS_PX_24_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_24_SHIFT 0U
+/*! Register: isp_compand_compress_px_5  (0x00003254)*/
+/*! Slice: compand_compress_px_35:*/
+#define  COMPAND_COMPRESS_PX_35
+#define  COMPAND_COMPRESS_PX_35_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_35_SHIFT 25U
+/*! Slice: compand_compress_px_34:*/
+#define  COMPAND_COMPRESS_PX_34
+#define  COMPAND_COMPRESS_PX_34_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_34_SHIFT 20U
+/*! Slice: compand_compress_px_33:*/
+#define  COMPAND_COMPRESS_PX_33
+#define  COMPAND_COMPRESS_PX_33_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_33_SHIFT 15U
+/*! Slice: compand_compress_px_32:*/
+#define  COMPAND_COMPRESS_PX_32
+#define  COMPAND_COMPRESS_PX_32_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_32_SHIFT 10U
+/*! Slice: compand_compress_px_31:*/
+#define  COMPAND_COMPRESS_PX_31
+#define  COMPAND_COMPRESS_PX_31_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_31_SHIFT 5U
+/*! Slice: compand_compress_px_30:*/
+#define  COMPAND_COMPRESS_PX_30
+#define  COMPAND_COMPRESS_PX_30_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_30_SHIFT 0U
+/*! Register: isp_compand_compress_px_6  (0x00003258)*/
+/*! Slice: compand_compress_px_41:*/
+#define  COMPAND_COMPRESS_PX_41
+#define  COMPAND_COMPRESS_PX_41_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_41_SHIFT 25U
+/*! Slice: compand_compress_px_40:*/
+#define  COMPAND_COMPRESS_PX_40
+#define  COMPAND_COMPRESS_PX_40_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_40_SHIFT 20U
+/*! Slice: compand_compress_px_39:*/
+#define  COMPAND_COMPRESS_PX_39
+#define  COMPAND_COMPRESS_PX_39_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_39_SHIFT 15U
+/*! Slice: compand_compress_px_38:*/
+#define  COMPAND_COMPRESS_PX_38
+#define  COMPAND_COMPRESS_PX_38_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_38_SHIFT 10U
+/*! Slice: compand_compress_px_37:*/
+#define  COMPAND_COMPRESS_PX_37
+#define  COMPAND_COMPRESS_PX_37_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_37_SHIFT 5U
+/*! Slice: compand_compress_px_36:*/
+#define  COMPAND_COMPRESS_PX_36
+#define  COMPAND_COMPRESS_PX_36_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_36_SHIFT 0U
+/*! Register: isp_compand_compress_px_7  (0x0000325C)*/
+/*! Slice: compand_compress_px_47:*/
+#define  COMPAND_COMPRESS_PX_47
+#define  COMPAND_COMPRESS_PX_47_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_47_SHIFT 25U
+/*! Slice: compand_compress_px_46:*/
+#define  COMPAND_COMPRESS_PX_46
+#define  COMPAND_COMPRESS_PX_46_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_46_SHIFT 20U
+/*! Slice: compand_compress_px_45:*/
+#define  COMPAND_COMPRESS_PX_45
+#define  COMPAND_COMPRESS_PX_45_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_45_SHIFT 15U
+/*! Slice: compand_compress_px_44:*/
+#define  COMPAND_COMPRESS_PX_44
+#define  COMPAND_COMPRESS_PX_44_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_44_SHIFT 10U
+/*! Slice: compand_compress_px_43:*/
+#define  COMPAND_COMPRESS_PX_43
+#define  COMPAND_COMPRESS_PX_43_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_43_SHIFT 5U
+/*! Slice: compand_compress_px_42:*/
+#define  COMPAND_COMPRESS_PX_42
+#define  COMPAND_COMPRESS_PX_42_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_42_SHIFT 0U
+/*! Register: isp_compand_compress_px_8  (0x00003260)*/
+/*! Slice: compand_compress_px_53:*/
+#define  COMPAND_COMPRESS_PX_53
+#define  COMPAND_COMPRESS_PX_53_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_53_SHIFT 25U
+/*! Slice: compand_compress_px_52:*/
+#define  COMPAND_COMPRESS_PX_52
+#define  COMPAND_COMPRESS_PX_52_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_52_SHIFT 20U
+/*! Slice: compand_compress_px_51:*/
+#define  COMPAND_COMPRESS_PX_51
+#define  COMPAND_COMPRESS_PX_51_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_51_SHIFT 15U
+/*! Slice: compand_compress_px_50:*/
+#define  COMPAND_COMPRESS_PX_50
+#define  COMPAND_COMPRESS_PX_50_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_50_SHIFT 10U
+/*! Slice: compand_compress_px_49:*/
+#define  COMPAND_COMPRESS_PX_49
+#define  COMPAND_COMPRESS_PX_49_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_49_SHIFT 5U
+/*! Slice: compand_compress_px_48:*/
+#define  COMPAND_COMPRESS_PX_48
+#define  COMPAND_COMPRESS_PX_48_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_48_SHIFT 0U
+/*! Register: isp_compand_compress_px_9  (0x00003264)*/
+/*! Slice: compand_compress_px_59:*/
+#define  COMPAND_COMPRESS_PX_59
+#define  COMPAND_COMPRESS_PX_59_MASK 0x3E000000U
+#define  COMPAND_COMPRESS_PX_59_SHIFT 25U
+/*! Slice: compand_compress_px_58:*/
+#define  COMPAND_COMPRESS_PX_58
+#define  COMPAND_COMPRESS_PX_58_MASK 0x01F00000U
+#define  COMPAND_COMPRESS_PX_58_SHIFT 20U
+/*! Slice: compand_compress_px_57:*/
+#define  COMPAND_COMPRESS_PX_57
+#define  COMPAND_COMPRESS_PX_57_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_57_SHIFT 15U
+/*! Slice: compand_compress_px_56:*/
+#define  COMPAND_COMPRESS_PX_56
+#define  COMPAND_COMPRESS_PX_56_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_56_SHIFT 10U
+/*! Slice: compand_compress_px_55:*/
+#define  COMPAND_COMPRESS_PX_55
+#define  COMPAND_COMPRESS_PX_55_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_55_SHIFT 5U
+/*! Slice: compand_compress_px_54:*/
+#define  COMPAND_COMPRESS_PX_54
+#define  COMPAND_COMPRESS_PX_54_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_54_SHIFT 0U
+/*! Register: isp_compand_compress_px_10  (0x00003268)*/
+/*! Slice: compand_compress_px_63:*/
+#define  COMPAND_COMPRESS_PX_63
+#define  COMPAND_COMPRESS_PX_63_MASK 0x000F8000U
+#define  COMPAND_COMPRESS_PX_63_SHIFT 15U
+/*! Slice: compand_compress_px_62:*/
+#define  COMPAND_COMPRESS_PX_62
+#define  COMPAND_COMPRESS_PX_62_MASK 0x00007C00U
+#define  COMPAND_COMPRESS_PX_62_SHIFT 10U
+/*! Slice: compand_compress_px_61:*/
+#define  COMPAND_COMPRESS_PX_61
+#define  COMPAND_COMPRESS_PX_61_MASK 0x000003E0U
+#define  COMPAND_COMPRESS_PX_61_SHIFT 5U
+/*! Slice: compand_compress_px_60:*/
+#define  COMPAND_COMPRESS_PX_60
+#define  COMPAND_COMPRESS_PX_60_MASK 0x0000001FU
+#define  COMPAND_COMPRESS_PX_60_SHIFT 0U
+/*! Register: isp_compand_expand_y_addr  (0x0000326C)*/
+/*! Slice: compand_expand_y_addr:*/
+#define  COMPAND_EXPAND_Y_ADDR
+#define  COMPAND_EXPAND_Y_ADDR_MASK 0xFFFFFFFFU
+#define  COMPAND_EXPAND_Y_ADDR_SHIFT 0U
+/*! Register: isp_compand_expand_y_write_data  (0x00003270)*/
+/*! Slice: compand_expand_y_write_data:*/
+#define  COMPAND_EXPAND_Y_WRITE_DATA
+#define  COMPAND_EXPAND_Y_WRITE_DATA_MASK 0x000FFFFFU
+#define  COMPAND_EXPAND_Y_WRITE_DATA_SHIFT 0U
+/*! Register: isp_compand_compress_y_addr  (0x00003274)*/
+/*! Slice: compand_compress_y_addr:*/
+#define  COMPAND_COMPRESS_Y_ADDR
+#define  COMPAND_COMPRESS_Y_ADDR_MASK 0xFFFFFFFFU
+#define  COMPAND_COMPRESS_Y_ADDR_SHIFT 0U
+/*! Register: isp_compand_compress_y_write_data  (0x00003278)*/
+/*! Slice: compand_compress_y_write_data:*/
+#define  COMPAND_COMPRESS_Y_WRITE_DATA
+#define  COMPAND_COMPRESS_Y_WRITE_DATA_MASK 0x0000FFFFU
+#define  COMPAND_COMPRESS_Y_WRITE_DATA_SHIFT 0U
+/*! Register: isp_compand_expand_x_addr  (0x0000327C)*/
+/*! Slice: compand_expand_x_addr:*/
+#define  COMPAND_EXPAND_X_ADDR
+#define  COMPAND_EXPAND_X_ADDR_MASK 0xFFFFFFFFU
+#define  COMPAND_EXPAND_X_ADDR_SHIFT 0U
+/*! Register: isp_compand_expand_x_write_data  (0x00003280)*/
+/*! Slice: compand_expand_x_write_data:*/
+#define  COMPAND_EXPAND_X_WRITE_DATA
+#define  COMPAND_EXPAND_X_WRITE_DATA_MASK 0x000FFFFFU
+#define  COMPAND_EXPAND_X_WRITE_DATA_SHIFT 0U
+/*! Register: isp_compand_compress_x_addr  (0x00003284)*/
+/*! Slice: compand_compress_x_addr:*/
+#define  COMPAND_COMPRESS_X_ADDR
+#define  COMPAND_COMPRESS_X_ADDR_MASK 0xFFFFFFFFU
+#define  COMPAND_COMPRESS_X_ADDR_SHIFT 0U
+/*! Register: isp_compand_compress_x_write_data  (0x00003288)*/
+/*! Slice: compand_compress_x_write_data:*/
+#define  COMPAND_COMPRESS_X_WRITE_DATA
+#define  COMPAND_COMPRESS_X_WRITE_DATA_MASK 0x000FFFFFU
+#define  COMPAND_COMPRESS_X_WRITE_DATA_SHIFT 0U
+/*! Register: isp_wdr3_ctrl   (0x00003500)*/
+/*! Slice: wdr3_dummmy_blk:*/
+#define  WDR3_DUMMY_BLK
+#define  WDR3_DUMMY_BLK_MASK 0xffff0000U
+#define  WDR3_DUMMY_BLK_SHIFT 16U
+/*! Register: isp_wdr3_ctrl   (0x00003500)*/
+/*! Slice: wdr3_dummy_blk_en:*/
+#define  WDR3_DUMMY_BLK_EN
+#define  WDR3_DUMMY_BLK_EN_MASK 0x00008000U
+#define  WDR3_DUMMY_BLK_EN_SHIFT 15U
+/*! Register: isp_wdr3_ctrl   (0x00003500)*/
+/*! Slice: wdr3_interrupt_en:*/
+#define  WDR3_INTERRUPT_EN
+#define  WDR3_INTERRUPT_EN_MASK 0x00000200U
+#define  WDR3_INTERRUPT_EN_SHIFT 9U
+/*! Slice: wdr3_soft_reset_flag:*/
+#define  WDR3_SOFT_RESET_FLAG
+#define  WDR3_SOFT_RESET_FLAG_MASK 0x00000002U
+#define  WDR3_SOFT_RESET_FLAG_SHIFT 1U
+/*! Slice: wdr3_enable:*/
+#define  WDR3_ENABLE
+#define  WDR3_ENABLE_MASK 0x00000001U
+#define  WDR3_ENABLE_SHIFT 0U
+/*! Register: isp_wdr3_shift  (0x00003504)*/
+/*! Slice: wdr3_gain_shift_bit:*/
+#define  WDR3_GAIN_SHIFT_BIT
+#define  WDR3_GAIN_SHIFT_BIT_MASK 0x00FC0000U
+#define  WDR3_GAIN_SHIFT_BIT_SHIFT 18U
+/*! Slice: wdr3_normalize_shift_bit:*/
+#define  WDR3_NORMALIZE_SHIFT_BIT
+#define  WDR3_NORMALIZE_SHIFT_BIT_MASK 0x0003F000U
+#define  WDR3_NORMALIZE_SHIFT_BIT_SHIFT 12U
+/*! Slice: wdr3_output_shift_bit:*/
+#define  WDR3_OUTPUT_SHIFT_BIT
+#define  WDR3_OUTPUT_SHIFT_BIT_MASK 0x00000FC0U
+#define  WDR3_OUTPUT_SHIFT_BIT_SHIFT 6U
+/*! Slice: wdr3_pixel_shift_bit:*/
+#define  WDR3_PIXEL_SHIFT_BIT
+#define  WDR3_PIXEL_SHIFT_BIT_MASK 0x0000003FU
+#define  WDR3_PIXEL_SHIFT_BIT_SHIFT 0U
+/*! Register: isp_wdr3_block_size  (0x00003508)*/
+/*! Slice: wdr3_block_height:*/
+#define  WDR3_BLOCK_HEIGHT
+#define  WDR3_BLOCK_HEIGHT_MASK 0x0003FE00U
+#define  WDR3_BLOCK_HEIGHT_SHIFT 9U
+/*! Slice: wdr3_block_width:*/
+#define  WDR3_BLOCK_WIDTH
+#define  WDR3_BLOCK_WIDTH_MASK 0x000001FFU
+#define  WDR3_BLOCK_WIDTH_SHIFT 0U
+/*! Register: isp_wdr3_block_area_factor  (0x0000350C)*/
+/*! Slice: wdr3_block_area_inverse:*/
+#define  WDR3_BLOCK_AREA_INVERSE
+#define  WDR3_BLOCK_AREA_INVERSE_MASK 0x000FFFFFU
+#define  WDR3_BLOCK_AREA_INVERSE_SHIFT 0U
+/*! Register: isp_wdr3_value_weight   (0x00003510)*/
+/*! Slice: wdr3_value_weight_3:*/
+#define  WDR3_VALUE_WEIGHT_3
+#define  WDR3_VALUE_WEIGHT_3_MASK 0x000F8000U
+#define  WDR3_VALUE_WEIGHT_3_SHIFT 15U
+/*! Slice: wdr3_value_weight_2:*/
+#define  WDR3_VALUE_WEIGHT_2
+#define  WDR3_VALUE_WEIGHT_2_MASK 0x00007C00U
+#define  WDR3_VALUE_WEIGHT_2_SHIFT 10U
+/*! Slice: wdr3_value_weight_1:*/
+#define  WDR3_VALUE_WEIGHT_1
+#define  WDR3_VALUE_WEIGHT_1_MASK 0x000003E0U
+#define  WDR3_VALUE_WEIGHT_1_SHIFT 5U
+/*! Slice: wdr3_value_weight_0:*/
+#define  WDR3_VALUE_WEIGHT_0
+#define  WDR3_VALUE_WEIGHT_0_MASK 0x0000001FU
+#define  WDR3_VALUE_WEIGHT_0_SHIFT 0U
+/*! Register: isp_wdr3_strength          (0x00003514)*/
+/*! Slice: wdr3_total_strength:*/
+#define  WDR3_TOTAL_STRENGTH
+#define  WDR3_TOTAL_STRENGTH_MASK 0xFF000000U
+#define  WDR3_TOTAL_STRENGTH_SHIFT 24U
+/*! Slice: wdr3_local_strength:*/
+#define  WDR3_LOCAL_STRENGTH
+#define  WDR3_LOCAL_STRENGTH_MASK 0x00FF0000U
+#define  WDR3_LOCAL_STRENGTH_SHIFT 16U
+/*! Slice: wdr3_global_strength:*/
+#define  WDR3_GLOBAL_STRENGTH
+#define  WDR3_GLOBAL_STRENGTH_MASK 0x0000FF00U
+#define  WDR3_GLOBAL_STRENGTH_SHIFT 8U
+/*! Slice: wdr3_maximum_gain:*/
+#define  WDR3_MAXIMUM_GAIN
+#define  WDR3_MAXIMUM_GAIN_MASK 0x000000FFU
+#define  WDR3_MAXIMUM_GAIN_SHIFT 0U
+/*! Register: isp_wdr3_pixel_slope  (0x00003518)*/
+/*! Slice: wdr3_pixel_merge_slope:*/
+#define  WDR3_PIXEL_MERGE_SLOPE
+#define  WDR3_PIXEL_MERGE_SLOPE_MASK 0xFF000000U
+#define  WDR3_PIXEL_MERGE_SLOPE_SHIFT 24U
+/*! Slice: wdr3_pixel_merge_base:*/
+#define  WDR3_PIXEL_MERGE_BASE
+#define  WDR3_PIXEL_MERGE_BASE_MASK 0x00FF0000U
+#define  WDR3_PIXEL_MERGE_BASE_SHIFT 16U
+/*! Slice: wdr3_pixel_adjust_slope:*/
+#define  WDR3_PIXEL_ADJUST_SLOPE
+#define  WDR3_PIXEL_ADJUST_SLOPE_MASK 0x0000FF00U
+#define  WDR3_PIXEL_ADJUST_SLOPE_SHIFT 8U
+/*! Slice: wdr3_pixel_adjust_base:*/
+#define  WDR3_PIXEL_ADJUST_BASE
+#define  WDR3_PIXEL_ADJUST_BASE_MASK 0x000000FFU
+#define  WDR3_PIXEL_ADJUST_BASE_SHIFT 0U
+/*! Register: isp_wdr3_entropy_slope  (0x0000351C)*/
+/*! Slice: wdr3_entropy_slope:*/
+#define  WDR3_ENTROPY_SLOPE
+#define  WDR3_ENTROPY_SLOPE_MASK 0x000FFC00U
+#define  WDR3_ENTROPY_SLOPE_SHIFT 10U
+/*! Slice: wdr3_entropy_base:*/
+#define  WDR3_ENTROPY_BASE
+#define  WDR3_ENTROPY_BASE_MASK 0x000003FFU
+#define  WDR3_ENTROPY_BASE_SHIFT 0U
+/*! Register: isp_wdr3_sigma_width  (0x00003520)*/
+/*! Slice: wdr3_biliteral_width_sigma:*/
+#define  WDR3_BILITERAL_WIDTH_SIGMA
+#define  WDR3_BILITERAL_WIDTH_SIGMA_MASK 0x000FFFFFU
+#define  WDR3_BILITERAL_WIDTH_SIGMA_SHIFT 0U
+/*! Register: isp_wdr3_sigma_height  (0x00003524)*/
+/*! Slice: wdr3_biliteral_height_sigma:*/
+#define  WDR3_BILITERAL_HEIGHT_SIGMA
+#define  WDR3_BILITERAL_HEIGHT_SIGMA_MASK 0x000FFFFFU
+#define  WDR3_BILITERAL_HEIGHT_SIGMA_SHIFT 0U
+/*! Register: isp_wdr3_sigma_value  (0x00003528)*/
+/*! Slice: wdr3_biliteral_value_sigma:*/
+#define  WDR3_BILITERAL_VALUE_SIGMA
+#define  WDR3_BILITERAL_VALUE_SIGMA_MASK 0x000FFFFFU
+#define  WDR3_BILITERAL_VALUE_SIGMA_SHIFT 0U
+/*! Register: isp_wdr3_block_flag_width  (0x0000352C)*/
+/*! Slice: wdr3_block_col_flag:*/
+#define  WDR3_BLOCK_COL_FLAG
+#define  WDR3_BLOCK_COL_FLAG_MASK 0xFFFFFFFFU
+#define  WDR3_BLOCK_COL_FLAG_SHIFT 0U
+/*! Register: isp_wdr3_block_flag_height  (0x00003530)*/
+/*! Slice: wdr3_block_row_flag:*/
+#define  WDR3_BLOCK_ROW_FLAG
+#define  WDR3_BLOCK_ROW_FLAG_MASK 0xFFFFFFFFU
+#define  WDR3_BLOCK_ROW_FLAG_SHIFT 0U
+/*! Register: isp_wdr3_frame_average  (0x00003534)*/
+/*! Slice: wdr3_frame_average:*/
+#define  WDR3_FRAME_AVERAGE
+#define  WDR3_FRAME_AVERAGE_MASK 0xFFFFFFFFU
+#define  WDR3_FRAME_AVERAGE_SHIFT 0U
+/*! Register: isp_wdr3_frame_std  (0x00003538)*/
+/*! Slice: wdr3_frame_std:*/
+#define  WDR3_FRAME_STD
+#define  WDR3_FRAME_STD_MASK 0xFFFFFFFFU
+#define  WDR3_FRAME_STD_SHIFT 0U
+/*! Register: isp_wdr3_histogram_0  (0x0000353C)*/
+/*! Slice: wdr3_histogram_curve0:*/
+#define  WDR3_HISTOGRAM_CURVE0
+#define  WDR3_HISTOGRAM_CURVE0_MASK 0x3FF00000U
+#define  WDR3_HISTOGRAM_CURVE0_SHIFT 20U
+/*! Slice: wdr3_histogram_curve1:*/
+#define  WDR3_HISTOGRAM_CURVE1
+#define  WDR3_HISTOGRAM_CURVE1_MASK 0x000FFC00U
+#define  WDR3_HISTOGRAM_CURVE1_SHIFT 10U
+/*! Slice: wdr3_histogram_curve2:*/
+#define  WDR3_HISTOGRAM_CURVE2
+#define  WDR3_HISTOGRAM_CURVE2_MASK 0x000003FFU
+#define  WDR3_HISTOGRAM_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_entropy_0  (0x00003550)*/
+/*! Slice: wdr3_entropy_convert0:*/
+#define  WDR3_ENTROPY_CONVERT0
+#define  WDR3_ENTROPY_CONVERT0_MASK 0x07FC0000U
+#define  WDR3_ENTROPY_CONVERT0_SHIFT 18U
+/*! Slice: wdr3_entropy_convert1:*/
+#define  WDR3_ENTROPY_CONVERT1
+#define  WDR3_ENTROPY_CONVERT1_MASK 0x0003FE00U
+#define  WDR3_ENTROPY_CONVERT1_SHIFT 9U
+/*! Slice: wdr3_entropy_convert2:*/
+#define  WDR3_ENTROPY_CONVERT2
+#define  WDR3_ENTROPY_CONVERT2_MASK 0x000001FFU
+#define  WDR3_ENTROPY_CONVERT2_SHIFT 0U
+/*! Register: isp_wdr3_gamma_pre_0  (0x00003564)*/
+/*! Slice: wdr3_gamma_pre_curve0:*/
+#define  WDR3_GAMMA_PRE_CURVE0
+#define  WDR3_GAMMA_PRE_CURVE0_MASK 0x3FF00000U
+#define  WDR3_GAMMA_PRE_CURVE0_SHIFT 20U
+/*! Slice: wdr3_gamma_pre_curve1:*/
+#define  WDR3_GAMMA_PRE_CURVE1
+#define  WDR3_GAMMA_PRE_CURVE1_MASK 0x000FFC00U
+#define  WDR3_GAMMA_PRE_CURVE1_SHIFT 10U
+/*! Slice: wdr3_gamma_pre_curve2:*/
+#define  WDR3_GAMMA_PRE_CURVE2
+#define  WDR3_GAMMA_PRE_CURVE2_MASK 0x000003FFU
+#define  WDR3_GAMMA_PRE_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_gamma_up_0  (0x00003578)*/
+/*! Slice: wdr3_gamma_up_curve0:*/
+#define  WDR3_GAMMA_UP_CURVE0
+#define  WDR3_GAMMA_UP_CURVE0_MASK 0x3FF00000U
+#define  WDR3_GAMMA_UP_CURVE0_SHIFT 20U
+/*! Slice: wdr3_gamma_up_curve1:*/
+#define  WDR3_GAMMA_UP_CURVE1
+#define  WDR3_GAMMA_UP_CURVE1_MASK 0x000FFC00U
+#define  WDR3_GAMMA_UP_CURVE1_SHIFT 10U
+/*! Slice: wdr3_gamma_up_curve2:*/
+#define  WDR3_GAMMA_UP_CURVE2
+#define  WDR3_GAMMA_UP_CURVE2_MASK 0x000003FFU
+#define  WDR3_GAMMA_UP_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_gamma_down_0  (0x0000358C)*/
+/*! Slice: wdr3_gamma_down_curve0:*/
+#define  WDR3_GAMMA_DOWN_CURVE0
+#define  WDR3_GAMMA_DOWN_CURVE0_MASK 0x3FF00000U
+#define  WDR3_GAMMA_DOWN_CURVE0_SHIFT 20U
+/*! Slice: wdr3_gamma_down_curve1:*/
+#define  WDR3_GAMMA_DOWN_CURVE1
+#define  WDR3_GAMMA_DOWN_CURVE1_MASK 0x000FFC00U
+#define  WDR3_GAMMA_DOWN_CURVE1_SHIFT 10U
+/*! Slice: wdr3_gamma_down_curve2:*/
+#define  WDR3_GAMMA_DOWN_CURVE2
+#define  WDR3_GAMMA_DOWN_CURVE2_MASK 0x000003FFU
+#define  WDR3_GAMMA_DOWN_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_distance_weight_0  (0x000035A0)*/
+/*! Slice: wdr3_distance_weight_curve0:*/
+#define  WDR3_DISTANCE_WEIGHT_CURVE0
+#define  WDR3_DISTANCE_WEIGHT_CURVE0_MASK 0x001FC000U
+#define  WDR3_DISTANCE_WEIGHT_CURVE0_SHIFT 14U
+/*! Slice: wdr3_distance_weight_curve1:*/
+#define  WDR3_DISTANCE_WEIGHT_CURVE1
+#define  WDR3_DISTANCE_WEIGHT_CURVE1_MASK 0x00003F80U
+#define  WDR3_DISTANCE_WEIGHT_CURVE1_SHIFT 7U
+/*! Slice: wdr3_distance_weight_curve2:*/
+#define  WDR3_DISTANCE_WEIGHT_CURVE2
+#define  WDR3_DISTANCE_WEIGHT_CURVE2_MASK 0x0000007FU
+#define  WDR3_DISTANCE_WEIGHT_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_difference_weight_0  (0x000035B4)*/
+/*! Slice: wdr3_difference_weight_curve0:*/
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE0
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE0_MASK 0x001FC000U
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE0_SHIFT 14U
+/*! Slice: wdr3_difference_weight_curve1:*/
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE1
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE1_MASK 0x00003F80U
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE1_SHIFT 7U
+/*! Slice: wdr3_difference_weight_curve2:*/
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE2
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE2_MASK 0x0000007FU
+#define  WDR3_DIFFERENCE_WEIGHT_CURVE2_SHIFT 0U
+/*! Register: isp_wdr3_invert_curve_0  (0x000035C8)*/
+/*! Slice: wdr3_global_curve_invert0:*/
+#define  WDR3_GLOBAL_CURVE_INVERT0
+#define  WDR3_GLOBAL_CURVE_INVERT0_MASK 0x00FFF000U
+#define  WDR3_GLOBAL_CURVE_INVERT0_SHIFT 12U
+/*! Slice: wdr3_global_curve_invert1:*/
+#define  WDR3_GLOBAL_CURVE_INVERT1
+#define  WDR3_GLOBAL_CURVE_INVERT1_MASK 0x00000FFFU
+#define  WDR3_GLOBAL_CURVE_INVERT1_SHIFT 0U
+/*! Register: isp_wdr3_invert_curve_1  (0x000035CC)*/
+/*! Slice: wdr3_global_curve_invert2:*/
+#define  WDR3_GLOBAL_CURVE_INVERT2
+#define  WDR3_GLOBAL_CURVE_INVERT2_MASK 0x00FFF000U
+#define  WDR3_GLOBAL_CURVE_INVERT2_SHIFT 12U
+/*! Register: isp_wdr3_invert_linear_0  (0x000035E4)*/
+/*! Slice: wdr3_linear_curve_invert0:*/
+#define  WDR3_LINEAR_CURVE_INVERT0
+#define  WDR3_LINEAR_CURVE_INVERT0_MASK 0x00FFF000U
+#define  WDR3_LINEAR_CURVE_INVERT0_SHIFT 12U
+/*! Slice: wdr3_linear_curve_invert1:*/
+#define  WDR3_LINEAR_CURVE_INVERT1
+#define  WDR3_LINEAR_CURVE_INVERT1_MASK 0x00000FFFU
+#define  WDR3_LINEAR_CURVE_INVERT1_SHIFT 0U
+/*! Register: isp_wdr3_invert_linear_1  (0x000035E8)*/
+/*! Slice: wdr3_linear_curve_invert2:*/
+#define  WDR3_LINEAR_CURVE_INVERT2
+#define  WDR3_LINEAR_CURVE_INVERT2_MASK 0x00FFF000U
+#define  WDR3_LINEAR_CURVE_INVERT2_SHIFT 12U
+/*! Register: isp_wdr3_shift_0  (0x00003600)*/
+/*! Slice: wdr3_histogram_shift0:*/
+#define  WDR3_HISTOGRAM_SHIFT0
+#define  WDR3_HISTOGRAM_SHIFT0_MASK 0xF0000000U
+#define  WDR3_HISTOGRAM_SHIFT0_SHIFT 28U
+/*! Slice: wdr3_histogram_shift1:*/
+#define  WDR3_HISTOGRAM_SHIFT1
+#define  WDR3_HISTOGRAM_SHIFT1_MASK 0x0F000000U
+#define  WDR3_HISTOGRAM_SHIFT1_SHIFT 24U
+/*! Slice: wdr3_histogram_shift2:*/
+#define  WDR3_HISTOGRAM_SHIFT2
+#define  WDR3_HISTOGRAM_SHIFT2_MASK 0x00F00000U
+#define  WDR3_HISTOGRAM_SHIFT2_SHIFT 20U
+/*! Slice: wdr3_histogram_shift3:*/
+#define  WDR3_HISTOGRAM_SHIFT3
+#define  WDR3_HISTOGRAM_SHIFT3_MASK 0x000F0000U
+#define  WDR3_HISTOGRAM_SHIFT3_SHIFT 16U
+/*! Slice: wdr3_histogram_shift4:*/
+#define  WDR3_HISTOGRAM_SHIFT4
+#define  WDR3_HISTOGRAM_SHIFT4_MASK 0x0000F000U
+#define  WDR3_HISTOGRAM_SHIFT4_SHIFT 12U
+/*! Slice: wdr3_histogram_shift5:*/
+#define  WDR3_HISTOGRAM_SHIFT5
+#define  WDR3_HISTOGRAM_SHIFT5_MASK 0x00000F00U
+#define  WDR3_HISTOGRAM_SHIFT5_SHIFT 8U
+/*! Slice: wdr3_histogram_shift6:*/
+#define  WDR3_HISTOGRAM_SHIFT6
+#define  WDR3_HISTOGRAM_SHIFT6_MASK 0x000000F0U
+#define  WDR3_HISTOGRAM_SHIFT6_SHIFT 4U
+/*! Slice: wdr3_histogram_shift7:*/
+#define  WDR3_HISTOGRAM_SHIFT7
+#define  WDR3_HISTOGRAM_SHIFT7_MASK 0x0000000FU
+#define  WDR3_HISTOGRAM_SHIFT7_SHIFT 0U
+/*! Register: isp_wdr3_shift_1  (0x00003604)*/
+/*! Slice: wdr3_histogram_shift8:*/
+#define  WDR3_HISTOGRAM_SHIFT8
+#define  WDR3_HISTOGRAM_SHIFT8_MASK 0x00F00000U
+#define  WDR3_HISTOGRAM_SHIFT8_SHIFT 20U
+/*! Slice: wdr3_histogram_shift9:*/
+#define  WDR3_HISTOGRAM_SHIFT9
+#define  WDR3_HISTOGRAM_SHIFT9_MASK 0x000F0000U
+#define  WDR3_HISTOGRAM_SHIFT9_SHIFT 16U
+/*! Slice: wdr3_histogram_shift10:*/
+#define  WDR3_HISTOGRAM_SHIFT10
+#define  WDR3_HISTOGRAM_SHIFT10_MASK 0x0000F000U
+#define  WDR3_HISTOGRAM_SHIFT10_SHIFT 12U
+/*! Slice: wdr3_histogram_shift11:*/
+#define  WDR3_HISTOGRAM_SHIFT11
+#define  WDR3_HISTOGRAM_SHIFT11_MASK 0x00000F00U
+#define  WDR3_HISTOGRAM_SHIFT11_SHIFT 8U
+/*! Slice: wdr3_histogram_shift12:*/
+#define  WDR3_HISTOGRAM_SHIFT12
+#define  WDR3_HISTOGRAM_SHIFT12_MASK 0x000000F0U
+#define  WDR3_HISTOGRAM_SHIFT12_SHIFT 4U
+/*! Slice: wdr3_histogram_shift13:*/
+#define  WDR3_HISTOGRAM_SHIFT13
+#define  WDR3_HISTOGRAM_SHIFT13_MASK 0x0000000FU
+#define  WDR3_HISTOGRAM_SHIFT13_SHIFT 0U
+/*! Register: isp_wdr3_strength_shd          (0x00003608)*/
+/*! Slice: wdr3_total_strength_shd:*/
+#define  WDR3_TOTAL_STRENGTH_SHD
+#define  WDR3_TOTAL_STRENGTH_SHD_MASK 0xFF000000U
+#define  WDR3_TOTAL_STRENGTH_SHD_SHIFT 24U
+/*! Slice: wdr3_local_strength_shd:*/
+#define  WDR3_LOCAL_STRENGTH_SHD
+#define  WDR3_LOCAL_STRENGTH_SHD_MASK 0x00FF0000U
+#define  WDR3_LOCAL_STRENGTH_SHD_SHIFT 16U
+/*! Slice: wdr3_global_strength_shd:*/
+#define  WDR3_GLOBAL_STRENGTH_SHD
+#define  WDR3_GLOBAL_STRENGTH_SHD_MASK 0x0000FF00U
+#define  WDR3_GLOBAL_STRENGTH_SHD_SHIFT 8U
+/*! Slice: wdr3_maximum_gain_shd:*/
+#define  WDR3_MAXIMUM_GAIN_SHD
+#define  WDR3_MAXIMUM_GAIN_SHD_MASK 0x000000FFU
+#define  WDR3_MAXIMUM_GAIN_SHD_SHIFT 0U
+/*! Register: isp_wdr3_pixel_slope_shd  (0x0000360C)*/
+/*! Slice: wdr3_pixel_merge_slope_shd:*/
+#define  WDR3_PIXEL_MERGE_SLOPE_SHD
+#define  WDR3_PIXEL_MERGE_SLOPE_SHD_MASK 0xFF000000U
+#define  WDR3_PIXEL_MERGE_SLOPE_SHD_SHIFT 24U
+/*! Slice: wdr3_pixel_merge_base_shd:*/
+#define  WDR3_PIXEL_MERGE_BASE_SHD
+#define  WDR3_PIXEL_MERGE_BASE_SHD_MASK 0x00FF0000U
+#define  WDR3_PIXEL_MERGE_BASE_SHD_SHIFT 16U
+/*! Slice: wdr3_pixel_adjust_slope_shd:*/
+#define  WDR3_PIXEL_ADJUST_SLOPE_SHD
+#define  WDR3_PIXEL_ADJUST_SLOPE_SHD_MASK 0x0000FF00U
+#define  WDR3_PIXEL_ADJUST_SLOPE_SHD_SHIFT 8U
+/*! Slice: wdr3_pixel_adjust_base_shd:*/
+#define  WDR3_PIXEL_ADJUST_BASE_SHD
+#define  WDR3_PIXEL_ADJUST_BASE_SHD_MASK 0x000000FFU
+#define  WDR3_PIXEL_ADJUST_BASE_SHD_SHIFT 0U
+/*! Register: isp_wdr3_entropy_slope_shd  (0x00003610)*/
+/*! Slice: wdr3_entropy_slope_shd:*/
+#define  WDR3_ENTROPY_SLOPE_SHD
+#define  WDR3_ENTROPY_SLOPE_SHD_MASK 0x000FFC00U
+#define  WDR3_ENTROPY_SLOPE_SHD_SHIFT 10U
+/*! Slice: wdr3_entropy_base_shd:*/
+#define  WDR3_ENTROPY_BASE_SHD
+#define  WDR3_ENTROPY_BASE_SHD_MASK 0x000003FFU
+#define  WDR3_ENTROPY_BASE_SHD_SHIFT 0U
+/* TPG */
+/*! Register: isp_tpg_ctrl  (0x00000700)*/
+/*! Slice: tpg_resolution:*/
+#define  TPG_RESOLUTION
+#define  TPG_RESOLUTION_MASK 0x00000C00U
+#define  TPG_RESOLUTION_SHIFT 10U
+/*! Slice: tpg_max_sync:*/
+#define  TPG_MAX_SYNC
+#define  TPG_MAX_SYNC_MASK 0x00000200U
+#define  TPG_MAX_SYNC_SHIFT 9U
+/*! Slice: tpg_def_sync:*/
+#define  TPG_DEF_SYNC
+#define  TPG_DEF_SYNC_MASK 0x00000100U
+#define  TPG_DEF_SYNC_SHIFT 8U
+/*! Slice: tpg_color_depth:*/
+#define  TPG_COLOR_DEPTH
+#define  TPG_COLOR_DEPTH_MASK 0x000000C0U
+#define  TPG_COLOR_DEPTH_SHIFT 6U
+/*! Slice: tpg_cfa_pat:*/
+#define  TPG_CFA_PAT
+#define  TPG_CFA_PAT_MASK 0x00000030U
+#define  TPG_CFA_PAT_SHIFT 4U
+/*! Slice: tpg_img_num:*/
+#define  TPG_IMG_NUM
+#define  TPG_IMG_NUM_MASK 0x0000000EU
+#define  TPG_IMG_NUM_SHIFT 1U
+/*! Slice: tpg_frame_num:*/
+#define  TPG_FRAME_NUM
+#define  TPG_FRAME_NUM_MASK 0xFFFF0000U
+#define  TPG_FRAME_NUM_SHIFT 16U
+/*! Slice: tpg_enable:*/
+#define  TPG_ENABLE
+#define  TPG_ENABLE_MASK 0x00000001U
+#define  TPG_ENABLE_SHIFT 0U
+/*! Register: isp_tpg_total_in  (0x00000704)*/
+/*! Slice: tpg_htotal_in:*/
+#define  TPG_HTOTAL_IN
+#define  TPG_HTOTAL_IN_MASK 0x0FFFC000U
+#define  TPG_HTOTAL_IN_SHIFT 14U
+/*! Slice: tpg_vtotal_in:*/
+#define  TPG_VTOTAL_IN
+#define  TPG_VTOTAL_IN_MASK 0x00003FFFU
+#define  TPG_VTOTAL_IN_SHIFT 0U
+/*! Register: isp_tpg_act_in  (0x00000708)*/
+/*! Slice: tpg_hact_in:*/
+#define  TPG_HACT_IN
+#define  TPG_HACT_IN_MASK 0x0FFFC000U
+#define  TPG_HACT_IN_SHIFT 14U
+/*! Slice: tpg_vact_in:*/
+#define  TPG_VACT_IN
+#define  TPG_VACT_IN_MASK 0x00003FFFU
+#define  TPG_VACT_IN_SHIFT 0U
+/*! Register: isp_tpg_fp_in  (0x0000070C)*/
+/*! Slice: tpg_fp_h_in:*/
+#define  TPG_FP_H_IN
+#define  TPG_FP_H_IN_MASK 0x0FFFC000U
+#define  TPG_FP_H_IN_SHIFT 14U
+/*! Slice: tpg_fp_v_in:*/
+#define  TPG_FP_V_IN
+#define  TPG_FP_V_IN_MASK 0x00003FFFU
+#define  TPG_FP_V_IN_SHIFT 0U
+/*! Register: isp_tpg_bp_in  (0x00000710)*/
+/*! Slice: tpg_bp_h_in:*/
+#define  TPG_BP_H_IN
+#define  TPG_BP_H_IN_MASK 0x0FFFC000U
+#define  TPG_BP_H_IN_SHIFT 14U
+/*! Slice: tpg_bp_v_in:*/
+#define  TPG_BP_V_IN
+#define  TPG_BP_V_IN_MASK 0x00003FFFU
+#define  TPG_BP_V_IN_SHIFT 0U
+/*! Register: isp_tpg_w_in  (0x00000714)*/
+/*! Slice: tpg_hs_w_in:*/
+#define  TPG_HS_W_IN
+#define  TPG_HS_W_IN_MASK 0x0FFFC000U
+#define  TPG_HS_W_IN_SHIFT 14U
+/*! Slice: tpg_vs_w_in:*/
+#define  TPG_VS_W_IN
+#define  TPG_VS_W_IN_MASK 0x00003FFFU
+#define  TPG_VS_W_IN_SHIFT 0U
+/*! Register: isp_tpg_gap_in  (0x00000718)*/
+/*! Slice: tpg_pix_gap_in:*/
+#define  TPG_PIX_GAP_IN
+#define  TPG_PIX_GAP_IN_MASK 0x0FFFC000U
+#define  TPG_PIX_GAP_IN_SHIFT 14U
+/*! Slice: tpg_line_gap_in:*/
+#define  TPG_LINE_GAP_IN
+#define  TPG_LINE_GAP_IN_MASK 0x00003FFFU
+#define  TPG_LINE_GAP_IN_SHIFT 0U
+/*! Register: isp_tpg_gap_std_in  (0x0000071C)*/
+/*! Slice: tpg_pix_gap_std_in:*/
+#define  TPG_PIX_GAP_STD_IN
+#define  TPG_PIX_GAP_STD_IN_MASK 0x00003FFFU
+#define  TPG_PIX_GAP_STD_IN_SHIFT 0U
+/*! Register: isp_tpg_random_seed  (0x00000720)*/
+/*! Slice: tpg_random_seed:*/
+#define  TPG_RANDOM_SEED
+#define  TPG_RANDOM_SEED_MASK 0xFFFFFFFFU
+#define  TPG_RANDOM_SEED_SHIFT 0U
+/* MCM */
+/*! Register: mcm_ctrl  (0x00001200)*/
+/*! Slice: MCM_SENSOR_MEM_BYPASS:*/
+#define  MCM_SENSOR_MEM_BYPASS
+#define  MCM_SENSOR_MEM_BYPASS_MASK 0x00020000U
+#define  MCM_SENSOR_MEM_BYPASS_SHIFT 17U
+/*! Slice: MCM_G2_WR1_FMT:*/
+#define  MCM_G2_WR1_FMT
+#define  MCM_G2_WR1_FMT_MASK 0x0001C000U
+#define  MCM_G2_WR1_FMT_SHIFT 14U
+/*! Slice: MCM_G2_WR0_FMT:*/
+#define  MCM_G2_WR0_FMT
+#define  MCM_G2_WR0_FMT_MASK 0x00003800U
+#define  MCM_G2_WR0_FMT_SHIFT 11U
+/*! Slice: MCM_WR1_FMT:*/
+#define  MCM_WR1_FMT
+#define  MCM_WR1_FMT_MASK 0x00000700U
+#define  MCM_WR1_FMT_SHIFT 8U
+/*! Slice: MCM_WR0_FMT:*/
+#define  MCM_WR0_FMT
+#define  MCM_WR0_FMT_MASK 0x000000E0U
+#define  MCM_WR0_FMT_SHIFT 5U
+/*! Slice: MCM_BYPASS_SWITCH:*/
+#define  MCM_BYPASS_SWITCH
+#define  MCM_BYPASS_SWITCH_MASK 0x0000001EU
+#define  MCM_BYPASS_SWITCH_SHIFT 1U
+/*! Slice: MCM_BYPASS_EN:*/
+#define  MCM_BYPASS_EN
+#define  MCM_BYPASS_EN_MASK 0x00000001U
+#define  MCM_BYPASS_EN_SHIFT 0U
+/*! Register: mcm_size0  (0x00001204)*/
+/*! Slice: MCM_HEIGHT0:*/
+#define  MCM_HEIGHT0
+#define  MCM_HEIGHT0_MASK 0x3FFF0000U
+#define  MCM_HEIGHT0_SHIFT 16U
+/*! Slice: MCM_WIDTH0:*/
+#define  MCM_WIDTH0
+#define  MCM_WIDTH0_MASK 0x00003FFFU
+#define  MCM_WIDTH0_SHIFT 0U
+/*! Register: mcm_size1  (0x00001208)*/
+/*! Slice: MCM_HEIGHT1:*/
+#define  MCM_HEIGHT1
+#define  MCM_HEIGHT1_MASK 0x3FFF0000U
+#define  MCM_HEIGHT1_SHIFT 16U
+/*! Slice: MCM_WIDTH1:*/
+#define  MCM_WIDTH1
+#define  MCM_WIDTH1_MASK 0x00003FFFU
+#define  MCM_WIDTH1_SHIFT 0U
+/*! Register: mcm_rd_cfg  (0x00001280)*/
+/*! Slice: MCM_RD_FMT:*/
+#define  MCM_RD_FMT
+#define  MCM_RD_FMT_MASK 0x00000007U
+#define  MCM_RD_FMT_SHIFT 0U
+/*! Register: mcm_retiming0  (0x00001284)*/
+/*! Slice: MCM_VSYNC_BLANK:*/
+#define  MCM_VSYNC_BLANK
+#define  MCM_VSYNC_BLANK_MASK 0xFFFFFF00U
+#define  MCM_VSYNC_BLANK_SHIFT 8U
+/*! Slice: MCM_VSYNC_DURATION:*/
+#define  MCM_VSYNC_DURATION
+#define  MCM_VSYNC_DURATION_MASK 0x000000FFU
+#define  MCM_VSYNC_DURATION_SHIFT 0U
+/*! Register: mcm_retiming1  (0x00001288)*/
+/*! Slice: MCM_HSYNC_BLANK:*/
+#define  MCM_HSYNC_BLANK
+#define  MCM_HSYNC_BLANK_MASK 0xFFFFFF00U
+#define  MCM_HSYNC_BLANK_SHIFT 8U
+/*! Slice: MCM_HSYNC_PREAMPLE:*/
+#define  MCM_HSYNC_PREAMPLE
+#define  MCM_HSYNC_PREAMPLE_MASK 0x000000FFU
+#define  MCM_HSYNC_PREAMPLE_SHIFT 0U
+/*! Register: mcm_hsync_preample_ext  (0x0000128c)*/
+/*! Slice: MCM_HSYNC_PREAMPLE_EXT:*/
+#define  MCM_HSYNC_PREAMPLE_EXT
+#define  MCM_HSYNC_PREAMPLE_EXT_MASK 0x000FFFFFU
+#define  MCM_HSYNC_PREAMPLE_EXT_SHIFT 0U
+/*! Register: mcm_wr_retiming0  (0x00001290)*/
+/*! Slice: MCM_WR_VSYNC_BLANK:*/
+#define  MCM_WR_VSYNC_BLANK
+#define  MCM_WR_VSYNC_BLANK_MASK 0xFFFFFF00U
+#define  MCM_WR_VSYNC_BLANK_SHIFT 8U
+/*! Slice: MCM_WR_VSYNC_DURATION:*/
+#define  MCM_WR_VSYNC_DURATION
+#define  MCM_WR_VSYNC_DURATION_MASK 0x000000FFU
+#define  MCM_WR_VSYNC_DURATION_SHIFT 0U
+/*! Register: mcm_wr_retiming1  (0x00001294)*/
+/*! Slice: MCM_WR_HSYNC_BLANK:*/
+#define  MCM_WR_HSYNC_BLANK
+#define  MCM_WR_HSYNC_BLANK_MASK 0xFFFFFF00U
+#define  MCM_WR_HSYNC_BLANK_SHIFT 8U
+/*! Slice: MCM_WR_HSYNC_PREAMPLE:*/
+#define  MCM_WR_HSYNC_PREAMPLE
+#define  MCM_WR_HSYNC_PREAMPLE_MASK 0x000000FFU
+#define  MCM_WR_HSYNC_PREAMPLE_SHIFT 0U
+
+/*Stitching */
+/*!Register: isp_stitching_ctrl   (0x00003300) */
+/*!Register: isp_stitching_ctrl   (0x00003300) */
+/*!Slice: regs_inform_en */
+#define STITCHING_REGS_INFORM_EN
+#define STITCHING_REGS_INFORM_EN_MASK 0x00400000U
+#define STITCHING_REGS_INFORM_EN_SHIFT 22U
+/*!Slice: vsync_pol */
+#define STITCHING_VSYNC_POL
+#define STITCHING_VSYNC_POL_MASK 0x00200000U
+#define STITCHING_VSYNC_POL_SHIFT 21U
+/*!Slice: hsync_pol */
+#define STITCHING_HSYNC_POL
+#define STITCHING_HSYNC_POL_MASK 0x00100000U
+#define STITCHING_HSYNC_POL_SHIFT 20U
+/*!Slice: awb_gain_enable */
+#define STITCHING_AWB_GAIN_ENABLE
+#define STITCHING_AWB_GAIN_ENABLE_MASK 0x00080000U
+#define STITCHING_AWB_GAIN_ENABLE_SHIFT 19U
+/*!Slice: cfg_upd */
+#define STITCHING_CFG_UPD
+#define STITCHING_CFG_UPD_MASK 0x00040000U
+#define STITCHING_CFG_UPD_SHIFT 18U
+/*!Slice: gen_cfg_upd */
+#define STITCHING_GEN_CFG_UPD
+#define STITCHING_GEN_CFG_UPD_MASK 0x00020000U
+#define STITCHING_GEN_CFG_UPD_SHIFT 17U
+/*!Slice: gen_cfg_upd_fix */
+#define STITCHING_GEN_CFG_UPD_FIX
+#define STITCHING_GEN_CFG_UPD_FIX_MASK 0x00010000U
+#define STITCHING_GEN_CFG_UPD_FIX_SHIFT 16U
+/*!Slice: bypass_select */
+#define STITCHING_BYPASS_SELECT
+#define STITCHING_BYPASS_SELECT_MASK 0x00006000U
+#define STITCHING_BYPASS_SELECT_SHIFT 13U
+/*!Slice: linear_combine_enable */
+#define STITCHING_LINEAR_COMBINE_ENABLE
+#define STITCHING_LINEAR_COMBINE_ENABLE_MASK 0x00001000U
+#define STITCHING_LINEAR_COMBINE_ENABLE_SHIFT 12U
+/*!Slice: base_frame_selection */
+#define STITCHING_BASE_FRAME_SELECTION
+#define STITCHING_BASE_FRAME_SELECTION_MASK 0x00000800U
+#define STITCHING_BASE_FRAME_SELECTION_SHIFT 11U
+/*!Slice: combination_mode */
+#define STITCHING_COMBINATION_MODE
+#define STITCHING_COMBINATION_MODE_MASK 0x00000600U
+#define STITCHING_COMBINATION_MODE_SHIFT 9U
+/*!Slice: channel_config_bit */
+#define STITCHING_CHANNEL_CONFIG_BIT
+#define STITCHING_CHANNEL_CONFIG_BIT_MASK 0x00000100U
+#define STITCHING_CHANNEL_CONFIG_BIT_SHIFT 8U
+/*!Slice: B10_enable_bit */
+#define STITCHING_B10_ENABLE_BIT
+#define STITCHING_B10_ENABLE_BIT_MASK 0x00000080U
+#define STITCHING_B10_ENABLE_BIT_SHIFT 7U
+/*!Slice: lin_enable_bit */
+#define STITCHING_LIN_ENABLE_BIT
+#define STITCHING_LIN_ENABLE_BIT_MASK 0x00000040U
+#define STITCHING_LIN_ENABLE_BIT_SHIFT 6U
+/*!Slice: VS_enable_bit */
+#define STITCHING_VS_ENABLE_BIT
+#define STITCHING_VS_ENABLE_BIT_MASK 0x00000020U
+#define STITCHING_VS_ENABLE_BIT_SHIFT 5U
+/*!Slice: bayer_pattern */
+#define STITCHING_BAYER_PATTERN
+#define STITCHING_BAYER_PATTERN_MASK 0x00000018U
+#define STITCHING_BAYER_PATTERN_SHIFT 3U
+/*!Slice: soft_reset_flag */
+#define STITCHING_SOFT_RESET_FLAG
+#define STITCHING_SOFT_RESET_FLAG_MASK 0x00000004U
+#define STITCHING_SOFT_RESET_FLAG_SHIFT 2U
+/*!Slice: mono_input_flag */
+#define STITCHING_MONO_INPUT_FLAG
+#define STITCHING_MONO_INPUT_FLAG_MASK 0x00000002U
+#define STITCHING_MONO_INPUT_FLAG_SHIFT 1U
+/*!Slice: combine_enable_bit */
+#define STITCHING_COMBINE_ENABLE_BIT
+#define STITCHING_COMBINE_ENABLE_BIT_MASK 0x00000001U
+#define STITCHING_COMBINE_ENABLE_BIT_SHIFT 0U
+/*!Slice: regs_inform_en */
+#define STITCHING_REGS_INFORM_EN
+#define STITCHING_REGS_INFORM_EN_MASK 0x00400000U
+#define STITCHING_REGS_INFORM_EN_SHIFT 22U
+/*!Slice: vsync_pol */
+#define STITCHING_VSYNC_POL
+#define STITCHING_VSYNC_POL_MASK 0x00200000U
+#define STITCHING_VSYNC_POL_SHIFT 21U
+/*!Slice: hsync_pol */
+#define STITCHING_HSYNC_POL
+#define STITCHING_HSYNC_POL_MASK 0x00100000U
+#define STITCHING_HSYNC_POL_SHIFT 20U
+/*!Slice: awb_gain_enable */
+#define STITCHING_AWB_GAIN_ENABLE
+#define STITCHING_AWB_GAIN_ENABLE_MASK 0x00080000U
+#define STITCHING_AWB_GAIN_ENABLE_SHIFT 19U
+/*!Slice: cfg_upd */
+#define STITCHING_CFG_UPD
+#define STITCHING_CFG_UPD_MASK 0x00040000U
+#define STITCHING_CFG_UPD_SHIFT 18U
+/*!Slice: gen_cfg_upd */
+#define STITCHING_GEN_CFG_UPD
+#define STITCHING_GEN_CFG_UPD_MASK 0x00020000U
+#define STITCHING_GEN_CFG_UPD_SHIFT 17U
+/*!Slice: gen_cfg_upd_fix */
+#define STITCHING_GEN_CFG_UPD_FIX
+#define STITCHING_GEN_CFG_UPD_FIX_MASK 0x00010000U
+#define STITCHING_GEN_CFG_UPD_FIX_SHIFT 16U
+/*!Slice: bypass_select */
+#define STITCHING_BYPASS_SELECT
+#define STITCHING_BYPASS_SELECT_MASK 0x00006000U
+#define STITCHING_BYPASS_SELECT_SHIFT 13U
+/*!Slice: linear_combine_enable */
+#define STITCHING_LINEAR_COMBINE_ENABLE
+#define STITCHING_LINEAR_COMBINE_ENABLE_MASK 0x00001000U
+#define STITCHING_LINEAR_COMBINE_ENABLE_SHIFT 12U
+/*!Slice: base_frame_selection */
+#define STITCHING_BASE_FRAME_SELECTION
+#define STITCHING_BASE_FRAME_SELECTION_MASK 0x00000800U
+#define STITCHING_BASE_FRAME_SELECTION_SHIFT 11U
+/*!Slice: combination_mode */
+#define STITCHING_COMBINATION_MODE
+#define STITCHING_COMBINATION_MODE_MASK 0x00000600U
+#define STITCHING_COMBINATION_MODE_SHIFT 9U
+/*!Slice: channel_config_bit */
+#define STITCHING_CHANNEL_CONFIG_BIT
+#define STITCHING_CHANNEL_CONFIG_BIT_MASK 0x00000100U
+#define STITCHING_CHANNEL_CONFIG_BIT_SHIFT 8U
+/*!Slice: B10_enable_bit */
+#define STITCHING_B10_ENABLE_BIT
+#define STITCHING_B10_ENABLE_BIT_MASK 0x00000080U
+#define STITCHING_B10_ENABLE_BIT_SHIFT 7U
+/*!Slice: lin_enable_bit */
+#define STITCHING_LIN_ENABLE_BIT
+#define STITCHING_LIN_ENABLE_BIT_MASK 0x00000040U
+#define STITCHING_LIN_ENABLE_BIT_SHIFT 6U
+/*!Slice: VS_enable_bit */
+#define STITCHING_VS_ENABLE_BIT
+#define STITCHING_VS_ENABLE_BIT_MASK 0x00000020U
+#define STITCHING_VS_ENABLE_BIT_SHIFT 5U
+/*!Slice: bayer_pattern */
+#define STITCHING_BAYER_PATTERN
+#define STITCHING_BAYER_PATTERN_MASK 0x00000018U
+#define STITCHING_BAYER_PATTERN_SHIFT 3U
+/*!Slice: soft_reset_flag */
+#define STITCHING_SOFT_RESET_FLAG
+#define STITCHING_SOFT_RESET_FLAG_MASK 0x00000004U
+#define STITCHING_SOFT_RESET_FLAG_SHIFT 2U
+/*!Slice: mono_input_flag */
+#define STITCHING_MONO_INPUT_FLAG
+#define STITCHING_MONO_INPUT_FLAG_MASK 0x00000002U
+#define STITCHING_MONO_INPUT_FLAG_SHIFT 1U
+/*!Slice: combine_enable_bit */
+#define STITCHING_COMBINE_ENABLE_BIT
+#define STITCHING_COMBINE_ENABLE_BIT_MASK 0x00000001U
+#define STITCHING_COMBINE_ENABLE_BIT_SHIFT 0U
+/*!Register: isp_stitching_frame_width   (0x00003304) */
+/*!Slice: stitching_frame_width */
+#define STITCHING_FRAME_WIDTH
+#define STITCHING_FRAME_WIDTH_MASK 0x00003FFFU
+#define STITCHING_FRAME_WIDTH_SHIFT 0U
+/*!Register: isp_stitching_ctrl   (0x00003300)*/
+/*!Slice: digital_gain_en_2 */
+#define STITCHING_DIGITAL_GAIN_EN2
+#define STITCHING_DIGITAL_GAIN_EN2_MASK 0x02000000U
+#define STITCHING_DIGITAL_GAIN_EN2_SHIFT 25U
+/*!Register: isp_stitching_ctrl   (0x00003300)*/
+/*!Slice: digital_gain_en_1 */
+#define STITCHING_DIGITAL_GAIN_EN1
+#define STITCHING_DIGITAL_GAIN_EN1_MASK 0x01000000U
+#define STITCHING_DIGITAL_GAIN_EN1_SHIFT 24U
+/*!Register: isp_stitching_ctrl   (0x00003300)*/
+/*!Slice: digital_gain_en_0 */
+#define STITCHING_DIGITAL_GAIN_EN0
+#define STITCHING_DIGITAL_GAIN_EN0_MASK 0x00800000U
+#define STITCHING_DIGITAL_GAIN_EN0_SHIFT 23U
+/*!Register: isp_stitching_ctrl   (0x00003300)*/
+/*!Slice: digital_gain_en */
+#define STITCHING_DIGITAL_GAIN_EN
+#define STITCHING_DIGITAL_GAIN_EN_MASK 0x00400000U
+#define STITCHING_DIGITAL_GAIN_EN_SHIFT 22U
+/*!Register: isp_stitching_frame_height   (0x00003308) */
+/*!Slice: stitching_frame_height */
+#define STITCHING_FRAME_HEIGHT
+#define STITCHING_FRAME_HEIGHT_MASK 0x00003FFFU
+#define STITCHING_FRAME_HEIGHT_SHIFT 0U
+/*Register: isp_stitching_exposure_bit    (0x0000330C) */
+/*!Slice: stitching_l_bit_depth */
+#define STITCHING_L_BIT_DEPTH
+#define STITCHING_L_BIT_DEPTH_MASK 0xFF000000U
+#define STITCHING_L_BIT_DEPTH_SHIFT 24U
+/*!Slice: stitching_s_bit_depth */
+#define STITCHING_S_BIT_DEPTH
+#define STITCHING_S_BIT_DEPTH_MASK 0x00FF0000U
+#define STITCHING_S_BIT_DEPTH_SHIFT 16U
+/*!Slice: stitching_vs_bit_depth */
+#define STITCHING_VS_BIT_DEPTH
+#define STITCHING_VS_BIT_DEPTH_MASK 0x0000FF00U
+#define STITCHING_VS_BIT_DEPTH_SHIFT 8U
+/*!Slice: stitching_ls_bit_depth */
+#define STITCHING_LS_BIT_DEPTH
+#define STITCHING_LS_BIT_DEPTH_MASK 0x000000FFU
+#define STITCHING_LS_BIT_DEPTH_SHIFT 0U
+/*!Register: isp_stitching_color_weight */
+/*!Slice: stitching_color_weight_2 */
+#define STITCHING_COLOR_WEIGHT_2
+#define STITCHING_COLOR_WEIGHT_2_MASK 0x00FF0000U
+#define STITCHING_COLOR_WEIGHT_2_SHIFT 16U
+/*!Slice: stitching_color_weight_1 */
+#define STITCHING_COLOR_WEIGHT_1
+#define STITCHING_COLOR_WEIGHT_1_MASK 0x0000FF00U
+#define STITCHING_COLOR_WEIGHT_1_SHIFT 8U
+/*!Slice: stitching_color_weight_0 */
+#define STITCHING_COLOR_WEIGHT_0
+#define STITCHING_COLOR_WEIGHT_0_MASK 0x000000FFU
+#define STITCHING_COLOR_WEIGHT_0_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_0_a    (0x00003314)*/
+/*!Slice: stitching_digital_gain_exp_0_r */
+#define STITCHING_DIGITAL_GAIN_EXP_0_R
+#define STITCHING_DIGITAL_GAIN_EXP_0_R_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_0_R_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_0_a    (0x00003314)*/
+/*!Slice: stitching_bls_exp_0_a */
+#define STITCHING_BLS_EXP_0_A
+#define STITCHING_BLS_EXP_0_A_MASK 0x000000FFFU
+#define STITCHING_BLS_EXP_0_A_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_0_b    (0x00003318)*/
+/*!Slice: stitching_digital_gain_exp_0_g */
+#define STITCHING_DIGITAL_GAIN_EXP_0_G
+#define STITCHING_DIGITAL_GAIN_EXP_0_G_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_0_G_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_0_b    (0x00003318)*/
+/*!Slice: stitching_bls_exp_0_b */
+#define STITCHING_BLS_EXP_0_B
+#define STITCHING_BLS_EXP_0_B_MASK 0x000000FFFU
+#define STITCHING_BLS_EXP_0_B_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_0_c    (0x0000331c)*/
+/*!Slice: stitching_digital_gain_exp_0_gr */
+#define STITCHING_DIGITAL_GAIN_EXP_0_GR
+#define STITCHING_DIGITAL_GAIN_EXP_0_GR_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_0_GR_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_0_c     (0x0000331C)*/
+/*!Slice: stitching_bls_exp_0_c */
+#define STITCHING_BLS_EXP_0_C
+#define STITCHING_BLS_EXP_0_C_MASK 0x000000FFFU
+#define STITCHING_BLS_EXP_0_C_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_0_d    (0x00003320)*/
+/*!Slice: stitching_digital_gain_exp_0_gb */
+#define STITCHING_DIGITAL_GAIN_EXP_0_GB
+#define STITCHING_DIGITAL_GAIN_EXP_0_GB_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_0_GB_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_0_d     (0x00003320)*/
+/*!Slice: stitching_bls_exp_0_d */
+#define STITCHING_BLS_EXP_0_D
+#define STITCHING_BLS_EXP_0_D_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_0_D_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_1_a    (0x00003324)*/
+/*!Slice: stitching_digital_gain_exp_1_r */
+#define STITCHING_DIGITAL_GAIN_EXP_1_R
+#define STITCHING_DIGITAL_GAIN_EXP_1_R_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_1_R_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_1_a     (0x00003324)*/
+/*!Slice: stitching_bls_exp_1_a */
+#define STITCHING_BLS_EXP_1_A
+#define STITCHING_BLS_EXP_1_A_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_1_A_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_1_b    (0x00003328)*/
+/*!Slice: stitching_digital_gain_exp_1_g */
+#define STITCHING_DIGITAL_GAIN_EXP_1_G
+#define STITCHING_DIGITAL_GAIN_EXP_1_G_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_1_G_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_1_b     (0x00003328)*/
+/*!Slice: stitching_bls_exp_1_b */
+#define STITCHING_BLS_EXP_1_B
+#define STITCHING_BLS_EXP_1_B_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_1_B_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_1_c   (0x0000332c)*/
+/*!Slice: stitching_digital_gain_exp_1_gr */
+#define STITCHING_DIGITAL_GAIN_EXP_1_GR
+#define STITCHING_DIGITAL_GAIN_EXP_1_GR_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_1_GR_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_1_c      (0x0000332C)*/
+/*!Slice: stitching_bls_exp_1_c */
+#define STITCHING_BLS_EXP_1_C
+#define STITCHING_BLS_EXP_1_C_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_1_C_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_1_d    (0x00003330)*/
+/*!Slice: stitching_digital_gain_exp_1_gb */
+#define STITCHING_DIGITAL_GAIN_EXP_1_GB
+#define STITCHING_DIGITAL_GAIN_EXP_1_GB_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_1_GB_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_1_d      (0x00003330)*/
+/*!Slice: stitching_bls_exp_1_d */
+#define STITCHING_BLS_EXP_1_D
+#define STITCHING_BLS_EXP_1_D_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_1_D_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_2_a    (0x00003334)*/
+/*!Slice: stitching_digital_gain_exp_2_r */
+#define STITCHING_DIGITAL_GAIN_EXP_2_R
+#define STITCHING_DIGITAL_GAIN_EXP_2_R_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_2_R_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_2_a      (0x00003334)*/
+/*!Slice: stitching_bls_exp_2_a */
+#define STITCHING_BLS_EXP_2_A
+#define STITCHING_BLS_EXP_2_A_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_2_A_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_2_b    (0x00003338)*/
+/*!Slice: stitching_digital_gain_exp_2_g */
+#define STITCHING_DIGITAL_GAIN_EXP_2_G
+#define STITCHING_DIGITAL_GAIN_EXP_2_G_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_2_G_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_2_b      (0x00003338)*/
+/*!Slice: stitching_bls_exp_2_b */
+#define STITCHING_BLS_EXP_2_B
+#define STITCHING_BLS_EXP_2_B_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_2_B_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_2_c    (0x0000333c)*/
+/*!Slice: stitching_digital_gain_exp_2_gr */
+#define STITCHING_DIGITAL_GAIN_EXP_2_GR
+#define STITCHING_DIGITAL_GAIN_EXP_2_GR_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_2_GR_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_2_c       (0x0000333C)*/
+/*!Slice: stitching_bls_exp_2_c */
+#define STITCHING_BLS_EXP_2_C
+#define STITCHING_BLS_EXP_2_C_MASK 0x0000FFFU
+#define STITCHING_BLS_EXP_2_C_SHIFT 0U
+/*!Register: isp_stitching_bls_exp_2_d    (0x00003340)*/
+/*!Slice: stitching_digital_gain_exp_2_gb */
+#define STITCHING_DIGITAL_GAIN_EXP_2_GB
+#define STITCHING_DIGITAL_GAIN_EXP_2_GB_MASK 0XFFFFF0000U
+#define STITCHING_DIGITAL_GAIN_EXP_2_GB_SHIFT 16U
+/*!Register: isp_stitching_bls_exp_2_d        (0x00003340)*/
+/*!Slice: stitching_bls_exp_2_d */
+#define STITCHING_BLS_EXP_2_D
+#define STITCHING_BLS_EXP_2_D_MASK 0x000000FFFU
+#define STITCHING_BLS_EXP_2_D_SHIFT 0U
+/*!Reister: isp_stitching_ratio_ls     (0x00003344)*/
+/*!Slice: stitching_ratio_long_short_1 */
+#define STITCHING_RATIO_LONG_SHORT_1
+#define STITCHING_RATIO_LONG_SHORT_1_MASK 0x00FFF000U
+#define STITCHING_RATIO_LONG_SHORT_1_SHIFT 12U
+/*!Slice: stitching_ratio_long_short_0 */
+#define STITCHING_RATIO_LONG_SHORT_0
+#define STITCHING_RATIO_LONG_SHORT_0_MASK 0x00000FFFU
+#define STITCHING_RATIO_LONG_SHORT_0_SHIFT 0U
+/*!Reister: isp_stitching_ratio_vs     (0x00003348) */
+/*!Slice: stitching_ratio_veryshort_short_1 */
+#define STITCHING_RATIO_VERYSHORT_SHORT_1
+#define STITCHING_RATIO_VERYSHORT_SHORT_1_MASK 0x00FFF000U
+#define STITCHING_RATIO_VERYSHORT_SHORT_1_SHIFT 12U
+/*!Slice: stitching_ratio_veryshort_short_0 */
+#define STITCHING_RATIO_VERYSHORT_SHORT_0
+#define STITCHING_RATIO_VERYSHORT_SHORT_0_MASK 0x00000FFFU
+#define STITCHING_RATIO_VERYSHORT_SHORT_0_SHIFT 0U
+/*!Reister: isp_stitching_ratio_ls_shd     (0x0000334C) */
+/*!Slice: stitching_ratio_long_short_shd_1 */
+#define STITCHING_RATIO_LONG_SHORT_SHD_1
+#define STITCHING_RATIO_LONG_SHORT_SHD_1_MASK 0x00FFF000U
+#define STITCHING_RATIO_LONG_SHORT_SHD_1_SHIFT 12U
+/*!Slice: stitching_ratio_long_short_shd_0 */
+#define STITCHING_RATIO_LONG_SHORT_SHD_0
+#define STITCHING_RATIO_LONG_SHORT_SHD_0_MASK 0x00000FFFU
+#define STITCHING_RATIO_LONG_SHORT_SHD_0_SHIFT 0U
+/*!Reister: isp_stitching_ratio_vs_shd     (0x00003350) */
+/*!Slice: stitching_ratio_veryshort_short_shd_1 */
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_1
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_1_MASK 0x00FFF000U
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_1_SHIFT 12U
+/*!Slice: stitching_ratio_veryshort_short_shd_0 */
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_0
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_0_MASK 0x00000FFFU
+#define STITCHING_RATIO_VERYSHORT_SHORT_SHD_0_SHIFT 0U
+/*!Register: isp_sitching_trans_range_linear     (0x00003354) */
+/*!Slice: stitching_trans_range_start_linear */
+#define STITCHING_TRANS_RANGE_START_LINEAR
+#define STITCHING_TRANS_RANGE_START_LINEAR_MASK 0xFFFF0000U
+#define STITCHING_TRANS_RANGE_START_LINEAR_SHIFT 16U
+/*!Slice:stitching_trans_range_norm_factor_mul_linear */
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_LINEAR
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_LINEAR_MASK 0x0000FFFFU
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_LINEAR_SHIFT 0U
+/*!Register: isp_sitching_trans_range_nonlinear     (0x00003358) */
+/*!Slice: stitching_trans_range_start_nonlinear */
+#define STITCHING_TRANS_RANGE_START_NONLINEAR
+#define STITCHING_TRANS_RANGE_START_NONLINEAR_MASK 0xFFFF0000U
+#define STITCHING_TRANS_RANGE_START_NONLINEAR_SHIFT 16U
+/*!Slice:stitching_trans_range_norm_factor_mul_nonlinear */
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_NONLINEAR
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_NONLINEAR_MASK 0x0000FFFFU
+#define STITCHING_TRANS_RANGE_NORM_FACTOR_MUL_NONLINEAR_SHIFT 0U
+/*!Register: isp_stitching_sat_level     (0x0000335C) */
+//Version-11 Stitching only support one type extend bit
+//!Slice: stitching_short_vs_extend_bit
+#define STITCHING_SHORT_EXTEND_BIT
+#define STITCHING_SHORT_EXTEND_BIT_MASK 0xFF000000U
+#define STITCHING_SHORT_EXTEND_BIT_SHIFT 24U
+//Version-12 Stitching support two type extend bit
+//!Slice: stitching_short_ls_extend_bit
+#define STITCHING_SHORT_LS_EXTEND_BIT
+#define STITCHING_SHORT_LS_EXTEND_BIT_MASK 0xF0000000U
+#define STITCHING_SHORT_LS_EXTEND_BIT_SHIFT 28U
+//!Slice: stitching_short_vs_extend_bit
+#define STITCHING_SHORT_VS_EXTEND_BIT
+#define STITCHING_SHORT_VS_EXTEND_BIT_MASK 0x0F000000U
+#define STITCHING_SHORT_VS_EXTEND_BIT_SHIFT 24U
+/*!Slice: stitching_veryshort_valid_thresh */
+#define STITCHING_VERYSHORT_VALID_THRESH
+#define STITCHING_VERYSHORT_VALID_THRESH_MASK 0x00FFF000U
+#define STITCHING_VERYSHORT_VALID_THRESH_SHIFT 12U
+/*!Slice: stitching_veryshort_offset_val */
+#define STITCHING_VERYSHORT_OFFSET_VAL
+#define STITCHING_VERYSHORT_OFFSET_VAL_MASK 0x00000FFFU
+#define STITCHING_VERYSHORT_OFFSET_VAL_SHIFT 0U
+/*!Register: isp_stitching_long_exposure        (0x00003360) */
+/*!Slice: stitching_long_exposure_time */
+#define STITCHING_LONG_EXPOSURE_TIME
+#define STITCHING_LONG_EXPOSURE_TIME_MASK 0x00000FFFU
+#define STITCHING_LONG_EXPOSURE_TIME_SHIFT 0U
+/*!Register: isp_stitching_short_exposure       (0x00003364) */
+/*!Slice: stitching_short_exposure_time */
+#define STITCHING_SHORT_EXPOSURE_TIME
+#define STITCHING_SHORT_EXPOSURE_TIME_MASK 0x00000FFFU
+#define STITCHING_SHORT_EXPOSURE_TIME_SHIFT 0U
+/*!Register: isp_stitching_very_short_exposure  (0x00003368) */
+/*!Slice: stitching_very_short_exposure_time */
+#define STITCHING_VERY_SHORT_EXPOSURE_TIME
+#define STITCHING_VERY_SHORT_EXPOSURE_TIME_MASK 0x00000FFFU
+#define STITCHING_VERY_SHORT_EXPOSURE_TIME_SHIFT 0U
+/*!Register: isp_stitching_hdr_mode     (0x0000336C) */
+/*!Slice: stitching_hdr_mode */
+#define STITCHING_HDR_MODE_BIT
+#define STITCHING_HDR_MODE_BIT_MASK 0x0000000FU
+#define STITCHING_HDR_MODE_BIT_SHIFT 0U
+/*!Register: isp_stitching_out_hblank     (0x00003370) */
+/*!Slice: stitching_dummy_s_hblank */
+#define STITCHING_DUMMY_S_HBLANK
+#define STITCHING_DUMMY_S_HBLANK_MASK 0xFFFF0000U
+#define STITCHING_DUMMY_S_HBLANK_SHIFT 16U
+/*!Slice: stitching_out_hblank */
+#define STITCHING_OUT_HBLANK
+#define STITCHING_OUT_HBLANK_MASK 0x00003FFFU
+#define STITCHING_OUT_HBLANK_SHIFT 0U
+/*!Register: isp_stitching_out_vblank     (0x00003374) */
+/*!Slice: stitching_dummy_vs_hblank */
+#define STITCHING_DUMMY_VS_HBLANK
+#define STITCHING_DUMMY_VS_HBLANK_MASK 0xFFFF0000U
+#define STITCHING_DUMMY_VS_HBLANK_SHIFT 16U
+/*!Slice: stitching_out_vblank */
+#define STITCHING_OUT_VBLANK
+#define STITCHING_OUT_VBLANK_MASK 0x00000FFFU
+#define STITCHING_OUT_VBLANK_SHIFT 0U
+/*!Register:ISP_STITCHING_OUT_HBLANK         (0x00003370)*/
+/* Slice:stiching_dummy_hblank */
+#define STITCHING_DUMMY_HBLANK
+#define STITCHING_DUMMY_HBLANK_MASK 0xFFFF0000U
+#define STITCHING_DUMMY_HBLANK_SHIFT 16U
+/*!Register: isp_stitching_interrupt_status     (0x00003378) */
+/*!Slice: stitching_interrupt_status */
+#define STITCHING_INTERRUPT_STATUS
+#define STITCHING_INTERRUPT_STATUS_MASK 0x00000007U
+#define STITCHING_INTERRUPT_STATUS_SHIFT 0U
+/*!Register: isp_stitching_compress_x0    (0x0000337C) */
+/*!Slice: stitching_compress_x0 */
+#define STITCHING_COMPRESS_X0
+#define STITCHING_COMPRESS_X0_MASK 0x000003FFU
+#define STITCHING_COMPRESS_X0_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_0    (0x000033A0) */
+/*!Slice: stitching_compress_lut_2 */
+#define STITCHING_COMPRESS_LUT_2
+#define STITCHING_COMPRESS_LUT_2_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_2_SHIFT 20U
+/*!Slice: stitching_compress_lut_1 */
+#define STITCHING_COMPRESS_LUT_1
+#define STITCHING_COMPRESS_LUT_1_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_1_SHIFT 10U
+/*!Slice: stitching_compress_lut_0 */
+#define STITCHING_COMPRESS_LUT_0
+#define STITCHING_COMPRESS_LUT_0_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_0_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_1     (0x000033A4) */
+/*!Slice: stitching_compress_lut_5 */
+#define STITCHING_COMPRESS_LUT_5
+#define STITCHING_COMPRESS_LUT_5_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_5_SHIFT 20U
+/*!Slice: stitching_compress_lut_4 */
+#define STITCHING_COMPRESS_LUT_4
+#define STITCHING_COMPRESS_LUT_4_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_4_SHIFT 10U
+/*!Slice: stitching_compress_lut_3 */
+#define STITCHING_COMPRESS_LUT_3
+#define STITCHING_COMPRESS_LUT_3_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_3_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_2     (0x000033A8) */
+/*!Slice: stitching_compress_lut_8 */
+#define STITCHING_COMPRESS_LUT_8
+#define STITCHING_COMPRESS_LUT_8_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_8_SHIFT 20U
+/*!Slice: stitching_compress_lut_7 */
+#define STITCHING_COMPRESS_LUT_7
+#define STITCHING_COMPRESS_LUT_7_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_7_SHIFT 10U
+/*!Slice: stitching_compress_lut_6 */
+#define STITCHING_COMPRESS_LUT_6
+#define STITCHING_COMPRESS_LUT_6_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_6_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_3     (0x000033AC) */
+/*!Slice: stitching_compress_lut_11 */
+#define STITCHING_COMPRESS_LUT_11
+#define STITCHING_COMPRESS_LUT_11_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_11_SHIFT 20U
+/*!Slice: stitching_compress_lut_10 */
+#define STITCHING_COMPRESS_LUT_10
+#define STITCHING_COMPRESS_LUT_10_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_10_SHIFT 10U
+/*!Slice: stitching_compress_lut_9 */
+#define STITCHING_COMPRESS_LUT_9
+#define STITCHING_COMPRESS_LUT_9_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_9_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_4     (0x000033B0) */
+/*!Slice: stitching_compress_lut_14 */
+#define STITCHING_COMPRESS_LUT_14
+#define STITCHING_COMPRESS_LUT_14_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_14_SHIFT 20U
+/*!Slice: stitching_compress_lut_13 */
+#define STITCHING_COMPRESS_LUT_13
+#define STITCHING_COMPRESS_LUT_13_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_13_SHIFT 10U
+/*!Slice: stitching_compress_lut_12 */
+#define STITCHING_COMPRESS_LUT_12
+#define STITCHING_COMPRESS_LUT_12_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_12_SHIFT 0U
+/*/*!Register: isp_stitching_compress_lut_shd_0     (0x000033B4) */
+/*!Slice: stitching_compress_lut_shd_2 */
+#define STITCHING_COMPRESS_LUT_SHD_2
+#define STITCHING_COMPRESS_LUT_SHD_2_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_SHD_2_SHIFT 20U
+/*!Slice: stitching_compress_lut_shd_1 */
+#define STITCHING_COMPRESS_LUT_SHD_1
+#define STITCHING_COMPRESS_LUT_SHD_1_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_SHD_1_SHIFT 10U
+/*!Slice: stitching_compress_lut_shd_0 */
+#define STITCHING_COMPRESS_LUT_SHD_0
+#define STITCHING_COMPRESS_LUT_SHD_0_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_SHD_0_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_shd_1     (0x000033B8) */
+/*!Slice: stitching_compress_lut_shd_5 */
+#define STITCHING_COMPRESS_LUT_SHD_5
+#define STITCHING_COMPRESS_LUT_SHD_5_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_SHD_5_SHIFT 20U
+/*!Slice: stitching_compress_lut_shd_4 */
+#define STITCHING_COMPRESS_LUT_SHD_4
+#define STITCHING_COMPRESS_LUT_SHD_4_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_SHD_4_SHIFT 10U
+/*!Slice: stitching_compress_lut_shd_3 */
+#define STITCHING_COMPRESS_LUT_SHD_3
+#define STITCHING_COMPRESS_LUT_SHD_3_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_SHD_3_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_shd_2     (0x000033BC) */
+/*!Slice: stitching_compress_lut_shd_8 */
+#define STITCHING_COMPRESS_LUT_SHD_8
+#define STITCHING_COMPRESS_LUT_SHD_8_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_SHD_8_SHIFT 20U
+/*!Slice: stitching_compress_lut_shd_7 */
+#define STITCHING_COMPRESS_LUT_SHD_7
+#define STITCHING_COMPRESS_LUT_SHD_7_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_SHD_7_SHIFT 10U
+/*!Slice: stitching_compress_lut_shd_6 */
+#define STITCHING_COMPRESS_LUT_SHD_6
+#define STITCHING_COMPRESS_LUT_SHD_6_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_SHD_6_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_shd_3     (0x000033C0) */
+/*!Slice: stitching_compress_lut_shd_11 */
+#define STITCHING_COMPRESS_LUT_SHD_11
+#define STITCHING_COMPRESS_LUT_SHD_11_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_SHD_11_SHIFT 20U
+/*!Slice: stitching_compress_lut_shd_10 */
+#define STITCHING_COMPRESS_LUT_SHD_10
+#define STITCHING_COMPRESS_LUT_SHD_10_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_SHD_10_SHIFT 10U
+/*!Slice: stitching_compress_lut_shd_9 */
+#define STITCHING_COMPRESS_LUT_SHD_9
+#define STITCHING_COMPRESS_LUT_SHD_9_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_SHD_9_SHIFT 0U
+/*!Register: isp_stitching_compress_lut_shd_4     (0x000033C4) */
+/*!Slice: stitching_compress_lut_shd_14 */
+#define STITCHING_COMPRESS_LUT_SHD_14
+#define STITCHING_COMPRESS_LUT_SHD_14_MASK 0x3FF00000U
+#define STITCHING_COMPRESS_LUT_SHD_14_SHIFT 20U
+/*!Slice: stitching_compress_lut_shd_13 */
+#define STITCHING_COMPRESS_LUT_SHD_13
+#define STITCHING_COMPRESS_LUT_SHD_13_MASK 0x000FFC00U
+#define STITCHING_COMPRESS_LUT_SHD_13_SHIFT 10U
+/*!Slice: stitching_compress_lut_shd_12 */
+#define STITCHING_COMPRESS_LUT_SHD_12
+#define STITCHING_COMPRESS_LUT_SHD_12_MASK 0x000003FFU
+#define STITCHING_COMPRESS_LUT_SHD_12_SHIFT 0U
+/*!Register:isp_stitching_exp0_awb_gain_g         (0x000033C8) */
+/*Slice:stiching_exp0_awb_gain_gr */
+#define STITCHING_EXP0_AWB_GAIN_GR
+#define STITCHING_EXP0_AWB_GAIN_GR_MASK 0x03FF0000U
+#define STITCHING_EXP0_AWB_GAIN_GR_SHIFT 16U
+/*Slice:stiching_exp0_awb_gain_gb */
+#define STITCHING_EXP0_AWB_GAIN_GB
+#define STITCHING_EXP0_AWB_GAIN_GB_MASK 0x000003FFU
+#define STITCHING_EXP0_AWB_GAIN_GB_SHIFT 0U
+/*Slice:stiching_exp0_awb_gain_r */
+#define STITCHING_EXP0_AWB_GAIN_R
+#define STITCHING_EXP0_AWB_GAIN_R_MASK 0x03FF0000U
+#define STITCHING_EXP0_AWB_GAIN_R_SHIFT 16U
+/*Slice:stiching_exp0_awb_gain_b */
+#define STITCHING_EXP0_AWB_GAIN_B
+#define STITCHING_EXP0_AWB_GAIN_B_MASK 0x000003FFU
+#define STITCHING_EXP0_AWB_GAIN_B_SHIFT 0U
+/*Slice:stiching_exp1_awb_gain_gr */
+#define STITCHING_EXP1_AWB_GAIN_GR
+#define STITCHING_EXP1_AWB_GAIN_GR_MASK 0x03FF0000U
+#define STITCHING_EXP1_AWB_GAIN_GR_SHIFT 16U
+/*Slice:stiching_exp1_awb_gain_gb */
+#define STITCHING_EXP1_AWB_GAIN_GB
+#define STITCHING_EXP1_AWB_GAIN_GB_MASK 0x000003FFU
+#define STITCHING_EXP1_AWB_GAIN_GB_SHIFT 0U
+/*Slice:stiching_exp1_awb_gain_r */
+#define STITCHING_EXP1_AWB_GAIN_R
+#define STITCHING_EXP1_AWB_GAIN_R_MASK 0x03FF0000U
+#define STITCHING_EXP1_AWB_GAIN_R_SHIFT 16U
+/*Slice:stiching_exp1_awb_gain_b */
+#define STITCHING_EXP1_AWB_GAIN_B
+#define STITCHING_EXP1_AWB_GAIN_B_MASK 0x000003FFU
+#define STITCHING_EXP1_AWB_GAIN_B_SHIFT 0U
+/*Slice:stiching_exp2_awb_gain_gr */
+#define STITCHING_EXP2_AWB_GAIN_GR
+#define STITCHING_EXP2_AWB_GAIN_GR_MASK 0x03FF0000U
+#define STITCHING_EXP2_AWB_GAIN_GR_SHIFT 16U
+/*Slice:stiching_exp2_awb_gain_gb */
+#define STITCHING_EXP2_AWB_GAIN_GB
+#define STITCHING_EXP2_AWB_GAIN_GB_MASK 0x000003FFU
+#define STITCHING_EXP2_AWB_GAIN_GB_SHIFT 0U
+/*Slice:stiching_exp0_awb_gain_r */
+#define STITCHING_EXP2_AWB_GAIN_R
+#define STITCHING_EXP2_AWB_GAIN_R_MASK 0x03FF0000U
+#define STITCHING_EXP2_AWB_GAIN_R_SHIFT 16U
+/*Slice:stiching_exp0_awb_gain_b */
+#define STITCHING_EXP2_AWB_GAIN_B
+#define STITCHING_EXP2_AWB_GAIN_B_MASK 0x000003FFU
+#define STITCHING_EXP2_AWB_GAIN_B_SHIFT 0U
+/*Register: isp_stitching_long_sat_params */
+/*!Slice: stitching_long_sat_thresh */
+#define STITCHING_LONG_SAT_THRESH
+#define STITCHING_LONG_SAT_THRESH_MASK 0x00FFF000U
+#define STITCHING_LONG_SAT_THRESH_SHIFT 12U
+/*!Slice: stitching_long_sat_combine_weight */
+#define STITCHING_LONG_SAT_COMBINE_WEIGHT
+#define STITCHING_LONG_SAT_COMBINE_WEIGHT_MASK 0x000001FF
+#define STITCHING_LONG_SAT_COMBINE_WEIGHT_SHIFT 0U
+//!Register: isp_stitching_bls_exp_out_0                (0x000033F8)
+//! Slice: stitching_bls_exp_out_a:
+#define  STITCHING_BLS_EXP_OUT_A
+#define  STITCHING_BLS_EXP_OUT_A_MASK 0x0FFF0000U
+#define  STITCHING_BLS_EXP_OUT_A_SHIFT 16U
+//! Slice: stitching_bls_exp_out_b:
+#define  STITCHING_BLS_EXP_OUT_B
+#define  STITCHING_BLS_EXP_OUT_B_MASK 0x00000FFFU
+#define  STITCHING_BLS_EXP_OUT_B_SHIFT 0U
+//!Register: isp_stitching_bls_exp_out_1                (0x000033FC)
+//! Slice: stitching_bls_exp_out_c:
+#define  STITCHING_BLS_EXP_OUT_C
+#define  STITCHING_BLS_EXP_OUT_C_MASK 0x0FFF0000U
+#define  STITCHING_BLS_EXP_OUT_C_SHIFT 16U
+//! Slice: stitching_bls_exp_out_d:
+#define  STITCHING_BLS_EXP_OUT_D
+#define  STITCHING_BLS_EXP_OUT_D_MASK 0x00000FFFU
+#define  STITCHING_BLS_EXP_OUT_D_SHIFT 0U
+
+/*! Slice: ISP_STITCHING0_EXP_IMSC:*/
+#define STITCHING_MIS_HDR_EXP_COMPLETE_L
+#define STITCHING_MIS_HDR_EXP_COMPLETE_L_MASK 0x00000008U
+#define STITCHING_MIS_HDR_EXP_COMPLETE_L_SHIFT 3U
+#define STITCHING_MIS_HDR_EXP_COMPLETE_S
+#define STITCHING_MIS_HDR_EXP_COMPLETE_S_MASK 0x00000010U
+#define STITCHING_MIS_HDR_EXP_COMPLETE_S_SHIFT 4U
+#define STITCHING_MIS_HDR_EXP_COMPLETE_VS
+#define STITCHING_MIS_HDR_EXP_COMPLETE_VS_MASK 0x00000020U
+#define STITCHING_MIS_HDR_EXP_COMPLETE_VS_SHIFT 5U
+
+/*! Slice: ISP_STITCHING0_HIST_MIS:*/
+#define STITCHING_MIS_HDR_HIST_COMPLETE_VS
+#define STITCHING_MIS_HDR_HIST_COMPLETE_VS_MASK 0x00000100U
+#define STITCHING_MIS_HDR_HIST_COMPLETE_VS_SHIFT 8U
+#define STITCHING_MIS_HDR_HIST_COMPLETE_S
+#define STITCHING_MIS_HDR_HIST_COMPLETE_S_MASK 0x00000080U
+#define STITCHING_MIS_HDR_HIST_COMPLETE_S_SHIFT 7U
+#define STITCHING_MIS_HDR_HIST_COMPLETE_L
+#define STITCHING_MIS_HDR_HIST_COMPLETE_L_MASK 0x00000040U
+#define STITCHING_MIS_HDR_HIST_COMPLETE_L_SHIFT 6U
+
+/*!Slice: 2DNR ENABLE */
+#define ISP_2DNR_ENABLE
+#define ISP_2DNR_ENABLE_MASK 0x00000001
+#define ISP_2DNR_ENABLE_SHIFT 0U
+/*!Slice: 2DNR PRGAMMA STRENGTH */
+#define ISP_2DNR_PRGAMMA_STRENGTH
+#define ISP_2DNR_PRGAMMA_STRENGTH_MASK 0x00003F80
+#define ISP_2DNR_PRGAMMA_STRENGTH_SHIFT 7U
+/*!Slice: 2DNR STRENGTH */
+#define ISP_2DNR_STRENGTH
+#define ISP_2DNR_STRENGTH_MASK 0x0000007F
+#define ISP_2DNR_STRENGTH_SHIFT 0U
+/*!Slice: 2DNR SIGMAY0 */
+#define ISP_2DNR_SIGMAY0
+#define ISP_2DNR_SIGMAY0_MASK 0x00000FFF
+#define ISP_2DNR_SIGMAY0_SHIFT 0U
+/*!Slice: 2DNR SIGMAY1 */
+#define ISP_2DNR_SIGMAY1
+#define ISP_2DNR_SIGMAY1_MASK 0x00FFF000
+#define ISP_2DNR_SIGMAY1_SHIFT 12U
+/*!Slice: 2DNR SIGMAY2A */
+#define ISP_2DNR_SIGMAY2A
+#define ISP_2DNR_SIGMAY2A_MASK 0x3F000000
+#define ISP_2DNR_SIGMAY2A_SHIFT 24U
+/*!Slice: 2DNR SIGMAY2B */
+#define ISP_2DNR_SIGMAY2B
+#define ISP_2DNR_SIGMAY2B_MASK 0x3F000000
+#define ISP_2DNR_SIGMAY2B_SHIFT 24U
+/*!Slice: 2DNR SIGMAY3 */
+#define ISP_2DNR_SIGMAY3
+#define ISP_2DNR_SIGMAY3_MASK 0x00000FFF
+#define ISP_2DNR_SIGMAY3_SHIFT 0U
+/*!Slice: 2DNR SIGMAY4 */
+#define ISP_2DNR_SIGMAY4
+#define ISP_2DNR_SIGMAY4_MASK 0x00FFF000
+#define ISP_2DNR_SIGMAY4_SHIFT 12U
+/*!Slice: 2DNR denoise2d_dummy_hblank */
+#define ISP_2DNR_DUMMY_HBLANK
+#define ISP_2DNR_DUMMY_HBLANK_MASK 0x0000FFFF
+#define ISP_2DNR_DUMMY_HBLANK_SHIFT 0U
+
+/*!Slice: 2DNR ISP_DENOISE3D2_BLENDING */
+#define DENOISE3D_V20_NLM_STRENGTH_OFFSET
+#define DENOISE3D_V20_NLM_STRENGTH_OFFSET_MASK 0X3FF80000
+#define DENOISE3D_V20_NLM_STRENGTH_OFFSET_SHIFT 19U
+
+/*!Slice: 2DNR ISP_DENOISE3D2_BLENDING */
+#define DENOISE3D_V20_NLM_STRENGTH_MAX
+#define DENOISE3D_V20_NLM_STRENGTH_MAX_MASK 0X0007ff00
+#define DENOISE3D_V20_NLM_STRENGTH_MAX_SHIFT 8U
+
+/*!Slice: 2DNR ISP_DENOISE3D2_BLENDING */
+#define DENOISE3D_V20_NLM_STRENGTH_SLOPE
+#define DENOISE3D_V20_NLM_STRENGTH_SLOPE_MASK 0X000000ff
+#define DENOISE3D_V20_NLM_STRENGTH_SLOPE_SHIFT 0U
+
+/* Register: ISP_DENOISE3D_CTRL 	0x00003700 */
+/* Slice: 10:10 denoise3d_read_ref_en */
+#define DENOISE3D_READ_REF_EN
+#define DENOISE3D_READ_REF_EN_MASK 0x00000400U
+#define DENOISE3D_READ_REF_EN_SHIFT 10U
+
+/* Slice: 9:9 denoise3d_raw_decompress_en */
+#define DENOISE3D_RAW_DECOMPRESS_EN
+#define DENOISE3D_RAW_DECOMPRESS_EN_MASK 0x00000200U
+#define DENOISE3D_RAW_DECOMPRESS_EN_SHIFT 9U
+
+/* Slice: 8:8 denoise3d_rew_compress_en */
+#define DENOISE3D_RAW_COMPRESS_EN
+#define DENOISE3D_RAW_COMPRESS_EN_MASK 0x00000100U
+#define DENOISE3D_RAW_COMPRESS_EN_SHIFT 8U
+
+/* Slice: 7:7 denoise3d_write_ref_en */
+#define DENOISE3D_WRITE_REF_EN
+#define DENOISE3D_WRITE_REF_EN_MASK 0x00000080U
+#define DENOISE3D_WRITE_REF_EN_SHIFT 7U
+/* Register: ISP_DENOISE3D_CTRL 	0x00003700 */
+/* Slice: 5:5 denoise3d_soft_reset */
+#define DENOISE3D_SOFT_RESET
+#define DENOISE3D_SOFT_RESET_MASK  0x00000020U
+#define DENOISE3D_SOFT_RESET_SHIFT 5U
+/* Slice: 4:4 denoise3d_horizontal_en */
+#define DENOISE3D_HORIZONTAL_EN
+#define DENOISE3D_HORIZONTAL_EN_MASK 0x00000010U
+#define DENOISE3D_HORIZONTAL_EN_SHIFT 4U
+/* Slice: 3:3 denoise3d_vertical_en */
+#define DENOISE3D_VERTICAL_EN
+#define DENOISE3D_VERTICAL_EN_MASK 0x00000008U
+#define DENOISE3D_VERTICAL_EN_SHIFT 3U
+/* Slice: 2:2 denoise3d_temperal_en */
+#define DENOISE3D_TEMPERAL_EN
+#define DENOISE3D_TEMPERAL_EN_MASK 0x00000004U
+#define DENOISE3D_TEMPERAL_EN_SHIFT 2U
+/* Slice: 1:1 denoise3d_dilate_en */
+#define DENOISE3D_DILATE_EN
+#define DENOISE3D_DILATE_EN_MASK 0x00000002U
+#define DENOISE3D_DILATE_EN_SHIFT 1U
+/* Slice: 0:0 denoise3d_enable */
+#define DENOISE3D_ENABLE
+#define DENOISE3D_ENABLE_MASK 0x00000001U
+#define DENOISE3D_ENABLE_SHIFT 0U
+/* Register: ISP_DENOISE3D_STRENGTH     0x00003704       */
+/* Slice: 29:19 denoise3d_update_temperal */
+#define DENOISE3D_UPDATE_TEMPERAL
+#define DENOISE3D_UPDATE_TEMPERAL_MASK  0x3FF80000U
+#define DENOISE3D_UPDATE_TEMPERAL_SHIFT 19U
+/* Slice: 18 : 8 denoise3d_update_spacial */
+#define DENOISE3D_UPDATE_SPACIAL
+#define DENOISE3D_UPDATE_SPACIAL_MASK 0x0007FF00U
+#define DENOISE3D_UPDATE_SPACIAL_SHIFT 8U
+/* Slice: 7 : 0 denoise3d_strength */
+#define DENOISE3D_STRENGTH
+#define DENOISE3D_STRENGTH_MASK 0x000000FFU
+#define DENOISE3D_STRENGTH_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_H       0x00003708 */
+/* Slice: 27:20 denoise3d_strength_curve_spacial */
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_thr_edge_h_inv */
+#define DENOISE3D_THR_EDGE_H_INV
+#define DENOISE3D_THR_EDGE_H_INV_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_H_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_V       0x0000370C       */
+/* Slice: 27:20 denoise3d_strength_curve_temperal */
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_thr_edge_v_inv */
+#define DENOISE3D_THR_EDGE_V_INV
+#define DENOISE3D_THR_EDGE_V_INV_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_V_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_S      0x00003710       */
+/* Slice: 19:0  denoise3d_range_s_inv */
+#define DENOISE3D_RANGE_S_INV
+#define DENOISE3D_RANGE_S_INV_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_S_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_T      0x00003714       */
+/* Slice: 29:25 denoise3d_range_t_h */
+#define DENOISE3D_RANGE_T_H
+#define DENOISE3D_RANGE_T_H_MASK 0x3E000000U
+#define DENOISE3D_RANGE_T_H_SHIFT 25U
+/* Slice: 24:20 denoise3d_range_t_v */
+#define DENOISE3D_RANGE_T_V
+#define DENOISE3D_RANGE_T_V_MASK 0x01F00000U
+#define DENOISE3D_RANGE_T_V_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_range_t_inv */
+#define DENOISE3D_RANGE_T_INV
+#define DENOISE3D_RANGE_T_INV_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_T_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_MOTION       0x00003718 */
+/* Slice: 24:20 denoise3d_range_d */
+#define DENOISE3D_RANGE_D
+#define DENOISE3D_RANGE_D_MASK 0x01F00000U
+#define DENOISE3D_RANGE_D_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_motion_inv */
+#define DENOISE3D_MOTION_INV
+#define DENOISE3D_MOTION_INV_MASK 0x000FFFFFU
+#define DENOISE3D_MOTION_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_DELTA_INV    0x0000371C       */
+/* Slice: 29:20 denoise3d_delta_h_inv */
+#define DENOISE3D_DELTA_H_INV
+#define DENOISE3D_DELTA_H_INV_MASK 0x3FF00000U
+#define DENOISE3D_DELTA_H_INV_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_delta_v_inv */
+#define DENOISE3D_DELTA_V_INV
+#define DENOISE3D_DELTA_V_INV_MASK 0x000FFC00U
+#define DENOISE3D_DELTA_V_INV_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_delta_t_inv */
+#define DENOISE3D_DELTA_T_INV
+#define DENOISE3D_DELTA_T_INV_MASK 0x000003FFU
+#define DENOISE3D_DELTA_T_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_0    0x00003720       */
+/* Slice: 29:20 denoise3d_spacial_curve0 */
+#define DENOISE3D_SPACIAL_CURVE0
+#define DENOISE3D_SPACIAL_CURVE0_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE0_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_spacial_curve1 */
+#define DENOISE3D_SPACIAL_CURVE1
+#define DENOISE3D_SPACIAL_CURVE1_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE1_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve2 */
+#define DENOISE3D_SPACIAL_CURVE2
+#define DENOISE3D_SPACIAL_CURVE2_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE2_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_1    0x00003724       */
+/* Slice: 29 : 20       denoise3d_spacial_curve3 */
+#define DENOISE3D_SPACIAL_CURVE3
+#define DENOISE3D_SPACIAL_CURVE3_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE3_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_spacial_curve4 */
+#define DENOISE3D_SPACIAL_CURVE4
+#define DENOISE3D_SPACIAL_CURVE4_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE4_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve5 */
+#define DENOISE3D_SPACIAL_CURVE5
+#define DENOISE3D_SPACIAL_CURVE5_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE5_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_2    0x00003728       */
+/* Slice: 29 : 20       denoise3d_spacial_curve6 */
+#define DENOISE3D_SPACIAL_CURVE6
+#define DENOISE3D_SPACIAL_CURVE6_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE6_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_spacial_curve7 */
+#define DENOISE3D_SPACIAL_CURVE7
+#define DENOISE3D_SPACIAL_CURVE7_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE7_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve8 */
+#define DENOISE3D_SPACIAL_CURVE8
+#define DENOISE3D_SPACIAL_CURVE8_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE8_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_3    0x0000372C       */
+/* Slice: 29 : 20       denoise3d_spacial_curve9 */
+#define DENOISE3D_SPACIAL_CURVE9
+#define DENOISE3D_SPACIAL_CURVE9_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE9_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_spacial_curve10 */
+#define DENOISE3D_SPACIAL_CURVE10
+#define DENOISE3D_SPACIAL_CURVE10_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE10_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve11 */
+#define DENOISE3D_SPACIAL_CURVE11
+#define DENOISE3D_SPACIAL_CURVE11_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE11_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_4    0x00003730       */
+/* Slice: 29 : 20       denoise3d_spacial_curve12 */
+#define DENOISE3D_SPACIAL_CURVE12
+#define DENOISE3D_SPACIAL_CURVE12_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE12_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_spacial_curve13 */
+#define DENOISE3D_SPACIAL_CURVE13
+#define DENOISE3D_SPACIAL_CURVE13_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE13_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve14 */
+#define DENOISE3D_SPACIAL_CURVE14
+#define DENOISE3D_SPACIAL_CURVE14_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE14_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_5    0x00003734       */
+/* Slice: 19 : 10       denoise3d_spacial_curve15 */
+#define DENOISE3D_SPACIAL_CURVE15
+#define DENOISE3D_SPACIAL_CURVE15_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE15_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_spacial_curve16 */
+#define DENOISE3D_SPACIAL_CURVE16
+#define DENOISE3D_SPACIAL_CURVE16_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE16_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_0    0x00003738       */
+/* Slice: 29 : 20       denoise3d_temperal_curve0 */
+#define DENOISE3D_TEMPERAL_CURVE0
+#define DENOISE3D_TEMPERAL_CURVE0_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE0_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_temperal_curve1 */
+#define DENOISE3D_TEMPERAL_CURVE1
+#define DENOISE3D_TEMPERAL_CURVE1_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE1_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve2 */
+#define DENOISE3D_TEMPERAL_CURVE2
+#define DENOISE3D_TEMPERAL_CURVE2_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE2_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_1    0x0000373C       */
+/* Slice: 29 : 20       denoise3d_temperal_curve3 */
+#define DENOISE3D_TEMPERAL_CURVE3
+#define DENOISE3D_TEMPERAL_CURVE3_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE3_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_temperal_curve4 */
+#define DENOISE3D_TEMPERAL_CURVE4
+#define DENOISE3D_TEMPERAL_CURVE4_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE4_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve5 */
+#define DENOISE3D_TEMPERAL_CURVE5
+#define DENOISE3D_TEMPERAL_CURVE5_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE5_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_2    0x00003740       */
+/* Slice: 29 : 20       denoise3d_temperal_curve6 */
+#define DENOISE3D_TEMPERAL_CURVE6
+#define DENOISE3D_TEMPERAL_CURVE6_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE6_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_temperal_curve7 */
+#define DENOISE3D_TEMPERAL_CURVE7
+#define DENOISE3D_TEMPERAL_CURVE7_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE7_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve8 */
+#define DENOISE3D_TEMPERAL_CURVE8
+#define DENOISE3D_TEMPERAL_CURVE8_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE8_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_3    0x00003744       */
+/* Slice: 29 : 20       denoise3d_temperal_curve9 */
+#define DENOISE3D_TEMPERAL_CURVE9
+#define DENOISE3D_TEMPERAL_CURVE9_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE9_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_temperal_curve10 */
+#define DENOISE3D_TEMPERAL_CURVE10
+#define DENOISE3D_TEMPERAL_CURVE10_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE10_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve11 */
+#define DENOISE3D_TEMPERAL_CURVE11
+#define DENOISE3D_TEMPERAL_CURVE11_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE11_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_4    0x00003748       */
+/* Slice: 29 : 20       denoise3d_temperal_curve12 */
+#define DENOISE3D_TEMPERAL_CURVE12
+#define DENOISE3D_TEMPERAL_CURVE12_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE12_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_temperal_curve13 */
+#define DENOISE3D_TEMPERAL_CURVE13
+#define DENOISE3D_TEMPERAL_CURVE13_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE13_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve14 */
+#define DENOISE3D_TEMPERAL_CURVE14
+#define DENOISE3D_TEMPERAL_CURVE14_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE14_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_5    0x0000374C       */
+/* Slice: 19 : 10       denoise3d_temperal_curve15 */
+#define DENOISE3D_TEMPERAL_CURVE15
+#define DENOISE3D_TEMPERAL_CURVE15_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE15_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_temperal_curve16 */
+#define DENOISE3D_TEMPERAL_CURVE16
+#define DENOISE3D_TEMPERAL_CURVE16_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE16_SHIFT 0U
+/* Register: ISP_DENOISE3D_AVERAGE      0x00003750       */
+/* Slice: 31 : 0        denoise3d_frame_average */
+#define DENOISE3D_FRAME_AVERAGE
+#define DENOISE3D_FRAME_AVERAGE_MASK 0xFFFFFFFFU
+#define DENOISE3D_FRAME_AVERAGE_SHIFT 0U
+/* Register: ISP_DENOISE3D_STRENGTH_SHD 0x00003754       */
+/* Slice: 29 : 19       denoise3d_update_temperal_shd */
+#define DENOISE3D_UPDATE_TEMPERAL_SHD
+#define DENOISE3D_UPDATE_TEMPERAL_SHD_MASK 0x3FF80000U
+#define DENOISE3D_UPDATE_TEMPERAL_SHD_SHIFT 19U
+/* Slice: 18 : 8        denoise3d_update_spacial_shd */
+#define DENOISE3D_UPDATE_SPACIAL_SHD
+#define DENOISE3D_UPDATE_SPACIAL_SHD_MASK 0x0007FF00U
+#define DENOISE3D_UPDATE_SPACIAL_SHD_SHIFT 8U
+/* Slice: 7 : 0 denoise3d_strength_shd */
+#define DENOISE3D_STRENGTH_SHD
+#define DENOISE3D_STRENGTH_SHD_MASK 0x0000000FU
+#define DENOISE3D_STRENGTH_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_H_SHD   0x00003758       */
+/* Slice: 27 : 20       denoise3d_strength_curve_spacial_shd */
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_thr_edge_h_inv_shd */
+#define DENOISE3D_THR_EDGE_H_INV_SHD
+#define DENOISE3D_THR_EDGE_H_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_H_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_V_SHD   0x0000375C       */
+/* Slice: 27 : 20       denoise3d_strength_curve_temperal_shd */
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_thr_edge_v_inv_shd */
+#define DENOISE3D_THR_EDGE_V_INV_SHD
+#define DENOISE3D_THR_EDGE_V_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_V_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_S_SHD  0x00003760       */
+/* Slice: 19 : 0        denoise3d_range_s_inv_shd */
+#define DENOISE3D_RANGE_S_INV_SHD
+#define DENOISE3D_RANGE_S_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_S_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_T_SHD  0x00003764       */
+/* Slice: 29 : 25       denoise3d_range_t_h_shd */
+#define DENOISE3D_RANGE_T_H_SHD
+#define DENOISE3D_RANGE_T_H_SHD_MASK 0x3E000000U
+#define DENOISE3D_RANGE_T_H_SHD_SHIFT 25U
+/* Slice: 24 : 20       denoise3d_range_t_v_shd */
+#define DENOISE3D_RANGE_T_V_SHD
+#define DENOISE3D_RANGE_T_V_SHD_MASK 0x01F00000U
+#define DENOISE3D_RANGE_T_V_SHD_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_range_t_inv_shd */
+#define DENOISE3D_RANGE_T_INV_SHD
+#define DENOISE3D_RANGE_T_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_T_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_MOTION_SHD   0x00003768       */
+/* Slice: 24 : 20       denoise3d_range_d_shd */
+#define DENOISE3D_RANGE_D_SHD
+#define DENOISE3D_RANGE_D_SHD_MASK 0x01F00000U
+#define DENOISE3D_RANGE_D_SHD_SHIFT 20U
+/* Slice: 19 : 0        denoise3d_motion_inv_shd */
+#define DENOISE3D_MOTION_INV_SHD
+#define DENOISE3D_MOTION_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_MOTION_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_DELTA_INV_SHD        0x0000376C       */
+/* Slice: 29 : 20       denoise3d_delta_h_inv_shd */
+#define DENOISE3D_DELTA_H_INV_SHD
+#define DENOISE3D_DELTA_H_INV_SHD_MASK 0x3FF00000U
+#define DENOISE3D_DELTA_H_INV_SHD_SHIFT 20U
+/* Slice: 19 : 10       denoise3d_delta_v_inv_shd */
+#define DENOISE3D_DELTA_V_INV_SHD
+#define DENOISE3D_DELTA_V_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_DELTA_V_INV_SHD_SHIFT 10U
+/* Slice: 9 : 0 denoise3d_delta_t_inv_shd */
+#define DENOISE3D_DELTA_T_INV_SHD
+#define DENOISE3D_DELTA_T_INV_SHD_MASK 0x000003FFU
+#define DENOISE3D_DELTA_T_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_DUMMY_HBLANK 0x00003770       */
+/* Slice: 14 : 0        denoise3d_H_Blank */
+#define DENOISE3D_H_BLANK
+#define DENOISE3D_H_BLANK_MASK 0x0000FFFFU
+#define DENOISE3D_H_BLANK_SHIFT 0U
+/* Register: ISP_DENOISE3D_CTRL         0x00003700 */
+/* Slice: 5:5 denoise3d_soft_reset */
+#define DENOISE3D_SOFT_RESET
+#define DENOISE3D_SOFT_RESET_MASK  0x00000020U
+#define DENOISE3D_SOFT_RESET_SHIFT 5U
+/* Slice: 4:4 denoise3d_horizontal_en */
+#define DENOISE3D_HORIZONTAL_EN
+#define DENOISE3D_HORIZONTAL_EN_MASK 0x00000010U
+#define DENOISE3D_HORIZONTAL_EN_SHIFT 4U
+/* Slice: 3:3 denoise3d_vertical_en */
+#define DENOISE3D_VERTICAL_EN
+#define DENOISE3D_VERTICAL_EN_MASK 0x00000008U
+#define DENOISE3D_VERTICAL_EN_SHIFT 3U
+/* Slice: 2:2 denoise3d_temperal_en */
+#define DENOISE3D_TEMPERAL_EN
+#define DENOISE3D_TEMPERAL_EN_MASK 0x00000004U
+#define DENOISE3D_TEMPERAL_EN_SHIFT 2U
+/* Slice: 1:1 denoise3d_dilate_en */
+#define DENOISE3D_DILATE_EN
+#define DENOISE3D_DILATE_EN_MASK 0x00000002U
+#define DENOISE3D_DILATE_EN_SHIFT 1U
+/* Slice: 0:0 denoise3d_enable */
+#define DENOISE3D_ENABLE
+#define DENOISE3D_ENABLE_MASK 0x00000001U
+#define DENOISE3D_ENABLE_SHIFT 0U
+/* Register: ISP_DENOISE3D_STRENGTH	0x00003704 */
+/* Slice: 29:19	denoise3d_update_temperal */
+#define DENOISE3D_UPDATE_TEMPERAL
+#define DENOISE3D_UPDATE_TEMPERAL_MASK  0x3FF80000U
+#define DENOISE3D_UPDATE_TEMPERAL_SHIFT 19U
+/* Slice: 18 : 8 denoise3d_update_spacial */
+#define DENOISE3D_UPDATE_SPACIAL
+#define DENOISE3D_UPDATE_SPACIAL_MASK 0x0007FF00U
+#define DENOISE3D_UPDATE_SPACIAL_SHIFT 8U
+/* Slice: 7 : 0	denoise3d_strength */
+#define DENOISE3D_STRENGTH
+#define DENOISE3D_STRENGTH_MASK 0x000000FFU
+#define DENOISE3D_STRENGTH_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_H	0x00003708 */
+/* Slice: 27:20	denoise3d_strength_curve_spacial */
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_thr_edge_h_inv */
+#define DENOISE3D_THR_EDGE_H_INV
+#define DENOISE3D_THR_EDGE_H_INV_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_H_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_V	0x0000370C */
+/* Slice: 27:20	denoise3d_strength_curve_temperal */
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_thr_edge_v_inv */
+#define DENOISE3D_THR_EDGE_V_INV
+#define DENOISE3D_THR_EDGE_V_INV_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_V_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_S	0x00003710 */
+/* Slice: 19:0	denoise3d_range_s_inv */
+#define DENOISE3D_RANGE_S_INV
+#define DENOISE3D_RANGE_S_INV_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_S_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_T	0x00003714 */
+/* Slice: 29:25	denoise3d_range_t_h */
+#define DENOISE3D_RANGE_T_H
+#define DENOISE3D_RANGE_T_H_MASK 0x3E000000U
+#define DENOISE3D_RANGE_T_H_SHIFT 25U
+/* Slice: 24:20	denoise3d_range_t_v */
+#define DENOISE3D_RANGE_T_V
+#define DENOISE3D_RANGE_T_V_MASK 0x01F00000U
+#define DENOISE3D_RANGE_T_V_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_range_t_inv */
+#define DENOISE3D_RANGE_T_INV
+#define DENOISE3D_RANGE_T_INV_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_T_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_MOTION	0x00003718 */
+/* Slice: 24:20	denoise3d_range_d */
+#define DENOISE3D_RANGE_D
+#define DENOISE3D_RANGE_D_MASK 0x01F00000U
+#define DENOISE3D_RANGE_D_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_motion_inv */
+#define DENOISE3D_MOTION_INV
+#define DENOISE3D_MOTION_INV_MASK 0x000FFFFFU
+#define DENOISE3D_MOTION_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_DELTA_INV	0x0000371C */
+/* Slice: 29:20	denoise3d_delta_h_inv */
+#define DENOISE3D_DELTA_H_INV
+#define DENOISE3D_DELTA_H_INV_MASK 0x3FF00000U
+#define DENOISE3D_DELTA_H_INV_SHIFT 20U
+/* Slice: 19 : 10	denoise3d_delta_v_inv */
+#define DENOISE3D_DELTA_V_INV
+#define DENOISE3D_DELTA_V_INV_MASK 0x000FFC00U
+#define DENOISE3D_DELTA_V_INV_SHIFT 10U
+/* Slice: 9 : 0	denoise3d_delta_t_inv */
+#define DENOISE3D_DELTA_T_INV
+#define DENOISE3D_DELTA_T_INV_MASK 0x000003FFU
+#define DENOISE3D_DELTA_T_INV_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_S_0	0x00003720 */
+/* Slice: 29:20	denoise3d_spacial_curve0 */
+#define DENOISE3D_SPACIAL_CURVE0
+#define DENOISE3D_SPACIAL_CURVE0_MASK 0x3FF00000U
+#define DENOISE3D_SPACIAL_CURVE0_SHIFT 20U
+/* Slice: 19 : 10	denoise3d_spacial_curve1 */
+#define DENOISE3D_SPACIAL_CURVE1
+#define DENOISE3D_SPACIAL_CURVE1_MASK 0x000FFC00U
+#define DENOISE3D_SPACIAL_CURVE1_SHIFT 10U
+/* Slice: 9 : 0	denoise3d_spacial_curve2 */
+#define DENOISE3D_SPACIAL_CURVE2
+#define DENOISE3D_SPACIAL_CURVE2_MASK 0x000003FFU
+#define DENOISE3D_SPACIAL_CURVE2_SHIFT 0U
+/* Register: ISP_DENOISE3D_CURVE_T_0	0x00003738 */
+/* Slice: 29 : 20	denoise3d_temperal_curve0 */
+#define DENOISE3D_TEMPERAL_CURVE0
+#define DENOISE3D_TEMPERAL_CURVE0_MASK 0x3FF00000U
+#define DENOISE3D_TEMPERAL_CURVE0_SHIFT 20U
+/* Slice: 19 : 10	denoise3d_temperal_curve1 */
+#define DENOISE3D_TEMPERAL_CURVE1
+#define DENOISE3D_TEMPERAL_CURVE1_MASK 0x000FFC00U
+#define DENOISE3D_TEMPERAL_CURVE1_SHIFT 10U
+/* Slice: 9 : 0	denoise3d_temperal_curve2 */
+#define DENOISE3D_TEMPERAL_CURVE2
+#define DENOISE3D_TEMPERAL_CURVE2_MASK 0x000003FFU
+#define DENOISE3D_TEMPERAL_CURVE2_SHIFT 0U
+/* Register: ISP_DENOISE3D_AVERAGE	0x00003750 */
+/* Slice: 31 : 0	denoise3d_frame_average */
+#define DENOISE3D_FRAME_AVERAGE
+#define DENOISE3D_FRAME_AVERAGE_MASK 0xFFFFFFFFU
+#define DENOISE3D_FRAME_AVERAGE_SHIFT 0U
+/* Register: ISP_DENOISE3D_STRENGTH_SHD	0x00003754 */
+/* Slice: 29 : 19	denoise3d_update_temperal_shd */
+#define DENOISE3D_UPDATE_TEMPERAL_SHD
+#define DENOISE3D_UPDATE_TEMPERAL_SHD_MASK 0x3FF80000U
+#define DENOISE3D_UPDATE_TEMPERAL_SHD_SHIFT 19U
+/* Slice: 18 : 8	denoise3d_update_spacial_shd */
+#define DENOISE3D_UPDATE_SPACIAL_SHD
+#define DENOISE3D_UPDATE_SPACIAL_SHD_MASK 0x0007FF00U
+#define DENOISE3D_UPDATE_SPACIAL_SHD_SHIFT 8U
+/* Slice: 7 : 0	denoise3d_strength_shd */
+#define DENOISE3D_STRENGTH_SHD
+#define DENOISE3D_STRENGTH_SHD_MASK 0x0000000FU
+#define DENOISE3D_STRENGTH_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_H_SHD	0x00003758 */
+/* Slice: 27 : 20	denoise3d_strength_curve_spacial_shd */
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_SPACIAL_SHD_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_thr_edge_h_inv_shd */
+#define DENOISE3D_THR_EDGE_H_INV_SHD
+#define DENOISE3D_THR_EDGE_H_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_H_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_EDGE_V_SHD	0x0000375C */
+/* Slice: 27 : 20	denoise3d_strength_curve_temperal_shd */
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD_MASK 0x0FF00000U
+#define DENOISE3D_STRENGTH_CURVE_TEMPERAL_SHD_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_thr_edge_v_inv_shd */
+#define DENOISE3D_THR_EDGE_V_INV_SHD
+#define DENOISE3D_THR_EDGE_V_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_THR_EDGE_V_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_S_SHD	0x00003760 */
+/* Slice: 19 : 0	denoise3d_range_s_inv_shd */
+#define DENOISE3D_RANGE_S_INV_SHD
+#define DENOISE3D_RANGE_S_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_S_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_RANGE_T_SHD	0x00003764 */
+/* Slice: 29 : 25	denoise3d_range_t_h_shd */
+#define DENOISE3D_RANGE_T_H_SHD
+#define DENOISE3D_RANGE_T_H_SHD_MASK 0x3E000000U
+#define DENOISE3D_RANGE_T_H_SHD_SHIFT 25U
+/* Slice: 24 : 20	denoise3d_range_t_v_shd */
+#define DENOISE3D_RANGE_T_V_SHD
+#define DENOISE3D_RANGE_T_V_SHD_MASK 0x01F00000U
+#define DENOISE3D_RANGE_T_V_SHD_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_range_t_inv_shd */
+#define DENOISE3D_RANGE_T_INV_SHD
+#define DENOISE3D_RANGE_T_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_RANGE_T_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_MOTION_SHD	0x00003768 */
+/* Slice: 24 : 20	denoise3d_range_d_shd */
+#define DENOISE3D_RANGE_D_SHD
+#define DENOISE3D_RANGE_D_SHD_MASK 0x01F00000U
+#define DENOISE3D_RANGE_D_SHD_SHIFT 20U
+/* Slice: 19 : 0	denoise3d_motion_inv_shd */
+#define DENOISE3D_MOTION_INV_SHD
+#define DENOISE3D_MOTION_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_MOTION_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_DELTA_INV_SHD	0x0000376C */
+/* Slice: 29 : 20	denoise3d_delta_h_inv_shd */
+#define DENOISE3D_DELTA_H_INV_SHD
+#define DENOISE3D_DELTA_H_INV_SHD_MASK 0x3FF00000U
+#define DENOISE3D_DELTA_H_INV_SHD_SHIFT 20U
+/* Slice: 19 : 10	denoise3d_delta_v_inv_shd */
+#define DENOISE3D_DELTA_V_INV_SHD
+#define DENOISE3D_DELTA_V_INV_SHD_MASK 0x000FFFFFU
+#define DENOISE3D_DELTA_V_INV_SHD_SHIFT 10U
+/* Slice: 9 : 0	denoise3d_delta_t_inv_shd */
+#define DENOISE3D_DELTA_T_INV_SHD
+#define DENOISE3D_DELTA_T_INV_SHD_MASK 0x000003FFU
+#define DENOISE3D_DELTA_T_INV_SHD_SHIFT 0U
+/* Register: ISP_DENOISE3D_DUMMY_HBLANK	0x00003770 */
+/* Slice: 14 : 0	denoise3d_H_Blank */
+#define DENOISE3D_H_BLANK
+#define DENOISE3D_H_BLANK_MASK 0x0000FFFFU
+#define DENOISE3D_H_BLANK_SHIFT 0U
+/* Register: ISP_DENOISE3D_WEIGHT1 0x00003778 */
+/* Slice:  denoise3d_weight_up_y0 */
+#define DENOISE3D_WEIGHT_UP_Y0
+#define DENOISE3D_WEIGHT_UP_Y0_MASK 0x00F00000U
+#define DENOISE3D_WEIGHT_UP_Y0_SHIFT 20U
+#define DENOISE3D_WEIGHT_UP_Y1
+#define DENOISE3D_WEIGHT_UP_Y1_MASK 0x000F0000U
+#define DENOISE3D_WEIGHT_UP_Y1_SHIFT 16U
+#define DENOISE3D_WEIGHT
+#define DENOISE3D_WEIGHT_MASK 0x0000000FU
+#define DENOISE3D_WEIGHT_SHIFT 0U
+/*! for miv2 by shenchao */
+/*! Register: miv2_ctrl (0x00001300)*/
+/*! Slice: sp2_raw2_continous:*/
+#define SP2_RAW2_CONTINUOUS
+#define SP2_RAW2_CONTINUOUS_MASK 0x1 << 24
+#define SP2_RAW2_CONTINUOUS_SHIFT 24U
+
+#define SP2_RAW2_START
+#define SP2_RAW2_START_MASK 0x1 << 23
+#define SP2_RAW2_START_SHIFT 23U
+
+#define PP_DMA_CONTINUOUS
+#define PP_DMA_CONTINUOUS_MASK 0x1 << 22
+#define PP_DMA_CONTINUOUS_SHIFT 22U
+
+#define PP_DMA_START
+#define PP_DMA_START_MASK 0x1 << 21
+#define PP_DMA_START_SHIFT 21U
+
+#define SP2_RAW2_WRITE_PATH_ENABLE
+#define SP2_RAW2_WRITE_PATH_ENABLE_MASK 0x1 << 20
+#define SP2_RAW2_WRITE_PATH_ENABLE_SHIFT 20U
+
+#define PP_WRITE_PATH_ENABLE
+#define PP_WRITE_PATH_ENABLE_MASK 0x1 << 19
+#define PP_WRITE_PATH_ENABLE_SHIFT 19U
+
+#define MCM_G2_RAW1_PATH_ENABLE
+#define MCM_G2_RAW1_PATH_ENABLE_MASK 0x1 << 18
+#define MCM_G2_RAW1_PATH_ENABLE_SHIFT 18U
+
+#define MCM_G2_RAW0_PATH_ENABLE
+#define MCM_G2_RAW0_PATH_ENABLE_MASK 0x1 << 17
+#define MCM_G2_RAW0_PATH_ENABLE_SHIFT 17U
+
+//! Register: isp_hdr_exp_conf: Exposure control (0x00000000)
+//! Slice: exp_meas_mode:
+//! '1' luminance calculation according to
+// Y=(R+G+B) x 0.332 (85/256)
+// '0' luminance calculation according to Y=16+0.25R+0.5G+0.1094B
+#define MRV_HDR_EXP_MEAS_MODE
+#define MRV_HDR_EXP_MEAS_MODE_MASK 0x80000000U
+#define MRV_HDR_EXP_MEAS_MODE_SHIFT 31U
+//! Slice: src_select:
+#define MRV_HDR_EXP_SRC_SEL
+#define MRV_HDR_EXP_SRC_SEL_MASK 0x00000004U
+#define MRV_HDR_EXP_SRC_SEL_SHIFT 2U
+//! Slice: autostop:
+//! '1' stop measuring after a complete frame
+// '0' continous measurement
+#define MRV_HDR_EXP_AUTOSTOP
+#define MRV_HDR_EXP_AUTOSTOP_MASK 0x00000002U
+#define MRV_HDR_EXP_AUTOSTOP_SHIFT 1U
+//! Slice: exp_start:
+//! '1' start measuring a frame. The exp block will reset this bit and halt after completing one frame, if bit "autostop" is set to '1'.
+#define MRV_HDR_EXP_START
+#define MRV_HDR_EXP_START_MASK 0x00000001U
+#define MRV_HDR_EXP_START_SHIFT 0U
+
+//! Register: isp_hdr_exp_h_offset: Horizontal offset for first block (0x00000004)
+#define MRV_ISP_HDR_EXP_H_OFFSET
+#define MRV_ISP_HDR_EXP_H_OFFSET_MASK 0x00001FFFU
+#define MRV_ISP_HDR_EXP_H_OFFSET_SHIFT 0U
+
+//! Register: isp_hdr_exp_v_offset: Vertical offset for first block (0x00000008)
+#define MRV_ISP_HDR_EXP_V_OFFSET
+#define MRV_ISP_HDR_EXP_V_OFFSET_MASK 0x00001FFFU
+#define MRV_ISP_HDR_EXP_V_OFFSET_SHIFT 0U
+
+//! Register: isp_exp_h_size: Horizontal size of one block (0x0000000c)
+#define MRV_ISP_HDR_EXP_H_SIZE
+#define MRV_ISP_HDR_EXP_H_SIZE_MASK 0x000007FFU
+#define MRV_ISP_HDR_EXP_H_SIZE_SHIFT 0U
+
+//! Register: isp_exp_v_size: Vertical size of one block (0x00000010)
+#define MRV_ISP_HDR_EXP_V_SIZE
+#define MRV_ISP_HDR_EXP_V_SIZE_MASK 0x000007FEU
+#define MRV_ISP_HDR_EXP_V_SIZE_SHIFT 0U
+/*! for miv2 by shenchao */
+/*! Register: miv2_ctrl (0x00001300)*/
+/*! Slice: mcm_raw_rdma_start_con:*/
+#define MCM_RAW_RDMA_START_CON
+#define MCM_RAW_RDMA_START_CON_MASK 0x00010000U
+#define MCM_RAW_RDMA_START_CON_SHIFT 16U
+/*! Slice: mcm_raw_rdma_start:*/
+#define MCM_RAW_RDMA_START
+#define MCM_RAW_RDMA_START_MASK 0x00008000U
+#define MCM_RAW_RDMA_START_SHIFT 15U
+/*! Slice: mcm_raw_rdma_path_enable:*/
+#define MCM_RAW_RDMA_PATH_ENABLE
+#define MCM_RAW_RDMA_PATH_ENABLE_MASK 0x00004000U
+#define MCM_RAW_RDMA_PATH_ENABLE_SHIFT 14U
+/*! Slice: sp2_raw2_rdma_start_con:*/
+#define SP2_RAW2_RDMA_START_CON
+#define SP2_RAW2_RDMA_START_CON_MASK 0x01000000U
+#define SP2_RAW2_RDMA_START_CON_SHIFT 24U
+/*! Slice: sp2_raw2_rdma_start:*/
+#define SP2_RAW2_RDMA_START
+#define SP2_RAW2_RDMA_START_MASK 0x00800000U
+#define SP2_RAW2_RDMA_START_SHIFT 23U
+/*! Slice: sp2_raw_rdma_start_con:*/
+#define SP2_RAW_RDMA_START_CON
+#define SP2_RAW_RDMA_START_CON_MASK 0x00002000U
+#define SP2_RAW_RDMA_START_CON_SHIFT 13U
+/*! Slice: sp2_raw_rdma_start:*/
+#define SP2_RAW_RDMA_START
+#define SP2_RAW_RDMA_START_MASK 0x00001000U
+#define SP2_RAW_RDMA_START_SHIFT 12U
+/*! Slice: sp2_raw_rdma_path_enable:*/
+#define SP2_RAW_RDMA_PATH_ENABLE
+#define SP2_RAW_RDMA_PATH_ENABLE_MASK 0x00000800U
+#define SP2_RAW_RDMA_PATH_ENABLE_SHIFT 11U
+/*! Slice: sp2_ycbcr_rdma_start_con:*/
+#define SP2_YCBCR_RDMA_START_CON
+#define SP2_YCBCR_RDMA_START_CON_MASK 0x00000400U
+#define SP2_YCBCR_RDMA_START_CON_SHIFT 10U
+/*! Slice: sp2_ycbcr_rdma_start:*/
+#define SP2_YCBCR_RDMA_START
+#define SP2_YCBCR_RDMA_START_MASK 0x00000200U
+#define SP2_YCBCR_RDMA_START_SHIFT 9U
+/*! Slice: sp2_ycbcr_rdma_path_enable:*/
+#define SP2_YCBCR_RDMA_PATH_ENABLE
+#define SP2_YCBCR_RDMA_PATH_ENABLE_MASK 0x00000100U
+#define SP2_YCBCR_RDMA_PATH_ENABLE_SHIFT 8U
+/*! Slice: mcm_raw1_path_enable:*/
+#define MCM_RAW1_PATH_ENABLE
+#define MCM_RAW1_PATH_ENABLE_MASK 0x00000080U
+#define MCM_RAW1_PATH_ENABLE_SHIFT 7U
+/*! Slice: mcm_raw0_path_enable:*/
+#define MCM_RAW0_PATH_ENABLE
+#define MCM_RAW0_PATH_ENABLE_MASK 0x00000040U
+#define MCM_RAW0_PATH_ENABLE_SHIFT 6U
+/*! Slice: sp2_raw_path_enable:*/
+#define SP2_RAW_PATH_ENABLE
+#define SP2_RAW_PATH_ENABLE_MASK 0x00000020U
+#define SP2_RAW_PATH_ENABLE_SHIFT 5U
+/*! Slice: sp2_ycbcr_path_enable:*/
+#define SP2_YCBCR_PATH_ENABLE
+#define SP2_YCBCR_PATH_ENABLE_MASK 0x00000010U
+#define SP2_YCBCR_PATH_ENABLE_SHIFT 4U
+/*! Slice: sp1_ycbcr_path_enable:*/
+#define SP1_YCBCR_PATH_ENABLE
+#define SP1_YCBCR_PATH_ENABLE_MASK 0x00000008U
+#define SP1_YCBCR_PATH_ENABLE_SHIFT 3U
+/*! Slice: mp_jdp_path_enable:*/
+#define MP_JDP_PATH_ENABLE
+#define MP_JDP_PATH_ENABLE_MASK 0x00000004U
+#define MP_JDP_PATH_ENABLE_SHIFT 2U
+/*! Slice: mp_raw_path_enable:*/
+#define MP_RAW_PATH_ENABLE
+#define MP_RAW_PATH_ENABLE_MASK 0x00000002U
+#define MP_RAW_PATH_ENABLE_SHIFT 1U
+/*! Slice: mp_ycbcr_path_enable:*/
+#define MP_YCBCR_PATH_ENABLE
+#define MP_YCBCR_PATH_ENABLE_MASK 0x00000001U
+#define MP_YCBCR_PATH_ENABLE_SHIFT 0U
+/*! Register: miv2_ctrl_shd (0x00001304)*/
+/*! Slice: mcm_raw_rdma_start_con:*/
+#define MCM_RAW_RDMA_START_CON
+#define MCM_RAW_RDMA_START_CON_MASK 0x00010000U
+#define MCM_RAW_RDMA_START_CON_SHIFT 16U
+/*! Slice: mcm_raw_rdma_start:*/
+#define MCM_RAW_RDMA_START
+#define MCM_RAW_RDMA_START_MASK 0x00008000U
+#define MCM_RAW_RDMA_START_SHIFT 15U
+/*! Slice: mcm_raw_rdma_path_enable:*/
+#define MCM_RAW_RDMA_PATH_ENABLE
+#define MCM_RAW_RDMA_PATH_ENABLE_MASK 0x00004000U
+#define MCM_RAW_RDMA_PATH_ENABLE_SHIFT 14U
+/*! Slice: sp2_raw_rdma_start_con:*/
+#define SP2_RAW_RDMA_START_CON
+#define SP2_RAW_RDMA_START_CON_MASK 0x00002000U
+#define SP2_RAW_RDMA_START_CON_SHIFT 13U
+/*! Slice: sp2_raw_rdma_start:*/
+#define SP2_RAW_RDMA_START
+#define SP2_RAW_RDMA_START_MASK 0x00001000U
+#define SP2_RAW_RDMA_START_SHIFT 12U
+/*! Slice: sp2_raw_rdma_path_enable:*/
+#define SP2_RAW_RDMA_PATH_ENABLE
+#define SP2_RAW_RDMA_PATH_ENABLE_MASK 0x00000800U
+#define SP2_RAW_RDMA_PATH_ENABLE_SHIFT 11U
+/*! Slice: sp2_ycbcr_rdma_start_con:*/
+#define SP2_YCBCR_RDMA_START_CON
+#define SP2_YCBCR_RDMA_START_CON_MASK 0x00000400U
+#define SP2_YCBCR_RDMA_START_CON_SHIFT 10U
+/*! Slice: sp2_ycbcr_rdma_start:*/
+#define SP2_YCBCR_RDMA_START
+#define SP2_YCBCR_RDMA_START_MASK 0x00000200U
+#define SP2_YCBCR_RDMA_START_SHIFT 9U
+/*! Slice: sp2_ycbcr_rdma_path_enable:*/
+#define SP2_YCBCR_RDMA_PATH_ENABLE
+#define SP2_YCBCR_RDMA_PATH_ENABLE_MASK 0x00000100U
+#define SP2_YCBCR_RDMA_PATH_ENABLE_SHIFT 8U
+/*! Slice: mcm_raw1_path_enable:*/
+#define MCM_RAW1_PATH_ENABLE
+#define MCM_RAW1_PATH_ENABLE_MASK 0x00000080U
+#define MCM_RAW1_PATH_ENABLE_SHIFT 7U
+/*! Slice: mcm_raw0_path_enable:*/
+#define MCM_RAW0_PATH_ENABLE
+#define MCM_RAW0_PATH_ENABLE_MASK 0x00000040U
+#define MCM_RAW0_PATH_ENABLE_SHIFT 6U
+/*! Slice: sp2_raw_path_enable:*/
+#define SP2_RAW_PATH_ENABLE
+#define SP2_RAW_PATH_ENABLE_MASK 0x00000020U
+#define SP2_RAW_PATH_ENABLE_SHIFT 5U
+/*! Slice: sp2_ycbcr_path_enable:*/
+#define SP2_YCBCR_PATH_ENABLE
+#define SP2_YCBCR_PATH_ENABLE_MASK 0x00000010U
+#define SP2_YCBCR_PATH_ENABLE_SHIFT 4U
+/*! Slice: sp1_ycbcr_path_enable:*/
+#define SP1_YCBCR_PATH_ENABLE
+#define SP1_YCBCR_PATH_ENABLE_MASK 0x00000008U
+#define SP1_YCBCR_PATH_ENABLE_SHIFT 3U
+/*! Slice: mp_jdp_path_enable:*/
+#define MP_JDP_PATH_ENABLE
+#define MP_JDP_PATH_ENABLE_MASK 0x00000004U
+#define MP_JDP_PATH_ENABLE_SHIFT 2U
+/*! Slice: mp_raw_path_enable:*/
+#define MP_RAW_PATH_ENABLE
+#define MP_RAW_PATH_ENABLE_MASK 0x00000002U
+#define MP_RAW_PATH_ENABLE_SHIFT 1U
+/*! Slice: mp_ycbcr_path_enable:*/
+#define MP_YCBCR_PATH_ENABLE
+#define MP_YCBCR_PATH_ENABLE_MASK 0x00000001U
+#define MP_YCBCR_PATH_ENABLE_SHIFT 0U
+/*! Register: miv2_mp_ctrl (0x00001310)*/
+/*! Slice: mp_init_offset_en:*/
+#define MP_INIT_OFFSET_EN
+#define MP_INIT_OFFSET_EN_MASK 0x00000020U
+#define MP_INIT_OFFSET_EN_SHIFT 5U
+/*! Slice: mp_init_base_en:*/
+#define MP_INIT_BASE_EN
+#define MP_INIT_BASE_EN_MASK 0x00000010U
+#define MP_INIT_BASE_EN_SHIFT 4U
+/*! Slice: mp_miv2_cfg_upd:*/
+#define MP_MI_CFG_UPD
+#define MP_MI_CFG_UPD_MASK 0x00000008U
+#define MP_MI_CFG_UPD_SHIFT 3U
+/*! Slice: mp_miv2_skip:*/
+#define MP_MI_SKIP
+#define MP_MI_SKIP_MASK 0x00000004U
+#define MP_MI_SKIP_SHIFT 2U
+/*! Slice: mp_auto_update:*/
+#define MP_AUTO_UPDATE
+#define MP_AUTO_UPDATE_MASK 0x00000002U
+#define MP_AUTO_UPDATE_SHIFT 1U
+/*! Slice: mp_pingpong_enable:*/
+#define MP_PINGPONG_ENABLE
+#define MP_PINGPONG_ENABLE_MASK 0x00000001U
+#define MP_PINGPONG_ENABLE_SHIFT 0U
+/*! Register: miv2_mp_fmt (0x00001314)*/
+/*! Slice: mp_wr_jdp_dp_bit:*/
+#define MP_WR_JDP_DP_BIT
+#define MP_WR_JDP_DP_BIT_MASK 0x000020000U
+#define MP_WR_JDP_DP_BIT_SHIFT 17U
+
+/*! Slice: mp_wr_yuv_nvy:*/
+#define MP_WR_YUV_NVY
+#define MP_WR_YUV_NVY_MASK 0x00006000U
+#define MP_WR_YUV_NVY_SHIFT 13U
+/*! Slice: mp_wr_yuv_nv21:*/
+#define MP_WR_YUV_NV21
+#define MP_WR_YUV_NV21_MASK 0x00001000U
+#define MP_WR_YUV_NV21_SHIFT 12U
+/*! Slice: mp_wr_raw_aligned:*/
+#define MP_WR_RAW_ALIGNED
+#define MP_WR_RAW_ALIGNED_MASK 0x00000C00U
+#define MP_WR_RAW_ALIGNED_SHIFT 10U
+/*! Slice: mp_wr_yuv_aligned:*/
+#define MP_WR_YUV_ALIGNED
+#define MP_WR_YUV_ALIGNED_MASK 0x00000200U
+#define MP_WR_YUV_ALIGNED_SHIFT 9U
+/*! Slice: mp_wr_raw_bit:*/
+#define MP_WR_RAW_BIT
+#define MP_WR_RAW_BIT_MASK 0x000001C0U
+#define MP_WR_RAW_BIT_SHIFT 6U
+/*! Slice: mp_wr_yuv_str:*/
+#define MP_WR_YUV_STR
+#define MP_WR_YUV_STR_MASK 0x00000030U
+#define MP_WR_YUV_STR_SHIFT 4U
+/*! Slice: mp_wr_yuv_fmt:*/
+#define MP_WR_YUV_FMT
+#define MP_WR_YUV_FMT_MASK 0x0000000CU
+#define MP_WR_YUV_FMT_SHIFT 2U
+/*! Slice: mp_wr_yuv_bit:*/
+#define MP_WR_YUV_BIT
+#define MP_WR_YUV_BIT_MASK 0x00000002U
+#define MP_WR_YUV_BIT_SHIFT 1U
+/*! Slice: mp_wr_jdp_fmt:*/
+#define MP_WR_JDP_FMT
+#define MP_WR_JDP_FMT_MASK 0x00000001U
+#define MP_WR_JDP_FMT_SHIFT 0U
+/*! Register: miv2_mp_bus_cfg (0x00001318)*/
+/*! Slice: mp_wr_swap_jdp:*/
+#define MP_WR_SWAP_JDP
+#define MP_WR_SWAP_JDP_MASK 0x0F000000U
+#define MP_WR_SWAP_JDP_SHIFT 24U
+/*! Slice: mp_wr_swap_raw:*/
+#define MP_WR_SWAP_RAW
+#define MP_WR_SWAP_RAW_MASK 0x00F00000U
+#define MP_WR_SWAP_RAW_SHIFT 20U
+/*! Slice: mp_wr_swap_v:*/
+#define MP_WR_SWAP_V
+#define MP_WR_SWAP_V_MASK 0x000F0000U
+#define MP_WR_SWAP_V_SHIFT 16U
+/*! Slice: mp_wr_swap_u:*/
+#define MP_WR_SWAP_U
+#define MP_WR_SWAP_U_MASK 0x0000F000U
+#define MP_WR_SWAP_U_SHIFT 12U
+/*! Slice: mp_wr_swap_y:*/
+#define MP_WR_SWAP_Y
+#define MP_WR_SWAP_Y_MASK 0x00000F00U
+#define MP_WR_SWAP_Y_SHIFT 8U
+/*! Slice: mp_rd_issue_cap:*/
+#define MP_RD_ISSUE_CAP
+#define MP_RD_ISSUE_CAP_MASK 0x000000C0U
+#define MP_RD_ISSUE_CAP_SHIFT 6U
+/*! Slice: mp_wr_issue_cap:*/
+#define MP_WR_ISSUE_CAP
+#define MP_WR_ISSUE_CAP_MASK 0x00000030U
+#define MP_WR_ISSUE_CAP_SHIFT 4U
+/*! Slice: mp_rd_burst_len:*/
+#define MP_RD_BURST_LEN
+#define MP_RD_BURST_LEN_MASK 0x0000000CU
+#define MP_RD_BURST_LEN_SHIFT 2U
+/*! Slice: mp_wr_burst_len:*/
+#define MP_WR_BURST_LEN
+#define MP_WR_BURST_LEN_MASK 0x00000003U
+#define MP_WR_BURST_LEN_SHIFT 0U
+/*! Register: miv2_mp_bus_id (0x0000131c)*/
+/*! Slice: mp_bus_sw_en:*/
+#define MP_BUS_SW_EN
+#define MP_BUS_SW_EN_MASK 0x02000000U
+#define MP_BUS_SW_EN_SHIFT 25U
+/*! Slice: mp_rd_id_en:*/
+#define MP_RD_ID_EN
+#define MP_RD_ID_EN_MASK 0x01000000U
+#define MP_RD_ID_EN_SHIFT 24U
+/*! Slice: mp_rd_id_cfg:*/
+#define MP_RD_ID_CFG
+#define MP_RD_ID_CFG_MASK 0x00FF0000U
+#define MP_RD_ID_CFG_SHIFT 16U
+/*! Slice: mp_wr_id_en:*/
+#define MP_WR_ID_EN
+#define MP_WR_ID_EN_MASK 0x00000100U
+#define MP_WR_ID_EN_SHIFT 8U
+/*! Slice: mp_wr_id_cfg:*/
+#define MP_WR_ID_CFG
+#define MP_WR_ID_CFG_MASK 0x000000FFU
+#define MP_WR_ID_CFG_SHIFT 0U
+/*! Register: miv2_mp_bus_timeo (0x00001320)*/
+/*! Slice: mp_bus_timeo_en:*/
+#define MP_BUS_TIMEO_EN
+#define MP_BUS_TIMEO_EN_MASK 0x80000000U
+#define MP_BUS_TIMEO_EN_SHIFT 31U
+/*! Slice: mp_bus_timeo:*/
+#define MP_BUS_TIMEO
+#define MP_BUS_TIMEO_MASK 0x7FFFFFFEU
+#define MP_BUS_TIMEO_SHIFT 1U
+
+/*! Slice: mp_bus_timeo_interrupt_disable:*/
+/*! 0 enable 1 disable*/
+#define MP_BUS_TIMEO_INTERRUPT_DISABLE
+#define MP_BUS_TIMEO_INTERRUPT_DISABLE_MASK 1U
+#define MP_BUS_TIMEO_INTERRUPT_DISABLE_SHIFT 0U
+/*! Register: miv2_mp_y_base_ad_init (0x00001324)*/
+/*! Slice: mp_y_base_ad_init:*/
+#define MP_Y_BASE_AD_INIT
+#define MP_Y_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MP_Y_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mp_y_size_init (0x00001328)*/
+/*! Slice: mp_y_size_init:*/
+#define MP_Y_SIZE_INIT
+#define MP_Y_SIZE_INIT_MASK 0x1FFFFFF0U
+#define MP_Y_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mp_y_offs_cnt_init (0x0000132c)*/
+/*! Slice: mp_y_offs_cnt_init:*/
+#define MP_Y_OFFS_CNT_INIT
+#define MP_Y_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define MP_Y_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mp_y_llength (0x00001330)*/
+/*! Slice: mp_y_llengh:*/
+#define MP_Y_LLENGH
+#define MP_Y_LLENGH_MASK 0x00007FFFU
+#define MP_Y_LLENGH_SHIFT 0U
+/*! Register: miv2_mp_y_pic_width (0x00001334)*/
+/*! Slice: mp_y_pic_width:*/
+#define MP_Y_PIC_WIDTH
+#define MP_Y_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MP_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mp_y_pic_height (0x00001338)*/
+/*! Slice: mp_y_pic_height:*/
+#define MP_Y_PIC_HEIGHT
+#define MP_Y_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MP_Y_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_mp_y_pic_size (0x0000133c)*/
+/*! Slice: mp_y_pic_size:*/
+#define MP_Y_PIC_SIZE
+#define MP_Y_PIC_SIZE_MASK 0xFFFFFFFFU
+#define MP_Y_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mp_cb_base_ad_init (0x00001340)*/
+/*! Slice: mp_cb_base_ad_init:*/
+#define MP_CB_BASE_AD_INIT
+#define MP_CB_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MP_CB_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mp_cb_size_init (0x00001344)*/
+/*! Slice: mp_cb_size_init:*/
+#define MP_CB_SIZE_INIT
+#define MP_CB_SIZE_INIT_MASK 0x0FFFFFF0U
+#define MP_CB_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mp_cb_offs_cnt_init (0x00001348)*/
+/*! Slice: mp_cb_offs_cnt_init:*/
+#define MP_CB_OFFS_CNT_INIT
+#define MP_CB_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define MP_CB_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mp_cr_base_ad_init (0x0000134c)*/
+/*! Slice: mp_cr_base_ad_init:*/
+#define MP_CR_BASE_AD_INIT
+#define MP_CR_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MP_CR_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mp_cr_size_init (0x00001350)*/
+/*! Slice: mp_cr_size_init:*/
+#define MP_CR_SIZE_INIT
+#define MP_CR_SIZE_INIT_MASK 0x0FFFFFF0U
+#define MP_CR_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mp_cr_offs_cnt_init (0x00001354)*/
+/*! Slice: mp_cr_offs_cnt_init:*/
+#define MP_CR_OFFS_CNT_INIT
+#define MP_CR_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define MP_CR_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mp_y_base_ad_init2 (0x00001358)*/
+/*! Slice: mp_y_base_ad_init2:*/
+#define MP_Y_BASE_AD_INIT2
+#define MP_Y_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define MP_Y_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_mp_cb_base_ad_init2 (0x0000135c)*/
+/*! Slice: mp_cb_base_ad_init2:*/
+#define MP_CB_BASE_AD_INIT2
+#define MP_CB_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define MP_CB_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_mp_cr_base_ad_init2 (0x00001360)*/
+/*! Slice: mp_cr_base_ad_init2:*/
+#define MP_CR_BASE_AD_INIT2
+#define MP_CR_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define MP_CR_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_mp_y_offs_cnt_start (0x00001364)*/
+/*! Slice: mp_y_offs_cnt_start:*/
+#define MP_Y_OFFS_CNT_START
+#define MP_Y_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define MP_Y_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mp_cb_offs_cnt_start (0x00001368)*/
+/*! Slice: mp_cb_offs_cnt_start:*/
+#define MP_CB_OFFS_CNT_START
+#define MP_CB_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define MP_CB_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mp_cr_offs_cnt_start (0x0000136c)*/
+/*! Slice: mp_cr_offs_cnt_start:*/
+#define MP_CR_OFFS_CNT_START
+#define MP_CR_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define MP_CR_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mp_y_base_ad_shd (0x00001370)*/
+/*! Slice: mp_y_base_ad:*/
+#define MP_Y_BASE_AD
+#define MP_Y_BASE_AD_MASK 0xFFFFFFF0U
+#define MP_Y_BASE_AD_SHIFT 4U
+/*! Register: miv2_mp_y_size_shd (0x00001374)*/
+/*! Slice: mp_y_size:*/
+#define MP_Y_SIZE
+#define MP_Y_SIZE_MASK 0x1FFFFFF0U
+#define MP_Y_SIZE_SHIFT 4U
+/*! Register: miv2_mp_y_offs_cnt_shd (0x00001378)*/
+/*! Slice: mp_y_offs_cnt:*/
+#define MP_Y_OFFS_CNT
+#define MP_Y_OFFS_CNT_MASK 0x1FFFFFF0U
+#define MP_Y_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mp_cb_base_ad_shd (0x0000137c)*/
+/*! Slice: mp_cb_base_ad:*/
+#define MP_CB_BASE_AD
+#define MP_CB_BASE_AD_MASK 0xFFFFFFF0U
+#define MP_CB_BASE_AD_SHIFT 4U
+/*! Register: miv2_mp_cb_size_shd (0x00001380)*/
+/*! Slice: mp_cb_size:*/
+#define MP_CB_SIZE
+#define MP_CB_SIZE_MASK 0x0FFFFFF0U
+#define MP_CB_SIZE_SHIFT 4U
+/*! Register: miv2_mp_cb_offs_cnt_shd (0x00001384)*/
+/*! Slice: mp_cb_offs_cnt:*/
+#define MP_CB_OFFS_CNT
+#define MP_CB_OFFS_CNT_MASK 0x0FFFFFF0U
+#define MP_CB_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mp_cr_base_ad_shd (0x00001388)*/
+/*! Slice: mp_cr_base_ad:*/
+#define MP_CR_BASE_AD
+#define MP_CR_BASE_AD_MASK 0xFFFFFFF0U
+#define MP_CR_BASE_AD_SHIFT 4U
+/*! Register: miv2_mp_cr_size_shd (0x0000138c)*/
+/*! Slice: mp_cr_size:*/
+#define MP_CR_SIZE
+#define MP_CR_SIZE_MASK 0x0FFFFFF0U
+#define MP_CR_SIZE_SHIFT 4U
+/*! Register: miv2_mp_cr_offs_cnt_shd (0x00001390)*/
+/*! Slice: mp_cr_offs_cnt:*/
+#define MP_CR_OFFS_CNT
+#define MP_CR_OFFS_CNT_MASK 0x0FFFFFF0U
+#define MP_CR_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mp_raw_base_ad_init (0x00001394)*/
+/*! Slice: mp_raw_base_ad_init:*/
+#define MP_RAW_BASE_AD_INIT
+#define MP_RAW_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MP_RAW_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mp_raw_size_init (0x00001398)*/
+/*! Slice: mp_raw_size_init:*/
+#define MP_RAW_SIZE_INIT
+#define MP_RAW_SIZE_INIT_MASK 0x1FFFFFF0U
+#define MP_RAW_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mp_raw_offs_cnt_init (0x0000139c)*/
+/*! Slice: mp_raw_offs_cnt_init:*/
+#define MP_RAW_OFFS_CNT_INIT
+#define MP_RAW_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define MP_RAW_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mp_raw_llength (0x000013a0)*/
+/*! Slice: mp_raw_llengh:*/
+#define MP_RAW_LLENGH
+#define MP_RAW_LLENGH_MASK 0x00007FFFU
+#define MP_RAW_LLENGH_SHIFT 0U
+/*! Register: miv2_mp_raw_pic_width (0x000013a4)*/
+/*! Slice: mp_raw_pic_width:*/
+#define MP_RAW_PIC_WIDTH
+#define MP_RAW_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MP_RAW_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mp_raw_pic_height (0x000013a8)*/
+/*! Slice: mp_raw_pic_height:*/
+#define MP_RAW_PIC_HEIGHT
+#define MP_RAW_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MP_RAW_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_mp_raw_pic_size (0x000013ac)*/
+/*! Slice: mp_raw_pic_size:*/
+#define MP_RAW_PIC_SIZE
+#define MP_RAW_PIC_SIZE_MASK 0xFFFFFFFFU
+#define MP_RAW_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mp_raw_offs_cnt_start (0x000013b0)*/
+/*! Slice: mp_raw_offs_cnt_start:*/
+#define MP_RAW_OFFS_CNT_START
+#define MP_RAW_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define MP_RAW_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mp_raw_base_ad_shd (0x000013b4)*/
+/*! Slice: mp_raw_base_ad:*/
+#define MP_RAW_BASE_AD
+#define MP_RAW_BASE_AD_MASK 0xFFFFFFF0U
+#define MP_RAW_BASE_AD_SHIFT 4U
+/*! Register: miv2_mp_raw_size_shd (0x000013b8)*/
+/*! Slice: mp_raw_size:*/
+#define MP_RAW_SIZE
+#define MP_RAW_SIZE_MASK 0x1FFFFFF0U
+#define MP_RAW_SIZE_SHIFT 4U
+/*! Register: miv2_mp_raw_offs_cnt_shd (0x000013bc)*/
+/*! Slice: mp_raw_offs_cnt:*/
+#define MP_RAW_OFFS_CNT
+#define MP_RAW_OFFS_CNT_MASK 0x1FFFFFF0U
+#define MP_RAW_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mp_jdp_base_ad_init (0x000013c0)*/
+/*! Slice: mp_jdp_base_ad_init:*/
+#define MP_JDP_BASE_AD_INIT
+#define MP_JDP_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MP_JDP_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mp_jdp_size_init (0x000013c4)*/
+/*! Slice: mp_jdp_size_init:*/
+#define MP_JDP_SIZE_INIT
+#define MP_JDP_SIZE_INIT_MASK 0x1FFFFFF0U
+#define MP_JDP_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mp_jdp_offs_cnt_init (0x000013c8)*/
+/*! Slice: mp_jdp_offs_cnt_init:*/
+#define MP_JDP_OFFS_CNT_INIT
+#define MP_JDP_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define MP_JDP_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mp_jdp_llength (0x000013cc)*/
+/*! Slice: mp_jdp_llengh:*/
+#define MP_JDP_LLENGH
+#define MP_JDP_LLENGH_MASK 0x00007FFFU
+#define MP_JDP_LLENGH_SHIFT 0U
+/*! Register: miv2_mp_jdp_pic_width (0x000013d0)*/
+/*! Slice: mp_jdp_pic_width:*/
+#define MP_JDP_PIC_WIDTH
+#define MP_JDP_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MP_JDP_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mp_jdp_pic_height (0x000013d4)*/
+/*! Slice: mp_jdp_pic_height:*/
+#define MP_JDP_PIC_HEIGHT
+#define MP_JDP_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MP_JDP_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_mp_jdp_pic_size (0x000013d8)*/
+/*! Slice: mp_jdp_pic_size:*/
+#define MP_JDP_PIC_SIZE
+#define MP_JDP_PIC_SIZE_MASK 0xFFFFFFFFU
+#define MP_JDP_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mp_jdp_offs_cnt_start (0x000013dc)*/
+/*! Slice: mp_jdp_offs_cnt_start:*/
+#define MP_JDP_OFFS_CNT_START
+#define MP_JDP_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define MP_JDP_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mp_jdp_base_ad_shd (0x000013e0)*/
+/*! Slice: mp_jdp_base_ad:*/
+#define MP_JDP_BASE_AD
+#define MP_JDP_BASE_AD_MASK 0xFFFFFFF0U
+#define MP_JDP_BASE_AD_SHIFT 4U
+/*! Register: miv2_mp_jdp_size_shd (0x000013e4)*/
+/*! Slice: mp_jdp_size:*/
+#define MP_JDP_SIZE
+#define MP_JDP_SIZE_MASK 0x1FFFFFF0U
+#define MP_JDP_SIZE_SHIFT 4U
+/*! Register: miv2_mp_jdp_offs_cnt_shd (0x000013e8)*/
+/*! Slice: mp_jdp_offs_cnt:*/
+#define MP_JDP_OFFS_CNT
+#define MP_JDP_OFFS_CNT_MASK 0x1FFFFFF0U
+#define MP_JDP_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mp_status_clr (0x000013ec) */
+/*! Slice: mp_jdp_fifo_full: */
+#define MP_JDP_FIFO_FULL
+#define MP_JDP_FIFO_FULL_MASK 0x00000010U
+#define MP_JDP_FIFO_FULL_SHIFT 4U
+/*! Slice: mp_raw_fifo_full:*/
+#define MP_RAW_FIFO_FULL
+#define MP_RAW_FIFO_FULL_MASK 0x00000008U
+#define MP_RAW_FIFO_FULL_SHIFT 3U
+/*! Slice: mp_cr_fifo_full:*/
+#define MP_CR_FIFO_FULL
+#define MP_CR_FIFO_FULL_MASK 0x00000004U
+#define MP_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: mp_cb_fifo_full:*/
+#define MP_CB_FIFO_FULL
+#define MP_CB_FIFO_FULL_MASK 0x00000002U
+#define MP_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: mp_y_fifo_full:*/
+#define MP_Y_FIFO_FULL
+#define MP_Y_FIFO_FULL_MASK 0x00000001U
+#define MP_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_mp_ctrl_status (0x000013f0) */
+/*! Slice: mp_jdp_fifo_full: */
+#define MP_JDP_FIFO_FULL
+#define MP_JDP_FIFO_FULL_MASK 0x00000010U
+#define MP_JDP_FIFO_FULL_SHIFT 4U
+/*! Slice: mp_raw_fifo_full: */
+#define MP_RAW_FIFO_FULL
+#define MP_RAW_FIFO_FULL_MASK 0x00000008U
+#define MP_RAW_FIFO_FULL_SHIFT 3U
+/*! Slice: mp_cr_fifo_full: */
+#define MP_CR_FIFO_FULL
+#define MP_CR_FIFO_FULL_MASK 0x00000004U
+#define MP_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: mp_cb_fifo_full: */
+#define MP_CB_FIFO_FULL
+#define MP_CB_FIFO_FULL_MASK 0x00000002U
+#define MP_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: mp_y_fifo_full: */
+#define MP_Y_FIFO_FULL
+#define MP_Y_FIFO_FULL_MASK 0x00000001U
+#define MP_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_mp_axi_status (0x000013f4) */
+/*! Slice: agsw_enc_pic_rdy: */
+#define AGSW_ENC_PIC_RDY
+#define AGSW_ENC_PIC_RDY_MASK 0x00000002U
+#define AGSW_ENC_PIC_RDY_SHIFT 1U
+/*! Slice: agsw_enc_buf_full:*/
+#define AGSW_ENC_BUF_FULL
+#define AGSW_ENC_BUF_FULL_MASK 0x00000001U
+#define AGSW_ENC_BUF_FULL_SHIFT 0U
+/*! Register: miv2_mp_raw_byte_cnt_status (0x000013f8)*/
+/*! Slice: mp_raw_byte_cnt_status:*/
+#define MP_RAW_BYTE_CNT_STATUS
+#define MP_RAW_BYTE_CNT_STATUS_MASK 0x0FFFFFFFU
+#define MP_RAW_BYTE_CNT_STATUS_SHIFT 0U
+/*! Register: miv2_mp_jdp_byte_cnt_status (0x000013fc)*/
+/*! Slice: mp_jdp_byte_cnt_status:*/
+#define MP_JDP_BYTE_CNT_STATUS
+#define MP_JDP_BYTE_CNT_STATUS_MASK 0x0FFFFFFFU
+#define MP_JDP_BYTE_CNT_STATUS_SHIFT 0U
+/*! Register: miv2_mp_dp_byte_cnt_status (0x00001400)*/
+/*! Slice: mp_dp_byte_cnt_status:*/
+#define MP_DP_BYTE_CNT_STATUS
+#define MP_DP_BYTE_CNT_STATUS_MASK 0x0FFFFFFFU
+#define MP_DP_BYTE_CNT_STATUS_SHIFT 0U
+/*! Register: miv2_sp1_ctrl (0x0000142c)*/
+/*! Slice: sp1_init_offset_en:*/
+#define SP1_INIT_OFFSET_EN
+#define SP1_INIT_OFFSET_EN_MASK 0x00000020U
+#define SP1_INIT_OFFSET_EN_SHIFT 5U
+/*! Slice: sp1_init_base_en:*/
+#define SP1_INIT_BASE_EN
+#define SP1_INIT_BASE_EN_MASK 0x00000010U
+#define SP1_INIT_BASE_EN_SHIFT 4U
+/*! Slice: sp1_miv2_cfg_upd:*/
+#define SP1_MI_CFG_UPD
+#define SP1_MI_CFG_UPD_MASK 0x00000008U
+#define SP1_MI_CFG_UPD_SHIFT 3U
+/*! Slice: sp1_miv2_skip:*/
+#define SP1_MI_SKIP
+#define SP1_MI_SKIP_MASK 0x00000004U
+#define SP1_MI_SKIP_SHIFT 2U
+/*! Slice: sp1_auto_update:*/
+#define SP1_AUTO_UPDATE
+#define SP1_AUTO_UPDATE_MASK 0x00000002U
+#define SP1_AUTO_UPDATE_SHIFT 1U
+/*! Slice: sp1_pingpong_enable:*/
+#define SP1_PINGPONG_ENABLE
+#define SP1_PINGPONG_ENABLE_MASK 0x00000001U
+#define SP1_PINGPONG_ENABLE_SHIFT 0U
+/*! Register: miv2_sp1_fmt (0x00001430)*/
+/*! Slice: sp1_wr_yuv_nvy:*/
+#define SP1_WR_YUV_NVY
+#define SP1_WR_YUV_NVY_MASK 0x00000180U
+#define SP1_WR_YUV_NVY_SHIFT 7U
+/*! Slice: sp1_wr_yuv_nv21:*/
+#define SP1_WR_YUV_NV21
+#define SP1_WR_YUV_NV21_MASK 0x00000040U
+#define SP1_WR_YUV_NV21_SHIFT 6U
+/*! Slice: sp1_wr_yuv_aligned:*/
+#define SP1_WR_YUV_ALIGNED
+#define SP1_WR_YUV_ALIGNED_MASK 0x00000020U
+#define SP1_WR_YUV_ALIGNED_SHIFT 5U
+/*! Slice: sp1_wr_yuv_str:*/
+#define SP1_WR_YUV_STR
+#define SP1_WR_YUV_STR_MASK 0x00000018U
+#define SP1_WR_YUV_STR_SHIFT 3U
+/*! Slice: sp1_wr_yuv_fmt:*/
+#define SP1_WR_YUV_FMT
+#define SP1_WR_YUV_FMT_MASK 0x00000006U
+#define SP1_WR_YUV_FMT_SHIFT 1U
+/*! Slice: sp1_wr_yuv_bit:*/
+#define SP1_WR_YUV_BIT
+#define SP1_WR_YUV_BIT_MASK 0x00000001U
+#define SP1_WR_YUV_BIT_SHIFT 0U
+/*! Register: miv2_sp1_bus_cfg (0x00001434)*/
+/*! Slice: sp1_wr_swap_v:*/
+#define SP1_WR_SWAP_V
+#define SP1_WR_SWAP_V_MASK 0x000F0000U
+#define SP1_WR_SWAP_V_SHIFT 16U
+/*! Slice: sp1_wr_swap_u:*/
+#define SP1_WR_SWAP_U
+#define SP1_WR_SWAP_U_MASK 0x0000F000U
+#define SP1_WR_SWAP_U_SHIFT 12U
+/*! Slice: sp1_wr_swap_y:*/
+#define SP1_WR_SWAP_Y
+#define SP1_WR_SWAP_Y_MASK 0x00000F00U
+#define SP1_WR_SWAP_Y_SHIFT 8U
+/*! Slice: sp1_rd_issue_cap:*/
+#define SP1_RD_ISSUE_CAP
+#define SP1_RD_ISSUE_CAP_MASK 0x000000C0U
+#define SP1_RD_ISSUE_CAP_SHIFT 6U
+/*! Slice: sp1_wr_issue_cap:*/
+#define SP1_WR_ISSUE_CAP
+#define SP1_WR_ISSUE_CAP_MASK 0x00000030U
+#define SP1_WR_ISSUE_CAP_SHIFT 4U
+/*! Slice: sp1_rd_burst_len:*/
+#define SP1_RD_BURST_LEN
+#define SP1_RD_BURST_LEN_MASK 0x0000000CU
+#define SP1_RD_BURST_LEN_SHIFT 2U
+/*! Slice: sp1_wr_burst_len:*/
+#define SP1_WR_BURST_LEN
+#define SP1_WR_BURST_LEN_MASK 0x00000003U
+#define SP1_WR_BURST_LEN_SHIFT 0U
+/*! Register: miv2_sp1_bus_id (0x00001438)*/
+/*! Slice: sp1_bus_sw_en:*/
+#define SP1_BUS_SW_EN
+#define SP1_BUS_SW_EN_MASK 0x02000000U
+#define SP1_BUS_SW_EN_SHIFT 25U
+
+/*! Slice: sp1_rd_id_en:*/
+#define SP1_RD_ID_EN
+#define SP1_RD_ID_EN_MASK 0x01000000U
+#define SP1_RD_ID_EN_SHIFT 24U
+/*! Slice: sp1_rd_id_cfg:*/
+#define SP1_RD_ID_CFG
+#define SP1_RD_ID_CFG_MASK 0x00FF0000U
+#define SP1_RD_ID_CFG_SHIFT 16U
+/*! Slice: sp1_wr_id_en:*/
+#define SP1_WR_ID_EN
+#define SP1_WR_ID_EN_MASK 0x00000100U
+#define SP1_WR_ID_EN_SHIFT 8U
+/*! Slice: sp1_wr_id_cfg:*/
+#define SP1_WR_ID_CFG
+#define SP1_WR_ID_CFG_MASK 0x000000FFU
+#define SP1_WR_ID_CFG_SHIFT 0U
+/*! Register: miv2_sp1_bus_timeo (0x0000143c)*/
+/*! Slice: sp1_bus_timeo_en:*/
+#define SP1_BUS_TIMEO_EN
+#define SP1_BUS_TIMEO_EN_MASK 0x80000000U
+#define SP1_BUS_TIMEO_EN_SHIFT 31U
+/*! Slice: sp1_bus_timeo:*/
+#define SP1_BUS_TIMEO
+#define SP1_BUS_TIMEO_MASK 0x7FFFFFFFU
+#define SP1_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_sp1_y_base_ad_init (0x00001440)*/
+/*! Slice: sp1_y_base_ad_init:*/
+#define SP1_Y_BASE_AD_INIT
+#define SP1_Y_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP1_Y_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp1_y_size_init (0x00001444)*/
+/*! Slice: sp1_y_size_init:*/
+#define SP1_Y_SIZE_INIT
+#define SP1_Y_SIZE_INIT_MASK 0x1FFFFFF0U
+#define SP1_Y_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp1_y_offs_cnt_init (0x00001448)*/
+/*! Slice: sp1_y_offs_cnt_init:*/
+#define SP1_Y_OFFS_CNT_INIT
+#define SP1_Y_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define SP1_Y_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp1_y_llength (0x0000144c)*/
+/*! Slice: sp1_y_llengh:*/
+#define SP1_Y_LLENGH
+#define SP1_Y_LLENGH_MASK 0x00007FFFU
+#define SP1_Y_LLENGH_SHIFT 0U
+/*! Register: miv2_sp1_y_pic_width (0x00001450)*/
+/*! Slice: sp1_y_pic_width:*/
+#define SP1_Y_PIC_WIDTH
+#define SP1_Y_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define SP1_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_sp1_y_pic_height (0x00001454)*/
+/*! Slice: sp1_y_pic_height:*/
+#define SP1_Y_PIC_HEIGHT
+#define SP1_Y_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define SP1_Y_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_sp1_y_pic_size (0x00001458)*/
+/*! Slice: sp1_y_pic_size:*/
+#define SP1_Y_PIC_SIZE
+#define SP1_Y_PIC_SIZE_MASK 0xFFFFFFFFU
+#define SP1_Y_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_sp1_cb_base_ad_init (0x0000145c)*/
+/*! Slice: sp1_cb_base_ad_init:*/
+#define SP1_CB_BASE_AD_INIT
+#define SP1_CB_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP1_CB_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp1_cb_size_init (0x00001460)*/
+/*! Slice: sp1_cb_size_init:*/
+#define SP1_CB_SIZE_INIT
+#define SP1_CB_SIZE_INIT_MASK 0x0FFFFFF0U
+#define SP1_CB_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp1_cb_offs_cnt_init (0x00001464)*/
+/*! Slice: sp1_cb_offs_cnt_init:*/
+#define SP1_CB_OFFS_CNT_INIT
+#define SP1_CB_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define SP1_CB_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp1_cr_base_ad_init (0x00001468)*/
+/*! Slice: sp1_cr_base_ad_init:*/
+#define SP1_CR_BASE_AD_INIT
+#define SP1_CR_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP1_CR_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp1_cr_size_init (0x0000146c)*/
+/*! Slice: sp1_cr_size_init:*/
+#define SP1_CR_SIZE_INIT
+#define SP1_CR_SIZE_INIT_MASK 0x0FFFFFF0U
+#define SP1_CR_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp1_cr_offs_cnt_init (0x00001470)*/
+/*! Slice: sp1_cr_offs_cnt_init:*/
+#define SP1_CR_OFFS_CNT_INIT
+#define SP1_CR_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define SP1_CR_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp1_y_base_ad_init2 (0x00001474)*/
+/*! Slice: sp1_y_base_ad_init2:*/
+#define SP1_Y_BASE_AD_INIT2
+#define SP1_Y_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP1_Y_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp1_cb_base_ad_init2 (0x00001478)*/
+/*! Slice: sp1_cb_base_ad_init2:*/
+#define SP1_CB_BASE_AD_INIT2
+#define SP1_CB_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP1_CB_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp1_cr_base_ad_init2 (0x0000147c)*/
+/*! Slice: sp1_cr_base_ad_init2:*/
+#define SP1_CR_BASE_AD_INIT2
+#define SP1_CR_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP1_CR_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp1_y_offs_cnt_start (0x00001480)*/
+/*! Slice: sp1_y_offs_cnt_start:*/
+#define SP1_Y_OFFS_CNT_START
+#define SP1_Y_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define SP1_Y_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp1_cb_offs_cnt_start (0x00001484)*/
+/*! Slice: sp1_cb_offs_cnt_start:*/
+#define SP1_CB_OFFS_CNT_START
+#define SP1_CB_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define SP1_CB_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp1_cr_offs_cnt_start (0x00001488)*/
+/*! Slice: sp1_cr_offs_cnt_start:*/
+#define SP1_CR_OFFS_CNT_START
+#define SP1_CR_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define SP1_CR_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp1_y_base_ad_shd (0x0000148c)*/
+/*! Slice: sp1_y_base_ad:*/
+#define SP1_Y_BASE_AD
+#define SP1_Y_BASE_AD_MASK 0xFFFFFFF0U
+#define SP1_Y_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp1_y_size_shd (0x00001490)*/
+/*! Slice: sp1_y_size:*/
+#define SP1_Y_SIZE
+#define SP1_Y_SIZE_MASK 0x1FFFFFF0U
+#define SP1_Y_SIZE_SHIFT 4U
+/*! Register: miv2_sp1_y_offs_cnt_shd (0x00001494)*/
+/*! Slice: sp1_y_offs_cnt:*/
+#define SP1_Y_OFFS_CNT
+#define SP1_Y_OFFS_CNT_MASK 0x1FFFFFF0U
+#define SP1_Y_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp1_cb_base_ad_shd (0x00001498)*/
+/*! Slice: sp1_cb_base_ad:*/
+#define SP1_CB_BASE_AD
+#define SP1_CB_BASE_AD_MASK 0xFFFFFFF0U
+#define SP1_CB_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp1_cb_size_shd (0x0000149c)*/
+/*! Slice: sp1_cb_size:*/
+#define SP1_CB_SIZE
+#define SP1_CB_SIZE_MASK 0x0FFFFFF0U
+#define SP1_CB_SIZE_SHIFT 4U
+/*! Register: miv2_sp1_cb_offs_cnt_shd (0x000014a0)*/
+/*! Slice: sp1_cb_offs_cnt:*/
+#define SP1_CB_OFFS_CNT
+#define SP1_CB_OFFS_CNT_MASK 0x0FFFFFF0U
+#define SP1_CB_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp1_cr_base_ad_shd (0x000014a4)*/
+/*! Slice: sp1_cr_base_ad:*/
+#define SP1_CR_BASE_AD
+#define SP1_CR_BASE_AD_MASK 0xFFFFFFF0U
+#define SP1_CR_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp1_cr_size_shd (0x000014a8)*/
+/*! Slice: sp1_cr_size:*/
+#define SP1_CR_SIZE
+#define SP1_CR_SIZE_MASK 0x0FFFFFF0U
+#define SP1_CR_SIZE_SHIFT 4U
+/*! Register: miv2_sp1_cr_offs_cnt_shd (0x000014ac)*/
+/*! Slice: sp1_cr_offs_cnt:*/
+#define SP1_CR_OFFS_CNT
+#define SP1_CR_OFFS_CNT_MASK 0x0FFFFFF0U
+#define SP1_CR_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp1_status_clr (0x000014b0)*/
+/*! Slice: sp1_cr_fifo_full:*/
+#define SP1_CR_FIFO_FULL
+#define SP1_CR_FIFO_FULL_MASK 0x00000004U
+#define SP1_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: sp1_cb_fifo_full:*/
+#define SP1_CB_FIFO_FULL
+#define SP1_CB_FIFO_FULL_MASK 0x00000002U
+#define SP1_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: sp1_y_fifo_full:*/
+#define SP1_Y_FIFO_FULL
+#define SP1_Y_FIFO_FULL_MASK 0x00000001U
+#define SP1_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_sp1_ctrl_status (0x000014b4)*/
+/*! Slice: sp1_cr_fifo_full:*/
+#define SP1_CR_FIFO_FULL
+#define SP1_CR_FIFO_FULL_MASK 0x00000004U
+#define SP1_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: sp1_cb_fifo_full:*/
+#define SP1_CB_FIFO_FULL
+#define SP1_CB_FIFO_FULL_MASK 0x00000002U
+#define SP1_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: sp1_y_fifo_full:*/
+#define SP1_Y_FIFO_FULL
+#define SP1_Y_FIFO_FULL_MASK 0x00000001U
+#define SP1_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_sp1_axi_status (0x000014b8)*/
+/*! Slice: agsw_enc_pic_rdy:*/
+#define AGSW_ENC_PIC_RDY
+#define AGSW_ENC_PIC_RDY_MASK 0x00000002U
+#define AGSW_ENC_PIC_RDY_SHIFT 1U
+/*! Slice: agsw_enc_buf_full:*/
+#define AGSW_ENC_BUF_FULL
+#define AGSW_ENC_BUF_FULL_MASK 0x00000001U
+#define AGSW_ENC_BUF_FULL_SHIFT 0U
+/*! Register: miv2_sp2_ctrl (0x000014e4)*/
+/*! Slice: sp2_rd_raw_cfg_update */
+#define SP2_RD_RAW_CFG_UPDATE
+#define SP2_RD_RAW_CFG_UPDATE_MASK 0x00000200U
+#define SP2_RD_RAW_CFG_UPDATE_SHIFT 9U
+/*! Slice: sp2_rd_raw_auto_update */
+#define SP2_RD_RAW_AUTO_UPDATE
+#define SP2_RD_RAW_AUTO_UPDATE_MASK 0x00000100U
+#define SP2_RD_RAW_AUTO_UPDATE_SHIFT 8U
+/*! Slice: sp2_rd_yuv_cfg_update */
+#define SP2_RD_YUV_CFG_UPDATE
+#define SP2_RD_YUV_CFG_UPDATE_MASK 0x00000080U
+#define SP2_RD_YUV_CFG_UPDATE_SHIFT 7U
+/*! Slice: sp2_rd_yuv_auto_update */
+#define SP2_RD_YUV_AUTO_UPDATE
+#define SP2_RD_YUV_AUTO_UPDATE_MASK 0x00000040U
+#define SP2_RD_YUV_AUTO_UPDATE_SHIFT 6U
+/*! Slice: sp2_init_offset_en:*/
+#define SP2_INIT_OFFSET_EN
+#define SP2_INIT_OFFSET_EN_MASK 0x00000020U
+#define SP2_INIT_OFFSET_EN_SHIFT 5U
+/*! Slice: sp2_init_base_en:*/
+#define SP2_INIT_BASE_EN
+#define SP2_INIT_BASE_EN_MASK 0x00000010U
+#define SP2_INIT_BASE_EN_SHIFT 4U
+/*! Slice: sp2_miv2_cfg_upd:*/
+#define SP2_MI_CFG_UPD
+#define SP2_MI_CFG_UPD_MASK 0x00000008U
+#define SP2_MI_CFG_UPD_SHIFT 3U
+/*! Slice: sp2_miv2_skip:*/
+#define SP2_MI_SKIP
+#define SP2_MI_SKIP_MASK 0x00000004U
+#define SP2_MI_SKIP_SHIFT 2U
+/*! Slice: sp2_auto_update:*/
+#define SP2_AUTO_UPDATE
+#define SP2_AUTO_UPDATE_MASK 0x00000002U
+#define SP2_AUTO_UPDATE_SHIFT 1U
+/*! Slice: sp2_pingpong_enable:*/
+#define SP2_PINGPONG_ENABLE
+#define SP2_PINGPONG_ENABLE_MASK 0x00000001U
+#define SP2_PINGPONG_ENABLE_SHIFT 0U
+/*! Register: miv2_sp2_fmt (0x000014e8)*/
+/*! Slice: sp2_rd_yuv_nvy:*/
+#define SP2_RD_YUV_NVY
+#define SP2_RD_YUV_NVY_MASK 0x0C000000U
+#define SP2_RD_YUV_NVY_SHIFT 26U
+/*! Slice: sp2_rd_yuv_nv21:*/
+#define SP2_RD_YUV_NV21
+#define SP2_RD_YUV_NV21_MASK 0x02000000U
+#define SP2_RD_YUV_NV21_SHIFT 25U
+/*! Slice: sp2_rd_raw_aligned:*/
+#define SP2_RD_RAW_ALIGNED
+#define SP2_RD_RAW_ALIGNED_MASK 0x01800000U
+#define SP2_RD_RAW_ALIGNED_SHIFT 23U
+/*! Slice: sp2_rd_yuv_aligned:*/
+#define SP2_RD_YUV_ALIGNED
+#define SP2_RD_YUV_ALIGNED_MASK 0x00400000U
+#define SP2_RD_YUV_ALIGNED_SHIFT 22U
+/*! Slice: sp2_rd_raw_bit:*/
+#define SP2_RD_RAW_BIT
+#define SP2_RD_RAW_BIT_MASK 0x00380000U
+#define SP2_RD_RAW_BIT_SHIFT 19U
+/*! Slice: sp2_rd_yuv_str:*/
+#define SP2_RD_YUV_STR
+#define SP2_RD_YUV_STR_MASK 0x00060000U
+#define SP2_RD_YUV_STR_SHIFT 17U
+/*! Slice: sp2_rd_yuv_fmt:*/
+#define SP2_RD_YUV_FMT
+#define SP2_RD_YUV_FMT_MASK 0x00018000U
+#define SP2_RD_YUV_FMT_SHIFT 15U
+/*! Slice: sp2_rd_yuv_bit:*/
+#define SP2_RD_YUV_BIT
+#define SP2_RD_YUV_BIT_MASK 0x00004000U
+#define SP2_RD_YUV_BIT_SHIFT 14U
+/*! Slice: sp2_wr_yuv_nvy:*/
+#define SP2_WR_YUV_NVY
+#define SP2_WR_YUV_NVY_MASK 0x00003000U
+#define SP2_WR_YUV_NVY_SHIFT 12U
+/*! Slice: sp2_wr_yuv_nv21:*/
+#define SP2_WR_YUV_NV21
+#define SP2_WR_YUV_NV21_MASK 0x00000800U
+#define SP2_WR_YUV_NV21_SHIFT 11U
+/*! Slice: sp2_wr_raw_aligned:*/
+#define SP2_WR_RAW_ALIGNED
+#define SP2_WR_RAW_ALIGNED_MASK 0x00000600U
+#define SP2_WR_RAW_ALIGNED_SHIFT 9U
+/*! Slice: sp2_wr_yuv_aligned:*/
+#define SP2_WR_YUV_ALIGNED
+#define SP2_WR_YUV_ALIGNED_MASK 0x00000100U
+#define SP2_WR_YUV_ALIGNED_SHIFT 8U
+/*! Slice: sp2_wr_raw_bit:*/
+#define SP2_WR_RAW_BIT
+#define SP2_WR_RAW_BIT_MASK 0x000000E0U
+#define SP2_WR_RAW_BIT_SHIFT 5U
+/*! Slice: sp2_wr_yuv_str:*/
+#define SP2_WR_YUV_STR
+#define SP2_WR_YUV_STR_MASK 0x00000018U
+#define SP2_WR_YUV_STR_SHIFT 3U
+/*! Slice: sp2_wr_yuv_fmt:*/
+#define SP2_WR_YUV_FMT
+#define SP2_WR_YUV_FMT_MASK 0x00000006U
+#define SP2_WR_YUV_FMT_SHIFT 1U
+/*! Slice: sp2_wr_yuv_bit:*/
+#define SP2_WR_YUV_BIT
+#define SP2_WR_YUV_BIT_MASK 0x00000001U
+#define SP2_WR_YUV_BIT_SHIFT 0U
+/*! Register: miv2_sp2_bus_cfg (0x000014ec)*/
+/*! Slice: sp2_rd_swap_raw:*/
+#define SP2_RD_SWAP_RAW
+#define SP2_RD_SWAP_RAW_MASK 0xF0000000U
+#define SP2_RD_SWAP_RAW_SHIFT 28U
+/*! Slice: sp2_rd_swap_v:*/
+#define SP2_RD_SWAP_V
+#define SP2_RD_SWAP_V_MASK 0x0F000000U
+#define SP2_RD_SWAP_V_SHIFT 24U
+/*! Slice: sp2_rd_swap_u:*/
+#define SP2_RD_SWAP_U
+#define SP2_RD_SWAP_U_MASK 0x00F00000U
+#define SP2_RD_SWAP_U_SHIFT 20U
+/*! Slice: sp2_rd_swap_y:*/
+#define SP2_RD_SWAP_Y
+#define SP2_RD_SWAP_Y_MASK 0x000F0000U
+#define SP2_RD_SWAP_Y_SHIFT 16U
+/*! Slice: sp2_wr_swap_raw:*/
+#define SP2_WR_SWAP_RAW
+#define SP2_WR_SWAP_RAW_MASK 0x0000F000U
+#define SP2_WR_SWAP_RAW_SHIFT 12U
+/*! Slice: sp2_wr_swap_v:*/
+#define SP2_WR_SWAP_V
+#define SP2_WR_SWAP_V_MASK 0x00000F00U
+#define SP2_WR_SWAP_V_SHIFT 8U
+/*! Slice: sp2_wr_swap_u:*/
+#define SP2_WR_SWAP_U
+#define SP2_WR_SWAP_U_MASK 0x000000F0U
+#define SP2_WR_SWAP_U_SHIFT 4U
+/*! Slice: sp2_wr_swap_y:*/
+#define SP2_WR_SWAP_Y
+#define SP2_WR_SWAP_Y_MASK 0x0000000FU
+#define SP2_WR_SWAP_Y_SHIFT 0U
+/*! Register: miv2_sp2_bus_id (0x000014f0)*/
+/*! Slice: sp2_bus_sw_en:*/
+#define SP2_BUS_SW_EN
+#define SP2_BUS_SW_EN_MASK 0x08000000U
+#define SP2_BUS_SW_EN_SHIFT 27U
+/*! Slice: sp2_rd_issue_cap:*/
+#define SP2_RD_ISSUE_CAP
+#define SP2_RD_ISSUE_CAP_MASK 0x06000000U
+#define SP2_RD_ISSUE_CAP_SHIFT 25U
+/*! Slice: sp2_wr_issue_cap:*/
+#define SP2_WR_ISSUE_CAP
+#define SP2_WR_ISSUE_CAP_MASK 0x01800000U
+#define SP2_WR_ISSUE_CAP_SHIFT 23U
+/*! Slice: sp2_rd_burst_len:*/
+#define SP2_RD_BURST_LEN
+#define SP2_RD_BURST_LEN_MASK 0x00600000U
+#define SP2_RD_BURST_LEN_SHIFT 21U
+/*! Slice: sp2_wr_burst_len:*/
+#define SP2_WR_BURST_LEN
+#define SP2_WR_BURST_LEN_MASK 0x00180000U
+#define SP2_WR_BURST_LEN_SHIFT 19U
+/*! Slice: sp2_rd_id_en:*/
+#define SP2_RD_ID_EN
+#define SP2_RD_ID_EN_MASK 0x00040000U
+#define SP2_RD_ID_EN_SHIFT 18U
+/*! Slice: sp2_rd_id_cfg:*/
+#define SP2_RD_ID_CFG
+#define SP2_RD_ID_CFG_MASK 0x0003FC00U
+#define SP2_RD_ID_CFG_SHIFT 10U
+/*! Slice: sp2_wr_id_en:*/
+#define SP2_WR_ID_EN
+#define SP2_WR_ID_EN_MASK 0x00000100U
+#define SP2_WR_ID_EN_SHIFT 8U
+/*! Slice: sp2_wr_id_cfg:*/
+#define SP2_WR_ID_CFG
+#define SP2_WR_ID_CFG_MASK 0x000000FFU
+#define SP2_WR_ID_CFG_SHIFT 0U
+/*! Register: miv2_sp2_bus_timeo (0x000014f4)*/
+/*! Slice: sp2_bus_timeo_en:*/
+#define SP2_BUS_TIMEO_EN
+#define SP2_BUS_TIMEO_EN_MASK 0x80000000U
+#define SP2_BUS_TIMEO_EN_SHIFT 31U
+/*! Slice: sp2_bus_timeo:*/
+#define SP2_BUS_TIMEO
+#define SP2_BUS_TIMEO_MASK 0x7FFFFFFFU
+#define SP2_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_sp2_y_base_ad_init (0x000014f8)*/
+/*! Slice: sp2_y_base_ad_init:*/
+#define SP2_Y_BASE_AD_INIT
+#define SP2_Y_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP2_Y_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp2_y_size_init (0x000014fc)*/
+/*! Slice: sp2_y_size_init:*/
+#define SP2_Y_SIZE_INIT
+#define SP2_Y_SIZE_INIT_MASK 0x1FFFFFF0U
+#define SP2_Y_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp2_y_offs_cnt_init (0x00001500)*/
+/*! Slice: sp2_y_offs_cnt_init:*/
+#define SP2_Y_OFFS_CNT_INIT
+#define SP2_Y_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define SP2_Y_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp2_y_llength (0x00001504)*/
+/*! Slice: sp2_y_llengh:*/
+#define SP2_Y_LLENGH
+#define SP2_Y_LLENGH_MASK 0x00007FFFU
+#define SP2_Y_LLENGH_SHIFT 0U
+/*! Register: miv2_sp2_y_pic_width (0x00001508)*/
+/*! Slice: sp2_y_pic_width:*/
+#define SP2_Y_PIC_WIDTH
+#define SP2_Y_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define SP2_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_sp2_y_pic_height (0x0000150c)*/
+/*! Slice: sp2_y_pic_height:*/
+#define SP2_Y_PIC_HEIGHT
+#define SP2_Y_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define SP2_Y_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_sp2_y_pic_size (0x00001510)*/
+/*! Slice: sp2_y_pic_size:*/
+#define SP2_Y_PIC_SIZE
+#define SP2_Y_PIC_SIZE_MASK 0xFFFFFFFFU
+#define SP2_Y_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_sp2_cb_base_ad_init (0x00001514)*/
+/*! Slice: sp2_cb_base_ad_init:*/
+#define SP2_CB_BASE_AD_INIT
+#define SP2_CB_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP2_CB_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp2_cb_size_init (0x00001518)*/
+/*! Slice: sp2_cb_size_init:*/
+#define SP2_CB_SIZE_INIT
+#define SP2_CB_SIZE_INIT_MASK 0x0FFFFFF0U
+#define SP2_CB_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp2_cb_offs_cnt_init (0x0000151c)*/
+/*! Slice: sp2_cb_offs_cnt_init:*/
+#define SP2_CB_OFFS_CNT_INIT
+#define SP2_CB_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define SP2_CB_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp2_cr_base_ad_init (0x00001520)*/
+/*! Slice: sp2_cr_base_ad_init:*/
+#define SP2_CR_BASE_AD_INIT
+#define SP2_CR_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP2_CR_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp2_cr_size_init (0x00001524)*/
+/*! Slice: sp2_cr_size_init:*/
+#define SP2_CR_SIZE_INIT
+#define SP2_CR_SIZE_INIT_MASK 0x0FFFFFF0U
+#define SP2_CR_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp2_cr_offs_cnt_init (0x00001528)*/
+/*! Slice: sp2_cr_offs_cnt_init:*/
+#define SP2_CR_OFFS_CNT_INIT
+#define SP2_CR_OFFS_CNT_INIT_MASK 0x0FFFFFF0U
+#define SP2_CR_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp2_y_base_ad_init2 (0x0000152c)*/
+/*! Slice: sp2_y_base_ad_init2:*/
+#define SP2_Y_BASE_AD_INIT2
+#define SP2_Y_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP2_Y_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp2_cb_base_ad_init2 (0x00001530)*/
+/*! Slice: sp2_cb_base_ad_init2:*/
+#define SP2_CB_BASE_AD_INIT2
+#define SP2_CB_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP2_CB_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp2_cr_base_ad_init2 (0x00001534)*/
+/*! Slice: sp2_cr_base_ad_init2:*/
+#define SP2_CR_BASE_AD_INIT2
+#define SP2_CR_BASE_AD_INIT2_MASK 0xFFFFFFF0U
+#define SP2_CR_BASE_AD_INIT2_SHIFT 4U
+/*! Register: miv2_sp2_y_offs_cnt_start (0x00001538)*/
+/*! Slice: sp2_y_offs_cnt_start:*/
+#define SP2_Y_OFFS_CNT_START
+#define SP2_Y_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define SP2_Y_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp2_cb_offs_cnt_start (0x0000153c)*/
+/*! Slice: sp2_cb_offs_cnt_start:*/
+#define SP2_CB_OFFS_CNT_START
+#define SP2_CB_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define SP2_CB_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp2_cr_offs_cnt_start (0x00001540)*/
+/*! Slice: sp2_cr_offs_cnt_start:*/
+#define SP2_CR_OFFS_CNT_START
+#define SP2_CR_OFFS_CNT_START_MASK 0x0FFFFFF0U
+#define SP2_CR_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp2_y_base_ad_shd (0x00001544)*/
+/*! Slice: sp2_y_base_ad:*/
+#define SP2_Y_BASE_AD
+#define SP2_Y_BASE_AD_MASK 0xFFFFFFF0U
+#define SP2_Y_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp2_y_size_shd (0x00001548)*/
+/*! Slice: sp2_y_size:*/
+#define SP2_Y_SIZE
+#define SP2_Y_SIZE_MASK 0x1FFFFFF0U
+#define SP2_Y_SIZE_SHIFT 4U
+/*! Register: miv2_sp2_y_offs_cnt_shd (0x0000154c)*/
+/*! Slice: sp2_y_offs_cnt:*/
+#define SP2_Y_OFFS_CNT
+#define SP2_Y_OFFS_CNT_MASK 0x1FFFFFF0U
+#define SP2_Y_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp2_cb_base_ad_shd (0x00001550)*/
+/*! Slice: sp2_cb_base_ad:*/
+#define SP2_CB_BASE_AD
+#define SP2_CB_BASE_AD_MASK 0xFFFFFFF0U
+#define SP2_CB_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp2_cb_size_shd (0x00001554)*/
+/*! Slice: sp2_cb_size:*/
+#define SP2_CB_SIZE
+#define SP2_CB_SIZE_MASK 0x0FFFFFF0U
+#define SP2_CB_SIZE_SHIFT 4U
+/*! Register: miv2_sp2_cb_offs_cnt_shd (0x00001558)*/
+/*! Slice: sp2_cb_offs_cnt:*/
+#define SP2_CB_OFFS_CNT
+#define SP2_CB_OFFS_CNT_MASK 0x0FFFFFF0U
+#define SP2_CB_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp2_cr_base_ad_shd (0x0000155c)*/
+/*! Slice: sp2_cr_base_ad:*/
+#define SP2_CR_BASE_AD
+#define SP2_CR_BASE_AD_MASK 0xFFFFFFF0U
+#define SP2_CR_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp2_cr_size_shd (0x00001560)*/
+/*! Slice: sp2_cr_size:*/
+#define SP2_CR_SIZE
+#define SP2_CR_SIZE_MASK 0x0FFFFFF0U
+#define SP2_CR_SIZE_SHIFT 4U
+/*! Register: miv2_sp2_cr_offs_cnt_shd (0x00001564)*/
+/*! Slice: sp2_cr_offs_cnt:*/
+#define SP2_CR_OFFS_CNT
+#define SP2_CR_OFFS_CNT_MASK 0x0FFFFFF0U
+#define SP2_CR_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp2_raw_base_ad_init (0x00001568)*/
+/*! Slice: sp2_raw_base_ad_init:*/
+#define SP2_RAW_BASE_AD_INIT
+#define SP2_RAW_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define SP2_RAW_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_sp2_raw_size_init (0x0000156c)*/
+/*! Slice: sp2_raw_size_init:*/
+#define SP2_RAW_SIZE_INIT
+#define SP2_RAW_SIZE_INIT_MASK 0x1FFFFFF0U
+#define SP2_RAW_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_sp2_raw_offs_cnt_init (0x00001570)*/
+/*! Slice: sp2_raw_offs_cnt_init:*/
+#define SP2_RAW_OFFS_CNT_INIT
+#define SP2_RAW_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define SP2_RAW_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_sp2_raw_llength (0x00001574)*/
+/*! Slice: sp2_raw_llengh:*/
+#define SP2_RAW_LLENGH
+#define SP2_RAW_LLENGH_MASK 0x00007FFFU
+#define SP2_RAW_LLENGH_SHIFT 0U
+/*! Register: miv2_sp2_raw_pic_width (0x00001578)*/
+/*! Slice: sp2_raw_pic_width:*/
+#define SP2_RAW_PIC_WIDTH
+#define SP2_RAW_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define SP2_RAW_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_sp2_raw_pic_height (0x0000157c)*/
+/*! Slice: sp2_raw_pic_height:*/
+#define SP2_RAW_PIC_HEIGHT
+#define SP2_RAW_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define SP2_RAW_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_sp2_raw_pic_size (0x00001580)*/
+/*! Slice: sp2_raw_pic_size:*/
+#define SP2_RAW_PIC_SIZE
+#define SP2_RAW_PIC_SIZE_MASK 0xFFFFFFFFU
+#define SP2_RAW_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_sp2_raw_offs_cnt_start (0x00001584)*/
+/*! Slice: sp2_raw_offs_cnt_start:*/
+#define SP2_RAW_OFFS_CNT_START
+#define SP2_RAW_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define SP2_RAW_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_sp2_raw_base_ad_shd (0x0000158c)*/
+/*! Slice: sp2_raw_base_ad:*/
+#define SP2_RAW_BASE_AD
+#define SP2_RAW_BASE_AD_MASK 0xFFFFFFF0U
+#define SP2_RAW_BASE_AD_SHIFT 4U
+/*! Register: miv2_sp2_raw_size_shd (0x00001590)*/
+/*! Slice: sp2_raw_size:*/
+#define SP2_RAW_SIZE
+#define SP2_RAW_SIZE_MASK 0x1FFFFFF0U
+#define SP2_RAW_SIZE_SHIFT 4U
+/*! Register: miv2_sp2_raw_offs_cnt_shd (0x00001594)*/
+/*! Slice: sp2_raw_offs_cnt:*/
+#define SP2_RAW_OFFS_CNT
+#define SP2_RAW_OFFS_CNT_MASK 0x1FFFFFF0U
+#define SP2_RAW_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_sp2_dma_y_pic_start_ad (0x00001598)*/
+/*! Slice: sp2_dma_y_pic_start_ad:*/
+#define SP2_DMA_Y_PIC_START_AD
+#define SP2_DMA_Y_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_Y_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_y_pic_width (0x0000159c)*/
+/*! Slice: sp2_dma_y_pic_width:*/
+#define SP2_DMA_Y_PIC_WIDTH
+#define SP2_DMA_Y_PIC_WIDTH_MASK 0x00007FFFU
+#define SP2_DMA_Y_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_sp2_dma_y_pic_llength (0x000015a0)*/
+/*! Slice: sp2_dma_y_pic_llength:*/
+#define SP2_DMA_Y_PIC_LLENGTH
+#define SP2_DMA_Y_PIC_LLENGTH_MASK 0x00007FFFU
+#define SP2_DMA_Y_PIC_LLENGTH_SHIFT 0U
+/*! Register: miv2_sp2_dma_y_pic_size (0x000015a4)*/
+/*! Slice: sp2_dma_y_pic_size:*/
+#define SP2_DMA_Y_PIC_SIZE
+#define SP2_DMA_Y_PIC_SIZE_MASK 0x0FFFFFFFU
+#define SP2_DMA_Y_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_sp2_dma_cb_pic_start_ad (0x000015a8)*/
+/*! Slice: sp2_dma_cb_pic_start_ad:*/
+#define SP2_DMA_CB_PIC_START_AD
+#define SP2_DMA_CB_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_CB_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_cr_pic_start_ad (0x000015ac)*/
+/*! Slice: sp2_dma_cr_pic_start_ad:*/
+#define SP2_DMA_CR_PIC_START_AD
+#define SP2_DMA_CR_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_CR_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_y_pic_start_ad_shd (0x000015b0)*/
+/*! Slice: sp2_dma_y_pic_start_ad:*/
+#define SP2_DMA_Y_PIC_START_AD
+#define SP2_DMA_Y_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_Y_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_cb_pic_start_ad_shd (0x000015b4)*/
+/*! Slice: sp2_dma_cb_pic_start_ad:*/
+#define SP2_DMA_CB_PIC_START_AD
+#define SP2_DMA_CB_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_CB_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_cr_pic_start_ad_shd (0x000015b8)*/
+/*! Slice: sp2_dma_cr_pic_start_ad:*/
+#define SP2_DMA_CR_PIC_START_AD
+#define SP2_DMA_CR_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_CR_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_raw_pic_start_ad (0x000015bc)*/
+/*! Slice: sp2_dma_raw_pic_start_ad:*/
+#define SP2_DMA_RAW_PIC_START_AD
+#define SP2_DMA_RAW_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_RAW_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_dma_raw_pic_width (0x000015c0)*/
+/*! Slice: sp2_dma_raw_pic_width:*/
+#define SP2_DMA_RAW_PIC_WIDTH
+#define SP2_DMA_RAW_PIC_WIDTH_MASK 0x00007FFFU
+#define SP2_DMA_RAW_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_sp2_dma_raw_pic_llength (0x000015c4)*/
+/*! Slice: sp2_dma_raw_pic_llength:*/
+#define SP2_DMA_RAW_PIC_LLENGTH
+#define SP2_DMA_RAW_PIC_LLENGTH_MASK 0x00007FFFU
+#define SP2_DMA_RAW_PIC_LLENGTH_SHIFT 0U
+/*! Register: miv2_sp2_dma_raw_pic_size (0x000015c8)*/
+/*! Slice: sp2_dma_raw_pic_size:*/
+#define SP2_DMA_RAW_PIC_SIZE
+#define SP2_DMA_RAW_PIC_SIZE_MASK 0x0FFFFFFFU
+#define SP2_DMA_RAW_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_sp2_dma_raw_pic_start_ad_shd (0x000015cc)*/
+/*! Slice: sp2_dma_raw_pic_start_ad:*/
+#define SP2_DMA_RAW_PIC_START_AD
+#define SP2_DMA_RAW_PIC_START_AD_MASK 0xFFFFFFF0U
+#define SP2_DMA_RAW_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_sp2_status_clr (0x000015d0)*/
+/*! Slice: sp2_jdp_fifo_full:*/
+#define SP2_JDP_FIFO_FULL
+#define SP2_JDP_FIFO_FULL_MASK 0x00000010U
+#define SP2_JDP_FIFO_FULL_SHIFT 4U
+/*! Slice: sp2_raw_fifo_full:*/
+#define SP2_RAW_FIFO_FULL
+#define SP2_RAW_FIFO_FULL_MASK 0x00000008U
+#define SP2_RAW_FIFO_FULL_SHIFT 3U
+/*! Slice: sp2_cr_fifo_full:*/
+#define SP2_CR_FIFO_FULL
+#define SP2_CR_FIFO_FULL_MASK 0x00000004U
+#define SP2_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: sp2_cb_fifo_full:*/
+#define SP2_CB_FIFO_FULL
+#define SP2_CB_FIFO_FULL_MASK 0x00000002U
+#define SP2_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: sp2_y_fifo_full:*/
+#define SP2_Y_FIFO_FULL
+#define SP2_Y_FIFO_FULL_MASK 0x00000001U
+#define SP2_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_sp2_ctrl_status (0x000015d4)*/
+/*! Slice: sp2_jdp_fifo_full:*/
+#define SP2_JDP_FIFO_FULL
+#define SP2_JDP_FIFO_FULL_MASK 0x00000010U
+#define SP2_JDP_FIFO_FULL_SHIFT 4U
+/*! Slice: sp2_raw_fifo_full:*/
+#define SP2_RAW_FIFO_FULL
+#define SP2_RAW_FIFO_FULL_MASK 0x00000008U
+#define SP2_RAW_FIFO_FULL_SHIFT 3U
+/*! Slice: sp2_cr_fifo_full:*/
+#define SP2_CR_FIFO_FULL
+#define SP2_CR_FIFO_FULL_MASK 0x00000004U
+#define SP2_CR_FIFO_FULL_SHIFT 2U
+/*! Slice: sp2_cb_fifo_full:*/
+#define SP2_CB_FIFO_FULL
+#define SP2_CB_FIFO_FULL_MASK 0x00000002U
+#define SP2_CB_FIFO_FULL_SHIFT 1U
+/*! Slice: sp2_y_fifo_full:*/
+#define SP2_Y_FIFO_FULL
+#define SP2_Y_FIFO_FULL_MASK 0x00000001U
+#define SP2_Y_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_sp2_axi_status (0x000015d8)*/
+/*! Slice: agsw_enc_pic_rdy:*/
+#define AGSW_ENC_PIC_RDY
+#define AGSW_ENC_PIC_RDY_MASK 0x00000002U
+#define AGSW_ENC_PIC_RDY_SHIFT 1U
+/*! Slice: agsw_enc_buf_full:*/
+#define AGSW_ENC_BUF_FULL
+#define AGSW_ENC_BUF_FULL_MASK 0x00000001U
+#define AGSW_ENC_BUF_FULL_SHIFT 0U
+/*! Register: miv2_sp2_dma_yuv_status (0x000015dc)*/
+/*! Slice: sp2_dma_yuv_active:*/
+#define SP2_DMA_YUV_ACTIVE
+#define SP2_DMA_YUV_ACTIVE_MASK 0x00000001U
+#define SP2_DMA_YUV_ACTIVE_SHIFT 0U
+/*! Register: miv2_sp2_dma_raw_status (0x000015e0)*/
+/*! Slice: sp2_dma_raw_active:*/
+#define SP2_DMA_RAW_ACTIVE
+#define SP2_DMA_RAW_ACTIVE_MASK 0x00000001U
+#define SP2_DMA_RAW_ACTIVE_SHIFT 0U
+/*! Register: miv2_mcm_ctrl (0x00001600)*/
+/*! Slice: mcm_init_offset_en:*/
+#define MCM_RD_CFG_UPD
+#define MCM_RD_CFG_UPD_MASK 0x00000040U
+#define MCM_RD_CFG_UPD_SHIFT 6U
+/*! Slice: mcm_init_offset_en:*/
+#define MCM_RD_AUTO_UPDATE
+#define MCM_RD_AUTO_UPDATE_MASK 0x00000020U
+#define MCM_RD_AUTO_UPDATE_SHIFT 5U
+#define MCM_INIT_OFFSET_EN
+#define MCM_INIT_OFFSET_EN_MASK 0x00000010U
+#define MCM_INIT_OFFSET_EN_SHIFT 4U
+/*! Slice: mcm_init_base_en:*/
+#define MCM_INIT_BASE_EN
+#define MCM_INIT_BASE_EN_MASK 0x00000008U
+#define MCM_INIT_BASE_EN_SHIFT 3U
+/*! Slice: mcm_miv2_cfg_upd:*/
+#define MCM_WR_CFG_UPD
+#define MCM_WR_CFG_UPD_MASK 0x00000004U
+#define MCM_WR_CFG_UPD_SHIFT 2U
+/*! Slice: mcm_miv2_skip:*/
+#define MCM_MI_SKIP
+#define MCM_MI_SKIP_MASK 0x00000002U
+#define MCM_MI_SKIP_SHIFT 1U
+/*! Slice: mcm_auto_update:*/
+#define MCM_WR_AUTO_UPDATE
+#define MCM_WR_AUTO_UPDATE_MASK 0x00000001U
+#define MCM_WR_AUTO_UPDATE_SHIFT 0U
+/*! Register: miv2_mcm_fmt (0x00001604)*/
+/*! Slice: mcm_wr1_fmt_aligned:*/
+#define MCM_WR1_FMT_ALIGNED
+#define MCM_WR1_FMT_ALIGNED_MASK 0x00030000U
+#define MCM_WR1_FMT_ALIGNED_SHIFT 16U
+/*! Slice: mcm_wr0_fmt_aligned:*/
+#define MCM_WR0_FMT_ALIGNED
+#define MCM_WR0_FMT_ALIGNED_MASK 0x0000C000U
+#define MCM_WR0_FMT_ALIGNED_SHIFT 14U
+/*! Slice: mcm_rd_fmt_aligned:*/
+#define MCM_RD_FMT_ALIGNED
+#define MCM_RD_FMT_ALIGNED_MASK 0x00003000U
+#define MCM_RD_FMT_ALIGNED_SHIFT 12U
+/*! Slice: mcm_wr1_raw_bit:*/
+#define MCM_WR1_RAW_BIT
+#define MCM_WR1_RAW_BIT_MASK 0x00000F00U
+#define MCM_WR1_RAW_BIT_SHIFT 8U
+/*! Slice: mcm_wr0_raw_bit:*/
+#define MCM_WR0_RAW_BIT
+#define MCM_WR0_RAW_BIT_MASK 0x000000F0U
+#define MCM_WR0_RAW_BIT_SHIFT 4U
+/*! Slice: mcm_rd_raw_bit:*/
+#define MCM_RD_RAW_BIT
+#define MCM_RD_RAW_BIT_MASK 0x0000000FU
+#define MCM_RD_RAW_BIT_SHIFT 0U
+/*! Register: miv2_mcm_bus_cfg (0x00001608)*/
+/*! Slice: mcm_rd_swap_raw:*/
+#define MCM_RD_SWAP_RAW
+#define MCM_RD_SWAP_RAW_MASK 0x000F0000U
+#define MCM_RD_SWAP_RAW_SHIFT 16U
+/*! Slice: mcm_wr0_swap_raw:*/
+#define MCM_WR0_SWAP_RAW
+#define MCM_WR0_SWAP_RAW_MASK 0x0000F000U
+#define MCM_WR0_SWAP_RAW_SHIFT 12U
+/*! Slice: mcm_wr1_swap_raw:*/
+#define MCM_WR1_SWAP_RAW
+#define MCM_WR1_SWAP_RAW_MASK 0x00000F00U
+#define MCM_WR1_SWAP_RAW_SHIFT 8U
+/*! Slice: mcm_rd_issue_cap:*/
+#define MCM_RD_ISSUE_CAP
+#define MCM_RD_ISSUE_CAP_MASK 0x000000C0U
+#define MCM_RD_ISSUE_CAP_SHIFT 6U
+/*! Slice: mcm_wr_issue_cap:*/
+#define MCM_WR_ISSUE_CAP
+#define MCM_WR_ISSUE_CAP_MASK 0x00000030U
+#define MCM_WR_ISSUE_CAP_SHIFT 4U
+/*! Slice: mcm_rd_burst_len:*/
+#define MCM_RD_BURST_LEN
+#define MCM_RD_BURST_LEN_MASK 0x0000000CU
+#define MCM_RD_BURST_LEN_SHIFT 2U
+/*! Slice: mcm_wr_burst_len:*/
+#define MCM_WR_BURST_LEN
+#define MCM_WR_BURST_LEN_MASK 0x00000003U
+#define MCM_WR_BURST_LEN_SHIFT 0U
+/*! Register: miv2_mcm_bus_id (0x0000160c)*/
+/*! Slice: mcm_bus_sw_en:*/
+#define MCM_BUS_SW_EN
+#define MCM_BUS_SW_EN_MASK 0x08000000U
+#define MCM_BUS_SW_EN_SHIFT 27U
+/*! Slice: mcm_rd_id_en:*/
+#define MCM_RD_ID_EN
+#define MCM_RD_ID_EN_MASK 0x04000000U
+#define MCM_RD_ID_EN_SHIFT 26U
+/*! Slice: mcm_rd_id_cfg:*/
+#define MCM_RD_ID_CFG
+#define MCM_RD_ID_CFG_MASK 0x03FC0000U
+#define MCM_RD_ID_CFG_SHIFT 18U
+/*! Slice: mcm_wr0_id_en:*/
+#define MCM_WR0_ID_EN
+#define MCM_WR0_ID_EN_MASK 0x00020000U
+#define MCM_WR0_ID_EN_SHIFT 17U
+/*! Slice: mcm_wr0_id_cfg:*/
+#define MCM_WR0_ID_CFG
+#define MCM_WR0_ID_CFG_MASK 0x0001FE00U
+#define MCM_WR0_ID_CFG_SHIFT 9U
+/*! Slice: mcm_wr1_id_en:*/
+#define MCM_WR1_ID_EN
+#define MCM_WR1_ID_EN_MASK 0x00000100U
+#define MCM_WR1_ID_EN_SHIFT 8U
+/*! Slice: mcm_wr1_id_cfg:*/
+#define MCM_WR1_ID_CFG
+#define MCM_WR1_ID_CFG_MASK 0x000000FFU
+#define MCM_WR1_ID_CFG_SHIFT 0U
+/*! Register: miv2_mcm_bus_timeo (0x00001610)*/
+/*! Slice: mcm_bus_timeo_en:*/
+#define MCM_BUS_TIMEO_EN
+#define MCM_BUS_TIMEO_EN_MASK 0x80000000U
+#define MCM_BUS_TIMEO_EN_SHIFT 31U
+/*! Slice: mcm_bus_timeo:*/
+#define MCM_BUS_TIMEO
+#define MCM_BUS_TIMEO_MASK 0x7FFFFFFFU
+#define MCM_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_mcm_raw0_base_ad_init (0x00001614)*/
+/*! Slice: mcm_raw0_base_ad_init:*/
+#define MCM_RAW0_BASE_AD_INIT
+#define MCM_RAW0_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MCM_RAW0_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw0_size_init (0x00001618)*/
+/*! Slice: mcm_raw0_size_init:*/
+#define MCM_RAW0_SIZE_INIT
+#define MCM_RAW0_SIZE_INIT_MASK 0x1FFFFFF0U
+#define MCM_RAW0_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw0_offs_cnt_init (0x0000161c)*/
+/*! Slice: mcm_raw0_offs_cnt_init:*/
+#define MCM_RAW0_OFFS_CNT_INIT
+#define MCM_RAW0_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define MCM_RAW0_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw0_llength (0x00001620)*/
+/*! Slice: mcm_raw0_llengh:*/
+#define MCM_RAW0_LLENGH
+#define MCM_RAW0_LLENGH_MASK 0x00007FFFU
+#define MCM_RAW0_LLENGH_SHIFT 0U
+/*! Register: miv2_mcm_raw0_pic_width (0x00001624)*/
+/*! Slice: mcm_raw0_pic_width:*/
+#define MCM_RAW0_PIC_WIDTH
+#define MCM_RAW0_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MCM_RAW0_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mcm_raw0_pic_height (0x00001628)*/
+/*! Slice: mcm_raw0_pic_height:*/
+#define MCM_RAW0_PIC_HEIGHT
+#define MCM_RAW0_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MCM_RAW0_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_mcm_raw0_pic_size (0x0000162c)*/
+/*! Slice: mcm_raw0_pic_size:*/
+#define MCM_RAW0_PIC_SIZE
+#define MCM_RAW0_PIC_SIZE_MASK 0xFFFFFFFFU
+#define MCM_RAW0_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mcm_raw0_offs_cnt_start (0x00001630)*/
+/*! Slice: mcm_raw0_offs_cnt_start:*/
+#define MCM_RAW0_OFFS_CNT_START
+#define MCM_RAW0_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define MCM_RAW0_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mcm_raw0_base_ad_shd (0x00001634)*/
+/*! Slice: mcm_raw0_base_ad:*/
+#define MCM_RAW0_BASE_AD
+#define MCM_RAW0_BASE_AD_MASK 0xFFFFFFF0U
+#define MCM_RAW0_BASE_AD_SHIFT 4U
+/*! Register: miv2_mcm_raw0_size_shd (0x00001638)*/
+/*! Slice: mcm_raw0_size:*/
+#define MCM_RAW0_SIZE
+#define MCM_RAW0_SIZE_MASK 0x1FFFFFF0U
+#define MCM_RAW0_SIZE_SHIFT 4U
+/*! Register: miv2_mcm_raw0_offs_cnt_shd (0x0000163c)*/
+/*! Slice: mcm_raw0_offs_cnt:*/
+#define MCM_RAW0_OFFS_CNT
+#define MCM_RAW0_OFFS_CNT_MASK 0x1FFFFFF0U
+#define MCM_RAW0_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mcm_raw1_base_ad_init (0x00001640)*/
+/*! Slice: mcm_raw1_base_ad_init:*/
+#define MCM_RAW1_BASE_AD_INIT
+#define MCM_RAW1_BASE_AD_INIT_MASK 0xFFFFFFF0U
+#define MCM_RAW1_BASE_AD_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw1_size_init (0x00001644)*/
+/*! Slice: mcm_raw1_size_init:*/
+#define MCM_RAW1_SIZE_INIT
+#define MCM_RAW1_SIZE_INIT_MASK 0x1FFFFFF0U
+#define MCM_RAW1_SIZE_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw1_offs_cnt_init (0x00001648)*/
+/*! Slice: mcm_raw1_offs_cnt_init:*/
+#define MCM_RAW1_OFFS_CNT_INIT
+#define MCM_RAW1_OFFS_CNT_INIT_MASK 0x1FFFFFF0U
+#define MCM_RAW1_OFFS_CNT_INIT_SHIFT 4U
+/*! Register: miv2_mcm_raw1_llength (0x0000164c)*/
+/*! Slice: mcm_raw1_llengh:*/
+#define MCM_RAW1_LLENGH
+#define MCM_RAW1_LLENGH_MASK 0x00007FFFU
+#define MCM_RAW1_LLENGH_SHIFT 0U
+/*! Register: miv2_mcm_raw1_pic_width (0x00001650)*/
+/*! Slice: mcm_raw1_pic_width:*/
+#define MCM_RAW1_PIC_WIDTH
+#define MCM_RAW1_PIC_WIDTH_MASK 0xFFFFFFFFU
+#define MCM_RAW1_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mcm_raw1_pic_height (0x00001654)*/
+/*! Slice: mcm_raw1_pic_height:*/
+#define MCM_RAW1_PIC_HEIGHT
+#define MCM_RAW1_PIC_HEIGHT_MASK 0xFFFFFFFFU
+#define MCM_RAW1_PIC_HEIGHT_SHIFT 0U
+/*! Register: miv2_mcm_raw1_pic_size (0x00001658)*/
+/*! Slice: mcm_raw1_pic_size:*/
+#define MCM_RAW1_PIC_SIZE
+#define MCM_RAW1_PIC_SIZE_MASK 0xFFFFFFFFU
+#define MCM_RAW1_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mcm_raw1_offs_cnt_start (0x0000165c)*/
+/*! Slice: mcm_raw1_offs_cnt_start:*/
+#define MCM_RAW1_OFFS_CNT_START
+#define MCM_RAW1_OFFS_CNT_START_MASK 0x1FFFFFF0U
+#define MCM_RAW1_OFFS_CNT_START_SHIFT 4U
+/*! Register: miv2_mcm_raw1_base_ad_shd (0x00001660)*/
+/*! Slice: mcm_raw1_base_ad:*/
+#define MCM_RAW1_BASE_AD
+#define MCM_RAW1_BASE_AD_MASK 0xFFFFFFF0U
+#define MCM_RAW1_BASE_AD_SHIFT 4U
+/*! Register: miv2_mcm_raw1_size_shd (0x00001664)*/
+/*! Slice: mcm_raw1_size:*/
+#define MCM_RAW1_SIZE
+#define MCM_RAW1_SIZE_MASK 0x1FFFFFF0U
+#define MCM_RAW1_SIZE_SHIFT 4U
+/*! Register: miv2_mcm_raw1_offs_cnt_shd (0x00001668)*/
+/*! Slice: mcm_raw1_offs_cnt:*/
+#define MCM_RAW1_OFFS_CNT
+#define MCM_RAW1_OFFS_CNT_MASK 0x1FFFFFF0U
+#define MCM_RAW1_OFFS_CNT_SHIFT 4U
+/*! Register: miv2_mcm_dma_raw_pic_start_ad (0x0000166c)*/
+/*! Slice: mcm_dma_raw_pic_start_ad:*/
+#define MCM_DMA_RAW_PIC_START_AD
+#define MCM_DMA_RAW_PIC_START_AD_MASK 0xFFFFFFF0U
+#define MCM_DMA_RAW_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_mcm_dma_raw_pic_width (0x00001670)*/
+/*! Slice: mcm_dma_raw_pic_width:*/
+#define MCM_DMA_RAW_PIC_WIDTH
+#define MCM_DMA_RAW_PIC_WIDTH_MASK 0x00007FFFU
+#define MCM_DMA_RAW_PIC_WIDTH_SHIFT 0U
+/*! Register: miv2_mcm_dma_raw_pic_llength (0x00001674)*/
+/*! Slice: mcm_dma_raw_pic_llength:*/
+#define MCM_DMA_RAW_PIC_LLENGTH
+#define MCM_DMA_RAW_PIC_LLENGTH_MASK 0x00007FFFU
+#define MCM_DMA_RAW_PIC_LLENGTH_SHIFT 0U
+/*! Register: miv2_mcm_dma_raw_pic_size (0x00001678)*/
+/*! Slice: mcm_dma_raw_pic_size:*/
+#define MCM_DMA_RAW_PIC_SIZE
+#define MCM_DMA_RAW_PIC_SIZE_MASK 0x0FFFFFFFU
+#define MCM_DMA_RAW_PIC_SIZE_SHIFT 0U
+/*! Register: miv2_mcm_dma_raw_pic_start_ad_shd (0x0000167c)*/
+/*! Slice: mcm_dma_raw_pic_start_ad:*/
+#define MCM_DMA_RAW_PIC_START_AD
+#define MCM_DMA_RAW_PIC_START_AD_MASK 0xFFFFFFF0U
+#define MCM_DMA_RAW_PIC_START_AD_SHIFT 4U
+/*! Register: miv2_mcm_status_clr (0x00001680)*/
+/*! Slice: mcm_raw1_fifo_full:*/
+#define MCM_RAW1_FIFO_FULL
+#define MCM_RAW1_FIFO_FULL_MASK 0x00000002U
+#define MCM_RAW1_FIFO_FULL_SHIFT 1U
+/*! Slice: mcm_raw0_fifo_full:*/
+#define MCM_RAW0_FIFO_FULL
+#define MCM_RAW0_FIFO_FULL_MASK 0x00000001U
+#define MCM_RAW0_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_mcm_ctrl_status (0x00001684)*/
+/*! Slice: mcm_raw1_fifo_full:*/
+#define MCM_RAW1_FIFO_FULL
+#define MCM_RAW1_FIFO_FULL_MASK 0x00000002U
+#define MCM_RAW1_FIFO_FULL_SHIFT 1U
+/*! Slice: mcm_raw0_fifo_full:*/
+#define MCM_RAW0_FIFO_FULL
+#define MCM_RAW0_FIFO_FULL_MASK 0x00000001U
+#define MCM_RAW0_FIFO_FULL_SHIFT 0U
+/*! Register: miv2_mcm_axi_status (0x00001688)*/
+/*! Slice: agsw_enc_pic_rdy:*/
+#define AGSW_ENC_PIC_RDY
+#define AGSW_ENC_PIC_RDY_MASK 0x00000002U
+#define AGSW_ENC_PIC_RDY_SHIFT 1U
+/*! Slice: agsw_enc_buf_full:*/
+#define AGSW_ENC_BUF_FULL
+#define AGSW_ENC_BUF_FULL_MASK 0x00000001U
+#define AGSW_ENC_BUF_FULL_SHIFT 0U
+/*! Register: miv2_mcm_dma_status (0x0000168c)*/
+/*! Slice: mcm_dma_active:*/
+#define MCM_DMA_ACTIVE
+#define MCM_DMA_ACTIVE_MASK 0x00000001U
+#define MCM_DMA_ACTIVE_SHIFT 0U
+/*! Register: miv2_imsc (0x000016c0)*/
+/*! Slice: fill_mp_y:*/
+#define FILL_MP_Y
+#define FILL_MP_Y_MASK 0x08000000U
+#define FILL_MP_Y_SHIFT 27U
+/*! Slice: mblk_line:*/
+#define MBLK_LINE
+#define MBLK_LINE_MASK 0x04000000U
+#define MBLK_LINE_SHIFT 26U
+/*! Slice: mp_handshk_int:*/
+#define MP_HANDSHK_INT
+#define MP_HANDSHK_INT_MASK 0x02000000U
+#define MP_HANDSHK_INT_SHIFT 25U
+/*! Slice: mcm_dma_raw_ready:*/
+#define MCM_DMA_RAW_READY
+#define MCM_DMA_RAW_READY_MASK 0x01000000U
+#define MCM_DMA_RAW_READY_SHIFT 24U
+/*! Slice: sp2_dma_raw_ready:*/
+#define SP2_DMA_RAW_READY
+#define SP2_DMA_RAW_READY_MASK 0x00800000U
+#define SP2_DMA_RAW_READY_SHIFT 23U
+/*! Slice: sp2_dma_ycbcr_ready:*/
+#define SP2_DMA_YCBCR_READY
+#define SP2_DMA_YCBCR_READY_MASK 0x00400000U
+#define SP2_DMA_YCBCR_READY_SHIFT 22U
+/*! Slice: wrap_mcm_raw1:*/
+#define WRAP_MCM_RAW1
+#define WRAP_MCM_RAW1_MASK 0x00200000U
+#define WRAP_MCM_RAW1_SHIFT 21U
+/*! Slice: wrap_mcm_raw0:*/
+#define WRAP_MCM_RAW0
+#define WRAP_MCM_RAW0_MASK 0x00100000U
+#define WRAP_MCM_RAW0_SHIFT 20U
+/*! Slice: wrap_sp2_cr:*/
+#define WRAP_SP2_CR
+#define WRAP_SP2_CR_MASK 0x00040000U
+#define WRAP_SP2_CR_SHIFT 18U
+/*! Slice: wrap_sp2_cb:*/
+#define WRAP_SP2_CB
+#define WRAP_SP2_CB_MASK 0x00020000U
+#define WRAP_SP2_CB_SHIFT 17U
+/*! Slice: wrap_sp2_y:*/
+#define WRAP_SP2_Y
+#define WRAP_SP2_Y_MASK 0x00010000U
+#define WRAP_SP2_Y_SHIFT 16U
+/*! Slice: wrap_sp1_cr:*/
+#define WRAP_SP1_CR
+#define WRAP_SP1_CR_MASK 0x00008000U
+#define WRAP_SP1_CR_SHIFT 15U
+/*! Slice: wrap_sp1_cb:*/
+#define WRAP_SP1_CB
+#define WRAP_SP1_CB_MASK 0x00004000U
+#define WRAP_SP1_CB_SHIFT 14U
+/*! Slice: wrap_sp1_y:*/
+#define WRAP_SP1_Y
+#define WRAP_SP1_Y_MASK 0x00002000U
+#define WRAP_SP1_Y_SHIFT 13U
+/*! Slice: wrap_mp_jdp:*/
+#define WRAP_MP_JDP
+#define WRAP_MP_JDP_MASK 0x00001000U
+#define WRAP_MP_JDP_SHIFT 12U
+/*! Slice: wrap_mp_raw:*/
+#define WRAP_MP_RAW
+#define WRAP_MP_RAW_MASK 0x00000800U
+#define WRAP_MP_RAW_SHIFT 11U
+/*! Slice: wrap_mp_cr:*/
+#define WRAP_MP_CR
+#define WRAP_MP_CR_MASK 0x00000400U
+#define WRAP_MP_CR_SHIFT 10U
+/*! Slice: wrap_mp_cb:*/
+#define WRAP_MP_CB
+#define WRAP_MP_CB_MASK 0x00000200U
+#define WRAP_MP_CB_SHIFT 9U
+/*! Slice: wrap_mp_y:*/
+#define WRAP_MP_Y
+#define WRAP_MP_Y_MASK 0x00000100U
+#define WRAP_MP_Y_SHIFT 8U
+/*! Slice: mcm_raw1_frame_end:*/
+#define MCM_RAW1_FRAME_END
+#define MCM_RAW1_FRAME_END_MASK 0x00000080U
+#define MCM_RAW1_FRAME_END_SHIFT 7U
+/*! Slice: mcm_raw0_frame_end:*/
+#define MCM_RAW0_FRAME_END
+#define MCM_RAW0_FRAME_END_MASK 0x00000040U
+#define MCM_RAW0_FRAME_END_SHIFT 6U
+/*! Slice: sp2_raw_frame_end:*/
+#define SP2_RAW_FRAME_END
+#define SP2_RAW_FRAME_END_MASK 0x00000020U
+#define SP2_RAW_FRAME_END_SHIFT 5U
+/*! Slice: sp2_ycbcr_frame_end:*/
+#define SP2_YCBCR_FRAME_END
+#define SP2_YCBCR_FRAME_END_MASK 0x00000010U
+#define SP2_YCBCR_FRAME_END_SHIFT 4U
+/*! Slice: sp1_ycbcr_frame_end:*/
+#define SP1_YCBCR_FRAME_END
+#define SP1_YCBCR_FRAME_END_MASK 0x00000008U
+#define SP1_YCBCR_FRAME_END_SHIFT 3U
+/*! Slice: mp_jdp_frame_end:*/
+#define MP_JDP_FRAME_END
+#define MP_JDP_FRAME_END_MASK 0x00000004U
+#define MP_JDP_FRAME_END_SHIFT 2U
+/*! Slice: mp_raw_frame_end:*/
+#define MP_RAW_FRAME_END
+#define MP_RAW_FRAME_END_MASK 0x00000002U
+#define MP_RAW_FRAME_END_SHIFT 1U
+/*! Slice: mp_ycbcr_frame_end:*/
+#define MP_YCBCR_FRAME_END
+#define MP_YCBCR_FRAME_END_MASK 0x00000001U
+#define MP_YCBCR_FRAME_END_SHIFT 0U
+/*! Register: miv2_imsc1 (0x000016c4)*/
+/*! Slice: miv2_mcm_bus_buserr:*/
+#define MI_MCM_BUS_BUSERR
+#define MI_MCM_BUS_BUSERR_MASK 0x00000080U
+#define MI_MCM_BUS_BUSERR_SHIFT 7U
+/*! Slice: miv2_mcm_bus_timeo:*/
+#define MI_MCM_BUS_TIMEO
+#define MI_MCM_BUS_TIMEO_MASK 0x00000040U
+#define MI_MCM_BUS_TIMEO_SHIFT 6U
+/*! Slice: miv2_sp2_bus_buserr:*/
+#define MI_SP2_BUS_BUSERR
+#define MI_SP2_BUS_BUSERR_MASK 0x00000020U
+#define MI_SP2_BUS_BUSERR_SHIFT 5U
+/*! Slice: miv2_sp2_bus_timeo:*/
+#define MI_SP2_BUS_TIMEO
+#define MI_SP2_BUS_TIMEO_MASK 0x00000010U
+#define MI_SP2_BUS_TIMEO_SHIFT 4U
+/*! Slice: miv2_sp1_bus_buserr:*/
+#define MI_SP1_BUS_BUSERR
+#define MI_SP1_BUS_BUSERR_MASK 0x00000008U
+#define MI_SP1_BUS_BUSERR_SHIFT 3U
+/*! Slice: miv2_sp1_bus_timeo:*/
+#define MI_SP1_BUS_TIMEO
+#define MI_SP1_BUS_TIMEO_MASK 0x00000004U
+#define MI_SP1_BUS_TIMEO_SHIFT 2U
+/*! Slice: miv2_mp_bus_buserr:*/
+#define MI_MP_BUS_BUSERR
+#define MI_MP_BUS_BUSERR_MASK 0x00000002U
+#define MI_MP_BUS_BUSERR_SHIFT 1U
+/*! Slice: miv2_mp_bus_timeo:*/
+#define MI_MP_BUS_TIMEO
+#define MI_MP_BUS_TIMEO_MASK 0x00000001U
+#define MI_MP_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_isr (0x000016c8)*/
+/*! Slice: fill_mp_y:*/
+#define FILL_MP_Y
+#define FILL_MP_Y_MASK 0x08000000U
+#define FILL_MP_Y_SHIFT 27U
+/*! Slice: mblk_line:*/
+#define MBLK_LINE
+#define MBLK_LINE_MASK 0x04000000U
+#define MBLK_LINE_SHIFT 26U
+/*! Slice: mp_handshk_int:*/
+#define MP_HANDSHK_INT
+#define MP_HANDSHK_INT_MASK 0x02000000U
+#define MP_HANDSHK_INT_SHIFT 25U
+/*! Slice: mcm_dma_raw_ready:*/
+#define MCM_DMA_RAW_READY
+#define MCM_DMA_RAW_READY_MASK 0x01000000U
+#define MCM_DMA_RAW_READY_SHIFT 24U
+/*! Slice: sp2_dma_raw_ready:*/
+#define SP2_DMA_RAW_READY
+#define SP2_DMA_RAW_READY_MASK 0x00800000U
+#define SP2_DMA_RAW_READY_SHIFT 23U
+/*! Slice: sp2_dma_ycbcr_ready:*/
+#define SP2_DMA_YCBCR_READY
+#define SP2_DMA_YCBCR_READY_MASK 0x00400000U
+#define SP2_DMA_YCBCR_READY_SHIFT 22U
+/*! Slice: wrap_mcm_raw1:*/
+#define WRAP_MCM_RAW1
+#define WRAP_MCM_RAW1_MASK 0x00200000U
+#define WRAP_MCM_RAW1_SHIFT 21U
+/*! Slice: wrap_mcm_raw0:*/
+#define WRAP_MCM_RAW0
+#define WRAP_MCM_RAW0_MASK 0x00100000U
+#define WRAP_MCM_RAW0_SHIFT 20U
+/*! Slice: wrap_sp2_cr:*/
+#define WRAP_SP2_CR
+#define WRAP_SP2_CR_MASK 0x00040000U
+#define WRAP_SP2_CR_SHIFT 18U
+/*! Slice: wrap_sp2_cb:*/
+#define WRAP_SP2_CB
+#define WRAP_SP2_CB_MASK 0x00020000U
+#define WRAP_SP2_CB_SHIFT 17U
+/*! Slice: wrap_sp2_y:*/
+#define WRAP_SP2_Y
+#define WRAP_SP2_Y_MASK 0x00010000U
+#define WRAP_SP2_Y_SHIFT 16U
+/*! Slice: wrap_sp1_cr:*/
+#define WRAP_SP1_CR
+#define WRAP_SP1_CR_MASK 0x00008000U
+#define WRAP_SP1_CR_SHIFT 15U
+/*! Slice: wrap_sp1_cb:*/
+#define WRAP_SP1_CB
+#define WRAP_SP1_CB_MASK 0x00004000U
+#define WRAP_SP1_CB_SHIFT 14U
+/*! Slice: wrap_sp1_y:*/
+#define WRAP_SP1_Y
+#define WRAP_SP1_Y_MASK 0x00002000U
+#define WRAP_SP1_Y_SHIFT 13U
+/*! Slice: wrap_mp_jdp:*/
+#define WRAP_MP_JDP
+#define WRAP_MP_JDP_MASK 0x00001000U
+#define WRAP_MP_JDP_SHIFT 12U
+/*! Slice: wrap_mp_raw:*/
+#define WRAP_MP_RAW
+#define WRAP_MP_RAW_MASK 0x00000800U
+#define WRAP_MP_RAW_SHIFT 11U
+/*! Slice: wrap_mp_cr:*/
+#define WRAP_MP_CR
+#define WRAP_MP_CR_MASK 0x00000400U
+#define WRAP_MP_CR_SHIFT 10U
+/*! Slice: wrap_mp_cb:*/
+#define WRAP_MP_CB
+#define WRAP_MP_CB_MASK 0x00000200U
+#define WRAP_MP_CB_SHIFT 9U
+/*! Slice: wrap_mp_y:*/
+#define WRAP_MP_Y
+#define WRAP_MP_Y_MASK 0x00000100U
+#define WRAP_MP_Y_SHIFT 8U
+/*! Slice: mcm_raw1_frame_end:*/
+#define MCM_RAW1_FRAME_END
+#define MCM_RAW1_FRAME_END_MASK 0x00000080U
+#define MCM_RAW1_FRAME_END_SHIFT 7U
+/*! Slice: mcm_raw0_frame_end:*/
+#define MCM_RAW0_FRAME_END
+#define MCM_RAW0_FRAME_END_MASK 0x00000040U
+#define MCM_RAW0_FRAME_END_SHIFT 6U
+/*! Slice: sp2_raw_frame_end:*/
+#define SP2_RAW_FRAME_END
+#define SP2_RAW_FRAME_END_MASK 0x00000020U
+#define SP2_RAW_FRAME_END_SHIFT 5U
+/*! Slice: sp2_ycbcr_frame_end:*/
+#define SP2_YCBCR_FRAME_END
+#define SP2_YCBCR_FRAME_END_MASK 0x00000010U
+#define SP2_YCBCR_FRAME_END_SHIFT 4U
+/*! Slice: sp1_ycbcr_frame_end:*/
+#define SP1_YCBCR_FRAME_END
+#define SP1_YCBCR_FRAME_END_MASK 0x00000008U
+#define SP1_YCBCR_FRAME_END_SHIFT 3U
+/*! Slice: mp_jdp_frame_end:*/
+#define MP_JDP_FRAME_END
+#define MP_JDP_FRAME_END_MASK 0x00000004U
+#define MP_JDP_FRAME_END_SHIFT 2U
+/*! Slice: mp_raw_frame_end:*/
+#define MP_RAW_FRAME_END
+#define MP_RAW_FRAME_END_MASK 0x00000002U
+#define MP_RAW_FRAME_END_SHIFT 1U
+/*! Slice: mp_ycbcr_frame_end:*/
+#define MP_YCBCR_FRAME_END
+#define MP_YCBCR_FRAME_END_MASK 0x00000001U
+#define MP_YCBCR_FRAME_END_SHIFT 0U
+/*! Register: miv2_isr1 (0x000016cc)*/
+/*! Slice: miv2_mcm_bus_buserr:*/
+#define MI_MCM_BUS_BUSERR
+#define MI_MCM_BUS_BUSERR_MASK 0x00000080U
+#define MI_MCM_BUS_BUSERR_SHIFT 7U
+/*! Slice: miv2_mcm_bus_timeo:*/
+#define MI_MCM_BUS_TIMEO
+#define MI_MCM_BUS_TIMEO_MASK 0x00000040U
+#define MI_MCM_BUS_TIMEO_SHIFT 6U
+/*! Slice: miv2_sp2_bus_buserr:*/
+#define MI_SP2_BUS_BUSERR
+#define MI_SP2_BUS_BUSERR_MASK 0x00000020U
+#define MI_SP2_BUS_BUSERR_SHIFT 5U
+/*! Slice: miv2_sp2_bus_timeo:*/
+#define MI_SP2_BUS_TIMEO
+#define MI_SP2_BUS_TIMEO_MASK 0x00000010U
+#define MI_SP2_BUS_TIMEO_SHIFT 4U
+/*! Slice: miv2_sp1_bus_buserr:*/
+#define MI_SP1_BUS_BUSERR
+#define MI_SP1_BUS_BUSERR_MASK 0x00000008U
+#define MI_SP1_BUS_BUSERR_SHIFT 3U
+/*! Slice: miv2_sp1_bus_timeo:*/
+#define MI_SP1_BUS_TIMEO
+#define MI_SP1_BUS_TIMEO_MASK 0x00000004U
+#define MI_SP1_BUS_TIMEO_SHIFT 2U
+#define MRV_MI_BP_PATH_ENABLE
+#define MRV_MI_BP_PATH_ENABLE_MASK 0x00000001U
+#define MRV_MI_BP_PATH_ENABLE_SHIFT 0U
+/*! Register: bp_ctrl: Control register */
+/*! Slice: bp_output_format */
+/*  000  raw8
+	001  raw10
+	010  raw12
+*/
+#define MRV_MI_BP_WRITE_RAWBIT
+#define MRV_MI_BP_WRITE_RAWBIT_MASK 0x0000001cU
+#define MRV_MI_BP_WRITE_RAWBIT_SHIFT 2U
+#define MRV_MI_BP_WRITE_FORMAT
+#define MRV_MI_BP_WRITE_FORMAT_MASK 0x00000300U
+#define MRV_MI_BP_WRITE_FORMAT_SHIFT 8U
+#define MRV_MI_BP_WRITE_PLANAR_FORMAT 1
+#define MRV_MI_BP_WRITE_INTERLEAVE_FORMAT 2
+/*! Slice: miv2_mp_bus_buserr:*/
+#define MI_MP_BUS_BUSERR
+#define MI_MP_BUS_BUSERR_MASK 0x00000002U
+#define MI_MP_BUS_BUSERR_SHIFT 1U
+/*! Slice: miv2_mp_bus_timeo:*/
+#define MI_MP_BUS_TIMEO
+#define MI_MP_BUS_TIMEO_MASK 0x00000001U
+#define MI_MP_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_mis (0x000016d0) */
+/*! Slice: fill_mp_y: */
+#define FILL_MP_Y
+#define FILL_MP_Y_MASK 0x08000000U
+#define FILL_MP_Y_SHIFT 27U
+/*! Slice: mblk_line: */
+#define MBLK_LINE
+#define MBLK_LINE_MASK 0x04000000U
+#define MBLK_LINE_SHIFT 26U
+/*! Slice: mp_handshk_int: */
+#define MP_HANDSHK_INT
+#define MP_HANDSHK_INT_MASK 0x02000000U
+#define MP_HANDSHK_INT_SHIFT 25U
+/*! Slice: mcm_dma_raw_ready: */
+#define MCM_DMA_RAW_READY
+#define MCM_DMA_RAW_READY_MASK 0x01000000U
+#define MCM_DMA_RAW_READY_SHIFT 24U
+/*! Slice: sp2_dma_raw_ready: */
+#define SP2_DMA_RAW_READY
+#define SP2_DMA_RAW_READY_MASK 0x00800000U
+#define SP2_DMA_RAW_READY_SHIFT 23U
+/*! Slice: sp2_dma_ycbcr_ready: */
+#define SP2_DMA_YCBCR_READY
+#define SP2_DMA_YCBCR_READY_MASK 0x00400000U
+#define SP2_DMA_YCBCR_READY_SHIFT 22U
+/*! Slice: wrap_mcm_raw1: */
+#define WRAP_MCM_RAW1
+#define WRAP_MCM_RAW1_MASK 0x00200000U
+#define WRAP_MCM_RAW1_SHIFT 21U
+/*! Slice: wrap_mcm_raw0: */
+#define WRAP_MCM_RAW0
+#define WRAP_MCM_RAW0_MASK 0x00100000U
+#define WRAP_MCM_RAW0_SHIFT 20U
+/*! Slice: wrap_sp2_cr: */
+#define WRAP_SP2_CR
+#define WRAP_SP2_CR_MASK 0x00040000U
+#define WRAP_SP2_CR_SHIFT 18U
+/*! Slice: wrap_sp2_cb: */
+#define WRAP_SP2_CB
+#define WRAP_SP2_CB_MASK 0x00020000U
+#define WRAP_SP2_CB_SHIFT 17U
+/*! Slice: wrap_sp2_y: */
+#define WRAP_SP2_Y
+#define WRAP_SP2_Y_MASK 0x00010000U
+#define WRAP_SP2_Y_SHIFT 16U
+/*! Slice: wrap_sp1_cr: */
+#define WRAP_SP1_CR
+#define WRAP_SP1_CR_MASK 0x00008000U
+#define WRAP_SP1_CR_SHIFT 15U
+/*! Slice: wrap_sp1_cb: */
+#define WRAP_SP1_CB
+#define WRAP_SP1_CB_MASK 0x00004000U
+#define WRAP_SP1_CB_SHIFT 14U
+/*! Slice: wrap_sp1_y: */
+#define WRAP_SP1_Y
+#define WRAP_SP1_Y_MASK 0x00002000U
+#define WRAP_SP1_Y_SHIFT 13U
+/*! Slice: wrap_mp_jdp: */
+#define WRAP_MP_JDP
+#define WRAP_MP_JDP_MASK 0x00001000U
+#define WRAP_MP_JDP_SHIFT 12U
+/*! Slice: wrap_mp_raw: */
+#define WRAP_MP_RAW
+#define WRAP_MP_RAW_MASK 0x00000800U
+#define WRAP_MP_RAW_SHIFT 11U
+/*! Slice: wrap_mp_cr: */
+#define WRAP_MP_CR
+#define WRAP_MP_CR_MASK 0x00000400U
+#define WRAP_MP_CR_SHIFT 10U
+/*! Slice: wrap_mp_cb: */
+#define WRAP_MP_CB
+#define WRAP_MP_CB_MASK 0x00000200U
+#define WRAP_MP_CB_SHIFT 9U
+/*! Slice: wrap_mp_y: */
+#define WRAP_MP_Y
+#define WRAP_MP_Y_MASK 0x00000100U
+#define WRAP_MP_Y_SHIFT 8U
+/*! Slice: mcm_raw1_frame_end: */
+#define MCM_RAW1_FRAME_END
+#define MCM_RAW1_FRAME_END_MASK 0x00000080U
+#define MCM_RAW1_FRAME_END_SHIFT 7U
+/*! Slice: mcm_raw0_frame_end: */
+#define MCM_RAW0_FRAME_END
+#define MCM_RAW0_FRAME_END_MASK 0x00000040U
+#define MCM_RAW0_FRAME_END_SHIFT 6U
+/*! Slice: sp2_raw_frame_end: */
+#define SP2_RAW_FRAME_END
+#define SP2_RAW_FRAME_END_MASK 0x00000020U
+#define SP2_RAW_FRAME_END_SHIFT 5U
+/*! Slice: sp2_ycbcr_frame_end: */
+#define SP2_YCBCR_FRAME_END
+#define SP2_YCBCR_FRAME_END_MASK 0x00000010U
+#define SP2_YCBCR_FRAME_END_SHIFT 4U
+/*! Slice: sp1_ycbcr_frame_end: */
+#define SP1_YCBCR_FRAME_END
+#define SP1_YCBCR_FRAME_END_MASK 0x00000008U
+#define SP1_YCBCR_FRAME_END_SHIFT 3U
+/*! Slice: mp_jdp_frame_end: */
+#define MP_JDP_FRAME_END
+#define MP_JDP_FRAME_END_MASK 0x00000004U
+#define MP_JDP_FRAME_END_SHIFT 2U
+/*! Slice: mp_raw_frame_end: */
+#define MP_RAW_FRAME_END
+#define MP_RAW_FRAME_END_MASK 0x00000002U
+#define MP_RAW_FRAME_END_SHIFT 1U
+/*! Slice: mp_ycbcr_frame_end: */
+#define MP_YCBCR_FRAME_END
+#define MP_YCBCR_FRAME_END_MASK 0x00000001U
+#define MP_YCBCR_FRAME_END_SHIFT 0U
+/*! Register: miv2_mis1 (0x000016d4) */
+/*! Slice: miv2_mcm_bus_buserr: */
+#define MI_MCM_BUS_BUSERR
+#define MI_MCM_BUS_BUSERR_MASK 0x00000080U
+#define MI_MCM_BUS_BUSERR_SHIFT 7U
+/*! Slice: miv2_mcm_bus_timeo: */
+#define MI_MCM_BUS_TIMEO
+#define MI_MCM_BUS_TIMEO_MASK 0x00000040U
+#define MI_MCM_BUS_TIMEO_SHIFT 6U
+/*! Slice: miv2_sp2_bus_buserr: */
+#define MI_SP2_BUS_BUSERR
+#define MI_SP2_BUS_BUSERR_MASK 0x00000020U
+#define MI_SP2_BUS_BUSERR_SHIFT 5U
+/*! Slice: miv2_sp2_bus_timeo: */
+#define MI_SP2_BUS_TIMEO
+#define MI_SP2_BUS_TIMEO_MASK 0x00000010U
+#define MI_SP2_BUS_TIMEO_SHIFT 4U
+/*! Slice: miv2_sp1_bus_buserr: */
+#define MI_SP1_BUS_BUSERR
+#define MI_SP1_BUS_BUSERR_MASK 0x00000008U
+#define MI_SP1_BUS_BUSERR_SHIFT 3U
+/*! Slice: miv2_sp1_bus_timeo: */
+#define MI_SP1_BUS_TIMEO
+#define MI_SP1_BUS_TIMEO_MASK 0x00000004U
+#define MI_SP1_BUS_TIMEO_SHIFT 2U
+/*! Slice: miv2_mp_bus_buserr: */
+#define MI_MP_BUS_BUSERR
+#define MI_MP_BUS_BUSERR_MASK 0x00000002U
+#define MI_MP_BUS_BUSERR_SHIFT 1U
+/*! Slice: miv2_mp_bus_timeo: */
+#define MI_MP_BUS_TIMEO
+#define MI_MP_BUS_TIMEO_MASK 0x00000001U
+#define MI_MP_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_icr (0x000016d8) */
+/*! Slice: fill_mp_y: */
+#define FILL_MP_Y
+#define FILL_MP_Y_MASK 0x08000000U
+#define FILL_MP_Y_SHIFT 27U
+/*! Slice: mblk_line: */
+#define MBLK_LINE
+#define MBLK_LINE_MASK 0x04000000U
+#define MBLK_LINE_SHIFT 26U
+/*! Slice: mp_handshk_int: */
+#define MP_HANDSHK_INT
+#define MP_HANDSHK_INT_MASK 0x02000000U
+#define MP_HANDSHK_INT_SHIFT 25U
+/*! Slice: mcm_dma_raw_ready: */
+#define MCM_DMA_RAW_READY
+#define MCM_DMA_RAW_READY_MASK 0x01000000U
+#define MCM_DMA_RAW_READY_SHIFT 24U
+/*! Slice: sp2_dma_raw_ready: */
+#define SP2_DMA_RAW_READY
+#define SP2_DMA_RAW_READY_MASK 0x00800000U
+#define SP2_DMA_RAW_READY_SHIFT 23U
+/*! Slice: sp2_dma_ycbcr_ready: */
+#define SP2_DMA_YCBCR_READY
+#define SP2_DMA_YCBCR_READY_MASK 0x00400000U
+#define SP2_DMA_YCBCR_READY_SHIFT 22U
+/*! Slice: wrap_mcm_raw1: */
+#define WRAP_MCM_RAW1
+#define WRAP_MCM_RAW1_MASK 0x00200000U
+#define WRAP_MCM_RAW1_SHIFT 21U
+/*! Slice: wrap_mcm_raw0: */
+#define WRAP_MCM_RAW0
+#define WRAP_MCM_RAW0_MASK 0x00100000U
+#define WRAP_MCM_RAW0_SHIFT 20U
+/*! Slice: wrap_sp2_cr: */
+#define WRAP_SP2_CR
+#define WRAP_SP2_CR_MASK 0x00040000U
+#define WRAP_SP2_CR_SHIFT 18U
+/*! Slice: wrap_sp2_cb: */
+#define WRAP_SP2_CB
+#define WRAP_SP2_CB_MASK 0x00020000U
+#define WRAP_SP2_CB_SHIFT 17U
+/*! Slice: wrap_sp2_y: */
+#define WRAP_SP2_Y
+#define WRAP_SP2_Y_MASK 0x00010000U
+#define WRAP_SP2_Y_SHIFT 16U
+/*! Slice: wrap_sp1_cr: */
+#define WRAP_SP1_CR
+#define WRAP_SP1_CR_MASK 0x00008000U
+#define WRAP_SP1_CR_SHIFT 15U
+/*! Slice: wrap_sp1_cb: */
+#define WRAP_SP1_CB
+#define WRAP_SP1_CB_MASK 0x00004000U
+#define WRAP_SP1_CB_SHIFT 14U
+/*! Slice: wrap_sp1_y: */
+#define WRAP_SP1_Y
+#define WRAP_SP1_Y_MASK 0x00002000U
+#define WRAP_SP1_Y_SHIFT 13U
+/*! Slice: wrap_mp_jdp: */
+#define WRAP_MP_JDP
+#define WRAP_MP_JDP_MASK 0x00001000U
+#define WRAP_MP_JDP_SHIFT 12U
+/*! Slice: wrap_mp_raw: */
+#define WRAP_MP_RAW
+#define WRAP_MP_RAW_MASK 0x00000800U
+#define WRAP_MP_RAW_SHIFT 11U
+/*! Slice: wrap_mp_cr: */
+#define WRAP_MP_CR
+#define WRAP_MP_CR_MASK 0x00000400U
+#define WRAP_MP_CR_SHIFT 10U
+/*! Slice: wrap_mp_cb: */
+#define WRAP_MP_CB
+#define WRAP_MP_CB_MASK 0x00000200U
+#define WRAP_MP_CB_SHIFT 9U
+/*! Slice: wrap_mp_y: */
+#define WRAP_MP_Y
+#define WRAP_MP_Y_MASK 0x00000100U
+#define WRAP_MP_Y_SHIFT 8U
+/*! Slice: mcm_raw1_frame_end: */
+#define MCM_RAW1_FRAME_END
+#define MCM_RAW1_FRAME_END_MASK 0x00000080U
+#define MCM_RAW1_FRAME_END_SHIFT 7U
+/*! Slice: mcm_raw0_frame_end: */
+#define MCM_RAW0_FRAME_END
+#define MCM_RAW0_FRAME_END_MASK 0x00000040U
+#define MCM_RAW0_FRAME_END_SHIFT 6U
+/*! Slice: sp2_raw_frame_end: */
+#define SP2_RAW_FRAME_END
+#define SP2_RAW_FRAME_END_MASK 0x00000020U
+#define SP2_RAW_FRAME_END_SHIFT 5U
+/*! Slice: sp2_ycbcr_frame_end: */
+#define SP2_YCBCR_FRAME_END
+#define SP2_YCBCR_FRAME_END_MASK 0x00000010U
+#define SP2_YCBCR_FRAME_END_SHIFT 4U
+/*! Slice: sp1_ycbcr_frame_end: */
+#define SP1_YCBCR_FRAME_END
+#define SP1_YCBCR_FRAME_END_MASK 0x00000008U
+#define SP1_YCBCR_FRAME_END_SHIFT 3U
+/*! Slice: mp_jdp_frame_end: */
+#define MP_JDP_FRAME_END
+#define MP_JDP_FRAME_END_MASK 0x00000004U
+#define MP_JDP_FRAME_END_SHIFT 2U
+/*! Slice: mp_raw_frame_end: */
+#define MP_RAW_FRAME_END
+#define MP_RAW_FRAME_END_MASK 0x00000002U
+#define MP_RAW_FRAME_END_SHIFT 1U
+/*! Slice: mp_ycbcr_frame_end: */
+#define MP_YCBCR_FRAME_END
+#define MP_YCBCR_FRAME_END_MASK 0x00000001U
+#define MP_YCBCR_FRAME_END_SHIFT 0U
+/*! Register: miv2_icr1 (0x000016dc) */
+/*! Slice: miv2_mcm_bus_buserr: */
+#define MI_MCM_BUS_BUSERR
+#define MI_MCM_BUS_BUSERR_MASK 0x00000080U
+#define MI_MCM_BUS_BUSERR_SHIFT 7U
+/*! Slice: miv2_mcm_bus_timeo: */
+#define MI_MCM_BUS_TIMEO
+#define MI_MCM_BUS_TIMEO_MASK 0x00000040U
+#define MI_MCM_BUS_TIMEO_SHIFT 6U
+/*! Slice: miv2_sp2_bus_buserr: */
+#define MI_SP2_BUS_BUSERR
+#define MI_SP2_BUS_BUSERR_MASK 0x00000020U
+#define MI_SP2_BUS_BUSERR_SHIFT 5U
+/*! Slice: miv2_sp2_bus_timeo: */
+#define MI_SP2_BUS_TIMEO
+#define MI_SP2_BUS_TIMEO_MASK 0x00000010U
+#define MI_SP2_BUS_TIMEO_SHIFT 4U
+/*! Slice: miv2_sp1_bus_buserr: */
+#define MI_SP1_BUS_BUSERR
+#define MI_SP1_BUS_BUSERR_MASK 0x00000008U
+#define MI_SP1_BUS_BUSERR_SHIFT 3U
+/*! Slice: miv2_sp1_bus_timeo: */
+#define MI_SP1_BUS_TIMEO
+#define MI_SP1_BUS_TIMEO_MASK 0x00000004U
+#define MI_SP1_BUS_TIMEO_SHIFT 2U
+/*! Slice: miv2_mp_bus_buserr: */
+#define MI_MP_BUS_BUSERR
+#define MI_MP_BUS_BUSERR_MASK 0x00000002U
+#define MI_MP_BUS_BUSERR_SHIFT 1U
+/*! Slice: miv2_mp_bus_timeo: */
+#define MI_MP_BUS_TIMEO
+#define MI_MP_BUS_TIMEO_MASK 0x00000001U
+#define MI_MP_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_ris (0x000016e0) */
+/*! Slice: fill_mp_y: */
+#define FILL_MP_Y
+#define FILL_MP_Y_MASK 0x08000000U
+#define FILL_MP_Y_SHIFT 27U
+/*! Slice: mblk_line: */
+#define MBLK_LINE
+#define MBLK_LINE_MASK 0x04000000U
+#define MBLK_LINE_SHIFT 26U
+/*! Slice: mp_handshk_int: */
+#define MP_HANDSHK_INT
+#define MP_HANDSHK_INT_MASK 0x02000000U
+#define MP_HANDSHK_INT_SHIFT 25U
+/*! Slice: mcm_dma_raw_ready: */
+#define MCM_DMA_RAW_READY
+#define MCM_DMA_RAW_READY_MASK 0x01000000U
+#define MCM_DMA_RAW_READY_SHIFT 24U
+/*! Slice: sp2_dma_raw_ready: */
+#define SP2_DMA_RAW_READY
+#define SP2_DMA_RAW_READY_MASK 0x00800000U
+#define SP2_DMA_RAW_READY_SHIFT 23U
+/*! Slice: sp2_dma_ycbcr_ready: */
+#define SP2_DMA_YCBCR_READY
+#define SP2_DMA_YCBCR_READY_MASK 0x00400000U
+#define SP2_DMA_YCBCR_READY_SHIFT 22U
+/*! Slice: wrap_mcm_raw1: */
+#define WRAP_MCM_RAW1
+#define WRAP_MCM_RAW1_MASK 0x00200000U
+#define WRAP_MCM_RAW1_SHIFT 21U
+/*! Slice: wrap_mcm_raw0: */
+#define WRAP_MCM_RAW0
+#define WRAP_MCM_RAW0_MASK 0x00100000U
+#define WRAP_MCM_RAW0_SHIFT 20U
+/*! Slice: wrap_sp2_raw: */
+#define WRAP_SP2_RAW
+#define WRAP_SP2_RAW_MASK (0x1 << 16)
+#define WRAP_SP2_RAW_SHIFT 16U
+/*! Slice: wrap_sp2_cr: */
+#define WRAP_SP2_CR
+#define WRAP_SP2_CR_MASK 0x00040000U
+#define WRAP_SP2_CR_SHIFT 18U
+/*! Slice: wrap_sp2_cb: */
+#define WRAP_SP2_CB
+#define WRAP_SP2_CB_MASK 0x00020000U
+#define WRAP_SP2_CB_SHIFT 17U
+/*! Slice: wrap_sp2_y: */
+#define WRAP_SP2_Y
+#define WRAP_SP2_Y_MASK 0x00010000U
+#define WRAP_SP2_Y_SHIFT 16U
+/*! Slice: wrap_sp1_cr: */
+#define WRAP_SP1_CR
+#define WRAP_SP1_CR_MASK 0x00008000U
+#define WRAP_SP1_CR_SHIFT 15U
+/*! Slice: wrap_sp1_cb: */
+#define WRAP_SP1_CB
+#define WRAP_SP1_CB_MASK 0x00004000U
+#define WRAP_SP1_CB_SHIFT 14U
+/*! Slice: wrap_sp1_y: */
+#define WRAP_SP1_Y
+#define WRAP_SP1_Y_MASK 0x00002000U
+#define WRAP_SP1_Y_SHIFT 13U
+/*! Slice: wrap_mp_jdp: */
+#define WRAP_MP_JDP
+#define WRAP_MP_JDP_MASK 0x00001000U
+#define WRAP_MP_JDP_SHIFT 12U
+/*! Slice: wrap_mp_raw: */
+#define WRAP_MP_RAW
+#define WRAP_MP_RAW_MASK 0x00000800U
+#define WRAP_MP_RAW_SHIFT 11U
+/*! Slice: wrap_mp_cr: */
+#define WRAP_MP_CR
+#define WRAP_MP_CR_MASK 0x00000400U
+#define WRAP_MP_CR_SHIFT 10U
+/*! Slice: wrap_mp_cb: */
+#define WRAP_MP_CB
+#define WRAP_MP_CB_MASK 0x00000200U
+#define WRAP_MP_CB_SHIFT 9U
+/*! Slice: wrap_mp_y: */
+#define WRAP_MP_Y
+#define WRAP_MP_Y_MASK 0x00000100U
+#define WRAP_MP_Y_SHIFT 8U
+/*! Slice: mcm_raw1_frame_end: */
+#define MCM_RAW1_FRAME_END
+#define MCM_RAW1_FRAME_END_MASK 0x00000080U
+#define MCM_RAW1_FRAME_END_SHIFT 7U
+/*! Slice: mcm_raw0_frame_end: */
+#define MCM_RAW0_FRAME_END
+#define MCM_RAW0_FRAME_END_MASK 0x00000040U
+#define MCM_RAW0_FRAME_END_SHIFT 6U
+/*! Slice: sp2_raw_frame_end: */
+#define SP2_RAW_FRAME_END
+#define SP2_RAW_FRAME_END_MASK 0x00000020U
+#define SP2_RAW_FRAME_END_SHIFT 5U
+/*! Slice: sp2_ycbcr_frame_end: */
+#define SP2_YCBCR_FRAME_END
+#define SP2_YCBCR_FRAME_END_MASK 0x00000010U
+#define SP2_YCBCR_FRAME_END_SHIFT 4U
+/*! Slice: sp1_ycbcr_frame_end: */
+#define SP1_YCBCR_FRAME_END
+#define SP1_YCBCR_FRAME_END_MASK 0x00000008U
+#define SP1_YCBCR_FRAME_END_SHIFT 3U
+/*! Slice: mp_jdp_frame_end: */
+#define MP_JDP_FRAME_END
+#define MP_JDP_FRAME_END_MASK 0x00000004U
+#define MP_JDP_FRAME_END_SHIFT 2U
+/*! Slice: mp_raw_frame_end: */
+#define MP_RAW_FRAME_END
+#define MP_RAW_FRAME_END_MASK 0x00000002U
+#define MP_RAW_FRAME_END_SHIFT 1U
+/*! Slice: mp_ycbcr_frame_end: */
+#define MP_YCBCR_FRAME_END
+#define MP_YCBCR_FRAME_END_MASK 0x00000001U
+#define MP_YCBCR_FRAME_END_SHIFT 0U
+/*! Register: miv2_ris1 (0x000016e4)*/
+/*! Slice: miv2_mcm_bus_buserr:*/
+#define MI_MCM_BUS_BUSERR
+#define MI_MCM_BUS_BUSERR_MASK 0x00000080U
+#define MI_MCM_BUS_BUSERR_SHIFT 7U
+/*! Slice: miv2_mcm_bus_timeo:*/
+#define MI_MCM_BUS_TIMEO
+#define MI_MCM_BUS_TIMEO_MASK 0x00000040U
+#define MI_MCM_BUS_TIMEO_SHIFT 6U
+/*! Slice: miv2_sp2_bus_buserr:*/
+#define MI_SP2_BUS_BUSERR
+#define MI_SP2_BUS_BUSERR_MASK 0x00000020U
+#define MI_SP2_BUS_BUSERR_SHIFT 5U
+/*! Slice: miv2_sp2_bus_timeo:*/
+#define MI_SP2_BUS_TIMEO
+#define MI_SP2_BUS_TIMEO_MASK 0x00000010U
+#define MI_SP2_BUS_TIMEO_SHIFT 4U
+/*! Slice: miv2_sp1_bus_buserr:*/
+#define MI_SP1_BUS_BUSERR
+#define MI_SP1_BUS_BUSERR_MASK 0x00000008U
+#define MI_SP1_BUS_BUSERR_SHIFT 3U
+/*! Slice: miv2_sp1_bus_timeo:*/
+#define MI_SP1_BUS_TIMEO
+#define MI_SP1_BUS_TIMEO_MASK 0x00000004U
+#define MI_SP1_BUS_TIMEO_SHIFT 2U
+/*! Slice: miv2_mp_bus_buserr:*/
+#define MI_MP_BUS_BUSERR
+#define MI_MP_BUS_BUSERR_MASK 0x00000002U
+#define MI_MP_BUS_BUSERR_SHIFT 1U
+/*! Slice: miv2_mp_bus_timeo:*/
+#define MI_MP_BUS_TIMEO
+#define MI_MP_BUS_TIMEO_MASK 0x00000001U
+#define MI_MP_BUS_TIMEO_SHIFT 0U
+/*! Register: miv2_mp_y_irq_offs_init (0x00001700)*/
+/*! Slice: mp_y_irq_offs_init:*/
+#define MP_Y_IRQ_OFFS_INIT
+#define MP_Y_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MP_Y_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_mp_jdp_irq_offs_init (0x00001704)*/
+/*! Slice: mp_jdp_irq_offs_init:*/
+#define MP_JDP_IRQ_OFFS_INIT
+#define MP_JDP_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MP_JDP_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_mp_raw_irq_offs_init (0x00001708)*/
+/*! Slice: mp_raw_irq_offs_init:*/
+#define MP_RAW_IRQ_OFFS_INIT
+#define MP_RAW_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MP_RAW_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_sp1_y_irq_offs_init (0x0000170c)*/
+/*! Slice: sp1_y_irq_offs_init:*/
+#define SP1_Y_IRQ_OFFS_INIT
+#define SP1_Y_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define SP1_Y_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_sp2_y_irq_offs_init (0x00001710)*/
+/*! Slice: sp2_y_irq_offs_init:*/
+#define SP2_Y_IRQ_OFFS_INIT
+#define SP2_Y_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define SP2_Y_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_sp2_raw_irq_offs_init (0x00001714)*/
+/*! Slice: sp2_raw_irq_offs_init:*/
+#define SP2_RAW_IRQ_OFFS_INIT
+#define SP2_RAW_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define SP2_RAW_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_mcm_raw0_irq_offs_init (0x00001718)*/
+/*! Slice: mcm_raw0_irq_offs_init:*/
+#define MCM_RAW0_IRQ_OFFS_INIT
+#define MCM_RAW0_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MCM_RAW0_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_mcm_raw1_irq_offs_init (0x0000171c)*/
+/*! Slice: mcm_raw1_irq_offs_init:*/
+#define MCM_RAW1_IRQ_OFFS_INIT
+#define MCM_RAW1_IRQ_OFFS_INIT_MASK 0x1FFFFFF8U
+#define MCM_RAW1_IRQ_OFFS_INIT_SHIFT 3U
+/*! Register: miv2_mp_y_irq_offs_shd (0x00001720)*/
+/*! Slice: mp_y_irq_offs:*/
+#define MP_Y_IRQ_OFFS
+#define MP_Y_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MP_Y_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_mp_jdp_irq_offs_shd (0x00001724)*/
+/*! Slice: mp_jdp_irq_offs:*/
+#define MP_JDP_IRQ_OFFS
+#define MP_JDP_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MP_JDP_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_mp_raw_irq_offs_shd (0x00001728)*/
+/*! Slice: mp_raw_irq_offs:*/
+#define MP_RAW_IRQ_OFFS
+#define MP_RAW_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MP_RAW_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_sp1_y_irq_offs_shd (0x0000172c)*/
+/*! Slice: sp1_y_irq_offs:*/
+#define SP1_Y_IRQ_OFFS
+#define SP1_Y_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define SP1_Y_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_sp2_y_irq_offs_shd (0x00001730)*/
+/*! Slice: sp2_y_irq_offs:*/
+#define SP2_Y_IRQ_OFFS
+#define SP2_Y_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define SP2_Y_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_sp2_raw_irq_offs_shd (0x00001734)*/
+/*! Slice: sp2_raw_irq_offs:*/
+#define SP2_RAW_IRQ_OFFS
+#define SP2_RAW_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define SP2_RAW_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_mcm_raw0_irq_offs_shd (0x00001738)*/
+/*! Slice: mcm_raw0_irq_offs:*/
+#define MCM_RAW0_IRQ_OFFS
+#define MCM_RAW0_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MCM_RAW0_IRQ_OFFS_SHIFT 3U
+/*! Register: miv2_mcm_raw1_irq_offs_shd (0x0000173c)*/
+/*! Slice: mcm_raw1_irq_offs:*/
+#define MCM_RAW1_IRQ_OFFS
+#define MCM_RAW1_IRQ_OFFS_MASK 0x1FFFFFF8U
+#define MCM_RAW1_IRQ_OFFS_SHIFT 3U
+/*! Register: isp_ee_ctrl  (0x00003900)*/
+/*! Slice: isp_ee_ctrl enable:*/
+#define  EE_CTRL_ENABLE
+#define  EE_CTRL_ENABLE_MASK 0x00000001U
+#define  EE_CTRL_ENABLE_SHIFT 0U
+/*! Slice: isp_ee_ctrl_input_sel_flag:*/
+#define  EE_CTRL_INPUT_SEL
+#define  EE_CTRL_INPUT_SEL_MASK 0x00000002U
+#define  EE_CTRL_INPUT_SEL_SHIFT 1U
+/*! Slice: isp_ee_ctrl_soft_reset_flag:*/
+#define  EE_CTRL_SOFT_RESET_FLAG
+#define  EE_CTRL_SOFT_RESET_FLAG_MASK 0x00000004U
+#define  EE_CTRL_SOFT_RESET_FLAG_SHIFT 2U
+/*! Slice: isp_ee_ctrl_strength:*/
+#define  EE_CTRL_STRENGTH
+#define  EE_CTRL_STRENGTH_MASK 0x000007F8U
+#define  EE_CTRL_STRENGTH_SHIFT 3U
+/*! Slice: isp_ee_ctrl_source_strength:*/
+#define  EE_CTRL_SOURCE_STRENGTH
+#define  EE_CTRL_SOURCE_STRENGTH_MASK 0x0007F800U
+#define  EE_CTRL_SOURCE_STRENGTH_SHIFT 11U
+/*! Register: isp_ee_y_gain  (0x00003904)*/
+/*! Slice: ee_y_down_gain: */
+#define  EE_Y_DOWN_GAIN
+#define  EE_Y_DOWN_GAIN_MASK 0xFFFF0000U
+#define  EE_Y_DOWN_GAIN_SHIFT 16U
+/*! Slice: ee_y_up_gain: */
+#define  EE_Y_UP_GAIN
+#define  EE_Y_UP_GAIN_MASK 0x0000FFFFU
+#define  EE_Y_UP_GAIN_SHIFT 0U
+/*! Slice: ee_y_gain:*/
+#define  EE_Y_GAIN
+#define  EE_Y_GAIN_MASK 0xFFFFFFFFU
+#define  EE_Y_GAIN_SHIFT 0U
+/*! Register: isp_ee_edge_gain  (0x00003908)*/
+/*! Slice: isp_ee_edge_gain:*/
+#define  EE_EDGE_GAIN
+#define  EE_EDGE_GAIN_MASK 0xFFFF0000U
+#define  EE_EDGE_GAIN_SHIFT 16U
+/*! Register: isp_ee_uv_gain  (0x00003908)*/
+/*! Slice: isp_ee_uv_gain:*/
+#define  EE_UV_GAIN
+#define  EE_UV_GAIN_MASK 0x0000FFFFU
+#define  EE_UV_GAIN_SHIFT 0U
+/*! Register: isp_ee_dummy_hblank  (0x00003918)*/
+/*! Slice: isp_ee_dummy_hblank:*/
+#define  ISP_EE_DUMMY_HBLANK
+#define  ISP_EE_DUMMY_HBLANK_MASK 0x0000FFFFU
+#define  ISP_EE_DUMMY_HBLANK_SHIFT 0U
+/*! Register: isp_ee_ctrl_shd  (0x0000390c)*/
+/*! Slice: isp_ee_ctrl_shd enable:*/
+#define  EE_CTRL_ENABLE_SHD
+#define  EE_CTRL_ENABLE_SHD_MASK 0x00000001U
+#define  EE_CTRL_ENABLE_SHD_SHIFT 0U
+/*! Slice: isp_ee_ctrl_input_sel_shd:*/
+#define  EE_CTRL_INPUT_SEL_SHD
+#define  EE_CTRL_INPUT_SEL_SHD_MASK 0x00000002U
+#define  EE_CTRL_INPUT_SEL_SHD_SHIFT 1U
+/*! Slice: isp_ee_ctrl_soft_reset_flag_shd:*/
+#define  EE_CTRL_SOFT_RESET_FLAG_SHD
+#define  EE_CTRL_SOFT_RESET_FLAG_SHD_MASK 0x00000004U
+#define  EE_CTRL_SOFT_RESET_FLAG_SHD_SHIFT 2U
+/*! Slice: isp_ee_ctrl_strength_shd:*/
+#define  EE_CTRL_STRENGTH_SHD
+#define  EE_CTRL_STRENGTH_SHD_MASK 0x000007F8U
+#define  EE_CTRL_STRENGTH_SHD_SHIFT 3U
+/*! Slice: isp_ee_ctrl_source_strength_shd:*/
+#define  EE_CTRL_SOURCE_STRENGTH_SHD
+#define  EE_CTRL_SOURCE_STRENGTH_SHD_MASK 0xFF000000U
+#define  EE_CTRL_SOURCE_STRENGTH_SHD_SHIFT 24U
+/*! Register: isp_ee_y_gain_shd  (0x00003910)*/
+/*! Slice: isp_ee_y_gain_shd:*/
+#define  EE_Y_GAIN_SHD
+#define  EE_Y_GAIN_SHD_MASK 0xFFFFFFFFU
+#define  EE_Y_GAIN_SHD_SHIFT 0U
+/*! Register: isp_ee_edge_gain_shd  (0x00003908)*/
+/*! Slice: isp_ee_edge_gain_shd:*/
+#define  EE_EDGE_GAIN_SHD
+#define  EE_EDGE_GAIN_SHD_MASK 0xFFFF0000U
+#define  EE_EDGE_GAIN_SHD_SHIFT 16U
+/*! Register: isp_ee_uv_gain_shd  (0x00003914)*/
+/*! Slice: isp_ee_uv_gain_shd:*/
+#define  EE_UV_GAIN_SHD
+#define  EE_UV_GAIN_SHD_MASK 0x0000FFFFU
+#define  EE_UV_GAIN_SHD_SHIFT 0U
+#define ISP_DEMOSAIC_THR
+#define ISP_DEMOSAIC_THR_MASK 0xff000000U
+#define ISP_DEMOSAIC_THR_SHIFT 24U
+#define ISP_DEMOSAIC_DENOISE_STRENGTH
+#define ISP_DEMOSAIC_DENOISE_STRENGTH_MASK 0x003f0000U
+#define ISP_DEMOSAIC_DENOISE_STRENGTH_SHIFT 16U
+#define ISP_DEMOSAIC_SHARPEN_SIZE
+#define ISP_DEMOSAIC_SHARPEN_SIZE_MASK 0x00001f00U
+#define ISP_DEMOSAIC_SHARPEN_SIZE_SHIFT 8U
+#define ISP_DEMOSAIC_SHARPEN_LINE_ENABLE
+#define ISP_DEMOSAIC_SHARPEN_LINE_ENABLE_MASK 0x00000020U
+#define ISP_DEMOSAIC_SHARPEN_LINE_ENABLE_SHIFT 5U
+#define ISP_DEMOSAIC_SKIN_ENABLE
+#define ISP_DEMOSAIC_SKIN_ENABLE_MASK 0x00000010U
+#define ISP_DEMOSAIC_SKIN_ENABLE_SHIFT 4U
+#define ISP_DEMOSAIC_DEPURPLE_ENABLE
+#define ISP_DEMOSAIC_DEPURPLE_ENABLE_MASK 0x00000008U
+#define ISP_DEMOSAIC_DEPURPLE_ENABLE_SHIFT 3U
+#define ISP_DEMOSAIC_DEMOIRE_ENABLE
+#define ISP_DEMOSAIC_DEMOIRE_ENABLE_MASK 0x00000004U
+#define ISP_DEMOSAIC_DEMOIRE_ENABLE_SHIFT 2U
+#define ISP_DEMOSAIC_SHARPEN_ENBALE
+#define ISP_DEMOSAIC_SHARPEN_ENBALE_MASK 0x00000002U
+#define ISP_DEMOSAIC_SHARPEN_ENBALE_SHIFT 1U
+#define ISP_DEMOSAIC_BYPASS
+#define ISP_DEMOSAIC_BYPASS_MASK 0x00000001U
+#define ISP_DEMOSAIC_BYPASS_SHIFT 0U
+#define ISP_DMSC_INTERPLATION_DIR_THR_MIN
+#define ISP_DMSC_INTERPLATION_DIR_THR_MIN_MASK 0x00fff000U
+#define ISP_DMSC_INTERPLATION_DIR_THR_MIN_SHIFT 12U
+#define ISP_DMSC_INTERPLATION_DIR_THR_MAX
+#define ISP_DMSC_INTERPLATION_DIR_THR_MAX_MASK 0x00000fffU
+#define ISP_DMSC_INTERPLATION_DIR_THR_MAX_SHIFT 0U
+#define ISP_DMSC_DEMOIRE_AREA_THR
+#define ISP_DMSC_DEMOIRE_AREA_THR_MASK 0x00003f00U
+#define ISP_DMSC_DEMOIRE_AREA_THR_SHIFT 8U
+#define ISP_DMSC_DEMOIRE_SAT_SHRINK
+#define ISP_DMSC_DEMOIRE_SAT_SHRINK_MASK 0x0000003fU
+#define ISP_DMSC_DEMOIRE_SAT_SHRINK_SHIFT 0U
+#define ISP_DMSC_DEMOIRE_R2
+#define ISP_DMSC_DEMOIRE_R2_MASK  0x3FE00000U
+#define ISP_DMSC_DEMOIRE_R2_SHIFT 21U
+#define ISP_DMSC_DEMOIRE_R1
+#define ISP_DMSC_DEMOIRE_R1_MASK  0x001ff000U
+#define ISP_DMSC_DEMOIRE_R1_SHIFT 12U
+#define ISP_DMSC_DEMOIRE_T2_SHIFT
+#define ISP_DMSC_DEMOIRE_T2_SHIFT_MASK 0x00000f00U
+#define ISP_DMSC_DEMOIRE_T2_SHIFT_SHIFT 8U
+#define ISP_DMSC_DEMOIRE_T1
+#define ISP_DMSC_DEMOIRE_T1_MASK 0x000000FFU
+#define ISP_DMSC_DEMOIRE_T1_SHIFT 0U
+#define ISP_DMSC_DEMOIRE_EDGE_R2
+#define ISP_DMSC_DEMOIRE_EDGE_R2_MASK 0x7fc00000U
+#define ISP_DMSC_DEMOIRE_EDGE_R2_SHIFT 22U
+#define ISP_DMSC_DEMOIRE_EDGE_R1
+#define ISP_DMSC_DEMOIRE_EDGE_R1_MASK 0x003fe000U
+#define ISP_DMSC_DEMOIRE_EDGE_R1_SHIFT 13U
+#define ISP_DMSC_DEMOIRE_EDGE_T2_SHIFT
+#define ISP_DMSC_DEMOIRE_EDGE_T2_SHIFT_MASK 0x00001e00U
+#define ISP_DMSC_DEMOIRE_EDGE_T2_SHIFT_SHIFT 9U
+#define ISP_DMSC_DEMOIRE_EDGE_T1
+#define ISP_DMSC_DEMOIRE_EDGE_T1_MASK 0x000001ffU
+#define ISP_DMSC_DEMOIRE_EDGE_T1_SHIFT 0U
+#define ISP_DMSC_SHARPEN_FACTOR_BLACK
+#define ISP_DMSC_SHARPEN_FACTOR_BLACK_MASK 0x001ff000U
+#define ISP_DMSC_SHARPEN_FACTOR_BLACK_SHIFT 12U
+#define ISP_DMSC_SHARPEN_FACTOR_WHITE
+#define ISP_DMSC_SHARPEN_FACTOR_WHITE_MASK 0x000001ffU
+#define ISP_DMSC_SHARPEN_FACTOR_WHITE_SHIFT 0U
+#define ISP_DMSC_SHARPEN_CLIP_BLACK
+#define ISP_DMSC_SHARPEN_CLIP_BLACK_MASK 0x007ff000U
+#define ISP_DMSC_SHARPEN_CLIP_BLACK_SHIFT 12U
+#define ISP_DMSC_SHARPEN_CLIP_WHITE
+#define ISP_DMSC_SHARPEN_CLIP_WHITE_MASK 0x000007ffU
+#define ISP_DMSC_SHARPEN_CLIP_WHITE_SHIFT 0U
+#define ISP_DMSC_SHARPEN_T4_SHIFT
+#define ISP_DMSC_SHARPEN_T4_SHIFT_MASK 0xf0000000U
+#define ISP_DMSC_SHARPEN_T4_SHIFT_SHIFT 28U
+#define ISP_DMSC_SHARPEN_T3
+#define ISP_DMSC_SHARPEN_T3_MASK 0x07ff0000U
+#define ISP_DMSC_SHARPEN_T3_SHIFT 16U
+#define ISP_DMSC_SHARPEN_T2_SHIFT
+#define ISP_DMSC_SHARPEN_T2_SHIFT_MASK 0x0000f000U
+#define ISP_DMSC_SHARPEN_T2_SHIFT_SHIFT 12U
+#define ISP_DMSC_SHARPEN_T1
+#define ISP_DMSC_SHARPEN_T1_MASK 0x000003ffU
+#define ISP_DMSC_SHARPEN_T1_SHIFT 0U
+#define ISP_DMSC_SHARPEN_R3
+#define ISP_DMSC_SHARPEN_R3_MASK  0x07fc0000
+#define ISP_DMSC_SHARPEN_R3_SHIFT 18U
+#define ISP_DMSC_SHARPEN_R2
+#define ISP_DMSC_SHARPEN_R2_MASK  0x0003fe00
+#define ISP_DMSC_SHARPEN_R2_SHIFT 9U
+#define ISP_DMSC_SHARPEN_R1
+#define ISP_DMSC_SHARPEN_R1_MASK 0x000001ffU
+#define ISP_DMSC_SHARPEN_R1_SHIFT 0U
+#define ISP_DMSC_SHARPEN_LINE_SHIFT2
+#define ISP_DMSC_SHARPEN_LINE_SHIFT2_MASK 0xf0000000U
+#define ISP_DMSC_SHARPEN_LINE_SHIFT2_SHIFT 28U
+#define ISP_DMSC_SHARPEN_LINE_SHIFT1
+#define ISP_DMSC_SHARPEN_LINE_SHIFT1_MASK 0x0f000000U
+#define ISP_DMSC_SHARPEN_LINE_SHIFT1_SHIFT 24U
+#define ISP_DMSC_SHARPEN_LINE_T1
+#define ISP_DMSC_SHARPEN_LINE_T1_MASK 0x007ff000U
+#define ISP_DMSC_SHARPEN_LINE_T1_SHIFT 12U
+#define ISP_DMSC_SHARPEN_LINE_STRENGTH
+#define ISP_DMSC_SHARPEN_LINE_STRENGTH_MASK 0x00000fffU
+#define ISP_DMSC_SHARPEN_LINE_STRENGTH_SHIFT 0U
+#define ISP_DMSC_SHARPEN_LINE_R2
+#define ISP_DMSC_SHARPEN_LINE_R2_MASK 0x0003fe00
+#define ISP_DMSC_SHARPEN_LINE_R2_SHIFT 9U
+#define ISP_DMSC_SHARPEN_LINE_R1
+#define ISP_DMSC_SHARPEN_LINE_R1_MASK 0x000001ffU
+#define ISP_DMSC_SHARPEN_LINE_R1_SHIFT 0U
+#define ISP_DMSC_HF_FILT_00
+#define ISP_DMSC_HF_FILT_00_MASK 0x3f000000U
+#define ISP_DMSC_HF_FILT_00_SHIFT 24U
+#define ISP_DMSC_HF_FILT_01
+#define ISP_DMSC_HF_FILT_01_MASK 0x00fc0000U
+#define ISP_DMSC_HF_FILT_01_SHIFT 18U
+#define ISP_DMSC_HF_FILT_02
+#define ISP_DMSC_HF_FILT_02_MASK 0x0003f000U
+#define ISP_DMSC_HF_FILT_02_SHIFT 12U
+#define ISP_DMSC_HF_FILT_10
+#define ISP_DMSC_HF_FILT_10_MASK 0x00000fc0U
+#define ISP_DMSC_HF_FILT_10_SHIFT 6U
+#define ISP_DMSC_HF_FILT_11
+#define ISP_DMSC_HF_FILT_11_MASK 0x0000003fU
+#define ISP_DMSC_HF_FILT_11_SHIFT 0U
+#define ISP_DMSC_HF_FILT_12
+#define ISP_DMSC_HF_FILT_12_MASK 0x00fc0000U
+#define ISP_DMSC_HF_FILT_12_SHIFT 18U
+#define ISP_DMSC_HF_FILT_20
+#define ISP_DMSC_HF_FILT_20_MASK 0x0003f000U
+#define ISP_DMSC_HF_FILT_20_SHIFT 12U
+#define ISP_DMSC_HF_FILT_21
+#define ISP_DMSC_HF_FILT_21_MASK 0x00000fc0U
+#define ISP_DMSC_HF_FILT_21_SHIFT 6U
+#define ISP_DMSC_HF_FILT_22
+#define ISP_DMSC_HF_FILT_22_MASK 0x0000003fU
+#define ISP_DMSC_HF_FILT_22_SHIFT 0U
+#define ISP_DMSC_DEPURPLE_RED_SAT
+#define ISP_DMSC_DEPURPLE_RED_SAT_MASK 0x00001000U
+#define ISP_DMSC_DEPURPLE_RED_SAT_SHIFT 12U
+#define ISP_DMSC_DEPURPLE_BLUE_SAT
+#define ISP_DMSC_DEPURPLE_BLUE_SAT_MASK 0x00002000U
+#define ISP_DMSC_DEPURPLE_BLUE_SAT_SHIFT 13U
+#define ISP_DMSC_DEPURPLE_SAT_SHRINK
+#define ISP_DMSC_DEPURPLE_SAT_SHRINK_MASK 0x00000f00U
+#define ISP_DMSC_DEPURPLE_SAT_SHRINK_SHIFT 8U
+#define ISP_DMSC_DEPURPLE_THR
+#define ISP_DMSC_DEPURPLE_THR_MASK 0x000000ffU
+#define ISP_DMSC_DEPURPLE_THR_SHIFT 0U
+#define ISP_DMSC_SKIN_CB_THR_MAX_2047
+#define ISP_DMSC_SKIN_CB_THR_MAX_2047_MASK 0x00FFF000U
+#define ISP_DMSC_SKIN_CB_THR_MAX_2047_SHIFT 12U
+#define ISP_DMSC_SKIN_CB_THR_MIN_2047
+#define ISP_DMSC_SKIN_CB_THR_MIN_2047_MASK 0x00000fffU
+#define ISP_DMSC_SKIN_CB_THR_MIN_2047_SHIFT 0U
+#define ISP_DMSC_SKIN_CR_THR_MAX_2047
+#define ISP_DMSC_SKIN_CR_THR_MAX_2047_MASK 0x00FFF000U
+#define ISP_DMSC_SKIN_CR_THR_MAX_2047_SHIFT 12U
+#define ISP_DMSC_SKIN_CR_THR_MIN_2047
+#define ISP_DMSC_SKIN_CR_THR_MIN_2047_MASK 0x00000fffU
+#define ISP_DMSC_SKIN_CR_THR_MIN_2047_SHIFT 0U
+#define ISP_DMSC_SKIN_Y_THR_MAX
+#define ISP_DMSC_SKIN_Y_THR_MAX_MASK 0x00FFF000U
+#define ISP_DMSC_SKIN_Y_THR_MAX_SHIFT 12U
+#define ISP_DMSC_SKIN_Y_THR_MIN
+#define ISP_DMSC_SKIN_Y_THR_MIN_MASK 0x00000fffU
+#define ISP_DMSC_SKIN_Y_THR_MIN_SHIFT 0U
+#define ISP_DMSC_CAC_ENABLE
+#define ISP_DMSC_CAC_ENABLE_MASK   0x00000001U
+#define ISP_DMSC_CAC_ENABLE_SHIFT 0U
+#define ISP_DMSC_V_COUNT_START
+#define ISP_DMSC_V_COUNT_START_MASK  0xffff0000U
+#define ISP_DMSC_V_COUNT_START_SHIFT 16U
+#define ISP_DMSC_H_COUNT_START
+#define ISP_DMSC_H_COUNT_START_MASK 0x0000ffffU
+#define ISP_DMSC_H_COUNT_START_SHIFT 0U
+#define ISP_DMSC_A_RED
+#define ISP_DMSC_A_RED_MASK 0x01ff0000U
+#define ISP_DMSC_A_RED_SHIFT 16U
+#define ISP_DMSC_A_BLUE
+#define ISP_DMSC_A_BLUE_MASK 0x000001ffU
+#define ISP_DMSC_A_BLUE_SHIFT 0U
+#define ISP_DMSC_B_RED
+#define ISP_DMSC_B_RED_MASK 0x01ff0000U
+#define ISP_DMSC_B_RED_SHIFT 16U
+#define ISP_DMSC_B_BLUE
+#define ISP_DMSC_B_BLUE_MASK  0x000001ffU
+#define ISP_DMSC_B_BLUE_SHIFT 0U
+#define ISP_DMSC_C_RED
+#define ISP_DMSC_C_RED_MASK 0x01ff0000U
+#define ISP_DMSC_C_RED_SHIFT 16U
+#define ISP_DMSC_C_BLUE
+#define ISP_DMSC_C_BLUE_MASK 0x000001ffU
+#define ISP_DMSC_C_BLUE_SHIFT 0U
+#define ISP_DMSC_X_NS
+#define ISP_DMSC_X_NS_MASK 0x000f0000U
+#define ISP_DMSC_X_NS_SHIFT 16U
+#define ISP_DMSC_X_NF
+#define ISP_DMSC_X_NF_MASK 0x0000001f
+#define ISP_DMSC_X_NF_SHIFT 0U
+#define ISP_DMSC_Y_NS
+#define ISP_DMSC_Y_NS_MASK 0x000f0000U
+#define ISP_DMSC_Y_NS_SHIFT 16U
+#define ISP_DMSC_Y_NF
+#define ISP_DMSC_Y_NF_MASK 0x0000001fU
+#define ISP_DMSC_Y_NF_SHIFT 0U
+#define ISP_DMSC_Y_NF
+#define ISP_DMSC_Y_NF_MASK 0x0000001fU
+#define ISP_DMSC_Y_NF_SHIFT 0U
+#define ISP_DMSC_IMAGE_H_SIZE
+#define ISP_DMSC_IMAGE_H_SIZE_MASK 0x0000ffffU
+#define ISP_DMSC_IMAGE_H_SIZE_SHIFT 0U
+#define ISP_DMSC_IMAGE_H_BLANK
+#define ISP_DMSC_IMAGE_H_BLANK_MASK 0xffff0000U
+#define ISP_DMSC_IMAGE_H_BLANK_SHIFT 16U
+#define ISP_DMSC_H_BLANK
+#define ISP_DMSC_H_BLANK_MASK 0xffff0000U
+#define ISP_DMSC_H_BLANK_SHIFT 16U
+#define ISP_GREEN_EQUILIBTATE_TH
+#define ISP_GREEN_EQUILIBTATE_TH_MASK 0x0001fffeU
+#define ISP_GREEN_EQUILIBTATE_TH_SHIFT 1U
+#define ISP_GREEN_EQUILIBTATE_ENABLE
+#define ISP_GREEN_EQUILIBTATE_ENABLE_MASK 0x00000001U
+#define ISP_GREEN_EQUILIBTATE_ENABLE_SHIFT 0U
+#define ISP_GREEN_EQUILIBTATE_HCNT_DUMMY
+#define ISP_GREEN_EQUILIBTATE_HCNT_DUMMY_MASK 0x0000ffffU
+#define ISP_GREEN_EQUILIBTATE_HCNT_DUMMY_SHIFT 0U
+#define ISP_CURVE_MODE
+#define ISP_CURVE_MODE_MASK 0x00000006U
+#define ISP_CURVE_MODE_SHIFT 1U
+#define ISP_CURVE_ENABLE
+#define ISP_CURVE_ENABLE_MASK 0x00000001U
+#define ISP_CURVE_ENABLE_SHIFT 0U
+#define ISP_CURVE_LUT_X_ADDR
+#define ISP_CURVE_LUT_X_ADDR_MASK 0x0000007fU
+#define ISP_CURVE_LUT_X_ADDR_SHIFT 0U
+#define ISP_CURVE_LUT_X_WRITE_DATA
+#define ISP_CURVE_LUT_X_WRITE_DATA_MASK 0x000000fffU
+#define ISP_CURVE_LUT_X_WRITE_DATA_SHIFT 0U
+#define ISP_CURVE_LUT_LUMA_ADDR
+#define ISP_CURVE_LUT_LUMA_ADDR_MASK 0x0000007fU
+#define ISP_CURVE_LUT_LUMA_ADDR_SHIFT 0U
+#define ISP_CURVE_LUT_LUMA_WRITE_DATA
+#define ISP_CURVE_LUT_LUMA_WRITE_DATA_MASK 0x000007ffU
+#define ISP_CURVE_LUT_LUMA_WRITE_DATA_SHIFT 0U
+#define ISP_CURVE_LUT_CHROMA_ADDR
+#define ISP_CURVE_LUT_CHROMA_ADDR_MASK 0x0000007fU
+#define ISP_CURVE_LUT_CHROMA_ADDR_SHIFT 0U
+#define ISP_CURVE_LUT_CHROMA_WRITE_DATA
+#define ISP_CURVE_LUT_CHROMA_WRITE_DATA_MASK 0x00000fffU
+#define ISP_CURVE_LUT_CHROMA_WRITE_DATA_SHIFT 0U
+#define ISP_CURVE_LUT_SHIFT_ADDR
+#define ISP_CURVE_LUT_SHIFT_ADDR_MASK 0x0000007fU
+#define ISP_CURVE_LUT_SHIFT_ADDR_SHIFT 0U
+#define ISP_CURVE_LUT_SHIFT_WRITE_DATA
+#define ISP_CURVE_LUT_SHIFT_WRITE_DATA_MASK 0x0000001fU
+#define ISP_CURVE_LUT_SHIFT_WRITE_DATA_SHIFT 0U
+#define ISP_DIGITAL_GAIN_R
+#define ISP_DIGITAL_GAIN_R_MASK 0xffff0000U
+#define ISP_DIGITAL_GAIN_R_SHIFT 16U
+#define ISP_DIGITAL_GAIN_B
+#define ISP_DIGITAL_GAIN_B_MASK 0x0000ffffU
+#define ISP_DIGITAL_GAIN_B_SHIFT 0U
+#define ISP_DIGITAL_GAIN_GR
+#define ISP_DIGITAL_GAIN_GR_MASK 0xffff0000U
+#define ISP_DIGITAL_GAIN_GR_SHIFT 16U
+#define ISP_DIGITAL_GAIN_GB
+#define ISP_DIGITAL_GAIN_GB_MASK 0x0000ffffU
+#define ISP_DIGITAL_GAIN_GB_SHIFT 0U
+/*! Register: isp_vsync_delay: (0x00000730)*/
+/*! Slice: vsync_delya:*/
+#define ISP_VSYNC_DELAY
+#define ISP_VSYNC_DELAY_MASK 0x01FFFFFFU
+#define ISP_VSYNC_DELAY_SHIFT 0U
+/*! Register: isp_vsync_delay: (0x00000730)*/
+/*! Slice: reg_vsync_sel:*/
+#define ISP_VSYNC_DELAY_SEL
+#define ISP_VSYNC_DELAY_SEL_MASK 0x80000000U
+#define ISP_VSYNC_DELAY_SEL_SHIFT 31U
+#define WDR4_DUMMY_BLK
+#define WDR4_DUMMY_BLK_MASK (0xffff << 16 )
+#define WDR4_DUMMY_BLK_SHIFT 16U
+
+#define WDR4_DUMMY_BLK_EN
+#define WDR4_DUMMY_BLK_EN_MASK 0x1 << 15
+#define WDR4_DUMMY_BLK_EN_SHIFT 15U
+
+#define WDR4_SOFT_RESET_FLAG
+#define WDR4_SOFT_RESET_FLAG_MASK 0x1 << 1
+#define WDR4_SOFT_RESET_FLAG_SHIFT 1U
+
+#define WDR4_ENABLE
+#define WDR4_ENABLE_MASK 0x1 << 0
+#define WDR4_ENABLE_SHIFT 0U
+
+#define WDR4_OUTPUT_SHIFT_BIT
+#define WDR4_OUTPUT_SHIFT_BIT_MASK (0x3f << 6 )
+#define WDR4_OUTPUT_SHIFT_BIT_SHIFT 6U
+
+#define WDR4_PIXEL_SHIFT_BIT
+#define WDR4_PIXEL_SHIFT_BIT_MASK (0x3f << 0 )
+#define WDR4_PIXEL_SHIFT_BIT_SHIFT 0U
+
+#define WDR4_BLOCK_HEIGHT
+#define WDR4_BLOCK_HEIGHT_MASK (0x1ff << 9 )
+#define WDR4_BLOCK_HEIGHT_SHIFT 9U
+
+#define WDR4_BLOCK_WIDTH
+#define WDR4_BLOCK_WIDTH_MASK (0x1ff << 0 )
+#define WDR4_BLOCK_WIDTH_SHIFT 0U
+
+#define WDR4_BLOCK_AREA_INVERSE
+#define WDR4_BLOCK_AREA_INVERSE_MASK (0xfffff << 0 )
+#define WDR4_BLOCK_AREA_INVERSE_SHIFT 0U
+
+#define WDR4_VALUE_WEIGHT_3
+#define WDR4_VALUE_WEIGHT_3_MASK (0x1f << 15 )
+#define WDR4_VALUE_WEIGHT_3_SHIFT 15U
+
+#define WDR4_VALUE_WEIGHT_2
+#define WDR4_VALUE_WEIGHT_2_MASK (0x1f << 10 )
+#define WDR4_VALUE_WEIGHT_2_SHIFT 10U
+
+#define WDR4_VALUE_WEIGHT_1
+#define WDR4_VALUE_WEIGHT_1_MASK (0x1f << 5 )
+#define WDR4_VALUE_WEIGHT_1_SHIFT 5U
+
+#define WDR4_VALUE_WEIGHT_0
+#define WDR4_VALUE_WEIGHT_0_MASK (0x1f << 0 )
+#define WDR4_VALUE_WEIGHT_0_SHIFT 0U
+
+#define WDR4_TOTAL_STRENGTH
+#define WDR4_TOTAL_STRENGTH_MASK (0xff << 24 )
+#define WDR4_TOTAL_STRENGTH_SHIFT 24U
+
+#define WDR4_LOCAL_STRENGTH
+#define WDR4_LOCAL_STRENGTH_MASK (0xff << 16 )
+#define WDR4_LOCAL_STRENGTH_SHIFT 16U
+
+#define WDR4_GLOBAL_STRENGTH
+#define WDR4_GLOBAL_STRENGTH_MASK (0xff << 8 )
+#define WDR4_GLOBAL_STRENGTH_SHIFT 8U
+
+#define WDR4_LOW_STRENGTH
+#define WDR4_LOW_STRENGTH_MASK (0xff << 0 )
+#define WDR4_LOW_STRENGTH_SHIFT 0U
+
+#define WDR4_HIGH_STRENGTH
+#define WDR4_HIGH_STRENGTH_MASK (0xff << 16 )
+#define WDR4_HIGH_STRENGTH_SHIFT 16U
+
+#define WDR4_DRC_BAYER_RATIOLSVS
+#define WDR4_DRC_BAYER_RATIOLSVS_MASK (0xff << 8 )
+#define WDR4_DRC_BAYER_RATIOLSVS_SHIFT 8U
+
+#define WDR4_DRC_BAYER_RATIO
+#define WDR4_DRC_BAYER_RATIO_MASK (0xff << 0 )
+#define WDR4_DRC_BAYER_RATIO_SHIFT 0U
+
+#define WDR4_CONTRAST
+#define WDR4_CONTRAST_MASK (0x7ff << 10 )
+#define WDR4_CONTRAST_SHIFT 10U
+
+#define WDR4_FLAT_STRENGTH
+#define WDR4_FLAT_STRENGTH_MASK (0x1f << 5 )
+#define WDR4_FLAT_STRENGTH_SHIFT 5U
+
+#define WDR4_FLAT_THR
+#define WDR4_FLAT_THR_MASK (0x1f << 0 )
+#define WDR4_FLAT_THR_SHIFT 0U
+
+#define WDR4_PIXEL_MERGE_SLOPE
+#define WDR4_PIXEL_MERGE_SLOPE_MASK (0xff << 24 )
+#define WDR4_PIXEL_MERGE_SLOPE_SHIFT 24U
+
+#define WDR4_PIXEL_MERGE_BASE
+#define WDR4_PIXEL_MERGE_BASE_MASK (0xff << 16 )
+#define WDR4_PIXEL_MERGE_BASE_SHIFT 16U
+
+#define WDR4_PIXEL_ADJUST_SLOPE
+#define WDR4_PIXEL_ADJUST_SLOPE_MASK (0xff << 8 )
+#define WDR4_PIXEL_ADJUST_SLOPE_SHIFT 8U
+
+#define WDR4_PIXEL_ADJUST_BASE
+#define WDR4_PIXEL_ADJUST_BASE_MASK (0xff << 0 )
+#define WDR4_PIXEL_ADJUST_BASE_SHIFT 0U
+
+#define WDR4_ENTROPY_SLOPE
+#define WDR4_ENTROPY_SLOPE_MASK (0x3ff << 10 )
+#define WDR4_ENTROPY_SLOPE_SHIFT 10U
+
+#define WDR4_ENTROPY_BASE
+#define WDR4_ENTROPY_BASE_MASK (0x3ff << 0 )
+#define WDR4_ENTROPY_BASE_SHIFT 0U
+
+#define WDR4_BILITERAL_WIDTH_SIGMA
+#define WDR4_BILITERAL_WIDTH_SIGMA_MASK (0xfffff << 0 )
+#define WDR4_BILITERAL_WIDTH_SIGMA_SHIFT 0U
+
+#define WDR4_BILITERAL_HEIGHT_SIGMA
+#define WDR4_BILITERAL_HEIGHT_SIGMA_MASK (0xfffff << 0 )
+#define WDR4_BILITERAL_HEIGHT_SIGMA_SHIFT 0U
+
+#define WDR4_BILITERAL_VALUE_SIGMA
+#define WDR4_BILITERAL_VALUE_SIGMA_MASK (0xfffff << 0 )
+#define WDR4_BILITERAL_VALUE_SIGMA_SHIFT 0U
+
+#define WDR4_BLOCK_COL_FLAG
+#define WDR4_BLOCK_COL_FLAG_MASK (0xffffffff << 0 )
+#define WDR4_BLOCK_COL_FLAG_SHIFT 0U
+
+#define WDR4_BLOCK_ROW_FLAG
+#define WDR4_BLOCK_ROW_FLAG_MASK (0xffffffff << 0 )
+#define WDR4_BLOCK_ROW_FLAG_SHIFT 0U
+
+#define WDR4_FRAME_AVERAGE
+#define WDR4_FRAME_AVERAGE_MASK (0xffffffff << 0 )
+#define WDR4_FRAME_AVERAGE_SHIFT 0U
+
+#define WDR4_FRAME_STD
+#define WDR4_FRAME_STD_MASK (0xffffffff << 0 )
+#define WDR4_FRAME_STD_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE0_0
+#define WDR4_HISTOGRAM_CURVE0_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE0_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE1
+#define WDR4_HISTOGRAM_CURVE1_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE1_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE0_1
+#define WDR4_HISTOGRAM_CURVE0_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE0_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE2
+#define WDR4_HISTOGRAM_CURVE2_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE2_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE3_0
+#define WDR4_HISTOGRAM_CURVE3_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE3_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE4
+#define WDR4_HISTOGRAM_CURVE4_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE4_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE3_1
+#define WDR4_HISTOGRAM_CURVE3_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE3_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE5
+#define WDR4_HISTOGRAM_CURVE5_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE5_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE6_0
+#define WDR4_HISTOGRAM_CURVE6_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE6_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE7
+#define WDR4_HISTOGRAM_CURVE7_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE7_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE6_1
+#define WDR4_HISTOGRAM_CURVE6_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE6_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE8
+#define WDR4_HISTOGRAM_CURVE8_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE8_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE9_0
+#define WDR4_HISTOGRAM_CURVE9_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE9_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE10
+#define WDR4_HISTOGRAM_CURVE10_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE10_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE9_1
+#define WDR4_HISTOGRAM_CURVE9_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE9_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE11
+#define WDR4_HISTOGRAM_CURVE11_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE11_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE12_0
+#define WDR4_HISTOGRAM_CURVE12_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE12_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE13
+#define WDR4_HISTOGRAM_CURVE13_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE13_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE12_1
+#define WDR4_HISTOGRAM_CURVE12_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE12_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE14
+#define WDR4_HISTOGRAM_CURVE14_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE14_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE15_0
+#define WDR4_HISTOGRAM_CURVE15_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE15_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE16
+#define WDR4_HISTOGRAM_CURVE16_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE16_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE15_1
+#define WDR4_HISTOGRAM_CURVE15_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE15_1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE17
+#define WDR4_HISTOGRAM_CURVE17_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE17_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE18_0
+#define WDR4_HISTOGRAM_CURVE18_0_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE18_0_SHIFT 20U
+
+#define WDR4_HISTOGRAM_CURVE19
+#define WDR4_HISTOGRAM_CURVE19_MASK (0xfffff << 0 )
+#define WDR4_HISTOGRAM_CURVE19_SHIFT 0U
+
+#define WDR4_HISTOGRAM_CURVE18_1
+#define WDR4_HISTOGRAM_CURVE18_1_MASK (0x3ff << 20 )
+#define WDR4_HISTOGRAM_CURVE18_1_SHIFT 20U
+
+#define WDR4_ENTROPY_CONVERT0
+#define WDR4_ENTROPY_CONVERT0_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT0_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT1
+#define WDR4_ENTROPY_CONVERT1_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT1_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT2
+#define WDR4_ENTROPY_CONVERT2_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT2_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT3
+#define WDR4_ENTROPY_CONVERT3_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT3_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT4
+#define WDR4_ENTROPY_CONVERT4_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT4_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT5
+#define WDR4_ENTROPY_CONVERT5_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT5_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT6
+#define WDR4_ENTROPY_CONVERT6_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT6_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT7
+#define WDR4_ENTROPY_CONVERT7_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT7_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT8
+#define WDR4_ENTROPY_CONVERT8_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT8_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT9
+#define WDR4_ENTROPY_CONVERT9_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT9_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT10
+#define WDR4_ENTROPY_CONVERT10_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT10_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT11
+#define WDR4_ENTROPY_CONVERT11_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT11_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT12
+#define WDR4_ENTROPY_CONVERT12_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT12_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT13
+#define WDR4_ENTROPY_CONVERT13_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT13_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT14
+#define WDR4_ENTROPY_CONVERT14_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT14_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT15
+#define WDR4_ENTROPY_CONVERT15_MASK (0x1ff << 18 )
+#define WDR4_ENTROPY_CONVERT15_SHIFT 18U
+
+#define WDR4_ENTROPY_CONVERT16
+#define WDR4_ENTROPY_CONVERT16_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT16_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT17
+#define WDR4_ENTROPY_CONVERT17_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT17_SHIFT 0U
+
+#define WDR4_ENTROPY_CONVERT18
+#define WDR4_ENTROPY_CONVERT18_MASK (0x1ff << 9 )
+#define WDR4_ENTROPY_CONVERT18_SHIFT 9U
+
+#define WDR4_ENTROPY_CONVERT19
+#define WDR4_ENTROPY_CONVERT19_MASK (0x1ff << 0 )
+#define WDR4_ENTROPY_CONVERT19_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE0_0
+#define WDR4_GAMMA_PRE_CURVE0_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE0_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE1
+#define WDR4_GAMMA_PRE_CURVE1_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE1_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE0_1
+#define WDR4_GAMMA_PRE_CURVE0_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE0_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE2
+#define WDR4_GAMMA_PRE_CURVE2_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE2_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE3_0
+#define WDR4_GAMMA_PRE_CURVE3_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE3_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE4
+#define WDR4_GAMMA_PRE_CURVE4_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE4_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE3_1
+#define WDR4_GAMMA_PRE_CURVE3_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE3_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE5
+#define WDR4_GAMMA_PRE_CURVE5_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE5_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE6_0
+#define WDR4_GAMMA_PRE_CURVE6_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE6_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE7
+#define WDR4_GAMMA_PRE_CURVE7_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE7_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE6_1
+#define WDR4_GAMMA_PRE_CURVE6_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE6_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE8
+#define WDR4_GAMMA_PRE_CURVE8_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE8_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE9_0
+#define WDR4_GAMMA_PRE_CURVE9_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE9_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE10
+#define WDR4_GAMMA_PRE_CURVE10_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE10_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE9_1
+#define WDR4_GAMMA_PRE_CURVE9_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE9_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE11
+#define WDR4_GAMMA_PRE_CURVE11_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE11_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE12_0
+#define WDR4_GAMMA_PRE_CURVE12_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE12_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE13
+#define WDR4_GAMMA_PRE_CURVE13_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE13_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE12_1
+#define WDR4_GAMMA_PRE_CURVE12_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE12_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE14
+#define WDR4_GAMMA_PRE_CURVE14_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE14_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE15_0
+#define WDR4_GAMMA_PRE_CURVE15_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE15_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE16
+#define WDR4_GAMMA_PRE_CURVE16_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE16_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE15_1
+#define WDR4_GAMMA_PRE_CURVE15_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE15_1_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE17
+#define WDR4_GAMMA_PRE_CURVE17_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE17_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE18_0
+#define WDR4_GAMMA_PRE_CURVE18_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE18_0_SHIFT 20U
+
+#define WDR4_GAMMA_PRE_CURVE19
+#define WDR4_GAMMA_PRE_CURVE19_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_PRE_CURVE19_SHIFT 0U
+
+#define WDR4_GAMMA_PRE_CURVE18_1
+#define WDR4_GAMMA_PRE_CURVE18_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_PRE_CURVE18_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE0_0
+#define WDR4_GAMMA_UP_CURVE0_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE0_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE1
+#define WDR4_GAMMA_UP_CURVE1_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE1_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE0_1
+#define WDR4_GAMMA_UP_CURVE0_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE0_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE2
+#define WDR4_GAMMA_UP_CURVE2_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE2_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE3_0
+#define WDR4_GAMMA_UP_CURVE3_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE3_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE4
+#define WDR4_GAMMA_UP_CURVE4_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE4_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE3_1
+#define WDR4_GAMMA_UP_CURVE3_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE3_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE5
+#define WDR4_GAMMA_UP_CURVE5_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE5_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE6_0
+#define WDR4_GAMMA_UP_CURVE6_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE6_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE7
+#define WDR4_GAMMA_UP_CURVE7_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE7_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE6_1
+#define WDR4_GAMMA_UP_CURVE6_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE6_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE8
+#define WDR4_GAMMA_UP_CURVE8_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE8_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE9_0
+#define WDR4_GAMMA_UP_CURVE9_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE9_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE10
+#define WDR4_GAMMA_UP_CURVE10_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE10_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE9_1
+#define WDR4_GAMMA_UP_CURVE9_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE9_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE11
+#define WDR4_GAMMA_UP_CURVE11_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE11_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE12_0
+#define WDR4_GAMMA_UP_CURVE12_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE12_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE13
+#define WDR4_GAMMA_UP_CURVE13_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE13_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE12_1
+#define WDR4_GAMMA_UP_CURVE12_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE12_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE14
+#define WDR4_GAMMA_UP_CURVE14_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE14_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE15_0
+#define WDR4_GAMMA_UP_CURVE15_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE15_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE16
+#define WDR4_GAMMA_UP_CURVE16_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE16_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE15_1
+#define WDR4_GAMMA_UP_CURVE15_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE15_1_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE17
+#define WDR4_GAMMA_UP_CURVE17_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE17_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE18_0
+#define WDR4_GAMMA_UP_CURVE18_0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE18_0_SHIFT 20U
+
+#define WDR4_GAMMA_UP_CURVE19
+#define WDR4_GAMMA_UP_CURVE19_MASK (0xfffff << 0 )
+#define WDR4_GAMMA_UP_CURVE19_SHIFT 0U
+
+#define WDR4_GAMMA_UP_CURVE18_1
+#define WDR4_GAMMA_UP_CURVE18_1_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_UP_CURVE18_1_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE0
+#define WDR4_GAMMA_DOWN_CURVE0_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE0_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE1
+#define WDR4_GAMMA_DOWN_CURVE1_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE1_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE2
+#define WDR4_GAMMA_DOWN_CURVE2_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE2_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE3
+#define WDR4_GAMMA_DOWN_CURVE3_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE3_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE4
+#define WDR4_GAMMA_DOWN_CURVE4_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE4_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE5
+#define WDR4_GAMMA_DOWN_CURVE5_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE5_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE6
+#define WDR4_GAMMA_DOWN_CURVE6_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE6_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE7
+#define WDR4_GAMMA_DOWN_CURVE7_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE7_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE8
+#define WDR4_GAMMA_DOWN_CURVE8_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE8_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE9
+#define WDR4_GAMMA_DOWN_CURVE9_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE9_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE10
+#define WDR4_GAMMA_DOWN_CURVE10_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE10_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE11
+#define WDR4_GAMMA_DOWN_CURVE11_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE11_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE12
+#define WDR4_GAMMA_DOWN_CURVE12_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE12_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE13
+#define WDR4_GAMMA_DOWN_CURVE13_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE13_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE14
+#define WDR4_GAMMA_DOWN_CURVE14_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE14_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE15
+#define WDR4_GAMMA_DOWN_CURVE15_MASK (0x3ff << 20 )
+#define WDR4_GAMMA_DOWN_CURVE15_SHIFT 20U
+
+#define WDR4_GAMMA_DOWN_CURVE16
+#define WDR4_GAMMA_DOWN_CURVE16_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE16_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE17
+#define WDR4_GAMMA_DOWN_CURVE17_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE17_SHIFT 0U
+
+#define WDR4_GAMMA_DOWN_CURVE18
+#define WDR4_GAMMA_DOWN_CURVE18_MASK (0x3ff << 10 )
+#define WDR4_GAMMA_DOWN_CURVE18_SHIFT 10U
+
+#define WDR4_GAMMA_DOWN_CURVE19
+#define WDR4_GAMMA_DOWN_CURVE19_MASK (0x3ff << 0 )
+#define WDR4_GAMMA_DOWN_CURVE19_SHIFT 0U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE0
+#define WDR4_DISTANCE_WEIGHT_CURVE0_MASK (0x7f << 21 )
+#define WDR4_DISTANCE_WEIGHT_CURVE0_SHIFT 21U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE1
+#define WDR4_DISTANCE_WEIGHT_CURVE1_MASK (0x7f << 14 )
+#define WDR4_DISTANCE_WEIGHT_CURVE1_SHIFT 14U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE2
+#define WDR4_DISTANCE_WEIGHT_CURVE2_MASK (0x7f << 7 )
+#define WDR4_DISTANCE_WEIGHT_CURVE2_SHIFT 7U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE3
+#define WDR4_DISTANCE_WEIGHT_CURVE3_MASK (0x7f << 0 )
+#define WDR4_DISTANCE_WEIGHT_CURVE3_SHIFT 0U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE4
+#define WDR4_DISTANCE_WEIGHT_CURVE4_MASK (0x7f << 21 )
+#define WDR4_DISTANCE_WEIGHT_CURVE4_SHIFT 21U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE5
+#define WDR4_DISTANCE_WEIGHT_CURVE5_MASK (0x7f << 14 )
+#define WDR4_DISTANCE_WEIGHT_CURVE5_SHIFT 14U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE6
+#define WDR4_DISTANCE_WEIGHT_CURVE6_MASK (0x7f << 7 )
+#define WDR4_DISTANCE_WEIGHT_CURVE6_SHIFT 7U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE7
+#define WDR4_DISTANCE_WEIGHT_CURVE7_MASK (0x7f << 0 )
+#define WDR4_DISTANCE_WEIGHT_CURVE7_SHIFT 0U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE8
+#define WDR4_DISTANCE_WEIGHT_CURVE8_MASK (0x7f << 21 )
+#define WDR4_DISTANCE_WEIGHT_CURVE8_SHIFT 21U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE9
+#define WDR4_DISTANCE_WEIGHT_CURVE9_MASK (0x7f << 14 )
+#define WDR4_DISTANCE_WEIGHT_CURVE9_SHIFT 14U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE10
+#define WDR4_DISTANCE_WEIGHT_CURVE10_MASK (0x7f << 7 )
+#define WDR4_DISTANCE_WEIGHT_CURVE10_SHIFT 7U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE11
+#define WDR4_DISTANCE_WEIGHT_CURVE11_MASK (0x7f << 0 )
+#define WDR4_DISTANCE_WEIGHT_CURVE11_SHIFT 0U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE12
+#define WDR4_DISTANCE_WEIGHT_CURVE12_MASK (0x7f << 21 )
+#define WDR4_DISTANCE_WEIGHT_CURVE12_SHIFT 21U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE13
+#define WDR4_DISTANCE_WEIGHT_CURVE13_MASK (0x7f << 14 )
+#define WDR4_DISTANCE_WEIGHT_CURVE13_SHIFT 14U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE14
+#define WDR4_DISTANCE_WEIGHT_CURVE14_MASK (0x7f << 7 )
+#define WDR4_DISTANCE_WEIGHT_CURVE14_SHIFT 7U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE15
+#define WDR4_DISTANCE_WEIGHT_CURVE15_MASK (0x7f << 0 )
+#define WDR4_DISTANCE_WEIGHT_CURVE15_SHIFT 0U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE16
+#define WDR4_DISTANCE_WEIGHT_CURVE16_MASK (0x7f << 21 )
+#define WDR4_DISTANCE_WEIGHT_CURVE16_SHIFT 21U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE17
+#define WDR4_DISTANCE_WEIGHT_CURVE17_MASK (0x7f << 14 )
+#define WDR4_DISTANCE_WEIGHT_CURVE17_SHIFT 14U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE18
+#define WDR4_DISTANCE_WEIGHT_CURVE18_MASK (0x7f << 7 )
+#define WDR4_DISTANCE_WEIGHT_CURVE18_SHIFT 7U
+
+#define WDR4_DISTANCE_WEIGHT_CURVE19
+#define WDR4_DISTANCE_WEIGHT_CURVE19_MASK (0x7f << 0 )
+#define WDR4_DISTANCE_WEIGHT_CURVE19_SHIFT 0U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE0
+#define WDR4_DIFFERENCE_WEIGHT_CURVE0_MASK (0x7f << 21 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE0_SHIFT 21U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE1
+#define WDR4_DIFFERENCE_WEIGHT_CURVE1_MASK (0x7f << 14 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE1_SHIFT 14U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE2
+#define WDR4_DIFFERENCE_WEIGHT_CURVE2_MASK (0x7f << 7 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE2_SHIFT 7U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE3
+#define WDR4_DIFFERENCE_WEIGHT_CURVE3_MASK (0x7f << 0 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE3_SHIFT 0U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE4
+#define WDR4_DIFFERENCE_WEIGHT_CURVE4_MASK (0x7f << 21 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE4_SHIFT 21U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE5
+#define WDR4_DIFFERENCE_WEIGHT_CURVE5_MASK (0x7f << 14 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE5_SHIFT 14U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE6
+#define WDR4_DIFFERENCE_WEIGHT_CURVE6_MASK (0x7f << 7 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE6_SHIFT 7U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE7
+#define WDR4_DIFFERENCE_WEIGHT_CURVE7_MASK (0x7f << 0 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE7_SHIFT 0U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE8
+#define WDR4_DIFFERENCE_WEIGHT_CURVE8_MASK (0x7f << 21 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE8_SHIFT 21U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE9
+#define WDR4_DIFFERENCE_WEIGHT_CURVE9_MASK (0x7f << 14 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE9_SHIFT 14U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE10
+#define WDR4_DIFFERENCE_WEIGHT_CURVE10_MASK (0x7f << 7 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE10_SHIFT 7U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE11
+#define WDR4_DIFFERENCE_WEIGHT_CURVE11_MASK (0x7f << 0 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE11_SHIFT 0U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE12
+#define WDR4_DIFFERENCE_WEIGHT_CURVE12_MASK (0x7f << 21 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE12_SHIFT 21U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE13
+#define WDR4_DIFFERENCE_WEIGHT_CURVE13_MASK (0x7f << 14 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE13_SHIFT 14U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE14
+#define WDR4_DIFFERENCE_WEIGHT_CURVE14_MASK (0x7f << 7 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE14_SHIFT 7U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE15
+#define WDR4_DIFFERENCE_WEIGHT_CURVE15_MASK (0x7f << 0 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE15_SHIFT 0U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE16
+#define WDR4_DIFFERENCE_WEIGHT_CURVE16_MASK (0x7f << 21 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE16_SHIFT 21U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE17
+#define WDR4_DIFFERENCE_WEIGHT_CURVE17_MASK (0x7f << 14 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE17_SHIFT 14U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE18
+#define WDR4_DIFFERENCE_WEIGHT_CURVE18_MASK (0x7f << 7 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE18_SHIFT 7U
+
+#define WDR4_DIFFERENCE_WEIGHT_CURVE19
+#define WDR4_DIFFERENCE_WEIGHT_CURVE19_MASK (0x7f << 0 )
+#define WDR4_DIFFERENCE_WEIGHT_CURVE19_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT0
+#define WDR4_GLOBAL_CURVE_INVERT0_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT0_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT1
+#define WDR4_GLOBAL_CURVE_INVERT1_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT1_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT2
+#define WDR4_GLOBAL_CURVE_INVERT2_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT2_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT3
+#define WDR4_GLOBAL_CURVE_INVERT3_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT3_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT4
+#define WDR4_GLOBAL_CURVE_INVERT4_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT4_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT5
+#define WDR4_GLOBAL_CURVE_INVERT5_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT5_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT6
+#define WDR4_GLOBAL_CURVE_INVERT6_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT6_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT7
+#define WDR4_GLOBAL_CURVE_INVERT7_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT7_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT8
+#define WDR4_GLOBAL_CURVE_INVERT8_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT8_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT9
+#define WDR4_GLOBAL_CURVE_INVERT9_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT9_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT10
+#define WDR4_GLOBAL_CURVE_INVERT10_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT10_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT11
+#define WDR4_GLOBAL_CURVE_INVERT11_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT11_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT12
+#define WDR4_GLOBAL_CURVE_INVERT12_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT12_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT13
+#define WDR4_GLOBAL_CURVE_INVERT13_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT13_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT14
+#define WDR4_GLOBAL_CURVE_INVERT14_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT14_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT15
+#define WDR4_GLOBAL_CURVE_INVERT15_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT15_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT16
+#define WDR4_GLOBAL_CURVE_INVERT16_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT16_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT17
+#define WDR4_GLOBAL_CURVE_INVERT17_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT17_SHIFT 0U
+
+#define WDR4_GLOBAL_CURVE_INVERT18
+#define WDR4_GLOBAL_CURVE_INVERT18_MASK (0xfff << 12 )
+#define WDR4_GLOBAL_CURVE_INVERT18_SHIFT 12U
+
+#define WDR4_GLOBAL_CURVE_INVERT19
+#define WDR4_GLOBAL_CURVE_INVERT19_MASK (0xfff << 0 )
+#define WDR4_GLOBAL_CURVE_INVERT19_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT0_0
+#define WDR4_LINEAR_CURVE_INVERT0_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT0_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT1
+#define WDR4_LINEAR_CURVE_INVERT1_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT1_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT0_1
+#define WDR4_LINEAR_CURVE_INVERT0_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT0_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT2
+#define WDR4_LINEAR_CURVE_INVERT2_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT2_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT3_0
+#define WDR4_LINEAR_CURVE_INVERT3_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT3_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT4
+#define WDR4_LINEAR_CURVE_INVERT4_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT4_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT3_1
+#define WDR4_LINEAR_CURVE_INVERT3_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT3_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT5
+#define WDR4_LINEAR_CURVE_INVERT5_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT5_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT6_0
+#define WDR4_LINEAR_CURVE_INVERT6_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT6_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT7
+#define WDR4_LINEAR_CURVE_INVERT7_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT7_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT6_1
+#define WDR4_LINEAR_CURVE_INVERT6_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT6_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT8
+#define WDR4_LINEAR_CURVE_INVERT8_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT8_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT9_0
+#define WDR4_LINEAR_CURVE_INVERT9_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT9_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT10
+#define WDR4_LINEAR_CURVE_INVERT10_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT10_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT9_1
+#define WDR4_LINEAR_CURVE_INVERT9_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT9_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT11
+#define WDR4_LINEAR_CURVE_INVERT11_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT11_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT12_0
+#define WDR4_LINEAR_CURVE_INVERT12_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT12_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT13
+#define WDR4_LINEAR_CURVE_INVERT13_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT13_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT12_1
+#define WDR4_LINEAR_CURVE_INVERT12_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT12_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT14
+#define WDR4_LINEAR_CURVE_INVERT14_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT14_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT15_0
+#define WDR4_LINEAR_CURVE_INVERT15_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT15_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT16
+#define WDR4_LINEAR_CURVE_INVERT16_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT16_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT15_1
+#define WDR4_LINEAR_CURVE_INVERT15_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT15_1_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT17
+#define WDR4_LINEAR_CURVE_INVERT17_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT17_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT18_0
+#define WDR4_LINEAR_CURVE_INVERT18_0_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT18_0_SHIFT 18U
+
+#define WDR4_LINEAR_CURVE_INVERT19
+#define WDR4_LINEAR_CURVE_INVERT19_MASK (0x3ffff << 0 )
+#define WDR4_LINEAR_CURVE_INVERT19_SHIFT 0U
+
+#define WDR4_LINEAR_CURVE_INVERT18_1
+#define WDR4_LINEAR_CURVE_INVERT18_1_MASK (0x1ff << 18 )
+#define WDR4_LINEAR_CURVE_INVERT18_1_SHIFT 18U
+
+#define WDR4_SMOOTH_INVERT_CURVE0
+#define WDR4_SMOOTH_INVERT_CURVE0_MASK (0xff << 24 )
+#define WDR4_SMOOTH_INVERT_CURVE0_SHIFT 24U
+
+#define WDR4_SMOOTH_INVERT_CURVE1
+#define WDR4_SMOOTH_INVERT_CURVE1_MASK (0xff << 16 )
+#define WDR4_SMOOTH_INVERT_CURVE1_SHIFT 16U
+
+#define WDR4_SMOOTH_INVERT_CURVE2
+#define WDR4_SMOOTH_INVERT_CURVE2_MASK (0xff << 8 )
+#define WDR4_SMOOTH_INVERT_CURVE2_SHIFT 8U
+
+#define WDR4_SMOOTH_INVERT_CURVE3
+#define WDR4_SMOOTH_INVERT_CURVE3_MASK (0xff << 0 )
+#define WDR4_SMOOTH_INVERT_CURVE3_SHIFT 0U
+
+#define WDR4_SMOOTH_INVERT_CURVE4
+#define WDR4_SMOOTH_INVERT_CURVE4_MASK (0xff << 24 )
+#define WDR4_SMOOTH_INVERT_CURVE4_SHIFT 24U
+
+#define WDR4_SMOOTH_INVERT_CURVE5
+#define WDR4_SMOOTH_INVERT_CURVE5_MASK (0xff << 16 )
+#define WDR4_SMOOTH_INVERT_CURVE5_SHIFT 16U
+
+#define WDR4_SMOOTH_INVERT_CURVE6
+#define WDR4_SMOOTH_INVERT_CURVE6_MASK (0xff << 8 )
+#define WDR4_SMOOTH_INVERT_CURVE6_SHIFT 8U
+
+#define WDR4_SMOOTH_INVERT_CURVE7
+#define WDR4_SMOOTH_INVERT_CURVE7_MASK (0xff << 0 )
+#define WDR4_SMOOTH_INVERT_CURVE7_SHIFT 0U
+
+#define WDR4_SMOOTH_INVERT_CURVE8
+#define WDR4_SMOOTH_INVERT_CURVE8_MASK (0xff << 24 )
+#define WDR4_SMOOTH_INVERT_CURVE8_SHIFT 24U
+
+#define WDR4_SMOOTH_INVERT_CURVE9
+#define WDR4_SMOOTH_INVERT_CURVE9_MASK (0xff << 16 )
+#define WDR4_SMOOTH_INVERT_CURVE9_SHIFT 16U
+
+#define WDR4_SMOOTH_INVERT_CURVE10
+#define WDR4_SMOOTH_INVERT_CURVE10_MASK (0xff << 8 )
+#define WDR4_SMOOTH_INVERT_CURVE10_SHIFT 8U
+
+#define WDR4_SMOOTH_INVERT_CURVE11
+#define WDR4_SMOOTH_INVERT_CURVE11_MASK (0xff << 0 )
+#define WDR4_SMOOTH_INVERT_CURVE11_SHIFT 0U
+
+#define WDR4_SMOOTH_INVERT_CURVE12
+#define WDR4_SMOOTH_INVERT_CURVE12_MASK (0xff << 24 )
+#define WDR4_SMOOTH_INVERT_CURVE12_SHIFT 24U
+
+#define WDR4_SMOOTH_INVERT_CURVE13
+#define WDR4_SMOOTH_INVERT_CURVE13_MASK (0xff << 16 )
+#define WDR4_SMOOTH_INVERT_CURVE13_SHIFT 16U
+
+#define WDR4_SMOOTH_INVERT_CURVE14
+#define WDR4_SMOOTH_INVERT_CURVE14_MASK (0xff << 8 )
+#define WDR4_SMOOTH_INVERT_CURVE14_SHIFT 8U
+
+#define WDR4_SMOOTH_INVERT_CURVE15
+#define WDR4_SMOOTH_INVERT_CURVE15_MASK (0xff << 0 )
+#define WDR4_SMOOTH_INVERT_CURVE15_SHIFT 0U
+
+#define WDR4_SMOOTH_INVERT_CURVE16
+#define WDR4_SMOOTH_INVERT_CURVE16_MASK (0xff << 24 )
+#define WDR4_SMOOTH_INVERT_CURVE16_SHIFT 24U
+
+#define WDR4_SMOOTH_INVERT_CURVE17
+#define WDR4_SMOOTH_INVERT_CURVE17_MASK (0xff << 16 )
+#define WDR4_SMOOTH_INVERT_CURVE17_SHIFT 16U
+
+#define WDR4_SMOOTH_INVERT_CURVE18
+#define WDR4_SMOOTH_INVERT_CURVE18_MASK (0xff << 8 )
+#define WDR4_SMOOTH_INVERT_CURVE18_SHIFT 8U
+
+#define WDR4_SMOOTH_INVERT_CURVE19
+#define WDR4_SMOOTH_INVERT_CURVE19_MASK (0xff << 0 )
+#define WDR4_SMOOTH_INVERT_CURVE19_SHIFT 0U
+
+#define WDR4_HISTOGRAM_SHIFT0
+#define WDR4_HISTOGRAM_SHIFT0_MASK (0x1f << 25 )
+#define WDR4_HISTOGRAM_SHIFT0_SHIFT 25U
+
+#define WDR4_HISTOGRAM_SHIFT1
+#define WDR4_HISTOGRAM_SHIFT1_MASK (0x1f << 20 )
+#define WDR4_HISTOGRAM_SHIFT1_SHIFT 20U
+
+#define WDR4_HISTOGRAM_SHIFT2
+#define WDR4_HISTOGRAM_SHIFT2_MASK (0x1f << 15 )
+#define WDR4_HISTOGRAM_SHIFT2_SHIFT 15U
+
+#define WDR4_HISTOGRAM_SHIFT3
+#define WDR4_HISTOGRAM_SHIFT3_MASK (0x1f << 10 )
+#define WDR4_HISTOGRAM_SHIFT3_SHIFT 10U
+
+#define WDR4_HISTOGRAM_SHIFT4
+#define WDR4_HISTOGRAM_SHIFT4_MASK (0x1f << 5 )
+#define WDR4_HISTOGRAM_SHIFT4_SHIFT 5U
+
+#define WDR4_HISTOGRAM_SHIFT5
+#define WDR4_HISTOGRAM_SHIFT5_MASK (0x1f << 0 )
+#define WDR4_HISTOGRAM_SHIFT5_SHIFT 0U
+
+#define WDR4_HISTOGRAM_SHIFT6
+#define WDR4_HISTOGRAM_SHIFT6_MASK (0x1f << 25 )
+#define WDR4_HISTOGRAM_SHIFT6_SHIFT 25U
+
+#define WDR4_HISTOGRAM_SHIFT7
+#define WDR4_HISTOGRAM_SHIFT7_MASK (0x1f << 20 )
+#define WDR4_HISTOGRAM_SHIFT7_SHIFT 20U
+
+#define WDR4_HISTOGRAM_SHIFT8
+#define WDR4_HISTOGRAM_SHIFT8_MASK (0x1f << 15 )
+#define WDR4_HISTOGRAM_SHIFT8_SHIFT 15U
+
+#define WDR4_HISTOGRAM_SHIFT9
+#define WDR4_HISTOGRAM_SHIFT9_MASK (0x1f << 10 )
+#define WDR4_HISTOGRAM_SHIFT9_SHIFT 10U
+
+#define WDR4_HISTOGRAM_SHIFT10
+#define WDR4_HISTOGRAM_SHIFT10_MASK (0x1f << 5 )
+#define WDR4_HISTOGRAM_SHIFT10_SHIFT 5U
+
+#define WDR4_HISTOGRAM_SHIFT11
+#define WDR4_HISTOGRAM_SHIFT11_MASK (0x1f << 0 )
+#define WDR4_HISTOGRAM_SHIFT11_SHIFT 0U
+
+#define WDR4_HISTOGRAM_SHIFT12
+#define WDR4_HISTOGRAM_SHIFT12_MASK (0x1f << 25 )
+#define WDR4_HISTOGRAM_SHIFT12_SHIFT 25U
+
+#define WDR4_HISTOGRAM_SHIFT13
+#define WDR4_HISTOGRAM_SHIFT13_MASK (0x1f << 20 )
+#define WDR4_HISTOGRAM_SHIFT13_SHIFT 20U
+
+#define WDR4_HISTOGRAM_SHIFT14
+#define WDR4_HISTOGRAM_SHIFT14_MASK (0x1f << 15 )
+#define WDR4_HISTOGRAM_SHIFT14_SHIFT 15U
+
+#define WDR4_HISTOGRAM_SHIFT15
+#define WDR4_HISTOGRAM_SHIFT15_MASK (0x1f << 10 )
+#define WDR4_HISTOGRAM_SHIFT15_SHIFT 10U
+
+#define WDR4_HISTOGRAM_SHIFT16
+#define WDR4_HISTOGRAM_SHIFT16_MASK (0x1f << 5 )
+#define WDR4_HISTOGRAM_SHIFT16_SHIFT 5U
+
+#define WDR4_HISTOGRAM_SHIFT17
+#define WDR4_HISTOGRAM_SHIFT17_MASK (0x1f << 0 )
+#define WDR4_HISTOGRAM_SHIFT17_SHIFT 0U
+
+#define WDR4_HISTOGRAM_SHIFT18
+#define WDR4_HISTOGRAM_SHIFT18_MASK (0x1f << 5 )
+#define WDR4_HISTOGRAM_SHIFT18_SHIFT 5U
+
+#define WDR4_HISTOGRAM_SHIFT19
+#define WDR4_HISTOGRAM_SHIFT19_MASK (0x1f << 0 )
+#define WDR4_HISTOGRAM_SHIFT19_SHIFT 0U
+
+#define WDR4_HISTOGRAM0_SHIFT0
+#define WDR4_HISTOGRAM0_SHIFT0_MASK (0xf << 28 )
+#define WDR4_HISTOGRAM0_SHIFT0_SHIFT 28U
+
+#define WDR4_HISTOGRAM0_SHIFT1
+#define WDR4_HISTOGRAM0_SHIFT1_MASK (0xf << 24 )
+#define WDR4_HISTOGRAM0_SHIFT1_SHIFT 24U
+
+#define WDR4_HISTOGRAM0_SHIFT2
+#define WDR4_HISTOGRAM0_SHIFT2_MASK (0xf << 20 )
+#define WDR4_HISTOGRAM0_SHIFT2_SHIFT 20U
+
+#define WDR4_HISTOGRAM0_SHIFT3
+#define WDR4_HISTOGRAM0_SHIFT3_MASK (0xf << 16 )
+#define WDR4_HISTOGRAM0_SHIFT3_SHIFT 16U
+
+#define WDR4_HISTOGRAM0_SHIFT4
+#define WDR4_HISTOGRAM0_SHIFT4_MASK (0xf << 12 )
+#define WDR4_HISTOGRAM0_SHIFT4_SHIFT 12U
+
+#define WDR4_HISTOGRAM0_SHIFT5
+#define WDR4_HISTOGRAM0_SHIFT5_MASK (0xf << 8 )
+#define WDR4_HISTOGRAM0_SHIFT5_SHIFT 8U
+
+#define WDR4_HISTOGRAM0_SHIFT6
+#define WDR4_HISTOGRAM0_SHIFT6_MASK (0xf << 4 )
+#define WDR4_HISTOGRAM0_SHIFT6_SHIFT 4U
+
+#define WDR4_HISTOGRAM0_SHIFT7
+#define WDR4_HISTOGRAM0_SHIFT7_MASK (0xf << 0 )
+#define WDR4_HISTOGRAM0_SHIFT7_SHIFT 0U
+
+#define WDR4_HISTOGRAM0_SHIFT8
+#define WDR4_HISTOGRAM0_SHIFT8_MASK (0xf << 28 )
+#define WDR4_HISTOGRAM0_SHIFT8_SHIFT 28U
+
+#define WDR4_HISTOGRAM0_SHIFT9
+#define WDR4_HISTOGRAM0_SHIFT9_MASK (0xf << 24 )
+#define WDR4_HISTOGRAM0_SHIFT9_SHIFT 24U
+
+#define WDR4_HISTOGRAM0_SHIFT10
+#define WDR4_HISTOGRAM0_SHIFT10_MASK (0xf << 20 )
+#define WDR4_HISTOGRAM0_SHIFT10_SHIFT 20U
+
+#define WDR4_HISTOGRAM0_SHIFT11
+#define WDR4_HISTOGRAM0_SHIFT11_MASK (0xf << 16 )
+#define WDR4_HISTOGRAM0_SHIFT11_SHIFT 16U
+
+#define WDR4_HISTOGRAM0_SHIFT12
+#define WDR4_HISTOGRAM0_SHIFT12_MASK (0xf << 12 )
+#define WDR4_HISTOGRAM0_SHIFT12_SHIFT 12U
+
+#define WDR4_HISTOGRAM0_SHIFT13
+#define WDR4_HISTOGRAM0_SHIFT13_MASK (0xf << 8 )
+#define WDR4_HISTOGRAM0_SHIFT13_SHIFT 8U
+
+#define WDR4_HISTOGRAM0_SHIFT14
+#define WDR4_HISTOGRAM0_SHIFT14_MASK (0xf << 4 )
+#define WDR4_HISTOGRAM0_SHIFT14_SHIFT 4U
+
+#define WDR4_HISTOGRAM0_SHIFT15
+#define WDR4_HISTOGRAM0_SHIFT15_MASK (0xf << 0 )
+#define WDR4_HISTOGRAM0_SHIFT15_SHIFT 0U
+
+#define WDR4_HISTOGRAM0_SHIFT16
+#define WDR4_HISTOGRAM0_SHIFT16_MASK (0xf << 12 )
+#define WDR4_HISTOGRAM0_SHIFT16_SHIFT 12U
+
+#define WDR4_HISTOGRAM0_SHIFT17
+#define WDR4_HISTOGRAM0_SHIFT17_MASK (0xf << 8 )
+#define WDR4_HISTOGRAM0_SHIFT17_SHIFT 8U
+
+#define WDR4_HISTOGRAM0_SHIFT18
+#define WDR4_HISTOGRAM0_SHIFT18_MASK (0xf << 4 )
+#define WDR4_HISTOGRAM0_SHIFT18_SHIFT 4U
+
+#define WDR4_HISTOGRAM0_SHIFT19
+#define WDR4_HISTOGRAM0_SHIFT19_MASK (0xf << 0 )
+#define WDR4_HISTOGRAM0_SHIFT19_SHIFT 0U
+
+#define WDR4_TOTAL_STRENGTH_SHD
+#define WDR4_TOTAL_STRENGTH_SHD_MASK (0xff << 24 )
+#define WDR4_TOTAL_STRENGTH_SHD_SHIFT 24U
+
+#define WDR4_LOCAL_STRENGTH_SHD
+#define WDR4_LOCAL_STRENGTH_SHD_MASK (0xff << 16 )
+#define WDR4_LOCAL_STRENGTH_SHD_SHIFT 16U
+
+#define WDR4_GLOBAL_STRENGTH_SHD
+#define WDR4_GLOBAL_STRENGTH_SHD_MASK (0xff << 8 )
+#define WDR4_GLOBAL_STRENGTH_SHD_SHIFT 8U
+
+#define WDR4_LOW_STRENGTH_SHD
+#define WDR4_LOW_STRENGTH_SHD_MASK (0xff << 0 )
+#define WDR4_LOW_STRENGTH_SHD_SHIFT 0U
+
+#define WDR4_HIGH_STRENGTH_SHD
+#define WDR4_HIGH_STRENGTH_SHD_MASK (0xff << 16 )
+#define WDR4_HIGH_STRENGTH_SHD_SHIFT 16U
+
+#define WDR4_DRC_BAYER_RATIOLSVS_SHD
+#define WDR4_DRC_BAYER_RATIOLSVS_SHD_MASK (0xff << 8 )
+#define WDR4_DRC_BAYER_RATIOLSVS_SHD_SHIFT 8U
+
+#define WDR4_DRC_BAYER_RATIO_SHD
+#define WDR4_DRC_BAYER_RATIO_SHD_MASK (0xff << 0 )
+#define WDR4_DRC_BAYER_RATIO_SHD_SHIFT 0U
+
+#define WDR4_CONTRAST_SHD
+#define WDR4_CONTRAST_SHD_MASK (0x7ff << 10 )
+#define WDR4_CONTRAST_SHD_SHIFT 10U
+
+#define WDR4_FLAT_STRENGTH_SHD
+#define WDR4_FLAT_STRENGTH_SHD_MASK (0x1f << 5 )
+#define WDR4_FLAT_STRENGTH_SHD_SHIFT 5U
+
+#define WDR4_FLAT_THR_SHD
+#define WDR4_FLAT_THR_SHD_MASK (0x1f << 0 )
+#define WDR4_FLAT_THR_SHD_SHIFT 0U
+
+#define WDR4_PIXEL_MERGE_SLOPE_SHD
+#define WDR4_PIXEL_MERGE_SLOPE_SHD_MASK (0xff << 24 )
+#define WDR4_PIXEL_MERGE_SLOPE_SHD_SHIFT 24U
+
+#define WDR4_PIXEL_MERGE_BASE_SHD
+#define WDR4_PIXEL_MERGE_BASE_SHD_MASK (0xff << 16 )
+#define WDR4_PIXEL_MERGE_BASE_SHD_SHIFT 16U
+
+#define WDR4_PIXEL_ADJUST_SLOPE_SHD
+#define WDR4_PIXEL_ADJUST_SLOPE_SHD_MASK (0xff << 8 )
+#define WDR4_PIXEL_ADJUST_SLOPE_SHD_SHIFT 8U
+
+#define WDR4_PIXEL_ADJUST_BASE_SHD
+#define WDR4_PIXEL_ADJUST_BASE_SHD_MASK (0xff << 0 )
+#define WDR4_PIXEL_ADJUST_BASE_SHD_SHIFT 0U
+
+#define WDR4_ENABLE_SHD
+#define WDR4_ENABLE_SHD_MASK 0x1 << 20
+#define WDR4_ENABLE_SHD_SHIFT 20U
+
+#define WDR4_ENTROPY_SLOPE_SHD
+#define WDR4_ENTROPY_SLOPE_SHD_MASK (0x3ff << 10 )
+#define WDR4_ENTROPY_SLOPE_SHD_SHIFT 10U
+
+#define WDR4_ENTROPY_BASE_SHD
+#define WDR4_ENTROPY_BASE_SHD_MASK (0x3ff << 0 )
+#define WDR4_ENTROPY_BASE_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_INVGAMMA_EN
+#define DENOISE3D_V20_INVGAMMA_EN_MASK (0x1 << 11)
+#define DENOISE3D_V20_INVGAMMA_EN_SHIFT 11U
+
+#define DENOISE3D_V20_PREGAMMA_EN
+#define DENOISE3D_V20_PREGAMMA_EN_MASK (0x1 << 10)
+#define DENOISE3D_V20_PREGAMMA_EN_SHIFT 10U
+
+#define DENOISE3D_V20_ERODE_EN
+#define DENOISE3D_V20_ERODE_EN_MASK (0x1 << 9)
+#define DENOISE3D_V20_ERODE_EN_SHIFT 9U
+
+#define DENOISE3D_V20_MOTION_CONV_EN
+#define DENOISE3D_V20_MOTION_CONV_EN_MASK (0x1 << 8)
+#define DENOISE3D_V20_MOTION_CONV_EN_SHIFT 8U
+
+#define DENOISE3D_V20_INV_DGAIN_EN
+#define DENOISE3D_V20_INV_DGAIN_EN_MASK (0x1 << 7)
+#define DENOISE3D_V20_INV_DGAIN_EN_SHIFT 7U
+
+#define DENOISE3D_V20_INV_AWB_GAIN_EN
+#define DENOISE3D_V20_INV_AWB_GAIN_EN_MASK (0x1 << 6)
+#define DENOISE3D_V20_INV_AWB_GAIN_EN_SHIFT 6U
+
+#define DENOISE3D_V20_COMP_LUMA_EN
+#define DENOISE3D_V20_COMP_LUMA_EN_MASK (0x1 << 5)
+#define DENOISE3D_V20_COMP_LUMA_EN_SHIFT 5U
+
+#define DENOISE3D_V20_REF_RESET
+#define DENOISE3D_V20_REF_RESET_MASK (0x1 << 4)
+#define DENOISE3D_V20_REF_RESET_SHIFT 4U
+
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE_MASK (0x1 << 3)
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE_SHIFT 3U
+
+#define DENOISE3D_V20_NLM_ENABLE
+#define DENOISE3D_V20_NLM_ENABLE_MASK (0x1 << 2)
+#define DENOISE3D_V20_NLM_ENABLE_SHIFT 2U
+
+#define DENOISE3D_V20_TNR_ENABLE
+#define DENOISE3D_V20_TNR_ENABLE_MASK (0x1 << 1)
+#define DENOISE3D_V20_TNR_ENABLE_SHIFT 1U
+
+#define DENOISE3D_V20_ENABLE
+#define DENOISE3D_V20_ENABLE_MASK (0x1 << 0)
+#define DENOISE3D_V20_ENABLE_SHIFT 0U
+
+#define DENOISE3D_V20_TNR_STRENGTH
+#define DENOISE3D_V20_TNR_STRENGTH_MASK (0xff << 0 )
+#define DENOISE3D_V20_TNR_STRENGTH_SHIFT 0U
+
+#define DENOISE3D_V20_NOISE_LEVEL
+#define DENOISE3D_V20_NOISE_LEVEL_MASK (0xffff << 16 )
+#define DENOISE3D_V20_NOISE_LEVEL_SHIFT 16U
+
+#define DENOISE3D_V20_NOISE_MEAN
+#define DENOISE3D_V20_NOISE_MEAN_MASK (0xffff << 0 )
+#define DENOISE3D_V20_NOISE_MEAN_SHIFT 0U
+
+#define DENOISE3D_V20_NOSIE_THRESH
+#define DENOISE3D_V20_NOSIE_THRESH_MASK (0xffff << 16 )
+#define DENOISE3D_V20_NOSIE_THRESH_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_MEAN
+#define DENOISE3D_V20_MOTION_MEAN_MASK (0xffff << 0 )
+#define DENOISE3D_V20_MOTION_MEAN_SHIFT 0U
+
+#define DENOISE3D_V20_TNR_RANGE_H
+#define DENOISE3D_V20_TNR_RANGE_H_MASK (0xf << 12 )
+#define DENOISE3D_V20_TNR_RANGE_H_SHIFT 12U
+
+#define DENOISE3D_V20_TNR_RANGE_V
+#define DENOISE3D_V20_TNR_RANGE_V_MASK (0xf << 8 )
+#define DENOISE3D_V20_TNR_RANGE_V_SHIFT 8U
+
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H_MASK (0xf << 4 )
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H_SHIFT 4U
+
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V_MASK (0xf << 0 )
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_INV
+#define DENOISE3D_V20_MOTION_INV_MASK (0xfffff << 0 )
+#define DENOISE3D_V20_MOTION_INV_SHIFT 0U
+
+#define DENOISE3D_V20_THR_UPDATE
+#define DENOISE3D_V20_THR_UPDATE_MASK (0x7ff << 16 )
+#define DENOISE3D_V20_THR_UPDATE_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_THR_UPDATE
+#define DENOISE3D_V20_MOTION_THR_UPDATE_MASK (0x7ff << 0 )
+#define DENOISE3D_V20_MOTION_THR_UPDATE_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT_MASK (0x3f << 16 )
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_SLOPE
+#define DENOISE3D_V20_MOTION_SLOPE_MASK (0x7ff << 0 )
+#define DENOISE3D_V20_MOTION_SLOPE_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_CONV_SHIFT
+#define DENOISE3D_V20_MOTION_CONV_SHIFT_MASK (0xf << 28 )
+#define DENOISE3D_V20_MOTION_CONV_SHIFT_SHIFT 28U
+
+#define DENOISE3D_V20_MOTION_CONV_MAX
+#define DENOISE3D_V20_MOTION_CONV_MAX_MASK (0x7ff << 17 )
+#define DENOISE3D_V20_MOTION_CONV_MAX_SHIFT 17U
+
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT_MASK (0x3f << 11 )
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT_SHIFT 11U
+
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT_MASK (0x3f << 5 )
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT_SHIFT 5U
+
+#define DENOISE3D_V20_SAD_WEIGHT
+#define DENOISE3D_V20_SAD_WEIGHT_MASK (0x1f << 0 )
+#define DENOISE3D_V20_SAD_WEIGHT_SHIFT 0U
+
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT_MASK (0x7ff << 20 )
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT_SHIFT 20U
+
+#define DENOISE3D_V20_PIXEL_SLOP
+#define DENOISE3D_V20_PIXEL_SLOP_MASK (0xff << 12 )
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT 12U
+
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_BIT
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_BIT_MASK (0xf << 8 )
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_BIT_SHIFT 8U
+
+#define DENOISE3D_V20_PIXEL_SLOP_MIN
+#define DENOISE3D_V20_PIXEL_SLOP_MIN_MASK (0xff << 0 )
+#define DENOISE3D_V20_PIXEL_SLOP_MIN_SHIFT 0U
+
+#define DENOISE3D_V20_INVGAMMA_EN_SHD
+#define DENOISE3D_V20_INVGAMMA_EN_SHD_MASK 0x1 << 11
+#define DENOISE3D_V20_INVGAMMA_EN_SHD_SHIFT 11U
+
+#define DENOISE3D_V20_PREGAMMA_EN_SHD
+#define DENOISE3D_V20_PREGAMMA_EN_SHD_MASK 0x1 << 10
+#define DENOISE3D_V20_PREGAMMA_EN_SHD_SHIFT 10U
+
+#define DENOISE3D_V20_ERODE_EN_SHD
+#define DENOISE3D_V20_ERODE_EN_SHD_MASK 0x1 << 9
+#define DENOISE3D_V20_ERODE_EN_SHD_SHIFT 9U
+
+#define DENOISE3D_V20_MOTION_CONV_EN_SHD
+#define DENOISE3D_V20_MOTION_CONV_EN_SHD_MASK 0x1 << 8
+#define DENOISE3D_V20_MOTION_CONV_EN_SHD_SHIFT 8U
+
+#define DENOISE3D_V20_INV_DGAIN_EN_SHD
+#define DENOISE3D_V20_INV_DGAIN_EN_SHD_MASK 0x1 << 7
+#define DENOISE3D_V20_INV_DGAIN_EN_SHD_SHIFT 7U
+
+#define DENOISE3D_V20_INV_AWB_GAIN_EN_SHD
+#define DENOISE3D_V20_INV_AWB_GAIN_EN_SHD_MASK 0x1 << 6
+#define DENOISE3D_V20_INV_AWB_GAIN_EN_SHD_SHIFT 6U
+
+#define DENOISE3D_V20_COMP_LUMA_EN_SHD
+#define DENOISE3D_V20_COMP_LUMA_EN_SHD_MASK 0x1 << 5
+#define DENOISE3D_V20_COMP_LUMA_EN_SHD_SHIFT 5U
+
+#define DENOISE3D_V20_REF_RESET_SHD
+#define DENOISE3D_V20_REF_RESET_SHD_MASK 0x1 << 4
+#define DENOISE3D_V20_REF_RESET_SHD_SHIFT 4U
+
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE_SHD
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE_SHD_MASK 0x1 << 3
+#define DENOISE3D_V20_MOTION_DILATE_ENABLE_SHD_SHIFT 3U
+
+#define DENOISE3D_V20_NLM_ENABLE_SHD
+#define DENOISE3D_V20_NLM_ENABLE_SHD_MASK 0x1 << 2
+#define DENOISE3D_V20_NLM_ENABLE_SHD_SHIFT 2U
+
+#define DENOISE3D_V20_TNR_ENABLE_SHD
+#define DENOISE3D_V20_TNR_ENABLE_SHD_MASK 0x1 << 1
+#define DENOISE3D_V20_TNR_ENABLE_SHD_SHIFT 1U
+
+#define DENOISE3D_V20_ENABLE_SHD
+#define DENOISE3D_V20_ENABLE_SHD_MASK 0x1 << 0
+#define DENOISE3D_V20_ENABLE_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_TNR_STRENGTH_SHD
+#define DENOISE3D_V20_TNR_STRENGTH_SHD_MASK (0xff << 0 )
+#define DENOISE3D_V20_TNR_STRENGTH_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_NOISE_LEVEL_SHD
+#define DENOISE3D_V20_NOISE_LEVEL_SHD_MASK (0x3fff << 16 )
+#define DENOISE3D_V20_NOISE_LEVEL_SHD_SHIFT 16U
+
+#define DENOISE3D_V20_NOISE_MEAN_SHD
+#define DENOISE3D_V20_NOISE_MEAN_SHD_MASK (0x3fff << 0 )
+#define DENOISE3D_V20_NOISE_MEAN_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_NOSIE_THRESH_SHD
+#define DENOISE3D_V20_NOSIE_THRESH_SHD_MASK (0x3fff << 16 )
+#define DENOISE3D_V20_NOSIE_THRESH_SHD_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_MEAN_SHD
+#define DENOISE3D_V20_MOTION_MEAN_SHD_MASK (0x3fff << 0 )
+#define DENOISE3D_V20_MOTION_MEAN_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_TNR_RANGE_H_SHD
+#define DENOISE3D_V20_TNR_RANGE_H_SHD_MASK (0x3 << 8 )
+#define DENOISE3D_V20_TNR_RANGE_H_SHD_SHIFT 8U
+
+#define DENOISE3D_V20_TNR_RANGE_V_SHD
+#define DENOISE3D_V20_TNR_RANGE_V_SHD_MASK (0x3 << 6 )
+#define DENOISE3D_V20_TNR_RANGE_V_SHD_SHIFT 6U
+
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H_SHD
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H_SHD_MASK (0x7 << 3 )
+#define DENOISE3D_V20_TNR_DILATE_RANGE_H_SHD_SHIFT 3U
+
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V_SHD
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V_SHD_MASK (0x7 << 0 )
+#define DENOISE3D_V20_TNR_DILATE_RANGE_V_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_INV_SHD
+#define DENOISE3D_V20_MOTION_INV_SHD_MASK (0xfffff << 0 )
+#define DENOISE3D_V20_MOTION_INV_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_THR_UPDATE_SHD
+#define DENOISE3D_V20_THR_UPDATE_SHD_MASK (0x7ff << 16 )
+#define DENOISE3D_V20_THR_UPDATE_SHD_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_THR_UPDATE_SHD
+#define DENOISE3D_V20_MOTION_THR_UPDATE_SHD_MASK (0x7ff << 0 )
+#define DENOISE3D_V20_MOTION_THR_UPDATE_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT_SHD
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT_SHD_MASK (0x7ff << 16 )
+#define DENOISE3D_V20_MOTION_PRE_WEIGHT_SHD_SHIFT 16U
+
+#define DENOISE3D_V20_MOTION_SLOPE_SHD
+#define DENOISE3D_V20_MOTION_SLOPE_SHD_MASK (0x7ff << 0 )
+#define DENOISE3D_V20_MOTION_SLOPE_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_MOTION_CONV_SHIFT_SHD
+#define DENOISE3D_V20_MOTION_CONV_SHIFT_SHD_MASK (0xf << 28 )
+#define DENOISE3D_V20_MOTION_CONV_SHIFT_SHD_SHIFT 28U
+
+#define DENOISE3D_V20_MOTION_CONV_MAX_SHD
+#define DENOISE3D_V20_MOTION_CONV_MAX_SHD_MASK (0x7ff << 17 )
+#define DENOISE3D_V20_MOTION_CONV_MAX_SHD_SHIFT 17U
+
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT_SHD
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT_SHD_MASK (0x3f << 11 )
+#define DENOISE3D_V20_TNR_VAL_SHIFT_BIT_SHD_SHIFT 11U
+
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT_SHD
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT_SHD_MASK (0x3f << 5 )
+#define DENOISE3D_V20_TNR_DIFF_NORM_SHIFT_BIT_SHD_SHIFT 5U
+
+#define DENOISE3D_V20_SAD_WEIGHT_SHD
+#define DENOISE3D_V20_SAD_WEIGHT_SHD_MASK (0x1f << 0 )
+#define DENOISE3D_V20_SAD_WEIGHT_SHD_SHIFT 0U
+
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT_SHD
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT_SHD_MASK (0x7ff << 20 )
+#define DENOISE3D_V20_PIXEL_VAL_SHIFT_SHD_SHIFT 20U
+
+#define DENOISE3D_V20_PIXEL_SLOP_MIN_SHD
+#define DENOISE3D_V20_PIXEL_SLOP_MIN_SHD_MASK (0xff << 12 )
+#define DENOISE3D_V20_PIXEL_SLOP_MIN_SHD_SHIFT 12U
+
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_SHD
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_SHD_MASK (0xf << 8 )
+#define DENOISE3D_V20_PIXEL_SLOP_SHIFT_SHD_SHIFT 8U
+
+#define DENOISE3D_V20_BG_VAL_SUM
+#define DENOISE3D_V20_BG_VAL_SUM_MASK (0xffffffff << 0 )
+#define DENOISE3D_V20_BG_VAL_SUM_SHIFT 0U
+
+#define DENOISE3D_V20_MO_VAL_SUM
+#define DENOISE3D_V20_MO_VAL_SUM_MASK (0xffffffff << 0 )
+#define DENOISE3D_V20_MO_VAL_SUM_SHIFT 0U
+
+#define DENOISE3D_V20_BG_PIX_CNT
+#define DENOISE3D_V20_BG_PIX_CNT_MASK (0xffffffff << 0 )
+#define DENOISE3D_V20_BG_PIX_CNT_SHIFT 0U
+
+#define DENOISE3D_V20_MO_PIX_CNT
+#define DENOISE3D_V20_MO_PIX_CNT_MASK (0xffffffff << 0 )
+#define DENOISE3D_V20_MO_PIX_CNT_SHIFT 0U
+
+#define DENOISE3D_V20_FRAME_AVG
+#define DENOISE3D_V20_FRAME_AVG_MASK (0xffffffff << 0 )
+#define DENOISE3D_V20_FRAME_AVG_SHIFT 0U
+
+#define DENOISE3D_V20_DUMMY_HBLANK
+#define DENOISE3D_V20_DUMMY_HBLANK_MASK (0xffff << 0 )
+#define DENOISE3D_V20_DUMMY_HBLANK_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_2_A
+#define DENOISE3D2_PREGAMMA_Y_2_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_2_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_1
+#define DENOISE3D2_PREGAMMA_Y_1_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_1_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_0
+#define DENOISE3D2_PREGAMMA_Y_0_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_0_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_2_B
+#define DENOISE3D2_PREGAMMA_Y_2_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_2_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_4
+#define DENOISE3D2_PREGAMMA_Y_4_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_4_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_3
+#define DENOISE3D2_PREGAMMA_Y_3_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_3_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_7_A
+#define DENOISE3D2_PREGAMMA_Y_7_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_7_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_6
+#define DENOISE3D2_PREGAMMA_Y_6_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_6_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_5
+#define DENOISE3D2_PREGAMMA_Y_5_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_5_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_7_B
+#define DENOISE3D2_PREGAMMA_Y_7_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_7_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_9
+#define DENOISE3D2_PREGAMMA_Y_9_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_9_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_8
+#define DENOISE3D2_PREGAMMA_Y_8_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_8_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_12_A
+#define DENOISE3D2_PREGAMMA_Y_12_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_12_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_11
+#define DENOISE3D2_PREGAMMA_Y_11_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_11_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_10
+#define DENOISE3D2_PREGAMMA_Y_10_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_10_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_12_B
+#define DENOISE3D2_PREGAMMA_Y_12_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_12_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_14
+#define DENOISE3D2_PREGAMMA_Y_14_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_14_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_13
+#define DENOISE3D2_PREGAMMA_Y_13_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_13_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_17_A
+#define DENOISE3D2_PREGAMMA_Y_17_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_17_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_16
+#define DENOISE3D2_PREGAMMA_Y_16_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_16_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_15
+#define DENOISE3D2_PREGAMMA_Y_15_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_15_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_17_B
+#define DENOISE3D2_PREGAMMA_Y_17_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_17_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_19
+#define DENOISE3D2_PREGAMMA_Y_19_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_19_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_18
+#define DENOISE3D2_PREGAMMA_Y_18_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_18_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_22_A
+#define DENOISE3D2_PREGAMMA_Y_22_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_22_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_21
+#define DENOISE3D2_PREGAMMA_Y_21_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_21_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_20
+#define DENOISE3D2_PREGAMMA_Y_20_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_20_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_22_B
+#define DENOISE3D2_PREGAMMA_Y_22_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_22_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_24
+#define DENOISE3D2_PREGAMMA_Y_24_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_24_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_23
+#define DENOISE3D2_PREGAMMA_Y_23_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_23_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_27_A
+#define DENOISE3D2_PREGAMMA_Y_27_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_27_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_26
+#define DENOISE3D2_PREGAMMA_Y_26_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_26_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_25
+#define DENOISE3D2_PREGAMMA_Y_25_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_25_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_27_B
+#define DENOISE3D2_PREGAMMA_Y_27_B_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_27_B_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_29
+#define DENOISE3D2_PREGAMMA_Y_29_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_29_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_28
+#define DENOISE3D2_PREGAMMA_Y_28_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_28_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_32_A
+#define DENOISE3D2_PREGAMMA_Y_32_A_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_32_A_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_31
+#define DENOISE3D2_PREGAMMA_Y_31_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_31_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_30
+#define DENOISE3D2_PREGAMMA_Y_30_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_30_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_32_B
+#define DENOISE3D2_PREGAMMA_Y_32_B_MASK (0x3f << 0 )
+#define DENOISE3D2_PREGAMMA_Y_32_B_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_2_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_2_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_2_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_1_SHD
+#define DENOISE3D2_PREGAMMA_Y_1_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_1_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_0_SHD
+#define DENOISE3D2_PREGAMMA_Y_0_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_0_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_2_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_2_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_2_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_4_SHD
+#define DENOISE3D2_PREGAMMA_Y_4_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_4_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_3_SHD
+#define DENOISE3D2_PREGAMMA_Y_3_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_3_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_7_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_7_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_7_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_6_SHD
+#define DENOISE3D2_PREGAMMA_Y_6_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_6_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_5_SHD
+#define DENOISE3D2_PREGAMMA_Y_5_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_5_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_7_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_7_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_7_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_9_SHD
+#define DENOISE3D2_PREGAMMA_Y_9_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_9_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_8_SHD
+#define DENOISE3D2_PREGAMMA_Y_8_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_8_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_12_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_12_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_12_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_11_SHD
+#define DENOISE3D2_PREGAMMA_Y_11_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_11_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_10_SHD
+#define DENOISE3D2_PREGAMMA_Y_10_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_10_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_12_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_12_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_12_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_14_SHD
+#define DENOISE3D2_PREGAMMA_Y_14_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_14_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_13_SHD
+#define DENOISE3D2_PREGAMMA_Y_13_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_13_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_17_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_17_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_17_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_16_SHD
+#define DENOISE3D2_PREGAMMA_Y_16_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_16_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_15_SHD
+#define DENOISE3D2_PREGAMMA_Y_15_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_15_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_17_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_17_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_17_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_19_SHD
+#define DENOISE3D2_PREGAMMA_Y_19_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_19_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_18_SHD
+#define DENOISE3D2_PREGAMMA_Y_18_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_18_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_22_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_22_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_22_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_21_SHD
+#define DENOISE3D2_PREGAMMA_Y_21_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_21_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_20_SHD
+#define DENOISE3D2_PREGAMMA_Y_20_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_20_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_22_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_22_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_22_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_24_SHD
+#define DENOISE3D2_PREGAMMA_Y_24_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_24_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_23_SHD
+#define DENOISE3D2_PREGAMMA_Y_23_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_23_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_27_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_27_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_27_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_26_SHD
+#define DENOISE3D2_PREGAMMA_Y_26_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_26_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_25_SHD
+#define DENOISE3D2_PREGAMMA_Y_25_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_25_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_27_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_27_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_27_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_29_SHD
+#define DENOISE3D2_PREGAMMA_Y_29_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_29_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_28_SHD
+#define DENOISE3D2_PREGAMMA_Y_28_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_28_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_32_A_SHD
+#define DENOISE3D2_PREGAMMA_Y_32_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_PREGAMMA_Y_32_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_PREGAMMA_Y_31_SHD
+#define DENOISE3D2_PREGAMMA_Y_31_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_PREGAMMA_Y_31_SHD_SHIFT 12U
+
+#define DENOISE3D2_PREGAMMA_Y_30_SHD
+#define DENOISE3D2_PREGAMMA_Y_30_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_PREGAMMA_Y_30_SHD_SHIFT 0U
+
+#define DENOISE3D2_PREGAMMA_Y_32_B_SHD
+#define DENOISE3D2_PREGAMMA_Y_32_B_SHD_MASK (0x3f << 0 )
+#define DENOISE3D2_PREGAMMA_Y_32_B_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_2_A
+#define DENOISE3D2_INVGAMMA_Y_2_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_2_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_1
+#define DENOISE3D2_INVGAMMA_Y_1_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_1_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_0
+#define DENOISE3D2_INVGAMMA_Y_0_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_0_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_2_B
+#define DENOISE3D2_INVGAMMA_Y_2_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_2_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_4
+#define DENOISE3D2_INVGAMMA_Y_4_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_4_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_3
+#define DENOISE3D2_INVGAMMA_Y_3_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_3_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_7_A
+#define DENOISE3D2_INVGAMMA_Y_7_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_7_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_6
+#define DENOISE3D2_INVGAMMA_Y_6_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_6_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_5
+#define DENOISE3D2_INVGAMMA_Y_5_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_5_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_7_B
+#define DENOISE3D2_INVGAMMA_Y_7_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_7_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_9
+#define DENOISE3D2_INVGAMMA_Y_9_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_9_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_8
+#define DENOISE3D2_INVGAMMA_Y_8_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_8_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_12_A
+#define DENOISE3D2_INVGAMMA_Y_12_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_12_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_11
+#define DENOISE3D2_INVGAMMA_Y_11_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_11_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_10
+#define DENOISE3D2_INVGAMMA_Y_10_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_10_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_12_B
+#define DENOISE3D2_INVGAMMA_Y_12_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_12_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_14
+#define DENOISE3D2_INVGAMMA_Y_14_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_14_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_13
+#define DENOISE3D2_INVGAMMA_Y_13_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_13_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_17_A
+#define DENOISE3D2_INVGAMMA_Y_17_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_17_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_16
+#define DENOISE3D2_INVGAMMA_Y_16_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_16_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_15
+#define DENOISE3D2_INVGAMMA_Y_15_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_15_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_17_B
+#define DENOISE3D2_INVGAMMA_Y_17_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_17_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_19
+#define DENOISE3D2_INVGAMMA_Y_19_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_19_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_18
+#define DENOISE3D2_INVGAMMA_Y_18_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_18_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_22_A
+#define DENOISE3D2_INVGAMMA_Y_22_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_22_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_21
+#define DENOISE3D2_INVGAMMA_Y_21_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_21_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_20
+#define DENOISE3D2_INVGAMMA_Y_20_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_20_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_22_B
+#define DENOISE3D2_INVGAMMA_Y_22_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_22_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_24
+#define DENOISE3D2_INVGAMMA_Y_24_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_24_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_23
+#define DENOISE3D2_INVGAMMA_Y_23_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_23_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_27_A
+#define DENOISE3D2_INVGAMMA_Y_27_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_27_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_26
+#define DENOISE3D2_INVGAMMA_Y_26_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_26_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_25
+#define DENOISE3D2_INVGAMMA_Y_25_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_25_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_27_B
+#define DENOISE3D2_INVGAMMA_Y_27_B_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_27_B_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_29
+#define DENOISE3D2_INVGAMMA_Y_29_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_29_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_28
+#define DENOISE3D2_INVGAMMA_Y_28_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_28_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_32_A
+#define DENOISE3D2_INVGAMMA_Y_32_A_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_32_A_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_31
+#define DENOISE3D2_INVGAMMA_Y_31_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_31_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_30
+#define DENOISE3D2_INVGAMMA_Y_30_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_30_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_32_B
+#define DENOISE3D2_INVGAMMA_Y_32_B_MASK (0x3f << 0 )
+#define DENOISE3D2_INVGAMMA_Y_32_B_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_2_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_2_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_2_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_1_SHD
+#define DENOISE3D2_INVGAMMA_Y_1_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_1_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_0_SHD
+#define DENOISE3D2_INVGAMMA_Y_0_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_0_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_2_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_2_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_2_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_4_SHD
+#define DENOISE3D2_INVGAMMA_Y_4_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_4_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_3_SHD
+#define DENOISE3D2_INVGAMMA_Y_3_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_3_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_7_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_7_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_7_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_6_SHD
+#define DENOISE3D2_INVGAMMA_Y_6_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_6_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_5_SHD
+#define DENOISE3D2_INVGAMMA_Y_5_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_5_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_7_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_7_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_7_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_9_SHD
+#define DENOISE3D2_INVGAMMA_Y_9_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_9_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_8_SHD
+#define DENOISE3D2_INVGAMMA_Y_8_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_8_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_12_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_12_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_12_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_11_SHD
+#define DENOISE3D2_INVGAMMA_Y_11_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_11_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_10_SHD
+#define DENOISE3D2_INVGAMMA_Y_10_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_10_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_12_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_12_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_12_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_14_SHD
+#define DENOISE3D2_INVGAMMA_Y_14_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_14_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_13_SHD
+#define DENOISE3D2_INVGAMMA_Y_13_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_13_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_17_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_17_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_17_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_16_SHD
+#define DENOISE3D2_INVGAMMA_Y_16_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_16_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_15_SHD
+#define DENOISE3D2_INVGAMMA_Y_15_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_15_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_17_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_17_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_17_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_19_SHD
+#define DENOISE3D2_INVGAMMA_Y_19_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_19_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_18_SHD
+#define DENOISE3D2_INVGAMMA_Y_18_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_18_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_22_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_22_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_22_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_21_SHD
+#define DENOISE3D2_INVGAMMA_Y_21_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_21_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_20_SHD
+#define DENOISE3D2_INVGAMMA_Y_20_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_20_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_22_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_22_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_22_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_24_SHD
+#define DENOISE3D2_INVGAMMA_Y_24_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_24_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_23_SHD
+#define DENOISE3D2_INVGAMMA_Y_23_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_23_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_27_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_27_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_27_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_26_SHD
+#define DENOISE3D2_INVGAMMA_Y_26_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_26_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_25_SHD
+#define DENOISE3D2_INVGAMMA_Y_25_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_25_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_27_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_27_B_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_27_B_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_29_SHD
+#define DENOISE3D2_INVGAMMA_Y_29_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_29_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_28_SHD
+#define DENOISE3D2_INVGAMMA_Y_28_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_28_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_32_A_SHD
+#define DENOISE3D2_INVGAMMA_Y_32_A_SHD_MASK (0x3f << 24 )
+#define DENOISE3D2_INVGAMMA_Y_32_A_SHD_SHIFT 24U
+
+#define DENOISE3D2_INVGAMMA_Y_31_SHD
+#define DENOISE3D2_INVGAMMA_Y_31_SHD_MASK (0xfff << 12 )
+#define DENOISE3D2_INVGAMMA_Y_31_SHD_SHIFT 12U
+
+#define DENOISE3D2_INVGAMMA_Y_30_SHD
+#define DENOISE3D2_INVGAMMA_Y_30_SHD_MASK (0xfff << 0 )
+#define DENOISE3D2_INVGAMMA_Y_30_SHD_SHIFT 0U
+
+#define DENOISE3D2_INVGAMMA_Y_32_B_SHD
+#define DENOISE3D2_INVGAMMA_Y_32_B_SHD_MASK (0x3f << 0 )
+#define DENOISE3D2_INVGAMMA_Y_32_B_SHD_SHIFT 0U
+
+#define DENOISE3D2_NLM_STRENGTH_SLOPE
+#define DENOISE3D2_NLM_STRENGTH_SLOPE_MASK (0xff << 0 )
+#define DENOISE3D2_NLM_STRENGTH_SLOPE_SHIFT 0U
+
+#define DENOISE3D2_TNR
+#define DENOISE3D2_TNR_MASK (0x7ff << 0 )
+#define DENOISE3D2_TNR_SHIFT 0U
+
+#define PP_RD_YUV_CFG_UPDATE
+#define PP_RD_YUV_CFG_UPDATE_MASK 0x1 << 7
+#define PP_RD_YUV_CFG_UPDATE_SHIFT 7U
+
+#define PP_RD_YUV_AUTO_UPDATE
+#define PP_RD_YUV_AUTO_UPDATE_MASK 0x1 << 6
+#define PP_RD_YUV_AUTO_UPDATE_SHIFT 6U
+
+#define PP_INIT_OFFSET_EN
+#define PP_INIT_OFFSET_EN_MASK 0x1 << 5
+#define PP_INIT_OFFSET_EN_SHIFT 5U
+
+#define PP_INIT_BASE_EN
+#define PP_INIT_BASE_EN_MASK 0x1 << 4
+#define PP_INIT_BASE_EN_SHIFT 4U
+
+#define PP_MI_CFG_UPD
+#define PP_MI_CFG_UPD_MASK 0x1 << 3
+#define PP_MI_CFG_UPD_SHIFT 3U
+
+#define PP_MI_SKIP
+#define PP_MI_SKIP_MASK 0x1 << 2
+#define PP_MI_SKIP_SHIFT 2U
+
+#define PP_AUTO_UPDATE
+#define PP_AUTO_UPDATE_MASK 0x1 << 1
+#define PP_AUTO_UPDATE_SHIFT 1U
+
+#define PP_PINGPONG_ENABLE
+#define PP_PINGPONG_ENABLE_MASK 0x1 << 0
+#define PP_PINGPONG_ENABLE_SHIFT 0U
+
+#define PP_RD_RAW_ENABLE
+#define PP_RD_RAW_ENABLE_MASK 0x1 << 31
+#define PP_RD_RAW_ENABLE_SHIFT 31U
+
+#define PP_RD_RAW_ALIGNED
+#define PP_RD_RAW_ALIGNED_MASK (0x3 << 29 )
+#define PP_RD_RAW_ALIGNED_SHIFT 29U
+
+#define PP_RD_RAW_BIT
+#define PP_RD_RAW_BIT_MASK (0x7 << 26 )
+#define PP_RD_RAW_BIT_SHIFT 26U
+
+#define PP_RD_YUV_NVY
+#define PP_RD_YUV_NVY_MASK (0x3 << 24 )
+#define PP_RD_YUV_NVY_SHIFT 24U
+
+#define PP_RD_YUV_NV21
+#define PP_RD_YUV_NV21_MASK 0x1 << 23
+#define PP_RD_YUV_NV21_SHIFT 23U
+
+#define PP_RD_YUV_ALIGNED
+#define PP_RD_YUV_ALIGNED_MASK 0x1 << 22
+#define PP_RD_YUV_ALIGNED_SHIFT 22U
+
+#define PP_RD_YUV_STR
+#define PP_RD_YUV_STR_MASK (0x3 << 20 )
+#define PP_RD_YUV_STR_SHIFT 20U
+
+#define PP_RD_YUV_FMT
+#define PP_RD_YUV_FMT_MASK (0x3 << 18 )
+#define PP_RD_YUV_FMT_SHIFT 18U
+
+#define PP_RD_YUV_BIT
+#define PP_RD_YUV_BIT_MASK 0x1 << 17
+#define PP_RD_YUV_BIT_SHIFT 17U
+
+#define PP_WR_RAW_SEL
+#define PP_WR_RAW_SEL_MASK 0x1 << 16
+#define PP_WR_RAW_SEL_SHIFT 16U
+
+#define PP_WR_RAW_ALIGNED
+#define PP_WR_RAW_ALIGNED_MASK (0x3 << 14 )
+#define PP_WR_RAW_ALIGNED_SHIFT 14U
+
+#define PP_WR_RAW_BIT
+#define PP_WR_RAW_BIT_MASK (0x7 << 11 )
+#define PP_WR_RAW_BIT_SHIFT 11U
+
+#define PP_WR_YUV_WORD_ALIGNED_MSB_EN
+#define PP_WR_YUV_WORD_ALIGNED_MSB_EN_MASK 0x1 << 10
+#define PP_WR_YUV_WORD_ALIGNED_MSB_EN_SHIFT 10U
+
+#define PP_WR_YUV_WORD_ALIGNED
+#define PP_WR_YUV_WORD_ALIGNED_MASK 0x1 << 9
+#define PP_WR_YUV_WORD_ALIGNED_SHIFT 9U
+
+#define PP_WR_YUV_NVY
+#define PP_WR_YUV_NVY_MASK (0x3 << 7 )
+#define PP_WR_YUV_NVY_SHIFT 7U
+
+#define PP_WR_YUV_NV21
+#define PP_WR_YUV_NV21_MASK 0x1 << 6
+#define PP_WR_YUV_NV21_SHIFT 6U
+
+#define PP_WR_YUV_ALIGNED
+#define PP_WR_YUV_ALIGNED_MASK 0x1 << 5
+#define PP_WR_YUV_ALIGNED_SHIFT 5U
+
+#define PP_WR_YUV_STR
+#define PP_WR_YUV_STR_MASK (0x3 << 3 )
+#define PP_WR_YUV_STR_SHIFT 3U
+
+#define PP_WR_YUV_FMT
+#define PP_WR_YUV_FMT_MASK (0x3 << 1 )
+#define PP_WR_YUV_FMT_SHIFT 1U
+
+#define PP_WR_YUV_BIT
+#define PP_WR_YUV_BIT_MASK 0x1 << 0
+#define PP_WR_YUV_BIT_SHIFT 0U
+
+#define PP_RD_SWAP_V
+#define PP_RD_SWAP_V_MASK 0xf << 24
+#define PP_RD_SWAP_V_SHIFT 24U
+
+#define PP_RD_SWAP_U
+#define PP_RD_SWAP_U_MASK 0xf << 20
+#define PP_RD_SWAP_U_SHIFT 20U
+
+#define PP_RD_SWAP_Y
+#define PP_RD_SWAP_Y_MASK 0xf << 16
+#define PP_RD_SWAP_Y_SHIFT 16U
+
+#define PP_WR_SWAP_V
+#define PP_WR_SWAP_V_MASK 0xf << 8
+#define PP_WR_SWAP_V_SHIFT 8U
+
+#define PP_WR_SWAP_U
+#define PP_WR_SWAP_U_MASK 0xf << 4
+#define PP_WR_SWAP_U_SHIFT 4U
+
+#define PP_WR_SWAP_Y
+#define PP_WR_SWAP_Y_MASK 0xf << 0
+#define PP_WR_SWAP_Y_SHIFT 0U
+
+#define PP_Y_BASE_AD_INIT
+#define PP_Y_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define PP_Y_BASE_AD_INIT_SHIFT 4U
+
+#define PP_Y_SIZE_INIT
+#define PP_Y_SIZE_INIT_MASK (0x1ffffff << 4 )
+#define PP_Y_SIZE_INIT_SHIFT 4U
+
+#define PP_Y_OFFS_CNT_INIT
+#define PP_Y_OFFS_CNT_INIT_MASK (0x1ffffff << 4 )
+#define PP_Y_OFFS_CNT_INIT_SHIFT 4U
+
+#define PP_Y_LLENGH
+#define PP_Y_LLENGH_MASK (0xffffffff << 0 )
+#define PP_Y_LLENGH_SHIFT 0U
+
+#define PP_Y_PIC_WIDTH
+#define PP_Y_PIC_WIDTH_MASK (0xffffffff << 0 )
+#define PP_Y_PIC_WIDTH_SHIFT 0U
+
+#define PP_Y_PIC_HEIGHT
+#define PP_Y_PIC_HEIGHT_MASK (0xffffffff << 0 )
+#define PP_Y_PIC_HEIGHT_SHIFT 0U
+
+#define PP_Y_PIC_SIZE
+#define PP_Y_PIC_SIZE_MASK (0xffffffff << 0 )
+#define PP_Y_PIC_SIZE_SHIFT 0U
+
+#define PP_CB_BASE_AD_INIT
+#define PP_CB_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define PP_CB_BASE_AD_INIT_SHIFT 4U
+
+#define PP_CB_SIZE_INIT
+#define PP_CB_SIZE_INIT_MASK (0xffffff << 4 )
+#define PP_CB_SIZE_INIT_SHIFT 4U
+
+#define PP_CB_OFFS_CNT_INIT
+#define PP_CB_OFFS_CNT_INIT_MASK (0xffffff << 4 )
+#define PP_CB_OFFS_CNT_INIT_SHIFT 4U
+
+#define PP_CR_BASE_AD_INIT
+#define PP_CR_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define PP_CR_BASE_AD_INIT_SHIFT 4U
+
+#define PP_CR_SIZE_INIT
+#define PP_CR_SIZE_INIT_MASK (0xffffff << 4 )
+#define PP_CR_SIZE_INIT_SHIFT 4U
+
+#define PP_CR_OFFS_CNT_INIT
+#define PP_CR_OFFS_CNT_INIT_MASK (0xffffff << 4 )
+#define PP_CR_OFFS_CNT_INIT_SHIFT 4U
+
+#define PP_Y_BASE_AD_INIT2
+#define PP_Y_BASE_AD_INIT2_MASK (0xfffffff << 4 )
+#define PP_Y_BASE_AD_INIT2_SHIFT 4U
+
+#define PP_CB_BASE_AD_INIT2
+#define PP_CB_BASE_AD_INIT2_MASK (0xfffffff << 4 )
+#define PP_CB_BASE_AD_INIT2_SHIFT 4U
+
+#define PP_CR_BASE_AD_INIT2
+#define PP_CR_BASE_AD_INIT2_MASK (0xfffffff << 4 )
+#define PP_CR_BASE_AD_INIT2_SHIFT 4U
+
+#define PP_Y_OFFS_CNT_START
+#define PP_Y_OFFS_CNT_START_MASK (0x1ffffff << 4 )
+#define PP_Y_OFFS_CNT_START_SHIFT 4U
+
+#define PP_CB_OFFS_CNT_START
+#define PP_CB_OFFS_CNT_START_MASK (0xffffff << 4 )
+#define PP_CB_OFFS_CNT_START_SHIFT 4U
+
+#define PP_CR_OFFS_CNT_START
+#define PP_CR_OFFS_CNT_START_MASK (0xffffff << 4 )
+#define PP_CR_OFFS_CNT_START_SHIFT 4U
+
+#define PP_Y_BASE_AD
+#define PP_Y_BASE_AD_MASK (0xfffffff << 4 )
+#define PP_Y_BASE_AD_SHIFT 4U
+
+#define PP_Y_SIZE
+#define PP_Y_SIZE_MASK (0x1ffffff << 4 )
+#define PP_Y_SIZE_SHIFT 4U
+
+#define PP_Y_OFFS_CNT
+#define PP_Y_OFFS_CNT_MASK (0x1ffffff << 4 )
+#define PP_Y_OFFS_CNT_SHIFT 4U
+
+#define PP_CB_BASE_AD
+#define PP_CB_BASE_AD_MASK (0xfffffff << 4 )
+#define PP_CB_BASE_AD_SHIFT 4U
+
+#define PP_CB_SIZE
+#define PP_CB_SIZE_MASK (0xffffff << 4 )
+#define PP_CB_SIZE_SHIFT 4U
+
+#define PP_CB_OFFS_CNT
+#define PP_CB_OFFS_CNT_MASK (0xffffff << 4 )
+#define PP_CB_OFFS_CNT_SHIFT 4U
+
+#define PP_CR_BASE_AD
+#define PP_CR_BASE_AD_MASK (0xfffffff << 4 )
+#define PP_CR_BASE_AD_SHIFT 4U
+
+#define PP_CR_SIZE
+#define PP_CR_SIZE_MASK (0xffffff << 4 )
+#define PP_CR_SIZE_SHIFT 4U
+
+#define PP_CR_OFFS_CNT
+#define PP_CR_OFFS_CNT_MASK (0xffffff << 4 )
+#define PP_CR_OFFS_CNT_SHIFT 4U
+
+#define PP_DMA_Y_PIC_WIDTH
+#define PP_DMA_Y_PIC_WIDTH_MASK (0x7fff << 0 )
+#define PP_DMA_Y_PIC_WIDTH_SHIFT 0U
+
+#define PP_DMA_Y_PIC_LLENGTH
+#define PP_DMA_Y_PIC_LLENGTH_MASK (0xffffffff << 0 )
+#define PP_DMA_Y_PIC_LLENGTH_SHIFT 0U
+
+#define PP_DMA_Y_PIC_SIZE
+#define PP_DMA_Y_PIC_SIZE_MASK (0xfffffff << 0 )
+#define PP_DMA_Y_PIC_SIZE_SHIFT 0U
+
+#define PP_DMA_CB_PIC_START_AD
+#define PP_DMA_CB_PIC_START_AD_MASK (0xfffffff << 4 )
+#define PP_DMA_CB_PIC_START_AD_SHIFT 4U
+
+#define PP_DMA_CR_PIC_START_AD
+#define PP_DMA_CR_PIC_START_AD_MASK (0xfffffff << 4 )
+#define PP_DMA_CR_PIC_START_AD_SHIFT 4U
+
+#define PP_DMA_Y_PIC_START_AD
+#define PP_DMA_Y_PIC_START_AD_MASK (0xfffffff << 4 )
+#define PP_DMA_Y_PIC_START_AD_SHIFT 4U
+
+#define PP_DMA_CB_PIC_START_AD
+#define PP_DMA_CB_PIC_START_AD_MASK (0xfffffff << 4 )
+#define PP_DMA_CB_PIC_START_AD_SHIFT 4U
+
+#define PP_DMA_CR_PIC_START_AD
+#define PP_DMA_CR_PIC_START_AD_MASK (0xfffffff << 4 )
+#define PP_DMA_CR_PIC_START_AD_SHIFT 4U
+
+#define PP_DMA_Y_PIC_LVAL
+#define PP_DMA_Y_PIC_LVAL_MASK (0xffff << 0 )
+#define PP_DMA_Y_PIC_LVAL_SHIFT 0U
+
+
+
+#define HDR_DMA_START_CONTINUOUS
+#define HDR_DMA_START_CONTINUOUS_MASK 0x1 << 8
+#define HDR_DMA_START_CONTINUOUS_SHIFT 8U
+
+#define HDR_DMA_START
+#define HDR_DMA_START_MASK 0x1 << 7
+#define HDR_DMA_START_SHIFT 7U
+
+#define HDR_WR_ENABLE
+#define HDR_WR_ENABLE_MASK 0x1 << 6
+#define HDR_WR_ENABLE_SHIFT 6U
+
+#define HDR_RD_RAW_CFG_UPDATE
+#define HDR_RD_RAW_CFG_UPDATE_MASK 0x1 << 5
+#define HDR_RD_RAW_CFG_UPDATE_SHIFT 5U
+
+#define HDR_RD_RAW_AUTO_UPDATE
+#define HDR_RD_RAW_AUTO_UPDATE_MASK 0x1 << 4
+#define HDR_RD_RAW_AUTO_UPDATE_SHIFT 4U
+
+#define HDR_INIT_OFFSET_EN
+#define HDR_INIT_OFFSET_EN_MASK 0x1 << 3
+#define HDR_INIT_OFFSET_EN_SHIFT 3U
+
+#define HDR_INIT_BASE_EN
+#define HDR_INIT_BASE_EN_MASK 0x1 << 2
+#define HDR_INIT_BASE_EN_SHIFT 2U
+
+#define HDR_MI_CFG_UPD
+#define HDR_MI_CFG_UPD_MASK 0x1 << 1
+#define HDR_MI_CFG_UPD_SHIFT 1U
+
+#define HDR_AUTO_UPDATE
+#define HDR_AUTO_UPDATE_MASK 0x1 << 0
+#define HDR_AUTO_UPDATE_SHIFT 0U
+
+#define HDR_RD_RAW_ALIGNED
+#define HDR_RD_RAW_ALIGNED_MASK (0x3 << 24 )
+#define HDR_RD_RAW_ALIGNED_SHIFT 24U
+
+#define HDR_RD_VS_BIT
+#define HDR_RD_VS_BIT_MASK (0x3 << 22 )
+#define HDR_RD_VS_BIT_SHIFT 22U
+
+#define HDR_RD_S_BIT
+#define HDR_RD_S_BIT_MASK (0x3 << 20 )
+#define HDR_RD_S_BIT_SHIFT 20U
+
+#define HDR_RD_L_BIT
+#define HDR_RD_L_BIT_MASK (0x3 << 18 )
+#define HDR_RD_L_BIT_SHIFT 18U
+
+#define HDR_RD_STR
+#define HDR_RD_STR_MASK (0x3 << 16 )
+#define HDR_RD_STR_SHIFT 16U
+
+#define HDR_WR_RAW_ALIGNED
+#define HDR_WR_RAW_ALIGNED_MASK (0x3 << 8 )
+#define HDR_WR_RAW_ALIGNED_SHIFT 8U
+
+#define HDR_WR_VS_BIT
+#define HDR_WR_VS_BIT_MASK (0x3 << 6 )
+#define HDR_WR_VS_BIT_SHIFT 6U
+
+#define HDR_WR_S_BIT
+#define HDR_WR_S_BIT_MASK (0x3 << 4 )
+#define HDR_WR_S_BIT_SHIFT 4U
+
+#define HDR_WR_L_BIT
+#define HDR_WR_L_BIT_MASK (0x3 << 2 )
+#define HDR_WR_L_BIT_SHIFT 2U
+
+#define HDR_WR_STR
+#define HDR_WR_STR_MASK (0x3 << 0 )
+#define HDR_WR_STR_SHIFT 0U
+
+#define HDR_DMA_START_BY_LINES
+#define HDR_DMA_START_BY_LINES_MASK (0xffff << 0 )
+#define HDR_DMA_START_BY_LINES_SHIFT 0U
+
+#define HDR_RD_SWAP_RAW
+#define HDR_RD_SWAP_RAW_MASK (0xf << 16 )
+#define HDR_RD_SWAP_RAW_SHIFT 16U
+
+#define HDR_WR_SWAP_RAW
+#define HDR_WR_SWAP_RAW_MASK (0xf << 0 )
+#define HDR_WR_SWAP_RAW_SHIFT 0U
+
+#define HDR_BUS_SW_EN
+#define HDR_BUS_SW_EN_MASK 0x1 << 23
+#define HDR_BUS_SW_EN_SHIFT 23U
+
+#define HDR_RD_BURST_LEN
+#define HDR_RD_BURST_LEN_MASK (0x3 << 21 )
+#define HDR_RD_BURST_LEN_SHIFT 21U
+
+#define HDR_WR_BURST_LEN
+#define HDR_WR_BURST_LEN_MASK (0x3 << 19 )
+#define HDR_WR_BURST_LEN_SHIFT 19U
+
+#define HDR_RD_ID_EN
+#define HDR_RD_ID_EN_MASK 0x1 << 18
+#define HDR_RD_ID_EN_SHIFT 18U
+
+#define HDR_RD_ID_CFG
+#define HDR_RD_ID_CFG_MASK (0xff << 10 )
+#define HDR_RD_ID_CFG_SHIFT 10U
+
+#define HDR_WR_ID_EN
+#define HDR_WR_ID_EN_MASK 0x1 << 8
+#define HDR_WR_ID_EN_SHIFT 8U
+
+#define HDR_WR_ID_CFG
+#define HDR_WR_ID_CFG_MASK (0xff << 0 )
+#define HDR_WR_ID_CFG_SHIFT 0U
+
+#define HDR_BUS_TIMEO_EN
+#define HDR_BUS_TIMEO_EN_MASK 0x1 << 31
+#define HDR_BUS_TIMEO_EN_SHIFT 31U
+
+#define HDR_BUS_TIMEO
+#define HDR_BUS_TIMEO_MASK (0x7fffffff << 0 )
+#define HDR_BUS_TIMEO_SHIFT 0U
+
+#define HDR_L_PIC_WIDTH
+#define HDR_L_PIC_WIDTH_MASK (0xffffffff << 0 )
+#define HDR_L_PIC_WIDTH_SHIFT 0U
+
+#define HDR_L_PIC_HEIGHT
+#define HDR_L_PIC_HEIGHT_MASK (0xffffffff << 0 )
+#define HDR_L_PIC_HEIGHT_SHIFT 0U
+
+#define HDR_L_BASE_AD_INIT
+#define HDR_L_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_L_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_L_SIZE_INIT
+#define HDR_L_SIZE_INIT_MASK (0x1ffffff << 4 )
+#define HDR_L_SIZE_INIT_SHIFT 4U
+
+#define HDR_L_OFFS_CNT_INIT
+#define HDR_L_OFFS_CNT_INIT_MASK (0x1ffffff << 4 )
+#define HDR_L_OFFS_CNT_INIT_SHIFT 4U
+
+#define HDR_L_LLENGTH
+#define HDR_L_LLENGTH_MASK (0xffffffff << 0 )
+#define HDR_L_LLENGTH_SHIFT 0U
+
+#define HDR_L_PIC_LVAL
+#define HDR_L_PIC_LVAL_MASK (0xffff << 0 )
+#define HDR_L_PIC_LVAL_SHIFT 0U
+
+#define HDR_L_IRQ_OFFS_INIT
+#define HDR_L_IRQ_OFFS_INIT_MASK (0xffffffff << 0 )
+#define HDR_L_IRQ_OFFS_INIT_SHIFT 0U
+
+#define HDR_L_OFFS_CNT_START
+#define HDR_L_OFFS_CNT_START_MASK (0x1ffffff << 4 )
+#define HDR_L_OFFS_CNT_START_SHIFT 4U
+
+#define HDR_L_BASE_AD_SHD
+#define HDR_L_BASE_AD_SHD_MASK (0xfffffff << 4 )
+#define HDR_L_BASE_AD_SHD_SHIFT 4U
+
+#define HDR_L_SIZE_SHD
+#define HDR_L_SIZE_SHD_MASK (0x1ffffff << 4 )
+#define HDR_L_SIZE_SHD_SHIFT 4U
+
+#define HDR_L_OFFS_CNT
+#define HDR_L_OFFS_CNT_MASK (0x1ffffff << 4 )
+#define HDR_L_OFFS_CNT_SHIFT 4U
+
+#define HDR_L_IRQ_OFFS_SHD
+#define HDR_L_IRQ_OFFS_SHD_MASK (0xffffffff << 0 )
+#define HDR_L_IRQ_OFFS_SHD_SHIFT 0U
+
+#define HDR_S_BASE_AD_INIT
+#define HDR_S_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_S_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_S_SIZE_INIT
+#define HDR_S_SIZE_INIT_MASK (0x1ffffff << 4 )
+#define HDR_S_SIZE_INIT_SHIFT 4U
+
+#define HDR_S_OFFS_CNT_INIT
+#define HDR_S_OFFS_CNT_INIT_MASK (0x1ffffff << 4 )
+#define HDR_S_OFFS_CNT_INIT_SHIFT 4U
+
+#define HDR_S_LLENGTH
+#define HDR_S_LLENGTH_MASK (0xffffffff << 0 )
+#define HDR_S_LLENGTH_SHIFT 0U
+
+#define HDR_S_PIC_LVAL
+#define HDR_S_PIC_LVAL_MASK (0xffff << 0 )
+#define HDR_S_PIC_LVAL_SHIFT 0U
+
+#define HDR_S_IRQ_OFFS_INIT
+#define HDR_S_IRQ_OFFS_INIT_MASK (0xffffffff << 0 )
+#define HDR_S_IRQ_OFFS_INIT_SHIFT 0U
+
+#define HDR_S_OFFS_CNT_START
+#define HDR_S_OFFS_CNT_START_MASK (0x1ffffff << 4 )
+#define HDR_S_OFFS_CNT_START_SHIFT 4U
+
+#define HDR_S_BASE_AD_SHD
+#define HDR_S_BASE_AD_SHD_MASK (0xfffffff << 4 )
+#define HDR_S_BASE_AD_SHD_SHIFT 4U
+
+#define HDR_S_SIZE_SHD
+#define HDR_S_SIZE_SHD_MASK (0x1ffffff << 4 )
+#define HDR_S_SIZE_SHD_SHIFT 4U
+
+#define HDR_S_OFFS_CNT
+#define HDR_S_OFFS_CNT_MASK (0x1ffffff << 4 )
+#define HDR_S_OFFS_CNT_SHIFT 4U
+
+#define HDR_S_IRQ_OFFS_SHD
+#define HDR_S_IRQ_OFFS_SHD_MASK (0xffffffff << 0 )
+#define HDR_S_IRQ_OFFS_SHD_SHIFT 0U
+
+#define HDR_VS_BASE_AD_INIT
+#define HDR_VS_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_VS_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_VS_SIZE_INIT
+#define HDR_VS_SIZE_INIT_MASK (0x1ffffff << 4 )
+#define HDR_VS_SIZE_INIT_SHIFT 4U
+
+#define HDR_VS_OFFS_CNT_INIT
+#define HDR_VS_OFFS_CNT_INIT_MASK (0x1ffffff << 4 )
+#define HDR_VS_OFFS_CNT_INIT_SHIFT 4U
+
+#define HDR_VS_LLENGTH
+#define HDR_VS_LLENGTH_MASK (0xffffffff << 0 )
+#define HDR_VS_LLENGTH_SHIFT 0U
+
+#define HDR_VS_PIC_LVAL
+#define HDR_VS_PIC_LVAL_MASK (0xffff << 0 )
+#define HDR_VS_PIC_LVAL_SHIFT 0U
+
+#define HDR_VS_IRQ_OFFS_INIT
+#define HDR_VS_IRQ_OFFS_INIT_MASK (0xffffffff << 0 )
+#define HDR_VS_IRQ_OFFS_INIT_SHIFT 0U
+
+#define HDR_VS_OFFS_CNT_START
+#define HDR_VS_OFFS_CNT_START_MASK (0x1ffffff << 4 )
+#define HDR_VS_OFFS_CNT_START_SHIFT 4U
+
+#define HDR_VS_BASE_AD_SHD
+#define HDR_VS_BASE_AD_SHD_MASK (0xfffffff << 4 )
+#define HDR_VS_BASE_AD_SHD_SHIFT 4U
+
+#define HDR_VS_SIZE_SHD
+#define HDR_VS_SIZE_SHD_MASK (0x1ffffff << 4 )
+#define HDR_VS_SIZE_SHD_SHIFT 4U
+
+#define HDR_VS_OFFS_CNT
+#define HDR_VS_OFFS_CNT_MASK (0x1ffffff << 4 )
+#define HDR_VS_OFFS_CNT_SHIFT 4U
+
+#define HDR_VS_IRQ_OFFS_SHD
+#define HDR_VS_IRQ_OFFS_SHD_MASK (0xffffffff << 0 )
+#define HDR_VS_IRQ_OFFS_SHD_SHIFT 0U
+
+#define HDR_DMA_PIC_WIDTH
+#define HDR_DMA_PIC_WIDTH_MASK (0x7fff << 0 )
+#define HDR_DMA_PIC_WIDTH_SHIFT 0U
+
+#define HDR_DMA_PIC_HEIGHT
+#define HDR_DMA_PIC_HEIGHT_MASK (0x7fff << 0 )
+#define HDR_DMA_PIC_HEIGHT_SHIFT 0U
+
+#define HDR_DMA_L_BASE_AD_INIT
+#define HDR_DMA_L_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_L_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_L_SIZE_INIT
+#define HDR_DMA_L_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_L_SIZE_INIT_SHIFT 4U
+
+#define HDR_DMA_L_PIC_LLENGTH
+#define HDR_DMA_L_PIC_LLENGTH_MASK (0xfffffff << 4 )
+#define HDR_DMA_L_PIC_LLENGTH_SHIFT 4U
+
+#define HDR_DMA_L_WIDTH_BYTES
+#define HDR_DMA_L_WIDTH_BYTES_MASK (0xffff << 0 )
+#define HDR_DMA_L_WIDTH_BYTES_SHIFT 0U
+
+#define HDR_DMA_L_BASE_AD_INIT
+#define HDR_DMA_L_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_L_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_L_SIZE_INIT
+#define HDR_DMA_L_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_L_SIZE_INIT_SHIFT 4U
+
+#define HDR_DMA_S_BASE_AD_INIT
+#define HDR_DMA_S_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_S_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_S_SIZE_INIT
+#define HDR_DMA_S_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_S_SIZE_INIT_SHIFT 4U
+
+#define HDR_DMA_S_PIC_LLENGTH
+#define HDR_DMA_S_PIC_LLENGTH_MASK (0xfffffff << 4 )
+#define HDR_DMA_S_PIC_LLENGTH_SHIFT 4U
+
+#define HDR_DMA_S_WIDTH_BYTES
+#define HDR_DMA_S_WIDTH_BYTES_MASK (0xffff << 0 )
+#define HDR_DMA_S_WIDTH_BYTES_SHIFT 0U
+
+#define HDR_DMA_S_BASE_AD_INIT
+#define HDR_DMA_S_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_S_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_S_SIZE_INIT
+#define HDR_DMA_S_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_S_SIZE_INIT_SHIFT 4U
+
+#define HDR_DMA_VS_BASE_AD_INIT
+#define HDR_DMA_VS_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_VS_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_VS_SIZE_INIT
+#define HDR_DMA_VS_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_VS_SIZE_INIT_SHIFT 4U
+
+#define HDR_DMA_VS_PIC_LLENGTH
+#define HDR_DMA_VS_PIC_LLENGTH_MASK (0xfffffff << 4 )
+#define HDR_DMA_VS_PIC_LLENGTH_SHIFT 4U
+
+#define HDR_DMA_VS_WIDTH_BYTES
+#define HDR_DMA_VS_WIDTH_BYTES_MASK (0xffff << 0 )
+#define HDR_DMA_VS_WIDTH_BYTES_SHIFT 0U
+
+#define HDR_DMA_VS_BASE_AD_INIT
+#define HDR_DMA_VS_BASE_AD_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_VS_BASE_AD_INIT_SHIFT 4U
+
+#define HDR_DMA_VS_SIZE_INIT
+#define HDR_DMA_VS_SIZE_INIT_MASK (0xfffffff << 4 )
+#define HDR_DMA_VS_SIZE_INIT_SHIFT 4U
+
+#define HDR_RT_VSYNC_POL
+#define HDR_RT_VSYNC_POL_MASK (0x1 << 8)
+#define HDR_RT_VSYNC_POL_SHIFT 8U
+
+#define HDR_RT_HSYNC_POL
+#define HDR_RT_HSYNC_POL_MASK (0x1 << 7)
+#define HDR_RT_HSYNC_POL_SHIFT 7U
+
+#define HDR_RETIMING_ENABLE
+#define HDR_RETIMING_ENABLE_MASK 0x1 << 6
+#define HDR_RETIMING_ENABLE_SHIFT 6U
+
+#define LONG_USE_DDR_ONLY_EN
+#define LONG_USE_DDR_ONLY_EN_MASK 0x1 << 5
+#define LONG_USE_DDR_ONLY_EN_SHIFT 5U
+
+#define SHORT_USE_DDR_ONLY_EN
+#define SHORT_USE_DDR_ONLY_EN_MASK 0x1 << 4
+#define SHORT_USE_DDR_ONLY_EN_SHIFT 4U
+
+#define DUMP_MODE_EN
+#define DUMP_MODE_EN_MASK 0x1 << 3
+#define DUMP_MODE_EN_SHIFT 3U
+
+#define L_VS_COMBINING_ENABLE
+#define L_VS_COMBINING_ENABLE_MASK 0x1 << 2
+#define L_VS_COMBINING_ENABLE_SHIFT 2U
+
+#define EXPOSURE_COUNT
+#define EXPOSURE_COUNT_MASK (0x3 << 0 )
+#define EXPOSURE_COUNT_SHIFT 0U
+
+#define HDR_INTERVAL1
+#define HDR_INTERVAL1_MASK (0xffff << 16 )
+#define HDR_INTERVAL1_SHIFT 16U
+
+#define HDR_INTERVAL0
+#define HDR_INTERVAL0_MASK (0xffff << 0 )
+#define HDR_INTERVAL0_SHIFT 0U
+
+#define PART_TWO_ENABLE
+#define PART_TWO_ENABLE_MASK 0x1 << 23
+#define PART_TWO_ENABLE_SHIFT 23U
+
+#define PART_ONE_ENABLE
+#define PART_ONE_ENABLE_MASK 0x1 << 22
+#define PART_ONE_ENABLE_SHIFT 22U
+
+#define SOFT_RST_PRE_FILT
+#define SOFT_RST_PRE_FILT_MASK 0x1 << 21
+#define SOFT_RST_PRE_FILT_SHIFT 21U
+
+#define DEMOSAIC_THRESHOLD
+#define DEMOSAIC_THRESHOLD_MASK (0xff << 13 )
+#define DEMOSAIC_THRESHOLD_SHIFT 13U
+
+#define STAGE1_SELECT
+#define STAGE1_SELECT_MASK (0xf << 9 )
+#define STAGE1_SELECT_SHIFT 9U
+
+#define OUT_RGB_BAYER_PATTERN
+#define OUT_RGB_BAYER_PATTERN_MASK (0x3 << 7 )
+#define OUT_RGB_BAYER_PATTERN_SHIFT 7U
+
+#define RGBIR_BAYER_PATTERN
+#define RGBIR_BAYER_PATTERN_MASK (0xf << 3 )
+#define RGBIR_BAYER_PATTERN_SHIFT 3U
+
+#define GREEN_FILT_ENABLE
+#define GREEN_FILT_ENABLE_MASK 0x1 << 2
+#define GREEN_FILT_ENABLE_SHIFT 2U
+
+#define GREEN_FILT_MODE
+#define GREEN_FILT_MODE_MASK 0x1 << 1
+#define GREEN_FILT_MODE_SHIFT 1U
+
+#define ISP_PRE_FILT_ENABLE
+#define ISP_PRE_FILT_ENABLE_MASK 0x1 << 0
+#define ISP_PRE_FILT_ENABLE_SHIFT 0U
+
+#define ISP_PRE_FILT_BLS_A
+#define ISP_PRE_FILT_BLS_A_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_BLS_A_SHIFT 0U
+
+#define ISP_PRE_FILT_BLS_B
+#define ISP_PRE_FILT_BLS_B_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_BLS_B_SHIFT 0U
+
+#define ISP_PRE_FILT_BLS_C
+#define ISP_PRE_FILT_BLS_C_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_BLS_C_SHIFT 0U
+
+#define ISP_PRE_FILT_BLS_D
+#define ISP_PRE_FILT_BLS_D_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_BLS_D_SHIFT 0U
+
+#define ISP_PRE_FILT_GAIN_R
+#define ISP_PRE_FILT_GAIN_R_MASK (0x3ff << 0 )
+#define ISP_PRE_FILT_GAIN_R_SHIFT 0U
+
+#define ISP_PRE_FILT_GAIN_G
+#define ISP_PRE_FILT_GAIN_G_MASK (0x3ff << 0 )
+#define ISP_PRE_FILT_GAIN_G_SHIFT 0U
+
+#define ISP_PRE_FILT_GAIN_B
+#define ISP_PRE_FILT_GAIN_B_MASK (0x3ff << 0 )
+#define ISP_PRE_FILT_GAIN_B_SHIFT 0U
+
+#define ISP_PRE_FILT_DPC_TH_MED_R
+#define ISP_PRE_FILT_DPC_TH_MED_R_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_DPC_TH_MED_R_SHIFT 16U
+
+#define ISP_PRE_FILT_DPC_TH_AVG_R
+#define ISP_PRE_FILT_DPC_TH_AVG_R_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_DPC_TH_AVG_R_SHIFT 0U
+
+#define ISP_PRE_FILT_DPC_TH_MED_G
+#define ISP_PRE_FILT_DPC_TH_MED_G_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_DPC_TH_MED_G_SHIFT 16U
+
+#define ISP_PRE_FILT_DPC_TH_AVG_G
+#define ISP_PRE_FILT_DPC_TH_AVG_G_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_DPC_TH_AVG_G_SHIFT 0U
+
+#define ISP_PRE_FILT_DPC_TH_MED_B
+#define ISP_PRE_FILT_DPC_TH_MED_B_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_DPC_TH_MED_B_SHIFT 16U
+
+#define ISP_PRE_FILT_DPC_TH_AVG_B
+#define ISP_PRE_FILT_DPC_TH_AVG_B_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_DPC_TH_AVG_B_SHIFT 0U
+
+#define ISP_PRE_FILT_DPC_TH_MED_IR
+#define ISP_PRE_FILT_DPC_TH_MED_IR_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_DPC_TH_MED_IR_SHIFT 16U
+
+#define ISP_PRE_FILT_DPC_TH_AVG_IR
+#define ISP_PRE_FILT_DPC_TH_AVG_IR_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_DPC_TH_AVG_IR_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_00
+#define ISP_PRE_FILT_CC_00_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_00_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_01
+#define ISP_PRE_FILT_CC_01_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_01_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_02
+#define ISP_PRE_FILT_CC_02_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_02_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_03
+#define ISP_PRE_FILT_CC_03_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_03_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_10
+#define ISP_PRE_FILT_CC_10_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_10_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_11
+#define ISP_PRE_FILT_CC_11_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_11_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_12
+#define ISP_PRE_FILT_CC_12_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_12_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_13
+#define ISP_PRE_FILT_CC_13_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_13_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_20
+#define ISP_PRE_FILT_CC_20_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_20_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_21
+#define ISP_PRE_FILT_CC_21_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_21_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_22
+#define ISP_PRE_FILT_CC_22_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_22_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_23
+#define ISP_PRE_FILT_CC_23_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_23_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_00_SHD
+#define ISP_PRE_FILT_CC_00_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_00_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_01_SHD
+#define ISP_PRE_FILT_CC_01_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_01_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_02_SHD
+#define ISP_PRE_FILT_CC_02_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_02_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_03_SHD
+#define ISP_PRE_FILT_CC_03_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_03_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_10_SHD
+#define ISP_PRE_FILT_CC_10_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_10_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_11_SHD
+#define ISP_PRE_FILT_CC_11_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_11_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_12_SHD
+#define ISP_PRE_FILT_CC_12_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_12_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_13_SHD
+#define ISP_PRE_FILT_CC_13_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_13_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_20_SHD
+#define ISP_PRE_FILT_CC_20_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_20_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_21_SHD
+#define ISP_PRE_FILT_CC_21_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_21_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_CC_22_SHD
+#define ISP_PRE_FILT_CC_22_SHD_MASK (0x7ff << 16 )
+#define ISP_PRE_FILT_CC_22_SHD_SHIFT 16U
+
+#define ISP_PRE_FILT_CC_23_SHD
+#define ISP_PRE_FILT_CC_23_SHD_MASK (0x7ff << 0 )
+#define ISP_PRE_FILT_CC_23_SHD_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PX1
+#define ISP_PRE_FILT_IR_DES_PX1_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PX1_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY2
+#define ISP_PRE_FILT_IR_DES_PY2_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY2_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY1
+#define ISP_PRE_FILT_IR_DES_PY1_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY1_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY4
+#define ISP_PRE_FILT_IR_DES_PY4_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY4_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY3
+#define ISP_PRE_FILT_IR_DES_PY3_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY3_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY6
+#define ISP_PRE_FILT_IR_DES_PY6_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY6_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY5
+#define ISP_PRE_FILT_IR_DES_PY5_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY5_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY8
+#define ISP_PRE_FILT_IR_DES_PY8_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY8_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY7
+#define ISP_PRE_FILT_IR_DES_PY7_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY7_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY10
+#define ISP_PRE_FILT_IR_DES_PY10_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY10_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY9
+#define ISP_PRE_FILT_IR_DES_PY9_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY9_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY12
+#define ISP_PRE_FILT_IR_DES_PY12_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY12_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY11
+#define ISP_PRE_FILT_IR_DES_PY11_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY11_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY14
+#define ISP_PRE_FILT_IR_DES_PY14_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY14_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY13
+#define ISP_PRE_FILT_IR_DES_PY13_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY13_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PY16
+#define ISP_PRE_FILT_IR_DES_PY16_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_IR_DES_PY16_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PY15
+#define ISP_PRE_FILT_IR_DES_PY15_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_IR_DES_PY15_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PD4
+#define ISP_PRE_FILT_IR_DES_PD4_MASK (0xff << 24 )
+#define ISP_PRE_FILT_IR_DES_PD4_SHIFT 24U
+
+#define ISP_PRE_FILT_IR_DES_PD3
+#define ISP_PRE_FILT_IR_DES_PD3_MASK (0xff << 16 )
+#define ISP_PRE_FILT_IR_DES_PD3_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PD2
+#define ISP_PRE_FILT_IR_DES_PD2_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DES_PD2_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DES_PD1
+#define ISP_PRE_FILT_IR_DES_PD1_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DES_PD1_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PD8
+#define ISP_PRE_FILT_IR_DES_PD8_MASK (0xff << 24 )
+#define ISP_PRE_FILT_IR_DES_PD8_SHIFT 24U
+
+#define ISP_PRE_FILT_IR_DES_PD7
+#define ISP_PRE_FILT_IR_DES_PD7_MASK (0xff << 16 )
+#define ISP_PRE_FILT_IR_DES_PD7_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PD6
+#define ISP_PRE_FILT_IR_DES_PD6_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DES_PD6_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DES_PD5
+#define ISP_PRE_FILT_IR_DES_PD5_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DES_PD5_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PD12
+#define ISP_PRE_FILT_IR_DES_PD12_MASK (0xff << 24 )
+#define ISP_PRE_FILT_IR_DES_PD12_SHIFT 24U
+
+#define ISP_PRE_FILT_IR_DES_PD11
+#define ISP_PRE_FILT_IR_DES_PD11_MASK (0xff << 16 )
+#define ISP_PRE_FILT_IR_DES_PD11_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PD10
+#define ISP_PRE_FILT_IR_DES_PD10_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DES_PD10_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DES_PD9
+#define ISP_PRE_FILT_IR_DES_PD9_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DES_PD9_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DES_PD15
+#define ISP_PRE_FILT_IR_DES_PD15_MASK (0xff << 16 )
+#define ISP_PRE_FILT_IR_DES_PD15_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DES_PD14
+#define ISP_PRE_FILT_IR_DES_PD14_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DES_PD14_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DES_PD13
+#define ISP_PRE_FILT_IR_DES_PD13_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DES_PD13_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PX1
+#define ISP_PRE_FILT_L_DES_PX1_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PX1_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY2
+#define ISP_PRE_FILT_L_DES_PY2_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY2_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY1
+#define ISP_PRE_FILT_L_DES_PY1_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY1_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY4
+#define ISP_PRE_FILT_L_DES_PY4_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY4_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY3
+#define ISP_PRE_FILT_L_DES_PY3_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY3_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY6
+#define ISP_PRE_FILT_L_DES_PY6_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY6_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY5
+#define ISP_PRE_FILT_L_DES_PY5_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY5_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY8
+#define ISP_PRE_FILT_L_DES_PY8_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY8_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY7
+#define ISP_PRE_FILT_L_DES_PY7_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY7_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY10
+#define ISP_PRE_FILT_L_DES_PY10_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY10_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY9
+#define ISP_PRE_FILT_L_DES_PY9_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY9_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY12
+#define ISP_PRE_FILT_L_DES_PY12_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY12_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY11
+#define ISP_PRE_FILT_L_DES_PY11_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY11_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY14
+#define ISP_PRE_FILT_L_DES_PY14_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY14_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY13
+#define ISP_PRE_FILT_L_DES_PY13_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY13_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PY16
+#define ISP_PRE_FILT_L_DES_PY16_MASK (0xffff << 16 )
+#define ISP_PRE_FILT_L_DES_PY16_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PY15
+#define ISP_PRE_FILT_L_DES_PY15_MASK (0xffff << 0 )
+#define ISP_PRE_FILT_L_DES_PY15_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PD4
+#define ISP_PRE_FILT_L_DES_PD4_MASK (0xff << 24 )
+#define ISP_PRE_FILT_L_DES_PD4_SHIFT 24U
+
+#define ISP_PRE_FILT_L_DES_PD3
+#define ISP_PRE_FILT_L_DES_PD3_MASK (0xff << 16 )
+#define ISP_PRE_FILT_L_DES_PD3_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PD2
+#define ISP_PRE_FILT_L_DES_PD2_MASK (0xff << 8 )
+#define ISP_PRE_FILT_L_DES_PD2_SHIFT 8U
+
+#define ISP_PRE_FILT_L_DES_PD1
+#define ISP_PRE_FILT_L_DES_PD1_MASK (0xff << 0 )
+#define ISP_PRE_FILT_L_DES_PD1_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PD8
+#define ISP_PRE_FILT_L_DES_PD8_MASK (0xff << 24 )
+#define ISP_PRE_FILT_L_DES_PD8_SHIFT 24U
+
+#define ISP_PRE_FILT_L_DES_PD7
+#define ISP_PRE_FILT_L_DES_PD7_MASK (0xff << 16 )
+#define ISP_PRE_FILT_L_DES_PD7_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PD6
+#define ISP_PRE_FILT_L_DES_PD6_MASK (0xff << 8 )
+#define ISP_PRE_FILT_L_DES_PD6_SHIFT 8U
+
+#define ISP_PRE_FILT_L_DES_PD5
+#define ISP_PRE_FILT_L_DES_PD5_MASK (0xff << 0 )
+#define ISP_PRE_FILT_L_DES_PD5_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PD12
+#define ISP_PRE_FILT_L_DES_PD12_MASK (0xff << 24 )
+#define ISP_PRE_FILT_L_DES_PD12_SHIFT 24U
+
+#define ISP_PRE_FILT_L_DES_PD11
+#define ISP_PRE_FILT_L_DES_PD11_MASK (0xff << 16 )
+#define ISP_PRE_FILT_L_DES_PD11_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PD10
+#define ISP_PRE_FILT_L_DES_PD10_MASK (0xff << 8 )
+#define ISP_PRE_FILT_L_DES_PD10_SHIFT 8U
+
+#define ISP_PRE_FILT_L_DES_PD9
+#define ISP_PRE_FILT_L_DES_PD9_MASK (0xff << 0 )
+#define ISP_PRE_FILT_L_DES_PD9_SHIFT 0U
+
+#define ISP_PRE_FILT_L_DES_PD15
+#define ISP_PRE_FILT_L_DES_PD15_MASK (0xff << 16 )
+#define ISP_PRE_FILT_L_DES_PD15_SHIFT 16U
+
+#define ISP_PRE_FILT_L_DES_PD14
+#define ISP_PRE_FILT_L_DES_PD14_MASK (0xff << 8 )
+#define ISP_PRE_FILT_L_DES_PD14_SHIFT 8U
+
+#define ISP_PRE_FILT_L_DES_PD13
+#define ISP_PRE_FILT_L_DES_PD13_MASK (0xff << 0 )
+#define ISP_PRE_FILT_L_DES_PD13_SHIFT 0U
+
+#define PREFILT_THRESH_BL0
+#define PREFILT_THRESH_BL0_MASK (0x3ff << 0 )
+#define PREFILT_THRESH_BL0_SHIFT 0U
+
+#define PREFILT_THRESH_BL1
+#define PREFILT_THRESH_BL1_MASK (0x3ff << 0 )
+#define PREFILT_THRESH_BL1_SHIFT 0U
+
+#define PREFILT_THRESH_SH0
+#define PREFILT_THRESH_SH0_MASK (0x3ff << 0 )
+#define PREFILT_THRESH_SH0_SHIFT 0U
+
+#define PREFILT_THRESH_SH1
+#define PREFILT_THRESH_SH1_MASK (0x3ff << 0 )
+#define PREFILT_THRESH_SH1_SHIFT 0U
+
+#define LUM_WEIGHT_GAIN
+#define LUM_WEIGHT_GAIN_MASK (0x7 << 16 )
+#define LUM_WEIGHT_GAIN_SHIFT 16U
+
+#define LUM_WEIGHT_KINK
+#define LUM_WEIGHT_KINK_MASK (0xff << 8 )
+#define LUM_WEIGHT_KINK_SHIFT 8U
+
+#define LUM_WEIGHT_MIN
+#define LUM_WEIGHT_MIN_MASK (0xff << 0 )
+#define LUM_WEIGHT_MIN_SHIFT 0U
+
+#define PREFILT_FAC_SH1
+#define PREFILT_FAC_SH1_MASK (0x3f << 0 )
+#define PREFILT_FAC_SH1_SHIFT 0U
+
+#define PREFILT_FAC_SH0
+#define PREFILT_FAC_SH0_MASK (0x3f << 0 )
+#define PREFILT_FAC_SH0_SHIFT 0U
+
+#define PREFILT_FAC_MID
+#define PREFILT_FAC_MID_MASK (0x3f << 0 )
+#define PREFILT_FAC_MID_SHIFT 0U
+
+#define PREFILT_FAC_BL0
+#define PREFILT_FAC_BL0_MASK (0x3f << 0 )
+#define PREFILT_FAC_BL0_SHIFT 0U
+
+#define PREFILT_FAC_BL1
+#define PREFILT_FAC_BL1_MASK (0x3f << 0 )
+#define PREFILT_FAC_BL1_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW3
+#define ISP_PRE_FILT_IR_DENOISE_SW3_MASK (0xff << 24 )
+#define ISP_PRE_FILT_IR_DENOISE_SW3_SHIFT 24U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW2
+#define ISP_PRE_FILT_IR_DENOISE_SW2_MASK (0xff << 16 )
+#define ISP_PRE_FILT_IR_DENOISE_SW2_SHIFT 16U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW1
+#define ISP_PRE_FILT_IR_DENOISE_SW1_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DENOISE_SW1_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW0
+#define ISP_PRE_FILT_IR_DENOISE_SW0_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DENOISE_SW0_SHIFT 0U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW5
+#define ISP_PRE_FILT_IR_DENOISE_SW5_MASK (0xff << 8 )
+#define ISP_PRE_FILT_IR_DENOISE_SW5_SHIFT 8U
+
+#define ISP_PRE_FILT_IR_DENOISE_SW4
+#define ISP_PRE_FILT_IR_DENOISE_SW4_MASK (0xff << 0 )
+#define ISP_PRE_FILT_IR_DENOISE_SW4_SHIFT 0U
+
+#define PRE_FILT_H_SIZE
+#define PRE_FILT_H_SIZE_MASK (0x7fff << 0 )
+#define PRE_FILT_H_SIZE_SHIFT 0U
+
+#define PRE_FILT_V_SIZE
+#define PRE_FILT_V_SIZE_MASK (0x3fff << 0 )
+#define PRE_FILT_V_SIZE_SHIFT 0U
+
+#define PRE_FILT_DMY_HB
+#define PRE_FILT_DMY_HB_MASK (0x1fff << 0 )
+#define PRE_FILT_DMY_HB_SHIFT 0U
+
+
+#define SP2_DMA_RAW_WIDTH_BYTES
+#define SP2_DMA_RAW_WIDTH_BYTES_MASK (0xffff << 0 )
+#define SP2_DMA_RAW_WIDTH_BYTES_SHIFT 0U
+
+#define PPW_Y_BUF_FULL
+#define PPW_Y_BUF_FULL_MASK (0x1 << 26)
+#define PPW_Y_BUF_FULL_SHIFT 26U
+
+#define PPW_U_BUF_FULL
+#define PPW_U_BUF_FULL_MASK (0x1 << 25)
+#define PPW_U_BUF_FULL_SHIFT 25U
+
+#define PPW_V_BUF_FULL
+#define PPW_V_BUF_FULL_MASK (0x1 << 24)
+#define PPW_V_BUF_FULL_SHIFT 24U
+
+#define PPR_Y_BUF_FULL
+#define PPR_Y_BUF_FULL_MASK (0x1 << 23)
+#define PPR_Y_BUF_FULL_SHIFT 23U
+
+#define SP2_RAW2_W_BUF_FULL
+#define SP2_RAW2_W_BUF_FULL_MASK (0x1 << 22)
+#define SP2_RAW2_W_BUF_FULL_SHIFT 22U
+
+#define SP2_RAW2_R_BUF_FULL
+#define SP2_RAW2_R_BUF_FULL_MASK (0x1 << 21)
+#define SP2_RAW2_R_BUF_FULL_SHIFT 21U
+
+#define HDR_W_BUF_FULL
+#define HDR_W_BUF_FULL_MASK (0x1 << 20)
+#define HDR_W_BUF_FULL_SHIFT 20U
+
+#define HDR_R_BUF_FULL
+#define HDR_R_BUF_FULL_MASK (0x1 << 19)
+#define HDR_R_BUF_FULL_SHIFT 19U
+
+#define SP2_RAW2_DMA_READY
+#define SP2_RAW2_DMA_READY_MASK (0x1 << 18)
+#define SP2_RAW2_DMA_READY_SHIFT 18U
+
+#define PPR_DMA_READY
+#define PPR_DMA_READY_MASK (0x1 << 17)
+#define PPR_DMA_READY_SHIFT 17U
+
+#define WRAP_PPW_CR
+#define WRAP_PPW_CR_MASK (0x1 << 15)
+#define WRAP_PPW_CR_SHIFT 15U
+
+#define WRAP_PPW_CB
+#define WRAP_PPW_CB_MASK (0x1 << 14)
+#define WRAP_PPW_CB_SHIFT 14U
+
+#define WRAP_PPW_Y
+#define WRAP_PPW_Y_MASK (0x1 << 13)
+#define WRAP_PPW_Y_SHIFT 13U
+
+#define SP2_RAW2_FRAME_END
+#define SP2_RAW2_FRAME_END_MASK (0x1 << 12)
+#define SP2_RAW2_FRAME_END_SHIFT 12U
+
+#define PPW_FRAME_END
+#define PPW_FRAME_END_MASK (0x1 << 11)
+#define PPW_FRAME_END_SHIFT 11U
+
+#define HDR_VS_DMA_READY
+#define HDR_VS_DMA_READY_MASK (0x1 << 10)
+#define HDR_VS_DMA_READY_SHIFT 10U
+
+#define HDR_S_DMA_READY
+#define HDR_S_DMA_READY_MASK (0x1 << 9)
+#define HDR_S_DMA_READY_SHIFT 9U
+
+#define HDR_L_DMA_READY
+#define HDR_L_DMA_READY_MASK (0x1 << 8)
+#define HDR_L_DMA_READY_SHIFT 8U
+
+#define WRAP_HDR_VS
+#define WRAP_HDR_VS_MASK (0x1 << 7)
+#define WRAP_HDR_VS_SHIFT 7U
+
+#define WRAP_HDR_S
+#define WRAP_HDR_S_MASK (0x1 << 6)
+#define WRAP_HDR_S_SHIFT 6U
+
+#define WRAP_HDR_L
+#define WRAP_HDR_L_MASK (0x1 << 5)
+#define WRAP_HDR_L_SHIFT 5U
+
+#define HDR_VS_FRAME_END
+#define HDR_VS_FRAME_END_MASK (0x1 << 4)
+#define HDR_VS_FRAME_END_SHIFT 4U
+
+#define HDR_S_FRAME_END
+#define HDR_S_FRAME_END_MASK (0x1 << 3)
+#define HDR_S_FRAME_END_SHIFT 3U
+
+#define HDR_L_FRAME_END
+#define HDR_L_FRAME_END_MASK (0x1 << 2)
+#define HDR_L_FRAME_END_SHIFT 2U
+
+#define MI_RT_BUS_BUSERR
+#define MI_RT_BUS_BUSERR_MASK (0x1 << 1)
+#define MI_RT_BUS_BUSERR_SHIFT 1U
+
+#define MI_RT_BUS_TIMEO
+#define MI_RT_BUS_TIMEO_MASK (0x1 << 0)
+#define MI_RT_BUS_TIMEO_SHIFT 0U
+
+#endif /* _MRV_ALL_REGS_H */

+ 1148 - 0
vvcam/isp/mrv_dec_all_regs.h

@@ -0,0 +1,1148 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+/**
+*-----------------------------------------------------------------------------
+* $HeadURL$
+* $Author$
+* $Rev$
+* $Date$
+*-----------------------------------------------------------------------------
+* @file mrv_dec_all_regs.h
+*
+* <pre>
+*
+* Description:
+*   This header file exports the module register structure and masks.
+*   it should not be included directly by your driver/application, it will be
+*   exported by the <TOP>_regs_io.h header file.
+*
+* </pre>
+*/
+/*****************************************************************************/
+
+#ifndef _MRV_DEC_ALL_REGS_H
+#define _MRV_DEC_ALL_REGS_H
+
+/*! Mrv Dec All Register layout */
+typedef struct {
+	uint32_t _notused_0[(0x24 - 0x00) / 4];
+	uint32_t isp_dec_chipRev;	/*!<(r) */
+	uint32_t isp_dec_chipDate;	/*!<(r) */
+	uint32_t _notused_1[(0x98 - 0x2c) / 4];
+	uint32_t isp_dec_hichipPatchRev;	/*!<(r) */
+	uint32_t _notused_2[(0xA8 - 0x9c) / 4];
+	uint32_t isp_dec_productId;	/*!<(r) */
+
+	uint32_t _notused_3[(0x800 - 0xAc) / 4];
+	uint32_t isp_dec_ctrl;	/*!<(rw), DEC_BASE + 0x00000000 */
+	uint32_t isp_dec_ctrl_ex;	/*!<(rw), DEC_BASE + 0x00000004 */
+	uint32_t isp_dec_ctrl_ex2;	/*!<(rw), DEC_BASE + 0x00000008 */
+	uint32_t isp_dec_intr_enbl;	/*!<(rw), DEC_BASE + 0x0000000C */
+	uint32_t isp_dec_intr_enbl_ex;	/*!<(rw), DEC_BASE + 0x00000010 */
+	uint32_t isp_dec_intr_enbl_ex2;	/*!<(rw), DEC_BASE + 0x00000014 */
+	uint32_t isp_dec_intr_acknowledge;	/*!<(ro), DEC_BASE + 0x00000018 */
+	uint32_t isp_dec_intr_acknowledge_ex;	/*!<(ro), DEC_BASE + 0x0000001C */
+	uint32_t isp_dec_intr_acknowledge_ex2;	/*!<(ro), DEC_BASE + 0x00000020 */
+	uint32_t isp_dec_tile_status_debug;	/*!<(ro), DEC_BASE + 0x00000024 */
+	uint32_t isp_dec_encoder_debug;	/*!<(ro), DEC_BASE + 0x00000028 */
+	uint32_t isp_dec_decoder_debug;	/*!<(ro), DEC_BASE + 0x0000002C */
+	uint32_t isp_dec_total_reads_in;	/*!<(ro), DEC_BASE + 0x00000030 */
+	uint32_t isp_dec_total_writes_in;	/*!<(ro), DEC_BASE + 0x00000034 */
+	uint32_t isp_dec_total_read_bursts_in;	/*!<(ro), DEC_BASE + 0x00000038 */
+	uint32_t isp_dec_total_write_bursts_in;	/*!<(ro), DEC_BASE + 0x0000003C */
+	uint32_t isp_dec_total_read_reqs_in;	/*!<(ro), DEC_BASE + 0x00000040 */
+	uint32_t isp_dec_total_write_reqs_in;	/*!<(ro), DEC_BASE + 0x00000044 */
+	uint32_t isp_dec_total_read_lasts_in;	/*!<(ro), DEC_BASE + 0x00000048 */
+	uint32_t isp_dec_total_write_lasts_in;	/*!<(ro), DEC_BASE + 0x0000004C */
+	uint32_t isp_dec_total_write_response_in;	/*!<(ro), DEC_BASE + 0x00000050 */
+	uint32_t isp_dec_total_reads_out;	/*!<(ro), DEC_BASE + 0x00000054 */
+	uint32_t isp_dec_total_writes_out;	/*!<(ro), DEC_BASE + 0x00000058 */
+	uint32_t isp_dec_total_read_bursts_out;	/*!<(ro), DEC_BASE + 0x0000005C */
+	uint32_t isp_dec_total_write_bursts_out;	/*!<(ro), DEC_BASE + 0x00000060 */
+	uint32_t isp_dec_total_read_reqs_out;	/*!<(ro), DEC_BASE + 0x00000064 */
+	uint32_t isp_dec_total_write_reqs_out;	/*!<(ro), DEC_BASE + 0x00000068 */
+	uint32_t isp_dec_total_read_lasts_out;	/*!<(ro), DEC_BASE + 0x0000006C */
+	uint32_t isp_dec_total_write_lasts_out;	/*!<(ro), DEC_BASE + 0x00000070 */
+	uint32_t isp_dec_total_write_response_out;	/*!<(ro), DEC_BASE + 0x00000074 */
+	uint32_t isp_dec_status;	/*!<(ro), DEC_BASE + 0x00000078 */
+	uint32_t isp_dec_debug_info_select;	/*!<(rw), DEC_BASE + 0x0000007C */
+	uint32_t isp_dec_read_config_0;	/*!<(rw), DEC_BASE + 0x00000080 */
+	uint32_t isp_dec_read_config_1;	/*!<(rw), DEC_BASE + 0x00000084 */
+	uint32_t isp_dec_read_config_2;	/*!<(rw), DEC_BASE + 0x00000088 */
+	uint32_t isp_dec_read_config_3;	/*!<(rw), DEC_BASE + 0x0000008C */
+	uint32_t isp_dec_read_config_4;	/*!<(rw), DEC_BASE + 0x00000090 */
+	uint32_t isp_dec_read_config_5;	/*!<(rw), DEC_BASE + 0x00000094 */
+	uint32_t isp_dec_read_config_6;	/*!<(rw), DEC_BASE + 0x00000098 */
+	uint32_t isp_dec_read_config_7;	/*!<(rw), DEC_BASE + 0x0000009C */
+	uint32_t isp_dec_read_config_8;	/*!<(rw), DEC_BASE + 0x000000A0 */
+	uint32_t isp_dec_read_config_9;	/*!<(rw), DEC_BASE + 0x000000A4 */
+	uint32_t isp_dec_read_config_10;	/*!<(rw), DEC_BASE + 0x000000A8 */
+	uint32_t isp_dec_read_config_11;	/*!<(rw), DEC_BASE + 0x000000AC */
+	uint32_t isp_dec_read_config_12;	/*!<(rw), DEC_BASE + 0x000000B0 */
+	uint32_t isp_dec_read_config_13;	/*!<(rw), DEC_BASE + 0x000000B4 */
+	uint32_t isp_dec_read_config_14;	/*!<(rw), DEC_BASE + 0x000000B8 */
+	uint32_t isp_dec_read_config_15;	/*!<(rw), DEC_BASE + 0x000000BC */
+	uint32_t isp_dec_read_config_16;	/*!<(rw), DEC_BASE + 0x000000C0 */
+	uint32_t isp_dec_read_config_17;	/*!<(rw), DEC_BASE + 0x000000C4 */
+	uint32_t isp_dec_read_config_18;	/*!<(rw), DEC_BASE + 0x000000C8 */
+	uint32_t isp_dec_read_config_19;	/*!<(rw), DEC_BASE + 0x000000CC */
+	uint32_t isp_dec_read_config_20;	/*!<(rw), DEC_BASE + 0x000000D0 */
+	uint32_t isp_dec_read_config_21;	/*!<(rw), DEC_BASE + 0x000000D4 */
+	uint32_t isp_dec_read_config_22;	/*!<(rw), DEC_BASE + 0x000000D8 */
+	uint32_t isp_dec_read_config_23;	/*!<(rw), DEC_BASE + 0x000000DC */
+	uint32_t isp_dec_read_config_24;	/*!<(rw), DEC_BASE + 0x000000E0 */
+	uint32_t isp_dec_read_config_25;	/*!<(rw), DEC_BASE + 0x000000E4 */
+	uint32_t isp_dec_read_config_26;	/*!<(rw), DEC_BASE + 0x000000E8 */
+	uint32_t isp_dec_read_config_27;	/*!<(rw), DEC_BASE + 0x000000EC */
+	uint32_t isp_dec_read_config_28;	/*!<(rw), DEC_BASE + 0x000000F0 */
+	uint32_t isp_dec_read_config_29;	/*!<(rw), DEC_BASE + 0x000000F4 */
+	uint32_t isp_dec_read_config_30;	/*!<(rw), DEC_BASE + 0x000000F8 */
+	uint32_t isp_dec_read_config_31;	/*!<(rw), DEC_BASE + 0x000000FC */
+	uint32_t isp_dec_read_ex_config_0;	/*!<(rw), DEC_BASE + 0x00000100 */
+	uint32_t isp_dec_read_ex_config_1;	/*!<(rw), DEC_BASE + 0x00000104 */
+	uint32_t isp_dec_read_ex_config_2;	/*!<(rw), DEC_BASE + 0x00000108 */
+	uint32_t isp_dec_read_ex_config_3;	/*!<(rw), DEC_BASE + 0x0000010C */
+	uint32_t isp_dec_read_ex_config_4;	/*!<(rw), DEC_BASE + 0x00000110 */
+	uint32_t isp_dec_read_ex_config_5;	/*!<(rw), DEC_BASE + 0x00000114 */
+	uint32_t isp_dec_read_ex_config_6;	/*!<(rw), DEC_BASE + 0x00000118 */
+	uint32_t isp_dec_read_ex_config_7;	/*!<(rw), DEC_BASE + 0x0000011C */
+	uint32_t isp_dec_read_ex_config_8;	/*!<(rw), DEC_BASE + 0x00000120 */
+	uint32_t isp_dec_read_ex_config_9;	/*!<(rw), DEC_BASE + 0x00000124 */
+	uint32_t isp_dec_read_ex_config_10;	/*!<(rw), DEC_BASE + 0x00000128 */
+	uint32_t isp_dec_read_ex_config_11;	/*!<(rw), DEC_BASE + 0x0000012C */
+	uint32_t isp_dec_read_ex_config_12;	/*!<(rw), DEC_BASE + 0x00000130 */
+	uint32_t isp_dec_read_ex_config_13;	/*!<(rw), DEC_BASE + 0x00000134 */
+	uint32_t isp_dec_read_ex_config_14;	/*!<(rw), DEC_BASE + 0x00000138 */
+	uint32_t isp_dec_read_ex_config_15;	/*!<(rw), DEC_BASE + 0x0000013C */
+	uint32_t isp_dec_read_ex_config_16;	/*!<(rw), DEC_BASE + 0x00000140 */
+	uint32_t isp_dec_read_ex_config_17;	/*!<(rw), DEC_BASE + 0x00000144 */
+	uint32_t isp_dec_read_ex_config_18;	/*!<(rw), DEC_BASE + 0x00000148 */
+	uint32_t isp_dec_read_ex_config_19;	/*!<(rw), DEC_BASE + 0x0000014C */
+	uint32_t isp_dec_read_ex_config_20;	/*!<(rw), DEC_BASE + 0x00000150 */
+	uint32_t isp_dec_read_ex_config_21;	/*!<(rw), DEC_BASE + 0x00000154 */
+	uint32_t isp_dec_read_ex_config_22;	/*!<(rw), DEC_BASE + 0x00000158 */
+	uint32_t isp_dec_read_ex_config_23;	/*!<(rw), DEC_BASE + 0x0000015C */
+	uint32_t isp_dec_read_ex_config_24;	/*!<(rw), DEC_BASE + 0x00000160 */
+	uint32_t isp_dec_read_ex_config_25;	/*!<(rw), DEC_BASE + 0x00000164 */
+	uint32_t isp_dec_read_ex_config_26;	/*!<(rw), DEC_BASE + 0x00000168 */
+	uint32_t isp_dec_read_ex_config_27;	/*!<(rw), DEC_BASE + 0x0000016C */
+	uint32_t isp_dec_read_ex_config_28;	/*!<(rw), DEC_BASE + 0x00000170 */
+	uint32_t isp_dec_read_ex_config_29;	/*!<(rw), DEC_BASE + 0x00000174 */
+	uint32_t isp_dec_read_ex_config_30;	/*!<(rw), DEC_BASE + 0x00000178 */
+	uint32_t isp_dec_read_ex_config_31;	/*!<(rw), DEC_BASE + 0x0000017C */
+	uint32_t isp_dec_write_config_0;	/*!<(rw), DEC_BASE + 0x00000180 */
+	uint32_t isp_dec_write_config_1;	/*!<(rw), DEC_BASE + 0x00000184 */
+	uint32_t isp_dec_write_config_2;	/*!<(rw), DEC_BASE + 0x00000188 */
+	uint32_t isp_dec_write_config_3;	/*!<(rw), DEC_BASE + 0x0000018C */
+	uint32_t isp_dec_write_config_4;	/*!<(rw), DEC_BASE + 0x00000190 */
+	uint32_t isp_dec_write_config_5;	/*!<(rw), DEC_BASE + 0x00000194 */
+	uint32_t isp_dec_write_config_6;	/*!<(rw), DEC_BASE + 0x00000198 */
+	uint32_t isp_dec_write_config_7;	/*!<(rw), DEC_BASE + 0x0000019C */
+	uint32_t isp_dec_write_config_8;	/*!<(rw), DEC_BASE + 0x000001A0 */
+	uint32_t isp_dec_write_config_9;	/*!<(rw), DEC_BASE + 0x000001A4 */
+	uint32_t isp_dec_write_config_10;	/*!<(rw), DEC_BASE + 0x000001A8 */
+	uint32_t isp_dec_write_config_11;	/*!<(rw), DEC_BASE + 0x000001AC */
+	uint32_t isp_dec_write_config_12;	/*!<(rw), DEC_BASE + 0x000001B0 */
+	uint32_t isp_dec_write_config_13;	/*!<(rw), DEC_BASE + 0x000001B4 */
+	uint32_t isp_dec_write_config_14;	/*!<(rw), DEC_BASE + 0x000001B8 */
+	uint32_t isp_dec_write_config_15;	/*!<(rw), DEC_BASE + 0x000001BC */
+	uint32_t isp_dec_write_config_16;	/*!<(rw), DEC_BASE + 0x000001C0 */
+	uint32_t isp_dec_write_config_17;	/*!<(rw), DEC_BASE + 0x000001C4 */
+	uint32_t isp_dec_write_config_18;	/*!<(rw), DEC_BASE + 0x000001C8 */
+	uint32_t isp_dec_write_config_19;	/*!<(rw), DEC_BASE + 0x000001CC */
+	uint32_t isp_dec_write_config_20;	/*!<(rw), DEC_BASE + 0x000001D0 */
+	uint32_t isp_dec_write_config_21;	/*!<(rw), DEC_BASE + 0x000001D4 */
+	uint32_t isp_dec_write_config_22;	/*!<(rw), DEC_BASE + 0x000001D8 */
+	uint32_t isp_dec_write_config_23;	/*!<(rw), DEC_BASE + 0x000001DC */
+	uint32_t isp_dec_write_config_24;	/*!<(rw), DEC_BASE + 0x000001E0 */
+	uint32_t isp_dec_write_config_25;	/*!<(rw), DEC_BASE + 0x000001E4 */
+	uint32_t isp_dec_write_config_26;	/*!<(rw), DEC_BASE + 0x000001E8 */
+	uint32_t isp_dec_write_config_27;	/*!<(rw), DEC_BASE + 0x000001EC */
+	uint32_t isp_dec_write_config_28;	/*!<(rw), DEC_BASE + 0x000001F0 */
+	uint32_t isp_dec_write_config_29;	/*!<(rw), DEC_BASE + 0x000001F4 */
+	uint32_t isp_dec_write_config_30;	/*!<(rw), DEC_BASE + 0x000001F8 */
+	uint32_t isp_dec_write_config_31;	/*!<(rw), DEC_BASE + 0x000001FC */
+	uint32_t isp_dec_write_ex_config_0;	/*!<(rw), DEC_BASE + 0x00000200 */
+	uint32_t isp_dec_write_ex_config_1;	/*!<(rw), DEC_BASE + 0x00000204 */
+	uint32_t isp_dec_write_ex_config_2;	/*!<(rw), DEC_BASE + 0x00000208 */
+	uint32_t isp_dec_write_ex_config_3;	/*!<(rw), DEC_BASE + 0x0000020C */
+	uint32_t isp_dec_write_ex_config_4;	/*!<(rw), DEC_BASE + 0x00000210 */
+	uint32_t isp_dec_write_ex_config_5;	/*!<(rw), DEC_BASE + 0x00000214 */
+	uint32_t isp_dec_write_ex_config_6;	/*!<(rw), DEC_BASE + 0x00000218 */
+	uint32_t isp_dec_write_ex_config_7;	/*!<(rw), DEC_BASE + 0x0000021C */
+	uint32_t isp_dec_write_ex_config_8;	/*!<(rw), DEC_BASE + 0x00000220 */
+	uint32_t isp_dec_write_ex_config_9;	/*!<(rw), DEC_BASE + 0x00000224 */
+	uint32_t isp_dec_write_ex_config_10;	/*!<(rw), DEC_BASE + 0x00000228 */
+	uint32_t isp_dec_write_ex_config_11;	/*!<(rw), DEC_BASE + 0x0000022C */
+	uint32_t isp_dec_write_ex_config_12;	/*!<(rw), DEC_BASE + 0x00000230 */
+	uint32_t isp_dec_write_ex_config_13;	/*!<(rw), DEC_BASE + 0x00000234 */
+	uint32_t isp_dec_write_ex_config_14;	/*!<(rw), DEC_BASE + 0x00000238 */
+	uint32_t isp_dec_write_ex_config_15;	/*!<(rw), DEC_BASE + 0x0000023C */
+	uint32_t isp_dec_write_ex_config_16;	/*!<(rw), DEC_BASE + 0x00000240 */
+	uint32_t isp_dec_write_ex_config_17;	/*!<(rw), DEC_BASE + 0x00000244 */
+	uint32_t isp_dec_write_ex_config_18;	/*!<(rw), DEC_BASE + 0x00000248 */
+	uint32_t isp_dec_write_ex_config_19;	/*!<(rw), DEC_BASE + 0x0000024C */
+	uint32_t isp_dec_write_ex_config_20;	/*!<(rw), DEC_BASE + 0x00000250 */
+	uint32_t isp_dec_write_ex_config_21;	/*!<(rw), DEC_BASE + 0x00000254 */
+	uint32_t isp_dec_write_ex_config_22;	/*!<(rw), DEC_BASE + 0x00000258 */
+	uint32_t isp_dec_write_ex_config_23;	/*!<(rw), DEC_BASE + 0x0000025C */
+	uint32_t isp_dec_write_ex_config_24;	/*!<(rw), DEC_BASE + 0x00000260 */
+	uint32_t isp_dec_write_ex_config_25;	/*!<(rw), DEC_BASE + 0x00000264 */
+	uint32_t isp_dec_write_ex_config_26;	/*!<(rw), DEC_BASE + 0x00000268 */
+	uint32_t isp_dec_write_ex_config_27;	/*!<(rw), DEC_BASE + 0x0000026C */
+	uint32_t isp_dec_write_ex_config_28;	/*!<(rw), DEC_BASE + 0x00000270 */
+	uint32_t isp_dec_write_ex_config_29;	/*!<(rw), DEC_BASE + 0x00000274 */
+	uint32_t isp_dec_write_ex_config_30;	/*!<(rw), DEC_BASE + 0x00000278 */
+	uint32_t isp_dec_write_ex_config_31;	/*!<(rw), DEC_BASE + 0x0000027C */
+	uint32_t isp_dec_read_buffer_base_0;	/*!<(rw), DEC_BASE + 0x00000280 */
+	uint32_t isp_dec_read_buffer_base_1;	/*!<(rw), DEC_BASE + 0x00000284 */
+	uint32_t isp_dec_read_buffer_base_2;	/*!<(rw), DEC_BASE + 0x00000288 */
+	uint32_t isp_dec_read_buffer_base_3;	/*!<(rw), DEC_BASE + 0x0000028C */
+	uint32_t isp_dec_read_buffer_base_4;	/*!<(rw), DEC_BASE + 0x00000290 */
+	uint32_t isp_dec_read_buffer_base_5;	/*!<(rw), DEC_BASE + 0x00000294 */
+	uint32_t isp_dec_read_buffer_base_6;	/*!<(rw), DEC_BASE + 0x00000298 */
+	uint32_t isp_dec_read_buffer_base_7;	/*!<(rw), DEC_BASE + 0x0000029C */
+	uint32_t isp_dec_read_buffer_base_8;	/*!<(rw), DEC_BASE + 0x000002A0 */
+	uint32_t isp_dec_read_buffer_base_9;	/*!<(rw), DEC_BASE + 0x000002A4 */
+	uint32_t isp_dec_read_buffer_base_10;	/*!<(rw), DEC_BASE + 0x000002A8 */
+	uint32_t isp_dec_read_buffer_base_11;	/*!<(rw), DEC_BASE + 0x000002AC */
+	uint32_t isp_dec_read_buffer_base_12;	/*!<(rw), DEC_BASE + 0x000002B0 */
+	uint32_t isp_dec_read_buffer_base_13;	/*!<(rw), DEC_BASE + 0x000002B4 */
+	uint32_t isp_dec_read_buffer_base_14;	/*!<(rw), DEC_BASE + 0x000002B8 */
+	uint32_t isp_dec_read_buffer_base_15;	/*!<(rw), DEC_BASE + 0x000002BC */
+	uint32_t isp_dec_read_buffer_base_16;	/*!<(rw), DEC_BASE + 0x000002C0 */
+	uint32_t isp_dec_read_buffer_base_17;	/*!<(rw), DEC_BASE + 0x000002C4 */
+	uint32_t isp_dec_read_buffer_base_18;	/*!<(rw), DEC_BASE + 0x000002C8 */
+	uint32_t isp_dec_read_buffer_base_19;	/*!<(rw), DEC_BASE + 0x000002CC */
+	uint32_t isp_dec_read_buffer_base_20;	/*!<(rw), DEC_BASE + 0x000002D0 */
+	uint32_t isp_dec_read_buffer_base_21;	/*!<(rw), DEC_BASE + 0x000002D4 */
+	uint32_t isp_dec_read_buffer_base_22;	/*!<(rw), DEC_BASE + 0x000002D8 */
+	uint32_t isp_dec_read_buffer_base_23;	/*!<(rw), DEC_BASE + 0x000002DC */
+	uint32_t isp_dec_read_buffer_base_24;	/*!<(rw), DEC_BASE + 0x000002E0 */
+	uint32_t isp_dec_read_buffer_base_25;	/*!<(rw), DEC_BASE + 0x000002E4 */
+	uint32_t isp_dec_read_buffer_base_26;	/*!<(rw), DEC_BASE + 0x000002E8 */
+	uint32_t isp_dec_read_buffer_base_27;	/*!<(rw), DEC_BASE + 0x000002EC */
+	uint32_t isp_dec_read_buffer_base_28;	/*!<(rw), DEC_BASE + 0x000002F0 */
+	uint32_t isp_dec_read_buffer_base_29;	/*!<(rw), DEC_BASE + 0x000002F4 */
+	uint32_t isp_dec_read_buffer_base_30;	/*!<(rw), DEC_BASE + 0x000002F8 */
+	uint32_t isp_dec_read_buffer_base_31;	/*!<(rw), DEC_BASE + 0x000002FC */
+	uint32_t isp_dec_read_buffer_base_ex_0;	/*!<(rw), DEC_BASE + 0x00000300 */
+	uint32_t isp_dec_read_buffer_base_ex_1;	/*!<(rw), DEC_BASE + 0x00000304 */
+	uint32_t isp_dec_read_buffer_base_ex_2;	/*!<(rw), DEC_BASE + 0x00000308 */
+	uint32_t isp_dec_read_buffer_base_ex_3;	/*!<(rw), DEC_BASE + 0x0000030C */
+	uint32_t isp_dec_read_buffer_base_ex_4;	/*!<(rw), DEC_BASE + 0x00000310 */
+	uint32_t isp_dec_read_buffer_base_ex_5;	/*!<(rw), DEC_BASE + 0x00000314 */
+	uint32_t isp_dec_read_buffer_base_ex_6;	/*!<(rw), DEC_BASE + 0x00000318 */
+	uint32_t isp_dec_read_buffer_base_ex_7;	/*!<(rw), DEC_BASE + 0x0000031C */
+	uint32_t isp_dec_read_buffer_base_ex_8;	/*!<(rw), DEC_BASE + 0x00000320 */
+	uint32_t isp_dec_read_buffer_base_ex_9;	/*!<(rw), DEC_BASE + 0x00000324 */
+	uint32_t isp_dec_read_buffer_base_ex_10;	/*!<(rw), DEC_BASE + 0x00000328 */
+	uint32_t isp_dec_read_buffer_base_ex_11;	/*!<(rw), DEC_BASE + 0x0000032C */
+	uint32_t isp_dec_read_buffer_base_ex_12;	/*!<(rw), DEC_BASE + 0x00000330 */
+	uint32_t isp_dec_read_buffer_base_ex_13;	/*!<(rw), DEC_BASE + 0x00000334 */
+	uint32_t isp_dec_read_buffer_base_ex_14;	/*!<(rw), DEC_BASE + 0x00000338 */
+	uint32_t isp_dec_read_buffer_base_ex_15;	/*!<(rw), DEC_BASE + 0x0000033C */
+	uint32_t isp_dec_read_buffer_base_ex_16;	/*!<(rw), DEC_BASE + 0x00000340 */
+	uint32_t isp_dec_read_buffer_base_ex_17;	/*!<(rw), DEC_BASE + 0x00000344 */
+	uint32_t isp_dec_read_buffer_base_ex_18;	/*!<(rw), DEC_BASE + 0x00000348 */
+	uint32_t isp_dec_read_buffer_base_ex_19;	/*!<(rw), DEC_BASE + 0x0000034C */
+	uint32_t isp_dec_read_buffer_base_ex_20;	/*!<(rw), DEC_BASE + 0x00000350 */
+	uint32_t isp_dec_read_buffer_base_ex_21;	/*!<(rw), DEC_BASE + 0x00000354 */
+	uint32_t isp_dec_read_buffer_base_ex_22;	/*!<(rw), DEC_BASE + 0x00000358 */
+	uint32_t isp_dec_read_buffer_base_ex_23;	/*!<(rw), DEC_BASE + 0x0000035C */
+	uint32_t isp_dec_read_buffer_base_ex_24;	/*!<(rw), DEC_BASE + 0x00000360 */
+	uint32_t isp_dec_read_buffer_base_ex_25;	/*!<(rw), DEC_BASE + 0x00000364 */
+	uint32_t isp_dec_read_buffer_base_ex_26;	/*!<(rw), DEC_BASE + 0x00000368 */
+	uint32_t isp_dec_read_buffer_base_ex_27;	/*!<(rw), DEC_BASE + 0x0000036C */
+	uint32_t isp_dec_read_buffer_base_ex_28;	/*!<(rw), DEC_BASE + 0x00000370 */
+	uint32_t isp_dec_read_buffer_base_ex_29;	/*!<(rw), DEC_BASE + 0x00000374 */
+	uint32_t isp_dec_read_buffer_base_ex_30;	/*!<(rw), DEC_BASE + 0x00000378 */
+	uint32_t isp_dec_read_buffer_base_ex_31;	/*!<(rw), DEC_BASE + 0x0000037C */
+	uint32_t isp_dec_read_buffer_end_0;	/*!<(rw), DEC_BASE + 0x00000380 */
+	uint32_t isp_dec_read_buffer_end_1;	/*!<(rw), DEC_BASE + 0x00000384 */
+	uint32_t isp_dec_read_buffer_end_2;	/*!<(rw), DEC_BASE + 0x00000388 */
+	uint32_t isp_dec_read_buffer_end_3;	/*!<(rw), DEC_BASE + 0x0000038C */
+	uint32_t isp_dec_read_buffer_end_4;	/*!<(rw), DEC_BASE + 0x00000390 */
+	uint32_t isp_dec_read_buffer_end_5;	/*!<(rw), DEC_BASE + 0x00000394 */
+	uint32_t isp_dec_read_buffer_end_6;	/*!<(rw), DEC_BASE + 0x00000398 */
+	uint32_t isp_dec_read_buffer_end_7;	/*!<(rw), DEC_BASE + 0x0000039C */
+	uint32_t isp_dec_read_buffer_end_8;	/*!<(rw), DEC_BASE + 0x000003A0 */
+	uint32_t isp_dec_read_buffer_end_9;	/*!<(rw), DEC_BASE + 0x000003A4 */
+	uint32_t isp_dec_read_buffer_end_10;	/*!<(rw), DEC_BASE + 0x000003A8 */
+	uint32_t isp_dec_read_buffer_end_11;	/*!<(rw), DEC_BASE + 0x000003AC */
+	uint32_t isp_dec_read_buffer_end_12;	/*!<(rw), DEC_BASE + 0x000003B0 */
+	uint32_t isp_dec_read_buffer_end_13;	/*!<(rw), DEC_BASE + 0x000003B4 */
+	uint32_t isp_dec_read_buffer_end_14;	/*!<(rw), DEC_BASE + 0x000003B8 */
+	uint32_t isp_dec_read_buffer_end_15;	/*!<(rw), DEC_BASE + 0x000003BC */
+	uint32_t isp_dec_read_buffer_end_16;	/*!<(rw), DEC_BASE + 0x000003C0 */
+	uint32_t isp_dec_read_buffer_end_17;	/*!<(rw), DEC_BASE + 0x000003C4 */
+	uint32_t isp_dec_read_buffer_end_18;	/*!<(rw), DEC_BASE + 0x000003C8 */
+	uint32_t isp_dec_read_buffer_end_19;	/*!<(rw), DEC_BASE + 0x000003CC */
+	uint32_t isp_dec_read_buffer_end_20;	/*!<(rw), DEC_BASE + 0x000003D0 */
+	uint32_t isp_dec_read_buffer_end_21;	/*!<(rw), DEC_BASE + 0x000003D4 */
+	uint32_t isp_dec_read_buffer_end_22;	/*!<(rw), DEC_BASE + 0x000003D8 */
+	uint32_t isp_dec_read_buffer_end_23;	/*!<(rw), DEC_BASE + 0x000003DC */
+	uint32_t isp_dec_read_buffer_end_24;	/*!<(rw), DEC_BASE + 0x000003E0 */
+	uint32_t isp_dec_read_buffer_end_25;	/*!<(rw), DEC_BASE + 0x000003E4 */
+	uint32_t isp_dec_read_buffer_end_26;	/*!<(rw), DEC_BASE + 0x000003E8 */
+	uint32_t isp_dec_read_buffer_end_27;	/*!<(rw), DEC_BASE + 0x000003EC */
+	uint32_t isp_dec_read_buffer_end_28;	/*!<(rw), DEC_BASE + 0x000003F0 */
+	uint32_t isp_dec_read_buffer_end_29;	/*!<(rw), DEC_BASE + 0x000003F4 */
+	uint32_t isp_dec_read_buffer_end_30;	/*!<(rw), DEC_BASE + 0x000003F8 */
+	uint32_t isp_dec_read_buffer_end_31;	/*!<(rw), DEC_BASE + 0x000003FC */
+	uint32_t isp_dec_read_buffer_end_ex_0;	/*!<(rw), DEC_BASE + 0x00000400 */
+	uint32_t isp_dec_read_buffer_end_ex_1;	/*!<(rw), DEC_BASE + 0x00000404 */
+	uint32_t isp_dec_read_buffer_end_ex_2;	/*!<(rw), DEC_BASE + 0x00000408 */
+	uint32_t isp_dec_read_buffer_end_ex_3;	/*!<(rw), DEC_BASE + 0x0000040C */
+	uint32_t isp_dec_read_buffer_end_ex_4;	/*!<(rw), DEC_BASE + 0x00000410 */
+	uint32_t isp_dec_read_buffer_end_ex_5;	/*!<(rw), DEC_BASE + 0x00000414 */
+	uint32_t isp_dec_read_buffer_end_ex_6;	/*!<(rw), DEC_BASE + 0x00000418 */
+	uint32_t isp_dec_read_buffer_end_ex_7;	/*!<(rw), DEC_BASE + 0x0000041C */
+	uint32_t isp_dec_read_buffer_end_ex_8;	/*!<(rw), DEC_BASE + 0x00000420 */
+	uint32_t isp_dec_read_buffer_end_ex_9;	/*!<(rw), DEC_BASE + 0x00000424 */
+	uint32_t isp_dec_read_buffer_end_ex_10;	/*!<(rw), DEC_BASE + 0x00000428 */
+	uint32_t isp_dec_read_buffer_end_ex_11;	/*!<(rw), DEC_BASE + 0x0000042C */
+	uint32_t isp_dec_read_buffer_end_ex_12;	/*!<(rw), DEC_BASE + 0x00000430 */
+	uint32_t isp_dec_read_buffer_end_ex_13;	/*!<(rw), DEC_BASE + 0x00000434 */
+	uint32_t isp_dec_read_buffer_end_ex_14;	/*!<(rw), DEC_BASE + 0x00000438 */
+	uint32_t isp_dec_read_buffer_end_ex_15;	/*!<(rw), DEC_BASE + 0x0000043C */
+	uint32_t isp_dec_read_buffer_end_ex_16;	/*!<(rw), DEC_BASE + 0x00000440 */
+	uint32_t isp_dec_read_buffer_end_ex_17;	/*!<(rw), DEC_BASE + 0x00000444 */
+	uint32_t isp_dec_read_buffer_end_ex_18;	/*!<(rw), DEC_BASE + 0x00000448 */
+	uint32_t isp_dec_read_buffer_end_ex_19;	/*!<(rw), DEC_BASE + 0x0000044C */
+	uint32_t isp_dec_read_buffer_end_ex_20;	/*!<(rw), DEC_BASE + 0x00000450 */
+	uint32_t isp_dec_read_buffer_end_ex_21;	/*!<(rw), DEC_BASE + 0x00000454 */
+	uint32_t isp_dec_read_buffer_end_ex_22;	/*!<(rw), DEC_BASE + 0x00000458 */
+	uint32_t isp_dec_read_buffer_end_ex_23;	/*!<(rw), DEC_BASE + 0x0000045C */
+	uint32_t isp_dec_read_buffer_end_ex_24;	/*!<(rw), DEC_BASE + 0x00000460 */
+	uint32_t isp_dec_read_buffer_end_ex_25;	/*!<(rw), DEC_BASE + 0x00000464 */
+	uint32_t isp_dec_read_buffer_end_ex_26;	/*!<(rw), DEC_BASE + 0x00000468 */
+	uint32_t isp_dec_read_buffer_end_ex_27;	/*!<(rw), DEC_BASE + 0x0000046C */
+	uint32_t isp_dec_read_buffer_end_ex_28;	/*!<(rw), DEC_BASE + 0x00000470 */
+	uint32_t isp_dec_read_buffer_end_ex_29;	/*!<(rw), DEC_BASE + 0x00000474 */
+	uint32_t isp_dec_read_buffer_end_ex_30;	/*!<(rw), DEC_BASE + 0x00000478 */
+	uint32_t isp_dec_read_buffer_end_ex_31;	/*!<(rw), DEC_BASE + 0x0000047C */
+	uint32_t isp_dec_read_flush_cache_0;	/*!<(rw), DEC_BASE + 0x00000480 */
+	uint32_t isp_dec_read_flush_cache_1;	/*!<(rw), DEC_BASE + 0x00000484 */
+	uint32_t isp_dec_read_flush_cache_2;	/*!<(rw), DEC_BASE + 0x00000488 */
+	uint32_t isp_dec_read_flush_cache_3;	/*!<(rw), DEC_BASE + 0x0000048C */
+	uint32_t isp_dec_read_flush_cache_4;	/*!<(rw), DEC_BASE + 0x00000490 */
+	uint32_t isp_dec_read_flush_cache_5;	/*!<(rw), DEC_BASE + 0x00000494 */
+	uint32_t isp_dec_read_flush_cache_6;	/*!<(rw), DEC_BASE + 0x00000498 */
+	uint32_t isp_dec_read_flush_cache_7;	/*!<(rw), DEC_BASE + 0x0000049C */
+	uint32_t isp_dec_read_flush_cache_8;	/*!<(rw), DEC_BASE + 0x000004A0 */
+	uint32_t isp_dec_read_flush_cache_9;	/*!<(rw), DEC_BASE + 0x000004A4 */
+	uint32_t isp_dec_read_flush_cache_10;	/*!<(rw), DEC_BASE + 0x000004A8 */
+	uint32_t isp_dec_read_flush_cache_11;	/*!<(rw), DEC_BASE + 0x000004AC */
+	uint32_t isp_dec_read_flush_cache_12;	/*!<(rw), DEC_BASE + 0x000004B0 */
+	uint32_t isp_dec_read_flush_cache_13;	/*!<(rw), DEC_BASE + 0x000004B4 */
+	uint32_t isp_dec_read_flush_cache_14;	/*!<(rw), DEC_BASE + 0x000004B8 */
+	uint32_t isp_dec_read_flush_cache_15;	/*!<(rw), DEC_BASE + 0x000004BC */
+	uint32_t isp_dec_read_flush_cache_16;	/*!<(rw), DEC_BASE + 0x000004C0 */
+	uint32_t isp_dec_read_flush_cache_17;	/*!<(rw), DEC_BASE + 0x000004C4 */
+	uint32_t isp_dec_read_flush_cache_18;	/*!<(rw), DEC_BASE + 0x000004C8 */
+	uint32_t isp_dec_read_flush_cache_19;	/*!<(rw), DEC_BASE + 0x000004CC */
+	uint32_t isp_dec_read_flush_cache_20;	/*!<(rw), DEC_BASE + 0x000004D0 */
+	uint32_t isp_dec_read_flush_cache_21;	/*!<(rw), DEC_BASE + 0x000004D4 */
+	uint32_t isp_dec_read_flush_cache_22;	/*!<(rw), DEC_BASE + 0x000004D8 */
+	uint32_t isp_dec_read_flush_cache_23;	/*!<(rw), DEC_BASE + 0x000004DC */
+	uint32_t isp_dec_read_flush_cache_24;	/*!<(rw), DEC_BASE + 0x000004E0 */
+	uint32_t isp_dec_read_flush_cache_25;	/*!<(rw), DEC_BASE + 0x000004E4 */
+	uint32_t isp_dec_read_flush_cache_26;	/*!<(rw), DEC_BASE + 0x000004E8 */
+	uint32_t isp_dec_read_flush_cache_27;	/*!<(rw), DEC_BASE + 0x000004EC */
+	uint32_t isp_dec_read_flush_cache_28;	/*!<(rw), DEC_BASE + 0x000004F0 */
+	uint32_t isp_dec_read_flush_cache_29;	/*!<(rw), DEC_BASE + 0x000004F4 */
+	uint32_t isp_dec_read_flush_cache_30;	/*!<(rw), DEC_BASE + 0x000004F8 */
+	uint32_t isp_dec_read_flush_cache_31;	/*!<(rw), DEC_BASE + 0x000004FC */
+	uint32_t isp_dec_read_flush_cache_ex_0;	/*!<(rw), DEC_BASE + 0x00000500 */
+	uint32_t isp_dec_read_flush_cache_ex_1;	/*!<(rw), DEC_BASE + 0x00000504 */
+	uint32_t isp_dec_read_flush_cache_ex_2;	/*!<(rw), DEC_BASE + 0x00000508 */
+	uint32_t isp_dec_read_flush_cache_ex_3;	/*!<(rw), DEC_BASE + 0x0000050C */
+	uint32_t isp_dec_read_flush_cache_ex_4;	/*!<(rw), DEC_BASE + 0x00000510 */
+	uint32_t isp_dec_read_flush_cache_ex_5;	/*!<(rw), DEC_BASE + 0x00000514 */
+	uint32_t isp_dec_read_flush_cache_ex_6;	/*!<(rw), DEC_BASE + 0x00000518 */
+	uint32_t isp_dec_read_flush_cache_ex_7;	/*!<(rw), DEC_BASE + 0x0000051C */
+	uint32_t isp_dec_read_flush_cache_ex_8;	/*!<(rw), DEC_BASE + 0x00000520 */
+	uint32_t isp_dec_read_flush_cache_ex_9;	/*!<(rw), DEC_BASE + 0x00000524 */
+	uint32_t isp_dec_read_flush_cache_ex_10;	/*!<(rw), DEC_BASE + 0x00000528 */
+	uint32_t isp_dec_read_flush_cache_ex_11;	/*!<(rw), DEC_BASE + 0x0000052C */
+	uint32_t isp_dec_read_flush_cache_ex_12;	/*!<(rw), DEC_BASE + 0x00000530 */
+	uint32_t isp_dec_read_flush_cache_ex_13;	/*!<(rw), DEC_BASE + 0x00000534 */
+	uint32_t isp_dec_read_flush_cache_ex_14;	/*!<(rw), DEC_BASE + 0x00000538 */
+	uint32_t isp_dec_read_flush_cache_ex_15;	/*!<(rw), DEC_BASE + 0x0000053C */
+	uint32_t isp_dec_read_flush_cache_ex_16;	/*!<(rw), DEC_BASE + 0x00000540 */
+	uint32_t isp_dec_read_flush_cache_ex_17;	/*!<(rw), DEC_BASE + 0x00000544 */
+	uint32_t isp_dec_read_flush_cache_ex_18;	/*!<(rw), DEC_BASE + 0x00000548 */
+	uint32_t isp_dec_read_flush_cache_ex_19;	/*!<(rw), DEC_BASE + 0x0000054C */
+	uint32_t isp_dec_read_flush_cache_ex_20;	/*!<(rw), DEC_BASE + 0x00000550 */
+	uint32_t isp_dec_read_flush_cache_ex_21;	/*!<(rw), DEC_BASE + 0x00000554 */
+	uint32_t isp_dec_read_flush_cache_ex_22;	/*!<(rw), DEC_BASE + 0x00000558 */
+	uint32_t isp_dec_read_flush_cache_ex_23;	/*!<(rw), DEC_BASE + 0x0000055C */
+	uint32_t isp_dec_read_flush_cache_ex_24;	/*!<(rw), DEC_BASE + 0x00000560 */
+	uint32_t isp_dec_read_flush_cache_ex_25;	/*!<(rw), DEC_BASE + 0x00000564 */
+	uint32_t isp_dec_read_flush_cache_ex_26;	/*!<(rw), DEC_BASE + 0x00000568 */
+	uint32_t isp_dec_read_flush_cache_ex_27;	/*!<(rw), DEC_BASE + 0x0000056C */
+	uint32_t isp_dec_read_flush_cache_ex_28;	/*!<(rw), DEC_BASE + 0x00000570 */
+	uint32_t isp_dec_read_flush_cache_ex_29;	/*!<(rw), DEC_BASE + 0x00000574 */
+	uint32_t isp_dec_read_flush_cache_ex_30;	/*!<(rw), DEC_BASE + 0x00000578 */
+	uint32_t isp_dec_read_flush_cache_ex_31;	/*!<(rw), DEC_BASE + 0x0000057C */
+	uint32_t isp_dec_write_buffer_base_0;	/*!<(rw), DEC_BASE + 0x00000580 */
+	uint32_t isp_dec_write_buffer_base_1;	/*!<(rw), DEC_BASE + 0x00000584 */
+	uint32_t isp_dec_write_buffer_base_2;	/*!<(rw), DEC_BASE + 0x00000588 */
+	uint32_t isp_dec_write_buffer_base_3;	/*!<(rw), DEC_BASE + 0x0000058C */
+	uint32_t isp_dec_write_buffer_base_4;	/*!<(rw), DEC_BASE + 0x00000590 */
+	uint32_t isp_dec_write_buffer_base_5;	/*!<(rw), DEC_BASE + 0x00000594 */
+	uint32_t isp_dec_write_buffer_base_6;	/*!<(rw), DEC_BASE + 0x00000598 */
+	uint32_t isp_dec_write_buffer_base_7;	/*!<(rw), DEC_BASE + 0x0000059C */
+	uint32_t isp_dec_write_buffer_base_8;	/*!<(rw), DEC_BASE + 0x000005A0 */
+	uint32_t isp_dec_write_buffer_base_9;	/*!<(rw), DEC_BASE + 0x000005A4 */
+	uint32_t isp_dec_write_buffer_base_10;	/*!<(rw), DEC_BASE + 0x000005A8 */
+	uint32_t isp_dec_write_buffer_base_11;	/*!<(rw), DEC_BASE + 0x000005AC */
+	uint32_t isp_dec_write_buffer_base_12;	/*!<(rw), DEC_BASE + 0x000005B0 */
+	uint32_t isp_dec_write_buffer_base_13;	/*!<(rw), DEC_BASE + 0x000005B4 */
+	uint32_t isp_dec_write_buffer_base_14;	/*!<(rw), DEC_BASE + 0x000005B8 */
+	uint32_t isp_dec_write_buffer_base_15;	/*!<(rw), DEC_BASE + 0x000005BC */
+	uint32_t isp_dec_write_buffer_base_16;	/*!<(rw), DEC_BASE + 0x000005C0 */
+	uint32_t isp_dec_write_buffer_base_17;	/*!<(rw), DEC_BASE + 0x000005C4 */
+	uint32_t isp_dec_write_buffer_base_18;	/*!<(rw), DEC_BASE + 0x000005C8 */
+	uint32_t isp_dec_write_buffer_base_19;	/*!<(rw), DEC_BASE + 0x000005CC */
+	uint32_t isp_dec_write_buffer_base_20;	/*!<(rw), DEC_BASE + 0x000005D0 */
+	uint32_t isp_dec_write_buffer_base_21;	/*!<(rw), DEC_BASE + 0x000005D4 */
+	uint32_t isp_dec_write_buffer_base_22;	/*!<(rw), DEC_BASE + 0x000005D8 */
+	uint32_t isp_dec_write_buffer_base_23;	/*!<(rw), DEC_BASE + 0x000005DC */
+	uint32_t isp_dec_write_buffer_base_24;	/*!<(rw), DEC_BASE + 0x000005E0 */
+	uint32_t isp_dec_write_buffer_base_25;	/*!<(rw), DEC_BASE + 0x000005E4 */
+	uint32_t isp_dec_write_buffer_base_26;	/*!<(rw), DEC_BASE + 0x000005E8 */
+	uint32_t isp_dec_write_buffer_base_27;	/*!<(rw), DEC_BASE + 0x000005EC */
+	uint32_t isp_dec_write_buffer_base_28;	/*!<(rw), DEC_BASE + 0x000005F0 */
+	uint32_t isp_dec_write_buffer_base_29;	/*!<(rw), DEC_BASE + 0x000005F4 */
+	uint32_t isp_dec_write_buffer_base_30;	/*!<(rw), DEC_BASE + 0x000005F8 */
+	uint32_t isp_dec_write_buffer_base_31;	/*!<(rw), DEC_BASE + 0x000005FC */
+	uint32_t isp_dec_write_buffer_base_ex_0;	/*!<(rw), DEC_BASE + 0x00000600 */
+	uint32_t isp_dec_write_buffer_base_ex_1;	/*!<(rw), DEC_BASE + 0x00000604 */
+	uint32_t isp_dec_write_buffer_base_ex_2;	/*!<(rw), DEC_BASE + 0x00000608 */
+	uint32_t isp_dec_write_buffer_base_ex_3;	/*!<(rw), DEC_BASE + 0x0000060C */
+	uint32_t isp_dec_write_buffer_base_ex_4;	/*!<(rw), DEC_BASE + 0x00000610 */
+	uint32_t isp_dec_write_buffer_base_ex_5;	/*!<(rw), DEC_BASE + 0x00000614 */
+	uint32_t isp_dec_write_buffer_base_ex_6;	/*!<(rw), DEC_BASE + 0x00000618 */
+	uint32_t isp_dec_write_buffer_base_ex_7;	/*!<(rw), DEC_BASE + 0x0000061C */
+	uint32_t isp_dec_write_buffer_base_ex_8;	/*!<(rw), DEC_BASE + 0x00000620 */
+	uint32_t isp_dec_write_buffer_base_ex_9;	/*!<(rw), DEC_BASE + 0x00000624 */
+	uint32_t isp_dec_write_buffer_base_ex_10;	/*!<(rw), DEC_BASE + 0x00000628 */
+	uint32_t isp_dec_write_buffer_base_ex_11;	/*!<(rw), DEC_BASE + 0x0000062C */
+	uint32_t isp_dec_write_buffer_base_ex_12;	/*!<(rw), DEC_BASE + 0x00000630 */
+	uint32_t isp_dec_write_buffer_base_ex_13;	/*!<(rw), DEC_BASE + 0x00000634 */
+	uint32_t isp_dec_write_buffer_base_ex_14;	/*!<(rw), DEC_BASE + 0x00000638 */
+	uint32_t isp_dec_write_buffer_base_ex_15;	/*!<(rw), DEC_BASE + 0x0000063C */
+	uint32_t isp_dec_write_buffer_base_ex_16;	/*!<(rw), DEC_BASE + 0x00000640 */
+	uint32_t isp_dec_write_buffer_base_ex_17;	/*!<(rw), DEC_BASE + 0x00000644 */
+	uint32_t isp_dec_write_buffer_base_ex_18;	/*!<(rw), DEC_BASE + 0x00000648 */
+	uint32_t isp_dec_write_buffer_base_ex_19;	/*!<(rw), DEC_BASE + 0x0000064C */
+	uint32_t isp_dec_write_buffer_base_ex_20;	/*!<(rw), DEC_BASE + 0x00000650 */
+	uint32_t isp_dec_write_buffer_base_ex_21;	/*!<(rw), DEC_BASE + 0x00000654 */
+	uint32_t isp_dec_write_buffer_base_ex_22;	/*!<(rw), DEC_BASE + 0x00000658 */
+	uint32_t isp_dec_write_buffer_base_ex_23;	/*!<(rw), DEC_BASE + 0x0000065C */
+	uint32_t isp_dec_write_buffer_base_ex_24;	/*!<(rw), DEC_BASE + 0x00000660 */
+	uint32_t isp_dec_write_buffer_base_ex_25;	/*!<(rw), DEC_BASE + 0x00000664 */
+	uint32_t isp_dec_write_buffer_base_ex_26;	/*!<(rw), DEC_BASE + 0x00000668 */
+	uint32_t isp_dec_write_buffer_base_ex_27;	/*!<(rw), DEC_BASE + 0x0000066C */
+	uint32_t isp_dec_write_buffer_base_ex_28;	/*!<(rw), DEC_BASE + 0x00000670 */
+	uint32_t isp_dec_write_buffer_base_ex_29;	/*!<(rw), DEC_BASE + 0x00000674 */
+	uint32_t isp_dec_write_buffer_base_ex_30;	/*!<(rw), DEC_BASE + 0x00000678 */
+	uint32_t isp_dec_write_buffer_base_ex_31;	/*!<(rw), DEC_BASE + 0x0000067C */
+	uint32_t isp_dec_write_buffer_end_0;	/*!<(rw), DEC_BASE + 0x00000680 */
+	uint32_t isp_dec_write_buffer_end_1;	/*!<(rw), DEC_BASE + 0x00000684 */
+	uint32_t isp_dec_write_buffer_end_2;	/*!<(rw), DEC_BASE + 0x00000688 */
+	uint32_t isp_dec_write_buffer_end_3;	/*!<(rw), DEC_BASE + 0x0000068C */
+	uint32_t isp_dec_write_buffer_end_4;	/*!<(rw), DEC_BASE + 0x00000690 */
+	uint32_t isp_dec_write_buffer_end_5;	/*!<(rw), DEC_BASE + 0x00000694 */
+	uint32_t isp_dec_write_buffer_end_6;	/*!<(rw), DEC_BASE + 0x00000698 */
+	uint32_t isp_dec_write_buffer_end_7;	/*!<(rw), DEC_BASE + 0x0000069C */
+	uint32_t isp_dec_write_buffer_end_8;	/*!<(rw), DEC_BASE + 0x000006A0 */
+	uint32_t isp_dec_write_buffer_end_9;	/*!<(rw), DEC_BASE + 0x000006A4 */
+	uint32_t isp_dec_write_buffer_end_10;	/*!<(rw), DEC_BASE + 0x000006A8 */
+	uint32_t isp_dec_write_buffer_end_11;	/*!<(rw), DEC_BASE + 0x000006AC */
+	uint32_t isp_dec_write_buffer_end_12;	/*!<(rw), DEC_BASE + 0x000006B0 */
+	uint32_t isp_dec_write_buffer_end_13;	/*!<(rw), DEC_BASE + 0x000006B4 */
+	uint32_t isp_dec_write_buffer_end_14;	/*!<(rw), DEC_BASE + 0x000006B8 */
+	uint32_t isp_dec_write_buffer_end_15;	/*!<(rw), DEC_BASE + 0x000006BC */
+	uint32_t isp_dec_write_buffer_end_16;	/*!<(rw), DEC_BASE + 0x000006C0 */
+	uint32_t isp_dec_write_buffer_end_17;	/*!<(rw), DEC_BASE + 0x000006C4 */
+	uint32_t isp_dec_write_buffer_end_18;	/*!<(rw), DEC_BASE + 0x000006C8 */
+	uint32_t isp_dec_write_buffer_end_19;	/*!<(rw), DEC_BASE + 0x000006CC */
+	uint32_t isp_dec_write_buffer_end_20;	/*!<(rw), DEC_BASE + 0x000006D0 */
+	uint32_t isp_dec_write_buffer_end_21;	/*!<(rw), DEC_BASE + 0x000006D4 */
+	uint32_t isp_dec_write_buffer_end_22;	/*!<(rw), DEC_BASE + 0x000006D8 */
+	uint32_t isp_dec_write_buffer_end_23;	/*!<(rw), DEC_BASE + 0x000006DC */
+	uint32_t isp_dec_write_buffer_end_24;	/*!<(rw), DEC_BASE + 0x000006E0 */
+	uint32_t isp_dec_write_buffer_end_25;	/*!<(rw), DEC_BASE + 0x000006E4 */
+	uint32_t isp_dec_write_buffer_end_26;	/*!<(rw), DEC_BASE + 0x000006E8 */
+	uint32_t isp_dec_write_buffer_end_27;	/*!<(rw), DEC_BASE + 0x000006EC */
+	uint32_t isp_dec_write_buffer_end_28;	/*!<(rw), DEC_BASE + 0x000006F0 */
+	uint32_t isp_dec_write_buffer_end_29;	/*!<(rw), DEC_BASE + 0x000006F4 */
+	uint32_t isp_dec_write_buffer_end_30;	/*!<(rw), DEC_BASE + 0x000006F8 */
+	uint32_t isp_dec_write_buffer_end_31;	/*!<(rw), DEC_BASE + 0x000006FC */
+	uint32_t isp_dec_write_buffer_end_ex_0;	/*!<(rw), DEC_BASE + 0x00000700 */
+	uint32_t isp_dec_write_buffer_end_ex_1;	/*!<(rw), DEC_BASE + 0x00000704 */
+	uint32_t isp_dec_write_buffer_end_ex_2;	/*!<(rw), DEC_BASE + 0x00000708 */
+	uint32_t isp_dec_write_buffer_end_ex_3;	/*!<(rw), DEC_BASE + 0x0000070C */
+	uint32_t isp_dec_write_buffer_end_ex_4;	/*!<(rw), DEC_BASE + 0x00000710 */
+	uint32_t isp_dec_write_buffer_end_ex_5;	/*!<(rw), DEC_BASE + 0x00000714 */
+	uint32_t isp_dec_write_buffer_end_ex_6;	/*!<(rw), DEC_BASE + 0x00000718 */
+	uint32_t isp_dec_write_buffer_end_ex_7;	/*!<(rw), DEC_BASE + 0x0000071C */
+	uint32_t isp_dec_write_buffer_end_ex_8;	/*!<(rw), DEC_BASE + 0x00000720 */
+	uint32_t isp_dec_write_buffer_end_ex_9;	/*!<(rw), DEC_BASE + 0x00000724 */
+	uint32_t isp_dec_write_buffer_end_ex_10;	/*!<(rw), DEC_BASE + 0x00000728 */
+	uint32_t isp_dec_write_buffer_end_ex_11;	/*!<(rw), DEC_BASE + 0x0000072C */
+	uint32_t isp_dec_write_buffer_end_ex_12;	/*!<(rw), DEC_BASE + 0x00000730 */
+	uint32_t isp_dec_write_buffer_end_ex_13;	/*!<(rw), DEC_BASE + 0x00000734 */
+	uint32_t isp_dec_write_buffer_end_ex_14;	/*!<(rw), DEC_BASE + 0x00000738 */
+	uint32_t isp_dec_write_buffer_end_ex_15;	/*!<(rw), DEC_BASE + 0x0000073C */
+	uint32_t isp_dec_write_buffer_end_ex_16;	/*!<(rw), DEC_BASE + 0x00000740 */
+	uint32_t isp_dec_write_buffer_end_ex_17;	/*!<(rw), DEC_BASE + 0x00000744 */
+	uint32_t isp_dec_write_buffer_end_ex_18;	/*!<(rw), DEC_BASE + 0x00000748 */
+	uint32_t isp_dec_write_buffer_end_ex_19;	/*!<(rw), DEC_BASE + 0x0000074C */
+	uint32_t isp_dec_write_buffer_end_ex_20;	/*!<(rw), DEC_BASE + 0x00000750 */
+	uint32_t isp_dec_write_buffer_end_ex_21;	/*!<(rw), DEC_BASE + 0x00000754 */
+	uint32_t isp_dec_write_buffer_end_ex_22;	/*!<(rw), DEC_BASE + 0x00000758 */
+	uint32_t isp_dec_write_buffer_end_ex_23;	/*!<(rw), DEC_BASE + 0x0000075C */
+	uint32_t isp_dec_write_buffer_end_ex_24;	/*!<(rw), DEC_BASE + 0x00000760 */
+	uint32_t isp_dec_write_buffer_end_ex_25;	/*!<(rw), DEC_BASE + 0x00000764 */
+	uint32_t isp_dec_write_buffer_end_ex_26;	/*!<(rw), DEC_BASE + 0x00000768 */
+	uint32_t isp_dec_write_buffer_end_ex_27;	/*!<(rw), DEC_BASE + 0x0000076C */
+	uint32_t isp_dec_write_buffer_end_ex_28;	/*!<(rw), DEC_BASE + 0x00000770 */
+	uint32_t isp_dec_write_buffer_end_ex_29;	/*!<(rw), DEC_BASE + 0x00000774 */
+	uint32_t isp_dec_write_buffer_end_ex_30;	/*!<(rw), DEC_BASE + 0x00000778 */
+	uint32_t isp_dec_write_buffer_end_ex_31;	/*!<(rw), DEC_BASE + 0x0000077C */
+	uint32_t isp_dec_write_flush_cache_0;	/*!<(rw), DEC_BASE + 0x00000780 */
+	uint32_t isp_dec_write_flush_cache_1;	/*!<(rw), DEC_BASE + 0x00000784 */
+	uint32_t isp_dec_write_flush_cache_2;	/*!<(rw), DEC_BASE + 0x00000788 */
+	uint32_t isp_dec_write_flush_cache_3;	/*!<(rw), DEC_BASE + 0x0000078C */
+	uint32_t isp_dec_write_flush_cache_4;	/*!<(rw), DEC_BASE + 0x00000790 */
+	uint32_t isp_dec_write_flush_cache_5;	/*!<(rw), DEC_BASE + 0x00000794 */
+	uint32_t isp_dec_write_flush_cache_6;	/*!<(rw), DEC_BASE + 0x00000798 */
+	uint32_t isp_dec_write_flush_cache_7;	/*!<(rw), DEC_BASE + 0x0000079C */
+	uint32_t isp_dec_write_flush_cache_8;	/*!<(rw), DEC_BASE + 0x000007A0 */
+	uint32_t isp_dec_write_flush_cache_9;	/*!<(rw), DEC_BASE + 0x000007A4 */
+	uint32_t isp_dec_write_flush_cache_10;	/*!<(rw), DEC_BASE + 0x000007A8 */
+	uint32_t isp_dec_write_flush_cache_11;	/*!<(rw), DEC_BASE + 0x000007AC */
+	uint32_t isp_dec_write_flush_cache_12;	/*!<(rw), DEC_BASE + 0x000007B0 */
+	uint32_t isp_dec_write_flush_cache_13;	/*!<(rw), DEC_BASE + 0x000007B4 */
+	uint32_t isp_dec_write_flush_cache_14;	/*!<(rw), DEC_BASE + 0x000007B8 */
+	uint32_t isp_dec_write_flush_cache_15;	/*!<(rw), DEC_BASE + 0x000007BC */
+	uint32_t isp_dec_write_flush_cache_16;	/*!<(rw), DEC_BASE + 0x000007C0 */
+	uint32_t isp_dec_write_flush_cache_17;	/*!<(rw), DEC_BASE + 0x000007C4 */
+	uint32_t isp_dec_write_flush_cache_18;	/*!<(rw), DEC_BASE + 0x000007C8 */
+	uint32_t isp_dec_write_flush_cache_19;	/*!<(rw), DEC_BASE + 0x000007CC */
+	uint32_t isp_dec_write_flush_cache_20;	/*!<(rw), DEC_BASE + 0x000007D0 */
+	uint32_t isp_dec_write_flush_cache_21;	/*!<(rw), DEC_BASE + 0x000007D4 */
+	uint32_t isp_dec_write_flush_cache_22;	/*!<(rw), DEC_BASE + 0x000007D8 */
+	uint32_t isp_dec_write_flush_cache_23;	/*!<(rw), DEC_BASE + 0x000007DC */
+	uint32_t isp_dec_write_flush_cache_24;	/*!<(rw), DEC_BASE + 0x000007E0 */
+	uint32_t isp_dec_write_flush_cache_25;	/*!<(rw), DEC_BASE + 0x000007E4 */
+	uint32_t isp_dec_write_flush_cache_26;	/*!<(rw), DEC_BASE + 0x000007E8 */
+	uint32_t isp_dec_write_flush_cache_27;	/*!<(rw), DEC_BASE + 0x000007EC */
+	uint32_t isp_dec_write_flush_cache_28;	/*!<(rw), DEC_BASE + 0x000007F0 */
+	uint32_t isp_dec_write_flush_cache_29;	/*!<(rw), DEC_BASE + 0x000007F4 */
+	uint32_t isp_dec_write_flush_cache_30;	/*!<(rw), DEC_BASE + 0x000007F8 */
+	uint32_t isp_dec_write_flush_cache_31;	/*!<(rw), DEC_BASE + 0x000007FC */
+	uint32_t isp_dec_write_flush_cache_ex_0;	/*!<(rw), DEC_BASE + 0x00000800 */
+	uint32_t isp_dec_write_flush_cache_ex_1;	/*!<(rw), DEC_BASE + 0x00000804 */
+	uint32_t isp_dec_write_flush_cache_ex_2;	/*!<(rw), DEC_BASE + 0x00000808 */
+	uint32_t isp_dec_write_flush_cache_ex_3;	/*!<(rw), DEC_BASE + 0x0000080C */
+	uint32_t isp_dec_write_flush_cache_ex_4;	/*!<(rw), DEC_BASE + 0x00000810 */
+	uint32_t isp_dec_write_flush_cache_ex_5;	/*!<(rw), DEC_BASE + 0x00000814 */
+	uint32_t isp_dec_write_flush_cache_ex_6;	/*!<(rw), DEC_BASE + 0x00000818 */
+	uint32_t isp_dec_write_flush_cache_ex_7;	/*!<(rw), DEC_BASE + 0x0000081C */
+	uint32_t isp_dec_write_flush_cache_ex_8;	/*!<(rw), DEC_BASE + 0x00000820 */
+	uint32_t isp_dec_write_flush_cache_ex_9;	/*!<(rw), DEC_BASE + 0x00000824 */
+	uint32_t isp_dec_write_flush_cache_ex_10;	/*!<(rw), DEC_BASE + 0x00000828 */
+	uint32_t isp_dec_write_flush_cache_ex_11;	/*!<(rw), DEC_BASE + 0x0000082C */
+	uint32_t isp_dec_write_flush_cache_ex_12;	/*!<(rw), DEC_BASE + 0x00000830 */
+	uint32_t isp_dec_write_flush_cache_ex_13;	/*!<(rw), DEC_BASE + 0x00000834 */
+	uint32_t isp_dec_write_flush_cache_ex_14;	/*!<(rw), DEC_BASE + 0x00000838 */
+	uint32_t isp_dec_write_flush_cache_ex_15;	/*!<(rw), DEC_BASE + 0x0000083C */
+	uint32_t isp_dec_write_flush_cache_ex_16;	/*!<(rw), DEC_BASE + 0x00000840 */
+	uint32_t isp_dec_write_flush_cache_ex_17;	/*!<(rw), DEC_BASE + 0x00000844 */
+	uint32_t isp_dec_write_flush_cache_ex_18;	/*!<(rw), DEC_BASE + 0x00000848 */
+	uint32_t isp_dec_write_flush_cache_ex_19;	/*!<(rw), DEC_BASE + 0x0000084C */
+	uint32_t isp_dec_write_flush_cache_ex_20;	/*!<(rw), DEC_BASE + 0x00000850 */
+	uint32_t isp_dec_write_flush_cache_ex_21;	/*!<(rw), DEC_BASE + 0x00000854 */
+	uint32_t isp_dec_write_flush_cache_ex_22;	/*!<(rw), DEC_BASE + 0x00000858 */
+	uint32_t isp_dec_write_flush_cache_ex_23;	/*!<(rw), DEC_BASE + 0x0000085C */
+	uint32_t isp_dec_write_flush_cache_ex_24;	/*!<(rw), DEC_BASE + 0x00000860 */
+	uint32_t isp_dec_write_flush_cache_ex_25;	/*!<(rw), DEC_BASE + 0x00000864 */
+	uint32_t isp_dec_write_flush_cache_ex_26;	/*!<(rw), DEC_BASE + 0x00000868 */
+	uint32_t isp_dec_write_flush_cache_ex_27;	/*!<(rw), DEC_BASE + 0x0000086C */
+	uint32_t isp_dec_write_flush_cache_ex_28;	/*!<(rw), DEC_BASE + 0x00000870 */
+	uint32_t isp_dec_write_flush_cache_ex_29;	/*!<(rw), DEC_BASE + 0x00000874 */
+	uint32_t isp_dec_write_flush_cache_ex_30;	/*!<(rw), DEC_BASE + 0x00000878 */
+	uint32_t isp_dec_write_flush_cache_ex_31;	/*!<(rw), DEC_BASE + 0x0000087C */
+	uint32_t isp_dec_read_cache_base_0;	/*!<(rw), DEC_BASE + 0x00000880 */
+	uint32_t isp_dec_read_cache_base_1;	/*!<(rw), DEC_BASE + 0x00000884 */
+	uint32_t isp_dec_read_cache_base_2;	/*!<(rw), DEC_BASE + 0x00000888 */
+	uint32_t isp_dec_read_cache_base_3;	/*!<(rw), DEC_BASE + 0x0000088C */
+	uint32_t isp_dec_read_cache_base_4;	/*!<(rw), DEC_BASE + 0x00000890 */
+	uint32_t isp_dec_read_cache_base_5;	/*!<(rw), DEC_BASE + 0x00000894 */
+	uint32_t isp_dec_read_cache_base_6;	/*!<(rw), DEC_BASE + 0x00000898 */
+	uint32_t isp_dec_read_cache_base_7;	/*!<(rw), DEC_BASE + 0x0000089C */
+	uint32_t isp_dec_read_cache_base_8;	/*!<(rw), DEC_BASE + 0x000008A0 */
+	uint32_t isp_dec_read_cache_base_9;	/*!<(rw), DEC_BASE + 0x000008A4 */
+	uint32_t isp_dec_read_cache_base_10;	/*!<(rw), DEC_BASE + 0x000008A8 */
+	uint32_t isp_dec_read_cache_base_11;	/*!<(rw), DEC_BASE + 0x000008AC */
+	uint32_t isp_dec_read_cache_base_12;	/*!<(rw), DEC_BASE + 0x000008B0 */
+	uint32_t isp_dec_read_cache_base_13;	/*!<(rw), DEC_BASE + 0x000008B4 */
+	uint32_t isp_dec_read_cache_base_14;	/*!<(rw), DEC_BASE + 0x000008B8 */
+	uint32_t isp_dec_read_cache_base_15;	/*!<(rw), DEC_BASE + 0x000008BC */
+	uint32_t isp_dec_read_cache_base_16;	/*!<(rw), DEC_BASE + 0x000008C0 */
+	uint32_t isp_dec_read_cache_base_17;	/*!<(rw), DEC_BASE + 0x000008C4 */
+	uint32_t isp_dec_read_cache_base_18;	/*!<(rw), DEC_BASE + 0x000008C8 */
+	uint32_t isp_dec_read_cache_base_19;	/*!<(rw), DEC_BASE + 0x000008CC */
+	uint32_t isp_dec_read_cache_base_20;	/*!<(rw), DEC_BASE + 0x000008D0 */
+	uint32_t isp_dec_read_cache_base_21;	/*!<(rw), DEC_BASE + 0x000008D4 */
+	uint32_t isp_dec_read_cache_base_22;	/*!<(rw), DEC_BASE + 0x000008D8 */
+	uint32_t isp_dec_read_cache_base_23;	/*!<(rw), DEC_BASE + 0x000008DC */
+	uint32_t isp_dec_read_cache_base_24;	/*!<(rw), DEC_BASE + 0x000008E0 */
+	uint32_t isp_dec_read_cache_base_25;	/*!<(rw), DEC_BASE + 0x000008E4 */
+	uint32_t isp_dec_read_cache_base_26;	/*!<(rw), DEC_BASE + 0x000008E8 */
+	uint32_t isp_dec_read_cache_base_27;	/*!<(rw), DEC_BASE + 0x000008EC */
+	uint32_t isp_dec_read_cache_base_28;	/*!<(rw), DEC_BASE + 0x000008F0 */
+	uint32_t isp_dec_read_cache_base_29;	/*!<(rw), DEC_BASE + 0x000008F4 */
+	uint32_t isp_dec_read_cache_base_30;	/*!<(rw), DEC_BASE + 0x000008F8 */
+	uint32_t isp_dec_read_cache_base_31;	/*!<(rw), DEC_BASE + 0x000008FC */
+	uint32_t isp_dec_read_cache_base_ex_0;	/*!<(rw), DEC_BASE + 0x00000900 */
+	uint32_t isp_dec_read_cache_base_ex_1;	/*!<(rw), DEC_BASE + 0x00000904 */
+	uint32_t isp_dec_read_cache_base_ex_2;	/*!<(rw), DEC_BASE + 0x00000908 */
+	uint32_t isp_dec_read_cache_base_ex_3;	/*!<(rw), DEC_BASE + 0x0000090C */
+	uint32_t isp_dec_read_cache_base_ex_4;	/*!<(rw), DEC_BASE + 0x00000910 */
+	uint32_t isp_dec_read_cache_base_ex_5;	/*!<(rw), DEC_BASE + 0x00000914 */
+	uint32_t isp_dec_read_cache_base_ex_6;	/*!<(rw), DEC_BASE + 0x00000918 */
+	uint32_t isp_dec_read_cache_base_ex_7;	/*!<(rw), DEC_BASE + 0x0000091C */
+	uint32_t isp_dec_read_cache_base_ex_8;	/*!<(rw), DEC_BASE + 0x00000920 */
+	uint32_t isp_dec_read_cache_base_ex_9;	/*!<(rw), DEC_BASE + 0x00000924 */
+	uint32_t isp_dec_read_cache_base_ex_10;	/*!<(rw), DEC_BASE + 0x00000928 */
+	uint32_t isp_dec_read_cache_base_ex_11;	/*!<(rw), DEC_BASE + 0x0000092C */
+	uint32_t isp_dec_read_cache_base_ex_12;	/*!<(rw), DEC_BASE + 0x00000930 */
+	uint32_t isp_dec_read_cache_base_ex_13;	/*!<(rw), DEC_BASE + 0x00000934 */
+	uint32_t isp_dec_read_cache_base_ex_14;	/*!<(rw), DEC_BASE + 0x00000938 */
+	uint32_t isp_dec_read_cache_base_ex_15;	/*!<(rw), DEC_BASE + 0x0000093C */
+	uint32_t isp_dec_read_cache_base_ex_16;	/*!<(rw), DEC_BASE + 0x00000940 */
+	uint32_t isp_dec_read_cache_base_ex_17;	/*!<(rw), DEC_BASE + 0x00000944 */
+	uint32_t isp_dec_read_cache_base_ex_18;	/*!<(rw), DEC_BASE + 0x00000948 */
+	uint32_t isp_dec_read_cache_base_ex_19;	/*!<(rw), DEC_BASE + 0x0000094C */
+	uint32_t isp_dec_read_cache_base_ex_20;	/*!<(rw), DEC_BASE + 0x00000950 */
+	uint32_t isp_dec_read_cache_base_ex_21;	/*!<(rw), DEC_BASE + 0x00000954 */
+	uint32_t isp_dec_read_cache_base_ex_22;	/*!<(rw), DEC_BASE + 0x00000958 */
+	uint32_t isp_dec_read_cache_base_ex_23;	/*!<(rw), DEC_BASE + 0x0000095C */
+	uint32_t isp_dec_read_cache_base_ex_24;	/*!<(rw), DEC_BASE + 0x00000960 */
+	uint32_t isp_dec_read_cache_base_ex_25;	/*!<(rw), DEC_BASE + 0x00000964 */
+	uint32_t isp_dec_read_cache_base_ex_26;	/*!<(rw), DEC_BASE + 0x00000968 */
+	uint32_t isp_dec_read_cache_base_ex_27;	/*!<(rw), DEC_BASE + 0x0000096C */
+	uint32_t isp_dec_read_cache_base_ex_28;	/*!<(rw), DEC_BASE + 0x00000970 */
+	uint32_t isp_dec_read_cache_base_ex_29;	/*!<(rw), DEC_BASE + 0x00000974 */
+	uint32_t isp_dec_read_cache_base_ex_30;	/*!<(rw), DEC_BASE + 0x00000978 */
+	uint32_t isp_dec_read_cache_base_ex_31;	/*!<(rw), DEC_BASE + 0x0000097C */
+	uint32_t isp_dec_write_cache_base_0;	/*!<(rw), DEC_BASE + 0x00000980 */
+	uint32_t isp_dec_write_cache_base_1;	/*!<(rw), DEC_BASE + 0x00000984 */
+	uint32_t isp_dec_write_cache_base_2;	/*!<(rw), DEC_BASE + 0x00000988 */
+	uint32_t isp_dec_write_cache_base_3;	/*!<(rw), DEC_BASE + 0x0000098C */
+	uint32_t isp_dec_write_cache_base_4;	/*!<(rw), DEC_BASE + 0x00000990 */
+	uint32_t isp_dec_write_cache_base_5;	/*!<(rw), DEC_BASE + 0x00000994 */
+	uint32_t isp_dec_write_cache_base_6;	/*!<(rw), DEC_BASE + 0x00000998 */
+	uint32_t isp_dec_write_cache_base_7;	/*!<(rw), DEC_BASE + 0x0000099C */
+	uint32_t isp_dec_write_cache_base_8;	/*!<(rw), DEC_BASE + 0x000009A0 */
+	uint32_t isp_dec_write_cache_base_9;	/*!<(rw), DEC_BASE + 0x000009A4 */
+	uint32_t isp_dec_write_cache_base_10;	/*!<(rw), DEC_BASE + 0x000009A8 */
+	uint32_t isp_dec_write_cache_base_11;	/*!<(rw), DEC_BASE + 0x000009AC */
+	uint32_t isp_dec_write_cache_base_12;	/*!<(rw), DEC_BASE + 0x000009B0 */
+	uint32_t isp_dec_write_cache_base_13;	/*!<(rw), DEC_BASE + 0x000009B4 */
+	uint32_t isp_dec_write_cache_base_14;	/*!<(rw), DEC_BASE + 0x000009B8 */
+	uint32_t isp_dec_write_cache_base_15;	/*!<(rw), DEC_BASE + 0x000009BC */
+	uint32_t isp_dec_write_cache_base_16;	/*!<(rw), DEC_BASE + 0x000009C0 */
+	uint32_t isp_dec_write_cache_base_17;	/*!<(rw), DEC_BASE + 0x000009C4 */
+	uint32_t isp_dec_write_cache_base_18;	/*!<(rw), DEC_BASE + 0x000009C8 */
+	uint32_t isp_dec_write_cache_base_19;	/*!<(rw), DEC_BASE + 0x000009CC */
+	uint32_t isp_dec_write_cache_base_20;	/*!<(rw), DEC_BASE + 0x000009D0 */
+	uint32_t isp_dec_write_cache_base_21;	/*!<(rw), DEC_BASE + 0x000009D4 */
+	uint32_t isp_dec_write_cache_base_22;	/*!<(rw), DEC_BASE + 0x000009D8 */
+	uint32_t isp_dec_write_cache_base_23;	/*!<(rw), DEC_BASE + 0x000009DC */
+	uint32_t isp_dec_write_cache_base_24;	/*!<(rw), DEC_BASE + 0x000009E0 */
+	uint32_t isp_dec_write_cache_base_25;	/*!<(rw), DEC_BASE + 0x000009E4 */
+	uint32_t isp_dec_write_cache_base_26;	/*!<(rw), DEC_BASE + 0x000009E8 */
+	uint32_t isp_dec_write_cache_base_27;	/*!<(rw), DEC_BASE + 0x000009EC */
+	uint32_t isp_dec_write_cache_base_28;	/*!<(rw), DEC_BASE + 0x000009F0 */
+	uint32_t isp_dec_write_cache_base_29;	/*!<(rw), DEC_BASE + 0x000009F4 */
+	uint32_t isp_dec_write_cache_base_30;	/*!<(rw), DEC_BASE + 0x000009F8 */
+	uint32_t isp_dec_write_cache_base_31;	/*!<(rw), DEC_BASE + 0x000009FC */
+	uint32_t isp_dec_write_cache_base_ex_0;	/*!<(rw), DEC_BASE + 0x00000A00 */
+	uint32_t isp_dec_write_cache_base_ex_1;	/*!<(rw), DEC_BASE + 0x00000A04 */
+	uint32_t isp_dec_write_cache_base_ex_2;	/*!<(rw), DEC_BASE + 0x00000A08 */
+	uint32_t isp_dec_write_cache_base_ex_3;	/*!<(rw), DEC_BASE + 0x00000A0C */
+	uint32_t isp_dec_write_cache_base_ex_4;	/*!<(rw), DEC_BASE + 0x00000A10 */
+	uint32_t isp_dec_write_cache_base_ex_5;	/*!<(rw), DEC_BASE + 0x00000A14 */
+	uint32_t isp_dec_write_cache_base_ex_6;	/*!<(rw), DEC_BASE + 0x00000A18 */
+	uint32_t isp_dec_write_cache_base_ex_7;	/*!<(rw), DEC_BASE + 0x00000A1C */
+	uint32_t isp_dec_write_cache_base_ex_8;	/*!<(rw), DEC_BASE + 0x00000A20 */
+	uint32_t isp_dec_write_cache_base_ex_9;	/*!<(rw), DEC_BASE + 0x00000A24 */
+	uint32_t isp_dec_write_cache_base_ex_10;	/*!<(rw), DEC_BASE + 0x00000A28 */
+	uint32_t isp_dec_write_cache_base_ex_11;	/*!<(rw), DEC_BASE + 0x00000A2C */
+	uint32_t isp_dec_write_cache_base_ex_12;	/*!<(rw), DEC_BASE + 0x00000A30 */
+	uint32_t isp_dec_write_cache_base_ex_13;	/*!<(rw), DEC_BASE + 0x00000A34 */
+	uint32_t isp_dec_write_cache_base_ex_14;	/*!<(rw), DEC_BASE + 0x00000A38 */
+	uint32_t isp_dec_write_cache_base_ex_15;	/*!<(rw), DEC_BASE + 0x00000A3C */
+	uint32_t isp_dec_write_cache_base_ex_16;	/*!<(rw), DEC_BASE + 0x00000A40 */
+	uint32_t isp_dec_write_cache_base_ex_17;	/*!<(rw), DEC_BASE + 0x00000A44 */
+	uint32_t isp_dec_write_cache_base_ex_18;	/*!<(rw), DEC_BASE + 0x00000A48 */
+	uint32_t isp_dec_write_cache_base_ex_19;	/*!<(rw), DEC_BASE + 0x00000A4C */
+	uint32_t isp_dec_write_cache_base_ex_20;	/*!<(rw), DEC_BASE + 0x00000A50 */
+	uint32_t isp_dec_write_cache_base_ex_21;	/*!<(rw), DEC_BASE + 0x00000A54 */
+	uint32_t isp_dec_write_cache_base_ex_22;	/*!<(rw), DEC_BASE + 0x00000A58 */
+	uint32_t isp_dec_write_cache_base_ex_23;	/*!<(rw), DEC_BASE + 0x00000A5C */
+	uint32_t isp_dec_write_cache_base_ex_24;	/*!<(rw), DEC_BASE + 0x00000A60 */
+	uint32_t isp_dec_write_cache_base_ex_25;	/*!<(rw), DEC_BASE + 0x00000A64 */
+	uint32_t isp_dec_write_cache_base_ex_26;	/*!<(rw), DEC_BASE + 0x00000A68 */
+	uint32_t isp_dec_write_cache_base_ex_27;	/*!<(rw), DEC_BASE + 0x00000A6C */
+	uint32_t isp_dec_write_cache_base_ex_28;	/*!<(rw), DEC_BASE + 0x00000A70 */
+	uint32_t isp_dec_write_cache_base_ex_29;	/*!<(rw), DEC_BASE + 0x00000A74 */
+	uint32_t isp_dec_write_cache_base_ex_30;	/*!<(rw), DEC_BASE + 0x00000A78 */
+	uint32_t isp_dec_write_cache_base_ex_31;	/*!<(rw), DEC_BASE + 0x00000A7C */
+	uint32_t isp_dec_debug_info_out;	/*!<(ro), DEC_BASE + 0x00000A80 */
+	uint32_t isp_dec_debug_0;	/*!<(ro), DEC_BASE + 0x00000A84 */
+	uint32_t isp_dec_debug_1;	/*!<(ro), DEC_BASE + 0x00000A88 */
+	uint32_t isp_dec_debug_2;	/*!<(ro), DEC_BASE + 0x00000A8C */
+	uint32_t isp_dec_debug_3;	/*!<(ro), DEC_BASE + 0x00000A90 */
+	uint32_t isp_dec_debug_4;	/*!<(ro), DEC_BASE + 0x00000A94 */
+	uint32_t isp_dec_debug_5;	/*!<(ro), DEC_BASE + 0x00000A98 */
+	uint32_t isp_dec_state_commit;	/*!<(ro), DEC_BASE + 0x00000A9C */
+	uint32_t isp_dec_debug_6;	/*!<(ro), DEC_BASE + 0x00000AA0 */
+	uint32_t isp_dec_debug_7;	/*!<(ro), DEC_BASE + 0x00000AA4 */
+	uint32_t isp_dec_tile_128_type_0;	/*!<(ro), DEC_BASE + 0x00000AA8 */
+	uint32_t isp_dec_tile_128_type_1;	/*!<(ro), DEC_BASE + 0x00000AAC */
+	uint32_t isp_dec_tile_128_type_2;	/*!<(ro), DEC_BASE + 0x00000AB0 */
+	uint32_t isp_dec_tile_128_type_3;	/*!<(ro), DEC_BASE + 0x00000AB4 */
+	uint32_t isp_dec_tile_256_type_0;	/*!<(ro), DEC_BASE + 0x00000AB8 */
+	uint32_t isp_dec_tile_256_type_1;	/*!<(ro), DEC_BASE + 0x00000ABC */
+	uint32_t isp_dec_tile_256_type_2;	/*!<(ro), DEC_BASE + 0x00000AC0 */
+	uint32_t isp_dec_tile_256_type_3;	/*!<(ro), DEC_BASE + 0x00000AC4 */
+	uint32_t isp_dec_tile_256_type_4;	/*!<(ro), DEC_BASE + 0x00000AC8 */
+	uint32_t isp_dec_tile_256_type_5;	/*!<(ro), DEC_BASE + 0x00000ACC */
+	uint32_t isp_dec_tile_256_type_6;	/*!<(ro), DEC_BASE + 0x00000AD0 */
+	uint32_t isp_dec_tile_256_type_7;	/*!<(ro), DEC_BASE + 0x00000AD4 */
+	uint32_t isp_dec_debug_read_gate_domain_clk_counter;	/*!<(ro), DEC_BASE + 0x00000AD8 */
+	uint32_t isp_dec_debug_write_gate_domain_clk_counter;	/*!<(ro), DEC_BASE + 0x00000ADC */
+	uint32_t isp_dec_debug_other_gate_domain_clk_counter;	/*!<(ro), DEC_BASE + 0x00000AE0 */
+	uint32_t isp_dec_fast_clear_value_0;	/*!<(rw), DEC_BASE + 0x00000B00 */
+	uint32_t isp_dec_fast_clear_value_1;	/*!<(rw), DEC_BASE + 0x00000B04 */
+	uint32_t isp_dec_fast_clear_value_2;	/*!<(rw), DEC_BASE + 0x00000B08 */
+	uint32_t isp_dec_fast_clear_value_3;	/*!<(rw), DEC_BASE + 0x00000B0C */
+	uint32_t isp_dec_fast_clear_value_4;	/*!<(rw), DEC_BASE + 0x00000B10 */
+	uint32_t isp_dec_fast_clear_value_5;	/*!<(rw), DEC_BASE + 0x00000B14 */
+	uint32_t isp_dec_fast_clear_value_6;	/*!<(rw), DEC_BASE + 0x00000B18 */
+	uint32_t isp_dec_fast_clear_value_7;	/*!<(rw), DEC_BASE + 0x00000B1C */
+	uint32_t isp_dec_fast_clear_value_8;	/*!<(rw), DEC_BASE + 0x00000B20 */
+	uint32_t isp_dec_fast_clear_value_9;	/*!<(rw), DEC_BASE + 0x00000B24 */
+	uint32_t isp_dec_fast_clear_value_10;	/*!<(rw), DEC_BASE + 0x00000B28 */
+	uint32_t isp_dec_fast_clear_value_11;	/*!<(rw), DEC_BASE + 0x00000B2C */
+	uint32_t isp_dec_fast_clear_value_12;	/*!<(rw), DEC_BASE + 0x00000B30 */
+	uint32_t isp_dec_fast_clear_value_13;	/*!<(rw), DEC_BASE + 0x00000B34 */
+	uint32_t isp_dec_fast_clear_value_14;	/*!<(rw), DEC_BASE + 0x00000B38 */
+	uint32_t isp_dec_fast_clear_value_15;	/*!<(rw), DEC_BASE + 0x00000B3C */
+	uint32_t isp_dec_fast_clear_value_16;	/*!<(rw), DEC_BASE + 0x00000B40 */
+	uint32_t isp_dec_fast_clear_value_17;	/*!<(rw), DEC_BASE + 0x00000B44 */
+	uint32_t isp_dec_fast_clear_value_18;	/*!<(rw), DEC_BASE + 0x00000B48 */
+	uint32_t isp_dec_fast_clear_value_19;	/*!<(rw), DEC_BASE + 0x00000B4C */
+	uint32_t isp_dec_fast_clear_value_20;	/*!<(rw), DEC_BASE + 0x00000B50 */
+	uint32_t isp_dec_fast_clear_value_21;	/*!<(rw), DEC_BASE + 0x00000B54 */
+	uint32_t isp_dec_fast_clear_value_22;	/*!<(rw), DEC_BASE + 0x00000B58 */
+	uint32_t isp_dec_fast_clear_value_23;	/*!<(rw), DEC_BASE + 0x00000B5C */
+	uint32_t isp_dec_fast_clear_value_24;	/*!<(rw), DEC_BASE + 0x00000B60 */
+	uint32_t isp_dec_fast_clear_value_25;	/*!<(rw), DEC_BASE + 0x00000B64 */
+	uint32_t isp_dec_fast_clear_value_26;	/*!<(rw), DEC_BASE + 0x00000B68 */
+	uint32_t isp_dec_fast_clear_value_27;	/*!<(rw), DEC_BASE + 0x00000B6C */
+	uint32_t isp_dec_fast_clear_value_28;	/*!<(rw), DEC_BASE + 0x00000B70 */
+	uint32_t isp_dec_fast_clear_value_29;	/*!<(rw), DEC_BASE + 0x00000B74 */
+	uint32_t isp_dec_fast_clear_value_30;	/*!<(rw), DEC_BASE + 0x00000B78 */
+	uint32_t isp_dec_fast_clear_value_31;	/*!<(rw), DEC_BASE + 0x00000B7C */
+	uint32_t isp_dec_fast_clear_value_ex_0;	/*!<(rw), DEC_BASE + 0x00000B80 */
+	uint32_t isp_dec_fast_clear_value_ex_1;	/*!<(rw), DEC_BASE + 0x00000B84 */
+	uint32_t isp_dec_fast_clear_value_ex_2;	/*!<(rw), DEC_BASE + 0x00000B88 */
+	uint32_t isp_dec_fast_clear_value_ex_3;	/*!<(rw), DEC_BASE + 0x00000B8C */
+	uint32_t isp_dec_fast_clear_value_ex_4;	/*!<(rw), DEC_BASE + 0x00000B90 */
+	uint32_t isp_dec_fast_clear_value_ex_5;	/*!<(rw), DEC_BASE + 0x00000B94 */
+	uint32_t isp_dec_fast_clear_value_ex_6;	/*!<(rw), DEC_BASE + 0x00000B98 */
+	uint32_t isp_dec_fast_clear_value_ex_7;	/*!<(rw), DEC_BASE + 0x00000B9C */
+	uint32_t isp_dec_fast_clear_value_ex_8;	/*!<(rw), DEC_BASE + 0x00000BA0 */
+	uint32_t isp_dec_fast_clear_value_ex_9;	/*!<(rw), DEC_BASE + 0x00000BA4 */
+	uint32_t isp_dec_fast_clear_value_ex_10;	/*!<(rw), DEC_BASE + 0x00000BA8 */
+	uint32_t isp_dec_fast_clear_value_ex_11;	/*!<(rw), DEC_BASE + 0x00000BAC */
+	uint32_t isp_dec_fast_clear_value_ex_12;	/*!<(rw), DEC_BASE + 0x00000BB0 */
+	uint32_t isp_dec_fast_clear_value_ex_13;	/*!<(rw), DEC_BASE + 0x00000BB4 */
+	uint32_t isp_dec_fast_clear_value_ex_14;	/*!<(rw), DEC_BASE + 0x00000BB8 */
+	uint32_t isp_dec_fast_clear_value_ex_15;	/*!<(rw), DEC_BASE + 0x00000BBC */
+	uint32_t isp_dec_fast_clear_value_ex_16;	/*!<(rw), DEC_BASE + 0x00000BC0 */
+	uint32_t isp_dec_fast_clear_value_ex_17;	/*!<(rw), DEC_BASE + 0x00000BC4 */
+	uint32_t isp_dec_fast_clear_value_ex_18;	/*!<(rw), DEC_BASE + 0x00000BC8 */
+	uint32_t isp_dec_fast_clear_value_ex_19;	/*!<(rw), DEC_BASE + 0x00000BCC */
+	uint32_t isp_dec_fast_clear_value_ex_20;	/*!<(rw), DEC_BASE + 0x00000BD0 */
+	uint32_t isp_dec_fast_clear_value_ex_21;	/*!<(rw), DEC_BASE + 0x00000BD4 */
+	uint32_t isp_dec_fast_clear_value_ex_22;	/*!<(rw), DEC_BASE + 0x00000BD8 */
+	uint32_t isp_dec_fast_clear_value_ex_23;	/*!<(rw), DEC_BASE + 0x00000BDC */
+	uint32_t isp_dec_fast_clear_value_ex_24;	/*!<(rw), DEC_BASE + 0x00000BE0 */
+	uint32_t isp_dec_fast_clear_value_ex_25;	/*!<(rw), DEC_BASE + 0x00000BE4 */
+	uint32_t isp_dec_fast_clear_value_ex_26;	/*!<(rw), DEC_BASE + 0x00000BE8 */
+	uint32_t isp_dec_fast_clear_value_ex_27;	/*!<(rw), DEC_BASE + 0x00000BEC */
+	uint32_t isp_dec_fast_clear_value_ex_28;	/*!<(rw), DEC_BASE + 0x00000BF0 */
+	uint32_t isp_dec_fast_clear_value_ex_29;	/*!<(rw), DEC_BASE + 0x00000BF4 */
+	uint32_t isp_dec_fast_clear_value_ex_30;	/*!<(rw), DEC_BASE + 0x00000BF8 */
+	uint32_t isp_dec_fast_clear_value_ex_31;	/*!<(rw), DEC_BASE + 0x00000BFC */
+
+} MrvDecAllRegister_t;
+
+/*! Register: isp_dec_ctrl  (DEC_BASE + 0x00000000)*/
+/*! Slice: isp_dec_ctrl_flush:*/
+#define  DEC_CTRL_FLUSH
+#define  DEC_CTRL_FLUSH_MASK 0x00000001U
+#define  DEC_CTRL_FLUSH_SHIFT 0U
+
+/*! Slice: isp_dec_ctrl_disable_compression:*/
+#define  DEC_CTRL_DISABLE_COMPRESSION
+#define  DEC_CTRL_DISABLE_COMPRESSION_MASK 0x00000002U
+#define  DEC_CTRL_DISABLE_COMPRESSION_SHIFT 1U
+
+/*! Slice: isp_dec_ctrl_disable_ram_clock_gating:*/
+#define  DEC_CTRL_DISABLE_RAM_CLOCK_GATING
+#define  DEC_CTRL_DISABLE_RAM_CLOCK_GATING_MASK 0x00000004U
+#define  DEC_CTRL_DISABLE_RAM_CLOCK_GATING_SHIFT 2U
+
+/*! Slice: isp_dec_ctrl_disable_debug_registers:*/
+#define  DEC_CTRL_DISABLE_DEBUG_REGISTERS
+#define  DEC_CTRL_DISABLE_DEBUG_REGISTERS_MASK 0x00000008U
+#define  DEC_CTRL_DISABLE_DEBUG_REGISTERS_SHIFT 3U
+
+/*! Slice: isp_dec_ctrl_soft_reset:*/
+#define  DEC_CTRL_SOFT_RESET
+#define  DEC_CTRL_SOFT_RESET_MASK 0x00000010U
+#define  DEC_CTRL_SOFT_RESET_SHIFT 4U
+
+/*! Slice: isp_dec_ctrl_flush_dcache:*/
+#define  DEC_CTRL_FLUSH_DCACHE
+#define  DEC_CTRL_FLUSH_DCACHE_MASK 0x00000040U
+#define  DEC_CTRL_FLUSH_DCACHE_SHIFT 6U
+
+/*! Slice: isp_dec_ctrl_disable_dcache:*/
+#define  DEC_CTRL_DISABLE_DCACHE
+#define  DEC_CTRL_DISABLE_DCACHE_MASK 0x00000080U
+#define  DEC_CTRL_DISABLE_DCACHE_SHIFT 7U
+
+/*! Slice: isp_dec_ctrl_disable_hw_flush:*/
+#define  DEC_CTRL_DISABLE_HW_FLUSH
+#define  DEC_CTRL_DISABLE_HW_FLUSH_MASK 0x00010000U
+#define  DEC_CTRL_DISABLE_HW_FLUSH_SHIFT 16U
+
+/*! Slice: isp_dec_ctrl_clk_dis:*/
+#define  DEC_CTRL_CLK_DIS
+#define  DEC_CTRL_CLK_DIS_MASK 0x00FC0000U
+#define  DEC_CTRL_CLK_DIS_SHIFT 17U
+
+/*! Slice: isp_dec_ctrl_sw_flush_id:*/
+#define  DEC_CTRL_SW_FLUSH_ID
+#define  DEC_CTRL_SW_FLUSH_ID_MASK 0x00020000U
+#define  DEC_CTRL_SW_FLUSH_ID_SHIFT 18U
+
+/*! Slice: isp_dec_ctrl_disable_cache_prefetch:*/
+#define  DEC_CTRL_DISABLE_CACHE_PREFETCH
+#define  DEC_CTRL_DISABLE_CACHE_PREFETCH_MASK 0x02000000U
+#define  DEC_CTRL_DISABLE_CACHE_PREFETCH_SHIFT 25U
+
+/*! Slice: isp_dec_ctrl_hw_update_shadow_reg_mode:*/
+#define  DEC_CTRL_HW_UPDATE_SHADOW_REG_MODE
+#define  DEC_CTRL_HW_UPDATE_SHADOW_REG_MODE_MASK 0x10000000U
+#define  DEC_CTRL_HW_UPDATE_SHADOW_REG_MODE_SHIFT 28U
+
+/*! Slice: isp_dec_ctrl_soft_update_shadow_reg:*/
+#define  DEC_CTRL_SOFT_UPDATE_SHADOW_REG
+#define  DEC_CTRL_SOFT_UPDATE_SHADOW_REG_MASK 0x20000000U
+#define  DEC_CTRL_SOFT_UPDATE_SHADOW_REG_SHIFT 29U
+
+/*! Slice: isp_dec_ctrl_disable_module_clock_gating:*/
+#define  DEC_CTRL_DISABLE_MODULE_CLOCK_GATING
+#define  DEC_CTRL_DISABLE_MODULE_CLOCK_GATING_MASK 0x40000000U
+#define  DEC_CTRL_DISABLE_MODULE_CLOCK_GATING_SHIFT 30U
+
+/*! Slice: isp_dec_ctrl_disable_global_clock_gating:*/
+#define  DEC_CTRL_DISABLE_GLOBAL_CLOCK_GATING
+#define  DEC_CTRL_DISABLE_GLOBAL_CLOCK_GATING_MASK 0x80000000U
+#define  DEC_CTRL_DISABLE_GLOBAL_CLOCK_GATING_SHIFT 31U
+
+/*! Register: isp_dec_ctrl_ex  (DEC_BASE + 0x00000004)*/
+/*! Slice: isp_dec_ctrl_ex_enable_burst_split:*/
+#define  DEC_CTRL_EX_ENABLE_BURST_SPLIT
+#define  DEC_CTRL_EX_ENABLE_BURST_SPLIT_MASK 0x00010000U
+#define  DEC_CTRL_EX_ENABLE_BURST_SPLIT_SHIFT 16U
+
+/*! Slice: isp_dec_ctrl_ex_enable_end_address_check:*/
+#define  DEC_CTRL_EX_ENABLE_END_ADDRESS_RANGE_CHECK
+#define  DEC_CTRL_EX_ENABLE_END_ADDRESS_RANGE_CHECK_MASK 0x00020000U
+#define  DEC_CTRL_EX_ENABLE_END_ADDRESS_RANGE_CHECK_SHIFT 17U
+
+/*! Slice: isp_dec_ctrl_ex_write_miss_policy:*/
+#define  DEC_CTRL_EX_WRITE_MISS_POLICY
+#define  DEC_CTRL_EX_WRITE_MISS_POLICY_MASK 0x00080000U
+#define  DEC_CTRL_EX_WRITE_MISS_POLICY_SHIFT 19U
+
+/*! Slice: isp_dec_ctrl_ex_read_miss_policy:*/
+#define  DEC_CTRL_EX_READ_MISS_POLICY
+#define  DEC_CTRL_EX_READ_MISS_POLICY_MASK 0x20000000U
+#define  DEC_CTRL_EX_READ_MISS_POLICY_SHIFT 29U
+
+/*! Register: isp_dec_ctrl_ex2  (DEC_BASE + 0x00000008)*/
+/*! Slice: isp_dec_ctrl_ex2_tile_status_read_id:*/
+#define  DEC_CTRL_EX2_TILE_STATUS_READ_ID
+#define  DEC_CTRL_EX2_TILE_STATUS_READ_ID_MASK 0x0000007FU
+#define  DEC_CTRL_EX2_TILE_STATUS_READ_ID_SHIFT 0U
+
+/*! Slice: isp_dec_ctrl_ex2_tile_status_write_id:*/
+#define  DEC_CTRL_EX2_TILE_STATUS_WRITE_ID
+#define  DEC_CTRL_EX2_TILE_STATUS_WRITE_ID_MASK 0x0003F80U
+#define  DEC_CTRL_EX2_TILE_STATUS_WRITE_ID_SHIFT 7U
+
+/*! Register: isp_dec_intr_enbl  (DEC_BASE + 0x0000000C)*/
+/*! Slice: isp_dec_intr_enbl_vec:*/
+#define  DEC_INTR_ENBL_VEC
+#define  DEC_INTR_ENBL_VEC_MASK 0xFFFFFFFFU
+#define  DEC_INTR_ENBL_VEC_SHIFT 0U
+
+/*! Register: isp_dec_intr_enbl_ex  (DEC_BASE + 0x00000010)*/
+/*! Slice: isp_dec_intr_enbl_ex_vec:*/
+#define  DEC_INTR_ENBL_EX_VEC
+#define  DEC_INTR_ENBL_EX_VEC_MASK 0xFFFFFFFFU
+#define  DEC_INTR_ENBL_EX_VEC_SHIFT 0U
+
+/*! Register: isp_dec_intr_enbl_ex2  (DEC_BASE + 0x00000014)*/
+/*! Slice: isp_dec_intr_enbl_ex2_vec:*/
+#define  DEC_INTR_ENBL_EX2_VEC
+#define  DEC_INTR_ENBL_EX2_VEC_MASK 0xFFFFFFFFU
+#define  DEC_INTR_ENBL_EX2_VEC_SHIFT 0U
+
+/*! Register: isp_dec_read_config  (DEC_BASE + 0x00000080)*/
+/*! Slice: isp_dec_read_config_compression_enable:*/
+#define  DEC_READ_CONFIG_COMPRESSION_ENABLE
+#define  DEC_READ_CONFIG_COMPRESSION_ENABLE_MASK 0x00000001U
+#define  DEC_READ_CONFIG_COMPRESSION_ENABLE_SHIFT 0U
+
+/*! Slice: isp_dec_read_config_compression_format:*/
+#define  DEC_READ_CONFIG_COMPRESSION_FORMAT
+#define  DEC_READ_CONFIG_COMPRESSION_FORMAT_MASK 0x000000F8U
+#define  DEC_READ_CONFIG_COMPRESSION_FORMAT_SHIFT 3U
+
+/*! Slice: isp_dec_read_config_compression_align_mode:*/
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE_MASK 0x00030000U
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE_SHIFT 16U
+
+/*! Slice: isp_dec_read_config_compression_align_mode1:*/
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE1
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE1_MASK 0x001C0000U
+#define  DEC_READ_CONFIG_COMPRESSION_ALIGN_MODE1_SHIFT 18U
+
+/*! Slice: isp_dec_read_config_tile_mode:*/
+#define  DEC_READ_CONFIG_TILE_MODE
+#define  DEC_READ_CONFIG_TILE_MODE_MASK 0x7E000000U
+#define  DEC_READ_CONFIG_TILE_MODE_SHIFT 25U
+
+/*! Register: isp_dec_read_ex_config  (DEC_BASE + 0x00000100)*/
+/*! Slice: isp_dec_read_ex_config_bit_depth:*/
+#define  DEC_READ_EX_CONFIG_BIT_DEPTH
+#define  DEC_READ_EX_CONFIG_BIT_DEPTH_MASK 0x00070000U
+#define  DEC_READ_EX_CONFIG_BIT_DEPTH_SHIFT 16U
+
+/*! Slice: isp_dec_read_ex_config_tile_y:*/
+#define  DEC_READ_EX_CONFIG_TILE_Y
+#define  DEC_READ_EX_CONFIG_TILE_Y_MASK 0x00080000U
+#define  DEC_READ_EX_CONFIG_TILE_Y_SHIFT 19U
+
+/*! Register: isp_dec_write_config  (DEC_BASE + 0x00000180)*/
+/*! Slice: isp_dec_write_config_compression_enable:*/
+#define  DEC_WRITE_CONFIG_COMPRESSION_ENABLE
+#define  DEC_WRITE_CONFIG_COMPRESSION_ENABLE_MASK 0x00000001U
+#define  DEC_WRITE_CONFIG_COMPRESSION_ENABLE_SHIFT 0U
+
+/*! Slice: isp_dec_write_config_compression_format:*/
+#define  DEC_WRITE_CONFIG_COMPRESSION_FORMAT
+#define  DEC_WRITE_CONFIG_COMPRESSION_FORMAT_MASK 0x000000F8U
+#define  DEC_WRITE_CONFIG_COMPRESSION_FORMAT_SHIFT 3U
+
+/*! Slice: isp_dec_write_config_compression_align_mode:*/
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE_MASK 0x00030000U
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE_SHIFT 16U
+
+/*! Slice: isp_dec_write_config_compression_align_mode1:*/
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE1
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE1_MASK 0x001C0000U
+#define  DEC_WRITE_CONFIG_COMPRESSION_ALIGN_MODE1_SHIFT 18U
+
+/*! Slice: isp_dec_write_config_tile_mode:*/
+#define  DEC_WRITE_CONFIG_TILE_MODE
+#define  DEC_WRITE_CONFIG_TILE_MODE_MASK 0x7E000000U
+#define  DEC_WRITE_CONFIG_TILE_MODE_SHIFT 25U
+
+/*! Register: isp_dec_write_ex_config  (DEC_BASE + 0x00000200)*/
+/*! Slice: isp_dec_write_ex_config_bit_depth:*/
+#define  DEC_WRITE_EX_CONFIG_BIT_DEPTH
+#define  DEC_WRITE_EX_CONFIG_BIT_DEPTH_MASK 0x00070000U
+#define  DEC_WRITE_EX_CONFIG_BIT_DEPTH_SHIFT 16U
+
+/*! Slice: isp_dec_write_ex_config_tile_y:*/
+#define  DEC_WRITE_EX_CONFIG_TILE_Y
+#define  DEC_WRITE_EX_CONFIG_TILE_Y_MASK 0x00080000U
+#define  DEC_WRITE_EX_CONFIG_TILE_Y_SHIFT 19U
+
+/*! Register: isp_dec_read_buffer_base  (DEC_BASE + 0x00000280)*/
+/*! Slice: isp_dec_read_buffer_base:*/
+#define  DEC_READ_BUFFER_BASE
+#define  DEC_READ_BUFFER_BASE_MASK 0xFFFFFFFFU
+#define  DEC_READ_BUFFER_BASE_SHIFT 0U
+
+/*! Register: isp_dec_read_buffer_base_ex  (DEC_BASE + 0x00000300)*/
+/*! Slice: isp_dec_read_buffer_base_ex:*/
+#define  DEC_READ_BUFFER_BASE_EX
+#define  DEC_READ_BUFFER_BASE_EX_MASK 0x000000FFU
+#define  DEC_READ_BUFFER_BASE_EX_SHIFT 0U
+
+/*! Register: isp_dec_read_buffer_end  (DEC_BASE + 0x00000380)*/
+/*! Slice: isp_dec_read_buffer_end:*/
+#define  DEC_READ_BUFFER_END
+#define  DEC_READ_BUFFER_END_MASK 0xFFFFFFFFU
+#define  DEC_READ_BUFFER_END_SHIFT 0U
+
+/*! Register: isp_dec_read_buffer_end_ex  (DEC_BASE + 0x00000400)*/
+/*! Slice: isp_dec_read_buffer_end_ex:*/
+#define  DEC_READ_BUFFER_END_EX
+#define  DEC_READ_BUFFER_END_EX_MASK 0x000000FFU
+#define  DEC_READ_BUFFER_END_EX_SHIFT 0U
+
+/*! Register: isp_dec_read_flush_cache  (DEC_BASE + 0x00000480)*/
+/*! Slice: isp_dec_read_flush_cache:*/
+#define  DEC_READ_FLUSH_CACHE
+#define  DEC_READ_FLUSH_CACHE_MASK 0xFFFFFFFFU
+#define  DEC_READ_FLUSH_CACHE_SHIFT 0U
+
+/*! Register: isp_dec_read_flush_cache_ex  (DEC_BASE + 0x00000500)*/
+/*! Slice: isp_dec_read_flush_cache_ex:*/
+#define  DEC_READ_FLUSH_CACHE_EX
+#define  DEC_READ_FLUSH_CACHE_EX_MASK 0xFFFFFFFFU
+#define  DEC_READ_FLUSH_CACHE_EX_SHIFT 0U
+
+/*! Register: isp_dec_write_buffer_base  (DEC_BASE + 0x00000580)*/
+/*! Slice: isp_dec_write_buffer_base:*/
+#define  DEC_WRITE_BUFFER_BASE
+#define  DEC_WRITE_BUFFER_BASE_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_BUFFER_BASE_SHIFT 0U
+
+/*! Register: isp_dec_write_buffer_base_ex  (DEC_BASE + 0x00000600)*/
+/*! Slice: isp_dec_write_buffer_base_ex:*/
+#define  DEC_WRITE_BUFFER_BASE_EX
+#define  DEC_WRITE_BUFFER_BASE_EX_MASK 0x000000FFU
+#define  DEC_WRITE_BUFFER_BASE_EX_SHIFT 0U
+
+/*! Register: isp_dec_write_buffer_end  (DEC_BASE + 0x00000680)*/
+/*! Slice: isp_dec_write_buffer_end:*/
+#define  DEC_WRITE_BUFFER_END
+#define  DEC_WRITE_BUFFER_END_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_BUFFER_END_SHIFT 0U
+
+/*! Register: isp_dec_write_buffer_end_ex  (DEC_BASE + 0x00000700)*/
+/*! Slice: isp_dec_write_buffer_end_ex:*/
+#define  DEC_WRITE_BUFFER_END_EX
+#define  DEC_WRITE_BUFFER_END_EX_MASK 0x000000FFU
+#define  DEC_WRITE_BUFFER_END_EX_SHIFT 0U
+
+/*! Register: isp_dec_write_flush_cache  (DEC_BASE + 0x00000780)*/
+/*! Slice: isp_dec_write_flush_cache:*/
+#define  DEC_WRITE_FLUSH_CACHE
+#define  DEC_WRITE_FLUSH_CACHE_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_FLUSH_CACHE_SHIFT 0U
+
+/*! Register: isp_dec_write_flush_cache_ex  (DEC_BASE + 0x00000800)*/
+/*! Slice: isp_dec_write_flush_cache_ex:*/
+#define  DEC_WRITE_FLUSH_CACHE_EX
+#define  DEC_WRITE_FLUSH_CACHE_EX_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_FLUSH_CACHE_EX_SHIFT 0U
+
+/*! Register: isp_dec_read_cache_base  (DEC_BASE + 0x00000880)*/
+/*! Slice: isp_dec_read_cache_base:*/
+#define  DEC_READ_CACHE_BASE
+#define  DEC_READ_CACHE_BASE_MASK 0xFFFFFFFFU
+#define  DEC_READ_CACHE_BASE_SHIFT 0U
+
+/*! Register: isp_dec_read_cache_base_ex  (DEC_BASE + 0x00000900)*/
+/*! Slice: isp_dec_read_cache_base_ex:*/
+#define  DEC_READ_CACHE_BASE_EX
+#define  DEC_READ_CACHE_BASE_EX_MASK 0xFFFFFFFFU
+#define  DEC_READ_CACHE_BASE_EX_SHIFT 0U
+
+/*! Register: isp_dec_write_cache_base  (DEC_BASE + 0x00000980)*/
+/*! Slice: isp_dec_write_cache_base:*/
+#define  DEC_WRITE_CACHE_BASE
+#define  DEC_WRITE_CACHE_BASE_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_CACHE_BASE_SHIFT 0U
+
+/*! Register: isp_dec_write_cache_base_ex  (DEC_BASE + 0x00000A00)*/
+/*! Slice: isp_dec_write_cache_base_ex:*/
+#define  DEC_WRITE_CACHE_BASE_EX
+#define  DEC_WRITE_CACHE_BASE_EX_MASK 0xFFFFFFFFU
+#define  DEC_WRITE_CACHE_BASE_EX_SHIFT 0U
+
+#endif /* _MRV_DEC_DEC_ALL_REGS_H */

+ 24 - 0
vvcam/native/Makefile

@@ -0,0 +1,24 @@
+include Param.mk
+all:
+	echo VERSION_CFG = $(VERSION_CFG)
+	@cd gpio_i2c;   make || exit $$?; cp vvcam_i2c.ko    ../bin/
+	@cd sensor;     make || exit $$?; cp vvcam_sensor.ko ../bin/
+	@cd flash_led;  make || exit $$?; cp vvcam_flash_led.ko ../bin/
+	@cd isp;        make || exit $$?; cp vvcam_isp.ko    ../bin/
+	@cd soc;        make || exit $$?; cp vvcam_soc.ko    ../bin/
+	@cd dw200;      make || exit $$?; cp vvcam_dw200.ko  ../bin/
+	@cd dec400;     make || exit $$?; cp vvcam_dec400.ko ../bin/
+	@cd vi_pre;     make || exit $$?; cp vi_pre.ko       ../bin/
+	@cd video;      make || exit $$?; cp thead_video.ko       ../bin/
+clean:
+	@cd gpio_i2c;   make clean
+	@cd csi;        make clean
+	@cd sensor;     make clean
+	@cd flash_led;  make clean
+	@cd isp;        make clean
+	@cd soc;        make clean
+	@cd dw200;      make clean
+	@cd dec400;     make clean
+	@cd vi_pre;     make clean
+	@cd video;     make clean
+cleanall:

+ 66 - 0
vvcam/native/Param.mk

@@ -0,0 +1,66 @@
+#VERSION_CFG := ISP8000NANO_V1802
+#KERNEL :=/opt/vsi_isp_kernel_tree/4.8.0-41-generic-x86/build
+#KERNEL :=/lib/modules/$(shell uname -r)/build
+KERNEL :=$(LINUX_DIR)
+KERNEL_SRC :=$(KERNEL)
+
+EXTRA_CFLAGS += -DWITH_VVCAM
+EXTRA_CFLAGS += -DWITH_VVCAM_DUAL
+
+EXTRA_CFLAGS += -DVVCSI0_BASE=0xDE200000
+EXTRA_CFLAGS += -DVVCSI1_BASE=0xDE300000
+EXTRA_CFLAGS += -DVVCSI_SIZE=0x00200000
+
+EXTRA_CFLAGS += -DVVCAM_I2C0_BASE=0xDE3080f0
+EXTRA_CFLAGS += -DVVCAM_I2C1_BASE=0xDE3080f4
+EXTRA_CFLAGS += -DVVCAM_I2C_SIZE=0x00000004
+
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS0=8
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS1=9
+
+
+ifeq ($(VERSION_CFG), ISP8000_V2009)
+EXTRA_CFLAGS += -DVVISP0_BASE=0xDE600000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xDE700000  
+else
+EXTRA_CFLAGS += -DVVISP0_BASE=0xFFE4100000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xFFE4110000
+endif
+EXTRA_CFLAGS += -DISP_REG_SIZE=0x00010000
+
+EXTRA_CFLAGS += -DDWE_REG_BASE=0xFFE4130C00
+EXTRA_CFLAGS += -DDWE_REG_SIZE=0x00010000
+#EXTRA_CFLAGS += -DDWE_REG_RESET=0xffe4130000
+EXTRA_CFLAGS += -DVSE_REG_BASE=0xFFE4130000
+EXTRA_CFLAGS += -DVSE_REG_SIZE=0x00010000
+#EXTRA_CFLAGS += -DVSE_REG_RESET=0xffe4130000
+
+EXTRA_CFLAGS += -DRESERVED_ISP0_MEM_BASE=0xA0000000
+EXTRA_CFLAGS += -DRESERVED_ISP0_MEM_SIZE=0x1000000
+
+EXTRA_CFLAGS += -DRESERVED_ISP1_MEM_BASE=0xB0000000
+EXTRA_CFLAGS += -DRESERVED_ISP1_MEM_SIZE=0x1000000
+
+EXTRA_CFLAGS += -DVVCTRL_BASE=0xFFE4040000
+EXTRA_CFLAGS += -DVVCTRL_SIZE=0x00001000
+
+EXTRA_CFLAGS += -DISP_HW_NUMBER=1
+EXTRA_CFLAGS += -DUSE_FPGA
+EXTRA_CFLAGS += -D$(VERSION_CFG)
+
+#SENSR0_TYPE := ov2775
+#SENSR1_TYPE := ov2775
+
+#SENSR0_TYPE := imx334
+#SENSR1_TYPE := imx334
+
+SENSR0_TYPE := ov5693
+SENSR1_TYPE := ov5693
+
+#SENSR0_TYPE := imx290
+#SENSR1_TYPE := imx290
+
+PLATFORM    := gen6
+
+FLASH_LED_TYPE1 := aw36515
+FLASH_LED_TYPE2 := aw36413

+ 56 - 0
vvcam/native/Param_base.mk

@@ -0,0 +1,56 @@
+#VERSION_CFG := ISP8000NANO_V1802
+#KERNEL :=/opt/vsi_isp_kernel_tree/4.8.0-41-generic-x86/build
+KERNEL :=/lib/modules/$(shell uname -r)/build
+
+EXTRA_CFLAGS += -DWITH_VVCAM
+EXTRA_CFLAGS += -DWITH_VVCAM_DUAL
+
+EXTRA_CFLAGS += -DVVCSI0_BASE=0xDE200000
+EXTRA_CFLAGS += -DVVCSI1_BASE=0xDE300000
+EXTRA_CFLAGS += -DVVCSI_SIZE=0x00200000
+
+EXTRA_CFLAGS += -DVVCAM_I2C0_BASE=0xDE3080f0
+EXTRA_CFLAGS += -DVVCAM_I2C1_BASE=0xDE3080f4
+EXTRA_CFLAGS += -DVVCAM_I2C_SIZE=0x00000004
+
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS0=8
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS1=9
+
+
+ifeq ($(VERSION_CFG), ISP8000_V2009)
+EXTRA_CFLAGS += -DVVISP0_BASE=0xDE600000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xDE700000  
+else
+EXTRA_CFLAGS += -DVVISP0_BASE=0xDE000000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xDE100000  
+endif
+EXTRA_CFLAGS += -DISP_REG_SIZE=0x00010000
+
+EXTRA_CFLAGS += -DDWE_REG_BASE=0xDE380C00
+EXTRA_CFLAGS += -DDWE_REG_SIZE=0x00010000
+EXTRA_CFLAGS += -DDWE_REG_RESET=0xDE308250
+EXTRA_CFLAGS += -DVSE_REG_BASE=0xDE380000
+EXTRA_CFLAGS += -DVSE_REG_SIZE=0x00010000
+EXTRA_CFLAGS += -DVSE_REG_RESET=0xDE308250
+
+
+EXTRA_CFLAGS += -DRESERVED_MEM_BASE=0x10000000
+EXTRA_CFLAGS += -DRESERVED_MEM_SIZE=0x10000000
+
+EXTRA_CFLAGS += -DVVCTRL_BASE=0xFFE4040000
+EXTRA_CFLAGS += -DVVCTRL_SIZE=0x00001000
+
+EXTRA_CFLAGS += -DISP_HW_NUMBER=1
+EXTRA_CFLAGS += -DUSE_FPGA
+EXTRA_CFLAGS += -D$(VERSION_CFG)
+
+SENSR0_TYPE := ov2775
+SENSR1_TYPE := ov2775
+
+#SENSR0_TYPE := ov5693
+#SENSR1_TYPE := ov5693
+
+PLATFORM    := gen6
+
+FLASH_LED_TYPE1 : = aw36515
+FLASH_LED_TYPE2 : = aw36413

+ 62 - 0
vvcam/native/Param_thead_light.mk

@@ -0,0 +1,62 @@
+#VERSION_CFG := ISP8000NANO_V1802
+#KERNEL :=/opt/vsi_isp_kernel_tree/4.8.0-41-generic-x86/build
+#KERNEL :=/lib/modules/$(shell uname -r)/build
+KERNEL :=$(LINUX_DIR)
+
+EXTRA_CFLAGS += -DWITH_VVCAM
+EXTRA_CFLAGS += -DWITH_VVCAM_DUAL
+
+EXTRA_CFLAGS += -DVVCSI0_BASE=0xDE200000
+EXTRA_CFLAGS += -DVVCSI1_BASE=0xDE300000
+EXTRA_CFLAGS += -DVVCSI_SIZE=0x00200000
+
+EXTRA_CFLAGS += -DVVCAM_I2C0_BASE=0xDE3080f0
+EXTRA_CFLAGS += -DVVCAM_I2C1_BASE=0xDE3080f4
+EXTRA_CFLAGS += -DVVCAM_I2C_SIZE=0x00000004
+
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS0=8
+EXTRA_CFLAGS += -DVVSENSOR_I2C_BUS1=9
+
+
+ifeq ($(VERSION_CFG), ISP8000_V2009)
+EXTRA_CFLAGS += -DVVISP0_BASE=0xDE600000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xDE700000
+else
+EXTRA_CFLAGS += -DVVISP0_BASE=0xFFE4100000
+EXTRA_CFLAGS += -DVVISP1_BASE=0xFFE4110000
+endif
+EXTRA_CFLAGS += -DISP_REG_SIZE=0x00010000
+
+EXTRA_CFLAGS += -DDWE_REG_BASE=0xFFE4130C00
+EXTRA_CFLAGS += -DDWE_REG_SIZE=0x00010000
+#EXTRA_CFLAGS += -DDWE_REG_RESET=0xffe4130000
+EXTRA_CFLAGS += -DVSE_REG_BASE=0xFFE4130000
+EXTRA_CFLAGS += -DVSE_REG_SIZE=0x00010000
+#EXTRA_CFLAGS += -DVSE_REG_RESET=0xffe4130000
+
+EXTRA_CFLAGS += -DRESERVED_MEM_BASE=0xC0000000
+EXTRA_CFLAGS += -DRESERVED_MEM_SIZE=0x10000000
+
+EXTRA_CFLAGS += -DVVCTRL_BASE=0xDE308000
+EXTRA_CFLAGS += -DVVCTRL_SIZE=0x00001000
+
+EXTRA_CFLAGS += -DISP_HW_NUMBER=1
+EXTRA_CFLAGS += -DUSE_FPGA
+EXTRA_CFLAGS += -D$(VERSION_CFG)
+
+SENSR0_TYPE := ov2775
+SENSR1_TYPE := ov2775
+
+#SENSR0_TYPE := imx334
+#SENSR1_TYPE := imx334
+
+#SENSR0_TYPE := ov5693
+#SENSR1_TYPE := ov5693
+
+#SENSR0_TYPE := imx290
+#SENSR1_TYPE := imx290
+
+PLATFORM    := gen6
+
+FLASH_LED_TYPE1 : = aw36515
+FLASH_LED_TYPE2 : = aw36413

+ 15 - 0
vvcam/native/bin/insmod.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+#insmod vvcam_i2c
+modprobe vvcam_sensor
+#insmod vvcam_csi
+modprobe bm_visys
+modprobe bm_csi
+modprobe vvcam_isp
+modprobe vvcam_isp_ry
+modprobe vvcam_soc
+modprobe vvcam_dw200
+modprobe vi_pre
+modprobe vvcam_dec400
+modprobe thead_video
+modprobe vidmem
+modprobe vvcam_flash_led

+ 13 - 0
vvcam/native/bin/rmmod.sh

@@ -0,0 +1,13 @@
+#!/bin/sh
+rmmod vvcam_dw200
+rmmod vvcam_soc
+rmmod vvcam_isp
+rmmod vvcam_isp_ry
+rmmod vvcam_sensor
+rmmod vvcam_csi
+rmmod vvcam_i2c
+rmmod vi_pre
+rmmod vvcam_dec400
+rmmod thead_video
+rmmod vidmem
+rmmod vvcam_flash_led

+ 23 - 0
vvcam/native/csi/Makefile

@@ -0,0 +1,23 @@
+include $(PWD)/../Param.mk
+include $(PWD)/../../version/$(VERSION_CFG).mk
+TARGET = vvcam_csi
+
+#obj-m +=$(TARGET).o
+#
+#$(TARGET)-objs += csi_ioctl.o
+#$(TARGET)-objs += ./nwl/platform_nwl_csi_driver.o
+#$(TARGET)-objs += vvcam_csi_driver.o
+
+EXTRA_CFLAGS += -I$(PWD)/
+EXTRA_CFLAGS += -I$(PWD)/nwl/
+
+PWD :=$(shell pwd)
+
+all:
+	make   -C $(KERNEL) M=$(PWD)  modules
+modules_install:
+	make -C $(KERNEL_SRC) M=$(SRC) modules_install
+clean:
+	rm -rf $($(TARGET)-objs)
+#	make -C $(KERNEL) M=`pwd` clean
+

+ 23 - 0
vvcam/native/csi/Makefilee

@@ -0,0 +1,23 @@
+include $(PWD)/../Param.mk
+include $(PWD)/../../version/$(VERSION_CFG).mk
+TARGET = vvcam_csi
+
+obj-m +=$(TARGET).o
+
+$(TARGET)-objs += csi_ioctl.o
+$(TARGET)-objs += ./nwl/platform_nwl_csi_driver.o
+$(TARGET)-objs += vvcam_csi_driver.o
+
+EXTRA_CFLAGS += -I$(PWD)/
+EXTRA_CFLAGS += -I$(PWD)/nwl/
+
+PWD :=$(shell pwd)
+
+all:
+	make   -C $(KERNEL) M=$(PWD)  modules
+modules_install:
+	make -C $(KERNEL_SRC) M=$(SRC) modules_install
+clean:
+	rm -rf $($(TARGET)-objs)
+	# make -C $(KERNEL) M=`pwd` clean
+

+ 90 - 0
vvcam/native/csi/bm_csi_dphy.c

@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <asm/io.h>
+
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+
+#include <linux/timer.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/ioctl.h>
+#include <linux/poll.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+#include <linux/interrupt.h>
+
+#include <linux/of.h>
+
+#include "bm_printk.h"
+#include "bm_csi_ioctl.h"
+#include "bm_csi_hw.h"
+#include "bm_csi_dphy.h"
+#include "dw-dphy-rx.h"
+
+#define check_retval(x)\
+	do {\
+		if ((x))\
+			return -EIO;\
+	} while (0)
+
+#define REG_DPHY_OFFSET 0x40
+
+int bm_csi_dphy_write_reg(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	struct bm_csi_reg_t reg;
+	check_retval(copy_from_user(&reg, args, sizeof(reg)));
+    struct dw_dphy_rx *dphy = drvdata->dphy;
+
+	writel(reg.value, dphy->base_address + reg.offset);
+	bm_info("%s  addr 0x%08x val 0x%08x\n", __func__, reg.offset, reg.value);
+}
+
+int bm_csi_dphy_init(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+    struct dw_dphy_rx *dphy = drvdata->dphy;
+/*
+    dphy->dphy_freq = 20000000;
+    dphy->phy_type = 1;
+    dphy->dphy_te_len = BIT12;
+    dphy->lanes_config = CTRL_4_LANES;
+    dphy->dphy_gen = GEN3;
+    dphy->max_lanes = CTRL_4_LANES;
+	dphy->lp_time = 1000; //ns
+	dphy->base_address = drvdata->base + REG_DPHY_OFFSET;
+    //dphy->dphy1_if_addr =visysreg
+    dw_dphy_reset(dphy);
+    dw_dphy_power_on(dphy);
+    dw_dphy_init(dphy);
+    */
+    return 0;
+}
+
+int bm_csi_dphy_uinit(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+    struct dw_dphy_rx *dphy = &drvdata->dphy;
+    dw_dphy_reset(dphy);
+    dw_dphy_power_off(dphy);
+}
+
+int bm_csi_dphy_reset(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+    struct dw_dphy_rx *dphy = &drvdata->dphy;
+    dw_dphy_reset(dphy);
+}

+ 19 - 0
vvcam/native/csi/bm_csi_dphy.h

@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _BM_CSI_DPHY_H_
+#define _BM_CSI_DPHY_H_
+
+#include <linux/platform_device.h>
+
+int dw_dphy_rx_probe(struct platform_device *pdev, void __iomem *dphy1_if_addr);
+int dw_dphy_rx_remove(struct platform_device *pdev);
+
+#endif /*_BM_CSI_DPHY_H_ */
+
+

+ 331 - 0
vvcam/native/csi/bm_csi_driver.c

@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <asm/io.h>
+
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+
+#include <linux/timer.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/ioctl.h>
+#include <linux/poll.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+#include <linux/interrupt.h>
+
+#include <linux/of.h>
+
+#include "bm_printk.h"
+#include "bm_csi_ioctl.h"
+#include "bm_csi_hw.h"
+#include "bm_csi_dphy.h"
+//#include "dw-csi-plat.h"
+
+#define BM_DRIVER_NAME "vivcsi"
+#define BM_DRIVER_MAXCNT 3
+
+static struct class *bm_driver_class;
+static unsigned int bm_driver_major = 0;
+static unsigned int bm_driver_minor = 0;
+static unsigned int device_register_index = 0;
+
+#define check_retval(x)\
+	do {\
+		if ((x))\
+			return -EIO;\
+	} while (0)
+
+static unsigned int bm_csi_poll(struct file * filp, poll_table *wait)
+{
+	return 0;
+}
+
+void bm_csi_work(struct work_struct *work)
+{
+}
+
+irqreturn_t bm_csi_irq(int irq, void *dev_id)
+{
+	bm_info("enter %s\n", __func__);
+	return IRQ_HANDLED;
+}
+
+static int bm_csi_open(struct inode * inode, struct file * file)
+{
+	struct bm_csi_drvdata *drvdata;
+
+	bm_info("enter %s\n", __func__);
+
+	drvdata = container_of(inode->i_cdev, struct bm_csi_drvdata, cdev);
+	file->private_data = drvdata;
+
+	return 0;
+};
+
+static long bm_csi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+	long ret = 0;
+	struct bm_csi_drvdata *drvdata;
+	bm_info("enter %s\n", __func__);
+
+	drvdata = file->private_data;
+	if (drvdata == NULL) {
+		bm_err("%s:file private is null point error\n", __func__);
+		return  -ENOMEM;
+	}
+
+	mutex_lock(&drvdata->mutex);
+	switch (cmd) {
+	case BMCSI_IOC_WRITE_REG:
+		ret = bm_csi_write_reg(drvdata, (void *)arg);
+		break;
+	case BMCSI_IOC_READ_REG:
+		ret = bm_csi_read_reg(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_INIT:
+        ret = bm_csi_init(drvdata, (void *)arg);
+        break;
+    case BMCSI_IOC_EXIT:
+        ret = bm_csi_exit(drvdata, (void *)arg);
+        break;
+    case BMCSI_IOC_S_RESET:
+        ret = bm_csi_reset(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_POWER:
+        ret = bm_csi_set_power(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_G_POWER:
+        ret = bm_csi_get_power(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_CLOCK:
+        ret = bm_csi_set_clock(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_G_CLOCK:
+        ret = bm_csi_get_clock(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_STREAM:
+        ret = bm_csi_set_stream(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_G_STREAM:
+        ret = bm_csi_get_stream(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_FMT:
+        ret = bm_csi_set_fmt(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_G_FMT:
+        ret = bm_csi_get_fmt(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_VC_SELECT:
+        ret = bm_csi_set_vc_select(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_G_VC_SELECT:
+        ret = bm_csi_get_vc_select(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_S_LANE_CFG:
+        ret = bm_csi_set_lane_cfg(drvdata, (void *)arg);
+		break;
+    case BMCSI_IOC_MAX:
+		break;
+	default:
+		ret = -EPERM;
+		bm_err("%s: unsupported command %d", __func__, cmd);
+		break;
+	}
+	mutex_unlock(&drvdata->mutex);
+	return ret;
+};
+
+static int bm_csi_release(struct inode * inode, struct file * file)
+{
+	bm_info("enter %s\n", __func__);
+	return 0;
+};
+
+static int bm_csi_mmap(struct file *pFile, struct vm_area_struct *vma)
+{
+	bm_info("enter %s\n", __func__);
+	return 0;
+};
+
+struct file_operations bm_csi_fops = {
+	.owner = THIS_MODULE,
+	.open = bm_csi_open,
+	.release = bm_csi_release,
+	.unlocked_ioctl = bm_csi_ioctl,
+	.mmap = bm_csi_mmap,
+	.poll = bm_csi_poll,
+};
+
+static int bm_csi_probe(struct platform_device *pdev)
+{
+	int ret = 0;
+	struct bm_csi_drvdata *drvdata;
+	struct resource *iores_mem;
+    void __iomem *visys_addr;
+
+	u32 value;
+
+	bm_info("enter %s\n", __func__);
+	pdev->id = device_register_index;
+	if (pdev->id >= BM_DRIVER_MAXCNT) {
+		bm_err("%s:pdev id is %d error\n", __func__, pdev->id);
+		return  -EINVAL;
+	}
+
+	drvdata = devm_kzalloc(&pdev->dev,sizeof(struct bm_csi_drvdata), GFP_KERNEL);
+	if (drvdata == NULL) {
+		bm_err("%s:alloc struct drvdata error\n", __func__);
+		return  -ENOMEM;
+	}
+
+	iores_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	drvdata->base = devm_ioremap_resource(&pdev->dev, iores_mem);
+	bm_info("%s: [%s%d]: drvdata->base=0x%px, phy_addr base=0x%llx\n", __func__,
+		BM_DRIVER_NAME, pdev->id, drvdata->base, iores_mem->start);
+	drvdata->device_idx = pdev->id;
+	mutex_init(&drvdata->mutex);
+	drvdata->irq_num = platform_get_irq(pdev, 0);
+	bm_info("%s:[%s%d]: pdriver_dev->irq_num=%d\n", __func__, "BM_CSI", pdev->id, drvdata->irq_num);
+
+	platform_set_drvdata(pdev, drvdata);
+
+	if (pdev->id == 0) {
+		if (bm_driver_major == 0) {
+			ret = alloc_chrdev_region(&drvdata->devt, 0, BM_DRIVER_MAXCNT, BM_DRIVER_NAME);
+			if (ret != 0) {
+				bm_err("%s:alloc_chrdev_region error\n", __func__);
+				return ret;
+			}
+			bm_driver_major = MAJOR(drvdata->devt);
+			bm_driver_minor = MINOR(drvdata->devt);
+		} else {
+			drvdata->devt = MKDEV(bm_driver_major, bm_driver_minor);
+			ret = register_chrdev_region(drvdata->devt, BM_DRIVER_MAXCNT, BM_DRIVER_NAME);
+			if (ret) {
+				bm_err("%s:register_chrdev_region error\n", __func__);
+				return ret;
+			}
+		}
+
+		bm_driver_class = class_create(THIS_MODULE, BM_DRIVER_NAME);
+		if (IS_ERR(bm_driver_class)) {
+			bm_err("%s[%d]:class_create error!\n", __func__, __LINE__);
+			return -EINVAL;
+		}
+	}
+
+	drvdata->devt = MKDEV(bm_driver_major, bm_driver_minor + pdev->id);
+	cdev_init(&drvdata->cdev, &bm_csi_fops);
+	ret = cdev_add(&drvdata->cdev, drvdata->devt, 1);
+	if ( ret ) {
+		bm_err("%s[%d]:cdev_add error!\n", __func__, __LINE__);
+		return ret;
+	} else {
+		bm_info("%s[%d]:cdev_add OK, major=%d, minor=%d\n", __func__, __LINE__,
+			bm_driver_major, bm_driver_minor + pdev->id);
+	}
+	drvdata->class = bm_driver_class;
+	device_create(drvdata->class, NULL, drvdata->devt,
+		      drvdata, "%s%d", BM_DRIVER_NAME, pdev->id);
+
+    /*read version*/
+	value = readl(drvdata->base + 0x0);
+	bm_info("offset=04, value is:0x%08x\n", value);
+
+	//visys_addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+
+	visys_addr = devm_platform_ioremap_resource(pdev, 1);
+    dw_dphy_rx_probe(pdev, visys_addr);
+
+	drvdata->reset = visys_addr;
+    dw_csi_probe(pdev);
+
+	device_register_index++;
+	bm_info("exit %s:[%s%d]\n", __func__, BM_DRIVER_NAME, pdev->id);
+
+	return 0;
+}
+
+static int bm_csi_remove(struct platform_device *pdev)
+{
+	struct bm_csi_drvdata *drvdata;
+
+	bm_info("enter %s\n", __func__);
+    dw_dphy_rx_remove(pdev);
+    dw_csi_remove(pdev);
+
+	device_register_index--;
+	drvdata = platform_get_drvdata(pdev);
+	free_irq(drvdata->irq_num, drvdata);
+	cdev_del(&drvdata->cdev);
+	device_destroy(drvdata->class, drvdata->devt);
+	unregister_chrdev_region(drvdata->devt, BM_DRIVER_MAXCNT);
+	mutex_destroy(&drvdata->mutex);
+	if (device_register_index == 0) {
+		class_destroy(drvdata->class);
+	}
+	devm_kfree(&pdev->dev, drvdata);
+
+	bm_info("exit %s\n", __func__);
+	return 0;
+}
+
+static const struct of_device_id bm_csi_of_match[] = {
+	{ .compatible = "thead,light-bm-csi", },
+	{ /* sentinel */ },
+};
+
+static struct platform_driver bm_csi_driver = {
+	.probe		= bm_csi_probe,
+	.remove		= bm_csi_remove,
+	.driver = {
+		.name  = BM_DRIVER_NAME,
+		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(bm_csi_of_match),
+	}
+};
+
+static int __init bm_csi_init_module(void)
+{
+	int ret = 0;
+
+	bm_info("enter %s\n", __func__);
+	ret = platform_driver_register(&bm_csi_driver);
+	if (ret) {
+		bm_err("register platform driver failed.\n");
+		return ret;
+	}
+
+	return ret;
+}
+
+static void __exit bm_csi_exit_module(void)
+{
+	bm_info("enter %s\n", __func__);
+	platform_driver_unregister(&bm_csi_driver);
+}
+
+module_init(bm_csi_init_module);
+module_exit(bm_csi_exit_module);
+
+MODULE_AUTHOR("Liu Yitong");
+MODULE_DESCRIPTION("BAREMETAL-CSI");
+MODULE_LICENSE("GPL");

+ 155 - 0
vvcam/native/csi/bm_csi_hw.c

@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <asm/io.h>
+
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+
+#include <linux/timer.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/ioctl.h>
+#include <linux/poll.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+#include <linux/interrupt.h>
+
+#include <linux/of.h>
+
+#include "bm_printk.h"
+#include "bm_csi_ioctl.h"
+#include "bm_csi_hw.h"
+#include "dw-dphy-rx.h"
+#include "bm_csi_dphy.h"
+
+#define check_retval(x)\
+	do {\
+		if ((x))\
+			return -EIO;\
+	} while (0)
+
+int bm_csi_write_reg(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	struct bm_csi_reg_t reg;
+	check_retval(copy_from_user(&reg, args, sizeof(reg)));
+	writel(reg.value, drvdata->base + reg.offset);
+	bm_info("%s  addr 0x%08x val 0x%08x\n", __func__, reg.offset, reg.value);
+	return 0;
+}
+
+int bm_csi_read_reg(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	struct bm_csi_reg_t reg;
+	check_retval(copy_from_user(&reg, args, sizeof(reg)));
+	reg.value = readl(drvdata->base + reg.offset);
+	check_retval(copy_to_user(args, &reg, sizeof(reg)));
+	bm_info("%s  addr 0x%08x val 0x%08x\n", __func__, reg.offset, reg.value);
+	return 0;
+}
+
+int bm_csi_init(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: csi init\n", __func__);
+	return 0;
+}
+
+int bm_csi_exit(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: csi exit\n", __func__);
+	return 0;
+}
+
+int bm_csi_reset(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: csi reset success\n", __func__);
+    dw_csi_soc_reset(drvdata->reset);
+    //bm_csi_dphy_reset();
+	return 0;
+}
+
+static int csi_power_on_sta = 0;
+int bm_csi_set_power(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: csi set power\n", __func__);
+	check_retval(copy_from_user(&csi_power_on_sta, args, sizeof(csi_power_on_sta)));
+    dw_mipi_csi_s_power(&drvdata->csi_dev, csi_power_on_sta);
+	return 0;
+}
+
+int bm_csi_get_power(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: csi get power\n", __func__);
+	check_retval(copy_to_user(args, &csi_power_on_sta, sizeof(csi_power_on_sta)));
+	return 0;
+}
+
+int bm_csi_set_clock(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+    bm_info("%s: \n", __func__);
+	check_retval(copy_to_user(args, &csi_power_on_sta, sizeof(csi_power_on_sta)));
+	return 0;
+}
+
+int bm_csi_get_clock(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_set_stream(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_get_stream(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_set_fmt(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_get_fmt(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_set_vc_select(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_get_vc_select(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}
+
+int bm_csi_set_lane_cfg(struct bm_csi_drvdata *drvdata, void *__user args)
+{
+	bm_info("%s: \n", __func__);
+	return 0;
+}

+ 66 - 0
vvcam/native/csi/bm_csi_hw.h

@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _BM_CSI_HW_H_
+#define _BM_CSI_HW_H_
+
+#include <linux/cdev.h>
+#include <linux/ioctl.h>
+#include "dw-dphy-rx.h"
+#include "dw-mipi-csi.h"
+#include "dw-csi-data.h"
+#include "dw-dphy-data.h"
+
+struct bm_csi_drvdata {
+	struct cdev cdev;
+	dev_t devt;
+	struct class *class;
+	struct mutex mutex;
+	unsigned int device_idx;
+	void __iomem *base;
+	void __iomem *reset;
+    struct dw_dphy_rx *dphy;
+    struct dw_csi csi_dev;
+	struct dw_csih_pdata csi_pdata;
+    struct dw_phy_pdata dphy_pdata;
+	int irq_num;
+	void *private;	// can be bm_csi_drvdata_private, but not use now
+};
+
+struct bm_csi_drvdata_private {
+	int private_tmp;
+};
+
+int bm_csi_write_reg(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_read_reg(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_init(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_exit(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_reset(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_power(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_get_power(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_clock(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_get_clock(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_stream(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_get_stream(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_fmt(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_get_fmt(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_vc_select(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_get_vc_select(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_set_lane_cfg(struct bm_csi_drvdata *drvdata, void *__user args);
+
+/*csi dphy*/
+int bm_csi_dphy_write_reg(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_dphy_init(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_dphy_uinit(struct bm_csi_drvdata *drvdata, void *__user args);
+int bm_csi_dphy_reset(struct bm_csi_drvdata *drvdata, void *__user args);
+
+void dw_csi_soc_reset(void __iomem *io_mem);
+int dw_csi_probe(struct platform_device *pdev);
+int dw_csi_remove(struct platform_device *pdev);
+
+#endif /* _BM_CSI_HW_H_*/

+ 39 - 0
vvcam/native/csi/bm_csi_ioctl.h

@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: liuyitong <yitong.lyt@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _BM_CSI_IOCTL_H_
+#define _BM_CSI_IOCTL_H_
+
+#include <linux/ioctl.h>
+
+enum {
+    BMCSI_IOC_S_RESET = 0x100,
+    BMCSI_IOC_S_POWER,
+    BMCSI_IOC_G_POWER,
+    BMCSI_IOC_S_CLOCK,
+    BMCSI_IOC_G_CLOCK,
+    BMCSI_IOC_S_STREAM,
+    BMCSI_IOC_G_STREAM,
+    BMCSI_IOC_S_FMT,
+    BMCSI_IOC_G_FMT,
+    BMCSI_IOC_S_VC_SELECT,
+    BMCSI_IOC_G_VC_SELECT,
+    BMCSI_IOC_S_LANE_CFG,
+    BMCSI_IOC_INIT,
+    BMCSI_IOC_EXIT,
+    BMCSI_IOC_WRITE_REG,
+    BMCSI_IOC_READ_REG,
+    BMCSI_IOC_MAX,
+};
+
+struct bm_csi_reg_t {
+	unsigned int offset;
+	unsigned int value;
+};
+
+#endif /* _BM_CSI_IOCTL_H_*/

+ 46 - 0
vvcam/native/csi/bm_printk.h

@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2021 Alibaba Group Holding Limited
+ * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __BM_PRINTK__
+#define __BM_PRINTK__
+
+#include <stdarg.h>
+#include <linux/init.h>
+#include <linux/kern_levels.h>
+#include <linux/linkage.h>
+#include <linux/cache.h>
+
+/*
+ * These can be used to print at the various log levels.
+ * All of these will print unconditionally, although note that pr_debug()
+ * and other debug macros are compiled out unless either DEBUG is defined
+ * or CONFIG_DYNAMIC_DEBUG is set.
+ */
+#define bm_emerg(fmt, ...) \
+	printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_alert(fmt, ...) \
+	printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_crit(fmt, ...) \
+	printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_err(fmt, ...) \
+	printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_warning(fmt, ...) \
+	printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_warn pr_warning
+
+#ifdef DEBUG
+#define bm_notice(fmt, ...) \
+	printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
+#define bm_info(fmt, ...) \
+	printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
+#else
+#define bm_notice(fmt, ...)
+#define bm_info(fmt, ...)
+#endif
+
+#endif /* __BM_PRINTK__ */

+ 64 - 0
vvcam/native/csi/csi_common.h

@@ -0,0 +1,64 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#ifndef  _CSI_COMMON_H_
+#define _CSI_COMMON_H_
+
+extern int vvnative_csi_module_init(void * dev);
+extern int vvnative_csi_module_exit(void * dev);
+
+extern int vvnative_csi_set_stream_control(void * dev);
+extern int vvnative_csi_set_cfg(void * dev);
+extern int vvnative_csi_set_bit_shift(void *dev);
+
+#endif

+ 91 - 0
vvcam/native/csi/csi_ioctl.c

@@ -0,0 +1,91 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#include <linux/module.h>
+#include <linux/uaccess.h>
+#include "csi_ioctl.h"
+#include "csi_common.h"
+
+long csi_priv_ioctl(struct vvcam_csi_dev *dev, unsigned int cmd, void __user *args)
+{
+	long ret = 0;
+
+	switch (cmd)
+	{
+		case VVCSI_IOC_S_STREAM:
+			copy_from_user(&dev->streaming_enable, args, sizeof(dev->streaming_enable));
+			ret = vvnative_csi_set_stream_control(dev);
+			break;
+
+		case VVCSI_IOC_S_LANE_CFG:
+			copy_from_user(&dev->csi_lane_cfg, args, sizeof(dev->csi_lane_cfg));
+			ret = vvnative_csi_set_cfg(dev);
+			break;
+
+		case VVCSI_IOC_S_BIT_SHIFT:
+			copy_from_user(&dev->bit_width, args, sizeof(dev->bit_width));
+			ret = vvnative_csi_set_bit_shift(dev);
+			break;
+
+		default:
+			ret = 0;
+			break;
+
+	}
+
+	return ret;
+}
+
+
+
+

+ 143 - 0
vvcam/native/csi/csi_ioctl.h

@@ -0,0 +1,143 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _CSI_IOC_H_
+#define _CSI_IOC_H_
+
+#ifndef __KERNEL__
+#include <stdint.h>
+#endif
+#include <linux/ioctl.h>
+
+enum {
+	VVCSI_IOC_S_RESET = _IO('r', 0),
+	VVCSI_IOC_S_POWER,
+	VVCSI_IOC_G_POWER,
+	VVCSI_IOC_S_CLOCK,
+	VVCSI_IOC_G_CLOCK,
+	VVCSI_IOC_S_STREAM,
+	VVCSI_IOC_G_STREAM,
+	VVCSI_IOC_S_FMT,
+	VVCSI_IOC_G_FMT,
+	VVCSI_IOC_S_VC_SELECT,
+	VVCSI_IOC_G_VC_SELECT,
+	VVCSI_IOC_S_LANE_CFG,
+	VVCSI_IOC_S_BIT_SHIFT,
+	VVCSI_IOC_MAX,
+};
+
+struct csi_vc_select_context {
+	uint32_t csi_vc_select_mode;
+	uint32_t vc_channel;
+};
+
+struct csi_format_context {
+	uint32_t format;
+	uint32_t width;
+	uint32_t height;
+};
+
+struct vvcam_csi_hardware_function_s
+{
+	int (*init)(void* dev);
+	int (*exit)(void* dev);
+	int (*reset)(void* dev);
+	int (*set_power)(void* dev);
+	int (*get_power)(void* dev);
+	int (*set_clock)(void* dev);
+	int (*get_clock)(void* dev);
+	int (*set_stream_control)(void* dev);
+	int (*get_stream_control)(void* dev);
+	int (*set_fmt)(void* dev);
+	int (*get_fmt)(void* dev);
+	int (*set_vc_select)(void* dev);
+	int (*get_vc_select)(void* dev);
+	int (*set_lane_cfg)(void* dev);
+};
+
+struct vvcam_csi_lane_cfg
+{
+	uint32_t mipi_lane_num;
+};
+
+#ifdef __KERNEL__
+
+struct vvcam_csi_dev {
+	void __iomem *base;
+	char name[16];
+
+	int present;
+	int device_idx;
+
+	uint32_t power_status;
+	uint32_t clock;
+	uint32_t bit_width;
+
+	uint32_t streaming_enable;
+	struct csi_vc_select_context csi_vc_select;
+	struct csi_format_context csi_format;
+	struct vvcam_csi_hardware_function_s csi_hard_func;
+	struct vvcam_csi_lane_cfg csi_lane_cfg;
+	void * csi_private;
+};
+
+// internal functions
+
+long csi_priv_ioctl(struct vvcam_csi_dev *dev, unsigned int cmd, void __user *args);
+
+#else
+//User space connections
+
+
+#endif
+
+#endif  // _CSI_IOC_H_

+ 0 - 0
vvcam/native/csi/dphy_gen


+ 31 - 0
vvcam/native/csi/dw-csi-data.h

@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 platform data
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#include <linux/kernel.h>
+#include "dw-mipi-csi-pltfrm.h"
+
+#ifndef __DW_CSI_DATA__
+#define __DW_CSI_DATA__
+
+struct dw_csih_pdata {
+	u8 eotp_enabled;
+	u32 hs_freq;
+	u32 lanes;
+	u32 pclk;
+	u32 fps;
+	u32 bpp;
+	u8 id;
+};
+
+static const struct pdata_names csis[] = {
+	{ .name = "dw-csi.0", },
+	{ .name = "dw-csi.1", },
+};
+
+#endif /*__DW_CSI_DATA__ */

+ 391 - 0
vvcam/native/csi/dw-csi-plat.c

@@ -0,0 +1,391 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host controller driver.
+ * Platform driver
+ *
+ * Author: Luis Oliveira <luis.oliveira@synopsys.com>
+ */
+
+#include "dw-csi-data.h"
+#include "dw-dphy-data.h"
+#include "dw-csi-plat.h"
+
+#include "bm_csi_hw.h"
+
+const struct mipi_dt csi_dt[] = {
+	{
+		.hex = CSI_2_YUV420_8,
+		.name = "YUV420_8bits",
+	}, {
+		.hex = CSI_2_YUV420_10,
+		.name = "YUV420_10bits",
+	}, {
+		.hex = CSI_2_YUV420_8_LEG,
+		.name = "YUV420_8bits_LEGACY",
+	}, {
+		.hex = CSI_2_YUV420_8_SHIFT,
+		.name = "YUV420_8bits_SHIFT",
+	}, {
+		.hex = CSI_2_YUV420_10_SHIFT,
+		.name = "YUV420_10bits_SHIFT",
+	}, {
+		.hex = CSI_2_YUV422_8,
+		.name = "YUV442_8bits",
+	}, {
+		.hex = CSI_2_YUV422_10,
+		.name = "YUV442_10bits",
+	}, {
+		.hex = CSI_2_RGB444,
+		.name = "RGB444",
+	}, {
+		.hex = CSI_2_RGB555,
+		.name = "RGB555",
+	}, {
+		.hex = CSI_2_RGB565,
+		.name = "RGB565",
+	}, {
+		.hex = CSI_2_RGB666,
+		.name = "RGB666",
+	}, {
+		.hex = CSI_2_RGB888,
+		.name = "RGB888",
+	}, {
+		.hex = CSI_2_RAW6,
+		.name = "RAW6",
+	}, {
+		.hex = CSI_2_RAW7,
+		.name = "RAW7",
+	}, {
+		.hex = CSI_2_RAW8,
+		.name = "RAW8",
+	}, {
+		.hex = CSI_2_RAW10,
+		.name = "RAW10",
+	}, {
+		.hex = CSI_2_RAW12,
+		.name = "RAW12",
+	}, {
+		.hex = CSI_2_RAW14,
+		.name = "RAW14",
+	}, {
+		.hex = CSI_2_RAW16,
+		.name = "RAW16",
+	},
+};
+
+static struct mipi_fmt *
+find_dw_mipi_csi_format(uint32_t mbus_code)
+{
+	unsigned int i;
+
+	pr_info("%s entered mbus: 0x%x\n", __func__, mbus_code);
+
+	for (i = 0; i < ARRAY_SIZE(dw_mipi_csi_formats); i++)
+		if (mbus_code == dw_mipi_csi_formats[i].mbus_code) {
+			pr_info("Found mbus 0x%x\n", dw_mipi_csi_formats[i].mbus_code);
+			return &dw_mipi_csi_formats[i];
+		}
+	return NULL;
+}
+
+static int dw_mipi_csi_enum_mbus_code(int index, uint32_t *code)
+{
+	if (index != 0)
+		return -EINVAL;
+
+	*code = dw_mipi_csi_formats[index].mbus_code;
+	return 0;
+}
+
+static struct mipi_fmt *
+dw_mipi_csi_try_format(uint32_t mbus_code)
+{
+	struct mipi_fmt *fmt;
+
+	fmt = find_dw_mipi_csi_format(mbus_code);
+	if (!fmt)
+		fmt = &dw_mipi_csi_formats[0];
+
+	return fmt;
+}
+
+struct mipi_fmt *
+dw_mipi_csi_get_format(struct dw_csi *dev)
+{
+	dev_info(dev->dev,
+		"%s got v4l2_mbus_pixelcode. 0x%x\n", __func__,
+		dev->fmt->mbus_code);
+	dev_info(dev->dev,
+		"%s got width. 0x%x\n", __func__,
+		dev->fmt->width);
+	dev_info(dev->dev,
+		"%s got height. 0x%x\n", __func__,
+		dev->fmt->height);
+    return dev->fmt;
+}
+
+static int
+dw_mipi_csi_set_fmt(struct platform_device *pdev,
+		    uint32_t mbus_code, uint32_t width, uint32_t height)
+{
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+    struct dw_csi *dev = &drvdata->csi_dev;
+
+	struct mipi_fmt *dev_fmt = NULL;
+	int i;
+	dev_info(dev->dev,
+		"%s got mbus_pixelcode. 0x%x\n", __func__,
+		mbus_code);
+
+	dev_fmt = dw_mipi_csi_try_format(mbus_code);
+
+	dev_info(dev->dev,
+		"%s got v4l2_mbus_pixelcode. 0x%x\n", __func__,
+		dev_fmt->mbus_code);
+	if (!dev_fmt)
+		return -EINVAL;
+
+	if (dev_fmt) {
+		dev->fmt->mbus_code =  dev_fmt->mbus_code;
+        dev->fmt->width = width;
+        dev->fmt->height = height;
+		dw_mipi_csi_set_ipi_fmt(dev);
+	}
+	dev_info(dev->dev, "Width: %d, Height: %d of Demo\n", width, height);
+	if (width > 0 && height > 0) {
+        dw_mipi_csi_fill_timings(dev, width, height);
+/*
+		demo_writel(dev,
+			    DEMO_ACTIVE_WIDTH, fmt->format.width);
+		demo_writel(dev,
+			    DEMO_ACTIVE_HEIGHT, fmt->format.height);
+*/
+		dev_vdbg(dev->dev,
+			 "(core/demosaic) : width=%d/%d, height=%d/%d\n",
+			 dev->hw.htotal - (dev->hw.hbp
+					   + dev->hw.hsd
+					   + dev->hw.hsa),
+			 width,
+			 dev->hw.vactive,
+			 height);
+		dev_info(dev->dev,
+			 "(core/demosaic) : width=%d/%d, height=%d/%d\n",
+			 dev->hw.htotal - (dev->hw.hbp
+					   + dev->hw.hsd
+					   + dev->hw.hsa),
+			 width,
+			 dev->hw.vactive,
+			 height);
+
+	} else {
+		dev_vdbg(dev->dev, "%s unacceptable values 0x%x.\n",
+		       __func__, width);
+		dev_vdbg(dev->dev, "%s unacceptable values 0x%x.\n",
+		       __func__, height);
+		dev_info(dev->dev, "%s unacceptable values 0x%x.\n",
+		       __func__, width);
+		dev_info(dev->dev, "%s unacceptable values 0x%x.\n",
+		       __func__, height);
+		return -EINVAL;
+	}
+
+	for (i = 0; i < ARRAY_SIZE(csi_dt); i++)
+		if (csi_dt[i].hex == dev->ipi_dt) {
+			dev_vdbg(dev->dev, "Using data type %s\n",
+				 csi_dt[i].name);
+			dev_info(dev->dev, "Using data type %s\n",
+				 csi_dt[i].name);
+		}
+	return 0;
+}
+
+static int
+dw_mipi_csi_get_fmt(struct platform_device *pdev,
+                    struct mipi_fmt *fmt)
+{
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+    struct dw_csi *dev = &drvdata->csi_dev;
+
+    struct mipi_fmt *mf = dw_mipi_csi_get_format(dev);
+	if (!mf)
+		return -EINVAL;
+
+	mutex_lock(&dev->lock);
+	*fmt = *mf;
+	mutex_unlock(&dev->lock);
+
+	return 0;
+}
+
+int dw_mipi_csi_s_power(struct dw_csi *dev, int on)
+{
+	dev_info(dev->dev, "%s: on=%d\n", __func__, on);
+
+	if (on) {
+		dw_mipi_csi_hw_stdby(dev);
+		dw_mipi_csi_start(dev);
+	} else {
+		phy_power_off(dev->phy);
+		dw_mipi_csi_mask_irq_power_off(dev);
+		/* reset data type */
+		dev->ipi_dt = 0x0;
+	}
+	return 0;
+}
+
+int dw_mipi_csi_log_status(struct dw_csi *dev)
+{
+	dw_mipi_csi_dump(dev);
+
+	return 0;
+}
+
+#if IS_ENABLED(CONFIG_VIDEO_ADV_DEBUG)
+int
+dw_mipi_csi_g_register(struct v4l2_subdev *sd, uint32_t reg)
+{
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+    struct dw_csi *dev = &drvdata->csi_dev;
+
+	dev_vdbg(dev->dev, "%s: reg=%llu\n", __func__, reg);
+	reg->val = dw_mipi_csi_read(dev, reg);
+
+	return 0;
+}
+#endif
+
+#if  0
+static int dw_mipi_csi_init_cfg(struct v4l2_subdev *sd,
+				struct v4l2_subdev_pad_config *cfg)
+{
+	struct v4l2_mbus_framefmt *format =
+	    v4l2_subdev_get_try_format(sd, cfg, 0);
+
+	format->colorspace = V4L2_COLORSPACE_SRGB;
+	format->code = MEDIA_BUS_FMT_RGB888_1X24;
+	format->field = V4L2_FIELD_NONE;
+
+	return 0;
+}
+#endif
+
+static irqreturn_t dw_mipi_csi_irq1(int irq, void *dev_id)
+{
+	struct dw_csi *csi_dev = dev_id;
+
+	dw_mipi_csi_irq_handler(csi_dev);
+
+	return IRQ_HANDLED;
+}
+
+void dw_csi_soc_reset(void __iomem *io_mem)
+{
+#define VISYS_SW_RST 0x100
+    uint32_t  reg_val = 0;
+    reg_val = readl(io_mem + VISYS_SW_RST);
+    reg_val &= ~(1 << 16);
+    writel(reg_val, io_mem + VISYS_SW_RST);
+    reg_val |= 1 << 16;
+    writel(reg_val, io_mem + VISYS_SW_RST);
+}
+
+static const struct of_device_id dw_mipi_csi_of_match[];
+
+int dw_csi_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct dw_csi *csi;
+    struct dw_dphy_rx *dphy;
+    struct dw_csih_pdata *pdata;
+    struct bm_csi_drvdata *drvdata;
+	int ret;
+
+    if (!IS_ENABLED(CONFIG_OF))
+
+	dev_vdbg(dev, "Probing started\n");
+
+	/* Resource allocation */
+    drvdata  = platform_get_drvdata(pdev);
+
+    csi = &drvdata->csi_dev;
+    dphy = drvdata->dphy;
+    pdata = &drvdata->csi_pdata;
+
+	mutex_init(&csi->lock);
+	spin_lock_init(&csi->slock);
+	csi->dev = dev;
+
+    /*set csi phy*/
+    csi->phy = dphy->phy;
+	csi->base_address = drvdata->base;
+	if (IS_ERR(csi->base_address)) {
+		dev_err(dev, "base address not set.\n");
+		return PTR_ERR(csi->base_address);
+	}
+
+	csi->ctrl_irq_number = drvdata->irq_num;
+	if (csi->ctrl_irq_number < 0) {
+		dev_err(dev, "irq number %d not set.\n", csi->ctrl_irq_number);
+		ret = csi->ctrl_irq_number;
+		goto end;
+	}
+
+	ret = devm_request_irq(dev, csi->ctrl_irq_number,
+			       dw_mipi_csi_irq1, IRQF_SHARED,
+			       dev_name(dev), csi);
+	if (ret) {
+		dev_err(dev, "irq csi %d failed\n", pdata->id);
+		goto end;
+	}
+
+	csi->fmt = &dw_mipi_csi_formats[0];
+	csi->fmt->mbus_code = dw_mipi_csi_formats[0].mbus_code;
+/*
+ to do pad init
+*/
+    csi->hw.num_lanes = pdata->lanes;
+	csi->hw.pclk = pdata->pclk;
+	csi->hw.fps = pdata->fps;
+	csi->hw.dphy_freq = pdata->hs_freq;
+
+    //csi soc reset
+    dw_csi_soc_reset(drvdata->reset);
+    #if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	dw_csi_create_capabilities_sysfs(pdev);
+#endif
+	dw_mipi_csi_get_version(csi);
+	dw_mipi_csi_specific_mappings(csi);
+	dw_mipi_csi_mask_irq_power_off(csi);
+
+	dev_info(dev, "DW MIPI CSI-2 Host registered successfully HW v%u.%u\n",
+		 csi->hw_version_major, csi->hw_version_minor);
+
+	ret = phy_init(csi->phy);
+	if (ret) {
+		dev_err(&csi->phy->dev, "phy init failed --> %d\n", ret);
+		goto end;
+	}
+
+	return 0;
+end:
+	return ret;
+}
+
+int dw_csi_remove(struct platform_device *pdev)
+{
+    struct bm_csi_drvdata *drvdata;
+    drvdata  = platform_get_drvdata(pdev);
+    dw_csi_remove_capabilities_sysfs(pdev);
+	//struct dw_csi *mipi_csi = &drvdata->csi_dev;
+    //csi soc reset
+    dw_csi_soc_reset(drvdata->reset);
+    dev_info(&pdev->dev, "DW MIPI CSI-2 Host module removed\n");
+
+	return 0;
+}
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Luis Oliveira <luis.oliveira@synopsys.com>");
+MODULE_DESCRIPTION("Synopsys DesignWare MIPI CSI-2 Host Platform driver");

+ 146 - 0
vvcam/native/csi/dw-csi-plat.h

@@ -0,0 +1,146 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018 Synopsys, Inc.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host controller driver.
+ * Supported bus formats
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#ifndef _DW_CSI_PLAT_H__
+#define _DW_CSI_PLAT_H__
+
+#include "dw-mipi-csi.h"
+
+/** Color Space Converter Block **/
+#define CSC_UNIT_NR 1
+#define CSC_COREID 0x0000
+#define CSC_CFG 0x0004
+#define CSC_COEF_A(x) (0x0008 + ((x) * 4))
+#define CSC_COEF_B(x) (0x0018 + ((x) * 4))
+#define CSC_COEF_C(x) (0x0028 + ((x) * 4))
+#define CSC_LIMIT_DN 0x0038
+#define CSC_LIMIT_UP 0x003C
+#define CSC_VID_CFG 0x0040
+
+/** Demosaic Block **/
+#define DEMO_CONTROL 0x0
+#define DEMO_GLOBAL_INT_EN 0x4
+#define DEMO_IP_INT_EN_REG 0x8
+#define DEMO_IP_INT_SATUS_REG 0xC
+#define DEMO_ACTIVE_WIDTH 0x10
+#define DEMO_ACTIVE_HEIGHT 0x18
+#define DEMO_BAYER_PHASE 0x28//0x20
+
+#define BAYER_RGGB 0x0
+#define BAYER_GRBG 0x1
+#define BAYER_GBRG 0x2
+#define BAYER_BGGR 0x3
+
+/* Video formats supported by the MIPI CSI-2 */
+static struct mipi_fmt dw_mipi_csi_formats[] = {
+	{
+		/* RAW 8 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,
+		.depth = 8,
+	}, {
+		/* RAW 6 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR6_1X8,
+		.depth = 8,
+	}, {
+		/* RAW 7 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR7_1X8,
+		.depth = 8,
+	}, {
+		/* RAW 10 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
+		.depth = 10,
+	}, {
+		/* RAW 8 */
+		.mbus_code = 0x3001,
+		.depth = 8,
+	}, {
+		/* RAW 12 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
+		.depth = 12,
+	}, {
+		/* RAW 14 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR14_1X14,
+		.depth = 14,
+	}, {
+		/* RAW 16 */
+		.mbus_code = MEDIA_BUS_FMT_SBGGR16_1X16,
+		.depth = 16,
+	}, {
+		/* RGB 666 */
+		.mbus_code = MEDIA_BUS_FMT_RGB666_1X18,
+		.depth = 18,
+	}, {
+		/* RGB 565 */
+		.mbus_code = MEDIA_BUS_FMT_RGB565_2X8_BE,
+		.depth = 16,
+	}, {
+		/* BGR 565 */
+		.mbus_code = MEDIA_BUS_FMT_RGB565_2X8_LE,
+		.depth = 16,
+	}, {
+		/* RGB 555 */
+		.mbus_code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE,
+		.depth = 16,
+	}, {
+		/* BGR 555 */
+		.mbus_code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE,
+		.depth = 16,
+	}, {
+		/* RGB 444 */
+		.mbus_code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE,
+		.depth = 16,
+	}, {
+		/* RGB 444 */
+		.mbus_code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE,
+		.depth = 16,
+	}, {
+		/* RGB 888 */
+		.mbus_code = MEDIA_BUS_FMT_RGB888_2X12_LE,
+		.depth = 24,
+	}, {
+		/* BGR 888 */
+		.mbus_code = MEDIA_BUS_FMT_RGB888_2X12_BE,
+		.depth = 24,
+	}, {
+		/* BGR 888 */
+		.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
+		.depth = 24,
+	}, {
+		/* YUV 422 8-bit */
+		.mbus_code = MEDIA_BUS_FMT_VYUY8_1X16,
+		.depth = 16,
+	}, {
+		/* YUV 422 10-bit */
+		.mbus_code = MEDIA_BUS_FMT_UYVY10_1X20,
+		.depth = 24,
+	}, {
+		/* YUV 420 8-bit LEGACY */
+		.mbus_code = MEDIA_BUS_FMT_Y8_1X8,
+		.depth = 8,
+	}, {
+		/* YUV 420 8-bit LEGACY */
+		.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
+		.depth = 24,
+	}, {
+		/* YUV 420 10-bit */
+		.mbus_code = MEDIA_BUS_FMT_VUY8_1X24,
+		.depth = 24,
+	}, {
+		/* YUV 420 8-bit */
+		.mbus_code = MEDIA_BUS_FMT_UYVY8_1X16,
+		.depth = 24,
+	}, {
+		/* YUV 420 10-bit */
+		.mbus_code = MEDIA_BUS_FMT_Y10_1X10,
+		.depth = 10,
+	},
+};
+
+#endif /* _DW_CSI_PLAT_H__ */

+ 673 - 0
vvcam/native/csi/dw-csi-sysfs.c

@@ -0,0 +1,673 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host controller driver.
+ * SysFS components for the platform driver
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#include "dw-mipi-csi.h"
+#include "bm_csi_hw.h"
+
+static ssize_t core_version_show(struct device *dev,
+				 struct device_attribute *attr,
+				 char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "v.%d.%d*\n", csi_dev->hw_version_major,
+		 csi_dev->hw_version_minor);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t n_lanes_store(struct device *dev, struct device_attribute *attr,
+			     const char *buf, size_t count)
+{
+	int ret;
+	unsigned long lanes;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &lanes);
+	if (ret < 0)
+		return ret;
+
+	if (lanes > 8) {
+		dev_err(dev, "Invalid number of lanes %lu\n", lanes);
+		return count;
+	}
+
+	dev_info(dev, "Lanes %lu\n", lanes);
+	csi_dev->hw.num_lanes = lanes;
+
+	return count;
+}
+
+static ssize_t n_lanes_show(struct device *dev,
+			    struct device_attribute *attr,
+			    char *buf)
+{
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.num_lanes);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t core_reset_show(struct device *dev,
+			       struct device_attribute *attr,
+			       char *buf)
+{
+
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	/* Reset Controller and DPHY */
+	phy_reset(csi_dev->phy);
+	dw_mipi_csi_reset(csi_dev);
+
+	snprintf(buffer, 10, "Reset\n");
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t data_type_store(struct device *dev,
+			       struct device_attribute *attr,
+			       const char *buf, size_t count)
+{
+	int ret;
+	unsigned long dt;
+
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &dt);
+	if (ret < 0)
+		return ret;
+
+	if (dt < 0x18 || dt > 0x2F) {
+		dev_err(dev, "Invalid data type %lx\n", dt);
+		return count;
+	}
+
+	dev_info(dev, "Data type 0x%lx\n", dt);
+	csi_dev->ipi_dt = dt;
+
+    dw_mipi_csi_set_ipi_fmt(csi_dev);
+
+	return count;
+}
+
+static ssize_t data_type_show(struct device *dev,
+			      struct device_attribute *attr,
+			      char *buf)
+{
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->ipi_dt);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t hsa_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long hsa;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &hsa);
+	if (ret < 0)
+		return ret;
+
+	if (hsa > 0xFFF) {
+		dev_err(dev, "Invalid HSA time %lx\n", hsa);
+		return count;
+	}
+
+	dev_info(dev, "HSA time 0x%lx\n", hsa);
+	csi_dev->hw.hsa = hsa;
+
+	return count;
+}
+
+static ssize_t hsa_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.hsa);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t hbp_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long hbp;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &hbp);
+	if (ret < 0)
+		return ret;
+
+	if (hbp > 0xFFF) {
+		dev_err(dev, "Invalid HBP time %lx\n", hbp);
+		return count;
+	}
+
+	dev_info(dev, "HBP time 0x%lx\n", hbp);
+	csi_dev->hw.hbp = hbp;
+
+	return count;
+}
+
+static ssize_t hbp_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.hbp);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t hsd_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long hsd;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &hsd);
+	if (ret < 0)
+		return ret;
+
+	if (hsd > 0xFFF) {
+		dev_err(dev, "Invalid HSD time %lx\n", hsd);
+		return count;
+	}
+
+	dev_info(dev, "HSD time 0x%lx\n", hsd);
+	csi_dev->hw.hsd = hsd;
+
+	return count;
+}
+
+static ssize_t hsd_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.hsd);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t vsa_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long vsa;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &vsa);
+	if (ret < 0)
+		return ret;
+
+	if (vsa > 0x3FF) {
+		dev_err(dev, "Invalid VSA period %lx\n", vsa);
+		return count;
+	}
+
+	dev_info(dev, "VSA period 0x%lx\n", vsa);
+	csi_dev->hw.vsa = vsa;
+
+	return count;
+}
+
+static ssize_t vsa_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.vsa);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t vbp_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long vbp;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &vbp);
+	if (ret < 0)
+		return ret;
+
+	if (vbp > 0x2FF) {
+		dev_err(dev, "Invalid VBP period %lx\n", vbp);
+		return count;
+	}
+
+	dev_info(dev, "VBP period 0x%lx\n", vbp);
+	csi_dev->hw.vbp = vbp;
+
+	return count;
+}
+
+static ssize_t vbp_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.vbp);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t vfp_store(struct device *dev,
+			 struct device_attribute *attr,
+			 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long vfp;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 16, &vfp);
+	if (ret < 0)
+		return ret;
+
+	if (vfp > 0x3ff) {
+		dev_err(dev, "Invalid VFP period %lx\n", vfp);
+		return count;
+	}
+
+	dev_info(dev, "VFP period 0x%lx\n", vfp);
+	csi_dev->hw.vfp = vfp;
+
+	return count;
+}
+
+static ssize_t vfp_show(struct device *dev,
+			struct device_attribute *attr,
+			char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%x\n", csi_dev->hw.vfp);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t virtual_channel_store(struct device *dev,
+				     struct device_attribute *attr,
+				     const char *buf, size_t count)
+{
+	int ret;
+	unsigned long virtual_ch;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &virtual_ch);
+	if (ret < 0)
+		return ret;
+
+	if ((signed int)virtual_ch < 0 || (signed int)virtual_ch > 8) {
+		dev_err(dev, "Invalid Virtual Channel %lu\n", virtual_ch);
+		return count;
+	}
+
+	dev_info(dev, "Virtual Channel %lu\n", virtual_ch);
+	csi_dev->hw.virtual_ch = virtual_ch;
+
+	return count;
+}
+
+static ssize_t virtual_channel_show(struct device *dev,
+				    struct device_attribute *attr,
+				    char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.virtual_ch);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t ipi_color_mode_store(struct device *dev,
+				    struct device_attribute *attr,
+				    const char *buf, size_t count)
+{
+	int ret;
+	unsigned long ipi_color_mode;
+
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &ipi_color_mode);
+	if (ret < 0)
+		return ret;
+
+	if ((signed int)ipi_color_mode < 0 || (signed int)ipi_color_mode > 1) {
+		dev_err(dev,
+			"Wrong Color Mode %lu, (48 bits -> 0 or 16 bits -> 1\n",
+			ipi_color_mode);
+		return count;
+	}
+
+	dev_info(dev, "IPI Color mode %lu\n", ipi_color_mode);
+	csi_dev->hw.ipi_color_mode = ipi_color_mode;
+
+	return count;
+}
+
+static ssize_t ipi_color_mode_show(struct device *dev,
+				   struct device_attribute *attr,
+				   char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.ipi_color_mode);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t ipi_auto_flush_store(struct device *dev,
+				    struct device_attribute *attr,
+				    const char *buf, size_t count)
+{
+	int ret;
+	unsigned long ipi_auto_flush;
+
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &ipi_auto_flush);
+	if (ret < 0)
+		return ret;
+
+	if ((signed int)ipi_auto_flush < 0 || (signed int)ipi_auto_flush > 1) {
+		dev_err(dev,
+			"Invalid Auto Flush Mode %lu, (No -> 0 or Yes -> 1\n",
+			ipi_auto_flush);
+		return count;
+	}
+
+	dev_info(dev, "IPI Auto Flush %lu\n", ipi_auto_flush);
+	csi_dev->hw.ipi_auto_flush = ipi_auto_flush;
+
+	return count;
+}
+
+static ssize_t ipi_auto_flush_show(struct device *dev,
+				   struct device_attribute *attr,
+				   char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.ipi_auto_flush);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t ipi_timings_mode_store(struct device *dev,
+				      struct device_attribute *attr,
+				      const char *buf, size_t count)
+{
+	int ret;
+	unsigned long ipi_mode;
+
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &ipi_mode);
+	if (ret < 0)
+		return ret;
+
+	if ((signed int)ipi_mode < 0 || (signed int)ipi_mode > 1) {
+		dev_err(dev,
+			"Invalid Timing Source %lu (Camera:0|Controller:1)\n",
+			ipi_mode);
+		return count;
+	}
+
+	dev_info(dev, "IPI Color mode %lu\n", ipi_mode);
+	csi_dev->hw.ipi_mode = ipi_mode;
+
+	return count;
+}
+
+static ssize_t ipi_timings_mode_show(struct device *dev,
+				     struct device_attribute *attr,
+				     char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.ipi_mode);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t output_type_store(struct device *dev,
+				 struct device_attribute *attr,
+				 const char *buf, size_t count)
+{
+	int ret;
+	unsigned long output;
+
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &output);
+	if (ret < 0)
+		return ret;
+
+	if ((signed int)output < 0 || (signed int)output > 1) {
+		dev_err(dev,
+			"Invalid Core output %lu to be used \
+			(IPI-> 0 or IDI->1 or BOTH- 2\n",
+			output);
+		return count;
+	}
+
+	dev_info(dev, "IPI Color mode %lu\n", output);
+	csi_dev->hw.output = output;
+
+	return count;
+}
+
+static ssize_t output_type_show(struct device *dev,
+				struct device_attribute *attr,
+				char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	char buffer[10];
+
+	snprintf(buffer, 10, "%d\n", csi_dev->hw.output);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t csi_power_store(struct device *dev,
+				 struct device_attribute *attr,
+				 const char *buf, size_t count)
+{
+
+	int ret;
+	unsigned long on;
+	struct platform_device *pdev = to_platform_device(dev);
+	struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_csi *csi_dev = &drvdata->csi_dev;
+
+	ret = kstrtoul(buf, 10, &on);
+	if (ret < 0)
+		return ret;
+
+    dw_mipi_csi_s_power(csi_dev, on);
+	printk("csi set power: %lu\n", on);
+
+	return count;
+}
+
+static DEVICE_ATTR_RO(core_version);
+static DEVICE_ATTR_RO(core_reset);
+static DEVICE_ATTR_RW(n_lanes);
+static DEVICE_ATTR_RW(data_type);
+static DEVICE_ATTR_RW(hsa);
+static DEVICE_ATTR_RW(hbp);
+static DEVICE_ATTR_RW(hsd);
+static DEVICE_ATTR_RW(vsa);
+static DEVICE_ATTR_RW(vbp);
+static DEVICE_ATTR_RW(vfp);
+static DEVICE_ATTR_RW(virtual_channel);
+static DEVICE_ATTR_RW(ipi_color_mode);
+static DEVICE_ATTR_RW(ipi_auto_flush);
+static DEVICE_ATTR_RW(ipi_timings_mode);
+static DEVICE_ATTR_RW(output_type);
+static DEVICE_ATTR_WO(csi_power);
+
+int dw_csi_create_capabilities_sysfs(struct platform_device *pdev)
+{
+	device_create_file(&pdev->dev, &dev_attr_core_version);
+	device_create_file(&pdev->dev, &dev_attr_core_reset);
+	device_create_file(&pdev->dev, &dev_attr_n_lanes);
+	device_create_file(&pdev->dev, &dev_attr_data_type);
+	device_create_file(&pdev->dev, &dev_attr_hsa);
+	device_create_file(&pdev->dev, &dev_attr_hbp);
+	device_create_file(&pdev->dev, &dev_attr_hsd);
+	device_create_file(&pdev->dev, &dev_attr_vsa);
+	device_create_file(&pdev->dev, &dev_attr_vbp);
+	device_create_file(&pdev->dev, &dev_attr_vfp);
+	device_create_file(&pdev->dev, &dev_attr_virtual_channel);
+	device_create_file(&pdev->dev, &dev_attr_ipi_color_mode);
+	device_create_file(&pdev->dev, &dev_attr_ipi_auto_flush);
+	device_create_file(&pdev->dev, &dev_attr_ipi_timings_mode);
+	device_create_file(&pdev->dev, &dev_attr_output_type);
+	device_create_file(&pdev->dev, &dev_attr_csi_power);
+
+	return 0;
+}
+
+int dw_csi_remove_capabilities_sysfs(struct platform_device *pdev)
+{
+	device_remove_file(&pdev->dev, &dev_attr_core_version);
+	device_remove_file(&pdev->dev, &dev_attr_core_reset);
+	device_remove_file(&pdev->dev, &dev_attr_n_lanes);
+	device_remove_file(&pdev->dev, &dev_attr_data_type);
+	device_remove_file(&pdev->dev, &dev_attr_hsa);
+	device_remove_file(&pdev->dev, &dev_attr_hbp);
+	device_remove_file(&pdev->dev, &dev_attr_hsd);
+	device_remove_file(&pdev->dev, &dev_attr_vsa);
+	device_remove_file(&pdev->dev, &dev_attr_vbp);
+	device_remove_file(&pdev->dev, &dev_attr_vfp);
+	device_remove_file(&pdev->dev, &dev_attr_virtual_channel);
+	device_remove_file(&pdev->dev, &dev_attr_ipi_color_mode);
+	device_remove_file(&pdev->dev, &dev_attr_ipi_auto_flush);
+	device_remove_file(&pdev->dev, &dev_attr_ipi_timings_mode);
+	device_remove_file(&pdev->dev, &dev_attr_output_type);
+	device_remove_file(&pdev->dev, &dev_attr_csi_power);
+
+	return 0;
+}

+ 36 - 0
vvcam/native/csi/dw-dphy-data.h

@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI D-PHY platform data
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#include <linux/phy/phy.h>
+#include <linux/kernel.h>
+#include <dw-mipi-csi-pltfrm.h>
+
+#ifndef __DW_DPHY_DATA_H__
+#define __DW_DPHY_DATA_H__
+
+struct dw_phy_pdata {
+	u32 dphy_frequency;
+	u8 dphy_te_len;
+	u32 config_8l;
+	u8 dphy_gen;
+	u8 phy_type;
+	u8 id;
+};
+
+static const struct pdata_names phys[] = {
+	{ .name = "phy-dw-dphy.0.0", },
+	{ .name = "phy-dw-dphy.1.1", },
+};
+
+struct dw_dphy_rx;
+
+struct plat_dw_dphy {
+	int (*get_resources)(struct device *dev, struct dw_dphy_rx *dphy);
+};
+#endif /*__DW_DPHY_DATA_H__ */

+ 148 - 0
vvcam/native/csi/dw-dphy-plat.c

@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI D-PHY controller driver.
+ * Platform driver
+ *
+ * Author: Luis Oliveira <luis.oliveira@synopsys.com>
+ */
+
+#include <dw-dphy-data.h>
+#include <dw-csi-data.h>
+#include "dw-dphy-rx.h"
+#include "bm_csi_hw.h"
+
+/* Global variable for compatibility mode, this could be override later */
+static int phy_type = 1; //Changed to fit single phy 0 - single | 1 - 8 lanes phy
+
+module_param(phy_type, int, 0664);
+MODULE_PARM_DESC(phy_type, "Disable compatibility mode for D-PHY G128");
+
+static struct phy_ops dw_dphy_ops = {
+	.init = dw_dphy_init,
+	.reset = dw_dphy_reset,
+	.power_on = dw_dphy_power_on,
+	.power_off = dw_dphy_power_off,
+	.owner = THIS_MODULE,
+};
+
+static int get_resources(struct device *dev, struct dw_dphy_rx *dphy)
+{
+	int ret = 0;
+
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata = platform_get_drvdata(pdev);
+	struct dw_phy_pdata *pdata = &drvdata->dphy_pdata;
+
+	dphy->dphy_freq = pdata->dphy_frequency;
+	dphy->dphy_te_len = pdata->dphy_te_len;
+	dphy->dphy_gen = pdata->dphy_gen;
+    drvdata->dphy = dphy;
+
+	return ret;
+}
+
+static int phy_register(struct device *dev)
+{
+	int ret = 0;
+    struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata = platform_get_drvdata(pdev);
+    struct dw_dphy_rx *dphy = drvdata->dphy;
+	struct dw_phy_pdata *pdata = &drvdata->dphy_pdata;
+
+	ret = phy_create_lookup(dphy->phy,
+					phys[pdata->id].name,
+					csis[pdata->id].name);
+	if (ret)
+		dev_err(dev, "Failed to create dphy lookup\n");
+	else
+		dev_warn(dev, "Created dphy lookup [%s] --> [%s]\n",
+		    phys[pdata->id].name, csis[pdata->id].name);
+
+
+	return ret;
+}
+
+static void phy_unregister(struct device *dev)
+{
+	if (!dev->of_node) {
+
+        struct platform_device *pdev = to_platform_device(dev);
+        struct bm_csi_drvdata *drvdata = platform_get_drvdata(pdev);
+        struct dw_dphy_rx *dphy = drvdata->dphy;
+	    struct dw_phy_pdata *pdata = &drvdata->dphy_pdata;
+
+		phy_remove_lookup(dphy->phy,
+				  phys[pdata->id].name, csis[pdata->id].name);
+		dev_warn(dev, "Removed dphy lookup [%s] --> [%s]\n",
+			 phys[pdata->id].name, csis[pdata->id].name);
+	}
+}
+
+#define REG_DPHY_OFFSET 0x40
+int dw_dphy_rx_probe(struct platform_device *pdev, void __iomem *dphy1_if_addr)
+{
+	struct device *dev = &pdev->dev;
+	struct dw_dphy_rx *dphy;
+    struct bm_csi_drvdata *drvdata;
+
+	dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL);
+	if (!dphy)
+		return -ENOMEM;
+
+	drvdata = platform_get_drvdata(pdev);
+	dphy->base_address = drvdata->base + REG_DPHY_OFFSET;
+    drvdata->dphy= dphy;
+	dphy->dphy1_if_addr = dphy1_if_addr;
+
+    if (IS_ERR(dphy->base_address)) {
+		dev_err(&pdev->dev, "error requesting base address\n");
+		return PTR_ERR(dphy->base_address);
+	}
+
+	if (get_resources(dev, dphy)) {
+		dev_err(dev, "failed to parse PHY resources\n");
+		return -EINVAL;
+	}
+
+	dphy->phy = devm_phy_create(dev, NULL, &dw_dphy_ops);
+	if (IS_ERR(dphy->phy)) {
+		dev_err(dev, "failed to create PHY\n");
+		return PTR_ERR(dphy->phy);
+	}
+
+	phy_set_drvdata(dphy->phy, dphy);
+
+	if (phy_register(dev)) {
+		dev_err(dev, "failed to register PHY\n");
+		return -EINVAL;
+	}
+
+	dphy->lp_time = 1000; /* 1000 ns */
+	dphy->lanes_config = dw_dphy_setup_config(dphy);
+
+	dev_info(&dphy->phy->dev, "Probing dphy finished\n");
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	dw_dphy_create_capabilities_sysfs(pdev);
+#endif
+
+	return 0;
+}
+
+int dw_dphy_rx_remove(struct platform_device *pdev)
+{
+    struct bm_csi_drvdata *drvdata = platform_get_drvdata(pdev);
+    struct dw_dphy_rx *dphy = drvdata->dphy;
+
+	dev_info(&dphy->phy->dev, "phy removed\n");
+	phy_unregister(&pdev->dev);
+    dw_dphy_remove_capabilities_sysfs(pdev);
+
+	return 0;
+}
+
+MODULE_DESCRIPTION("Synopsys DesignWare MIPI DPHY Rx driver");
+MODULE_AUTHOR("Luis Oliveira <lolivei@synopsys.com>");
+MODULE_LICENSE("GPL v2");

+ 622 - 0
vvcam/native/csi/dw-dphy-rx.c

@@ -0,0 +1,622 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI D-PHY controller driver
+ * Core functions
+ *
+ * Author: Luis Oliveira <luis.oliveira@synopsys.com>
+ */
+
+#include "dw-dphy-rx.h"
+#include "bm_csi_dphy.h"
+#include "bm_printk.h"
+
+struct range_dphy_gen2 {
+	u32 freq;
+	u8 hsfregrange;
+};
+
+struct range_dphy_gen2 range_gen2[] = {
+	{ 80, 0x00 }, { 90, 0x10 }, { 100, 0x20 }, { 110, 0x30 },
+	{ 120, 0x01 }, { 130, 0x11 }, { 140, 0x21 }, { 150, 0x31 },
+	{ 160, 0x02 }, { 170, 0x12 }, { 180, 0x22 }, { 190, 0x32 },
+	{ 205, 0x03 }, { 220, 0x13 }, { 235, 0x23 }, { 250, 0x33 },
+	{ 275, 0x04 }, { 300, 0x14 }, { 325, 0x05 }, { 350, 0x15 },
+	{ 400, 0x25 }, { 450, 0x06 }, { 500, 0x16 }, { 550, 0x07 },
+	{ 600, 0x17 }, { 650, 0x08 }, { 700, 0x18 }, { 750, 0x09 },
+	{ 800, 0x19 }, { 850, 0x29 }, { 900, 0x39 }, { 950, 0x0A },
+	{ 1000, 0x1A }, { 1050, 0x2A }, { 1100, 0x3A }, { 1150, 0x0B },
+	{ 1200, 0x1B }, { 1250, 0x2B }, { 1300, 0x3B }, { 1350, 0x0C },
+	{ 1400, 0x1C }, { 1450, 0x2C }, { 1500, 0x3C }, { 1550, 0x0D },
+	{ 1600, 0x1D }, { 1650, 0x2D }, { 1700, 0x0E }, { 1750, 0x1E },
+	{ 1800, 0x2E }, { 1850, 0x3E }, { 1900, 0x0F }, { 1950, 0x1F },
+	{ 2000, 0x2F },
+};
+
+struct range_dphy_gen3 {
+	u32 freq;
+	u8 hsfregrange;
+	u32 osc_freq_target;
+};
+
+struct range_dphy_gen3 range_gen3[] = {
+	{ 80, 0x00, 0x1B6 }, { 90, 0x10, 0x1B6 }, { 100, 0x20, 0x1B6 },
+	{ 110, 0x30, 0x1B6 }, { 120, 0x01, 0x1B6 }, { 130, 0x11, 0x1B6 },
+	{ 140, 0x21, 0x1B6 }, { 150, 0x31, 0x1B6 }, { 160, 0x02, 0x1B6 },
+	{ 170, 0x12, 0x1B6 }, { 180, 0x22, 0x1B6 }, { 190, 0x32, 0x1B6 },
+	{ 205, 0x03, 0x1B6 }, { 220, 0x13, 0x1B6 }, { 235, 0x23, 0x1B6 },
+	{ 250, 0x33, 0x1B6 }, { 275, 0x04, 0x1B6 }, { 300, 0x14, 0x1B6 },
+	{ 325, 0x25, 0x1B6 }, { 350, 0x35, 0x1B6 }, { 400, 0x05, 0x1B6 },
+	{ 450, 0x16, 0x1B6 }, { 500, 0x26, 0x1B6 }, { 550, 0x37, 0x1B6 },
+	{ 600, 0x07, 0x1B6 }, { 650, 0x18, 0x1B6 }, { 700, 0x28, 0x1B6 },
+	{ 750, 0x39, 0x1B6 }, { 800, 0x09, 0x1B6 }, { 850, 0x19, 0x1B6 },
+	{ 900, 0x29, 0x1B6 }, { 950, 0x3A, 0x1B6 }, { 1000, 0x0A, 0x1B6 },
+	{ 1050, 0x1A, 0x1B6 }, { 1100, 0x2A, 0x1B6 }, { 1150, 0x3B, 0x1B6 },
+	{ 1200, 0x0B, 0x1B6 }, { 1250, 0x1B, 0x1B6 }, { 1300, 0x2B, 0x1B6 },
+	{ 1350, 0x3C, 0x1B6 }, { 1400, 0x0C, 0x1B6 }, { 1450, 0x1C, 0x1B6 },
+	{ 1500, 0x2C, 0x1B6 }, { 1550, 0x3D, 0x10F }, { 1600, 0x0D, 0x118 },
+	{ 1650, 0x1D, 0x121 }, { 1700, 0x2E, 0x12A }, { 1750, 0x3E, 0x132 },
+	{ 1800, 0x0E, 0x13B }, { 1850, 0x1E, 0x144 }, { 1900, 0x2F, 0x14D },
+	{ 1950, 0x3F, 0x155 }, { 2000, 0x0F, 0x15E }, { 2050, 0x40, 0x167 },
+	{ 2100, 0x41, 0x170 }, { 2150, 0x42, 0x178 }, { 2200, 0x43, 0x181 },
+	{ 2250, 0x44, 0x18A }, { 2300, 0x45, 0x193 }, { 2350, 0x46, 0x19B },
+	{ 2400, 0x47, 0x1A4 }, { 2450, 0x48, 0x1AD }, { 2500, 0x49, 0x1B6 }
+};
+
+u8 dw_dphy_setup_config(struct dw_dphy_rx *dphy)
+{
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+#if 0
+	int ret;
+
+	if (dphy->max_lanes == CTRL_4_LANES) {
+		dev_vdbg(&dphy->phy->dev, "CONFIG 4L\n");
+		return CTRL_4_LANES;
+	}
+	if (IS_ENABLED(CONFIG_OF)) {
+		ret = gpio_request(dphy->config_8l, "config");
+		if (ret < 0) {
+			dev_vdbg(&dphy->phy->dev,
+				 "could not acquire config (err=%d)\n", ret);
+			return ret;
+		}
+		ret = gpio_get_value(dphy->config_8l);
+		gpio_free(dphy->config_8l);
+	} else {
+		ret = dphy->config_8l;
+	}
+
+	dev_vdbg(&dphy->phy->dev,
+		 "Booting in [%s] mode\n",
+		 ret == CTRL_8_LANES ? "8L" : "4+4L");
+	return ret;
+#endif
+#endif /* CONFIG_DWC_MIPI_TC_DPHY_GEN3 */
+	return CTRL_4_LANES;
+}
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+//extern int k_bm_visys_write_reg(uint32_t offset, uint32_t value);
+//extern int k_bm_visys_read_reg(uint32_t offset, uint32_t *value);
+
+void dw_dphy_if_write(struct dw_dphy_rx *dphy, u32 address, u32 data)
+{
+    writel(data, dphy->dphy1_if_addr + address);
+    //k_bm_visys_write_reg(address, data);
+}
+
+u32 dw_dphy_if_read(struct dw_dphy_rx *dphy, u32 address)
+{
+	u32 if1 = 0;
+    if1 = readl(dphy->dphy1_if_addr + address);
+    //k_bm_visys_read_reg(address, &if1);
+	return if1;
+}
+#endif
+
+void dw_dphy_write(struct dw_dphy_rx *dphy, u32 address, u32 data)
+{
+	iowrite32(data, dphy->base_address + address);
+
+	if (dphy->lanes_config == CTRL_4_LANES)
+		return;
+	return;
+
+	if (address == R_CSI2_DPHY_TST_CTRL0)
+		iowrite32(data, dphy->base_address + R_CSI2_DPHY2_TST_CTRL0);
+	else if (address == R_CSI2_DPHY_TST_CTRL1)
+		iowrite32(data, dphy->base_address + R_CSI2_DPHY2_TST_CTRL1);
+}
+
+u32 dw_dphy_read(struct dw_dphy_rx *dphy, u32 address)
+{
+	int dphy1 = 0, dphy2 = 0;
+
+	dphy1 = ioread32(dphy->base_address + address);
+
+	if (dphy->lanes_config == CTRL_4_LANES)
+		goto end;
+
+    goto end;
+
+	if (address == R_CSI2_DPHY_TST_CTRL0)
+		dphy2 = ioread32(dphy->base_address + R_CSI2_DPHY2_TST_CTRL0);
+	else if (address == R_CSI2_DPHY_TST_CTRL1)
+		dphy2 = ioread32(dphy->base_address + R_CSI2_DPHY2_TST_CTRL1);
+	else
+		return -ENODEV;
+end:
+	return dphy1;
+}
+
+void dw_dphy_write_msk(struct dw_dphy_rx *dev, u32 address, u32 data, u8 shift,
+		       u8 width)
+{
+	u32 temp = dw_dphy_read(dev, address);
+	u32 mask = (1 << width) - 1;
+
+	temp &= ~(mask << shift);
+	temp |= (data & mask) << shift;
+	dw_dphy_write(dev, address, temp);
+}
+
+static void dw_dphy_te_12b_write(struct dw_dphy_rx *dphy, u16 addr, u8 data)
+{
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0x00, PHY_TESTDIN, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, (u8)(addr >> 8),
+			  PHY_TESTDIN, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, (u8)addr, PHY_TESTDIN,
+			  8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, (u8)data, PHY_TESTDIN,
+			  8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+}
+
+static void dw_dphy_te_8b_write(struct dw_dphy_rx *dphy, u8 addr, u8 data)
+{
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_TST_CTRL1, addr);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_TST_CTRL1, data);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+}
+
+static void dw_dphy_te_write(struct dw_dphy_rx *dphy, u16 addr, u8 data)
+{
+    dphy->dphy_te_len = BIT12;
+	if (dphy->dphy_te_len == BIT12)
+		dw_dphy_te_12b_write(dphy, addr, data);
+	else
+		dw_dphy_te_8b_write(dphy, addr, data);
+}
+
+static int dw_dphy_te_12b_read(struct dw_dphy_rx *dphy, u32 addr)
+{
+	u8 ret;
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0x00, PHY_TESTDIN, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, (u8)(addr >> 8),
+			  PHY_TESTDIN, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, (u8)addr, PHY_TESTDIN,
+			  8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0x00, 0, PHY_TESTDIN);
+	ret = dw_dphy_read_msk(dphy, R_CSI2_DPHY_TST_CTRL1, PHY_TESTDOUT, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 1);
+
+	return ret;
+}
+
+static int dw_dphy_te_8b_read(struct dw_dphy_rx *dphy, u32 addr)
+{
+	u8 ret;
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 0);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 1, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, addr, PHY_TESTDIN, 8);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTEN, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL1, 0, PHY_TESTDIN, 8);
+	ret = dw_dphy_read_msk(dphy, R_CSI2_DPHY_TST_CTRL1, PHY_TESTDOUT, 8);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 1);
+
+	return ret;
+}
+
+int dw_dphy_te_read(struct dw_dphy_rx *dphy, u32 addr)
+{
+	int ret;
+
+	if (dphy->dphy_te_len == BIT12)
+		ret = dw_dphy_te_12b_read(dphy, addr);
+	else
+		ret = dw_dphy_te_12b_read(dphy, addr);
+		//ret = dw_dphy_te_8b_read(dphy, addr);
+
+	return ret;
+}
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+static void dw_dphy_if_init(struct dw_dphy_rx *dphy)
+{
+    bm_info("enter %s\n", __func__);
+	//dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	//dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, TX_PHY);
+	//dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLR, 1);
+	//dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLR, 1);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 0);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 1);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, GLUELOGIC);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLR, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLR, 1);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 0);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 1);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RX_PHY);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLR, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLR, 1);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 0);
+	//dw_dphy_if_write(dphy, DPHYZCALCTRL, 1);
+}
+#endif
+
+static void dw_dphy_gen3_12bit_tc_power_up(struct dw_dphy_rx *dphy, uint8_t hsfregrange)
+{
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, GLUELOGIC);
+#endif
+	dw_dphy_te_write(dphy, CFGCLKFREQRANGE_RX, 0x1C);
+	dw_dphy_te_write(dphy, 0x6, hsfregrange);
+
+	/* CLKSEL | UPDATEPLL | SHADOW_CLEAR | SHADOW_CTRL | FORCEPLL */
+	//dw_dphy_te_write(dphy, BYPASS, 0x3F);
+
+	/* IO_DS3 | IO_DS2 | IO_DS1 | IO_DS0 */
+	if (dphy->dphy_freq > 1500)
+		dw_dphy_te_write(dphy, IO_DS, 0x0F);
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RX_PHY | 0x2);
+#endif
+}
+
+static void dw_dphy_gen3_8bit_tc_power_up(struct dw_dphy_rx *dphy)
+{
+	u32 input_freq = dphy->dphy_freq / 1000;
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, GLUELOGIC);
+	dw_dphy_te_write(dphy, CFGCLKFREQRANGE_RX, 0x1C);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RESET);
+	dw_dphy_if_write(dphy, DPHYGLUEIFTESTER, RX_PHY);
+#endif
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX0_MSB, 0x03);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX0_LSB, 0x02);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX1_MSB, 0x03);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX1_LSB, 0x02);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX2_MSB, 0x03);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX2_LSB, 0x02);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX3_MSB, 0x03);
+	dw_dphy_te_write(dphy, OSC_FREQ_TARGET_RX3_LSB, 0x02);
+	dw_dphy_te_write(dphy, BANDGAP_CTRL, 0x80);
+
+	if (input_freq < 2000)
+		dw_dphy_te_write(dphy, HS_RX_CTRL_LANE0, 0xC0);
+
+	if (input_freq < 1000) {
+		dw_dphy_te_write(dphy, HS_RX_CTRL_LANE1, 0xC0);
+		dw_dphy_te_write(dphy, HS_RX_CTRL_LANE2, 0xC0);
+		dw_dphy_te_write(dphy, HS_RX_CTRL_LANE3, 0xC0);
+	}
+}
+
+int dw_dphy_g118_settle(struct dw_dphy_rx *dphy)
+{
+	u32 input_freq, total_settle, settle_time, byte_clk, lp_time;
+
+	lp_time = dphy->lp_time;
+	input_freq = dphy->dphy_freq / 1000;
+
+	settle_time = (8 * (1000000 / (input_freq))) + 115000;
+	byte_clk = (8000000 / (input_freq));
+	total_settle = (settle_time + lp_time * 1000) / byte_clk;
+
+	if (total_settle > 0xFF)
+		total_settle = 0xFF;
+
+	return total_settle;
+}
+
+static void dw_dphy_pwr_down(struct dw_dphy_rx *dphy)
+{
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLK, 1);
+	if (dphy->lanes_config == CTRL_8_LANES)
+		dw_dphy_write_msk(dphy, R_CSI2_DPHY2_TST_CTRL0, 0, PHY_TESTCLK,
+				  1);
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 0);
+}
+
+static void dw_dphy_pwr_up(struct dw_dphy_rx *dphy)
+{
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLK, 1);
+	if (dphy->lanes_config == CTRL_8_LANES)
+		dw_dphy_write_msk(dphy, R_CSI2_DPHY2_TST_CTRL0, 1, PHY_TESTCLK,
+				  1);
+	dev_vdbg(&dphy->phy->dev, "DPHY power up.\n");
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 1);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+}
+
+static int dw_dphy_gen3_12bit_configure(struct dw_dphy_rx *dphy)
+{
+	u32 input_freq = dphy->dphy_freq;
+	u8 range = 0;
+
+	dev_vdbg(&dphy->phy->dev, "12bit: PHY GEN 3: Freq: %u\n", input_freq);
+	for (range = 0; (range < ARRAY_SIZE(range_gen3) - 1) &&
+	     ((input_freq / 1000) > range_gen3[range].freq);
+	     range++)
+		;
+
+	dw_dphy_gen3_12bit_tc_power_up(dphy, range_gen3[range].hsfregrange);
+
+	uint8_t lp_time = dphy->lp_time;
+	dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_17, lp_time);//SET SETTLE TIME
+
+	dw_dphy_te_write(dphy, RX_SYS_1, range_gen3[range].hsfregrange);
+	dw_dphy_te_write(dphy, RX_SYS_0, 0x20);
+	dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_2,
+			 (u8)range_gen3[range].osc_freq_target);
+	dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_3,
+			 (u8)(range_gen3[range].osc_freq_target >> 8));
+	dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_4, 0x01);
+
+	if (dphy->phy_type) {
+		dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_1, 0x01);
+		dw_dphy_te_write(dphy, RX_RX_STARTUP_OVR_0, 0x80);
+	}
+
+	if (dphy->phy_type || input_freq <= 1500)
+		dw_dphy_te_write(dphy, RX_SYS_7, 0x38);
+
+	return 0;
+}
+
+static int dw_dphy_gen3_8bit_configure(struct dw_dphy_rx *dphy)
+{
+	u32 input_freq = dphy->dphy_freq;
+	u8 data;
+	u8 range = 0;
+
+	dev_vdbg(&dphy->phy->dev, "8bit: PHY GEN 3: Freq: %u\n", input_freq);
+	for (range = 0; (range < ARRAY_SIZE(range_gen3) - 1) &&
+	     ((input_freq / 1000) > range_gen3[range].freq);
+	     range++)
+		;
+
+	dw_dphy_te_write(dphy, RX_SKEW_CAL, dw_dphy_g118_settle(dphy));
+	data = 1 << 7 | range_gen3[range].hsfregrange;
+	dw_dphy_te_write(dphy, HSFREQRANGE_8BIT, data);
+	dw_dphy_gen3_8bit_tc_power_up(dphy);
+
+	return 0;
+}
+
+static int dw_dphy_gen2_configure(struct dw_dphy_rx *dphy)
+{
+	u32 input_freq = dphy->dphy_freq;
+	u8 data;
+	u8 range = 0;
+
+	/* provide an initial active-high test clear pulse in TESTCLR  */
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 1, PHY_TESTCLR, 1);
+	dw_dphy_write_msk(dphy, R_CSI2_DPHY_TST_CTRL0, 0, PHY_TESTCLR, 1);
+
+	dev_vdbg(&dphy->phy->dev, "PHY GEN 2: Freq: %u\n", input_freq);
+	for (range = 0; (range < ARRAY_SIZE(range_gen2) - 1) &&
+	     ((input_freq / 1000) > range_gen2[range].freq); range++)
+		;
+
+	data = range_gen2[range].hsfregrange << 1;
+	dw_dphy_te_write(dphy, HSFREQRANGE_8BIT, data);
+
+	return 0;
+}
+
+static int dw_dphy_configure(struct dw_dphy_rx *dphy)
+{
+
+    bm_info("enter %s\n", __func__);
+	dw_dphy_pwr_down(dphy);
+    dphy->dphy_gen = GEN3;
+	if (dphy->dphy_gen == GEN3) {
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+		dw_dphy_if_init(dphy);
+#endif
+        dphy->dphy_te_len = BIT12;
+		if (dphy->dphy_te_len == BIT12)
+			dw_dphy_gen3_12bit_configure(dphy);
+		else
+			dw_dphy_gen3_8bit_configure(dphy);
+	} else {
+		dw_dphy_gen2_configure(dphy);
+	}
+	dw_dphy_pwr_up(dphy);
+
+	return 0;
+}
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+
+#if 0
+int dw_dphy_if_set_idelay(struct dw_dphy_rx *dphy, u8 dly, u8 cells)
+{
+	u32 val = 0;
+
+	dw_dphy_if_write(dphy, IDLYCFG, 0);
+	dw_dphy_if_write(dphy, IDLYSEL, cells);
+	dw_dphy_if_write(dphy, IDLYCNTINVAL, dly);
+
+	/* Pulse Value Set */
+	dw_dphy_if_write(dphy, IDLYCFG, 1);
+	usleep_range(10, 20);
+	dw_dphy_if_write(dphy, IDLYCFG, 0);
+
+	/* Pulse IDELAY CTRL Reset */
+	dw_dphy_if_write(dphy, DPHY1REGRSTN, 0);
+	usleep_range(10, 20);
+	dw_dphy_if_write(dphy, DPHY1REGRSTN, 1);
+
+	/* Get Value*/
+	val = dw_dphy_if_read(dphy, IDLYCNTOUTVAL);
+
+	if (val != dly) {
+		dev_vdbg(&dphy->phy->dev,
+			 "odelay config failed, set %d get %d", dly, val);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+int dw_dphy_if_get_idelay(struct dw_dphy_rx *dphy)
+{
+	return dw_dphy_if_read(dphy, IDLYCNTOUTVAL);
+}
+
+int dw_dphy_if_set_idelay_lane(struct dw_dphy_rx *dphy, u8 dly, u8 lane)
+{
+	int cell;
+
+	switch (lane) {
+	case 0:
+		for (cell = 3; cell <= 10; cell++)
+			dw_dphy_if_set_idelay(dphy, dly, cell);
+		break;
+	case 1:
+		for (cell = 14; cell <= 21; cell++)
+			dw_dphy_if_set_idelay(dphy, dly, cell);
+		break;
+	case 2:
+		for (cell = 24; cell <= 31; cell++)
+			dw_dphy_if_set_idelay(dphy, dly, cell);
+		break;
+	case 3:
+		for (cell = 34; cell <= 41; cell++)
+			dw_dphy_if_set_idelay(dphy, dly, cell);
+		break;
+	case 4: /* ALL */
+		dw_dphy_if_set_idelay(dphy, dly, 0x7F);
+		break;
+	default:
+		dev_err(&dphy->phy->dev, "Lane Value not recognized\n");
+		return -1;
+	}
+	return 0;
+}
+#endif
+#endif
+
+int dw_dphy_init(struct phy *phy)
+{
+	struct dw_dphy_rx *dphy = phy_get_drvdata(phy);
+
+	dev_warn(&dphy->phy->dev, "Init DPHY.\n");
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+	dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 0);
+
+	return 0;
+}
+
+static int dw_dphy_set_phy_state(struct dw_dphy_rx *dphy, u32 on)
+{
+
+	u8 hs_freq;
+
+    bm_info("enter %s\n", __func__);
+	dphy->lanes_config = dw_dphy_setup_config(dphy);
+
+	if (dphy->dphy_te_len == BIT12)
+		hs_freq = RX_SYS_1;
+	else
+		hs_freq = HSFREQRANGE_8BIT;
+
+	if (on) {
+		dw_dphy_configure(dphy);
+		dev_info(&dphy->phy->dev,
+			 "HS Code: 0X%x\n", dw_dphy_te_read(dphy, hs_freq));
+	} else {
+		dw_dphy_write(dphy, R_CSI2_DPHY_SHUTDOWNZ, 0);
+		dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+	}
+
+	return 0;
+}
+
+int dw_dphy_power_on(struct phy *phy)
+{
+	struct dw_dphy_rx *dphy = phy_get_drvdata(phy);
+
+	dev_info(&dphy->phy->dev, "DPHY Power ON\n");
+    bm_info("enter %s\n", __func__);
+
+	return dw_dphy_set_phy_state(dphy, 1);
+}
+
+int dw_dphy_power_off(struct phy *phy)
+{
+	struct dw_dphy_rx *dphy = phy_get_drvdata(phy);
+
+	return dw_dphy_set_phy_state(dphy, 0);
+}
+
+int dw_dphy_reset(struct phy *phy)
+{
+	struct dw_dphy_rx *dphy = phy_get_drvdata(phy);
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+	usleep_range(100, 200);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+
+	return 0;
+}

+ 215 - 0
vvcam/native/csi/dw-dphy-rx.h

@@ -0,0 +1,215 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI D-PHY controller driver
+ *
+ * Author: Luis Oliveira <luis.oliveira@synopsys.com>
+ */
+
+#ifndef __PHY_SNPS_DPHY_RX_H__
+#define __PHY_SNPS_DPHY_RX_H__
+
+#include <linux/debugfs.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_gpio.h>
+#include <linux/phy/phy.h>
+#include <linux/phy/phy-mipi-dphy.h>
+#include <linux/platform_device.h>
+#include <linux/spinlock.h>
+
+/* DPHY interface register bank*/
+
+#define R_CSI2_DPHY_SHUTDOWNZ 0x0
+#define R_CSI2_DPHY_RSTZ 0x4
+#define R_CSI2_DPHY_RX 0x8
+#define	R_CSI2_DPHY_STOPSTATE 0xC
+#define R_CSI2_DPHY_TST_CTRL0 0x10
+#define R_CSI2_DPHY_TST_CTRL1 0x14
+#define R_CSI2_DPHY2_TST_CTRL0 0x18
+#define R_CSI2_DPHY2_TST_CTRL1 0x1C
+
+enum dphy_id_mask {
+	DPHY_ID_LANE_SUPPORT = 0,
+	DPHY_ID_IF = 4,
+	DPHY_ID_GEN = 8,
+};
+
+enum dphy_gen_values {
+	GEN1,
+	GEN2,
+	GEN3,
+};
+
+enum dphy_interface_length {
+	BIT8 = 8,
+	BIT12 = 12,
+};
+
+enum tst_ctrl0 {
+	PHY_TESTCLR,
+	PHY_TESTCLK,
+};
+
+enum tst_ctrl1 {
+	PHY_TESTDIN = 0,
+	PHY_TESTDOUT = 8,
+	PHY_TESTEN = 16,
+};
+
+enum lanes_config_values {
+	CTRL_4_LANES,
+	CTRL_8_LANES,
+};
+
+enum dphy_tc {
+	CFGCLKFREQRANGE_TX = 0x02,
+	CFGCLKFREQRANGE_RX = 0x05,
+	BYPASS = 0x20,
+	IO_DS = 0x30,
+};
+
+enum dphy_8bit_interface_addr {
+	BANDGAP_CTRL = 0x24,
+	HS_RX_CTRL_LANE0 = 0x42,
+	HSFREQRANGE_8BIT = 0x44,
+	OSC_FREQ_TARGET_RX0_LSB	= 0x4e,
+	OSC_FREQ_TARGET_RX0_MSB	= 0x4f,
+	HS_RX_CTRL_LANE1 = 0x52,
+	OSC_FREQ_TARGET_RX1_LSB	= 0x5e,
+	OSC_FREQ_TARGET_RX1_MSB	= 0x5f,
+	RX_SKEW_CAL = 0x7e,
+	HS_RX_CTRL_LANE2 = 0x82,
+	OSC_FREQ_TARGET_RX2_LSB	= 0x8e,
+	OSC_FREQ_TARGET_RX2_MSB	= 0x8f,
+	HS_RX_CTRL_LANE3 = 0x92,
+	OSC_FREQ_TARGET_RX3_LSB	= 0x9e,
+	OSC_FREQ_TARGET_RX3_MSB	= 0x9f,
+};
+
+enum dphy_12bit_interface_addr {
+	RX_SYS_0 = 0x01,
+	RX_SYS_1 = 0x02,
+	RX_SYS_7 = 0x08,
+	RX_RX_STARTUP_OVR_0 = 0xe0,
+	RX_RX_STARTUP_OVR_1 = 0xe1,
+	RX_RX_STARTUP_OVR_2 = 0xe2,
+	RX_RX_STARTUP_OVR_3 = 0xe3,
+	RX_RX_STARTUP_OVR_4 = 0xe4,
+	RX_RX_STARTUP_OVR_17 = 0xf1,
+};
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+/* Testchip interface register bank */
+#define IDLYCFG	0x00
+#define IDLYSEL	0x04
+#define IDLYCNTINVAL 0x08
+#define IDLYCNTOUTVAL 0x0c
+#define DPHY1REGRSTN 0x10
+#define DPHYZCALSTAT 0x14
+#define DPHYZCALCTRL 0x18
+#define DPHYLANE0STAT 0x1c
+#define DPHYLANE1STAT 0x20
+#define DPHYLANE2STAT 0x24
+#define DPHYLANE3STAT 0x28
+#define DPHYCLKSTAT 0x2c
+#define DPHYZCLKCTRL 0x30
+#define TCGENPURPOSOUT 0x34
+#define TCGENPURPOSIN 0x38
+#define DPHYGENERICOUT 0x3c
+#define DPHYGENERICIN 0x40
+
+#define DPHYGLUEIFTESTER 0x180
+#define DPHYID 0x100
+
+#define DPHY_DEFAULT_FREQ 300000
+
+enum glueiftester {
+	RESET = 0,
+	TX_PHY = 0x100 | (0x1 << 4),
+	RX_PHY = 0x100 | (0x2 << 4),
+	GLUELOGIC = 0x100 | (0x4 << 4),
+};
+#endif
+
+/**
+ * struct phy		specifies associated phy component
+ * struct cfg		to pass mipi dphy specific configurations
+ * @lanes_config	lanes configuration
+ * @dphy_freq		operating frequency of the d-phy (mbps)
+ * @phy_type		dphy can be of two types, passed here
+ * @dphy_gen		dphy can be of three generations, passed here
+ * @dphy_te_len		bus width
+ * @max_lanes		maximum number of lanes
+ * @lp_time		time in low-power
+ * @base_address	memmory address of dphy test interface
+ * @dphy1_if_addr	gluelogic dphy 1 memmory address of interface
+ * @dphy2_if_addr	gluelogic dphy 2 memmory address of interface
+ * @config_8l		eight lanes configuration
+ */
+
+struct dw_dphy_rx {
+	struct phy *phy;
+	struct phy_configure_opts_mipi_dphy *cfg;
+	u32 lanes_config;
+	u32 dphy_freq;  //MBPS
+	u32 phy_type;
+	u32 dphy_gen;
+	u32 dphy_te_len;
+	u32 max_lanes;
+	u32 lp_time;
+	void __iomem *base_address;
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+	void __iomem *dphy1_if_addr;
+	void __iomem *dphy2_if_addr;
+	u8 config_8l;
+	u8 (*get_config_8l)(struct device *dev, struct dw_dphy_rx *dphy);
+#endif
+	u8 (*phy_register)(struct device *dev);
+	void (*phy_unregister)(struct device *dev);
+};
+
+int dw_dphy_init(struct phy *phy);
+int dw_dphy_reset(struct phy *phy);
+int dw_dphy_power_off(struct phy *phy);
+int dw_dphy_power_on(struct phy *phy);
+u8 dw_dphy_setup_config(struct dw_dphy_rx *dphy);
+void dw_dphy_write(struct dw_dphy_rx *dphy, u32 address, u32 data);
+u32 dw_dphy_read(struct dw_dphy_rx *dphy, u32 address);
+int dw_dphy_te_read(struct dw_dphy_rx *dphy, u32 addr);
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+u32 dw_dphy_if_read(struct dw_dphy_rx *dphy, u32 address);
+int dw_dphy_if_get_idelay(struct dw_dphy_rx *dphy);
+int dw_dphy_if_set_idelay_lane(struct dw_dphy_rx *dphy, u8 dly, u8 lane);
+int dw_dphy_create_capabilities_sysfs(struct platform_device *pdev);
+int dw_dphy_remove_capabilities_sysfs(struct platform_device *pdev);
+
+static inline
+u32 dw_dphy_if_read_msk(struct dw_dphy_rx *dphy,
+			u32 address, u8 shift, u8 width)
+{
+	return (dw_dphy_if_read(dphy, address) >> shift) & ((1 << width) - 1);
+}
+#endif /*IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)*/
+
+static inline struct phy *dw_dphy_xlate(struct device *dev,
+					struct of_phandle_args *args)
+{
+	struct dw_dphy_rx *dphy = dev_get_drvdata(dev);
+
+	return dphy->phy;
+}
+
+static inline
+u32 dw_dphy_read_msk(struct dw_dphy_rx *dev, u32 address, u8 shift,  u8 width)
+{
+	return (dw_dphy_read(dev, address) >> shift) & ((1 << width) - 1);
+}
+#endif /*__PHY_SNPS_DPHY_RX_H__*/

+ 264 - 0
vvcam/native/csi/dw-dphy-sysfs.c

@@ -0,0 +1,264 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI D-PHY controller driver.
+ * SysFS components for the platform driver
+ *
+ * Author: Luis Oliveira <luis.oliveira@synopsys.com>
+ */
+
+//#define DEBUG    1
+#include "dw-dphy-rx.h"
+#include "bm_csi_hw.h"
+
+static ssize_t dphy_reset_show(struct device *dev,
+			       struct device_attribute *attr, char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	char buffer[15];
+
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 0);
+	usleep_range(100, 200);
+	dw_dphy_write(dphy, R_CSI2_DPHY_RSTZ, 1);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t dphy_freq_store(struct device *dev,
+			       struct device_attribute *attr,
+			       const char *buf,
+			       size_t count)
+{
+	int ret;
+	unsigned long freq;
+
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+
+	ret = kstrtoul(buf, 10, &freq);
+	if (ret < 0)
+		return ret;
+
+	if (freq > 2500) {
+		dev_info(dev, "Freq must be under 2500 Mhz\n");
+		return count;
+	}
+	if (freq < 80) {
+		dev_info(dev, "Freq must be over 80 Mhz\n");
+		return count;
+	}
+
+	dev_vdbg(dev, "Data Rate %lu Mbps\n", freq);
+	dphy->dphy_freq = freq*1000;
+
+	return count;
+}
+
+static ssize_t dphy_freq_show(struct device *dev, struct device_attribute *attr,
+			      char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	char buffer[15];
+
+	snprintf(buffer,
+		 sizeof(buffer),
+		 "Freq %d\n", dphy->dphy_freq);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t dphy_addr_store(struct device *dev,
+			       struct device_attribute *attr,
+			       const char *buf,
+			       size_t count)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	unsigned long addr;
+	int ret;
+
+	ret = kstrtoul(buf, 10, &addr);
+
+	if (ret < 0)
+		return ret;
+
+	//payload = (u16)val;
+	//addr = (u16)(val >> 16);
+
+	//dev_vdbg(dev, "addr 0x%lX\n", val);
+	//dev_vdbg(dev, "payload: 0x%X\n", addr);
+	//dev_vdbg(dev, "Addr [0x%x] -> 0x%x\n", (unsigned int)addr,
+	//	 dw_dphy_te_read(dphy, addr));
+
+    printk("<0>""addr 0x%lX\n", addr);
+    printk("<0>""Addr [0x%x] -> 0x%x\n", (unsigned int)addr,
+		 dw_dphy_te_read(dphy, addr));
+
+
+	return count;
+}
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+#if 0
+static ssize_t idelay_show(struct device *dev, struct device_attribute *attr,
+			   char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	char buffer[15];
+
+	snprintf(buffer,
+		 sizeof(buffer), "idelay %d\n", dw_dphy_if_get_idelay(dphy));
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t idelay_store(struct device *dev, struct device_attribute *attr,
+			    const char *buf, size_t count)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	unsigned long val;
+	u8 lane, delay;
+	int ret;
+
+	ret = kstrtoul(buf, 16, &val);
+	if (ret < 0)
+		return ret;
+
+	lane = (u8)val;
+	delay = (u8)(val >> 8);
+
+	dev_vdbg(dev, "Lanes %u\n", lane);
+	dev_vdbg(dev, "Delay %u\n", delay);
+
+	dw_dphy_if_set_idelay_lane(dphy, delay, lane);
+
+	return count;
+}
+#endif
+#endif
+
+static ssize_t len_config_store(struct device *dev,
+				struct device_attribute *attr,
+				const char *buf,
+				size_t count)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	unsigned long length;
+	int ret;
+
+	ret = kstrtoul(buf, 10, &length);
+	if (ret < 0)
+		return ret;
+
+	if (length == BIT8)
+		dev_vdbg(dev, "Configured for 8-bit interface\n");
+	else if (length == BIT12)
+		dev_vdbg(dev, "Configured for 12-bit interface\n");
+	else
+		return count;
+
+	dphy->dphy_te_len = length;
+
+	return count;
+}
+
+static ssize_t len_config_show(struct device *dev,
+			       struct device_attribute *attr, char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	char buffer[20];
+
+	snprintf(buffer, sizeof(buffer), "Length %d\n", dphy->dphy_te_len);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static ssize_t dw_dphy_g118_settle_store(struct device *dev,
+					 struct device_attribute *attr,
+					 const char *buf, size_t count)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	unsigned long lp_time;
+	int ret;
+
+	ret = kstrtoul(buf, 10, &lp_time);
+	if (ret < 0)
+		return ret;
+
+	if (lp_time > 1 && lp_time < 10000) {
+		dphy->lp_time = lp_time;
+	} else {
+		dev_vdbg(dev, "Invalid Value configuring for 1000 ns\n");
+		dphy->lp_time = 1000;
+	}
+
+	dphy->lp_time = lp_time;
+
+	return count;
+}
+
+static ssize_t dw_dphy_g118_settle_show(struct device *dev,
+					struct device_attribute *attr,
+					char *buf)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+    struct bm_csi_drvdata *drvdata  = platform_get_drvdata(pdev);
+	struct dw_dphy_rx *dphy = drvdata->dphy;
+	char buffer[10];
+
+	snprintf(buffer, sizeof(buffer), "Settle %d ns\n", dphy->lp_time);
+
+	return strlcpy(buf, buffer, PAGE_SIZE);
+}
+
+static DEVICE_ATTR_RO(dphy_reset);
+static DEVICE_ATTR_RW(dphy_freq);
+static DEVICE_ATTR_WO(dphy_addr);
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+//static DEVICE_ATTR_RW(idelay);
+#endif
+static DEVICE_ATTR_RW(len_config);
+static DEVICE_ATTR_RW(dw_dphy_g118_settle);
+
+int dw_dphy_create_capabilities_sysfs(struct platform_device *pdev)
+{
+	device_create_file(&pdev->dev, &dev_attr_dphy_reset);
+	device_create_file(&pdev->dev, &dev_attr_dphy_freq);
+	device_create_file(&pdev->dev, &dev_attr_dphy_addr);
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+//	device_create_file(&pdev->dev, &dev_attr_idelay);
+#endif
+	device_create_file(&pdev->dev, &dev_attr_len_config);
+	device_create_file(&pdev->dev, &dev_attr_dw_dphy_g118_settle);
+	return 0;
+}
+
+int dw_dphy_remove_capabilities_sysfs(struct platform_device *pdev)
+{
+	device_remove_file(&pdev->dev, &dev_attr_dphy_reset);
+	device_remove_file(&pdev->dev, &dev_attr_dphy_freq);
+	device_remove_file(&pdev->dev, &dev_attr_dphy_addr);
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+//	device_create_file(&pdev->dev, &dev_attr_idelay);
+#endif
+	device_remove_file(&pdev->dev, &dev_attr_len_config);
+	device_remove_file(&pdev->dev, &dev_attr_dw_dphy_g118_settle);
+	return 0;
+}

+ 104 - 0
vvcam/native/csi/dw-mipi-csi-pltfrm.h

@@ -0,0 +1,104 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host media entities
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#ifndef __DW_MIPI_CSI_PLTFRM_INCLUDES_H_
+#define __DW_MIPI_CSI_PLTFRM_INCLUDES_H_
+
+#include <media/media-entity.h>
+#include <media/v4l2-dev.h>
+#include <media/v4l2-mediabus.h>
+#include <media/v4l2-subdev.h>
+
+#define MAX_WIDTH	3280
+#define MAX_HEIGHT	1852
+
+/* The subdevices' group IDs. */
+#define GRP_ID_SENSOR		(10)
+#define GRP_ID_CSI		(20)
+#define GRP_ID_VIF		(30)
+#define GRP_ID_VIDEODEV		(40)
+
+#define CSI_MAX_ENTITIES	(2)
+#define VIF_MAX_ENTITIES	(2)
+#define PLAT_MAX_SENSORS	(2)
+
+struct pdata_names {
+	char *name;
+};
+
+enum video_dev_pads {
+	VIDEO_DEV_SD_PAD_SINK_VIF1,
+	VIDEO_DEV_SD_PAD_SINK_VIF2,
+	VIDEO_DEV_SD_PAD_SOURCE_DMA,
+	VIDEO_DEV_SD_PADS_NUM,
+};
+
+enum vif_pads {
+	VIF_PAD_SINK_CSI,
+	VIF_PAD_SOURCE_DMA,
+	VIF_PADS_NUM,
+};
+
+enum mipi_csi_pads {
+	CSI_PAD_SINK,
+	CSI_PAD_SOURCE,
+	CSI_PADS_NUM,
+};
+
+struct plat_csi_source_info {
+	u16 flags;
+	u16 mux_id;
+};
+
+struct plat_csi_fmt {
+	char *name;
+	u32 mbus_code;
+	u32 fourcc;
+	u8 depth;
+};
+
+struct plat_csi_media_pipeline;
+
+/*
+ * Media pipeline operations to be called from within a video node,  i.e. the
+ * last entity within the pipeline. Implemented by related media device driver.
+ */
+struct plat_csi_media_pipeline_ops {
+	int (*prepare)(struct plat_csi_media_pipeline *p,
+		       struct media_entity *me);
+	int (*unprepare)(struct plat_csi_media_pipeline *p);
+	int (*open)(struct plat_csi_media_pipeline *p, struct media_entity *me,
+		    bool resume);
+	int (*close)(struct plat_csi_media_pipeline *p);
+	int (*set_stream)(struct plat_csi_media_pipeline *p, bool state);
+	int (*set_format)(struct plat_csi_media_pipeline *p,
+			  struct v4l2_subdev_format *fmt);
+};
+
+struct plat_csi_video_entity {
+	struct video_device vdev;
+	struct plat_csi_media_pipeline *pipe;
+};
+
+struct plat_csi_media_pipeline {
+	struct media_pipeline mp;
+	const struct plat_csi_media_pipeline_ops *ops;
+};
+
+static inline struct plat_csi_video_entity
+*vdev_to_plat_csi_video_entity(struct video_device *vdev)
+{
+	return container_of(vdev, struct plat_csi_video_entity, vdev);
+}
+
+#define plat_csi_pipeline_call(ent, op, args...)			  \
+	(!(ent) ? -ENOENT : (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \
+	(ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD))	  \
+
+#endif /* __DW_MIPI_CSI_PLTFRM_INCLUDES_H_ */

+ 590 - 0
vvcam/native/csi/dw-mipi-csi.c

@@ -0,0 +1,590 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host controller driver
+ * Core MIPI CSI-2 functions
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#include "dw-mipi-csi.h"
+
+static struct R_CSI2 reg = {
+	.VERSION = 0x00,
+	.N_LANES = 0x04,
+	.CTRL_RESETN = 0x08,
+	.INTERRUPT = 0x0C,
+	.DATA_IDS_1 = 0x10,
+	.DATA_IDS_2 = 0x14,
+	.IPI_MODE = 0x80,
+	.IPI_VCID = 0x84,
+	.IPI_DATA_TYPE = 0x88,
+	.IPI_MEM_FLUSH = 0x8C,
+	.IPI_HSA_TIME = 0x90,
+	.IPI_HBP_TIME = 0x94,
+	.IPI_HSD_TIME = 0x98,
+	.IPI_HLINE_TIME = 0x9C,
+	.IPI_SOFTRSTN = 0xA0,
+	.IPI_ADV_FEATURES = 0xAC,
+	.IPI_VSA_LINES = 0xB0,
+	.IPI_VBP_LINES = 0xB4,
+	.IPI_VFP_LINES = 0xB8,
+	.IPI_VACTIVE_LINES = 0xBC,
+	.INT_PHY_FATAL = 0xe0,
+	.MASK_INT_PHY_FATAL = 0xe4,
+	.FORCE_INT_PHY_FATAL = 0xe8,
+	.INT_PKT_FATAL = 0xf0,
+	.MASK_INT_PKT_FATAL = 0xf4,
+	.FORCE_INT_PKT_FATAL = 0xf8,
+	.INT_PHY = 0x110,
+	.MASK_INT_PHY = 0x114,
+	.FORCE_INT_PHY = 0x118,
+	.INT_LINE = 0x130,
+	.MASK_INT_LINE = 0x134,
+	.FORCE_INT_LINE = 0x138,
+	.INT_IPI = 0x140,
+	.MASK_INT_IPI = 0x144,
+	.FORCE_INT_IPI = 0x148,
+};
+
+struct interrupt_type csi_int = {
+	.PHY_FATAL = BIT(0),
+	.PKT_FATAL = BIT(1),
+	.PHY = BIT(16),
+};
+
+#define dw_print(VAR) \
+	dev_info(csi_dev->dev, "%s: 0x%x: %X\n", "##VAR##",\
+	VAR, dw_mipi_csi_read(csi_dev, VAR))
+
+void dw_mipi_csi_write_part(struct dw_csi *dev, u32 address, u32 data,
+			    u8 shift, u8 width)
+{
+	u32 mask = (1 << width) - 1;
+	u32 temp = dw_mipi_csi_read(dev, address);
+
+	temp &= ~(mask << shift);
+	temp |= (data & mask) << shift;
+	dw_mipi_csi_write(dev, address, temp);
+}
+
+void dw_mipi_csi_reset(struct dw_csi *csi_dev)
+{
+	dw_mipi_csi_write(csi_dev, reg.CTRL_RESETN, 0);
+	usleep_range(100, 200);
+	dw_mipi_csi_write(csi_dev, reg.CTRL_RESETN, 1);
+}
+
+int dw_mipi_csi_mask_irq_power_off(struct dw_csi *csi_dev)
+{
+	if (csi_dev->hw_version_major == 1) {
+		/* set only one lane (lane 0) as active (ON) */
+		dw_mipi_csi_write(csi_dev, reg.N_LANES, 0);
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PHY_FATAL, 0);
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PKT_FATAL, 0);
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PHY, 0);
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_LINE, 0);
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_IPI, 0);
+
+		/* only for version 1.30 */
+		if (csi_dev->hw_version_minor == 30)
+			dw_mipi_csi_write(csi_dev,
+					  reg.MASK_INT_FRAME_FATAL, 0);
+
+		dw_mipi_csi_write(csi_dev, reg.CTRL_RESETN, 0);
+
+		/* only for version 1.40 */
+		if (csi_dev->hw_version_minor == 40) {
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_BNDRY_FRAME_FATAL, 0);
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_SEQ_FRAME_FATAL, 0);
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_CRC_FRAME_FATAL, 0);
+			dw_mipi_csi_write(csi_dev, reg.MSK_PLD_CRC_FATAL, 0);
+			dw_mipi_csi_write(csi_dev, reg.MSK_DATA_ID, 0);
+			dw_mipi_csi_write(csi_dev, reg.MSK_ECC_CORRECT, 0);
+		}
+	}
+
+	return 0;
+}
+
+int dw_mipi_csi_hw_stdby(struct dw_csi *csi_dev)
+{
+	if (csi_dev->hw_version_major == 1) {
+		/* set only one lane (lane 0) as active (ON) */
+		dw_mipi_csi_reset(csi_dev);
+		dw_mipi_csi_write(csi_dev, reg.N_LANES, 0);
+		phy_init(csi_dev->phy);
+
+		/* only for version 1.30 */
+		if (csi_dev->hw_version_minor == 30)
+			dw_mipi_csi_write(csi_dev,
+					  reg.MASK_INT_FRAME_FATAL,
+					  GENMASK(31, 0));
+
+		/* common */
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PHY_FATAL,
+				  GENMASK(8, 0));
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PKT_FATAL,
+				  GENMASK(1, 0));
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_PHY, GENMASK(23, 0));
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_LINE, GENMASK(23, 0));
+		dw_mipi_csi_write(csi_dev, reg.MASK_INT_IPI, GENMASK(5, 0));
+
+		/* only for version 1.40 */
+		if (csi_dev->hw_version_minor == 40) {
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_BNDRY_FRAME_FATAL,
+					  GENMASK(31, 0));
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_SEQ_FRAME_FATAL,
+					  GENMASK(31, 0));
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_CRC_FRAME_FATAL,
+					  GENMASK(31, 0));
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_PLD_CRC_FATAL,
+					  GENMASK(31, 0));
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_DATA_ID, GENMASK(31, 0));
+			dw_mipi_csi_write(csi_dev,
+					  reg.MSK_ECC_CORRECT, GENMASK(31, 0));
+		}
+	}
+	return 0;
+}
+
+void dw_mipi_csi_set_ipi_fmt(struct dw_csi *csi_dev)
+{
+	struct device *dev = csi_dev->dev;
+
+	if (csi_dev->ipi_dt) {
+		dw_mipi_csi_write(csi_dev, reg.IPI_DATA_TYPE, csi_dev->ipi_dt);
+		/*switch (csi_dev->ipi_dt) {
+		case CSI_2_YUV420_8:
+		//case CSI_2_YUV420_8_LEG:
+		case CSI_2_YUV420_8_SHIFT:
+		break;
+		case CSI_2_YUV420_10:
+		case CSI_2_YUV420_10_SHIFT:
+		break;
+		}*/
+	} else {
+		switch (csi_dev->fmt->mbus_code) {
+
+		case MEDIA_BUS_FMT_RGB666_1X18:
+		csi_dev->ipi_dt =  CSI_2_RGB666;
+		break;
+
+		case MEDIA_BUS_FMT_RGB565_2X8_BE:
+		case MEDIA_BUS_FMT_RGB565_2X8_LE:
+		csi_dev->ipi_dt = CSI_2_RGB565;
+		break;
+
+		case MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE:
+		case MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE:
+		csi_dev->ipi_dt = CSI_2_RGB555;
+		break;
+
+		case MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE:
+		case MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE:
+		csi_dev->ipi_dt = CSI_2_RGB444;
+		break;
+
+		break;
+		case MEDIA_BUS_FMT_RGB888_2X12_LE:
+		case MEDIA_BUS_FMT_RGB888_2X12_BE:
+		csi_dev->ipi_dt = CSI_2_RGB888;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR10_1X10:
+		case MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE:
+		csi_dev->ipi_dt = CSI_2_RAW10;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR12_1X12:
+		csi_dev->ipi_dt = CSI_2_RAW12;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR14_1X14:
+		csi_dev->ipi_dt = CSI_2_RAW14;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR16_1X16:
+		csi_dev->ipi_dt = CSI_2_RAW16;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR8_1X8:
+		csi_dev->ipi_dt = CSI_2_RAW8;
+		break;
+
+		case MEDIA_BUS_FMT_YVYU8_1X16:
+		csi_dev->ipi_dt = CSI_2_YUV422_8;
+		break;
+
+		case MEDIA_BUS_FMT_VYUY8_1X16:
+		csi_dev->ipi_dt = CSI_2_YUV422_8;
+		break;
+
+		case MEDIA_BUS_FMT_UYVY10_1X20:
+		csi_dev->ipi_dt = CSI_2_YUV422_10;
+		break;
+
+		case MEDIA_BUS_FMT_YUYV8_1X16:
+		csi_dev->ipi_dt = CSI_2_YUV420_8_LEG;
+		break;
+
+		case MEDIA_BUS_FMT_UYVY8_1X16:
+		csi_dev->ipi_dt = CSI_2_YUV420_8;
+		break;
+
+		case MEDIA_BUS_FMT_VUY8_1X24:
+		csi_dev->ipi_dt = CSI_2_YUV420_10;
+		break;
+
+		case MEDIA_BUS_FMT_Y8_1X8:
+		csi_dev->ipi_dt = CSI_2_RAW8;
+		break;
+
+		case MEDIA_BUS_FMT_Y10_1X10:
+		csi_dev->ipi_dt = CSI_2_RAW8;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR6_1X8:
+		csi_dev->ipi_dt = CSI_2_RAW6;
+		break;
+
+		case MEDIA_BUS_FMT_SBGGR7_1X8:
+		csi_dev->ipi_dt = CSI_2_RAW7;
+		break;
+
+		default:
+		break;
+		}
+		dw_mipi_csi_write(csi_dev, reg.IPI_DATA_TYPE, csi_dev->ipi_dt);
+	}
+	dev_info(dev, "Selected IPI Data Type 0x%X\n", csi_dev->ipi_dt);
+}
+
+void dw_mipi_csi_fill_timings(struct dw_csi *dev, uint32_t width, uint32_t height)
+{
+	dev->hw.virtual_ch = 0;
+	dev->hw.ipi_color_mode = COLOR48;
+	dev->hw.ipi_auto_flush = 1;
+	dev->hw.ipi_mode = CAMERA_TIMING;
+	dev->hw.ipi_cut_through = CTINACTIVE;
+	dev->hw.ipi_adv_features = LINE_EVENT_SELECTION(EVSELAUTO);
+	dev->hw.htotal = width + dev->hw.hsa +
+			 dev->hw.hbp + dev->hw.hsd;
+	dev->hw.vactive = height;
+	dev->hw.output = 2;
+
+    dev_dbg(dev->dev, "*********** timings *********\n");
+	dev_dbg(dev->dev, "Horizontal Sync Active: %d\n", dev->hw.hsa);
+	dev_dbg(dev->dev, "Horizontal Back Porch: %d\n", dev->hw.hbp);
+	dev_dbg(dev->dev, "Horizontal Width: %d\n", width);
+	dev_dbg(dev->dev, "Horizontal Total: %d\n", dev->hw.htotal);
+	dev_dbg(dev->dev, "Vertical Sync Active: %d\n", dev->hw.vsa);
+	dev_dbg(dev->dev, "Vertical Back Porch: %d\n", dev->hw.vbp);
+	dev_dbg(dev->dev, "Vertical Front Porch: %d\n", dev->hw.vfp);
+	dev_dbg(dev->dev, "Vertical Active: %d\n", dev->hw.vactive);
+}
+
+void dw_mipi_csi_start(struct dw_csi *csi_dev)
+{
+	struct device *dev = csi_dev->dev;
+
+	dw_mipi_csi_write(csi_dev, reg.N_LANES, (csi_dev->hw.num_lanes - 1));
+	dev_info(dev, "number of lanes: %d\n", csi_dev->hw.num_lanes);
+
+	/* IPI Related Configuration */
+	if (csi_dev->hw.output == IPI_OUT || csi_dev->hw.output == BOTH_OUT) {
+		if (csi_dev->hw_version_major >= 1) {
+			if (csi_dev->hw_version_minor >= 20)
+				dw_mipi_csi_write(csi_dev,
+						  reg.IPI_ADV_FEATURES,
+						  csi_dev->hw.ipi_adv_features);
+			if (csi_dev->hw_version_minor >= 30)
+				dw_mipi_csi_write(csi_dev,
+						  reg.IPI_SOFTRSTN, 0x1);
+		}
+		/*  address | data, | shift | width */
+		dw_mipi_csi_write_part(csi_dev, reg.IPI_MODE, 1, 24, 1);
+		dw_mipi_csi_write_part(csi_dev,
+				       reg.IPI_MODE,
+				       csi_dev->hw.ipi_mode,
+				       0, 1);
+		if (csi_dev->hw.ipi_mode == CAMERA_TIMING) {
+			dw_mipi_csi_write(csi_dev,
+					  reg.IPI_ADV_FEATURES,
+					  LINE_EVENT_SELECTION(EVSELPROG) |
+					  EN_VIDEO |
+					  EN_LINE_START |
+					  EN_NULL |
+					  EN_BLANKING |
+					  EN_EMBEDDED);
+		}
+		dw_mipi_csi_write_part(csi_dev,
+				       reg.IPI_MODE,
+				       csi_dev->hw.ipi_color_mode,
+				       8, 1);
+		dw_mipi_csi_write_part(csi_dev,
+				       reg.IPI_MODE,
+				       csi_dev->hw.ipi_cut_through,
+				       16, 1);
+		dw_mipi_csi_write_part(csi_dev,
+				       reg.IPI_VCID,
+				       csi_dev->hw.virtual_ch,
+				       0, 2);
+		dw_mipi_csi_write_part(csi_dev,
+				       reg.IPI_MEM_FLUSH,
+				       csi_dev->hw.ipi_auto_flush,
+				       8, 1);
+
+		dev_vdbg(dev, "*********** config *********\n");
+		dev_vdbg(dev, "IPI enable: %s\n",
+			 csi_dev->hw.output ? "YES" : "NO");
+		dev_vdbg(dev, "video mode transmission type: %s timming\n",
+			 csi_dev->hw.ipi_mode ? "controller" : "camera");
+		dev_vdbg(dev, "Color Mode: %s\n",
+			 csi_dev->hw.ipi_color_mode ? "16 bits" : "48 bits");
+		dev_vdbg(dev, "Cut Through Mode: %s\n",
+			 csi_dev->hw.ipi_cut_through ? "enable" : "disable");
+		dev_vdbg(dev, "Virtual Channel: %d\n",
+			 csi_dev->hw.virtual_ch);
+		dev_vdbg(dev, "Auto-flush: %d\n",
+			 csi_dev->hw.ipi_auto_flush);
+		dw_mipi_csi_write(csi_dev, reg.IPI_SOFTRSTN, 1);
+
+		if (csi_dev->hw.ipi_mode == AUTO_TIMING)
+			phy_power_on(csi_dev->phy);
+
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_HSA_TIME, csi_dev->hw.hsa);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_HBP_TIME, csi_dev->hw.hbp);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_HSD_TIME, csi_dev->hw.hsd);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_HLINE_TIME, csi_dev->hw.htotal);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_VSA_LINES, csi_dev->hw.vsa);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_VBP_LINES, csi_dev->hw.vbp);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_VFP_LINES, csi_dev->hw.vfp);
+		dw_mipi_csi_write(csi_dev,
+				  reg.IPI_VACTIVE_LINES, csi_dev->hw.vactive);
+	}
+	phy_power_on(csi_dev->phy);
+}
+
+int dw_mipi_csi_irq_handler(struct dw_csi *csi_dev)
+{
+	struct device *dev = csi_dev->dev;
+	u32 global_int_status, i_sts;
+	unsigned long flags;
+
+	spin_lock_irqsave(&csi_dev->slock, flags);
+	global_int_status = dw_mipi_csi_read(csi_dev, reg.INTERRUPT);
+
+	if (global_int_status & csi_int.PHY_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_PHY_FATAL);
+		dev_err_ratelimited(dev, "int %08X: PHY FATAL: %08X\n",
+				    reg.INT_PHY_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.PKT_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_PKT_FATAL);
+		dev_err_ratelimited(dev, "int %08X: PKT FATAL: %08X\n",
+				    reg.INT_PKT_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.FRAME_FATAL &&
+	    csi_dev->hw_version_major == 1 &&
+	    csi_dev->hw_version_minor == 30) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_FRAME_FATAL);
+		dev_err_ratelimited(dev, "int %08X: FRAME FATAL: %08X\n",
+				    reg.INT_FRAME_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.PHY) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_PHY);
+		dev_err_ratelimited(dev, "int %08X: PHY: %08X\n",
+				    reg.INT_PHY, i_sts);
+	}
+
+	if (global_int_status & csi_int.PKT &&
+	    csi_dev->hw_version_major == 1 &&
+	    csi_dev->hw_version_minor <= 30) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_PKT);
+		dev_err_ratelimited(dev, "int %08X: PKT: %08X\n",
+				    reg.INT_PKT, i_sts);
+	}
+
+	if (global_int_status & csi_int.LINE) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_LINE);
+		dev_err_ratelimited(dev, "int %08X: LINE: %08X\n",
+				    reg.INT_LINE, i_sts);
+	}
+
+	if (global_int_status & csi_int.IPI) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.INT_IPI);
+		dev_err_ratelimited(dev, "int %08X: IPI: %08X\n",
+				    reg.INT_IPI, i_sts);
+	}
+
+	if (global_int_status & csi_int.BNDRY_FRAME_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_BNDRY_FRAME_FATAL);
+		dev_err_ratelimited(dev,
+				    "int %08X: ST_BNDRY_FRAME_FATAL: %08X\n",
+				    reg.ST_BNDRY_FRAME_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.SEQ_FRAME_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_SEQ_FRAME_FATAL);
+		dev_err_ratelimited(dev,
+				    "int %08X: ST_SEQ_FRAME_FATAL: %08X\n",
+				    reg.ST_SEQ_FRAME_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.CRC_FRAME_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_CRC_FRAME_FATAL);
+		dev_err_ratelimited(dev,
+				    "int %08X: ST_CRC_FRAME_FATAL: %08X\n",
+				    reg.ST_CRC_FRAME_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.PLD_CRC_FATAL) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_PLD_CRC_FATAL);
+		dev_err_ratelimited(dev,
+				    "int %08X: ST_PLD_CRC_FATAL: %08X\n",
+				    reg.ST_PLD_CRC_FATAL, i_sts);
+	}
+
+	if (global_int_status & csi_int.DATA_ID) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_DATA_ID);
+		dev_err_ratelimited(dev, "int %08X: ST_DATA_ID: %08X\n",
+				    reg.ST_DATA_ID, i_sts);
+	}
+
+	if (global_int_status & csi_int.ECC_CORRECTED) {
+		i_sts = dw_mipi_csi_read(csi_dev, reg.ST_ECC_CORRECT);
+		dev_err_ratelimited(dev, "int %08X: ST_ECC_CORRECT: %08X\n",
+				    reg.ST_ECC_CORRECT, i_sts);
+	}
+
+	spin_unlock_irqrestore(&csi_dev->slock, flags);
+
+	return 1;
+}
+
+void dw_mipi_csi_get_version(struct dw_csi *csi_dev)
+{
+	u32 hw_version;
+
+	hw_version = dw_mipi_csi_read(csi_dev, reg.VERSION);
+	csi_dev->hw_version_major = (u8)((hw_version >> 24) - '0');
+	csi_dev->hw_version_minor = (u8)((hw_version >> 16) - '0');
+	csi_dev->hw_version_minor = csi_dev->hw_version_minor * 10;
+	csi_dev->hw_version_minor += (u8)((hw_version >> 8) - '0');
+}
+
+int dw_mipi_csi_specific_mappings(struct dw_csi *csi_dev)
+{
+	struct device *dev = csi_dev->dev;
+
+	if (csi_dev->hw_version_major == 1) {
+		if (csi_dev->hw_version_minor == 30) {
+			/*
+			 * Hardware registers that were
+			 * exclusive to version < 1.40
+			 */
+			reg.INT_FRAME_FATAL = 0x100;
+			reg.MASK_INT_FRAME_FATAL = 0x104;
+			reg.FORCE_INT_FRAME_FATAL = 0x108;
+			reg.INT_PKT = 0x120;
+			reg.MASK_INT_PKT = 0x124;
+			reg.FORCE_INT_PKT = 0x128;
+
+			/* interrupt source present until this release */
+			csi_int.PKT = BIT(17);
+			csi_int.LINE = BIT(18);
+			csi_int.IPI = BIT(19);
+			csi_int.FRAME_FATAL = BIT(2);
+
+		} else if (csi_dev->hw_version_minor == 40) {
+			/*
+			 * HW registers that were added
+			 * to version 1.40
+			 */
+			reg.ST_BNDRY_FRAME_FATAL = 0x280;
+			reg.MSK_BNDRY_FRAME_FATAL = 0x284;
+			reg.FORCE_BNDRY_FRAME_FATAL = 0x288;
+			reg.ST_SEQ_FRAME_FATAL = 0x290;
+			reg.MSK_SEQ_FRAME_FATAL	= 0x294;
+			reg.FORCE_SEQ_FRAME_FATAL = 0x298;
+			reg.ST_CRC_FRAME_FATAL = 0x2a0;
+			reg.MSK_CRC_FRAME_FATAL	= 0x2a4;
+			reg.FORCE_CRC_FRAME_FATAL = 0x2a8;
+			reg.ST_PLD_CRC_FATAL = 0x2b0;
+			reg.MSK_PLD_CRC_FATAL = 0x2b4;
+			reg.FORCE_PLD_CRC_FATAL = 0x2b8;
+			reg.ST_DATA_ID = 0x2c0;
+			reg.MSK_DATA_ID = 0x2c4;
+			reg.FORCE_DATA_ID = 0x2c8;
+			reg.ST_ECC_CORRECT = 0x2d0;
+			reg.MSK_ECC_CORRECT = 0x2d4;
+			reg.FORCE_ECC_CORRECT = 0x2d8;
+			reg.DATA_IDS_VC_1 = 0x0;
+			reg.DATA_IDS_VC_2 = 0x0;
+			reg.VC_EXTENSION = 0x0;
+
+			/* interrupts map were changed */
+			csi_int.LINE = BIT(17);
+			csi_int.IPI = BIT(18);
+			csi_int.BNDRY_FRAME_FATAL = BIT(2);
+			csi_int.SEQ_FRAME_FATAL	= BIT(3);
+			csi_int.CRC_FRAME_FATAL = BIT(4);
+			csi_int.PLD_CRC_FATAL = BIT(5);
+			csi_int.DATA_ID = BIT(6);
+			csi_int.ECC_CORRECTED = BIT(7);
+
+		} else {
+			dev_info(dev, "Version minor not supported.");
+		}
+	} else {
+		dev_info(dev, "Version major not supported.");
+	}
+	return 0;
+}
+
+void dw_mipi_csi_dump(struct dw_csi *csi_dev)
+{
+	dw_print(reg.VERSION);
+	dw_print(reg.N_LANES);
+	dw_print(reg.CTRL_RESETN);
+	dw_print(reg.INTERRUPT);
+	dw_print(reg.DATA_IDS_1);
+	dw_print(reg.DATA_IDS_2);
+	dw_print(reg.IPI_MODE);
+	dw_print(reg.IPI_VCID);
+	dw_print(reg.IPI_DATA_TYPE);
+	dw_print(reg.IPI_MEM_FLUSH);
+	dw_print(reg.IPI_HSA_TIME);
+	dw_print(reg.IPI_HBP_TIME);
+	dw_print(reg.IPI_HSD_TIME);
+	dw_print(reg.IPI_HLINE_TIME);
+	dw_print(reg.IPI_SOFTRSTN);
+	dw_print(reg.IPI_ADV_FEATURES);
+	dw_print(reg.IPI_VSA_LINES);
+	dw_print(reg.IPI_VBP_LINES);
+	dw_print(reg.IPI_VFP_LINES);
+	dw_print(reg.IPI_VACTIVE_LINES);
+	dw_print(reg.IPI_DATA_TYPE);
+	dw_print(reg.VERSION);
+	dw_print(reg.IPI_ADV_FEATURES);
+}

+ 285 - 0
vvcam/native/csi/dw-mipi-csi.h

@@ -0,0 +1,285 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
+ *
+ * Synopsys DesignWare MIPI CSI-2 Host controller driver
+ *
+ * Author: Luis Oliveira <Luis.Oliveira@synopsys.com>
+ */
+
+#ifndef _DW_MIPI_CSI_H__
+#define _DW_MIPI_CSI_H__
+
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/io.h>
+#include <linux/phy/phy.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/of.h>
+#include <linux/of_graph.h>
+#include <linux/platform_device.h>
+#include <linux/ratelimit.h>
+#include <linux/reset.h>
+#include <linux/videodev2.h>
+#include <linux/wait.h>
+#include <dw-mipi-csi-pltfrm.h>
+
+/* Advanced features */
+#define IPI_DT_OVERWRITE BIT(0)
+#define DATA_TYPE_OVERWRITE(dt) (((dt) & GENMASK(5, 0)) << 8)
+#define LINE_EVENT_SELECTION(n) ((n) << 16)
+
+enum line_event {
+	EVSELAUTO = 0,
+	EVSELPROG = 1,
+};
+
+#define EN_VIDEO BIT(17)
+#define EN_LINE_START BIT(18)
+#define EN_NULL BIT(19)
+#define EN_BLANKING BIT(20)
+#define EN_EMBEDDED BIT(21)
+#define IPI_SYNC_EVENT_MODE(n) ((n) << 24)
+
+enum sync_event {
+	SYNCEVFSN = 0,
+	SYNCEVFS = 1,
+};
+
+/* DW MIPI CSI-2 register addresses*/
+
+struct R_CSI2 {
+	u16 VERSION;
+	u16 N_LANES;
+	u16 CTRL_RESETN;
+	u16 INTERRUPT;
+	u16 DATA_IDS_1;
+	u16 DATA_IDS_2;
+	u16 DATA_IDS_VC_1;
+	u16 DATA_IDS_VC_2;
+	u16 IPI_MODE;
+	u16 IPI_VCID;
+	u16 IPI_DATA_TYPE;
+	u16 IPI_MEM_FLUSH;
+	u16 IPI_HSA_TIME;
+	u16 IPI_HBP_TIME;
+	u16 IPI_HSD_TIME;
+	u16 IPI_HLINE_TIME;
+	u16 IPI_SOFTRSTN;
+	u16 IPI_ADV_FEATURES;
+	u16 IPI_VSA_LINES;
+	u16 IPI_VBP_LINES;
+	u16 IPI_VFP_LINES;
+	u16 IPI_VACTIVE_LINES;
+	u16 VC_EXTENSION;
+	u16 INT_PHY_FATAL;
+	u16 MASK_INT_PHY_FATAL;
+	u16 FORCE_INT_PHY_FATAL;
+	u16 INT_PKT_FATAL;
+	u16 MASK_INT_PKT_FATAL;
+	u16 FORCE_INT_PKT_FATAL;
+	u16 INT_FRAME_FATAL;
+	u16 MASK_INT_FRAME_FATAL;
+	u16 FORCE_INT_FRAME_FATAL;
+	u16 INT_PHY;
+	u16 MASK_INT_PHY;
+	u16 FORCE_INT_PHY;
+	u16 INT_PKT;
+	u16 MASK_INT_PKT;
+	u16 FORCE_INT_PKT;
+	u16 INT_LINE;
+	u16 MASK_INT_LINE;
+	u16 FORCE_INT_LINE;
+	u16 INT_IPI;
+	u16 MASK_INT_IPI;
+	u16 FORCE_INT_IPI;
+	u16 ST_BNDRY_FRAME_FATAL;
+	u16 MSK_BNDRY_FRAME_FATAL;
+	u16 FORCE_BNDRY_FRAME_FATAL;
+	u16 ST_SEQ_FRAME_FATAL;
+	u16 MSK_SEQ_FRAME_FATAL;
+	u16 FORCE_SEQ_FRAME_FATAL;
+	u16 ST_CRC_FRAME_FATAL;
+	u16 MSK_CRC_FRAME_FATAL;
+	u16 FORCE_CRC_FRAME_FATAL;
+	u16 ST_PLD_CRC_FATAL;
+	u16 MSK_PLD_CRC_FATAL;
+	u16 FORCE_PLD_CRC_FATAL;
+	u16 ST_DATA_ID;
+	u16 MSK_DATA_ID;
+	u16 FORCE_DATA_ID;
+	u16 ST_ECC_CORRECT;
+	u16 MSK_ECC_CORRECT;
+	u16 FORCE_ECC_CORRECT;
+};
+
+/* Interrupt Masks */
+struct interrupt_type {
+	u32 PHY_FATAL;
+	u32 PKT_FATAL;
+	u32 FRAME_FATAL;
+	u32 PHY;
+	u32 PKT;
+	u32 LINE;
+	u32 IPI;
+	u32 BNDRY_FRAME_FATAL;
+	u32 SEQ_FRAME_FATAL;
+	u32 CRC_FRAME_FATAL;
+	u32 PLD_CRC_FATAL;
+	u32 DATA_ID;
+	u32 ECC_CORRECTED;
+};
+
+/* IPI Data Types */
+enum data_type {
+	CSI_2_YUV420_8 = 0x18,
+	CSI_2_YUV420_10 = 0x19,
+	CSI_2_YUV420_8_LEG = 0x1A,
+	CSI_2_YUV420_8_SHIFT = 0x1C,
+	CSI_2_YUV420_10_SHIFT = 0x1D,
+	CSI_2_YUV422_8 = 0x1E,
+	CSI_2_YUV422_10 = 0x1F,
+	CSI_2_RGB444 = 0x20,
+	CSI_2_RGB555 = 0x21,
+	CSI_2_RGB565 = 0x22,
+	CSI_2_RGB666 = 0x23,
+	CSI_2_RGB888 = 0x24,
+	CSI_2_RAW6 = 0x28,
+	CSI_2_RAW7 = 0x29,
+	CSI_2_RAW8 = 0x2A,
+	CSI_2_RAW10 = 0x2B,
+	CSI_2_RAW12 = 0x2C,
+	CSI_2_RAW14 = 0x2D,
+	CSI_2_RAW16 = 0x2E,
+	CSI_2_RAW20 = 0x2F,
+	USER_DEFINED_1 = 0x30,
+	USER_DEFINED_2 = 0x31,
+	USER_DEFINED_3 = 0x32,
+	USER_DEFINED_4 = 0x33,
+	USER_DEFINED_5 = 0x34,
+	USER_DEFINED_6 = 0x35,
+	USER_DEFINED_7 = 0x36,
+	USER_DEFINED_8 = 0x37,
+};
+
+/* DWC MIPI CSI-2 output types */
+enum output {
+	IPI_OUT = 0,
+	IDI_OUT = 1,
+	BOTH_OUT = 2
+};
+
+/* IPI color components */
+enum color_mode {
+	COLOR48 = 0,
+	COLOR16 = 1
+};
+
+/* IPI cut through */
+enum cut_through {
+	CTINACTIVE = 0,
+	CTACTIVE = 1
+};
+
+/* IPI output types */
+enum ipi_output {
+	CAMERA_TIMING = 0,
+	AUTO_TIMING = 1
+};
+
+/* Format template */
+struct mipi_fmt {
+	u32 mbus_code;
+	u8 depth;
+    u32 width;
+    u32 height;
+};
+
+struct mipi_dt {
+	u32 hex;
+	char *name;
+};
+
+/* CSI specific configuration */
+struct csi_data {
+	u32 num_lanes;
+	u32 dphy_freq; //MBPS
+	u32 pclk;
+	u32 fps;
+	u32 bpp;
+	u32 output;
+	u32 ipi_mode;
+	u32 ipi_adv_features;
+	u32 ipi_cut_through;
+	u32 ipi_color_mode;
+	u32 ipi_auto_flush;
+	u32 virtual_ch;
+	u32 hsa;
+	u32 hbp;
+	u32 hsd;
+	u32 htotal;
+	u32 vsa;
+	u32 vbp;
+	u32 vfp;
+	u32 vactive;
+};
+
+/* Structure to embed device driver information */
+struct dw_csi {
+	//struct v4l2_subdev sd;
+	//struct video_device vdev;
+	//struct v4l2_device v4l2_dev;
+	struct device *dev;
+	//struct media_pad pads[CSI_PADS_NUM];
+	struct mipi_fmt *fmt;
+	//struct v4l2_mbus_framefmt format;
+	void __iomem *base_address;
+	void __iomem *demo;
+	void __iomem *csc;
+	int ctrl_irq_number;
+	int demosaic_irq;
+	struct csi_data hw;
+	struct reset_control *rst;
+	struct phy *phy;
+	struct dw_csih_pdata *config;
+	struct mutex lock; /* protect resources sharing */
+	spinlock_t slock; /* interrupt handling lock */
+	u8 ipi_dt;
+	u8 index;
+	u8 hw_version_major;
+	u16 hw_version_minor;
+};
+
+void dw_mipi_csi_reset(struct dw_csi *csi_dev);
+int dw_mipi_csi_mask_irq_power_off(struct dw_csi *csi_dev);
+int dw_mipi_csi_hw_stdby(struct dw_csi *csi_dev);
+void dw_mipi_csi_set_ipi_fmt(struct dw_csi *csi_dev);
+void dw_mipi_csi_start(struct dw_csi *csi_dev);
+int dw_mipi_csi_irq_handler(struct dw_csi *csi_dev);
+void dw_mipi_csi_get_version(struct dw_csi *csi_dev);
+int dw_mipi_csi_specific_mappings(struct dw_csi *csi_dev);
+void dw_mipi_csi_fill_timings(struct dw_csi *dev, uint32_t width, uint32_t height);
+void dw_mipi_csi_dump(struct dw_csi *csi_dev);
+
+#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
+int dw_csi_create_capabilities_sysfs(struct platform_device *pdev);
+int dw_csi_remove_capabilities_sysfs(struct platform_device *pdev);
+#endif
+
+int dw_mipi_csi_s_power(struct dw_csi *dev, int on);
+int dw_mipi_csi_log_status(struct dw_csi *dev);
+
+static inline void dw_mipi_csi_write(struct dw_csi *dev,
+				     u32 address, u32 data)
+{
+	writel(data, dev->base_address + address);
+}
+
+static inline u32 dw_mipi_csi_read(struct dw_csi *dev, u32 address)
+{
+	return readl(dev->base_address + address);
+}
+
+#endif /*_DW_MIPI_CSI_H__ */

+ 115 - 0
vvcam/native/csi/nwl/nwl_regs.h

@@ -0,0 +1,115 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#ifndef _NWL_REGS_H_
+#define _NWL_REGS_H_
+
+/*
+ * MRV_MIPICSI1_NUM_LANES
+ * Config num lanes register [3:0] rw
+ * 0000b - controller off
+ * 0001b - 1 Lane
+ * 0010b - 2 Lanes
+ * 0011b - 3 Lanes
+ * 0100b - 4 Lanes
+ */
+#define MRV_MIPICSI_NUM_LANES 0x0
+
+/*
+ * MRV_MIPICSI1_LANES_CLK
+ * Configure lanes clock [0]
+ * 0b - disable
+ * 1b - enable
+ */
+#define MRV_MIPICSI_LANES_CLK 0x4
+
+/*
+ * MRV_MIPICSI1_LANES_DATA
+ * enable/disable lanes data [7:0]
+ * setting bits to a '1' value enable data lane
+ */
+#define MRV_MIPICSI_LANES_DATA 0x8
+
+/*
+ * MRV_MIPICSI1_IGNORE_VC
+ * enable/disable lanes clock [0]
+ * setting bits to a '1' value enable data value
+ */
+#define MRV_MIPICSI_IGNORE_VC 0x80
+
+/*
+ * MRV_MIPICSI1_OUT_SHIFT
+ * Configure csi_vid_out register
+ */
+
+#define MRV_MIPICSI_FIFO_SENSD_LEVEL 0x88
+
+#define MRV_MIPICSI_VID_VSYNC 0x8c
+
+#define MRV_MIPICSI_VID_HSYNC_FP 0x90
+
+#define MRV_MIPICSI_VID_HSYNC 0x94
+
+#define MRV_MIPICSI_VID_HSYNC_BP 0x98
+
+
+
+
+
+#ifdef ISP8000L_V1801
+#define MRV_MIPICSI0_CTRL 0x8240 //0x308240
+#else
+#define MRV_MIPICSI0_CTRL 0x108240 //0x308240
+#endif
+#define MRV_MIPICSI1_CTRL 0x8244   //0x308244
+
+#endif /* _NWL_REGS_H_ */

+ 216 - 0
vvcam/native/csi/nwl/platform_nwl_csi_driver.c

@@ -0,0 +1,216 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+#include <linux/module.h>
+#include <linux/uaccess.h>
+#ifdef ISP8000L_V2008
+#include <linux/io.h>   //Fix thead compile error.
+#endif
+
+
+#include "nwl_regs.h"
+#include "csi_ioctl.h"
+
+int vvnative_csi_module_init(void * dev);
+int vvnative_csi_module_exit(void * dev);
+
+int vvnative_csi_set_stream_control(void * dev);
+int vvnative_csi_set_cfg(void * dev);
+int vvnative_csi_set_bit_shift(void *dev);
+static int nwl_register_write(void * dev,unsigned int addr, unsigned int data)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	writel(data, base_addr + addr);
+
+	return 0;
+}
+
+#if 0
+static int nwl_register_read(void * dev,unsigned int addr, unsigned int *data)
+{
+	void __iomem *base_addr;
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+	base_addr = nwl_csi_dev->base;
+
+	*data = readl(base_addr + addr);
+
+	return 0;
+}
+#endif
+
+int vvnative_csi_set_stream_control(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+	u32 clock_status;
+	u32 data_status;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	if (nwl_csi_dev->streaming_enable)
+	{
+		clock_status = 0x01;
+		data_status  = 0xFF;
+	}
+	else
+	{
+		clock_status = 0x00;
+		data_status  = 0x00;
+	}
+
+	nwl_register_write(dev,MRV_MIPICSI_LANES_CLK, clock_status);
+	nwl_register_write(dev,MRV_MIPICSI_LANES_DATA, data_status);
+	return 0;
+}
+
+int vvnative_csi_set_cfg(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	nwl_register_write(dev,MRV_MIPICSI_NUM_LANES, nwl_csi_dev->csi_lane_cfg.mipi_lane_num);
+
+	switch (nwl_csi_dev->csi_lane_cfg.mipi_lane_num)
+	{
+	case 1:
+		nwl_register_write(dev,MRV_MIPICSI_LANES_DATA, 0x01);
+		break;
+	case 2:
+		nwl_register_write(dev,MRV_MIPICSI_LANES_DATA, 0x03);
+		break;
+	case 4:
+		nwl_register_write(dev,MRV_MIPICSI_LANES_DATA, 0x0F);
+		break;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+int vvnative_csi_set_bit_shift(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	if (nwl_csi_dev->device_idx == 0)
+	{
+#ifndef INPUT_SIGNAL_12_BIT
+		nwl_register_write(dev,MRV_MIPICSI0_CTRL, 16 - nwl_csi_dev->bit_width); //16bit high-aligned
+#else
+		nwl_register_write(dev,MRV_MIPICSI0_CTRL, 0x0);  //input signal 12 bit does not need to shift
+#endif
+	}else
+	{
+#ifndef INPUT_SIGNAL_12_BIT
+		nwl_register_write(dev,MRV_MIPICSI1_CTRL, 16 - nwl_csi_dev->bit_width); //16bit high-aligned
+#else
+		nwl_register_write(dev,MRV_MIPICSI0_CTRL, 0x0);  //input signal 12 bit does not need to shift
+#endif
+	}
+
+	return 0;
+}
+
+int vvnative_csi_module_init(void * dev)
+{
+	struct vvcam_csi_dev *nwl_csi_dev;
+
+	if (dev == NULL)
+		return -1;
+	nwl_csi_dev = dev;
+
+	nwl_register_write(dev,MRV_MIPICSI_NUM_LANES, 0x04);
+	nwl_register_write(dev,MRV_MIPICSI_LANES_CLK, 0x01);
+	nwl_register_write(dev,MRV_MIPICSI_LANES_DATA, 0x0F);
+	nwl_register_write(dev,MRV_MIPICSI_IGNORE_VC, 0x01);
+
+	nwl_register_write(dev,MRV_MIPICSI_FIFO_SENSD_LEVEL, 0x41);
+	nwl_register_write(dev,MRV_MIPICSI_VID_VSYNC, 0x20);
+	nwl_register_write(dev,MRV_MIPICSI_VID_HSYNC_FP, 0x20);
+	nwl_register_write(dev,MRV_MIPICSI_VID_HSYNC, 0x01);
+	nwl_register_write(dev,MRV_MIPICSI_VID_HSYNC_BP, 0x20);
+
+	if (nwl_csi_dev->device_idx == 0)
+	{
+		nwl_register_write(dev,MRV_MIPICSI0_CTRL, 0);
+	}else
+	{
+		nwl_register_write(dev,MRV_MIPICSI1_CTRL, 0);
+	}
+
+	return 0;
+}
+
+int vvnative_csi_module_exit(void * dev)
+{
+
+	return 0;
+}

+ 367 - 0
vvcam/native/csi/vvcam_csi_driver.c

@@ -0,0 +1,367 @@
+/****************************************************************************
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ *****************************************************************************
+ *
+ * The GPL License (GPL)
+ *
+ * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program;
+ *
+ *****************************************************************************
+ *
+ * Note: This software is released under dual MIT and GPL licenses. A
+ * recipient may use this file under the terms of either the MIT license or
+ * GPL License. If you wish to use only one license not the other, you can
+ * indicate your decision by deleting one of the above license notices in your
+ * version of this file.
+ *
+ *****************************************************************************/
+
+#include <asm/io.h>
+#include <linux/cdev.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+
+#include "csi_ioctl.h"
+#include "csi_common.h"
+
+#define VIVCAM_CSI_NAME "vivcsi"
+#define VIVCAM_CSI_MAXCNT 2
+
+
+struct vvcam_csi_driver_dev
+{
+	struct cdev cdev;
+	dev_t devt;
+	struct class *class;
+	struct mutex vvmutex;
+	void *private;
+};
+
+static unsigned int vvcam_csi_major = 0;
+static unsigned int vvcam_csi_minor = 0;
+static struct class *vvcam_csi_class;
+static unsigned int devise_register_index = 0;
+
+
+static int vvcam_csi_open(struct inode * inode, struct file * file)
+{
+	struct vvcam_csi_driver_dev *pdriver_dev;
+
+	pdriver_dev = container_of(inode->i_cdev, struct vvcam_csi_driver_dev, cdev);
+	file->private_data = pdriver_dev;
+
+	return 0;
+};
+
+static long vvcam_csi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+	struct vvcam_csi_driver_dev *pdriver_dev;
+	struct vvcam_csi_dev * pcsi_dev;
+	long ret;
+
+	pdriver_dev = file->private_data;
+	if (pdriver_dev == NULL)
+	{
+		pr_err("%s:file private is null point error\n", __func__);
+		return  -ENOMEM;
+	}
+
+	pcsi_dev = pdriver_dev->private;
+
+	pr_info("%s:pdriver_dev =0x%px\n", __func__,pdriver_dev);
+	pr_info("%s:csi[%d] pcsi_dev =0x%px\n", __func__,pcsi_dev->device_idx,pcsi_dev);
+
+	mutex_lock(&pdriver_dev->vvmutex);
+	ret = csi_priv_ioctl(pcsi_dev, cmd, (void __user *)arg);
+	mutex_unlock(&pdriver_dev->vvmutex);
+
+	return ret;
+};
+
+static int vvcam_csi_release(struct inode * inode, struct file * file)
+{
+	return 0;
+};
+
+static struct file_operations vvcam_csi_fops = {
+	.owner = THIS_MODULE,
+	.open = vvcam_csi_open,
+	.release = vvcam_csi_release,
+	.unlocked_ioctl = vvcam_csi_ioctl,
+};
+
+static int vvcam_csi_probe(struct platform_device *pdev)
+{
+	int ret = 0;
+	struct vvcam_csi_driver_dev *pdriver_dev;
+	struct vvcam_csi_dev * pcsi_dev;
+
+	pr_info("enter %s\n", __func__);
+
+	if (pdev->id >= VIVCAM_CSI_MAXCNT)
+	{
+		pr_err("%s:pdev id is %d error\n", __func__,pdev->id);
+		return  -EINVAL;
+	}
+
+	pdriver_dev = devm_kzalloc(&pdev->dev,sizeof(struct vvcam_csi_driver_dev), GFP_KERNEL);
+	if (pdriver_dev == NULL)
+	{
+		pr_err("%s:alloc struct vvcam_csi_driver_dev error\n", __func__);
+		return  -ENOMEM;
+	}
+	memset(pdriver_dev,0,sizeof(struct vvcam_csi_driver_dev ));
+	pr_info("%s:csi[%d]: pdriver_dev =0x%px\n", __func__,pdev->id,pdriver_dev);
+
+	pcsi_dev = devm_kzalloc(&pdev->dev,sizeof(struct vvcam_csi_dev), GFP_KERNEL);
+	if (pcsi_dev == NULL)
+	{
+		pr_err("%s:alloc struct vvcam_csi_dev error\n", __func__);
+		return  -ENOMEM;
+	}
+	memset(pcsi_dev,0,sizeof(struct vvcam_csi_dev ));
+	pr_info("%s:csi[%d]: pcsi_dev =0x%px\n", __func__,pdev->id,pcsi_dev);
+
+	pcsi_dev->device_idx = pdev->id;
+	//mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	//pcsi_dev->base = devm_ioremap_resource(&pdev->dev, mem);
+	if (pcsi_dev->device_idx == 0)
+	{
+		pcsi_dev->base = ioremap(VVCSI0_BASE, VVCSI_SIZE);
+
+	}else
+	{
+		pcsi_dev->base = ioremap(VVCSI1_BASE, VVCSI_SIZE);
+	}
+	if (IS_ERR(pcsi_dev->base))
+		return PTR_ERR(pcsi_dev->base);
+
+
+	pdriver_dev->private = pcsi_dev;
+	mutex_init(&pdriver_dev->vvmutex);
+	platform_set_drvdata(pdev, pdriver_dev);
+
+	ret = vvnative_csi_module_init(pcsi_dev);
+	if (ret != 0)
+	{
+		pr_err("%s:vvnative_csi_module_init error\n", __func__);
+		return  -ENOMEM;
+	}
+
+	if (devise_register_index == 0)
+	{
+		if (vvcam_csi_major == 0)
+		{
+			ret = alloc_chrdev_region(&pdriver_dev->devt, 0, VIVCAM_CSI_MAXCNT, VIVCAM_CSI_NAME);
+			if (ret != 0)
+			{
+				pr_err("%s:alloc_chrdev_region error\n", __func__);
+				return ret;
+			}
+			vvcam_csi_major = MAJOR(pdriver_dev->devt);
+			vvcam_csi_minor = MINOR(pdriver_dev->devt);
+		}
+		else
+		{
+			pdriver_dev->devt = MKDEV(vvcam_csi_major, vvcam_csi_minor);
+			ret = register_chrdev_region(pdriver_dev->devt, VIVCAM_CSI_MAXCNT, VIVCAM_CSI_NAME);
+			if (ret)
+			{
+				pr_err("%s:register_chrdev_region error\n", __func__);
+				return ret;
+			}
+		}
+
+		vvcam_csi_class = class_create(THIS_MODULE, VIVCAM_CSI_NAME);
+		if (IS_ERR(vvcam_csi_class))
+		{
+			pr_err("%s[%d]:class_create error!\n", __func__, __LINE__);
+			return -EINVAL;
+		}
+	}
+	pdriver_dev->devt = MKDEV(vvcam_csi_major, vvcam_csi_minor + pdev->id);
+
+	cdev_init(&pdriver_dev->cdev, &vvcam_csi_fops);
+	ret = cdev_add(&pdriver_dev->cdev, pdriver_dev->devt, 1);
+	if ( ret )
+	{
+		pr_err("%s[%d]:cdev_add error!\n", __func__, __LINE__);
+		return ret;
+	}
+	pdriver_dev->class = vvcam_csi_class;
+	device_create(pdriver_dev->class, NULL, pdriver_dev->devt,
+			pdriver_dev, "%s%d", VIVCAM_CSI_NAME, pdev->id);
+
+	devise_register_index++;
+	pr_info("exit %s\n", __func__);
+	return ret;
+}
+
+static int vvcam_csi_remove(struct platform_device *pdev)
+{
+	struct vvcam_csi_driver_dev *pdriver_dev;
+	struct vvcam_csi_dev * pcsi_dev;
+
+	pr_info("enter %s\n", __func__);
+	devise_register_index--;
+	pdriver_dev = platform_get_drvdata(pdev);
+
+	pcsi_dev = pdriver_dev->private;
+	iounmap(pcsi_dev->base);
+
+	cdev_del(&pdriver_dev->cdev);
+	device_destroy(pdriver_dev->class, pdriver_dev->devt);
+	unregister_chrdev_region(pdriver_dev->devt, VIVCAM_CSI_MAXCNT);
+	if (devise_register_index == 0)
+	{
+		class_destroy(pdriver_dev->class);
+	}
+
+	return 0;
+}
+
+static struct platform_driver vvcam_csi_driver = {
+	.probe		= vvcam_csi_probe,
+	.remove		= vvcam_csi_remove,
+	.driver = {
+		.name  = VIVCAM_CSI_NAME,
+		.owner = THIS_MODULE,
+	}
+};
+
+static void vvcam_csi_pdev_release(struct device *dev)
+{
+	pr_info("enter %s\n", __func__);
+}
+
+#ifdef WITH_VVCAM
+static struct resource vvcam_csi0_resource[] = {
+	[0] = {
+		.start = VVCSI0_BASE,
+		.end   = VVCSI0_BASE + VVCSI_SIZE - 1,
+		.flags = IORESOURCE_MEM,
+	},
+};
+static struct platform_device vvcam_csi_pdev = {
+	.name = VIVCAM_CSI_NAME,
+	.id   = 0,
+	.resource = vvcam_csi0_resource,
+	.num_resources = 0,
+	.dev.release = vvcam_csi_pdev_release,
+};
+#endif
+
+#ifdef WITH_VVCAM_DUAL
+static struct resource vvcam_csi1_resource[] = {
+	[0] = {
+		.start = VVCSI1_BASE,
+		.end   = VVCSI1_BASE + VVCSI_SIZE - 1,
+		.flags = IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device vvcam_csi_dual_pdev = {
+	.name = VIVCAM_CSI_NAME,
+	.id   = 1,
+	.resource = vvcam_csi1_resource,
+	.num_resources = 0,
+	.dev.release = vvcam_csi_pdev_release,
+};
+#endif
+
+static int __init vvcam_csi_init_module(void)
+{
+	int ret = 0;
+
+	pr_info("enter %s\n", __func__);
+#ifdef WITH_VVCAM
+	ret = platform_device_register(&vvcam_csi_pdev);
+	if (ret)
+    {
+		pr_err("register platform device failed.\n");
+		return ret;
+	}
+#endif
+
+#ifdef WITH_VVCAM_DUAL
+	ret = platform_device_register(&vvcam_csi_dual_pdev);
+	if (ret)
+    {
+		pr_err("register platform device failed.\n");
+		return ret;
+	}
+#endif
+
+	ret = platform_driver_register(&vvcam_csi_driver);
+	if (ret)
+    {
+		pr_err("register platform driver failed.\n");
+		return ret;
+	}
+
+	return ret;
+}
+
+static void __exit vvcam_csi_exit_module(void)
+{
+	pr_info("enter %s\n", __func__);
+
+	platform_driver_unregister(&vvcam_csi_driver);
+#ifdef WITH_VVCAM
+	platform_device_unregister(&vvcam_csi_pdev);
+#endif
+
+#ifdef WITH_VVCAM_DUAL
+	platform_device_unregister(&vvcam_csi_dual_pdev);
+#endif
+}
+
+module_init(vvcam_csi_init_module);
+module_exit(vvcam_csi_exit_module);
+
+MODULE_DESCRIPTION("CSI");
+MODULE_LICENSE("GPL");

+ 19 - 0
vvcam/native/dec400/Makefile

@@ -0,0 +1,19 @@
+include $(PWD)/../Param.mk
+include $(PWD)/../../version/$(VERSION_CFG).mk
+TARGET = vvcam_dec400
+
+obj-m +=$(TARGET).o
+
+$(TARGET)-objs += dec400.o
+$(TARGET)-objs += dec400_ioctl.o
+EXTRA_CFLAGS += -I$(PWD)/../../common
+
+PWD :=$(shell pwd)
+
+all:
+	make   -C $(KERNEL) M=$(PWD)  modules
+modules_install:
+	make -C $(KERNEL_SRC) M=$(SRC) modules_install
+clean:
+	rm -rf $($(TARGET)-objs)
+	make -C $(KERNEL) M=`pwd` clean

Some files were not shown because too many files changed in this diff