Skip to content

Commit b08929e

Browse files
matthew-gerlachkwilczynski
authored andcommitted
dt-bindings: PCI: altera: Convert to YAML
Convert the devicetree bindings for the Altera Root Port PCIe controller from text to YAML. While at it, update the entries in the interrupt-map field to have the correct number of address cells for the interrupt parent. Link: https://lore.kernel.org/linux-pci/20240702162652.1349121-1-matthew.gerlach@linux.intel.com Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 364cfd8 commit b08929e

3 files changed

Lines changed: 115 additions & 51 deletions

File tree

Documentation/devicetree/bindings/pci/altera-pcie.txt

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
# Copyright (C) 2015, 2019, 2024, Intel Corporation
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/altr,pcie-root-port.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Altera PCIe Root Port
9+
10+
maintainers:
11+
- Matthew Gerlach <matthew.gerlach@linux.intel.com>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- altr,pcie-root-port-1.0
17+
- altr,pcie-root-port-2.0
18+
19+
reg:
20+
items:
21+
- description: TX slave port region
22+
- description: Control register access region
23+
- description: Hard IP region
24+
minItems: 2
25+
26+
reg-names:
27+
items:
28+
- const: Txs
29+
- const: Cra
30+
- const: Hip
31+
minItems: 2
32+
33+
interrupts:
34+
maxItems: 1
35+
36+
interrupt-controller: true
37+
38+
interrupt-map-mask:
39+
items:
40+
- const: 0
41+
- const: 0
42+
- const: 0
43+
- const: 7
44+
45+
interrupt-map:
46+
maxItems: 4
47+
48+
"#interrupt-cells":
49+
const: 1
50+
51+
msi-parent: true
52+
53+
required:
54+
- compatible
55+
- reg
56+
- reg-names
57+
- interrupts
58+
- "#interrupt-cells"
59+
- interrupt-controller
60+
- interrupt-map
61+
- interrupt-map-mask
62+
63+
allOf:
64+
- $ref: /schemas/pci/pci-host-bridge.yaml#
65+
- if:
66+
properties:
67+
compatible:
68+
enum:
69+
- altr,pcie-root-port-1.0
70+
then:
71+
properties:
72+
reg:
73+
maxItems: 2
74+
75+
reg-names:
76+
maxItems: 2
77+
78+
else:
79+
properties:
80+
reg:
81+
minItems: 3
82+
83+
reg-names:
84+
minItems: 3
85+
86+
87+
unevaluatedProperties: false
88+
89+
examples:
90+
- |
91+
#include <dt-bindings/interrupt-controller/arm-gic.h>
92+
#include <dt-bindings/interrupt-controller/irq.h>
93+
pcie_0: pcie@c00000000 {
94+
compatible = "altr,pcie-root-port-1.0";
95+
reg = <0xc0000000 0x20000000>,
96+
<0xff220000 0x00004000>;
97+
reg-names = "Txs", "Cra";
98+
interrupt-parent = <&hps_0_arm_gic_0>;
99+
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
100+
interrupt-controller;
101+
#interrupt-cells = <1>;
102+
bus-range = <0x0 0xff>;
103+
device_type = "pci";
104+
msi-parent = <&msi_to_gic_gen_0>;
105+
#address-cells = <3>;
106+
#size-cells = <2>;
107+
interrupt-map-mask = <0 0 0 7>;
108+
interrupt-map = <0 0 0 1 &pcie_0 0 0 0 1>,
109+
<0 0 0 2 &pcie_0 0 0 0 2>,
110+
<0 0 0 3 &pcie_0 0 0 0 3>,
111+
<0 0 0 4 &pcie_0 0 0 0 4>;
112+
ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000>,
113+
<0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>;
114+
};

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17372,7 +17372,7 @@ PCI DRIVER FOR ALTERA PCIE IP
1737217372
M: Joyce Ooi <joyce.ooi@intel.com>
1737317373
L: linux-pci@vger.kernel.org
1737417374
S: Supported
17375-
F: Documentation/devicetree/bindings/pci/altera-pcie.txt
17375+
F: Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml
1737617376
F: drivers/pci/controller/pcie-altera.c
1737717377

1737817378
PCI DRIVER FOR APPLIEDMICRO XGENE

0 commit comments

Comments
 (0)