blob: ed4956f29ee2a3a5bdd8a8cd66277c8911fd1c2e [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";
20 status = "disabled";
21 reg = <0xaa00000 0x200000>;
22 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
23 qcom,hfi = "venus";
24 qcom,firmware-name = "venus";
25 qcom,max-secure-instances = <5>;
26 qcom,max-hw-load = <2563200>; /* Full 4k @ 60 + 1080p @ 60 */
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070027
Praneeth Paladugub71968b2015-08-19 20:47:57 -070028 /* Supply */
29 venus-supply = <&venus_gdsc>;
30 venus-core0-supply = <&vcodec0_gdsc>;
31 venus-core1-supply = <&vcodec1_gdsc>;
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070032
Praneeth Paladugub71968b2015-08-19 20:47:57 -070033 /* Clocks */
34 clock-names = "core_clk", "iface_clk", "bus_clk",
35 "core0_clk", "core1_clk";
36 clocks = <&clock_videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
37 <&clock_videocc VIDEO_CC_VENUS_AHB_CLK>,
38 <&clock_videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
39 <&clock_videocc VIDEO_CC_VCODEC0_CORE_CLK>,
40 <&clock_videocc VIDEO_CC_VCODEC1_CORE_CLK>;
41 qcom,proxy-clock-names = "core_clk", "iface_clk",
42 "bus_clk", "core0_clk", "core1_clk";
43 qcom,clock-configs = <0x0 0x0 0x0 0x0 0x0>;
44 qcom,allowed-clock-rates = <200000000 320000000 380000000
45 444000000 533000000>;
46 qcom,clock-freq-tbl {
47 qcom,profile-enc {
48 qcom,codec-mask = <0x55555555>;
49 qcom,vpp-cycles-per-mb = <675>;
50 qcom,vsp-cycles-per-mb = <125>;
51 qcom,low-power-cycles-per-mb = <320>;
52 };
53 qcom,profile-dec {
54 qcom,codec-mask = <0xffffffff>;
55 qcom,vpp-cycles-per-mb = <200>;
56 qcom,vsp-cycles-per-mb = <50>;
57 };
58 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070059
Praneeth Paladugub71968b2015-08-19 20:47:57 -070060 /* Buses */
61 bus_cnoc {
62 compatible = "qcom,msm-vidc,bus";
63 label = "cnoc";
64 qcom,bus-master = <MSM_BUS_MASTER_AMPSS_M0>;
65 qcom,bus-slave = <MSM_BUS_SLAVE_VENUS_CFG>;
66 qcom,bus-governor = "performance";
67 qcom,bus-range-kbps = <1000 1000>;
68 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070069
Praneeth Paladugub71968b2015-08-19 20:47:57 -070070 venus_bus_ddr {
71 compatible = "qcom,msm-vidc,bus";
72 label = "venus-ddr";
73 qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>;
74 qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>;
75 qcom,bus-governor = "performance";
76 qcom,bus-range-kbps = <1000 3388000>;
77 };
78 arm9_bus_ddr {
79 compatible = "qcom,msm-vidc,bus";
80 label = "venus-arm9-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 1000>;
85 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070086
Praneeth Paladugub71968b2015-08-19 20:47:57 -070087 /* MMUs */
88 non_secure_cb {
89 compatible = "qcom,msm-vidc,context-bank";
90 label = "venus_ns";
91 iommus =
92 <&apps_smmu 0x10a0>,
93 <&apps_smmu 0x10a8>,
94 <&apps_smmu 0x10b0>;
95 buffer-types = <0xfff>;
96 virtual-addr-pool = <0x70800000 0x6f800000>;
97 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -070098
Praneeth Paladugub71968b2015-08-19 20:47:57 -070099 firmware_cb {
100 compatible = "qcom,msm-vidc,context-bank";
101 qcom,fw-context-bank;
102 iommus =
103 <&apps_smmu 0x10b2>;
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 =
110 <&apps_smmu 0x10a1>,
111 <&apps_smmu 0x10a9>,
112 <&apps_smmu 0x10a5>,
113 <&apps_smmu 0x10ad>;
114 buffer-types = <0x241>;
115 virtual-addr-pool = <0x4b000000 0x25800000>;
116 qcom,secure-context-bank;
117 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -0700118
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700119 secure_pixel_cb {
120 compatible = "qcom,msm-vidc,context-bank";
121 label = "venus_sec_pixel";
122 iommus =
123 <&apps_smmu 0x10a3>,
124 <&apps_smmu 0x10ab>;
125 buffer-types = <0x106>;
126 virtual-addr-pool = <0x25800000 0x25800000>;
127 qcom,secure-context-bank;
128 };
Praneeth Paladugu8b9c21c2017-03-16 17:49:31 -0700129
Praneeth Paladugub71968b2015-08-19 20:47:57 -0700130 secure_non_pixel_cb {
131 compatible = "qcom,msm-vidc,context-bank";
132 label = "venus_sec_non_pixel";
133 iommus =
134 <&apps_smmu 0x10a4>,
135 <&apps_smmu 0x10ac>,
136 <&apps_smmu 0x10b4>;
137 buffer-types = <0x480>;
138 virtual-addr-pool = <0x1000000 0x24800000>;
139 qcom,secure-context-bank;
140 };
141 };
Saurabh Kothawade78041ee2017-01-16 16:38:09 -0800142};