Praneeth Paladugu | bcb9f5a | 2017-03-21 17:55:19 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2017, The Linux Foundation. All rights reserved. |
Saurabh Kothawade | 78041ee | 2017-01-16 16:38:09 -0800 | [diff] [blame] | 2 | * |
| 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 18 | msm_vidc: qcom,vidc@aa00000 { |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 19 | compatible = "qcom,msm-vidc"; |
Maheshwar Ajja | fd1dc75 | 2017-04-13 12:51:43 -0700 | [diff] [blame] | 20 | status = "ok"; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 21 | reg = <0xaa00000 0x200000>; |
| 22 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; |
| 23 | qcom,hfi = "venus"; |
| 24 | qcom,firmware-name = "venus"; |
Maheshwar Ajja | c8ea931 | 2017-04-14 12:34:33 -0700 | [diff] [blame] | 25 | qcom,never-unload-fw; |
| 26 | qcom,sw-power-collapse; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 27 | qcom,max-secure-instances = <5>; |
| 28 | qcom,max-hw-load = <2563200>; /* Full 4k @ 60 + 1080p @ 60 */ |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 29 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 30 | /* Supply */ |
| 31 | venus-supply = <&venus_gdsc>; |
| 32 | venus-core0-supply = <&vcodec0_gdsc>; |
| 33 | venus-core1-supply = <&vcodec1_gdsc>; |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 34 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 35 | /* Clocks */ |
| 36 | clock-names = "core_clk", "iface_clk", "bus_clk", |
Maheshwar Ajja | bd96a43 | 2017-04-18 16:41:44 -0700 | [diff] [blame] | 37 | "core0_clk", "core0_bus_clk", |
| 38 | "core1_clk", "core1_bus_clk"; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 39 | 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 Ajja | bd96a43 | 2017-04-18 16:41:44 -0700 | [diff] [blame] | 43 | <&clock_videocc VIDEO_CC_VCODEC0_AXI_CLK>, |
| 44 | <&clock_videocc VIDEO_CC_VCODEC1_CORE_CLK>, |
| 45 | <&clock_videocc VIDEO_CC_VCODEC1_AXI_CLK>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 46 | qcom,proxy-clock-names = "core_clk", "iface_clk", |
Maheshwar Ajja | bd96a43 | 2017-04-18 16:41:44 -0700 | [diff] [blame] | 47 | "bus_clk", "core0_clk", "core0_bus_clk", |
| 48 | "core1_clk", "core1_bus_clk"; |
Maheshwar Ajja | 522758b | 2017-04-20 15:31:13 -0700 | [diff] [blame] | 49 | qcom,clock-configs = <0x1 0x0 0x0 0x1 0x0 0x1 0x0>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 50 | qcom,allowed-clock-rates = <200000000 320000000 380000000 |
| 51 | 444000000 533000000>; |
Praneeth Paladugu | 238977b | 2016-12-06 12:51:26 -0800 | [diff] [blame] | 52 | qcom,max-hq-mbs-per-frame = <8160>; |
| 53 | qcom,max-hq-frames-per-sec = <60>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 54 | 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 67 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 68 | /* 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 77 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 78 | 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 94 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 95 | /* MMUs */ |
| 96 | non_secure_cb { |
| 97 | compatible = "qcom,msm-vidc,context-bank"; |
| 98 | label = "venus_ns"; |
| 99 | iommus = |
Patrick Daly | 38ff087 | 2017-04-18 16:37:44 -0700 | [diff] [blame] | 100 | <&apps_smmu 0x10a0 0x8>, |
Patrick Daly | c4aaa90 | 2017-04-24 12:45:11 -0700 | [diff] [blame] | 101 | <&apps_smmu 0x10b0 0x0>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 102 | buffer-types = <0xfff>; |
| 103 | virtual-addr-pool = <0x70800000 0x6f800000>; |
| 104 | }; |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 105 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 106 | secure_bitstream_cb { |
| 107 | compatible = "qcom,msm-vidc,context-bank"; |
| 108 | label = "venus_sec_bitstream"; |
| 109 | iommus = |
Patrick Daly | 38ff087 | 2017-04-18 16:37:44 -0700 | [diff] [blame] | 110 | <&apps_smmu 0x10a1 0x8>, |
| 111 | <&apps_smmu 0x10a5 0x8>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 112 | buffer-types = <0x241>; |
| 113 | virtual-addr-pool = <0x4b000000 0x25800000>; |
| 114 | qcom,secure-context-bank; |
| 115 | }; |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 116 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 117 | secure_pixel_cb { |
| 118 | compatible = "qcom,msm-vidc,context-bank"; |
| 119 | label = "venus_sec_pixel"; |
| 120 | iommus = |
Patrick Daly | 38ff087 | 2017-04-18 16:37:44 -0700 | [diff] [blame] | 121 | <&apps_smmu 0x10a3 0x8>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 122 | buffer-types = <0x106>; |
| 123 | virtual-addr-pool = <0x25800000 0x25800000>; |
| 124 | qcom,secure-context-bank; |
| 125 | }; |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 126 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 127 | secure_non_pixel_cb { |
| 128 | compatible = "qcom,msm-vidc,context-bank"; |
| 129 | label = "venus_sec_non_pixel"; |
| 130 | iommus = |
Patrick Daly | 38ff087 | 2017-04-18 16:37:44 -0700 | [diff] [blame] | 131 | <&apps_smmu 0x10a4 0x8>, |
Patrick Daly | c4aaa90 | 2017-04-24 12:45:11 -0700 | [diff] [blame] | 132 | <&apps_smmu 0x10b4 0x0>; |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame] | 133 | buffer-types = <0x480>; |
| 134 | virtual-addr-pool = <0x1000000 0x24800000>; |
| 135 | qcom,secure-context-bank; |
| 136 | }; |
| 137 | }; |
Saurabh Kothawade | 78041ee | 2017-01-16 16:38:09 -0800 | [diff] [blame] | 138 | }; |