1*238c84f7SMauro Carvalho Chehab /* SPDX-License-Identifier: GPL-2.0-only */ 2*238c84f7SMauro Carvalho Chehab /* 3*238c84f7SMauro Carvalho Chehab * Samsung Exynos4x12 FIMC-IS (Imaging Subsystem) driver 4*238c84f7SMauro Carvalho Chehab * 5*238c84f7SMauro Carvalho Chehab * FIMC-IS command set definitions 6*238c84f7SMauro Carvalho Chehab * 7*238c84f7SMauro Carvalho Chehab * Copyright (C) 2013 Samsung Electronics Co., Ltd. 8*238c84f7SMauro Carvalho Chehab * 9*238c84f7SMauro Carvalho Chehab * Authors: Younghwan Joo <yhwan.joo@samsung.com> 10*238c84f7SMauro Carvalho Chehab * Sylwester Nawrocki <s.nawrocki@samsung.com> 11*238c84f7SMauro Carvalho Chehab */ 12*238c84f7SMauro Carvalho Chehab 13*238c84f7SMauro Carvalho Chehab #ifndef FIMC_IS_CMD_H_ 14*238c84f7SMauro Carvalho Chehab #define FIMC_IS_CMD_H_ 15*238c84f7SMauro Carvalho Chehab 16*238c84f7SMauro Carvalho Chehab #define FIMC_IS_COMMAND_VER 110 /* FIMC-IS command set version 1.10 */ 17*238c84f7SMauro Carvalho Chehab 18*238c84f7SMauro Carvalho Chehab /* Enumeration of commands between the FIMC-IS and the host processor. */ 19*238c84f7SMauro Carvalho Chehab 20*238c84f7SMauro Carvalho Chehab /* HOST to FIMC-IS */ 21*238c84f7SMauro Carvalho Chehab #define HIC_PREVIEW_STILL 0x0001 22*238c84f7SMauro Carvalho Chehab #define HIC_PREVIEW_VIDEO 0x0002 23*238c84f7SMauro Carvalho Chehab #define HIC_CAPTURE_STILL 0x0003 24*238c84f7SMauro Carvalho Chehab #define HIC_CAPTURE_VIDEO 0x0004 25*238c84f7SMauro Carvalho Chehab #define HIC_STREAM_ON 0x0005 26*238c84f7SMauro Carvalho Chehab #define HIC_STREAM_OFF 0x0006 27*238c84f7SMauro Carvalho Chehab #define HIC_SET_PARAMETER 0x0007 28*238c84f7SMauro Carvalho Chehab #define HIC_GET_PARAMETER 0x0008 29*238c84f7SMauro Carvalho Chehab #define HIC_SET_TUNE 0x0009 30*238c84f7SMauro Carvalho Chehab #define HIC_GET_STATUS 0x000b 31*238c84f7SMauro Carvalho Chehab /* Sensor part */ 32*238c84f7SMauro Carvalho Chehab #define HIC_OPEN_SENSOR 0x000c 33*238c84f7SMauro Carvalho Chehab #define HIC_CLOSE_SENSOR 0x000d 34*238c84f7SMauro Carvalho Chehab #define HIC_SIMMIAN_INIT 0x000e 35*238c84f7SMauro Carvalho Chehab #define HIC_SIMMIAN_WRITE 0x000f 36*238c84f7SMauro Carvalho Chehab #define HIC_SIMMIAN_READ 0x0010 37*238c84f7SMauro Carvalho Chehab #define HIC_POWER_DOWN 0x0011 38*238c84f7SMauro Carvalho Chehab #define HIC_GET_SET_FILE_ADDR 0x0012 39*238c84f7SMauro Carvalho Chehab #define HIC_LOAD_SET_FILE 0x0013 40*238c84f7SMauro Carvalho Chehab #define HIC_MSG_CONFIG 0x0014 41*238c84f7SMauro Carvalho Chehab #define HIC_MSG_TEST 0x0015 42*238c84f7SMauro Carvalho Chehab /* FIMC-IS to HOST */ 43*238c84f7SMauro Carvalho Chehab #define IHC_GET_SENSOR_NUM 0x1000 44*238c84f7SMauro Carvalho Chehab #define IHC_SET_SHOT_MARK 0x1001 45*238c84f7SMauro Carvalho Chehab /* parameter1: frame number */ 46*238c84f7SMauro Carvalho Chehab /* parameter2: confidence level (smile 0~100) */ 47*238c84f7SMauro Carvalho Chehab /* parameter3: confidence level (blink 0~100) */ 48*238c84f7SMauro Carvalho Chehab #define IHC_SET_FACE_MARK 0x1002 49*238c84f7SMauro Carvalho Chehab /* parameter1: coordinate count */ 50*238c84f7SMauro Carvalho Chehab /* parameter2: coordinate buffer address */ 51*238c84f7SMauro Carvalho Chehab #define IHC_FRAME_DONE 0x1003 52*238c84f7SMauro Carvalho Chehab /* parameter1: frame start number */ 53*238c84f7SMauro Carvalho Chehab /* parameter2: frame count */ 54*238c84f7SMauro Carvalho Chehab #define IHC_AA_DONE 0x1004 55*238c84f7SMauro Carvalho Chehab #define IHC_NOT_READY 0x1005 56*238c84f7SMauro Carvalho Chehab 57*238c84f7SMauro Carvalho Chehab #define IH_REPLY_DONE 0x2000 58*238c84f7SMauro Carvalho Chehab #define IH_REPLY_NOT_DONE 0x2001 59*238c84f7SMauro Carvalho Chehab 60*238c84f7SMauro Carvalho Chehab enum fimc_is_scenario { 61*238c84f7SMauro Carvalho Chehab IS_SC_PREVIEW_STILL, 62*238c84f7SMauro Carvalho Chehab IS_SC_PREVIEW_VIDEO, 63*238c84f7SMauro Carvalho Chehab IS_SC_CAPTURE_STILL, 64*238c84f7SMauro Carvalho Chehab IS_SC_CAPTURE_VIDEO, 65*238c84f7SMauro Carvalho Chehab IS_SC_MAX 66*238c84f7SMauro Carvalho Chehab }; 67*238c84f7SMauro Carvalho Chehab 68*238c84f7SMauro Carvalho Chehab enum fimc_is_sub_scenario { 69*238c84f7SMauro Carvalho Chehab IS_SC_SUB_DEFAULT, 70*238c84f7SMauro Carvalho Chehab IS_SC_SUB_PS_VTCALL, 71*238c84f7SMauro Carvalho Chehab IS_SC_SUB_CS_VTCALL, 72*238c84f7SMauro Carvalho Chehab IS_SC_SUB_PV_VTCALL, 73*238c84f7SMauro Carvalho Chehab IS_SC_SUB_CV_VTCALL, 74*238c84f7SMauro Carvalho Chehab }; 75*238c84f7SMauro Carvalho Chehab 76*238c84f7SMauro Carvalho Chehab struct is_common_regs { 77*238c84f7SMauro Carvalho Chehab u32 hicmd; 78*238c84f7SMauro Carvalho Chehab u32 hic_sensorid; 79*238c84f7SMauro Carvalho Chehab u32 hic_param[4]; 80*238c84f7SMauro Carvalho Chehab u32 reserved1[4]; 81*238c84f7SMauro Carvalho Chehab 82*238c84f7SMauro Carvalho Chehab u32 ihcmd; 83*238c84f7SMauro Carvalho Chehab u32 ihc_sensorid; 84*238c84f7SMauro Carvalho Chehab u32 ihc_param[4]; 85*238c84f7SMauro Carvalho Chehab u32 reserved2[4]; 86*238c84f7SMauro Carvalho Chehab 87*238c84f7SMauro Carvalho Chehab u32 isp_sensor_id; 88*238c84f7SMauro Carvalho Chehab u32 isp_param[2]; 89*238c84f7SMauro Carvalho Chehab u32 reserved3[1]; 90*238c84f7SMauro Carvalho Chehab 91*238c84f7SMauro Carvalho Chehab u32 scc_sensor_id; 92*238c84f7SMauro Carvalho Chehab u32 scc_param[2]; 93*238c84f7SMauro Carvalho Chehab u32 reserved4[1]; 94*238c84f7SMauro Carvalho Chehab 95*238c84f7SMauro Carvalho Chehab u32 dnr_sensor_id; 96*238c84f7SMauro Carvalho Chehab u32 dnr_param[2]; 97*238c84f7SMauro Carvalho Chehab u32 reserved5[1]; 98*238c84f7SMauro Carvalho Chehab 99*238c84f7SMauro Carvalho Chehab u32 scp_sensor_id; 100*238c84f7SMauro Carvalho Chehab u32 scp_param[2]; 101*238c84f7SMauro Carvalho Chehab u32 reserved6[29]; 102*238c84f7SMauro Carvalho Chehab } __packed; 103*238c84f7SMauro Carvalho Chehab 104*238c84f7SMauro Carvalho Chehab struct is_mcuctl_reg { 105*238c84f7SMauro Carvalho Chehab u32 mcuctl; 106*238c84f7SMauro Carvalho Chehab u32 bboar; 107*238c84f7SMauro Carvalho Chehab 108*238c84f7SMauro Carvalho Chehab u32 intgr0; 109*238c84f7SMauro Carvalho Chehab u32 intcr0; 110*238c84f7SMauro Carvalho Chehab u32 intmr0; 111*238c84f7SMauro Carvalho Chehab u32 intsr0; 112*238c84f7SMauro Carvalho Chehab u32 intmsr0; 113*238c84f7SMauro Carvalho Chehab 114*238c84f7SMauro Carvalho Chehab u32 intgr1; 115*238c84f7SMauro Carvalho Chehab u32 intcr1; 116*238c84f7SMauro Carvalho Chehab u32 intmr1; 117*238c84f7SMauro Carvalho Chehab u32 intsr1; 118*238c84f7SMauro Carvalho Chehab u32 intmsr1; 119*238c84f7SMauro Carvalho Chehab 120*238c84f7SMauro Carvalho Chehab u32 intcr2; 121*238c84f7SMauro Carvalho Chehab u32 intmr2; 122*238c84f7SMauro Carvalho Chehab u32 intsr2; 123*238c84f7SMauro Carvalho Chehab u32 intmsr2; 124*238c84f7SMauro Carvalho Chehab 125*238c84f7SMauro Carvalho Chehab u32 gpoctrl; 126*238c84f7SMauro Carvalho Chehab u32 cpoenctlr; 127*238c84f7SMauro Carvalho Chehab u32 gpictlr; 128*238c84f7SMauro Carvalho Chehab 129*238c84f7SMauro Carvalho Chehab u32 reserved[0xd]; 130*238c84f7SMauro Carvalho Chehab 131*238c84f7SMauro Carvalho Chehab struct is_common_regs common; 132*238c84f7SMauro Carvalho Chehab } __packed; 133*238c84f7SMauro Carvalho Chehab 134*238c84f7SMauro Carvalho Chehab #endif /* FIMC_IS_CMD_H_ */ 135