xref: /freebsd/sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sram/qcom,ocmem.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs.
8
9maintainers:
10  - Brian Masney <masneyb@onstation.org>
11
12description: |
13  The On Chip Memory (OCMEM) is typically used by the GPU, camera/video, and
14  audio components on some Snapdragon SoCs.
15
16properties:
17  compatible:
18    const: qcom,msm8974-ocmem
19
20  reg:
21    items:
22      - description: Control registers
23      - description: OCMEM address range
24
25  reg-names:
26    items:
27      - const: ctrl
28      - const: mem
29
30  clocks:
31    items:
32      - description: Core clock
33      - description: Interface clock
34
35  clock-names:
36    items:
37      - const: core
38      - const: iface
39
40  '#address-cells':
41    const: 1
42
43  '#size-cells':
44    const: 1
45
46  ranges:
47    maxItems: 1
48
49required:
50  - compatible
51  - reg
52  - reg-names
53  - clocks
54  - clock-names
55  - '#address-cells'
56  - '#size-cells'
57  - ranges
58
59additionalProperties: false
60
61patternProperties:
62  "-sram@[0-9a-f]+$":
63    type: object
64    additionalProperties: false
65    description: A region of reserved memory.
66
67    properties:
68      reg:
69        maxItems: 1
70
71    required:
72      - reg
73
74examples:
75  - |
76    #include <dt-bindings/clock/qcom,rpmcc.h>
77    #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
78
79    sram@fdd00000 {
80        compatible = "qcom,msm8974-ocmem";
81
82        reg = <0xfdd00000 0x2000>,
83              <0xfec00000 0x180000>;
84        reg-names = "ctrl",
85                    "mem";
86
87        clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
88                 <&mmcc OCMEMCX_OCMEMNOC_CLK>;
89        clock-names = "core",
90                      "iface";
91
92        #address-cells = <1>;
93        #size-cells = <1>;
94        ranges = <0 0xfec00000 0x100000>;
95
96        gmu-sram@0 {
97            reg = <0x0 0x100000>;
98        };
99    };
100