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

Linux 6.18.37 · Devicetree Bindings

MediaTek Gen2 PCIe Controller

MediaTek MT27xx·MT76xx와 Airoha EN7523의 Gen2 PCIe 호스트 컨트롤러 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

mediatek-pcie.txt:1-289

SoC 세대별 클록·reset·인터럽트 차이와 루트 포트 모델을 구분하고, MT7623·MT2712·MT7622 예제로 실제 리소스 구성을 보여 줍니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 MediaTek Gen2 PCIe controller
2
3 Required properties:
4 - compatible: Should contain one of the following strings:
5 "mediatek,mt2701-pcie"
6 "mediatek,mt2712-pcie"
7 "mediatek,mt7622-pcie"
8 "mediatek,mt7623-pcie"
9 "mediatek,mt7629-pcie"
10 "airoha,en7523-pcie"
11 - device_type: Must be "pci"
12 - reg: Base addresses and lengths of the root ports.
13 - reg-names: Names of the above areas to use during resource lookup.
14 - #address-cells: Address representation for root ports (must be 3)
15 - #size-cells: Size representation for root ports (must be 2)
16 - clocks: Must contain an entry for each entry in clock-names.
17 See ../clocks/clock-bindings.txt for details.
18 - clock-names:
19 Mandatory entries:
20 - sys_ckN :transaction layer and data link layer clock
21 Required entries for MT2701/MT7623:
22 - free_ck :for reference clock of PCIe subsys
23 Required entries for MT2712/MT7622:
24 - ahb_ckN :AHB slave interface operating clock for CSR access and RC
25 initiated MMIO access
26 Required entries for MT7622:
27 - axi_ckN :application layer MMIO channel operating clock
28 - aux_ckN :pe2_mac_bridge and pe2_mac_core operating clock when
29 pcie_mac_ck/pcie_pipe_ck is turned off
30 - obff_ckN :OBFF functional block operating clock
31 - pipe_ckN :LTSSM and PHY/MAC layer operating clock
32 where N starting from 0 to one less than the number of root ports.
33 - phys: List of PHY specifiers (used by generic PHY framework).
34 - phy-names : Must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the
35 number of PHYs as specified in *phys* property.
36 - power-domains: A phandle and power domain specifier pair to the power domain
37 which is responsible for collapsing and restoring power to the peripheral.
38 - bus-range: Range of bus numbers associated with this controller.
39 - ranges: Ranges for the PCI memory and I/O regions.
40
41 Required properties for MT7623/MT2701:
42 - #interrupt-cells: Size representation for interrupts (must be 1)
43 - interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
44 Please refer to the standard PCI bus binding document for a more detailed
45 explanation.
46 - resets: Must contain an entry for each entry in reset-names.
47 See ../reset/reset.txt for details.
48 - reset-names: Must be "pcie-rst0", "pcie-rst1", "pcie-rstN".. based on the
49 number of root ports.
50
51 Required properties for MT2712/MT7622/MT7629:
52 -interrupts: A list of interrupt outputs of the controller, must have one
53 entry for each PCIe port
54 - interrupt-names: Must include the following entries:
55 - "pcie_irq": The interrupt that is asserted when an MSI/INTX is received
56 - linux,pci-domain: PCI domain ID. Should be unique for each host controller
57
58 In addition, the device tree node must have sub-nodes describing each
59 PCIe port interface, having the following mandatory properties:
60
61 Required properties:
62 - device_type: Must be "pci"
63 - reg: Only the first four bytes are used to refer to the correct bus number
64 and device number.
65 - #address-cells: Must be 3
66 - #size-cells: Must be 2
67 - #interrupt-cells: Must be 1
68 - interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
69 Please refer to the standard PCI bus binding document for a more detailed
70 explanation.
71 - ranges: Sub-ranges distributed from the PCIe controller node. An empty
72 property is sufficient.
73
74 Examples for MT7623:
75
76 hifsys: syscon@1a000000 {
77 compatible = "mediatek,mt7623-hifsys",
78 "mediatek,mt2701-hifsys",
79 "syscon";
80 reg = <0 0x1a000000 0 0x1000>;
81 #clock-cells = <1>;
82 #reset-cells = <1>;
83 };
84
85 pcie: pcie@1a140000 {
86 compatible = "mediatek,mt7623-pcie";
87 device_type = "pci";
88 reg = <0 0x1a140000 0 0x1000>, /* PCIe shared registers */
89 <0 0x1a142000 0 0x1000>, /* Port0 registers */
90 <0 0x1a143000 0 0x1000>, /* Port1 registers */
91 <0 0x1a144000 0 0x1000>; /* Port2 registers */
92 reg-names = "subsys", "port0", "port1", "port2";
93 #address-cells = <3>;
94 #size-cells = <2>;
95 #interrupt-cells = <1>;
96 interrupt-map-mask = <0xf800 0 0 0>;
97 interrupt-map = <0x0000 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
98 <0x0800 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
99 <0x1000 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
100 clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
101 <&hifsys CLK_HIFSYS_PCIE0>,
102 <&hifsys CLK_HIFSYS_PCIE1>,
103 <&hifsys CLK_HIFSYS_PCIE2>;
104 clock-names = "free_ck", "sys_ck0", "sys_ck1", "sys_ck2";
105 resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
106 <&hifsys MT2701_HIFSYS_PCIE1_RST>,
107 <&hifsys MT2701_HIFSYS_PCIE2_RST>;
108 reset-names = "pcie-rst0", "pcie-rst1", "pcie-rst2";
109 phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>,
110 <&pcie2_phy PHY_TYPE_PCIE>;
111 phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
112 power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
113 bus-range = <0x00 0xff>;
114 ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000 /* I/O space */
115 0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* memory space */
116
117 pcie@0,0 {
118 reg = <0x0000 0 0 0 0>;
119 #address-cells = <3>;
120 #size-cells = <2>;
121 #interrupt-cells = <1>;
122 interrupt-map-mask = <0 0 0 0>;
123 interrupt-map = <0 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
124 ranges;
125 };
126
127 pcie@1,0 {
128 reg = <0x0800 0 0 0 0>;
129 #address-cells = <3>;
130 #size-cells = <2>;
131 #interrupt-cells = <1>;
132 interrupt-map-mask = <0 0 0 0>;
133 interrupt-map = <0 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
134 ranges;
135 };
136
137 pcie@2,0 {
138 reg = <0x1000 0 0 0 0>;
139 #address-cells = <3>;
140 #size-cells = <2>;
141 #interrupt-cells = <1>;
142 interrupt-map-mask = <0 0 0 0>;
143 interrupt-map = <0 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
144 ranges;
145 };
146 };
147
148 Examples for MT2712:
149
150 pcie1: pcie@112ff000 {
151 compatible = "mediatek,mt2712-pcie";
152 device_type = "pci";
153 reg = <0 0x112ff000 0 0x1000>;
154 reg-names = "port1";
155 linux,pci-domain = <1>;
156 #address-cells = <3>;
157 #size-cells = <2>;
158 interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
159 interrupt-names = "pcie_irq";
160 clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
161 <&pericfg CLK_PERI_PCIE1>;
162 clock-names = "sys_ck1", "ahb_ck1";
163 phys = <&u3port1 PHY_TYPE_PCIE>;
164 phy-names = "pcie-phy1";
165 bus-range = <0x00 0xff>;
166 ranges = <0x82000000 0 0x11400000 0x0 0x11400000 0 0x300000>;
167 status = "disabled";
168
169 #interrupt-cells = <1>;
170 interrupt-map-mask = <0 0 0 7>;
171 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
172 <0 0 0 2 &pcie_intc1 1>,
173 <0 0 0 3 &pcie_intc1 2>,
174 <0 0 0 4 &pcie_intc1 3>;
175 pcie_intc1: interrupt-controller {
176 interrupt-controller;
177 #address-cells = <0>;
178 #interrupt-cells = <1>;
179 };
180 };
181
182 pcie0: pcie@11700000 {
183 compatible = "mediatek,mt2712-pcie";
184 device_type = "pci";
185 reg = <0 0x11700000 0 0x1000>;
186 reg-names = "port0";
187 linux,pci-domain = <0>;
188 #address-cells = <3>;
189 #size-cells = <2>;
190 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
191 interrupt-names = "pcie_irq";
192 clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
193 <&pericfg CLK_PERI_PCIE0>;
194 clock-names = "sys_ck0", "ahb_ck0";
195 phys = <&u3port0 PHY_TYPE_PCIE>;
196 phy-names = "pcie-phy0";
197 bus-range = <0x00 0xff>;
198 ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
199 status = "disabled";
200
201 #interrupt-cells = <1>;
202 interrupt-map-mask = <0 0 0 7>;
203 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
204 <0 0 0 2 &pcie_intc0 1>,
205 <0 0 0 3 &pcie_intc0 2>,
206 <0 0 0 4 &pcie_intc0 3>;
207 pcie_intc0: interrupt-controller {
208 interrupt-controller;
209 #address-cells = <0>;
210 #interrupt-cells = <1>;
211 };
212 };
213
214 Examples for MT7622:
215
216 pcie0: pcie@1a143000 {
217 compatible = "mediatek,mt7622-pcie";
218 device_type = "pci";
219 reg = <0 0x1a143000 0 0x1000>;
220 reg-names = "port0";
221 linux,pci-domain = <0>;
222 #address-cells = <3>;
223 #size-cells = <2>;
224 interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
225 interrupt-names = "pcie_irq";
226 clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
227 <&pciesys CLK_PCIE_P0_AHB_EN>,
228 <&pciesys CLK_PCIE_P0_AUX_EN>,
229 <&pciesys CLK_PCIE_P0_AXI_EN>,
230 <&pciesys CLK_PCIE_P0_OBFF_EN>,
231 <&pciesys CLK_PCIE_P0_PIPE_EN>;
232 clock-names = "sys_ck0", "ahb_ck0", "aux_ck0",
233 "axi_ck0", "obff_ck0", "pipe_ck0";
234
235 power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
236 bus-range = <0x00 0xff>;
237 ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
238 status = "disabled";
239
240 #interrupt-cells = <1>;
241 interrupt-map-mask = <0 0 0 7>;
242 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
243 <0 0 0 2 &pcie_intc0 1>,
244 <0 0 0 3 &pcie_intc0 2>,
245 <0 0 0 4 &pcie_intc0 3>;
246 pcie_intc0: interrupt-controller {
247 interrupt-controller;
248 #address-cells = <0>;
249 #interrupt-cells = <1>;
250 };
251 };
252
253 pcie1: pcie@1a145000 {
254 compatible = "mediatek,mt7622-pcie";
255 device_type = "pci";
256 reg = <0 0x1a145000 0 0x1000>;
257 reg-names = "port1";
258 linux,pci-domain = <1>;
259 #address-cells = <3>;
260 #size-cells = <2>;
261 interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
262 interrupt-names = "pcie_irq";
263 clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
264 /* designer has connect RC1 with p0_ahb clock */
265 <&pciesys CLK_PCIE_P0_AHB_EN>,
266 <&pciesys CLK_PCIE_P1_AUX_EN>,
267 <&pciesys CLK_PCIE_P1_AXI_EN>,
268 <&pciesys CLK_PCIE_P1_OBFF_EN>,
269 <&pciesys CLK_PCIE_P1_PIPE_EN>;
270 clock-names = "sys_ck1", "ahb_ck1", "aux_ck1",
271 "axi_ck1", "obff_ck1", "pipe_ck1";
272
273 power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
274 bus-range = <0x00 0xff>;
275 ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
276 status = "disabled";
277
278 #interrupt-cells = <1>;
279 interrupt-map-mask = <0 0 0 7>;
280 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
281 <0 0 0 2 &pcie_intc1 1>,
282 <0 0 0 3 &pcie_intc1 2>,
283 <0 0 0 4 &pcie_intc1 3>;
284 pcie_intc1: interrupt-controller {
285 interrupt-controller;
286 #address-cells = <0>;
287 #interrupt-cells = <1>;
288 };
289 };
290

