Commit e0eec9af authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignment

Allow the MIPI-CSI data alignment to be defined in the board setup
as it may be different across various camera sensors.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 117182d1
...@@ -665,7 +665,9 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc, ...@@ -665,7 +665,9 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
vid_cap->fmt.code); vid_cap->fmt.code);
return -EINVAL; return -EINVAL;
} }
writel(tmp | (0x1 << 8), fimc->regs + S5P_CSIIMGFMT); tmp |= (cam->csi_data_align == 32) << 8;
writel(tmp, fimc->regs + S5P_CSIIMGFMT);
} else if (cam->bus_type == FIMC_ITU_601 || } else if (cam->bus_type == FIMC_ITU_601 ||
cam->bus_type == FIMC_ITU_656) { cam->bus_type == FIMC_ITU_656) {
......
...@@ -33,6 +33,7 @@ struct i2c_board_info; ...@@ -33,6 +33,7 @@ struct i2c_board_info;
* @board_info: pointer to I2C subdevice's board info * @board_info: pointer to I2C subdevice's board info
* @clk_frequency: frequency of the clock the host interface provides to sensor * @clk_frequency: frequency of the clock the host interface provides to sensor
* @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc.
* @csi_data_align: MIPI-CSI interface data alignment in bits
* @i2c_bus_num: i2c control bus id the sensor is attached to * @i2c_bus_num: i2c control bus id the sensor is attached to
* @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
* @flags: flags defining bus signals polarity inversion (High by default) * @flags: flags defining bus signals polarity inversion (High by default)
...@@ -41,6 +42,7 @@ struct s5p_fimc_isp_info { ...@@ -41,6 +42,7 @@ struct s5p_fimc_isp_info {
struct i2c_board_info *board_info; struct i2c_board_info *board_info;
unsigned long clk_frequency; unsigned long clk_frequency;
enum cam_bus_type bus_type; enum cam_bus_type bus_type;
u16 csi_data_align;
u16 i2c_bus_num; u16 i2c_bus_num;
u16 mux_id; u16 mux_id;
u16 flags; u16 flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment