← Documents Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Remoteproc

TI Keystone DSP remoteproc

Keystone 2 DSP의 alias, reset, IPC, SoC별 clock·power domain과 두 예제를 설명합니다.

Source pathDocumentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

ti,keystone-rproc.txt:1-182

Remote processor의 memory, reset, interrupt와 IPC 요구사항을 요약하고 영어 원문 전체 및 줄 좌표별 한국어 전문을 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 TI Keystone DSP devices
2 =======================
3
4 The TI Keystone 2 family of SoCs usually have one or more (upto 8) TI DSP Core
5 sub-systems that are used to offload some of the processor-intensive tasks or
6 algorithms, for achieving various system level goals.
7
8 These processor sub-systems usually contain additional sub-modules like L1
9 and/or L2 caches/SRAMs, an Interrupt Controller, an external memory controller,
10 a dedicated local power/sleep controller etc. The DSP processor core in
11 Keystone 2 SoCs is usually a TMS320C66x CorePac processor.
12
13 DSP Device Node:
14 ================
15 Each DSP Core sub-system is represented as a single DT node, and should also
16 have an alias with the stem 'rproc' defined. Each node has a number of required
17 or optional properties that enable the OS running on the host processor (ARM
18 CorePac) to perform the device management of the remote processor and to
19 communicate with the remote processor.
20
21 Required properties:
22 --------------------
23 The following are the mandatory properties:
24
25 - compatible: Should be one of the following,
26 "ti,k2hk-dsp" for DSPs on Keystone 2 66AK2H/K SoCs
27 "ti,k2l-dsp" for DSPs on Keystone 2 66AK2L SoCs
28 "ti,k2e-dsp" for DSPs on Keystone 2 66AK2E SoCs
29 "ti,k2g-dsp" for DSPs on Keystone 2 66AK2G SoCs
30
31 - reg: Should contain an entry for each value in 'reg-names'.
32 Each entry should have the memory region's start address
33 and the size of the region, the representation matching
34 the parent node's '#address-cells' and '#size-cells' values.
35
36 - reg-names: Should contain strings with the following names, each
37 representing a specific internal memory region, and
38 should be defined in this order,
39 "l2sram", "l1pram", "l1dram"
40
41 - ti,syscon-dev: Should be a pair of the phandle to the Keystone Device
42 State Control node, and the register offset of the DSP
43 boot address register within that node's address space.
44
45 - resets: Should contain the phandle to the reset controller node
46 managing the resets for this device, and a reset
47 specifier. Please refer to either of the following reset
48 bindings for the reset argument specifier as per SoC,
49 Documentation/devicetree/bindings/reset/ti-syscon-reset.txt
50 for 66AK2HK/66AK2L/66AK2E SoCs or,
51 Documentation/devicetree/bindings/reset/ti,sci-reset.yaml
52 for 66AK2G SoCs
53
54 - interrupts: Should contain an entry for each value in 'interrupt-names'.
55 Each entry should have the interrupt source number used by
56 the remote processor to the host processor. The values should
57 follow the interrupt-specifier format as dictated by the
58 'interrupt-parent' node. The purpose of each is as per the
59 description in the 'interrupt-names' property.
60
61 - interrupt-names: Should contain strings with the following names, each
62 representing a specific interrupt,
63 "vring" - interrupt for virtio based IPC
64 "exception" - interrupt for exception notification
65
66 - kick-gpios: Should specify the gpio device needed for the virtio IPC
67 stack. This will be used to interrupt the remote processor.
68 The gpio device to be used is as per the bindings in,
69 Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt
70
71 SoC-specific Required properties:
72 ---------------------------------
73 The following are mandatory properties for Keystone 2 66AK2HK, 66AK2L and 66AK2E
74 SoCs only:
75
76 - clocks: Should contain the device's input clock, and should be
77 defined as per the bindings in,
78 Documentation/devicetree/bindings/clock/keystone-gate.txt
79
80 The following are mandatory properties for Keystone 2 66AK2G SoCs only:
81
82 - power-domains: Should contain a phandle to a PM domain provider node
83 and an args specifier containing the DSP device id
84 value. This property is as per the binding,
85 Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
86
87 Optional properties:
88 --------------------
89
90 - memory-region: phandle to the reserved memory node to be associated
91 with the remoteproc device. The reserved memory node
92 can be a CMA memory node, and should be defined as
93 per the bindings in
94 Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
95
96
97 Examples:
98 ---------
99
100 1.
101 /* 66AK2H/K DSP aliases */
102 aliases {
103 rproc0 = &dsp0;
104 rproc1 = &dsp1;
105 rproc2 = &dsp2;
106 rproc3 = &dsp3;
107 rproc4 = &dsp4;
108 rproc5 = &dsp5;
109 rproc6 = &dsp6;
110 rproc7 = &dsp7;
111 };
112
113 /* 66AK2H/K DSP memory node */
114 reserved-memory {
115 #address-cells = <2>;
116 #size-cells = <2>;
117 ranges;
118
119 dsp_common_memory: dsp-common-memory@81f800000 {
120 compatible = "shared-dma-pool";
121 reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
122 reusable;
123 };
124 };
125
126 /* 66AK2H/K DSP node */
127 soc {
128 dsp0: dsp@10800000 {
129 compatible = "ti,k2hk-dsp";
130 reg = <0x10800000 0x00100000>,
131 <0x10e00000 0x00008000>,
132 <0x10f00000 0x00008000>;
133 reg-names = "l2sram", "l1pram", "l1dram";
134 clocks = <&clkgem0>;
135 ti,syscon-dev = <&devctrl 0x40>;
136 resets = <&pscrst 0>;
137 interrupt-parent = <&kirq0>;
138 interrupts = <0 8>;
139 interrupt-names = "vring", "exception";
140 kick-gpios = <&dspgpio0 27 0>;
141 memory-region = <&dsp_common_memory>;
142 };
143
144 };
145
146 2.
147 /* 66AK2G DSP alias */
148 aliases {
149 rproc0 = &dsp0;
150 };
151
152 /* 66AK2G DSP memory node */
153 reserved-memory {
154 #address-cells = <2>;
155 #size-cells = <2>;
156 ranges;
157
158 dsp_common_memory: dsp-common-memory@81f800000 {
159 compatible = "shared-dma-pool";
160 reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
161 reusable;
162 };
163 };
164
165 /* 66AK2G DSP node */
166 soc {
167 dsp0: dsp@10800000 {
168 compatible = "ti,k2g-dsp";
169 reg = <0x10800000 0x00100000>,
170 <0x10e00000 0x00008000>,
171 <0x10f00000 0x00008000>;
172 reg-names = "l2sram", "l1pram", "l1dram";
173 power-domains = <&k2g_pds 0x0046>;
174 ti,syscon-dev = <&devctrl 0x40>;
175 resets = <&k2g_reset 0x0046 0x1>;
176 interrupt-parent = <&kirq0>;
177 interrupts = <0 8>;
178 interrupt-names = "vring", "exception";
179 kick-gpios = <&dspgpio0 27 0>;
180 memory-region = <&dsp_common_memory>;
181 };
182 };
183

