Skip to content

Commit 096d05b

Browse files
robherringMani-Sadhasivam
authored andcommitted
dt-bindings: PCI: Convert marvell,armada8k-pcie to schema
Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding. The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented. Signed-off-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 0c983d3 commit 096d05b

File tree

5 files changed

+106
-51
lines changed

5 files changed

+106
-51
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/marvell,armada8k-pcie.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Armada 7K/8K PCIe interface
8+
9+
maintainers:
10+
- Thomas Petazzoni <[email protected]>
11+
12+
description:
13+
This PCIe host controller is based on the Synopsys DesignWare PCIe IP.
14+
15+
select:
16+
properties:
17+
compatible:
18+
contains:
19+
enum:
20+
- marvell,armada8k-pcie
21+
required:
22+
- compatible
23+
24+
allOf:
25+
- $ref: snps,dw-pcie.yaml#
26+
27+
properties:
28+
compatible:
29+
items:
30+
- enum:
31+
- marvell,armada8k-pcie
32+
- const: snps,dw-pcie
33+
34+
reg:
35+
maxItems: 2
36+
37+
reg-names:
38+
items:
39+
- const: ctrl
40+
- const: config
41+
42+
clocks:
43+
minItems: 1
44+
maxItems: 2
45+
46+
clock-names:
47+
items:
48+
- const: core
49+
- const: reg
50+
51+
interrupts:
52+
maxItems: 1
53+
54+
msi-parent:
55+
maxItems: 1
56+
57+
phys:
58+
minItems: 1
59+
maxItems: 4
60+
61+
phy-names:
62+
minItems: 1
63+
maxItems: 4
64+
65+
marvell,reset-gpio:
66+
maxItems: 1
67+
deprecated: true
68+
69+
required:
70+
- interrupt-map
71+
- clocks
72+
- msi-parent
73+
74+
unevaluatedProperties: false
75+
76+
examples:
77+
- |
78+
#include <dt-bindings/interrupt-controller/arm-gic.h>
79+
#include <dt-bindings/interrupt-controller/irq.h>
80+
81+
pcie@f2600000 {
82+
compatible = "marvell,armada8k-pcie", "snps,dw-pcie";
83+
reg = <0xf2600000 0x10000>, <0xf6f00000 0x80000>;
84+
reg-names = "ctrl", "config";
85+
#address-cells = <3>;
86+
#size-cells = <2>;
87+
#interrupt-cells = <1>;
88+
device_type = "pci";
89+
dma-coherent;
90+
msi-parent = <&gic_v2m0>;
91+
92+
ranges = <0x81000000 0 0xf9000000 0xf9000000 0 0x10000>, /* downstream I/O */
93+
<0x82000000 0 0xf6000000 0xf6000000 0 0xf00000>; /* non-prefetchable memory */
94+
interrupt-map-mask = <0 0 0 0>;
95+
interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
96+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
97+
num-lanes = <1>;
98+
clocks = <&cpm_syscon0 1 13>;
99+
};
100+
...

Documentation/devicetree/bindings/pci/pci-armada8k.txt

Lines changed: 0 additions & 48 deletions
This file was deleted.

Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ properties:
115115
above for new bindings.
116116
oneOf:
117117
- description: See native 'dbi' clock for details
118-
enum: [ pcie, pcie_apb_sys, aclk_dbi ]
118+
enum: [ pcie, pcie_apb_sys, aclk_dbi, reg ]
119119
- description: See native 'mstr/slv' clock for details
120120
enum: [ pcie_bus, pcie_inbound_axi, pcie_aclk, aclk_mst, aclk_slv ]
121121
- description: See native 'pipe' clock for details
@@ -201,6 +201,7 @@ properties:
201201
oneOf:
202202
- pattern: '^pcie(-?phy[0-9]*)?$'
203203
- pattern: '^p2u-[0-7]$'
204+
- pattern: '^cp[01]-pcie[0-2]-x[124](-lane[0-3])?-phy$' # marvell,armada8k-pcie
204205

205206
reset-gpio:
206207
deprecated: true

Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ properties:
105105
Vendor-specific CSR names. Consider using the generic names above
106106
for new bindings.
107107
oneOf:
108+
- description: See native 'dbi' CSR region for details.
109+
enum: [ ctrl ]
108110
- description: See native 'elbi/app' CSR region for details.
109111
enum: [ apb, mgmt, link, ulreg, appl ]
110112
- description: See native 'atu' CSR region for details.
@@ -117,7 +119,7 @@ properties:
117119
const: slcr
118120
allOf:
119121
- contains:
120-
const: dbi
122+
enum: [ dbi, ctrl ]
121123
- contains:
122124
const: config
123125

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18411,7 +18411,7 @@ M: Thomas Petazzoni <[email protected]>
1841118411
1841218412
L: [email protected] (moderated for non-subscribers)
1841318413
S: Maintained
18414-
F: Documentation/devicetree/bindings/pci/pci-armada8k.txt
18414+
F: Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
1841518415
F: drivers/pci/controller/dwc/pcie-armada8k.c
1841618416

1841718417
PCI DRIVER FOR CADENCE PCIE IP

0 commit comments

Comments
 (0)