← Documents Documentation/devicetree/bindings/powerpc/fsl/pamu.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Freescale PAMU

Freescale I/O MMU의 controller topology, cache geometry와 LIODN register binding입니다.

Source pathDocumentation/devicetree/bindings/powerpc/fsl/pamu.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

pamu.txt:1-148

여러 PAMU의 register·interrupt 영역과 child cache 구조를 device의 IOMMU parent 및 LIODN 위치에 연결합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Freescale Peripheral Management Access Unit (PAMU) Device Tree Binding
2
3 DESCRIPTION
4
5 The PAMU is an I/O MMU that provides device-to-memory access control and
6 address translation capabilities.
7
8 Required properties:
9
10 - compatible : <string>
11 First entry is a version-specific string, such as
12 "fsl,pamu-v1.0". The second is "fsl,pamu".
13 - ranges : <prop-encoded-array>
14 A standard property. Utilized to describe the memory mapped
15 I/O space utilized by the controller. The size should
16 be set to the total size of the register space of all
17 physically present PAMU controllers. For example, for
18 PAMU v1.0, on an SOC that has five PAMU devices, the size
19 is 0x5000.
20 - interrupts : <prop-encoded-array>
21 Interrupt mappings. The first tuple is the normal PAMU
22 interrupt, used for reporting access violations. The second
23 is for PAMU hardware errors, such as PAMU operation errors
24 and ECC errors.
25 - #address-cells: <u32>
26 A standard property.
27 - #size-cells : <u32>
28 A standard property.
29
30 Optional properties:
31 - reg : <prop-encoded-array>
32 A standard property. It represents the CCSR registers of
33 all child PAMUs combined. Include it to provide support
34 for legacy drivers.
35 - fsl,portid-mapping : <u32>
36 The Coherency Subdomain ID Port Mapping Registers and
37 Snoop ID Port Mapping registers, which are part of the
38 CoreNet Coherency fabric (CCF), provide a CoreNet
39 Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping
40 functions. Certain bits from these registers should be
41 set if PAMUs should be snooped. This property defines
42 a bitmask which selects the bits that should be set if
43 PAMUs should be snooped.
44
45 Child nodes:
46
47 Each child node represents one PAMU controller. Each SOC device that is
48 connected to a specific PAMU device should have a "fsl,pamu-phandle" property
49 that links to the corresponding specific child PAMU controller.
50
51 - reg : <prop-encoded-array>
52 A standard property. Specifies the physical address and
53 length (relative to the parent 'ranges' property) of this
54 PAMU controller's configuration registers. The size should
55 be set to the size of this PAMU controllers's register space.
56 For PAMU v1.0, this size is 0x1000.
57 - fsl,primary-cache-geometry
58 : <prop-encoded-array>
59 Two cells that specify the geometry of the primary PAMU
60 cache. The first is the number of cache lines, and the
61 second is the number of "ways". For direct-mapped caches,
62 specify a value of 1.
63 - fsl,secondary-cache-geometry
64 : <prop-encoded-array>
65 Two cells that specify the geometry of the secondary PAMU
66 cache. The first is the number of cache lines, and the
67 second is the number of "ways". For direct-mapped caches,
68 specify a value of 1.
69
70 Device nodes:
71
72 Devices that have LIODNs need to specify links to the parent PAMU controller
73 (the actual PAMU controller that this device is connected to) and a pointer to
74 the LIODN register, if applicable.
75
76 - fsl,iommu-parent
77 : <phandle>
78 Phandle to the single, specific PAMU controller node to which
79 this device is connect. The PAMU topology is represented in
80 the device tree to assist code that dynamically determines the
81 best LIODN values to minimize PAMU cache thrashing.
82
83 - fsl,liodn-reg : <prop-encoded-array>
84 Two cells that specify the location of the LIODN register
85 for this device. Required for devices that have a single
86 LIODN. The first cell is a phandle to a node that contains
87 the registers where the LIODN is to be set. The second is
88 the offset from the first "reg" resource of the node where
89 the specific LIODN register is located.
90
91
92 Example:
93
94 iommu@20000 {
95 compatible = "fsl,pamu-v1.0", "fsl,pamu";
96 reg = <0x20000 0x5000>;
97 ranges = <0 0x20000 0x5000>;
98 fsl,portid-mapping = <0xf80000>;
99 #address-cells = <1>;
100 #size-cells = <1>;
101 interrupts = <
102 24 2 0 0
103 16 2 1 30>;
104
105 pamu0: pamu@0 {
106 reg = <0 0x1000>;
107 fsl,primary-cache-geometry = <32 1>;
108 fsl,secondary-cache-geometry = <128 2>;
109 };
110
111 pamu1: pamu@1000 {
112 reg = <0x1000 0x1000>;
113 fsl,primary-cache-geometry = <32 1>;
114 fsl,secondary-cache-geometry = <128 2>;
115 };
116
117 pamu2: pamu@2000 {
118 reg = <0x2000 0x1000>;
119 fsl,primary-cache-geometry = <32 1>;
120 fsl,secondary-cache-geometry = <128 2>;
121 };
122
123 pamu3: pamu@3000 {
124 reg = <0x3000 0x1000>;
125 fsl,primary-cache-geometry = <32 1>;
126 fsl,secondary-cache-geometry = <128 2>;
127 };
128
129 pamu4: pamu@4000 {
130 reg = <0x4000 0x1000>;
131 fsl,primary-cache-geometry = <32 1>;
132 fsl,secondary-cache-geometry = <128 2>;
133 };
134 };
135
136 guts: global-utilities@e0000 {
137 compatible = "fsl,qoriq-device-config-1.0";
138 reg = <0xe0000 0xe00>;
139 fsl,has-rstcr;
140 #sleep-cells = <1>;
141 fsl,liodn-bits = <12>;
142 };
143
144 /include/ "qoriq-dma-0.dtsi"
145 dma@100300 {
146 fsl,iommu-parent = <&pamu0>;
147 fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
148 };
149