3. 한국어 전문 번역

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

MediaTek Gen2 PCIe 컨트롤러

1-2

이 문서는 MediaTek 2세대 PCIe 컨트롤러를 Device Tree에 기술하는 바인딩을 정의합니다.

공통 필수 속성

3-40

`compatible`에는 `mediatek,mt2701-pcie`, `mediatek,mt2712-pcie`, `mediatek,mt7622-pcie`, `mediatek,mt7623-pcie`, `mediatek,mt7629-pcie`, `airoha,en7523-pcie` 가운데 하나가 들어가야 합니다.

`device_type`은 반드시 `pci`여야 합니다. `reg`는 루트 포트들의 기본 주소와 길이를 담고, `reg-names`는 리소스를 찾을 때 이 영역들을 식별할 이름을 담습니다.

루트 포트 주소 표현을 위한 `#address-cells`는 3이어야 하며, 크기 표현을 위한 `#size-cells`는 2여야 합니다.

`clocks`에는 `clock-names`의 각 항목에 대응하는 엔트리가 하나씩 있어야 합니다. 자세한 내용은 `../clocks/clock-bindings.txt`를 참조하십시오.

`clock-names`의 공통 필수 항목 `sys_ckN`은 트랜잭션 계층과 데이터 링크 계층의 클록입니다. MT2701과 MT7623에 필요한 `free_ck`는 PCIe 서브시스템의 기준 클록입니다.

