요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
TI PCI Controllers
PCIe DesignWare Controller
- compatible: Should be "ti,dra7-pcie" for RC (deprecated)
Should be "ti,dra7-pcie-ep" for EP (deprecated)
Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode
Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode
Should be "ti,dra726-pcie-rc" for dra72x in RC mode
Should be "ti,dra726-pcie-ep" for dra72x in EP mode
- phys : list of PHY specifiers (used by generic PHY framework)
- phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the
number of PHYs as specified in *phys* property.
- ti,hwmods : Name of the hwmod associated to the pcie, "pcie<X>",
where <X> is the instance number of the pcie from the HW spec.
- num-lanes as specified in ../snps,dw-pcie.yaml
- ti,syscon-lane-sel : phandle/offset pair. Phandle to the system control
module and the register offset to specify lane
selection.
HOST MODE
=========
- reg : Two register ranges as listed in the reg-names property
- reg-names : The first entry must be "ti-conf" for the TI-specific registers
The second entry must be "rc-dbics" for the DesignWare PCIe
registers
The third entry must be "config" for the PCIe configuration space
- interrupts : Two interrupt entries must be specified. The first one is for
main interrupt line and the second for MSI interrupt line.
- #address-cells,
#size-cells,
#interrupt-cells,
device_type,
ranges,
interrupt-map-mask,
interrupt-map : as specified in ../snps,dw-pcie.yaml
- ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
should contain the register offset within syscon
and the 2nd argument should contain the bit field
for setting the bit to enable unaligned
access.
DEVICE MODE
===========
- reg : Four register ranges as listed in the reg-names property
- reg-names : "ti-conf" for the TI-specific registers
"ep_dbics" for the standard configuration registers as
they are locally accessed within the DIF CS space
"ep_dbics2" for the standard configuration registers as
they are locally accessed within the DIF CS2 space
"addr_space" used to map remote RC address space
- interrupts : one interrupt entries must be specified for main interrupt.
- num-ib-windows : number of inbound address translation windows
- num-ob-windows : number of outbound address translation windows
- ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
should contain the register offset within syscon
and the 2nd argument should contain the bit field
for setting the bit to enable unaligned
access.
Optional Property:
- gpios : Should be added if a GPIO line is required to drive PERST# line
NOTE: Two DT nodes may be added for each PCI controller; one for host
mode and another for device mode. So in order for PCI to
work in host mode, EP mode DT node should be disabled and in order to PCI to
work in EP mode, host mode DT node should be disabled. Host mode and EP
mode are mutually exclusive.
Example:
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>;
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
TI DesignWare PCIe 공통 속성
1-19TI 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-68PERST# 신호를 구동하는 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>;
};
};
};
요약과 해설
ti-pci.txt:1-102공통 PHY·lane 속성과 호스트 및 endpoint 모드의 레지스터·인터럽트 차이를 설명합니다.