Skip to content

Commit b3ba0f6

Browse files
mranostaykwilczynski
authored andcommitted
dt-bindings: PCI: ti,j721e-pci-*: Add checks for num-lanes
Add num-lanes schema checks based on compatible string on available lanes for that platform. Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Matt Ranostay <[email protected]> Signed-off-by: Achal Verma <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]>
1 parent b85ea95 commit b3ba0f6

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ title: TI J721E PCI EP (PCIe Wrapper)
1010
maintainers:
1111
- Kishon Vijay Abraham I <[email protected]>
1212

13-
allOf:
14-
- $ref: cdns-pcie-ep.yaml#
15-
1613
properties:
1714
compatible:
1815
oneOf:
@@ -65,6 +62,30 @@ properties:
6562
items:
6663
- const: link_state
6764

65+
allOf:
66+
- $ref: cdns-pcie-ep.yaml#
67+
- if:
68+
properties:
69+
compatible:
70+
enum:
71+
- ti,am64-pcie-ep
72+
then:
73+
properties:
74+
num-lanes:
75+
const: 1
76+
77+
- if:
78+
properties:
79+
compatible:
80+
enum:
81+
- ti,j7200-pcie-ep
82+
- ti,j721e-pcie-ep
83+
then:
84+
properties:
85+
num-lanes:
86+
minimum: 1
87+
maximum: 2
88+
6889
required:
6990
- compatible
7091
- reg

Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ title: TI J721E PCI Host (PCIe Wrapper)
1010
maintainers:
1111
- Kishon Vijay Abraham I <[email protected]>
1212

13-
allOf:
14-
- $ref: cdns-pcie-host.yaml#
15-
1613
properties:
1714
compatible:
1815
oneOf:
@@ -94,6 +91,30 @@ properties:
9491
interrupts:
9592
maxItems: 1
9693

94+
allOf:
95+
- $ref: cdns-pcie-host.yaml#
96+
- if:
97+
properties:
98+
compatible:
99+
enum:
100+
- ti,am64-pcie-host
101+
then:
102+
properties:
103+
num-lanes:
104+
const: 1
105+
106+
- if:
107+
properties:
108+
compatible:
109+
enum:
110+
- ti,j7200-pcie-host
111+
- ti,j721e-pcie-host
112+
then:
113+
properties:
114+
num-lanes:
115+
minimum: 1
116+
maximum: 2
117+
97118
required:
98119
- compatible
99120
- reg

0 commit comments

Comments
 (0)