From fb56c188a744c07d4ba45a70c61e754504f9b852 Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Tue, 20 Aug 2024 15:58:58 +0530 Subject: [PATCH 1/7] video: devicetree: Enable dt for tuna target - Enable dt for tuna target Change-Id: I10b150c277e849a83a6505186bbc9f1a468e047a Signed-off-by: Rajathi S --- Kbuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kbuild b/Kbuild index 6e94a185..40cbf4e2 100644 --- a/Kbuild +++ b/Kbuild @@ -15,7 +15,10 @@ endif ifeq ($(CONFIG_ARCH_SUN), y) dtbo-y += sun-vidc.dtbo -dtbo-y += sun-vidc-v2.dtbo +endif + +ifeq ($(CONFIG_ARCH_TUNA), y) +dtbo-y += tuna-vidc.dtbo endif always-y := $(dtb-y) $(dtbo-y) From 4db84e7e4ac621f4263a341dd0ead6d4d02332e0 Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Tue, 29 Oct 2024 09:29:17 +0530 Subject: [PATCH 2/7] video: devicetree: Add TunaP SoC to tuna target - Add dt support for tunaP soc Change-Id: If4b42e95d11b25db4ed33ece81017835848abb45 --- tuna-vidc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuna-vidc.dts b/tuna-vidc.dts index ba395185..c96b1be2 100644 --- a/tuna-vidc.dts +++ b/tuna-vidc.dts @@ -14,6 +14,6 @@ / { model = "Qualcomm Technologies, Inc. tuna"; compatible = "qcom,tuna"; - qcom,msm-id = <655 0x10000>, <681 0x10000>; + qcom,msm-id = <655 0x10000>, <681 0x10000>, <694 0x10000>; qcom,board-id = <0 0>; }; From 884ab8ed9611e4257469e4d4ee959975cd3c6036 Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Fri, 25 Oct 2024 15:23:38 +0530 Subject: [PATCH 3/7] ARM: dts: msm: Use genPD instead of regulators for GDSC From Sun target, clock driver moved the GDSC from regulator framework to GenPd to match with upstream. Add support to use GenPD using pm_runtime apis. Change-Id: I19ed8a047f3aea4132be618c81e061b7cce7f9de --- tuna-vidc.dtsi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tuna-vidc.dtsi b/tuna-vidc.dtsi index 7c9c9050..eb8e91b6 100644 --- a/tuna-vidc.dtsi +++ b/tuna-vidc.dtsi @@ -14,9 +14,10 @@ reg = <0x0aa00000 0xF0000>; interrupts = ; - /* Supply */ - iris-ctl-supply = <&video_cc_mvs0c_gdsc>; - vcodec-supply = <&video_cc_mvs0_gdsc>; + /* Power Domains */ + power-domains = <&videocc VIDEO_CC_MVS0C_GDSC>, + <&videocc VIDEO_CC_MVS0_GDSC>; + power-domain-names = "iris-ctl", "vcodec"; /* Clocks */ clocks = From 484d2d91e5b9d0765f28f071e18b1e555288261f Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Thu, 17 Oct 2024 11:36:53 +0530 Subject: [PATCH 4/7] video: devicetree: Add support for kera target - Add dt support for kera target Change-Id: I71bc3cc08e89e458c218622b9ea969a5b61b9173 --- kera-vidc.dts | 19 ++++++++ kera-vidc.dtsi | 127 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 kera-vidc.dts create mode 100644 kera-vidc.dtsi diff --git a/kera-vidc.dts b/kera-vidc.dts new file mode 100644 index 00000000..103d5fd8 --- /dev/null +++ b/kera-vidc.dts @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include +#include "kera-vidc.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. kera"; + compatible = "qcom,kera"; + qcom,msm-id = <659 0x10000>, <686 0x10000>; + qcom,board-id = <0 0>; +}; diff --git a/kera-vidc.dtsi b/kera-vidc.dtsi new file mode 100644 index 00000000..e609abfb --- /dev/null +++ b/kera-vidc.dtsi @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ +&soc { + msm_vidc: qcom,vidc@aa00000 { + compatible = "qcom,kera-vidc"; + status = "okay"; + + /* IOMMU Config */ + #address-cells = <1>; + #size-cells = <1>; + + reg = <0x0aa00000 0xF0000>; + interrupts = ; + + /* Supply */ + iris-ctl-supply = <&video_cc_mvs0c_gdsc>; + vcodec-supply = <&video_cc_mvs0_gdsc>; + + /* Clocks */ + clocks = + <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>, + <&videocc VIDEO_CC_MVS0_CLK_SRC>; + clock-names = + "gcc_video_axi0_clk", + "video_cc_mvs0c_clk", + "video_cc_mvs0_clk", + "video_cc_mvs0_clk_src"; + + /* Bus Interconnects */ + interconnects = + <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_VENUS_CFG>, + <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>, + <&mmss_noc MASTER_VIDEO_MVP &gem_noc SLAVE_LLCC>; + interconnect-names = + "venus-cnoc", + "venus-ddr", + "venus-llcc"; + + /* FW load region */ + memory-region = <&video_mem>; + + /* Clock Resets */ + resets = + <&gcc GCC_VIDEO_AXI0_CLK_ARES>, + <&videocc VIDEO_CC_XO_CLK_ARES>, + <&videocc VIDEO_CC_MVS0C_CLK_ARES>, + <&videocc VIDEO_CC_MVS0_CLK_ARES>; + reset-names = + "video_axi_reset", + "video_xo_reset", + "video_mvs0c_reset", + "video_mvs0_reset"; + + /* MMUs */ + iommu_region_partition: iommu_region_partition { + /* These IOVA regions are unique per context bank */ + iommu-addresses = <&non_secure_pixel_cb 0x0 0x00100000>, + <&non_secure_pixel_cb 0xe0000000 0x20000000>, + <&non_secure_cb 0x0 0x25800000>, + <&non_secure_cb 0xe0000000 0x20000000>, + <&secure_non_pixel_cb 0x0 0x01000000>, + <&secure_non_pixel_cb 0x25800000 0xda800000>, + <&secure_bitstream_cb 0x0 0x00500000>, + <&secure_bitstream_cb 0xe0000000 0x20000000>, + <&secure_pixel_cb 0x0 0x00500000>, + <&secure_pixel_cb 0xe0000000 0x20000000>; + }; + + non_secure_pixel_cb: non_secure_pixel_cb { + compatible = "qcom,vidc,cb-ns-pxl"; + iommus = <&apps_smmu 0x1947 0x0000>; + memory-region = <&iommu_region_partition>; + qcom,iommu-faults = "non-fatal"; + qcom,iova-best-fit; + /* log2 of desired alignment (1MB) - log2 of PAGE_SIZE; (8 = 20 - 12) */ + qcom,iova-max-align-shift = <8>; + dma-coherent; + }; + + non_secure_cb: non_secure_cb { + compatible = "qcom,vidc,cb-ns"; + iommus = <&apps_smmu 0x1940 0x0000>; + memory-region = <&iommu_region_partition>; + qcom,iommu-faults = "non-fatal"; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <8>; /* 1 MB */ + dma-coherent; + }; + + secure_non_pixel_cb: secure_non_pixel_cb { + compatible = "qcom,vidc,cb-sec-non-pxl"; + iommus = <&apps_smmu 0x1944 0x0000>; + memory-region = <&iommu_region_partition>; + qcom,iommu-faults = "non-fatal"; + qcom,iommu-vmid = <0xB>; /* VMID_CP_NON_PIXEL */ + qcom,iova-best-fit; + qcom,iova-max-align-shift = <8>; /* 1 MB */ + qcom,secure-context-bank; + }; + + secure_bitstream_cb: secure_bitstream_cb { + compatible = "qcom,vidc,cb-sec-bitstream"; + iommus = <&apps_smmu 0x1941 0x0004>; + memory-region = <&iommu_region_partition>; + qcom,iommu-faults = "non-fatal"; + qcom,iommu-vmid = <0x9>; /* VMID_CP_BITSTREAM */ + qcom,iova-best-fit; + qcom,iova-max-align-shift = <8>; /* 1 MB */ + qcom,secure-context-bank; + }; + + secure_pixel_cb: secure_pixel_cb { + compatible = "qcom,vidc,cb-sec-pxl"; + iommus = <&apps_smmu 0x1943 0x0000>; + memory-region = <&iommu_region_partition>; + qcom,iommu-faults = "non-fatal"; + qcom,iommu-vmid = <0xA>; /* VMID_CP_PIXEL */ + qcom,iova-best-fit; + qcom,iova-max-align-shift = <8>; /* 1 MB */ + qcom,secure-context-bank; + }; + }; +}; From 4ac5a970135674763b81c25090f3f414db8f7e91 Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Sat, 30 Nov 2024 19:05:50 +0530 Subject: [PATCH 5/7] ARM: dts: msm: Added back dtbo for sun V2 device - Adding dtbo for sun v2 devices Change-Id: I408f3fb7b2e3ab307fdaf1748af7205dd101f544 --- Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/Kbuild b/Kbuild index 40cbf4e2..cf871915 100644 --- a/Kbuild +++ b/Kbuild @@ -15,6 +15,7 @@ endif ifeq ($(CONFIG_ARCH_SUN), y) dtbo-y += sun-vidc.dtbo +dtbo-y += sun-vidc-v2.dtbo endif ifeq ($(CONFIG_ARCH_TUNA), y) From b95184acc2b7188be947804947c1e3d858c71454 Mon Sep 17 00:00:00 2001 From: Aishanya Srivastava Date: Fri, 22 Nov 2024 19:41:38 +0530 Subject: [PATCH 6/7] ARM: dts: msm: Use genPD instead of regulators for GDSC From Pakala, clock driver moved the GDSC from regulator framework to GenPd to match with upstream. Add support to use GenPD using pm_runtime apis on Kera. Signed-off-by: Aishanya Srivastava Change-Id: Id4be9a5cd189b7c427663c3d1322fbcdb8549d37 --- kera-vidc.dtsi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kera-vidc.dtsi b/kera-vidc.dtsi index e609abfb..288de4d2 100644 --- a/kera-vidc.dtsi +++ b/kera-vidc.dtsi @@ -14,9 +14,10 @@ reg = <0x0aa00000 0xF0000>; interrupts = ; - /* Supply */ - iris-ctl-supply = <&video_cc_mvs0c_gdsc>; - vcodec-supply = <&video_cc_mvs0_gdsc>; + /* Power Domains */ + power-domains = <&videocc VIDEO_CC_MVS0C_GDSC>, + <&videocc VIDEO_CC_MVS0_GDSC>; + power-domain-names = "iris-ctl", "vcodec"; /* Clocks */ clocks = From d5e06f7568db57efe960fac84be1a4a0db816592 Mon Sep 17 00:00:00 2001 From: Rajathi S Date: Thu, 17 Oct 2024 11:53:23 +0530 Subject: [PATCH 7/7] video: devicetree: Enable dt for kera target - Enable dt for kera target Change-Id: I05f7bb3d08e42e06852bee11566da71da4c1f5b7 --- Kbuild | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Kbuild b/Kbuild index cf871915..e1ab6d69 100644 --- a/Kbuild +++ b/Kbuild @@ -22,6 +22,10 @@ ifeq ($(CONFIG_ARCH_TUNA), y) dtbo-y += tuna-vidc.dtbo endif +ifeq ($(CONFIG_ARCH_KERA), y) +dtbo-y += kera-vidc.dtbo +endif + always-y := $(dtb-y) $(dtbo-y) subdir-y := $(dts-dirs) clean-files := *.dtb *.dtbo