Skip to contentSkip to conversation

media: qcom: iris: add support for SA8775P

PATCH Superseded Vikash Garodia 4 participants 9 messages Mar 20, 2025

Subsystems (6)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover media: qcom: iris: add support for SA8775P

add support for video hardware acceleration on SA8775P platform.

---
Changes in v2:
- Drop 01/04 patch as it was not needed.
- Introduce sa8775p as fallback compatible to sm8550.
- Move firmware files to board DT
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Vikash Garodia (3):
dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator
arm64: dts: qcom: sa8775p: add support for video node
arm64: dts: qcom: sa8775p-ride: enable video

 .../bindings/media/qcom,sm8550-iris.yaml           |  7 ++-
 arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi         |  5 ++
 arch/arm64/boot/dts/qcom/sa8775p.dtsi              | 71 ++++++++++++++++++++++
 3 files changed, 82 insertions(+), 1 deletion(-)

---
base-commit: f2151613e040973c868d28c8b00885dfab69eb75
change-id: 20250310-dtbinding-8921bfc151e9

Best regards,

Signature · 1 line
Vikash Garodia <[email protected]>
#1 lore raw

PATCH v2 1/3 dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator

Document the IRIS video decoder and encoder accelerator found in the SA8775p platform. SA8775p and SM8550 are irisv3 with same core and bindings, hence SA8775p is made fallback to SM8550. QCS8300 is a downscaled version of irisv3 and have different hardware capabilities. SM8650 is an irisv3 with different (higher) number of reset lines compared to SM8550. QCS8300 is yet to come in future posting, while SM8650 is posted as
https://lore.kernel.org/all/[email protected]/

---
 Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml +6 -1
index e424ea84c211f473a799481fd5463a16580187ed..6a89e9e3808758cfdbf6a51dfb9fc6559864253a 100644
@@ -19,7 +19,12 @@ allOf:
 
 properties:
   compatible:
-    const: qcom,sm8550-iris
+    oneOf:
+      - items:
+          - enum:
+              - qcom,sa8775p-iris
+          - const: qcom,sm8550-iris
+      - const: qcom,sm8550-iris
 
   power-domains:
     maxItems: 4
Signature · 1 line
2.34.1
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator

Quoted 9 lines · Vikash Garodia

Document the IRIS video decoder and encoder accelerator found in the SA8775p platform. SA8775p and SM8550 are irisv3 with same core and bindings, hence SA8775p is made fallback to SM8550. QCS8300 is a downscaled version of irisv3 and have different hardware capabilities. SM8650 is an irisv3 with different (higher) number of reset lines compared to SM8550. QCS8300 is yet to come in future posting, while SM8650 is posted as
https://lore.kernel.org/all/[email protected]/

Quoted 4 lines
---
 Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Best regards,
Krzysztof

Reviewed-by on v2 1/3
#3 lore raw

Re: [PATCH v2 1/3] dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator

In reply to Vikash Garodia
Quoted 34 lines · Vikash Garodia

Document the IRIS video decoder and encoder accelerator found in the SA8775p platform. SA8775p and SM8550 are irisv3 with same core and bindings, hence SA8775p is made fallback to SM8550. QCS8300 is a downscaled version of irisv3 and have different hardware capabilities. SM8650 is an irisv3 with different (higher) number of reset lines compared to SM8550. QCS8300 is yet to come in future posting, while SM8650 is posted as
https://lore.kernel.org/all/[email protected]/

---
  Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml +6 -2
index e424ea84c211f473a799481fd5463a16580187ed..6a89e9e3808758cfdbf6a51dfb9fc6559864253a 100644
@@ -19,7 +19,12 @@ allOf:
 
  properties:
    compatible:
-    const: qcom,sm8550-iris
+    oneOf:
+      - items:
+          - enum:
+              - qcom,sa8775p-iris
+          - const: qcom,sm8550-iris
+      - const: qcom,sm8550-iris
 
    power-domains:
      maxItems: 4
 
--
Quoted 3 lines

2.34.1

Reviewed-by on v2 1/3
#4 lore raw

Re: [PATCH v2 1/3] dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator

