Skip to content

Commit 9b0b9b5

Browse files
floatiouskwilczynski
authored andcommitted
dt-bindings: PCI: rockchip-dw-pcie: Prepare for Endpoint mode support
Refactor the rockchip-dw-pcie binding to move generic properties to a new rockchip-dw-pcie-common binding that can be shared by both RC and EP mode. No functional change intended. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-4-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
1 parent 6f308c0 commit 9b0b9b5

2 files changed

Lines changed: 114 additions & 90 deletions

File tree

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/rockchip-dw-pcie-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: DesignWare based PCIe RC/EP controller on Rockchip SoCs
8+
9+
maintainers:
10+
- Shawn Lin <shawn.lin@rock-chips.com>
11+
- Simon Xue <xxm@rock-chips.com>
12+
- Heiko Stuebner <heiko@sntech.de>
13+
14+
description: |+
15+
Generic properties for the DesignWare based PCIe RC/EP controller on Rockchip
16+
SoCs.
17+
18+
properties:
19+
clocks:
20+
minItems: 5
21+
items:
22+
- description: AHB clock for PCIe master
23+
- description: AHB clock for PCIe slave
24+
- description: AHB clock for PCIe dbi
25+
- description: APB clock for PCIe
26+
- description: Auxiliary clock for PCIe
27+
- description: PIPE clock
28+
- description: Reference clock for PCIe
29+
30+
clock-names:
31+
minItems: 5
32+
items:
33+
- const: aclk_mst
34+
- const: aclk_slv
35+
- const: aclk_dbi
36+
- const: pclk
37+
- const: aux
38+
- const: pipe
39+
- const: ref
40+
41+
interrupts:
42+
items:
43+
- description:
44+
Combined system interrupt, which is used to signal the following
45+
interrupts - phy_link_up, dll_link_up, link_req_rst_not, hp_pme,
46+
hp, hp_msi, link_auto_bw, link_auto_bw_msi, bw_mgt, bw_mgt_msi,
47+
edma_wr, edma_rd, dpa_sub_upd, rbar_update, link_eq_req, ep_elbi_app
48+
- description:
49+
Combined PM interrupt, which is used to signal the following
50+
interrupts - linkst_in_l1sub, linkst_in_l1, linkst_in_l2,
51+
linkst_in_l0s, linkst_out_l1sub, linkst_out_l1, linkst_out_l2,
52+
linkst_out_l0s, pm_dstate_update
53+
- description:
54+
Combined message interrupt, which is used to signal the following
55+
interrupts - ven_msg, unlock_msg, ltr_msg, cfg_pme, cfg_pme_msi,
56+
pm_pme, pm_to_ack, pm_turnoff, obff_idle, obff_obff, obff_cpu_active
57+
- description:
58+
Combined legacy interrupt, which is used to signal the following
59+
interrupts - inta, intb, intc, intd
60+
- description:
61+
Combined error interrupt, which is used to signal the following
62+
interrupts - aer_rc_err, aer_rc_err_msi, rx_cpl_timeout,
63+
tx_cpl_timeout, cor_err_sent, nf_err_sent, f_err_sent, cor_err_rx,
64+
nf_err_rx, f_err_rx, radm_qoverflow
65+
66+
interrupt-names:
67+
items:
68+
- const: sys
69+
- const: pmc
70+
- const: msg
71+
- const: legacy
72+
- const: err
73+
74+
num-lanes: true
75+
76+
phys:
77+
maxItems: 1
78+
79+
phy-names:
80+
const: pcie-phy
81+
82+
power-domains:
83+
maxItems: 1
84+
85+
resets:
86+
minItems: 1
87+
maxItems: 2
88+
89+
reset-names:
90+
oneOf:
91+
- const: pipe
92+
- items:
93+
- const: pwr
94+
- const: pipe
95+
96+
required:
97+
- compatible
98+
- reg
99+
- reg-names
100+
- clocks
101+
- clock-names
102+
- num-lanes
103+
- phys
104+
- phy-names
105+
- power-domains
106+
- resets
107+
- reset-names
108+
109+
additionalProperties: true
110+
111+
...

Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml

Lines changed: 3 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44
$id: http://devicetree.org/schemas/pci/rockchip-dw-pcie.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: DesignWare based PCIe controller on Rockchip SoCs
7+
title: DesignWare based PCIe Root Complex controller on Rockchip SoCs
88

