← Documents Documentation/devicetree/bindings/sram/qcom,ocmem.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SRAM

Qualcomm On Chip Memory

Qualcomm OCMEM의 register·clock 조건과 reserved SRAM child를 설명합니다.

Source pathDocumentation/devicetree/bindings/sram/qcom,ocmem.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

qcom,ocmem.yaml:1-123

Qualcomm OCMEM의 register·clock 조건과 reserved SRAM child를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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
7 title: On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs.
8
9 maintainers:
10 - Brian Masney <masneyb@onstation.org>
11
12 description: |
13 The On Chip Memory (OCMEM) is typically used by the GPU, camera/video, and
14 audio components on some Snapdragon SoCs.
15
16 properties:
17 compatible:
18 enum:
19 - qcom,msm8226-ocmem # v1.1.0
20 - qcom,msm8974-ocmem # v1.4.0
21
22 reg:
23 items:
24 - description: Control registers
25 - description: OCMEM address range
26
27 reg-names:
28 items:
29 - const: ctrl
30 - const: mem
31
32 clocks:
33 minItems: 1
34 items:
35 - description: Core clock
36 - description: Interface clock
37
38 clock-names:
39 minItems: 1
40 items:
41 - const: core
42 - const: iface
43
44 '#address-cells':
45 const: 1
46
47 '#size-cells':
48 const: 1
49
50 ranges:
51 maxItems: 1
52
53 required:
54 - compatible
55 - reg
56 - reg-names
57 - clocks
58 - clock-names
59 - '#address-cells'
60 - '#size-cells'
61 - ranges
62
63 additionalProperties: false
64
65 allOf:
66 - if:
67 properties:
68 compatible:
69 contains:
70 enum:
71 - qcom,msm8974-ocmem
72 then:
73 properties:
74 clocks:
75 minItems: 2
76 clock-names:
77 minItems: 2
78 else:
79 properties:
80 clocks:
81 minItems: 1
82 clock-names:
83 minItems: 1
84
85 patternProperties:
86 "-sram@[0-9a-f]+$":
87 type: object
88 additionalProperties: false
89 description: A region of reserved memory.
90
91 properties:
92 reg:
93 maxItems: 1
94
95 required:
96 - reg
97
98 examples:
99 - |
100 #include <dt-bindings/clock/qcom,rpmcc.h>
101 #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
102
103 sram@fdd00000 {
104 compatible = "qcom,msm8974-ocmem";
105
106 reg = <0xfdd00000 0x2000>,
107 <0xfec00000 0x180000>;
108 reg-names = "ctrl",
109 "mem";
110
111 clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
112 <&mmcc OCMEMCX_OCMEMNOC_CLK>;
113 clock-names = "core",
114 "iface";
115
116 #address-cells = <1>;
117 #size-cells = <1>;
118 ranges = <0 0xfec00000 0x100000>;
119
120 gmu-sram@0 {
121 reg = <0x0 0x100000>;
122 };
123 };
124

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Qualcomm On Chip Memory

1-15

이 GPL-2.0 또는 BSD-2-Clause YAML schema는 일부 Qualcomm Snapdragon SoC의 On Chip Memory(OCMEM)를 정의합니다. Maintainer는 Brian Masney입니다. OCMEM은 보통 GPU, camera/video, audio component가 사용합니다.

Register, clock과 주소 공간

16-52

Compatible은 hardware v1.1.0의 `qcom,msm8226-ocmem` 또는 v1.4.0의 `qcom,msm8974-ocmem`입니다. `reg`는 control register와 OCMEM address range 두 항목이고 `reg-names`는 `ctrl`, `mem` 순서입니다.

`clocks`는 core clock과 interface clock을 최대 두 항목으로 제공하며 최소 한 항목입니다. `clock-names`는 `core`, `iface` 순서이고 역시 최소 한 항목입니다. `#address-cells`와 `#size-cells`는 모두 1이며 `ranges`는 최대 한 항목입니다.

필수 속성과 추가 속성 제한

53-64

필수 속성은 `compatible`, `reg`, `reg-names`, `clocks`, `clock-names`, `#address-cells`, `#size-cells`, `ranges`입니다. `additionalProperties: false`로 추가 속성을 금지합니다.

MSM8974의 두 clock 조건

65-84

`compatible`에 `qcom,msm8974-ocmem`이 포함되면 `clocks`와 `clock-names`가 각각 최소 두 항목이어야 합니다. 그 밖의 compatible에서는 각각 최소 한 항목이면 됩니다.

Reserved memory child region

85-97

이름이 `-sram@[0-9a-f]+$`로 끝나는 child object는 reserved memory region 하나를 나타냅니다. 추가 속성을 허용하지 않으며 최대 한 항목의 `reg`가 필수입니다.

MSM8974 OCMEM과 GMU SRAM 예제

98-123

예제는 MSM8974 OCMEM의 `ctrl`과 `mem` 두 register 영역, RPM core clock과 MMCC interface clock을 구성합니다. `ranges`로 0xfec00000의 1 MiB를 노출하고 그 전체를 `gmu-sram@0` child에 예약합니다.

#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>;
    };
};