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

Linux 6.18.37 · Devicetree Bindings

Freescale Serial RapidIO

Freescale SRIO controller와 port별 window·LIODN·RMU handle binding입니다.

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

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

1. 요약·해설

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

요약과 해설

srio.txt:1-104

SRIO revision compatible ordering과 port별 단일 또는 memory·maintenance LIODN 쌍을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Freescale Serial RapidIO (SRIO) Controller
2
3 RapidIO port node:
4 Properties:
5 - compatible
6 Usage: required
7 Value type: <string>
8 Definition: Must include "fsl,srio" for IP blocks with IP Block
9 Revision Register (SRIO IPBRR1) Major ID equal to 0x01c0.
10
11 Optionally, a compatible string of "fsl,srio-vX.Y" where X is Major
12 version in IP Block Revision Register and Y is Minor version. If this
13 compatible is provided it should be ordered before "fsl,srio".
14
15 - reg
16 Usage: required
17 Value type: <prop-encoded-array>
18 Definition: A standard property. Specifies the physical address and
19 length of the SRIO configuration registers. The size should
20 be set to 0x11000.
21
22 - interrupts
23 Usage: required
24 Value type: <prop_encoded-array>
25 Definition: Specifies the interrupts generated by this device. The
26 value of the interrupts property consists of one interrupt
27 specifier. The format of the specifier is defined by the
28 binding document describing the node's interrupt parent.
29
30 A single IRQ that handles error conditions is specified by this
31 property. (Typically shared with port-write).
32
33 - fsl,srio-rmu-handle:
34 Usage: required if rmu node is defined
35 Value type: <phandle>
36 Definition: A single <phandle> value that points to the RMU.
37 (See srio-rmu.txt for more details on RMU node binding)
38
39 Port Child Nodes: There should a port child node for each port that exists in
40 the controller. The ports are numbered starting at one (1) and should have
41 the following properties:
42
43 - cell-index
44 Usage: required
45 Value type: <u32>
46 Definition: A standard property. Matches the port id.
47
48 - ranges
49 Usage: required if local access windows preset
50 Value type: <prop-encoded-array>
51 Definition: A standard property. Utilized to describe the memory mapped
52 IO space utilized by the controller. This corresponds to the
53 setting of the local access windows that are targeted to this
54 SRIO port.
55
56 - fsl,liodn
57 Usage: optional-but-recommended (for devices with PAMU)
58 Value type: <prop-encoded-array>
59 Definition: The logical I/O device number for the PAMU (IOMMU) to be
60 correctly configured for SRIO accesses. The property should
61 not exist on devices that do not support PAMU.
62
63 For HW (ie, the P4080) that only supports a LIODN for both
64 memory and maintenance transactions then a single LIODN is
65 represented in the property for both transactions.
66
67 For HW (ie, the P304x/P5020, etc) that supports an LIODN for
68 memory transactions and a unique LIODN for maintenance
69 transactions then a pair of LIODNs are represented in the
70 property. Within the pair, the first element represents the
71 LIODN associated with memory transactions and the second element
72 represents the LIODN associated with maintenance transactions
73 for the port.
74
75 Note: All other standard properties (see the Devicetree Specification)
76 are allowed but are optional.
77
78 Example:
79
80 rapidio: rapidio@ffe0c0000 {
81 #address-cells = <2>;
82 #size-cells = <2>;
83 reg = <0xf 0xfe0c0000 0 0x11000>;
84 compatible = "fsl,srio";
85 interrupts = <16 2 1 11>; /* err_irq */
86 fsl,srio-rmu-handle = <&rmu>;
87 ranges;
88
89 port1 {
90 cell-index = <1>;
91 #address-cells = <2>;
92 #size-cells = <2>;
93 fsl,liodn = <34>;
94 ranges = <0 0 0xc 0x20000000 0 0x10000000>;
95 };
96
97 port2 {
98 cell-index = <2>;
99 #address-cells = <2>;
100 #size-cells = <2>;
101 fsl,liodn = <48>;
102 ranges = <0 0 0xc 0x30000000 0 0x10000000>;
103 };
104 };
105

3. 한국어 전문 번역

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

SRIO controller node

1-38

Freescale Serial RapidIO controller의 필수 `compatible`에는 SRIO IPBRR1 Major ID가 0x01c0인 IP block용 `fsl,srio`가 들어갑니다. 선택 `fsl,srio-vX.Y`를 제공하면 IP Block Revision Register의 Major·Minor version을 사용하고 `fsl,srio`보다 앞에 둡니다.

필수 `reg`는 SRIO configuration register의 physical address와 length를 지정하며 size는 0x11000이어야 합니다. 필수 `interrupts`는 error condition을 처리하는 단일 IRQ이며 보통 port-write와 공유합니다.

RMU node를 정의했다면 필수 `fsl,srio-rmu-handle` phandle이 RMU를 가리켜야 합니다. RMU binding은 `srio-rmu.txt`에 설명되어 있습니다.

SRIO port child node

39-76

Controller에 존재하는 port마다 1부터 번호를 매긴 child node가 있어야 합니다. 필수 u32 `cell-index`는 port ID와 일치합니다. Local access window가 있으면 필수 `ranges`가 해당 SRIO port를 대상으로 하는 memory-mapped I/O 공간을 기술합니다.

PAMU가 있는 device에는 선택 권장 `fsl,liodn`을 둡니다. P4080처럼 memory와 maintenance transaction에 LIODN 하나만 지원하는 hardware는 단일 값을 사용합니다. P304x·P5020처럼 별도 LIODN을 지원하면 두 값을 쓰며 첫 값은 memory transaction, 두 번째 값은 maintenance transaction용입니다. PAMU 미지원 device에는 이 property가 없어야 합니다.

Devicetree Specification의 다른 표준 property도 허용되지만 선택 사항입니다.

두 SRIO port 예제

77-104

예제 controller는 0x11000 register 공간과 error IRQ, RMU handle을 선언합니다. Port 1과 2는 각각 LIODN 34와 LIODN 48을 사용하고 0x10000000 크기의 서로 다른 local access window를 mapping합니다.

rapidio: rapidio@ffe0c0000 {
        #address-cells = <2>;
        #size-cells = <2>;
        reg = <0xf 0xfe0c0000 0 0x11000>;
        compatible = "fsl,srio";
        interrupts = <16 2 1 11>; /* err_irq */
        fsl,srio-rmu-handle = <&rmu>;
        ranges;

        port1 {
                cell-index = <1>;
                #address-cells = <2>;
                #size-cells = <2>;
                fsl,liodn = <34>;
                ranges = <0 0 0xc 0x20000000 0 0x10000000>;
        };

        port2 {
                cell-index = <2>;
                #address-cells = <2>;
                #size-cells = <2>;
                fsl,liodn = <48>;
                ranges = <0 0 0xc 0x30000000 0 0x10000000>;
        };
};