mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Add support for Raspberry Pi CFE. The CFE is a hardware block that contains: - MIPI D-PHY - MIPI CSI-2 receiver - Front End ISP (FE) The driver has been upported from the Raspberry Pi kernel commit 88a681df9623 ("ARM: dts: bcm2712-rpi: Add i2c<n>_pins labels"). Co-developed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* PiSP Front End Driver
|
|
*
|
|
* Copyright (c) 2021-2024 Raspberry Pi Ltd.
|
|
*/
|
|
#ifndef _PISP_FE_H_
|
|
#define _PISP_FE_H_
|
|
|
|
#include <linux/debugfs.h>
|
|
#include <linux/io.h>
|
|
#include <linux/types.h>
|
|
#include <linux/videodev2.h>
|
|
|
|
#include <media/media-device.h>
|
|
#include <media/v4l2-device.h>
|
|
#include <media/v4l2-subdev.h>
|
|
|
|
#include <linux/media/raspberrypi/pisp_fe_config.h>
|
|
|
|
enum pisp_fe_pads {
|
|
FE_STREAM_PAD,
|
|
FE_CONFIG_PAD,
|
|
FE_OUTPUT0_PAD,
|
|
FE_OUTPUT1_PAD,
|
|
FE_STATS_PAD,
|
|
FE_NUM_PADS
|
|
};
|
|
|
|
struct pisp_fe_device {
|
|
/* Parent V4l2 device */
|
|
struct v4l2_device *v4l2_dev;
|
|
void __iomem *base;
|
|
u32 hw_revision;
|
|
|
|
u16 inframe_count;
|
|
struct media_pad pad[FE_NUM_PADS];
|
|
struct v4l2_subdev sd;
|
|
};
|
|
|
|
void pisp_fe_isr(struct pisp_fe_device *fe, bool *sof, bool *eof);
|
|
int pisp_fe_validate_config(struct pisp_fe_device *fe,
|
|
struct pisp_fe_config *cfg,
|
|
struct v4l2_format const *f0,
|
|
struct v4l2_format const *f1);
|
|
void pisp_fe_submit_job(struct pisp_fe_device *fe, struct vb2_buffer **vb2_bufs,
|
|
struct pisp_fe_config *cfg);
|
|
void pisp_fe_start(struct pisp_fe_device *fe);
|
|
void pisp_fe_stop(struct pisp_fe_device *fe);
|
|
int pisp_fe_init(struct pisp_fe_device *fe, struct dentry *debugfs);
|
|
void pisp_fe_uninit(struct pisp_fe_device *fe);
|
|
|
|
#endif
|