Skip to content

Commit 6d55d5a

Browse files
AnsuelMani-Sadhasivam
authored andcommitted
dt-bindings: PCI: mediatek: Add support for Airoha AN7583
Introduce Airoha AN7583 SoC compatible in mediatek PCIe controller binding. Similar to GEN3, the Airoha AN7583 GEN2 PCIe controller require the PBUS csr property to permit the correct functionality of the PCIe controller. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20251020111121.31779-3-ansuelsmth@gmail.com
1 parent 99f9889 commit 6d55d5a

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

Documentation/devicetree/bindings/pci/mediatek-pcie.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ properties:
1313
compatible:
1414
oneOf:
1515
- enum:
16+
- airoha,an7583-pcie
1617
- mediatek,mt2712-pcie
1718
- mediatek,mt7622-pcie
1819
- mediatek,mt7629-pcie
@@ -40,6 +41,12 @@ properties:
4041
- enum: [ obff_ck0, obff_ck1 ]
4142
- enum: [ pipe_ck0, pipe_ck1 ]
4243

44+
resets:
45+
maxItems: 1
46+
47+
reset-names:
48+
const: pcie-rst1
49+
4350
interrupts:
4451
maxItems: 1
4552

@@ -55,6 +62,17 @@ properties:
5562
power-domains:
5663
maxItems: 1
5764

65+
mediatek,pbus-csr:
66+
$ref: /schemas/types.yaml#/definitions/phandle-array
67+
items:
68+
- items:
69+
- description: phandle to pbus-csr syscon
70+
- description: offset of pbus-csr base address register
71+
- description: offset of pbus-csr base address mask register
72+
description:
73+
Phandle with two arguments to the syscon node used to detect if
74+
a given address is accessible on PCIe controller.
75+
5876
'#interrupt-cells':
5977
const: 1
6078

@@ -90,6 +108,33 @@ required:
90108
allOf:
91109
- $ref: /schemas/pci/pci-host-bridge.yaml#
92110

111+
- if:
112+
properties:
113+
compatible:
114+
const: airoha,an7583-pcie
115+
then:
116+
properties:
117+
reg-names:
118+
const: port1
119+
120+
clocks:
121+
maxItems: 1
122+
123+
clock-names:
124+
const: sys_ck1
125+
126+
phy-names:
127+
const: pcie-phy1
128+
129+
power-domain: false
130+
131+
required:
132+
- resets
133+
- reset-names
134+
- phys
135+
- phy-names
136+
- mediatek,pbus-csr
137+
93138
- if:
94139
properties:
95140
compatible:
@@ -104,8 +149,14 @@ allOf:
104149
minItems: 2
105150
maxItems: 2
106151

152+
reset: false
153+
154+
reset-names: false
155+
107156
power-domains: false
108157

158+
mediatek,pbus-csr: false
159+
109160
required:
110161
- phys
111162
- phy-names
@@ -119,10 +170,16 @@ allOf:
119170
clocks:
120171
minItems: 6
121172

173+
reset: false
174+
175+
reset-names: false
176+
122177
phys: false
123178

124179
phy-names: false
125180

181+
mediatek,pbus-csr: false
182+
126183
required:
127184
- power-domains
128185

@@ -135,6 +192,12 @@ allOf:
135192
clocks:
136193
minItems: 6
137194

195+
reset: false
196+
197+
reset-names: false
198+
199+
mediatek,pbus-csr: false
200+
138201
required:
139202
- power-domains
140203

@@ -151,12 +214,18 @@ allOf:
151214
clock-names:
152215
maxItems: 1
153216

217+
reset: false
218+
219+
reset-names: false
220+
154221
phys: false
155222

156223
phy-names: false
157224

158225
power-domain: false
159226

227+
mediatek,pbus-csr: false
228+
160229
unevaluatedProperties: false
161230

162231
examples:
@@ -316,3 +385,54 @@ examples:
316385
};
317386
};
318387
};
388+
389+
# AN7583
390+
- |
391+
#include <dt-bindings/interrupt-controller/irq.h>
392+
#include <dt-bindings/interrupt-controller/arm-gic.h>
393+
#include <dt-bindings/clock/en7523-clk.h>
394+
395+
soc_3 {
396+
#address-cells = <2>;
397+
#size-cells = <2>;
398+
399+
pcie@1fa92000 {
400+
compatible = "airoha,an7583-pcie";
401+
device_type = "pci";
402+
linux,pci-domain = <1>;
403+
#address-cells = <3>;
404+
#size-cells = <2>;
405+
406+
reg = <0x0 0x1fa92000 0x0 0x1670>;
407+
reg-names = "port1";
408+
409+
clocks = <&scuclk EN7523_CLK_PCIE>;
410+
clock-names = "sys_ck1";
411+
412+
phys = <&pciephy>;
413+
phy-names = "pcie-phy1";
414+
415+
ranges = <0x02000000 0 0x24000000 0x0 0x24000000 0 0x4000000>;
416+
417+
resets = <&scuclk>; /* AN7583_PCIE1_RST */
418+
reset-names = "pcie-rst1";
419+
420+
mediatek,pbus-csr = <&pbus_csr 0x8 0xc>;
421+
422+
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
423+
interrupt-names = "pcie_irq";
424+
bus-range = <0x00 0xff>;
425+
#interrupt-cells = <1>;
426+
interrupt-map-mask = <0 0 0 7>;
427+
interrupt-map = <0 0 0 1 &pcie_intc1 0>,
428+
<0 0 0 2 &pcie_intc1 1>,
429+
<0 0 0 3 &pcie_intc1 2>,
430+
<0 0 0 4 &pcie_intc1 3>;
431+
432+
pcie_intc1_4: interrupt-controller {
433+
interrupt-controller;
434+
#address-cells = <0>;
435+
#interrupt-cells = <1>;
436+
};
437+
};
438+
};

0 commit comments

Comments
 (0)