Thread (16 messages) 16 messages, 4 authors, 2025-07-28

Re: [PATCH v2 4/7] media: qcom: camss: enable csid 690 for qcs8300

From: Konrad Dybcio <hidden>
Date: 2025-07-14 09:35:53
Also in: linux-arm-kernel, linux-arm-msm, linux-media, lkml

On 7/11/25 3:11 PM, Vikram Sharma wrote:
quoted hunk ↗ jump to hunk
The CSID in qcs8300 is version 690, it is same as csid used in
sa8775p. csid gen3 have support for csid 690.

Signed-off-by: Vikram Sharma <redacted>
---
 .../platform/qcom/camss/camss-csid-gen3.c     |   5 +-
 drivers/media/platform/qcom/camss/camss.c     | 136 ++++++++++++++++++
 2 files changed, 139 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-gen3.c b/drivers/media/platform/qcom/camss/camss-csid-gen3.c
index f62084fb8287..581399b6a767 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-gen3.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-gen3.c
@@ -47,8 +47,9 @@
 #define CSID_CSI2_RX_IRQ_CLEAR		0xA4
 #define CSID_CSI2_RX_IRQ_SET		0xA8
 
-#define IS_CSID_690(csid)	(csid->camss->res->version ==\
-					CAMSS_8775P ? true : false)
+#define IS_CSID_690(csid)	((csid->camss->res->version == CAMSS_8775P) ||\
+				(csid->camss->res->version == CAMSS_8300) ?\
+				true : false)
== tends to return either true or false without the use of the
ternary operator too
quoted hunk ↗ jump to hunk
 #define CSID_BUF_DONE_IRQ_STATUS	0x8C
 #define BUF_DONE_IRQ_STATUS_RDI_OFFSET  (csid_is_lite(csid) ?\
 						1 : (IS_CSID_690(csid) ?\
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 5211367b535d..b0fd5fd307a1 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -2269,6 +2269,10 @@ static const struct camss_subdev_resources csiphy_res_8550[] = {
 	}
 };
 
+static const struct resources_wrapper csid_wrapper_res_qcs8300 = {
+	.reg = "csid_wrapper",
+};
+
 static const struct resources_wrapper csid_wrapper_res_sa8775p = {
 	.reg = "csid_wrapper",
 };
There is no reason to duplicate this, simply point to the existing
variable
quoted hunk ↗ jump to hunk
@@ -2487,6 +2491,138 @@ static const struct resources_icc icc_res_sm8550[] = {
 	},
 };
 
+static const struct camss_subdev_resources csid_res_8300[] = {
+	/* CSID0 */
+	{
+		.regulators = {},
+		.clock = { "csid", "csiphy_rx"},
+		.clock_rate = {
+			{ 400000000, 400000000},
+			{ 400000000, 400000000}
Please add a space before } across the board

Konrad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help