[PATCH 06/10] media: qcom: cam-icc: add the SC7280 data

From: Atanas Filipov

Date: Mon Nov 30 2026 - 05:50:21 EST


Add the SC7280 camera NoC nodes, AHB levels, CX 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 (Titan 165 camera NoC).

Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
---
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 | 1 +
.../qcom/cam-icc/qcom-cam-icc-sc7280.c | 143 ++++++++++++++++++
4 files changed, 146 insertions(+), 1 deletion(-)
create mode 100644 drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sc7280.c

diff --git a/drivers/media/platform/qcom/cam-icc/Makefile b/drivers/media/platform/qcom/cam-icc/Makefile
index aa2acbe56285..346abef8c51c 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-sm8250.o
+qcom-cam-icc-y := qcom-cam-icc-core.o qcom-cam-icc-sc7280.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 0f49e8644de8..c57ad7c4427e 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,sc7280-cam-icc", .data = &qcom_cam_icc_sc7280_data },
{ .compatible = "qcom,sm8250-cam-icc", .data = &qcom_cam_icc_sm8250_data },
{ }
};
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 0ab90d22a6fd..9cb665d31d95 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,6 +139,7 @@ struct qcom_cam_icc_data {
.clear_off = QCOM_CAM_ICC_##_type##ERRCLR_LOW, \
}