3. 한국어 전문 번역

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

Keystone 2 DSP subsystem

1-12

TI Keystone 2 SoC 계열에는 보통 최대 8개의 TI DSP Core subsystem이 있으며 processor 집약적인 task나 algorithm을 offload합니다.

Subsystem에는 L1/L2 cache 또는 SRAM, interrupt controller, external memory controller, 전용 local power/sleep controller 등이 포함됩니다. Keystone 2 SoC의 DSP processor core는 보통 TMS320C66x CorePac processor입니다.

DSP node와 rproc alias

13-20

각 DSP Core subsystem은 하나의 DT node로 표현하고 stem이 `rproc`인 alias도 정의해야 합니다. Required·optional property를 통해 ARM CorePac에서 실행하는 host OS가 remote processor를 관리하고 통신할 수 있습니다.

공통 필수 property

21-70

`compatible`은 66AK2H/K에서 `ti,k2hk-dsp`, 66AK2L에서 `ti,k2l-dsp`, 66AK2E에서 `ti,k2e-dsp`, 66AK2G에서 `ti,k2g-dsp`를 사용합니다.

`reg`에는 `reg-names`마다 start address와 size를 parent의 address·size cell 형식으로 넣습니다. `reg-names`는 `l2sram`, `l1pram`, `l1dram`을 이 순서로 포함해야 합니다.

`ti,syscon-dev`는 Keystone Device State Control node phandle과 그 address space 안의 DSP boot address register offset 쌍입니다.

