Skip to contentSkip to conversation

Add Broadcom Stingray PCIe PHY support

PATCH Superseded Ray Jui 1 participant 4 messages May 16, 2018 – May 29, 2018

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Ray Jui

author
#0 lore raw

cover Add Broadcom Stingray PCIe PHY support

This patch series adds PCIe PHY support for both PAXB and PAXC root complex in Broadcom Stingray SOC

This patch series is based off v4.17-rc5 and is available on GIHUB:
repo: https://github.com/Broadcom/arm64-linux.git
branch: sr-pcie-phy-v1

Ray Jui (2):
dt-bindings: phy: Add binding doc for Stingray PCIe PHY
phy: bcm-sr-pcie: Add Stingray PCIe PHY driver

 .../devicetree/bindings/phy/brcm,sr-pcie-phy.txt   |  39 +++
 drivers/phy/broadcom/Kconfig                       |  10 +
 drivers/phy/broadcom/Makefile                      |   2 +
 drivers/phy/broadcom/phy-bcm-sr-pcie.c             | 306 +++++++++++++++++++++
 4 files changed, 357 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/brcm,sr-pcie-phy.txt
 create mode 100644 drivers/phy/broadcom/phy-bcm-sr-pcie.c
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 1/2 dt-bindings: phy: Add binding doc for Stingray PCIe PHY

Add binding document for Stingray PCIe PHYs for both PAXB and PAXC based root complex

---
 .../devicetree/bindings/phy/brcm,sr-pcie-phy.txt   | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/brcm,sr-pcie-phy.txt
Documentation/devicetree/bindings/phy/brcm,sr-pcie-phy.txt new file +39 -0
new file mode 100644
index 0000000..c2eede6
@@ -0,0 +1,39 @@
+Broadcom Stingray PCIe PHY
+
+Required properties:
+- compatible: must be "brcm,sr-pcie-phy"
+- brcm,sr-cdru: phandle to the CDRU syscon node
+- brcm,sr-mhb: phandle to the MHB syscon node
+- #phy-cells: Must be 1, denotes the PHY index
+
+For PAXB based root complex, one can have a configuration of up to 8 PHYs
+PHY index goes from 0 to 7
+
+For the internal PAXC based root complex, PHY index is always 8
+
+Example:
+	mhb: syscon@60401000 {
+		compatible = "brcm,sr-mhb", "syscon";
+		reg = <0 0x60401000 0 0x38c>;
+	};
+
+	cdru: syscon@6641d000 {
+		compatible = "brcm,sr-cdru", "syscon";
+		reg = <0 0x6641d000 0 0x400>;
+	};
+
+	pcie_phy: phy {
+		compatible = "brcm,sr-pcie-phy";
+		brcm,sr-cdru = <&cdru>;
+		brcm,sr-mhb = <&mhb>;
+		#phy-cells = <1>;
+	};
+
+	/* users of the PCIe PHY */
+
+	pcie0: pcie@48000000 {
+		...
+		...
+		phys = <&pcie_phy 0>;
+		phy-names = "pcie-phy";
+	};
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH 2/2 phy: bcm-sr-pcie: Add Stingray PCIe PHY driver

In reply to Ray Jui

Add Stingray PCIe PHY driver for both PAXB and PAXC root complex

---
 drivers/phy/broadcom/Kconfig           |  10 ++
 drivers/phy/broadcom/Makefile          |   2 +
 drivers/phy/broadcom/phy-bcm-sr-pcie.c | 306 +++++++++++++++++++++++++++++++++
 3 files changed, 318 insertions(+)
 create mode 100644 drivers/phy/broadcom/phy-bcm-sr-pcie.c
drivers/phy/broadcom/Kconfig +10 -0
index 97d27b0d5..8786a96 100644
@@ -80,3 +80,13 @@ config PHY_BRCM_USB
 	  This driver is required by the USB XHCI, EHCI and OHCI
 	  drivers.
 	  If unsure, say N.
+
+config PHY_BCM_SR_PCIE
+	tristate "Broadcom Stingray PCIe PHY driver"
+	depends on OF && (ARCH_BCM_IPROC || COMPILE_TEST)
+	select GENERIC_PHY
+	select MFD_SYSCON
+	default ARCH_BCM_IPROC
+	help
+	  Enable this to support the Broadcom Stingray PCIe PHY
+	  If unsure, say N.
drivers/phy/broadcom/Makefile +2 -0
index 13e000c..0f60184 100644
@@ -9,3 +9,5 @@ obj-$(CONFIG_PHY_BRCM_SATA)		+= phy-brcm-sata.o
 obj-$(CONFIG_PHY_BRCM_USB)		+= phy-brcm-usb-dvr.o
 
 phy-brcm-usb-dvr-objs := phy-brcm-usb.o phy-brcm-usb-init.o
+
+obj-$(CONFIG_PHY_BCM_SR_PCIE)		+= phy-bcm-sr-pcie.o
drivers/phy/broadcom/phy-bcm-sr-pcie.c new file +306 -0

306 lines not on this page · raw message

Signature · 1 line
2.1.4
author
#3 lore raw
In reply to Ray Jui

Hi Kishon,

Have you had a chance to review the following patch series?

Regards,

Ray

Quoted 19 lines · Ray Jui

This patch series adds PCIe PHY support for both PAXB and PAXC root complex in Broadcom Stingray SOC

This patch series is based off v4.17-rc5 and is available on GIHUB:
repo: https://github.com/Broadcom/arm64-linux.git
branch: sr-pcie-phy-v1

Ray Jui (2):
dt-bindings: phy: Add binding doc for Stingray PCIe PHY
phy: bcm-sr-pcie: Add Stingray PCIe PHY driver

  .../devicetree/bindings/phy/brcm,sr-pcie-phy.txt   |  39 +++
  drivers/phy/broadcom/Kconfig                       |  10 +
  drivers/phy/broadcom/Makefile                      |   2 +
  drivers/phy/broadcom/phy-bcm-sr-pcie.c             | 306 +++++++++++++++++++++
  4 files changed, 357 insertions(+)

create mode 100644 Documentation/devicetree/bindings/phy/brcm,sr-pcie-phy.txt create mode 100644 drivers/phy/broadcom/phy-bcm-sr-pcie.c