mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
media: rockchip: flexbus cif add support for rk3506
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I2b299246e7392e4b27ddd5aa00d9f49ede3014cb
This commit is contained in:
@@ -1037,7 +1037,7 @@ static int flexbus_cif_stream_start(struct flexbus_cif_stream *stream)
|
||||
flexbus_cif_write_register(dev, FLEXBUS_SLAVE_MODE, BIT(1) | BIT(0));
|
||||
val = flexbus_cif_read_register(dev, FLEXBUS_RX_CTL);
|
||||
val &= ~FLEXBUS_DST_WAT_LVL_MASK;
|
||||
val |= FLEXBUS_DFS_8BIT;
|
||||
val |= dev->fb_dev->dfs_reg->dfs_8bit;
|
||||
val |= FLEXBUS_CONTINUE_MODE;
|
||||
val |= FLEXBUS_AUTOPAD;
|
||||
flexbus_cif_write_register(dev, FLEXBUS_RX_CTL, val);
|
||||
@@ -1048,6 +1048,17 @@ static int flexbus_cif_stream_start(struct flexbus_cif_stream *stream)
|
||||
flexbus_cif_write_register(dev, FLEXBUS_DVP_ORDER, stream->cif_fmt_in->cif_yuv_order |
|
||||
stream->cif_fmt_out->cif_yuv_order);
|
||||
|
||||
if (dev->chip_id == RK_FLEXBUS_CIF_RK3506) {
|
||||
if (stream->cif_fmt_out->fourcc == V4L2_PIX_FMT_RGB24)
|
||||
flexbus_cif_write_register(dev, FLEXBUS_DVP_YUV2RGB,
|
||||
CIF_YUV2RGB_ENABLE | CIF_YUV2RGB_B_LSB | CIF_YUV2RGB_BT601_FULL);
|
||||
else if (stream->cif_fmt_out->fourcc == V4L2_PIX_FMT_BGR24)
|
||||
flexbus_cif_write_register(dev, FLEXBUS_DVP_YUV2RGB,
|
||||
CIF_YUV2RGB_ENABLE | CIF_YUV2RGB_BT601_FULL);
|
||||
else
|
||||
flexbus_cif_write_register(dev, FLEXBUS_DVP_YUV2RGB, 0);
|
||||
}
|
||||
|
||||
flexbus_cif_write_register_or(dev, FLEXBUS_IMR, CIF_FIFO_OVERFLOW |
|
||||
CIF_BANDWIDTH_LACK |
|
||||
CIF_DMA_END |
|
||||
|
||||
@@ -513,14 +513,22 @@ static int flexbus_cif_plat_uninit(struct flexbus_cif_device *cif_dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct flexbus_cif_match_data cif_match_data = {
|
||||
static const struct flexbus_cif_match_data rk3576_cif_match_data = {
|
||||
.chip_id = RK_FLEXBUS_CIF_RK3576,
|
||||
};
|
||||
|
||||
static const struct flexbus_cif_match_data rk3506_cif_match_data = {
|
||||
.chip_id = RK_FLEXBUS_CIF_RK3506,
|
||||
};
|
||||
|
||||
static const struct of_device_id flexbus_cif_plat_of_match[] = {
|
||||
{
|
||||
.compatible = "rockchip,flexbus-cif-rk3576",
|
||||
.data = &cif_match_data,
|
||||
.data = &rk3576_cif_match_data,
|
||||
},
|
||||
{
|
||||
.compatible = "rockchip,flexbus-cif-rk3506",
|
||||
.data = &rk3506_cif_match_data,
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -82,6 +82,7 @@ enum flexbus_cif_crop_src {
|
||||
|
||||
enum flexbus_cif_chip_id {
|
||||
RK_FLEXBUS_CIF_RK3576,
|
||||
RK_FLEXBUS_CIF_RK3506,
|
||||
};
|
||||
|
||||
struct flexbus_cif_match_data {
|
||||
|
||||
Reference in New Issue
Block a user