linux_dsm_epyc7002/include/linux/platform_data/media/mmp-camera.h
Lubomir Rintel 81a409bfd5 media: marvell-ccic: provide a clock for the sensor
The sensor needs the MCLK clock running when it's being probed. On
platforms where the sensor is instantiated from a DT (MMP2) it is going
to happen asynchronously.

Therefore, the current modus operandi, where the bridge driver fiddles
with the sensor power and clock itself is not going to fly. As the comments
wisely note, this doesn't even belong there.

Luckily, the ov7670 driver is already able to control its power and
reset lines, we can just drop the MMP platform glue altogether.

It also requests the clock via the standard clock subsystem. Good -- let's
set up a clock instance so that the sensor can ask us to enable the clock.
Note that this is pretty dumb at the moment: the clock is hardwired to a
particular frequency and parent. It was always the case.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24 11:33:49 -04:00

26 lines
624 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Information for the Marvell Armada MMP camera
*/
#include <media/v4l2-mediabus.h>
enum dphy3_algo {
DPHY3_ALGO_DEFAULT = 0,
DPHY3_ALGO_PXA910,
DPHY3_ALGO_PXA2128
};
struct mmp_camera_platform_data {
enum v4l2_mbus_type bus_type;
int mclk_src; /* which clock source the MCLK derives from */
int mclk_div; /* Clock Divider Value for MCLK */
/*
* MIPI support
*/
int dphy[3]; /* DPHY: CSI2_DPHY3, CSI2_DPHY5, CSI2_DPHY6 */
enum dphy3_algo dphy3_algo; /* algos for calculate CSI2_DPHY3 */
int lane; /* ccic used lane number; 0 means DVP mode */
int lane_clk;
};