Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions Documentation/devicetree/bindings/media/qcom,qcm2290-camss-ope.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/qcom,qcm2290-camss-ope.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Camera Subsystem Offline Processing Engine

maintainers:
- Loic Poulain <loic.poulain@oss.qualcomm.com>

description:
The Qualcomm Camera Subsystem (CAMSS) Offline Processing Engine (OPE)
is a memory-to-memory image processing block. It supports a range of
pixel-processing operations such as scaling, cropping, gain adjustments,
white-balancing, and various format conversions. The OPE does not
interface directly with image sensors, instead, it processes frames
sourced from and written back to system memory.

properties:
compatible:
oneOf:
- items:
- const: qcom,shikra-camss-ope
- const: qcom,qcm2290-camss-ope
- const: qcom,qcm2290-camss-ope
reg:
maxItems: 6

reg-names:
items:
- const: cdm
- const: top
- const: qos
- const: pipeline
- const: bus_read
- const: bus_write

clocks:
maxItems: 5

clock-names:
items:
- const: axi
- const: core
- const: iface
- const: nrt
- const: top

interrupts:
maxItems: 1

interconnects:
maxItems: 2

interconnect-names:
items:
- const: config
- const: data

iommus:
items:
- description: OPE CDM (Configuration DMA) port.
- description: OPE read (fetch engine) port.
- description: OPE write (write engine) port.

operating-points-v2: true

opp-table:
type: object

power-domains:
items:
- description: GDSC CAMSS Block, Global Distributed Switch Controller.
- description: CX power domain.

power-domain-names:
items:
- const: camss
- const: cx

required:
- compatible
- reg
- reg-names
- clocks
- clock-names
- interrupts
- interconnects
- interconnect-names
- iommus
- power-domains
- power-domain-names

additionalProperties: false

examples:
- |
#include <dt-bindings/clock/qcom,gcc-qcm2290.h>
#include <dt-bindings/interconnect/qcom,qcm2290.h>
#include <dt-bindings/interconnect/qcom,rpm-icc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/qcom-rpmpd.h>

camss_ope: isp@5c42000 {
compatible = "qcom,qcm2290-camss-ope";

reg = <0x5c42000 0x400>,
<0x5c42400 0x200>,
<0x5c42600 0x200>,
<0x5c42800 0x4400>,
<0x5c46c00 0x190>,
<0x5c46d90 0xa00>;
reg-names = "cdm", "top", "qos", "pipeline",
"bus_read", "bus_write";

clocks = <&gcc GCC_CAMSS_AXI_CLK>,
<&gcc GCC_CAMSS_OPE_CLK>,
<&gcc GCC_CAMSS_OPE_AHB_CLK>,
<&gcc GCC_CAMSS_NRT_AXI_CLK>,
<&gcc GCC_CAMSS_TOP_AHB_CLK>;
clock-names = "axi", "core", "iface", "nrt", "top";

interrupts = <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>;

interconnects = <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
&config_noc SLAVE_CAMERA_CFG RPM_ACTIVE_TAG>,
<&mmnrt_virt MASTER_CAMNOC_SF RPM_ALWAYS_TAG
&bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
interconnect-names = "config", "data";

iommus = <&apps_smmu 0x800 0x0>,
<&apps_smmu 0x820 0x0>,
<&apps_smmu 0x840 0x0>;

operating-points-v2 = <&ope_opp_table>;
power-domains = <&gcc GCC_CAMSS_TOP_GDSC>,
<&rpmpd QCM2290_VDDCX>;
power-domain-names = "camss", "cx";

ope_opp_table: opp-table {
compatible = "operating-points-v2";

opp-200000000 {
opp-hz = /bits/ 64 <200000000>;
required-opps = <&rpmpd_opp_svs>;
};

opp-465000000 {
opp-hz = /bits/ 64 <465000000>;
required-opps = <&rpmpd_opp_nom>;
};
};
};
77 changes: 77 additions & 0 deletions arch/arm64/boot/dts/qcom/qcm2290.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1903,6 +1903,83 @@
};
};