MT2712와 MT7622에 필요한 `ahb_ckN`은 CSR 접근과 루트 콤플렉스가 시작한 MMIO 접근에 쓰이는 AHB 슬레이브 인터페이스 동작 클록입니다.

MT7622에는 애플리케이션 계층 MMIO 채널용 `axi_ckN`, `pcie_mac_ck` 또는 `pcie_pipe_ck`가 꺼졌을 때 `pe2_mac_bridge`와 `pe2_mac_core`를 구동하는 `aux_ckN`, OBFF 기능 블록용 `obff_ckN`, LTSSM과 PHY/MAC 계층용 `pipe_ckN`도 필요합니다.

이 이름에서 `N`은 0부터 루트 포트 수보다 하나 작은 값까지 증가합니다.

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

`power-domains`는 주변 장치 전원을 차단하고 복구하는 전원 도메인을 가리키는 phandle과 전원 도메인 지정자의 쌍입니다.

`bus-range`는 이 컨트롤러와 연결된 버스 번호 범위이고, `ranges`는 PCI 메모리 및 I/O 영역의 변환 범위입니다.

SoC별 속성과 포트 하위 노드

41-73

MT7623과 MT2701에서는 인터럽트 표현 크기인 `#interrupt-cells`가 1이어야 합니다. 또한 표준 PCI IRQ 매핑 속성인 `interrupt-map-mask`와 `interrupt-map`이 필요하며, 자세한 설명은 표준 PCI 버스 바인딩 문서를 참조하십시오.

