From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 56D6D2BD04 for ; Mon, 28 Jul 2025 14:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753712097; cv=none; b=nZWRcWyTYcW0jt6io5RbZMjOijNffp37wmYUcGshtvqBl/iAybaG4/cwt+cWnpr0Mq3HFDX9mxvk95T1yZS+ogbMK8P0QksUfWgm5oqgBPEKFH30hR9dmgGm0KYZAZCcWARXZCE/W2Q4yHddJKheeHBT1QgjFj98JIwEzShG2jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753712097; c=relaxed/simple; bh=WmyYEezoqO0MCkUD+vSc5NHbpVGcBK/7QA+pcl8s7h4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DwT5+AZAw7q4mQOhJfuNZmLDuhFOp68oPEv8v9iJReDkEA4jRWd+Q/jhDoxTEc4kymLysEG1TEQi4NGl2Liqk3ujibAlxHcxuexewRLfRNuyjOn623QFHQFWjxospGnCR15NcEOUokCF4rBSV1sXJrJYAG+v7dfDxrDlRQEInuU= 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=H2cjUIxd; arc=none smtp.client-ip=209.85.208.42 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="H2cjUIxd" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-614fd1a5790so3881873a12.3 for ; Mon, 28 Jul 2025 07:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753712093; x=1754316893; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UYwhbY7Hecbk1qZCl4MdGthfDHIANrmSUOeNszZY1sQ=; b=H2cjUIxdU+0vxOH0EpIfaBxEndbQijavhxOUrpT3VgXEqQUIcVtlJ7KEeSo6Lvi0w1 DIfuHWTGroIcByRz0W7T0yPDOO2rFQISU9AcH5/Uhovh4CthOpjj7SgRRVa0rUrofpx/ H/izjo+DAt7w5PCMmVQu3V/CDop2TSMbTKA681qWu2gEelZheyy6lw5MGtsPm6l55Fwc iYWU9EOgJ8bRC7tvRJGY2qzKsagMID2vdfhdBkeTSqG+Z2gwhJNhhWdwbKVDXDOoXUfN 4s226pwKsO/55c5Ka8kg6RqSPCU1AJ2SFOGfbTtVMz62qlECfo+m+fNnUHS/AghCnEB2 NhoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753712093; x=1754316893; h=content-transfer-encoding:in-reply-to:content-language:from :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=UYwhbY7Hecbk1qZCl4MdGthfDHIANrmSUOeNszZY1sQ=; b=loJ6HANVmxBgQNHhczA8VuFIcdXspK7UiiweuMiordG47qM8MQHJ6ZqquNg4Lgacs3 +B0fEyM8je9UpYaTtEwqDcOeej9exUdGBg1fdncvs7I2EcKeQA2ffFbqG/tTmHagpTzg nRSPNqBOIL95WMZGpcde7eEBXvVprbWJoUTnLzCCS6tMcQXKhZ1XFQ1l+nj7U3ndUW+F VWlX7Ub8GNjIhbR/zrggjlyg2FA4yF05fKkY9eJ/Zjk4PuhXE3buLZeF+pgEVZJt0UYa cjYmvfpvHE2wMJkFihuS3KJt/CbeqsdRzzfsCtiaCLv8ZbJXabFyC5u6YYGFsAuJ7JZi n+Qw== X-Forwarded-Encrypted: i=1; AJvYcCVUZULW6UlLXAEIL/FjF27DZFysiZQEbHv3Z0J2Mp0Y4bHbnIHwIarz4tV9lihluLpMpwoEtvzCS6zUVZhk@vger.kernel.org X-Gm-Message-State: AOJu0YwbwwQ0/xmR6QbY+K6Ccse7yiGY2Uk/27yTCy/3CROKKQaN8xQu E1Mk5GRzsUVZwD0qbYeXiQxp6lN5mzFAQmJGQg/bQziqm68hSyF2vCwYCangIf92SYI= X-Gm-Gg: ASbGncuONwSU1nx2HLUOOk8SRmSmGyiss5LB5l9Lwx5Ofb3jOmNoIncd7J9c7xE0svP Fo1YkUy/s6oKqkUBpC+PA27llHiw71ZoHrFKg/nwnMmH79PtqvrcCKcXdst4LL2HUJev+DGXZJE H8VCUSP3X/oqRKNFL1oVXsvUEk68wEQc/lVVKHp/kK8goKVOe6G5xAOCf4uY074uNURHjG9tXcx pf7ac+6sbuXyeC0g2R7xhLoxjvOm//smNQ/o434BXya45A9uW9983zz9M28Y0h1r6BUpmlgSifN oGY5RPTHuRemX1icvasFEVUdGZSyznvGsGtJ849fhOMseRWAGTjL+1HMCnTF/WHv2bDUWk7PbpK vOIus7q0tNFF9Lqiwc4bKD3Lr274HcwHsP3sE0JZ3KYwppGJwGJnweGtQT3aTtPY= X-Google-Smtp-Source: AGHT+IEHbvVBOTBi2wL3XYw1pOYiWmJ+jSmXZDZm1vhRUWP5YTgClxOi158f8n7e9tR07uWDsbkdCg== X-Received: by 2002:a05:6402:2807:b0:612:b0d9:3973 with SMTP id 4fb4d7f45d1cf-614f1def683mr12512939a12.27.1753712092482; Mon, 28 Jul 2025 07:14:52 -0700 (PDT) Received: from [192.168.0.35] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-61500aed9b7sm3313488a12.65.2025.07.28.07.14.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jul 2025 07:14:52 -0700 (PDT) Message-ID: Date: Mon, 28 Jul 2025 15:14:50 +0100 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/7] media: qcom: camss: enable vfe 690 for qcs8300 To: Vikram Sharma , rfoss@kernel.org, todor.too@gmail.com, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andersson@kernel.org, konradybcio@kernel.org, hverkuil-cisco@xs4all.nl, cros-qcom-dts-watchers@chromium.org, catalin.marinas@arm.com, will@kernel.org Cc: linux-arm-kernel@lists.infradead.org, quic_svankada@quicinc.com, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250711131134.215382-1-quic_vikramsa@quicinc.com> <20250711131134.215382-6-quic_vikramsa@quicinc.com> From: Bryan O'Donoghue Content-Language: en-US In-Reply-To: <20250711131134.215382-6-quic_vikramsa@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/07/2025 14:11, Vikram Sharma wrote: > The vfe in qcs8300 is version 690, it is same as vfe used in > sa8775p. vfe gen3 have support for vfe 690. > > Signed-off-by: Vikram Sharma > --- > .../platform/qcom/camss/camss-vfe-gen3.c | 4 +- > drivers/media/platform/qcom/camss/camss-vfe.c | 2 + > drivers/media/platform/qcom/camss/camss.c | 180 ++++++++++++++++++ > 3 files changed, 185 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen3.c b/drivers/media/platform/qcom/camss/camss-vfe-gen3.c > index a5eddc8c76ae..92ee7c7b8a47 100644 > --- a/drivers/media/platform/qcom/camss/camss-vfe-gen3.c > +++ b/drivers/media/platform/qcom/camss/camss-vfe-gen3.c > @@ -13,7 +13,9 @@ > #include "camss-vfe.h" > > #define IS_VFE_690(vfe) \ > - (vfe->camss->res->version == CAMSS_8775P ? true : false) > + ((vfe->camss->res->version == CAMSS_8775P) ||\ > + (vfe->camss->res->version == CAMSS_8300) ?\ > + true : false) > > #define BUS_REG_BASE_690 \ > (vfe_is_lite(vfe) ? 0x480 : 0x400) > diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c > index 99cbe09343f2..1d40184d7d04 100644 > --- a/drivers/media/platform/qcom/camss/camss-vfe.c > +++ b/drivers/media/platform/qcom/camss/camss-vfe.c > @@ -344,6 +344,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code, > case CAMSS_8x96: > case CAMSS_8250: > case CAMSS_8280XP: > + case CAMSS_8300: > case CAMSS_845: > case CAMSS_8550: > case CAMSS_8775P: > @@ -1974,6 +1975,7 @@ static int vfe_bpl_align(struct vfe_device *vfe) > case CAMSS_7280: > case CAMSS_8250: > case CAMSS_8280XP: > + case CAMSS_8300: > case CAMSS_845: > case CAMSS_8550: > case CAMSS_8775P: > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c > index b0fd5fd307a1..abfaa489cc0c 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -2623,6 +2623,186 @@ static const struct camss_subdev_resources csid_res_8300[] = { > }, > }; > > +static const struct camss_subdev_resources vfe_res_8300[] = { > + /* 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 }, > + { 0 }, > + }, > + .reg = { "vfe0" }, > + .interrupt = { "vfe0" }, > + .vfe = { > + .line_num = 3, > + .is_lite = false, > + .has_pd = false, > + .pd_name = NULL, > + .hw_ops = &vfe_ops_gen3, > + .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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE2 (lite) */ > + { > + .regulators = {}, > + .clock = { "cpas_vfe_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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE3 (lite) */ > + { > + .regulators = {}, > + .clock = { "cpas_vfe_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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE4 (lite) */ > + { > + .regulators = {}, > + .clock = { "cpas_vfe_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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE5 (lite) */ > + { > + .regulators = {}, > + .clock = { "cpas_vfe_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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > + /* VFE6 (lite) */ > + { > + .regulators = {}, > + .clock = { "cpas_vfe_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_gen3, > + .formats_rdi = &vfe_formats_rdi_845, > + .formats_pix = &vfe_formats_pix_845 > + } > + }, > +}; > + > static const struct camss_subdev_resources csiphy_res_8775p[] = { > /* CSIPHY0 */ > { This generally looks fine. Please have a look at your pretty extensive list of clocks and decide if you really need all of them. I'll trust you to come back with the appropriate list, perhaps even the list above.