← Documents Documentation/devicetree/bindings/pci/ti-pci.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

TI PCI Controllers

TI DRA7 계열 DesignWare PCIe 컨트롤러의 RC와 EP 모드 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

ti-pci.txt:1-102

공통 PHY·lane 속성과 호스트 및 endpoint 모드의 레지스터·인터럽트 차이를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 TI PCI Controllers
2
3 PCIe DesignWare Controller
4 - compatible: Should be "ti,dra7-pcie" for RC (deprecated)
5 Should be "ti,dra7-pcie-ep" for EP (deprecated)
6 Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode
7 Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode
8 Should be "ti,dra726-pcie-rc" for dra72x in RC mode
9 Should be "ti,dra726-pcie-ep" for dra72x in EP mode
10 - phys : list of PHY specifiers (used by generic PHY framework)
11 - phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the
12 number of PHYs as specified in *phys* property.
13 - ti,hwmods : Name of the hwmod associated to the pcie, "pcie<X>",
14 where <X> is the instance number of the pcie from the HW spec.
15 - num-lanes as specified in ../snps,dw-pcie.yaml
16 - ti,syscon-lane-sel : phandle/offset pair. Phandle to the system control
17 module and the register offset to specify lane
18 selection.
19
20 HOST MODE
21 =========
22 - reg : Two register ranges as listed in the reg-names property
23 - reg-names : The first entry must be "ti-conf" for the TI-specific registers
24 The second entry must be "rc-dbics" for the DesignWare PCIe
25 registers
26 The third entry must be "config" for the PCIe configuration space
27 - interrupts : Two interrupt entries must be specified. The first one is for
28 main interrupt line and the second for MSI interrupt line.
29 - #address-cells,
30 #size-cells,
31 #interrupt-cells,
32 device_type,
33 ranges,
34 interrupt-map-mask,
35 interrupt-map : as specified in ../snps,dw-pcie.yaml
36 - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
37 should contain the register offset within syscon
38 and the 2nd argument should contain the bit field
39 for setting the bit to enable unaligned
40 access.
41
42 DEVICE MODE
43 ===========
44 - reg : Four register ranges as listed in the reg-names property
45 - reg-names : "ti-conf" for the TI-specific registers
46 "ep_dbics" for the standard configuration registers as
47 they are locally accessed within the DIF CS space
48 "ep_dbics2" for the standard configuration registers as
49 they are locally accessed within the DIF CS2 space
50 "addr_space" used to map remote RC address space
51 - interrupts : one interrupt entries must be specified for main interrupt.
52 - num-ib-windows : number of inbound address translation windows
53 - num-ob-windows : number of outbound address translation windows
54 - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
55 should contain the register offset within syscon
56 and the 2nd argument should contain the bit field
57 for setting the bit to enable unaligned
58 access.
59
60 Optional Property:
61 - gpios : Should be added if a GPIO line is required to drive PERST# line
62
63 NOTE: Two DT nodes may be added for each PCI controller; one for host
64 mode and another for device mode. So in order for PCI to
65 work in host mode, EP mode DT node should be disabled and in order to PCI to
66 work in EP mode, host mode DT node should be disabled. Host mode and EP
67 mode are mutually exclusive.
68
69 Example:
70 axi {
71 compatible = "simple-bus";
72 #size-cells = <1>;
73 #address-cells = <1>;
74 ranges = <0x51000000 0x51000000 0x3000
75 0x0 0x20000000 0x10000000>;
76 pcie@51000000 {
77 compatible = "ti,dra7-pcie";
78 reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>;
79 reg-names = "rc_dbics", "ti_conf", "config";
80 interrupts = <0 232 0x4>, <0 233 0x4>;
81 #address-cells = <3>;
82 #size-cells = <2>;
83 device_type = "pci";
84 ranges = <0x81000000 0 0 0x03000 0 0x00010000
85 0x82000000 0 0x20013000 0x13000 0 0xffed000>;
86 #interrupt-cells = <1>;
87 num-lanes = <1>;
88 ti,hwmods = "pcie1";
89 phys = <&pcie1_phy>;
90 phy-names = "pcie-phy0";
91 interrupt-map-mask = <0 0 0 7>;
92 interrupt-map = <0 0 0 1 &pcie_intc 1>,
93 <0 0 0 2 &pcie_intc 2>,
94 <0 0 0 3 &pcie_intc 3>,
95 <0 0 0 4 &pcie_intc 4>;
96 pcie_intc: interrupt-controller {
97 interrupt-controller;
98 #address-cells = <0>;
99 #interrupt-cells = <1>;
100 };
101 };
102 };
103

3. 한국어 전문 번역

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

TI DesignWare PCIe 공통 속성

1-19

TI PCI 컨트롤러는 DesignWare PCIe 코어를 사용합니다. 폐기된 호환 문자열은 RC용 `ti,dra7-pcie`와 EP용 `ti,dra7-pcie-ep`입니다.

