public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Add hantro g1 video decoder support for RK3588
@ 2024-03-16  7:10 Jianfeng Liu
  2024-03-16  7:10 ` [PATCH v4 1/2] arm64: dts: rockchip: Add Hantro G1 VPU " Jianfeng Liu
  2024-03-16  7:11 ` [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string Jianfeng Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Jianfeng Liu @ 2024-03-16  7:10 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	linux-media
  Cc: robh, krzysztof.kozlowski+dt, conor+dt, heiko, ezequiel, p.zabel,
	mchehab, liujianfeng1994, sfr

This is the v4 version of this series adding hantro g1 video decoder
support for rk3588.

RK3588 has Hantro G1 video decoder known as VDPU121 in TRM of RK3588 which
is capable to decode MPEG2/H.264/VP8 up to 1920x1088. This vpu ip is also
found in RK3568.

Test results from fluster can be found from thread of v3[1]
https://lore.kernel.org/all/20240118080602.9028-1-liujianfeng1994@gmail.com/

Changes in v4:
 - Change compatible string to rockchip,rk3588-vdpu121
 - Link to v3: https://lore.kernel.org/all/20231231151112.3994194-1-liujianfeng1994@gmail.com/

Jianfeng Liu (2):
  arm64: dts: rockchip: Add Hantro G1 VPU support for RK3588
  dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string

 .../bindings/media/rockchip-vpu.yaml          |  3 +++
 arch/arm64/boot/dts/rockchip/rk3588s.dtsi     | 20 +++++++++++++++++++
 2 files changed, 23 insertions(+)

--
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 1/2] arm64: dts: rockchip: Add Hantro G1 VPU support for RK3588
  2024-03-16  7:10 [PATCH v4 0/2] Add hantro g1 video decoder support for RK3588 Jianfeng Liu
@ 2024-03-16  7:10 ` Jianfeng Liu
  2024-03-16  7:11 ` [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string Jianfeng Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Jianfeng Liu @ 2024-03-16  7:10 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	linux-media
  Cc: robh, krzysztof.kozlowski+dt, conor+dt, heiko, ezequiel, p.zabel,
	mchehab, liujianfeng1994, sfr

Enable Hantro G1 video decoder in RK3588's devicetree.

Tested with FFmpeg v4l2_request code taken from [1]
with MPEG2, H.264 and VP8 samples.

[1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch

Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
---
 arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 87b83c87b..2e411c80a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -646,6 +646,26 @@ i2c0: i2c@fd880000 {
 		status = "disabled";
 	};

+	vpu: video-codec@fdb50000 {
+		compatible = "rockchip,rk3588-vdpu121", "rockchip,rk3568-vpu";
+		reg = <0x0 0xfdb50000 0x0 0x800>;
+		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
+		clock-names = "aclk", "hclk";
+		iommus = <&vdpu_mmu>;
+		power-domains = <&power RK3588_PD_VDPU>;
+	};
+
+	vdpu_mmu: iommu@fdb50800 {
+		compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
+		reg = <0x0 0xfdb50800 0x0 0x40>;
+		interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH 0>;
+		clock-names = "aclk", "iface";
+		clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
+		power-domains = <&power RK3588_PD_VDPU>;
+		#iommu-cells = <0>;
+	};
+
 	vop: vop@fdd90000 {
 		compatible = "rockchip,rk3588-vop";
 		reg = <0x0 0xfdd90000 0x0 0x4200>, <0x0 0xfdd95000 0x0 0x1000>;
--
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string
  2024-03-16  7:10 [PATCH v4 0/2] Add hantro g1 video decoder support for RK3588 Jianfeng Liu
  2024-03-16  7:10 ` [PATCH v4 1/2] arm64: dts: rockchip: Add Hantro G1 VPU " Jianfeng Liu
@ 2024-03-16  7:11 ` Jianfeng Liu
  2024-03-17 14:44   ` Conor Dooley
  1 sibling, 1 reply; 4+ messages in thread
From: Jianfeng Liu @ 2024-03-16  7:11 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	linux-media
  Cc: robh, krzysztof.kozlowski+dt, conor+dt, heiko, ezequiel, p.zabel,
	mchehab, liujianfeng1994, sfr

Add Hantro G1 VPU compatible string for RK3588.
RK3588 has the same Hantro G1 ip as RK3568, which are both
known as VDPU121 in TRM of RK3568 and RK3588.

Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
---
 Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
index c57e1f488..4f667db91 100644
--- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
@@ -31,6 +31,9 @@ properties:
       - items:
           - const: rockchip,rk3228-vpu
           - const: rockchip,rk3399-vpu
+      - items:
+          - const: rockchip,rk3588-vdpu121
+          - const: rockchip,rk3568-vpu

   reg:
     maxItems: 1
--
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string
  2024-03-16  7:11 ` [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string Jianfeng Liu
@ 2024-03-17 14:44   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-03-17 14:44 UTC (permalink / raw)
  To: Jianfeng Liu
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	linux-media, robh, krzysztof.kozlowski+dt, conor+dt, heiko,
	ezequiel, p.zabel, mchehab, sfr


[-- Attachment #1.1: Type: text/plain, Size: 341 bytes --]

On Sat, Mar 16, 2024 at 03:11:00PM +0800, Jianfeng Liu wrote:
> Add Hantro G1 VPU compatible string for RK3588.
> RK3588 has the same Hantro G1 ip as RK3568, which are both
> known as VDPU121 in TRM of RK3568 and RK3588.
> 
> Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-17 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-16  7:10 [PATCH v4 0/2] Add hantro g1 video decoder support for RK3588 Jianfeng Liu
2024-03-16  7:10 ` [PATCH v4 1/2] arm64: dts: rockchip: Add Hantro G1 VPU " Jianfeng Liu
2024-03-16  7:11 ` [PATCH v4 2/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string Jianfeng Liu
2024-03-17 14:44   ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox