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"; |
| 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 27 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 28 | /* Supply */ |
| 29 | venus-supply = <&venus_gdsc>; |
| 30 | venus-core0-supply = <&vcodec0_gdsc>; |
| 31 | venus-core1-supply = <&vcodec1_gdsc>; |
Praneeth Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 32 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 33 | /* 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 59 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 60 | /* 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 69 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 70 | 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 86 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 87 | /* 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 98 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 99 | firmware_cb { |
| 100 | compatible = "qcom,msm-vidc,context-bank"; |
| 101 | qcom,fw-context-bank; |
| 102 | iommus = |
| 103 | <&apps_smmu 0x10b2>; |
| 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 = |
| 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 118 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 119 | 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 Paladugu | 8b9c21c | 2017-03-16 17:49:31 -0700 | [diff] [blame] | 129 | |
Praneeth Paladugu | b71968b | 2015-08-19 20:47:57 -0700 | [diff] [blame^] | 130 | 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 Kothawade | 78041ee | 2017-01-16 16:38:09 -0800 | [diff] [blame] | 142 | }; |