From nobody Sun Feb 8 03:27:05 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 132AD38A9DB for ; Tue, 13 Jan 2026 10:28:33 +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=1768300117; cv=none; b=K7jwgpb5SxI7UtJN+x+x2wtYTqMni+nLYJ5v1ClpZf2GHXx3UA/OLfZo4x1bZLXNlHsskj34c+IcT0aPQ/sv8bc4R9mxM06MF9fiElvQsMKFoXlWvUVYpExmGY7R4p65IycTLUfxkwFUbIpPikV2e9JeD+xOUcWLvzOpDryCLg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768300117; c=relaxed/simple; bh=g2lGUkf5gk9/WuBZ9q09D8BJR5B5Z5jYl+4ibY1JCHQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g+lXhtjyda1nrCQQbZoAy4nBlplV1l6bECSbaX9bXMe2EiicznuRoO9oZtNb7jkwQNWxDStjGIAbdPiGCFcd9LBXpsx5FE/kGOy5/AiYWKFdDbACQS1pdQTPiBxqHgyNrSVyMdHKycfraQcOhl/tv2FeNd4B/lGPz5dws2MgTRg= 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=WCjrIzKi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gYE6BDNc; 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="WCjrIzKi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gYE6BDNc" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60DA5jjm3798436 for ; Tue, 13 Jan 2026 10:28:33 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= IsDEEaupXNuiZtdmQEVtB9BZAskJ4v5zND/LpM8l4Dc=; b=WCjrIzKijH1vDL5b eQvlhQOvTgBkm5niIKrb2ddVHVOw6TGkDgA5uI7V4lW0XL2B38Ih9W3JemWvK7ur mvwvgsgSRqCoAbycGx3LfBpu7K+XTc9BVoBSTTwtc5GbGgHVYqh4oG2QhAgoN/Si J1YgSWKOisotmqwG4Hc8ew3ksoywTKL6ogM+p/p4fhpnJVvvzbS5rFH7c13HV+Cf /oGALfaJuJPdHBAHC526TSlN0kGBSS+EM/WNFUzD+8b5u8ze2ecfe0K4akeR19ea oaWjtgw+ruZXfyN4czchqjHzhesNl2m3kn5yPl45q8hBDda/BnEt0C/XBcCxPg9X NTiFFw== 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 4bnm0dr2cq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 13 Jan 2026 10:28:32 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1219f27037fso35554421c88.1 for ; Tue, 13 Jan 2026 02:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768300112; x=1768904912; 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=IsDEEaupXNuiZtdmQEVtB9BZAskJ4v5zND/LpM8l4Dc=; b=gYE6BDNcORxiyZPckRScKOLiYfdkRKgeSMUkZB81yxfG2LG5tqr39prvhVCAxBKzAo IiJiuw1MZFox7Z7BlYX8XZO2k9O2ToMxBQJnky+4YFeXovX76cL549eOlPCqA+rSMdi1 WfWwOD6F1jTKL04pFV28ZLjPnMVr5XImE9HPo2ELRwfd0//nNT0LhHwI3VxsUIVgbrQV yFjHotIu69ATxnqUjQCb8Vq4BPaxMBQMdwndext7eX/ypVpjn8ewNeAINRXlzuXF2HAL Xzcsj8j5Oed9KkNNgcUBkLnCPz2m1pJPf7RYk+BDhQ2pj1D2byjRVGyw7YDagJsifWVg xbRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768300112; x=1768904912; 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=IsDEEaupXNuiZtdmQEVtB9BZAskJ4v5zND/LpM8l4Dc=; b=gh6V23HjDX+FGBd1hn2G7poIHE3sxsNRea8UV/BnKif/htTGmzg3gKrxgZj2mSWEN3 1UFurWlFbp0mV4K8S0UTOvE/8Ktq6vxl0uqCkQ2UI0r20OG6eznsVPO4G9e8J7Kh4cr3 09vVzjk3crqyA8UVdEGcLLt4GoZjdoVsJnVoioCmRTKSI1GfD1vKY+QYVbBfItFTvfwB 0lcEJ1GNbhZkCA25SAhwlzF/ooqKBWbCEZ9qLCrtOtXIxrWtP0FUI6mMxwcKMaVx8Osp 1fd2bNQf4mOuypj1fsDqT9Ccbn4SjShgOyrus82lFL3fYu5TsxMuUvBW3i3gs/PF9RPl OtSw== X-Forwarded-Encrypted: i=1; AJvYcCVUTbV8b2Pco1OMEemzvP6qRfFVnhQHZws2bPN4iioXeBm2IfV3pD9XyGVM6lzWKgoOeE5mhvIh6H3zpC4=@vger.kernel.org X-Gm-Message-State: AOJu0YwwhXzCjGiLwXtgn4I4zK2aOJ6owfb29/Jraqga6dS0XvYdjxDW z+vB4s2PTJQyySgOiLuev7gdrha8rwby3qRAg1W5CfEnVoSgYeUXW022/ZmwA+aUjHgSADTdTpy CZDB3Uy23K0pR8hPk0YXUwapYq38vRLrjJZZwiQyX88YHwiNAGrKCOvlTgQogF0+hB2U23FvSet sdsw== X-Gm-Gg: AY/fxX6KSiHHr65hh7CESPhP5XlgZkaYBgR5eA50o4rGs1Y6V29QySF/CaBb1dmuQ3U 152bF3ElXczfzIL2k0mZ00n0m1CF4iWC3atKZwjqGzgg9p1grlsbLSJrQt2DksDQH3jnelaqNDP Yh1QZxIUzXXHUj6IZdgnyXyYabOwFpvfACSxzFH8a1w1p2KUWpvR5QlIC8QQ+C53P02A7KNA/vi JhTJcr0dRCfQo1AsEPN+9VrnMykWt4ycUFM7cTXgdu9XiVeuojjO6zaIsthxCAARuyGavGiJiIX kW52cbHoE8T0eANgAZAls/LUn/9rHysHmPmQEEGLxKYk6pOgDRvg+KIecZIRZLEKyUtRWOPF2cm IIbA2+X3cVRR1UxxhESNL3PKQ53o/eA/4+Xbz8Nu/FEPFPXKVq+IJLNyIbRR2VJ0l X-Received: by 2002:a05:7023:c00a:b0:119:e56b:c762 with SMTP id a92af1059eb24-121f8b5f95emr14873544c88.39.1768300111482; Tue, 13 Jan 2026 02:28:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXmagru1CSFnQDV4keCvP1rwCzum7NGHK4h0AdbzvLTGXntCqLnKcjKeFn2nwQ4Y3dwqJZYQ== X-Received: by 2002:a05:7023:c00a:b0:119:e56b:c762 with SMTP id a92af1059eb24-121f8b5f95emr14873504c88.39.1768300110814; Tue, 13 Jan 2026 02:28:30 -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-121f23b798asm21162429c88.0.2026.01.13.02.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 02:28:30 -0800 (PST) From: Hangxiang Ma Date: Tue, 13 Jan 2026 02:28:27 -0800 Subject: [PATCH 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: <20260113-sm8750-camss-v2-1-e5487b98eada@oss.qualcomm.com> References: <20260113-sm8750-camss-v2-0-e5487b98eada@oss.qualcomm.com> In-Reply-To: <20260113-sm8750-camss-v2-0-e5487b98eada@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=BYXVE7t2 c=1 sm=1 tr=0 ts=69661e51 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=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=dpxBiYkotQz7p_VYlh4A:9 a=QEXdDO2ut3YA:10 a=vBUdepa8ALXHeOFLBtFW:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-ORIG-GUID: qmqyCFy3pDVnkSk-J5b1fl9xJQ1ayFEj X-Proofpoint-GUID: qmqyCFy3pDVnkSk-J5b1fl9xJQ1ayFEj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEzMDA4OCBTYWx0ZWRfX5ABzkEVy625X I+BY4dM4NlEi+/V76+fcBXYIv928zOfQHHjkg91kYHeeLLdYO2Z+jz7re7hHpYBZfFJkZuE0KFE 8PLd9Y69l3mYYvukLWI8/VPNYtakykjCaSj1sDrx65olKtVxhroLlBQYGQYxRqc7HKCEQCKwGW5 fL2LK7M7EkH4LNli7nxf5z488Fov25xfHJnwcywGfsaLbIes6wQGyyGb802PPIPq52lP7ajDNQn r9+noN751tJ82QoFpPNQ4LPzIegGspfpZTb/cDyLZ31eIj8y9+c3NlzD+brPih5BPw1nxYErr8o e8H7Z6+JuE75cL6itwp8pDZPbFXds8PsRkmjrcrPRCP7SrITz2XMq4iJ7EZWH3qtfGIDVfDiTum pzbLKxIEQoSVZKYxnW0E2Iw/jNaSnB8tEC8Ova7hc58Ajg+qCBdK2cqZvXFNa5OSFuPmRGi3Rbe LY7t/vXeg79ZuKctqXg== 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-13_02,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601130088 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) 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 Sun Feb 8 03:27:05 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 DAF703803EC for ; Tue, 13 Jan 2026 10:28:34 +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=1768300118; cv=none; b=fJfdJVe6M0kxkRTXUzplcMilNykylOpt7FfCkDw23WROgsOczw//cUC1QMtQUEqU8Ecwi53/LGuXzIZVH8ZjCB/8ou/9Ehh+lzry+3iq3OBjfCuWDZshCvkyAdrUMjHrPdXcGUoPOe/tmB9J2GC6zj2UEvaLFDlTmP1GK0Y5BDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768300118; c=relaxed/simple; bh=wvW9hw/aHeeOiWoGi2yJoeb6xxjCzaCUPzx8qYpTgL8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t6c4AVvXOyY6ch5kxpM42UkdoVYhz7cVAS+MtYSxRxE70Hp99sEaRNpx9OuiLkS0H57Kd7dzsQ5TPmQm09yIvufYvhyXUnKbyl5vU2FyHAS8OhYGqpa2TrV1G1GdLBLL8DjOlwC8RD34h4UohiP69EW2FVoZYMexkyoTZlPpPDk= 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=eR8FhjAM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NsWWT0sm; 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="eR8FhjAM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NsWWT0sm" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60D85C9D1935022 for ; Tue, 13 Jan 2026 10:28:33 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= djk/VNd2QSyawjye+VcPas7C71Gc44XxqkCzjL+Ykt4=; b=eR8FhjAM/IcM9VwQ 3OEWbPVDmdTQQTUCJCSvoLXVSckJCNQJZwwo4MN+WS+C8yUgD0FDe0l+C8Ic23D1 +o2JVvZOCpAwfyfVpCrup3CdiL30nZ8JVXo3pZYaVo8RSm2dpCmLvgQ7bHheIZG1 Z+r+jSlD6RGT8G5frkEUg+KUMRW8eXcGsLYzItK/nJUGcIH0g7XKTWjejpWxq3QC ov48TH17MAwsncnpHQu2aPPUC+XwMGBLPrY3Fb8NPVjrM+VwkAUSI6RDj2V24+XI 3GT5QEjzIoSDX84RV+/KTG1RJdg63GB9Bb6eEAAhLhHBawOidSGU3auSP7VeOVdw 9y8gvQ== 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 4bn6cnjhh0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 13 Jan 2026 10:28:33 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-11f3d181ef2so41793093c88.1 for ; Tue, 13 Jan 2026 02:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768300112; x=1768904912; 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=djk/VNd2QSyawjye+VcPas7C71Gc44XxqkCzjL+Ykt4=; b=NsWWT0smbfMrqWEf7jRC/bXr85xpp4q5E42iCibia/drqHJyog649klRRZX/l+rQo1 ecygXSyORtMh2vf5gEB7jCWaZVQsk0Z7qkC1WdLY4yCA+3xmi/TiGAM407fPC9udF7io v/aXptUB1IEeR4roK0dyh0B+4OAkhEOXi81ujc/dWEU0qOtVICCMCBusYvfz4DIztX/x vcfz3yTXeSatORKTNlBtXnOv6juuqelJTvk7Z68zihLoF/ZbCG6yaV0lRqd9ugyBBKAx MbDtDoeyJh9zbyf9Qq58It9L0+heLVMaEsZlDTkRy6E3E+xILfWi9JvBliuk40crou6r Y2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768300112; x=1768904912; 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=djk/VNd2QSyawjye+VcPas7C71Gc44XxqkCzjL+Ykt4=; b=j0zyLx3zngrb7yQ6KAOq5+s5jv47GWBMyiujfyDKtv/gz/4Z7n1DPGWrCCf6O9ncfH K+q20Vaj77abFRMnzIuQRVdf0qhNkOGyA+FFmiQU8OD8YEn0y4s4UD8t9DOMl7EXqbJA QHo3nl/j6cIIRqv1+XtmDbBEyvnIOw9A7Ap3ctIZR81jAfRtzzGPuZJC5uklZ/0FR6Bi YluA6fbrRTBYgNkUKK+kPndcV79O9+ri5DD7FfesoVrrhfQXVhdzEnF2vfZV9cH5roxh UnJw8Wl6T2/FlGKDO6cxMv9X2Uu+QaaEOnt2I5g9ohg9YKOH6rlwTKuOO57FAEuok43i vJmg== X-Forwarded-Encrypted: i=1; AJvYcCVg7vze9+AnQ5RGvuWD8CYFqgANCGXy0Z4ZFm1Vagi1mlrHrMDcxyKyOF4m7rFWC5AfC5DI7awUR1egI3M=@vger.kernel.org X-Gm-Message-State: AOJu0Yz23eslHSDzfJvTRatamvjqA12K3QEipD/j5QlF18Li4l31CfZY QryEjDWN6JqxPH5CyahBN8WGgNA9OL/LLgLZ/VySxOVXefS/8vVv1QzP4gkgXpWg5Ywoo9IE4l9 O3NLy2TGm4DPhEijatgPiRwzByjyHoCH7EXES15M7/CfX1KnxKUcdAKV4hhwYKIpfETH+HRjTMz Ix4g== X-Gm-Gg: AY/fxX49wa/QcInkP6mROHjQi+vK65pMvcVIAC7KUAc+7f0ngFpfClpY44gWYJGJOt3 lMg8l8buubWUH/SE9xMTw8KOv2svR0Zb2TeqiAcK6dw4lCDrjW1hP5Dlt8uGLhp7Wc/6V2xL1wz ptK5CthIOhKNCnFsrGSenwGRAHps4PnU8hXSbUvdBQRY5duVzcIAn+1XFRG19cjByvbSLbhmlc5 gTvEQ29DQJ3ztRJUmkzHp0rHE0z05tJCanBUrJF7i+cVO6ClK+pp7N08mG42keXmsFCLXI1MgPR 1OrxP8kAhrmQM0tIdFLkchtYonlGXus7sYGaBwJTGxdv0J44MrczXgjttpf+ui/mxNCiFnz2r2Y VSd/1ZlSIS26Hxk8heB7xssHSPFVpTnfY/13L2pk/q5YxyYd5iwD7YA9GA47jyRxY X-Received: by 2002:a05:7022:23a8:b0:119:e569:f258 with SMTP id a92af1059eb24-121f8abb2c3mr21786576c88.1.1768300112165; Tue, 13 Jan 2026 02:28:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL5DuQsGhc6OFtFJIsMVvV9xMJhRqjudlKRzvjjERuNRlLaKuDKYzPrQ8XWrzZuOarZWNQwA== X-Received: by 2002:a05:7022:23a8:b0:119:e569:f258 with SMTP id a92af1059eb24-121f8abb2c3mr21786539c88.1.1768300111621; Tue, 13 Jan 2026 02:28:31 -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-121f23b798asm21162429c88.0.2026.01.13.02.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 02:28:31 -0800 (PST) From: Hangxiang Ma Date: Tue, 13 Jan 2026 02:28:28 -0800 Subject: [PATCH 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: <20260113-sm8750-camss-v2-2-e5487b98eada@oss.qualcomm.com> References: <20260113-sm8750-camss-v2-0-e5487b98eada@oss.qualcomm.com> In-Reply-To: <20260113-sm8750-camss-v2-0-e5487b98eada@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-GUID: nghk0xm_k12rm5kFFIcfPLV8-E2LHdRA X-Authority-Analysis: v=2.4 cv=KK5XzVFo c=1 sm=1 tr=0 ts=69661e51 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=gE60Ov1lhapgyOv8Ur0A:9 a=QEXdDO2ut3YA:10 a=vBUdepa8ALXHeOFLBtFW:22 X-Proofpoint-ORIG-GUID: nghk0xm_k12rm5kFFIcfPLV8-E2LHdRA X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEzMDA4OCBTYWx0ZWRfX0SX9cliIKqIJ AxImYNqkI+Z722e3ml821mcHwj2HTOJTKJuHACmm6KPHEINyoYuEV7kzXTEJYbhK7c3o7ZouLuE 0fETRCNH8rTwwfqJuMj4d/2uJkGAjoJO2lWiFwGgr/GNuveaEx4MEonPBHGfiYX137MPme1gXkO JMPcb8GYskFbhZzZkuRQW5KKarQBHz6NC9Bo/BXecfZTzb9jjvnV4vSUAWqDKm+8SMtJ3BjxVOM XyNCVq+pfF9xoK3YNYd7rVWoAIzZ2SdFXcRY7Crx0Fu4RmUiEBx6i2dazpjPtqOMaffLmuPtLjj EdX9ujGWvMJ3RGdyUOr8H5FiD9mu+6NqLXxrZJIACowksU73cMtIoOEq4W3Pf63Qyn3Gkv8ezai gacKaReNdiBfiRipkRc2eJFZkQbwKyTX7FQtjGcS4cLmW+NDvhhbf6fx/00VkiibaxNAE+31Wtj GmaC5CoDNbSkSdYgkOg== 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-13_02,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601130088 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. 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 36ff645d9c1e..56f20daeca3e 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4066,6 +4066,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 */ { @@ -5487,6 +5501,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", @@ -5518,6 +5539,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 616ed7bbb732..2a53524dec93 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -91,6 +91,7 @@ enum camss_version { CAMSS_845, CAMSS_8550, CAMSS_8650, + CAMSS_8750, CAMSS_8775P, CAMSS_KAANAPALI, CAMSS_X1E80100, --=20 2.34.1 From nobody Sun Feb 8 03:27:05 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 A05D138B7B3 for ; Tue, 13 Jan 2026 10:28:36 +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=1768300119; cv=none; b=OdKX7CGrHEFPIx9YgIUrd35bbSg5nYbhEzaDmagbhMUI6gs13UrL7jELyLQVvkqWaksLou5ZJ0EfypfrKKXO0SosX/AZHhqGxhX92ddmGMLdaA4Txgcf8v0xHvYpxNbW/+oL5g8RDSaJ0PXbu+Rw4ilqYKI7o5Fwk7n5R+DioIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768300119; c=relaxed/simple; bh=LIsn9wAsUR9DXAPysQrnc2VIUa2E1adY86k+iToDgWY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uPV9ByrGVQdF/iUJ4M2nxmpv9L6IAGqo/oaNYlnoDnfrn/abFYDaGabs9ybkrXkxU1oHa43PFjOSK6VHVpvmlZm5I5jQPMqk87AdoewNX4IQwONjyXDO2Kvt+JFLCEH/cClOwNuLkSiLABqfqulESrRz1x7iDiwdsCkZZvy0qD4= 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=CTiCQOIa; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ff20RlVg; 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="CTiCQOIa"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ff20RlVg" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60DA5t733799113 for ; Tue, 13 Jan 2026 10:28:35 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= nOhwxkO7Vf7CPnCeNuoW1TJzRu1a5VwgL0q/UpJoSrk=; b=CTiCQOIa2VAwnyTS i7gkqhCjfL0PoZgByKVQj9jucyxzVLRuxfxNLcHQmUb1/kI+kYSGgME4oKA+oXfd CIBLiLIUE1RAc0wF4LvRPt7qJfxMqtf+UeKXVsfHZfHkKd61RpENeQPs/ncYiPYM ks34/MAWu0NvXO+ucYTjPHL/mhR5RPZ99mXSeYv9agHnNLIzjFzV2YmShW8HZiu4 g18ZjzJUBN6XJaLmbL/ie7JZwGWc+79dlWtmYTlWENayGR0Pa5Gt9nnVXF8ijGtq XL474Ju6amkMxix/Dbqm/Jf8eY2U51/3IuttoZqF2qwgX7vgCQfCO+aknIFtOBwA bjS1qw== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bnm0dr2cx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 13 Jan 2026 10:28:35 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-2b0530846d3so6567879eec.0 for ; Tue, 13 Jan 2026 02:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768300114; x=1768904914; 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=nOhwxkO7Vf7CPnCeNuoW1TJzRu1a5VwgL0q/UpJoSrk=; b=Ff20RlVg7WXjyWdMq8El2sZX/BKXGm2Tr4NYUhrI9GWFziVu73u7Q54H4/VSlLZHY0 XOj/Q5/NfDNFRSoHXK88F/uxyXBcCfIxSc2pQCaDkcmNb2cQ4h0FlHQdG8D2+Ac6ArP/ E+Saz7fJokQbiV5cAVndOjGZHLdMtyZNXNqdrsE4vrKYwOMIMeptdwrXs0viUeAtLxqb 0ZfIASfyz01/ttdgMO6g0rccCExBwVvfT55DHx2SVO7RY+dcPiqshznV+uR/X73FeL1O ZxvVV6NkYnfxNMD9OgjHagFsHcoWjgEhrQWv6/wdA6bhj2vqsmvdVIj/RETaNGQCKLdZ ASxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768300114; x=1768904914; 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=nOhwxkO7Vf7CPnCeNuoW1TJzRu1a5VwgL0q/UpJoSrk=; b=cFo8nsH8Cy+W+TrPNk8WJU8LGj8dYGtIqv5MhMH5jCWvjxSUwQyG4C7mLd54nxoeuO SScNLlGzibohHpvgTSngChiWSu2RrVL+i9Pb9AAOSAC1U3r4GtHyQxcN13bSslQEaQp2 NbAJ7p3jM8GzQ8Swx7lplZ5/f/JXIdERQiJhD+ZtiE6nzeGIxYh97TO8s+o8+SWmiRXR HJYMugy7+epwf9zTcVXxXl4pEtCPY/jd00/NwpU4DYjRzCqKMz/ykwvA9vCx6wdsCO4n lTUZBU1Ko6IfC+ZdG2EdA5+6s/4iXjqNpYhYFCJJ3vfZ9Y7zC4/AQVlZG+k1hrEfgW5M yqlg== X-Forwarded-Encrypted: i=1; AJvYcCUWp67ehBcAF03H5eQjloSCDdSRbfOJpbsnVk8nvA5s9QzD/7AUW7OS56rpSd29GCQNcyArpCZWJ0fR1Rw=@vger.kernel.org X-Gm-Message-State: AOJu0YySbRfxk8cG7SHVFnjsuc+5NRNJukOXNR/7fezl0RxN6P9x+7aJ N3DjqRkbUkZXFPqIziZ24Gz+FrQDHhXntFKzD66U/7lgj/70J96xT1+mHvesUjtERVhvkKtNCgM nrf1tV6OAlpP7RvcZnYpcWYya+aFsKUwpdzCRluKyTC1OYJw5oIyTrEOkc30m9FLLevtYMC+QTP st5Q== X-Gm-Gg: AY/fxX5GtL8ih/lb91Zf95x/mtiopbeVHuOr4b2E/PMiCRq56I/NJE3wVdKnbOqXcZF 7+gM5/173+rwkocp8pKbnZVg2ZAOzmK4ahPXGWstrrSm2vQukwQdVVemxjaYb/zpwNWXlK7Uv6q a9QlBAwGtQMJpnGrsZflR2IJTQn81SDEcsA3x5FEEcfPmMDL8C24/uY/xhzsNtSA5w24CnIT7Mu hr1zCvNcgn+CsdmyxadbOKe7WEGydey9fZylMu0UkdFJzmkVB62BIzgTi/Tp7e9ykWPY8pSxHLH MOt7ZiHb3prIiBCKX8pOee1XRboEoLCI0/mQ2Zb43YYjbGn8nzuni92vMvQ5+5nqRxYK5h3NRzb L03sl/DbYuWzaTaogvgos7OgPwtJ8hwRBA78F3KbWlgyNjHd+bMlpjRQfk6GJi8Te X-Received: by 2002:a05:7022:786:b0:119:e56b:989b with SMTP id a92af1059eb24-121f8af8169mr20021485c88.2.1768300113867; Tue, 13 Jan 2026 02:28:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEShs0zhCLm/kgqMsw9xCUfX3GmYXqVOEA5jmVr85gGlImSdXSl0GindBcyX4iMCxB6olINw== X-Received: by 2002:a05:7022:786:b0:119:e56b:989b with SMTP id a92af1059eb24-121f8af8169mr20021446c88.2.1768300113321; Tue, 13 Jan 2026 02:28:33 -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-121f23b798asm21162429c88.0.2026.01.13.02.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 02:28:32 -0800 (PST) From: Hangxiang Ma Date: Tue, 13 Jan 2026 02:28:29 -0800 Subject: [PATCH 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: <20260113-sm8750-camss-v2-3-e5487b98eada@oss.qualcomm.com> References: <20260113-sm8750-camss-v2-0-e5487b98eada@oss.qualcomm.com> In-Reply-To: <20260113-sm8750-camss-v2-0-e5487b98eada@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=BYXVE7t2 c=1 sm=1 tr=0 ts=69661e53 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==: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=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-ORIG-GUID: vt1cfW0-HrHzEOAKB__tRpQpPugHspsg X-Proofpoint-GUID: vt1cfW0-HrHzEOAKB__tRpQpPugHspsg X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEzMDA4OCBTYWx0ZWRfX36ilWTCN/ffn 9aWYOO82PBl1j7yIHCp55WcLOqsd0huehzIukN8ZOBqVsFIOETGVDMPv5opqMNOQJmVW0mh5OXe 1wNHSf9zZhlhi/u4X3p8kiVDTK4f1VRCLnX3XiMDRXSXhlquSKXl390B1hSTEu5G3HrmR+2/DpY i5rQRKFTXSB7gvSILogdu+YKgxqaottgya7FTItSUStjV2cmMAlZ4jTZVfkwtN3S7NO3XFqS6ou G3YHKt8AUePgZhenUR5oAYqSDhKokZzuR9aHWNm5fyJD1uUrKTLvS2uuMJxngjHBhBeVlGDm8Mg 2Tzr8klK4bXNHxeTIGXiYlZiSwvgASYna4twwNUXFvbWwA82vZcTFO+bRrgh+sjUp2A0YeLCP4Y Oe7tH8Lam9Gn1wjP66HW6CIHzkGhixzs1M85VXHMbtX8QFltN2oPODa9pxKutUX7nQjas6+QovP wdqO535KmZmaLWPv9aw== 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-13_02,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601130088 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 bea8c927a2e3..1c95102a72da 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 */ @@ -1134,6 +1134,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: @@ -1250,7 +1251,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 56f20daeca3e..1f9a91178002 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4066,6 +4066,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", @@ -5504,7 +5627,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 Sun Feb 8 03:27:05 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 C0CCC38A9C2 for ; Tue, 13 Jan 2026 10:28:37 +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=1768300120; cv=none; b=O8N+9WAR463mjh00t8MzNmaFdb+9mUaZyPMm8PkQporaLEKy4c0Th4htcrk80ZPb5BKutZdDGIPFx6tOuo042VH9/EmK282bau7Ip0tmmINjCt+h2jya0Xaqyu/tUvGE7DuKXYIiGsZyl/dLhsq9SxCO8D7e+BWhTbtn+QbB7XA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768300120; c=relaxed/simple; bh=tLjqfdJ2PLGVcIn3OelP6kMzjCOZYcPVvGpP83m+mHE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tDoeRkvZgwcL7jLalkD3WQATGV7/8rImeYffUrc3QotgIctwjPgYQhSeGr79T5h9M8gBdCtLerTxy3UpMo/PGwoogU2ANaqcW4fSdzG87sbBFgSWX1EslLxiD2gUz8gQCvf7Jctf5gmemg2+BwVBwzm4OD/1l0AN5O0Fwfbp3pE= 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=YGjlh2sb; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PgnN3dps; 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="YGjlh2sb"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PgnN3dps" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60DA5pns3799015 for ; Tue, 13 Jan 2026 10:28:36 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= RDYDnmjv2ty4CIY9QK0XVJUfkKgguUupulKp5AkLzXA=; b=YGjlh2sbNvk59nHL zOA0ZUULf2r8+g726hqxauv3nsShJn4L8l8WwSrpwtHl1EcPHHk5krkWZICkdkXP XPJQivmF1g1vy1tYtMZVhRUc8vo3L4xkkjsbN4xr1mS2x5KTdQjEjslPb0r/xPo0 PCCw6KiD4SZZBEQ2Ya0Mhz3TlOs0OTmG8FJvCiZLiatZWfJnZQ2xyNvneEM7mVQO x2giOS8pIPAnVWNTWcM0rTXxEj98munYrAmAHAsN+qX5Y75aR/V8L9t7ude2QOOO d0oTJ+7Nm0QdFTzFLIXIpYR2vVrGrrHUyZEHvyyLErZ8u/pyMA9d0W52W5WLHE+r laeIng== 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 4bnm0dr2d0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 13 Jan 2026 10:28:36 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-11f3b5411c7so26548357c88.1 for ; Tue, 13 Jan 2026 02:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768300115; x=1768904915; 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=RDYDnmjv2ty4CIY9QK0XVJUfkKgguUupulKp5AkLzXA=; b=PgnN3dpsTHK1VpL6mupf0WtpwSYlcRebu6vA++3tkSyBJVBRFYvTcw9RwS/qzJEOHr 3a4Ee9990MuhNXxZ8rsxEaktwIqOi5m4oaO6Wz46A1OpK5euT/CIXvZl5jxbZGLk1gZ3 BlRNCTwzBHxtJumBUpKQCkokqHtryKWYHFbqv9plSOODpk/rB5kxMjHEpNAqOADtQhWQ /3ed9OMA+xoHDv5prhJg5+k1vWNFsNAN8hG+OOOyHfX4NX8JZYioJmlfNWlZQ+3VeAHg KFm+1oJGgZbqPZyeOG0eDra54mjPdvl4XkGmOZYYGMpVHFdNlRzS2cDCkE6ZGtiu3hs5 cViw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768300115; x=1768904915; 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=RDYDnmjv2ty4CIY9QK0XVJUfkKgguUupulKp5AkLzXA=; b=U6fRt89mld/44On/ESYH+D0Vm4kPA0DhWDw9KK0dClByWoXB013SZ16T0zn8/I4cKr mb89mUUK04HL9V2G9UIkHB1CYTNxvugp7RLnawSIgVcPuRcV1XwEHr3mDVf+5v4Ay632 YzWQgBgTop4Z1fhRIwu3tnYAPxPbz7MqSwOO+vVNhPTC1+62tK2t7l61q8Mtktd8DPiC 4udpuz0N0+4PCDD1thqHQJNWw+fvS7y/Gl0rMTJ4xhxzaPftf8tHVWhWC/ddmzHXB3gS g/OFVzl6bet3ESmbz+Dd6XDdyPY40tQ8Vxf4ZqUEQ9cXQUGDZHwY7Yet3JHdj6KAF5fs Remg== X-Forwarded-Encrypted: i=1; AJvYcCVF8tLhTg6+kgOm3aJQtQfThpz47hwsecTr0v2tEU+jrZJbKCXb7SWQZwuEMIlO7jJNtvfV85OWoDR6io4=@vger.kernel.org X-Gm-Message-State: AOJu0Yzg6e/pqgrluL9QUO5UkRRc9MkZcdkXj/4XC30zMt1cScISBKc9 uHWHfrgGaIcHtlq4tRzdYyHSET8QSryzMwtTyKCzckTVDXQSJgWo9Af3Eh+qHvFoGmfzudv+yvF cVT52rOQ8QH9y1V8NtuN0UR5gOYpUwK2VPs4EmKoWSU3uZjG0m2KXvbCsI7KQ0n1bRajgwvdJIi /rTg== X-Gm-Gg: AY/fxX6UUj7hhwFxIjYe1SbykVdkYAscKUc3/yOwRhzEpLgXXDu5j5d4VtZUzaAU2pR 2A2koTvMD7EVrY0ErJQEfKOjBrXIgUSW1wQDRbbxBmQqSi5rdF/y8M8iTVNLYgxzLZdPW+luS6M QcPQgadQ2CRpQUij6D2x9LW0qn8yt37n1z+cGh5OHkUKZGJMBhRdel9uwk2YeTpVux0FnM4YkGK rnHX4GXx2uaGZz8wUyOlZ+P4hUJvbc8oH32jOWCo6muWesACApG2h5aF9IuTbihAZ2SHVwlDu6Y Bx15fCIggEClJapCxoVYWEZZEnmkGi6h31JRVzj6X0JQQAM8joEubTPwGHwU4Doavis4mOHUVWv Xj6kiNPadIBnVb/auLhb2/ML1JSGBpR0R60/lX/xHxlmeaO64oJNRQpskDxAj1p3R X-Received: by 2002:a05:7022:51b:b0:11b:8f02:a876 with SMTP id a92af1059eb24-121f8b40bb1mr18615740c88.23.1768300114917; Tue, 13 Jan 2026 02:28:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkP907j2dTOarSH7VwTHMEOaxbaLAxZnrftzh7Jgf0909KL0Bva8Rm9/d/Cn0MAy8hJ3OHTw== X-Received: by 2002:a05:7022:51b:b0:11b:8f02:a876 with SMTP id a92af1059eb24-121f8b40bb1mr18615699c88.23.1768300114178; Tue, 13 Jan 2026 02:28:34 -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-121f23b798asm21162429c88.0.2026.01.13.02.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 02:28:33 -0800 (PST) From: Hangxiang Ma Date: Tue, 13 Jan 2026 02:28:30 -0800 Subject: [PATCH 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: <20260113-sm8750-camss-v2-4-e5487b98eada@oss.qualcomm.com> References: <20260113-sm8750-camss-v2-0-e5487b98eada@oss.qualcomm.com> In-Reply-To: <20260113-sm8750-camss-v2-0-e5487b98eada@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-Authority-Analysis: v=2.4 cv=BYXVE7t2 c=1 sm=1 tr=0 ts=69661e54 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-ORIG-GUID: hF2sAdwOoJIF5ck0Au2lDAal2UU-HFSf X-Proofpoint-GUID: hF2sAdwOoJIF5ck0Au2lDAal2UU-HFSf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEzMDA4OCBTYWx0ZWRfXw2ws/TDKyaUs Ctv7rKOWMk0ujv0CVm7rO0QmuU3WnAh0+cGGqm6jeD6ZUEsAvYB1nx6Ur5R5pNAbx9uG2xCihTW 0wcti+y42rTBlG6Sm47TqxsBCduTCUPxi08LxOov0djQe7/q/Ln1Ig7WVccY9o/+wivleKmL/fu GcbLxDPPN/ikQDHBgA7Jq3QacK/mAeuBBkFKHSej7J7qkMwwkqmIBunsK6AUqIR3ji+nVBwujOP Wchq+2XaCZ7JpwpCtPXTpUG5p2c5rpsxZCe5VkVgK08rRQSHp8zl6i/eCVk4WMy/4c/Bx0dAbzQ zxb3NttMxdOPnOxKI6GTa+ssNp6tTvZ6O0vW+fr5+aW+ujFPoGLtvN/LPhMx4Q4QG7l+X7rqPsh +TokS7l5XZAX7/Py6JpVI32PRWkrINSJsPBATafwVrZFPgvw0iEnxBJ0G8W63yyrtcSKRIt6F9f Woc3YbavqJZEP3FTn8w== 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-13_02,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601130088 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 1f9a91178002..c52e6f7b6294 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4189,6 +4189,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", @@ -5628,8 +5701,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 Sun Feb 8 03:27:05 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 11396389E19 for ; Tue, 13 Jan 2026 10:28:38 +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=1768300123; cv=none; b=SC0hSAcisraCro+/TAHVV5Iy0Gg1KtBQdgnLFDHalVD+6mAz3n9SXJvLWXEuXAg8wwKM3xI739Ou8/urb7VKeD65nzYiZrGWt8m3Gr8bVLh/BakkAxfpKzv3RiQZXjoDjOJ0PXz1/ZsRvLIx3ejuOIr6BiIMy93CYjPp5jYVP6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768300123; c=relaxed/simple; bh=HU5LADSrpxuK1KdyyUOHGH8SfXv4NloG4/q6gIT2Las=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BwO4LYxt5HJ4ePdb6d1grkHSalrq9fNBXNpMVGaLGcpBCuX0hpaV4ZXCji6ab5ZYJhGDGNK6XwkdkoQAj4P3/hxPCuKYtKH+oWR9C3fahG6wPD5RO+OWEqiA6uOi98u1DJ0WpE2dKGq+JRDn4OPT1LJUQefK9OKrHdxspQJft9o= 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=k4KXU5CZ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Z9jkLibX; 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="k4KXU5CZ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Z9jkLibX" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60DA5sSj3799057 for ; Tue, 13 Jan 2026 10:28:37 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= IUtMrQiaUIFSrShIi4475b4BJOl1t50l20lRUfuc3xg=; b=k4KXU5CZMagTEL7Q NFUKsWXeFfoU9pxQ0py2VpvczutMUXYDEX3GK/I6GqBE6ujxUlpaDsJkKoisRLog 1ZhloEcxXNTHceiLmAYcAUhx3jsueCfXKuqNOpwcr9vyGjG0oP2JnLmohale3/Wy CqjPc2LyszNZW9qqMsHnl4Yv5lH47xNI2CoAOudLynv3imgLE392KDXY+bNq29CZ 6LRlQTvYzh84ZVnKsdROnEcxFZfts5Tjx00aVlbKw/CSfSoon4Ej5flWl/ZpA98r f9pMrBhgEIHoO0tjrnj0tHRKsvrIhd2m49gDcUGhs+7qakhug/GCDU5HpAcntWsO nKdfpA== Received: from mail-dl1-f70.google.com (mail-dl1-f70.google.com [74.125.82.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bnm0dr2d6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 13 Jan 2026 10:28:37 +0000 (GMT) Received: by mail-dl1-f70.google.com with SMTP id a92af1059eb24-12055b90b7bso28355531c88.0 for ; Tue, 13 Jan 2026 02:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768300116; x=1768904916; 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=IUtMrQiaUIFSrShIi4475b4BJOl1t50l20lRUfuc3xg=; b=Z9jkLibXfGVw3OjaptWDwuZEb/aq/sSq6Meyn7qFU84VZnVZ9Gczg1MU2QLufgbqYs SJ+8CVfkvJowphZYsWborJ451Jqa5Sen1yyb6yRvjXx2LbLaRMe1RZRBnNOElYg7KXF2 yf7W3BNl2rs85lEDoNdfktbMq7h2bzKGANdsCXqQIXRS0wt/Ez1SsvnyHRoEzH/SWrG+ D60LobB9Gy9ym08G5zKBfsYJcv9kXI4jwdlz7exErPn9RnZ6eWfW4HYb03BdHLtwekmh lI6nO+UuzT/VJGCo0KJOit2Bu3ybBwsPh3ce6AwNMHs+hAqh0FVNhLuTD+w/AsxGBCFp Fx3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768300116; x=1768904916; 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=IUtMrQiaUIFSrShIi4475b4BJOl1t50l20lRUfuc3xg=; b=qWIoyW3WNx6/ik1vE1eK0Y7Cc5Bbx+9tpapeWxUTuD8g1cMr+DnM57k60/umpnIjbU pT4r/t3zDzhTKKzPwv0KOj0h9d1I9/WCQzcuCJhliRCt40EUd/nDE/axTIpFU/9PxE2y hiJc5Arcv+s6+0ezYWVuVbQiV+CSwqhR99hRm5SajoB/SrVkFOrDD9h8L+LptphdcTP6 Wu3vdNMY2dw7JnwT5J9Pdpk3EhWWEI/rOuF6liCclPdXyxOmwNe1qsjIacFZs/yrCX1L TQ21iGbdBSSrESJy/2f4ZjwBZEV2B82T3UAIMTxpoWzZfrpFvFEJSM1gEisfPYDfx8KW IZkA== X-Forwarded-Encrypted: i=1; AJvYcCU+GaOrBEXXsowrS4/bG1+rqTDE3NdOrb2mhoiYEErZwBYPY6I+u7Mb0yhOw8f60PNLg56fvz7eZgCRslU=@vger.kernel.org X-Gm-Message-State: AOJu0YzQTwetHPxeNGw10ZsiiWbZfH8uR8QJ1rJOQtxtneSocnz85wWj J8vZy2B0Y+2gmcsbCOfNZBPBr5QosxZaIZW5BifR+/mk9C+nrp7luS2zbeml1f+NJ27fev7hWZf LcKLB4t0c1nos9mDMHWPT09lvFAb+54VLH0nkM2nhi3Ne7VzrMAoCsLO3vU3k+0MtKfLa4IGuMi pq0g== X-Gm-Gg: AY/fxX4VAgdToyJx5iQNpokgfwcDlMAzaQNyJDtammYVqLhh9ukNLBw3soyTMR+LRvu OrELo6sU3OWDVpxxrKEyUjic5J+T3e+bhj0XzRlyr8ZC9dSFDM7cJpxcI4Lbq/xVneBRrNbewt0 T4rSYA5PKtL9PuhcR3GJj6SXWpwTGFr6B96ZmbvZv3D+OIJjJeeIaWXZOtS5KESduTxQKvC4kEU Dgd/H47/FU/IzXkXdjOA9vrehMq6a55yUgV8Qy98zoALvc+xbQw1h4ouizBJX3FvIF6+aJ1byrn V8894yRcpIf6hoaz3Sg78bHcxUASeeQheXDU6+3qmW6+t55dplgGjFX04G2DGKM0Lb17dMY4UKt m7XIucNIHjLk8k1IlW+8a4lrlDz5EXNCxgEWvEyEf18pLxyFWSaWZMNbdjyxMOWV/ X-Received: by 2002:a05:7022:380c:b0:11b:9386:a3c8 with SMTP id a92af1059eb24-121f8b5a33amr16338196c88.41.1768300115814; Tue, 13 Jan 2026 02:28:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV5WbVdo5rQ5sP/hDDUIAjGEGohIT6H9t3QHJLXK0wt+jUYgBKtunUDg6UvGKRrAhMzoXlug== X-Received: by 2002:a05:7022:380c:b0:11b:9386:a3c8 with SMTP id a92af1059eb24-121f8b5a33amr16338165c88.41.1768300115216; Tue, 13 Jan 2026 02:28:35 -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-121f23b798asm21162429c88.0.2026.01.13.02.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 02:28:34 -0800 (PST) From: Hangxiang Ma Date: Tue, 13 Jan 2026 02:28:31 -0800 Subject: [PATCH 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: <20260113-sm8750-camss-v2-5-e5487b98eada@oss.qualcomm.com> References: <20260113-sm8750-camss-v2-0-e5487b98eada@oss.qualcomm.com> In-Reply-To: <20260113-sm8750-camss-v2-0-e5487b98eada@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-Authority-Analysis: v=2.4 cv=BYXVE7t2 c=1 sm=1 tr=0 ts=69661e55 cx=c_pps a=SvEPeNj+VMjHSW//kvnxuw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=3rR15nC7HOTWOJgZU7UA:9 a=QEXdDO2ut3YA:10 a=Kq8ClHjjuc5pcCNDwlU0:22 X-Proofpoint-ORIG-GUID: We7YBm1fWAQryzSHll6b9zPCkOigpKvz X-Proofpoint-GUID: We7YBm1fWAQryzSHll6b9zPCkOigpKvz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEzMDA4OCBTYWx0ZWRfX/FFlKh2bHiH/ h7UE63C3IAnCtzbV834CJDTgVDO6zICOHohtjfttkhk6bsmJ7/wnXh0vYWtUAiK+XGZDCPH47tS 1faQDFZl9k6QzK3T9noj1bkZM6gcmhqSBkhXwlYt6McmB9HttaqEgj21ImpLKmcZfZIkZY8rqZz N2ulh3JmDkKjEE7T2rbJ8GE5cK7Qym3FxHCPTWr87VPzwGlWmER846tDvj9ReA2Otp3Tf+XZsmN 900uWw6ubC7uK/pWKi13CU0bkFk5qMPYGBk/o1/MVNg5adInJEM3dQsO3LTmAwgP4Vpt0jFywVq 0MYO9/14zhPBpFaVUhpup6pX3rQgkEUapW4rNzroB2vL4HOPzFgN7RJmjU3hEu03cTyttLlweMA 6uoHjGmWTRuvYoham5QiKrMbHs4v9jHhjCPOVP7YmDYW+vfR0AVIwoOYbWMU5JGAnNowEm8Oe0V HfGBlpMqU+L3fCcJWvw== 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-13_02,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601130088 Add support for Video Front End (VFE) that is on the SM8750 SoCs, which is the same as VFE used in Kaanapali. 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. 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 399be8b70fed..b8aa4b7d1a8d 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -350,6 +350,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: @@ -2012,6 +2013,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 c52e6f7b6294..1e33d42eb550 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4262,6 +4262,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", @@ -5702,9 +5835,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