Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FE1D25C6E6 for ; Mon, 10 Feb 2025 20:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739218481; cv=none; b=CCBIp11iP28huyW9Hf+IcLw4ObVTbcJ+sirRU8tq3P/V75SGlBa7HSOBqrMu0nejvfpnIRf1CNlahRhjlJ4ox2ZiRgEyD9CjFlKEBZ+xn9LLJGVRIoyUswpuLct3cow+++yYvVUxwwAwZP1wJVAx/VHdJLNrffSxJ6EFZ9ygZVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739218481; c=relaxed/simple; bh=/JG9BZXmaku9hcp0orNZpw6AJeKvpwZGjewRoTkBo/0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ex1T0MgEhAFRb+caISN6Drn7qGsiAu/gxHTHZMy4Rj+zzpNzgArRZqt2Re1czN9zvBJkXow14MBfsApQhTT9RWZqIZpmo88dBEzh5l6s2EPGTK2gZTtKmwRp9dF9WtEdV6W1+306OdImkxYFIaFy9C3bX9yI0ulAxncfqq1RPDk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BLFZnaiX; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BLFZnaiX" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38dd011ff8bso2634154f8f.0 for ; Mon, 10 Feb 2025 12:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739218477; x=1739823277; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NTMe6+6hxjDVpZc6C8kMNfMUjelO58kzqRqPgoo0HnE=; b=BLFZnaiXi2qqWhJrXywR1eYC1gam+m6HgQYN2t42liQg9a/QTJqHSNF3Ucq8CW5ojD Bqq8DF0MwyeZQAg3g5NrmZh90Ebcze7EeggrgYxf4jSgLOEEcWbvUp/BuN4/L1MfTC+j 1QRho2M0YNvYT0nkbozmrAphEumLCA8/IQf5/JEdn9KLh4mUthnMV1i+aUNacvMgHafw SumvEsE0ToPLexd0GJ3ImMsxzsskS4qTSEe5h2BfLcsvRgVHYtH8PHSShsPxm9EXPax+ Dpy1poHFZszWKtFNQga3PkAW5WBnduLFpiWGOgHsl0kUf7VR6jBMyYPqVo6C+wxfCurx soSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739218477; x=1739823277; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NTMe6+6hxjDVpZc6C8kMNfMUjelO58kzqRqPgoo0HnE=; b=LctshwIkM3n51lqGm0rWStoGHpNVYJCfsQuvYvv+4TSO5t+Rj+0UKjZGzeqJtmB2og dXLXQZaOM8SH3ik+D56LFMaPRS9IQAl3w1OaSEIg7ikScv0mAKFfZHK4PcBErQSsCFE5 S4Kb8kSo9AOcvlLK+r2GUJ+olvl3grF7BiH1s871xgLIQZndhQhGppvYr8U7BOeO/Ntb bVWyv3JKulaJeRcI3/bk9PdLweAHqCxY8W60CdIIuNwkD9VlKbh/4nUSf/kzgYB5NUME XIdElUfbrrZdmDFNkD2fJ7VpWyvGPSZ3LWBwiYdQW8D3QDFCCe86EqICdiAUAtfwcnbZ OV0w== X-Gm-Message-State: AOJu0Yx7agSakFFgqKWlfwH06O19NwixEtMNdMtao7iF8hdjo+YtfNlw dQF6l5EX3yAQfKZjI/oh3T0co40bAQO++DFlfZKIBFRZmFohqZssvh93WtL+72w= X-Gm-Gg: ASbGnctA9K2Jp5rMyJ3Zp8iY3UOfxEQ6A+dZkZyRFjC0I6eLQILse0zcczcdUaqZLCG IZHsZiagZjszrQfebhNBQKAhNesxVt/KsmHFeW1ef6uCMLClWCkL+nOm6EcP1hxWnERNRE05cEf L5GPRmjV1SdQWX8PYbXTnA2Gu5WZ0iSIPMsiX2MozqinKBsB7bJdSZawBk83UKLet04nALQsyNm g6/dtwmrRC+0MT95/utRs6ci9dUIG9gIqKjoA6XQ9bLcnq1c9R7aj8N5oZti5jivUcNPdXTGN0P EM02fBTziEea5acTi3yXYDcqofGDzj3DqVdt0bSm893DNPSEuq6VMcV1LA== X-Google-Smtp-Source: AGHT+IEH4TqTSgJT/Eu4kRwlnAphBA2G4c4MYqZbCsmtKyrPdzMi2a/0iXF19xsgU+fdgItfBHm4SA== X-Received: by 2002:a5d:6d03:0:b0:38d:d664:67d8 with SMTP id ffacd0b85a97d-38dd6646bddmr5791783f8f.11.1739218477274; Mon, 10 Feb 2025 12:14:37 -0800 (PST) Received: from [192.168.0.156] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dd44c5e3dsm7671849f8f.62.2025.02.10.12.14.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Feb 2025 12:14:36 -0800 (PST) Message-ID: <056858ef-3d4e-40ec-a10e-338055a97172@linaro.org> Date: Mon, 10 Feb 2025 20:14:35 +0000 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 4/4] media: qcom: camss: Add support for VFE 690 To: Vikram Sharma , rfoss@kernel.org, todor.too@gmail.com Cc: linux-media@vger.kernel.org, Suresh Vankadara References: <20250210162843.609337-1-quic_vikramsa@quicinc.com> <20250210162843.609337-5-quic_vikramsa@quicinc.com> Content-Language: en-US From: Bryan O'Donoghue In-Reply-To: <20250210162843.609337-5-quic_vikramsa@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/02/2025 16:28, Vikram Sharma wrote: > Add support for VFE found on SA8775P (Titan 690). This VFE is > different from vfe 780 w.r.t few register offsets. VFE780 with-respect-to a few > It supports two full and five lite VFE. sa8775p supports that not VFE780. > > Co-developed-by: Suresh Vankadara > Signed-off-by: Suresh Vankadara > Signed-off-by: Vikram Sharma > --- > drivers/media/platform/qcom/camss/Makefile | 1 + > .../media/platform/qcom/camss/camss-vfe-690.c | 163 +++++++++++++++ > drivers/media/platform/qcom/camss/camss-vfe.c | 5 +- > drivers/media/platform/qcom/camss/camss-vfe.h | 1 + > drivers/media/platform/qcom/camss/camss.c | 192 ++++++++++++++++++ > 5 files changed, 361 insertions(+), 1 deletion(-) > create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-690.c > > diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/platform/qcom/camss/Makefile > index f1d0e9a00220..284f1775f62f 100644 > --- a/drivers/media/platform/qcom/camss/Makefile > +++ b/drivers/media/platform/qcom/camss/Makefile > @@ -18,6 +18,7 @@ qcom-camss-objs += \ > camss-vfe-4-8.o \ > camss-vfe-17x.o \ > camss-vfe-480.o \ > + camss-vfe-690.o \ > camss-vfe-780.o \ > camss-vfe-gen1.o \ > camss-vfe.o \ > diff --git a/drivers/media/platform/qcom/camss/camss-vfe-690.c b/drivers/media/platform/qcom/camss/camss-vfe-690.c > new file mode 100644 > index 000000000000..92c92065f65b > --- /dev/null > +++ b/drivers/media/platform/qcom/camss/camss-vfe-690.c > @@ -0,0 +1,163 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module v690 (SA8755P) > + * > + * Copyright (c) 2025 Qualcomm Technologies, Inc. > + */ > + > +#include > +#include > +#include > + > +#include "camss.h" > +#include "camss-vfe.h" > + > +#define VFE_TOP_CORE_CFG (0x24) > +#define BUS_REG_BASE (vfe_is_lite(vfe) ? 0x480 : 0x400) > + > +#define VFE_BUS_WM_CGC_OVERRIDE (BUS_REG_BASE + 0x08) > +#define WM_CGC_OVERRIDE_ALL (0x7FFFFFF) > + > +#define VFE_BUS_WM_TEST_BUS_CTRL (BUS_REG_BASE + 0xFC) > + > +#define VFE_BUS_WM_CFG(n) (BUS_REG_BASE + 0x200 + (n) * 0x100) > +#define WM_CFG_EN BIT(0) > +#define WM_VIR_FRM_EN BIT(1) > +#define WM_CFG_MODE BIT(16) > +#define VFE_BUS_WM_IMAGE_ADDR(n) (BUS_REG_BASE + 0x204 + (n) * 0x100) > +#define VFE_BUS_WM_FRAME_INCR(n) (BUS_REG_BASE + 0x208 + (n) * 0x100) > +#define VFE_BUS_WM_IMAGE_CFG_0(n) (BUS_REG_BASE + 0x20c + (n) * 0x100) > +#define WM_IMAGE_CFG_0_DEFAULT_WIDTH (0xFFFF) > +#define VFE_BUS_WM_IMAGE_CFG_2(n) (BUS_REG_BASE + 0x214 + (n) * 0x100) > +#define WM_IMAGE_CFG_2_DEFAULT_STRIDE (0xFFFF) > +#define VFE_BUS_WM_PACKER_CFG(n) (BUS_REG_BASE + 0x218 + (n) * 0x100) > + > +#define VFE_BUS_WM_IRQ_SUBSAMPLE_PERIOD(n) (BUS_REG_BASE + 0x230 + (n) * 0x100) > +#define VFE_BUS_WM_IRQ_SUBSAMPLE_PATTERN(n) (BUS_REG_BASE + 0x234 + (n) * 0x100) > +#define VFE_BUS_WM_FRAMEDROP_PERIOD(n) (BUS_REG_BASE + 0x238 + (n) * 0x100) > +#define VFE_BUS_WM_FRAMEDROP_PATTERN(n) (BUS_REG_BASE + 0x23c + (n) * 0x100) > + > +#define VFE_BUS_WM_MMU_PREFETCH_CFG(n) (BUS_REG_BASE + 0x260 + (n) * 0x100) > +#define VFE_BUS_WM_MMU_PREFETCH_MAX_OFFSET(n) (BUS_REG_BASE + 0x264 + (n) * 0x100) > + > +/* > + * Bus client mapping: > + * > + * VFE: > + * 16 = RDI0, 17 = RDI1, 18 = RDI2 > + * > + * VFE LITE: > + * 0 = RDI0, 1 = RDI1, 2 = RDI2, 3 = RDI3, 4 = RDI4, 5 = RDI5 > + */ > +#define RDI_WM(n) ((vfe_is_lite(vfe) ? 0x0 : 0x10) + (n)) > + > +static void vfe_wm_start(struct vfe_device *vfe, u8 wm, struct vfe_line *line) > +{ > + struct v4l2_pix_format_mplane *pix = > + &line->video_out.active_fmt.fmt.pix_mp; > + > + wm = RDI_WM(wm); > + > + writel(WM_CGC_OVERRIDE_ALL, vfe->base + VFE_BUS_WM_CGC_OVERRIDE); > + /* no clock gating at bus input */ > + writel(0x0, vfe->base + VFE_BUS_WM_TEST_BUS_CTRL); > + > + writel(ALIGN(pix->plane_fmt[0].bytesperline, 16) * pix->height, > + vfe->base + VFE_BUS_WM_FRAME_INCR(wm)); > + writel(WM_IMAGE_CFG_0_DEFAULT_WIDTH & 0xFFFF, > + vfe->base + VFE_BUS_WM_IMAGE_CFG_0(wm)); > + writel(WM_IMAGE_CFG_2_DEFAULT_STRIDE, > + vfe->base + VFE_BUS_WM_IMAGE_CFG_2(wm)); > + > + writel(0x0, vfe->base + VFE_BUS_WM_PACKER_CFG(wm)); > + > + /* TOP CORE CFG */ > + writel(0x600000, vfe->base + VFE_TOP_CORE_CFG); > + > + /* no dropped frames, one irq per frame */ > + writel(0, vfe->base + VFE_BUS_WM_FRAMEDROP_PERIOD(wm)); > + writel(1, vfe->base + VFE_BUS_WM_FRAMEDROP_PATTERN(wm)); > + writel(0, vfe->base + VFE_BUS_WM_IRQ_SUBSAMPLE_PERIOD(wm)); > + writel(1, vfe->base + VFE_BUS_WM_IRQ_SUBSAMPLE_PATTERN(wm)); > + > + writel(1, vfe->base + VFE_BUS_WM_MMU_PREFETCH_CFG(wm)); > + writel(0xFFFFFFFF, vfe->base + VFE_BUS_WM_MMU_PREFETCH_MAX_OFFSET(wm)); > + > + writel(WM_CFG_EN | WM_CFG_MODE, vfe->base + VFE_BUS_WM_CFG(wm)); > +} > + > +static void vfe_wm_stop(struct vfe_device *vfe, u8 wm) > +{ > + wm = RDI_WM(wm); > + writel(0, vfe->base + VFE_BUS_WM_CFG(wm)); > +} > + > +static void vfe_wm_update(struct vfe_device *vfe, u8 wm, u32 addr, > + struct vfe_line *line) > +{ > + wm = RDI_WM(wm); > + writel(addr, vfe->base + VFE_BUS_WM_IMAGE_ADDR(wm)); > + > + dev_dbg(vfe->camss->dev, "wm:%d, image buf addr:0x%x\n", > + wm, addr); > +} > + > +static void vfe_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id) > +{ > + int port_id = line_id; > + > + camss_reg_update(vfe->camss, vfe->id, port_id, false); > +} > + > +static inline void vfe_reg_update_clear(struct vfe_device *vfe, > + enum vfe_line_id line_id) > +{ > + int port_id = line_id; > + > + camss_reg_update(vfe->camss, vfe->id, port_id, true); > +} > + > +static const struct camss_video_ops vfe_video_ops_690 = { > + .queue_buffer = vfe_queue_buffer_v2, > + .flush_buffers = vfe_flush_buffers, > +}; > + > +static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) > +{ > + vfe->video_ops = vfe_video_ops_690; > +} > + > +static void vfe_global_reset(struct vfe_device *vfe) > +{ > + vfe_isr_reset_ack(vfe); > +} > + > +static irqreturn_t vfe_isr(int irq, void *dev) > +{ > + /* nop */ > + return IRQ_HANDLED; > +} > + > +static int vfe_halt(struct vfe_device *vfe) > +{ > + /* rely on vfe_disable_output() to stop the VFE */ > + return 0; > +} > + > +const struct vfe_hw_ops vfe_ops_690 = { > + .global_reset = vfe_global_reset, > + .hw_version = vfe_hw_version, > + .isr = vfe_isr, > + .pm_domain_off = vfe_pm_domain_off, > + .pm_domain_on = vfe_pm_domain_on, > + .reg_update = vfe_reg_update, > + .reg_update_clear = vfe_reg_update_clear, > + .subdev_init = vfe_subdev_init, > + .vfe_disable = vfe_disable, > + .vfe_enable = vfe_enable_v2, > + .vfe_halt = vfe_halt, > + .vfe_wm_start = vfe_wm_start, > + .vfe_wm_stop = vfe_wm_stop, > + .vfe_buf_done = vfe_buf_done, > + .vfe_wm_update = vfe_wm_update, > +}; > diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c > index 9ffa6bc72cf1..71857c68bbed 100644 > --- a/drivers/media/platform/qcom/camss/camss-vfe.c > +++ b/drivers/media/platform/qcom/camss/camss-vfe.c > @@ -346,6 +346,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code, > case CAMSS_8280XP: > case CAMSS_845: > case CAMSS_8550: > + case CAMSS_8775P: > switch (sink_code) { > case MEDIA_BUS_FMT_YUYV8_1X16: > { > @@ -908,7 +909,8 @@ static int vfe_match_clock_names(struct vfe_device *vfe, > > return (!strcmp(clock->name, vfe_name) || > !strcmp(clock->name, vfe_lite_name) || > - !strcmp(clock->name, "vfe_lite")); > + !strcmp(clock->name, "vfe_lite") || > + !strcmp(clock->name, "camnoc_axi")); Suspicious you really need to add this clock here, shouldn't be necessary unless you are setting the clock to a particular value. > } > > /* > @@ -1972,6 +1974,7 @@ static int vfe_bpl_align(struct vfe_device *vfe) > case CAMSS_8280XP: > case CAMSS_845: > case CAMSS_8550: > + case CAMSS_8775P: > ret = 16; > break; > default: > diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h > index 9dec5bc0d1b1..a9322f4440ae 100644 > --- a/drivers/media/platform/qcom/camss/camss-vfe.h > +++ b/drivers/media/platform/qcom/camss/camss-vfe.h > @@ -243,6 +243,7 @@ extern const struct vfe_hw_ops vfe_ops_4_7; > extern const struct vfe_hw_ops vfe_ops_4_8; > extern const struct vfe_hw_ops vfe_ops_170; > extern const struct vfe_hw_ops vfe_ops_480; > +extern const struct vfe_hw_ops vfe_ops_690; > extern const struct vfe_hw_ops vfe_ops_780; > > int vfe_get(struct vfe_device *vfe); > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c > index 9458cba1b50f..4df31c89c20c 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -2478,6 +2478,196 @@ static const struct camss_subdev_resources csid_res_8775p[] = { > }, > }; > > +static const struct camss_subdev_resources vfe_res_8775p[] = { > + /* VFE0 */ > + { > + .regulators = {}, > + > + .clock = { "cpas_vfe0", "vfe0", "vfe0_fast_ahb", > + "cpas_ahb", "gcc_axi_hf", "gcc_axi_sf", > + "core_ahb", "cpas_fast_ahb_clk", "camnoc_axi", > + "icp_ahb"}, > + .clock_rate = { > + { 0 }, > + { 480000000 }, > + { 300000000, 400000000 }, > + { 300000000, 400000000 }, > + { 0 }, > + { 0 }, > + { 0, 80000000 }, > + { 300000000, 400000000 }, > + { 400000000 }, Is 400 MHz required for camnoc_axi, would 0 i.e. enable not do the same job ? > + { 0 }, > + }, > + > + .reg = { "vfe0" }, > + .interrupt = { "vfe0" }, > + .vfe = { > + .line_num = 3, > + .is_lite = false, > + .has_pd = false, > + .pd_name = NULL, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE1 */ > + { > + .regulators = {}, > + > + .clock = { "cpas_vfe1", "vfe1", "vfe1_fast_ahb", > + "cpas_ahb", "gcc_axi_hf", "gcc_axi_sf", > + "core_ahb", "cpas_fast_ahb_clk", "camnoc_axi", > + "icp_ahb"}, > + .clock_rate = { > + { 0 }, > + { 480000000 }, > + { 300000000, 400000000 }, > + { 300000000, 400000000 }, > + { 0 }, > + { 0 }, > + { 0, 80000000 }, > + { 300000000, 400000000 }, > + { 400000000 }, > + { 0 }, > + }, > + > + .reg = { "vfe1" }, > + .interrupt = { "vfe1" }, > + .vfe = { > + .line_num = 3, > + .is_lite = false, > + .has_pd = false, > + .pd_name = NULL, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + redundant newline > + /* VFE2 (lite) */ > + { > + .regulators = {}, > + > + .clock = { "cpas_ife_lite", "vfe_lite_ahb", > + "vfe_lite_csid", "vfe_lite_cphy_rx", > + "vfe_lite"}, > + .clock_rate = { > + { 0, 0, 0, 0 }, > + { 300000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 480000000, 600000000, 600000000, 600000000 }, > + }, > + .reg = { "vfe_lite0" }, > + .interrupt = { "vfe-lite0" }, > + .vfe = { > + .line_num = 4, > + .is_lite = true, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE3 (lite) */ > + { > + .regulators = {}, > + > + .clock = { "cpas_ife_lite", "vfe_lite_ahb", > + "vfe_lite_csid", "vfe_lite_cphy_rx", > + "vfe_lite"}, > + .clock_rate = { > + { 0, 0, 0, 0 }, > + { 300000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 480000000, 600000000, 600000000, 600000000 }, > + }, > + .reg = { "vfe_lite1" }, > + .interrupt = { "vfe-lite1" }, > + .vfe = { > + .line_num = 4, > + .is_lite = true, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE4 (lite) */ > + { > + .regulators = {}, > + > + .clock = { "cpas_ife_lite", "vfe_lite_ahb", > + "vfe_lite_csid", "vfe_lite_cphy_rx", > + "vfe_lite"}, > + .clock_rate = { > + { 0, 0, 0, 0 }, > + { 300000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 480000000, 600000000, 600000000, 600000000 }, > + }, > + .reg = { "vfe_lite2" }, > + .interrupt = { "vfe-lite2" }, > + .vfe = { > + .line_num = 4, > + .is_lite = true, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE5 (lite) */ > + { > + .regulators = {}, > + > + .clock = { "cpas_ife_lite", "vfe_lite_ahb", > + "vfe_lite_csid", "vfe_lite_cphy_rx", > + "vfe_lite"}, > + .clock_rate = { > + { 0, 0, 0, 0 }, > + { 300000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 480000000, 600000000, 600000000, 600000000 }, > + }, > + .reg = { "vfe_lite3" }, > + .interrupt = { "vfe-lite3" }, > + .vfe = { > + .line_num = 4, > + .is_lite = true, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE6 (lite) */ > + { > + .regulators = {}, > + > + .clock = { "cpas_ife_lite", "vfe_lite_ahb", > + "vfe_lite_csid", "vfe_lite_cphy_rx", > + "vfe_lite"}, > + .clock_rate = { > + { 0, 0, 0, 0 }, > + { 300000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 400000000, 400000000, 400000000, 400000000 }, > + { 480000000, 600000000, 600000000, 600000000 }, > + }, > + .reg = { "vfe_lite4" }, > + .interrupt = { "vfe-lite4" }, > + .vfe = { > + .line_num = 4, > + .is_lite = true, > + .hw_ops = &vfe_ops_690, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > +}; > + > static const struct resources_icc icc_res_sa8775p[] = { > { > .name = "ahb", > @@ -3469,9 +3659,11 @@ static const struct camss_resources sa8775p_resources = { > .csiphy_res = csiphy_res_8775p, > .csid_res = csid_res_8775p, > .csid_wrapper_res = &csid_wrapper_res_sa8775p, > + .vfe_res = vfe_res_8775p, > .icc_res = icc_res_sa8775p, > .csiphy_num = ARRAY_SIZE(csiphy_res_8775p), > .csid_num = ARRAY_SIZE(csid_res_8775p), > + .vfe_num = ARRAY_SIZE(vfe_res_8775p), > .icc_path_num = ARRAY_SIZE(icc_res_sa8775p), > .link_entities = camss_link_entities > }; I'd rather have the last patch in your series enumerate - fill out - this structure. i.e. vfe and csid 780 should be added and then the enumeration of the resource structure for the sa8775p implementation of 780 as the last patch. --- bod