adreno.txt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. Qualcomm Technologies, Inc. GPU
  2. Qualcomm Technologies, Inc. Adreno GPU
  3. Required properties:
  4. - label: A string used as a descriptive name for the device.
  5. - compatible: Must be "qcom,kgsl-3d0" and "qcom,kgsl-3d"
  6. - reg: Specifies the register base address and size, the shader memory
  7. base address and size (if it exists), and the base address and size
  8. of the CX_DBGC block (if it exists).
  9. - reg-names: Resource names used for the physical address of device registers
  10. and shader memory. "kgsl_3d0_reg_memory" gives the physical address
  11. and length of device registers while "kgsl_3d0_shader_memory" gives
  12. physical address and length of device shader memory. If
  13. specified, "qfprom_memory" gives the range for the efuse
  14. registers used for various configuration options. If specified,
  15. "kgsl_3d0_cx_dbgc_memory" gives the physical address and length
  16. of the CX DBGC block.
  17. - interrupts: Interrupt mapping for GPU IRQ.
  18. - interrupt-names: String property to describe the name of the interrupt.
  19. - qcom,id: An integer used as an identification number for the device.
  20. - qcom,gpu-bimc-interface-clk-freq:
  21. GPU-BIMC interface clock needs to be set to this value for
  22. targets where B/W requirements does not meet GPU Turbo use cases.
  23. - clocks: List of phandle and clock specifier pairs, one pair
  24. for each clock input to the device.
  25. - clock-names: List of clock input name strings sorted in the same
  26. order as the clocks property.
  27. Current values of clock-names are:
  28. "src_clk", "core_clk", "iface_clk", "mem_clk", "mem_iface_clk",
  29. "alt_mem_iface_clk", "rbbmtimer_clk", "alwayson_clk",
  30. "iref_clk", "l3_vote"
  31. "core_clk" and "iface_clk" are required and others are optional
  32. - qcom,base-leakage-coefficient: Dynamic leakage coefficient.
  33. - qcom,lm-limit: Current limit for GPU limit management.
  34. - qcom,isense-clk-on-level: below or equal this power level isense clock is at XO rate,
  35. above this powerlevel isense clock is at working frequency.
  36. Bus Scaling Data:
  37. - qcom,msm-bus,name: String property to describe the name of the 3D graphics processor.
  38. - qcom,msm-bus,num-cases: This is the the number of Bus Scaling use cases defined in the vectors property.
  39. - qcom,msm-bus,active-only: A boolean flag indicating if it is active only.
  40. - qcom,msm-bus,num-paths: This represents the number of paths in each Bus Scaling Usecase.
  41. - qcom,msm-bus,vectors-KBps: A series of 4 cell properties, format of which is:
  42. <src dst ab ib>, <src dst ab ib>, // For Bus Scaling Usecase 1
  43. <src dst ab ib>, <src dst ab ib>, // For Bus Scaling Usecase 2
  44. <.. .. .. ..>, <.. .. .. ..>; // For Bus Scaling Usecase n
  45. This property is a series of all vectors for all Bus Scaling Usecases.
  46. Each set of vectors for each usecase describes bandwidth votes for a combination
  47. of src/dst ports. The driver will set the desired use case based on the selected
  48. power level and the desired bandwidth vote will be registered for the port pairs.
  49. Current values of src are:
  50. 0 = MSM_BUS_MASTER_GRAPHICS_3D
  51. 1 = MSM_BUS_MASTER_GRAPHICS_3D_PORT1
  52. 2 = MSM_BUS_MASTER_V_OCMEM_GFX3D
  53. Current values of dst are:
  54. 0 = MSM_BUS_SLAVE_EBI_CH0
  55. 1 = MSM_BUS_SLAVE_OCMEM
  56. ab: Represents aggregated bandwidth. This value is 0 for Graphics.
  57. ib: Represents instantaneous bandwidth. This value has a range <0 8000 MB/s>
  58. - qcom,ocmem-bus-client: Container for another set of bus scaling properties
  59. qcom,msm-bus,name
  60. qcom,msm-bus,num-cases
  61. qcom,msm-bus,num-paths
  62. qcom,msm-bus,vectors-KBps
  63. to be used by ocmem msm bus scaling client.
  64. GDSC Oxili Regulators:
  65. - regulator-names: List of regulator name strings sorted in power-on order
  66. - vddcx-supply: Phandle for vddcx regulator device node.
  67. - vdd-supply: Phandle for vdd regulator device node.
  68. IOMMU Data:
  69. - iommu: Phandle for the KGSL IOMMU device node
  70. GPU Power levels:
  71. - qcom,gpu-pwrlevel-bins: Container for sets of GPU power levels (see
  72. adreno-pwrlevels.txt)
  73. L3 Power levels:
  74. - qcom,l3-pwrlevels: Container for sets of L3 power levels, the
  75. L3 frequency is adjusted according to the
  76. performance hint received from userspace.
  77. DCVS Core info
  78. - qcom,dcvs-core-info Container for the DCVS core info (see
  79. dcvs-core-info.txt)
  80. Optional Properties:
  81. - qcom,initial-powerlevel: This value indicates which qcom,gpu-pwrlevel should be used at start time
  82. and when coming back out of resume
  83. - qcom,bus-control: Boolean. Enables an independent bus vote from the gpu frequency
  84. - qcom,bus-width: Bus width in number of bytes. This enables dynamic AB bus voting based on
  85. bus width and actual bus transactions.
  86. - qcom,gpubw-dev: a phandle to a device representing bus bandwidth requirements
  87. (see devdw.txt)
  88. - qcom,idle-timeout: This property represents the time in milliseconds for idle timeout.
  89. - qcom,no-nap: If it exists software clockgating will be disabled at boot time.
  90. - qcom,chipid: If it exists this property is used to replace
  91. the chip identification read from the GPU hardware.
  92. This is used to override faulty hardware readings.
  93. - qcom,disable-wake-on-touch: Boolean. Disables the GPU power up on a touch input event.
  94. - qcom,disable-busy-time-burst:
  95. Boolean. Disables the busy time burst to avoid switching
  96. of power level for large frames based on the busy time limit.
  97. - qcom,pm-qos-active-latency:
  98. Right after GPU wakes up from sleep, driver votes for
  99. acceptable maximum latency to the pm-qos driver. This
  100. voting demands that the system can not go into any
  101. power save state *if* the latency to bring system back
  102. into active state is more than this value.
  103. Value is in microseconds.
  104. - qcom,pm-qos-wakeup-latency:
  105. Similar to the above. Driver votes against deep low
  106. power modes right before GPU wakes up from sleep.
  107. - qcom,l2pc-cpu-mask-latency:
  108. The CPU mask latency in microseconds to avoid L2PC
  109. on masked CPUs.
  110. - qcom,force-32bit:
  111. Force the GPU to use 32 bit data sizes even if
  112. it is capable of doing 64 bit.
  113. - qcom,gpu-speed-bin: GPU speed bin information in the format
  114. <offset mask shift>
  115. offset - offset of the efuse register from the base.
  116. mask - mask for the relevant bits in the efuse register.
  117. shift - number of bits to right shift to get the speed bin
  118. value.
  119. - qcom,gpu-speed-bin-vectors:
  120. GPU speed bin vectors property is the series of all the vectors
  121. in format specified below. Values from individual fuses are read,
  122. masked and shifted to form a value. At the end all fuse values
  123. are ordered together to form final speed bin value.
  124. <offset mask shift>
  125. <offset mask shift>
  126. < .. .. .. >
  127. offset - offset of the efuse register from the base.
  128. mask - mask for the relevant bits in the efuse register.
  129. shift - number of bits to right shift.
  130. - qcom,gpu-disable-fuse: GPU disable fuse
  131. <offset mask shift>
  132. offset - offset of the efuse register from the base.
  133. mask - mask for the relevant bits in the efuse register.
  134. shift - number of bits to right shift to get the disable_gpu
  135. fuse bit value.
  136. - qcom,soc-hw-rev-efuse: SOC hardware revision fuse information in the format
  137. <offset bit_position mask>
  138. offset - offset of the efuse register from the base.
  139. bit_position - hardware revision starting bit in the efuse register.
  140. mask - mask for the relevant bits in the efuse register.
  141. - qcom,highest-bank-bit:
  142. Specify the bit of the highest DDR bank. This
  143. is programmed into protected registers and also
  144. passed to the user as a property.
  145. - qcom,min-access-length:
  146. Specify the minimum access length for the chip.
  147. Either 32 or 64 bytes.
  148. Based on the above options, program the appropriate bit into
  149. certain protected registers and also pass to the user as
  150. a property.
  151. - qcom,ubwc-mode:
  152. Specify the ubwc mode for this chip.
  153. 1: UBWC 1.0
  154. 2: UBWC 2.0
  155. 3: UBWC 3.0
  156. Based on the ubwc mode, program the appropriate bit into
  157. certain protected registers and also pass to the user as
  158. a property.
  159. - qcom,l2pc-cpu-mask:
  160. Disables L2PC on masked CPUs when any of Graphics
  161. rendering thread is running on masked CPUs.
  162. Bit 0 is for CPU-0, bit 1 is for CPU-1...
  163. - qcom,l2pc-update-queue:
  164. Disables L2PC on masked CPUs at queue time when it's true.
  165. - qcom,snapshot-size:
  166. Specify the size of snapshot in bytes. This will override
  167. snapshot size defined in the driver code.
  168. - qcom,enable-ca-jump:
  169. Boolean. Enables use of context aware DCVS
  170. - qcom,ca-busy-penalty:
  171. This property represents the time in microseconds required to
  172. initiate context aware power level jump.
  173. - qcom,ca-target-pwrlevel:
  174. This value indicates which qcom,gpu-pwrlevel to jump on in case
  175. of context aware power level jump.
  176. - qcom,gpu-qdss-stm:
  177. <baseAddr size>
  178. baseAddr - base address of the gpu channels in the qdss stm memory region
  179. size - size of the gpu stm region
  180. - qcom,gpu-qtimer:
  181. <baseAddr size>
  182. baseAddr - base address of the qtimer memory region
  183. size - size of the qtimer region
  184. - qcom,tsens-name:
  185. Specify the name of GPU temperature sensor. This name will be used
  186. to get the temperature from the thermal driver API.
  187. - qcom,enable-midframe-timer:
  188. Boolean. Enables the use of midframe sampling timer. This timer
  189. samples the GPU powerstats if the cmdbatch expiry takes longer than
  190. the threshold set by KGSL_GOVERNOR_CALL_INTERVAL. Enable only if
  191. target has NAP state enabled.
  192. GPU Quirks:
  193. - qcom,gpu-quirk-two-pass-use-wfi:
  194. Signal the GPU to set Set TWOPASSUSEWFI bit in
  195. PC_DBG_ECO_CNTL (5XX and 6XX only)
  196. - qcom,gpu-quirk-critical-packets:
  197. Submit a set of critical PM4 packets when the GPU wakes up
  198. - qcom,gpu-quirk-fault-detect-mask:
  199. Mask out RB1-3 activity signals from HW hang
  200. detection logic
  201. - qcom,gpu-quirk-dp2clockgating-disable:
  202. Disable RB sampler data path clock gating optimization
  203. - qcom,gpu-quirk-lmloadkill-disable:
  204. Use register setting to disable local memory(LM) feature
  205. to avoid corner case error
  206. - qcom,gpu-quirk-hfi-use-reg:
  207. Use registers to replace DCVS HFI message to avoid GMU failure
  208. to access system memory during IFPC
  209. - qcom,gpu-quirk-limit-uche-gbif-rw:
  210. Limit number of read and write transactions from UCHE block to
  211. GBIF to avoid possible deadlock between GBIF, SMMU and MEMNOC.
  212. - qcom,gpu-quirk-mmu-secure-cb-alt:
  213. Select alternate secure context bank to generate SID1 for
  214. secure playback.
  215. KGSL Memory Pools:
  216. - qcom,gpu-mempools: Container for sets of GPU mempools.Multiple sets
  217. (pools) can be defined within qcom,gpu-mempools.
  218. Each mempool defines a pool order, reserved pages,
  219. allocation allowed.
  220. Properties:
  221. - compatible: Must be qcom,gpu-mempools.
  222. - qcom,mempool-max-pages: Max pages for all mempools, If not defined there is no limit.
  223. - qcom,gpu-mempool: Defines a set of mempools.
  224. Properties:
  225. - reg: Index of the pool (0 = lowest pool order).
  226. - qcom,mempool-page-size: Size of page.
  227. - qcom,mempool-reserved: Number of pages reserved at init time for a pool.
  228. - qcom,mempool-allocate: Allocate memory from the system memory when the
  229. reserved pool exhausted.
  230. SOC Hardware revisions:
  231. - qcom,soc-hw-revisions:
  232. Container of sets of SOC hardware revisions specified by
  233. qcom,soc-hw-revision.
  234. Properties:
  235. - compatible:
  236. Must be qcom,soc-hw-revisions.
  237. - qcom,soc-hw-revision:
  238. Defines a SOC hardware revision.
  239. Properties:
  240. - qcom,soc-hw-revision:
  241. Identifier for the hardware revision - must match the value read
  242. from the hardware.
  243. - qcom,chipid:
  244. GPU Chip ID to be used for this hardware revision.
  245. - qcom,gpu-quirk-*:
  246. GPU quirks applicable for this hardware revision.
  247. GPU LLC slice info:
  248. - cache-slice-names: List of LLC cache slices for GPU transactions
  249. and pagetable walk.
  250. - cache-slices: phandle to the system LLC driver, cache slice index.
  251. GPU coresight info:
  252. The following properties are optional as collecting data via coresight might
  253. not be supported for every chipset. The documentation for coresight
  254. properties can be found in:
  255. Documentation/devicetree/bindings/coresight/coresight.txt
  256. - qcom,gpu-coresights: Container for sets of GPU coresight sources.
  257. - coresight-id: Unique integer identifier for the bus.
  258. - coresight-name: Unique descriptive name of the bus.
  259. - coresight-nr-inports: Number of input ports on the bus.
  260. - coresight-outports: List of output port numbers on the bus.
  261. - coresight-child-list: List of phandles pointing to the children of this
  262. component.
  263. - coresight-child-ports: List of input port numbers of the children.
  264. - coresight-atid: The unique ATID value of the coresight device
  265. Example of A330 GPU in MSM8916:
  266. &soc {
  267. msm_gpu: qcom,kgsl-3d0@01c00000 {
  268. label = "kgsl-3d0";
  269. compatible = "qcom,kgsl-3d0", "qcom,kgsl-3d";
  270. reg = <0x01c00000 0x10000
  271. 0x01c20000 0x20000>;
  272. reg-names = "kgsl_3d0_reg_memory" , "kgsl_3d0_shader_memory";
  273. interrupts = <0 33 0>;
  274. interrupt-names = "kgsl_3d0_irq";
  275. qcom,id = <0>;
  276. qcom,chipid = <0x03000600>;
  277. qcom,initial-pwrlevel = <1>;
  278. /* Idle Timeout = HZ/12 */
  279. qcom,idle-timeout = <8>;
  280. qcom,strtstp-sleepwake;
  281. clocks = <&clock_gcc clk_gcc_oxili_gfx3d_clk>,
  282. <&clock_gcc clk_gcc_oxili_ahb_clk>,
  283. <&clock_gcc clk_gcc_oxili_gmem_clk>,
  284. <&clock_gcc clk_gcc_bimc_gfx_clk>,
  285. <&clock_gcc clk_gcc_bimc_gpu_clk>;
  286. clock-names = "core_clk", "iface_clk", "mem_clk",
  287. "mem_iface_clk", "alt_mem_iface_clk";
  288. /* Bus Scale Settings */
  289. qcom,msm-bus,name = "grp3d";
  290. qcom,msm-bus,num-cases = <4>;
  291. qcom,msm-bus,num-paths = <1>;
  292. qcom,msm-bus,vectors-KBps =
  293. <26 512 0 0>,
  294. <26 512 0 1600000>,
  295. <26 512 0 3200000>,
  296. <26 512 0 4264000>;
  297. /* GDSC oxili regulators */
  298. vdd-supply = <&gdsc_oxili_gx>;
  299. /* IOMMU Data */
  300. iommu = <&gfx_iommu>;
  301. /* Trace bus */
  302. coresight-id = <67>;
  303. coresight-name = "coresight-gfx";
  304. coresight-nr-inports = <0>;
  305. coresight-outports = <0>;
  306. coresight-child-list = <&funnel_in0>;
  307. coresight-child-ports = <5>;
  308. /* Enable context aware freq. scaling */
  309. qcom,enable-ca-jump;
  310. /* Context aware jump busy penalty in us */
  311. qcom,ca-busy-penalty = <12000>;
  312. /* Context aware jump target power level */
  313. qcom,ca-target-pwrlevel = <1>;
  314. qcom,soc-hw-revisions {
  315. #address-cells = <1>;
  316. #size-cells = <0>;
  317. compatible="qcom,soc-hw-revisions";
  318. qcom,soc-hw-revision@0 {
  319. reg = <0>;
  320. qcom,chipid = <0x06010500>;
  321. qcom,gpu-quirk-hfi-use-reg;
  322. qcom,gpu-quirk-limit-uche-gbif-rw;
  323. };
  324. qcom,soc-hw-revision@1 {
  325. reg = <1>;
  326. qcom,chipid = <0x06010501>;
  327. qcom,gpu-quirk-hfi-use-reg;
  328. };
  329. };
  330. /* GPU Mempools */
  331. qcom,gpu-mempools {
  332. #address-cells= <1>;
  333. #size-cells = <0>;
  334. compatible = "qcom,gpu-mempools";
  335. /* 4K Page Pool configuration */
  336. qcom,gpu-mempool@0 {
  337. reg = <0>;
  338. qcom,mempool-page-size = <4096>;
  339. qcom,mempool-reserved = <2048>;
  340. qcom,mempool-allocate;
  341. };
  342. /* 8K Page Pool configuration */
  343. qcom,gpu-mempool@1 {
  344. reg = <1>;
  345. qcom,mempool-page-size = <8192>;
  346. qcom,mempool-reserved = <1024>;
  347. qcom,mempool-allocate;
  348. };
  349. /* 64K Page Pool configuration */
  350. qcom,gpu-mempool@2 {
  351. reg = <2>;
  352. qcom,mempool-page-size = <65536>;
  353. qcom,mempool-reserved = <256>;
  354. };
  355. /* 1M Page Pool configuration */
  356. qcom,gpu-mempool@3 {
  357. reg = <3>;
  358. qcom,mempool-page-size = <1048576>;
  359. qcom,mempool-reserved = <32>;
  360. };
  361. };
  362. /* Power levels */
  363. qcom,gpu-pwrlevels-bins {
  364. #address-cells = <1>;
  365. #size-cells = <0>;
  366. qcom,gpu-pwrlevels-0 {
  367. #address-cells = <1>;
  368. #size-cells = <0>;
  369. qcom,speed-bin = <0>;
  370. qcom,ca-target-pwrlevel = <1>;
  371. qcom,gpu-pwrlevel@0 {
  372. reg = <0>;
  373. qcom,gpu-freq = <400000000>;
  374. qcom,bus-freq = <3>;
  375. qcom,io-fraction = <33>;
  376. };
  377. qcom,gpu-pwrlevel@1 {
  378. reg = <1>;
  379. qcom,gpu-freq = <310000000>;
  380. qcom,bus-freq = <2>;
  381. qcom,io-fraction = <66>;
  382. };
  383. qcom,gpu-pwrlevel@2 {
  384. reg = <2>;
  385. qcom,gpu-freq = <200000000>;
  386. qcom,bus-freq = <1>;
  387. qcom,io-fraction = <100>;
  388. };
  389. qcom,gpu-pwrlevel@3 {
  390. reg = <3>;
  391. qcom,gpu-freq = <27000000>;
  392. qcom,bus-freq = <0>;
  393. qcom,io-fraction = <0>;
  394. };
  395. };
  396. };
  397. };
  398. };