3. 한국어 전문 번역

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

PAMU 개요

1-7

Freescale Peripheral Management Access Unit(PAMU)은 device-to-memory 접근 제어와 address translation 기능을 제공하는 I/O MMU입니다.

PAMU 필수 property

8-29

필수 string `compatible`의 첫 항목은 `fsl,pamu-v1.0` 같은 version-specific string이고 두 번째 항목은 `fsl,pamu`입니다.

필수 encoded array `ranges`는 controller가 사용하는 memory-mapped I/O 공간을 기술합니다. Size는 물리적으로 존재하는 모든 PAMU controller의 전체 register 공간 크기로 설정합니다. PAMU v1.0 device가 다섯 개인 SoC에서는 0x5000입니다.

필수 encoded array `interrupts`의 첫 tuple은 access violation 보고에 사용하는 일반 PAMU interrupt이고, 두 번째 tuple은 PAMU operation error와 ECC error 같은 hardware error용입니다.

필수 u32 `#address-cells`와 `#size-cells`는 표준 property입니다.

PAMU 선택 property

30-44

선택 encoded array `reg`는 모든 child PAMU의 CCSR register를 합친 영역을 나타냅니다. Legacy driver 지원이 필요하면 포함합니다.

선택 u32 `fsl,portid-mapping`은 PAMU를 snoop해야 할 때 설정할 CoreNet Coherency fabric(CCF) mapping-register bit를 고르는 bitmask입니다. Coherency Subdomain ID Port Mapping Register와 Snoop ID Port Mapping Register는 CoreNet Coherency Subdomain ID 또는 CoreNet Snoop ID를 PAMU에 mapping합니다.

PAMU controller child node

45-69

각 child node는 PAMU controller 하나를 나타냅니다. 특정 PAMU에 연결된 각 SoC device에는 해당 child controller로 연결하는 `fsl,pamu-phandle` property가 있어야 합니다.