isp_ope: isp@5c42000 {
compatible = "qcom,qcm2290-camss-ope";

reg = <0x0 0x5c42000 0x0 0x400>,
<0x0 0x5c42400 0x0 0x200>,
<0x0 0x5c42600 0x0 0x200>,
<0x0 0x5c42800 0x0 0x4400>,
<0x0 0x5c46c00 0x0 0x190>,
<0x0 0x5c46d90 0x0 0xa00>;
reg-names = "cdm",
"top",
"qos",
"pipeline",
"bus_read",
"bus_write";

clocks = <&gcc GCC_CAMSS_AXI_CLK>,
<&gcc GCC_CAMSS_OPE_CLK>,
<&gcc GCC_CAMSS_OPE_AHB_CLK>,
<&gcc GCC_CAMSS_NRT_AXI_CLK>,
<&gcc GCC_CAMSS_TOP_AHB_CLK>;
clock-names = "axi",
"core",
"iface",
"nrt",
"top";

interrupts = <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>;

interconnects = <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
&config_noc SLAVE_CAMERA_CFG RPM_ACTIVE_TAG>,
<&mmnrt_virt MASTER_CAMNOC_SF RPM_ALWAYS_TAG
&bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
interconnect-names = "config",
"data";

iommus = <&apps_smmu 0x800 0x0>,
<&apps_smmu 0x820 0x0>,
<&apps_smmu 0x840 0x0>;

operating-points-v2 = <&ope_opp_table>;
power-domains = <&gcc GCC_CAMSS_TOP_GDSC>,
<&rpmpd QCM2290_VDDCX>;
power-domain-names = "camss",
"cx";

ope_opp_table: opp-table {
compatible = "operating-points-v2";

opp-19200000 {
opp-hz = /bits/ 64 <19200000>;
required-opps = <&rpmpd_opp_min_svs>;
};

opp-200000000 {
opp-hz = /bits/ 64 <200000000>;
required-opps = <&rpmpd_opp_svs>;
};

opp-266600000 {
opp-hz = /bits/ 64 <266600000>;
required-opps = <&rpmpd_opp_svs_plus>;
};

opp-465000000 {
opp-hz = /bits/ 64 <465000000>;
required-opps = <&rpmpd_opp_nom>;
};

opp-580000000 {
opp-hz = /bits/ 64 <580000000>;
required-opps = <&rpmpd_opp_turbo>;
turbo-mode;
};
};
};

mdss: display-subsystem@5e00000 {
compatible = "qcom,qcm2290-mdss";
reg = <0x0 0x05e00000 0x0 0x1000>;
Expand Down
77 changes: 77 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,83 @@
status = "disabled";
};

