Skip to content

Commit 0eaa8d1

Browse files
krzkMani-Sadhasivam
authored andcommitted
dt-bindings: PCI: qcom,pcie-msm8996: Move MSM8996 to dedicated schema
Move MSM8996 PCIe devices from qcom,pcie.yaml binding to a dedicated file to make reviewing and maintenance easier. New schema is equivalent to the old one with few changes: - Adding a required compatible, which is actually redundant. - Drop the really obvious comments next to clock/reg/reset-names items. - Expecting eight MSI interrupts and one global, instead of only one, which was incomplete hardware description. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20251217-dt-bindings-pci-qcom-v2-11-873721599754@oss.qualcomm.com
1 parent b673d06 commit 0eaa8d1

2 files changed

Lines changed: 156 additions & 61 deletions

File tree

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/qcom,pcie-msm8996.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm MSM8996 PCI Express Root Complex
8+
9+
maintainers:
10+
- Bjorn Andersson <andersson@kernel.org>
11+
- Manivannan Sadhasivam <mani@kernel.org>
12+
13+
properties:
14+
compatible:
15+
oneOf:
16+
- enum:
17+
- qcom,pcie-msm8996
18+
- items:
19+
- const: qcom,pcie-msm8998
20+
- const: qcom,pcie-msm8996
21+
22+
reg:
23+
minItems: 4
24+
maxItems: 5
25+
26+
reg-names:
27+
minItems: 4
28+
items:
29+
- const: parf
30+
- const: dbi
31+
- const: elbi
32+
- const: config
33+
- const: mhi
34+
35+
clocks:
36+
maxItems: 5
37+
38+
clock-names:
39+
items:
40+
- const: pipe # Pipe Clock driving internal logic
41+
- const: aux
42+
- const: cfg
43+
- const: bus_master # Master AXI clock
44+
- const: bus_slave # Slave AXI clock
45+
46+
interrupts:
47+
minItems: 8
48+
maxItems: 9
49+
50+
interrupt-names:
51+
minItems: 8
52+
items:
53+
- const: msi0
54+
- const: msi1
55+
- const: msi2
56+
- const: msi3
57+
- const: msi4
58+
- const: msi5
59+
- const: msi6
60+
- const: msi7
61+
- const: global
62+
63+
vdda-supply:
64+
description: A phandle to the core analog power supply
65+
66+
vddpe-3v3-supply:
67+
description: A phandle to the PCIe endpoint power supply
68+
69+
required:
70+
- power-domains
71+
72+
allOf:
73+
- $ref: qcom,pcie-common.yaml#
74+
75+
unevaluatedProperties: false
76+
77+
examples:
78+
- |
79+
#include <dt-bindings/clock/qcom,gcc-msm8996.h>
80+
#include <dt-bindings/gpio/gpio.h>
81+
#include <dt-bindings/interrupt-controller/arm-gic.h>
82+
83+
pcie@600000 {
84+
compatible = "qcom,pcie-msm8996";
85+
reg = <0x00600000 0x2000>,
86+
<0x0c000000 0xf1d>,
87+
<0x0c000f20 0xa8>,
88+
<0x0c100000 0x100000>;
89+
reg-names = "parf", "dbi", "elbi", "config";
90+
ranges = <0x01000000 0x0 0x00000000 0x0c200000 0x0 0x100000>,
91+
<0x02000000 0x0 0x0c300000 0x0c300000 0x0 0xd00000>;
92+
93+
device_type = "pci";
94+
bus-range = <0x00 0xff>;
95+
num-lanes = <1>;
96+
#address-cells = <3>;
97+
#size-cells = <2>;
98+
linux,pci-domain = <0>;
99+
100+
clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
101+
<&gcc GCC_PCIE_0_AUX_CLK>,
102+
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
103+
<&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
104+
<&gcc GCC_PCIE_0_SLV_AXI_CLK>;
105+
clock-names = "pipe",
106+
"aux",
107+
"cfg",
108+
"bus_master",
109+
"bus_slave";
110+
111+
interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
112+
<GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
113+
<GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
114+
<GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
115+
<GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
116+
<GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>,
117+
<GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>,
118+
<GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>;
119+
interrupt-names = "msi0",
120+
"msi1",
121+
"msi2",
122+
"msi3",
123+
"msi4",
124+
"msi5",
125+
"msi6",
126+
"msi7";
127+
#interrupt-cells = <1>;
128+
interrupt-map-mask = <0 0 0 0x7>;
129+
interrupt-map = <0 0 0 1 &intc GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
130+
<0 0 0 2 &intc GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
131+
<0 0 0 3 &intc GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
132+
<0 0 0 4 &intc GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
133+
134+
pinctrl-names = "default", "sleep";
135+
pinctrl-0 = <&pcie0_state_on>;
136+
pinctrl-1 = <&pcie0_state_off>;
137+
138+
phys = <&pciephy_0>;
139+
phy-names = "pciephy";
140+
141+
power-domains = <&gcc PCIE0_GDSC>;
142+
143+
perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
144+
vddpe-3v3-supply = <&wlan_en>;
145+
vdda-supply = <&vreg_l28a_0p925>;
146+
147+
pcie@0 {
148+
device_type = "pci";
149+
reg = <0x0 0x0 0x0 0x0 0x0>;
150+
bus-range = <0x01 0xff>;
151+
152+
#address-cells = <3>;
153+
#size-cells = <2>;
154+
ranges;
155+
};
156+
};

Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ properties:
1919
oneOf:
2020
- enum:
2121
- qcom,pcie-apq8084
22-
- qcom,pcie-msm8996
23-
- items:
24-
- const: qcom,pcie-msm8998
25-
- const: qcom,pcie-msm8996
2622

