msm-ocmem.txt 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Qualcomm MSM On-Chip Memory Driver
  2. msm-ocmem is a driver for managing On-Chip Memory (OCMEM) in MSM SoCs.
  3. It is responsible for allowing various clients to allocate memory from
  4. OCMEM based on performance, latency and power requirements.
  5. Required Properties:
  6. - compatible: Must be "qcom,msm-ocmem"
  7. - reg: Four pairs of physical base addresses and region sizes
  8. of memory mapped registers.
  9. - reg-names : Register region name(s) referenced in reg above
  10. "ocmem_ctrl_physical" corresponds to OCMEM control registers.
  11. "dm_ctrl_physical" corresponds to DM control registers.
  12. "br_ctrl_physical" corresponds to BR control registers.
  13. "ocmem_physical" corresponds to address range of OCMEM memory.
  14. - interrupts: OCMEM core interrupt(s).
  15. - interrupt-names: OCMEM core interrupt name(s) reference in interrupts above
  16. "ocmem_irq" corresponds to OCMEM Error Interrupt.
  17. "dm_irq" corresponds to DM Interrupt.
  18. - qcom,ocmem-num-regions: The number of OCMEM hardware memory regions.
  19. - qcom,ocmem-num-macros: The number of OCMEM hardware memory macros.
  20. - qcom,resource-type: The hardware resource type of the OCMEM core.
  21. In addition to the information on the OCMEM core, the
  22. device tree contains additional information describing partitions
  23. of the OCMEM address space. This is used to establish regions
  24. of OCMEM that are used for each potential client. The partitions
  25. can overlap and the OCMEM driver ensures that there is no possibility
  26. of concurrent access from more than one client to the same address range.
  27. This allows the OCMEM driver to maximize the usage of OCMEM at all times.
  28. Each partition is represented as a sub-node of the OCMEM device.
  29. OCMEM partitions
  30. Required Properties:
  31. - reg : The partition's offset and size within OCMEM.
  32. - qcom,ocmem-part-name : The name for this partition.
  33. - qcom,ocmem-part-min: The minimum amount of memory reserved exclusively for
  34. this client.
  35. Optional Properties:
  36. - qcom,ocmem-part-tail : This parameter, if present, indicates that successive
  37. allocations from this partition must be allocated at
  38. lower offsetis.
  39. Example:
  40. qcom,ocmem@fdd00000 {
  41. reg = <0xfdd00000 0x2000>,
  42. <0xfdd02000 0x2000>,
  43. <0xfe039000 0x400>,
  44. <0xfec00000 0x180000>;
  45. reg-names = "ocmem_ctrl_physical", "dm_ctrl_physical", "br_ctrl_physical", "ocmem_physical";
  46. interrupts = <0 76 0 0 77 0>;
  47. interrupt-names = "ocmem_irq", "dm_irq";
  48. qcom,ocmem-num-regions = <0x3>;
  49. qcom,resource-type = <0x706d636f>
  50. #address-cells = <1>;
  51. #size-cells = <1>;
  52. ranges = <0x0 0xfec00000 0x180000>;
  53. partition@0 {
  54. reg = <0x0 0x100000>;
  55. qcom,ocmem-part-name = "graphics";
  56. qcom,ocmem-part-min = <0x80000>;
  57. };
  58. partition@100000 {
  59. reg = <0x100000 0x80000>;
  60. qcom,ocmem-part-name = "video";
  61. qcom,ocmem-part-min = <0x55000>;
  62. };
  63. };