Skip to content

Commit 8bbec86

Browse files
committed
dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
assigned-clocks are a dependency of clocks, however the dtschema has limitation and expects clocks to be present in the binding using assigned-clocks, not in other referenced bindings. The clocks were defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml. The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected) From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml Fix this by moving clocks to each specific schema from the common one and narrowing them to strictly match what is expected for given device. Fixes: b10f823 ("dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema") Acked-by: Conor Dooley <[email protected]> Reviewed-by: Richard Zhu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 6ad9cf7 commit 8bbec86

File tree

3 files changed

+117
-11
lines changed

3 files changed

+117
-11
lines changed

Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,11 @@ description:
1717
properties:
1818
clocks:
1919
minItems: 3
20-
items:
21-
- description: PCIe bridge clock.
22-
- description: PCIe bus clock.
23-
- description: PCIe PHY clock.
24-
- description: Additional required clock entry for imx6sx-pcie,
25-
imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
20+
maxItems: 4
2621

2722
clock-names:
2823
minItems: 3
29-
items:
30-
- const: pcie
31-
- const: pcie_bus
32-
- enum: [ pcie_phy, pcie_aux ]
33-
- enum: [ pcie_inbound_axi, pcie_aux ]
24+
maxItems: 4
3425

3526
num-lanes:
3627
const: 1

Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ properties:
3131
- const: dbi
3232
- const: addr_space
3333

34+
clocks:
35+
minItems: 3
36+
items:
37+
- description: PCIe bridge clock.
38+
- description: PCIe bus clock.
39+
- description: PCIe PHY clock.
40+
- description: Additional required clock entry for imx6sx-pcie,
41+
imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
42+
43+
clock-names:
44+
minItems: 3
45+
maxItems: 4
46+
3447
interrupts:
3548
items:
3649
- description: builtin eDMA interrupter.
@@ -49,6 +62,31 @@ required:
4962
allOf:
5063
- $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
5164
- $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
65+
- if:
66+
properties:
67+
compatible:
68+
enum:
69+
- fsl,imx8mq-pcie-ep
70+
then:
71+
properties:
72+
clocks:
73+
minItems: 4
74+
clock-names:
75+
items:
76+
- const: pcie
77+
- const: pcie_bus
78+
- const: pcie_phy
79+
- const: pcie_aux
80+
else:
81+
properties:
82+
clocks:
83+
maxItems: 3
84+
clock-names:
85+
items:
86+
- const: pcie
87+
- const: pcie_bus
88+
- const: pcie_aux
89+
5290

5391
unevaluatedProperties: false
5492

Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ properties:
4040
- const: dbi
4141
- const: config
4242

43+
clocks:
44+
minItems: 3
45+
items:
46+
- description: PCIe bridge clock.
47+
- description: PCIe bus clock.
48+
- description: PCIe PHY clock.
49+
- description: Additional required clock entry for imx6sx-pcie,
50+
imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
51+
52+
clock-names:
53+
minItems: 3
54+
maxItems: 4
55+
4356
interrupts:
4457
items:
4558
- description: builtin MSI controller.
@@ -77,6 +90,70 @@ required:
7790
allOf:
7891
- $ref: /schemas/pci/snps,dw-pcie.yaml#
7992
- $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
93+
- if:
94+
properties:
95+
compatible:
96+
enum:
97+
- fsl,imx6sx-pcie
98+
then:
99+
properties:
100+
clocks:
101+
minItems: 4
102+
clock-names:
103+
items:
104+
- const: pcie
105+
- const: pcie_bus
106+
- const: pcie_phy
107+
- const: pcie_inbound_axi
108+
109+
- if:
110+
properties:
111+
compatible:
112+
enum:
113+
- fsl,imx8mq-pcie
114+
then:
115+
properties:
116+
clocks:
117+
minItems: 4
118+
clock-names:
119+
items:
120+
- const: pcie
121+
- const: pcie_bus
122+
- const: pcie_phy
123+
- const: pcie_aux
124+
125+
- if:
126+
properties:
127+
compatible:
128+
enum:
129+
- fsl,imx6q-pcie
130+
- fsl,imx6qp-pcie
131+
- fsl,imx7d-pcie
132+
then:
133+
properties:
134+
clocks:
135+
maxItems: 3
136+
clock-names:
137+
items:
138+
- const: pcie
139+
- const: pcie_bus
140+
- const: pcie_phy
141+
142+
- if:
143+
properties:
144+
compatible:
145+
enum:
146+
- fsl,imx8mm-pcie
147+
- fsl,imx8mp-pcie
148+
then:
149+
properties:
150+
clocks:
151+
maxItems: 3
152+
clock-names:
153+
items:
154+
- const: pcie
155+
- const: pcie_bus
156+
- const: pcie_aux
80157

81158
unevaluatedProperties: false
82159

0 commit comments

Comments
 (0)