blob: 4fe9282baf0cd92de3f6f9caf68be39fecf8f0df [file] [log] [blame]
Praneeth Paladugubcb9f5a2017-03-21 17:55:19 -07001/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
Saurabh Kothawade78041ee2017-01-16 16:38:09 -08002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <dt-bindings/interrupt-controller/arm-gic.h>
14#include <dt-bindings/msm/msm-bus-ids.h>
15#include <dt-bindings/clock/qcom,videocc-sdm845.h>
16
17&soc {
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070018 msm_vidc: qcom,vidc@aa00000 {
Praneeth Paladugub71968b2015-08-19 20:47:57 -070019 compatible = "qcom,msm-vidc";
Maheshwar Ajjafd1dc752017-04-13 12:51:43 -070020 status = "ok";
Praneeth Paladugub71968b2015-08-19 20:47:57 -070021 reg = <0xaa00000 0x200000>;
22 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
23 qcom,hfi = "venus";
24 qcom,firmware-name = "venus";
Maheshwar Ajjac8ea9312017-04-14 12:34:33 -070025 qcom,never-unload-fw;
26 qcom,sw-power-collapse;
Praneeth Paladugub71968b2015-08-19 20:47:57 -070027 qcom,max-secure-instances = <5>;
28 qcom,max-hw-load = <2563200>; /* Full 4k @ 60 + 1080p @ 60 */
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070029
Praneeth Paladugub71968b2015-08-19 20:47:57 -070030 /* Supply */
31 venus-supply = <&venus_gdsc>;
32 venus-core0-supply = <&vcodec0_gdsc>;
33 venus-core1-supply = <&vcodec1_gdsc>;
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070034
Praneeth Paladugub71968b2015-08-19 20:47:57 -070035 /* Clocks */
36 clock-names = "core_clk", "iface_clk", "bus_clk",
Maheshwar Ajjabd96a432017-04-18 16:41:44 -070037 "core0_clk", "core0_bus_clk",
38 "core1_clk", "core1_bus_clk";
Praneeth Paladugub71968b2015-08-19 20:47:57 -070039 clocks = <&clock_videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
40 <&clock_videocc VIDEO_CC_VENUS_AHB_CLK>,
41 <&clock_videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
42 <&clock_videocc VIDEO_CC_VCODEC0_CORE_CLK>,
Maheshwar Ajjabd96a432017-04-18 16:41:44 -070043 <&clock_videocc VIDEO_CC_VCODEC0_AXI_CLK>,
44 <&clock_videocc VIDEO_CC_VCODEC1_CORE_CLK>,
45 <&clock_videocc VIDEO_CC_VCODEC1_AXI_CLK>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -070046 qcom,proxy-clock-names = "core_clk", "iface_clk",
Maheshwar Ajjabd96a432017-04-18 16:41:44 -070047 "bus_clk", "core0_clk", "core0_bus_clk",
48 "core1_clk", "core1_bus_clk";
Maheshwar Ajja522758b2017-04-20 15:31:13 -070049 qcom,clock-configs = <0x1 0x0 0x0 0x1 0x0 0x1 0x0>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -070050 qcom,allowed-clock-rates = <200000000 320000000 380000000
51 444000000 533000000>;
Praneeth Paladugu238977b2016-12-06 12:51:26 -080052 qcom,max-hq-mbs-per-frame = <8160>;
53 qcom,max-hq-frames-per-sec = <60>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -070054 qcom,clock-freq-tbl {
55 qcom,profile-enc {
56 qcom,codec-mask = <0x55555555>;
57 qcom,vpp-cycles-per-mb = <675>;
58 qcom,vsp-cycles-per-mb = <125>;
59 qcom,low-power-cycles-per-mb = <320>;
60 };
61 qcom,profile-dec {
62 qcom,codec-mask = <0xffffffff>;
63 qcom,vpp-cycles-per-mb = <200>;
64 qcom,vsp-cycles-per-mb = <50>;
65 };
66 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070067
Praneeth Paladugub71968b2015-08-19 20:47:57 -070068 /* Buses */
69 bus_cnoc {
70 compatible = "qcom,msm-vidc,bus";
71 label = "cnoc";
72 qcom,bus-master = <MSM_BUS_MASTER_AMPSS_M0>;
73 qcom,bus-slave = <MSM_BUS_SLAVE_VENUS_CFG>;
74 qcom,bus-governor = "performance";
75 qcom,bus-range-kbps = <1000 1000>;
76 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070077
Praneeth Paladugub71968b2015-08-19 20:47:57 -070078 venus_bus_ddr {
79 compatible = "qcom,msm-vidc,bus";
80 label = "venus-ddr";
81 qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>;
82 qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>;
83 qcom,bus-governor = "performance";
84 qcom,bus-range-kbps = <1000 3388000>;
85 };
86 arm9_bus_ddr {
87 compatible = "qcom,msm-vidc,bus";
88 label = "venus-arm9-ddr";
89 qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>;
90 qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>;
91 qcom,bus-governor = "performance";
92 qcom,bus-range-kbps = <1000 1000>;
93 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070094
Praneeth Paladugub71968b2015-08-19 20:47:57 -070095 /* MMUs */
96 non_secure_cb {
97 compatible = "qcom,msm-vidc,context-bank";
98 label = "venus_ns";
99 iommus =
Patrick Daly38ff0872017-04-18 16:37:44 -0700100 <&apps_smmu 0x10a0 0x8>,
Patrick Dalyc4aaa902017-04-24 12:45:11 -0700101 <&apps_smmu 0x10b0 0x0>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700102 buffer-types = <0xfff>;
103 virtual-addr-pool = <0x70800000 0x6f800000>;
104 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -0700105
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700106 secure_bitstream_cb {
107 compatible = "qcom,msm-vidc,context-bank";
108 label = "venus_sec_bitstream";
109 iommus =
Patrick Daly38ff0872017-04-18 16:37:44 -0700110 <&apps_smmu 0x10a1 0x8>,
111 <&apps_smmu 0x10a5 0x8>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700112 buffer-types = <0x241>;
113 virtual-addr-pool = <0x4b000000 0x25800000>;
114 qcom,secure-context-bank;
115 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -0700116
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700117 secure_pixel_cb {
118 compatible = "qcom,msm-vidc,context-bank";
119 label = "venus_sec_pixel";
120 iommus =
Patrick Daly38ff0872017-04-18 16:37:44 -0700121 <&apps_smmu 0x10a3 0x8>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700122 buffer-types = <0x106>;
123 virtual-addr-pool = <0x25800000 0x25800000>;
124 qcom,secure-context-bank;
125 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -0700126
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700127 secure_non_pixel_cb {
128 compatible = "qcom,msm-vidc,context-bank";
129 label = "venus_sec_non_pixel";
130 iommus =
Patrick Daly38ff0872017-04-18 16:37:44 -0700131 <&apps_smmu 0x10a4 0x8>,
Patrick Dalyc4aaa902017-04-24 12:45:11 -0700132 <&apps_smmu 0x10b4 0x0>;
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700133 buffer-types = <0x480>;
134 virtual-addr-pool = <0x1000000 0x24800000>;
135 qcom,secure-context-bank;
136 };
137 };
Saurabh Kothawade78041ee2017-01-16 16:38:09 -0800138};