99
maintainers:
1010
- Shawn Lin <shawn.lin@rock-chips.com>
1111
- Simon Xue <xxm@rock-chips.com>
1212
- Heiko Stuebner <heiko@sntech.de>
1313

1414
description: |+
15-
RK3568 SoC PCIe host controller is based on the Synopsys DesignWare
15+
RK3568 SoC PCIe Root Complex controller is based on the Synopsys DesignWare
1616
PCIe IP and thus inherits all the common properties defined in
1717
snps,dw-pcie.yaml.
1818
1919
allOf:
2020
- $ref: /schemas/pci/snps,dw-pcie.yaml#
21+
- $ref: /schemas/pci/rockchip-dw-pcie-common.yaml#
2122

2223
properties:
2324
compatible:
@@ -40,61 +41,6 @@ properties:
4041
- const: apb
4142
- const: config
4243

43-
clocks:
44-
minItems: 5
45-
items:
46-
- description: AHB clock for PCIe master
47-
- description: AHB clock for PCIe slave
48-
- description: AHB clock for PCIe dbi
49-
- description: APB clock for PCIe
50-
- description: Auxiliary clock for PCIe
51-
- description: PIPE clock
52-
- description: Reference clock for PCIe
53-
54-
clock-names:
55-
minItems: 5
56-
items:
57-
- const: aclk_mst
58-
- const: aclk_slv
59-
- const: aclk_dbi
60-
- const: pclk
61-
- const: aux
62-
- const: pipe
63-
- const: ref
64-
65-
interrupts:
66-
items:
67-
- description:
68-
Combined system interrupt, which is used to signal the following
69-
interrupts - phy_link_up, dll_link_up, link_req_rst_not, hp_pme,
70-
hp, hp_msi, link_auto_bw, link_auto_bw_msi, bw_mgt, bw_mgt_msi,
71-
edma_wr, edma_rd, dpa_sub_upd, rbar_update, link_eq_req, ep_elbi_app
72-
- description:
73-
Combined PM interrupt, which is used to signal the following
74-
interrupts - linkst_in_l1sub, linkst_in_l1, linkst_in_l2,
75-
linkst_in_l0s, linkst_out_l1sub, linkst_out_l1, linkst_out_l2,
76-
linkst_out_l0s, pm_dstate_update
77-
- description:
78-
Combined message interrupt, which is used to signal the following
79-
interrupts - ven_msg, unlock_msg, ltr_msg, cfg_pme, cfg_pme_msi,
80-
pm_pme, pm_to_ack, pm_turnoff, obff_idle, obff_obff, obff_cpu_active
81-
- description:
82-
Combined legacy interrupt, which is used to signal the following
83-
interrupts - inta, intb, intc, intd
84-
- description:
85-
Combined error interrupt, which is used to signal the following
86-
interrupts - aer_rc_err, aer_rc_err_msi, rx_cpl_timeout,
87-
tx_cpl_timeout, cor_err_sent, nf_err_sent, f_err_sent, cor_err_rx,
88-
nf_err_rx, f_err_rx, radm_qoverflow
89-
90-
interrupt-names:
91-
items:
92-
- const: sys
93-
- const: pmc
94-
- const: msg
95-
- const: legacy
96-
- const: err
97-
9844
legacy-interrupt-controller:
9945
description: Interrupt controller node for handling legacy PCI interrupts.
10046
type: object
@@ -119,47 +65,14 @@ properties:
11965

12066
msi-map: true
12167

122-
num-lanes: true
123-
124-
phys:
125-
maxItems: 1
126-
127-
phy-names:
128-
const: pcie-phy
129-
130-
power-domains:
131-
maxItems: 1
132-
13368
ranges:
13469
minItems: 2
13570
maxItems: 3
13671

137-
resets:
138-
minItems: 1
139-
maxItems: 2
140-
141-
reset-names:
142-
oneOf:
143-
- const: pipe
144-
- items:
145-
- const: pwr
146-
- const: pipe
147-
14872
vpcie3v3-supply: true
14973

15074
required:
151-
- compatible
152-
- reg
153-
- reg-names
154-
- clocks
155-
- clock-names
15675
- msi-map
157-
- num-lanes
158-
- phys
159-
- phy-names
160-
- power-domains
161-
- resets
162-
- reset-names
16376

16477
unevaluatedProperties: false
16578

0 commit comments

Comments
 (0)