From: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
To: djakov@kernel.org, bod@kernel.org, linux-pm@vger.kernel.org,
linux-media@vger.kernel.org
Cc: mchehab@kernel.org, andersson@kernel.org, konradybcio@kernel.org,
abelvesa@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, loic.poulain@oss.qualcomm.com,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Prashant Shrotriya <pshrotri@qti.qualcomm.com>,
Vikram Sharma <vikram.sharma@oss.qualcomm.com>,
Gjorgji Rosikopulos <gjorgji.rosikopulos@oss.qualcomm.com>,
Atanas Filipov <atanas.filipov@oss.qualcomm.com>
Subject: [PATCH 05/10] media: qcom: cam-icc: add the SM8250 data
Date: Mon, 30 Nov 2026 12:49:50 +0200 [thread overview]
Message-ID: <20261130104955.1288089-6-atanas.filipov@oss.qualcomm.com> (raw)
In-Reply-To: <20261130104955.1288089-1-atanas.filipov@oss.qualcomm.com>
Add the SM8250 camera NoC nodes, AHB levels, MMCX rail, static QoS
settings and error interrupt sources. The port list, the AHB levels,
the rail levels and the QoS values are taken from the downstream camera
driver of this SoC.
Signed-off-by: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
---
drivers/media/platform/qcom/cam-icc/Makefile | 2 +-
.../platform/qcom/cam-icc/qcom-cam-icc-core.c | 1 +
.../platform/qcom/cam-icc/qcom-cam-icc-core.h | 2 +
.../qcom/cam-icc/qcom-cam-icc-sm8250.c | 136 ++++++++++++++++++
4 files changed, 140 insertions(+), 1 deletion(-)
create mode 100644 drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sm8250.c
diff --git a/drivers/media/platform/qcom/cam-icc/Makefile b/drivers/media/platform/qcom/cam-icc/Makefile
index 4d1cbf60fea0..aa2acbe56285 100644
--- a/drivers/media/platform/qcom/cam-icc/Makefile
+++ b/drivers/media/platform/qcom/cam-icc/Makefile
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
-qcom-cam-icc-y := qcom-cam-icc-core.o
+qcom-cam-icc-y := qcom-cam-icc-core.o qcom-cam-icc-sm8250.o
obj-$(CONFIG_QCOM_CAM_ICC) += qcom-cam-icc.o
diff --git a/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.c b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.c
index beb0ee0cad7a..0f49e8644de8 100644
--- a/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.c
+++ b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.c
@@ -493,6 +493,7 @@ static int qcom_cam_icc_opp_init(struct qcom_cam_icc *camnoc)
}
static const struct of_device_id qcom_cam_icc_of_match[] = {
+ { .compatible = "qcom,sm8250-cam-icc", .data = &qcom_cam_icc_sm8250_data },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_cam_icc_of_match);
diff --git a/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.h b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.h
index 0de2aff3fe95..0ab90d22a6fd 100644
--- a/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.h
+++ b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-core.h
@@ -139,4 +139,6 @@ struct qcom_cam_icc_data {
.clear_off = QCOM_CAM_ICC_##_type##ERRCLR_LOW, \
}
+extern const struct qcom_cam_icc_data qcom_cam_icc_sm8250_data;
+
#endif
diff --git a/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sm8250.c b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sm8250.c
new file mode 100644
index 000000000000..4a74fc71de67
--- /dev/null
+++ b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sm8250.c
@@ -0,0 +1,136 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/pm_domain.h>
+
+#include <dt-bindings/interconnect/qcom,sm8250-cam-icc.h>
+
+#include "qcom-cam-icc-core.h"
+
+#define SM8250_CDM 0x0000
+#define SM8250_FD 0x0600
+#define SM8250_IFE_LINEAR 0x0a00
+#define SM8250_IFE_RDI_RD 0x1000
+#define SM8250_IFE_RDI_WR 0x1400
+#define SM8250_IFE_UBWC_STATS 0x1a00
+#define SM8250_IPE0_RD 0x1e00
+#define SM8250_IPE1_BPS_RD 0x2400
+#define SM8250_IPE_BPS_WR 0x2800
+#define SM8250_JPEG 0x2e00
+
+enum {
+ SM8250_CAMNOC_RT0_WR = SLAVE_CAMNOC_AHB + 1,
+ SM8250_CAMNOC_RT0_RD,
+ SM8250_CAMNOC_NRT0_WR,
+ SM8250_CAMNOC_NRT0_RD,
+ SM8250_CAMNOC_NUM_NODES,
+};
+
+static const struct qcom_cam_icc_node sm8250_nodes[] = {
+ CAMNOC_PORT(MASTER_CAMNOC_IFE_LINEAR_WR, "camnoc_ife_linear_wr", SM8250_CAMNOC_RT0_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_IFE_RDI_WR, "camnoc_ife_rdi_wr", SM8250_CAMNOC_RT0_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_IFE_RDI_RD, "camnoc_ife_rdi_rd", SM8250_CAMNOC_RT0_RD),
+ CAMNOC_PORT(MASTER_CAMNOC_JPEG_WR, "camnoc_jpeg_wr", SM8250_CAMNOC_NRT0_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_JPEG_RD, "camnoc_jpeg_rd", SM8250_CAMNOC_NRT0_RD),
+ {
+ .name = "camnoc_ahb",
+ .id = MASTER_CAMNOC_AHB,
+ .num_links = 1,
+ .links = { SLAVE_CAMNOC_AHB },
+ },
+ CAMNOC_LINK_SLAVE(SLAVE_CAMNOC_HF, "camnoc_hf", "hf"),
+ CAMNOC_LINK_SLAVE(SLAVE_CAMNOC_SF, "camnoc_sf", "sf"),
+ CAMNOC_LINK_SLAVE(SLAVE_CAMNOC_AHB, "camnoc_ahb_slv", "cfg"),
+ CAMNOC_INTERNAL(SM8250_CAMNOC_RT0_WR, "camnoc_rt0_wr", SLAVE_CAMNOC_HF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+ CAMNOC_INTERNAL(SM8250_CAMNOC_RT0_RD, "camnoc_rt0_rd", SLAVE_CAMNOC_HF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+ CAMNOC_INTERNAL(SM8250_CAMNOC_NRT0_WR, "camnoc_nrt0_wr", SLAVE_CAMNOC_SF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+ CAMNOC_INTERNAL(SM8250_CAMNOC_NRT0_RD, "camnoc_nrt0_rd", SLAVE_CAMNOC_SF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+};
+
+static const struct qcom_cam_icc_ahb_level sm8250_ahb_levels[] = {
+ { .cfg_kbps = 76800, .slow_ahb_rate = 80000000 },
+ { .cfg_kbps = 150000, .slow_ahb_rate = 80000000 },
+ { .cfg_kbps = 300000, .slow_ahb_rate = 80000000 },
+};
+
+static const char * const sm8250_rail_pd_names[] = { "mmcx" };
+
+static const struct dev_pm_domain_attach_data sm8250_rail_pd_data = {
+ .pd_names = sm8250_rail_pd_names,
+ .num_pd_names = ARRAY_SIZE(sm8250_rail_pd_names),
+ .pd_flags = PD_FLAG_REQUIRED_OPP,
+};
+
+static const struct qcom_cam_icc_qos sm8250_qos[] = {
+ CAMNOC_QOS(SM8250_CDM, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SM8250_FD, URGENCY_LOW, 0x33),
+ CAMNOC_QOS(SM8250_IFE_LINEAR, PRIORITYLUT_LOW, 0x66665433),
+ CAMNOC_QOS(SM8250_IFE_LINEAR, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SM8250_IFE_LINEAR, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SM8250_IFE_LINEAR, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SM8250_IFE_LINEAR, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SM8250_IFE_RDI_RD, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SM8250_IFE_RDI_RD, DANGERLUT_LOW, 0x0),
+ CAMNOC_QOS(SM8250_IFE_RDI_WR, PRIORITYLUT_LOW, 0x66665433),
+ CAMNOC_QOS(SM8250_IFE_RDI_WR, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SM8250_IFE_RDI_WR, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SM8250_IFE_RDI_WR, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SM8250_IFE_RDI_WR, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SM8250_IFE_UBWC_STATS, PRIORITYLUT_LOW, 0x66665433),
+ CAMNOC_QOS(SM8250_IFE_UBWC_STATS, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SM8250_IFE_UBWC_STATS, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SM8250_IFE_UBWC_STATS, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SM8250_IFE_UBWC_STATS, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SM8250_IPE0_RD, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SM8250_IPE1_BPS_RD, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SM8250_IPE_BPS_WR, PRIORITYLUT_LOW, 0x33333333),
+ CAMNOC_QOS(SM8250_IPE_BPS_WR, PRIORITYLUT_HIGH, 0x33333333),
+ CAMNOC_QOS(SM8250_IPE_BPS_WR, URGENCY_LOW, 0x30),
+ CAMNOC_QOS(SM8250_JPEG, PRIORITYLUT_LOW, 0x22222222),
+ CAMNOC_QOS(SM8250_JPEG, PRIORITYLUT_HIGH, 0x22222222),
+ CAMNOC_QOS(SM8250_JPEG, URGENCY_LOW, 0x22),
+};
+
+static const struct qcom_cam_icc_sbm sm8250_sbm = {
+ .enable_reg = 0x3840,
+ .status_reg = 0x3848,
+ .clear_reg = 0x3880,
+ .clear_val = 0x1,
+};
+
+static const struct qcom_cam_icc_irq_err sm8250_irq_errs[] = {
+ CAMNOC_IRQ_ERR("ife_ubwc_stats encode", BIT(1), SM8250_IFE_UBWC_STATS, ENC, 1),
+ CAMNOC_IRQ_ERR("ipe1_bps_rd decode", BIT(2), SM8250_IPE1_BPS_RD, DEC, 1),
+ CAMNOC_IRQ_ERR("ipe0_rd decode", BIT(3), SM8250_IPE0_RD, DEC, 1),
+ CAMNOC_IRQ_ERR("ipe_bps_wr encode", BIT(4), SM8250_IPE_BPS_WR, ENC, 1),
+};
+
+static const struct qcom_cam_icc_erl sm8250_erl = {
+ .base = 0x7000,
+ .sbm_mask = BIT(0),
+};
+
+const struct qcom_cam_icc_data qcom_cam_icc_sm8250_data = {
+ .rate_clk = "camnoc_axi",
+ .nodes = sm8250_nodes,
+ .num_nodes = ARRAY_SIZE(sm8250_nodes),
+ .num_ids = SM8250_CAMNOC_NUM_NODES,
+ .ahb_levels = sm8250_ahb_levels,
+ .num_ahb_levels = ARRAY_SIZE(sm8250_ahb_levels),
+ .ahb_id = SLAVE_CAMNOC_AHB,
+ .rail_pd_data = &sm8250_rail_pd_data,
+ .qos = sm8250_qos,
+ .num_qos = ARRAY_SIZE(sm8250_qos),
+ .sbm = &sm8250_sbm,
+ .irq_errs = sm8250_irq_errs,
+ .num_irq_errs = ARRAY_SIZE(sm8250_irq_errs),
+ .erl = &sm8250_erl,
+};
--
2.25.1
next prev parent reply other threads:[~2026-11-30 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 10:49 [PATCH 00/10] Add the Qualcomm Titan camera NoC interconnect provider Atanas Filipov
2026-11-30 10:49 ` [PATCH 01/10] dt-bindings: interconnect: add the Qualcomm SM8250 Titan camera NoC Atanas Filipov
2026-11-30 10:49 ` [PATCH 02/10] dt-bindings: interconnect: add the Qualcomm SC7280 " Atanas Filipov
2026-11-30 10:49 ` [PATCH 03/10] dt-bindings: interconnect: add the Qualcomm SA8775P " Atanas Filipov
2026-11-30 10:49 ` [PATCH 04/10] media: qcom: cam-icc: add the Titan camera NoC driver Atanas Filipov
2026-11-30 12:16 ` Bryan O'Donoghue
2026-11-30 12:59 ` Atanas Filipov
2026-11-30 13:22 ` Gjorgji Rosikopulos (Consultant)
2026-11-30 15:22 ` Bryan O'Donoghue
2026-11-30 10:49 ` Atanas Filipov [this message]
2026-11-30 10:49 ` [PATCH 06/10] media: qcom: cam-icc: add the SC7280 data Atanas Filipov
2026-11-30 10:49 ` [PATCH 07/10] media: qcom: cam-icc: add the SA8775P data Atanas Filipov
2026-11-30 10:49 ` [PATCH 08/10] arm64: dts: qcom: sm8250: add the Titan camera NoC node Atanas Filipov
2026-11-30 10:49 ` [PATCH 09/10] arm64: dts: qcom: sc7280: " Atanas Filipov
2026-11-30 10:49 ` [PATCH 10/10] arm64: dts: qcom: sa8775p: " Atanas Filipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130104955.1288089-6-atanas.filipov@oss.qualcomm.com \
--to=atanas.filipov@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=bod@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gjorgji.rosikopulos@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=pshrotri@qti.qualcomm.com \
--cc=robh@kernel.org \
--cc=vikram.sharma@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®