Skip to content

Commit bbd11bd

Browse files
Jianguo Sunbjorn-helgaas
authored andcommitted
PCI: hisi: Add HiSilicon STB SoC PCIe controller driver
Add a HiSilicon STB SoC PCIe controller driver. This controller is based on the DesignWare PCIe core. Signed-off-by: Jianguo Sun <sunjianguo1@huawei.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 9e66317 commit bbd11bd

File tree

5 files changed

+557
-0
lines changed

5 files changed

+557
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
HiSilicon STB PCIe host bridge DT description
2+
3+
The HiSilicon STB PCIe host controller is based on the DesignWare PCIe core.
4+
It shares common functions with the DesignWare PCIe core driver and inherits
5+
common properties defined in
6+
Documentation/devicetree/bindings/pci/designware-pcie.txt.
7+
8+
Additional properties are described here:
9+
10+
Required properties
11+
- compatible: Should be one of the following strings:
12+
"hisilicon,hi3798cv200-pcie"
13+
- reg: Should contain sysctl, rc_dbi, config registers location and length.
14+
- reg-names: Must include the following entries:
15+
"control": control registers of PCIe controller;
16+
"rc-dbi": configuration space of PCIe controller;
17+
"config": configuration transaction space of PCIe controller.
18+
- bus-range: PCI bus numbers covered.
19+
- interrupts: MSI interrupt.
20+
- interrupt-names: Must include "msi" entries.
21+
- clocks: List of phandle and clock specifier pairs as listed in clock-names
22+
property.
23+
- clock-name: Must include the following entries:
24+
"aux": auxiliary gate clock;
25+
"pipe": pipe gate clock;
26+
"sys": sys gate clock;
27+
"bus": bus gate clock.
28+
- resets: List of phandle and reset specifier pairs as listed in reset-names
29+
property.
30+
- reset-names: Must include the following entries:
31+
"soft": soft reset;
32+
"sys": sys reset;
33+
"bus": bus reset.
34+
35+
Optional properties:
36+
- reset-gpios: The gpio to generate PCIe PERST# assert and deassert signal.
37+
- phys: List of phandle and phy mode specifier, should be 0.
38+
- phy-names: Must be "phy".
39+
40+
Example:
41+
pcie@f9860000 {
42+
compatible = "hisilicon,hi3798cv200-pcie";
43+
reg = <0xf9860000 0x1000>,
44+
<0xf0000000 0x2000>,
45+
<0xf2000000 0x01000000>;
46+
reg-names = "control", "rc-dbi", "config";
47+
#address-cells = <3>;
48+
#size-cells = <2>;
49+
device_type = "pci";
50+
bus-range = <0 15>;
51+
num-lanes = <1>;
52+
ranges=<0x81000000 0 0 0xf4000000 0 0x00010000
53+
0x82000000 0 0xf3000000 0xf3000000 0 0x01000000>;
54+
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
55+
interrupt-names = "msi";
56+
#interrupt-cells = <1>;
57+
interrupt-map-mask = <0 0 0 0>;
58+
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
59+
clocks = <&crg PCIE_AUX_CLK>,
60+
<&crg PCIE_PIPE_CLK>,
61+
<&crg PCIE_SYS_CLK>,
62+
<&crg PCIE_BUS_CLK>;
63+
clock-names = "aux", "pipe", "sys", "bus";
64+
resets = <&crg 0x18c 6>, <&crg 0x18c 5>, <&crg 0x18c 4>;
65+
reset-names = "soft", "sys", "bus";
66+
phys = <&combphy1 PHY_TYPE_PCIE>;
67+
phy-names = "phy";
68+
};

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10480,6 +10480,14 @@ S: Maintained
1048010480
F: Documentation/devicetree/bindings/pci/pcie-kirin.txt
1048110481
F: drivers/pci/dwc/pcie-kirin.c
1048210482

10483+
PCIE DRIVER FOR HISILICON STB
10484+
M: Jianguo Sun <sunjianguo1@huawei.com>
10485+
M: Shawn Guo <shawn.guo@linaro.org>
10486+
L: linux-pci@vger.kernel.org
10487+
S: Maintained
10488+
F: Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
10489+
F: drivers/pci/dwc/pcie-histb.c
10490+
1048310491
PCIE DRIVER FOR MEDIATEK
1048410492
M: Ryder Lee <ryder.lee@mediatek.com>
1048510493
L: linux-pci@vger.kernel.org

drivers/pci/dwc/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,14 @@ config PCIE_KIRIN
169169
Say Y here if you want PCIe controller support
170170
on HiSilicon Kirin series SoCs.
171171

172+
config PCIE_HISI_STB
173+
bool "HiSilicon STB SoCs PCIe controllers"
174+
depends on ARCH_HISI
175+
depends on PCI
176+
depends on PCI_MSI_IRQ_DOMAIN
177+
select PCIEPORTBUS
178+
select PCIE_DW_HOST
179+
help
180+
Say Y here if you want PCIe controller support on HiSilicon STB SoCs
181+
172182
endmenu

drivers/pci/dwc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_PCIE_QCOM) += pcie-qcom.o
1414
obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
1515
obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o
1616
obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o
17+
obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o
1718

1819
# The following drivers are for devices that use the generic ACPI
1920
# pci_root.c driver but don't support standard ECAM config access.

0 commit comments

Comments
 (0)