diff mbox series

[6/7] arm64: dts: ti: k3-am62p: Add Wave5 Video Encoder/Decoder Node

Message ID 20231127223718.2651185-7-b-brnich@ti.com (mailing list archive)
State New, archived
Headers show
Series Add Support for Wave5 on TI Devices | expand

Commit Message

Brandon Brnich Nov. 27, 2023, 10:37 p.m. UTC
This patch adds support for the Wave521cl on the AM62P.

The node requires an SRAM buffer to reduce bandwidth by saving temporal
information. Can only allocate 62KB for this given there is only 64 KB
SRAM available on AM62P.

Wave521cl needs to use CMA as there is no IO MMU on AM62P. Allocate
544 MB of CMA to meet 12 channel 720x480 use-case for this device.

Signed-off-by: Brandon Brnich <b-brnich@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 15 +++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts   | 12 ++++++++++++
 2 files changed, 27 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
index 963758c7d377..55c2a69617f5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
@@ -11,6 +11,10 @@  oc_sram: sram@70000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00 0x00 0x70000000 0x10000>;
+
+		vpu_sram: vpu-sram@70000000 {
+			reg = <0x70000000 0xf800>;
+		};
 	};
 
 	gic500: interrupt-controller@1800000 {
@@ -881,4 +885,15 @@  mcasp2: audio-controller@2b20000 {
 		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
 		status = "disabled";
 	};
+
+	vpu: video-codec@30210000 {
+		compatible = "cnm,cm521c-vpu";
+		reg = <0x00 0x30210000 0x00 0x10000>;
+		interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&k3_clks 204 2>;
+		clock-names = "vcodec";
+		power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
+		sram = <&vpu_sram>;
+		status = "disabled";
+	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
index f377eadef0c1..2a5bcda15584 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
@@ -46,6 +46,14 @@  reserved-memory {
 		#size-cells = <2>;
 		ranges;
 
+		/* global cma region */
+		linux,cma {
+			compatible = "shared-dma-pool";
+			reusable;
+			size = <0x00 0x24000000>;
+			linux,cma-default;
+		};
+
 		secure_tfa_ddr: tfa@9e780000 {
 			reg = <0x00 0x9e780000 0x00 0x80000>;
 			no-map;
@@ -598,3 +606,7 @@  &wkup_uart0 {
 	status = "reserved";
 	bootph-all;
 };
+
+&vpu {
+	status = "okay";
+};