media: iris: enable SM8350 and SC8280XP support
Subsystems (7)
v2 cover media: iris: enable SM8350 and SC8280XP support
In order to enable wider testing of the Iris driver on the HFI Gen1 platforms enable support for Qualcomm SM8350 and SC8280XP platforms.
The driver was very lightly tested on SC8280XP and (due to the lack of the hw) not tested on SM8350.
---
Changes in v2:
- Added missing chunk, including sm8350-videocc.h, lost in rebases.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Dmitry Baryshkov (4):
media: iris: introduce SM8350 and SC8280XP support
arm64: dts: qcom: sc8280xp: sort reserved memory regions
arm64: dts: qcom: sm8350: add Venus device
arm64: dts: qcom: sm8350-hdk: enable Venus core
Konrad Dybcio (3):
media: dt-bindings: Document SC8280XP/SM8350 Venus
arm64: dts: qcom: sc8280xp: Add Venus
arm64: dts: qcom: sc8280xp-x13s: Enable Venus.../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 93 ++++++++++++++++- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 73 +++++++++++++ drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 ++++++++++++++++++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 9 files changed, 411 insertions(+), 6 deletions(-)
---
base-commit: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
change-id: 20260120-iris-sc8280xp-85d13bc60536
Best regards,
Signature · 2 lines
With best wishes Dmitry
PATCH v2 1/7 media: dt-bindings: Document SC8280XP/SM8350 Venus
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +113 -0
@@ -0,0 +1,113 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,sm8350-venus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SM8350 Venus video encode and decode accelerators + +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml# + +properties: + compatible: + enum: + - qcom,sc8280xp-venus + - qcom,sm8350-venus + + clocks: + maxItems: 3 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core + + resets: + maxItems: 1 + + reset-names: + items: + - const: core + + power-domains: + maxItems: 3 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mx + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + +required: + - compatible + - power-domain-names + - iommus + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-sm8350.h> + #include <dt-bindings/clock/qcom,sm8350-videocc.h> + #include <dt-bindings/interconnect/qcom,icc.h> + #include <dt-bindings/interconnect/qcom,sm8350.h> + #include <dt-bindings/power/qcom-rpmpd.h> + + venus: video-codec@aa00000 { + compatible = "qcom,sm8350-venus"; + reg = <0x0aa00000 0x100000>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>; + clock-names = "iface", + "core", + "vcodec0_core"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SM8350_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + };
Signature · 1 line
2.47.3
PATCH v2 2/7 media: iris: introduce SM8350 and SC8280XP support
In reply to Dmitry BaryshkovSM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The iris_platform_gen1.c is now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled in iris_dt_match.
--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 4 files changed, 124 insertions(+), 4 deletions(-)
drivers/media/platform/qcom/iris/Makefile +1 -4
@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \
@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \ -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
drivers/media/platform/qcom/iris/iris_platform_common.h +2 -0
@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;
drivers/media/platform/qcom/iris/iris_platform_gen1.c +111 -0
126 lines not on this page · raw message
drivers/media/platform/qcom/iris/iris_probe.c +10 -0
@@ -357,11 +357,21 @@ static const struct of_device_id iris_dt_match[] = { .compatible = "qcom,sc7280-venus", .data = &sc7280_data, }, +#endif + { + .compatible = "qcom,sc8280xp-venus", + .data = &sc8280xp_data, + }, +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS)) { .compatible = "qcom,sm8250-venus", .data = &sm8250_data, }, #endif + { + .compatible = "qcom,sm8350-venus", + .data = &sm8350_data, + }, { .compatible = "qcom,sm8550-iris", .data = &sm8550_data,
Signature · 1 line
2.47.3
PATCH v2 3/7 arm64: dts: qcom: sc8280xp: sort reserved memory regions
In reply to Dmitry BaryshkovMove memory region reserved for the GPU to its proper place in DT.
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +5 -5
@@ -691,11 +691,6 @@ reserved-region@85b00000 { no-map; }; - pil_gpu_mem: gpu-mem@8bf00000 { - reg = <0 0x8bf00000 0 0x2000>; - no-map; - }; - pil_adsp_mem: adsp-region@86c00000 { reg = <0 0x86c00000 0 0x2000000>; no-map;
@@ -711,6 +706,11 @@ pil_nsp0_mem: cdsp0-region@8a100000 { no-map; }; + pil_gpu_mem: gpu-mem@8bf00000 { + reg = <0 0x8bf00000 0 0x2000>; + no-map; + }; + pil_nsp1_mem: cdsp1-region@8c600000 { reg = <0 0x8c600000 0 0x1e00000>; no-map;
Signature · 1 line
2.47.3
PATCH v2 4/7 arm64: dts: qcom: sc8280xp: Add Venus
In reply to Dmitry BaryshkovFrom: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +89 -0
@@ -10,7 +10,9 @@ #include <dt-bindings/clock/qcom,rpmh.h> #include <dt-bindings/clock/qcom,sc8280xp-camcc.h> #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h> +#include <dt-bindings/clock/qcom,sm8350-videocc.h> #include <dt-bindings/dma/qcom-gpi.h> +#include <dt-bindings/interconnect/qcom,icc.h> #include <dt-bindings/interconnect/qcom,osm-l3.h> #include <dt-bindings/interconnect/qcom,sc8280xp.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -691,6 +693,11 @@ reserved-region@85b00000 { no-map; }; + pil_video_mem: pil_video_region@86700000 { + reg = <0 0x86700000 0 0x500000>; + no-map; + }; + pil_adsp_mem: adsp-region@86c00000 { reg = <0 0x86c00000 0 0x2000000>; no-map;
@@ -4181,6 +4188,88 @@ usb_1_dwc3_ss: endpoint { }; }; + venus: video-codec@aa00000 { + compatible = "qcom,sc8280xp-venus"; + reg = <0 0x0aa00000 0 0x100000>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>; + clock-names = "iface", + "core", + "vcodec0_core"; + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SC8280XP_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2e00 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-1014000000 { + opp-hz = /bits/ 64 <1014000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-1098000000 { + opp-hz = /bits/ 64 <1098000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-1332000000 { + opp-hz = /bits/ 64 <1332000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + + opp-1599000000 { + opp-hz = /bits/ 64 <1599000000>; + required-opps = <&rpmhpd_opp_turbo>; + }; + + opp-1680000000 { + opp-hz = /bits/ 64 <1680000000>; + required-opps = <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + + videocc: clock-controller@abf0000 { + compatible = "qcom,sc8280xp-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd SC8280XP_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + cci0: cci@ac4a000 { compatible = "qcom,sc8280xp-cci", "qcom,msm8996-cci"; reg = <0 0x0ac4a000 0 0x1000>;
Signature · 1 line
2.47.3
PATCH v2 5/7 arm64: dts: qcom: sc8280xp-x13s: Enable Venus
In reply to Dmitry BaryshkovFrom: Konrad Dybcio <[email protected]>
Enable Venus and point the driver to the correct firmware file.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +6 -0
@@ -1474,6 +1474,12 @@ &vamacro { status = "okay"; }; +&venus { + firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn"; + + status = "okay"; +}; + &wsamacro { status = "okay"; };
Signature · 1 line
2.47.3
PATCH v2 6/7 arm64: dts: qcom: sm8350: add Venus device
In reply to Dmitry BaryshkovAdd Venus and video clock controller devices, describing the Iris2 core present on this platform.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
arch/arm64/boot/dts/qcom/sm8350.dtsi +73 -0
@@ -10,6 +10,7 @@ #include <dt-bindings/clock/qcom,gcc-sm8350.h> #include <dt-bindings/clock/qcom,gpucc-sm8350.h> #include <dt-bindings/clock/qcom,rpmh.h> +#include <dt-bindings/clock/qcom,sm8350-videocc.h> #include <dt-bindings/dma/qcom-gpi.h> #include <dt-bindings/firmware/qcom,scm.h> #include <dt-bindings/gpio/gpio.h>
@@ -2745,6 +2746,78 @@ usb_2_dwc3: usb@a800000 { }; }; + venus: video-codec@aa00000 { + compatible = "qcom,sm8350-venus"; + reg = <0 0x0aa00000 0 0x100000>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>; + clock-names = "iface", + "core", + "vcodec0_core"; + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd RPMHPD_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-1014000000 { + opp-hz = /bits/ 64 <1014000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-1098000000 { + opp-hz = /bits/ 64 <1098000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-1332000000 { + opp-hz = /bits/ 64 <1332000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + }; + }; + + videocc: clock-controller@abf0000 { + compatible = "qcom,sm8350-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd RPMHPD_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + mdss: display-subsystem@ae00000 { compatible = "qcom,sm8350-mdss"; reg = <0 0x0ae00000 0 0x1000>;
Signature · 1 line
2.47.3
PATCH v2 7/7 arm64: dts: qcom: sm8350-hdk: enable Venus core
In reply to Dmitry BaryshkovEnable video en/decoder on the SM8350 HDK board. There is no need to specify the firmware as the driver will use the default one, provided by the linux-firmware.
--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +4 -0
@@ -894,6 +894,10 @@ &usb_2_qmpphy { vdda-pll-supply = <&vreg_l5b_0p88>; }; +&venus { + status = "okay"; +}; + /* PINCTRL - additions to nodes defined in sm8350.dtsi */ &tlmm {
Signature · 1 line
2.47.3