1 /* 2 * linux-5.4/drivers/media/platform/sunxi-vin/platform/sun50iw3p1_vin_cfg.h 3 * 4 * Copyright (c) 2007-2017 Allwinnertech Co., Ltd. 5 * 6 * This software is licensed under the terms of the GNU General Public 7 * License version 2, as published by the Free Software Foundation, and 8 * may be copied, distributed, and modified under those terms. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 */ 16 17 18 #ifndef _SUN50IW3P1_VIN_CFG_H_ 19 #define _SUN50IW3P1_VIN_CFG_H_ 20 21 #define CSI0_REGS_BASE 0x06621000 22 #define CSI1_REGS_BASE 0x06621000 23 #define CSI0_CCI_REG_BASE 0x0662e000 24 #define VIPP0_REGS_BASE 0x02101000 25 #define VIPP1_REGS_BASE 0x02101400 26 27 #define ISP_REGS_BASE 0x02100000 28 #define GPIO_REGS_VBASE 0x0300b000 29 #define CPU_DRAM_PADDR_ORG 0x40000000 30 #define HW_DMA_OFFSET 0x00000000 31 32 /*set vin core clk base on sensor size*/ 33 #define CORE_CLK_RATE_FOR_2M (108*1000*1000) 34 #define CORE_CLK_RATE_FOR_3M (216*1000*1000) 35 #define CORE_CLK_RATE_FOR_5M (216*1000*1000) 36 #define CORE_CLK_RATE_FOR_8M (432*1000*1000) 37 #define CORE_CLK_RATE_FOR_16M (432*1000*1000) 38 39 /*CSI & ISP size configs*/ 40 41 #define CSI0_REG_SIZE 0x1000 42 #define MIPI_CSI_REG_SIZE 0x1000 43 #define MIPI_DPHY_REG_SIZE 0x1000 44 #define CSI0_CCI_REG_SIZE 0x1000 45 #define CSI1_REG_SIZE 0x1000 46 #define CSI1_CCI_REG_SIZE 0x1000 47 #define VIPP0_REG_SIZE 0x400 48 #define VIPP1_REG_SIZE 0x400 49 50 #define VIN_MAX_DEV 2 51 #define VIN_MAX_CSI 1 52 #define VIN_MAX_CCI 1 53 #define VIN_MAX_TDM 0 54 #define VIN_MAX_MIPI 0 55 #define VIN_MAX_ISP 1 56 #define VIN_MAX_SCALER 2 57 58 #define MAX_CH_NUM 4 59 60 #endif /*_SUN50IW3P1_VIN_CFG_H_*/ 61