media: spi: rk1608: add mipi lane out config.

Signed-off-by: Sach Lin <sach.lin@rock-chips.com>
Change-Id: I32b6255006fa9d47154c2de7d4d85768f0133a0e
This commit is contained in:
Sach Lin
2022-06-06 11:21:21 +08:00
committed by Tao Huang
parent 6dda2467a8
commit 072fe1d70e
3 changed files with 8 additions and 2 deletions

View File

@@ -656,7 +656,7 @@ static int rk1608_msg_set_output_size(struct rk1608_state *pdata,
msg->head.mipi_clk = 2 * pdata->dphy[id]->link_freqs;
msg->head.line_length_pclk = fmt_inf->htotal;
msg->head.frame_length_lines = fmt_inf->vtotal;
msg->head.mipi_lane = fmt_inf->mipi_lane;
msg->head.mipi_lane = fmt_inf->mipi_lane_out;
msg->head.flip = pdata->flip;
return rk1608_send_msg_to_dsp(pdata, &msg->head.msg_head);

View File

@@ -257,7 +257,7 @@ static int rk1608_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
struct rk1608_dphy *pdata = to_state(sd);
u32 val = 0;
val = 1 << (pdata->fmt_inf[pdata->fmt_inf_idx].mipi_lane - 1) |
val = 1 << (pdata->fmt_inf[pdata->fmt_inf_idx].mipi_lane_out - 1) |
V4L2_MBUS_CSI2_CHANNEL_0 |
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
@@ -638,6 +638,11 @@ static int rk1608_dphy_dt_property(struct rk1608_dphy *dphy)
if (ret)
dev_warn(dphy->dev, "Can not get mipi_lane!");
ret = of_property_read_u32(node, "mipi_lane_out",
&dphy->fmt_inf[idx].mipi_lane_out);
if (ret)
dev_warn(dphy->dev, "Can not get mipi_lane_out!");
ret = of_property_read_u32(node, "field",
&dphy->fmt_inf[idx].mf.field);
if (ret)

View File

@@ -16,6 +16,7 @@ struct rk1608_chinf {
struct rk1608_fmt_inf {
u32 data_type;
u32 mipi_lane;
u32 mipi_lane_out;
u32 hactive;
u32 vactive;
u32 htotal;