Documentation / devicetree / bindings / sram / qcom,ocmem.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sram/qcom,ocmem.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs.

maintainers:
  - Brian Masney <masneyb@onstation.org>

description: |
  The On Chip Memory (OCMEM) is typically used by the GPU, camera/video, and
  audio components on some Snapdragon SoCs.

properties:
  compatible:
    enum:
      - qcom,msm8226-ocmem  # v1.1.0
      - qcom,msm8974-ocmem  # v1.4.0

  reg:
    items:
      - description: Control registers
      - description: OCMEM address range

  reg-names:
    items:
      - const: ctrl
      - const: mem

  clocks:
    minItems: 1
    items:
      - description: Core clock
      - description: Interface clock

  clock-names:
    minItems: 1
    items:
      - const: core
      - const: iface
 
  '#address-cells':
    const: 1
 
  '#size-cells':
    const: 1

  ranges:
    maxItems: 1

required:
  - compatible
  - reg
  - reg-names
  - clocks
  - clock-names
  - '#address-cells'
  - '#size-cells'
  - ranges

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,msm8974-ocmem
    then:
      properties:
        clocks:
          minItems: 2
        clock-names:
          minItems: 2
    else:
      properties:
        clocks:
          minItems: 1
        clock-names:
          minItems: 1

patternProperties:
  "-sram@[0-9a-f]+$":
    type: object
    additionalProperties: false
    description: A region of reserved memory.

    properties:
      reg:
        maxItems: 1

    required:
      - reg

examples:
  - |
    #include <dt-bindings/clock/qcom,rpmcc.h>
    #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
 
    sram@fdd00000 {
        compatible = "qcom,msm8974-ocmem";
 
        reg = <0xfdd00000 0x2000>,
              <0xfec00000 0x180000>;
        reg-names = "ctrl",
                    "mem";
 
        clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
                 <&mmcc OCMEMCX_OCMEMNOC_CLK>;
        clock-names = "core",
                      "iface";
 
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0 0xfec00000 0x100000>;
 
        gmu-sram@0 {
            reg = <0x0 0x100000>;
        };
    };