From nobody Mon Jun 8 05:28:41 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 A0A162F1FED for ; Tue, 2 Jun 2026 00:32:29 +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=1780360351; cv=none; b=q4D/H1l3szSqZk0t67d9Abt57i3mJW/kn4s/LNoTGXB9IOMrxzXb23WLg+BeqhSOp/5UH+qzIAhBLpI4XDOmhv09yuJWtU2yw/EHCojlwug0+8KnM30sbYxs68RN6b3J8sMHc9e0EN05NiUe55gH7xedLOMe4KuToglHe957fBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360351; c=relaxed/simple; bh=uwbDSDGDutitxAseFMcJcExm7vD76xU5w3F7hkyxbCY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QU7b0lBd3bJD/w2v+dIoO3syZ32+uqTixP/BlppLBem6KfqzVTIXcVEN7enogZMugPCoTGqmgtFajl8FA5kKaYoNTgUin/upUVfm+4tBiJb/vVTZr3spFrz80mffE72LVQPaqCDnuVf2q/PwiWSzVHFTGDiR+npuQJ4/U5l++Qk= 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=NEEWKglO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Tr3zG6xp; 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="NEEWKglO"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Tr3zG6xp" 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 651GwRiu334859 for ; Tue, 2 Jun 2026 00:32:28 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= Dte5Wrb5j4raUtqO/qwYcv9t8B78yoZ9Htk7haFFdj4=; b=NEEWKglO+gT2xhjw bJaAaXKllbuexdCxsgZcTlvMdPEWBhbEgjqSMTcN9lGRLwGTX6c2H0PDk5eVWyMP 75tetB/7Km5wLOACIGgMMa7RsBPm76jtP+cGzSRgnVmlygtrhqUwNPwG4bBzX6bk JmecLiObbqRMNefxchyjV4J5d53FPbmfgQjCP1rxmZHbkEjZndtUNt8cfDPU1YFR HSm4r5/dtUlnDfVAqcKsQFFz9JYmm28d7bTBmIl04xe32wqaOE8pTrrtBYDPgg6W ORKD87Co0Ig0fgHhje1xsccwtvWGtVtbay1h1ruLx5zE1hobUnyODlz5Ob+e1I9x wpVaqw== 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 4eh8tfu93n-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 00:32:28 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304b8d0ee63so8604675eec.0 for ; Mon, 01 Jun 2026 17:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780360348; x=1780965148; 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=Dte5Wrb5j4raUtqO/qwYcv9t8B78yoZ9Htk7haFFdj4=; b=Tr3zG6xp4FROovRWwcpRhLbnJI7/zXNKZ4upud0ZQ3eWJYDwXKWfUZftKBlBz/3qXN X5QHHHxtJSmP/43mZZLHS6woaC900GuhnGTlNxZd6iKeTauVd8A2Zxv+xIJCRgoy1cAd /IcInktJY71SVypiaX8GonEfTFq3Cg9hnTLdT4dwi6Hl3zesXhmyqcTT7jXK2CZQw+cI x1e9Fc394W6DTF4Fu1hVFP++IT6MFmoSiyGzKRM5dx69JZK8jRLbivQId74mYu/St+tV HWK78+OGNAKlO2/8iPaW0T7CaaPta3ATauihe+Ug0M1Q5/+5SioA76qx6HAFfqNXQXYW Y/mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780360348; x=1780965148; 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=Dte5Wrb5j4raUtqO/qwYcv9t8B78yoZ9Htk7haFFdj4=; b=gqzD2GRcNobqxCoTTcrAjDYpuUSb0Mevdj/OZeBQdBU7nG6WcfjkJrBh6m5rKt93Sj oDdHifV9u2tjIMpUWrAw+wx2SXjThFgSA5olr27+CjZeuOcWK2TIs9BwbpvgiNkDX1Bl 62TopADD+rtiebHajOUyqP0xpPPCyTJFsFpFy1I4Wskf/8OhSx2UEjxbBXdMf+drpdgx THY2BcqEoRH8n8wdwHdh+qv2R/asXBZGJefEDP1emyd4PP0LxmlqaJ/ggncGpczO5GWy MJ4ohR72HoErkSHsvMCOTNfukA0JYbZgYDwEpVZp8CGF68buXFUT3os1CRm8zv3Hd2uS //kA== X-Forwarded-Encrypted: i=1; AFNElJ8w4gMH0YbSMzvMTD623D+Nu04I6Wpnc7MpNp37xLY1DuxS5FzAmQoFP78PjCUZLVQddP3FSkeK9cUlp1o=@vger.kernel.org X-Gm-Message-State: AOJu0YzPhZ/H8PWOX9dCoZ4BlmPJ/DBqSKagHdz4Pphrcf/AqyjWUH06 t8JqlPr3FTJwsbf7XZZ+ICiYu6J8NMH2ralfm7pvJ1KA/YHEYYNZBZIpP4AYwfjr/OuMeabDu8A 71mAR4ZrpOon+1XpK7+mMZbVMtE5rlM8W6vfcqJWIvpmA3Nh+trFV1fq0ocv5oKIqSwtAparo/J cYaCea X-Gm-Gg: Acq92OEc3UG+c9Al0eFkewkfKAGNWf52IvXGWamuiGntadK8yun9ZwpxdaQO/4K7xSw S9UbbNa3bsnBaOis/aJFmgK8wTuXCgLMVlwJk0xI0cCJgP03qF0W+SzObt7iI1PEe4OLCSclAnh 0qMZq00yadLwHxd9W6hDnyN0G32sIURuPFPefOCTmmGavdqUP6WPzh5pPidxGBrAR1LSPNqk5KF RECz7fKM+5veet5g9KLrUu+VgViA5D6R7AvLcOnbYp49kZ46eeQWqZ1bodTKPUGj1Q378qozd89 9zvw3e1Kj/nbCF6D73tLx023bCrf7dmmW/zW3otEdETC4xc3C8wGn0pZjouAzicYfzUfCVW7gsh S5pgc4X3kxHKqkDxVEITRmVRpsam2+nZQZc50AXM9hfeOLAsxE2W3f8wjLA8w5dHcZmfHHjTAav LeCkXD4a/auq4= X-Received: by 2002:a05:7301:1f0d:b0:2ed:e14:42e9 with SMTP id 5a478bee46e88-304fa693628mr6874808eec.34.1780360347484; Mon, 01 Jun 2026 17:32:27 -0700 (PDT) X-Received: by 2002:a05:7301:1f0d:b0:2ed:e14:42e9 with SMTP id 5a478bee46e88-304fa693628mr6874787eec.34.1780360346885; Mon, 01 Jun 2026 17:32:26 -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-304ed563d09sm10070412eec.15.2026.06.01.17.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 17:32:26 -0700 (PDT) From: Hangxiang Ma Date: Mon, 01 Jun 2026 17:32:20 -0700 Subject: [PATCH v5 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: <20260601-add-support-for-camss-on-sm8750-v5-1-dac36a190de8@oss.qualcomm.com> References: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> In-Reply-To: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , Loic Poulain Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hangxiang Ma , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Proofpoint-GUID: _K7vI0CCcapbzh1AsOy32z-Rx_BwU8Sv X-Proofpoint-ORIG-GUID: _K7vI0CCcapbzh1AsOy32z-Rx_BwU8Sv X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDAwMyBTYWx0ZWRfX6XD9sOl5pv7w M9Uhx3XM+Bm0SCouz7ZUA1vyXC9zF+BSVYwieQoO9Z2DhFAnVaC0aClzduNgncJA3HLDsMF1G0C j57aZSho1pAxaC0Bt4iVE4uOTlgHw49g0StOdj/3vKojQyCrUXzo76iXEnvfHA/qi8ppZu9Rk4w wvs1mi8kyUoso4gbZfivh6Yy2xSnbM1y6oatbuOJzlfg30X44fwKxipTKmLZQ7389e8xrbJt796 +3z5Cpf4k9VhUrVoqTGSZqvzt8k9rKKcoXW2a+jhAONRmgnYfhwm/fnUeN9Yb4oEGPYj2+ONz7j n7/q39mvakmkCWX3yT4adGEyolyxLxmeQchjt7tH49czLMFSyAqFlDxqRy/VJShDhReBDqJ/cJ3 lj2HOanLQBOVcumosyBB3vrV038VdSxoTXhGasT7L96IvTA7dT0gJBy2hBjBgUodD3wXQ6H03u8 HTGeKTO7AJRczKlljdQ== X-Authority-Analysis: v=2.4 cv=P4YKQCAu c=1 sm=1 tr=0 ts=6a1e249c cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=gEfo2CItAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=rVt-Ozra7OWOKpRw1cMA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S: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.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020003 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 Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hangxiang Ma --- .../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 Mon Jun 8 05:28:41 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 415D930676C for ; Tue, 2 Jun 2026 00:32:30 +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=1780360351; cv=none; b=pCXh/SFTPDnJ57/Xhx7XEH0b6E21kfjvf5pZq0jSVEOU6cpHdzdg1EsyGAIynlRocs1J3XC80u4VzDkXiVRFjD8M21Du5oTYX9iW6nJbkOp4X60n7Sb+wt63ZV7eIIue7DqIAJGEvX19kOowUKX6PbZ+JODH24HqL4mUqR+8HHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360351; c=relaxed/simple; bh=Ozl5EeXxBuqxv3EqPkK5t0/LMK4hoJjLCYFpbaWf0HM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VHNf9BA4+n3kcBTtEglXGPAEz2W/nfDD5v5yNxPAwBhXqpybFwn7ISs2krQgJLP87Oqcbd6b5+LeR67AoS44ZBPrcrXycJpHopbITopN8WT39eJwiq6OVOo1fw5W4RxRvgZA2a/h/VsGNcSOPCGmTaz369Zcz0+Hv4IjmbXJo3Q= 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=RF5BUdts; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ig1jtShE; 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="RF5BUdts"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ig1jtShE" 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 651HAlX9334640 for ; Tue, 2 Jun 2026 00:32:29 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= 2TNzr3HoHbuhKfUhKh1x8ZLE6HzCcesuUXBRRI2rJng=; b=RF5BUdtsRI6E9o1W 904ivVSNBmnpNYas655kZN3PDBW70EYP/Sby8yNEiSS2tOR2sUblAwrtpw0llLUN VwtApOS0loGSjjwRhSF9CXRLv1VCt3rGAlQ0snP16ohUZeZBF/DRaFEDZq/j18fi kv//r4WlIKH8zesiykcZb0TVR5H6Xtblw+l55Lyn0TiG1WMy70r0aCXMunPowop+ pogw+rlOfUNut0dvzVsKJaOMAx6RWNve35ROV7rudOFqtbZcyEwinAVhaixuIkbL y0pt2Qk/4+d5D1UfojPyER0IYB6xex+l4rzul+6Tpx98IF2t5JizfzyWKj5o+/o6 I/Wg9A== 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 4eh8tfu93q-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 00:32:29 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-304ed777a96so2097589eec.1 for ; Mon, 01 Jun 2026 17:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780360348; x=1780965148; 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=2TNzr3HoHbuhKfUhKh1x8ZLE6HzCcesuUXBRRI2rJng=; b=Ig1jtShEwjNZV4orQRo5UuxQthOX23mXDw2bl1HV/wyejWv+wRD7xXNtdplx0fYFU8 seKGs1ac8p1W0m7XmiEDQMFFL+u+3++wPc5Ajl7Tow3093ea7kH9uizGCLfU5lvtoH75 tLMSEpcbLsQ7fbxC8W9fJT85aktKcZEuXxNKwVE28o1o6PrOUGT0OePdWiEeF2ByC7p5 /lou/PQzLcvJAibVgdS7vpMq5WlgVt8xDpZ8XUGFupvFmjBTO3IdNrFjJnDIRj4V1cM4 GvGhuj45dz32+hekUzO+2qcWmUqDIFDA8WfJfUdy/7TSCR9hRYktbxsJqbuv2RiV7oaI ngHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780360348; x=1780965148; 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=2TNzr3HoHbuhKfUhKh1x8ZLE6HzCcesuUXBRRI2rJng=; b=qXNUSEiHkA0F/0up2m+nWgph/waDMLzxMQXuCl1np1Hawg9pj64CUFLsRmM3p9yoH2 FXfqDmLvjqD0QyoDc06xH4Gyn8abrehfeF8Heq+hsWxfN+8bHFnhNYvGo3TC4rjQI4BA rEqFGclP5aWoBMoDG07ccG81U6RAgN72ri5GGt7GY/pmY0hXtzB/BSYn+hnsmXaLxN5m OWnt+zgDr+efxN52kuZ4imffXx0hOGQU17J8blhWx72IlVtuy+cRLPseP18iAfXx3Nyo f1/DhTPYdy0+gbclA3vKSra/wUxCzFjK4qJyBJXarjOP7fwaWOtg4MEdFENeXszAX/wb e11w== X-Forwarded-Encrypted: i=1; AFNElJ+Awo0gn3E0oXYMXcyFe6SJpchbisRZ8Z1/Q+HvMtmCHOFsZDMh6QPub2Ch9UwoBLjMC32ksoc9AKnziBE=@vger.kernel.org X-Gm-Message-State: AOJu0YxKDNMyXlk5dEtoL02H8uW6YJyBvZLwkKLAA6rzzIfHwxo2nl/7 w+xiMMCZ/nxF0jADSFNR0rkpufnA8iIjkfYLsom9rZEMJGkR34e26zA7einSEZp7snsSwAJvyDs R4JGuXErX/ENYR66fVDyoKz+VX9kgImXr/Pj0Sl7g6H5vvu+7wdVKedptM5pUbAGsZqs= X-Gm-Gg: Acq92OH4qlAxnxAcpHU0pKcUjgwUAimu83jinKra/jbpVIVIS39UhihvArYN6dqWB4z T53bgpaZvr+GfF/V4daIYbg8ahcgc4FQbI33UWzKZl8zztzz8gDkCm52jMN7fQ8B7tRoWU9KmFA WE2668cTEJVKreR9kD6hlVphLtRpsyAEc/LaaH0ysLyTvLexWi5i+JpDqQx7gZ5JQe5nSY7VHKH W+vKxWGb519cfllK0xn4t8AgwW7i3DjFpR2r5d3c8XRV+3PvpH9ibQ/gRxkl4bzxVAhdxMWi04A 7nck3mIZHrMo+h4S4uQOfuewBQ6Ka9uHAzUU/Vnv7o+sQZeu0w5eAFQeqhtxYV0/4i0GJK/Bn4F O1ttOvSxXgY7lW9CFTxvEozIqrEn+d1+R6/g978yqXoeAGe563M9A9VOM2GY8Qh14vRL6I+uFj8 KY/oUUIQkj67w= X-Received: by 2002:a05:7300:4311:b0:304:cd0d:9ea5 with SMTP id 5a478bee46e88-30734ab9650mr815158eec.7.1780360348106; Mon, 01 Jun 2026 17:32:28 -0700 (PDT) X-Received: by 2002:a05:7300:4311:b0:304:cd0d:9ea5 with SMTP id 5a478bee46e88-30734ab9650mr815134eec.7.1780360347599; Mon, 01 Jun 2026 17:32:27 -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-304ed563d09sm10070412eec.15.2026.06.01.17.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 17:32:27 -0700 (PDT) From: Hangxiang Ma Date: Mon, 01 Jun 2026 17:32:21 -0700 Subject: [PATCH v5 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: <20260601-add-support-for-camss-on-sm8750-v5-2-dac36a190de8@oss.qualcomm.com> References: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> In-Reply-To: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , Loic Poulain 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-GUID: bNYjobk7pgM-KL0211gUInXnUgIIXHmt X-Proofpoint-ORIG-GUID: bNYjobk7pgM-KL0211gUInXnUgIIXHmt X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDAwMyBTYWx0ZWRfX/CPFxbFABGij XICdpqHLTW5iqScCKI8PW/2prfMfQcxuQjqwGCNKnuULpzxpITkFzXx7tV2JbNcCeiM9W8fBE8Q 1G0mxlRvMX+6T4vuVMAjQKMxEH/XszQqoyghshPHdzaW3QnBwxCIqKmwN6Jh/RoOt11c/MqyIsI +TrblPdAy6++cTntxh01Q6tVH2Cur2TiyclFCQ6Blu/9SJ6w7oL/8Zus6Gyte56IczQfjNFxxBx KTc7yJAXJ8RPuAk0egvEhHx64zdyUddZ7T7jO77ey/QlvzLRaatlv7Yp4Onf0N7y217InumbXdM BEgknC3pZ02woD36tutBoU+Yk7z0yhjah2QTtPTqYLkI2kkuKId+D4Y0iTyVDNs4RYntn9C/71K 9pV/iOifzJ/fqK+2F1WbSa6nobOs+6YioBiq9F/PDK6gDMNZJQNLjAcBmdfQnDyxsw18HYiShTm IOPLMLbsmiggJsh2QVg== X-Authority-Analysis: v=2.4 cv=P4YKQCAu c=1 sm=1 tr=0 ts=6a1e249d cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=gE60Ov1lhapgyOv8Ur0A:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020003 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 8fed46868d62..834f6c1a2519 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4533,6 +4533,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 */ { @@ -6082,6 +6096,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", @@ -6117,6 +6138,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 2c7a0218a82b..314bd794033b 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -95,6 +95,7 @@ enum camss_version { CAMSS_845, CAMSS_8550, CAMSS_8650, + CAMSS_8750, CAMSS_8775P, CAMSS_KAANAPALI, CAMSS_X1E80100, --=20 2.34.1 From nobody Mon Jun 8 05:28:41 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 5450830B50F for ; Tue, 2 Jun 2026 00:32:31 +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=1780360353; cv=none; b=qTKFs33w4d3+aC/o4/8E+dVMN2wIGohJJzRr5uzNU5qFQZfGaxlP2bTkX8GiY4aGMKFO4mJ+5qsMVb1KLZx14Bh1v7wkI4WEipc57wVbloNnBwv3RZyTcKnaJ43dRXfBvwSjV0jfN8qTI/tyt15Cm6T7JQBJ86+TfPG2wQUTLg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360353; c=relaxed/simple; bh=WMJmbvG3UPc1IPdNbAwP4ZE5xHmhpJuEECJsEbdDars=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Fv3ad5tr7Lmg7mCUa/XgFGtcAKFWx2wXDoQVmolYJb+j2SHV3S+yQCKrzF7RYe/Yl57L3+VC8bBuAzOOI08HNA5a5UL+nL7R2WgfwYBhie3nixdZfNOzvgEH0r+Me3at8IjQ8wjsTzRDNdjabYMEWO6n+6L/jmiuWg56o7bg73s= 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=jd3o1ZXo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YUuazW6J; 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="jd3o1ZXo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YUuazW6J" 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 651NSW4F4065408 for ; Tue, 2 Jun 2026 00:32:30 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= xMgkxod0RTJbF2zXR11uV9q7aNgYn1Lh3BSSkMCGu64=; b=jd3o1ZXo761n2Iq5 zpNKe2A/CYBTKN5QABvTzv5RYPyX3MbeGTavWLW6Edzy+wN3aRrqdzLcDuVC4YY/ w/51kWr2i9cx1Z0liPyqHA+zg8bol2f0A9K5g+Hl5DzaFIZyvSwO3Tb+qOeA87aP t09Ss4gB5mXN1xsqy33DCgJry2T5gR3uOLk8pS//MvmFD0OBCA18zM7IRY47XZ3A 42RjoGuElOyoMJ9dTfZpkBiUZaq0j53I+z5ZHR9NrCvfXoFep1IMJi3ipPRxgxjS /wGwVP6jxfz0ssG2ZifeH+Ba1RxjWu9U81AlMsAk+nQi8EzP8b/7MTNO5RxgTIOj vYmqXA== 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 4eh6swuthh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 00:32:30 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304ee7d1368so3571402eec.0 for ; Mon, 01 Jun 2026 17:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780360349; x=1780965149; 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=xMgkxod0RTJbF2zXR11uV9q7aNgYn1Lh3BSSkMCGu64=; b=YUuazW6JbNXvS5YfezKA1q/TWyO1tcVTfLpaZ/lNFbaSZYtHVkUVJJ47LjUtZb7n3r zKlFW00VkEG2ME9lo4kIBsXPUSPXOA9g6p4wHsjO+hMk9ZTVD3NjLXxuaUnMGRGLpW8S 3QCVVZTCKqWNgjnHE6goT5hkc+AUduGNQe2O0k46ak95fdC+nr8kmBHHlpAk24XC3yL/ nRm3J42gBMqZqZl3bl7/aNYkOYrGxUrLHAhCvzNcoXGMKsGNkxiS6e+geuTDl1d/x7ve uG8j+r+vwJVfYeOQCtuuJhsBnBkU+EFZmrFzRske3hzDVxn24qFgavzaasSLFwdqiWVA 735g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780360349; x=1780965149; 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=xMgkxod0RTJbF2zXR11uV9q7aNgYn1Lh3BSSkMCGu64=; b=qKQ0cMAMCyJc4lDEKJneT6sbFEW3MUGiThmhRNPtRP1x0wzUJ8SB/cGCUQ7/1+NjjU 8gkRkTDm0e74YYKhYgDph2Bs7McEDEeXfWkttBl70iI+AuaLNNOm8+j/1gDiI0wbAxcm YQBAm7WV6yvvfomBaATBd+QW7ZNybH507CJhij20tHbhzAQBpoE4jShHEjTBPqaL90nc zM2I/BC0czGUuOHdTdwq39fOJ9VrQH3Wqc9Wi0n4HWjj7fMC0EMMnVTf0EpCiIHlmmQj DG0BW1DHQYS7zBvgZPZxPw5QcXRq+FH1k78n6wfijXXTylxkdDxi5NcZkThGLbIzfQ29 zqZw== X-Forwarded-Encrypted: i=1; AFNElJ/Dd8YuESiJG0I9JBJbAki+ZiYHlrBEqmN9ISnZFJq5ibeOxlS13xGKxiIIp9BIvnIfinM17LrpxU7fjhA=@vger.kernel.org X-Gm-Message-State: AOJu0Yxgfpx/hvilmmR+iUEYMj4EUAzBLAlopESGgxkXv8PAo7auHeE9 qyD9deJ4PUj+wsgTzBRTr8HW4/aJHBmWyPsgQ50fktjd00StbSYlAoJ3H5PvGdGgdcn0TvSeNHh RxYtjeClhXChWb0etxSY0Eeksp2acLkiPI1WdbbdC+bZ50lMN+aNDHMXoK3mYdPzUBwM= X-Gm-Gg: Acq92OFiUoD0RhLAvPulzxy7lr3kT37KLRC+S8do6czzVK2B3A9k+nkZtMOn3LEr+k8 5Xqu6IHSPoluDAHMhaqVzoVlgnM2z/toj/+FxAne32eFUl7pkXGvqHG7/zH82URbCWnFCxESa4Y 6RJMD5xDkBXLC+3lj18qOvmQ0FiGZvH62Jze65PMe/dmfL5ObV4v/ynAYy1mu34I5hs3+xCnTqC WgO3QNPHaz/1Kb8Haxt9N+lXxLLlbHTHwDqcf7sSRehMhqn2k0Odn4QpWaOyqA5Oe+WDyenlR/9 mZfgVz9HDpNkIjM/mcGmRngmotuBAozIdhta4ifCifIKWmzDFocpozzSJZ8ztkIgh52sGMlZhUK 34+d+EXEYV1kMa9RNAXkMuicDo5jDo0fECqz4MgiJpkf4UqB3VvgwB1Co4JbAHWlMtjQHpg/yzH VQeeIqw4ph1p4= X-Received: by 2002:a05:7300:e683:b0:304:de26:3cb6 with SMTP id 5a478bee46e88-304fa61b98cmr5773438eec.23.1780360349190; Mon, 01 Jun 2026 17:32:29 -0700 (PDT) X-Received: by 2002:a05:7300:e683:b0:304:de26:3cb6 with SMTP id 5a478bee46e88-304fa61b98cmr5773416eec.23.1780360348513; Mon, 01 Jun 2026 17:32:28 -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-304ed563d09sm10070412eec.15.2026.06.01.17.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 17:32:28 -0700 (PDT) From: Hangxiang Ma Date: Mon, 01 Jun 2026 17:32:22 -0700 Subject: [PATCH v5 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: <20260601-add-support-for-camss-on-sm8750-v5-3-dac36a190de8@oss.qualcomm.com> References: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> In-Reply-To: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , Loic Poulain 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=Z4Hc2nRA c=1 sm=1 tr=0 ts=6a1e249e cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=UiSUrLz6K6kVaq6zp58A:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-GUID: xw-9RUCcv51JHKrUuJH3FAB_utR8stDV X-Proofpoint-ORIG-GUID: xw-9RUCcv51JHKrUuJH3FAB_utR8stDV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDAwMyBTYWx0ZWRfX1W4EfOM/8p4S hKZLtZPZQPA/2Syn2UGKR9eM/wMQQbB7+RorW4NLOtMW8tgvr3tJYu8G2gNm1EFu/0OU4qZImno UcREvZ+AFEMtC1/Z+qZ7/l1Vb7636jbkLNdLqhOKE4tmuVl7KM23LRsFUQ92wI1CGvv+KwfCC7u YSY/c3DlSr1niD2UeJDPZjOWJT4YIheegWMRXdsnZ5L5LjNa3ztx2TvMeGCgaANQOMSV9FanAEs A9U5K0hfJWOOizXJho9S+QlJsA8ilNN5K6tmbG+HAK4Cn4+iZUfHTafKI1Ygkph0yMYu2iYqDkN 6WRc1v2vAZPemX9YV4A2v502Fn/mBctnFdTUo8K5Ne/gj7TMemcIwviJ2pj0JkJ3PSBVaI0RyHZ M6ZQXIV+KX9AYwEQq5ihh3RhbklbNrVYU9pjHgCePduv/USF0EKqm8FmmlqAssEeYtm/VzwQNsM GM2T1wxmRZT0FkI/FRA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020003 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. Reviewed-by: Bryan O'Donoghue 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 a219fbf0ce3d..bb0290a4bb2d 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 @@ -804,7 +804,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 */ @@ -1256,6 +1256,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: @@ -1377,7 +1378,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 834f6c1a2519..d68d5debe6d6 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4533,6 +4533,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", @@ -6099,7 +6222,9 @@ static const struct camss_resources sm8650_resources = =3D { static const struct camss_resources sm8750_resources =3D { .version =3D CAMSS_8750, .pd_name =3D "top", + .csiphy_res =3D csiphy_res_8750, .icc_res =3D icc_res_sm8750, + .csiphy_num =3D ARRAY_SIZE(csiphy_res_8750), .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), }; =20 --=20 2.34.1 From nobody Mon Jun 8 05:28:41 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 BD1C330C146 for ; Tue, 2 Jun 2026 00:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360354; cv=none; b=rHi7YaejmUyQ9WywDa4afjb8+EG3axKcGQRKm4X5LBT02jhYfO9gPCOQ0q4xYKCKiEJ+63lt80fpgfW4iPP8/x7PBG2nKD6nTMq/rkxRHxfCWn9gA/7PjKVgUrYqbAlqxpktuYPedH0DnfEalOapSJBBboW4zJIY+kuYKRUVP+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360354; c=relaxed/simple; bh=gQUmZqHnZps99RflFMYT/e1NOpGOrld/dV66EhQ+QqA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g/j8lG2H/Vt8RunmZ27axun9gjrlyH4CxCo2SFhOMnJnuLcof79sIrMXDsGaEp7LMgL6o/Shh47seIlCFBDDygbk10e7TR25WSJ8I/NSBsX0wpOl47VN12rvdoojB6UWnFkP9bLoX7LdS/h27p/PFCaZewutInfXlBmJRP5xt7s= 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=IYopSjla; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=bswNpdYh; arc=none smtp.client-ip=205.220.168.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="IYopSjla"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="bswNpdYh" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 651NUHoF4110253 for ; Tue, 2 Jun 2026 00:32:31 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= gRyfvKodWD/rYN/Kj7+BtiOWew0pyiNyHVJblGEUJKg=; b=IYopSjlala+W703w WmV66V+9LluUlrugPZ1Mw7dVAv399XeNShouefQa4oHFwJswafTT2IGPSN6rqbls Fo4NaY6g0e4EGd/bkTq749L4suOVmsoRoJXvmzV1uTEg2jMk3xNdNirjSLgudLCT ssIitkgBRIYaHKG+ToX9O/OtDT7rh2AoR5aLkOFSeWWLkDlRIAAoJSAS+eFj14xl yCdAQSekQ50/s0jDqkhs6pE7H3JXLzXJ/HzvWF+9gRXYrPNn6saQ9mHitIs3eB46 Ulq4XbP/5GSpFWzi4XYxVIZWSTXCkeyZticaJA2TMjn939yfiJU8DIwFmqZsFG2U J7ZiyA== 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 4eh6s3uqrr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 00:32:31 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304f23c55b2so3398877eec.0 for ; Mon, 01 Jun 2026 17:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780360350; x=1780965150; 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=gRyfvKodWD/rYN/Kj7+BtiOWew0pyiNyHVJblGEUJKg=; b=bswNpdYhHcK70y+jAU53MRq+8RxnWbkJtFQeOUgC5relmI+xxaj7DaKxrQRNtXr4kv yTUOCR0/TDlAgMBTDjK0Hz/ZXrrqgAXiz6a16AGMqh0+Igl26M5fVZIIatH1mmcuCSDs 59GbvnSWB3FVD9o2jowHeQXfVQ9WuLCuKmACg5Tdiaf5dLuFZozvwRZLt6XlPekcKnTB 39zEJPnGIqmwpr77P4nyCylkxJ4qaQ2xTJc4Tyn0j3J3s/pzm2nR/JjRG6Lr5JjfgbZd 9wXoWsqTWkHec2eA16NToMBIFfYMnneVGgVr7xltggmZr7Yir/8zL0F8zYPjLQfPttY/ ekZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780360350; x=1780965150; 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=gRyfvKodWD/rYN/Kj7+BtiOWew0pyiNyHVJblGEUJKg=; b=GFFtFlvBIvYxphQ6uGLAMvAnr0gr3AEEGN6GE1b4cGv8qNuKv8AyDMzUPaaC0lcm5S tQBeBHkTygbZCCzXxPCaZAcuYu9IhAzM96YlMP3xpUJgnWHNgErkiYwIGA+FYzwqGqVX 2tLkDXqzqKoy3eldWTB4aPPniD7wp5m/JIiA7Ja9V4Oywt8DAb9oTSII4nIKwViIvgp8 D91WloFxYEVQBIZtX6ZAMNmOvkBFt7lSO9OBugnRDQOrN27FCbOoEEm1YXOelrzJ1qsG PiW9gfb+iT2px4foDaLmdh3bRb7N2Vw0u4unnNxu7uciIvxTKWGpVDw6R3Rz9G3iAbbD OLfg== X-Forwarded-Encrypted: i=1; AFNElJ8o1LKvx+/1t06rC5FYUKnFVzBqsvBsdL6NJdaVEW/Mpof2m/ekreI9hBNrLu2NwRLWlzXu7cvgisVqkCQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3lEi7cnvwyZqvjbxYkS21bmQqK4Y2N4wNWkZLA9R8iqtrAOi3 vPUMEEfG9SiYFg3vPrfFocrtC55C8JQWqqC5B0jeuC1eFehV4RiKPxfKMK+75jA5iaBI4dpVOzF f3XsBqUXdfHIcd+UY0yLLWU+PEd5pm0zMEYhXrz7cxKYnOTfDVnf3rmPEXXDQ/SOJRNI= X-Gm-Gg: Acq92OErovuy9Pc3JRxaOQbuZ9mxZS5KFuKlDjTpuCiTlJF9wXx/9IHm+f5sIl22B8f CxeQgs6qFl+IrpsYVNAswkcIbchpL1U5sBQg97J22GsdWuhhXoT2pW91fM+NVdXRvHcOU0GcK8X IS0Pt7s2/9Bg4gV00dVscsEKt35XdfBDZKCxAbKKf3syQp/IOHSNn6y9eu3uxpXUMHH8pihKG9c +KQWcQvS9OBghYfskl98OsNwZpStV5RZjxIEjTdtUJZmADI8P3DtoZ1ieTK7w1Vtm3orztDtO1m dilmrCVxP5ikOcql1hiYbLRJCLjCCaZ3wISBqMwki+JfmVpA13JvKg2IJ0bCe9v3d01StMJ7p8m 0/A+NMGCTptDLsoBaNc0411a18M8nwX82lUrzHGFu00E6PhbhkJhKm6E61KUbi07+y26W/TnOdP Emb6EE3HKrBCs= X-Received: by 2002:a05:7300:6427:b0:304:5db8:da95 with SMTP id 5a478bee46e88-304fa67ad4amr5978421eec.23.1780360350101; Mon, 01 Jun 2026 17:32:30 -0700 (PDT) X-Received: by 2002:a05:7300:6427:b0:304:5db8:da95 with SMTP id 5a478bee46e88-304fa67ad4amr5978399eec.23.1780360349422; Mon, 01 Jun 2026 17:32:29 -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-304ed563d09sm10070412eec.15.2026.06.01.17.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 17:32:29 -0700 (PDT) From: Hangxiang Ma Date: Mon, 01 Jun 2026 17:32:23 -0700 Subject: [PATCH v5 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: <20260601-add-support-for-camss-on-sm8750-v5-4-dac36a190de8@oss.qualcomm.com> References: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> In-Reply-To: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , Loic Poulain 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=AP3YypGC c=1 sm=1 tr=0 ts=6a1e249f cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=63CfXtnvIBONjkcrFHoA:9 a=Z-sH2BZsVlbqz-yA:21 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDAwMyBTYWx0ZWRfX0dhPOq/E4xkf mKd3ZOUE67Ksh0F/a72S8mOGkxNQWOS1etupsS/tKGqaIs5j4EbUqOjeK5EZ5UTsSPokCALaJfw UpjdFV70i/OT5dSTMolVDlDSZ8sQlawBuDsCTrd7HdLItoxbGJfU2hNL6tvOQ6ekyM/8Txb5sgX 2eQ2l47FjcmFCj0KigayqbG9TOyX84cgT1NTGJy+Une+14z6JS+5QkB+rD3AHZMtfS7MZumSDYX wkWgLgJIfAra5noKCzlaP/fiLspeEuYFRF44EpfOfb0CH9VK3PBlc1xbJGWINZ3tpcLyKFCTwbl gazRK5pBOpt/nUjPSfjlgHuqBWqyWGCusoBV2jc5BSpds6Faxna5FKN1jCV3x8/JJYNlcE65/xK 1EpEREGeFKRa1DWv7fPqVh4XK+hq9asQEN++bXwE0+W+HUXLe+lbMv+/xAD9CfjGHtDw44ja+yv 3ZGgkJQzRFbJEAZInTA== X-Proofpoint-GUID: Mi3v8l93_EF-2V2lpYSL_OYFMAKCQt_M X-Proofpoint-ORIG-GUID: Mi3v8l93_EF-2V2lpYSL_OYFMAKCQt_M X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 suspectscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020003 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 | 443 +++++++++++++++++= ++++ drivers/media/platform/qcom/camss/camss-csid.h | 1 + drivers/media/platform/qcom/camss/camss.c | 75 ++++ 4 files changed, 520 insertions(+) diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/pla= tform/qcom/camss/Makefile index b114ca37e36e..c19d3183882a 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..acc2bdb8a5f8 --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-csid-980.c @@ -0,0 +1,443 @@ +// 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_PHY_SEL_BASE_IDX 1 +#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 4f31ad303c4e..8edf3548d692 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.h +++ b/drivers/media/platform/qcom/camss/camss-csid.h @@ -222,6 +222,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 d68d5debe6d6..ce1a9bbff203 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4656,6 +4656,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", @@ -6223,8 +6296,10 @@ static const struct camss_resources sm8750_resources= =3D { .version =3D CAMSS_8750, .pd_name =3D "top", .csiphy_res =3D csiphy_res_8750, + .csid_res =3D csid_res_8750, .icc_res =3D icc_res_sm8750, .csiphy_num =3D ARRAY_SIZE(csiphy_res_8750), + .csid_num =3D ARRAY_SIZE(csid_res_8750), .icc_path_num =3D ARRAY_SIZE(icc_res_sm8750), }; =20 --=20 2.34.1 From nobody Mon Jun 8 05:28:41 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 EDBDC306778 for ; Tue, 2 Jun 2026 00:32:32 +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=1780360354; cv=none; b=HU8SYCBlMSS7Pr8NDvP+Bgi2I/Q4cPbr7uPmadGy6IkoD955gMyDeS/pklq485QO3m784WqjRiODlpU+nNI/hze4fzG9tLoU5YGDEz9KbhGJ3cjqStA1DkTvusn5RRWCNOmVoGzD7pdQnnF6LY5/UY2h1EFk0xE5w9eWJDzwS4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780360354; c=relaxed/simple; bh=iPScbSltF8/cuPWN2KBgNJ3WGrtroA5TrI0yo46SgRw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uOyl92LrXIjX/Bw9AXDSQIkNLd7qU6I3OKYiKXSOuS5ECTIg33h/ZuCEk5eKOZxr7MaCWLEuIJ0vMjVeG3f1EdQ5WoePO7Xd7sRwYdMQgLSQi6rsOrrApkrDXnpXqpA5uMmS+2yV0MYmdF7bzLgrc4mRDk2zjn3M0balQCikbmY= 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=ovnotb90; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MESZBTKX; 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="ovnotb90"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MESZBTKX" 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 651Nm3CU4066046 for ; Tue, 2 Jun 2026 00:32:32 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= +mZxV21KQ3tL9oFzLvCHMLnrJSP5MCm1mDXaNoEH23U=; b=ovnotb90vGW0qfc7 KvI7iTr0CFA6WQCRGewcxhD6b5ldHIOv1RHUTMMwUTi54LqPBX7TA6P4twO8WUWy KFg/dHjHp7x9xKNgmP7UjFVWre9W8lL6MXsPFnXdBsWxggXx1KBlIamJHRtOab2c ZDY+EA5carqQShjHrWAHNC0qxLAHEo24mLmgy20EfBCBryHB1wYiDqtLNKg/k9Lo FRcCNwUvffspEwTz9eijKCVneBvWeoAXCcNgtrsRDiAJZLXFs3ACdnV7PZHtz+o7 uTUhXHAWVDecQdi3Eb+WDX2vixpYyVIgQltn+XzUH6gwpuPOi4UO0JYgMZBTaUzG kvB5+g== 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 4eh6swuthp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 00:32:31 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304f23c55b2so3398889eec.0 for ; Mon, 01 Jun 2026 17:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780360351; x=1780965151; 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=+mZxV21KQ3tL9oFzLvCHMLnrJSP5MCm1mDXaNoEH23U=; b=MESZBTKXWNj3BLyRKoTRtBbNzi34coXrBAfLXtAJQZ+BGLMybMv53kQ+TXfV51iyVG P9w09opWjn2oId5ALvofCPsVixNpVJdfVuNy9YICmx8jYbE2Qkv2LiIjhECxR9V5Ab8O iYO9YBW9zzF87iHcRHAS91TgcqBcUZsqKalbovfLjeZJrV273NQHfmm8oOGKWUsxiq2f ZXCMkf2GJ8AYW4hlkzRjPfWDgjCv/vuJqRzj2POiMtxI9GK7CtNJJEh+LFHu9JmOSd+L ozP40+eG/Y/gmEm4TTxTdzay/oegR2iYC/LzSkDrirHqKGySNhhlFsP5gH7XZYMKjZt9 pG7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780360351; x=1780965151; 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=+mZxV21KQ3tL9oFzLvCHMLnrJSP5MCm1mDXaNoEH23U=; b=LC+8UeI3qs6HuveRpeW+R4fDy/x61+BI7VZVaNQgBiLmwmtyN2/5PimvigrGsRPHfW +Fo9dOrPHsLAg0dImrQNHqKFC4BvYBq9eQO5tS0Bi7w4tBS71+1qLTR1xZR0VIbYzkzf 8gNAW2CXwC9v7JBdnT2b9W/WUFLH6jWZDpJxcyF5AM/yX3De6zKJZr7axITNsudxLHZm xNK4RvIKf2oPBk0WZC8yABWDrJq3/0FTIu+0OU1Hhr4NgoWVJYq714PkY8/k10ml8zuh +hVFDILckornKrNVCBOOwMD+MI1oUdzS1OUfDhm7B01UHBgQzN6lJL3EZMEgT9oBgj9c IlqA== X-Forwarded-Encrypted: i=1; AFNElJ8RGlI/yL+Ltph7YwiW6yDRuVxbzNe4TQ7pA0RuP2DdrRE1sLLP8MXwRtflK9fxRSL5P7l7tgbKmeqABDk=@vger.kernel.org X-Gm-Message-State: AOJu0YzWIlZxrj8vghoLds734PqIAUZq0vUvi1CVEC2h4X5rDmQ2zGV3 PBBZWFXd473I/7mEsYH/MlM6c3ejgLxNmPwxFNw6F3SBGOHWXoeh5tfwh/89bplOyw1PoZ986hJ YDSqZUI1vUS6/7xCZWXgsS1RbIP7VLOAUCwzqOkBnfIdmV/HMuNETyRMshl9n7GVWZQk= X-Gm-Gg: Acq92OEewJ+Vt08xptpDozdyaY+8MqX0qieLnkczuFd/svrDAWXvv69+eMhhI4V8H1m Jxr1sOQvNj+ZUejaCol83EHN1NIjYyGLnDrMVD7SvMXvHvNz8wXUSs4A3LWQri1a/AJ0zsIL8bz CsIiBhvAa9ygH9u+mlTzXa1ifnyj6xsW9yLMe3xDMCizazF8WvdZW5zIjoS6T9Cpli4EbuvmN/K sgsZs0RLaYOfrib1EdZtRmdnNARg3BUt68gIOH6AA8GSu5vQv/4YbAp8txo5VVAkJ3ON0c+kIp3 VNbUoTDTpUwpRep7+OcYdBFqIfbAlIcp35N4lDucaHLvokp+yuVmjQJgJrkk0MBTYmqdjdxcgX8 RhOYT4tVSx4vWtMmuUoPLINdpYvofotJoe4NYF0t8+m1TM2p5LVGMV+P9wssxMTTBi9R2tT4PQO XuvfemfIN6wtE= X-Received: by 2002:a05:7301:1284:b0:304:8361:a87e with SMTP id 5a478bee46e88-304fa72372emr5489902eec.33.1780360350779; Mon, 01 Jun 2026 17:32:30 -0700 (PDT) X-Received: by 2002:a05:7301:1284:b0:304:8361:a87e with SMTP id 5a478bee46e88-304fa72372emr5489887eec.33.1780360350213; Mon, 01 Jun 2026 17:32:30 -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-304ed563d09sm10070412eec.15.2026.06.01.17.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 17:32:29 -0700 (PDT) From: Hangxiang Ma Date: Mon, 01 Jun 2026 17:32:24 -0700 Subject: [PATCH v5 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: <20260601-add-support-for-camss-on-sm8750-v5-5-dac36a190de8@oss.qualcomm.com> References: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> In-Reply-To: <20260601-add-support-for-camss-on-sm8750-v5-0-dac36a190de8@oss.qualcomm.com> To: Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , Loic Poulain 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=Z4Hc2nRA c=1 sm=1 tr=0 ts=6a1e249f cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=3rR15nC7HOTWOJgZU7UA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: ANcjfgCLAzgJEldSZgTahG1orIQf4Bm0 X-Proofpoint-ORIG-GUID: ANcjfgCLAzgJEldSZgTahG1orIQf4Bm0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDAwMyBTYWx0ZWRfX62bsd6pgXqR2 IJZMC0M2bHyaRA/G9xGWYM1h7MD7YlpNuiIIszHYmaQc/NuHf41KfIyK8DLzPiF6jhFA4wBYyMA ALi72LBtuVxVeiEqEaIEtivyms/I4eJAIdmERYtPXumL0Q2EID8vN76vU+JeEU+fVJ/FD/KVw99 DmMRjgn6ZhtFYW4B/7UYY0PiomvU5Xv9DwiHPMPA6tLgb2by7JsPy/Fc/MXkYlzMVjJcrVRTG5s RemszWKfMIbZfBsgD2P72X/W1oPdHMIv//3zK+oobHn2jPTpLKfDoMyzH4zf4wjw8fjVCOkxzET /78/XSMF++8k9lag6MAUUqGa+ITP3TKx/umHL9GYN0Ab3RXF3MQEfTTx3ZuGRcJFo7R7nyqzx17 ACb90pPYZAVVs2B/8KWkQF5nS3gL+mVfpDUJfYDLL/Zo167ZXgG/tF3xslckdu0pxcdFB7HcIFv iWh2zFb+DFvS7cUXhQw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020003 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 826ab85a44a1..ffa61ce021b4 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -352,6 +352,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: @@ -2016,6 +2017,7 @@ static int vfe_bpl_align_rdi(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 ce1a9bbff203..f262a5135fb1 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4729,6 +4729,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", @@ -6297,9 +6430,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