[PATCH v6 4/5] media: platform: mediatek: isp_30: add mediatek ISP3.0 camsv

CK Hu (胡俊光) ck.hu at mediatek.com
Tue Jul 30 22:48:32 PDT 2024


Hi, Julien:

On Mon, 2024-07-29 at 16:48 +0200, Julien Stephan wrote:
>  	 
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>  From: Phi-bang Nguyen <pnguyen at baylibre.com>
> 
> This driver provides a path to bypass the SoC ISP so that image data
> coming from the SENINF can go directly into memory without any image
> processing. This allows the use of an external ISP.
> 
> Signed-off-by: Phi-bang Nguyen <pnguyen at baylibre.com>
> Signed-off-by: Florian Sylvestre <fsylvestre at baylibre.com>
> [Paul Elder fix irq locking]
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> Co-developed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Co-developed-by: Julien Stephan <jstephan at baylibre.com>
> Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> ---

[snip]

> diff --git a/drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv30_regs.h b/drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv30_regs.h
> new file mode 100644
> index 000000000000..6d30087270cc
> --- /dev/null
> +++ b/drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv30_regs.h
> @@ -0,0 +1,60 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (c) 2022 MediaTek Inc.
> + */
> +
> +#ifndef __MTK_CAMSV30_REGS_H__
> +#define __MTK_CAMSV30_REGS_H__
> +
> +/* CAMSV */
> +#define CAMSV_MODULE_EN0x0000
> +#define CAMSV_MODULE_EN_IMGO_ENBIT(4)
> +#define CAMSV_FMT_SEL0x0004
> +#define CAMSV_INT_EN0x0008
> +#define CAMSV_INT_STATUS0x000c
> +#define CAMSV_SW_CTL0x0010
> +#define CAMSV_IMGO_FBC0x001C
> +#define CAMSV_CLK_EN0x0020
> +#define CAMSV_PAK0x003c
> +
> +/* CAMSV_TG */
> +#define CAMSV_TG_SEN_MODE0x0010
> +#define CAMSV_TG_VF_CON0x0014
> +#define CAMSV_TG_SEN_GRAB_PXL0x0018
> +#define CAMSV_TG_SEN_GRAB_LIN0x001c
> +#define CAMSV_TG_PATH_CFG0x0020
> +
> +/* CAMSV_IMG0 */
> +#define CAMSV_IMGO_SV_BASE_ADDR0x0000
> +#define CAMSV_IMGO_SV_XSIZE0x0008
> +#define CAMSV_IMGO_SV_YSIZE0x000c
> +#define CAMSV_IMGO_SV_STRIDE0x0010
> +#define CAMSV_IMGO_SV_CON0x0014
> +#define CAMSV_IMGO_SV_CON20x0018
> +
> +#define CAMSV_TG_SEN_MODE_CMOS_ENBIT(0)
> +#define CAMSV_TG_VF_CON_VFDATA_ENBIT(0)
> +
> +/* CAMSV_CLK_EN bits */
> +#define CAMSV_TG_DP_CLK_ENBIT(0)
> +#define CAMSV_PAK_DP_CLK_ENBIT(2)
> +#define CAMSV_DMA_DP_CLK_ENBIT(15)
> +
> +/* CAMSV_SW_CTL bits */
> +#define CAMSV_IMGO_RST_TRIGBIT(0)
> +#define CAMSV_IMGO_RST_STBIT(1)
> +#define CAMSV_SW_RSTBIT(2)
> +
> +/* IRQ BITS */
> +#define CAMSV_IRQ_TG_ERRBIT(4)
> +#define CAMSV_IRQ_TG_GBERRBIT(5)
> +#define CAMSV_IRQ_PASS1_DONBIT(10)
> +#define CAMSV_IRQ_IMGO_ERRBIT(16)
> +
> +#define INT_ST_MASK_CAMSV                                                      \
> +(CAMSV_IRQ_PASS1_DON)
> +
> +#define INT_ST_MASK_CAMSV_ERR                                                  \
> +(CAMSV_IRQ_TG_ERR | CAMSV_IRQ_TG_GBERR | CAMSV_IRQ_IMGO_ERR)
> +
> +#endif /* __MTK_CAMSV30_REGS_H__ */

mtk_camsv30_regs.h has few data and only included by mtk_camsv30_hw.c,
so it's better merge this header file into mtk_camsv30_hw.c.

Regards,
CK

> 
> 


More information about the Linux-mediatek mailing list