Skip to content

Commit 6f5e55d

Browse files
khayash1bjorn-helgaas
authored andcommitted
dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names
Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg, clocks, resets, and their names that can be taken by the compatible string. The order of their names doesn't change here. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kunihiko Hayashi <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Rob Herring <[email protected]>
1 parent 1b929c0 commit 6f5e55d

File tree

1 file changed

+49
-27
lines changed

1 file changed

+49
-27
lines changed

Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ description: |
1515
maintainers:
1616
- Kunihiko Hayashi <[email protected]>
1717

18-
allOf:
19-
- $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
20-
2118
properties:
2219
compatible:
2320
enum:
@@ -29,40 +26,25 @@ properties:
2926
maxItems: 5
3027

3128
reg-names:
32-
oneOf:
33-
- items:
34-
- const: dbi
35-
- const: dbi2
36-
- const: link
37-
- const: addr_space
38-
- items:
39-
- const: dbi
40-
- const: dbi2
41-
- const: link
42-
- const: addr_space
43-
- const: atu
29+
minItems: 4
30+
items:
31+
- const: dbi
32+
- const: dbi2
33+
- const: link
34+
- const: addr_space
35+
- const: atu
4436

4537
clocks:
4638
minItems: 1
4739
maxItems: 2
4840

49-
clock-names:
50-
oneOf:
51-
- items: # for Pro5
52-
- const: gio
53-
- const: link
54-
- const: link # for NX1
41+
clock-names: true
5542

5643
resets:
5744
minItems: 1
5845
maxItems: 2
5946

60-
reset-names:
61-
oneOf:
62-
- items: # for Pro5
63-
- const: gio
64-
- const: link
65-
- const: link # for NX1
47+
reset-names: true
6648

6749
num-ib-windows:
6850
const: 16
@@ -78,6 +60,46 @@ properties:
7860
phy-names:
7961
const: pcie-phy
8062

63+
allOf:
64+
- $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
65+
- if:
66+
properties:
67+
compatible:
68+
contains:
69+
const: socionext,uniphier-pro5-pcie-ep
70+
then:
71+
properties:
72+
reg:
73+
maxItems: 4
74+
reg-names:
75+
maxItems: 4
76+
clocks:
77+
minItems: 2
78+
clock-names:
79+
items:
80+
- const: gio
81+
- const: link
82+
resets:
83+
minItems: 2
84+
reset-names:
85+
items:
86+
- const: gio
87+
- const: link
88+
else:
89+
properties:
90+
reg:
91+
minItems: 5
92+
reg-names:
93+
minItems: 5
94+
clocks:
95+
maxItems: 1
96+
clock-names:
97+
const: link
98+
resets:
99+
maxItems: 1
100+
reset-names:
101+
const: link
102+
81103
required:
82104
- compatible
83105
- reg

0 commit comments

Comments
 (0)