+extern const struct qcom_cam_icc_data qcom_cam_icc_sc7280_data;
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-sc7280.c b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sc7280.c
new file mode 100644
index 000000000000..4bee299bd15c
--- /dev/null
+++ b/drivers/media/platform/qcom/cam-icc/qcom-cam-icc-sc7280.c
@@ -0,0 +1,143 @@
+// 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,sc7280-cam-icc.h>
+
+#include "qcom-cam-icc-core.h"
+
+#define SC7280_NRT_NIU_2 0x2600
+#define SC7280_NRT_NIU_1 0x2a00
+#define SC7280_NRT_NIU_0 0x2e00
+#define SC7280_IFE_NIU_2 0x3600
+#define SC7280_IFE_NIU_0 0x3a00
+#define SC7280_CDM_NIU 0x4200
+#define SC7280_IFE_NIU_0_QOSGEN 0x4700
+#define SC7280_IFE_NIU_2_QOSGEN 0x4800
+#define SC7280_ERL 0x4f00
+#define SC7280_IFE_NIU_1_QOSGEN 0x5180
+#define SC7280_IFE_NIU_1 0x5400
+
+enum {
+ SC7280_CAMNOC_RT0_WR = SLAVE_CAMNOC_AHB + 1,
+ SC7280_CAMNOC_RT1_WR,
+ SC7280_CAMNOC_NRT0_WR,
+ SC7280_CAMNOC_NRT0_RD,
+ SC7280_CAMNOC_NUM_NODES,
+};
+
+static const struct qcom_cam_icc_node sc7280_nodes[] = {
+ CAMNOC_PORT(MASTER_CAMNOC_IFE_RDI_WR, "camnoc_ife_rdi_wr", SC7280_CAMNOC_RT0_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_IFE_PIXEL_WR, "camnoc_ife_pixel_wr", SC7280_CAMNOC_RT1_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_IFE2_PIXEL_WR, "camnoc_ife2_pixel_wr", SC7280_CAMNOC_RT1_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_JPEG_WR, "camnoc_jpeg_wr", SC7280_CAMNOC_NRT0_WR),
+ CAMNOC_PORT(MASTER_CAMNOC_JPEG_RD, "camnoc_jpeg_rd", SC7280_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(SC7280_CAMNOC_RT0_WR, "camnoc_rt0_wr", SLAVE_CAMNOC_HF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+ CAMNOC_INTERNAL(SC7280_CAMNOC_RT1_WR, "camnoc_rt1_wr", SLAVE_CAMNOC_HF,
+ QCOM_CAM_ICC_MERGE_SUM_INTERLEAVE),
+ CAMNOC_INTERNAL(SC7280_CAMNOC_NRT0_WR, "camnoc_nrt0_wr", SLAVE_CAMNOC_SF,
+ QCOM_CAM_ICC_MERGE_SUM),
+ CAMNOC_INTERNAL(SC7280_CAMNOC_NRT0_RD, "camnoc_nrt0_rd", SLAVE_CAMNOC_SF,
+ QCOM_CAM_ICC_MERGE_SUM),
+};
+
+static const struct qcom_cam_icc_ahb_level sc7280_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 sc7280_rail_pd_names[] = { "cx" };
+
+static const struct dev_pm_domain_attach_data sc7280_rail_pd_data = {
+ .pd_names = sc7280_rail_pd_names,
+ .num_pd_names = ARRAY_SIZE(sc7280_rail_pd_names),
+ .pd_flags = PD_FLAG_REQUIRED_OPP,
+};
+
+static const struct qcom_cam_icc_qos sc7280_qos[] = {
+ CAMNOC_QOS(SC7280_CDM_NIU, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SC7280_IFE_NIU_2, PRIORITYLUT_LOW, 0x55554433),
+ CAMNOC_QOS(SC7280_IFE_NIU_2, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SC7280_IFE_NIU_2, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SC7280_IFE_NIU_2, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SC7280_IFE_NIU_2, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SC7280_IFE_NIU_2_QOSGEN, MAINCTL_LOW, 0x2),
+ CAMNOC_QOS(SC7280_IFE_NIU_2_QOSGEN, SHAPING_LOW, 0x07070707),
+ CAMNOC_QOS(SC7280_IFE_NIU_2_QOSGEN, SHAPING_HIGH, 0x07070707),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, PRIORITYLUT_LOW, 0x55554433),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SC7280_IFE_NIU_0, ENCCTL_LOW, 0x1),
+ CAMNOC_QOS(SC7280_IFE_NIU_0_QOSGEN, MAINCTL_LOW, 0x2),
+ CAMNOC_QOS(SC7280_IFE_NIU_0_QOSGEN, SHAPING_LOW, 0x07070707),
+ CAMNOC_QOS(SC7280_IFE_NIU_0_QOSGEN, SHAPING_HIGH, 0x07070707),
+ CAMNOC_QOS(SC7280_IFE_NIU_1, PRIORITYLUT_LOW, 0x55554433),
+ CAMNOC_QOS(SC7280_IFE_NIU_1, PRIORITYLUT_HIGH, 0x66666666),
+ CAMNOC_QOS(SC7280_IFE_NIU_1, URGENCY_LOW, 0x1030),
+ CAMNOC_QOS(SC7280_IFE_NIU_1, DANGERLUT_LOW, 0xffffff00),
+ CAMNOC_QOS(SC7280_IFE_NIU_1, SAFELUT_LOW, 0xf),
+ CAMNOC_QOS(SC7280_IFE_NIU_1_QOSGEN, MAINCTL_LOW, 0x2),
+ CAMNOC_QOS(SC7280_IFE_NIU_1_QOSGEN, SHAPING_LOW, 0x07070707),
+ CAMNOC_QOS(SC7280_IFE_NIU_1_QOSGEN, SHAPING_HIGH, 0x07070707),
+ CAMNOC_QOS(SC7280_NRT_NIU_0, URGENCY_LOW, 0x3),
+ CAMNOC_QOS(SC7280_NRT_NIU_1, PRIORITYLUT_LOW, 0x33333333),
+ CAMNOC_QOS(SC7280_NRT_NIU_1, PRIORITYLUT_HIGH, 0x33333333),
+ CAMNOC_QOS(SC7280_NRT_NIU_1, URGENCY_LOW, 0x30),
+ CAMNOC_QOS(SC7280_NRT_NIU_2, PRIORITYLUT_LOW, 0x22222222),
+ CAMNOC_QOS(SC7280_NRT_NIU_2, PRIORITYLUT_HIGH, 0x22222222),
+ CAMNOC_QOS(SC7280_NRT_NIU_2, URGENCY_LOW, 0x22),
+};
+
+static const struct qcom_cam_icc_sbm sc7280_sbm = {
+ .enable_reg = 0x2240,
+ .status_reg = 0x2248,
+ .clear_reg = 0x2280,
+ .clear_val = 0x2,
+};
+
+static const struct qcom_cam_icc_irq_err sc7280_irq_errs[] = {
+ CAMNOC_IRQ_ERR("ife_niu_0 encode", BIT(1), SC7280_IFE_NIU_0, ENC, 1),
+ CAMNOC_IRQ_ERR("ife_niu_1 encode", BIT(2), SC7280_IFE_NIU_1, ENC, 1),
+ CAMNOC_IRQ_ERR("nrt_niu_0 decode", BIT(3), SC7280_NRT_NIU_0, DEC, 1),
+ CAMNOC_IRQ_ERR("nrt_niu_1 encode", BIT(4), SC7280_NRT_NIU_1, ENC, 1),
+};
+
+static const struct qcom_cam_icc_erl sc7280_erl = {
+ .base = SC7280_ERL,
+ .sbm_mask = BIT(0),
+};
+
+const struct qcom_cam_icc_data qcom_cam_icc_sc7280_data = {
+ .rate_clk = "camnoc_axi_src",
+ .nodes = sc7280_nodes,
+ .num_nodes = ARRAY_SIZE(sc7280_nodes),
+ .num_ids = SC7280_CAMNOC_NUM_NODES,
+ .ahb_levels = sc7280_ahb_levels,
+ .num_ahb_levels = ARRAY_SIZE(sc7280_ahb_levels),
+ .ahb_id = SLAVE_CAMNOC_AHB,
+ .rail_pd_data = &sc7280_rail_pd_data,
+ .qos = sc7280_qos,
+ .num_qos = ARRAY_SIZE(sc7280_qos),
+ .sbm = &sc7280_sbm,
+ .irq_errs = sc7280_irq_errs,
+ .num_irq_errs = ARRAY_SIZE(sc7280_irq_errs),
+ .erl = &sc7280_erl,
+};
--
2.25.1