MT7623과 MT2701의 `resets`에는 `reset-names`의 각 항목에 대응하는 엔트리가 있어야 합니다. 자세한 내용은 `../reset/reset.txt`를 참조하십시오. `reset-names`는 루트 포트 수에 맞춰 `pcie-rst0`, `pcie-rst1`, ..., `pcie-rstN` 형식이어야 합니다.

MT2712, MT7622, MT7629의 `interrupts`에는 각 PCIe 포트마다 컨트롤러 인터럽트 출력 엔트리가 하나씩 있어야 합니다. `interrupt-names`에는 MSI 또는 INTX를 받았을 때 어서트되는 인터럽트를 나타내는 `pcie_irq`가 포함되어야 합니다.

`linux,pci-domain`은 PCI 도메인 ID이며 각 호스트 컨트롤러마다 고유해야 합니다.

Device Tree의 컨트롤러 노드에는 각 PCIe 포트 인터페이스를 설명하는 하위 노드도 있어야 합니다. 각 포트의 `device_type`은 `pci`여야 하고, `reg`에서는 올바른 버스 번호와 장치 번호를 가리키는 처음 네 바이트만 사용합니다.

포트 하위 노드의 `#address-cells`는 3, `#size-cells`는 2, `#interrupt-cells`는 1이어야 합니다. `interrupt-map-mask`와 `interrupt-map`은 표준 PCI IRQ 매핑 속성이며 세부 내용은 표준 PCI 버스 바인딩을 따릅니다.