Child의 표준 encoded array `reg`는 parent `ranges`에 상대적인 PAMU configuration register의 physical address와 length를 지정합니다. Size는 해당 PAMU controller register 공간 크기이며 PAMU v1.0에서는 0x1000입니다.

`fsl,primary-cache-geometry`는 primary PAMU cache geometry를 두 cell로 지정합니다. 첫 cell은 cache line 수, 두 번째 cell은 way 수입니다. Direct-mapped cache는 way를 1로 지정합니다.

`fsl,secondary-cache-geometry`도 같은 두-cell 형식으로 secondary PAMU cache의 line 수와 way 수를 지정하며 direct-mapped cache는 way 1을 사용합니다.

LIODN device node

70-91

LIODN을 가진 device는 연결된 실제 parent PAMU controller의 link와, 해당하는 경우 LIODN register pointer를 지정해야 합니다.

`fsl,iommu-parent`는 device가 연결된 단일 PAMU controller node를 가리키는 phandle입니다. Device tree의 PAMU topology는 PAMU cache thrashing을 최소화할 최적 LIODN 값을 code가 동적으로 결정하는 데 도움을 줍니다.

`fsl,liodn-reg`는 이 device의 LIODN register 위치를 두 cell로 지정하며 LIODN이 하나인 device에 필요합니다. 첫 cell은 LIODN을 설정할 register가 있는 node의 phandle이고, 두 번째 cell은 그 node의 첫 `reg` resource에서 특정 LIODN register까지의 offset입니다.

다섯 PAMU controller 예제

92-134

예제의 PAMU v1.0 container는 0x5000 register 공간과 normal·hardware-error interrupt 두 개를 선언합니다. 다섯 child PAMU는 각각 0x1000 register window, 32-line direct-mapped primary cache와 128-line 2-way secondary cache를 가집니다.

iommu@20000 {
        compatible = "fsl,pamu-v1.0", "fsl,pamu";
        reg = <0x20000 0x5000>;
        ranges = <0 0x20000 0x5000>;
        fsl,portid-mapping = <0xf80000>;
        #address-cells = <1>;
        #size-cells = <1>;
        interrupts = <
                24 2 0 0
                16 2 1 30>;

        pamu0: pamu@0 {
                reg = <0 0x1000>;
                fsl,primary-cache-geometry = <32 1>;
                fsl,secondary-cache-geometry = <128 2>;
        };

        pamu1: pamu@1000 {
                reg = <0x1000 0x1000>;
                fsl,primary-cache-geometry = <32 1>;
                fsl,secondary-cache-geometry = <128 2>;
        };

        pamu2: pamu@2000 {
                reg = <0x2000 0x1000>;
                fsl,primary-cache-geometry = <32 1>;
                fsl,secondary-cache-geometry = <128 2>;
        };

        pamu3: pamu@3000 {
                reg = <0x3000 0x1000>;
                fsl,primary-cache-geometry = <32 1>;
                fsl,secondary-cache-geometry = <128 2>;
        };

        pamu4: pamu@4000 {
                reg = <0x4000 0x1000>;
                fsl,primary-cache-geometry = <32 1>;
                fsl,secondary-cache-geometry = <128 2>;
        };
};

DMA device LIODN 예제

135-148

`global-utilities` node는 LIODN register를 포함합니다. DMA device는 `pamu0`을 IOMMU parent로 선택하고 `guts`의 첫 register resource에서 offset 0x584에 있는 `DMA2LIODNR`를 `fsl,liodn-reg`로 가리킵니다.

        guts: global-utilities@e0000 {
                compatible = "fsl,qoriq-device-config-1.0";
                reg = <0xe0000 0xe00>;
                fsl,has-rstcr;
                #sleep-cells = <1>;
                fsl,liodn-bits = <12>;
        };

/include/ "qoriq-dma-0.dtsi"
        dma@100300 {
                fsl,iommu-parent = <&pamu0>;
                fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
        };