In reply to Vikash Garodia
Quoted 34 lines · Vikash Garodia

Document the IRIS video decoder and encoder accelerator found in the SA8775p platform. SA8775p and SM8550 are irisv3 with same core and bindings, hence SA8775p is made fallback to SM8550. QCS8300 is a downscaled version of irisv3 and have different hardware capabilities. SM8650 is an irisv3 with different (higher) number of reset lines compared to SM8550. QCS8300 is yet to come in future posting, while SM8650 is posted as
https://lore.kernel.org/all/[email protected]/

---
  Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml +6 -2
index e424ea84c211f473a799481fd5463a16580187ed..6a89e9e3808758cfdbf6a51dfb9fc6559864253a 100644
@@ -19,7 +19,12 @@ allOf:
 
  properties:
    compatible:
-    const: qcom,sm8550-iris
+    oneOf:
+      - items:
+          - enum:
+              - qcom,sa8775p-iris
+          - const: qcom,sm8550-iris
+      - const: qcom,sm8550-iris
 
    power-domains:
      maxItems: 4
 
--
Quoted 3 lines

2.34.1

#5 lore raw

PATCH v2 2/3 arm64: dts: qcom: sa8775p: add support for video node

In reply to Vikash Garodia

Video node enables video on Qualcomm SA8775P platform.

---
 arch/arm64/boot/dts/qcom/sa8775p.dtsi | 71 +++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
arch/arm64/boot/dts/qcom/sa8775p.dtsi +71 -0
index 3394ae2d13003417a15e64c9e47833725ec779e6..0b5bfcdb803913396ff269c9002b4314991075b8 100644
@@ -10,6 +10,7 @@
 #include <dt-bindings/clock/qcom,sa8775p-dispcc.h>
 #include <dt-bindings/clock/qcom,sa8775p-gcc.h>
 #include <dt-bindings/clock/qcom,sa8775p-gpucc.h>
+#include <dt-bindings/clock/qcom,sa8775p-videocc.h>
 #include <dt-bindings/dma/qcom-gpi.h>
 #include <dt-bindings/interconnect/qcom,sa8775p-rpmh.h>
 #include <dt-bindings/mailbox/qcom-ipcc.h>
