diff options
author | Wojciech Bieganski <wbieganski@antmicro.com> | 2015-08-26 14:38:30 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-11-21 15:05:07 +0100 |
commit | 3b184a9ca00a16f509e710d03c570dc7dcbe44f1 (patch) | |
tree | ffcc37dcffc8a2a3da1ee25095c80c8bb390b5ba /drivers/media/platform/soc_camera/tegra_camera/vi2.c | |
parent | 3403c12eb0b1dc9ee54c9e2318f3ee10ae47709a (diff) |
YUV sensors support added to tegra_camera driver
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'drivers/media/platform/soc_camera/tegra_camera/vi2.c')
-rw-r--r-- | drivers/media/platform/soc_camera/tegra_camera/vi2.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/platform/soc_camera/tegra_camera/vi2.c b/drivers/media/platform/soc_camera/tegra_camera/vi2.c index 8c1f81a56b7a..331f35cbd855 100644 --- a/drivers/media/platform/soc_camera/tegra_camera/vi2.c +++ b/drivers/media/platform/soc_camera/tegra_camera/vi2.c @@ -609,8 +609,8 @@ static int vi2_capture_setup_csi_0(struct tegra_camera_dev *cam, 0x3 | (0x1 << 5) | (0x40 << 8)); #endif - TC_VI_REG_WT(cam, TEGRA_CSI_PHY_CILA_CONTROL0, 0x9); - TC_VI_REG_WT(cam, TEGRA_CSI_PHY_CILB_CONTROL0, 0x9); + TC_VI_REG_WT(cam, TEGRA_CSI_PHY_CILA_CONTROL0, 0x49); + TC_VI_REG_WT(cam, TEGRA_CSI_PHY_CILB_CONTROL0, 0x49); TC_VI_REG_WT(cam, TEGRA_CSI_PIXEL_STREAM_PPA_COMMAND, 0xf007); TC_VI_REG_WT(cam, TEGRA_CSI_CSI_PIXEL_PARSER_A_INTERRUPT_MASK, 0x0); TC_VI_REG_WT(cam, TEGRA_CSI_PIXEL_STREAM_A_CONTROL0, 0x280301f0); @@ -650,7 +650,9 @@ static int vi2_capture_setup_csi_0(struct tegra_camera_dev *cam, (icd->current_fmt->code == V4L2_MBUS_FMT_VYUY8_2X8) || (icd->current_fmt->code == V4L2_MBUS_FMT_YUYV8_2X8) || (icd->current_fmt->code == V4L2_MBUS_FMT_YVYU8_2X8)) { - /* TBD */ + format = TEGRA_IMAGE_FORMAT_T_U8_Y8__V8_Y8; + data_type = TEGRA_IMAGE_DT_YUV422_8; + image_size = icd->user_width * 2; } else if ((icd->current_fmt->code == V4L2_MBUS_FMT_SBGGR8_1X8) || (icd->current_fmt->code == V4L2_MBUS_FMT_SGBRG8_1X8)) { format = TEGRA_IMAGE_FORMAT_T_L8; @@ -663,8 +665,7 @@ static int vi2_capture_setup_csi_0(struct tegra_camera_dev *cam, image_size = (icd->user_width * 10) >> 3; } - TC_VI_REG_WT(cam, TEGRA_VI_CSI_0_IMAGE_DEF, - (cam->tpg_mode ? 0 : 1 << 24) | (format << 16) | 0x1); + TC_VI_REG_WT(cam, TEGRA_VI_CSI_0_IMAGE_DEF, ((format << 16) | 0x1)); TC_VI_REG_WT(cam, TEGRA_VI_CSI_0_CSI_IMAGE_DT, data_type); @@ -1125,6 +1126,7 @@ static void vi2_sw_reset(struct tegra_camera_dev *cam) TC_VI_REG_WT(cam, TEGRA_CSI_CLKEN_OVERRIDE, 0x0); udelay(10); + } static int vi2_mipi_calibration(struct tegra_camera_dev *cam, |