camera: rockchip: camsys_drv: v0.0x22.4

Change-Id: I169afc59a55a4056da76d2bdd1a32fbf86d28658
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
This commit is contained in:
zhangyunlong 2017-09-07 16:09:57 +08:00 committed by Tao Huang
commit df069b4939
4 changed files with 36 additions and 6 deletions

View file

@ -187,9 +187,11 @@
1) 3399 power management is wrong, correct it.
*v0.0x23.0:
1) replace current->pid with irqsta->pid.
*v0.0x24.0:
1) function is the same as commit in v0.0x22.3 but now is better way.
*/
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x23, 0)
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x24, 0)
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
#define CAMSYS_PLATFORM_MARVIN_NAME "Platform_MarvinDev"

View file

@ -365,8 +365,18 @@ camsys_dev_t *camsys_dev, camsys_soc_cfg_t cfg_cmd, void *cfg_para)
}
case Mipi_Phy_Cfg: {
camsys_rk3288_mipihpy_cfg
((camsys_mipiphy_soc_para_t *)cfg_para);
camsys_mipiphy_soc_para_t *para
= (camsys_mipiphy_soc_para_t *)cfg_para;
if (para->phy->dir == CamSys_Mipiphy_Tx &&
para->phy->phy_index == 1) {
/* TX1/RX1 DPHY switch to RX status */
__raw_writel(0xa000a000,
(void *)(camsys_dev->rk_grf_base + 0x027c));
} else {
camsys_rk3288_mipihpy_cfg
((camsys_mipiphy_soc_para_t *)cfg_para);
}
break;
}

View file

@ -386,8 +386,18 @@ int camsys_rk3399_cfg
}
case Mipi_Phy_Cfg: {
camsys_rk3399_mipihpy_cfg
((camsys_mipiphy_soc_para_t *)cfg_para);
camsys_mipiphy_soc_para_t *para
= (camsys_mipiphy_soc_para_t *)cfg_para;
if (para->phy->dir == CamSys_Mipiphy_Tx &&
para->phy->phy_index == 1) {
/* TX1/RX1 DPHY switch to RX status */
__raw_writel(0x300020,
(void *)(camsys_dev->rk_grf_base + 0x6260));
} else {
camsys_rk3399_mipihpy_cfg
((camsys_mipiphy_soc_para_t *)cfg_para);
}
break;
}

View file

@ -37,9 +37,11 @@
1) add fs_id, fe_id and some reserved bytes in struct camsys_irqsta_s.
*v0.f.0:
1) add pid in struct camsys_irqsta_s.
*v1.0.0:
1) add enum camsys_mipiphy_dir_e.
*/
#define CAMSYS_HEAD_VERSION KERNEL_VERSION(0, 0xf, 0)
#define CAMSYS_HEAD_VERSION KERNEL_VERSION(1, 0x0, 0)
#define CAMSYS_MARVIN_DEVNAME "camsys_marvin"
#define CAMSYS_CIF0_DEVNAME "camsys_cif0"
@ -174,10 +176,16 @@ typedef struct camsys_flash_info_s {
camsys_gpio_info_t fl_en;
} camsys_flash_info_t;
enum camsys_mipiphy_dir_e {
CamSys_Mipiphy_Rx = 0,
CamSys_Mipiphy_Tx = 1,
};
typedef struct camsys_mipiphy_s {
unsigned int data_en_bit; // data lane enable bit;
unsigned int bit_rate; // Mbps/lane
unsigned int phy_index; // phy0,phy1
enum camsys_mipiphy_dir_e dir; // direction
} camsys_mipiphy_t;
typedef enum camsys_fmt_e {