isp_ope: isp@5c42000 {
compatible = "qcom,shikra-camss-ope", "qcom,qcm2290-camss-ope";

reg = <0x0 0x5c42000 0x0 0x400>,
<0x0 0x5c42400 0x0 0x200>,
<0x0 0x5c42600 0x0 0x200>,
<0x0 0x5c42800 0x0 0x4400>,
<0x0 0x5c46c00 0x0 0x190>,
<0x0 0x5c46d90 0x0 0xa00>;
reg-names = "cdm",
"top",
"qos",
"pipeline",
"bus_read",
"bus_write";

clocks = <&gcc GCC_CAMSS_AXI_CLK>,
<&gcc GCC_CAMSS_OPE_CLK>,
<&gcc GCC_CAMSS_OPE_AHB_CLK>,
<&gcc GCC_CAMSS_NRT_AXI_CLK>,
<&gcc GCC_CAMSS_TOP_AHB_CLK>;
clock-names = "axi",
"core",
"iface",
"nrt",
"top";

interrupts = <GIC_SPI 209 IRQ_TYPE_EDGE_RISING 0>;

interconnects = <&mem_noc MASTER_AMPSS_M0 RPM_ACTIVE_TAG
&config_noc SLAVE_CAMERA_CFG RPM_ACTIVE_TAG>,
<&mmnrt_virt MASTER_CAMNOC_SF RPM_ALWAYS_TAG
&mc_virt SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
interconnect-names = "config",
"data";

iommus = <&apps_smmu 0x600 0x0>,
<&apps_smmu 0x620 0x0>,
<&apps_smmu 0x640 0x0>;

operating-points-v2 = <&ope_opp_table>;
power-domains = <&gcc GCC_CAMSS_TOP_GDSC>,
<&rpmpd RPMPD_VDDCX>;
power-domain-names = "camss",
"cx";

ope_opp_table: opp-table {
compatible = "operating-points-v2";

opp-19200000 {
opp-hz = /bits/ 64 <19200000>;
required-opps = <&rpmpd_opp_min_svs>;
};

opp-200000000 {
opp-hz = /bits/ 64 <200000000>;
required-opps = <&rpmpd_opp_svs>;
};

opp-266600000 {
opp-hz = /bits/ 64 <266600000>;
required-opps = <&rpmpd_opp_svs_plus>;
};

opp-465000000 {
opp-hz = /bits/ 64 <465000000>;
required-opps = <&rpmpd_opp_nom>;
};

opp-580000000 {
opp-hz = /bits/ 64 <580000000>;
required-opps = <&rpmpd_opp_turbo>;
turbo-mode;
};
};
};

mdss: display-subsystem@5e00000 {
compatible = "qcom,shikra-mdss", "qcom,qcm2290-mdss";
reg = <0x0 0x05e00000 0x0 0x1000>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ CONFIG_VIDEO_IMX8_ISI=m
CONFIG_VIDEO_IMX8_ISI_M2M=y
CONFIG_VIDEO_IMX8_JPEG=m
CONFIG_VIDEO_QCOM_CAMSS=m
CONFIG_VIDEO_QCOM_CAMSS_OPE=m
CONFIG_VIDEO_QCOM_IRIS=m
CONFIG_VIDEO_QCOM_VENUS=m
CONFIG_VIDEO_RCAR_ISP=m
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/platform/qcom/camss/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ config VIDEO_QCOM_CAMSS
select VIDEOBUF2_DMA_SG
select V4L2_FWNODE
select PHY_QCOM_MIPI_CSI2

source "drivers/media/platform/qcom/camss/ope/Kconfig"
2 changes: 2 additions & 0 deletions drivers/media/platform/qcom/camss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ qcom-camss-objs += \
camss-video.o

obj-$(CONFIG_VIDEO_QCOM_CAMSS) += qcom-camss.o

obj-$(CONFIG_VIDEO_QCOM_CAMSS_OPE) += ope/
16 changes: 16 additions & 0 deletions drivers/media/platform/qcom/camss/ope/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config VIDEO_QCOM_CAMSS_OPE
tristate "Qualcomm Offline Processing Engine (OPE) driver"
depends on V4L_PLATFORM_DRIVERS
depends on VIDEO_DEV
depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
select V4L2_ISP
select VIDEOBUF2_DMA_CONTIG
select VIDEOBUF2_VMALLOC
help
Enable support for the Qualcomm Offline Processing Engine (OPE).
OPE is a memory-to-memory ISP block that converts raw Bayer frames
to YUV, performing white balance, demosaic, chroma enhancement and
downscaling. Found on QCM2290 and related SoCs.

To compile this driver as a module, choose M here: the module
will be called qcom-camss-ope.
9 changes: 9 additions & 0 deletions drivers/media/platform/qcom/camss/ope/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-only
# Makefile for Qualcomm CAMSS Offline Processing Engine (OPE) driver

qcom-camss-ope-objs := \
core.o \
pipeline.o \
params.o

obj-$(CONFIG_VIDEO_QCOM_CAMSS_OPE) += qcom-camss-ope.o
Loading
Loading