/** ****************************************************************************** * @file csi_reg.h * @version V1.0 * @date 2022-12-13 * @brief This file is the description of.IP register ****************************************************************************** * @attention * *

© COPYRIGHT(c) 2020 Bouffalo Lab

* * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of Bouffalo Lab nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ #ifndef __HARDWARE_CSI_H__ #define __HARDWARE_CSI_H__ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Register offsets *********************************************************/ #define CSI_MIPI_CONFIG_OFFSET (0x0)/* mipi_config */ #define CSI_INT_STATUS_OFFSET (0x10)/* csi_int_status */ #define CSI_INT_MASK_OFFSET (0x14)/* csi_int_mask */ #define CSI_INT_CLEAR_OFFSET (0x18)/* csi_int_clear */ #define CSI_INT_ENABLE_OFFSET (0x1C)/* csi_int_enable */ #define CSI_GNR_BUF_STATUS_OFFSET (0x20)/* gnr_buf_status */ #define CSI_GNR_BUF_RDATA_OFFSET (0x24)/* gnr_buf_rdata */ #define CSI_DPHY_CONFIG_0_OFFSET (0x80)/* dphy_config_0 */ #define CSI_DPHY_CONFIG_1_OFFSET (0x84)/* dphy_config_1 */ #define CSI_DPHY_CONFIG_2_OFFSET (0x88)/* dphy_config_2 */ #define CSI_DPHY_CONFIG_3_OFFSET (0x8C)/* dphy_config_3 */ #define CSI_DPHY_CONFIG_4_OFFSET (0x90)/* dphy_config_4 */ #define CSI_DPHY_CONFIG_5_OFFSET (0x94)/* dphy_config_5 */ #define CSI_DUMMY_REG_OFFSET (0xFC)/* dummy_reg */ /* Register Bitfield definitions *****************************************************/ /* 0x0 : mipi_config */ #define CSI_CR_CSI_EN (1<<0U) #define CSI_CR_LANE_NUM (1<<1U) #define CSI_CR_LANE_INV (1<<3U) #define CSI_CR_DATA_BIT_INV (1<<4U) #define CSI_CR_SYNC_SP_EN (1<<5U) #define CSI_CR_UNPACK_EN (1<<6U) #define CSI_CR_VC_DVP0_SHIFT (12U) #define CSI_CR_VC_DVP0_MASK (0x3<