@@ -3783,6 +3784,76 @@ llcc: system-cache-controller@9200000 {
 			interrupts = <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		iris: video-codec@aa00000 {
+			compatible = "qcom,sa8775p-iris", "qcom,sm8550-iris";
+
+			reg = <0 0x0aa00000 0 0xf0000>;
+			interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+
+			power-domains = <&videocc VIDEO_CC_MVS0C_GDSC>,
+					<&videocc VIDEO_CC_MVS0_GDSC>,
+					<&rpmhpd SA8775P_MXC>,
+					<&rpmhpd SA8775P_MMCX>;
+			power-domain-names = "venus",
+					     "vcodec0",
+					     "mxc",
+					     "mmcx";
+			operating-points-v2 = <&iris_opp_table>;
+
+			clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
+				 <&videocc VIDEO_CC_MVS0C_CLK>,
+				 <&videocc VIDEO_CC_MVS0_CLK>;
+			clock-names = "iface",
+				      "core",
+				      "vcodec0_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";
+
+			memory-region = <&pil_video_mem>;
+
+			resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>;
+			reset-names = "bus";
+
+			iommus = <&apps_smmu 0x0880 0x0400>,
+				 <&apps_smmu 0x0887 0x0400>;
+			dma-coherent;
+
+			status = "disabled";
+
+			iris_opp_table: opp-table {
+				compatible = "operating-points-v2";
+
+				opp-366000000 {
+					opp-hz = /bits/ 64 <366000000>;
+					required-opps = <&rpmhpd_opp_svs_l1>,
+							<&rpmhpd_opp_svs_l1>;
+				};
+
+				opp-444000000 {
+					opp-hz = /bits/ 64 <444000000>;
+					required-opps = <&rpmhpd_opp_nom>,
+							<&rpmhpd_opp_nom>;
+				};
+
+				opp-533333334 {
+					opp-hz = /bits/ 64 <533333334>;
+					required-opps = <&rpmhpd_opp_turbo>,
+							<&rpmhpd_opp_turbo>;
+				};
+
+				opp-560000000 {
+					opp-hz = /bits/ 64 <560000000>;
+					required-opps = <&rpmhpd_opp_turbo_l1>,
+							<&rpmhpd_opp_turbo_l1>;
+				};
+			};
+		};
+
 		videocc: clock-controller@abf0000 {
 			compatible = "qcom,sa8775p-videocc";
 			reg = <0x0 0x0abf0000 0x0 0x10000>;
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH v2 2/3] arm64: dts: qcom: sa8775p: add support for video node

Quoted 20 lines · Vikash Garodia

Video node enables video on Qualcomm SA8775P platform.

---
 arch/arm64/boot/dts/qcom/sa8775p.dtsi | 71 +++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
arch/arm64/boot/dts/qcom/sa8775p.dtsi +1 -0
index 3394ae2d13003417a15e64c9e47833725ec779e6..0b5bfcdb803913396ff269c9002b4314991075b8 100644
@@ -10,6 +10,7 @@
 #include <dt-bindings/clock/qcom,sa8775p-dispcc.h>
 #include <dt-bindings/clock/qcom,sa8775p-gcc.h>
 #include <dt-bindings/clock/qcom,sa8775p-gpucc.h>
+#include <dt-bindings/clock/qcom,sa8775p-videocc.h>
 #include <dt-bindings/dma/qcom-gpi.h>
 #include <dt-bindings/interconnect/qcom,sa8775p-rpmh.h>
 #include <dt-bindings/mailbox/qcom-ipcc.h>

arch/arm64/boot/dts/qcom/sa8775p.dtsi llcc: system-cache-controller@9200000 { · line 3790

Quoted 7 lines
arch/arm64/boot/dts/qcom/sa8775p.dtsi +4 -0
@@ -3783,6 +3784,76 @@ llcc: system-cache-controller@9200000 {
 			interrupts = <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		iris: video-codec@aa00000 {
+			compatible = "qcom,sa8775p-iris", "qcom,sm8550-iris";
+
+			reg = <0 0x0aa00000 0 0xf0000>;

0x0 instead of 0

LGTM otherwise.

Quoted 2 lines
arch/arm64/boot/dts/qcom/sa8775p.dtsi +2 -0
+			interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+
Signature · 2 lines
With best wishes
Dmitry
#7 lore raw

PATCH v2 3/3 arm64: dts: qcom: sa8775p-ride: enable video

In reply to Vikash Garodia

Enable video nodes on the sa8775p-ride board and point to the appropriate firmware files.

---
 arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +5 -0
index 175f8b1e3b2ded15fc3265ac8c26b14473b618f6..2b3d0876dc7f270dbd24081b698ce80e2c27a174 100644
@@ -1038,3 +1038,8 @@ &usb_2_hsphy {
 &xo_board_clk {
 	clock-frequency = <38400000>;
 };
+
+&iris {
+	firmware-name = "qcom/vpu/vpu30_p4_s6.mbn";
+	status = "okay";
+};
Signature · 1 line
2.34.1
Reviewed-by on v2 3/3
#8 lore raw

Re: [PATCH v2 3/3] arm64: dts: qcom: sa8775p-ride: enable video

Quoted 13 lines · Vikash Garodia

Enable video nodes on the sa8775p-ride board and point to the appropriate firmware files.

---
 arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +0 -0
index 175f8b1e3b2ded15fc3265ac8c26b14473b618f6..2b3d0876dc7f270dbd24081b698ce80e2c27a174 100644

arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi &usb_2_hsphy { · line 1044

Quoted 7 lines
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +4 -0
@@ -1038,3 +1038,8 @@ &usb_2_hsphy {
 &xo_board_clk {
 	clock-frequency = <38400000>;
 };
+
+&iris {
+	firmware-name = "qcom/vpu/vpu30_p4_s6.mbn";
+	status = "okay";

Nit: please add empty line before status line. With that fixed:

Quoted 5 lines
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +1 -0
+};
Signature · 2 lines
-- 
2.34.1
Signature · 2 lines
With best wishes
Dmitry