Re: [PATCH v8 1/8] dt-bindings: media: qcom: Add JPEG encoder binding

From: Loic Poulain

Date: Thu Nov 12 2026 - 04:17:25 EST


Hi Atanas,

On Tue, Nov 10, 2026 at 6:16 PM Atanas Filipov
<atanas.filipov@xxxxxxxxxxxxxxxx> wrote:
>
> Add device-tree binding for the Qualcomm JPEG encoder hardware block
> present in SM8250 (Kona) and SC7280 (Kodiak) SoCs.
>
> The JPEG encoder is a standalone hardware IP within the camera subsystem
> that performs JPEG compression in memory-to-memory fashion. It is
> separate from the CAMSS ISP pipeline and has its own register space,
> interrupt, clocks, power domains, IOMMU stream, and interconnect path.
>
> Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
> ---
> .../bindings/media/qcom,sm8250-jpeg-enc.yaml | 190 ++++++++++++++++++
> 1 file changed, 190 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/qcom,sm8250-jpeg-enc.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/qcom,sm8250-jpeg-enc.yaml
> new file mode 100644
> index 0000000000000..112580f3df10b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/qcom,sm8250-jpeg-enc.yaml
> @@ -0,0 +1,190 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/qcom,sm8250-jpeg-enc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm JPEG Encoder
> +
> +maintainers:
> + - Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
> +
> +description:
> + Qualcomm JPEG Encoder is the JPEG encode hardware present in Qualcomm SoCs.
> + The encoder is a standalone hardware IP within the camera subsystem that
> + performs JPEG compression in memory-to-memory fashion.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,sc7280-jpeg-enc
> + - qcom,sm8250-jpeg-enc
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 5
> +
> + clock-names:
> + items:
> + - const: core
> + - const: bus
> + - const: config
> + - const: cpas
> + - const: camnoc_axi
> +
> + power-domains:
> + minItems: 2
> + maxItems: 3
> +
> + power-domain-names:
> + minItems: 2
> + maxItems: 3
> +
> + interconnects:
> + maxItems: 1
> +
> + interconnect-names:
> + items:
> + - const: camnoc
> +
> + iommus:
> + description:
> + SMMU stream ID for the JPEG hardware.
> + maxItems: 1
> +
> + operating-points-v2: true
> +
> + opp-table:
> + type: object
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> + - power-domains
> + - power-domain-names
> + - interconnects
> + - interconnect-names
> + - iommus
> + - operating-points-v2
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: qcom,sc7280-jpeg-enc
> + then:
> + properties:
> + power-domains:
> + items:
> + - description: Titan top GDSC
> + - description: CX power domain
> + power-domain-names:
> + items:
> + - const: titan_top
> + - const: cx
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: qcom,sm8250-jpeg-enc
> + then:
> + properties:
> + power-domains:
> + items:
> + - description: Titan top GDSC
> + - description: MX power domain
> + - description: MMCX power domain
> + power-domain-names:
> + items:
> + - const: titan_top
> + - const: mx
> + - const: mmcx
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/qcom,camcc-sm8250.h>
> + #include <dt-bindings/clock/qcom,gcc-sm8250.h>
> + #include <dt-bindings/interconnect/qcom,sm8250.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/power/qcom,rpmhpd.h>
> +
> + jpeg-encoder@ac53000 {
> + compatible = "qcom,sm8250-jpeg-enc";
> + reg = <0x0ac53000 0x1000>;
> +
> + interrupts = <GIC_SPI 474 IRQ_TYPE_EDGE_RISING>;
> +
> + power-domains = <&camcc TITAN_TOP_GDSC>,
> + <&rpmhpd RPMHPD_MX>,
> + <&rpmhpd RPMHPD_MMCX>;
> + power-domain-names = "titan_top", "mx", "mmcx";
> +
> + clocks = <&camcc CAM_CC_JPEG_CLK>,
> + <&gcc GCC_CAMERA_SF_AXI_CLK>,
> + <&camcc CAM_CC_CORE_AHB_CLK>,
> + <&camcc CAM_CC_CPAS_AHB_CLK>,
> + <&camcc CAM_CC_CAMNOC_AXI_CLK>;
> + clock-names = "core",
> + "bus",
> + "config",
> + "cpas",
> + "camnoc_axi";

I find the clock names a bit inconsistent. For example, camnoc_axi
explicitly refers to an AXI clock, whereas bus is much more generic
and does not follow the same naming convention.

I don't have a strong preference, but perhaps 'bus' could be renamed
to 'data' or 'nrt_data' (SF path is associated with non-real-time
resources).

Similarly, for camnoc_axi, maybe something like 'camnoc' or 'camnoc_data'.

> +
> + interconnects = <&mmss_noc MASTER_CAMNOC_SF 0 &mc_virt SLAVE_EBI_CH0 0>;
> + interconnect-names = "camnoc";
> +
> + iommus = <&apps_smmu 0x2040 0x400>;
> +
> + operating-points-v2 = <&jpeg_opp_table>;
> +
> + jpeg_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-100000000 {
> + opp-hz = /bits/ 64 <100000000>;
> + opp-peak-kBps = <262560>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_low_svs>;
> + };
> +
> + opp-200000000 {
> + opp-hz = /bits/ 64 <200000000>;
> + opp-peak-kBps = <524760>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_svs>;
> + };
> +
> + opp-400000000 {
> + opp-hz = /bits/ 64 <400000000>;
> + opp-peak-kBps = <978600>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_svs_l1>;
> + };
> +
> + opp-480000000 {
> + opp-hz = /bits/ 64 <480000000>;
> + opp-peak-kBps = <1095600>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_nom>;
> + };
> +
> + opp-600000000 {
> + opp-hz = /bits/ 64 <600000000>;
> + opp-peak-kBps = <1095600>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_turbo>;
> + };
> + };
> + };
> --
> 2.34.1
>
>