`resets`는 device reset을 관리하는 controller phandle과 reset specifier를 담습니다. 66AK2HK·66AK2L·66AK2E는 `Documentation/devicetree/bindings/reset/ti-syscon-reset.txt`, 66AK2G는 `Documentation/devicetree/bindings/reset/ti,sci-reset.yaml`을 따릅니다.

`interrupts`에는 `interrupt-names`마다 remote processor가 host processor에 보내는 interrupt source 번호를 넣고 `interrupt-parent` 형식을 따릅니다. `interrupt-names`는 virtio IPC의 `vring`과 exception notification의 `exception`입니다.

`kick-gpios`는 virtio IPC stack이 remote processor에 interrupt를 보내는 GPIO device를 지정하며 `Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt` binding을 따릅니다.

SoC별 필수 clock 또는 power domain

71-86

66AK2HK·66AK2L·66AK2E에서는 `clocks`에 device input clock을 넣고 `Documentation/devicetree/bindings/clock/keystone-gate.txt`를 따릅니다.

66AK2G에서는 `power-domains`에 PM domain provider phandle과 DSP device ID를 담은 args specifier를 넣고 `Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml`을 따릅니다.

선택 reserved memory

87-96

선택 `memory-region`은 remoteproc device와 연결할 reserved memory node phandle입니다. CMA memory node일 수 있으며 `Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt` binding에 따라 정의합니다.

예제 1: 66AK2H/K DSP

97-145

첫 예제는 `rproc0`부터 `rproc7`까지 8개 DSP alias를 만들고 공용 8MiB reusable DMA pool을 정의합니다. `dsp0`은 `ti,k2hk-dsp`, `clkgem0`, `devctrl`, `pscrst`, `vring`·`exception` interrupt, kick GPIO와 공용 memory를 사용합니다.

1.
        /* 66AK2H/K DSP aliases */
        aliases {
                rproc0 = &dsp0;
                rproc1 = &dsp1;
                rproc2 = &dsp2;
                rproc3 = &dsp3;
                rproc4 = &dsp4;
                rproc5 = &dsp5;
                rproc6 = &dsp6;
                rproc7 = &dsp7;
        };

        /* 66AK2H/K DSP memory node */
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                dsp_common_memory: dsp-common-memory@81f800000 {
                        compatible = "shared-dma-pool";
                        reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
                        reusable;
                };
        };

        /* 66AK2H/K DSP node */
        soc {
                dsp0: dsp@10800000 {
                        compatible = "ti,k2hk-dsp";
                        reg = <0x10800000 0x00100000>,
                              <0x10e00000 0x00008000>,
                              <0x10f00000 0x00008000>;
                        reg-names = "l2sram", "l1pram", "l1dram";
                        clocks = <&clkgem0>;
                        ti,syscon-dev = <&devctrl 0x40>;
                        resets = <&pscrst 0>;
                        interrupt-parent = <&kirq0>;
                        interrupts = <0 8>;
                        interrupt-names = "vring", "exception";
                        kick-gpios = <&dspgpio0 27 0>;
                        memory-region = <&dsp_common_memory>;
                };

        };

예제 2: 66AK2G DSP

146-182

두 번째 예제는 `rproc0` 하나와 같은 크기의 공용 memory를 정의합니다. `dsp0`은 `ti,k2g-dsp`, `k2g_pds` power domain과 `k2g_reset`을 사용하며 나머지 interrupt·kick GPIO·memory 연결은 첫 예제와 같은 구조입니다.

2.
        /* 66AK2G DSP alias */
        aliases {
                rproc0 = &dsp0;
        };

        /* 66AK2G DSP memory node */
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                dsp_common_memory: dsp-common-memory@81f800000 {
                        compatible = "shared-dma-pool";
                        reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
                        reusable;
                };
        };

        /* 66AK2G DSP node */
        soc {
                dsp0: dsp@10800000 {
                        compatible = "ti,k2g-dsp";
                        reg = <0x10800000 0x00100000>,
                              <0x10e00000 0x00008000>,
                              <0x10f00000 0x00008000>;
                        reg-names = "l2sram", "l1pram", "l1dram";
                        power-domains = <&k2g_pds 0x0046>;
                        ti,syscon-dev = <&devctrl 0x40>;
                        resets = <&k2g_reset 0x0046 0x1>;
                        interrupt-parent = <&kirq0>;
                        interrupts = <0 8>;
                        interrupt-names = "vring", "exception";
                        kick-gpios = <&dspgpio0 27 0>;
                        memory-region = <&dsp_common_memory>;
                };
        };