2723
reg:
2824
minItems: 4
@@ -75,9 +71,6 @@ properties:
7571
vdda-supply:
7672
description: A phandle to the core analog power supply
7773

78-
vddpe-3v3-supply:
79-
description: A phandle to the PCIe endpoint power supply
80-
8174
phys:
8275
maxItems: 1
8376

@@ -124,7 +117,6 @@ allOf:
124117
contains:
125118
enum:
126119
- qcom,pcie-apq8084
127-
- qcom,pcie-msm8996
128120
then:
129121
properties:
130122
reg:
@@ -162,27 +154,6 @@ allOf:
162154
items:
163155
- const: core # Core reset
164156

165-
- if:
166-
properties:
167-
compatible:
168-
contains:
169-
enum:
170-
- qcom,pcie-msm8996
171-
then:
172-
properties:
173-
clocks:
174-
minItems: 5
175-
maxItems: 5
176-
clock-names:
177-
items:
178-
- const: pipe # Pipe Clock driving internal logic
179-
- const: aux # Auxiliary (AUX) clock
180-
- const: cfg # Configuration clock
181-
- const: bus_master # Master AXI clock
182-
- const: bus_slave # Slave AXI clock
183-
resets: false
184-
reset-names: false
185-
186157
- if:
187158
not:
188159
properties:
@@ -195,38 +166,6 @@ allOf:
195166
- resets
196167
- reset-names
197168

198-
- if:
199-
properties:
200-
compatible:
201-
contains:
202-
enum:
203-
- qcom,pcie-msm8996
204-
- qcom,pcie-msm8998
205-
then:
206-
oneOf:
207-
- properties:
208-
interrupts:
209-
maxItems: 1
210-
interrupt-names:
211-
items:
212-
- const: msi
213-
- properties:
214-
interrupts:
215-
minItems: 8
216-
maxItems: 9
217-
interrupt-names:
218-
minItems: 8
219-
items:
220-
- const: msi0
221-
- const: msi1
222-
- const: msi2
223-
- const: msi3
224-
- const: msi4
225-
- const: msi5
226-
- const: msi6
227-
- const: msi7
228-
- const: global
229-
230169
- if:
231170
properties:
232171
compatible:

0 commit comments

Comments
 (0)