From nobody Mon Feb 9 19:10:42 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBACB32F77B for ; Tue, 20 Jan 2026 06:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; cv=none; b=PDwmekoV7p875dcLauSrGeU51ZRvWAK81yKkDq/KJd44qJLFJcPASE8VLzH2xGOkWJe12mxmFXKgKIuQPfO6+Ct+ILbYxErbZUj0TQo7lzWoq4ZQbZ0RAhRZflc5RXVPnnllunqVocjvlt1z1E7vK+h82a0jtEhOiL052o94ayI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; c=relaxed/simple; bh=XOJI2rJ7c5I2GGESHXGkyzvnPUQ9FXZdcswTT53MBHk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mKs2vD+xPRk43rq4f4FOLkzQtyP7jRHMUV2M/Qg+4rLeLSf0x28m66jd2vnDKxcQqUjIyfc6U6fOZUeLkSv7Q+xA8lGaQmuN8m+ZW6b3vTTOWxlvq4wK5H8R60jaB2JUiYnCzFGBTCUfXxMjq3NkUIfr197yYGdApGAUVUGns9M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=UDcl/gMt; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aP8KXRDe; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="UDcl/gMt"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aP8KXRDe" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60K5fmf7227848 for ; Tue, 20 Jan 2026 06:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Xxzq5Oepq3GgmFFUYeTPUXDTix+PLprCmsF253sSlaQ=; b=UDcl/gMtx4utMg5D JH9TZ5sXB9feQ3yWoLpe6LOVdLX6wKrgYx6GJJzw4d2YGGDev2FUaQLJvlAUmih1 LKog3GFxkklNn7UtbosYHsROAtZTh8jhpiyzIFtU8RKY2/nC/jw6ErdvmCg7czCN kzdTIVIsAiop3OdwJfVhpaatH0Ct7p7DBXep91+OT96IGCYBU5WczI3PMG+XO6cb 1OdfqUSByn4aCqlyMT0iyCv8Ogp22mdJFMZibMkg/bcEOxSnywWu/Gab5YmxWoIK c8XCuIwL4OiiaFtZo4aF0zm9KHeM1EiHTNS9Dcm2mYwgaSQV27sxCKq/PNOi1GLL KiDRig== Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bsgfrbbm7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 20 Jan 2026 06:43:03 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-123377038f9so914745c88.0 for ; Mon, 19 Jan 2026 22:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768891382; x=1769496182; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Xxzq5Oepq3GgmFFUYeTPUXDTix+PLprCmsF253sSlaQ=; b=aP8KXRDe8KWYRY1CjT9c+1V4fVm3m5TWakZvV12NfBuiX0kJ43efksznHilTQL3a4h HNzjHadpkUMSohfSp6W4zAdUdpmYmH9NCnHod5LoSl3MI/2oYwYgK9V1U1EPuNUAaALZ tV6t5sbIfDCDBfnTuLyzk78pzTSZeYYtOWcMyFuLVnpiVWYCO57OGYyZ+xwqFKrsD2+F eMFYh3/6ZSV3Lesb8++Hmcnr2vAVeY45UPN7uRvxrUa5FTluvjKQvJeVO8QnWNBbma1R 7jNynz+AQylIsoIeSbhSAZG0qGyxL1ZIKqtxG7SqXthFPpFSwAn++G1MT6i2WpL2hilB e2sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768891382; x=1769496182; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Xxzq5Oepq3GgmFFUYeTPUXDTix+PLprCmsF253sSlaQ=; b=DFm3OjO7ByWesUEHoK/foIYWfIokcdRV8Mk3HDmmpb+l6gmeK7huFz63mR7q8ZnZp9 uI0tqB1eLmN/v1Fch24Imi2sDVodTbbak7Lot9YoINzZSBTVFaAr0/e0L08/f/t1jGNI 5zt00TpPxdY2LWlgZohOKTfvmwrwpbLFt3LDHDmg6eRSvULZvZKOrrTKFKGObS+gMoug OgcpChmy6rhwHieUzDNEMx6nHaFl4K51GVPldX8zk7oEWTWfyXQTXs893awD9GVeQk1w qrF+vkEL0DhS5fSk1agzaKEnE27IwYnFGKSpXzsSWUPYN/fajYz7BNA8DfRJoR1OGQDA OmDQ== X-Forwarded-Encrypted: i=1; AJvYcCUHiHPhaCFrqVk6CrQqF4wFFwYu52QzGP1UDx50Tqre5vj0Uob7bWX4iLVEU8SNErbT+VcGTWKyRqnvoXs=@vger.kernel.org X-Gm-Message-State: AOJu0YxGHK6oTjTP7AxX1Czg7uUn1ZIsmDvWMX2ObMvm4F8AyMUIG26t nv633y/De+oJLihxGvV1uRmTAYXMr+XPhTTiFGYmho9cULrN09mgleDTn3D3JoRymD+mH6s5trq v5RuWVCcPyg1oF7N2TbEKrFqwNUwSPPfYbFQlia762qgX/vHEGt0JtnZR7j8aj+On9409tyJ+ws rLJQ== X-Gm-Gg: AY/fxX6PAbBRlcewbSTEkxWG+AZQu6s0RSIp4s93tO+3M2iRt0F79FvRzKQIO+q66Ir zZRdznG7zIdVXVhK2g6Dno673DMTwouSL8v47Wm52hBjEdS850mYfciDJvYelyGQVdAbKQY5BJf 3wyD2uBomSiuIeMFvb5eLvh6pDpe8dW+fcb58DCwKgLBlOXcmF0N57dqPEe8HJjXpyLQYE+Hrm+ /Ayojn1fHXP6QTazO0VTmZrO4EBRwA4ooaB/6LREYjMJiuS9tvXTrfYj/ywUBEc/wyT5uSBHQda PGUUDywwdp/CnMPeHHl3YdZJKqY+TH4R/nC5iD1dV/jM5HgQoh3RicZ94Wr1YO9HDHlGM/qAWxH wGi2ee8XzUxbrScml1RvEmL7Hqntd+5cdVTU3nUVPkUzncmWG8beFW6YqHV72pWe6 X-Received: by 2002:a05:7022:eace:b0:119:e56b:c758 with SMTP id a92af1059eb24-1246aad1d38mr568312c88.29.1768891382112; Mon, 19 Jan 2026 22:43:02 -0800 (PST) X-Received: by 2002:a05:7022:eace:b0:119:e56b:c758 with SMTP id a92af1059eb24-1246aad1d38mr568287c88.29.1768891381455; Mon, 19 Jan 2026 22:43:01 -0800 (PST) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ad7201fsm19128658c88.7.2026.01.19.22.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 22:43:01 -0800 (PST) From: Hangxiang Ma Date: Mon, 19 Jan 2026 22:42:51 -0800 Subject: [PATCH RESEND v2 1/5] media: dt-bindings: Add CAMSS device for SM8750 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-add-support-for-camss-on-sm8750-v2-1-3e06583a0a81@oss.qualcomm.com> References: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> In-Reply-To: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeyaprakash.soundrapandian@oss.qualcomm.com, Vijay Kumar Tumati , Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: znuQrjZeTdiKXdsmjxFlo5JPtiAJZrng X-Proofpoint-GUID: znuQrjZeTdiKXdsmjxFlo5JPtiAJZrng X-Authority-Analysis: v=2.4 cv=c4OmgB9l c=1 sm=1 tr=0 ts=696f23f7 cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gEfo2CItAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=dpxBiYkotQz7p_VYlh4A:9 a=QEXdDO2ut3YA:10 a=Fk4IpSoW4aLDllm1B1p-:22 a=sptkURWiP4Gy88Gu7hUp:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIwMDA1NCBTYWx0ZWRfX7CnugdXda89Q 5DRD/bcPs22J7aj4RTOO8LvqWz2jQ3npMcP/KZcy12tgpa2eRGFUxx4DFQhVS/DYwRpA+EoY8NY Dt7fFto4EfzIUXXAyWb9ID9S2puadRKfdAmRbUlCG86kensnymiq4BXHW+jyEmUKrCWIKI/Hu2+ RPyYHzoGamzwK9Ro0TzVy/KElvO1nr7JL6MhNeh3ZxaZN2l5Km61k17Zkz0zjYoUs968Jn6RXyc Vk4WWbWjaUutxAr4EvjIOZDfzFCM5MnOx6OaZvo1OGKMDdZRNN0aoOGIU1U6/kLaoi7sPokCpu2 Fms2OFvrpPDJzB8qBeIJzjVKwA8slt2Cz+OIfm58CZ1COk0Gl2fApqlTbllAZVQ+XpRN2wjU9LO uwGoW4BnhDjZVfA9t/7tkRcMa53gaKTiil+skhqmWaFwaJHC7Ps7y3mN+hSuWNhu5PVYy+mtyxh HDHHaDnJC3S6yIn6e5A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-20_01,2026-01-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 spamscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601200054 Add bindings for Camera Subsystem (CAMSS) on the Qualcomm SM8750 platform. The SM8750 platform provides: - 3 x VFE (Video Front End), 5 RDI per VFE - 2 x VFE Lite, 4 RDI per VFE Lite - 3 x CSID (CSI Decoder) - 2 x CSID Lite - 6 x CSIPHY (CSI Physical Layer) - 2 x ICP (Image Control Processor) - 1 x IPE (Image Processing Engine) - 2 x JPEG DMA & Downscaler - 2 x JPEG Encoder - 1 x OFE (Offline Front End) - 5 x RT CDM (Camera Data Mover) - 3 x TPG (Test Pattern Generator) Reviewed-by: Bryan O'Donoghue Signed-off-by: Hangxiang Ma --- .../bindings/media/qcom,sm8750-camss.yaml | 663 +++++++++++++++++= ++++ 1 file changed, 663 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,sm8750-camss.yaml= b/Documentation/devicetree/bindings/media/qcom,sm8750-camss.yaml new file mode 100644 index 000000000000..e2a9f89888f3 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,sm8750-camss.yaml @@ -0,0 +1,663 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,sm8750-camss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SM8750 Camera Subsystem (CAMSS) + +maintainers: + - Hangxiang Ma + +description: + SM8750 camera subsystem includes submodules such as CSIPHY (CSI Physical= Layer) + and CSID (CSI Decoder), which comply with the MIPI CSI2 protocol. + + The subsystem also integrates a set of real-time image processing engine= s and + their associated configuration modules, as well as non-real-time engines. + + Additionally, it encompasses a test pattern generator (TPG) submodule. + +properties: + compatible: + const: qcom,sm8750-camss + + reg: + items: + - description: Registers for CSID 0 + - description: Registers for CSID 1 + - description: Registers for CSID 2 + - description: Registers for CSID Lite 0 + - description: Registers for CSID Lite 1 + - description: Registers for CSIPHY 0 + - description: Registers for CSIPHY 1 + - description: Registers for CSIPHY 2 + - description: Registers for CSIPHY 3 + - description: Registers for CSIPHY 4 + - description: Registers for CSIPHY 5 + - description: Registers for VFE (Video Front End) 0 + - description: Registers for VFE 1 + - description: Registers for VFE 2 + - description: Registers for VFE Lite 0 + - description: Registers for VFE Lite 1 + - description: Registers for ICP (Imaging Control Processor) 0 + - description: Registers for ICP 0 SYS + - description: Registers for ICP 1 + - description: Registers for ICP 1 SYS + - description: Registers for IPE (Image Processing Engine) + - description: Registers for JPEG DMA & Downscaler 0 + - description: Registers for JPEG Encoder 0 + - description: Registers for JPEG DMA & Downscaler 1 + - description: Registers for JPEG Encoder 1 + - description: Registers for OFE (Offline Front End) + - description: Registers for RT CDM (Camera Data Mover) 0 + - description: Registers for RT CDM 1 + - description: Registers for RT CDM 2 + - description: Registers for RT CDM 3 + - description: Registers for RT CDM 4 + - description: Registers for TPG 0 + - description: Registers for TPG 1 + - description: Registers for TPG 2 + + reg-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid_lite0 + - const: csid_lite1 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: csiphy4 + - const: csiphy5 + - const: vfe0 + - const: vfe1 + - const: vfe2 + - const: vfe_lite0 + - const: vfe_lite1 + - const: icp0 + - const: icp0_sys + - const: icp1 + - const: icp1_sys + - const: ipe + - const: jpeg_dma0 + - const: jpeg_enc0 + - const: jpeg_dma1 + - const: jpeg_enc1 + - const: ofe + - const: rt_cdm0 + - const: rt_cdm1 + - const: rt_cdm2 + - const: rt_cdm3 + - const: rt_cdm4 + - const: tpg0 + - const: tpg1 + - const: tpg2 + + clocks: + maxItems: 61 + + clock-names: + items: + - const: camnoc_nrt_axi + - const: camnoc_rt_axi + - const: camnoc_rt_vfe0 + - const: camnoc_rt_vfe1 + - const: camnoc_rt_vfe2 + - const: camnoc_rt_vfe_lite + - const: cpas_ahb + - const: cpas_fast_ahb + - const: csid + - const: csid_csiphy_rx + - const: csiphy0 + - const: csiphy0_timer + - const: csiphy1 + - const: csiphy1_timer + - const: csiphy2 + - const: csiphy2_timer + - const: csiphy3 + - const: csiphy3_timer + - const: csiphy4 + - const: csiphy4_timer + - const: csiphy5 + - const: csiphy5_timer + - const: gcc_axi_hf + - const: vfe0 + - const: vfe0_fast_ahb + - const: vfe1 + - const: vfe1_fast_ahb + - const: vfe2 + - const: vfe2_fast_ahb + - const: vfe_lite + - const: vfe_lite_ahb + - const: vfe_lite_cphy_rx + - const: vfe_lite_csid + - const: qdss_debug_xo + - const: camnoc_ipe_nps + - const: camnoc_ofe + - const: gcc_axi_sf + - const: icp0 + - const: icp0_ahb + - const: icp1 + - const: icp1_ahb + - const: ipe_nps + - const: ipe_nps_ahb + - const: ipe_nps_fast_ahb + - const: ipe_pps + - const: ipe_pps_fast_ahb + - const: jpeg0 + - const: jpeg1 + - const: ofe_ahb + - const: ofe_anchor + - const: ofe_anchor_fast_ahb + - const: ofe_hdr + - const: ofe_hdr_fast_ahb + - const: ofe_main + - const: ofe_main_fast_ahb + - const: vfe0_bayer + - const: vfe0_bayer_fast_ahb + - const: vfe1_bayer + - const: vfe1_bayer_fast_ahb + - const: vfe2_bayer + - const: vfe2_bayer_fast_ahb + + interrupts: + maxItems: 32 + + interrupt-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid_lite0 + - const: csid_lite1 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: csiphy4 + - const: csiphy5 + - const: vfe0 + - const: vfe1 + - const: vfe2 + - const: vfe_lite0 + - const: vfe_lite1 + - const: camnoc_nrt + - const: camnoc_rt + - const: icp0 + - const: icp1 + - const: jpeg_dma0 + - const: jpeg_enc0 + - const: jpeg_dma1 + - const: jpeg_enc1 + - const: rt_cdm0 + - const: rt_cdm1 + - const: rt_cdm2 + - const: rt_cdm3 + - const: rt_cdm4 + - const: tpg0 + - const: tpg1 + - const: tpg2 + + interconnects: + maxItems: 4 + + interconnect-names: + items: + - const: cam_ahb + - const: cam_hf_mnoc + - const: cam_sf_icp_mnoc + - const: cam_sf_mnoc + + iommus: + items: + - description: VFE non-protected stream + - description: ICP0 shared stream + - description: ICP1 shared stream + - description: IPE CDM non-protected stream + - description: IPE non-protected stream + - description: JPEG non-protected stream + - description: OFE CDM non-protected stream + - description: OFE non-protected stream + - description: VFE / VFE Lite CDM non-protected stream + + power-domains: + items: + - description: + IFE0 GDSC - Global Distributed Switch Controller for IFE0. + - description: + IFE1 GDSC - Global Distributed Switch Controller for IFE1. + - description: + IFE2 GDSC - Global Distributed Switch Controller for IFE2. + - description: + Titan GDSC - Global Distributed Switch Controller for the entire= camss. + - description: + IPE GDSC - Global Distributed Switch Controller for IPE. + - description: + OFE GDSC - Block Global Distributed Switch Controller for OFE. + + power-domain-names: + items: + - const: ife0 + - const: ife1 + - const: ife2 + - const: top + - const: ipe + - const: ofe + + vdd-csiphy0-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY0 core block. + + vdd-csiphy0-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY0 pll block. + + vdd-csiphy1-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY1 core block. + + vdd-csiphy1-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY1 pll block. + + vdd-csiphy2-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY2 core block. + + vdd-csiphy2-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY2 pll block. + + vdd-csiphy3-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY3 core block. + + vdd-csiphy3-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY3 pll block. + + vdd-csiphy4-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY4 core block. + + vdd-csiphy4-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY4 pll block. + + vdd-csiphy5-0p9-supply: + description: + Phandle to a 0.9V regulator supply to CSIPHY5 core block. + + vdd-csiphy5-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY5 pll block. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + patternProperties: + "^port@[0-5]$": + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input ports for receiving CSI data on CSIPHY 0-5. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - data-lanes + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - interrupts + - interrupt-names + - interconnects + - interconnect-names + - iommus + - power-domains + - power-domain-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + + soc { + #address-cells =3D <2>; + #size-cells =3D <2>; + + isp@ad27000 { + compatible =3D "qcom,sm8750-camss"; + + reg =3D <0x0 0x0ad27000 0x0 0x2b00>, + <0x0 0x0ad2a000 0x0 0x2b00>, + <0x0 0x0ad2d000 0x0 0x2b00>, + <0x0 0x0ad6d000 0x0 0xa00>, + <0x0 0x0ad72000 0x0 0xa00>, + <0x0 0x0ada9000 0x0 0x2000>, + <0x0 0x0adab000 0x0 0x2000>, + <0x0 0x0adad000 0x0 0x2000>, + <0x0 0x0adaf000 0x0 0x2000>, + <0x0 0x0adb1000 0x0 0x2000>, + <0x0 0x0adb3000 0x0 0x2000>, + <0x0 0x0ac86000 0x0 0x10000>, + <0x0 0x0ac96000 0x0 0x10000>, + <0x0 0x0aca6000 0x0 0x10000>, + <0x0 0x0ad6e000 0x0 0x1800>, + <0x0 0x0ad73000 0x0 0x1800>, + <0x0 0x0ac06000 0x0 0x1000>, + <0x0 0x0ac05000 0x0 0x1000>, + <0x0 0x0ac16000 0x0 0x1000>, + <0x0 0x0ac15000 0x0 0x1000>, + <0x0 0x0ac42000 0x0 0x18000>, + <0x0 0x0ac26000 0x0 0x1000>, + <0x0 0x0ac25000 0x0 0x1000>, + <0x0 0x0ac28000 0x0 0x1000>, + <0x0 0x0ac27000 0x0 0x1000>, + <0x0 0x0ac2a000 0x0 0x18000>, + <0x0 0x0ac7f000 0x0 0x580>, + <0x0 0x0ac80000 0x0 0x580>, + <0x0 0x0ac81000 0x0 0x580>, + <0x0 0x0ac82000 0x0 0x580>, + <0x0 0x0ac83000 0x0 0x580>, + <0x0 0x0ad8b000 0x0 0x400>, + <0x0 0x0ad8c000 0x0 0x400>, + <0x0 0x0ad8d000 0x0 0x400>; + reg-names =3D "csid0", + "csid1", + "csid2", + "csid_lite0", + "csid_lite1", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "csiphy4", + "csiphy5", + "vfe0", + "vfe1", + "vfe2", + "vfe_lite0", + "vfe_lite1", + "icp0", + "icp0_sys", + "icp1", + "icp1_sys", + "ipe", + "jpeg_dma0", + "jpeg_enc0", + "jpeg_dma1", + "jpeg_enc1", + "ofe", + "rt_cdm0", + "rt_cdm1", + "rt_cdm2", + "rt_cdm3", + "rt_cdm4", + "tpg0", + "tpg1", + "tpg2"; + + clocks =3D <&camcc_cam_cc_camnoc_nrt_axi_clk>, + <&camcc_cam_cc_camnoc_rt_axi_clk>, + <&camcc_cam_cc_camnoc_rt_vfe_0_main_clk>, + <&camcc_cam_cc_camnoc_rt_vfe_1_main_clk>, + <&camcc_cam_cc_camnoc_rt_vfe_2_main_clk>, + <&camcc_cam_cc_camnoc_rt_vfe_lite_clk>, + <&camcc_cam_cc_cam_top_ahb_clk>, + <&camcc_cam_cc_cam_top_fast_ahb_clk>, + <&camcc_cam_cc_csid_clk>, + <&camcc_cam_cc_csid_csiphy_rx_clk>, + <&camcc_cam_cc_csiphy0_clk>, + <&camcc_cam_cc_csi0phytimer_clk>, + <&camcc_cam_cc_csiphy1_clk>, + <&camcc_cam_cc_csi1phytimer_clk>, + <&camcc_cam_cc_csiphy2_clk>, + <&camcc_cam_cc_csi2phytimer_clk>, + <&camcc_cam_cc_csiphy3_clk>, + <&camcc_cam_cc_csi3phytimer_clk>, + <&camcc_cam_cc_csiphy4_clk>, + <&camcc_cam_cc_csi4phytimer_clk>, + <&camcc_cam_cc_csiphy5_clk>, + <&camcc_cam_cc_csi5phytimer_clk>, + <&gcc_gcc_camera_hf_axi_clk>, + <&camcc_cam_cc_vfe_0_main_clk>, + <&camcc_cam_cc_vfe_0_main_fast_ahb_clk>, + <&camcc_cam_cc_vfe_1_main_clk>, + <&camcc_cam_cc_vfe_1_main_fast_ahb_clk>, + <&camcc_cam_cc_vfe_2_main_clk>, + <&camcc_cam_cc_vfe_2_main_fast_ahb_clk>, + <&camcc_cam_cc_vfe_lite_clk>, + <&camcc_cam_cc_vfe_lite_ahb_clk>, + <&camcc_cam_cc_vfe_lite_cphy_rx_clk>, + <&camcc_cam_cc_vfe_lite_csid_clk>, + <&camcc_cam_cc_qdss_debug_xo_clk>, + <&camcc_cam_cc_camnoc_nrt_ipe_nps_clk>, + <&camcc_cam_cc_camnoc_nrt_ofe_main_clk>, + <&gcc_gcc_camera_sf_axi_clk>, + <&camcc_cam_cc_icp_0_clk>, + <&camcc_cam_cc_icp_0_ahb_clk>, + <&camcc_cam_cc_icp_1_clk>, + <&camcc_cam_cc_icp_1_ahb_clk>, + <&camcc_cam_cc_ipe_nps_clk>, + <&camcc_cam_cc_ipe_nps_ahb_clk>, + <&camcc_cam_cc_ipe_nps_fast_ahb_clk>, + <&camcc_cam_cc_ipe_pps_clk>, + <&camcc_cam_cc_ipe_pps_fast_ahb_clk>, + <&camcc_cam_cc_jpeg_0_clk>, + <&camcc_cam_cc_jpeg_1_clk>, + <&camcc_cam_cc_ofe_ahb_clk>, + <&camcc_cam_cc_ofe_anchor_clk>, + <&camcc_cam_cc_ofe_anchor_fast_ahb_clk>, + <&camcc_cam_cc_ofe_hdr_clk>, + <&camcc_cam_cc_ofe_hdr_fast_ahb_clk>, + <&camcc_cam_cc_ofe_main_clk>, + <&camcc_cam_cc_ofe_main_fast_ahb_clk>, + <&camcc_cam_cc_vfe_0_bayer_clk>, + <&camcc_cam_cc_vfe_0_bayer_fast_ahb_clk>, + <&camcc_cam_cc_vfe_1_bayer_clk>, + <&camcc_cam_cc_vfe_1_bayer_fast_ahb_clk>, + <&camcc_cam_cc_vfe_2_bayer_clk>, + <&camcc_cam_cc_vfe_2_bayer_fast_ahb_clk>; + clock-names =3D "camnoc_nrt_axi", + "camnoc_rt_axi", + "camnoc_rt_vfe0", + "camnoc_rt_vfe1", + "camnoc_rt_vfe2", + "camnoc_rt_vfe_lite", + "cpas_ahb", + "cpas_fast_ahb", + "csid", + "csid_csiphy_rx", + "csiphy0", + "csiphy0_timer", + "csiphy1", + "csiphy1_timer", + "csiphy2", + "csiphy2_timer", + "csiphy3", + "csiphy3_timer", + "csiphy4", + "csiphy4_timer", + "csiphy5", + "csiphy5_timer", + "gcc_axi_hf", + "vfe0", + "vfe0_fast_ahb", + "vfe1", + "vfe1_fast_ahb", + "vfe2", + "vfe2_fast_ahb", + "vfe_lite", + "vfe_lite_ahb", + "vfe_lite_cphy_rx", + "vfe_lite_csid", + "qdss_debug_xo", + "camnoc_ipe_nps", + "camnoc_ofe", + "gcc_axi_sf", + "icp0", + "icp0_ahb", + "icp1", + "icp1_ahb", + "ipe_nps", + "ipe_nps_ahb", + "ipe_nps_fast_ahb", + "ipe_pps", + "ipe_pps_fast_ahb", + "jpeg0", + "jpeg1", + "ofe_ahb", + "ofe_anchor", + "ofe_anchor_fast_ahb", + "ofe_hdr", + "ofe_hdr_fast_ahb", + "ofe_main", + "ofe_main_fast_ahb", + "vfe0_bayer", + "vfe0_bayer_fast_ahb", + "vfe1_bayer", + "vfe1_bayer_fast_ahb", + "vfe2_bayer", + "vfe2_bayer_fast_ahb"; + + interrupts =3D , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-names =3D "csid0", + "csid1", + "csid2", + "csid_lite0", + "csid_lite1", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "csiphy4", + "csiphy5", + "vfe0", + "vfe1", + "vfe2", + "vfe_lite0", + "vfe_lite1", + "camnoc_nrt", + "camnoc_rt", + "icp0", + "icp1", + "jpeg_dma0", + "jpeg_enc0", + "jpeg_dma1", + "jpeg_enc1", + "rt_cdm0", + "rt_cdm1", + "rt_cdm2", + "rt_cdm3", + "rt_cdm4", + "tpg0", + "tpg1", + "tpg2"; + + interconnects =3D <&gem_noc_master_appss_proc QCOM_ICC_TAG_ACT= IVE_ONLY + &config_noc_slave_camera_cfg QCOM_ICC_TAG_ACT= IVE_ONLY>, + <&mmss_noc_master_camnoc_hf QCOM_ICC_TAG_ALWAYS + &mc_virt_slave_ebi1 QCOM_ICC_TAG_ALWAYS>, + <&mmss_noc_master_camnoc_nrt_icp_sf QCOM_ICC_T= AG_ALWAYS + &mc_virt_slave_ebi1 QCOM_ICC_TAG_ALWAYS>, + <&mmss_noc_master_camnoc_sf QCOM_ICC_TAG_ALWAYS + &mc_virt_slave_ebi1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names =3D "cam_ahb", + "cam_hf_mnoc", + "cam_sf_icp_mnoc", + "cam_sf_mnoc"; + + iommus =3D <&apps_smmu 0x1c00 0x00>, + <&apps_smmu 0x18c0 0x00>, + <&apps_smmu 0x1980 0x00>, + <&apps_smmu 0x1840 0x00>, + <&apps_smmu 0x1800 0x00>, + <&apps_smmu 0x18a0 0x00>, + <&apps_smmu 0x1880 0x00>, + <&apps_smmu 0x1820 0x00>, + <&apps_smmu 0x1860 0x00>; + + power-domains =3D <&camcc_cam_cc_ife_0_gdsc>, + <&camcc_cam_cc_ife_1_gdsc>, + <&camcc_cam_cc_ife_2_gdsc>, + <&camcc_cam_cc_titan_top_gdsc>, + <&camcc_cam_cc_ipe_0_gdsc>, + <&camcc_cam_cc_ofe_gdsc>; + power-domain-names =3D "ife0", + "ife1", + "ife2", + "top", + "ipe", + "ofe"; + + vdd-csiphy0-0p9-supply =3D <&vreg_0p9_supply>; + vdd-csiphy0-1p2-supply =3D <&vreg_1p2_supply>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + csiphy_ep0: endpoint { + data-lanes =3D <0 1>; + remote-endpoint =3D <&sensor_ep>; + }; + }; + }; + }; + }; --=20 2.34.1 From nobody Mon Feb 9 19:10:42 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48421376BCC for ; Tue, 20 Jan 2026 06:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; cv=none; b=a2QCgMRZ/c098BuJ9oEPqk6Od0xmr80P0O1PxfVfzhtuujUsFx9jmBTH/DTbawS+ulDKEkOxPIajwMPCLdcn+LmguDGgiemjFiFjiG4IiAKPax1IXhgoUhoEhUVQFLvKWRye++Th2FMOjDWuNyeuDdclM46jfHHV49od0yIjvfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; c=relaxed/simple; bh=gu473kq61cSZJm9VyFb40QrOqKkNTdf/7tHjb4r1jJ8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Sj87VawBCZw4VlWL4B9hcw9DNTF1Yo0lWeDfrSZ//l6v4qB2ZHtnmdAhZCPkHGiRwzxzyELGE7mI4xOZgoeCrk6fHJUmSLXWuvmWmB7Pex41zTIlUbIjbOl4DLKkElnqJPYpuZL3Eu3tl2mBVD0OH6rgRqClyHp/RX7QOSXb9Qw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ZaNE/+NL; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=fP9a9IMP; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ZaNE/+NL"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="fP9a9IMP" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60JMbDI41931209 for ; Tue, 20 Jan 2026 06:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EHpnhETPQKpTkYEur0En4T1/9DNORTc1e4H/HBNvjAs=; b=ZaNE/+NLQX0GYzyF hHugE+6RuE7nlYtpNL8B10Ef7uTZ8ZuPDIWA5F4e0rEutnZaSKaw00c4VP+d2G6m uBEDDlm1+IeDcblatwlYR0tQb273rrHn/P4kjQha4sgRXsQ8YqGu8NOMPMcLC1h2 DsWlYSz2MkpllT5GvXffiCq8NOhq3utDK5FRERJ/RZufPiFK0UERcY4MgMo6EEUf fa6BZnhM+jjDs99Z8SnLARhUh4zA/HW3wDpC298j0tDUC2OJu6T0tsNsDnyZIQ5D bLKEuLuquKiueZxAKI/H+rWIy0bBZjLCBBHs2kG1PY1/McsTgZx1JD4yX/WuM/aX e1eLdQ== Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bsgfrbbmd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 20 Jan 2026 06:43:04 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-12339e20a86so5358022c88.0 for ; Mon, 19 Jan 2026 22:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768891384; x=1769496184; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EHpnhETPQKpTkYEur0En4T1/9DNORTc1e4H/HBNvjAs=; b=fP9a9IMPTAbV7REKONeK+y1NPQiOlVepTRi37avjJS7uowyJg7IYwEs7sC+C56u/k/ 5ScC2mcLw/wxgZt6GntP1aEb2ec3I6JgaJ5PiJj6jmI0ES3qh6zPrUsUE/jBiJqAjlFE ELRQgdQIiMbDzx68E1Ss4WKvb48xXWQuH856gxsmErQvfuL+bWu0tPl/7mYNRkpgtfC/ rCKwnZ2qxO2allHNGKjfhJdVHUaZEAfG5B9faTQkDhrtYbRnQ/WKXTvkGB10BVjt3rdH VVoOCPp7Uk8PpjYT4Bjmb0s2T8hAe5hugQ5OaceDGplNT3Z3MQRv32icegA19D4FTwvl XxPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768891384; x=1769496184; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=EHpnhETPQKpTkYEur0En4T1/9DNORTc1e4H/HBNvjAs=; b=KhhGkRw5UETXWI2MDqtA9AfSLNZNEfsvdtxVrz0HuC3/gcOw4r8N597DOjg3v5oZxd cSTEv6+uzL0jYqbSsRMOqhO8lh+ZpNXYxfhfPFAPeQ+Y0QrfjFty1LOZSbm1BHKXmXYP 6+qkAKUU0HzyAvEDcdbGXOTuNMXuiCry3+/OUmtMD3T+FX3wjJk6cPOYb8gL/bmejxAw Y+nw5hfV8ekvjgbmo35FGvs91xAGYY/57KUfqsQ3gr/rttKnBJDyz4xJOqBebaA0Pvat Yr6tsyqeUyEi+YjMy60xLhAc6P/tRagdnXhqUE2dhO36NtCQVHL72KlRK8v7Kn4KvXYs qQRA== X-Forwarded-Encrypted: i=1; AJvYcCUWLuezXqly/QJV9QPOpcsgTLzyFAGi1SyS2B91G7Fv0+vfJRxj7OdB/em/F9MPPjJvIzUxraXgrsJDJ3o=@vger.kernel.org X-Gm-Message-State: AOJu0YxViLMNDfqIt8cF9CkOuB21ifviGM4JcNQsb8ViVg0RMDSCUWx8 niWeWBkdreMCe9ruC12qx+3Esd2nqnU9nxClKczwko9HIAHt42MvGpjoqo0lVN9KafZ7kITBaCR g0dMS3mNf1fGzU2R2ECLNCzNlBu/12y1IrVFLjYLrfw9s4IwRzhMOc0rt7R6kIRCShxlwYUDlIx F+jA== X-Gm-Gg: AY/fxX7l99E6hmrPM5g88fdezxWnYsuwwFiQY+cjpUTKiLgJ8cpQ1xFEMY27CvReSpU 62WrDFAOhLZzL4bsxSgMR6EMpj5YUwyKYwqNlcDif9q89p8jKM8eLAGGc9fuZEsY7l6Jhhgu6XT B+0H8mTs3BDvIlG3xMlgBGoOsoxM2pVTePBdrMo2cs8y+Bm0ycG5tu8eRzdHlh7F6wlQgFYnGAR nGDbk4hisRBrRomb38AD+1o1+H4bEIiRq8gptSZniE27KGQr+F+lq+UYWBpIBuw2gQVyNkUDJLd E4KkYyn4eT+9KvQ5J9r5iBO35m9fa+B54YyoJeWBpNA4M6pA8yRf/5FU7NQtxPkZfr4EpzK+a66 3mv4d1CvX7dYVOUb+5KmB9gbqWX4VTJL4d8eSeNrVhR4rormJB6eMRUlgHXFRGUfZ X-Received: by 2002:a05:7022:6986:b0:11b:b3a1:713c with SMTP id a92af1059eb24-1246a958283mr690931c88.9.1768891382706; Mon, 19 Jan 2026 22:43:02 -0800 (PST) X-Received: by 2002:a05:7022:6986:b0:11b:b3a1:713c with SMTP id a92af1059eb24-1246a958283mr690914c88.9.1768891382184; Mon, 19 Jan 2026 22:43:02 -0800 (PST) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ad7201fsm19128658c88.7.2026.01.19.22.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 22:43:01 -0800 (PST) From: Hangxiang Ma Date: Mon, 19 Jan 2026 22:42:52 -0800 Subject: [PATCH RESEND v2 2/5] media: qcom: camss: Add SM8750 compatible camss driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-add-support-for-camss-on-sm8750-v2-2-3e06583a0a81@oss.qualcomm.com> References: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> In-Reply-To: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeyaprakash.soundrapandian@oss.qualcomm.com, Vijay Kumar Tumati , Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: fZUMaJLRWvjE14Px3eNp_CRb9LBVO4Ki X-Proofpoint-GUID: fZUMaJLRWvjE14Px3eNp_CRb9LBVO4Ki X-Authority-Analysis: v=2.4 cv=c4OmgB9l c=1 sm=1 tr=0 ts=696f23f8 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=gE60Ov1lhapgyOv8Ur0A:9 a=QEXdDO2ut3YA:10 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIwMDA1NCBTYWx0ZWRfX1nvlFUAnpj0s agF90vOHgChcnebAfPCFvTHYKK26EwX4wCBvXOoKLrfOmCK0U537tjAn+4Oq7ZEvgmE6Q8wJMgt sjp2nO97EASDI53bk9ymN+dRrfU4IpoSM1iu4hBQQ+c9kA+JS3OCPi2JC7pJT9ZV13260c74QNq +AfcYxjC9+xseEjph19gw/Isyp7Wm1Nu8Azd7+BcFHu9KHBN9jaeLjXNp8AWLYLiH+vBmZ3Rtk9 yOkfgZsAp3Jjx687rF4bNKC/C/wJ6uCdPk8Ruo2lhxxvn3NVJkJppEmhgy1nnLOfg3ommok3u0j b+vFFSLSya7e/LJtfMh79nZwpJ9E5jA14rJOawij2sSVTVKPmgBXyI5zqaxDVWK/5xHlzNrtjVT gDS5eKL8YvWAUM+b1vRS+hHDXWc74R9R1KfkgqB1DSNSWX0F8ZC2E5NtEf29GegMMQniybTcfN8 2eT+lBmv72drks+FARw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-20_01,2026-01-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 spamscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601200054 Add support for SM8750 in the camss driver. Add high level resource information along with the bus bandwidth votes. Module level detailed resource information will be enumerated in the following patches of the series. Reviewed-by: Bryan O'Donoghue Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/camss.c | 22 ++++++++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 9c99fdf34bbb..0b524b615a94 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4248,6 +4248,20 @@ static const struct resources_icc icc_res_sa8775p[] = =3D { }, }; =20 +static const struct resources_icc icc_res_sm8750[] =3D { + { + .name =3D "cam_ahb", + .icc_bw_tbl.avg =3D 150000, + .icc_bw_tbl.peak =3D 300000, + }, + /* Based on 4096 x 3072 30 FPS 2496 Mbps mode */ + { + .name =3D "cam_hf_mnoc", + .icc_bw_tbl.avg =3D 471860, + .icc_bw_tbl.peak =3D 925857, + }, +}; + static const struct camss_subdev_resources csiphy_res_x1e80100[] =3D { /* CSIPHY0 */ { @@ -5670,6 +5684,13 @@ static const struct camss_resources sm8650_resources= =3D { .vfe_num =3D ARRAY_SIZE(vfe_res_sm8650), }; =20 +static const struct camss_resources sm8750_resources =3D { + .version =3D CAMSS_8750, + .pd_name =3D "top", + .icc_res =3D icc_res_sm8750, + .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), +}; + static const struct camss_resources x1e80100_resources =3D { .version =3D CAMSS_X1E80100, .pd_name =3D "top", @@ -5702,6 +5723,7 @@ static const struct of_device_id camss_dt_match[] =3D= { { .compatible =3D "qcom,sm8250-camss", .data =3D &sm8250_resources }, { .compatible =3D "qcom,sm8550-camss", .data =3D &sm8550_resources }, { .compatible =3D "qcom,sm8650-camss", .data =3D &sm8650_resources }, + { .compatible =3D "qcom,sm8750-camss", .data =3D &sm8750_resources }, { .compatible =3D "qcom,x1e80100-camss", .data =3D &x1e80100_resources }, { } }; diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/plat= form/qcom/camss/camss.h index 2820c687e066..dafdfe1d3a4a 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -92,6 +92,7 @@ enum camss_version { CAMSS_845, CAMSS_8550, CAMSS_8650, + CAMSS_8750, CAMSS_8775P, CAMSS_KAANAPALI, CAMSS_X1E80100, --=20 2.34.1 From nobody Mon Feb 9 19:10:42 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA9242D47EA for ; Tue, 20 Jan 2026 06:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; cv=none; b=uDI8fDc5AZK2CBbNgGyt+AH7CHTvmf0yuBKg5LUewpCBgWZ77Zzeud4d0sDmnzN+P2fh2ucRmlllCWd3XahdDeClJxfNbp5XTYHgzPaUgVozYKuAklnc0StKq2+6WM6CY0DKp59m69Hyra9eZ5eE6eJMGWKfP7JyMSlUgh1i5nQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891400; c=relaxed/simple; bh=jsOwb+B7K7FZCCxlNQxrJlUg3vB/VV4uHdzNfSRGhWs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cBesM9P4BgHFvF4f/CekUN7tymikVWC/536Wz8MdX7hnvF/dcES457TN80JSSjjSQmGnKMzIj/nO91XNux/xS7nDH41ldHpENQjvv8WLzw34LOcyflXjWVf1Aq1Z5rFPHpuLVTCFN6kbrSKCCgh2EfZyiIMd7RLpmn/WDNx/beE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=DfZyAO43; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TfbAbJdQ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="DfZyAO43"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TfbAbJdQ" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60JMCj762411227 for ; Tue, 20 Jan 2026 06:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= dRNqRld3lGsF4aYevT7/zEHLhoj3+AVXmXvtLLinTAc=; b=DfZyAO43gl2nPnTq SBwP2sjHNLbq9WmPeJZtnVLk+oUqrJMEke4pqyBTUW6aujvWy1KyxsPjx1+k7hAs yIwbmQtimzEYjcb0nGVrfRIwCV+pDHW+wAF1jiSMY3/fKwY1c34N7cp6eBoGLP7b pXnN1tfwKC6mAPotNukIizLFqhhkZsuJ76Ffyiat/xQEUR0X79TKU4c6zsFr/7iz BBuqnYYoiNTOoxzXQAo+I3e8gjT51/9VVBlNYQvW5nLlAMQCZraD/JKg/ikOW1Xo iSgbt2BwZ12kxKPNTvs+9Y1QO3qXI5ThGMe1hsfw8qX0AWDSNbjQeyAUKDSSn3JM soO0LQ== Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bsnpdj6sy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 20 Jan 2026 06:43:04 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1219f27037fso1871441c88.1 for ; Mon, 19 Jan 2026 22:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768891383; x=1769496183; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dRNqRld3lGsF4aYevT7/zEHLhoj3+AVXmXvtLLinTAc=; b=TfbAbJdQr9s3pywrf5dlCtgq30HA4xohEZtqsm+0YnO9dXD2AthEYer/5rvnIoJ1gy XMJyhTrtjb1gm1j5HWHVZVV+ah+YP95YMYlGJOfI1WwF7dYWnxbXqPfh3ER6+NktrNPY Pv88NrXlzu+MrrbOhacKiw8VhlG1UAhrEB/9LGHjDWguNhvZ2NMbYq9KaTToNiZQhS44 y96WhCZLhXkXxjJxp/t52EJg/i9tfqMHk+RhwS6hSNa7FRrVfMGoGnfFZN2CBnuz/5Wl BugEzpm6loPyyNt3DKpUXI9wKjOT/j68iYMdaieK4+qhZ9u6EAvGD7qQimHR4SPVqVRN pl0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768891383; x=1769496183; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dRNqRld3lGsF4aYevT7/zEHLhoj3+AVXmXvtLLinTAc=; b=R8aFjoHDFZTeTIDPYE/otvVTwQeMN9Wcl8KNSvWPIWxZYCd2TiINbrCMCiVbjTMNGk 88jfdb2s9XM6q4ZYETEM08FGdSy9Qoi/ybSUbaympy/1kH6+tCUj65Pwyl4cc9y3jD1y j50WcyoVXqz5a2nbLQ6+uTG4BvDsx/m25C0fj0kIaQllyKFLzFYAIhgKv774HD/z8ppF OHouSQhiAFn/iLtmQGxmb+eBLMoSqrhtEC5iW5QhR1UjjqtLTRw/SjyRyGcLWdJGNzdp IsHuD0PonR/MsdX1i1OUWRAHjCvu7kT7ROsT/3J9+Lfdvfg2pm187fAPdu2ydYfG9zfd QyxA== X-Forwarded-Encrypted: i=1; AJvYcCX0c4VQrWG+rC31y9KhY17SGrvFrDIm9YCWXHJ9cw+dhS8c1evW9D0zxoaHhBFGMnvlZQJtavh4STtCD5I=@vger.kernel.org X-Gm-Message-State: AOJu0YzdC6Ibmz2SzLE27dX/J8At/x7ybLQINqYnn/OMk++WvfAXic5H YQOmV9e8X4xMudeD+n03cgTtkbzjssy4Mq/sbbUI5B0nNW2P1m8RCDDmF7sWGkvpjRNAylTbJpQ 9Y1rFruTVvGGWX4o53V1FHUaiLbZjzbwydGCHyo4j/TU8guq9kXusuElj5sukXIQ/uOodaNEySV 2g3w== X-Gm-Gg: AY/fxX7mHwbsC+w4aF25C73IZ5uV4lOqgDBVIToITOf6RRuc/404g9vbVdTKExUIgkj 0WQhm4WgLVLjPs0KoSW85YEVWCTlNV19G83Q7iz+49v6qdBYvkmlcBuEH9gwGZw7+EHIBxrMa2P diAm4BE6q5XI6NJkr00LkLoA2JK79oxz0vbQ3f2RQ/owzUyxWwy1mpdb82Pvb8znBiFzpw+OWNn atqwfZTK8U6VgahPMPYF1tJMeo6p19VQ7+0f11NtTpwiv1He+XSdvGnc61UJoJh/uKkgc2wAmwu DZc54OxC46hO2wEQ6jHxgzWeYB1zEyulbVEfGupUi7nO4tGwWUVpfAdsRA0bqcJsuaZm4ltT9nn mCd2O1E8/3VhS6i2PZklhyvjP1TgTZyOiY08Pfh8870Z7iK0tZ4dSp1OzV9g5PwaR X-Received: by 2002:a05:7022:458c:b0:11b:88a7:e1ac with SMTP id a92af1059eb24-1246aa8951emr690872c88.19.1768891383414; Mon, 19 Jan 2026 22:43:03 -0800 (PST) X-Received: by 2002:a05:7022:458c:b0:11b:88a7:e1ac with SMTP id a92af1059eb24-1246aa8951emr690856c88.19.1768891382922; Mon, 19 Jan 2026 22:43:02 -0800 (PST) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ad7201fsm19128658c88.7.2026.01.19.22.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 22:43:02 -0800 (PST) From: Hangxiang Ma Date: Mon, 19 Jan 2026 22:42:53 -0800 Subject: [PATCH RESEND v2 3/5] media: qcom: camss: csiphy: Add support for v2.3.0 two-phase CSIPHY Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-add-support-for-camss-on-sm8750-v2-3-3e06583a0a81@oss.qualcomm.com> References: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> In-Reply-To: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeyaprakash.soundrapandian@oss.qualcomm.com, Vijay Kumar Tumati , Hangxiang Ma X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=NtncssdJ c=1 sm=1 tr=0 ts=696f23f8 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=UiSUrLz6K6kVaq6zp58A:9 a=QEXdDO2ut3YA:10 a=vBUdepa8ALXHeOFLBtFW:22 X-Proofpoint-GUID: j4EcwBUcprD2pKNgnV0egbF5TuZ68Vfy X-Proofpoint-ORIG-GUID: j4EcwBUcprD2pKNgnV0egbF5TuZ68Vfy X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIwMDA1NCBTYWx0ZWRfX5f69vuKKpO2c HxG54cUPU536yCeLt8b4FRbwn4WRr2E1IT6+jF8pF+L6AntbaVO/Lyo3AQtKrAia/eTufs4CdrA EdFD9bslXKML2xYPP3jLEof7z0JkXximcUv+4q8DvX8u6Yftx6myUQGpaZUjZ1y1tbFBvkzogYv kJHdyAjRrEl2yad2ztf3srAP31Dq0dfNLr2O5teEMT9dAHzm/ej5Cz0q/etNS0T1h+bPXAxeY8v 9twqzRtUBry6xoLlHDSVcFeTE1Gzoju8djM0k+UMmqirdzQl6mUx83UO5E+nKwG+83K5m07hkCX Q+ceXhdErPPuDXPf5tN2qxeeryNTlFVSuzpNiIcoT+P2dZFeGfh+ROxqH5xQ45hM88maq4VkUGk gtoQbJuptnr3FjK6iEiNPIyiJ735aM5pKho9rDzsy5G1Or4MtxUtMyZgytzX3ceWUf73qyo1OGj /joG+4H6UAOyL7xUzTA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-20_01,2026-01-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601200054 Add more detailed resource information for CSIPHY devices in the camss driver along with the support for v2.3.0 in the 2 phase CSIPHY driver that is responsible for the PHY lane register configuration, module reset and interrupt handling. Additionally, generalize the struct name for the lane configuration that had been added for Kaanapali and use it for SM8750 as well as they share the settings. Signed-off-by: Hangxiang Ma --- .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 5 +- drivers/media/platform/qcom/camss/camss.c | 125 +++++++++++++++++= ++++ 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/dri= vers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index c51ffcd93ce1..5b633786314a 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c @@ -684,7 +684,7 @@ csiphy_lane_regs lane_regs_sm8650[] =3D { {0x0c10, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, }; =20 -/* 3nm 2PH v 2.4.0 2p5Gbps 4 lane DPHY mode */ +/* 3nm 2PH v 2.3.0/2.4.0 2p5Gbps 4 lane DPHY mode */ static const struct csiphy_lane_regs lane_regs_2_4_0[] =3D { /* LN 0 */ @@ -1135,6 +1135,7 @@ static bool csiphy_is_gen2(u32 version) case CAMSS_845: case CAMSS_8550: case CAMSS_8650: + case CAMSS_8750: case CAMSS_8775P: case CAMSS_KAANAPALI: case CAMSS_X1E80100: @@ -1252,7 +1253,9 @@ static int csiphy_init(struct csiphy_device *csiphy) regs->lane_regs =3D &lane_regs_sa8775p[0]; regs->lane_array_size =3D ARRAY_SIZE(lane_regs_sa8775p); break; + case CAMSS_8750: case CAMSS_KAANAPALI: + /* CSPHY v2.4.0 is backward compatible with v2.3.0 settings */ regs->lane_regs =3D &lane_regs_2_4_0[0]; regs->lane_array_size =3D ARRAY_SIZE(lane_regs_2_4_0); regs->offset =3D 0x1000; diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 0b524b615a94..e27e12c08443 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4248,6 +4248,129 @@ static const struct resources_icc icc_res_sa8775p[]= =3D { }, }; =20 +static const struct camss_subdev_resources csiphy_res_8750[] =3D { + /* CSIPHY0 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy0-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy0-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy0", "csiphy0_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy0" }, + .interrupt =3D { "csiphy0" }, + .csiphy =3D { + .id =3D 0, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY1 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy1-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy1-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy1", "csiphy1_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy1" }, + .interrupt =3D { "csiphy1" }, + .csiphy =3D { + .id =3D 1, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY2 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy2-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy2-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy2", "csiphy2_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy2" }, + .interrupt =3D { "csiphy2" }, + .csiphy =3D { + .id =3D 2, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY3 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy3-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy3-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy3", "csiphy3_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy3" }, + .interrupt =3D { "csiphy3" }, + .csiphy =3D { + .id =3D 3, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY4 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy4-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy4-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy4", "csiphy4_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy4" }, + .interrupt =3D { "csiphy4" }, + .csiphy =3D { + .id =3D 4, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY5 */ + { + .regulators =3D { + { .supply =3D "vdd-csiphy5-0p9", .init_load_uA =3D 148000 }, + { .supply =3D "vdd-csiphy5-1p2", .init_load_uA =3D 14660 } + }, + .clock =3D { "csiphy5", "csiphy5_timer", + "cpas_ahb", "cpas_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy5" }, + .interrupt =3D { "csiphy5" }, + .csiphy =3D { + .id =3D 5, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, +}; + static const struct resources_icc icc_res_sm8750[] =3D { { .name =3D "cam_ahb", @@ -5687,7 +5810,9 @@ static const struct camss_resources sm8650_resources = =3D { static const struct camss_resources sm8750_resources =3D { .version =3D CAMSS_8750, .pd_name =3D "top", + .csiphy_res =3D csiphy_res_8750, .icc_res =3D icc_res_sm8750, + .csiphy_num =3D ARRAY_SIZE(csiphy_res_8750), .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), }; =20 --=20 2.34.1 From nobody Mon Feb 9 19:10:42 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 977EC33F36B for ; Tue, 20 Jan 2026 06:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891395; cv=none; b=IUE3DRu/gmuczruCxYZJiMcu84fGculoRwSb0UImDtzv7ph8/Ws9oRH4ZDr0HKIF7jXi1PjPtH4xzN4nD91KnCQnoLvAr8b/ei4TjgGrzIx/X+gDD9jQJ9OJvDw7qILidUdujEyhzIMRxx72tYej71cRAyzqDVAska6Seu+V4qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891395; c=relaxed/simple; bh=9g520eSOBq4YWFXzqPBs07vjDNR9VFrADLDT8eVrklI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UWHrDrYUa8vaQMuluqwDj4kIVX2QnlmI83hla+NdWMeULdlbQjCZ80CJXt7e7TKgpI4Dd9CcJ0n5PBc+IDGc9f1kzPwwKYci51P1cFVS5saI/QrU561Sr2Xd5372ryXhOHHbOHmWyVgfOlwIJuVVN3cFX3VnGkaFo9K8oWXAMdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=PBAS+CX0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JrV7unvc; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="PBAS+CX0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JrV7unvc" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60K6MI1P1661133 for ; Tue, 20 Jan 2026 06:43:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= c4TkAOk6aM+Vd9aJwI2liQAn5WMjTsTsCtjMSrKVJPg=; b=PBAS+CX04zdPx8uh J0LmvR4cwwAV9+hgPVRgBSWZTPMgmlXl6JIB5qLOyf/PgPVsf1hrs1oApF+9Zydq aGStyvLSylZSlvpQhdvSgB4nqg4msuXcHXCZSkktjKFfJetLx4u5Is9KqEg7dVff nWz4OsENgEl0d7WH2xI1UgYaA6SmXpCEEWwO3fqv+ferihLuYLfOYyAdCkG6RWrk YKjx5npiSuFYFe33oFTzBjjC6W6cXG+7SzA69mhc2aUtUvFiXTwqp+tNCjZZYZlt DhDRwak27duEY80XTS8JrGORxCWUJW4ht196Iko1j2vZBd96LRQbydcCTHoN2bou jAfHvQ== Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bsjvdtsp0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 20 Jan 2026 06:43:05 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-123349958b2so7331161c88.0 for ; Mon, 19 Jan 2026 22:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768891385; x=1769496185; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=c4TkAOk6aM+Vd9aJwI2liQAn5WMjTsTsCtjMSrKVJPg=; b=JrV7unvcsekjb2midmMLe+liWdsUS3WIMLVjUPIiBCyx50ajO9wKeNZWJwos1Ged6G AlqkB77KWEaLmEF60VGkqRcvdCxjDcyV7zN+uD1/fy1nH5CYY3mm5Xib2xHRaUS9pnfY 3D8fXYVFZsPIC4VjYePyjaNgAPEK7RIbSiBD0CzMvaeRxAW84PElTPmld9kQQBdQffgS gqhoL6tEVEpOtM/sT8KvTTKA02WU9P9AtILNgScA7P5LKaEOSJHzofkOS5NqFS9K2k5C /dxuupfYyq+O1Ad90qVYKkHclU4qdy/IL8zqv24l5Ry3cEhSQ9DVNlc4X/QbpV5O2CK5 9xjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768891385; x=1769496185; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=c4TkAOk6aM+Vd9aJwI2liQAn5WMjTsTsCtjMSrKVJPg=; b=Brn7H0mMDqicJIavHdiresKjz9a3MZhrRfiJH3NORjMEQmRutnkPPZJI0XsMM8ZwmN L5Ggr9vJm8by712NSOyBW/QtpAKN5v0wWqMACA0UK6L3dv1hMyfIy+GZPUSYuGtwWgyP wojho+leNzrheJjZh03hOy8A04cVnm2prBR+YR4hurWtGuCKp/EB9tpeCRI3pm6gup20 K4s/pq5ziH8TXuonTXkF6gpVu6VBeoDEzUaJR3T2wdKi/h6O780303MR4Bmx5lABtAB/ pNj/QxSV8+PKYUzUGbRJUSEmUlYrOuc0Lm1p72UIPwOIPdEu7e3PgjhUGRILbAUau8l1 Mu5A== X-Forwarded-Encrypted: i=1; AJvYcCVV/GcZuv92XW7hCjArgj2Yaavcf0MsVw8WMW/dXuVbjpawZF9uLkwO1r7y8hlLUNSbTDY8l1IuvZor4E8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+te3A+Z52P/85gnh9MKDk3dg4aT1QGEeF1kYACLW5BO7CHL0l nMVddqj0Vdt+9dwm0qHHoOWRY6QPEQChJytvdY37qZorzXGH5eAuRfgU9nMVd7kofsJ/e6QpUsH nJ5k+HJls7cc5XoVn5Os884J39hIhdLC2Au+8PPppddFaFrPaRNt9Pmi7Tzhwxf8ha5/d4bZOvU Xt6g== X-Gm-Gg: AY/fxX429Ym1K23FTW0NJeNQf+xexc5aq5dCqpSxNPDe21kn+I5vXeLecfD+852Ph/6 oGs6I7aK08vZq2NiVe/isIYeOnmUyeXURwXRewd8hDQrjLSPR1IQE3PTXuSjHkIRzoNxAXOj6vI A4ySFkLX+FPwC9foZMpt9RdDiFqMSXeOXrp9kdpzaSe0JRYpEjCjB7BkMLZb+KwrAqwYuTq3ZQb Iy6UTYG5gaErrwAoU7YzaAF3ld1RoAmNli9l2LF3h4Lev1PH8VlbACPmh++T9Fwlk/55XMynViv y043MdmEmHsBag7GnuXWRwHvczOdWRlF416dCOH+2qGby7PEaqK+Jyt+ekje0W/2Ya4wohJvCh7 gg+MJj5SKPc2FipJiZQ3RNIecVAxRQwfiNl7Smz1djFjlpFAhchwrV2VdwepIY/wy X-Received: by 2002:a05:7022:6988:b0:119:e56b:9580 with SMTP id a92af1059eb24-1244a71826fmr10050701c88.5.1768891384344; Mon, 19 Jan 2026 22:43:04 -0800 (PST) X-Received: by 2002:a05:7022:6988:b0:119:e56b:9580 with SMTP id a92af1059eb24-1244a71826fmr10050686c88.5.1768891383697; Mon, 19 Jan 2026 22:43:03 -0800 (PST) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ad7201fsm19128658c88.7.2026.01.19.22.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 22:43:03 -0800 (PST) From: Hangxiang Ma Date: Mon, 19 Jan 2026 22:42:54 -0800 Subject: [PATCH RESEND v2 4/5] media: qcom: camss: csid: Add support for CSID 980 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-add-support-for-camss-on-sm8750-v2-4-3e06583a0a81@oss.qualcomm.com> References: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> In-Reply-To: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeyaprakash.soundrapandian@oss.qualcomm.com, Vijay Kumar Tumati , Hangxiang Ma , Atiya Kailany X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: FDoC3-7pnCcBSj8gVI2Ywb90n5QfeBAK X-Authority-Analysis: v=2.4 cv=U92fzOru c=1 sm=1 tr=0 ts=696f23f9 cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=63CfXtnvIBONjkcrFHoA:9 a=Z-sH2BZsVlbqz-yA:21 a=QEXdDO2ut3YA:10 a=Fk4IpSoW4aLDllm1B1p-:22 X-Proofpoint-GUID: FDoC3-7pnCcBSj8gVI2Ywb90n5QfeBAK X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIwMDA1NCBTYWx0ZWRfX/iGa0x1kuc7z M41hY2ATEfeQvB+9+Vl4rLDmNWef6bxO400Nlv6hFO5QYSyG+PDFzEdyxFyJpYqIV/RnkBjtRTd AIIX/f6Yq4VJpe8kNfpsFB0lZ18I8ZZJqJNH8StoOgHcHu4imoEFMQA16UJ5FndYFnwW1wmSc/3 gY2xfJ4Grig0UupGmwfO39bOPAOGKjZL5iL9CqqZ9fDIrWMaBSNbt38MaGeM4VhzkEYI19fygqX pE1ubqhwU4SslEUWaw5LTciI9fkgMqvD7THmTKaLkgG0bUDjN3FYKCmAcUVBRD++zlb8tvhvTRJ YTaJKayKr5HI+q3eXN1sAUwpq0ziAFUSic00jSjcZt41MHmToCjBDR0+qVHMWRh4JIsic0htO94 7Mgy+mtxfp8wTHRv5I9cR4FziSahoUeVLnE44d7x+LFJIX0wOqub6aVj67Atv3FVHMFU1bgRgmp GBPbJEDYhKOvNrKO8fA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-20_01,2026-01-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601200054 Add more detailed resource information for CSID devices along with the driver for CSID 980 that is responsible for CSID register configuration, module reset and IRQ handling for BUF_DONE events. In SM8750, RUP and AUP updates for the CSID Full modules are split into two registers along with a SET register. However, CSID Lite modules still use a single register to update RUP and AUP without the additional SET register. Handled such differences in the driver. Co-developed-by: Atiya Kailany Signed-off-by: Atiya Kailany Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-csid-980.c | 442 +++++++++++++++++= ++++ drivers/media/platform/qcom/camss/camss-csid.h | 1 + drivers/media/platform/qcom/camss/camss.c | 75 ++++ 4 files changed, 519 insertions(+) diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/pla= tform/qcom/camss/Makefile index ed8001ef90a6..45fd7fee59ba 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -8,6 +8,7 @@ qcom-camss-objs +=3D \ camss-csid-4-7.o \ camss-csid-340.o \ camss-csid-680.o \ + camss-csid-980.o \ camss-csid-gen2.o \ camss-csid-gen3.o \ camss-csid-gen4.o \ diff --git a/drivers/media/platform/qcom/camss/camss-csid-980.c b/drivers/m= edia/platform/qcom/camss/camss-csid-980.c new file mode 100644 index 000000000000..87d26a18081d --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-csid-980.c @@ -0,0 +1,442 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * camss-csid-980.c + * + * Qualcomm MSM Camera Subsystem - CSID (CSI Decoder) Module + * + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ +#include +#include +#include +#include +#include +#include +#include "camss.h" +#include "camss-csid.h" +#include "camss-csid-gen3.h" + +/* Reset and Command Registers */ +#define CSID_RST_CFG 0xC +#define RST_MODE BIT(0) +#define RST_LOCATION BIT(4) + +/* Reset and Command Registers */ +#define CSID_RST_CMD 0x10 +#define SELECT_HW_RST BIT(0) +#define SELECT_IRQ_RST BIT(2) +#define CSID_IRQ_CMD 0x14 +#define IRQ_CMD_CLEAR BIT(0) + +/* Register Update Commands, RUP/AUP */ +#define CSID_RUP_CMD 0x18 +#define CSID_AUP_CMD 0x1C +#define CSID_RUP_AUP_RDI(rdi) (BIT(8) << (rdi)) +#define CSID_RUP_AUP_CMD 0x20 +#define RUP_SET BIT(0) +#define MUP BIT(4) + +#define CSID_LITE_RUP_AUP_CMD 0x18 +#define CSID_LITE_RUP_RDI(rdi) (BIT(4) << (rdi)) +#define CSID_LITE_AUP_RDI(rdi) (BIT(20) << (rdi)) + +/* Top level interrupt registers */ +#define CSID_TOP_IRQ_STATUS (csid_is_lite(csid) ? 0x7C : 0x84) +#define CSID_TOP_IRQ_MASK (csid_is_lite(csid) ? 0x80 : 0x88) +#define CSID_TOP_IRQ_CLEAR (csid_is_lite(csid) ? 0x84 : 0x8C) +#define CSID_TOP_IRQ_SET (csid_is_lite(csid) ? 0x88 : 0x90) +#define INFO_RST_DONE BIT(0) +#define CSI2_RX_IRQ_STATUS BIT(2) +#define BUF_DONE_IRQ_STATUS BIT(csid_is_lite(csid) ? 13 : 3) + +/* Buffer done interrupt registers */ +#define CSID_BUF_DONE_IRQ_STATUS (csid_is_lite(csid) ? 0x8C : 0xA4) +#define BUF_DONE_IRQ_STATUS_RDI_OFFSET (csid_is_lite(csid) ? 1 : 16) +#define CSID_BUF_DONE_IRQ_MASK (csid_is_lite(csid) ? 0x90 : 0xA8) +#define CSID_BUF_DONE_IRQ_CLEAR (csid_is_lite(csid) ? 0x94 : 0xAC) +#define CSID_BUF_DONE_IRQ_SET (csid_is_lite(csid) ? 0x98 : 0xB0) + +/* CSI2 RX interrupt registers */ +#define CSID_CSI2_RX_IRQ_STATUS (csid_is_lite(csid) ? 0x9C : 0xB4) +#define CSID_CSI2_RX_IRQ_MASK (csid_is_lite(csid) ? 0xA0 : 0xB8) +#define CSID_CSI2_RX_IRQ_CLEAR (csid_is_lite(csid) ? 0xA4 : 0xBC) +#define CSID_CSI2_RX_IRQ_SET (csid_is_lite(csid) ? 0xA8 : 0xC0) + +/* CSI2 RX Configuration */ +#define CSID_CSI2_RX_CFG0 (csid_is_lite(csid) ? 0x200 : 0x400) +#define CSI2_RX_CFG0_NUM_ACTIVE_LANES 0 +#define CSI2_RX_CFG0_DL0_INPUT_SEL 4 +#define CSI2_RX_CFG0_PHY_NUM_SEL 20 +#define CSID_CSI2_RX_CFG1 (csid_is_lite(csid) ? 0x204 : 0x404) +#define CSI2_RX_CFG1_ECC_CORRECTION_EN BIT(0) +#define CSI2_RX_CFG1_VC_MODE BIT(2) + +#define MSM_CSID_MAX_SRC_STREAMS_980 (csid_is_lite(csid) ? 4 : 5) + +#define CSID_RDI_CFG0(rdi) \ + ({ \ + __typeof__(rdi) _rdi =3D (rdi); \ + csid_is_lite(csid) ? 0x500 + 0x100 * _rdi : \ + 0xE00 + 0x200 * _rdi; \ + }) +#define RDI_CFG0_RETIME_BS BIT(5) +#define RDI_CFG0_TIMESTAMP_EN BIT(6) +#define RDI_CFG0_TIMESTAMP_STB_SEL BIT(8) +#define RDI_CFG0_DECODE_FORMAT 12 +#define RDI_CFG0_DT 16 +#define RDI_CFG0_VC 22 +#define RDI_CFG0_DT_ID 27 +#define RDI_CFG0_EN BIT(31) + +/* RDI Control and Configuration */ +#define CSID_RDI_CTRL(rdi) \ + ({ \ + __typeof__(rdi) _rdi =3D (rdi); \ + csid_is_lite(csid) ? 0x504 + 0x100 * _rdi : \ + 0xE04 + 0x200 * _rdi; \ + }) +#define RDI_CTRL_START_CMD BIT(0) + +#define CSID_RDI_CFG1(rdi) \ + ({ \ + __typeof__(rdi) _rdi =3D (rdi); \ + csid_is_lite(csid) ? 0x510 + 0x100 * _rdi : \ + 0xE10 + 0x200 * _rdi; \ + }) +#define RDI_CFG1_DROP_H_EN BIT(5) +#define RDI_CFG1_DROP_V_EN BIT(6) +#define RDI_CFG1_CROP_H_EN BIT(7) +#define RDI_CFG1_CROP_V_EN BIT(8) +#define RDI_CFG1_PACKING_FORMAT_MIPI BIT(15) + +/* RDI Pixel Store Configuration */ +#define CSID_RDI_PIX_STORE_CFG0(rdi) (0xE14 + 0x200 * (rdi)) +#define RDI_PIX_STORE_CFG0_EN BIT(0) +#define RDI_PIX_STORE_CFG0_MIN_HBI 1 + +/* RDI IRQ Status in wrapper */ +#define CSID_CSI2_RDIN_IRQ_STATUS(rdi) \ + (csid_is_lite(csid) ? 0xEC : 0x114 + 0x10 * (rdi)) +#define CSID_CSI2_RDIN_IRQ_CLEAR(rdi) \ + (csid_is_lite(csid) ? 0xF4 : 0x11C + 0x10 * (rdi)) +#define INFO_RUP_DONE BIT(23) + +static void __csid_full_aup_rup_trigger(struct csid_device *csid) +{ + /* trigger SET in combined register */ + writel(RUP_SET, csid->base + CSID_RUP_AUP_CMD); +} + +static void __csid_aup_update(struct csid_device *csid, int port_id) +{ + if (csid_is_lite(csid)) { + /* CSID Lites in v980 follow the legacy way of a combined RUP + * and AUP commands without an explicit SET register. + */ + csid->reg_update |=3D CSID_LITE_AUP_RDI(port_id); + writel(csid->reg_update, csid->base + CSID_LITE_RUP_AUP_CMD); + } else { + csid->aup_update |=3D CSID_RUP_AUP_RDI(port_id); + writel(csid->aup_update, csid->base + CSID_AUP_CMD); + + /* CSID Fulls in v980 split AUP and RUP commands, which requires + * additional SET operation to make registers modification take + * effect. + */ + __csid_full_aup_rup_trigger(csid); + } +} + +static void __csid_rup_update(struct csid_device *csid, int port_id) +{ + if (csid_is_lite(csid)) { + /* CSID Lites in v980 follow the legacy way of a combined RUP + * and AUP commands without an explicit SET register. + */ + csid->reg_update |=3D CSID_LITE_RUP_RDI(port_id); + writel(csid->reg_update, csid->base + CSID_LITE_RUP_AUP_CMD); + } else { + csid->rup_update |=3D CSID_RUP_AUP_RDI(port_id); + writel(csid->rup_update, csid->base + CSID_RUP_CMD); + + /* CSID Fulls in v980 split AUP and RUP commands, which requires + * additional SET operation to make registers modification take + * effect. + */ + __csid_full_aup_rup_trigger(csid); + } +} + +static void __csid_aup_rup_clear(struct csid_device *csid, int port_id) +{ + /* Hardware clears the registers upon consuming the settings */ + if (csid_is_lite(csid)) { + csid->reg_update &=3D ~CSID_LITE_RUP_RDI(port_id); + csid->reg_update &=3D ~CSID_LITE_AUP_RDI(port_id); + } else { + csid->aup_update &=3D ~CSID_RUP_AUP_RDI(port_id); + csid->rup_update &=3D ~CSID_RUP_AUP_RDI(port_id); + } +} + +static void __csid_configure_rx(struct csid_device *csid, + struct csid_phy_config *phy) +{ + int val; + + val =3D (phy->lane_cnt - 1) << CSI2_RX_CFG0_NUM_ACTIVE_LANES; + val |=3D phy->lane_assign << CSI2_RX_CFG0_DL0_INPUT_SEL; + val |=3D (phy->csiphy_id + CSI2_RX_CFG0_PHY_SEL_BASE_IDX) + << CSI2_RX_CFG0_PHY_NUM_SEL; + writel(val, csid->base + CSID_CSI2_RX_CFG0); + + val =3D CSI2_RX_CFG1_ECC_CORRECTION_EN; + writel(val, csid->base + CSID_CSI2_RX_CFG1); +} + +static void __csid_configure_rx_vc(struct csid_device *csid, int vc) +{ + int val; + + if (vc > 3) { + val =3D readl(csid->base + CSID_CSI2_RX_CFG1); + val |=3D CSI2_RX_CFG1_VC_MODE; + writel(val, csid->base + CSID_CSI2_RX_CFG1); + } +} + +static void __csid_ctrl_rdi(struct csid_device *csid, int enable, u8 rdi) +{ + int val =3D 0; + u32 rdi_ctrl_offset =3D CSID_RDI_CTRL(rdi); + + if (enable) + val =3D RDI_CTRL_START_CMD; + + writel(val, csid->base + rdi_ctrl_offset); +} + +static void __csid_configure_rdi_pix_store(struct csid_device *csid, u8 rd= i) +{ + u32 val; + + /* Configure pixel store to allow absorption of hblanking or idle time. + * This helps with horizontal crop and prevents line buffer conflicts. + * Reset state is 0x8 which has MIN_HBI=3D4, we keep the default MIN_HBI + * and just enable the pixel store functionality. + */ + val =3D (4 << RDI_PIX_STORE_CFG0_MIN_HBI) | RDI_PIX_STORE_CFG0_EN; + writel(val, csid->base + CSID_RDI_PIX_STORE_CFG0(rdi)); +} + +static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enabl= e, u8 vc) +{ + u32 val; + u8 lane_cnt =3D csid->phy.lane_cnt; + + /* Source pads matching RDI channels on hardware. + * E.g. Pad 1 -> RDI0, Pad 2 -> RDI1, etc. + */ + struct v4l2_mbus_framefmt *input_format =3D &csid->fmt[MSM_CSID_PAD_FIRST= _SRC + vc]; + const struct csid_format_info *format =3D csid_get_fmt_entry(csid->res->f= ormats->formats, + csid->res->formats->nformats, + input_format->code); + + if (!lane_cnt) + lane_cnt =3D 4; + + /* + * DT_ID is a two bit bitfield that is concatenated with + * the four least significant bits of the five bit VC + * bitfield to generate an internal CID value. + * + * CSID_RDI_CFG0(vc) + * DT_ID : 28:27 + * VC : 26:22 + * DT : 21:16 + * + * CID : VC 3:0 << 2 | DT_ID 1:0 + */ + u8 dt_id =3D vc & 0x03; + u32 rdi_cfg0_offset =3D CSID_RDI_CFG0(vc); + u32 rdi_cfg1_offset =3D CSID_RDI_CFG1(vc); + u32 rdi_ctrl_offset =3D CSID_RDI_CTRL(vc); + + val =3D RDI_CFG0_TIMESTAMP_EN; + val |=3D RDI_CFG0_TIMESTAMP_STB_SEL; + val |=3D RDI_CFG0_RETIME_BS; + + /* note: for non-RDI path, this should be format->decode_format */ + val |=3D DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT; + val |=3D vc << RDI_CFG0_VC; + val |=3D format->data_type << RDI_CFG0_DT; + val |=3D dt_id << RDI_CFG0_DT_ID; + writel(val, csid->base + rdi_cfg0_offset); + + val =3D RDI_CFG1_PACKING_FORMAT_MIPI; + writel(val, csid->base + rdi_cfg1_offset); + + /* Configure pixel store using dedicated register in 980 */ + if (!csid_is_lite(csid)) + __csid_configure_rdi_pix_store(csid, vc); + + val =3D 0; + writel(val, csid->base + rdi_ctrl_offset); + + val =3D readl(csid->base + rdi_cfg0_offset); + + if (enable) + val |=3D RDI_CFG0_EN; + + writel(val, csid->base + rdi_cfg0_offset); +} + +static void csid_configure_stream_980(struct csid_device *csid, u8 enable) +{ + u8 vc, i; + + __csid_configure_rx(csid, &csid->phy); + + for (vc =3D 0; vc < MSM_CSID_MAX_SRC_STREAMS_980; vc++) { + if (csid->phy.en_vc & BIT(vc)) { + __csid_configure_rdi_stream(csid, enable, vc); + __csid_configure_rx_vc(csid, vc); + + for (i =3D 0; i < CAMSS_INIT_BUF_COUNT; i++) { + __csid_aup_update(csid, vc); + __csid_rup_update(csid, vc); + } + + __csid_ctrl_rdi(csid, enable, vc); + } + } +} + +static int csid_configure_testgen_pattern_980(struct csid_device *csid, + s32 val) +{ + return 0; +} + +static void csid_subdev_reg_update_980(struct csid_device *csid, int port_= id, + bool clear) +{ + if (clear) + __csid_aup_rup_clear(csid, port_id); + else + __csid_aup_update(csid, port_id); +} + +/** + * csid_isr - CSID module interrupt service routine + * @irq: Interrupt line + * @dev: CSID device + * + * Return IRQ_HANDLED on success + */ +static irqreturn_t csid_isr_980(int irq, void *dev) +{ + struct csid_device *csid =3D dev; + u32 val, buf_done_val; + u8 reset_done; + int i; + + val =3D readl(csid->base + CSID_TOP_IRQ_STATUS); + writel(val, csid->base + CSID_TOP_IRQ_CLEAR); + + reset_done =3D val & INFO_RST_DONE; + + buf_done_val =3D readl(csid->base + CSID_BUF_DONE_IRQ_STATUS); + writel(buf_done_val, csid->base + CSID_BUF_DONE_IRQ_CLEAR); + + for (i =3D 0; i < MSM_CSID_MAX_SRC_STREAMS_980; i++) { + if (csid->phy.en_vc & BIT(i)) { + val =3D readl(csid->base + CSID_CSI2_RDIN_IRQ_STATUS(i)); + writel(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(i)); + + if (val & INFO_RUP_DONE) + csid_subdev_reg_update_980(csid, i, true); + + if (buf_done_val & BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i)) + camss_buf_done(csid->camss, csid->id, i); + } + } + + val =3D IRQ_CMD_CLEAR; + writel(val, csid->base + CSID_IRQ_CMD); + + if (reset_done) + complete(&csid->reset_complete); + + return IRQ_HANDLED; +} + +/** + * csid_reset - Trigger reset on CSID module and wait to complete + * @csid: CSID device + * + * Return 0 on success or a negative error code otherwise + */ +static int csid_reset_980(struct csid_device *csid) +{ + unsigned long time; + u32 val; + int i; + + reinit_completion(&csid->reset_complete); + + val =3D INFO_RST_DONE | BUF_DONE_IRQ_STATUS; + writel(val, csid->base + CSID_TOP_IRQ_CLEAR); + writel(val, csid->base + CSID_TOP_IRQ_MASK); + + val =3D 0; + for (i =3D 0; i < MSM_CSID_MAX_SRC_STREAMS_980; i++) { + if (csid->phy.en_vc & BIT(i)) { + /* + * Only need to clear buf done IRQ status here, + * RUP done IRQ status will be cleared once isr + * strobe generated by CSID_RST_CMD + */ + val |=3D BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i); + } + } + writel(val, csid->base + CSID_BUF_DONE_IRQ_CLEAR); + writel(val, csid->base + CSID_BUF_DONE_IRQ_MASK); + + /* Clear all IRQ status with CLEAR bits set */ + val =3D IRQ_CMD_CLEAR; + writel(val, csid->base + CSID_IRQ_CMD); + + val =3D RST_LOCATION | RST_MODE; + writel(val, csid->base + CSID_RST_CFG); + + val =3D SELECT_HW_RST | SELECT_IRQ_RST; + writel(val, csid->base + CSID_RST_CMD); + + time =3D wait_for_completion_timeout(&csid->reset_complete, + msecs_to_jiffies(CSID_RESET_TIMEOUT_MS)); + + if (!time) { + dev_err(csid->camss->dev, "CSID reset timeout\n"); + return -ETIMEDOUT; + } + + return 0; +} + +static void csid_subdev_init_980(struct csid_device *csid) +{ + csid->testgen.nmodes =3D CSID_PAYLOAD_MODE_DISABLED; +} + +const struct csid_hw_ops csid_ops_980 =3D { + .configure_stream =3D csid_configure_stream_980, + .configure_testgen_pattern =3D csid_configure_testgen_pattern_980, + .hw_version =3D csid_hw_version, + .isr =3D csid_isr_980, + .reset =3D csid_reset_980, + .src_pad_code =3D csid_src_pad_code, + .subdev_init =3D csid_subdev_init_980, + .reg_update =3D csid_subdev_reg_update_980, +}; + diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media= /platform/qcom/camss/camss-csid.h index 75a113050eb1..7a3de10a2a88 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.h +++ b/drivers/media/platform/qcom/camss/camss-csid.h @@ -223,6 +223,7 @@ extern const struct csid_hw_ops csid_ops_4_1; extern const struct csid_hw_ops csid_ops_4_7; extern const struct csid_hw_ops csid_ops_340; extern const struct csid_hw_ops csid_ops_680; +extern const struct csid_hw_ops csid_ops_980; extern const struct csid_hw_ops csid_ops_gen2; extern const struct csid_hw_ops csid_ops_gen3; extern const struct csid_hw_ops csid_ops_gen4; diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index e27e12c08443..005f9a243ee1 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4371,6 +4371,79 @@ static const struct camss_subdev_resources csiphy_re= s_8750[] =3D { }, }; =20 +static const struct camss_subdev_resources csid_res_8750[] =3D { + /* CSID0 */ + { + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid0" }, + .interrupt =3D { "csid0" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_980, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID1 */ + { + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid1" }, + .interrupt =3D { "csid1" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_980, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID2 */ + { + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid2" }, + .interrupt =3D { "csid2" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_980, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID_LITE0 */ + { + .clock =3D { "vfe_lite_csid", "vfe_lite_cphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid_lite0" }, + .interrupt =3D { "csid_lite0" }, + .csid =3D { + .is_lite =3D true, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_980, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID_LITE1 */ + { + .clock =3D { "vfe_lite_csid", "vfe_lite_cphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid_lite1" }, + .interrupt =3D { "csid_lite1" }, + .csid =3D { + .is_lite =3D true, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_980, + .formats =3D &csid_formats_gen2 + } + } +}; + static const struct resources_icc icc_res_sm8750[] =3D { { .name =3D "cam_ahb", @@ -5811,8 +5884,10 @@ static const struct camss_resources sm8750_resources= =3D { .version =3D CAMSS_8750, .pd_name =3D "top", .csiphy_res =3D csiphy_res_8750, + .csid_res =3D csid_res_8750, .icc_res =3D icc_res_sm8750, .csiphy_num =3D ARRAY_SIZE(csiphy_res_8750), + .csid_num =3D ARRAY_SIZE(csid_res_8750), .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), }; =20 --=20 2.34.1 From nobody Mon Feb 9 19:10:42 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA58836D4E3 for ; Tue, 20 Jan 2026 06:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891399; cv=none; b=bMPHD+d3pyzD5MOVJ9KHXeLT2l9lxBpCKnbQWPi5k1DrRziqT/vFeQX/fa/CHLiMgT0SpSmBWcl+p6Gqtf+GQmt94bgYb2GK93kELLSTbEcnjdIdG6Ng/acKQOktrmghcR58wll6qi25bpJ3Cd5uWpT3v0ZRQ2XOu1bSRpvPsRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768891399; c=relaxed/simple; bh=4xfEYBLIIh/QJTSywXNdacMhkuJaXkgcsUCelou2GvI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r0wqCRBYVEEo8R6hIaTqvfLxYaCmGqILP+IdULCzSz6sUQZRp4WnW9zXysJaZgu7LWSu5WSZPOXoQAdp1XJrcbmy7MJNFyNlvoPL3tVfpVwe/t7eCdkKlqLPmIm5p2385iIbuwV3rge7JfOHDZgz/j7Y8GPX+2yQzn/8QZvvago= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=VzXY1gIz; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VPwu4fRZ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="VzXY1gIz"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VPwu4fRZ" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60JNQcSS3709998 for ; Tue, 20 Jan 2026 06:43:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Jw+wFa2Yd9QkFT6uBSJrnCvNpSFlYBtwouvuaI15GXk=; b=VzXY1gIzLEHPbzxw nGcaNdY8lpj7auVz1VRgpnBexchuDecStm8mo5pLyEThNGKlzaGbjOSTQ1bV2ImE LPIwba8Y4HvMYEeVHu8jV/R2tGkokEj5bObARHsLBz2IDHwpzJG2dNlpUT0d6zEl v8HRGSeai/mmKYeCMuQyUbSXvxU43RjMpO/zVUJQmKElZmeTmZoPJQoN8dBvX4fo 137//SemPSzUVS9L5YfLxJQR4B5F48vLAMUkE3eGUyB3nNh4pOq6CNzHpECH0cuU rGQRaYbboxLIOsbouktsT0BVXQ3KOHhEnZtFR8rAjdTyQbItLLU73AsfbO1bgUGR /XWh7Q== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bsgmubb3b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 20 Jan 2026 06:43:06 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2b0588c6719so4154130eec.0 for ; Mon, 19 Jan 2026 22:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768891386; x=1769496186; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Jw+wFa2Yd9QkFT6uBSJrnCvNpSFlYBtwouvuaI15GXk=; b=VPwu4fRZgNW9yvSvrcCkLmb0eX+t4Y9i9D12y0LS0QsI8BXSsC1s0a+wui83mf7aBY 3aD3pBsKn08xDmCoACzLgbN/XxlkcCy9yVzZL6g7FgI4IDqEEPb14q7kFBuIla/Fcgwi Ro4PX66kmBhoo9pG+2Q6Gh8AQZPztNjHFYrTWlVf4xVOnnfQD+0Tfc2tOcZ/RfGxTJal IAb4gC+8rtcqLOygAgaMhsUwB6z4qnctoZI211FKkbQw+9HZejRzuldYYpkB8zOsH+1L I3cWaIQm5DOutAUU9qnlxvNMdF/1tw08hgsfe3VoZLSHLM7AuLNFlcYqwCvd09wvSPu2 Jtdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768891386; x=1769496186; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Jw+wFa2Yd9QkFT6uBSJrnCvNpSFlYBtwouvuaI15GXk=; b=uomoDOt4S5b2kxM0fnarlPo8AVgrFtsNaGCRFkTH3Tm7e1VgNZtqExs8u0b1jt3AxD VdCv8JBDp9F5kRPT+48XR6r5UpFQwp+BvXNHDJlRAsSsKPFyXm5bOQhUc5YMDHlAkd05 US6bO65r+k/CjxRmWwRU9kXTZ5Hz7Gr5MfCV7xD6O6g0Cb7txB5kxxS5gcA4R7dpAcQX YZEBsL2gpOcZtuxJI2HfLEZjnhe050bCt94PVWtOk8bmVq27RpkEAcfqrodBPEEa6DN+ 3b3XHmMu/wrCmh5anD7SoGxvoecUO6+TIPNLNmaOGDBhdWmvsU5ce3JN3M9dJPrbz8XK 8Q3A== X-Forwarded-Encrypted: i=1; AJvYcCV5wiyel7NYAWsnjtywHTKNINfZqXLwWE7GxoxyXsml7YkHbXNhlguWfcJTQQOIl4KM8oSqyaoWhy0niiQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwG3ddmhzPHTH4I1OYbqL/I7DFdJnyHzxOA5wdenvPPgkh6Bp/p Y4Vo/luBxmzxcNeLfcbldUAqCWuq2xZnddiMsPpMM1kfA4sSLTBB88C6h9qadQARF6QKD0ScGwd 4Y7sVS/nfp/JennJiC9OdSAHQ4+YuQ41cidGcGEINtul4pqe8SXO1f32bSNKAYoiVwO5r5ZB79z +SzQ== X-Gm-Gg: AY/fxX76WD20W/siKnqA4TWGwZSd7vAKGnVm2ptuh5eIDM+N69yKV4h8uuvbcgDhMvV IJ7R+ptvkB31WMwE8Tnd679XWDB1ni91k/m4y1K4vyti5qdXfUpPUsGowE+aQoPVF11QZEu5has +3UWtDGdD+YdL1bBelcVSX/jTZT2GSLjmlTkkRY2IPPUGUMufQAwFS9i9a1/BGiYB6KRvH6mXze s5EnO7x3/bMOFdLADcD9v7xKIyZ6ISm0ay2nLe4tT98hH6IfDaY+CGxf/wyiIipvn0WC2T2FIeq iIOxH29Y0N+pm7QvKTAJ+UZrBDIkIh3klaN5o73Dn920tAprabioCc2VTqsUJ3NJPRXJebQ2pRa Ho0DC7Bp2jD/j19iZbPuZQ+N/OVfAxe6z5WpHg87fW0QW2B+yOyDV+JTnsR+3eEWh X-Received: by 2002:a05:7022:6189:b0:11b:b471:dc8d with SMTP id a92af1059eb24-1233cfad056mr12767794c88.2.1768891385469; Mon, 19 Jan 2026 22:43:05 -0800 (PST) X-Received: by 2002:a05:7022:6189:b0:11b:b471:dc8d with SMTP id a92af1059eb24-1233cfad056mr12767770c88.2.1768891384874; Mon, 19 Jan 2026 22:43:04 -0800 (PST) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244ad7201fsm19128658c88.7.2026.01.19.22.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 22:43:04 -0800 (PST) From: Hangxiang Ma Date: Mon, 19 Jan 2026 22:42:55 -0800 Subject: [PATCH RESEND v2 5/5] media: qcom: camss: vfe: Add support for VFE 980 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-add-support-for-camss-on-sm8750-v2-5-3e06583a0a81@oss.qualcomm.com> References: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> In-Reply-To: <20260119-add-support-for-camss-on-sm8750-v2-0-3e06583a0a81@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeyaprakash.soundrapandian@oss.qualcomm.com, Vijay Kumar Tumati , Hangxiang Ma , Atiya Kailany X-Mailer: b4 0.14.3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIwMDA1NCBTYWx0ZWRfX8X236BBczX4F J7AdKCC1YpZPwuW3XZz8QQF89MROPexf2RmP6T9UijtVELfZNKFBw1jl5hrRohpMx0gl4QV+OSn PpmUkuJD+yE7X6RWKolReEbY9HOJG51mRdmb//cCzXd/U5Tvli2bLVv6jbl+HfapcKrgmNZoXZ9 tvL6CdnMF7oUVdlkSLhNcpKy1IQUyAgN5uJX7YoeVos1Eg5hSGyEdA52cf717KTkoo01wntrN1x GRdeSBiw4dCCLyOy5nBtdcM8p8QBUJnt3EsqA+4Nqh96N6QNouqQB5OCiomm9I3mMeVyQaO8YHL oSNpAyRIncakfyNzfii3Sb77jYw4KEgSR8HkrO0RwFyiV849dt1YczoNaXA7hpsCYxZiQklgDhR J4kOjMse/UOCnHeIHmywt+dk9D2Io+z8wicEsUDaNW4ZVPNbuebAHRhy9jj79rUcCjUSSmARjWs RvVeGYOeS97qAFQIFFw== X-Authority-Analysis: v=2.4 cv=Is4Tsb/g c=1 sm=1 tr=0 ts=696f23fa cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=3rR15nC7HOTWOJgZU7UA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: adDE_eOHSGEMH16NZwzfPcP8vc_7FFKo X-Proofpoint-GUID: adDE_eOHSGEMH16NZwzfPcP8vc_7FFKo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-20_01,2026-01-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601200054 Add support for Video Front End (VFE) that is on the SM8750 SoCs. VFE gen4 has support for VFE 980. This change limits SM8750 VFE output lines to 3 for now as constrained by the CAMSS driver framework. Reviewed-by: Bryan O'Donoghue Co-developed-by: Atiya Kailany Signed-off-by: Atiya Kailany Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/camss-vfe-gen4.c | 10 +- drivers/media/platform/qcom/camss/camss-vfe.c | 2 + drivers/media/platform/qcom/camss/camss.c | 135 +++++++++++++++++= ++++ 3 files changed, 144 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen4.c b/drivers/m= edia/platform/qcom/camss/camss-vfe-gen4.c index d73d70898710..46d8e61b9bac 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-gen4.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-gen4.c @@ -13,8 +13,12 @@ #include "camss.h" #include "camss-vfe.h" =20 -/* VFE-gen4 Bus Register Base Addresses */ -#define BUS_REG_BASE (vfe_is_lite(vfe) ? 0x800 : 0x1000) +#define IS_VFE_980(vfe) ((vfe)->camss->res->version =3D=3D CAMSS_8750) + +#define BUS_REG_BASE_980 (vfe_is_lite(vfe) ? 0x200 : 0x800) +#define BUS_REG_BASE_1080 (vfe_is_lite(vfe) ? 0x800 : 0x1000) +#define BUS_REG_BASE \ + (IS_VFE_980(vfe) ? BUS_REG_BASE_980 : BUS_REG_BASE_1080) =20 #define VFE_BUS_WM_CGC_OVERRIDE (BUS_REG_BASE + 0x08) #define WM_CGC_OVERRIDE_ALL (0x7FFFFFF) @@ -55,7 +59,7 @@ * DISPLAY_DS2_C 6 * FD_Y 7 * FD_C 8 - * PIXEL_RAW 9 + * RAW_OUT(1080)/IR_OUT(980) 9 * STATS_AEC_BG 10 * STATS_AEC_BHIST 11 * STATS_TINTLESS_BG 12 diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/= platform/qcom/camss/camss-vfe.c index 99630ffa1db5..fbde638db194 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -351,6 +351,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 = sink_code, case CAMSS_845: case CAMSS_8550: case CAMSS_8650: + case CAMSS_8750: case CAMSS_8775P: case CAMSS_KAANAPALI: case CAMSS_X1E80100: @@ -2014,6 +2015,7 @@ static int vfe_bpl_align(struct vfe_device *vfe) case CAMSS_845: case CAMSS_8550: case CAMSS_8650: + case CAMSS_8750: case CAMSS_8775P: case CAMSS_KAANAPALI: case CAMSS_X1E80100: diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 005f9a243ee1..1f6bacbbb202 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4444,6 +4444,139 @@ static const struct camss_subdev_resources csid_res= _8750[] =3D { } }; =20 +static const struct camss_subdev_resources vfe_res_8750[] =3D { + /* VFE0 - TFE Full */ + { + .clock =3D { "gcc_axi_hf", "vfe0_fast_ahb", "vfe0", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe0" }, + .interrupt =3D { "vfe0" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .reg_update_after_csid_config =3D true, + .has_pd =3D true, + .pd_name =3D "ife0", + .hw_ops =3D &vfe_ops_gen4, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE1 - TFE Full */ + { + .clock =3D { "gcc_axi_hf", "vfe1_fast_ahb", "vfe1", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe1" }, + .interrupt =3D { "vfe1" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .reg_update_after_csid_config =3D true, + .has_pd =3D true, + .pd_name =3D "ife1", + .hw_ops =3D &vfe_ops_gen4, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE2 - TFE Full */ + { + .clock =3D { "gcc_axi_hf", "vfe2_fast_ahb", "vfe2", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe2" }, + .interrupt =3D { "vfe2" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .reg_update_after_csid_config =3D true, + .has_pd =3D true, + .pd_name =3D "ife2", + .hw_ops =3D &vfe_ops_gen4, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE_LITE0 */ + { + .clock =3D { "gcc_axi_hf", "vfe_lite_ahb", "vfe_lite", + "camnoc_rt_vfe_lite", "camnoc_rt_axi", + "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 266666667, 400000000, 480000000 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe_lite0" }, + .interrupt =3D { "vfe_lite0" }, + .vfe =3D { + .line_num =3D 4, + .is_lite =3D true, + .reg_update_after_csid_config =3D true, + .hw_ops =3D &vfe_ops_gen4, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE_LITE1 */ + { + .clock =3D { "gcc_axi_hf", "vfe_lite_ahb", "vfe_lite", + "camnoc_rt_vfe_lite", "camnoc_rt_axi", + "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 266666667, 400000000, 480000000 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe_lite1" }, + .interrupt =3D { "vfe_lite1" }, + .vfe =3D { + .line_num =3D 4, + .is_lite =3D true, + .reg_update_after_csid_config =3D true, + .hw_ops =3D &vfe_ops_gen4, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + } +}; + static const struct resources_icc icc_res_sm8750[] =3D { { .name =3D "cam_ahb", @@ -5885,9 +6018,11 @@ static const struct camss_resources sm8750_resources= =3D { .pd_name =3D "top", .csiphy_res =3D csiphy_res_8750, .csid_res =3D csid_res_8750, + .vfe_res =3D vfe_res_8750, .icc_res =3D icc_res_sm8750, .csiphy_num =3D ARRAY_SIZE(csiphy_res_8750), .csid_num =3D ARRAY_SIZE(csid_res_8750), + .vfe_num =3D ARRAY_SIZE(vfe_res_8750), .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), }; =20 --=20 2.34.1