From nobody Sat Jun 13 09:39:52 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 0844229C33F for ; Fri, 8 May 2026 09:51:14 +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=1778233877; cv=none; b=RXZAC2Eqr868+W2JtWGYiQPREtEOutDGN2DiuFy76n17xyEeCsbIelkk/3N48OJgb8zrkdcgB5zvLtmEtpOI7QGSyV+U/ZSUwbwb/NnjXMklVNehLvUo6BqWtVKaqTuHYZ5tb+kloCO574ECHRkS3CRmmvog0yRyW9cCY8vgN7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778233877; c=relaxed/simple; bh=yzzW2SwHv4q2ffYqY08vlOVRuyRLTzOv7MHg38tRzm0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nm9EuckPk4ktBfqQNAEoaQmsghiy7SjUxtBe1AFNrGl7fWb0BLB7TJmEgV8JRyaFytu+AWirSz/ZiDJoDDaOK6y4gBs4MNe+lP1FgnMYIL2CocHROX8GEFa4wtTQHGMAjqzNLz8PHDSMSLwNi/PhjK3eRccs/++2MaGiXeDydvA= 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=cBRJxVrS; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ao1fyeWP; 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="cBRJxVrS"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ao1fyeWP" 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 6486jGVL257891 for ; Fri, 8 May 2026 09:51:14 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= imOdNyB7v7A+SeTPaOqbazsOZL4HXryEEhRC84sbyk8=; b=cBRJxVrSh+tuMbsB zEj/zFpCH7Kq81Iaz7pMCiuVG5dzU/ae0/RflufxzOjKlQl5rykcZuCBHLxjZRXU kkYKyAgZ5P/VIoUGl/HuRdVuoK3wxHZJaLssQRi0uwZIqvVr4tqBeCcPhnGpOHs8 c1FSN4wYoGEtyom+Vpat6Zy/cJMRQJonFm4aIvCNqaXwhIvi2tWQYoCbcYH8sRzn Cxv6AkwRyVOLY+iScF6dUoNIYi9smNbjwUO5LwR/jibfGdFGC2CGtTKG4SfsdnL6 7abPze9tRwk0PUNl909i5JWpsn8haUl8NNlecKYPzJiYybRIBB7YpYX/T2tjKD4N yoaOTQ== 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 4e1auegpgj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 09:51:13 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2f3eb8f3419so6978316eec.1 for ; Fri, 08 May 2026 02:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778233873; x=1778838673; 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=imOdNyB7v7A+SeTPaOqbazsOZL4HXryEEhRC84sbyk8=; b=Ao1fyeWPzFshRfUBOORCx+Cw/Bb1qqPBj6WguVGZ/5r5LOwjrlDoV8rLK0lWcL6I9V W57HAbwSg0hF8i7IYOJidLo/5h9+8uqYULeR12Jf9Gr4nU9GjEaXum7UpL6CejvYVQCq c3uiTEhToO253qe/CEj0C3/qjuGSGo5mwVJHI4Vqs70ZmdOt0wxPrqtZMLPDk9pJMT3A igAeyuo3lxmH50mJAxEKo9/pchc2sTX/tVOP560wWhrhCjlXfvpqVAK7BNo4Bm/mnTdn 4BUnzfpmugEjD+CWZOAeSHtr3IqEv7Td94WtEzAff6BAyKv7pJYklBtVhkpvvtLaMPYx zB6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778233873; x=1778838673; 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=imOdNyB7v7A+SeTPaOqbazsOZL4HXryEEhRC84sbyk8=; b=ZoJHrtPv485sKtaVxKfOvqGHXUBYNQ7u7Qr4s3nqRyBA++NYNPQfHC9YWBCQ08l5yb XsiZldneFLkEs+aln8oo1wIXmFOEHCNCvMCvFRb86izwzyKUczIDmnq/V1CLp6ZTxFty WwplkBnSK/kJWni4xI5Nwguwro5zUgWjBa98lue9Miv28oT/en+KTScPt4JAiIKst8wo 2HzTCYYmk6/jxLPGWJ4O1KB/xZFTARJmsyOv8tm2U8MGM2b2Yf65BrUV6DaBTwX/wOaX w62SaLaYjp00qsD4DzKAeMECqqLhu7+jVxxhN5KaHH+F72XJ+p0MtRZeFc7sTdsRb70W tk0A== X-Forwarded-Encrypted: i=1; AFNElJ+cCQY+9uimgy2dmOT7lnwDlvv11e9pzITA2MRdQTwcDe3Rjxkqaz74gcGwlUdPxkCH5519bZImkhZla+Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+pLPRiVzkYO9a69gW4pxpcUm7Y7xAvfJaxcf1TdDtZ8twgudh Xr4t6qf3BF3U2bXfxHJlp/L2KjJqKZHRxh+pmhR6P9GmR6utgs8Ti7O8ZGBb815qHCxS6WBIGk9 d/fFBgklAnxjlYgYKMKhGIoSrVGfoF9J8sFVOsERdt8d8WhTy9cHcOz6h7+zxTEylPaI= X-Gm-Gg: Acq92OFdHNx5jlJR6Qa20mMjUzLbwQ3C6ry2bj6b8HuQnj1c+b6W/fYfBDoR+SpTd5m NU3DKIDuOlGtob0VVsz2iot1imsxA8miL1sTZUS2x77OV+CCA9AVjLr/keh4uP/d4yHoRQ0ROJX hKXkEh2QJ1gFu4VMWoIo0YD8qv1xnNLIpJm0eIudcVgczBXgxRcSWkBnT/fHJ3b6e/7HfooCvMW JICWB9d3ISu54MsXgiv0lWKJHe/YH2RmTGmc16iVF9953T0gjJ9rCd7bjs3mkr1N7asmXUXgRdc KjDKrXdKZ/VRiRkt+7i8o+X7g1V5BhD3JpKsJupgIJ4LXJs7pOa1UGfc5rjYWmbBsdMy52mjcKu YfesDkCxhbqgyudh7Ge/z2jqMNMuj9Xvgcfa6TIyUOdwZuItqpG3n+Csv3WFab0Ri1CRv2oGmEi rC X-Received: by 2002:a05:7300:e527:b0:2f6:9cb5:6c27 with SMTP id 5a478bee46e88-2f69cc4b74bmr3111675eec.21.1778233872924; Fri, 08 May 2026 02:51:12 -0700 (PDT) X-Received: by 2002:a05:7300:e527:b0:2f6:9cb5:6c27 with SMTP id 5a478bee46e88-2f69cc4b74bmr3111663eec.21.1778233872337; Fri, 08 May 2026 02:51:12 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f88847502fsm1739323eec.14.2026.05.08.02.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 02:51:11 -0700 (PDT) From: Hangxiang Ma Date: Fri, 08 May 2026 02:51:03 -0700 Subject: [PATCH v3 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: <20260508-add-support-for-camss-on-sm8750-v3-1-fc6861a65c67@oss.qualcomm.com> References: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> In-Reply-To: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwMSBTYWx0ZWRfX5D5B77iShTrj u8zsBjmX+kiLWKjpg99STd2SmoSZGU95QyOKY/UWX3U9GXk9wTeNxHTNCkoWxbPXKwFjfGnGA/B G5Sr9W1OK/K1wnCqBwYNRQOn06tAagrkQ2dvme9hOCnAefWy64NpDw5yOfX0p50BReaehJNpcVt 0XxHxN6lRa2rzR36IBvElU24YACbvYS8aeSsHxGK9Cl70V0PboazVhiox6IkkIFFlV0ZY5HO4ZK IYqjeK+dwWbANSWtszRO2LQX24TfGyaWcVZ32IOctL1ZJ6SD/KQqPGtOkwcI77ZEAQwr2NfE+o+ 5OmbIyXCWX6X8Mtp3pYwAIQGVqk2mi0hrKP4peuGxfJoYv5wT2+kJs7UJaPA8baOrn1B+lmFzz/ 69gdGCs6cqAnggeCOexgyB1L7SrlLB9MCpMTYSeLE5ryvMuUxsOOXYcUPuAs85liW2XxCT9EPhJ xbZY6Q8jrqb1BOqcDfA== X-Proofpoint-GUID: yciX38wpI8OVsSKuErDnyUGWMfpTGX0i X-Proofpoint-ORIG-GUID: yciX38wpI8OVsSKuErDnyUGWMfpTGX0i X-Authority-Analysis: v=2.4 cv=fcydDUQF c=1 sm=1 tr=0 ts=69fdb212 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=gEfo2CItAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=rVt-Ozra7OWOKpRw1cMA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=sptkURWiP4Gy88Gu7hUp:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080101 Add bindings for Camera Subsystem (CAMSS) on the Qualcomm SM8750 platform. The SM8750 platform provides: - 6 x CSIPHY (CSI Physical Layer) - 3 x TPG (Test Pattern Generator) - 3 x CSID (CSI Decoder) - 2 x CSID Lite - 3 x VFE (Video Front End), 5 RDI per VFE - 2 x VFE Lite, 4 RDI per VFE Lite Reviewed-by: Bryan O'Donoghue Signed-off-by: Hangxiang Ma Reviewed-by: Krzysztof Kozlowski --- .../bindings/media/qcom,sm8750-camss.yaml | 433 +++++++++++++++++= ++++ 1 file changed, 433 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..fc0550899c07 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,sm8750-camss.yaml @@ -0,0 +1,433 @@ +# 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: + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms. + +properties: + compatible: + const: qcom,sm8750-camss + + reg: + maxItems: 19 + + 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: csitpg0 + - const: csitpg1 + - const: csitpg2 + - const: vfe0 + - const: vfe1 + - const: vfe2 + - const: vfe_lite0 + - const: vfe_lite1 + + clocks: + maxItems: 35 + + clock-names: + items: + - const: camnoc_nrt_axi + - const: camnoc_rt_axi + - const: cpas_ahb + - const: cpas_fast_ahb + - const: cpas_vfe0 + - const: cpas_vfe1 + - const: cpas_vfe2 + - const: cpas_vfe_lite + - 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: gcc_axi_sf + - 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 + + interrupts: + maxItems: 16 + + 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 + + interconnects: + maxItems: 4 + + interconnect-names: + items: + - const: ahb + - const: hf_mnoc + - const: sf_mnoc + - const: sf_icp_mnoc + + iommus: + maxItems: 1 + + 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. + + power-domain-names: + items: + - const: ife0 + - const: ife1 + - const: ife2 + - const: top + + 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 + + bus-type: + enum: + - 1 # MEDIA_BUS_TYPE_CSI2_CPHY + - 4 # MEDIA_BUS_TYPE_CSI2_DPHY + + 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 + #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 0x0ad8b000 0x0 0x400>, + <0x0 0x0ad8c000 0x0 0x400>, + <0x0 0x0ad8d000 0x0 0x400>, + <0x0 0x0ac86000 0x0 0x10000>, + <0x0 0x0ac96000 0x0 0x10000>, + <0x0 0x0aca6000 0x0 0x10000>, + <0x0 0x0ad6e000 0x0 0x3000>, + <0x0 0x0ad73000 0x0 0x3000>; + reg-names =3D "csid0", + "csid1", + "csid2", + "csid_lite0", + "csid_lite1", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "csiphy4", + "csiphy5", + "csitpg0", + "csitpg1", + "csitpg2", + "vfe0", + "vfe1", + "vfe2", + "vfe_lite0", + "vfe_lite1"; + + clocks =3D <&camcc CAM_CC_CAMNOC_NRT_AXI_CLK>, + <&camcc CAM_CC_CAMNOC_RT_AXI_CLK>, + <&camcc CAM_CC_CAM_TOP_AHB_CLK>, + <&camcc CAM_CC_CAM_TOP_FAST_AHB_CLK>, + <&camcc CAM_CC_CAMNOC_RT_TFE_0_MAIN_CLK>, + <&camcc CAM_CC_CAMNOC_RT_TFE_1_MAIN_CLK>, + <&camcc CAM_CC_CAMNOC_RT_TFE_2_MAIN_CLK>, + <&camcc CAM_CC_CAMNOC_RT_IFE_LITE_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>, + <&gcc GCC_CAMERA_SF_AXI_CLK>, + <&camcc CAM_CC_TFE_0_MAIN_CLK>, + <&camcc CAM_CC_TFE_0_MAIN_FAST_AHB_CLK>, + <&camcc CAM_CC_TFE_1_MAIN_CLK>, + <&camcc CAM_CC_TFE_1_MAIN_FAST_AHB_CLK>, + <&camcc CAM_CC_TFE_2_MAIN_CLK>, + <&camcc CAM_CC_TFE_2_MAIN_FAST_AHB_CLK>, + <&camcc CAM_CC_IFE_LITE_CLK>, + <&camcc CAM_CC_IFE_LITE_AHB_CLK>, + <&camcc CAM_CC_IFE_LITE_CPHY_RX_CLK>, + <&camcc CAM_CC_IFE_LITE_CSID_CLK>, + <&camcc CAM_CC_QDSS_DEBUG_XO_CLK>; + clock-names =3D "camnoc_nrt_axi", + "camnoc_rt_axi", + "cpas_ahb", + "cpas_fast_ahb", + "cpas_vfe0", + "cpas_vfe1", + "cpas_vfe2", + "cpas_vfe_lite", + "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", + "gcc_axi_sf", + "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"; + + 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"; + + 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_SF 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>; + interconnect-names =3D "ahb", + "hf_mnoc", + "sf_mnoc", + "sf_icp_mnoc"; + + iommus =3D <&apps_smmu 0x1c00 0x00>; + + power-domains =3D <&camcc CAM_CC_TFE_0_GDSC>, + <&camcc CAM_CC_TFE_1_GDSC>, + <&camcc CAM_CC_TFE_2_GDSC>, + <&camcc CAM_CC_TITAN_TOP_GDSC>; + power-domain-names =3D "ife0", + "ife1", + "ife2", + "top"; + + 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 Sat Jun 13 09:39:52 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 8BF71384239 for ; Fri, 8 May 2026 09:51:15 +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=1778233879; cv=none; b=aJbW9f7nPO1rAq3t5gH0iZM5CR6UG22C3ibBmRaamC2o1Jn3lu81F8GTgF1P+HETiXkpnudxDv6fh6iisAt/20b7HyUJlWf9SuvVumYptYEX463B4yC2K1LUbdfr2vfrIYgho86oi7mLO+thjWn/zTlvRyN8oGFGs7JphprB2s8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778233879; c=relaxed/simple; bh=A9+mTcBSQybwQWajAHQd2dDBgtkeNZu/YRICsAQUe1w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gXkcIo8RkOhynBcXfkXQWQQZhZCGMSgFO3tvEg38apVt0+CdyfZHE6SYgS1PQGYQ9HOMCgLYrf73fHhCUbQF4LNRhBwAO8xbokOcP4EfFxptzFd9fAEIxMLknrVwu0fWilhfJ2K7ApTNnewIVyR5c/BUT9h1thaATLEEZglfiik= 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=auGDeqFD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=H3fFwgy0; 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="auGDeqFD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="H3fFwgy0" 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 6489NOoh2770881 for ; Fri, 8 May 2026 09:51:14 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= TtN2Hj23wPRHyv2TVHUkVRACaL0lMfhM10EaRoSVv4M=; b=auGDeqFDFu9eM7Kt 4qiovqKhg+NZglPDjTnQs6xCz4akTnzidSOj5QdtJIq3RlTvwveUV8sas69segEn bRR+yBXgDm26U2kJ2k3El6ovDIAyTN5CFYn+tDmQ4EAG+PmgClay125cEGZ9i6SR ILw7gN6utoTbsMbcDX3Li00EHPUz9MsLQ/3zb1pNOsWO9ZMxsXhqjhClqg+iJa7L qScB4aLKL0/dzNpGRpFz2bJ6h1x+QqBwL6HxX18t4imrSuNN6+h8mogfGs2h5EHH SXDuxpWknzGe24WUHWzK6BIP3VBYzH+9Lgoa3Jdqp/674u+jsfuLkP9UCDBq6V4r KM86lA== 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 4e0yt5k3n5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 09:51:14 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2cc75e79b97so6690622eec.1 for ; Fri, 08 May 2026 02:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778233874; x=1778838674; 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=TtN2Hj23wPRHyv2TVHUkVRACaL0lMfhM10EaRoSVv4M=; b=H3fFwgy0GL9paj0M5QB9oGGHCapaJABYRPEQxRxWuT642N94xGlkFL3nhUTQkfdy+q /CpueaW+Mo1ZdV5rYtthHS4M+J4YqoGSINnsSnUtiu5vj1zNEnmBLHR36tCVffT0fJQH yCWnBh9E6n+E6NwJXoy73hPc8D8/QdImAHYxvrL0eh8Ns6UlrwNUnCZTrn6jQw0Li6Eb wd/jQb9RKs1loZHdqOfXqzvZYfWtJsQ4GoIrLIxrmpvpMZlyzWuITcwfUqnYRhxvzH0e 6rcy3oebqm9mM/kYpRZV3gn8VhHwwFYiWGNRz5qq+ovJeYwyGsnMnMUUpmRDKqRv4GsV CudA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778233874; x=1778838674; 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=TtN2Hj23wPRHyv2TVHUkVRACaL0lMfhM10EaRoSVv4M=; b=aQO+HlhWrrIl0+mO7r4VIH/yuvLGKMg9+YRIZ8iYqzVO8NMDIdZkI/q4m8EyQdRwkf 6nuKsTXGllynLm5MdYezBkd/8fVans8Xe46nK4EXu/pZ64n+gcWy/dEa/uGe8PYu5mPq zAtjiXfbUQDC6iOOmdVhM4v8sN9unwi2NFLVoyh978Ot3YiIWZsrqm0yc6NSAoflj4Ja cka+XuzrFV8ZDIDLGsV2V6Sc2QWKOFGhH6lrrmPBOZKkSdtgUhBjkhlsnJMcekJyGQ11 rGTv1t5wkjczQ2ahOx06MI7lvCY9K7XavsqiCPbkbN3+u7VyPs2oe2wz2ViRl099NlBJ 65/Q== X-Forwarded-Encrypted: i=1; AFNElJ8pQY1MXthh8w0TZ87zGt0Q+1cdvTdJKpvJ6YTpK0t2HSSmkeKZhfccidS1eG+18oIqi4+7qqlOwHBV6vE=@vger.kernel.org X-Gm-Message-State: AOJu0YxgMX3LRqlH1nKfbNkcjmZG8+8/ARncFUJUBGGdLVh/zoynRsXs Sy9hqPTWKYBU1k1ntM5iiUkQWAI3ABAeIUPxAAZl9NXIYC4JYoS9NuPO/+30/W04OzvT0IzWjZ2 eSDH2GcjDB44IttBqj1kcFLKJGNtUUItg4Y+yOxagJ7pdzB8PFV3EzeXk3sMchSMmqAM= X-Gm-Gg: Acq92OFzI3jOeaak5VKhIXclo41o48Fjw2V+o+N9LmEAcirz0jjaOvNir4oEodFXuF8 Haghmc5mr/SWgZtaYtzNhRNf5PKgLhcTM4EV2r+CiaP3b3vr3diJQmzu9sLbmzN05p+S+iTR+jj bzaAX6iggWdKR2yMOW70e74IfhmQekQ9I/1S/jT+msyv52JHBb4UrtqnbY9MBbDgMk/pmiZnF8b ANYU1gKy6ZQ5gT6GfXNXFBR+Rdcnj3WrJ+BBpaUHE1EsgAffRjD9pKWcG3nHATMDL5581bjOCZk wn5EqhoaZDVfpGIC78CD3IBy6Dk4Od6TldbmixCCvYyzUfTkIZQKTlVxNSjiIUQYxbYB65ukL6F 3eTwJN0FqPLhE/JMRD0bZ344LARp9YadBd2FX4lN5P221dyIUEEMCxf/sa07tsarmB3kH5hxfem TdCnRwZFbg1Ow= X-Received: by 2002:a05:7300:5727:b0:2f4:3a9c:818c with SMTP id 5a478bee46e88-2f54d678d74mr5935416eec.29.1778233873583; Fri, 08 May 2026 02:51:13 -0700 (PDT) X-Received: by 2002:a05:7300:5727:b0:2f4:3a9c:818c with SMTP id 5a478bee46e88-2f54d678d74mr5935394eec.29.1778233873070; Fri, 08 May 2026 02:51:13 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f88847502fsm1739323eec.14.2026.05.08.02.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 02:51:12 -0700 (PDT) From: Hangxiang Ma Date: Fri, 08 May 2026 02:51:04 -0700 Subject: [PATCH v3 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: <20260508-add-support-for-camss-on-sm8750-v3-2-fc6861a65c67@oss.qualcomm.com> References: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> In-Reply-To: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=Dc0nbPtW c=1 sm=1 tr=0 ts=69fdb212 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=gE60Ov1lhapgyOv8Ur0A:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: ataFdhEKuDrmW2ilufLuVcoPWEhcg8xZ X-Proofpoint-ORIG-GUID: ataFdhEKuDrmW2ilufLuVcoPWEhcg8xZ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwMSBTYWx0ZWRfX+Tl4W81NICIj lQ3GStjGV6/zlGt6gveuJgRP/ZCTRv27q6svO5qvKXdp5IMU1OA1oJXf1l9mkBzMQEqKg+HoXbx Qwt+6SkpP1YNX5myZB9AouJnJYurP6VAlOFzB7IjCvGoqYrLDs6cwI/p+w5Enb24kz/EAoDOA56 68gnpkOYWCrmTx/N5X9dLztyj4sbq1drHSM0p3LQXYNjgrt4+IfUQ0n3zQeZT15C0K3/54aDWcx RlU7IbwVGFtljCqP22mAHyBZ1joLpVbNXBTETaVi6PEkCOb2KomK6BoN98lu3kGT6Uo6ZsAZGLr SnpHJ1l93tLYcyAA4Syaf14dz8Rh6em6W2x5NRN0R3Y0oxogn1qhwSsjJGfpI0nQXG6upGNGZop pZDcC9inyQBMpr+HFSm5J4tK7hDjzRunWU4/b9wVGp7qjIGjqhsMrBHYtJV0ZVQ9n5BpVTZio4V tWk2z20/cQeGkjfDBlg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 phishscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080101 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 04f04d0c2fc7..3cebce812c58 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4238,6 +4238,20 @@ static const struct resources_icc icc_res_sa8775p[] = =3D { }, }; =20 +static const struct resources_icc icc_res_sm8750[] =3D { + { + .name =3D "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 "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 */ { @@ -5660,6 +5674,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", @@ -5692,6 +5713,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 Sat Jun 13 09:39:52 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 58B243C5DDC for ; Fri, 8 May 2026 09:51:16 +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=1778233880; cv=none; b=OX6mbvLFvAFdNmARmo1pPD1FvXUE/9XjjA6fPvSFqIHa4izxbFu7CpeNBC/usq5ITiXgoCyc3E+S+kRZ+uIBVviBiiMq1kE2Tec+z3thkg7+B1Syl2ErKOrzHfqfCDEGS3jzkO95NofRkPJYty0k+LBmqiD1tp40yLBSexcn+zk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778233880; c=relaxed/simple; bh=qKzjMJqkdl0UrZ1tsHcMhHcQFeJyK74aki59dbalElM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uPS1gIAsJxwD1gbKr6OKAZEdWoq5rqo1I/1zgYwoBpayw0fusXuwxaePvvJHu7WDWmpKHzmRbbBpbWDREiKiNq0ari7pMZcpQXYfv64YMJVQppQZgOnSq1uqF80QqzFJkcwM+OVf4GzVSi5CSnRAC0V2XXXfOi2l6xogctm2+LA= 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=PLnsCxw7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NbBYMCh3; 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="PLnsCxw7"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NbBYMCh3" 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 6485aEdp2199588 for ; Fri, 8 May 2026 09:51:15 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= e2oupfZMutQOqFk2sEilpEuCB8it3QEHPnT9FmkvAO0=; b=PLnsCxw7cHHt3ftJ MTV54WNdyXsOtn+Nkrm6g5WslUjJYrdb1FbSZ8Ccd81ZDHmDH8mml3OyW0C/jK6k FFj4KJTMv6BebHRG7vWY3M0nGvAxixGjrbX/PdT6qLtZtNjuSuIKc7cKYK0PiLsk 2fbpIKge0lbRser9jaw8fripEJjbSckzsh9I9Sgb8QmBCaXfZJj46ERoQ2k/rgUc UG2YBE1083KbdufYPFB8q86VJv4Txd2Vgo23hN75iumvsEGUqCMaI4oZQVFrJyVA aDuy7E7x/QmpNQ9jdqG5dnGKctjx3u0zGGRqzrsKp5kek9jpvBFjsodnLjs/vAGg XdRtmA== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e119sjqdn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 09:51:15 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2cc75e79b97so6690681eec.1 for ; Fri, 08 May 2026 02:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778233874; x=1778838674; 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=e2oupfZMutQOqFk2sEilpEuCB8it3QEHPnT9FmkvAO0=; b=NbBYMCh3gmcB1oJRpk0zmE7iRj+d57u6z+lIyb7iXRz64L212CftIEVDm5OFrdOm9e P6RqVHyQ3NFppF84/XV5tB/MkoFS1k6Dc1zQUcB8s5dwNBXbR2He8wsJc19Z6OFguIdO WaPPjXJ4mk+5IUE323wIUNx3hYwuKQQcii4CUJYAU34OeBCr1U74EdejcVd/L8D+EqLG moy89nvhmr+pfZApsO63L+BrkooFp0jKYmnNXcmpxqI/1tkzvjDni1wRFGFxiyBPgJFw gWynkolPIjY1pgQ5YIwpCB0bgvRqWbyXY/B3FqqD84r2crU2J9cjvOxWZH39VD7+qY1P vg5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778233874; x=1778838674; 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=e2oupfZMutQOqFk2sEilpEuCB8it3QEHPnT9FmkvAO0=; b=lXgFv5HG8cxXTesggRriEOQwn8k28/dMOflr3DuVzgXhYEw21TxSvXFBKmmmKyZ9Fl AxXCDvKfLgTgm5fb/iZ0vah3wgDaFjnEjuYve1uZ4osUy1wDExvrkLtsXwOvB7qN3tPM z7SoEhkMvjPTbLgcQHsPHOcHv7qEI47EvC0voObatso9V/gVwy8g6bfAYzo92xsjZORP wyNkkaWcVR6RVeeYqv4Ib8qC1RvIG20w7g7S7XEoY7BGGCejh82Lowq+DZn0KGkDaMjU NhtmE1puSH3sC9eoMXH+Io3n2nNbjfbTeDxc7+zVj26nMEiwpIZfQatB29F2DYTcvWEO vnuQ== X-Forwarded-Encrypted: i=1; AFNElJ89rkEYsmBpuUdTGDHyfXodrMOis1gVjvcRY4XgdiShHnc4I6dw0r6rOwYF5+RjaP+YujljZVYbPbazZYc=@vger.kernel.org X-Gm-Message-State: AOJu0YxgoIkTrc0fCaw+ZoFylzQmpDMEIkkwLEHesalhYzp6YRuM2fGW HfYdjx9kw7TPZMiX7SeUxQDII+6o3vJOw6Tn7d/lkrgubK33Scs9GzjAiiQPLHn6Gpz8mU1l8ML 1m8PABPSxdpwHlnSs1GGVtnNNRyyUQep/AapvAPoePqqgIzx/ECAMAlQRZKADorXIPSw= X-Gm-Gg: Acq92OFSDreGI2+Uf2XfdaVfjDAr0aGtIoV+72NEu8UD2Xg4oVOmS28VRlNyVJom3gn u0i9i3Skd3ipyhFdEiWxGgrQppHeQw3GjZlUhkX7tAqgKn12NbxgvH/GQOEIyOQyodl2pniLa4a S6LXFpZuop8Qkd835IxB1f/7SLQ59NigHk8N0arhBun5hg+Jn4zzDCNYJB9cMcVAOkJMJigqLMk XZFnNlQPMdwdT/yojT3XIhfSSOCv3EeN9NIlRmCAdF5PJuZgOatDMynG/4lt+hWvXI+NTZdQtZT iHmlpt1J+8MYo2ZMBoSZ0ikn8bUkpwDxVgB2/QIAG5Y5nelIZfhNhcvZCUv7X+xrL9pIWrd1Urk +z/yaLR7rk9Gs3OzJ8Lp6JVqwW31fR2IfxSfuxI+UNHw94xQrhZ982OfNfuYPLn498Yu0muREcG bL X-Received: by 2002:a05:7300:a987:b0:2dd:c066:bf7 with SMTP id 5a478bee46e88-2f54b360d4emr5595926eec.11.1778233874257; Fri, 08 May 2026 02:51:14 -0700 (PDT) X-Received: by 2002:a05:7300:a987:b0:2dd:c066:bf7 with SMTP id 5a478bee46e88-2f54b360d4emr5595907eec.11.1778233873698; Fri, 08 May 2026 02:51:13 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f88847502fsm1739323eec.14.2026.05.08.02.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 02:51:13 -0700 (PDT) From: Hangxiang Ma Date: Fri, 08 May 2026 02:51:05 -0700 Subject: [PATCH v3 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: <20260508-add-support-for-camss-on-sm8750-v3-3-fc6861a65c67@oss.qualcomm.com> References: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> In-Reply-To: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwMSBTYWx0ZWRfX9uc1HBluBBhY 9agtku1oAQvFzvVIiwTe+YIASIAnT2N9CYGXuUtNBkYegErD0Gbz5PJdIYxzonlyiHp/hKDpVB1 tsb8MJl/e4NkJBON9JAB9zPLMacR2748t7uLoDtZcNirskgmBmqFDX1QSDG9rpuP4ENbkaJOhCH dgElCd+1N+gnQZXILHRm3FibWwXWzynXJJuTFu5Pt+nCLSI+fETS4U3Dt7kkVerQ7WZXooC29UD 3Q8csW97TrYnzBL0TQMRXSolzlVdVy91l050RZwNK4V4pM/fYmbHGtxGAKavqO2nBzJsWt+7i1G hZxr+btKuaQlDlvxQzd/2iAZlVFyWpKFk+Rw1GQTm4F+y1jumJQARVjkqTLAQfUyy+OdA0opcd3 PnZhA7bdwCxNJOj9UfwRjLUfCeh79O6jYNLjCbzjEhMg6ZOlMeLJeV81Jo3KFsjYR9j5IGEndJe Jm+jvm0WBNbjdKrHgSg== X-Proofpoint-ORIG-GUID: gSC75u-Zc2QDGILhD62zbUPpjEYWwp6R X-Proofpoint-GUID: gSC75u-Zc2QDGILhD62zbUPpjEYWwp6R X-Authority-Analysis: v=2.4 cv=Dd4nbPtW c=1 sm=1 tr=0 ts=69fdb213 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=UiSUrLz6K6kVaq6zp58A:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 impostorscore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080101 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 Reviewed-by: Bryan O'Donoghue --- .../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 3cebce812c58..6b7c3160e285 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4238,6 +4238,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 "ahb", @@ -5677,7 +5800,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 Sat Jun 13 09:39:52 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 0A6BF3CA4B9 for ; Fri, 8 May 2026 09:51:17 +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=1778233882; cv=none; b=hT7X+V5wD6Jmkf0g3WuiHiUY1lwuHTDfL0UrrNMYShgadUZ4ddwrlkX7c7tvgtGGskbcjQUqNaje1P4bkrtqeoGj05wGuD4Tk5XIgajcwZeCK5Qmw26xDgNjQ+qD91xvb72Ec78UBsiNbFq0pBpFyNGt4c5zl71zLkm83bMUrlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778233882; c=relaxed/simple; bh=bCKWRoddU/roze0pwjgQsiENFmo6tGkOpQbD/hwaziQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GZ81Z0wbz9y6BbWNSQ1hMHO3nO4kG/9RnvaP+0y+gKoppSF3WXQ2i4fbaXIUc972mbC96Wbzt4fUWOOhq5eMplTpZgeX+Uwi0mWv3VjGmXTtwkn3HmxV7TXzkhwQKwhPDa7abiJTvKOhM6cSPPKfR8tDVCluxy4pUy6eHe+iOiM= 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=h2jp2Z0U; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XfZCn0/c; 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="h2jp2Z0U"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XfZCn0/c" 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 6486jGVM257891 for ; Fri, 8 May 2026 09:51:16 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= p7+or6ZVIoczS2xwaevFuGqdplfXjfJgGLeQk55ZLZk=; b=h2jp2Z0Uu+a+ptEf NjlV3nxJSMD8jiPJNxwI/m5f0MA9IN8fUbbQXGrDIi/Hs6w3jaCDeMHYLxnheA+T 6eRkbkKt8/9LZxAmt2Y08FEjaB0b1TGgJlP/uwPveubfu4HHUPBn0yb4uPeNPAjg W+pOeMfHUwZj7fQjlN4DmiFDUq+4gY4zyQt6mfJAMrAcp1kuMIQwcWYT8hcqt54S nduONkogA6uSF/4wCghUhlCjxaVsX0YtVYMvHu9tzVf8gVHas1wnNx/i/i+y4BzV cdliBbikVnTHV03hjKgG5JwjshWS4YlmoTu2AamueMcOK3Vek+GIr4HM0pqmaxxW 8FSGfA== 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 4e1auegpgv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 09:51:16 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2ba8013a9e3so3090654eec.0 for ; Fri, 08 May 2026 02:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778233875; x=1778838675; 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=p7+or6ZVIoczS2xwaevFuGqdplfXjfJgGLeQk55ZLZk=; b=XfZCn0/c2AR/GYNNOKNhVWLaM1DyUKthcrou4tMQTE66yfDiK4obY75l7c8XMtLu3H D1FiqXaZBvVAEHNDR1xpocXHa/hke0lxK8SaoUrMiMmV63XU8JXw+u1aL8xr5LlHgt6V pktiNb8KEqrtw1cXPziIvk6TA5fDb05whRpIgKSxgbWG5YWcECCYpYJuj6uy0n6110Hn PGydx9R7whLbTFq/phV27YkEY5Dm0S5dcIUn8fMw3JPchKPDntffzAbm2/R/Jzs44n8p 6nFXuoWh7l6c3pxQim/aEO5YnF4xBxlCf+wWbN9Y/fvkmmgNqdBQFTROAY96/0BEKf2Y pxug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778233875; x=1778838675; 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=p7+or6ZVIoczS2xwaevFuGqdplfXjfJgGLeQk55ZLZk=; b=HeLBU15FtFXtk3JAIteA5vic7W7ZB2EHA37oY609hTJRHfErZvtwYG78FzO9cMqz6u V09EkMKuH1K9fFsCX8R/M+v2yW9OkqKavzQRLf9r3aH4CWRB4CJBk6ZKibec4GossVyJ rb5TpfRzcs/bwK89eWDxZdfUWwlwhxRxQz4Zi0VzuvCatcfHHefK6LRysH+XhHGzy4WC m0eIiLMlqvEOsKArSsN3z6HW4YyHaVBhmUlb55k+slLFfRFtExBLOJih0bpDT0mAwtCi aPQGSFBR8OzS0VervSd0Tt42VMf/ajelU8W5M5BobsH3abXsGlhKZr0Ok98hGAF+wGCj CdLg== X-Forwarded-Encrypted: i=1; AFNElJ+t9SEofsOWTzuGmwjg+MoVnP5AprGnNFqD7mQ6OXx4iqCl2UZ7SFSD9AbA26+wt0tmM30GncB/Fe1IlFQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyuagfryVDcCr/aV9VQ8j4CMC1k/U7zEzrPRqRPgzCNVarbtffg cgu0zFa129rgu+o6wnqedDpW9AEFeECALenShOiVmrgFgfHbsR3PbocGjvFOObhA7B9Ii03Uk+b /HmlGnFyJDfloW3N4n294CxUlTjchPJ71hjrOf3eGnvE4VlEMBMIfIJHVBQl76ehr/gs= X-Gm-Gg: Acq92OHaKC8mZ+mgf2XHxRyp1rJ7NCz6BdZaPD5+bAB24jZlEnXHo/KhEjWCmKtaxES WwY7wISouEtJchInVPy6lw3RZZ/LaTUL9VmLLh+McU8j1WGnEsUOEtQprKgMeSTfwmAFWQlNkLi jkoADsyUDRPNDEuE/0Fqf9DUdsc/w0plSvFshVrhfCGoFpedVAHIt8kZ1fpautEOxPmQ/xbJdL9 5RIqAFHPDVlvmilYEHj0IyLnqKqk4kMtI7fg5UVrE1gWiHDuPo9+rFOMXBsb2vPkwaUhihFnBo0 vyOAQxNG/Z9W7UQALBRCbuCl6RQvofY25bHp+QjHG6ee7PtP8wWKOjCivP4KE5JNLilA3NIfrf5 c5DOsnm1dCG+uJR1+kqj4+KosTefOKV9NkEVtOGU5+bcroBERlJkVdgSiwxoyhOVGcnsOMzDlmF hV X-Received: by 2002:a05:693c:2c01:b0:2d9:db50:c6d6 with SMTP id 5a478bee46e88-2f54d79b988mr5905551eec.21.1778233875183; Fri, 08 May 2026 02:51:15 -0700 (PDT) X-Received: by 2002:a05:693c:2c01:b0:2d9:db50:c6d6 with SMTP id 5a478bee46e88-2f54d79b988mr5905527eec.21.1778233874523; Fri, 08 May 2026 02:51:14 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f88847502fsm1739323eec.14.2026.05.08.02.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 02:51:14 -0700 (PDT) From: Hangxiang Ma Date: Fri, 08 May 2026 02:51:06 -0700 Subject: [PATCH v3 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: <20260508-add-support-for-camss-on-sm8750-v3-4-fc6861a65c67@oss.qualcomm.com> References: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> In-Reply-To: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma , Atiya Kailany X-Mailer: b4 0.14.3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwMSBTYWx0ZWRfX0EVbxFU9E8k0 aq+V/XyVO3u16NWySuP6wTUsMCUC+4cTEa1AB/WnEX0w7IH6GJmV4yBHYFc09SPMREgB1jsI2uY 8/MgE965I2+cnSdbMga1r/qJCJ85XdCCLc4OHHw13lPkR6Y46PPh9xCvaJUgCCVgdNK67Ghvuip CNZNAVCrHOvO0KNoZaEmydoQHQOG5WD4tRR0wxU8rCF88TBu2gXAP+zBjIeFGJdaT7Swk19SDTH TT1qKtr2+2yri+TcA2CiXIBWRS1D2J68pQbw6JcjXZQxo5Q4XiJOtfKbP5RnawS5s07hyTVeR3c uzthNqAr6lMVxqMVlgiKJrh/LR+XRw7JmuLSoQpwMK8ra6q/te/WT8FjPvlcngziknISxeu0Vue fNFhcXPFFQX11c89b7tdjKYO0kDhndP2XLUYThdruJXtB6TZ33YF4qY8DbBk4oCqz4Rhrot5pYU ZS8NoFHIVEC/uHlPsGw== X-Proofpoint-GUID: VzQpGY3wfojLH4KeysHh3BtO2xLYNcMz X-Proofpoint-ORIG-GUID: VzQpGY3wfojLH4KeysHh3BtO2xLYNcMz X-Authority-Analysis: v=2.4 cv=fcydDUQF c=1 sm=1 tr=0 ts=69fdb214 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=63CfXtnvIBONjkcrFHoA:9 a=Z-sH2BZsVlbqz-yA:21 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080101 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..79eb063000b8 --- /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 port, 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 + port]; + 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(port); + u32 rdi_cfg1_offset =3D CSID_RDI_CFG1(port); + u32 rdi_ctrl_offset =3D CSID_RDI_CTRL(port); + + 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, port); + + 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(struct csid_device *csid, u8 enable) +{ + u8 i, k; + + __csid_configure_rx(csid, &csid->phy); + + for (i =3D 0; i < MSM_CSID_MAX_SRC_STREAMS_980; i++) { + if (csid->phy.en_vc & BIT(i)) { + __csid_configure_rdi_stream(csid, enable, i, 0); + __csid_configure_rx_vc(csid, 0); + + for (k =3D 0; k < CAMSS_INIT_BUF_COUNT; k++) { + __csid_aup_update(csid, i); + __csid_rup_update(csid, i); + } + + __csid_ctrl_rdi(csid, enable, i); + } + } +} + +static int csid_configure_testgen_pattern(struct csid_device *csid, s32 va= l) +{ + return 0; +} + +static void csid_subdev_reg_update(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(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(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(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(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, + .configure_testgen_pattern =3D csid_configure_testgen_pattern, + .hw_version =3D csid_hw_version, + .isr =3D csid_isr, + .reset =3D csid_reset, + .src_pad_code =3D csid_src_pad_code, + .subdev_init =3D csid_subdev_init, + .reg_update =3D csid_subdev_reg_update, +}; + 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 6b7c3160e285..015f511332b1 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4361,6 +4361,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 "ahb", @@ -5801,8 +5874,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 Sat Jun 13 09:39:52 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 94E053CB2FD for ; Fri, 8 May 2026 09:51:18 +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=1778233881; cv=none; b=Szm9SZNcqRdwNGryIJlfM79K4Bsov7MOH4lKChVQ1Cns/maO9eFyTeO98umC5Og9vESg7DlOFQPqaFo7ZZnVmudNXn3pwgquYKlR0vt4pZdQYfWW+YTL+Pdra3BBvQzSmQI6lq9+wjXMgVNl6Kw/exXrw5cVMLlFWEbSoFnzaMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778233881; c=relaxed/simple; bh=Dc648QGSLXsVNwPPGN3ddMFHXiV0r6dAgQxIldMhdxA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rqyXhAVMaSTfTPLyO1bSxoIjg2Sdu2bBqKTvcaZdIxQMKvdTiM4BcfvJaCwtx/tpNxma3HcWz9KAOZOrZhS10ZmHI9iluv0ZKyGH8FYl/wCAyXEmC718FyZiVrQh6OR3asSS4V/6yWwB/YSSFD2SkOS2Ey0YoOOpKeaXSR0fVD4= 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=T8aXy8HS; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=OHfwwpYa; 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="T8aXy8HS"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OHfwwpYa" 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 6489VFp62771491 for ; Fri, 8 May 2026 09:51:17 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= PuXcW1071bYrN3j1a5YqAIIaWaO8lO4D+u1f2ErMbxY=; b=T8aXy8HSPmk47Xrh 1gUvs90kKahXAB0MYOivXvD+/zgXSxbNzeQ21St2JWBWKjFueWsezvNIacqd/eys bZGjn5DCReuErueH3w+kLhJxYey6ZFPgroDEig8Ao9LgLVocK4kWj8G4TfD4Z6Tp rbuZdlWWhhYPFR9QDO6mZfbio0qWFo/KonLOstri5uHFxLnRKLv0plz+Lf7wyFtf oFuChhjnPAtJ2yijwjnPIA13+AOnraSnuDXVPtSHFRgqMCyFOSu1V83xV1oTfSkw CAEfkCd2LdGzpkIs0Hf81O2k72DUJ27iFWt4C6BB8wYgqu9RiwwqnG7iQXZ/BvbY WXOpyg== 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 4e0yt5k3ne-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 09:51:16 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-2eebb099efbso5993630eec.0 for ; Fri, 08 May 2026 02:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778233876; x=1778838676; 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=PuXcW1071bYrN3j1a5YqAIIaWaO8lO4D+u1f2ErMbxY=; b=OHfwwpYaPEsCEUPzFEMQov6HKTsJSp+SSt+JnDFKRFilrkACOfZeubIzty0Hj2iVQL gyAuvQdA3g2UKCa5oLBxmh8ZOrInWp31g18GGbm0i8CjQrOhBApXOtnQIYiBeNUC8bv7 kzq8Iql7N+7gF7KIcmv1ZM5YJki8ZMUTU2d9c+PpF39pdfZ8rWlIvtyOPA2DUHweVRL0 16iCnWzw+rv2gLcsEnq+GJj7hmlrDUUE9km+AybqqtmD0wmM4Ey9GrhHk+RG8kgh+IMZ 2C3Q+DcLDEl/JbRTp00DE+crOpWMuOvkhSNXvyG+tndXspE1WMKzFj6C9X69W3QaUaN1 xNwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778233876; x=1778838676; 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=PuXcW1071bYrN3j1a5YqAIIaWaO8lO4D+u1f2ErMbxY=; b=FMXLSpd5O47rxGtHGnkM/zFfARBo13fMfdLPNN8vG1n5hDe4nkY273hmi1LoNwl4R1 e68vvFm/g1dvUYovPU6kS0k9kYuTnxkP2SbiuBrJk8vGa5XlS1XUS8wbHvI6CVYJeULS OPP+xQE7sJKprg2AG+uVISDomh+8I7FW2LhXfahUuhdtEC4PcPHtbbMMz/4pnz5hFZbx ZyQsmdeK3xgseT/0f/7fub3Mgf7Sf+k4IBpNcnqm78MINH8fBvL1vsgr2ktrc3mICxOp 4HueusDezPccFvY+DaIIvddtgEsQ8fpodnBtwP+T5M9UpbBiV0PqxvevglvHSE9Kjakb s35Q== X-Forwarded-Encrypted: i=1; AFNElJ/ld4A+e4OQDTFiLbwrEfYXXpHt4G7fsaO6wB2dY3UkSpbL3vu/3gkRuvQaUu6dma6ujPkWCn4LApqbpTA=@vger.kernel.org X-Gm-Message-State: AOJu0Yxo0uO/3K1j+6LmfHV6w+97fh7+qFoGzfdNi+yMub6gQR5pjZKW W2jXvBFZVXpWicSy1AgceX85X+kfVWYcXlwRv686RfJbDen931CvbqdTSmZrkqeL77VFXtyizim UOT74aXwdp+PU+eOZhtIfuEDFfZuMfXPcMjCA2On8soYgKavCJ8phBsyC2lDjVCoP+r0= X-Gm-Gg: Acq92OEPDC/RnbEHUCfwlp0La14Brba+R4mqwoPwxA38dLZau1j1QhcjRrir/lMTw7L +vqrQ2xIzzBnBeTO5B/LvZBbDmAhlxrSe/Cke4Etk4MJmhvZPwJzpJ8jmA2Fno+rslcHy10wxwV nVw61tfaaGU45tK6FltAzjKbtpbdf+t/z6i3ph3Wt6dS2eWaEOjpr0d+BhzN76xSx12SaKOAOt/ 57nwGrZOId09PxEtsgEqn8OqQlvvLxTVyJPpLxpmgO/6QJb3RmNshJw8gyBLWHZ5ZyMSGzu9IYg 0JhHaeOg9BJHv8iAsZjnxwxvq9cEyFsO2ajJdCCYIs0mfVMvDY0lfZwR9HIQ7K9JHdIkS2v6lQk 9mgbyRHORVRSK4dGSMjpL8B3rbQJ7VlAUz5WQHvhIByFM5SVDqQ0OUR14UYWisAP/cfNxDTSzzU 2e X-Received: by 2002:a05:7300:3b08:b0:2c7:3a7:c7a7 with SMTP id 5a478bee46e88-2f54d15fe7amr5654889eec.25.1778233875861; Fri, 08 May 2026 02:51:15 -0700 (PDT) X-Received: by 2002:a05:7300:3b08:b0:2c7:3a7:c7a7 with SMTP id 5a478bee46e88-2f54d15fe7amr5654873eec.25.1778233875333; Fri, 08 May 2026 02:51:15 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f88847502fsm1739323eec.14.2026.05.08.02.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 02:51:15 -0700 (PDT) From: Hangxiang Ma Date: Fri, 08 May 2026 02:51:07 -0700 Subject: [PATCH v3 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: <20260508-add-support-for-camss-on-sm8750-v3-5-fc6861a65c67@oss.qualcomm.com> References: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> In-Reply-To: <20260508-add-support-for-camss-on-sm8750-v3-0-fc6861a65c67@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma , Atiya Kailany X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=Dc0nbPtW c=1 sm=1 tr=0 ts=69fdb214 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=3rR15nC7HOTWOJgZU7UA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 1l3I50na-LB29goT1pLNvQFI8q8jhlaY X-Proofpoint-ORIG-GUID: 1l3I50na-LB29goT1pLNvQFI8q8jhlaY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwMSBTYWx0ZWRfX48be1AeFOGeJ jdz8vNrK+FI8gp+uOVgCIM2+E+Aa8SpuW5MIvTuxDnlSVdkZcrdx3/2hTSkR/NaT3KIh1VDTch1 UWXgtUyp2VbEkTxUa1Dlxy2rI17vvWkePHQgaX3sdZ+R7U51ewSUg7nz0EVamUUwz6mTrzv77YO JcZ3wag6UioYZVi03rvt+3YaxS3WyyWHYcXldQQKAIxnCZ3omJrGw9gLB3gTv1PJ5+k7aOuL2nY FdVG5bzlEjjcqhtjf5Plijtzvx8SMkSYDaxXt9smDD7q+mwiBXntaq6QEE1JPX2lDEUMkfNz/4a Q8Yj/7aUds3DiUbMUK454jh9WpEcXs7B2FA6TyyxjdHj8Afo3Sn2P59qZ+GI47r3ZFH5wrE2irl bnRBfisr67Q5nLhN6P6pKyq5vm2ko9PL5+yud1pWmGe2MYkms7DIciLgccnSWHhvSVqnpDRGmOX tF9NZuldPMODbdBsp6g== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 phishscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080101 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 015f511332b1..b35fa330e911 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4434,6 +4434,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", + "cpas_vfe0", "cpas_vfe1", "cpas_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", + "cpas_vfe0", "cpas_vfe1", "cpas_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", + "cpas_vfe0", "cpas_vfe1", "cpas_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", + "cpas_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", + "cpas_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 "ahb", @@ -5875,9 +6008,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