포트의 `ranges`는 PCIe 컨트롤러 노드에서 분배받은 하위 범위를 나타냅니다. 빈 속성으로 두어도 충분합니다.

MT7623 예제

74-147

MT7623 예제는 `hifsys` syscon과 세 개의 루트 포트를 갖는 단일 PCIe 컨트롤러를 정의합니다. 공유 레지스터와 포트별 레지스터, 세 IRQ 매핑, `free_ck`와 포트별 `sys_ckN`, 세 reset 및 PHY, HIF 전원 도메인, I/O·메모리 범위를 연결합니다.

`pcie@0,0`, `pcie@1,0`, `pcie@2,0` 하위 노드는 각각 해당 포트의 버스·장치 번호와 인터럽트를 지정하고 빈 `ranges`를 사용합니다.

hifsys: syscon@1a000000 {
        compatible = "mediatek,mt7623-hifsys",
                     "mediatek,mt2701-hifsys",
                     "syscon";
        reg = <0 0x1a000000 0 0x1000>;
        #clock-cells = <1>;
        #reset-cells = <1>;
};

pcie: pcie@1a140000 {
        compatible = "mediatek,mt7623-pcie";
        device_type = "pci";
        reg = <0 0x1a140000 0 0x1000>, /* PCIe shared registers */
              <0 0x1a142000 0 0x1000>, /* Port0 registers */
              <0 0x1a143000 0 0x1000>, /* Port1 registers */
              <0 0x1a144000 0 0x1000>; /* Port2 registers */
        reg-names = "subsys", "port0", "port1", "port2";
        #address-cells = <3>;
        #size-cells = <2>;
        #interrupt-cells = <1>;
        interrupt-map-mask = <0xf800 0 0 0>;
        interrupt-map = <0x0000 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
                        <0x0800 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
                        <0x1000 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
        clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
                 <&hifsys CLK_HIFSYS_PCIE0>,
                 <&hifsys CLK_HIFSYS_PCIE1>,
                 <&hifsys CLK_HIFSYS_PCIE2>;
        clock-names = "free_ck", "sys_ck0", "sys_ck1", "sys_ck2";
        resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
                 <&hifsys MT2701_HIFSYS_PCIE1_RST>,
                 <&hifsys MT2701_HIFSYS_PCIE2_RST>;
        reset-names = "pcie-rst0", "pcie-rst1", "pcie-rst2";
        phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>,
               <&pcie2_phy PHY_TYPE_PCIE>;
        phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
        power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
        bus-range = <0x00 0xff>;
        ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000        /* I/O space */
                  0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>;        /* memory space */

        pcie@0,0 {
                reg = <0x0000 0 0 0 0>;
                #address-cells = <3>;
                #size-cells = <2>;
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 0>;
                interrupt-map = <0 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
                ranges;
        };

        pcie@1,0 {
                reg = <0x0800 0 0 0 0>;
                #address-cells = <3>;
                #size-cells = <2>;
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 0>;
                interrupt-map = <0 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
                ranges;
        };

        pcie@2,0 {
                reg = <0x1000 0 0 0 0>;
                #address-cells = <3>;
                #size-cells = <2>;
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 0>;
                interrupt-map = <0 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
                ranges;
        };
};

