Skip to content

Commit

Permalink
PCI: hisi: Add HiSilicon STB SoC PCIe controller driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jianguo Sun authored and Bjorn Helgaas committed Oct 24, 2017
1 parent 9e66317 commit bbd11bd
Show file tree
Hide file tree
Showing 5 changed files with 557 additions and 0 deletions.
68 changes: 68 additions & 0 deletions Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
HiSilicon STB PCIe host bridge DT description

The HiSilicon STB PCIe host controller is based on the DesignWare PCIe core.
It shares common functions with the DesignWare PCIe core driver and inherits
common properties defined in
Documentation/devicetree/bindings/pci/designware-pcie.txt.

Additional properties are described here:

Required properties
- compatible: Should be one of the following strings:
"hisilicon,hi3798cv200-pcie"
- reg: Should contain sysctl, rc_dbi, config registers location and length.
- reg-names: Must include the following entries:
"control": control registers of PCIe controller;
"rc-dbi": configuration space of PCIe controller;
"config": configuration transaction space of PCIe controller.
- bus-range: PCI bus numbers covered.
- interrupts: MSI interrupt.
- interrupt-names: Must include "msi" entries.
- clocks: List of phandle and clock specifier pairs as listed in clock-names
property.
- clock-name: Must include the following entries:
"aux": auxiliary gate clock;
"pipe": pipe gate clock;
"sys": sys gate clock;
"bus": bus gate clock.
- resets: List of phandle and reset specifier pairs as listed in reset-names
property.
- reset-names: Must include the following entries:
"soft": soft reset;
"sys": sys reset;
"bus": bus reset.

Optional properties:
- reset-gpios: The gpio to generate PCIe PERST# assert and deassert signal.
- phys: List of phandle and phy mode specifier, should be 0.
- phy-names: Must be "phy".

Example:
pcie@f9860000 {
compatible = "hisilicon,hi3798cv200-pcie";
reg = <0xf9860000 0x1000>,
<0xf0000000 0x2000>,
<0xf2000000 0x01000000>;
reg-names = "control", "rc-dbi", "config";
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
bus-range = <0 15>;
num-lanes = <1>;
ranges=<0x81000000 0 0 0xf4000000 0 0x00010000
0x82000000 0 0xf3000000 0xf3000000 0 0x01000000>;
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "msi";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg PCIE_AUX_CLK>,
<&crg PCIE_PIPE_CLK>,
<&crg PCIE_SYS_CLK>,
<&crg PCIE_BUS_CLK>;
clock-names = "aux", "pipe", "sys", "bus";
resets = <&crg 0x18c 6>, <&crg 0x18c 5>, <&crg 0x18c 4>;
reset-names = "soft", "sys", "bus";
phys = <&combphy1 PHY_TYPE_PCIE>;
phy-names = "phy";
};
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10480,6 +10480,14 @@ S: Maintained
F: Documentation/devicetree/bindings/pci/pcie-kirin.txt
F: drivers/pci/dwc/pcie-kirin.c

PCIE DRIVER FOR HISILICON STB
M: Jianguo Sun <sunjianguo1@huawei.com>
M: Shawn Guo <shawn.guo@linaro.org>
L: linux-pci@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
F: drivers/pci/dwc/pcie-histb.c

PCIE DRIVER FOR MEDIATEK
M: Ryder Lee <ryder.lee@mediatek.com>
L: linux-pci@vger.kernel.org
Expand Down
10 changes: 10 additions & 0 deletions drivers/pci/dwc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,14 @@ config PCIE_KIRIN
Say Y here if you want PCIe controller support
on HiSilicon Kirin series SoCs.

config PCIE_HISI_STB
bool "HiSilicon STB SoCs PCIe controllers"
depends on ARCH_HISI
depends on PCI
depends on PCI_MSI_IRQ_DOMAIN
select PCIEPORTBUS
select PCIE_DW_HOST
help
Say Y here if you want PCIe controller support on HiSilicon STB SoCs

endmenu
1 change: 1 addition & 0 deletions drivers/pci/dwc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_PCIE_QCOM) += pcie-qcom.o
obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o
obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o
obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o

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

0 comments on commit bbd11bd

Please sign in to comment.