dra74x/dra76은 RC 모드에서 `ti,dra746-pcie-rc`, EP 모드에서 `ti,dra746-pcie-ep`를 사용합니다. dra72x는 각각 `ti,dra726-pcie-rc`와 `ti,dra726-pcie-ep`를 사용합니다.

`phys`는 범용 PHY 프레임워크가 사용할 PHY 지정자 목록입니다. `phy-names`는 `phys`에 지정된 PHY 수에 맞춰 `pcie-phy0`, `pcie-phy1`, ..., `pcie-phyN` 형식이어야 합니다.

`ti,hwmods`는 PCIe와 연결된 hwmod 이름 `pcie<X>`이며 `<X>`는 하드웨어 사양의 PCIe 인스턴스 번호입니다. `num-lanes`는 `../snps,dw-pcie.yaml`의 정의를 따릅니다.

`ti,syscon-lane-sel`은 system control module phandle과 lane 선택을 지정할 register offset의 쌍입니다.

호스트 모드

20-41

호스트 모드의 `reg`는 `reg-names`에 나열된 레지스터 범위를 지정합니다. `reg-names`의 첫 항목은 TI 전용 레지스터용 `ti-conf`, 두 번째는 DesignWare PCIe 레지스터용 `rc-dbics`, 세 번째는 PCIe configuration space용 `config`여야 합니다.

`interrupts`에는 두 엔트리가 필요합니다. 첫 번째는 main interrupt line, 두 번째는 MSI interrupt line입니다.

`#address-cells`, `#size-cells`, `#interrupt-cells`, `device_type`, `ranges`, `interrupt-map-mask`, `interrupt-map`은 `../snps,dw-pcie.yaml`의 정의를 따릅니다.

`ti,syscon-unaligned-access`는 syscon DT 노드의 phandle입니다. 첫 인자는 syscon 내부 register offset, 두 번째 인자는 unaligned access를 활성화하는 bit를 설정할 bit field입니다.

장치 모드

42-59

장치 모드의 `reg`는 `reg-names`에 나열된 네 레지스터 범위를 지정합니다. `ti-conf`는 TI 전용 레지스터, `ep_dbics`는 DIF CS 공간에서 로컬 접근하는 표준 configuration register, `ep_dbics2`는 DIF CS2 공간에서 로컬 접근하는 표준 configuration register, `addr_space`는 원격 RC 주소 공간 매핑용입니다.

`interrupts`에는 main interrupt용 엔트리 하나가 필요합니다. `num-ib-windows`는 inbound address translation window 수, `num-ob-windows`는 outbound address translation window 수입니다.

장치 모드의 `ti,syscon-unaligned-access`도 syscon phandle, register offset, unaligned access 활성화 bit field를 전달합니다.

선택 속성과 RC/EP 모드 선택

60-68

PERST# 신호를 구동하는 GPIO line이 필요하면 선택 속성 `gpios`를 추가합니다.

각 PCI 컨트롤러에 호스트 모드 노드와 장치 모드 노드 두 개를 둘 수 있습니다. 호스트 모드로 동작하려면 EP 모드 노드를 비활성화하고, EP 모드로 동작하려면 호스트 모드 노드를 비활성화해야 합니다. 두 모드는 상호 배타적입니다.

TI DRA7 PCIe 호스트 예제

69-102

예제는 simple-bus 아래에 폐기된 `ti,dra7-pcie` 호환 문자열의 RC 노드를 정의합니다. 세 레지스터 영역, main/MSI 인터럽트, I/O·memory 범위, lane 하나, `pcie1` hwmod와 PHY, INT A-D 매핑을 구성합니다.

axi {
        compatible = "simple-bus";
        #size-cells = <1>;
        #address-cells = <1>;
        ranges = <0x51000000 0x51000000 0x3000
                  0x0             0x20000000 0x10000000>;
        pcie@51000000 {
                compatible = "ti,dra7-pcie";
                reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>;
                reg-names = "rc_dbics", "ti_conf", "config";
                interrupts = <0 232 0x4>, <0 233 0x4>;
                #address-cells = <3>;
                #size-cells = <2>;
                device_type = "pci";
                ranges = <0x81000000 0 0          0x03000 0 0x00010000
                          0x82000000 0 0x20013000 0x13000 0 0xffed000>;
                #interrupt-cells = <1>;
                num-lanes = <1>;
                ti,hwmods = "pcie1";
                phys = <&pcie1_phy>;
                phy-names = "pcie-phy0";
                interrupt-map-mask = <0 0 0 7>;
                interrupt-map = <0 0 0 1 &pcie_intc 1>,
                                <0 0 0 2 &pcie_intc 2>,
                                <0 0 0 3 &pcie_intc 3>,
                                <0 0 0 4 &pcie_intc 4>;
                pcie_intc: interrupt-controller {
                        interrupt-controller;
                        #address-cells = <0>;
                        #interrupt-cells = <1>;
                };
        };
};