MT2712 예제

148-213

MT2712 예제는 포트 1과 포트 0을 각각 독립 호스트 컨트롤러로 기술하고 PCI 도메인 1과 0을 부여합니다. 각 노드는 하나의 레지스터 영역, `pcie_irq`, `sys_ckN`과 `ahb_ckN`, PCIe PHY, 버스·메모리 범위를 갖습니다.

각 컨트롤러 안의 인터럽트 컨트롤러는 PCI INT A부터 D까지 네 입력을 0부터 3까지의 로컬 인터럽트로 매핑합니다. 두 호스트 컨트롤러는 기본적으로 `disabled` 상태입니다.

pcie1: pcie@112ff000 {
        compatible = "mediatek,mt2712-pcie";
        device_type = "pci";
        reg = <0 0x112ff000 0 0x1000>;
        reg-names = "port1";
        linux,pci-domain = <1>;
        #address-cells = <3>;
        #size-cells = <2>;
        interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "pcie_irq";
        clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
                 <&pericfg CLK_PERI_PCIE1>;
        clock-names = "sys_ck1", "ahb_ck1";
        phys = <&u3port1 PHY_TYPE_PCIE>;
        phy-names = "pcie-phy1";
        bus-range = <0x00 0xff>;
        ranges = <0x82000000 0 0x11400000  0x0 0x11400000  0 0x300000>;
        status = "disabled";

        #interrupt-cells = <1>;
        interrupt-map-mask = <0 0 0 7>;
        interrupt-map = <0 0 0 1 &pcie_intc1 0>,
                        <0 0 0 2 &pcie_intc1 1>,
                        <0 0 0 3 &pcie_intc1 2>,
                        <0 0 0 4 &pcie_intc1 3>;
        pcie_intc1: interrupt-controller {
                interrupt-controller;
                #address-cells = <0>;
                #interrupt-cells = <1>;
        };
};

pcie0: pcie@11700000 {
        compatible = "mediatek,mt2712-pcie";
        device_type = "pci";
        reg = <0 0x11700000 0 0x1000>;
        reg-names = "port0";
        linux,pci-domain = <0>;
        #address-cells = <3>;
        #size-cells = <2>;
        interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "pcie_irq";
        clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
                 <&pericfg CLK_PERI_PCIE0>;
        clock-names = "sys_ck0", "ahb_ck0";
        phys = <&u3port0 PHY_TYPE_PCIE>;
        phy-names = "pcie-phy0";
        bus-range = <0x00 0xff>;
        ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
        status = "disabled";

        #interrupt-cells = <1>;
        interrupt-map-mask = <0 0 0 7>;
        interrupt-map = <0 0 0 1 &pcie_intc0 0>,
                        <0 0 0 2 &pcie_intc0 1>,
                        <0 0 0 3 &pcie_intc0 2>,
                        <0 0 0 4 &pcie_intc0 3>;
        pcie_intc0: interrupt-controller {
                interrupt-controller;
                #address-cells = <0>;
                #interrupt-cells = <1>;
        };
};

MT7622 포트 0 예제

214-252

MT7622 포트 0은 PCI 도메인 0과 저레벨 IRQ 228을 사용합니다. `sys_ck0`, `ahb_ck0`, `aux_ck0`, `axi_ck0`, `obff_ck0`, `pipe_ck0` 여섯 클록과 HIF0 전원 도메인, `0x20000000`에서 시작하는 128MiB 메모리 범위를 정의합니다.

내장 인터럽트 컨트롤러는 PCI INT A부터 D까지를 로컬 인터럽트 0부터 3까지로 매핑하며, 호스트 노드는 기본적으로 `disabled` 상태입니다.

pcie0: pcie@1a143000 {
        compatible = "mediatek,mt7622-pcie";
        device_type = "pci";
        reg = <0 0x1a143000 0 0x1000>;
        reg-names = "port0";
        linux,pci-domain = <0>;
        #address-cells = <3>;
        #size-cells = <2>;
        interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
        interrupt-names = "pcie_irq";
        clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
                 <&pciesys CLK_PCIE_P0_AHB_EN>,
                 <&pciesys CLK_PCIE_P0_AUX_EN>,
                 <&pciesys CLK_PCIE_P0_AXI_EN>,
                 <&pciesys CLK_PCIE_P0_OBFF_EN>,
                 <&pciesys CLK_PCIE_P0_PIPE_EN>;
        clock-names = "sys_ck0", "ahb_ck0", "aux_ck0",
                      "axi_ck0", "obff_ck0", "pipe_ck0";

        power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
        bus-range = <0x00 0xff>;
        ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x8000000>;
        status = "disabled";

        #interrupt-cells = <1>;
        interrupt-map-mask = <0 0 0 7>;
        interrupt-map = <0 0 0 1 &pcie_intc0 0>,
                        <0 0 0 2 &pcie_intc0 1>,
                        <0 0 0 3 &pcie_intc0 2>,
                        <0 0 0 4 &pcie_intc0 3>;
        pcie_intc0: interrupt-controller {
                interrupt-controller;
                #address-cells = <0>;
                #interrupt-cells = <1>;
        };
};

MT7622 포트 1 예제

253-289

MT7622 포트 1은 PCI 도메인 1과 저레벨 IRQ 229를 사용합니다. 설계상 RC1이 포트 0의 AHB 클록에 연결되어 있으므로 `ahb_ck1` 항목에는 `CLK_PCIE_P0_AHB_EN`을 지정합니다.

나머지 클록은 포트 1의 MAC, AUX, AXI, OBFF, PIPE 게이트를 사용합니다. HIF0 전원 도메인과 `0x28000000`에서 시작하는 128MiB 메모리 범위, INT A-D 매핑을 정의하며 기본 상태는 `disabled`입니다.

pcie1: pcie@1a145000 {
        compatible = "mediatek,mt7622-pcie";
        device_type = "pci";
        reg = <0 0x1a145000 0 0x1000>;
        reg-names = "port1";
        linux,pci-domain = <1>;
        #address-cells = <3>;
        #size-cells = <2>;
        interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
        interrupt-names = "pcie_irq";
        clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
                 /* designer has connect RC1 with p0_ahb clock */
                 <&pciesys CLK_PCIE_P0_AHB_EN>,
                 <&pciesys CLK_PCIE_P1_AUX_EN>,
                 <&pciesys CLK_PCIE_P1_AXI_EN>,
                 <&pciesys CLK_PCIE_P1_OBFF_EN>,
                 <&pciesys CLK_PCIE_P1_PIPE_EN>;
        clock-names = "sys_ck1", "ahb_ck1", "aux_ck1",
                      "axi_ck1", "obff_ck1", "pipe_ck1";

        power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
        bus-range = <0x00 0xff>;
        ranges = <0x82000000 0 0x28000000  0x0 0x28000000  0 0x8000000>;
        status = "disabled";

        #interrupt-cells = <1>;
        interrupt-map-mask = <0 0 0 7>;
        interrupt-map = <0 0 0 1 &pcie_intc1 0>,
                        <0 0 0 2 &pcie_intc1 1>,
                        <0 0 0 3 &pcie_intc1 2>,
                        <0 0 0 4 &pcie_intc1 3>;
        pcie_intc1: interrupt-controller {
                interrupt-controller;
                #address-cells = <0>;
                #interrupt-cells = <1>;
        };
};